Skip to content

feat(rag): parent/child chunk context expansion for docs and code #20960

Open

Description

@mrveiss

Gap

Chunks are returned as isolated windows; no hit is expanded to its parent section, neighbours or enclosing function/class. (Section-aware chunking: #18856, #17209, #18852, comparison runner #13245.) Chunk size/overlap were never tuned by measurement.

Acceptance

  • Child hit returns parent/neighbour context within the token budget, with the cited chunk marked.
  • Benchmark compares small-chunk, parent-expanded and whole-section retrieval.

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