Skip to content

feat(rag): code-aware retrieval in the answer path - symbols, call and import graph #20951

Open

Description

@mrveiss

Gap

autobot_code (indexed by services/knowledge/code_indexer.py, edges via find_callers :1158) has no query-side search in the chat or agent path: rag_service.advanced_search and conversation_aware_retrieve never query it (#17625 covers the vector side). Nothing feeds the /analytics/call-graph or /analytics/dependencies data into context: no symbol lookup, no "who calls X", no import neighbourhood expansion. Code is embedded with the same general text model as prose.

Scope

  • Code leg in the orchestrator: symbol/name exact match + dense search, expansion by call/import neighbours (depth-limited).
  • Evaluate a code-specific embedding model against the current one in the benchmark.

Acceptance

  • "Where is X defined / who calls X" is answered from retrieved code chunks with file:line citations.
  • Benchmark code bucket reports recall@k with and without graph expansion.

Parent: #20948. Chat path audited from conversation_aware_retrieve (services/knowledge/service.py:696) -> retrieve_relevant_knowledge -> RAGService.advanced_search (services/rag_service.py:544).

Maintainer requirement (2026-11-06): "AutoBot's knowledge base must be able to combine every useful knowledge representation and retrieval technique, so answers get the best result" and "crosschecks". Accepted only when the retrieval benchmark gate shows the combination is better.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions