Models Prompting Formatting Guidelines
This document outlines the specific requirements for formatting messages when working with different chat model providers.
Anthropic
- The user role message must be the last message in the conversation history.
- System messages cannot be used alone; they must be accompanied by user messages.
- Examples in the conversation history must always be in pairs of user message followed by assistant message. Deviating from this pattern may cause issues.
OpenAI
- Supports the use of system messages without accompanying user messages.
- Does not require a specific order for user and assistant message examples in the conversation history.
Google
- Does not support the use of a system message without an accompanying user message.
- Requires the user role message to be the last message in the conversation history.
Updated 3 days ago