Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greptile Overview
Updated On: 2025-10-11 00:03:03 UTC
Greptile Summary
This PR introduces comprehensive documentation for reranking functionality in HelixDB, a new feature that enhances search result quality through post-processing algorithms. The changes add documentation for two reranking strategies: RerankRRF (Reciprocal Rank Fusion) for combining multiple search results and RerankMMR (Maximal Marginal Relevance) for diversifying results. The documentation follows established patterns in the codebase with detailed examples across multiple SDKs (Python, Rust, Go, TypeScript), mathematical formulas, best practices, and practical use cases. This feature expands HelixDB's capabilities beyond basic vector/keyword search to include sophisticated result ranking and diversification, which is valuable for AI/RAG applications where result quality and diversity are crucial.
Important Files Changed
Changed Files
documentation/hql/rerankers/overview.mdxdocumentation/hql/rerankers/rerank-rrf.mdxdocumentation/hql/rerankers/rerank-mmr.mdxdocumentation/hql/rerankers/overview copy.mdxdocs.jsonPotential Issues:
overview copy.mdxis a duplicate that should be removed before mergingdocs.jsonnavigation only includes the overview page but not the specific rerank-rrf.mdx and rerank-mmr.mdx pages, making them inaccessible through navigationkas both integer and float in examples, which could cause confusion about the expected typeConfidence Score: 4/5 - Well-structured documentation with comprehensive examples, but contains navigation issues and duplicate files that need attention.
Sequence Diagram
sequenceDiagram participant User participant Client as "HelixDB Client" participant DB as "HelixDB" participant Engine as "Search Engine" participant Reranker as "Rerank Engine" User->>Client: "Execute search query with reranking" Client->>DB: "Send HQL query (SearchV + RerankRRF/MMR)" DB->>Engine: "Perform initial vector search" Engine-->>DB: "Return candidate results (100-200)" DB->>Reranker: "Apply reranking algorithm" Note over Reranker: RRF: Combine rankings using<br/>reciprocal rank fusion<br/>MMR: Diversify using<br/>maximal marginal relevance Reranker-->>DB: "Return reranked results" DB->>DB: "Apply RANGE limit (top 10-20)" DB-->>Client: "Return final ranked results" Client-->>User: "Display reranked search results"