Supported Formats
1. String Prompts
Simple string templates with variable placeholders.- Python
- TypeScript
2. Message Lists
Arrays of message objects withrole and content fields.
- Python
- TypeScript
"system"- Instructions for the model."user"- User messages and input context."assistant"- Assistant/model responses (for multi-turn conversations or few-shot examples)
3. Structured Content Parts (Python only)
Messages with multiple content parts, useful for separating different pieces of context.- Python
- TypeScript
Only text content is supported at this time.
Template Variables
All formats support variable substitution. Python supports both f-string ({variable}) and mustache ({{variable}}) syntax, while TypeScript supports mustache syntax only.
- Python
- TypeScript
Client-Specific Behavior
- Python
- TypeScript
All clients accept the same message format as input. Adapters handle client-specific transformations internally as needed:
OpenAI
- System role is converted to developer role for reasoning models.
- Otherwise, messages are passed as-is.
Anthropic
- System messages are extracted and passed via
systemparameter - User/assistant messages sent in messages array
Google GenAI
- System messages are extracted and passed via
system_instructionin config - Assistant role converted to
modelrole - Messages sent in contents array
LiteLLM
- Messages passed directly to LiteLLM in OpenAI format
- LiteLLM handles provider-specific conversions internally
LangChain
- OpenAI format messages are converted to LangChain message objects (
HumanMessage,AIMessage,SystemMessage)
Full Example
A complete example showing evaluator setup and usage:- Python
- TypeScript

