-
-
A Romanian report: Apertus extracts the medicine, dose, dates, reaction and outcome, and quotes the exact words behind each field.
-
Transparent checks on the Romanian report: missing information and the follow-up questions to ask, each with a rule id.
-
The same flow in English: extracted fields and a priority level set by plain rules, not by the model.
-
Emergency wording written in Romanian is flagged in red as urgent, with the rule id that triggered it.
-
Injection sample: hidden instructions in the text cannot lower the urgency, because urgency comes from rules, not from the model.
-
Review step: the person edits any field, confirms the review and downloads a structured draft. Nothing is sent anywhere.
Inspiration
I worked for about 20 years in community pharmacies in Bucharest. Patients often told us about a reaction to a medicine, but the report that reached the authorities was incomplete: the dose, the dates or the outcome were missing, and the person had to be asked again. Many people also find it easier to describe what happened in their own language, not in English medical terms. I wanted a tool that helps a person write a complete report in Romanian (or another language) while keeping a human in charge of every field.
What it does
SafeSignal turns a free-text description of a suspected side effect into a structured draft report:
- Describe – the person writes what happened in their own words (Romanian, English, German, French or Italian).
- Extract – Apertus pulls out the medicine, dose, dates, reaction and outcome, and quotes the exact words behind each field.
- Check – transparent, deterministic rules flag missing information and urgent wording (for example breathing problems or facial swelling), each with a rule id.
- Review – the person edits any field, confirms the review and downloads the structured draft.
Nothing is sent anywhere – there is no send button, on purpose. Demo only, fictional data, not medical advice.
How we built it
- Model: Apertus via the Public AI gateway (OpenAI-compatible API). Only environment variables change between backends (LLM_BASE_URL, LLM_API_KEY, LLM_NAME).
- Safety by design: the model only extracts. Completeness and urgency come from plain rules, so a prompt injection hidden in the text cannot lower the urgency.
- Multilingual: Romanian UI texts and Romanian rule patterns, reviewed by me as a pharmacy assistant.
- Packaging: Node.js app, Dockerfile and
make run, following the Hack Apertus template; a GitHub Actions workflow builds and starts the container on a clean checkout. - Tests: 22 automated tests and 19 fictional sample reports (8 English, 8 Romanian, 1 each in German, French and Italian).
- I built it with Claude Code as my AI coding assistant; the domain knowledge, the rules review and all decisions are mine.
Challenges we ran into
- On the last day the Public AI gateway returned "429 Too Many Requests" for Apertus 1.5 70B for a long time. The extraction benchmark was measured on swiss-ai/apertus-v1.5-70b, but the demo video was recorded live on swiss-ai/apertus-8b-instruct (Apertus 1.0). Both are labelled clearly in the app, the video and the report – we did not replay cached answers.
- Keeping Romanian urgency rules precise: for example "mouth" should match a swollen mouth, not a dry mouth.
Accomplishments that we're proud of
- A working Romanian-first reporting flow with a person in charge of every field.
- Urgency that cannot be talked down by injected text.
- Honest provenance: the page always shows which model is actually answering.
What we learned
- Open, sovereign models like Apertus make it realistic to handle health-related text in smaller European languages.
- Separating "the model extracts" from "rules decide" makes the system easier to trust and to audit.
What's next for SafeSignal – Multilingual Side-Effect Reporting with Apertus
- Review of the rules by pharmacovigilance professionals and field testing with pharmacy staff.
- More languages and dialects, including Swiss national languages.
- Mapping the draft to the format a regulator expects, still with human review before any submission.
Transparency note: the base SafeSignal app was also prepared for the AMD Developer Hackathon ACT III with a different model (Gemma). This Apertus version is a separate, Romanian-first copy built during Hack Apertus.
Built With
- apertus
- claude-code
- docker
- github-actions
- javascript
- node.js
- public-ai
Log in or sign up for Devpost to join the conversation.