A model that has never seen your business will happily compute a loss ratio. It will divide something by something. Whether it used earned or written premium, joined premium rows to loss rows, counted a peril by one code when the data uses six, or dated claims by report date when the question meant accident year is luck. The fix is not a cleverer prompt. It is giving the system the domain knowledge an experienced analyst brings on day one, and checking that knowledge against your data before anyone relies on it.
InsightCompose does this with a domain pack: an industry's standard vocabulary, value families, KPI templates, date bases and conventions, written once and mapped onto whatever schema you index. This post uses the insurance pack that ships with the platform as the worked example. It follows part one, which covered the discovery agent that reads the result.
What is in a domain pack
A pack is a directory of YAML. The insurance pack has three files: a property and casualty standard, a set of insurance glossaries, and an entity catalogue. The important property of all three is what they leave out: no file names a warehouse column. Each describes the business, and the mapping to your columns is found, with evidence, when your source is indexed.
| Part of the pack | What it says | Insurance example |
|---|---|---|
| Concepts | The parties and objects the business talks about, with the words people use for each field | Insured, broker, underwriter, reinsurer, policy, submission, claim, coverage, treaty |
| Value lists | One word people say that covers several coded values | "Fire" covers fire, burn, smoke, arson, lightning and explosion codes |
| Measures | The money and exposure words | Written, earned and ceded premium; paid and incurred loss; case reserve; TIV; commission |
| KPI templates | Standard ratios with a plausible range and the trap they are computed wrong by | Loss ratio, hit ratio, cession rate, commission ratio, average severity, average premium |
| Date bases | Which date an object is counted by, and the words that switch it | Claims by accident year by default; by report year when the question says "reported" |
| Conventions | Rules true of any warehouse in the industry | Aggregate losses and premium separately, then join; never join premium rows to loss rows |
The insurance glossaries add 72 more glossaries of entity fields and standard lists (classes of business, causes of loss, catastrophe codes, injury types and the like), and the entity catalogue gives hints for detecting the things an insurer slices its book by.
Four passes onto your schema
After a source is indexed, the packs chosen for that source on Prepare → Industry packs, or else the deployment default in the COMPOSE_DOMAIN_PACK setting (insurance by default; a comma list such as retail,finance-hr merges several in order; empty turns the step off), are mapped onto it in four passes. Everything it does on the warehouse is a read.
1. Align concepts and measures to columns
The engine's glossary aligner matches each term to a column by name, meaning and values. A money word must land on a numeric column: "commission" never maps to commission_type. A term the pack marks as enforced is enforced only where the aligner confirmed the column by both name and data; everywhere else it is advice.
2. Sort coded values into families
For each value list, the pack finds the column it is about, then sorts that column's actual values into families. Values the pack already names are matched by spelling. The ones left over are sorted by the model, and only values that exist in the column are accepted. A family is what the data says it is: if your warehouse has a code the model leaves out, it stays out, visibly.
3. Instantiate and probe the KPI templates
This is the part that separates domain intelligence from a list of definitions. Each KPI template is placed on the aligned columns and computed once on your warehouse, at a coarse grain, with one read-only SELECT per side.
The result decides what happens next. A ratio inside the template's range is verified, and the metric is stored as accepted, with its expression, grain, synonyms and the trap it is commonly computed wrong by. A ratio outside the range means the alignment picked the wrong columns, and the metric is not kept at all. A template that is kept without being verified on the warehouse is stored as proposed, for a person to review on the Metrics tab. If your team already accepted a metric under the same name or a synonym, the template is skipped: the business's own definition wins.
Loss ratio shows why the template matters. Its template says the numerator and denominator usually live in different facts, so each side is aggregated to the grain asked for and then the aggregates are joined. Where the schema has year columns on both sides, it is stated per year on the standard basis: losses by accident year against earned premium by accounting year.
4. Rules the profile proves
The last pass writes rules that come from the data's shape rather than from the pack: fact tables that carry duplicate rows for a key (so records are counted as distinct keys), tables that keep more than one row per key, codes that have a lookup table with a readable name, and which date means "when" for each object. Date bases are resolved to the columns this schema has, so a rule reads like "date claims by accident year (this table, this column) unless the question says reported". It also checks, on the data, whether each measure named like a balance (a reserve, an outstanding amount) really behaves like one. If the same entity does not carry the value forward across rows, the column is marked as summing normally, unless a person already set its additivity by hand.
Where it lands
Nothing the pack produces lives in a separate box. Terms go into the platform glossary, where the Glossaries and Terms screens show each one with its column links, and into the engine's term bindings. Metrics go into the same metric list your team curates. The pack's rules and date bases are read into the schema digest beside your own conventions. Additivity is written onto the columns.

That means the discovery agent, the planner that writes each insight's parts and the SQL engine that answers questions all read the same vocabulary. When discovery proposes "which causes of loss are driving severity higher", the plan can filter on the fire family rather than the single code Fire, and compute severity as incurred over distinct claims rather than rows, because that is the trap the template carries.
Your own usage teaches it too
A pack is the industry's knowledge. Your warehouse has its own habits, and those are picked up by a separate scan on the source's Prepare page. It reads the indexed profile and, unless it is switched off, the warehouse's own query history, plus answers people gave a thumbs-up and good queries pasted in by hand. What it finds is stored as suggestions: a convention, a join, a metric, a golden question with its SQL, a column description. Accepting one applies it where that kind of thing lives. A suggestion someone already accepted or rejected is never reopened by a later scan.
Re-running is safe for your own definitions. Mapping the pack again updates what the pack wrote earlier. It does not touch metrics your team defined (proposed from the schema or written by hand), columns whose additivity someone curated, or term bindings the engine learned that a person then confirmed or rejected.
What this changes for discovery
The difference shows up in the proposals. A discovery agent reading raw column names proposes questions about columns. One reading a schema where terms are bound, families are sorted and loss ratio is an accepted, probed metric proposes questions about the business: hit ratio by broker and line, rate adequacy against loss trend, severity by peril family. And when those proposals are planned and run, the same definitions are applied, so the figure in the story is the figure an actuary would compute.
Insurance shipped first and is still the deepest pack. The mechanism is not insurance-specific, and seven more packs now ship beside it: banking, retail, CPG, manufacturing, healthcare, SaaS and a cross-industry finance & HR pack. a pack is concepts, lists, measures, templates, date bases and conventions, and the mapping code works the same way on Databricks, Postgres, Redshift, MySQL or Oracle through each engine's dialect.
Where people stay in charge
The pack proposes and the warehouse confirms; people decide. Only a KPI the warehouse probe verified arrives as accepted, and anything unverified waits as a proposal on the Metrics tab, where a curator accepts, corrects or rejects it. A metric your team already accepted under the same name means the pack's template is skipped, and metrics your team wrote are never overwritten by a re-map. Additivity a person curated stays, and the conventions people write on the Prepare page are read first, ahead of the rules the pack proved.