Resonance Lattice · Docs

Core use cases

A knowledge model is a single .rlat file: the embedded representation of your corpus plus every coordinate needed to find, cite, and verify the source behind a result. One artifact, three layers — the field routes queries, the store serves evidence, your assistant composes the answer. Seven things that artifact lets you do.

00 — Map

Eight use cases, one artifact

The eight use cases below share the same .rlat file and the same architecture. They differ only in which surface of rlat they lean on most.

01 — Trust the answer

Ground an LLM with verified citations

Trust the answer without checking the LLM's work. Every passage rlat returns carries its source file, character offset, content hash, and a live drift status against the file on disk — drift meaning the file changed since the model was built. Your assistant composes its response from passages that have been mechanically verified, not from what the model happens to remember.

What you get

Run

rlat search my-project.rlat "how does the encoder cache work" --verified-only
rlat search my-project.rlat "auth flow" --format context        # markdown for an LLM prompt
rlat deep-search my-project.rlat "explain the auth flow with rationale"  # multi-hop, synthesised answer

Why it matters

Hallucinated citations are the failure mode that consequences hang on — legal briefs, medical advice, regulatory filings, audit reports. rlat makes them structurally detectable: every retrieved passage carries a source path, character offset, and content hash, so the consumer can verify where evidence came from and whether it has drifted. For compliance work, pair --mode constrain with --strict-names so a question about a non-existent product gets a refusal rather than a confident wrong answer.

02 — Stop re-explaining

Bootstrap any assistant in seconds

Stop re-explaining your project on every new chat. rlat generates an extractive primer — a compact summary of the project — and your assistant loads it at session start. Conversations don't begin cold, and the assistant doesn't invent details to fill the gap.

What you get

Run

rlat init-project                                # auto-detect, build, primer
rlat summary my-project.rlat -o .claude/resonance-context.md
rlat summary my-project.rlat \
  --query "encoder caching" --query "drift detection" \
  -o .claude/resonance-context.md

Why it matters

Every cold session is a tax. A primer paid once and refreshed on demand collapses the cost of rebuilding context from per-conversation to per-corpus-change. The assistant arrives knowing what the project is, so the conversation starts where the last useful one left off.

03 — Adaptive skills

Make skills knowledge-aware

An Anthropic skill is a static instruction bundle by default. rlat skill-context makes it adaptive — each invocation injects markdown evidence retrieved against the user's actual question, drawn from a knowledge model the skill author chose.

What you get

Run

# Inside a skill SKILL.md, in a !command block:
rlat skill-context fabric.rlat \
  --query "Fabric workspace authentication and service principal patterns" \
  --query "$USER_QUERY" \
  --top-k 8 --token-budget 2000

Why it matters

A skill about Fabric lakehouses without rlat injects the same instructions whether the question is about workspace setup, ingestion patterns, or Delta merge semantics. With rlat skill-context, each question retrieves different evidence from the same knowledge model. The skill's static instructions frame the workflow; the knowledge model supplies the specifics. Full walkthrough on the skills page.

04 — Durable memory

Give an assistant durable memory

Conversations that accumulate, not conversations that vanish. rlat memory keeps the lessons of past sessions as a small, queryable store — and grows more confident in the lessons that keep paying off.

What you get

Run

rlat memory add "user prefers TypeScript over Python" --polarity prefer
rlat memory recall "what tech stack does the user prefer"
rlat memory list

Why it matters

With capture enabled — one command, rlat memory install-hooks --mine — the file accumulates validated world facts and lessons, and each one's confidence moves with real outcomes. What it does not do is silently delete things: automatic suppression was tested and falsified, and the record is published (R4), so corrections stay explicit — you state the new fact or delete the old one. The full model — what gets captured, the confidence ladder, and how forgetting stays careful — is on the claim system page; the hooks, daemon, and command table are on Memory & sessions.

05 — Local-first

Keep your knowledge portable and local-first

Your knowledge stays yours. A knowledge model is a single .rlat file, your source files stay where they are, and nothing leaves your machine unless you explicitly send it.

What you get

Run

rlat install-encoder                                       # one-time
rlat build ./docs ./src -o my-project.rlat                 # local mode (default)
rlat build ./docs -o handout.rlat --store-mode bundled     # self-contained

Why it matters

The same artifact serves a hobbyist on a laptop, a consultant carrying client knowledge between engagements, a research team archiving a paper corpus, and a regulated-industry team where data egress is policy. The .rlat format is a single-file unit of distribution — versionable, diffable, hand-offable, archivable. Decision guide on the storage modes page.

06 — See inside

Inspect what your knowledge contains

See the structure of what you know — and what you don't. Most retrieval tools are opaque: documents in, results out, no way to understand the model in between. rlat exposes the semantic structure of the corpus as a first-class interface.

What you get

Run

rlat profile my-project.rlat                       # text summary
rlat profile my-project.rlat --format json         # structured
rlat compare a.rlat b.rlat --format json

Why it matters

Inspecting the corpus before trusting it is the discipline that keeps a retrieval system honest. rlat's inspection operations are derived mechanically from the embeddings themselves — cosine similarity, content-hash equality, clustering — not from heuristics or LLM-judged labels.

07 — Improve itself

Let the knowledge model improve itself

The corpus audits its own shape — and can grow from trusted sources. Inspecting (above) shows you the structure; this is the step that acts on it. A knowledge model can flag the questions it can't answer, the documents that contradict each other, and the web-fetched facts that have gone stale — and, with your approval, fill a gap from verified outside sources. Detection is free and needs no API key; nothing changes without your say-so, and your source files are never edited.

The serve surfaces carry what the model has learned, too: rlat search --format context and the agent-session injection serve standing constraints and falsified findings with their measured framings — "Standing constraints for this environment" and "Tried and falsified". One honest boundary: the model never silently suppresses its own claims — automatic suppression was tested and falsified (R4); corrections stay explicit.

What you get

Run

rlat audit my-project.rlat --shape                          # gaps + contradiction candidates
rlat audit my-project.rlat --shape --min-cosine 0.85 --with-text   # live, judge-ready
rlat audit my-project.rlat --external --format json         # web-fetched facts to re-check

Why it matters

A knowledge base decays — questions go unanswered, old pages linger and conflict with new ones, fetched facts age. The self-improvement loop turns that maintenance from a manual chore into something the model surfaces for you. The full tour — the six stages, the safety rules, and the API-key question — is on the Self-improvement page.

08 — Reshape, don't rebuild

Compose without rebuilding

Reshape what you have; don't re-encode raw text every time. rlat composes across knowledge models at query time, so you can change retrieval behaviour without rebuilding.

What you get

Run

from resonance_lattice.store import archive
from resonance_lattice.rql import compose, merge, unique

a = archive.read("docs.rlat")
b = archive.read("src.rlat")

view = compose(docs=a, code=b)             # query both corpora at once, no write
n_unique = merge(a, b, "merged.rlat", dedupe_threshold=0.95)  # writes the artefact, returns unique-passage count
docs_only = unique(a, b, threshold=0.85)   # what's in docs that isn't in src

Why it matters

A corpus is rarely just one source. compose lets you query across knowledge models without maintaining a meta-archive; merge lets you commit to a single one when that is what your workflow needs.

09 — Beyond the source layer

The lensed-knowledge surface

Beyond retrieving raw passages, rlat can earn and store insights — cited summaries built from the corpus — and apply a saved perspective, a lens, when ranking results. rlat search retrieves over both the source layer and the insight layer and labels every hit with the layer it came from. Pass --source-only to restrict a query to raw passages, or --lens <file> to apply a perspective. The full model — insights, lenses, audit, and trace — is on the claim system page.

10 — Scope

What rlat does not do

Honest about scope so you can plan around it:

Where to go next