Research Implementation

Retrieval that understands structure.

A hybrid retrieval architecture that combines semantic search, lexical retrieval, score fusion and topology-aware document expansion for enterprise knowledge systems.

4
Retrieval modalities
4
Score normalization methods
RRF
Rank fusion
Multi-Hop
Topological expansion
The Problem

Documents aren't actually flat.

Traditional RAG systems often treat documents as disconnected chunks. This can destroy hierarchy, hyperlinks, references and the contextual relationships between documents.

◈

Vocabulary mismatch

Queries and relevant documents may use different terminology, reducing lexical retrieval effectiveness.

◎

Semantic drift

Pure semantic similarity can retrieve conceptually related content without preserving the document's structural context.

↗

Lost topology

Hyperlinks and document relationships contain useful retrieval signals that chunk-level systems often ignore.

Architecture

Multi-modal retrieval + topology-aware expansion

The system combines multiple independent retrieval signals before deterministically expanding the result set through document topology.

Query
User Query
Retrieval
BM25
Lexical
Dense
Semantic
TF-IDF
Sparse
DFS
Metadata
Fusion
Normalization
Min-Max · L2 · Z-Score
RRF
Reciprocal Rank Fusion
Topology
Multi-Tier Expansion
Follow document links, compare anchor context, rerank candidates and prevent cycles.
Depth Threshold Visited
Retrieval Engine

Multiple signals. One ranking.

The implementation exposes several independent retrieval strategies that can be normalized and fused into a unified ranking.

01

BM25

Lexical relevance using term frequency, inverse document frequency and document length.

02

Dense Search

Semantic similarity using sentence-transformer embeddings and optional HNSW acceleration.

03

TF-IDF

Sparse vector retrieval providing an independent lexical signal.

04

DFS Metadata

Metadata-level retrieval based on document title and structural information.

Topological Expansion

Retrieve the neighborhood, not just the document.

After primary retrieval, the expansion controller follows explicit document relationships. Linked documents are evaluated using the semantic similarity of their anchor context.

1
Seed
Start from the primary ranked documents.
2
Traverse
Follow links up to a configured maximum depth.
3
Rerank
Compare anchor context with candidate documents.
4
Protect
Maintain a visited registry to prevent cycles.
PRIMARY
Document A
LINK
Document B
LINK
Document C
EXPANDED
Document D
EXPANDED
Document E
Evaluation

Reproducible retrieval experiments

The repository includes benchmark modes for synthetic retrieval, BEIR SciFact and HotpotQA.

Benchmark Purpose Command
Toy Validate retrieval pathways and cycle protection --mode toy
BEIR SciFact Dense + lexical retrieval evaluation --mode beir-scifact
HotpotQA Multi-hop link-aware retrieval --mode hotpotqa-small
All Execute the full benchmark suite --mode all
Research Hypotheses

Five claims under evaluation

H1

Hybrid Ranking Improvement

Hybrid sum/max fusion can outperform pure sparse retrieval on NDCG@10.

H2

Recall Recovery

Multi-pass fusion can improve Recall@100.

H3

RRF Fusion

Reciprocal Rank Fusion combines bounded dense scores with unbounded lexical scores.

H4

Link-Aware Expansion

Deterministic link traversal can recover multi-hop supporting context without agentic query decomposition.

H5

Cycle Avoidance

Explicit visited-state tracking prevents duplicate document traversal and parsing loops during topology expansion.

Open Research

Explore the implementation.

Reproduce the experiments, inspect the retrieval algorithms, and evaluate topology-aware retrieval on your own datasets.