diff --git a/components/fieldgroups/agentic/conversation-event.example.4.json b/components/fieldgroups/agentic/conversation-event.example.4.json new file mode 100644 index 0000000000..865a95ce1f --- /dev/null +++ b/components/fieldgroups/agentic/conversation-event.example.4.json @@ -0,0 +1,93 @@ +{ + "xdm:eventType": "conversation.turn", + "xdm:conversation": { + "xdm:conversationID": "conv-002", + "xdm:conversationName": "Geography of Europe", + "xdm:turnID": "turn-001", + "xdm:signals": [ + { + "xdm:scope": "turn", + "xdm:attributesMap": { + "subjects": { + "xdm:type": "string", + "xdm:values": [ + { + "xdm:stringValue": "capital of France", + "xdm:qualifiers": ["geographic", "factual", "educational"] + }, + { + "xdm:stringValue": "Paris", + "xdm:qualifiers": ["city", "capital"] + } + ] + }, + "intents": { + "xdm:type": "string", + "xdm:values": [ + { "xdm:stringValue": "learn more" }, + { "xdm:stringValue": "fact-checking" } + ] + }, + "tones": { + "xdm:type": "string", + "xdm:values": [ + { "xdm:stringValue": "curious" }, + { "xdm:stringValue": "questioning" } + ] + }, + "sentiment": { + "xdm:type": "number", + "xdm:values": [{ "xdm:numberValue": 0.3, "xdm:confidence": 0.9 }] + }, + "language": { + "xdm:type": "string", + "xdm:values": [{ "xdm:stringValue": "fr", "xdm:confidence": 0.98 }] + }, + "keywords": { + "xdm:type": "string", + "xdm:values": [ + { "xdm:stringValue": "France" }, + { "xdm:stringValue": "Paris" }, + { "xdm:stringValue": "capital" } + ] + }, + "topics": { + "xdm:type": "string", + "xdm:values": [ + { + "xdm:stringValue": "Questions about European Geography", + "xdm:metadata": { + "context": "There is a question about the capital of France" + } + }, + { + "xdm:stringValue": "Questions about Countries and Capitals", + "xdm:metadata": { + "context": "Specific question about the capital of France which is Paris" + } + } + ] + } + } + } + ], + "xdm:prompt": { + "xdm:source": "end-user", + "xdm:raw": [ + { + "xdm:text": "What is the capital of France?", + "xdm:purpose": "User Input" + } + ] + }, + "xdm:response": { + "xdm:source": "concierge", + "xdm:raw": [ + { + "xdm:text": "The capital of France is Paris.", + "xdm:purpose": "main" + } + ] + } + } +} diff --git a/components/fieldgroups/agentic/conversation-event.schema.json b/components/fieldgroups/agentic/conversation-event.schema.json index 7b6bd11141..6b0357fbda 100644 --- a/components/fieldgroups/agentic/conversation-event.schema.json +++ b/components/fieldgroups/agentic/conversation-event.schema.json @@ -69,6 +69,8 @@ "xdm:attributes": { "title": "Attributes", "type": "object", + "description": "(DEPRECATED — use xdm:attributesMap) The set of derived signals for this scope. Superseded by xdm:attributesMap, which models signals as an extensible map keyed by signal id.", + "meta:status": "deprecated", "properties": { "xdm:subjects": { "type": "object", @@ -151,6 +153,82 @@ } } } + }, + "xdm:attributesMap": { + "title": "Signal Attributes Map", + "type": "object", + "description": "Map of signal id to signal value. The key is the signal identifier (for example 'subjects', 'intents', 'tones', 'sentiment', or any producer-defined signal). Supersedes xdm:attributes; new signal types require no schema change.", + "meta:xdmType": "map", + "meta:status": "experimental", + "additionalProperties": { + "type": "object", + "title": "Conversation Signal", + "description": "A single derived conversation signal. The xdm:type discriminator indicates which typed value field (xdm:stringValue, xdm:numberValue, or xdm:booleanValue) is populated on each entry of xdm:values.", + "properties": { + "xdm:type": { + "title": "Signal Value Type", + "type": "string", + "description": "Data type of this signal's values; tells consumers which typed value field is populated on each entry of xdm:values.", + "enum": ["string", "number", "boolean"], + "meta:enum": { + "string": "Values carry xdm:stringValue (e.g. an intent, tone, or extracted phrase)", + "number": "Values carry xdm:numberValue (e.g. a sentiment score or intensity)", + "boolean": "Values carry xdm:booleanValue (a true/false flag)" + } + }, + "xdm:values": { + "title": "Signal Values", + "type": "array", + "description": "One or more values for this signal.", + "items": { + "type": "object", + "properties": { + "xdm:stringValue": { + "title": "String Value", + "type": "string", + "description": "Populated when xdm:type is 'string'. A categorical value such as an intent, tone, or extracted phrase." + }, + "xdm:numberValue": { + "title": "Number Value", + "type": "number", + "description": "Populated when xdm:type is 'number'. For example a sentiment score from -1 to 1, or an intensity." + }, + "xdm:booleanValue": { + "title": "Boolean Value", + "type": "boolean", + "description": "Populated when xdm:type is 'boolean'. A true or false flag." + }, + "xdm:confidence": { + "title": "Confidence", + "type": "number", + "description": "Confidence the producer assigns to this value, from 0 to 1.", + "minimum": 0, + "maximum": 1 + }, + "xdm:qualifiers": { + "title": "Qualifiers", + "type": "array", + "description": "Additional descriptors for this value, similar to keywords but more meaningful.", + "items": { + "type": "string" + } + }, + "xdm:metadata": { + "title": "Metadata", + "type": "object", + "description": "Producer-defined metadata for this value as a map of string key to string value (for example the context around a signal value).", + "meta:xdmType": "map", + "additionalProperties": { + "title": "Metadata Value", + "type": "string", + "description": "Metadata value for the associated key." + } + } + } + } + } + } + } } } }