Uploading conversations

CSV format#

This format is useful if you have bi-directional conversations (i.e.: client & agent interactions_) that contain one or more utterances per conversation. The format consists of a CSV file in which each line contains 4 columns delimited by comma describing a single utterance that is part of a conversation.

Columns#

  • Column 1: A unique identifier of the conversation. If the conversation contains multiple utterances, the utterances should share the same identifier
  • Column 2: The date at which the utterance was made by the client or expert. This date should be a Unix epoch timestamp with millisecond precision.
    • In Excel, you can use the following formula to convert a date to the proper format: =(A1-DATE(1970,1,1))*86400000. Example: 08/27/2020 at 5:28pm should have value 1598549339000
  • Column 3: The source is the person who did the utterance in a conversation. This value must be set to either client or expert
  • column 4: The utterance text

Example#

convId1,1565799760013,client,"No thank you, I'm done for today"
convId1,1565799760014,expert,Very well
convId1,1565799760015,expert,Have a lovely day!
convId1,1565799760016,client,Likewise
convId1,1565799760017,expert,Thank you
convId2,1565803942001,client,"Hi, I'm looking for a new car"
convId2,1565803942002,expert,"Good morning. Sure, can you tell me what you are looking for?"
convId2,1565803942003,client,"What brands are you selling ?"
convId2,1565803942004,expert,"You can visit http://www.somesite.com to consult our inventory."

Humanfirst JSON format#

Here's an example of conversations defined in our JSON format. Consult the JSON format documentation for more details and advanced capabilities.

Notice the use of context.context_id in each example, this is the conversation id used to group these examples into a single conversation. The conversation message order is determined by the created_at timestamp.

Example#

{
"examples": [
{
"text": "What is the weather like in Montreal?",
"context": {
"context_id": "conv-0001",
"type": "conversation",
"role": "client"
},
"tags": [
{
"name": "montreal"
}
],
"metadata": {
"location": "Montreal, QC, Canada"
},
"created_at": "2022-01-01T12:00:00Z"
},
{
"text": "It is sunny in Montreal and the temperature is 22 degrees.",
"context": {
"context_id": "conv-0001",
"type": "conversation",
"role": "expert"
},
"created_at": "2022-01-01T12:00:05Z"
},
{
"text": "Thank you!",
"context": {
"context_id": "conv-0001",
"type": "conversation",
"role": "client"
},
"tags": [
{
"name": "montreal"
}
],
"metadata": {
"location": "Montreal, QC, Canada"
},
"created_at": "2022-01-01T12:00:10Z"
},
]
}

Gzipping#

All supported formats can be uploaded as gzipped files (.gz).