Architecture Comparison

LATCH vs RAG: two different answers to the same document-intelligence problem.

Both approaches exist because enterprise document sets do not fit cleanly into one context window. RAG solves that by breaking the corpus into chunks, embedding them, retrieving a subset per query, and reinjecting those chunks every time. LATCH solves it by compiling the corpus once into a persistent model-level representation and then querying the compiled memory directly.

That difference changes almost everything downstream: latency, cost model, portability, operational surface area, and the kinds of reasoning errors the system produces under load.

Side-by-Side

The comparison in one table.

The numbers below come from logged runs. At corpus scale (347 SEC filings, 1.65M source tokens, one A100 80GB): ~50s one-time compile, 0.79s time-to-first-token, and zero source tokens reprocessed per query. Full detail, including where LATCH loses, is on the benchmarks page.

Dimension RAG LATCH
Architecture Chunk -> Embed -> Retrieve -> Inject per query Compile once -> Query against persistent memory
Per-query document processing Yes, every query None after compilation
Cross-document reasoning Limited by chunk boundaries Full corpus awareness
Chunking artifacts Yes (hallucination seams at boundaries) None
Time to first token 5.5–8.8s retrieval before generation 0.79s at corpus scale
Persistence Embeddings in vector DB; no model-level state .latch/.latchdoc binary on disk
Portability Requires vector DB + source docs + config Single binary file, reload in 2ms
Query-time source processing 2,500–2,900 tokens retrieved + reranked 0 tokens reprocessed
Decode throughput ~44 tok/s (vLLM baseline) ~27 tok/s — RAG wins here
Infrastructure Vector DB + embedding model + orchestrator Single Docker container

Architecture

RAG keeps the original document-processing path alive on every query. The system still has to choose chunks, retrieve them, and inject them back into the prompt path each time. LATCH moves that cost up front into a compilation step, which means the runtime path after compilation is materially simpler and does not revisit the raw corpus for normal querying.

Per-query document processing

With RAG, per-query work never really stops. Every request reopens the retrieval problem, and the cost scales with usage volume. With LATCH, the expensive conversion step is paid once, so repeated query volume improves the unit economics rather than punishing them.

Cross-document reasoning

RAG can work well when the answer sits inside one or two relevant chunks. It becomes less reliable when the answer depends on relationships across sections, files, or documents that are not retrieved together. LATCH is designed around whole-corpus compiled state, so the query path is not bounded by chunk selection in the same way.

Chunking artifacts

Chunk boundaries are not just a storage detail. They introduce seams where evidence can be separated, context can be truncated, and partial retrieval can distort the answer. LATCH removes chunking from the main reasoning path, which is why the product framing is "not RAG" rather than "better retrieval."

Time to first token

At corpus scale — 347 compiled SEC filings on one A100 80GB — LATCH reaches first token in 0.79s because there is nothing to retrieve and no source text to re-read. The conventional RAG stack spends 5.5–8.8s on retrieval and reranking before generation begins. On a single warmed document, LATCH time-to-first-token measures 0.11s.

Persistence

RAG persists embeddings, indexes, and supporting metadata, but not model-level document memory. LATCH persists the compiled state itself as a binary file that can be reopened later. That persistence is the foundation for portability, team sharing, and amortized query economics.

Portability

A RAG deployment is usually tied to a vector store, source-document availability, and orchestration config. LATCH reduces the portable unit to a .latch or .latchdoc file that reloads in 2ms. That is a different operational model because the portable artifact is the intelligence package itself, not just the raw document set plus infrastructure recipes.

Query-time token economics

When a workflow depends on repeatedly reinjecting large context, that cost recurs on every request. RAG retrieved and reranked 2,500–2,900 tokens per query on the benchmarked corpus. LATCH reprocessed zero source tokens — the compiled memory is loaded directly, in 18.5ms for a 19-document selection.

Where RAG wins

Decode throughput currently favors the RAG stack: roughly 44 tok/s served by vLLM against roughly 27 tok/s for LATCH. LATCH reaches first token far sooner, but generates more slowly afterward, so on long answers the total wall time can favor RAG. We publish this because a comparison page that only lists wins is not a comparison.

Infrastructure

RAG often implies a stack: vector database, embedding model, retrieval service, prompt builder, and orchestration logic. LATCH is currently shipped as a single self-hosted Docker runtime with an OpenAI-format compatible API, which simplifies the operator surface even though the underlying compilation mechanism is proprietary.

When RAG still makes sense

RAG is still a reasonable choice when the corpus changes constantly and recompilation cost would dominate the workflow, or when the product requirement is live retrieval from the open web rather than repeated querying over a fixed private corpus.

It is also the more obvious fit when an organization already has a mature retrieval stack and only needs incremental quality gains rather than a new runtime model. If you are evaluating tradeoffs instead of looking for a categorical replacement, the FAQ page is a faster starting point.

Overview and worked scenarios

For evaluators who want this argument on paper, we publish a four-page overview that pairs the measured figures above with three worked scenarios — a small law firm, an enterprise compliance team, and a multi-tenant software platform. Each scenario states every assumption it makes, so the arithmetic can be checked and your own numbers substituted. They are modeled scenarios, not customer case studies.

Next step

If the compiled-memory model is the right fit, the next useful pages are the main site for benchmark framing, the documentation for deployment and API details, and the self-hosted purchase page for the current evaluation license.