Skip to content

feat: add ZeroEntropy reranker#193

Open
flamerged wants to merge 1 commit into
danny-avila:mainfrom
flamerged:feature/zeroentropy-reranker
Open

feat: add ZeroEntropy reranker#193
flamerged wants to merge 1 commit into
danny-avila:mainfrom
flamerged:feature/zeroentropy-reranker

Conversation

@flamerged
Copy link
Copy Markdown

@flamerged flamerged commented May 22, 2026

Target: danny-avila/agents:main
Branch: feature/zeroentropy-reranker
Commit: b673d8103cea9b8d0d86ca63964658df3de935e0

Companion PR:

  • Companion LibreChat PR: danny-avila/LibreChat#13263
  • Companion branch: feat/zeroentropy-reranker
  • Companion target: dev
  • Merge/publish order: merge and publish this agents package before merging the LibreChat ZeroEntropy plumbing PR.

Why This Matters

ZeroEntropy documents zerank-2 as its flagship state-of-the-art reranker. Adding it here gives LibreChat's agent search path access to a modern cross-encoder reranker that can improve result ordering after first-pass retrieval, with configurable API URL/model support for teams that want ZeroEntropy Cloud, EU endpoints, or self-hosted/commercial-license deployments.

This is a high-leverage upgrade for web search and RAG-style tool use: better reranking means the model sees more relevant sources earlier, without changing the search provider itself.

References:

Summary

Adds a ZeroEntropy reranker implementation using the rerank API, including:

  • zerank-2-ready request/response mapping
  • ZeroEntropy reranker config fields
  • createSearchTool / createReranker wiring
  • focused coverage for request shape, response mapping, and config passthrough

Tests

  • NODE_OPTIONS='--experimental-vm-modules' npx jest src/tools/search/jina-reranker.test.ts src/tools/search/tavily.test.ts --runInBand: pass, 47 tests
  • npx tsc --noEmit: pass
  • npx eslint src/tools/search/rerankers.ts src/tools/search/types.ts src/tools/search/tool.ts src/tools/search/jina-reranker.test.ts src/tools/search/tavily.test.ts: pass
  • npm run build: pass, existing Rollup empty-chunk warning only
  • git diff --check: pass

Dependency Notes

No separate ZeroEntropy SDK dependency is added; implementation uses existing HTTP client utilities. The companion LibreChat PR requires a published @librechat/agents version that supports rerankerType: "zeroentropy", zeroEntropyApiKey, zeroEntropyApiUrl, and zeroEntropyModel.

Residual Risks

No live ZeroEntropy API validation was run.

@flamerged flamerged marked this pull request as ready for review May 22, 2026 21:19
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.

1 participant