Adapting prompts for different LLMs
As the AI landscape evolves, people are no longer solely relying on OpenAI for their language modeling needs. Other players, such as Anthropic with their Claude models, have gained popularity due to their ability to handle long context windows. Google is also releasing (and will continue to release) powerful models. Moreover, the open source model community is catching up, with models such as Llama proving to be viable alternatives.
However, it’s important to note that prompts do not seamlessly transfer from one LLM to another. Each LLM may have specific tricks and techniques that work best for its architecture. For example, Claude-3 prefers XML encoding when prompting, while Llama3 uses a specific syntax when labeling different parts of your prompt, such as SYS and INST. Here is an example prompt for Llama models using the SYS and INST tags:
<SYS> You are an AI assistant created to provide helpful and informative responses...