# Prompt in Python

**URL:** <https://community.openai.com/t/prompt-in-python/41513>\
**Category:** API\
**Created:** [January 20, 2023, 2:11pm UTC](https://community.openai.com/t/prompt-in-python/41513 "2023-01-20T14:11:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deniz.kenan.kilic](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/deniz.kenan.kilic/32/17229_2.png) [@deniz.kenan.kilic](https://community.openai.com/u/deniz.kenan.kilic)\
**Post date:** [January 20, 2023, 2:11pm UTC](https://community.openai.com/t/prompt-in-python/41513/1 "2023-01-20T14:11:44Z")

</div>

Hi,

I just want to be sure if I write the prompt correctly. In a text, I want to extract only the names of the ML/AI methods used for the problem. You can see the code snippet below where test\_text is the text which I read from a txt file. I used ### as mentioned in best practices. Do you think is the below prompt correct in terms of sentence used, “###” and “+” usages etc.? Thank you so much.

response2 = openai.Completion.create(  
model=“text-davinci-003”,  
prompt=“Extract the specific names of used artificial intelligence methods or machine learning methods by using commas from the following text. Text:###{” + str(test\_text) + “}### \nA:”,  
temperature=0,  
max\_tokens=100,  
top\_p=1,  
frequency\_penalty=0.0,  
presence\_penalty=0.0,  
stop=[“\n”]  
)
