---
title: "An Organizational Second Brain: Building an AI That Learns From Experts"
description: "Meta built a domain-expert AI agent for a compliance domain that separates declarative knowledge files (positions, taxonomies, routing indexes, gateway tests with YAML dependency graphs) from imperative composable \"recipes\" that encode expert reasoning workflows."
url: "https://swe.quest/articles/an-organizational-second-brain-building-an-ai-that-learns-from-experts-39ccb4da4e5586dc"
canonical: "https://engineering.fb.com/2026/09/02/ml-applications/organizational-second-brain-ai-learns-from-experts/"
source: "Meta Engineering"
published: "2026-09-02"
difficulty: "medium"
kind: "Case study"
reading_minutes: 13
tags: ["ai-agents","llms","rag","evals","system-design"]
---

# An Organizational Second Brain: Building an AI That Learns From Experts

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2026-09-02, 13 min read, Case study. Original: [https://engineering.fb.com/2026/09/02/ml-applications/organizational-second-brain-ai-learns-from-experts/](https://engineering.fb.com/2026/09/02/ml-applications/organizational-second-brain-ai-learns-from-experts/)

## Summary

Meta built a domain-expert AI agent for a compliance domain that separates declarative knowledge files (positions, taxonomies, routing indexes, gateway tests with YAML dependency graphs) from imperative composable "recipes" that encode expert reasoning workflows. Dense, frequently used knowledge lives in a curated wiki while sparse reference material is served via RAG. Restructuring into recipe-driven stages with progressive disclosure cut tokens per turn by about 80%. A self-improvement loop diagnoses expert corrections as recipe flaws, knowledge gaps or genuine ambiguity, compiles them into minimal edits checked by an adversarial reviewer agent and a deterministic linter, and validates them with replay and regression tests, improving the agent without retraining the model while keeping humans in control through checkpoints and escalations.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- LLM agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- retrieval-augmented generation
- regression testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

Meta, LLM Wiki, Open Knowledge Format, YAML frontmatter, RAG

## Related posts

- [The Thin Orchestrator: How We Made Our AI Agents More Reliable by Giving the Router Less to Do](https://swe.quest/articles/the-thin-orchestrator-how-we-made-our-ai-agents-more-reliable-by-giving-the-5a55e95dc0391c33.md): Meta Engineering · 2026-10-19 · Medium · 7 min read · AI agents, LLMs, System design, Data pipelines
  Meta replaced a single all-knowing AI agent for onboarding data columns across its recommendation pipelines with a deliberately thin, deterministic orchestrator: about 1,300 lines that route 20+ workflows to 14 specialized subagents and do no domain reasoning.
- [How to build evidence-grounded agent memory with OpenWiki and Graphs](https://swe.quest/articles/how-to-build-evidence-grounded-agent-memory-with-openwiki-and-graphs-4ca8c5cc48ba2f30.md): LangChain · 2026-10-28 · Medium · 8 min read · AI agents, RAG & retrieval, Evaluation, LLMs
  A compiled, source-linked wiki (OpenWiki) used as agent memory raised accuracy on cross-document questions from 0.10 to 0.52 versus keyword search alone on a synthetic 111-document insurance corpus scored against a 972-fact ledger, and cut cost per correct answer from about $0.55 to $0.19.
- [ReasoningBank: Enabling agents to learn from experience](https://swe.quest/articles/reasoningbank-enabling-agents-to-learn-from-experience-c24d005f6ce31b05.md): Google Research · 2026-04-21 · Hard · 5 min read · AI agents, LLMs, Evaluation
  ReasoningBank is an agent memory framework that distills generalizable reasoning strategies from both successful and failed trajectories, stored as structured items (title, description, content) in a closed loop of retrieval, LLM-as-a-judge self-assessment, extraction and append-only consolidation.
- [Improving the academic workflow: Introducing two AI agents for better figures and peer review](https://swe.quest/articles/improving-the-academic-workflow-introducing-two-ai-agents-for-better-figures-a376517a1cd034df.md): Google Research · 2026-04-08 · Easy · 6 min read · AI agents, LLMs, Evaluation
  Google Research presents two multi-agent research prototypes for academic workflows.
- [How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines](https://swe.quest/articles/how-meta-used-ai-to-map-tribal-knowledge-in-large-scale-data-pipelines-9638491176a5d710.md): Meta Engineering · 2026-04-06 · Medium · 5 min read · AI for coding, AI agents, Documentation, Developer productivity, Data pipelines
  Meta built a pre-compute engine where 50+ specialized AI agents (explorers, module analysts, writers, critics, fixers, gap-fillers) read every file of a 4,100-file, three-language config-as-code data pipeline and produced 59 concise context files capturing undocumented tribal knowledge.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
