Skip to content
Dosely

How the AI works

Model-agnostic, and built around safety

Dosely does not exist without modern language and vision models, and it is not tied to any one lab. Here is the routing, the dosing scrub that enforces safety in code, and the fallback chain, written out plainly.

Why a model at all

Because the input is messy, real-world language

A lookup table can match “Atorvastatin” to a record. It cannot read “atorvastatan” off a crumpled label in bad light, match it to the medication it means, and then explain in plain language what that medication is for and which side effects a person should know about. That is language and vision work.

The harder half is explaining well. Writing one or two sentences that help an older person understand what a medication is for, without condescension and without a dose, in their own register, is a writing problem. That is the part only a language model does reliably across the long tail of real medications.

So the model is the engine, and betting the product on one lab would be a mistake. Everything above this layer asks for a task, not a model. This file decides which model answers. Changing a route is one line; adding a lab is one case in the dispatch function.

The pipeline

What the model is actually asked

01routed to gpt-4.1-mini

Read the medication name off the label

When you snap a label, a vision-capable model reads the primary medication name from the photo. It returns only the name, never a strength, never a dose, never directions. If it cannot find a medication name, it says so. The photo is not stored.

02routed to gpt-4.1-mini

Explain the medication in plain language

The balanced model reads the medication name and produces a plain-language card: what the medication is generally for, the common side effects worth knowing, and a few practical notes. It is given an explicit system instruction that it must never state a dose or an amount, and the output is scrubbed in code before it reaches you.

03routed to gpt-4.1-mini

Suggest reminder slots for the schedule

As part of the explanation step, the model suggests which reminder slots are typical for that kind of medication from a fixed set: morning, midday, evening, bedtime. It cannot return anything outside that vocabulary. The schedule is reminder times, never amounts.

04routed to gpt-4.1-mini

Flag interactions to review with a pharmacist

On Plus and Family, a separate pass reviews your medication list for pairs worth raising with a pharmacist. Each flag names the two medications and gives one plain-language sentence on why it is worth asking about. Only pairs from your actual list are flagged, and any sentence that reads like a dose is removed before you see it.

Routing

The table, generated from the code

This is not a diagram somebody drew. It is rendered from the same routing table the medication engine reads at runtime, so if it is wrong here it is wrong in production.

TaskModelProviderTierUSD per M tokens
Explain a medication in plain languagegpt-4.1-miniopenaibalanced$1.60
Read the medication name off a label photogpt-4.1-miniopenaibalanced$1.60
Flag interactions to review with a pharmacistgpt-4.1-miniopenaibalanced$1.60
Quick routing triagegpt-4.1-nanoopenaifast$0.40

Escalation

Above roughly 20,000 characters, a long medication list or an unusually large label image, the request escalates to the frontier model. More context needs more reasoning capacity and the cost difference is worth it.

Fallback

If the routed model fails or returns nothing, the call walks a chain of candidates from other tiers and other labs before giving up. One provider having a slow afternoon should not cost someone their medication explanation.

Dosing scrub

Every free-text field the model returns is run through a dosing scrub before you see it. Any sentence that reads like a dose or an instruction to change a medication is removed and counted. The model does not get a vote on this step.

The bright line

Safety enforced in code, not trusted to a prompt

What Dosely is

Dosely is information and reminders, not medical advice. It never changes your dose. Confirm anything about your medications with your pharmacist or doctor.

The model is given a system instruction that it must never state a dose, an amount, or an instruction to start, stop or change a medication. That instruction is in the prompt. The dosing scrub is in the code. A false positive drops a sentence, which is safe. A false negative would let a dose through, which is not. The scrub is the medication equivalent of a safety net.

The reminder schedule is constrained to a fixed set of four words: morning, midday, evening, bedtime. The model cannot return a number, a frequency, or an amount in that field. The schedule is reminder times only, never a dose.

Interaction flags are only shown when both medications named are in your actual list. The flag is always framed as a question to bring up with a pharmacist, and the concern text is scrubbed the same way. The count of anything removed is surfaced on the card so you know the guardrail ran.

Emergency guidance

If you have concerning symptoms, a suspected overdose, or a reaction that worries you, get help right away. In the United States call Poison Control at 1-800-222-1222, or call 911, or go to the nearest emergency room.

Candidates

What is wired, and what is one key away

Every model below sits behind the same interface. Adding a lab is one case in one file, which is the point of building it this way.

gpt-4.1

frontier

openai · 1,000,000 token context

  • unusual or hard-to-read labels
  • long medication lists
  • explanations where the name is ambiguous

gpt-4.1-mini

balanced

openai · 1,000,000 token context

  • plain-language explanations of a medication
  • reading a clear medication label
  • flagging interactions to review with a pharmacist

gpt-4.1-nano

fast

openai · 1,000,000 token context

  • quick name cleanup
  • routing triage

claude-sonnet

frontier

anthropic · 200,000 token context

  • careful, gentle plain-language explanations
  • nuanced interaction wording

gemini-flash

fast

google · 1,000,000 token context

  • fast label reading
  • bulk list cleanup

llama-open

open

meta · 128,000 token context

  • self-hosted explanations for privacy-sensitive deployments

Today the OpenAI and Anthropic adapters are written and the OpenAI one is live, including the vision endpoint for label reading. The other providers are declared with their real model names and switch on when their key is present. No model is trained on your medication data, by us or by our providers.