Files
Maven/cmd/mavend/testdata/scenarios/conversation_anaphora.json
T
claude da9114b623 Preserve context across conversation intents (V-542)
Owner explicitly requested direct commits to master; bypass the branch-only hook.
2026-08-13 02:14:46 +04:00

86 lines
5.0 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"schema_version": 1,
"name": "conversation_anaphora",
"description": "Five consecutive Russian turns about one object, replayed from the run that found V-542 on the box on 05-08-2026. He names a monitor once, then refers to it by pronoun or ellipsis for four turns.\n\nThe router decisions stay exactly as the box produced them: fact, query, query, chat, query. That is intentional. Routing sees one utterance; dialogue continuity owns what earlier turns make it mean. A grounded fact inside an explicit conversational opener is still stored, while its exact utterance also enters the transcript. Anaphoric queries are answered through chat with that transcript instead of walking note and world sources without their referent.\n\nEvery scripted chat answer below is conditional on history containing the original monitor turn. A canned reply therefore cannot make this scenario pass if session capture, cross-intent merge, history ordering or PhraseChat wiring loses the referent. The visible assertions require the answer to name the monitor, and the final tick remains the not-a-nag control.",
"start": "2026-08-05T14:00:00+03:00",
"script": [
{
"match": "купил новый монитор",
"route": "[{\"intent\":\"fact\",\"key\":\"purchase\",\"value\":\"новый монитор\"}]",
"reply": "{\"response\":\"записала: новый монитор.\",\"mood\":\"neutral\"}"
},
{
"match": "он большой",
"route": "[{\"intent\":\"query\",\"text\":\"а он большой?\"}]",
"reply": "{\"response\":\"Ты про новый монитор; диагональ ты пока не называл.\",\"mood\":\"neutral\"}",
"history_contains": ["купил новый монитор"]
},
{
"match": "сколько он примерно стоит",
"route": "[{\"intent\":\"query\",\"text\":\"сколько он примерно стоит по-твоему?\"}]",
"reply": "{\"response\":\"Новый монитор без модели и диагонали я честно не оценю.\",\"mood\":\"thinking\"}",
"history_contains": ["купил новый монитор"]
},
{
"match": "переплатил",
"route": "[{\"intent\":\"chat\",\"text\":\"мне кажется я переплатил\"}]",
"reply": "{\"response\":\"Про новый монитор поняла; цену лучше сравнить по точной модели.\",\"mood\":\"thinking\"}",
"history_contains": ["купил новый монитор"]
},
{
"match": "стоит его вернуть",
"route": "[{\"intent\":\"query\",\"text\":\"стоит его вернуть?\"}]",
"reply": "{\"response\":\"Новый монитор стоит вернуть, если сравнение подтвердит переплату или он тебе не подходит.\",\"mood\":\"neutral\"}",
"history_contains": ["купил новый монитор"]
},
{
"match": "",
"route": "[{\"intent\":\"chat\",\"text\":\"\"}]",
"reply": "{\"response\":\"я рада тебя слышать.\",\"mood\":\"happy\"}"
}
],
"steps": [
{
"at": "14:00",
"note": "A substantive statement inside an explicit conversational opener remains a grounded fact, and the exact same utterance becomes dialogue context. Conversation is session state, not a competing storage intent.",
"say": "давай поболтаем: я вчера купил новый монитор",
"expect_events": ["purchase"],
"expect_no_send": true
},
{
"at": "14:01",
"note": "The query route cannot see earlier turns. The dialogue merge sees the anaphora and answers through chat with the transcript, which names the monitor.",
"say": "а он большой?",
"expect_reply_contains": ["монитор"],
"expect_no_send": true
},
{
"at": "14:02",
"note": "The referent survives a second routed-query boundary; the previous contextual turn did not replace the transcript anchor.",
"say": "сколько он примерно стоит по-твоему?",
"expect_reply_contains": ["монитор"],
"expect_no_send": true
},
{
"at": "14:03",
"note": "A native chat route reads the same cross-intent transcript, in chronological order, without receiving the current utterance twice.",
"say": "мне кажется я переплатил",
"expect_reply_contains": ["монитор"],
"expect_no_send": true
},
{
"at": "14:04",
"note": "The fifth turn proves the oldest retained turn still supplies the referent after fact, query and chat crossings.",
"say": "стоит его вернуть?",
"expect_reply_contains": ["монитор"],
"expect_no_send": true
},
{
"at": "14:05",
"note": "Control: session continuity is reactive state only. A tick during the conversation sends nothing unprompted.",
"tick": true,
"expect_no_send": true
}
]
}