Friends and Family Test data gives GP practices a steady stream of patient comments. Star ratings make the first chart easy. The harder questions sit inside the free text:

Those questions need language understanding, but they do not need a chatbot. They need a small set of bounded judgments that application code can store, aggregate, filter, and audit.

That is the role Jev plays in AI MedReview. Jev is TypeSafe's System One model. You send it a piece of state and one or more typed questions. It returns choices, scores, and probabilities instead of generated prose. The application keeps control of the workflow.

This article walks through the implementation in ai_medreview/data_v4.py and the dashboard in streamlit_app.py. The examples use the same design as the production pipeline, with the larger taxonomies shortened where needed.

CleanShot 2026-10-22 at 09.20.44@2x.png

The shape of the pipeline

AI MedReview separates inference from presentation:

  1. Read new FFT rows from a Google Sheet.
  2. Combine the free_text and do_better fields.
  3. Remove empty and short comments, anonymise the text, and prepare a review identifier.
  4. Send each review to Jev with nine independent questions.
  5. Flatten the typed answers into columns and save them in data_v4.csv.
  6. Let Streamlit filter, chart, and route the stored results.

The Streamlit app does not call Jev during a page view. That decision keeps the dashboard responsive and makes every chart reproducible from the saved CSV. It also lets the data job checkpoint long batches and resume after an interruption.

Why Jev fits FFT analysis

TypeSafe exposes three question primitives:

Primitive Use in AI MedReview Returned value
Choice Sentiment, primary topic, staff group Selected option, option probabilities, confidence
Score Sentiment strength, actionability, urgency Position on an ordered rubric, level probabilities, confidence
Noul Clinical safety, dignity or inclusion, leaving risk Probability that the answer is yes