Port FractRAG multi-scale retrieval as RetrieverPlugin - #1
Merged
Conversation
Adds a cam_rag.retrieval.fractal package (three-level index, derivative signals, retrieve_adaptive) and FractalRetrieverPlugin (name="fractal") that callers register on RAGAppSpec.retriever_plugins. HashEmbedding works without sentence-transformers or GPU.
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.
Summary
retrieve_adaptiveinto CAM-RAG ascam_rag.retrieval.fractal.FractalRetrieverPlugin(name="fractal") that implementsRetrieverPlugin.index/retrieve. It is not enabled in the defaultRAGAppSpec; callers pass it viaretriever_plugins.HashEmbeddingworks without sentence-transformers or GPU. CAM-RAGHashEmbeddingBackendis also accepted.Test plan
RetrievalResultsRetrieverPluginprotocol (isinstance, name, empty query, pipeline RRF when requested)python -m pytest tests/test_fractal_plugin.py tests/test_fractal_chunking.py tests/test_fractal_rrf.py tests/test_fractal_query_classifier.py tests/test_fractal_virtual_paragraphs.py tests/test_fractal_weighted_pooling.py tests/test_fractal_diversity_scoring.py tests/test_fractal_benchmark.py tests/test_fractal_storage.py tests/test_fractal_metadata.py tests/test_retriever_plugin.py tests/test_retrieval_dense.py tests/test_retrieval_sparse.py tests/test_retrieval_fusion.py -q # 173 passedNot ported
legacy/(doctronic / xAI demos) — excluded by requestmedical_corpus.json/medical_queries.json— corpus dumps; corpus-only classifier/chunking cases omittedtest_benchmark_fractal_vs_flat.pyimported legacy engines; rewritten against unifiedFractalRAG+ HashEmbeddingSentenceTransformerEmbeddingload paths — optional, not required for HashEmbedding tests