Spaces:
Sleeping
Sleeping
Commit History
-
fix(api): KI-145 β RENAME-vs-VARIANT smart dedup (final 164 cards)β
Replace strict-UIN merge with field-comparison rule. Same UIN + same decision-critical terms = merge as alias (rename). Same UIN + 2+ diffs = keep as separate marketplace card (true sub-variants). Decision-critical fields compared: copayment_pct, PED waiting, maternity coverage + waiting months, room rent capping, restoration benefit, NCB%, post-hospitalization days. Result: ProHealth Prime + Protect stay separate (PED 24mo vs 48mo, maternity Y vs N, post-hosp 180 vs 90). Activ One + Activ Health Individual merge as alias (only NULL incompleteness differences). Total marketplace = 164 cards. Bumps DATASET_CACHE_BUST so HF Space rebuild pulls fresh state.261abb2 -
fix(marketplace+voice+routing): KI-136 + KI-141 + KI-142 + KI-143 + KI-144 β full bundleβ
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 β¦63290a7 -
fix(deploy): bump DATASET_CACHE_BUST -> ki138-v2 β force rebuild to pull post-KI-138 Chroma + extractedβ
The previous rebuild (24382536) was triggered by KI-140 commit 9c01288 with DATASET_CACHE_BUST=ki137-v1. That rebuild's snapshot_download layer ran in a race against two in-flight HF Dataset pushes: 1. Chroma binary re-upload (capturing KI-138's 27 in-place metadata updates) 2. Extracted JSONs re-upload (with KI-138 canonicalized names + slug renames for the 2 irda->irdai cases) Both pushes completed AFTER the rebuild started. To eliminate any ambiguity about which snapshot the current container holds, bump cache_bust again so the next rebuild is GUARANTEED to pull the now-final dataset state: β’ rag/corpus/ 206 PDFs β’ rag/extracted/ 201 canonicalized JSONs β’ rag/vectors/ 7,317-chunk Chroma (KI-137 ingest + KI-138 metadata)7b92d5d -
fix(rag+voice): KI-137 + KI-138 + KI-139 β ingest 21 curated policies into Chroma, canonicalize 84 policy names, fix voice VAD thresholds
9c01288 -
fix(corpus): KI-126 β drop 2 image-only PDFs + cascade docs across 3 reposβ
The 2 deleted PDFs are scanned-image PDFs that pdfplumber extracts as 0 chars, so they were never queryable through the RAG pipeline. OCR is explicitly out of scope. Removing them brings every surface back into agreement: β’ royal-sundaram/family-plus__brochure.pdf β Family Plus product is still covered via royal-sundaram__family-plus__wordings (text-extractable). β’ aditya-birla/activ-one__brochure.pdf β Activ One coverage is provided via aditya-birla__activ-health-individual__wordings (already in Chroma, 120 chunks). The separate aditya-birla__activ-one KB entry was independent and remains intact. Cascade across all surfaces (per the no-stale-content prime directive): β’ Deleted: 2 PDFs (HF dataset + local symlink target) β’ Deleted: 2 kb/policies/__brochure.md files β’ Deleted: 2 40-data/policy_facts/__brochure.json files β’ Deleted: 2 _hf_dataset_backup/rag/extracted/__brochure.json + 1 _raw.txt β’ kb/INDEX.md: rows removed; "Policies (255)" -> "Policies (2β¦f9adc25
-
fix(deploy): KI-119 β DATASET_CACHE_BUST arg forces HF dataset re-pullβ
Docker layer cache reused the snapshot_download layer across HF Space rebuilds because the command string was unchanged. Symptom: even after uploading a cleaned Chroma to the HF Dataset, the Space served the prior cached layer's stale 7356-chunk DB. Bump DATASET_CACHE_BUST any time the dataset content changes; the value just needs to differ from the previous build's value to invalidate the cache. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>0693bf9 -
fix(docker): KI-051 β update COPY paths after bucket reorg (data β 40-data, docs β 70-docs). Previous attempts hit Edit's read-first rule and didn't actually persist. Live HF Space rebuild was about to fail on COPY data and COPY docs since both source dirs no longer exist at the renamed paths.β
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>2eae364 -
refactor: KI-050 β complete data/ β 40-data/ rename across all Python refsβ
The data/ β 40-data/ git mv landed in the previous commit (c8bf1a1) but the corresponding string-path updates in Python code did not β Python was still resolving _DATA_ROOT, _PROFILES_DIR, PREMIUM_DATA, HEALTH_FILE, etc. to the now-non-existent data/ path. The HF Space rebuild would have shipped a broken backend. This commit sweeps the 23 files that referenced data/ as a string path: β’ `"data/*` β `"40-data/*` β’ `/data/*` β `/40-data/*` β’ `(data/` β `(40-data/` β’ `Path("data" ...)` β `Path("40-data" ...)` β’ `ROOT / "data"` β `ROOT / "40-data"` Touched: backend/{session_state, profile_store, premium_calculator, llm_health, admin, main, scorecard, providers/nvidia_nim_llm}, rag/build_kb, tools/{check_link_rot, info_source_map, refresh_premiums, generate_policy_facts, curate_*, ingest_reviews, ingest_kb_summaries}, backend's per-folder docs, etc. Dockerfile: `COPY data ./data` β `COPY 40-data ./40-data` β container path mirrors host. Verified by: β’ Python smoke: _DATA_ROOβ¦52c6351 -
fix(stt): transcode browser webm/opus β wav before Sarvam (D-024)β
Root cause: Browser MediaRecorder emits audio/webm;codecs=opus by default. Sarvam STT only accepts WAV/MP3/FLAC/OGG/M4A. The /api/transcribe endpoint silently coerced webmβwav in the Content-Type but uploaded the raw webm bytes, so Sarvam returned HTTP 400 Bad Request: STT failed: HTTPStatusError: Client error '400 Bad Request' for url 'https://api.sarvam.ai/speech-to-text' Fix in three layers: 1) sarvam_stt.py β _transcode_to_wav() helper using pydub (ffmpeg-backed) converts any non-native container to 16 kHz mono WAV before upload. Also short-audio guard: <1 KB bytes return empty STTResult instead of 500ing on Sarvam's silence rejection. 2) main.py β extend the format whitelist to include webm/opus/mp4 so the real extension is passed through to the provider (provider then decides to transcode). 3) Dockerfile β add ffmpeg apt package (pydub's runtime dependency). requirements.txt β add pydub==0.25.1. This is the first of three live-product issues surfaced tβ¦a777198 -
Deploy: Stack A (NIM brain + Maverick judge + Sarvam voice). D-019.
Verified signaturee53cea7
-
Stack A: NIM brain + Maverick judge + Sarvam voice/Indic (D-019). Data moved to insurance-bot-data dataset; Space is now code-only.
Verified signaturec32bddc
-
Deploy v1 β single-Docker FastAPI + Next.js + RAG + voice + faithfulness
Verified signature3e6b7ee -
Deploy v1 β single-Docker FastAPI + Next.js + RAG + voice + faithfulness
Verified signature5dbdf6e