Skip to content
Reva

How the AI works

Model-agnostic, and honest about it

Reva does not exist without modern language models, and it is not tied to any one lab. Here is the routing, the escalation rule, the fallback chain, and the safety screen that runs in code before any model ever sees what you wrote.

Why a model at all

Because the input is your own words

A rules engine can check a box. It cannot read “rotator cuff repair, cleared four weeks ago, still pretty tender at the top of the range” and decide what gentle movements to offer and at what dose, because that judgement lives in language, not in a conditional.

The second part is harder. Writing two coaching cues for a seated ankle circle that a person three weeks out of knee surgery can follow on a Tuesday morning, when they are tired and a little unsure, is a plain-language writing problem. That is what a language model does, and it is the part Reva is built on.

So the model is the engine. Everything else is what keeps it safe: the code screen that runs first, the schema that shapes the output, and the fallback chain that keeps a session available when one provider has a bad afternoon.

The four ideas

What the model is actually asked to do

01

Understand your plain-language state

Reading 'knee surgery six weeks ago, stiff in the morning but no sharp pain' and knowing what kind of gentle session to build from it is language work. A rules engine can match keywords. It cannot read the sentence the way a person would, weigh the detail against what it knows about post-surgical recovery, and decide the right level. That judgement is what a modern language model does, and it is what makes Reva possible.

02

Tune a safe session to your level

The model is given a system prompt with hard safety rules, in order. Screen first. If the description sounds like it needs a clinician, return no movements. If it is early or uncertain, stay very light. Only then build the session, and always within comfortable pain-free range. The output is JSON, validated against a strict schema before you see it. A session that does not fit the shape is discarded, not shown.

03

Adjust from how the last session felt

This is a separate routed step, because adjusting is a different job from building. The model is given the last session focus, level, and feedback, and asked to progress gently if it felt good, hold or ease if it was sore, and ease clearly with a professional note if it hurt. Adaptive sessions are on Plus and Care, because adapting requires storing session history.

04

The red-flag screen runs in code, not in the model

Before any model call, a deterministic keyword check runs on what you described. Chest pain, trouble breathing, numbness, tingling, calf swelling, a recent fall, dizziness, and several more. This layer is code. It cannot be reasoned around. If it fires, the session stops and you are told to see a professional. The model also screens, as a belt-and-braces check, but the code screen never depends on the model to say stop.

Routing

The table, generated from the code

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

StepModelProviderTierUSD per M tokens
Build the gentle session for todaygpt-4.1-miniopenaibalanced$1.60
Adjust the next session from how the last one feltgpt-4.1-miniopenaibalanced$1.60
Screen the described state for red flagsgpt-4.1-nanoopenaifast$0.40

Escalation

Longer or more involved descriptions escalate from the balanced model to the frontier one, because a description that mentions several things going on at once, or an early post-surgical state, benefits from more careful reading. Descriptions are capped at 1,200 characters in one pass.

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 bad afternoon should not leave a person without their session, and it does not.

Schema validation

The session the model returns is validated against a strict schema before you see it: required fields, string lengths, movement count, care level. A result that does not pass is discarded and reported, not shown. This is the part of the pipeline the model does not get a vote on.

Candidates

What is wired, and what is one key away

Every model below sits behind the same interface. Adding a provider 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

  • complex recoveries with several things going on at once
  • descriptions that mention symptoms worth reading carefully
  • post-surgical states in the first weeks

gpt-4.1-mini

balanced

openai · 1,000,000 token context

  • building the daily gentle session
  • writing clear, plain-language form cues
  • adjusting the next session from how the last one felt

gpt-4.1-nano

fast

openai · 1,000,000 token context

  • red-flag and urgency screening
  • reading how a check-in felt

claude-sonnet

frontier

anthropic · 200,000 token context

  • careful, calm reading of a described state
  • gentle tone

gemini-flash

fast

google · 1,000,000 token context

  • high-volume triage
  • quick check-in reads

llama-open

open

meta · 128,000 token context

  • self-hosted generation for privacy-sensitive deployments

In this deployment the OpenAI and Anthropic adapters are written and the OpenAI one is live. The rest are declared with their real model names and switch on when their key is present. No model is trained on what you describe, by us or by our providers.