← Latest papers
💬 NLP

FMI@SU ToxHabits: Evaluating LLMs Performance on Toxic Habit Extraction in Spanish Clinical Texts

This paper presents a study by the FMI@SU team that evaluated various LLM prompting strategies for extracting and classifying toxic habit mentions (tobacco, alcohol, cannabis, and drugs) in Spanish clinical texts, achieving a test set F1 score of 0.65 with GPT-4.1's few-shot prompting.

Original authors: Sylvia Vassileva, Ivan Koychev, Svetla Boytcheva

Published 2026-04-09
📖 5 min read🧠 Deep dive

Original authors: Sylvia Vassileva, Ivan Koychev, Svetla Boytcheva

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a massive library of medical journals written in Spanish. Inside these books, doctors describe patients' lives, including their struggles with bad habits like smoking, drinking, or using drugs. However, these stories are messy, unstructured, and written in complex medical jargon. It's like trying to find specific needles in a haystack where the needles are made of different materials and the haystack is constantly shifting.

This paper is about a team of researchers (from Sofia University in Bulgaria) who built a "smart robot" to help them find those needles. Their goal was to teach an Artificial Intelligence (AI) to read these Spanish medical stories and automatically highlight exactly where a patient mentions a toxic habit (like "smoking" or "drinking alcohol") and what kind of habit it is.

Here is the story of how they did it, explained simply:

The Challenge: The "Needle in a Haystack"

The researchers faced a huge problem: 80% of medical data is unstructured text. Computers are great at math, but they struggle to understand the nuance of human language, especially when it's mixed with medical terms. They needed to find mentions of four specific "bad habits":

  1. Tobacco
  2. Alcohol
  3. Cannabis
  4. Drugs

The Tool: The "Super-Translator" (LLMs)

Instead of teaching the computer from scratch (which is like teaching a child to read by showing them every single word in the dictionary), the team used Large Language Models (LLMs). Think of an LLM as a super-smart, well-traveled translator who has read almost everything ever written.

They tested different ways to talk to this "translator":

  • Zero-Shot: Just asking the robot, "Find the smoking mentions," with no examples. (Like asking a tourist to find a specific street without a map).
  • Few-Shot: Giving the robot a few examples first. "Here is a sentence with smoking. Here is another. Now, find the smoking in this new sentence." (Like showing a tourist a photo of the street before sending them off).
  • Prompt Optimization: Tweaking the instructions to be as clear as possible.

The Winning Strategy: "Show, Don't Just Tell"

The team discovered that the best approach was Few-Shot Prompting using a specific model called GPT-4.1.

Imagine you are hiring a new intern to sort mail.

  • If you just say, "Sort the smoking letters," they might get confused.
  • But if you show them five examples of smoking letters and say, "See how these look? Now find the rest," they do a much better job.

The team gave the AI five examples of medical text where toxic habits were highlighted. The AI then used those examples as a pattern to scan the rest of the documents.

The Results: A Good Start, But Not Perfect

The robot did a pretty good job! It achieved a score of 0.65 (on a scale where 1.0 is perfect).

  • The Good News: It was very good at finding the general idea of the habit. If the text said "he drank a bottle of rum," the robot found "drank a bottle of rum."
  • The Bad News: The robot sometimes grabbed too much. If the text said "he drank a bottle of rum yesterday," the robot might grab the whole phrase including "yesterday," whereas the doctors only wanted "drank a bottle of rum." It was like a metal detector that beeps for the coin but also beeps for the dirt surrounding it.

They also tried combining the robot with a simple "dictionary" (a list of known bad words). Surprisingly, this didn't help; it actually made the robot more confused, like trying to use a GPS and a paper map at the same time when they disagree.

Why This Matters

This is a big deal because most medical AI tools are trained on English. This team proved that you can use these powerful AI tools to understand Spanish medical texts without needing to build a new model from scratch.

The Future: Polishing the Diamond

The researchers admit their robot isn't perfect yet. It sometimes grabs extra words (like "not" or "yesterday") that change the meaning.

  • Future Plan: They want to add a "cleanup crew" (a post-processing step) to trim the extra words the robot grabs, making the results sharper.
  • Another Idea: Instead of just showing random examples, they want to show the robot examples that are most similar to the current sentence it's reading (like showing a tourist a photo of a street that looks exactly like the one they are currently on).

In a Nutshell

The team built a smart assistant that can read messy Spanish medical notes and highlight drug and alcohol issues. By showing the assistant a few examples of what to look for, they taught it to do a job that usually requires a human expert. While it still grabs a little too much information sometimes, it's a powerful step toward helping doctors and researchers quickly understand patient habits in a language that isn't English.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →