The term prompt has been popular in recent months through OpenAI and ChatGPT, however, not everyone is aware of certain tips for obtaining the best answer, and in the note I describe four tactics to improve the instructions.
First, ¿What is ChatGPT? is an AI-powered language model developed by OpenAI and is based on Transformers and LLM.
Users interact with ChatGPT through prompts that input text and get LLM responses.
The process that writing these instructions is commonly called “Prompt Engineering” which is “The process of designing inputs for massively large language models like GPT-3 and ChatGPT to guide them to produce relevant and coherent outputs”.(Pearson)
According to Andrew NG and Isa Fulford exist two principles to consider while we interact with a prompt.
- Write Clear and specific instructions
- Give the model time to think
The above point is supported by the tactic in that I explain his recommendations and show examples. This recommendation could be applied in UI prompt or code with openai library.
- Use delimiters to clearly indicate distinct parts of the input. The delimiter could be: ```, “””, < >,
- Ask for a structured output. Is better specify the awering format: simple text, html or json.
- Ask the model to check whether conditions are satisfied.
- “Few-shot” prompting.
- Specify the steps required to complete a task.
- Instruct the model to work out its own solution before rushing to a conclusion.
ChatGPT helps us to make better decisions, solve problems, or speed up tasks, however often the best prompt engineers are not ML engineers but rather the domain experts in the task field and the tips explained in the post allow get a better benefit in the answer.