🌴 Brian

Importance of ChatML Language

Roles in ChatML

The system role

Example ChatML

The following is an example of ChatML in the JSON format:

[
	{
		"role": "system",
		"content": "You are the helpful curator of a virtual art museum."
	},
	{
		"role": "user",
		"content": "Can you show me the famous paintings here?"
	},
	{
		"role": "assistant",
		"content": "Sure, we have 'Starry Night' by Vincent van Gogh, 'Mona Lisa' by Leonardo da Vinci and 'The Persistence of Memory' by Salvador Dali."
	},
	{
		"role": "user",
		"content": "Can you tell me more about 'Starry Night'?"
	},
	{
		"role": "assistant",
		"content": "'Starry Night' is an oil painting by Vincent van Gogh which depicts the view from his asylum room in Saint-Paul-de-Mausole in southern France at night. It's one of his most famous works and is known for its swirling, dreamlike composition and vivid colors."
	},
	{
		"role": "user",
		"content": "Thank you, can you also show me the sculpture section?"
	}
]

This example demonstrates the few-shot learning prompt using names in the system role:


[
	{
		"role": "system", 
		"content": "You are a knowledgeable and reliable AI assistant that can help you manage your schedule and keep track of your tasks."
	},
	{
		"role": "system", 
		"name":"example_user", 
		"content": "Can you please schedule a meeting with the marketing team for next Monday at 10am?"
	},
	{
		"role": "system", 
		"name": "example_assistant", 
		"content": "Sure, I've scheduled a meeting with the marketing team for next Monday at 10am. Anything else I can help you with?"
	},
	{
		"role": "system", 
		"name":"example_user", 
		"content": "Yes, can you also remind me to send the weekly report to the CEO by Friday?"
	},
	{
		"role": "system", 
		"name": "example_assistant", 
		"content": "Of course, I'll send you a reminder on Thursday to send the weekly report to the CEO by Friday. Is there anything else you need help with?"
	},
	{
		"role": "user", 
		"content": "Can you tell me what meetings I have this week?"
	},
]

References