← Selected work01 / CASE STUDY

In use on a personal PC · remote maintenance

MED-RAG

A local RAG assistant used on the personal computer of a professor treating breast cancer at Korea University Anam Hospital. Installed in October 2025, it is used during clinical work and as needed, with ongoing remote updates.

ROLERAG implementation · installation and remote maintenance · public evaluation and tuning
PERIOD2025.10–
BUILT WITHPython · Ollama · Chroma · Vertex AI / ADK · QLoRA
MED-RAG UI demo with synthetic examples and visible retrieved evidence
Public UI demo · responses are preconfigured synthetic examples.
Gold-source retrieval
23 / 24

39 synthetic documents · 184 chunks

Evidence-aware answer evaluation
20 / 24

Gemini 2.5 Pro judge · Jul 29, 2026

Initial local run
RTX 5090

Initial run record · distinct from the professor’s PC specifications

01 / INSTALLATION & USE

Installation and current use

In October 2025, I installed the system on the personal computer of a professor treating breast cancer at Korea University Anam Hospital. The professor uses it during clinical work and as needed, and I continue to provide remote updates.

The system retrieves cases and guidelines and exposes the sources behind answers. The delivered code and material remain private; published performance metrics come from a separate Vertex port and synthetic-data experiments.

02 / USE & EXPERIMENTS

Personal-PC use and public experiments

Current use and support are reported by the project owner as of Sep 15, 2026. The installation is scoped to the professor’s personal PC, supported through remote updates. Separate public experiments evaluate retrieval, answer quality, and tuning choices.

StageEnvironmentUse, support, or evaluation scope
Installed · Oct 2025Professor’s personal PC · local inferenceUsed during clinical work and as needed · remote updates since installation
Public RAG evaluationVertex AI / ADK · Gemini 2.5 Flash39 synthetic documents · 24 questions · code and evaluation report
Fine-tuning comparisonQwen2.5-7B · QLoRA · RTX 4090154 training examples · 30 validation cases · Base / v1 / v2 comparison

03 / SYSTEM

Architecture

Cases are retrieved first, then supported by guidelines. The system checks clinical similarity beyond age and sex and surfaces uncertainty when evidence is insufficient. The public Vertex port uses a two-stage research-and-review agent.

  1. 01Question

    Case and evidence needs

  2. 02Retrieve

    Chroma · cases / guidelines

  3. 03Research

    Draft with source evidence

  4. 04Review

    Grounding and uncertainty

04 / EVIDENCE

Evaluation

The original judge never saw the retrieved documents. Including them changed the answer pass rate from 24/24 to 20/24 and exposed invented quotations and unsupported claims.

Retrieval and answer quality are measured separately: finding the right document did not guarantee a grounded answer.

20 / 24

Answers passing when the judge sees source documents

Four unsupported claims and invented citations became visible.

Separate synthetic-data experiment · n=24 · evaluation-method comparison
MeasureResultConditions
Gold document retrieved23/24Objective source-filename check
Answer evaluation pass20/24Evidence-aware LLM judge
Groundedness4.42 / 524 synthetic questions
Latency p50 / p9535.98s / 52.99sWhole two-stage agent · n=24
Cost per request$0.006542Generation + estimated embedding · excludes judge

05 / FAILURE ANALYSIS

A retrieved source does not guarantee a grounded answer

In q14, the correct source was retrieved, but the judge failed a quotation absent from the evidence it was given. All four failed cases, q06, q14, q22, and q23, retrieved a gold document. A retrieval-recall gate alone would miss these errors.

Conversely, q08 missed the gold source but passed the judge through appropriate abstention. Retrieval misses, unsupported claims, and appropriate abstention therefore need separate outcomes.

  1. 01Retrieval check

    Compare gold source filenames

  2. 02Evidence to judge

    Include retrieved document text

  3. 03Answer check

    Claims · quotes · abstention

  4. 04Inspect failures

    Read per-case reasons

06 / ITERATION

QLoRA experiments and model selection

QLoRA training on 154 examples reduced fabricated quotes from two to zero, but the Qwen2.5-7B model began refusing answerable questions.

Eight of 37 abstention examples (about 22%) were mislabeled. Repairing them improved v2, but it still trailed the base model. The 22% denominator is the abstention subset, not the full training set.

This comparison supports recommending the base model with a strict prompt and review stage. It is a public-experiment recommendation, not evidence that the hospital delivery changed models.

ModelFabricated quotesGrounding / helpfulness
Base24.80 / 4.63
QLoRA v104.40 / 4.13
QLoRA v204.63 / 4.30
  • The same 30 validation cases were reused for Base, v1, and v2. These are not results on an untouched final test set after iteration.
  • Initial local inference on RTX 5090 and recorded QLoRA training on RTX 4090 are separate experiments.

07 / SERVING LAB

MED-RAG Serving Lab

Public code implements quality gates, pinned model and data versions, streaming latency measurement, and manual rollback procedures. Thirty-one CPU tests and 14 real-loopback rehearsal contracts pass. The evidence explorer shows a good fixture passing and defective candidates and edited summaries blocked before release preparation.

GPU performance and recovery time have not yet been measured. Results will be added after testing in an environment separated from the active RTX 4090 meeting service.

  1. 01Version

    Code · model · data

  2. 02Evaluate

    Citation errors · over-refusal

  3. 03Serve

    Latency · queues · GPU

  4. 04Recover

    Previous artifact

Explore run evidence and implemented modules ↗

ENGINEERING DECISIONS

Engineering decisions

01

Local execution with remote maintenance

The local Gemma 3 27B and Ollama system was installed on the professor’s personal PC, with remote updates after installation. The initial RTX 5090 run is separate from the hardware specification of that PC.

02

Give the judge the evidence

A judge that only sees a question and answer can reward plausibility. Passing the retrieved documents made grounding testable.

03

Choose the stronger baseline

QLoRA reduced fabricated quotes but increased over-refusal. Even after label repair, the base model led on overall judge scores, supporting a base-model-and-strict-prompt recommendation.

SCOPE & LIMITS

Limitations and scope

  • Actual use is scoped to the professor’s personal PC. Usage counts, time savings, and clinical outcomes are not reported; public synthetic scores do not represent those operating outcomes.
  • Evidence sent to the judge is limited to the first 2,200 characters per document. LLM-judge scores do not replace expert review or an independent final test.
  • MED-RAG model-serving throughput and incident recovery remain separate measurement tasks.
NEXT CASEMeeting Assistant ↗

Contact

hyunaeee@gmail.com ↗

South Korea · Korean / English

Portfolio PDF

A casebook with roles, engineering decisions, evidence, and source links.

Choose “Save as PDF” in the print dialog.