How to Build an AI Data Dictionary for a Messy Spreadsheet
Make this article actionable
Send the article context into Vife Agent and turn it into a plan, checklist, or draft you can keep working on.
A fourteen-tab workbook lands on a Friday with the message "quick question." You drop the file into an AI assistant and ask for net revenue in EMEA last quarter. Four seconds later you get a confident number, neatly formatted, and wrong by about a third.
Nothing is broken. The workbook has a column called Revenue, another called Rev_Adj, a third called Bookings, two currencies mixed into one column, a tab named test_do_not_use, and a header that reads Adj_2. The model did what models do: it picked the most plausible reading of an ambiguous file and answered from that.
The fix is a one-page document that travels with the data — an AI data dictionary. It takes about an hour, it survives every model upgrade, and it turns "trust me" answers into answers you can check. Here is the workflow, the checklist, and the mistakes that quietly break it.
Why the bottleneck moved from reading to defining
Reading files is no longer the hard part. Google's Gemini 4 Neon, published November 18, 2026, ships with a 1 million-token context window at $3 per million input tokens and $15 per million output tokens, and the announcement says it "reads uploads like spreadsheets, PDFs, and photos more precisely" (blog.google). A fourteen-tab workbook fits easily.
Models also change constantly. LLM Gateway's release timeline, updated November 20, 2026, counted four new models in the previous seven days: Kimi K3.1 Pro Prime on November 20, Gemini 4 Neon on November 18, and GPT-6.2 Astra and Sol on November 17 (llmgateway.io). Whatever a model learns about your business in one conversation is gone when you switch. A dictionary is the part that survives.
Agents now touch data at a scale that makes ambiguity expensive. Microsoft said organizations had registered more than 50 million agents in Agent 365 since its May 2026 launch (Microsoft, November 17, 2026). Large companies answer this at the data layer: Databricks made Unity Catalog Business Semantics generally available on April 2, 2026, with metric views that carry display names, formats and synonyms so dashboards and AI agents resolve one definition of each metric (databricks.com). You do not need a catalog platform to borrow the idea. You need one page per dataset, owned by a person.
That last point is my inference rather than a vendor claim: the value comes from the dictionary being small, explicit and maintained, not from the tool that stores it.
Turn the useful parts into next steps
Vife Agent can convert this guide into a prioritized workflow with tasks, risks, and reusable prompts.
What goes in an AI data dictionary
For every field, eight attributes:
- Field name — exactly as written in the header, including odd capitalisation.
- Definition — one sentence a new hire could apply without asking you.
- Rule or formula — how the value is produced, if it is computed.
- Type and unit — text, number or date; currency, percentage, units or thousands.
- Allowed values — an enumerated list or a range.
- Grain — what one row represents.
- Traps — blanks, duplicates, test rows, sign conventions, restatements.
- Owner — a person, not a team.
Then a short metrics block: five to fifteen definitions with numerator, denominator, filters and exclusions, and the column each metric resolves to. Column definitions describe what is stored; metric definitions describe what is reported. Keeping them in separate sections prevents the most common confusion in the whole document.
Step 1 — Freeze a copy and inventory every field
Never work on the live file. Save workbook_2026-11-20_snapshot.xlsx, then ask for a schema inventory before any analysis:
You are auditing a spreadsheet I will later ask questions about.
Do not compute business metrics yet.
For every sheet, list: sheet name, row count, every column header exactly as written,
inferred data type, three example values, count of blanks, count of distinct values,
and any merged cells or totals rows.
Flag columns whose meaning is unclear instead of guessing.Keep the output; it becomes the skeleton. Two things surface in most workbooks within a minute: totals rows sitting inside the data range, and columns that are 90% blank because they were retired two years ago.
Step 2 — Draft definitions from evidence, not from names
A header is a label, not a definition. Rev_Adj could mean revenue after refunds, after FX, or after a manual adjustment nobody remembers. Give the assistant the header row, twenty sample rows, and any legend or notes tab, then ask for candidates with confidence labels:
For each column, propose a one-sentence definition.
Label each as CONFIRMED (the file states it: a formula, a notes tab, a legend),
INFERRED (deduced from values), or UNKNOWN.
For INFERRED, cite the evidence: which values, which formula, which tab.
Never invent a unit. If currency or timezone is not stated, write UNKNOWN.Then delete every INFERRED definition you cannot confirm in five minutes and replace it with a question to the owner. A dictionary with forty confirmed fields beats one with a hundred and twenty guesses, because the guesses are what the agent will treat as fact.
Step 3 — Collapse synonyms into one canonical name
Most revenue arguments are naming arguments. Pick one canonical term per concept and record the aliases you found:
| Canonical | Aliases seen in the file | Resolution |
|---|---|---|
Net revenue | Revenue, Rev_Adj, Net Rev | Rev_Adj minus refunds; Revenue is gross |
Bookings | New ARR, Contracted | Signed value, not recognised revenue |
This is the small-team version of what Databricks exposes in metric views — display names, formats and synonyms — on one page instead of in a catalog. The alias column is what lets an agent map a question phrased in sales language onto the finance column that answers it.
Step 4 — Record grain, units and time rules
Half of all "the numbers do not match" is a grain mismatch. State, one line each: what a single row represents (one invoice line, one order, one day per SKU); the currency, and whether FX is applied at the transaction date or at period close; whether amounts are in units or thousands; fiscal versus calendar year; the timezone of timestamps; and whether the file includes reversals and credit notes. If a field is a percentage, say of what.
Step 5 — Fill the traps column
This is the column people skip and later regret. Typical entries: blank means "not yet reported", not zero; rows with status = test must be excluded; customer_id repeats when a customer has two ship-to addresses; one month in Q4 2025 was restated; negative values are credits, not errors. An agent that knows the traps can exclude them. An agent that does not will average them in and sound just as confident.
Step 6 — Turn definitions into checks
A definition you cannot test is a hope. Add a validation block the assistant runs against the snapshot before answering anything:
Run these checks and report PASS or FAIL with the actual number:
1. net_revenue has no blanks in closed months.
2. currency is one of USD, EUR, GBP, SGD.
3. invoice_id is unique; report duplicates.
4. net_revenue >= 0 except rows where type = 'credit'.
5. monthly totals in tab 'Summary' equal the sum of line items within 0.5%.Expect failures on the first run. That is the point: each failure is either a rule to add to the dictionary or a data problem to fix before anyone quotes a number in a meeting.
Step 7 — Store it with the data and load it first
Save it as data_dictionary.md in the same folder as the workbook, with a version line and a date. Start every analysis session by pasting the dictionary before the question. Keep it under roughly 800 words: a dictionary that fills the context window leaves no room for the data it describes. When the workbook changes, bump the version. A dictionary that silently describes last quarter's file is worse than none, because it makes stale answers look verified.
Step 8 — Test with ten questions you already know
Write ten questions whose answers you computed by hand or pulled from the system of record: a closed month's total, one customer's revenue, active SKU count, refund total. Ask them without the dictionary, then with it. Score each answer correct, close or wrong, and keep the table. You are not producing a benchmark for publication; you are finding which definitions still fail. My expectation, from how these failures usually cluster, is that most misses come from grain and exclusion rules rather than arithmetic — treat that as a hypothesis to test on your own file, not a measured result.
Checklist before you trust it
- Every field has a definition, or an explicit UNKNOWN plus a named owner.
- One canonical name per concept, with aliases mapped.
- Grain stated for every sheet.
- Currency, units, fiscal calendar and timezone stated.
- Traps listed: blanks, duplicates, test rows, sign conventions, restatements.
- At least five machine-checkable rules, all passing on the snapshot.
- Metrics block has numerator, denominator, filters and exclusions.
- Version and date at the top; an owner is named.
- Under about 800 words.
- Ten-question test run and scored.
Common mistakes
Defining from headers. The header is the least reliable evidence in the file. Formulas and notes tabs are better; the owner is best.
Letting the model fill the gaps. An assistant asked to "infer" a unit will infer one. Mark unknowns as unknown and the answer changes from a guess to a question.
Writing it once. A dictionary without a version line is a rumour. Date it, and update it when the schema moves.
Hiding it in a wiki. If the document is not in the same place as the data, nobody pastes it into the prompt, and the agent never sees it.
Mixing columns and metrics. "Revenue" as a stored field and "net revenue" as a reported metric are different objects. Separate sections stop them from silently merging.
Using the dictionary to excuse bad data. A definition explains a field; it does not fix duplicated invoices. Checks catch what definitions cannot.
The 45-minute version
If an hour is too much, do steps 1, 3, 5 and 7 only: inventory, canonical names, traps, storage. Those four cover the failures that produce the largest errors in practice. Add the checks and the ten-question test once the file starts driving decisions rather than illustrating them.
The model will keep getting better at reading your spreadsheet. It will never know what your finance team means by "net." Write that down once, and every answer after it gets easier to defend.

