> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textql.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Module 7 · Validate Numbers & Make It Yours

> The starter’s golden values are already pinned and verified against the synthetic warehouse (see validation/golden-queries.md, with the exact dim_*/fact_* mapping in validation/… (~20 min)

## 7.1 · Run the golden queries

The starter's golden values are already **pinned and verified** against the synthetic warehouse (see `validation/golden-queries.md`, with the exact `dim_*`/`fact_*` mapping in `validation/schema-mapping.md`). Against **your** warehouse, re-pin them to numbers you trust:

```text Prompt theme={null}
Run the golden queries from validation/golden-queries.md against my warehouse — AUM, net flows, TWR, allocation, concentration, advisor book, fee rate. For each, compare to a reference number I trust and flag any drift. Where we differ, explain whether it's data, definition, or time-window. Also assert the invariants: allocation weights sum to 1.000, and net_flows = gross_inflows + gross_outflows.
```

<Check>
  **You'll see:** accuracy checked, not asserted — and a triage of any mismatch into data vs. definition vs. window. One invariant to expect: **AUM ≠ Σ positions** (governed AUM comes from `account_value`; positions exclude cash / held-away). A gap there is a data-quality signal, not a metric bug — `notes/grain.md`.
</Check>

## 7.2 · Customize a definition

Your firm inevitably defines something differently — an AUM basis, a TWR vs MWR choice, a house concentration threshold. Use the starter's own **scar** as the worked example: the concentration threshold once flagged *every* holding because a bare `DECIMAL` cast is `DECIMAL(10,0)` on Spark, which rounded the `0.10` threshold to `0`. The fix — `CAST($&#123;threshold&#125; AS DECIMAL(18,6))` — is pinned in the golden file so the regression can never come back silently.

<Warning>
  **The field lesson — why golden values exist** — Before the cast fix, `concentration_risk` returned the full **303,448** holdings (every holding "breached"). After fixing the precision to `DECIMAL(18,6)`, it returns **201,120** — the real count over 10%. That delta is exactly why every governed surface gets a pinned golden value: a definition can be *structurally* right and *numerically* wrong, and only a pinned number catches it (`notes/concentration-definition.md` + the `concentration_risk.tql` header + `golden-queries.md`).
</Warning>

```text Prompt theme={null}
Our house concentration limit is [your %], not 10% — and we want issuer scope (all share classes combined), with funds looked-through, not top-level. Update concentration_risk.tql in our repo to take that limit, record the decision and the rejected default in notes/concentration-definition.md, and open a PR. Add a golden-query test pinning the new breach count — and keep the CAST(... AS DECIMAL(18,6)) precision guard so the threshold doesn't round.
```

<Check>
  **You'll see:** the change land as a reviewable PR **in your repo**, the rejected default recorded, and a new pinned golden value — the template stays pristine upstream; your adaptations are yours. *(Other good first customizations: TWR vs MWR as your client-report default, or point-in-time vs average-12m AUM for your KPI.)*
</Check>

## 7.3 · Localize the vocabulary

`ontology/notes/glossary.md` holds the canonical wealth terms — client, household/relationship, account/portfolio, AUM, net flows, return, active return, asset class, concentration, effective fee rate, advisor/PM, security identifier — each with a **sub-vertical variance column** flagging where retail wealth, institutional asset management, and brokerage deployments diverge (households vs. one-entity clients, advisor vs. PM attribution, AUM vs. AUA/AUS…).

```text Prompt theme={null}
Walk the glossary's variance column for our sub-vertical ([retail wealth / institutional asset management / brokerage]). For each term that differs at our firm, propose the override in glossary.md — keep the term → definition → resolves-via pattern — and open it as one PR.
```

<Check>
  **You'll see:** the vocabulary localized in one reviewable pass — so "client," "AUM," and "return" mean *your* firm's thing, everywhere, from now on.
</Check>

<Note>
  **Two habits as you make it yours** — **1 · Write for the search box.** As you extend the kit, keep a short README per folder and repeat the phrases your teams actually use (metric names, synonyms, team names) in the prose — future threads find context by *search*, not browsing.<br /><br />
  **2 · Let usage drive the roadmap.** Stand up a weekly gap-review playbook: mine repeated questions, manual SQL, and mid-thread corrections; have Ana draft small reviewable patches; a named owner approves. The kit is the seed — usage is what grows it. (See [Ontology Operations](/workshops/ontology-operations/overview) Module 4.)
</Note>

### ✅ Checkpoint

* [ ] Golden queries ran; any drift was triaged (data / definition / window)
* [ ] One definition is now yours — PR'd, noted, and pinned with a test
