Skip to main content

Medical Data Assistant

1 min read·

Medical Data Assistant

Staff engineering internal research

CHALLENGE

Query an EHR dataset by using natural language sentences. The medical data is accessed through the FHIR RESTfull API protocol. The queried protocol represents more than 150 data type endpoints, each having specific sets of supported filtering parameters to refine returned search bundles.

SOLUTION

We leveraged the latest breed of LLM transformers for their capacity to dynamically generate RESTful API query URLs from natural language questions. Combining an agent & tools approach to prompt engineering, enhanced with FHIR domain knowledge context accessed through vector-store embeddings, it was made possible to funnel down precise answers about a medical data set. The usage of tools through a chain-of-thought prompt architecture made it possible to limit and focus the LLM’s attention context on the narrow path where the medical data answers resides.

RESULT

Implemented an extensible RESTfull API querying agent, enabled to provide answers to over a dozen core FHIR classes. The agent is able to effectively refine multi-step queries and return proper answers within a clinician user context.

Ready to build?

Let’s talk. No matter what stage you’re at, we’re happy to discuss your project.
Learn more