АДРЕСНЫЙ РЕЖИМ - M2.3c тюнинг резолвинга и фильтров адресных запросов, поэтапная диагностика и аудит фильтрации по счету
This commit is contained in:
BIN
Binary file not shown.
+17
@@ -0,0 +1,17 @@
|
||||
# 2026-03-29_Address_Query_Runtime_V1_M2_3C_Resolver_Filter_Tuning_And_AccountScope_Audit
|
||||
|
||||
## Scope
|
||||
- Track A: resolver/filter tuning for counterparty intents.
|
||||
- Track B: account-scope/materialization audit for account intents.
|
||||
- Curated positive live suite for acceptance.
|
||||
|
||||
## Included artifacts
|
||||
- `run_summary.json`
|
||||
- `before_after_metrics.json`
|
||||
- `curated_positive_case_matrix.md`
|
||||
- `assistant_window_dry_run_results.json`
|
||||
- `stage_diagnostic_matrix.md`
|
||||
- `debug_payloads/`
|
||||
- `live_call_inventory_address.json`
|
||||
- `smoke_checks.md`
|
||||
- `changed_files.txt`
|
||||
+566
@@ -0,0 +1,566 @@
|
||||
{
|
||||
"generated_at": "2026-03-29T18:30:51.853Z",
|
||||
"run_id": "2026-03-29_Address_Query_Runtime_V1_M2_3C_Resolver_Filter_Tuning_And_AccountScope_Audit",
|
||||
"cases": [
|
||||
{
|
||||
"id": "C1",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "list_documents_by_counterparty",
|
||||
"expected_response_type": "FACTUAL_LIST",
|
||||
"expected_non_empty": true,
|
||||
"handled": true,
|
||||
"response_type": "FACTUAL_LIST",
|
||||
"reply_type": "factual",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "list_documents_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "svk",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "matched_non_empty",
|
||||
"mcp_call_status_legacy": "matched_non_empty",
|
||||
"stage_interpretation": "Rows passed all stages and produced factual non-empty output.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 2,
|
||||
"rows_matched": 2,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "svk",
|
||||
"anchor_value_resolved": "Группа СВК",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": null,
|
||||
"response_is_non_empty": true,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 513,
|
||||
"generated_at": "2026-03-29T18:30:44.406Z"
|
||||
},
|
||||
{
|
||||
"id": "C2",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "bank_operations_by_counterparty",
|
||||
"expected_response_type": "FACTUAL_LIST",
|
||||
"expected_non_empty": true,
|
||||
"handled": true,
|
||||
"response_type": "FACTUAL_LIST",
|
||||
"reply_type": "factual",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "bank_operations_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_bank_operations_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "svk",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "matched_non_empty",
|
||||
"mcp_call_status_legacy": "matched_non_empty",
|
||||
"stage_interpretation": "Rows passed all stages and produced factual non-empty output.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 2,
|
||||
"rows_matched": 2,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "svk",
|
||||
"anchor_value_resolved": "Группа СВК",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": null,
|
||||
"response_is_non_empty": true,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1046,
|
||||
"generated_at": "2026-03-29T18:30:45.456Z"
|
||||
},
|
||||
{
|
||||
"id": "C3",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "list_documents_by_counterparty",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "list_documents_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "alfa",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "materialized_but_not_anchor_matched",
|
||||
"mcp_call_status_legacy": "materialized_but_not_matched",
|
||||
"stage_interpretation": "Rows materialized, but anchor resolution/matching removed all candidates.",
|
||||
"match_failure_stage": "materialized_but_not_anchor_matched",
|
||||
"match_failure_reason": "counterparty_anchor_not_matched_in_materialized_rows",
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "alfa",
|
||||
"anchor_value_resolved": "alfa",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": "missing_anchor",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1030,
|
||||
"generated_at": "2026-03-29T18:30:46.488Z"
|
||||
},
|
||||
{
|
||||
"id": "C4",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "bank_operations_by_counterparty",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "bank_operations_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_bank_operations_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "alfa",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "materialized_but_not_anchor_matched",
|
||||
"mcp_call_status_legacy": "materialized_but_not_matched",
|
||||
"stage_interpretation": "Rows materialized, but anchor resolution/matching removed all candidates.",
|
||||
"match_failure_stage": "materialized_but_not_anchor_matched",
|
||||
"match_failure_reason": "counterparty_anchor_not_matched_in_materialized_rows",
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "alfa",
|
||||
"anchor_value_resolved": "alfa",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": "missing_anchor",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1027,
|
||||
"generated_at": "2026-03-29T18:30:47.517Z"
|
||||
},
|
||||
{
|
||||
"id": "C5",
|
||||
"family": "account",
|
||||
"question": "show account balance 60 today",
|
||||
"expected_intent": "account_balance_snapshot",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "AGGREGATE_LOOKUP",
|
||||
"detected_intent": "account_balance_snapshot",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_movements_account_snapshot_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "60",
|
||||
"as_of_date": "2026-03-29"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "60",
|
||||
"anchor_value_resolved": "60",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "60",
|
||||
"account_token_normalized": "60",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1013,
|
||||
"generated_at": "2026-03-29T18:30:48.531Z"
|
||||
},
|
||||
{
|
||||
"id": "C6",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 62 as of 2020-07-31",
|
||||
"expected_intent": "documents_forming_balance",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "documents_forming_balance",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_forming_balance_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "62",
|
||||
"as_of_date": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "62",
|
||||
"anchor_value_resolved": "62",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "62",
|
||||
"account_token_normalized": "62",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 969,
|
||||
"generated_at": "2026-03-29T18:30:49.501Z"
|
||||
},
|
||||
{
|
||||
"id": "C7",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 60 as of 2020-07-31",
|
||||
"expected_intent": "documents_forming_balance",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "documents_forming_balance",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_forming_balance_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "60",
|
||||
"as_of_date": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "60",
|
||||
"anchor_value_resolved": "60",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "60",
|
||||
"account_token_normalized": "60",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1050,
|
||||
"generated_at": "2026-03-29T18:30:50.552Z"
|
||||
},
|
||||
{
|
||||
"id": "C8",
|
||||
"family": "account",
|
||||
"question": "show account balance 51 as of 2020-07-31",
|
||||
"expected_intent": "account_balance_snapshot",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "AGGREGATE_LOOKUP",
|
||||
"detected_intent": "account_balance_snapshot",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_movements_account_snapshot_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "51",
|
||||
"as_of_date": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "51",
|
||||
"anchor_value_resolved": "51",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "51",
|
||||
"account_token_normalized": "51",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1034,
|
||||
"generated_at": "2026-03-29T18:30:51.587Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"compared_from": "2026-03-29_Address_Query_Runtime_V1_M2_3B_AccountScope_Mode_Tuning",
|
||||
"compared_to": "2026-03-29_Address_Query_Runtime_V1_M2_3C_Resolver_Filter_Tuning_And_AccountScope_Audit",
|
||||
"comparison_scope": "stage_diagnostic_plus_curated_positive_suite",
|
||||
"metrics": {
|
||||
"factual_positive_rate": {
|
||||
"before": 0,
|
||||
"after": 0.25
|
||||
},
|
||||
"false_factual_rate": {
|
||||
"before": 0,
|
||||
"after": 0
|
||||
},
|
||||
"counterparty_non_empty_cases": {
|
||||
"before": 0,
|
||||
"after": 2
|
||||
},
|
||||
"account_non_empty_cases": {
|
||||
"before": 0,
|
||||
"after": 0
|
||||
}
|
||||
},
|
||||
"narrative": [
|
||||
"Counterparty scenarios moved from materialized_but_not_matched to matched_non_empty on curated positive cases.",
|
||||
"Account scenarios remain blocked before materialization with account scope drop reasons.",
|
||||
"False factual output remains zero."
|
||||
]
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
docs/ADDRESS/address_query/README.md
|
||||
docs/ADDRESS/address_query/address_runtime_contracts.md
|
||||
docs/ADDRESS/address_query/address_scenario_matrix.md
|
||||
docs/ADDRESS/address_query/query_recipes_v1.md
|
||||
docs/ADDRESS/address_query/runtime_readiness_matrix_v1.md
|
||||
llm_normalizer/backend/dist/services/addressMcpClient.js
|
||||
llm_normalizer/backend/dist/services/addressQueryService.js
|
||||
llm_normalizer/backend/dist/services/addressRecipeCatalog.js
|
||||
llm_normalizer/backend/dist/services/assistantService.js
|
||||
llm_normalizer/backend/src/services/addressMcpClient.ts
|
||||
llm_normalizer/backend/src/services/addressQueryService.ts
|
||||
llm_normalizer/backend/src/services/addressRecipeCatalog.ts
|
||||
llm_normalizer/backend/src/services/assistantService.ts
|
||||
llm_normalizer/backend/src/types/addressQuery.ts
|
||||
llm_normalizer/backend/src/types/assistant.ts
|
||||
llm_normalizer/backend/tests/addressQueryRuntimeM23.test.ts
|
||||
docs/ADDRESS/address_query/curated_positive_live_suite_v1.md
|
||||
docs/ADDRESS/runs/2026-03-29_Address_Query_Runtime_V1_M2_3C_Resolver_Filter_Tuning_And_AccountScope_Audit/
|
||||
llm_normalizer/backend/scripts/runAddressM23cPack.js
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# Curated Positive Case Matrix (M2.3c)
|
||||
|
||||
This matrix is data-aware (acceptance only), while runtime remains data-agnostic.
|
||||
|
||||
| case_id | family | expected_non_empty | actual_non_empty | expected_response | actual_response | selected_recipe | anchor_raw | anchor_resolved |
|
||||
|---|---|---|---|---|---|---|---|---|
|
||||
| C1 | counterparty | yes | yes | FACTUAL_LIST | FACTUAL_LIST | address_documents_by_counterparty_v1 | svk | Группа СВК |
|
||||
| C2 | counterparty | yes | yes | FACTUAL_LIST | FACTUAL_LIST | address_bank_operations_by_counterparty_v1 | svk | Группа СВК |
|
||||
| C3 | counterparty | no | no | LIMITED_WITH_REASON | LIMITED_WITH_REASON | address_documents_by_counterparty_v1 | alfa | alfa |
|
||||
| C4 | counterparty | no | no | LIMITED_WITH_REASON | LIMITED_WITH_REASON | address_bank_operations_by_counterparty_v1 | alfa | alfa |
|
||||
| C5 | account | no | no | LIMITED_WITH_REASON | LIMITED_WITH_REASON | address_movements_account_snapshot_v1 | 60 | 60 |
|
||||
| C6 | account | no | no | LIMITED_WITH_REASON | LIMITED_WITH_REASON | address_documents_forming_balance_v1 | 62 | 62 |
|
||||
| C7 | account | no | no | LIMITED_WITH_REASON | LIMITED_WITH_REASON | address_documents_forming_balance_v1 | 60 | 60 |
|
||||
| C8 | account | no | no | LIMITED_WITH_REASON | LIMITED_WITH_REASON | address_movements_account_snapshot_v1 | 51 | 51 |
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C1",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "list_documents_by_counterparty",
|
||||
"expected_response_type": "FACTUAL_LIST",
|
||||
"expected_non_empty": true
|
||||
},
|
||||
"result": {
|
||||
"id": "C1",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "list_documents_by_counterparty",
|
||||
"expected_response_type": "FACTUAL_LIST",
|
||||
"expected_non_empty": true,
|
||||
"handled": true,
|
||||
"response_type": "FACTUAL_LIST",
|
||||
"reply_type": "factual",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "list_documents_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "svk",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "matched_non_empty",
|
||||
"mcp_call_status_legacy": "matched_non_empty",
|
||||
"stage_interpretation": "Rows passed all stages and produced factual non-empty output.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 2,
|
||||
"rows_matched": 2,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "svk",
|
||||
"anchor_value_resolved": "Группа СВК",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": null,
|
||||
"response_is_non_empty": true,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 513,
|
||||
"generated_at": "2026-03-29T18:30:44.406Z"
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C2",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "bank_operations_by_counterparty",
|
||||
"expected_response_type": "FACTUAL_LIST",
|
||||
"expected_non_empty": true
|
||||
},
|
||||
"result": {
|
||||
"id": "C2",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "bank_operations_by_counterparty",
|
||||
"expected_response_type": "FACTUAL_LIST",
|
||||
"expected_non_empty": true,
|
||||
"handled": true,
|
||||
"response_type": "FACTUAL_LIST",
|
||||
"reply_type": "factual",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "bank_operations_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_bank_operations_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "svk",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "matched_non_empty",
|
||||
"mcp_call_status_legacy": "matched_non_empty",
|
||||
"stage_interpretation": "Rows passed all stages and produced factual non-empty output.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 2,
|
||||
"rows_matched": 2,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "svk",
|
||||
"anchor_value_resolved": "Группа СВК",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": null,
|
||||
"response_is_non_empty": true,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1046,
|
||||
"generated_at": "2026-03-29T18:30:45.456Z"
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C3",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "list_documents_by_counterparty",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false
|
||||
},
|
||||
"result": {
|
||||
"id": "C3",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "list_documents_by_counterparty",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "list_documents_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "alfa",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "materialized_but_not_anchor_matched",
|
||||
"mcp_call_status_legacy": "materialized_but_not_matched",
|
||||
"stage_interpretation": "Rows materialized, but anchor resolution/matching removed all candidates.",
|
||||
"match_failure_stage": "materialized_but_not_anchor_matched",
|
||||
"match_failure_reason": "counterparty_anchor_not_matched_in_materialized_rows",
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "alfa",
|
||||
"anchor_value_resolved": "alfa",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": "missing_anchor",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1030,
|
||||
"generated_at": "2026-03-29T18:30:46.488Z"
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C4",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "bank_operations_by_counterparty",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false
|
||||
},
|
||||
"result": {
|
||||
"id": "C4",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"expected_intent": "bank_operations_by_counterparty",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "bank_operations_by_counterparty",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_bank_operations_by_counterparty_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"counterparty": "alfa",
|
||||
"period_from": "2020-07-01",
|
||||
"period_to": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "preferred",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "materialized_but_not_anchor_matched",
|
||||
"mcp_call_status_legacy": "materialized_but_not_matched",
|
||||
"stage_interpretation": "Rows materialized, but anchor resolution/matching removed all candidates.",
|
||||
"match_failure_stage": "materialized_but_not_anchor_matched",
|
||||
"match_failure_reason": "counterparty_anchor_not_matched_in_materialized_rows",
|
||||
"rows_fetched": 19,
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "none",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Контрагент",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "counterparty",
|
||||
"anchor_value_raw": "alfa",
|
||||
"anchor_value_resolved": "alfa",
|
||||
"resolver_confidence": "medium",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": null,
|
||||
"account_token_normalized": null,
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "not_applicable",
|
||||
"limited_reason_category": "missing_anchor",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1027,
|
||||
"generated_at": "2026-03-29T18:30:47.517Z"
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C5",
|
||||
"family": "account",
|
||||
"question": "show account balance 60 today",
|
||||
"expected_intent": "account_balance_snapshot",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false
|
||||
},
|
||||
"result": {
|
||||
"id": "C5",
|
||||
"family": "account",
|
||||
"question": "show account balance 60 today",
|
||||
"expected_intent": "account_balance_snapshot",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "AGGREGATE_LOOKUP",
|
||||
"detected_intent": "account_balance_snapshot",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_movements_account_snapshot_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "60",
|
||||
"as_of_date": "2026-03-29"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "60",
|
||||
"anchor_value_resolved": "60",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "60",
|
||||
"account_token_normalized": "60",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1013,
|
||||
"generated_at": "2026-03-29T18:30:48.531Z"
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C6",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 62 as of 2020-07-31",
|
||||
"expected_intent": "documents_forming_balance",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false
|
||||
},
|
||||
"result": {
|
||||
"id": "C6",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 62 as of 2020-07-31",
|
||||
"expected_intent": "documents_forming_balance",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "documents_forming_balance",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_forming_balance_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "62",
|
||||
"as_of_date": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "62",
|
||||
"anchor_value_resolved": "62",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "62",
|
||||
"account_token_normalized": "62",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 969,
|
||||
"generated_at": "2026-03-29T18:30:49.501Z"
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C7",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 60 as of 2020-07-31",
|
||||
"expected_intent": "documents_forming_balance",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false
|
||||
},
|
||||
"result": {
|
||||
"id": "C7",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 60 as of 2020-07-31",
|
||||
"expected_intent": "documents_forming_balance",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "documents_forming_balance",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_documents_forming_balance_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "60",
|
||||
"as_of_date": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "60",
|
||||
"anchor_value_resolved": "60",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "60",
|
||||
"account_token_normalized": "60",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1050,
|
||||
"generated_at": "2026-03-29T18:30:50.552Z"
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"case": {
|
||||
"id": "C8",
|
||||
"family": "account",
|
||||
"question": "show account balance 51 as of 2020-07-31",
|
||||
"expected_intent": "account_balance_snapshot",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false
|
||||
},
|
||||
"result": {
|
||||
"id": "C8",
|
||||
"family": "account",
|
||||
"question": "show account balance 51 as of 2020-07-31",
|
||||
"expected_intent": "account_balance_snapshot",
|
||||
"expected_response_type": "LIMITED_WITH_REASON",
|
||||
"expected_non_empty": false,
|
||||
"handled": true,
|
||||
"response_type": "LIMITED_WITH_REASON",
|
||||
"reply_type": "partial_coverage",
|
||||
"detected_mode": "address_query",
|
||||
"query_shape": "AGGREGATE_LOOKUP",
|
||||
"detected_intent": "account_balance_snapshot",
|
||||
"intent_aligned": true,
|
||||
"selected_recipe": "address_movements_account_snapshot_v1",
|
||||
"selected_recipe_ids": [],
|
||||
"extracted_filters": {
|
||||
"sort": "period_desc",
|
||||
"limit": 20,
|
||||
"account": "51",
|
||||
"as_of_date": "2020-07-31"
|
||||
},
|
||||
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
|
||||
"account_scope_mode": "strict",
|
||||
"account_scope_fallback_applied": false,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"mcp_call_status_legacy": "raw_rows_received_but_not_materialized",
|
||||
"stage_interpretation": "Raw rows arrived, but row materialization path dropped everything.",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"rows_fetched": 20,
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"materialization_drop_reason": "dropped_by_account_scope_filter",
|
||||
"raw_row_keys_sample": [
|
||||
"Период",
|
||||
"Регистратор",
|
||||
"СчетДт",
|
||||
"СчетКт",
|
||||
"Сумма",
|
||||
"Period",
|
||||
"Registrator",
|
||||
"AccountDt",
|
||||
"AccountKt",
|
||||
"Amount"
|
||||
],
|
||||
"anchor_type": "account",
|
||||
"anchor_value_raw": "51",
|
||||
"anchor_value_resolved": "51",
|
||||
"resolver_confidence": "high",
|
||||
"ambiguity_count": 0,
|
||||
"account_token_raw": "51",
|
||||
"account_token_normalized": "51",
|
||||
"account_scope_fields_checked": [
|
||||
"account_dt",
|
||||
"account_kt",
|
||||
"registrator",
|
||||
"analytics"
|
||||
],
|
||||
"account_scope_match_strategy": "account_code_regex_plus_alias_map_v1",
|
||||
"account_scope_drop_reason": "no_rows_after_scope_filter",
|
||||
"limited_reason_category": "empty_match",
|
||||
"response_is_non_empty": false,
|
||||
"assistant_reply_preview": "",
|
||||
"elapsed_ms": 1034,
|
||||
"generated_at": "2026-03-29T18:30:51.587Z"
|
||||
}
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"generated_at": "2026-03-29T18:30:51.853Z",
|
||||
"run_id": "2026-03-29_Address_Query_Runtime_V1_M2_3C_Resolver_Filter_Tuning_And_AccountScope_Audit",
|
||||
"inventory": [
|
||||
{
|
||||
"case_id": "C1",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"recipe": "address_documents_by_counterparty_v1",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "list_documents_by_counterparty",
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 2,
|
||||
"rows_matched": 2,
|
||||
"mcp_call_status": "matched_non_empty",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"limited_reason_category": null
|
||||
},
|
||||
{
|
||||
"case_id": "C2",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty svk from 2020-07-01 to 2020-07-31",
|
||||
"recipe": "address_bank_operations_by_counterparty_v1",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "bank_operations_by_counterparty",
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 2,
|
||||
"rows_matched": 2,
|
||||
"mcp_call_status": "matched_non_empty",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"limited_reason_category": null
|
||||
},
|
||||
{
|
||||
"case_id": "C3",
|
||||
"family": "counterparty",
|
||||
"question": "show documents by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"recipe": "address_documents_by_counterparty_v1",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "list_documents_by_counterparty",
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"mcp_call_status": "materialized_but_not_anchor_matched",
|
||||
"match_failure_stage": "materialized_but_not_anchor_matched",
|
||||
"match_failure_reason": "counterparty_anchor_not_matched_in_materialized_rows",
|
||||
"limited_reason_category": "missing_anchor"
|
||||
},
|
||||
{
|
||||
"case_id": "C4",
|
||||
"family": "counterparty",
|
||||
"question": "show bank operations by counterparty alfa from 2020-07-01 to 2020-07-31",
|
||||
"recipe": "address_bank_operations_by_counterparty_v1",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "bank_operations_by_counterparty",
|
||||
"raw_rows_received": 19,
|
||||
"rows_after_account_scope": 3,
|
||||
"rows_materialized": 3,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"mcp_call_status": "materialized_but_not_anchor_matched",
|
||||
"match_failure_stage": "materialized_but_not_anchor_matched",
|
||||
"match_failure_reason": "counterparty_anchor_not_matched_in_materialized_rows",
|
||||
"limited_reason_category": "missing_anchor"
|
||||
},
|
||||
{
|
||||
"case_id": "C5",
|
||||
"family": "account",
|
||||
"question": "show account balance 60 today",
|
||||
"recipe": "address_movements_account_snapshot_v1",
|
||||
"query_shape": "AGGREGATE_LOOKUP",
|
||||
"detected_intent": "account_balance_snapshot",
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"limited_reason_category": "empty_match"
|
||||
},
|
||||
{
|
||||
"case_id": "C6",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 62 as of 2020-07-31",
|
||||
"recipe": "address_documents_forming_balance_v1",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "documents_forming_balance",
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"limited_reason_category": "empty_match"
|
||||
},
|
||||
{
|
||||
"case_id": "C7",
|
||||
"family": "account",
|
||||
"question": "which documents form balance for account 60 as of 2020-07-31",
|
||||
"recipe": "address_documents_forming_balance_v1",
|
||||
"query_shape": "DOCUMENT_LIST",
|
||||
"detected_intent": "documents_forming_balance",
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"limited_reason_category": "empty_match"
|
||||
},
|
||||
{
|
||||
"case_id": "C8",
|
||||
"family": "account",
|
||||
"question": "show account balance 51 as of 2020-07-31",
|
||||
"recipe": "address_movements_account_snapshot_v1",
|
||||
"query_shape": "AGGREGATE_LOOKUP",
|
||||
"detected_intent": "account_balance_snapshot",
|
||||
"raw_rows_received": 20,
|
||||
"rows_after_account_scope": 0,
|
||||
"rows_materialized": 0,
|
||||
"rows_after_recipe_filter": 0,
|
||||
"rows_matched": 0,
|
||||
"mcp_call_status": "raw_rows_received_but_not_materialized",
|
||||
"match_failure_stage": "none",
|
||||
"match_failure_reason": null,
|
||||
"limited_reason_category": "empty_match"
|
||||
}
|
||||
]
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"run_id": "2026-03-29_Address_Query_Runtime_V1_M2_3C_Resolver_Filter_Tuning_And_AccountScope_Audit",
|
||||
"date": "2026-03-29",
|
||||
"stage": "address_query_runtime_v1",
|
||||
"scope": "m2_3c_resolver_filter_tuning_and_account_scope_audit",
|
||||
"build_status": "PASSED",
|
||||
"tests_status": "PASSED",
|
||||
"diagnostic_run_status": "COMPLETED",
|
||||
"implemented": {
|
||||
"counterparty_anchor_refinement_after_materialization": true,
|
||||
"split_match_failure_stages": true,
|
||||
"legacy_status_compatibility_field": true,
|
||||
"account_scope_audit_fields": true,
|
||||
"bank_docs_query_template_for_counterparty_intents": true
|
||||
},
|
||||
"metrics": {
|
||||
"cases_total": 8,
|
||||
"intent_alignment_rate": 1,
|
||||
"factual_positive_rate": 0.25,
|
||||
"limited_mode_rate": 0.75,
|
||||
"false_factual_rate": 0,
|
||||
"counterparty_family_non_empty_rate": 0.5,
|
||||
"account_family_non_empty_rate": 0
|
||||
},
|
||||
"stage_status_distribution": [
|
||||
{
|
||||
"status": "matched_non_empty",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"status": "materialized_but_not_anchor_matched",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"status": "raw_rows_received_but_not_materialized",
|
||||
"count": 4
|
||||
}
|
||||
],
|
||||
"failure_reason_distribution": [
|
||||
{
|
||||
"reason": "none",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"reason": "counterparty_anchor_not_matched_in_materialized_rows",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"reason": "dropped_by_account_scope_filter",
|
||||
"count": 4
|
||||
}
|
||||
],
|
||||
"key_findings": {
|
||||
"counterparty_track": "positive factual responses now confirmed on curated non-empty live cases",
|
||||
"account_track": "account intents still stop at raw_rows_received_but_not_materialized",
|
||||
"next_priority": "account scope/materialization shape audit to unblock first non-empty account case"
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# Smoke Checks (M2.3c)
|
||||
|
||||
- `npm.cmd run build` -> PASSED
|
||||
- `npx.cmd vitest tests/addressQueryRuntimeM23.test.ts` -> PASSED (10/10)
|
||||
- M2.3c curated run script -> COMPLETED
|
||||
|
||||
Observed outcome:
|
||||
- counterparty family now has non-empty factual responses;
|
||||
- account family remains diagnostic-limited before materialization.
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# Stage Diagnostic Matrix (M2.3c)
|
||||
|
||||
| case_id | family | expected_intent | detected_intent | status | rows_after_account_scope | rows_materialized | rows_after_recipe_filter | rows_matched | response_type | limited_reason |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| C1 | counterparty | list_documents_by_counterparty | list_documents_by_counterparty | matched_non_empty | 3 | 3 | 2 | 2 | FACTUAL_LIST | |
|
||||
| C2 | counterparty | bank_operations_by_counterparty | bank_operations_by_counterparty | matched_non_empty | 3 | 3 | 2 | 2 | FACTUAL_LIST | |
|
||||
| C3 | counterparty | list_documents_by_counterparty | list_documents_by_counterparty | materialized_but_not_anchor_matched | 3 | 3 | 0 | 0 | LIMITED_WITH_REASON | missing_anchor |
|
||||
| C4 | counterparty | bank_operations_by_counterparty | bank_operations_by_counterparty | materialized_but_not_anchor_matched | 3 | 3 | 0 | 0 | LIMITED_WITH_REASON | missing_anchor |
|
||||
| C5 | account | account_balance_snapshot | account_balance_snapshot | raw_rows_received_but_not_materialized | 0 | 0 | 0 | 0 | LIMITED_WITH_REASON | empty_match |
|
||||
| C6 | account | documents_forming_balance | documents_forming_balance | raw_rows_received_but_not_materialized | 0 | 0 | 0 | 0 | LIMITED_WITH_REASON | empty_match |
|
||||
| C7 | account | documents_forming_balance | documents_forming_balance | raw_rows_received_but_not_materialized | 0 | 0 | 0 | 0 | LIMITED_WITH_REASON | empty_match |
|
||||
| C8 | account | account_balance_snapshot | account_balance_snapshot | raw_rows_received_but_not_materialized | 0 | 0 | 0 | 0 | LIMITED_WITH_REASON | empty_match |
|
||||
|
||||
Status taxonomy in this run:
|
||||
- `raw_rows_received_but_not_materialized`
|
||||
- `materialized_but_not_anchor_matched`
|
||||
- `matched_non_empty`
|
||||
Reference in New Issue
Block a user