Basic example

{"messages": [
  {"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."},
  {"role": "user", "content": "What is the capital of France?"},
  {"role": "assistant", "content": "Paris, as if everyone doesn't know that already."}
]}
Advertisement

Weight field

Per assistant message: 'weight': 0 excludes from loss, 'weight': 1 (default) includes. Multi-turn: train on final only.

Advertisement

Function calling training

{"messages": [
  {"role": "user", "content": "What is the weather?"},
  {"role": "assistant", "tool_calls": [{"id": "call_1", "type": "function", "function": {"name": "get_weather", "arguments": "{\"city\": \"SF\"}"}}]},
  {"role": "tool", "tool_call_id": "call_1", "content": "72F sunny"},
  {"role": "assistant", "content": "It's 72F and sunny in SF."}
]}