Skip to content

Pluggable reranker in the retrieval orchestrator #49

Description

@Teingi

Describe your use case

EN. Retrieval (src/contextseek/retrieval/orchestrator.py +
components.py) does hybrid keyword+vector recall with optional LLM reranking.
Introduce a pluggable reranker interface and add a non-LLM option — a
cross-encoder (e.g. bge-reranker via sentence-transformers) or a hosted rerank
API — selectable by config. This gives users a cheaper/faster alternative to LLM
reranking.

Tasks: define a Reranker protocol; refactor the existing LLM reranker to
implement it; add the new reranker; make the choice configurable in
config/settings.py; benchmark recall/latency in a short note; add tests with a
stub reranker.

Acceptance: reranker is swappable via config; the LLM path is unchanged in
behavior; new path has tests.

ZH. 检索(src/contextseek/retrieval/orchestrator.py + components.py)做的
是关键词+向量混合召回,外加可选的 LLM rerank。请引入一个可插拔的 reranker 接
,并加一个非 LLM 选项——cross-encoder(如经 sentence-transformers 的
bge-reranker)或托管 rerank API——可经配置选择。给用户一个比 LLM rerank 更便宜/更
快的替代。

任务: 定义 Reranker 协议;把现有 LLM reranker 重构为实现该协议;加新
reranker;在 config/settings.py 让选择可配置;用一段简短说明给出召回/延迟对比;用
桩 reranker 写测试。

验收: reranker 可经配置替换;LLM 路径行为不变;新路径有测试。

Describe the solution you'd like

Pluggable reranker in the retrieval orchestrator

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    OSS26OSS 2026 program — open, unclaimed task available to pick upcomp:retrievalContextSeek component: retrievalpriority:mediumNormal priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions