Spaces:
Sleeping

rohitsar567 commited on
Commit
63290a7
·
1 Parent(s): 7b92d5d

fix(marketplace+voice+routing): KI-136 + KI-141 + KI-142 + KI-143 + KI-144 — full bundle

Browse files

Five distinct fixes shipped together for a single rebuild cycle:

KI-141 — hybrid alias dedup. /api/coverage + /api/policies/all now collapse
curated marketing-rename entries (Activ One, Optima Secure, etc.) under
their PDF-backed parent card, with aliases surfaced as 'Also marketed as:'
on the marketplace cards. Frontend page.tsx + api.ts add aliases[] field
on MarketplacePolicy. Card count went 158 -> ~137.

KI-142 — UIN-primary merge rule. /api/coverage and /api/policies/all now
build uin_to_parent maps from extracted JSONs and merge curated entries
based on UIN equality. Falls back to source_pdf gate when UIN matches
fail. 1 UIN = 1 marketplace card invariant.

KI-136 — named-SKU comparison routing. orchestrator.py
should_route_to_fact_find now accepts query and exempts intent=comparison
when the question mentions >=2 named insurers/SKUs. Empty profile no
longer traps SKU-specific compare questions in fact_find_brain.
Verified: 'Compare HDFC ERGO Optima Secure and Niva Bupa Aspire on
maternity' now routes to nim-chain comparison brain with citations.

KI-143 — bajaj group-health-guard slug correction. PDF labeled 'Gold'
in slug was actually 'Health Guard (Group) - Silver Plan' per the PDF
cover. Renamed PDF, extracted JSON, curated facts, Chroma metadata
(43 chunks), .gitattributes LFS line. The separate
health-guard-gold-individual product is untouched.

KI-144 — reliance-general -> indusind-general migration. The 3
INDUSIND-branded products (HealthGain, Hospi Care, Group Mediclaim) are
issued by IndusInd General Insurance (formerly Reliance General per
IRDAI Reg No. 103). Migrated insurer_slug for these 3, kept
personal-accident under reliance-general. Added insurer_meta entry for
indusind-general. Added legacy_issuer field for retrieval continuity.
164 Chroma chunks migrated.

Dockerfile DATASET_CACHE_BUST bumped to 2026-05-15-ki144-v1 so the next
Space rebuild pulls the freshly-updated Chroma binary.

10 files changed +392 -42
Files changed (10)
.gitattributes+1-1
40-data/policy_facts/bajaj-allianz__group-health-guard-gold__wordings.json → 40-data/policy_facts/bajaj-allianz__group-health-guard-silver__wordings.jsonRenamed+25-25
40-data/policy_facts/reliance-general__group-mediclaim__wordings.json → 40-data/policy_facts/indusind-general__group-mediclaim__wordings.jsonRenamed+5-4
40-data/policy_facts/reliance-general__health-gain__wordings.json → 40-data/policy_facts/indusind-general__health-gain__wordings.jsonRenamed+5-4
40-data/policy_facts/reliance-general__hospi-care__wordings.json → 40-data/policy_facts/indusind-general__hospi-care__wordings.jsonRenamed+5-4
Dockerfile+1-1
backend/main.py+307-2
backend/orchestrator.py+32
frontend/src/app/page.tsx+10-1
frontend/src/lib/api.ts+1