Reranker vs. keyword-only retrieval

Context

LLMReranker adds a second retrieval stage: it takes the top-K candidates from keyword search and asks Claude Haiku to re-rank them by semantic relevance to the query. The final order reflects meaning, not just term frequency. If the Claude API call fails for any reason, the system returns the original keyword-ranked order unchanged, so enabling the reranker carries no availability risk.

Feature comparison

Capability Keyword-only retrieval LLMReranker
Ranking signal Term overlap (BM25-style) Semantic relevance judged by Claude Haiku
Latency Near-zero (local index scan) Adds one Claude API round-trip (default timeout: 60 s)
API dependency None Requires Anthropic API key
Handles vocabulary mismatch No — misses synonyms and paraphrases Yes — Claude understands intent, not just tokens
Domain-specific ranking rules No Yes — system prompt encodes attune-specific path heuristics (e.g. tool-* docs ranked above skill-* for workflow-goal queries)
Candidate pool All index hits candidate_multiplier × k keyword hits (default: 3×), then re-ranked to top k
Failure behavior N/A Falls back to keyword order on any API error
Cost Free One Claude Haiku inference call per query

When to use LLMReranker

Enable LLMReranker when any of the following apply:

When to skip the reranker

Recommendation

Use LLMReranker for any user-facing query path in the attune-ai workflow documentation system. The system prompt is purpose-built for this corpus, and the keyword fallback means there is no downside risk. Keyword-only retrieval is the right default only for offline tooling, latency-sensitive batch jobs, or environments where outbound API calls are restricted.

Source files

Tags: reranker, hybrid-retrieval, precision, claude, haiku