Inside Meta’s Home Grown AI Analytics Agent

Analytics at Meta30 Mar 2026

Problem

Data scientists get similar questions again and again, but Meta's warehouse has millions of tables and serves 70,000+ employees. A generic LLM with SQL access drowns in irrelevant tables and is far more likely to pick the wrong ones. It also lacks domain knowledge: canonical tables, mandatory filters, normal values. A confident wrong number is worse than none, so answers must be checkable.

Example from the article: a prototype asked to diagnose a drop in a health monitoring metric found the right tables, ran diagnostic queries on its own and traced the cause to a recent code change.

Solution in brief

Narrow each user's scope to the tables they already use. Offline LLMs read the user's query history and write table descriptions, usage patterns and example queries, which the agent retrieves as "shared memory". The agent runs a write-execute-inspect loop, shows the SQL behind every number, and loads team knowledge from Cookbooks, Recipes and Ingredients.

Questions this case answers
  • How to make an LLM agent answer routine questions over a very large data catalog when it cannot tell which tables matter to the asker
  • How to encode team-specific analytical procedures, metric semantics and output checks so an agent reuses them in every conversation
  • How to build an agent that answers routine data questions on a warehouse with millions of tables?
  • How to give an LLM analyst the domain knowledge a human analyst accumulates over months?

Tools and methods

  • Personal query-history memory — offline LLM summaries of each analyst's tables, usage and example queries
  • Iterative reasoning loop — write SQL, run it, inspect, fix the query or re-discover tables
  • Recipes — team procedures: reference experts, instructions, validations, tool controls
  • Ingredients — semantic models, docs, text snippets and learned memories that define what the data means
  • Cookbook — the bundle of recipes and ingredients for one team or domain
Continue reading — it's free

Google or a one-time email code. No password.