Data Format
Input Format
The input object contains conversation data and schema definitions.
| Field | Type | Required | Description |
|---|---|---|---|
messages | array | Yes | Conversation history |
language | string | Yes | Language of the conversation |
current_profile | object | Yes | Current user profile values |
profile_schema | object | Yes | Schema defining profile fields |
feedback_schema | object | Yes | Schema defining feedback fields |
prompt_extra_text | string | No | Additional 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"}
]
}
| Field | Type | Required | Values |
|---|---|---|---|
text | string | Yes | The message content |
originator | string | Yes | bot 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"
}
}
}
| Field | Required | Description |
|---|---|---|
type | Yes | Must be "string" |
description | No | Describes what this field represents |
- 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"
}
}
}
| Type | Description |
|---|---|
string | Text values |
number | Decimal numbers |
integer | Whole numbers |
boolean | True/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_schemastructure - All values are strings
nullindicates the value remains unknown
Feedback Output
Analysis results about the conversation.
- Values conform to the
feedback_schemastructure - 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"
}
}