Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 13 min read Case study mediumAdept

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

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.

Assumes: LLM agentsretrieval-augmented generationregression testing

Related posts

  • The Thin Orchestrator: How We Made Our AI Agents More Reliable by Giving the Router Less to Do

    Meta Engineering mediumAdept

    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. The single agent hallucinated as its context grew, mixing conventions across subsystems, and an alternative single-agent approach succeeded only 10-20% of the time without per-task prompt engineering. The new design uses a fixed 7-step protocol where only delegation involves LLM reasoning, workflow templates that sequence existing agents as state machines, structurally uniform subagents, and knowledge files loaded at runtime. Column config prep dropped from three to four days by hand to under an hour, and about two-thirds of changes land without significant human edits.

  • How to build evidence-grounded agent memory with OpenWiki and Graphs

    LangChain mediumAdept

    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. Citation consistency stayed low, so the team added a lightweight evidence graph that materializes wiki citations and document references as typed edges (cites, supersedes, refers_to) between paragraphs, claims and pages, navigated by locate and expand tools. The graph built in under a second with no model calls and, over the wiki alone, improved accuracy 27%, doubled citation consistency, cut median latency 40% and cost per correct answer 58%. For simple single-passage lookups, search alone was equally accurate and faster, so compiled memory pays off only with repeated cross-source reasoning.

  • ReasoningBank: Enabling agents to learn from experience

    Google Research hardMaster

    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. Memory-aware test-time scaling (MaTTS) feeds parallel (self-contrast across k trajectories) or sequential (iterative refinement) exploration back into memory. With Gemini-2.5-Flash and ReAct, it beat a memory-free baseline by 8.3% on WebArena and 4.6% on SWE-Bench-Verified, saved about 3 steps per task on SWE-Bench, and MaTTS (k=5) added another 3% success on WebArena. Learning from failures yields preventative rules, and memories evolve from simple checklists into compositional strategies over time.

  • Improving the academic workflow: Introducing two AI agents for better figures and peer review

    Google Research easyNovice

    Google Research presents two multi-agent research prototypes for academic workflows. PaperVizAgent (formerly PaperBanana) turns a paper's method section and a figure caption into publication-ready diagrams or Python-plotted charts using retriever, planner, stylist, visualizer and critic agents with an iterative critique loop. Judged by a calibrated LLM against a human baseline of 50, it scored 60.2 overall, beating GPT-Image-1.5, Nano-Banana-Pro and Paper2Any. ScholarPeer produces literature-grounded peer reviews using a sub-domain historian agent with web search, an adversarial baseline scout that looks for missing comparisons, and a multi-aspect Q&A engine that checks claims, and it wins side-by-side comparisons against existing automated reviewers.

  • How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines

    Meta Engineering mediumAdept

    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. Each file follows a "compass, not encyclopedia" format of 25–35 lines (~1,000 tokens): quick commands, key files, non-obvious patterns and cross-references. A cross-repo dependency index and periodic self-refresh jobs keep the context accurate. In preliminary tests on six tasks, agents used about 40% fewer tool calls and tokens, and critic rounds raised quality scores from 3.65 to 4.20. The authors argue that concise, opt-in, quality-gated context helps on proprietary code even though research shows it hurts on well-known open-source repos.

The quest for software engineering knowledge.

Look:
Layout: