АДРЕСНЫЙ РЕЖИМ -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,28 @@
# 2026-04-02_Address_CustomerRole_Probe
Generated at: 2026-04-02T21:57:59
Questions file: X:\1C\NDC_1C\docs\ADDRESS\question_sets\temp_customer_role_probe_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: factual
## Totals
- questions_total: 2
- ok_200_count: 2
- semantic_pass_count: 2
- semantic_pass_rate: 1.0
- route_pass_count: 1
- route_pass_rate: 0.5
- strict_pass_count: 1
- strict_pass_rate: 0.5
- factual_count: 1
- partial_coverage_count: 1
- clarification_required_count: 0
- http_error_count: 0
- llm_decomposition_applied_count: 1
- avg_elapsed_ms: 5432.5
## Files
- run_summary.json
- full_live_results.json
- failures_only.json
@@ -0,0 +1,141 @@
[
{
"index": 2,
"id": "P002",
"question": "кто у нас заказчики вообще",
"session": null,
"session_id": "asst-2026-04-02_Address_CustomerRole_Probe-p002",
"status_code": 200,
"ok": true,
"elapsed_ms": 4503,
"reply_type": "partial_coverage",
"trace_id": "address-_VaGpRcHM0",
"assistant_reply": "Этот запрос не подходит под address_query V1.\nПричина: intent пока не поддержан в address V1.\nЧто нужно уточнить: переформулируйте вопрос как адресный lookup по счету/контрагенту/договору.",
"assistant_reply_first_line": "Этот запрос не подходит под address_query V1.",
"expected_intent": null,
"actual_intent": "unknown",
"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": false,
"route_health": "blocked_unsupported",
"strict_policy": "factual",
"strict_pass": false,
"selected_recipe": null,
"missing_required_filters": [],
"match_failure_stage": "none",
"match_failure_reason": null,
"rows_fetched": 0,
"rows_matched": 0,
"mcp_call_status": "skipped",
"limited_reason_category": "unsupported",
"llm_decomposition_applied": false,
"llm_decomposition_reason": "normalized_fragment_same",
"fallback_rule_hit": null,
"debug_payload": {
"trace_id": "address-_VaGpRcHM0",
"prompt_version": "address_query_runtime_v1",
"schema_version": "address_query_runtime_v1",
"fallback_type": "partial",
"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": "partial",
"route_subject_match": true,
"missing_requirements": [],
"reasons": [
"address_action_detected",
"address_entity_detected",
"shape_not_detected",
"intent_not_supported_in_v1"
],
"why_included_summary": [],
"selection_reason_summary": []
},
"dropped_intent_segments": [],
"detected_mode": "address_query",
"detected_mode_confidence": "high",
"query_shape": "UNKNOWN",
"query_shape_confidence": "low",
"detected_intent": "unknown",
"detected_intent_confidence": "low",
"extracted_filters": {
"sort": "period_desc",
"limit": 20
},
"missing_required_filters": [],
"selected_recipe": null,
"mcp_call_status_legacy": "skipped",
"account_scope_mode": "strict",
"account_scope_fallback_applied": false,
"anchor_type": "unknown",
"anchor_value_raw": null,
"anchor_value_resolved": null,
"resolver_confidence": "low",
"ambiguity_count": 0,
"match_failure_stage": "none",
"match_failure_reason": null,
"mcp_call_status": "skipped",
"rows_fetched": 0,
"raw_rows_received": 0,
"rows_after_account_scope": 0,
"rows_after_recipe_filter": 0,
"rows_materialized": 0,
"rows_matched": 0,
"raw_row_keys_sample": [],
"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": "DEEP_ONLY",
"limited_reason_category": "unsupported",
"response_type": "LIMITED_WITH_REASON",
"execution_lane": "address_query",
"llm_decomposition_applied": false,
"llm_decomposition_attempted": true,
"llm_provider_used": "local",
"llm_decomposition_trace_id": "wDo3K7gI394XmR",
"llm_decomposition_effective_message": "кто у нас заказчики вообще",
"llm_decomposition_reason": "normalized_fragment_same",
"llm_canonical_candidate_detected": true,
"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": "wDo3K7gI394XmR",
"prompt_version": "normalizer_v2_0_2",
"applied": false,
"effective_message": "кто у нас заказчики вообще"
}
},
"error_code": null,
"error_message": null
}
]
@@ -0,0 +1,343 @@
{
"run_id": "2026-04-02_Address_CustomerRole_Probe",
"generated_at": "2026-04-02T21:57:59",
"summary": {
"run_id": "2026-04-02_Address_CustomerRole_Probe",
"generated_at": "2026-04-02T21:57:59",
"source_questions_file": "X:\\1C\\NDC_1C\\docs\\ADDRESS\\question_sets\\temp_customer_role_probe_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": "factual",
"totals": {
"questions_total": 2,
"ok_200_count": 2,
"semantic_pass_count": 2,
"semantic_pass_rate": 1.0,
"route_pass_count": 1,
"route_pass_rate": 0.5,
"strict_pass_count": 1,
"strict_pass_rate": 0.5,
"factual_count": 1,
"partial_coverage_count": 1,
"clarification_required_count": 0,
"http_error_count": 0,
"llm_decomposition_applied_count": 1,
"avg_elapsed_ms": 5432.5
},
"distributions": {
"reply_type": {
"factual": 1,
"partial_coverage": 1
},
"actual_intent": {
"counterparty_population_and_roles": 1,
"unknown": 1
},
"actual_mode": {
"address_query": 2
},
"mcp_call_status": {
"matched_non_empty": 1,
"skipped": 1
},
"limited_reason_category": {
"unsupported": 1
},
"route_health": {
"ok_or_factual": 1,
"blocked_unsupported": 1
}
}
},
"rows": [
{
"index": 1,
"id": "P001",
"question": "скок клиентов",
"session": null,
"session_id": "asst-2026-04-02_Address_CustomerRole_Probe-p001",
"status_code": 200,
"ok": true,
"elapsed_ms": 6362,
"reply_type": "factual",
"trace_id": "address-BlXqmGgtXZ",
"assistant_reply": "Профиль контрагентов собран (catalog + bank-doc activity aggregate).\nСтрок агрегата: 5.\nВсего уникальных контрагентов в базе: 139.",
"assistant_reply_first_line": "Профиль контрагентов собран (catalog + bank-doc activity aggregate).",
"expected_intent": null,
"actual_intent": "counterparty_population_and_roles",
"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": "factual",
"strict_pass": true,
"selected_recipe": "address_counterparty_population_roles_v1",
"missing_required_filters": [],
"match_failure_stage": "none",
"match_failure_reason": null,
"rows_fetched": 5,
"rows_matched": 5,
"mcp_call_status": "matched_non_empty",
"limited_reason_category": null,
"llm_decomposition_applied": true,
"llm_decomposition_reason": "normalized_fragment_applied",
"fallback_rule_hit": null,
"debug_payload": {
"trace_id": "address-BlXqmGgtXZ",
"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",
"counterparty_population_and_roles_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": "counterparty_population_and_roles",
"detected_intent_confidence": "high",
"extracted_filters": {
"sort": "period_desc",
"period_to": "2026-04-02"
},
"missing_required_filters": [],
"selected_recipe": "address_counterparty_population_roles_v1",
"mcp_call_status_legacy": "matched_non_empty",
"account_scope_mode": "preferred",
"account_scope_fallback_applied": false,
"anchor_type": "unknown",
"anchor_value_raw": null,
"anchor_value_resolved": null,
"resolver_confidence": "low",
"ambiguity_count": 0,
"match_failure_stage": "none",
"match_failure_reason": null,
"mcp_call_status": "matched_non_empty",
"rows_fetched": 5,
"raw_rows_received": 5,
"rows_after_account_scope": 5,
"rows_after_recipe_filter": 5,
"rows_materialized": 5,
"rows_matched": 5,
"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_SUMMARY",
"execution_lane": "address_query",
"llm_decomposition_applied": true,
"llm_decomposition_attempted": true,
"llm_provider_used": "local",
"llm_decomposition_trace_id": "kR-YwJ1dNUHCTn",
"llm_decomposition_effective_message": "сколько контрагентов?",
"llm_decomposition_reason": "normalized_fragment_applied",
"llm_canonical_candidate_detected": true,
"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": "kR-YwJ1dNUHCTn",
"prompt_version": "normalizer_v2_0_2",
"applied": true,
"effective_message": "сколько контрагентов?"
}
},
"error_code": null,
"error_message": null
},
{
"index": 2,
"id": "P002",
"question": "кто у нас заказчики вообще",
"session": null,
"session_id": "asst-2026-04-02_Address_CustomerRole_Probe-p002",
"status_code": 200,
"ok": true,
"elapsed_ms": 4503,
"reply_type": "partial_coverage",
"trace_id": "address-_VaGpRcHM0",
"assistant_reply": "Этот запрос не подходит под address_query V1.\nПричина: intent пока не поддержан в address V1.\nЧто нужно уточнить: переформулируйте вопрос как адресный lookup по счету/контрагенту/договору.",
"assistant_reply_first_line": "Этот запрос не подходит под address_query V1.",
"expected_intent": null,
"actual_intent": "unknown",
"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": false,
"route_health": "blocked_unsupported",
"strict_policy": "factual",
"strict_pass": false,
"selected_recipe": null,
"missing_required_filters": [],
"match_failure_stage": "none",
"match_failure_reason": null,
"rows_fetched": 0,
"rows_matched": 0,
"mcp_call_status": "skipped",
"limited_reason_category": "unsupported",
"llm_decomposition_applied": false,
"llm_decomposition_reason": "normalized_fragment_same",
"fallback_rule_hit": null,
"debug_payload": {
"trace_id": "address-_VaGpRcHM0",
"prompt_version": "address_query_runtime_v1",
"schema_version": "address_query_runtime_v1",
"fallback_type": "partial",
"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": "partial",
"route_subject_match": true,
"missing_requirements": [],
"reasons": [
"address_action_detected",
"address_entity_detected",
"shape_not_detected",
"intent_not_supported_in_v1"
],
"why_included_summary": [],
"selection_reason_summary": []
},
"dropped_intent_segments": [],
"detected_mode": "address_query",
"detected_mode_confidence": "high",
"query_shape": "UNKNOWN",
"query_shape_confidence": "low",
"detected_intent": "unknown",
"detected_intent_confidence": "low",
"extracted_filters": {
"sort": "period_desc",
"limit": 20
},
"missing_required_filters": [],
"selected_recipe": null,
"mcp_call_status_legacy": "skipped",
"account_scope_mode": "strict",
"account_scope_fallback_applied": false,
"anchor_type": "unknown",
"anchor_value_raw": null,
"anchor_value_resolved": null,
"resolver_confidence": "low",
"ambiguity_count": 0,
"match_failure_stage": "none",
"match_failure_reason": null,
"mcp_call_status": "skipped",
"rows_fetched": 0,
"raw_rows_received": 0,
"rows_after_account_scope": 0,
"rows_after_recipe_filter": 0,
"rows_materialized": 0,
"rows_matched": 0,
"raw_row_keys_sample": [],
"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": "DEEP_ONLY",
"limited_reason_category": "unsupported",
"response_type": "LIMITED_WITH_REASON",
"execution_lane": "address_query",
"llm_decomposition_applied": false,
"llm_decomposition_attempted": true,
"llm_provider_used": "local",
"llm_decomposition_trace_id": "wDo3K7gI394XmR",
"llm_decomposition_effective_message": "кто у нас заказчики вообще",
"llm_decomposition_reason": "normalized_fragment_same",
"llm_canonical_candidate_detected": true,
"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": "wDo3K7gI394XmR",
"prompt_version": "normalizer_v2_0_2",
"applied": false,
"effective_message": "кто у нас заказчики вообще"
}
},
"error_code": null,
"error_message": null
}
]
}
@@ -0,0 +1,6 @@
# Response Audit: 2026-04-02_Address_CustomerRole_Probe
| id | strict | route_health | reply_type | intent | limited_reason | question | assistant_first_line |
|---|---|---|---|---|---|---|---|
| P001 | True | ok_or_factual | factual | counterparty_population_and_roles | None | скок клиентов | Профиль контрагентов собран (catalog + bank-doc activity aggregate). |
| P002 | False | blocked_unsupported | partial_coverage | unknown | unsupported | кто у нас заказчики вообще | Этот запрос не подходит под address_query V1. |
@@ -0,0 +1,50 @@
{
"run_id": "2026-04-02_Address_CustomerRole_Probe",
"generated_at": "2026-04-02T21:57:59",
"source_questions_file": "X:\\1C\\NDC_1C\\docs\\ADDRESS\\question_sets\\temp_customer_role_probe_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": "factual",
"totals": {
"questions_total": 2,
"ok_200_count": 2,
"semantic_pass_count": 2,
"semantic_pass_rate": 1.0,
"route_pass_count": 1,
"route_pass_rate": 0.5,
"strict_pass_count": 1,
"strict_pass_rate": 0.5,
"factual_count": 1,
"partial_coverage_count": 1,
"clarification_required_count": 0,
"http_error_count": 0,
"llm_decomposition_applied_count": 1,
"avg_elapsed_ms": 5432.5
},
"distributions": {
"reply_type": {
"factual": 1,
"partial_coverage": 1
},
"actual_intent": {
"counterparty_population_and_roles": 1,
"unknown": 1
},
"actual_mode": {
"address_query": 2
},
"mcp_call_status": {
"matched_non_empty": 1,
"skipped": 1
},
"limited_reason_category": {
"unsupported": 1
},
"route_health": {
"ok_or_factual": 1,
"blocked_unsupported": 1
}
}
}