terrals

04 · RL environments

Let your agent practise on reality.

Episodes built from real, de-identified patient journeys. The agent decides at a point in time; the reward comes from what actually happened next.

04 · RL environments

Train clinical agents against what actually happened.

Outcome-anchored environments: the agent sees a real patient's record cut off at a decision point and proposes a plan. The reward comes from that patient's own later record — no human labelling in the loop.

  1. 01

    State

    De-identified record up to a decision point

  2. 02

    Action

    Investigations, medications, follow-up plan

  3. 03

    Reward

    Scored against the patient's real next months

  • ◆Leakage-checked: the agent cannot see the future
  • ◆Deterministic scoring, no LLM judge
  • ◆Thousands of episodes per specialty
episode viewer · illustrative

How an engagement works.

You tell us

  • Clinical task and decision point
  • Action space (tests, drugs, referrals, follow-up)
  • Reward definition and horizon
  • Specialty and cohort
  • Evaluation splits

You get

  • Environment package with a standard step / reset API
  • Episodes cut at decision points, future hidden
  • Deterministic, outcome-based reward functions
  • Held-out evaluation set
  • Documentation of leakage checks

Process

  1. 1

    Define the task

    Decision point, actions and what a good outcome looks like.

  2. 2

    Build episodes

    Records cut at the decision point, future data held back.

  3. 3

    Verify rewards

    Reward functions checked against real outcomes and for leakage.

  4. 4

    Ship & iterate

    Environment delivered; we extend tasks as your agent improves.

Questions.

Is there a human judge in the loop?+

No. Rewards are computed from the patient's own later record, so scoring is deterministic and repeatable.

How do you stop the agent seeing the future?+

Every episode is cut at the decision point and checked so that no later information leaks into the state.

Can we combine this with RLHF?+

Yes. Outcome rewards and clinician preference data can be supplied for the same tasks.

Request data

What does your model need?

Tell us the modalities, scale and timeline. We'll come back with a sample and a scoped proposal.

Prefer email? hello@terrals.bio

What data do you need?

Explore more