Sorry I should have been clearer.
I like to summarise a conversation between a customer and a travel agent.
It seems i could request a summary following these approaches.
Approach 1
In this approach the conversation between the customer and agent is presented to the model as separate messages (see below)
The role user is used for customer and assistant is used for the agent.
The system is instructed to summarise and also explicitly instructed to not answer questions.
{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a highly skilled AI trained in language comprehension and summarization. I would like you to read the following conversation and summarize it into a concise abstract paragraph. Aim to retain the most important points, providing a coherent and readable summary that could help a person understand the main points of the discussion without needing to read the entire text. You are only required to summarise the conversation. Do not answer questions in the conversation."
},
{
"role": "user",
"content": "I need to travel to LosAngeles from London. Which route offers the cheapest fare for 30 September"
},
{
"role": "assistant",
"content": "Travelling through Canada will be the cheapest on that day. Stop over at Vancouver for mid day flight to Los Angeles"
},
{
"role": "user",
"content": "That works. What airlines fly in this route?"
},
{
"role": "assistant",
"content": "British Airways, Air Canada and Westjet. Among these Westjet will be the cheapest flying from London Gatwick"
},
{
"role": "user",
"content": "I see. What is the fare difference between these airlines?"
}
],
"temperature": 0,
"max_tokens": 1024
}
Is the above an incorrectly framed request for summarisation?
In the example above, the model thinks it needs to answer the user’s question, taking the role assistant. It seems to ignore the instruction at the beginning.
However, if the request happens to be the following then it is able to generate a satisfactory summary.
{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a highly skilled AI trained in language comprehension and summarization. I would like you to read the following conversation and summarize it into a concise abstract paragraph. Aim to retain the most important points, providing a coherent and readable summary that could help a person understand the main points of the discussion without needing to read the entire text. You are only required to summarise the conversation. Do not answer questions in the conversation."
},
{
"role": "user",
"content": "I need to travel to LosAngeles from London. Which route offers the cheapest fare for 30 September"
},
{
"role": "assistant",
"content": "Travelling through Canada will be the cheapest on that day. Stop over at Vancouver for mid day flight to Los Angeles"
},
{
"role": "user",
"content": "That works. What airlines fly in this route?"
},
{
"role": "assistant",
"content": "British Airways, Air Canada and Westjet. Among these Westjet will be the cheapest flying from London Gatwick"
},
{
"role": "user",
"content": "I see."
}
],
"temperature": 0,
"max_tokens": 1024
}
I wonder how.
Approach 2
In this approach the conversation between the travel agent and customer is presented as a blob of text.
{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a highly skilled AI trained in language comprehension and summarization. I would like you to read the following conversation and summarize it into a concise abstract paragraph. Aim to retain the most important points, providing a coherent and readable summary that could help a person understand the main points of the discussion without needing to read the entire text. You are only required to summarise the conversation. Do not answer questions in the conversation."
},
{
"role": "user",
"content": "I need to travel to LosAngeles from London. Which route offers the cheapest fare for 30 September \n Travelling through Canada will be the cheapest on that day. Stop over at Vancouver for mid day flight to Los Angeles \n That works. What airlines fly in this route? \n British Airways, Air Canada and Westjet. Among these Westjet will be the cheapest flying from London Gatwick \n I see. What is the fare difference between these airlines?"
}
],
"temperature": 0,
"max_tokens": 1024
}
In this case a reasonable summary is generated. Is this the right way to request for a summary of a conversation?
In this case the roles involved in the conversation are not specified.