АДРЕСНЫЙ РЕЖИМ -ADDRESS:Шаг 1 - ЛЛМ ФЕРСТ + feat(address): стабилизация wave1 dynamic resolver контрагентов, follow-up carryover и актуализация docs/tests

This commit is contained in:
2026-04-02 23:11:49 +03:00
parent 53716e548e
commit 88094c09f8
243 changed files with 94296 additions and 181 deletions
@@ -0,0 +1,33 @@
# Address_Contracts_Zhukovka_Variants_2026-04-02
Generated at: 2026-04-02T22:34:45
Questions file: X:\1C\NDC_1C\docs\ADDRESS\question_sets\temp_contracts_zhukovka_variants_2026-04-02.json
Backend URL: http://127.0.0.1:8787/api/assistant/message
LLM: local / qwen2.5-14b-instruct-1m @ http://127.0.0.1:1234
Strict policy: route
## Totals
- questions_total: 2
- ok_200_count: 2
- semantic_pass_count: 2
- semantic_pass_rate: 1.0
- route_pass_count: 2
- route_pass_rate: 1.0
- strict_pass_count: 2
- strict_pass_rate: 1.0
- factual_count: 2
- partial_coverage_count: 0
- clarification_required_count: 0
- http_error_count: 0
- llm_decomposition_attempted_count: 2
- llm_decomposition_applied_count: 0
- llm_fallback_count: 0
- llm_fallback_rate: 0.0
- tool_gate_blocked_count: 0
- tool_gate_blocked_rate: 0.0
- avg_elapsed_ms: 6098
## Files
- run_summary.json
- full_live_results.json
- failures_only.json
@@ -0,0 +1,450 @@
{
"run_id": "Address_Contracts_Zhukovka_Variants_2026-04-02",
"generated_at": "2026-04-02T22:34:45",
"summary": {
"run_id": "Address_Contracts_Zhukovka_Variants_2026-04-02",
"generated_at": "2026-04-02T22:34:45",
"source_questions_file": "X:\\1C\\NDC_1C\\docs\\ADDRESS\\question_sets\\temp_contracts_zhukovka_variants_2026-04-02.json",
"backend_url": "http://127.0.0.1:8787/api/assistant/message",
"llm_provider": "local",
"llm_model": "qwen2.5-14b-instruct-1m",
"llm_base_url": "http://127.0.0.1:1234",
"strict_policy": "route",
"totals": {
"questions_total": 2,
"ok_200_count": 2,
"semantic_pass_count": 2,
"semantic_pass_rate": 1.0,
"route_pass_count": 2,
"route_pass_rate": 1.0,
"strict_pass_count": 2,
"strict_pass_rate": 1.0,
"factual_count": 2,
"partial_coverage_count": 0,
"clarification_required_count": 0,
"http_error_count": 0,
"llm_decomposition_attempted_count": 2,
"llm_decomposition_applied_count": 0,
"llm_fallback_count": 0,
"llm_fallback_rate": 0.0,
"tool_gate_blocked_count": 0,
"tool_gate_blocked_rate": 0.0,
"avg_elapsed_ms": 6098
},
"distributions": {
"reply_type": {
"factual": 2
},
"actual_intent": {
"list_contracts_by_counterparty": 2
},
"actual_mode": {
"address_query": 2
},
"mcp_call_status": {
"matched_non_empty": 2
},
"limited_reason_category": {},
"route_health": {
"ok_or_factual": 2
},
"tool_gate_decision": {
"run_address_lane": 2
},
"tool_gate_reason": {
"address_mode_classifier_detected": 2
}
},
"address_llm_predecompose_metrics": {
"overall": {
"llm_attempted": 2,
"llm_applied": 0,
"fallback_used": 0,
"fallback_rate": 0.0,
"tool_gate_blocked": 0,
"gate_block_rate": 0.0
},
"by_intent": {
"list_contracts_by_counterparty": {
"total": 2,
"llm_attempted": 2,
"llm_applied": 0,
"fallback_used": 0,
"tool_gate_blocked": 0,
"fallback_rate": 0.0,
"gate_block_rate": 0.0
}
}
}
},
"rows": [
{
"index": 1,
"id": "Q_Z1",
"question": "покажи договора все по жуковка 51",
"session": null,
"session_id": "asst-Address_Contracts_Zhukovka_Variants_2026-04-02-q_z1",
"status_code": 200,
"ok": true,
"elapsed_ms": 6007,
"reply_type": "factual",
"trace_id": "address-TmhPF8PI6s",
"assistant_reply": "Собран список договоров по контрагенту (catalog address lane).\nСтрок отобрано: 1.\nУникальных договоров: 1.\nКонтрагент: \\Жуковка 51\\.\n1. Счет № 5 от 05.04.2017",
"assistant_reply_first_line": "Собран список договоров по контрагенту (catalog address lane).",
"expected_intent": null,
"actual_intent": "list_contracts_by_counterparty",
"intent_match": true,
"expected_mode": "address_query",
"actual_mode": "address_query",
"mode_match": true,
"expected_reply_type": null,
"reply_match": true,
"semantic_pass": true,
"route_pass": true,
"route_health": "ok_or_factual",
"strict_policy": "route",
"strict_pass": true,
"selected_recipe": "address_contracts_by_counterparty_v1",
"missing_required_filters": [],
"match_failure_stage": "none",
"match_failure_reason": null,
"rows_fetched": 394,
"rows_matched": 1,
"mcp_call_status": "matched_non_empty",
"limited_reason_category": null,
"llm_decomposition_attempted": true,
"llm_decomposition_applied": false,
"llm_decomposition_reason": "normalized_fragment_rejected_intent_conflict",
"llm_canonical_candidate_detected": true,
"fallback_rule_hit": null,
"tool_gate_decision": "run_address_lane",
"tool_gate_reason": "address_mode_classifier_detected",
"predecompose_contract_intent": "list_contracts_by_counterparty",
"predecompose_contract_aggregation_profile": "list_lookup",
"predecompose_contract_period_scope": "unspecified",
"debug_payload": {
"trace_id": "address-TmhPF8PI6s",
"prompt_version": "address_query_runtime_v1",
"schema_version": "address_query_runtime_v1",
"fallback_type": "none",
"route_summary": null,
"fragments": [],
"requirements_extracted": [],
"coverage_report": {
"requirements_total": 0,
"requirements_covered": 0,
"requirements_uncovered": [],
"requirements_partially_covered": [],
"clarification_needed_for": [],
"out_of_scope_requirements": []
},
"routes": [],
"retrieval_status": [],
"retrieval_results": [],
"answer_grounding_check": {
"status": "grounded",
"route_subject_match": true,
"missing_requirements": [],
"reasons": [
"address_action_detected",
"address_entity_detected",
"object_signal_detected",
"contracts_by_counterparty_signal_detected"
],
"why_included_summary": [],
"selection_reason_summary": []
},
"dropped_intent_segments": [],
"detected_mode": "address_query",
"detected_mode_confidence": "high",
"query_shape": "OBJECT_LOOKUP",
"query_shape_confidence": "medium",
"detected_intent": "list_contracts_by_counterparty",
"detected_intent_confidence": "medium",
"extracted_filters": {
"sort": "period_desc",
"limit": 20,
"counterparty": "жуковка 51"
},
"missing_required_filters": [],
"selected_recipe": "address_contracts_by_counterparty_v1",
"mcp_call_status_legacy": "matched_non_empty",
"account_scope_mode": "preferred",
"account_scope_fallback_applied": false,
"anchor_type": "counterparty",
"anchor_value_raw": "жуковка 51",
"anchor_value_resolved": "ТСЖ \\Жуковка 51\\",
"resolver_confidence": "medium",
"ambiguity_count": 0,
"match_failure_stage": "none",
"match_failure_reason": null,
"mcp_call_status": "matched_non_empty",
"rows_fetched": 394,
"raw_rows_received": 394,
"rows_after_account_scope": 394,
"rows_after_recipe_filter": 1,
"rows_materialized": 394,
"rows_matched": 1,
"raw_row_keys_sample": [
"Период",
"Регистратор",
"СчетДт",
"СчетКт",
"Сумма",
"Контрагент",
"Period",
"Registrator",
"Amount"
],
"materialization_drop_reason": "none",
"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",
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
"limited_reason_category": null,
"response_type": "FACTUAL_LIST",
"execution_lane": "address_query",
"llm_decomposition_applied": false,
"llm_decomposition_attempted": true,
"llm_provider_used": "local",
"llm_decomposition_trace_id": "IvZkmfNCo_IQKY",
"llm_decomposition_effective_message": "покажи договора все по жуковка 51",
"llm_decomposition_reason": "normalized_fragment_rejected_intent_conflict",
"llm_canonical_candidate_detected": true,
"llm_predecompose_contract": {
"schema_version": "address_llm_predecompose_contract_v1",
"source_message": "покажи договора все по жуковка 51",
"canonical_message": "покажи договора все по жуковка 51",
"mode": "address_query",
"mode_confidence": "high",
"query_shape": "OBJECT_LOOKUP",
"query_shape_confidence": "medium",
"intent": "list_contracts_by_counterparty",
"intent_confidence": "medium",
"entities": {
"account": null,
"counterparty": "жуковка 51",
"contract": null,
"document_type": null,
"document_ref": null,
"organization": null
},
"period": {
"scope": "unspecified",
"period_from": null,
"period_to": null,
"as_of_date": null,
"has_explicit_period": false
},
"aggregation_profile": "list_lookup"
},
"fallback_rule_hit": null,
"sanitized_user_message": "покажи договора все по жуковка 51",
"tool_gate_decision": "run_address_lane",
"tool_gate_reason": "address_mode_classifier_detected",
"answer_structure_v11": null,
"investigation_state_snapshot": null,
"normalized": null,
"normalizer_output": {
"trace_id": "IvZkmfNCo_IQKY",
"prompt_version": "normalizer_v2_0_2",
"applied": false,
"effective_message": "покажи договора все по жуковка 51"
}
},
"error_code": null,
"error_message": null
},
{
"index": 2,
"id": "Q_Z2",
"question": "покажи договора все по жуковка",
"session": null,
"session_id": "asst-Address_Contracts_Zhukovka_Variants_2026-04-02-q_z2",
"status_code": 200,
"ok": true,
"elapsed_ms": 6189,
"reply_type": "factual",
"trace_id": "address-6n99HCcfbA",
"assistant_reply": "Собран список договоров по контрагенту (catalog address lane).\nСтрок отобрано: 1.\nУникальных договоров: 1.\nКонтрагент: \\Жуковка 51\\.\n1. Счет № 5 от 05.04.2017",
"assistant_reply_first_line": "Собран список договоров по контрагенту (catalog address lane).",
"expected_intent": null,
"actual_intent": "list_contracts_by_counterparty",
"intent_match": true,
"expected_mode": "address_query",
"actual_mode": "address_query",
"mode_match": true,
"expected_reply_type": null,
"reply_match": true,
"semantic_pass": true,
"route_pass": true,
"route_health": "ok_or_factual",
"strict_policy": "route",
"strict_pass": true,
"selected_recipe": "address_contracts_by_counterparty_v1",
"missing_required_filters": [],
"match_failure_stage": "none",
"match_failure_reason": null,
"rows_fetched": 394,
"rows_matched": 1,
"mcp_call_status": "matched_non_empty",
"limited_reason_category": null,
"llm_decomposition_attempted": true,
"llm_decomposition_applied": false,
"llm_decomposition_reason": "normalized_fragment_rejected_intent_conflict",
"llm_canonical_candidate_detected": true,
"fallback_rule_hit": null,
"tool_gate_decision": "run_address_lane",
"tool_gate_reason": "address_mode_classifier_detected",
"predecompose_contract_intent": "list_contracts_by_counterparty",
"predecompose_contract_aggregation_profile": "list_lookup",
"predecompose_contract_period_scope": "unspecified",
"debug_payload": {
"trace_id": "address-6n99HCcfbA",
"prompt_version": "address_query_runtime_v1",
"schema_version": "address_query_runtime_v1",
"fallback_type": "none",
"route_summary": null,
"fragments": [],
"requirements_extracted": [],
"coverage_report": {
"requirements_total": 0,
"requirements_covered": 0,
"requirements_uncovered": [],
"requirements_partially_covered": [],
"clarification_needed_for": [],
"out_of_scope_requirements": []
},
"routes": [],
"retrieval_status": [],
"retrieval_results": [],
"answer_grounding_check": {
"status": "grounded",
"route_subject_match": true,
"missing_requirements": [],
"reasons": [
"address_action_detected",
"address_entity_detected",
"object_signal_detected",
"contracts_by_counterparty_signal_detected"
],
"why_included_summary": [],
"selection_reason_summary": []
},
"dropped_intent_segments": [],
"detected_mode": "address_query",
"detected_mode_confidence": "high",
"query_shape": "OBJECT_LOOKUP",
"query_shape_confidence": "medium",
"detected_intent": "list_contracts_by_counterparty",
"detected_intent_confidence": "medium",
"extracted_filters": {
"sort": "period_desc",
"limit": 20,
"counterparty": "жуковка"
},
"missing_required_filters": [],
"selected_recipe": "address_contracts_by_counterparty_v1",
"mcp_call_status_legacy": "matched_non_empty",
"account_scope_mode": "preferred",
"account_scope_fallback_applied": false,
"anchor_type": "counterparty",
"anchor_value_raw": "жуковка",
"anchor_value_resolved": "ТСЖ \\Жуковка 51\\",
"resolver_confidence": "medium",
"ambiguity_count": 0,
"match_failure_stage": "none",
"match_failure_reason": null,
"mcp_call_status": "matched_non_empty",
"rows_fetched": 394,
"raw_rows_received": 394,
"rows_after_account_scope": 394,
"rows_after_recipe_filter": 1,
"rows_materialized": 394,
"rows_matched": 1,
"raw_row_keys_sample": [
"Период",
"Регистратор",
"СчетДт",
"СчетКт",
"Сумма",
"Контрагент",
"Period",
"Registrator",
"Amount"
],
"materialization_drop_reason": "none",
"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",
"runtime_readiness": "LIVE_QUERYABLE_WITH_LIMITS",
"limited_reason_category": null,
"response_type": "FACTUAL_LIST",
"execution_lane": "address_query",
"llm_decomposition_applied": false,
"llm_decomposition_attempted": true,
"llm_provider_used": "local",
"llm_decomposition_trace_id": "fmofmG2pAzwX02",
"llm_decomposition_effective_message": "покажи договора все по жуковка",
"llm_decomposition_reason": "normalized_fragment_rejected_intent_conflict",
"llm_canonical_candidate_detected": true,
"llm_predecompose_contract": {
"schema_version": "address_llm_predecompose_contract_v1",
"source_message": "покажи договора все по жуковка",
"canonical_message": "покажи договора все по жуковка",
"mode": "address_query",
"mode_confidence": "high",
"query_shape": "OBJECT_LOOKUP",
"query_shape_confidence": "medium",
"intent": "list_contracts_by_counterparty",
"intent_confidence": "medium",
"entities": {
"account": null,
"counterparty": "жуковка",
"contract": null,
"document_type": null,
"document_ref": null,
"organization": null
},
"period": {
"scope": "unspecified",
"period_from": null,
"period_to": null,
"as_of_date": null,
"has_explicit_period": false
},
"aggregation_profile": "list_lookup"
},
"fallback_rule_hit": null,
"sanitized_user_message": "покажи договора все по жуковка",
"tool_gate_decision": "run_address_lane",
"tool_gate_reason": "address_mode_classifier_detected",
"answer_structure_v11": null,
"investigation_state_snapshot": null,
"normalized": null,
"normalizer_output": {
"trace_id": "fmofmG2pAzwX02",
"prompt_version": "normalizer_v2_0_2",
"applied": false,
"effective_message": "покажи договора все по жуковка"
}
},
"error_code": null,
"error_message": null
}
]
}
@@ -0,0 +1,6 @@
# Response Audit: Address_Contracts_Zhukovka_Variants_2026-04-02
| id | strict | route_health | reply_type | intent | limited_reason | question | assistant_first_line |
|---|---|---|---|---|---|---|---|
| Q_Z1 | True | ok_or_factual | factual | list_contracts_by_counterparty | None | покажи договора все по жуковка 51 | Собран список договоров по контрагенту (catalog address lane). |
| Q_Z2 | True | ok_or_factual | factual | list_contracts_by_counterparty | None | покажи договора все по жуковка | Собран список договоров по контрагенту (catalog address lane). |
@@ -0,0 +1,76 @@
{
"run_id": "Address_Contracts_Zhukovka_Variants_2026-04-02",
"generated_at": "2026-04-02T22:34:45",
"source_questions_file": "X:\\1C\\NDC_1C\\docs\\ADDRESS\\question_sets\\temp_contracts_zhukovka_variants_2026-04-02.json",
"backend_url": "http://127.0.0.1:8787/api/assistant/message",
"llm_provider": "local",
"llm_model": "qwen2.5-14b-instruct-1m",
"llm_base_url": "http://127.0.0.1:1234",
"strict_policy": "route",
"totals": {
"questions_total": 2,
"ok_200_count": 2,
"semantic_pass_count": 2,
"semantic_pass_rate": 1.0,
"route_pass_count": 2,
"route_pass_rate": 1.0,
"strict_pass_count": 2,
"strict_pass_rate": 1.0,
"factual_count": 2,
"partial_coverage_count": 0,
"clarification_required_count": 0,
"http_error_count": 0,
"llm_decomposition_attempted_count": 2,
"llm_decomposition_applied_count": 0,
"llm_fallback_count": 0,
"llm_fallback_rate": 0.0,
"tool_gate_blocked_count": 0,
"tool_gate_blocked_rate": 0.0,
"avg_elapsed_ms": 6098
},
"distributions": {
"reply_type": {
"factual": 2
},
"actual_intent": {
"list_contracts_by_counterparty": 2
},
"actual_mode": {
"address_query": 2
},
"mcp_call_status": {
"matched_non_empty": 2
},
"limited_reason_category": {},
"route_health": {
"ok_or_factual": 2
},
"tool_gate_decision": {
"run_address_lane": 2
},
"tool_gate_reason": {
"address_mode_classifier_detected": 2
}
},
"address_llm_predecompose_metrics": {
"overall": {
"llm_attempted": 2,
"llm_applied": 0,
"fallback_used": 0,
"fallback_rate": 0.0,
"tool_gate_blocked": 0,
"gate_block_rate": 0.0
},
"by_intent": {
"list_contracts_by_counterparty": {
"total": 2,
"llm_attempted": 2,
"llm_applied": 0,
"fallback_used": 0,
"tool_gate_blocked": 0,
"fallback_rate": 0.0,
"gate_block_rate": 0.0
}
}
}
}