docs(examples): add hybrid BM25 + dense retrieval RAG notebook - #7499
Open
kShaman771 wants to merge 1 commit into
Open
docs(examples): add hybrid BM25 + dense retrieval RAG notebook#7499kShaman771 wants to merge 1 commit into
kShaman771 wants to merge 1 commit into
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of changes
Adds a self-contained Jupyter notebook demonstrating hybrid retrieval for RAG using ChromaDB.
The notebook combines BM25 sparse retrieval with ChromaDB dense semantic retrieval and uses Reciprocal Rank Fusion (RRF) to merge both ranked result sets.
Improvements & Bug fixes
New functionality
examples/advanced/hybrid_retrieval_rag.ipynb.rank_bm25.Test plan
The notebook has been run and verified end-to-end.
The example verifies the complete workflow, including:
The change is isolated to a new example notebook and does not modify the Chroma library, existing tests, or production code.
pytestfor python,yarn testfor js,cargo testfor rustThe repository-wide test suites above are not applicable to this documentation/example-only addition and have therefore not been marked as completed.
Migration Plan
No migrations or forwards/backwards compatibility changes are required.
This PR only adds a new standalone notebook under
examples/advanced/and does not modify existing APIs, schemas, persisted data, configuration, or runtime behavior.Observability plan
No additional instrumentation or monitoring is required.
This change adds an educational example notebook only and does not introduce or modify production runtime behavior, services, telemetry, or operational infrastructure.
Documentation Changes
This PR adds a self-contained Jupyter notebook at:
examples/advanced/hybrid_retrieval_rag.ipynbThe notebook serves as an advanced usage example demonstrating how ChromaDB dense retrieval can be combined with BM25 sparse retrieval using Reciprocal Rank Fusion (RRF).
The notebook includes the required setup, implementation, explanatory context, and example retrieval comparisons so that the hybrid retrieval workflow can be understood and run independently.
No existing user-facing APIs are changed, so no updates to the existing API documentation are required.