LAB 05 / MEDICATION RESOLUTION

Measure first.
Change the architecture.

A frozen benchmark follows one resolution pipeline from plain search to medical-LLM reranking—and records why the first model-assisted version was rejected.

MeasuredReplayLive GPU

Research artifact. Not clinical guidance.

One measured step inside a longer clinical-information flow.

These field notes cover step 3 only. Input realism, confirmation, interaction retrieval, and grounded output belong to the later capstone.

  1. 01
    Input Typed / voice → STT / OCR
  2. 02
    Parse / normalise Preserve and structure the mention
  3. 03
    Resolve medication Field notes V0–V4
    THIS SERIES
  4. 04
    Confirm product Product + ingredients + strength
  5. 05
    Resolve interactions Not yet built
  6. 06
    Ground evidence Not yet built
  7. 07
    Generate cited output Not yet built

A sequence of decisions, not a victory lap.

Frozen benchmark: 100 products / 603 queries. Each result determines the next experiment.

  1. V0
    Typesense baseline Measured
  2. V1
    Deterministic preprocessing Tried, dropped
  3. V2
    MedGemma rerank-all Field note 1
  4. V3
    Selective LLM invocation Next: field note 2
  5. V4
    Query reinterpretation + retrieval Planned
  6. V5
    Fine-tuning, if justified Planned

Adding a medical LLM made medication search worse. Here’s why.

Plain Typesense retrieval scored 506 / 603. Always-on MedGemma reranking scored 495. The useful result is in the 11 fixes and 22 regressions between them.

Where reranking helped—and where it destroyed a correct answer.

The article, row explorer, and recorded output expose the same frozen experiment at different levels. A live GPU run can test whether its selections still agree.

This is not a clinical system or a general verdict on reranking.

The evidence covers one model, prompt, Top-5 policy, 100-product catalogue, and synthetic-noise benchmark. Downstream interaction grounding is not yet built.