Request a demo
← All articles
Discovery

Domain intelligence, built in: vocabulary, KPIs and conventions

An industry's words, value families, KPI templates and conventions are mapped onto your schema at index time. KPIs the warehouse confirms are accepted.

· 8 min read · For analytics leads, data governance and insurance data teams

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 packWhat it saysInsurance example
ConceptsThe parties and objects the business talks about, with the words people use for each fieldInsured, broker, underwriter, reinsurer, policy, submission, claim, coverage, treaty
Value listsOne word people say that covers several coded values"Fire" covers fire, burn, smoke, arson, lightning and explosion codes
MeasuresThe money and exposure wordsWritten, earned and ceded premium; paid and incurred loss; case reserve; TIV; commission
KPI templatesStandard ratios with a plausible range and the trap they are computed wrong byLoss ratio, hit ratio, cession rate, commission ratio, average severity, average premium
Date basesWhich date an object is counted by, and the words that switch itClaims by accident year by default; by report year when the question says "reported"
ConventionsRules true of any warehouse in the industryAggregate 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.

How a domain pack becomes part of your sourceThe pack names concepts, not columns. Four passes map it onto the indexed schema with evidence, and each result lands where people already curate that kind of thing.Written onceDomain pack16 concepts: insured,broker, policy, claim…5 value lists16 money words6 KPI templates9 conventionsdate bases for 4 objectsno column namesMapped onto this schema1. Alignterms and measures to columns2. Sortcoded values into families3. ProbeKPI templates on the warehouse4. Structurekeys, codes, dates, additivityGlossary termsand engine bindingsMetricsaccepted or proposedConventionsrules and date basesColumn additivityunless a person set it
The pack names concepts, not columns. Four passes map it onto the indexed schema with evidence, and each result lands where people already curate that kind of thing.

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.

How a KPI template earns its placeEach template is computed once on your warehouse. A ratio outside the template's plausible range (a loss ratio of 40, say) means the columns were wrong, and the metric is dropped rather than stored.KPI templateloss ratio, hit ratio…Align both sidesnumerator, denominatorNo columnnot keptProbe onceSELECT sum per sideread-onlyin rangeVerifiedkept as an acceptedmetricout of rangeFailednot kept: the ratio isoutside the template's rangea metric your team already accepted under the same name is left alone; the template is skipped
Each template is computed once on your warehouse. A ratio outside the template's plausible range (a loss ratio of 40, say) means the columns were wrong, and the metric is dropped rather than stored.

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.

Glossary: terms aligned to columnsDemo data
Glossary alignment: each business term matched to the column it means, confirmed by a curator

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.

See your own context layer, on your data

Bring one source and three questions your agents or apps need answered. We will stand up governed contexts over them in your environment and connect an agent to them in a working session.

We reply within one business day. Next comes a 45-minute executive briefing for your CIO or CDO, then, if it fits, a 12-week Innovation POD in your environment.