Skip to main content

Data Format

Input Format

The input object contains conversation data and schema definitions.

FieldTypeRequiredDescription
messagesarrayYesConversation history
languagestringYesLanguage of the conversation
current_profileobjectYesCurrent user profile values
profile_schemaobjectYesSchema defining profile fields
feedback_schemaobjectYesSchema defining feedback fields
prompt_extra_textstringNoAdditional instructions for the analysis

Messages

Messages represent the conversation history, ordered chronologically.

{
"messages": [
{"text": "Hello, how are you?", "originator": "bot"},
{"text": "I'm doing well, thanks!", "originator": "user"}
]
}
FieldTypeRequiredValues
textstringYesThe message content
originatorstringYesbot or user

Profile Schema

Defines the structure of user profile fields. All properties must have type string.

{
"profile_schema": {
"location": {
"type": "string",
"description": "User's current city"
},
"age": {
"type": "string",
"description": "User's age"
}
}
}
FieldRequiredDescription
typeYesMust be "string"
descriptionNoDescribes what this field represents
Schema Constraints
  • Only flat objects are allowed (no nested structures)
  • All properties must have type: "string"
  • All defined properties are required in the output

Feedback Schema

Defines the structure of conversation feedback. Supports multiple types.

{
"feedback_schema": {
"summary": {
"type": "string",
"description": "Summary of the conversation"
},
"sentiment_score": {
"type": "number",
"description": "Sentiment score from -1 to 1"
},
"is_satisfied": {
"type": "boolean",
"description": "Whether user seems satisfied"
}
}
}
TypeDescription
stringText values
numberDecimal numbers
integerWhole numbers
booleanTrue/false values

Current Profile

The current values of user profile fields. Values must match the profile schema. Use null for unknown values.

{
"current_profile": {
"location": "Paris",
"age": null
}
}

Prompt Extra Text

Optional additional instructions for the analysis. Use this for detailed guidance on how to analyze specific fields.

{
"prompt_extra_text": "Estimate sentiment based on word choice and tone. Consider cultural context for location inference."
}

Output Format

The output contains the updated profile and conversation feedback.

{
"output": {
"profile": {
"location": "London",
"age": "25"
},
"feedback": {
"summary": "User mentioned moving to a new city.",
"sentiment_score": 0.7,
"is_satisfied": true
}
}
}

Profile Output

Updated user profile values based on the conversation analysis.

  • Values conform to the profile_schema structure
  • All values are strings
  • null indicates the value remains unknown

Feedback Output

Analysis results about the conversation.

  • Values conform to the feedback_schema structure
  • Types match what was specified in the schema

Unknown Value Handling

Profile fields may have unknown values, represented as null in the API.

Input: When a profile field has null, it means the value is unknown.

{
"current_profile": {
"location": "Paris",
"age": null
}
}

Output: If the analysis cannot determine a value, it remains null.

{
"profile": {
"location": "London",
"age": null
}
}

If the conversation reveals new information, the value is updated:

{
"profile": {
"location": "London",
"age": "25"
}
}