< Back to examples

Transcript Summarization

Extract the main point of a conversation

Input

Summarize this dialogue:
Customer: Please connect me with a support agent.
AI: Hi there, how can I assist you today?
Customer: I forgot my password and lost access to the email affiliated to my account. Can you please help me?
AI: Yes of course. First I'll need to confirm your identity and then I can connect you with one of our support agents.
TLDR: A customer lost access to their account.

--

Summarize this dialogue:
AI: Hi there, how can I assist you today?
Customer: I want to book a product demo.
AI: Sounds great. What country are you located in?
Customer: I'll connect you with a support agent who can get something scheduled for you.
TLDR: A customer wants to book a product demo.

--

Summarize this dialogue:
AI: Hi there, how can I assist you today?
Customer: I want to get more information about your pricing.
AI: I can pull this for you, just a moment.
TLDR:

Sample Response

A customer wants to get more information about pricing.

API Request

1import cohere
2co = cohere.Client('{apiKey}')
3response = co.generate(
4  model='base',
5  prompt='Summarize this dialogue:\nCustomer: Please connect me with a support agent.\nAI: Hi there, how can I assist you today?\nCustomer: I forgot my password and lost access to the email affiliated to my account. Can you please help me?\nAI: Yes of course. First I\'ll need to confirm your identity and then I can connect you with one of our support agents.\nTLDR: A customer lost access to their account.\n--\nSummarize this dialogue:\nAI: Hi there, how can I assist you today?\nCustomer: I want to book a product demo.\nAI: Sounds great. What country are you located in?\nCustomer: I\'ll connect you with a support agent who can get something scheduled for you.\nTLDR: A customer wants to book a product demo.\n--\nSummarize this dialogue:\nAI: Hi there, how can I assist you today?\nCustomer: I want to get more information about your pricing.\nAI: I can pull this for you, just a moment.\nTLDR:',
6  max_tokens=20,
7  temperature=0.6,
8  k=0,
9  p=1,
10  frequency_penalty=0,
11  presence_penalty=0,
12  stop_sequences=["--"],
13  return_likelihoods='NONE')
14print('Prediction: {}'.format(response.generations[0].text))

Parameters

model_sizebase
k 0
frequency_penalty 0
p 1
presence_penalty 0
stop_sequence --
max_tokens 10
temperature 0.6