Principles of prompt engineering
Traditionally, in the context of computing and data processing, the expression garbage in, garbage out has been used, meaning that the quality of output is determined by the quality of the input. If incorrect or poor-quality input (garbage) is entered into a system, the output will also be flawed or nonsensical (garbage).
When it comes to prompting, the story is similar: if we want accurate and relevant results from our LLMs, we need to provide high-quality input. However, building good prompts is not just about the quality of the response. In fact, we can construct good prompts to:
- Maximize the relevancy of an LLM’s responses.
- Specify the type formatting and style of responses.
- Provide conversational context.
- Reduce inner LLMs’ biases and improve fairness and inclusivity.
- Reduce hallucination.
Definition
In the context of LLMs, hallucination refers to the generation of text or...