Skip to content

Cross-encoder reranking#29

Merged
markgewhite merged 2 commits into
mainfrom
feature/8-cross-encoder-reranking
Apr 11, 2026
Merged

Cross-encoder reranking#29
markgewhite merged 2 commits into
mainfrom
feature/8-cross-encoder-reranking

Conversation

@markgewhite
Copy link
Copy Markdown
Owner

Summary

  • Added Reranker module using sentence-transformers CrossEncoder with configurable model (default: bge-reranker-v2-m3)
  • Integrated reranker into pipeline: hybrid search (30 candidates) → cross-encoder rerank → top 10 → LLM
  • 7 unit tests covering scoring, reordering, top_k, edge cases

Closes #8

Test plan

  • Reranker module loads cross-encoder model
  • rerank() scores query-chunk pairs and returns top_k sorted by relevance
  • Model name configurable via config.yaml
  • Integrated into pipeline between HybridRetriever and Answerer
  • Full pipeline: hybrid (30 candidates) → rerank → top 10 → LLM
  • Tests pass (reordering verified, top_k respected, empty input handled)
  • Full test suite: 77 tests pass

🤖 Generated with Claude Code

markgewhite and others added 2 commits April 11, 2026 22:59
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… and answerer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@markgewhite markgewhite merged commit 2b89c8d into main Apr 11, 2026
1 check passed
@markgewhite markgewhite deleted the feature/8-cross-encoder-reranking branch April 11, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-encoder reranking

1 participant