
Traditional RAG and fine-tuning force models to either memorize facts or re-derive logic from raw text chunks on every query, resulting in high token burn, inconsistent outputs, and untraceable errors.
- Decouple Architecture: Separate declarative organizational facts (stored in a structured file graph using YAML) from imperative logic (composable procedures called recipes).
- Pre-compile Artifacts: Extract constraints and routing logic offline into machine-readable dependencies instead of relying on real-time embedding similarity.
- Knowledge CI/CD: Utilize a multi-agent evaluation pipeline with adversarial reviews, deterministic linters, and regression testing to validate every knowledge update.
This system demands extreme documentation discipline and manual curation; if an organization's internal knowledge base is already disorganized, this strict architecture will fail.
Script
For the last two years, the default move has been to stuff the model with your stuff. Fine-tune on your docs. Dump your wiki into a vector database. Buy a bigger context window and shovel in the handbook. The assumption was always the same. If the model knows your domain, it will reason correctly about your domain.
Meta just published an architecture that treats that assumption as a bug, not a feature. Their system is built for compliance domains. It answers specialist questions that used to eat days of expert time. But the model itself does not store the organization's stance on anything. It does not know the boundary conditions. It does not remember last quarter's interpretation.
Those live in a separate layer. A structured file system the team calls an organizational second brain. The model only executes. This is a fundamentally different way to build an agent. And it suggests we've been solving the wrong problem.
Meta's Architecture
Meta's architecture has four components.
- A knowledge system.
- A reasoning pipeline.
- An evaluation framework.
- And a self-improvement loop.
But the philosophical split is dual. Structured knowledge on one side. Composable reasoning on the other. They are deliberately kept apart.
The knowledge system is not a document store. It is a curated graph of over two hundred files with explicit taxonomy. Each file has YAML frontmatter declaring what it is, when it applies, what it depends on, and what references it. Position files capture how the organization actually interprets a rule. Taxonomy files act as an authoritative glossary so the agent and the human speak the same language. Routing indexes map input characteristics to the right positions without relying on embedding similarity. Gateway files define threshold tests the agent must pass before it enters a specialized domain.
Every dependency is explicit. Change one position file and the system knows exactly what else might break. This knowledge is pre-distilled. Raw documents go through an offline process that extracts how experts reason, not just what documents say. The result is machine-readable interpretation. Constraints. Boundaries. Routing logic. It forms a bidirectional dependency graph the agent can traverse deterministically.
Then there is the reasoning layer. Meta calls them recipes. They are imperative procedures that prescribe how to analyze a scenario. Which knowledge to load at each step. What order to examine it in. When to escalate to a human.
Here is the critical split. Knowledge files are declarative. They state facts and positions. Recipes are imperative. They state methodology. A recipe references knowledge files but contains no domain facts. A knowledge file states a position but prescribes no procedure. That separation means you can fix a flawed analytical method without touching a single fact. You can update an organizational stance without rewriting the workflow.
Failures attribute cleanly. Was the knowledge wrong, or was the procedure wrong? Compare that to fine-tuning, where the distinction is buried in weights you cannot inspect. Or to standard RAG, where the model re-derives the reasoning from raw chunks on every single query. That is slow. It is inconsistent. And it burns tokens. Meta cut context consumption per turn by roughly eighty percent after moving from a flat instruction set to these recipe-driven stages. Each query now touches only a small, targeted subset of knowledge.
An Industry Convergence
The industry is converging on this idea. Andrej Karpathy's LLM Wiki structures agent knowledge as a navigable graph. Google's Open Knowledge Format pushes for cross-agent interoperability. Meta's contribution is the regression-tested compilation pipeline that keeps the knowledge base correct as it grows.
The Compilation Pipeline
Here is how that pipeline works. When a human expert corrects the agent, that correction does not go into a chat log and die. It enters a four-phase compilation process.
-
First, diagnosis. The system extracts the correction and asks a specific question. Could the agent have reached the right answer from its current source materials? If yes, the recipe is broken. If no, there is a knowledge gap. If the experts themselves disagree, the system flags ambiguity for human discussion instead of forcing a resolution.
-
Second, compilation. Sub-agents propose minimal file edits in parallel. A separate adversarial agent reviews those edits in isolation with no knowledge of the original rationale. Its only job is to find contradictions, broken edge cases, or undermined positions. Because it shares no context with the proposing agents, it cannot inherit their blind spots. A deterministic linter catches structural issues. Dangling references. Dependency cycles. Budget violations.
-
Third, evaluation. Every proposed change goes through targeted replay. The agent runs the original failing scenario without knowing it is being tested. A separate judge evaluates the new output against the expert's correction without knowing what was changed. This blind design prevents confirmation bias. If replay fails, the pipeline retries automatically. Then comes regression testing. The agent runs against a structured benchmark. For domains with multiple defensible answers, an independent judge scores each case.
-
Fourth, landing. If performance regresses anywhere, compilation retries with an updated prompt describing the failure. The output is a pull request with a complete audit trail. A human expert reviews a proven fix rather than debugging a raw failure. Once merged, the original scenario and its correct answer join the permanent regression suite. The fix compounds. Future changes must preserve it.
Meta reports zero regressions across improvement cycles so far. Domain SMEs rated the agent useful almost all the time. Assessments that took days now take minutes. And the automated pipeline produces validated knowledge edits at a rate that previously required full engineering sprints.
The Catch
Now, the check on all of this. This architecture demands a level of documentation discipline that most organizations do not have. You need over two hundred curated knowledge files with explicit dependency graphs. You need recipes written as composable procedures. You need a regression suite, an adversarial review agent, and a linter that enforces your file structure. If your company's internal wiki is already a ghost town, this system will starve. The model is only as good as the institutional text you feed it. Garbage in, garbage out, but now with YAML frontmatter.
Also, these results come from a six-week sprint in a compliance domain. That is a well-bounded, text-heavy environment where reasoning is procedural and answers are often verifiable. Zero regressions is encouraging, but it is not longitudinal data. The real test is what happens when the knowledge base scales to thousands of files, or when the domain is fuzzier than compliance.
The Actual Lesson
So what is the actual lesson? It is not that RAG is dead. It is that retrieval was the wrong stopping point. Retrieving chunks and asking the model to figure it out on every run is inefficient and error-prone.
Meta's move is to pre-compile institutional knowledge into structured, deterministic artifacts that humans can audit in seconds. The foundation model becomes an engine. It executes recipes. It reads positions. It routes. It does not memorize. That memory lives in text files that are diffable, reversible, and version-controlled. Every improvement is a text edit a domain expert can review in thirty seconds.
If you lead a team where experts spend half their week answering the same questions, and those answers evolve slowly enough to write down but often enough to track, this pattern is worth studying. Compliance, security review, procurement, financial risk. Any domain where inconsistency costs money and reasoning follows a procedure.
You do not need Meta's infrastructure to apply the core idea. You need the discipline to treat institutional knowledge as an executable artifact, not a document pile. Separate what your organization knows from how it reasons. Make the knowledge explicit and the procedures composable. Test your updates. Keep humans at the checkpoints. The compilation pipeline can come later. The architecture is demanding. The principle is simple.
Models should think. Organizations should remember.
TAKEYOURPILLS.TECH. Go ship something.
References
- An Organizational Second Brain: Building an AI That Learns From Experts - Engineering at Meta