← All posts

STAYCHARTED BLOG · MACHINE LEARNING · MEDICAL TEXT

Machine learning for medical text classification: when a general LLM wins, and when training still helps

Machine learning for medical text classification, tested on 2,888 abstracts: a general LLM scored 65.7%, trained models 63.6% and 60.0%. Why, and when to train.

By Manoj Mohandas ·

The result: a general LLM edged out both trained models

The assistant vs trained model benchmark ran the same held-out test rows through three approaches on three public datasets. Claude received the category names and one-line definitions, with no labeled examples. The trained models learned from about 10,000 labeled rows per dataset.

Dataset and task Test rows Claude Sonnet 5.5 AI Classifier Model Dedicated AI Model
BANKING77, 77 support intents 3,080 84.7% 92.6% 93.7%
LEDGAR, 100 clause types 4,000 76.9% 82.7% 84.9%
Medical Abstracts, 5 condition groups 2,888 65.7% 60.0% 63.6%

On banking and legal text, training won by 9.0 and 8.0 points. On medical abstracts the Dedicated AI Model was 2.1 points behind Claude, or 36.4 errors per 100 rows against Claude's 34.3. The page gives approximate 95% margins of ±1.7 points for Claude and ±1.8 for the Dedicated AI Model, and notes that a paired analysis has not been done, so the gap is small. We still report it as a loss for the trained models, because that is what the numbers show.

Why medical abstract classification favored the general model

The life sciences medical abstract benchmark describes the data in detail: 14,438 published abstracts, five condition groups (Neoplasms, Digestive system diseases, Nervous system diseases, Cardiovascular diseases and General pathological conditions), and a fixed test set of 2,888. Random guessing scores 20%, and always picking the largest group scores 33.3%. Three features of the task explain the result.

Five broad categories that follow general medical knowledge

A trained model earns its keep by learning distinctions that live only in your team's history. These five groups are the opposite. The comparison page puts it this way: they "draw on general medical knowledge." A large language model has read a great deal of medical writing, so a category name such as "Neoplasms" already means something to it. With only five groups, there are few fine boundaries for training data to teach.

Overlapping disease groups

General pathological conditions is the largest group (33.3% of the test set), and the abstract benchmark notes that "many abstracts about a general condition also concern a specific organ system." That overlap is where most errors sit: 821 of the fine-tuned model's 1,051 mistakes (78%) involve this group. The most common single confusion was an abstract labeled general pathological conditions that the model called cardiovascular diseases, 171 times. Claude struggled with the same group, scoring 40.2% on it.

When the labels themselves overlap, more training examples cannot fully separate them, and no approach on the page did well on that group.

Confidence did not let much work go straight through

On a well-separated task, a trained model's confidence lets most rows go straight through. On these five overlapping groups, it did not. For the fine-tuned model, the abstract benchmark shows:

Cutoff Share flagged for review Projected accuracy after review
0.80 55.6% 91.4%
0.90 69.9% 95.7%
0.95 78.7% 97.5%
0.99 90.1% 99.4%

Compare the banking benchmark, "where a 0.90 cutoff flagged 9.2% of messages for a projected 98%". The projections assume a reviewer fixes every flagged error, and human review was not measured. They show that on this task a person would still read most abstracts.

When training still helps in life sciences literature triage

The public test is five fixed groups. Real literature triage work rarely looks like that. A trained medical text classification model is worth comparing when one or more of these is true:

  • Your own categories. Inclusion and exclusion decisions for a review, safety-relevant versus not, your therapeutic area tags or your internal routing rules are conventions your team built. The comparison page says "Categories shaped by your team's conventions are a reason to compare training on your own examples." On BANKING77 (77 intents) and LEDGAR (100 clause types), where categories are many and specific, training won by 8 to 9 points.
  • Volume. The comparison page notes that an AI Classifier Model "runs on CPU without sending a prompt and examples with each prediction." When you sort many thousands of abstracts, that matters. The benchmark did not measure cost per row or end-to-end speed, so we do not quote a figure.
  • Consistency. Claude gave the same category on repeat requests for 97.0% of the first 500 medical rows. A trained model gives the same answer to the same text every time.
  • A confidence you can check. AMT tests every model on held-out rows and shows the share of answers above each cutoff and how many of those are right, so you can see how much review a cutoff will need before you rely on it.
  • Cost of training. The cheaper approach trained quickly: the embedding model behind the 60.0% result took "about 4 minutes" on CPU. The fine-tuned model took "about 8¼ hours on one NVIDIA L4." Pick the model kind to match the gain you measure.

