← All case files
// case file
CASE / 04
RAG Case Notes
DATPYTVECEMB
CASESCHUNKEMBEDRETRIEVELLMNOTEGROUNDED IN CASESCASE 04RETRIEVAL OVER CASE HISTORY
● In productioncase file · 04 / 16
Case
#04
Where
GM OnStar
Categories
AI / LLM · Python · Snowflake
Read
~2 min
/04

RAG Case Analysis & Case-Note Generator on Databricks

DatabricksPythonVector DBEmbeddings
Retrieval-augmented case analysis and note generation over CRM case history and vehicle telemetry, with a validation layer that catches stale, duplicate, or contradictory records before they reach the LLM. Used by 15 analysts; notes go out as generated, saving ~25 minutes each.
+
The Problem

Case analysis and note generation are only as trustworthy as the records they retrieve from. Stale case history, duplicate or contradictory CRM entries, and telemetry that disagrees with what a case note says all silently corrupt LLM output downstream — with no easy way to detect the failure after the fact.

Adoption
Used by15 analysts
BeforeWriting each case note by hand from CRM history and telemetry
NowNotes generated from validated records and sent as generated
How it's built

Built the retrieval layer on Databricks over CRM case history and telemetry data, powering case analysis and a case-note generator. A quality framework runs on the source records before embedding: freshness checks (last-updated thresholds), deduplication (semantic similarity clustering), contradiction detection across records, and provenance tagging. Records that fail are quarantined; the rest enter the vector index with quality metadata attached.

Technical Details
  • Record freshness scoring with configurable thresholds
  • Semantic dedup via embedding similarity clusters
  • Cross-record contradiction detection (case history vs. telemetry)
  • Provenance metadata propagated to retrieval layer
  • Retrieval feeds case analysis and case-note generation
  • Quarantine queue for human review
15
Analysts
~25 min
Saved per note
As-is
Notes sent unedited