# Independent vertical learning data

Health, BMI, and mortgage are **separate stores**. Do not merge `embeddings.json` files unless an application explicitly stacks two verticals.

## Load one vertical

| Vertical | Folder | Use when |
|----------|--------|----------|
| **health** | `data/verticals/health/` | Disease, interview trees, knockouts, products |
| **bmi** | `data/verticals/bmi/` | Height/weight, class bands, legacy max tables |
| **mortgage** | `data/verticals/mortgage/` | Loan process, mortgage field checklist |

Each folder contains:

- `catalog.json` — sources and counts
- `chunks.jsonl` — text only
- `embeddings.json` — text + vectors (`local-hash-v1`)

Registry: `data/verticals/index.json`

## Reuse

```js
// Mortgage question → mortgage store only
const store = JSON.parse(fs.readFileSync("data/verticals/mortgage/embeddings.json"));

// BMI question → bmi store only
const bmi = JSON.parse(fs.readFileSync("data/verticals/bmi/embeddings.json"));

// Health question → health store only
const health = JSON.parse(fs.readFileSync("data/verticals/health/embeddings.json"));
```

A mortgage SI case that also needs build and disease answers should **query three stores separately**, then merge **retrieved hits** in the prompt — not mix the three JSON files into one index.

## Rebuild

```bash
npm run ingest
```
