trustgraph/tests/unit/test_storage
Sunny Yang 2bdc930b2a
feat: hybrid retrieval (BM25 + vector RRF fusion) for document-RAG (#875) (#1030)
Adds a sparse keyword retrieval path beside the existing vector path in
document-RAG, fused by weighted Reciprocal Rank Fusion on chunk_id, behind
--retrieval-mode (vector | keyword | hybrid, default vector).

The keyword index is a new pluggable service (KeywordIndexService /
KeywordIndexClientSpec); the first backend is SQLite FTS5, consuming Chunk
messages off the ingestion stream and answering BM25 queries from one
process, since the index is a single local file. Query text is sanitized
into per-term quoted phrases (raw text is not valid FTS5 syntax), which
also makes dotted clause numbers and error codes exact-match without a
trigram index. Indexes are scoped per (workspace, collection) and dropped
on collection deletion.

The keyword-index client spec is only registered when the sparse path is
enabled, so existing flow definitions without keyword-index queues are
untouched; with retrieval_mode=vector the retrieval path is unchanged. In
hybrid mode a keyword-path failure degrades to vector-only.
2026-07-07 12:54:02 +01:00
..
conftest.py Knowledge core processing updated for embeddings interface change (#681) 2026-03-10 13:28:16 +00:00
test_cassandra_config_integration.py Recent fixes -> release/v2.4 (#891) 2026-05-08 19:48:12 +01:00
test_cassandra_storage_logic.py Structure data mvp (#452) 2025-08-07 20:47:20 +01:00
test_doc_embeddings_milvus_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_doc_embeddings_pinecone_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_doc_embeddings_qdrant_storage.py Make all Cassandra and Qdrant I/O async-safe with proper concurrency controls (#916) 2026-05-14 16:00:54 +01:00
test_graph_embeddings_milvus_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_graph_embeddings_pinecone_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_graph_embeddings_qdrant_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_kw_index_fts5_storage.py feat: hybrid retrieval (BM25 + vector RRF fusion) for document-RAG (#875) (#1030) 2026-07-07 12:54:02 +01:00
test_memgraph_workspace_collection_isolation.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_neo4j_workspace_collection_isolation.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_row_embeddings_qdrant_storage.py Make all Cassandra and Qdrant I/O async-safe with proper concurrency controls (#916) 2026-05-14 16:00:54 +01:00
test_rows_cassandra_storage.py Make all Cassandra and Qdrant I/O async-safe with proper concurrency controls (#916) 2026-05-14 16:00:54 +01:00
test_triples_cassandra_storage.py Make all Cassandra and Qdrant I/O async-safe with proper concurrency controls (#916) 2026-05-14 16:00:54 +01:00
test_triples_falkordb_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_triples_memgraph_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_triples_neo4j_storage.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00