Tips for prompt engineering chatGPT
A very short, but decent beginner article on prompt engineering with chatGPT.
While ChatGPT is a robust language model, it does have its limitations. If you ask ChatGPT to “Provide information on machine learning,” it may respond with a lengthy but not necessarily top-quality answer. However, if you ask, “Tell me the pros and cons of using machine learning to solve image classification problems,” you are more likely to receive a superior outcome because:
- You gave a specific scope, i.e., the image classification problem
- You requested a specific format of the response, i.e., pros and cons
Some other tips include:
- Rather than the model on the loose, you should set up the scenario and scopes in the prompt by providing details of what, where, when, why, who, and how
- Assigning a persona in the prompt, for example, “As a computer science professor, explain what is machine learning” rather than merely “Explain what machine learning is,” can make the response more academic.
- You can control the output style by requesting “explain to a 5-year-old”, “explain with an analogy,” “make a convincing statement,” or “in 3 to 5 points.”
- To encourage the model to respond with a chain of thoughts, end your request with “solve this in steps.”
- You can provide additional information to the model by saying, “Reference to the following information,” followed by the material you want the model to work on
- Because the previous conversation constructs the context, beginning the prompt with “ignore all previous instructions before this one” can make the model start from scratch
- Making the prompt straightforward and easy to understand is essential since the context deduced can be more accurate to reflect your intention