NODEDC_1C/llm_normalizer/data/traces/mIR3Cru_dmM5PQ.json

577 lines
28 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"trace_id": "mIR3Cru_dmM5PQ",
"timestamp": "2026-03-23T18:58:28.591Z",
"model": "gpt-4o-mini",
"prompt_version": "normalizer_v2_0_1",
"schema_version": "v2_0_1",
"case_id": "BQ-015",
"user_question_raw": "Собери список самых подозрительных объектов ОС: не по сумме, а по риску того, что потом придётся долго объяснять, почему карточка и начисления не бьются между собой.",
"context": {
"period_hint": null,
"business_context": null,
"expected_route": null,
"case_id": "BQ-015",
"eval_mode": "single-pass-strict"
},
"request_payload_redacted": {
"model": "gpt-4o-mini",
"baseUrl": "https://api.openai.com/v1",
"temperature": 0,
"maxOutputTokens": 900,
"promptVersion": "normalizer_v2_0_1",
"systemPrompt": "Ты semantic-normalizer для бухгалтерского ассистента NDC.\nТвоя роль: только нормализация запроса пользователя в строгий JSON-контракт.\n\nЖесткие правила:\n1) Не давай бухгалтерский ответ по сути вопроса.\n2) Возвращай только JSON без markdown и пояснений.\n3) JSON обязан соответствовать переданной schema normalized_query_v1.\n4) Если период не указан, не выдумывай его; отмечай ambiguity.\n5) Для цепочек документов/проводок/оплат поднимай causal и cross-entity признаки.\n6) Для точечного object trace (номер/строка/ref) поднимай needs_exact_object_trace=true.\n7) Используй терминологию NDC.",
"developerPrompt": "You are semantic-normalizer for accounting assistant NDC.\nReturn strict JSON only, no markdown, no comments.\n\nTarget schema: normalized_query_v2_0_1.\n\nCore behavior (v2.0.1):\n1. Decompose message into semantic fragments.\n2. Classify fragment domain relevance and business scope.\n3. Fill route-critical flags and candidate labels.\n4. For each fragment set execution readiness:\n - executable\n - executable_with_soft_assumptions\n - needs_clarification\n5. Clarification must be rare and justified.\n\nReadiness policy:\n- If fragment is in-scope, maps to recognizable accounting area, and route can be chosen -> do NOT set needs_clarification.\n- Use executable_with_soft_assumptions when request is operationally understandable but details are implicit.\n- Use needs_clarification only when missing information blocks reliable routing/execution.\n\nDo not over-require formality:\n- Do not require document IDs, exact periods, or exact object references for scan/review/anomaly/rule-check requests.\n- Colloquial accounting phrases like \"что висит\", \"что подозрительно\", \"что не сходится\", \"что криво\", \"что аукнется\" are executable if accounting area is understandable.\n\nFragment required fields:\n- fragment_id\n- raw_fragment_text\n- normalized_fragment_text\n- domain_relevance\n- business_scope\n- entity_hints\n- account_hints\n- document_hints\n- register_hints\n- time_scope\n- flags\n- candidate_labels\n- confidence\n- execution_readiness\n- clarification_reason\n- soft_assumption_used\n\nSoft assumptions (`soft_assumption_used`) allowed values:\n- period_from_session_context\n- company_scope_defaulted\n- problem_scan_mode_enabled\n\nGlobal notes:\n- global_notes.needs_clarification should be true only when execution is truly blocked.\n- global_notes.clarification_reason must explain the blocker.\n\nSchema version must be:\n- \"schema_version\": \"normalized_query_v2_0_1\"",
"domainPrompt": "Контекст домена: бухгалтерия 1С/NDC.\n\nКлючевые счета:\n- 01, 02, 10, 41, 51, 60, 62, 68.02, 90, 97.\n\nТиповые сущности:\n- контрагент, договор, документ реализации, документ поступления, оплата, проводка, регистр, закрывающий документ.\n\nЛексика causal и сверки (сильные сигналы для cross_entity):\n- \"не бьется\", \"не сходится\", \"не видно\", \"не собралось\", \"повисло\", \"хвост\";\n- \"разложи по документам/оплатам/закрывающим\";\n- \"чем подтверждается\", \"где ошибка в цепочке\", \"что пошло криво\".\n\nЛексика точечного drilldown:\n- \"документ №...\", \"ref\", \"строка проводки\", \"покажи конкретную операцию\", \"точный source-of-record\".\n\nЛексика rule-based контроля:\n- \"проверь настройки\", \"ошибка срока/даты\", \"контроль 97/10/ОС\", \"нарушение правила учета\".\n\nЛексика обзорной аналитики:\n- \"рейтинг\", \"топ рисков\", \"в целом по компании\", \"перед закрытием периода\", \"приоритизация проверок\".\n\nВажное правило:\nЕсли в одном вопросе есть и риск-лексика, и цепочка document/payment/posting, не понижать задачу до чистого `store_feature_risk`.\nПриоритет у causal cross-entity семантики.",
"fewShotExamples": "Q: По каким поставщикам висят хвосты по 60, что подозрительно по цепочке оплат?\nA: in_scope fragment, cross_entity/anomaly flags, execution_readiness=executable_with_soft_assumptions, soft_assumption_used includes problem_scan_mode_enabled.\n\nQ: Покажи записи по 97, которые повисли и могут аукнуться.\nA: in_scope fragment, rule/anomaly scan, execution_readiness=executable_with_soft_assumptions; no clarification required.\n\nQ: Чекни, что у нас не так.\nA: unclear fragment, execution_readiness=needs_clarification, clarification_reason explains missing accounting area/object.\n\nQ: Как вообще по ФСБУ правильно?\nA: out_of_scope fragment, business_scope=generic_accounting, execution_readiness=needs_clarification or out-of-scope handling.",
"userQuestion": "Собери список самых подозрительных объектов ОС: не по сумме, а по риску того, что потом придётся долго объяснять, почему карточка и начисления не бьются между собой.",
"context": {
"eval_label": "eval-baY1nPi1rI",
"case_id": "BQ-015",
"eval_mode": "single-pass-strict"
},
"retryPolicy": "single-pass-strict",
"useMock": false
},
"raw_model_response": {
"id": "resp_0dffcd844a83eede0069c18d485c64819296ce719c8dc40627",
"object": "response",
"created_at": 1774292296,
"status": "completed",
"background": false,
"billing": {
"payer": "developer"
},
"completed_at": 1774292308,
"error": null,
"frequency_penalty": 0,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": 900,
"max_tool_calls": null,
"model": "gpt-4o-mini-2024-07-18",
"output": [
{
"id": "msg_0dffcd844a83eede0069c18d48a1648192a3814b0272c578cc",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": "{\n \"schema_version\": \"normalized_query_v2_0_1\",\n \"user_message_raw\": \"Собери список самых подозрительных объектов ОС: не по сумме, а по риску того, что потом придётся долго объяснять, почему карточка и начисления не бьются между собой.\",\n \"message_in_scope\": true,\n \"scope_confidence\": \"high\",\n \"contains_multiple_tasks\": false,\n \"fragments\": [\n {\n \"fragment_id\": \"1\",\n \"raw_fragment_text\": \"Собери список самых подозрительных объектов ОС\",\n \"normalized_fragment_text\": \"Собрать список подозрительных объектов основных средств\",\n \"domain_relevance\": \"in_scope\",\n \"business_scope\": \"company_specific_accounting\",\n \"entity_hints\": [\"основные средства\"],\n \"account_hints\": [\"01\", \"02\"],\n \"document_hints\": [],\n \"register_hints\": [],\n \"time_scope\": {\n \"type\": \"missing\",\n \"value\": null,\n \"confidence\": \"low\"\n },\n \"flags\": {\n \"has_multi_entity_scope\": false,\n \"asks_for_chain_explanation\": true,\n \"asks_for_ranking_or_top\": true,\n \"asks_for_period_summary\": false,\n \"asks_for_rule_check\": false,\n \"asks_for_anomaly_scan\": true,\n \"asks_for_exact_object_trace\": false,\n \"asks_for_evidence\": false,\n \"mentions_period_close_context\": false\n },\n \"candidate_labels\": [\"anomaly_probe\", \"cross_entity\"],\n \"confidence\": \"high\",\n \"execution_readiness\": \"executable\",\n \"clarification_reason\": null,\n \"soft_assumption_used\": []\n },\n {\n \"fragment_id\": \"2\",\n \"raw_fragment_text\": \"не по сумме, а по риску того, что потом придётся долго объяснять, почему карточка и начисления не бьются между собой\",\n \"normalized_fragment_text\": \"Оценить риск несоответствия между карточкой и начислениями\",\n \"domain_relevance\": \"in_scope\",\n \"business_scope\": \"company_specific_accounting\",\n \"entity_hints\": [\"карточка\", \"начисления\"],\n \"account_hints\": [\"01\", \"02\"],\n \"document_hints\": [],\n \"register_hints\": [],\n \"time_scope\": {\n \"type\": \"missing\",\n \"value\": null,\n \"confidence\": \"low\"\n },\n \"flags\": {\n \"has_multi_entity_scope\": true,\n \"asks_for_chain_explanation\": true,\n \"asks_for_ranking_or_top\": false,\n \"asks_for_period_summary\": false,\n \"asks_for_rule_check\": false,\n \"asks_for_anomaly_scan\": true,\n \"asks_for_exact_object_trace\": false,\n \"asks_for_evidence\": false,\n \"mentions_period_close_context\": false\n },\n \"candidate_labels\": [\"anomaly_probe\", \"cross_entity\"],\n \"confidence\": \"high\",\n \"execution_readiness\": \"executable\",\n \"clarification_reason\": null,\n \"soft_assumption_used\": []\n }\n ],\n \"discarded_fragments\": [],\n \"global_notes\": {\n \"needs_clarification\": false,\n \"clarification_reason\": null\n }\n}"
}
],
"role": "assistant"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": null,
"reasoning": {
"effort": null,
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"store": true,
"temperature": 0,
"text": {
"format": {
"type": "json_schema",
"description": null,
"name": "normalized_query_v2_0_1",
"schema": {
"$id": "normalized_query_v2_0_1",
"title": "Normalized Query V2.0.1",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"user_message_raw",
"message_in_scope",
"scope_confidence",
"contains_multiple_tasks",
"fragments",
"discarded_fragments",
"global_notes"
],
"properties": {
"schema_version": {
"type": "string",
"const": "normalized_query_v2_0_1"
},
"user_message_raw": {
"type": "string",
"minLength": 1
},
"message_in_scope": {
"type": "boolean"
},
"scope_confidence": {
"type": "string",
"enum": [
"high",
"medium",
"low"
]
},
"contains_multiple_tasks": {
"type": "boolean"
},
"fragments": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"fragment_id",
"raw_fragment_text",
"normalized_fragment_text",
"domain_relevance",
"business_scope",
"entity_hints",
"account_hints",
"document_hints",
"register_hints",
"time_scope",
"flags",
"candidate_labels",
"confidence",
"execution_readiness",
"clarification_reason",
"soft_assumption_used"
],
"properties": {
"fragment_id": {
"type": "string",
"minLength": 1
},
"raw_fragment_text": {
"type": "string",
"minLength": 1
},
"normalized_fragment_text": {
"type": "string",
"minLength": 1
},
"domain_relevance": {
"type": "string",
"enum": [
"in_scope",
"out_of_scope",
"unclear"
]
},
"business_scope": {
"type": "string",
"enum": [
"company_specific_accounting",
"generic_accounting",
"offtopic",
"unclear"
]
},
"entity_hints": {
"type": "array",
"items": {
"type": "string"
}
},
"account_hints": {
"type": "array",
"items": {
"type": "string"
}
},
"document_hints": {
"type": "array",
"items": {
"type": "string"
}
},
"register_hints": {
"type": "array",
"items": {
"type": "string"
}
},
"time_scope": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"value",
"confidence"
],
"properties": {
"type": {
"type": "string",
"enum": [
"explicit",
"inferred",
"missing"
]
},
"value": {
"type": [
"string",
"null"
]
},
"confidence": {
"type": "string",
"enum": [
"high",
"medium",
"low"
]
}
}
},
"flags": {
"type": "object",
"additionalProperties": false,
"required": [
"has_multi_entity_scope",
"asks_for_chain_explanation",
"asks_for_ranking_or_top",
"asks_for_period_summary",
"asks_for_rule_check",
"asks_for_anomaly_scan",
"asks_for_exact_object_trace",
"asks_for_evidence",
"mentions_period_close_context"
],
"properties": {
"has_multi_entity_scope": {
"type": "boolean"
},
"asks_for_chain_explanation": {
"type": "boolean"
},
"asks_for_ranking_or_top": {
"type": "boolean"
},
"asks_for_period_summary": {
"type": "boolean"
},
"asks_for_rule_check": {
"type": "boolean"
},
"asks_for_anomaly_scan": {
"type": "boolean"
},
"asks_for_exact_object_trace": {
"type": "boolean"
},
"asks_for_evidence": {
"type": "boolean"
},
"mentions_period_close_context": {
"type": "boolean"
}
}
},
"candidate_labels": {
"type": "array",
"items": {
"type": "string",
"enum": [
"heavy_analytical",
"cross_entity",
"drilldown_explain",
"rule_based_account_control",
"anomaly_probe",
"period_close_risk",
"ambiguous_human_query",
"simple_factual"
]
}
},
"confidence": {
"type": "string",
"enum": [
"high",
"medium",
"low"
]
},
"execution_readiness": {
"type": "string",
"enum": [
"executable",
"executable_with_soft_assumptions",
"needs_clarification"
]
},
"clarification_reason": {
"type": [
"string",
"null"
]
},
"soft_assumption_used": {
"type": "array",
"items": {
"type": "string",
"enum": [
"period_from_session_context",
"company_scope_defaulted",
"problem_scan_mode_enabled"
]
}
}
}
}
},
"discarded_fragments": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"raw_fragment_text",
"reason"
],
"properties": {
"raw_fragment_text": {
"type": "string",
"minLength": 1
},
"reason": {
"type": "string",
"minLength": 1
}
}
}
},
"global_notes": {
"type": "object",
"additionalProperties": false,
"required": [
"needs_clarification",
"clarification_reason"
],
"properties": {
"needs_clarification": {
"type": "boolean"
},
"clarification_reason": {
"type": [
"string",
"null"
]
}
}
}
}
},
"strict": true
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 1,
"truncation": "disabled",
"usage": {
"input_tokens": 1823,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 714,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 2537
},
"user": null,
"metadata": {}
},
"parsed_normalized_json": {
"schema_version": "normalized_query_v2_0_1",
"user_message_raw": "Собери список самых подозрительных объектов ОС: не по сумме, а по риску того, что потом придётся долго объяснять, почему карточка и начисления не бьются между собой.",
"message_in_scope": true,
"scope_confidence": "high",
"contains_multiple_tasks": false,
"fragments": [
{
"fragment_id": "1",
"raw_fragment_text": "Собери список самых подозрительных объектов ОС",
"normalized_fragment_text": "Собрать список подозрительных объектов основных средств",
"domain_relevance": "in_scope",
"business_scope": "company_specific_accounting",
"entity_hints": [
"основные средства"
],
"account_hints": [
"01",
"02"
],
"document_hints": [],
"register_hints": [],
"time_scope": {
"type": "missing",
"value": null,
"confidence": "low"
},
"flags": {
"has_multi_entity_scope": false,
"asks_for_chain_explanation": true,
"asks_for_ranking_or_top": true,
"asks_for_period_summary": false,
"asks_for_rule_check": false,
"asks_for_anomaly_scan": true,
"asks_for_exact_object_trace": false,
"asks_for_evidence": false,
"mentions_period_close_context": false
},
"candidate_labels": [
"anomaly_probe",
"cross_entity"
],
"confidence": "high",
"execution_readiness": "needs_clarification",
"clarification_reason": "critical_period_missing",
"soft_assumption_used": []
},
{
"fragment_id": "2",
"raw_fragment_text": "не по сумме, а по риску того, что потом придётся долго объяснять, почему карточка и начисления не бьются между собой",
"normalized_fragment_text": "Оценить риск несоответствия между карточкой и начислениями",
"domain_relevance": "in_scope",
"business_scope": "company_specific_accounting",
"entity_hints": [
"карточка",
"начисления"
],
"account_hints": [
"01",
"02"
],
"document_hints": [],
"register_hints": [],
"time_scope": {
"type": "missing",
"value": null,
"confidence": "low"
},
"flags": {
"has_multi_entity_scope": true,
"asks_for_chain_explanation": true,
"asks_for_ranking_or_top": false,
"asks_for_period_summary": false,
"asks_for_rule_check": false,
"asks_for_anomaly_scan": true,
"asks_for_exact_object_trace": false,
"asks_for_evidence": false,
"mentions_period_close_context": false
},
"candidate_labels": [
"anomaly_probe",
"cross_entity"
],
"confidence": "high",
"execution_readiness": "executable_with_soft_assumptions",
"clarification_reason": null,
"soft_assumption_used": [
"problem_scan_mode_enabled"
]
}
],
"discarded_fragments": [],
"global_notes": {
"needs_clarification": false,
"clarification_reason": null
}
},
"validation_result": {
"passed": true,
"errors": []
},
"route_hint_summary": {
"mode": "deterministic_v2",
"message_in_scope": true,
"scope_confidence": "high",
"planner": {
"total_fragments": 2,
"in_scope_fragments": 2,
"out_of_scope_fragments": 0,
"discarded_fragments": 0,
"contains_multiple_tasks": false
},
"decisions": [
{
"fragment_id": "1",
"domain_relevance": "in_scope",
"business_scope": "company_specific_accounting",
"candidate_labels": [
"anomaly_probe",
"cross_entity"
],
"decision_flags": {
"has_multi_entity_scope": false,
"asks_for_chain_explanation": true,
"asks_for_ranking_or_top": true,
"asks_for_period_summary": false,
"asks_for_rule_check": false,
"asks_for_anomaly_scan": true,
"asks_for_exact_object_trace": false,
"asks_for_evidence": false,
"mentions_period_close_context": false
},
"execution_readiness": "needs_clarification",
"clarification_reason": "critical_period_missing",
"soft_assumption_used": [],
"route": "no_route",
"reason": "Fragment requires clarification before reliable execution."
},
{
"fragment_id": "2",
"domain_relevance": "in_scope",
"business_scope": "company_specific_accounting",
"candidate_labels": [
"anomaly_probe",
"cross_entity"
],
"decision_flags": {
"has_multi_entity_scope": true,
"asks_for_chain_explanation": true,
"asks_for_ranking_or_top": false,
"asks_for_period_summary": false,
"asks_for_rule_check": false,
"asks_for_anomaly_scan": true,
"asks_for_exact_object_trace": false,
"asks_for_evidence": false,
"mentions_period_close_context": false
},
"execution_readiness": "executable_with_soft_assumptions",
"clarification_reason": null,
"soft_assumption_used": [
"problem_scan_mode_enabled"
],
"route": "hybrid_store_plus_live",
"reason": "Multi-entity causal chain requested."
}
],
"fallback": {
"type": "none",
"message": null
}
},
"route_hint": "hybrid_store_plus_live",
"confidence": "high",
"usage": {
"input_tokens": 1823,
"output_tokens": 714,
"total_tokens": 2537
},
"latency_ms": 12646,
"eval_label": "eval-baY1nPi1rI",
"eval_mode": "single-pass-strict",
"request_count_for_case": 1
}