Back to Homepage

Technical Architecture

Hybrid RAG + Graph RAG

Blended vector-symbolic knowledge retrieval and network relationship traversal systems.

User & Researcher Perspective

Hybrid RAG + Graph RAG combines the strengths of deep semantic vector searches and exact word matches to retrieve qualitative research. By traversing a network graph connecting primary sources, extracted codes, nuggets, facts, and tasks, it provides highly cohesive summaries that reconcile divergent research inputs without losing context.

Operational Workflows & Intent

  • Relationship Traversal: Researchers explore qualitative connections (e.g. how a specific task relates to a user complaint and an academic paper recommendation).
  • Lossless Context Retrieval: Prevents semantic drift by combining vector queries with symbolic keyword lookups for specific terms, codes, or participant names.

Engineering & Architecture Perspective

RAG pipelines and vector embedding caches are managed in backend/app/core/embedding_cache.py and traversed via the research validity service in backend/app/services/research_validity_service.py.

Granular Technical Data Flow

  1. Indexing: Primary sources are split into semantic chunks, vectorized using local models, and indexed in LanceDB while simultaneously populated in a BM25 text index.
  2. Retrieval Querying: A user query triggers parallel similarity (vector) and term-frequency (BM25) queries.
  3. Reciprocal Rank Fusion (RRF): The query rankings are blended via Cormack's RRF algorithm to produce a consolidated list of highly relevant chunks.
  4. Graph Traversal: The system expands context by querying LanceDB relational links, retrieving all parent codes, task states, and related evidence nuggets.

Technical Documentation Approach

The RAG system enforces trace integrity: no synthesized assertion is reportable unless its active vector and graph paths can be traced back to accepted primary source spans.

Compliance & Quality Invariants

  • Trace-back Enforcements: Every Graph RAG query must register its context-retrieval graph in the database to support full engineering audits.
  • Strict Isolation: LanceDB partitions must enforce cryptographic scope boundaries to prevent cross-project context leaks.

Scientific Foundations & Bibliography

Our hybrid search system implements validated data retrieval and fusion techniques:

  • Foundational RAG: Lewis et al. (2020) — "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks" NeurIPS 2020.
  • Graph-Augmented Summarization: Edge et al. (2024) — "From Local to Global: A Graph RAG Approach to Query-Focused Summarization" arXiv:2404.16130. Basis for relational network searches.
  • Ranking Fusion (RRF): Cormack et al. (2009) — "Reciprocal rank fusion outperforms condorcet and individual rank learning methods" SIGIR 2009.
  • Symbolic Search Baseline: Robertson & Zaragoza (2009) — "The Probabilistic Relevance Framework: BM25 and Beyond" Foundations and Trends in Information Retrieval 3(4).

Source Code Reference

  • backend/app/core/embedding_cache.py
  • backend/app/services/research_validity_service.py
Hybrid RAG + Graph RAG Diagram