Skip to content

feat(rag): reranking across every bucket, with an LLM-rerank option, gated by benchmark #20954

Open

Description

@mrveiss

Gap

The only reranker is a single English cross-encoder (knowledge/search_components/reranking.py:383 MiniLM L6, applied at advanced_rag_optimizer.py:692) on the facts leg. Doc chunks are merged after rerank by hybrid_score (rag_service.py:643), so they never pass through it; code and memory are not reranked. No LLM/listwise rerank. Default-on/off ambiguity: knowledge/search.py:237 defaults enable_reranking=False while service.py:273 passes True (#19793). Session-adaptive weights default off (rag_config.py:124) and are racy (#18084).

Acceptance

  • Single rerank call site over the fused candidates of all buckets.
  • Cross-encoder vs LLM rerank vs none compared in the benchmark; default follows the result.

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