Skip to content

feat(rag): one fusion strategy for dense + lexical + graph + code legs, BM25 on, chosen by benchmark #20953

Open

Description

@mrveiss

Gap

Two fusions stack (RRF hybrid_search.py:47 inside kb.search, then weighted 0.7/0.3 advanced_rag_optimizer.py:525), BM25 in the optimizer is off by default (autobot_shared/ssot_constants.py:225 RAG_BM25_HYBRID_ENABLED=False), MMR off (:221 RAG_MMR_LAMBDA=0.0), relevance floor off (:229). RRF agreement multiplicity (hybrid_search.py:82-94) is computed but dropped before ranking output is used.

Acceptance

  • One fusion implementation; weights/k come from SSOT config.
  • Benchmark picks the default (RRF vs weighted vs learned) and BM25/MMR/floor defaults by measured delta.

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

    Labels

    backendenhancementNew feature or requestphase:M1.8Knowledge base: upload, web sources and chat retrieval work end to endpriority: highrag

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions