research: score Jev intent variants with the previous turn
The earlier report had no previous-turn rows. This run measures V0, V1, V2, and Flash on the re-extracted corpus and records that the real sample is not representative of the simulated set. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -160,6 +160,43 @@ class JevIntentPreviousTurnTests(unittest.TestCase):
|
||||
self.assertIsNone(state["previous_turn"])
|
||||
self.assertIn("user_message", state)
|
||||
|
||||
def test_closed_focus_is_not_the_current_question(self) -> None:
|
||||
from scripts.research.jev_intent_source_b_v2 import prepare_extract
|
||||
|
||||
rows = prepare_extract([
|
||||
{
|
||||
"turn_id": "open-turn",
|
||||
"case_id": "case-1",
|
||||
"created_at": "2026-09-02T00:00:00+00:00",
|
||||
"user_message": "没有",
|
||||
"assistant_message": "记下了",
|
||||
"case_status": "collecting_evidence",
|
||||
"focus_status": "active",
|
||||
"asked_at": "2026-09-01T00:00:00+00:00",
|
||||
"resolved_at": None,
|
||||
"schema": {"collect": True, "prompt": "有没有换过工作?"},
|
||||
},
|
||||
{
|
||||
"turn_id": "after-close",
|
||||
"case_id": "case-1",
|
||||
"created_at": "2026-09-03T00:00:00+00:00",
|
||||
"user_message": "先看结果",
|
||||
"assistant_message": "还在收",
|
||||
"case_status": "collecting_evidence",
|
||||
"focus_status": "resolved",
|
||||
"asked_at": "2026-09-01T00:00:00+00:00",
|
||||
"resolved_at": "2026-09-02T12:00:00+00:00",
|
||||
"schema": {"collect": True, "prompt": "有没有换过工作?"},
|
||||
},
|
||||
])
|
||||
by_id = {row["turn_id"]: row for row in rows}
|
||||
self.assertEqual(by_id["open-turn"]["layer"], "collect")
|
||||
self.assertEqual(by_id["open-turn"]["focus"]["current_question"], "有没有换过工作?")
|
||||
self.assertEqual(by_id["after-close"]["layer"], "none")
|
||||
self.assertIsNone(by_id["after-close"]["focus"])
|
||||
self.assertTrue(by_id["after-close"]["focus_stale"])
|
||||
self.assertEqual(by_id["after-close"]["previous_turn"]["user_message"], "没有")
|
||||
|
||||
|
||||
class JevIntentCorpusTests(unittest.TestCase):
|
||||
def test_source_a_has_ten_labeled_rows(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user