Building an AI second brain that compounds expert knowledge.
At Meta, we've engineered an AI agent to serve as a secondary domain expert, effectively capturing how industry specialists truly reason out problems and applying that insight across the entire organization. This innovation allows subject matter experts to focus on novel challenges rather than getting bogged down in repetitive queries.
The Limitations of Basic RAG Agents
A plain document-grounded RAG agent retrieves document snippets during inference and tries to reconstruct reasoning from raw text, each time. This approach is inherently slow and unreliable, prone to inconsistencies. In compliance settings, the true value lies beneath the surface: how experts weigh conflicting factors, discern key signals amidst competing data, and resolve ambiguities. Vector searches can't fetch that kind of nuanced judgment.
An Architecture of Four Interconnected Layers
Our system is powered by four tightly integrated layers:
- Knowledge Layer: A structured file hierarchy, resembling a directory tree, that maintains a separation between what the agent knows and how it reasons, making automated edits manageable since changes map directly to individual files.
- Reasoning Layer: Inspectable, explicit procedures that simulate how domain experts tackle a problem step-by-step, instead of burying them in ambiguous text.
- Evaluation Framework: Regression tests applied to every modification, ensuring that proposed changes to knowledge or reasoning must pass the suite before integration.
- Improvement Loop: Expert feedback is compiled into diffs, run against the evaluation framework, and merged only if metrics hold steady, with no need for model retraining.
Removing any layer impairs the others: the knowledge structure enables automated changes; reasoning steps trace errors; the evaluation framework controls changes; and the improvement loop feeds updates into both knowledge and reasoning.
The Unique Contribution
The real breakthrough isn't in model sophistication, but in how these components interleave:
- A structured, audit-ready setup that distinguishes knowledge from reasoning, allowing auditors to review what the agent believes and why, without parsing prompts.
- A self-improvement loop translating occasional feedback into regression-tested updates, negating the need for retraining, and ensuring expert effort accumulates instead of fading.
This pattern applies to any field governed more by accessible text than model weights, such as finance, security, engineering, and legal review.
Real-World Value in Manual Compliance
In Meta's compliance space, manual reviews of hundreds of product reviews posed risks: similar questions consumed days of expert time, and inconsistencies threatened organizational integrity. The agent streamlines routine areas, letting reviewers focus their expertise on truly novel and uncertain cases.
Limitations
This method only works when domain knowledge can be effectively represented in text and procedures. It fails when expert judgment relies on hands-on experience, physical intuition, or pattern recognition beyond articulation. We had to repeatedly interview subject matter experts and observe their work to encode reasoning—the system's effectiveness hinges on their ability to articulate their thinking.
If you're managing a wealth of institutional knowledge while senior staff spends half their week on the same set of five questions, this architecture is worth exploring. The evaluation-gated improvement loop, often overlooked, is the element that determines whether the system sharpens over time or gradually degrades as the field evolves.
All Replies (3)
Want a live back-and-forth? Join the global AI chat room — login to talk.
I used this for my dev notes last month and it’s a lifesaver—especially when you need to organize structured reasoning alongside raw data. Like the Meta AI agent, I’ve started creating a dedicated directory for each project’s key workflows, keeping logic separate from documentation so edits feel intentional and scalable. How’s your indexing holding up?
Curious about the setup. Is this using RAG for the knowledge base or just fine-tuning logs? At Meta, we built an AI agent as a secondary domain expert that captures how specialists truly reason and puts that judgment to work across the organization, freeing up subject matter experts from repetitive queries so they can focus on genuinely new challenges. Why a plain RAG agent fell short.

Game changer. Does adding a reasoning trace increase the token cost significantly for each query? Based on our experience, implementing the reasoning layer with explicit procedures that mimic human experts' thought processes requires significant computational resources, as it involves encoding complex decision-making logic into a structured format. For example, our system required developing a four-layer architecture where the reasoning layer explicitly outlines steps to handle ambiguity, a process that significantly increased complexity but improved accuracy.