Arvind Guruprasad, home

← All work

Research assistant, KI· 2025

AI reads the dosing notes. Code checks every row.

Free-text Swedish dosage instructions, turned into structured records a research group could use. The model reads; code checks every row it returns.

The outcome

Every one of 1,000 prescription records came back: 99.4% as valid, rule-checked output and 1.1% flagged for a person to review. The old process had dropped about 90% of them.

  • 99.4%came back as valid, rule-checked output
  • 1.1%flagged for a person to review
  • 0records lost
  • ~90%lost by the old process
Role
Research Assistant, Applied AI for Medical Data
When
Apr–Oct 2025
With
Zheng Chang's group, psychiatric pharmacoepidemiology · built solo
Proves
Builds whatever it takes

Layers I owned

  1. Discovery
  2. Strategy
  3. Architecture
  4. Build
  5. Rollout

01Why I built it

The group studies how psychiatric medicines are used, and prescriptions are the raw material. Their old pipeline couldn't read free-text dosage instructions, so most of a Swedish prescription dataset never reached the research.

02How I did it

I agreed labelling rules with the researchers, wrote a JSON schema for a structured prescription, and iterated prompts on Gemini 2.5 Pro. Every row the model returned then went through a deterministic layer: clinical logic rules, a duplicate check, a confidence score and review flags.

  1. Free textSwedish dosage
  2. LLM parsingGemini 2.5 Pro
  3. Rules checklogic · duplicates
  4. Structured recordor 1.1% to review
Fig. 1 · The pipeline. The model handles language; anything that must be exact is checked in code.

ObservationThe model was strongest exactly where rules break: reading Swedish phrasing, working out titration schedules and normalising indications to English.

03What got hard

  1. Titration schedules hide arithmetic, like doses that step up week by week.

    So I let the model work the schedule out, then checked the result against clinical logic rules in code.

  2. Some regimens were unusually high.

    So I flagged them for clinical review instead of letting the pipeline decide.

04What I didn't choose

  1. Keep a rules-only parser

    That was the old process, and it lost about 90% of the records.

  2. Trust the model's output

    Integrity and safety stay in code. Every row is checked, and doubtful ones go to a person.

05Shipping it

I set the pipeline up for the group and ran it on their real prescription data. It's a research pipeline, not a production rollout.

What this doesn't prove

  • 99.4% is the share of valid, rule-checked output, not accuracy against a gold standard.
  • A validated research pipeline, not a live clinical system.
  • The data isn't public, so there are no screenshots of real records.
  • Gemini 2.5 Pro
  • JSON Schema
  • Rule-based validation
  • Hash de-duplication
  • Confidence scoring
Next caseCan AI reformat hospital data and keep its meaning?