trustgraph/tests/unit/test_retrieval
cybermaggedon db7fdbc652
feat: direction-aware reranker text in GraphRAG hop-and-filter (#1016)
The reranker document text now reflects the traversal direction,
showing only the new information relative to the frontier entity:
- From S (subject is frontier): text = "{predicate} {object}"
- From O (object is frontier): text = "{subject} {predicate}"
- From P (predicate is frontier): text = "{subject} {object}"

This eliminates duplicate reranker texts when traversing inward
from shared object nodes (e.g. 18 CPUs all producing identical
"hasSubcategory Processors" text when the subject was dropped).

execute_batch_triple_queries now returns (triple, direction)
tuples so hop_and_filter can select the appropriate text format.

Updates tech spec to document the direction-aware approach.
Adds unit tests for direction tracking and reranker text
construction.
2026-07-02 21:14:47 +01:00
..
test_structured_diag feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_document_rag.py feat: add cross-encoder reranking to Document-RAG with two-limit control (#878) (#1011) 2026-07-02 09:50:13 +01:00
test_document_rag_provenance_integration.py Fixed document-rag workspace problem (#866) 2026-05-06 14:55:21 +01:00
test_document_rag_rerank.py feat: add cross-encoder reranking to Document-RAG with two-limit control (#878) (#1011) 2026-07-02 09:50:13 +01:00
test_document_rag_reranker_wiring.py feat: add cross-encoder reranking to Document-RAG with two-limit control (#878) (#1011) 2026-07-02 09:50:13 +01:00
test_document_rag_service.py feat: add cross-encoder reranking to Document-RAG with two-limit control (#878) (#1011) 2026-07-02 09:50:13 +01:00
test_graph_rag.py feat: replace LLM edge scoring with cross-encoder reranker in GraphRAG (#1005) 2026-06-30 14:36:37 +01:00
test_graph_rag_direction_aware_text.py feat: direction-aware reranker text in GraphRAG hop-and-filter (#1016) 2026-07-02 21:14:47 +01:00
test_graph_rag_explain_forwarding.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_graph_rag_provenance_integration.py feat: replace LLM edge scoring with cross-encoder reranker in GraphRAG (#1005) 2026-06-30 14:36:37 +01:00
test_graph_rag_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_nlp_query.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_structured_query.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00