RAG & Semantic Routing, before ANN.

Route and filter context deterministically in a symbolic semantic domain.

Query user request Embed model / provider SEMQ Encode symbolic code Symbolic Router gate / partition Pre-ANN routing & filtering Shortlist reduced candidates Second stage ANN search / rerank within shortlisted set Context pack selected passages Generate LLM response route first, then search

Pre-ANN semantic routing

Lower retrieval noise

Lower IO and compute

Predictable system behavior

Why retrieval pipelines get noisy

Most RAG systems rely on approximate nearest-neighbor search over continuous embeddings. At scale, retrieval becomes noisy: candidate sets are large, routing is probabilistic, and small embedding shifts can change results. This makes context selection harder to control, audit, and stabilize over time.

Symbolic routing as a first-stage gate

SEMQ enables routing and filtering in a symbolic semantic domain before running ANN. Queries and documents are mapped into compact symbolic codes that preserve semantic structure. Routing decisions become cheaper, more stable, and easier to reason about.

Query user request Embed model / provider SEMQ Encode symbolic code Symbolic Router gate / partition Pre-ANN routing & filtering Shortlist reduced candidates Second stage ANN search / rerank within shortlisted set Context pack selected passages Generate LLM response route first, then search

Pre-ANN Semantic Routing

Partition and route queries before vector search.

Lower Retrieval Noise

Smaller candidate sets, cleaner context.

Lower IO and Compute

Less bandwidth, fewer scans, cheaper pipelines.

Predictable Behavior

More stable routing under drift and model changes.

How it fits into a RAG pipeline

embed(query) → semq.encode → route(code) → shortlist
ann_search(shortlist) → rerank → build_context

Evaluation and experiments

Routing effectiveness, candidate reduction, and downstream answer quality are evaluated under controlled conditions.

View benchmarks

“Retrieval systems need routing that remains stable under change.”

— SEMQ

Make retrieval pipelines more predictable.