Just-in-time structured retrieval is the most appropriate strategy because the application requires current patient records, deterministic filtering, and restricted access to protected health information.
The medication history resides in a continuously updated Delta table. Consequently, the retrieval mechanism should access the authoritative dataset when the clinician submits the request, rather than relying on previously generated embeddings or an independently synchronized index.
Option B equips the agent with a tool that executes a parameterized query against the Delta table, filtering by the specific patient identifier.
This approach supports exact retrieval of prescriptions, refills, and discontinuation records without performing a semantic search across unrelated patients.
Databricks supports parameterized SQL execution, while Unity Catalog provides fine-grained security controls, including row filters and column masks.
Option A introduces an indexing layer that may have synchronization latency. Options C and D depend on precomputed embeddings and cannot inherently guarantee the latest medication state.
The implementation must also validate the clinician ' s authorization independently of the supplied patient identifier and apply appropriate HIPAA controls.
The two-second latency requirement must be validated through performance testing, including query execution, compute availability, and agent processing time. Selecting just-in-time retrieval does not independently guarantee that latency.
Official Databricks reference: Statement Execution API, Row filters and column masks, and HIPAA compliance.
────────────────────────────────────────────────────
Submit