Professional Documents
Culture Documents
Read the following article and describe what you have learned about best practices
for prompt engineering.
Shieh, J. (2023). Best practices for prompt engineering with OpenAI API. Open AI.
https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-
openai-api
This article outlines six methods for utilizing AI models to produce better results:
1. Write clear instructions: The user must ensure all instructions are provided clearly,
including the format and skill level. This will enable the AI model to comprehend the
format that the user is asking for in detail. The length of the output, the coding format,
and the persona the AI model should employ are a few examples we can provide.
2. Provide reference text: By providing a reference text, users can instruct the model how to
respond. The user must give the model the text to refer to and provide instructions to
accomplish this. This approach will guarantee that the model concentrates on user
reference rather than using outside resources.
3. Split complex tasks into simpler subtasks: It is recommended that users break up complex
activities into more manageable subtasks before requesting the AI model to provide input
on complex systems. By doing this, the model will be able to clearly resolve the smaller
jobs and produce outcomes that are more accurate and contain less errors.
4. Give the model time to "think": Instead of rushing AI model to a conclusion, users should
let the AI model figure out a solution on its own. Foor example, rather than asking the AI
to solve an issue user may ask the model to validate the answer. Furthermore, the user
will verify the outcomes by probing the model with queries or inquiring whether any
details were overlooked in the offered answer.
5. Use external tools: If given as part of its input, external sources of information can be
utilized by a model. This can assist the model in producing responses that are more
current and well-informed. For example, if a user asks a question about a specific movie,
it may be useful to add high quality information about the movie (e.g. actors, director,
etc…)
6. Test changes systematically: It's critical to conduct continuous tests on AI models. This
will do a quality check to make sure the output is meeting the requirements and
producing accurate data.