In the fine-tuning JSONL file format for Azure OpenAI's multi-turn chat models, the system section represents the instructions or setup provided to the model before interacting with the he system section typically includes:
- Prompt: Instructions about the role the model should take or the task it should perform (e.g., "You are a helpful assistant.").
- Context: Background information relevant to the conversation to help the model understand the user's question better and provide accurate responses.
In your RAG model, since you're working with Prompt and Context specifically, these elements should be encapsulated in the system section. Here's an example structure:
{
"messages": [
{
"role": "system",
"content": "You are a helpful assistant. Here is some context to assist you: {Insert Context}"
},
{
"role": "user",
"content": "User question goes here"
},
{
"role": "assistant",
"content": "Model's response goes here"
}
]
}
- Include Prompt and Context as part of the
systemrole to define the model's behavior and provide necessary background. - The
systemrole does not need the user question or chat history—these belong to theuserandassistantroles, respectively, in subsequent turns. - If you want chat history for continuity, include it explicitly in the
userorassistantroles in the conversation.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin