Resonance Lattice · Docs

How a knowledge model improves itself

A knowledge model can audit its own shape — find gaps, contradictions, and stale facts — and, with your approval, grow from trusted outside sources. The detection runs free, on the AI assistant you already have; nothing is changed behind your back.

New to rlat? Start with What is rlat? first. This page is the detailed tour of the self-improvement loop: what each stage does, the commands and skills that drive it, when (if ever) you need an API key, the options you control, and the honest limits.

This loop is the corpus half of self-improvement — keeping what your documents say complete, consistent, and current. The other half is your world: capturing the stable facts, standing constraints, and tried-and-failed findings of your own environment. That half lives on the Claims page.

01 — The loop at a glance

Six stages

The whole thing is one loop. The expensive part — reading the corpus to decide what's wrong with it — is done by cheap maths first, so the AI only ever judges a short list, never the whole corpus.

1 · Detect
Cheap maths (no AI) finds candidate gaps, contradictions, and which external facts to re-check. Stored inside the .rlat.
2 · Judge
An AI rules which candidates are real — free, on the assistant you already use, or metered for automation.
3 · Fetch
For a real gap, pull the missing fact from the web — and require independent sources to agree.
4 · Land
A verified fact enters the model with its source links, born low-trust, never overwriting your files.
5 · Re-check
Re-fetch a web-sourced fact later to catch it going stale against the live world.
6 · Reconcile
Record an authoritative resolution for a confirmed conflict — non-destructively, on your say-so.

The one rule to remember: rlat surfaces; it does not silently edit. Detection and judging show you findings; growing the model (steps 3–6) only happens with your approval, and never touches your original source files.

02 — Detect

The corpus audits its own shape (free, no AI)

Every time you build or refresh a model, rlat computes a small shape report and stores it inside the .rlat. It is pure maths — no AI call, no API key, no network. It holds two things:

Look at the report — and re-compute it live at a chosen sensitivity:

# the stored report: demand gaps + contradiction candidates
rlat audit km.rlat --shape

# recompute candidates live, with the passage text, ready for an AI to judge
# (--min-cosine is the sensitivity dial; lower finds more, looser pairs)
rlat audit km.rlat --shape --min-cosine 0.85 --with-text --format json

# list the external (web-fetched) facts in the model + their source URLs
rlat audit km.rlat --external --format json

Candidates come back demand-ranked — conflicts that sit in the path of real questions are listed first, so you spend attention where it matters. Full flag reference on the CLI page.

03 — Judge

Which candidates are real?

The maths hands over a short list; an AI decides which items are genuine. The same judgement runs two ways, and you choose:

Why two stages instead of just asking the AI everything? Cost. Judging every possible pair in a large corpus would be millions of AI calls; the geometry narrows that to a handful first, so the AI step stays cheap either way.

04 — Fetch & land

Grow from trusted outside facts

When a gap is real and the corpus genuinely lacks the fact, rlat can fetch it from the web and add it — under strict safety rules so an unverified claim can never slip in:

Trust tiers

Every fact in the model carries a trust level that starts from where it came from, not from how confident the AI sounded:

SourceStarting trust
You (you hand-provided it with a source)highest
Verified external (≥2 agreeing web sources)high
Single external (one web source)baseline
Corpus synthesis (distilled from your own docs)baseline

A higher tier is a starting prior, not a permanent verdict — any fact still earns or loses standing as outcomes come in. (The full trust model is on the Claims page.)

05 — Re-check

Keep web-sourced facts current

A fact pulled from the web was true when fetched, but the world moves on — a version, a price, a "current" anything. rlat refresh can't catch this, because refresh only re-reads your local files; a web fact has no local copy to re-read. So the freshness re-check re-fetches the cited URLs and asks whether they still support the fact:

06 — Reconcile

Resolve a confirmed conflict — non-destructively

When you've confirmed two documents genuinely conflict and decided which side is authoritative, rlat records the resolution as a high-trust note that cites both passages. It does not edit your source files — the conflicting passages stay exactly as they are; the model simply ranks the resolution first. This is a deliberate, one-at-a-time step on your decision, never an automatic edit.

07 — The skills

Four skills run the whole loop free

The simplest way to use any of this is the bundled skills. Each runs on the AI assistant you are already using — no API key, no per-use bill — and each surfaces findings for you rather than editing anything. See the Skills page for how skills are wired.

SkillWhat it doesAsk it
rlat-gap-scanFinds the questions your corpus can't actually answer."What is my corpus missing?", "where are the gaps?"
rlat-contradictionsFinds documents that disagree with each other."Are there contradictions in my corpus?", "which docs conflict?"
rlat-refresh-factsRe-checks web-fetched facts against the live world."Are my fetched facts still current?", "did anything go stale?"
rlat-curateHuman-in-the-loop: surfaces findings and lets you approve a fill, hand-provide a source, or skip."Curate my knowledge base", "let me review before adding"
08 — Do I need an API key?

Mostly no

The honest answer, stage by stage:

StageNeeds an API key?
Detect (gaps, contradiction candidates, rlat audit --shape/--external)No — it's maths.
Judge via the skillsNo — the assistant you're already in does it.
Fetch from the web (via the skills)No — the assistant's own web tools.
Land a fact you/the assistant verifiedNo — the free landing path.
Judge or land unattended, in a script (the metered library path)Yes — an Anthropic key.

So you only need a key if you want to run the loop as automation, outside an interactive assistant. When you do, rlat finds the key the usual way — see API keys for the environment variables it reads.

09 — Options you control

Dials and defaults

10 — Honest limits

What it does and doesn't do

Where to go next
Skills
How the four skills are wired into an AI assistant, and the skill-context primitive behind them.
CLI reference
Every flag of rlat audit and the rest of the insight-layer commands.
Claims
The trust model in full — how a fact is earned, scored, retrieved, and forgotten.