Overview
Our client is a US medical provider. Its strategists spent many hours researching approved drug indications across public websites. The client wanted them to find current, reliable information faster and spend more time on analysis. In a three-month proof of concept we built a tool that gathers drug information from public sources and presents it in an organized form.
Solution
We built a generative AI search tool on Azure OpenAI. It connects to the knowledge sources, interprets the user's question, finds the matching drug information and writes the answer in plain language from what it retrieved.
We integrated Azure OpenAI into the solution, built the processing pipeline and used free public resources, MedlinePlus and openFDA, as the data.
The product runs in a secure Azure environment, with user access managed through Keycloak.
Technology Stack
Features
- Extractive search: builds a repository of detailed information about each drug.
- Azure OpenAI integration: the model works over the organized data to find what the question asks for.
- Public medical sources: data comes from MedlinePlus and openFDA.
- Query processing pipeline: takes a user's question and returns a readable answer.
- Clear formatting: results are shown in tables that are easy to scan.
- Relevant results: answers are matched to the intent of the question.
- Public data only: the tool works from public drug information, not from patient records.
- Secure environment: deployment in Azure with managed access.

Outcome
- Strategists find the drug information they need without searching site by site
- Answers are built from MedlinePlus and openFDA data, which the team can check on the source sites
- Results are organized in one format, whatever source they come from
- The team spends more of its time on analysis and less on collecting data
- The proof of concept gives the client a base for a production tool
project timeline
public medical sources searched: MedlinePlus and openFDA
specialists on the team
How We Build Grounded Search Over Medical Sources
In a medical search tool the model should never be the source of facts. Its job is to understand the question, find the right passages in trusted data and write an answer from those passages only. We build such tools as a retrieval pipeline with the model at the end:
- Ingestion. Public and licensed sources, such as drug labels and consumer drug monographs, are loaded on a schedule. Each document keeps its source, version and date.
- Structure first. Fields with a fixed meaning, such as indications, dosage and warnings, are stored as structured records. Free text is split into sections and embedded for semantic search in PostgreSQL with pgvector or a vector database.
- Query understanding. Drug names are normalized to standard identifiers, so brand names, generic names and misspellings reach the same record.
- Answer with citations. The model receives only the retrieved passages and must cite one for every statement. Statements without a citation are removed before the answer is shown.
- Evaluation. A question set reviewed by domain experts runs on every change to prompts, retrieval or model.
Today we orchestrate this with LangGraph, trace every query in LangSmith and expose the sources to agents through MCP where that fits. The whole stack can run inside the client's own cloud tenant.
Why Grounding Matters in Drug Search
Medical questions punish confident mistakes. A general model can describe an indication that is plausible, out of date or wrong for a specific formulation, and a busy reader has no reason to doubt it. The difficult parts are keeping the data current, matching the question to the right product, and showing the reader where each fact comes from.
Retrieval measurably helps. In the DrugRAG study, adding retrieved structured drug information to the prompt increased accuracy on a 141-question pharmacy exam set for every model the authors tested with it, by 7 to 21 percentage points, without changing the models themselves. The largest gains were in smaller open-weight models, which matters when a deployment has to stay inside a private environment.
Retrieval is not a guarantee. We still check that each cited passage supports the sentence it is attached to, keep source dates visible, and send questions with no good match to a person instead of answering them. More on our approach: enterprise knowledge assistants and AI for healthcare.