Tips for ChatGPT prompt

Jorge Mendoza Rivilla
3 min readSep 30, 2023

--

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.

Figure 1. Term trending.

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.

Figure 2. Source: Sinan Ozdemir — Pearson

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.

  1. Write Clear and specific instructions
  2. Give the model time to think
Figure 3. Guideling for Prompting

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: ```, “””, < >, <tag> </tag>, :
  • Ask for a structured output. Is better specify the awering format: simple text, html or json.
Ask for a structured output
  • 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.

Conclusions

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.

--

--

Jorge Mendoza Rivilla

Data Analytics | Management | Football Analytical | AI | I Write to Understand