Skip to content

Synthesizer: RankingSynthesizer — query-conditioned relevance reranking + top-K trim at the synthesis boundary #128

Description

@se-jo-ma

Context. Nautilus fans out to heterogeneous sources and returns an unranked {source_id: rows} passthrough. MemGraphRAG's central empirical finding: high-recall / low-relevance context degrades downstream quality — the same hazard for a broker handing an agent every row from every source. A ranking synthesizer models the recall-vs-relevance trade-off without touching the deterministic routing path. Depends on the merge-context widening (linked issue).

Scope note (paper-faithfulness). PPR / hub-suppression run over a pre-built heterogeneous KG in the paper; transplanting them onto an ad-hoc query-time source/row bipartite graph is an analogy, not a port. The defensible, paper-grounded core here is similarity-to-query reranking + top-K trim (optionally a batch-local IDF down-weight). PPR framing is explicitly out of scope.

Proposal. New nautilus/synthesis/ranking.py RankingSynthesizer.merge(results, context):

  • Seed per-row scores by similarity to context['embedding'] (or a per-source/broker Embedder), optional batch-local IDF down-weight on recurring key tokens, keep top-K.
  • Pure-Python, no LLM, deterministic. Preserve the no-raise contract + error pre-filtering.
  • Degrade to passthrough when no embedding available (default is NoopEmbedder(strict=True), embedder.py:48).

Where.

  • nautilus/synthesis/base.py (Protocol), new nautilus/synthesis/ranking.py.
  • Select in Broker.from_config (replaces hardcoded BasicSynthesizer() at broker.py:581); invoked broker.py:1380. Embedder Protocol adapters/embedder.py.

Acceptance criteria.

  • Reranks + trims top-K when an embedding is present; passthrough otherwise.
  • Deterministic; no LLM.

Hash caveat. Reordering rows changes state.data feeding response_hash via compute_response_hash(state.data) (broker.py:1950; list order IS hash-significant). Per-source source_response_hashes (broker.py:1664) are computed over RAW pre-synthesis rows and are unaffected.


Source: arXiv:2606.00610v1 — "MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation". Distilled from arXiv-research/2606.00610v1/analysis.md; file refs verified against current main by the analysis pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority: v2 epic or non-blocking gaparea/coreBroker core, CLIPS routing, session stateenhancementNew feature or requestsize/L<1 week: cross-cutting feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions