Basics of Prompting
We can achieve a lot with simpler prompts, but the quality depends on the how much information we provide to the LLM and how well-crafted the prompt is, by providing example inputs and example outputs we can improve the quality of the answer of the results.
The approach of designing effective prompts to instruct the model to perform a desirable task is what we call Prompt Engineering
The Instruction
We can achieve effective prompts by giving the model specific and simple instructions to achieve tasks like
- write
- classify
- summarize
- translate
- order
use separators like ### between the elements of the prompt for clear understanding for the Large Language Model (LLM) to process the prompt
The Specificity
Be very specific about the instruction and the task at hand, the more descriptive and detailed the prompt is the better results can be achieved. This is particularly important when there is a very specific outcome that is desired or the style of generation such as the case in ChatBuddy. There is no specific way to tune the Tokenizer generated or the keywords that lead to better results. but detailed and descriptive prompts with proper formatting is important.
providing examples is a great way to achieve better results, but this is not a one stop solution as there are limits on how long the prompt can be. Including unnecessary details is not a great approach. The details should be relevant to the task at hand. This is something that needs to be experimented and iterated over to optimize over time.
Avoid Impreciseness
With the given tips above, one can become really clever and create imprecise instructions as this is a very possible situation in the name of adding more details. it is what happened to me exactly in the case of SAiC (Smart AI Chat Bot) where i got worse responses with details and complex responses but the best results when I used simple and direct instructions from Claude
To Do or not to Do?
Another common tip is when we focus more on instructing the model what not to do rather than what to do, focusing on what to do gives us better results from the model
References