# v3-negative-3

- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_03_docs/full_chain_docs_intents_v3-3x.yaml
- runner: agent_runtime
- mode: pre_llm
- passed: True

## Query
Что делает endpoint /unknown?

## Actual
{
  "intent": "DOCUMENTATION_EXPLAIN",
  "sub_intent": "API_METHOD_EXPLAIN",
  "graph_id": "DocsQAGraph",
  "conversation_mode": "START",
  "rag_count": 0,
  "llm_answer": "",
  "answer_mode": "degraded",
  "path_scope": [],
  "doc_scope": [],
  "entity_candidates": [],
  "symbol_candidates": [],
  "layers": [
    "D2_FACT_INDEX",
    "D4_WORKFLOW_INDEX",
    "D1_DOCUMENT_CATALOG",
    "D0_DOC_CHUNKS"
  ],
  "filters": {
    "doc_type": "api_method"
  },
  "pipeline_mode": "pre_llm_only",
  "gate_decision": "reject",
  "prompt_used": "docs_explain_answer",
  "llm_mode": "prose",
  "degraded_reason": "not_found_exact_anchor",
  "code_intents_stubbed": true
}

## Pipeline Steps
### input_query
```json
{
  "input": {
    "query": "Что делает endpoint /unknown?"
  },
  "output": {
    "query": "Что делает endpoint /unknown?"
  }
}
```

### router
```json
{
  "input": {
    "query": "Что делает endpoint /unknown?"
  },
  "output": {
    "intent": "DOCUMENTATION_EXPLAIN",
    "sub_intent": "API_METHOD_EXPLAIN",
    "graph_id": "DocsQAGraph",
    "conversation_mode": "START"
  }
}
```

### docs_pipeline
```json
{
  "input": {
    "query": "Что делает endpoint /unknown?"
  },
  "output": {
    "answer_mode": "degraded",
    "prompt_name": "docs_explain_answer",
    "llm_request": {
      "prompt_name": "docs_explain_answer",
      "log_context": "graph.project_qa.docs.answer",
      "prompt_stats": {
        "system_chars": 393,
        "user_chars": 230,
        "tokens_in_estimate": 156
      }
    },
    "degraded_reason": "not_found_exact_anchor"
  }
}
```

