Skip to content

feat(capability): add LLM re-rank to capability matching#21

Merged
liut merged 1 commit into
mainfrom
feat/capability-llm-rerank
May 21, 2026
Merged

feat(capability): add LLM re-rank to capability matching#21
liut merged 1 commit into
mainfrom
feat/capability-llm-rerank

Conversation

@liut
Copy link
Copy Markdown
Owner

@liut liut commented May 21, 2026

Add LLM re-rank pipeline after vector search: wider recall (15 candidates, configurable) followed by dedicated LLM relevance evaluation and filtering. Re-rank runs inside InvokerForMatch, transparent to the main LLM, with graceful degradation on failure and Redis caching for repeated queries.

  • Add RerankEnabled, RerankRecallLimit, RerankCacheTTL and Rerank Provider config
  • Add Temperature and TimeoutSeconds to Provider struct
  • Implement rerankCapabilities with Chat-based LLM judgment
  • Integrate into InvokerForMatch with fallback to original results
  • Add Redis cache layer with xxhash keys and short TTL for empty results
  • Create 14 unit tests covering happy path, errors, edge cases

Add LLM re-rank pipeline after vector search: wider recall (15 candidates,
configurable) followed by dedicated LLM relevance evaluation and filtering.
Re-rank runs inside InvokerForMatch, transparent to the main LLM, with
graceful degradation on failure and Redis caching for repeated queries.

- Add RerankEnabled, RerankRecallLimit, RerankCacheTTL and Rerank Provider config
- Add Temperature and TimeoutSeconds to Provider struct
- Implement rerankCapabilities with Chat-based LLM judgment
- Integrate into InvokerForMatch with fallback to original results
- Add Redis cache layer with xxhash keys and short TTL for empty results
- Create 14 unit tests covering happy path, errors, edge cases
@liut liut merged commit 91ec4ea into main May 21, 2026
2 checks passed
@liut liut deleted the feat/capability-llm-rerank branch May 21, 2026 06:35
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