Effective communication with AI language models is becoming increasingly important. But how can you craft prompts that consistently produce the desired results?
In a recent video roundtable, the prompt engineering experts at Anthropic, the company behind the Claude chatbot, shared some insights from their day-to-day work. Clarity and specificity are key, according to the team.
"At its core, talking to a model is very similar to talking to a person. Clear instructions and providing all relevant information are crucial to achieving the desired results," says Zack Witten.
Another tip is to use examples in prompts, especially for business applications, called many-shot prompting. They help the model to better understand the format and style of the expected output. This is also confirmed by science. For research applications, on the other hand, the team advises using examples more sparingly so as not to limit the flexibility and variety of the generated content.
Willingness to work iteratively
Iteration and testing also play an important role in refining prompts. By repeatedly inputting, checking the output and adjusting the prompt, performance can be optimized step by step. The willingness to "do it again and again" is what characterizes the best prompt engineers, the team notes.
Further advice from the Anthropic experts: Give the model sufficient context and background information instead of simplifying things, as modern models can process complex information.
Instructions should also be provided for edge cases and unexpected inputs. However, when developing prompts, it is important not to focus too much on edge cases, but to reliably cover the base cases first. If you want the model to learn a particular task, you can try to give it the relevant papers or instructions, rather than trying to cram everything into the prompt.
The future of prompting: from engineer to designer
The team also ventured a look into the future of prompt engineering. They assume that AI models will be much more involved in the prompt writing process in the future and that the interaction between humans and models will become more interactive and collaborative.
As the performance of the models increases, the ability to understand and specifically query the actual needs and intentions of the user will also become more important. The role of the prompt engineer could thus evolve from that of an "agency employee", who issues precise instructions, to that of a "designer", who consults the model as an expert.
Anthropic offers additional prompt tips on its website. The company has also published the system prompts for its own Claude chatbots.