## Diagnostics
{
  "intent": "DOCUMENTATION_EXPLAIN",
  "sub_intent": "API_METHOD_EXPLAIN",
  "layers_used": [
    "D2_FACT_INDEX",
    "D4_WORKFLOW_INDEX",
    "D1_DOCUMENT_CATALOG",
    "D0_DOC_CHUNKS"
  ],
  "documents_found": 0,
  "facts_found": 0,
  "relations_found": 0,
  "openapi_fields_extracted": 0,
  "missing_required_fields": [],
  "openapi_status": {
    "has_path": false,
    "has_method": false,
    "has_request": false,
    "has_response": false
  },
  "prompt_used": "docs_explain_answer",
  "llm_mode": "prose",
  "output_valid": false,
  "matched_intent_source": "deterministic",
  "matched_anchor_type": "endpoint",
  "matched_anchor_value": "/unknown",
  "exact_anchor_match": false,
  "docs_layers_requested": [
    "D2_FACT_INDEX",
    "D4_WORKFLOW_INDEX",
    "D1_DOCUMENT_CATALOG",
    "D0_DOC_CHUNKS"
  ],
  "docs_layers_with_hits": [
    "D2_FACT_INDEX",
    "D4_WORKFLOW_INDEX",
    "D1_DOCUMENT_CATALOG",
    "D0_DOC_CHUNKS"
  ],
  "planned_layers": [
    "D2_FACT_INDEX",
    "D4_WORKFLOW_INDEX",
    "D1_DOCUMENT_CATALOG",
    "D0_DOC_CHUNKS"
  ],
  "executed_layers": [
    "D2_FACT_INDEX",
    "D4_WORKFLOW_INDEX",
    "D1_DOCUMENT_CATALOG",
    "D0_DOC_CHUNKS"
  ],
  "non_empty_layers": [
    "D2_FACT_INDEX",
    "D4_WORKFLOW_INDEX",
    "D1_DOCUMENT_CATALOG",
    "D0_DOC_CHUNKS"
  ],
  "layer_diagnostics": {
    "D2_FACT_INDEX": {
      "hits": 8,
      "top_ids": [
        "f85d982c272a2ee6baeadc433221a20e684cd8ef01cb4788d6f76d05ca56d6d0",
        "b8e44c3adb74aaa6c91ae8815fa091289e58dd3990a3a1b63e850c62075aea75",
        "bafb867ffed41c9db637df98d6cd5f6722d7747bbebc6c03e6f0d0caf3b7f9f3",
        "54bbcbac242f1c85ec3280236ed5841998a8a3a548ff16cbf0b5acafbff469e3",
        "b6bfad59b3bf00f199b5ef90c1208af19664de700413e7354468a93a4abaaa2f"
      ],
      "top_sections": [
        "api.control_actions_endpoint:workflow_step",
        "api.control_actions_endpoint:mentions_entity"
      ]
    },
    "D4_WORKFLOW_INDEX": {
      "hits": 3,
      "top_ids": [
        "api.control_actions_endpoint",
        "api.health_endpoint",
        "api.send_message_endpoint"
      ],
      "top_sections": [
        "Scenario"
      ]
    },
    "D1_DOCUMENT_CATALOG": {
      "hits": 4,
      "top_ids": [
        "api.send_message_endpoint",
        "api.control_actions_endpoint",
        "api.health_endpoint",
        "docs/README.md"
      ],
      "top_sections": [
        "HTTP API /send",
        "HTTP API /actions/{action}",
        "HTTP API /health",
        "Readme"
      ]
    },
    "D0_DOC_CHUNKS": {
      "hits": 4,
      "top_ids": [
        "api.control_actions_endpoint"
      ],
      "top_sections": [
        "api.control_actions_endpoint:Описание",
        "api.control_actions_endpoint:Сценарий",
        "api.control_actions_endpoint:Summary",
        "api.control_actions_endpoint:Функциональные требования"
      ]
    }
  },
  "query_entity_candidates": [],
  "resolved_entity_candidates": [],
  "query_anchor_candidates": [
    "/unknown"
  ],
  "resolved_anchor_candidates": [],
  "anchor_candidates": [],
  "selected_anchor": null,
  "anchor_selection_reason": "",
  "anchor_match_type": "",
  "doc_ids": [],
  "doc_paths": [],
  "doc_titles": [],
  "relation_hits_count": 0,
  "relation_targets": [],
  "selected_doc_ids": [],
  "selected_fact_ids": [],
  "selected_relation_ids": [],
  "selected_chunk_ids": [],
  "selected_entity_ids": [],
  "selected_workflow_ids": [],
  "fallback_doc_hits_count": 0,
  "fallback_used": false,
  "fact_hits": 0,
  "entity_hits": 0,
  "evidence_summary": {
    "documents": 0,
    "facts": 0,
    "entities": 0,
    "workflows": 0,
    "relations": 0,
    "chunks": 0,
    "selected_doc_ids": [],
    "selected_fact_ids": [],
    "selected_relation_ids": [],
    "selected_chunk_ids": [],
    "entity_hits": 0,
    "openapi_signals": {
      "path_found": false,
      "method_found": false,
      "operation_semantics_found": false,
      "request_payload_found": false,
      "request_schema": false,
      "request_fields_found": false,
      "response_payload_found": false,
      "response_schema": false,
      "response_fields_found": false,
      "status_codes": false,
      "content_type_found": false,
      "examples_found": false,
      "payload_description": false
    }
  },
  "gate_decision": "reject",
  "gate_decision_reason": "not_found_exact_anchor",
  "gate_missing_requirements": [
    "retrieval_non_empty",
    "exact_anchor_match"
  ],
  "gate_satisfied_requirements": [],
  "openapi_evidence": {
    "path_found": false,
    "method_found": false,
    "operation_semantics_found": false,
    "request_payload_found": false,
    "request_schema": false,
    "request_fields_found": false,
    "response_payload_found": false,
    "response_schema": false,
    "response_fields_found": false,
    "status_codes": false,
    "content_type_found": false,
    "examples_found": false,
    "payload_description": false
  },
  "requested_fragment_type": null,
  "fragment_evidence_found": [],
  "fragment_missing_requirements": [],
  "answer_mode": "degraded",
  "degrade_reason": "not_found_exact_anchor",
  "degraded_reason": "not_found_exact_anchor",
  "code_intents_stubbed": false
}

## LLM Request
- prompt_name: docs_explain_answer
- log_context: graph.project_qa.docs.answer

### Prompt Stats
```json
{
  "system_chars": 393,
  "user_chars": 230,
  "tokens_in_estimate": 156
}
```

### System Prompt
```text
Ты объясняешь документацию системы.

На вход приходит JSON с полями:
- question
- intent
- sub_intent
- documents
- facts
- relations

Правила:
- Используй только предоставленные факты
- Не додумывай
- Если данных недостаточно, скажи это явно
- Объясняй структурировано

Формат ответа:
1. Краткое описание
2. Основные элементы
3. Как это работает
4. Связи с другими частями системы (если есть)
```

### User Prompt
```json
{
  "question": "Что делает endpoint /unknown?",
  "intent": "DOCUMENTATION_EXPLAIN",
  "sub_intent": "API_METHOD_EXPLAIN",
  "documents": [],
  "facts": [],
  "entities": [],
  "workflows": [],
  "relations": [],
  "chunks": []
}
```

### User Prompt Overview
- question: Что делает endpoint /unknown?
- intent: DOCUMENTATION_EXPLAIN
- sub_intent: API_METHOD_EXPLAIN
- documents: 0
- facts: 0
- relations: 0

## Mismatches
- none