mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-09 05:12:12 +02:00
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. |
||
|---|---|---|
| .. | ||
| test_async_processor.py | ||
| test_async_processor_config.py | ||
| test_audit_publisher.py | ||
| test_cassandra_config.py | ||
| test_document_embeddings_client.py | ||
| test_flow_base_modules.py | ||
| test_flow_parameter_specs.py | ||
| test_flow_processor.py | ||
| test_i18n.py | ||
| test_llm_service_parameters.py | ||
| test_logging.py | ||
| test_metrics.py | ||
| test_optional_request_response_spec.py | ||
| test_prompt_client_streaming.py | ||
| test_publisher_graceful_shutdown.py | ||
| test_qdrant_config.py | ||
| test_subscriber_graceful_shutdown.py | ||
| test_subscriber_readiness.py | ||