When prompting a general model is enough

The comparison page is direct: "For a one-off sort, or categories that follow general knowledge, it may be enough." That covers a lot of clinical text classification AI work at small scale: a few hundred abstracts sorted into broad disease areas for a one-time landscape review, for example. If your categories look like a textbook's chapter list, try prompting first.

AMT also offers "Your AI Model": your own LLM is given your categories and similar past rows from your data. It is not trained, and it can be a sensible first step while you collect labeled examples. A trained model can be added later and compared on the same held-out rows.

Medical text classification accuracy: how to test it on your own documents

The honest way to choose is to test both on your data. In AMT:

  1. Export abstracts or documents your team has already sorted, with the category each received. The abstract benchmark suggests: "For a first model on overlapping categories, a hundred good examples per group goes most of the way." See how many examples you need.
  2. Write down the tie-break rules. The abstract benchmark advises: "If an abstract can belong to both "general" and a specific system, write down which wins."
  3. Upload to StayCharted AI Model Trainer. AMT runs personal-information checks before training. It detects patterns such as email addresses, phone numbers and US Social Security numbers, and lets you mask them. It does not detect names, street addresses or health details, so remove those yourself if they are in the text.
  4. Train an AI Classifier Model (every plan, Free includes one). On Business, also train a Dedicated AI Model. AMT reports accuracy overall and per category, confusions and the confidence table.
  5. Pick a cutoff. Answers below it go to the Review Queue (Essentials and Business), and reviewers' answers train the next version.
  6. Fill new rows from CSV or Excel files, the Google Sheets add-on, the API, or Snowflake and Databricks tables.

For more on cutoffs, read AI confidence scores and human review and human-in-the-loop machine learning. For other document types, see document classification. Plans are on the pricing page and the feature list is on the product page.

What this does not do

  • It sorts literature and documents into categories. It does not diagnose, recommend treatment or classify patients.
  • The benchmark used published research text with no patient records. Nothing in it is medical advice, and AMT does not give medical advice.
  • Results were single runs on English abstracts and five broad groups, with cutoffs chosen after seeing test results. Your categories may score differently, which is why AMT tests on your own held-out rows.

Common questions

How accurate is machine learning for medical text classification?

On 2,888 test abstracts in five condition groups, the Dedicated AI Model scored 63.6% and the AI Classifier Model 60.0%. A general LLM, Claude Sonnet 5.5, scored 65.7%. Random guessing scores 20%. Full figures are on the medical abstract benchmark.

Is a general LLM better than a trained model for medical abstract classification?

On this public set of five broad groups, slightly, by 2.1 points with overlapping margins. On banking (77 intents) and legal clauses (100 types), the trained Dedicated AI Model won by 9.0 and 8.0 points. Broad, general-knowledge categories favor prompting; many specific in-house categories favor training.

Why do medical abstract categories overlap?

In the benchmark, General pathological conditions often covers abstracts that also concern a specific organ system. 78% of the fine-tuned model's mistakes involved that group, and Claude scored 40.2% on it.

Can clinical text classification AI diagnose patients?

No. These models sort documents into categories. The benchmark used published research abstracts and no patient records, and AMT does not give medical advice.

How many labeled abstracts do I need for life sciences literature triage?

The benchmark suggests about a hundred good examples per group for a first model on overlapping categories. With only 10 per group, the embedding approach reached 49.8%.

Does AMT remove patient details from training text?

It detects eight pattern types, such as email addresses, phone numbers and US Social Security numbers, and lets you mask them. It does not detect names, street addresses or health details, so remove those before uploading.

Sources and further reading

Put it into practice with StayCharted

Start free →

Check plans and allowances · Security and your data