Building Evaluation Systems for AI-Powered Healthcare at Scale

sword_health · Healthcare · 2026 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.5 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Healthcare AI, patient-facing LLM systems, and clinical evaluation

Sword Health needed a way to deploy Phoenix, an AI care specialist for physical-therapy and musculoskeletal-care interactions, while keeping the model safe, reliable, useful, clinically bounded, and aligned with clinician workflows. Because Phoenix speaks with patients, responds during sessions, augments clinicians between sessions, and operates in high-stakes healthcare contexts, Sword built a combined offline and online evaluation system rather than relying on informal review or one-time testing.

Constraints:

Architecture

Sword Health built an eval-driven development loop around Phoenix. Offline, the team collects targeted examples, defines binary evaluation criteria, gets clinical-expert or PM annotations, and builds human, code-based, and LLM-as-judge evaluators. LLM-judge prompts are developed with train/development/test splits, human-alignment metrics, mistake analysis, and repeated prompt refinement. Before release, a vibe-check/manual review round catches quality issues not covered by evaluators. Online, the same evaluators and guardrails run in production, A/B tests measure user and acceptance metrics, manual audits inspect production traces, and observability logs inputs, metadata, outputs, retrieved RAG documents, tool invocations, user feedback, and eval results. Production findings feed back into datasets, criteria, and evaluators.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  phoenix-ai-care-specialist[Phoenix AI care specialist] --> patient-session-interface[Patient session interface]
  patient-session-interface --> motion-tracking-data[Motion tracking data]
  motion-tracking-data --> patient-session-interface
  phoenix-ai-care-specialist --> clinician-workflow[Clinician workflow]
  clinician-workflow --> human-annotators[Human annotators]
  phoenix-ai-care-specialist --> offline-evaluation-pipeline[Offline evaluation pipeline]
  offline-evaluation-pipeline --> evaluation-dataset[Evaluation dataset]
  offline-evaluation-pipeline --> evaluation-criteria[Evaluation criteria]
  evaluation-dataset --> evaluation-criteria
  evaluation-dataset --> human-annotators
  evaluation-criteria --> human-annotators
  human-annotators --> human-evaluation-tools[Human evaluation tools]
  human-annotators --> evaluator-suite[Evaluator suite]
  evaluation-criteria --> llm-as-judge-evaluator[LLM-as-judge evaluator]
  evaluation-criteria --> code-based-evaluator[Code-based evaluator]
  evaluator-suite --> human-evaluation-tools
  evaluator-suite --> code-based-evaluator
  evaluator-suite --> llm-as-judge-evaluator
  llm-as-judge-evaluator --> train-dev-test-calibration[Train/dev/test calibration]
  train-dev-test-calibration --> llm-as-judge-evaluator
  offline-evaluation-pipeline --> vibe-check-review[Vibe check review]
  vibe-check-review --> human-evaluation-tools
  phoenix-ai-care-specialist --> production-guardrails[Production guardrails]
  production-guardrails --> ab-test-runner[AB test runner]
  ab-test-runner --> production-observability[Production observability]
  production-observability --> manual-production-audit[Manual production audit]
  production-observability --> production-trace-evaluator[Production trace evaluator]
  manual-production-audit --> evaluation-dataset
  production-trace-evaluator --> evaluator-suite
  production-trace-evaluator --> evaluation-dataset
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Phoenix AI care specialist Patient-facing AI care specialist that interacts during sessions and augments clinicians between sessions. Patient session interface, Clinician workflow, Offline evaluation pipeline, Production guardrails, Production observability
Patient session interface Conversation surface where Phoenix greets patients, answers questions, handles voice comments, and uses motion-tracking feedback. Motion tracking data, Phoenix AI care specialist
Motion tracking data Exercise-session signal used by Phoenix to provide feedback. Patient session interface
Clinician workflow Human care workflow augmented by Phoenix recommendations, disengagement detection, and reach-out prompts. Phoenix AI care specialist, Human annotators
Offline evaluation pipeline Pre-release process that builds datasets, criteria, annotations, evaluators, and vibe-check reviews. Evaluation dataset, Evaluation criteria, Human annotators, Evaluator suite, Vibe check review
Evaluation dataset Collection of real, synthetic, challenging, rare, long-tail, and issue-regression examples with model context and transcripts. Evaluation criteria, Human annotators, Evaluator suite
Evaluation criteria Binary pass/fail or yes/no rubrics defining success for each feature. Human annotators, LLM-as-judge evaluator, Code-based evaluator
Human annotators Clinical experts or product managers who label examples, perform pairwise comparisons, and provide expert judgment. Human evaluation tools, Evaluator suite
Human evaluation tools Annotation tools such as Gondola or Argilla used for pairwise comparison and structured feedback. Human annotators, Vibe check review
Evaluator suite Collection of human, code-based, and LLM-as-judge evaluators used offline and in production. Human evaluation tools, Code-based evaluator, LLM-as-judge evaluator, Production guardrails, Production trace evaluator
Code-based evaluator Deterministic evaluator for objective checks such as character-count limits and latency-style guardrails. Evaluator suite, Production guardrails
LLM-as-judge evaluator Prompted evaluator for subjective or complex checks such as tone and medical-advice detection. Evaluator suite, Train/dev/test calibration
Train/dev/test calibration Process for few-shot examples, prompt iteration, human-alignment measurement, mistake analysis, and final test-set performance. LLM-as-judge evaluator
Vibe check review Manual pre-release inspection to catch full-quality issues not yet represented in automated evaluators. Offline evaluation pipeline, Human evaluation tools
Production guardrails Real-time safety checks that block unwanted content and trigger fallback or retry behavior. Phoenix AI care specialist, AB test runner
AB test runner Production experiment layer for comparing model versions on user feedback, usage, and acceptance metrics. Production observability
Production observability Logging layer that captures inputs, metadata, outputs, RAG documents, tool invocations, user feedback, and evaluations. Manual production audit, Production trace evaluator
Manual production audit Regular human review of production traces to detect failure patterns and root causes. Evaluation dataset
Production trace evaluator Reuse of offline evaluators on production traces or subsamples, with thresholds prompting investigation. Evaluator suite, Evaluation dataset

Data flow

Phoenix conversations produce patient-facing outputs during and between sessions. For offline evaluation, Sword collects real or synthetic examples, adds the same context given to the model plus the Phoenix-patient transcript, defines binary criteria, and gets human annotation from clinical experts or PMs. Evaluators are then built for the criterion: human pairwise comparisons, code-based checks, or LLM-as-judge prompts. LLM judges are calibrated through train/dev/test splits and disagreement analysis. Before release, reviewers perform a manual vibe check. After release, production requests flow through guardrails, A/B tests, production trace logging, manual audits, and production evaluators; discovered failures are fed back into the evaluation dataset and criteria.

4 supporting quotes
“we first start by building the evaluation data set by collecting examples, defining the evaluation criteria and uh performing human annotation.”transcript, stated
“we include the same context that is passed to the model as well as the conversation transcript between Phoenix and the patient.”transcript, stated
“we divide the evaluation data set into three sets. The um training set, development sets and the test set. The training set is used for few short examples. The development set is used to iterate on the prompt and measure human alignment. And then the test”transcript, stated
“we keep a tight feedback loop between production in development by enforcing guard rails conducting AB tests performing manual audit on production traces and running evaluators on production traces as well.”transcript, stated

Why this architecture

Sword splits evaluation into offline and online loops because healthcare quality cannot be proven by a single release gate. Offline datasets, criteria, annotations, and evaluators provide pre-release confidence; vibe checks catch missing criteria; production guardrails reduce patient-facing risk; A/B tests measure real outcomes; observability and manual audits reveal new failure patterns; and production evaluators feed those discoveries back into the dataset and rubrics.

4 supporting quotes
“quality of care. However, we need to guarantee that models remain safe, reliable, and useful both before and after they reach patients. A way to achieve this is through both uh offline and online evaluations. So you might wonder why is evaluation in healthcare hard? So models need to communicate”transcript, stated
“everything that Fenix says uh when it says and uh what it says is uh validated both before and after release with offline and online evaluations.”transcript, stated
“a new version can sometimes improve the evaluation metrics but uh fail the V check the V check. In that case we hold the release and perform another improvement cycle. So uh to perform V check uh we can use annotation tools such as Gondola that I described”transcript, stated
“especially in healthcare means building trustworthy systems that improve with every interaction. So evaluations must be a continuous process and not a one-time thing. We need to um define success early create uh data sets uh build suits of uh evaluators and continue to run these checks”transcript, stated

Models used: Large language models · Phoenix · LLM-as-judge · RAG · Code-based evaluators · Gondola · Argilla

Scale

Alternatives considered (roads not taken)

Collect evaluation examples randomly from real data.

Rejected because: Random sampling over-represents simple and common use cases, so Sword deliberately gathers challenging, rare, long-tail, tool-calling, RAG, prompt-branch, and regression examples.

“a common first step is to collect examples at random. However, this usually uh results in data sets that are over represented with simple and uh common use cases.”transcript, stated
“we try to create evaluation data sets by gathering uh different types of examples. So challenging examples, rare examples”transcript, stated

Use free-form or graded outputs for evaluation criteria.

Rejected because: Sword tries to keep criteria binary to reduce ambiguity and improve evaluator alignment.

“We always try to keep outputs uh binary. So something like yes or no, pass or fail to uh reduce ambiguity and improve um alignment.”transcript, stated

Use one universal evaluator type for every criterion.

Rejected because: Sword assigns human, code-based, and LLM-as-judge evaluators to different tasks because each has different strengths and failure modes.

“So we can build either human codes called code cold or ludge evolves. And each one of these grading uh approaches is suited for different tasks with different uh with um with different failure modes.”transcript, stated

Rely only on automated evaluator metrics before release.

Rejected because: A version can improve metrics but fail a manual vibe check, so Sword holds the release and runs another improvement cycle.

“a new version can sometimes improve the evaluation metrics but uh fail the V check the V check. In that case we hold the release and perform another improvement cycle.”transcript, stated

Let a failed guardrail simply pass through.

Rejected because: For real-time safety checks, Sword falls back to a static message or retries generation when the guardrail fails.

“when the guardrails fail uh you you can either fall back to a static message or uh retry the generation a few times.”transcript, stated

Evaluate only before release.

Rejected because: The same evaluators continue in production, where pass-rate drops prompt investigation and corrective action.

“the entire process used for development once again. So moving on to online evaluations. So once released to production the model continues under uh evaluation. Um so continuous evaluation ensures that the model performance holds up in real world conditions that regressions are caught”transcript, stated
“if pass rates drop below a specific threshold, the team is prompt to investigate and uh take corrective uh measure.”transcript, stated

Patterns

eval-driven-development (evaluation)

Sword's release loop starts with datasets, criteria, human annotation, evaluator suites, and a pre-release vibe check, then reuses those evaluators in production to keep improving Phoenix.

“we follow this iterative process. So we first start by building the evaluation data set by collecting examples, defining the evaluation criteria and uh performing human annotation.”transcript, stated
“If all checks pass, we release the new and hopefully improved version to production.”transcript, stated

llm-as-judge (evaluation)

Sword uses LLM-as-judge evaluators for complex or subjective checks, with prompts containing task, transcript, rubric criteria, and evaluation instructions.

“So the key thing here with LLM uh as judge evaluators is to create the LLM as judge prompt.”transcript, stated
“we define uh the task, we include the transcript perform include also the rubric item which which is which are the evaluation criteria”transcript, stated

human-in-the-loop-gate (governance)

Clinical experts and product managers annotate examples, run pairwise comparisons, perform vibe checks, and supply the expert judgment used to validate automated evaluators.

“we perform human annotation on the collected examples. So we can use a single annotator or multiple annotators. In our case usually the clinical expert or a product manager.”transcript, stated
“before uh major uh updates or releases, we perform pair wise pair-wise comparison in Gondola, our uh internal annotation uh tool”transcript, stated

guardrails (safety)

Some evaluators become real-time guardrails that prevent unwanted patient-facing content; medical-advice checks may use LLM-as-judge and failures trigger fallback or retries.

“some uh evaluators can uh be used as uh guard wells um and they act as real-time safety checks that prevent unwanted content from reaching the end uh user.”transcript, stated
“for more critical validations like for example detecting uh medical uh advice, we can also rely on LLM as judge.”transcript, stated

data-quality-loop (data)

Evaluation datasets are continuously improved with user feedback, manual audits, production traces, and hard cases that surface from online monitoring.

“Over time these data sets is continuously improved with new examples collected uh either through user feedback or manual audits.”transcript, stated
“the insights collected through this process are then fed back to the um to the evaluation data set the criteria”transcript, stated

observability-tracing (operations)

Sword logs request inputs, metadata, outputs, RAG documents, tool invocations, user feedback, and evals so production traces can be manually audited and automatically evaluated.

“to make this effective, we need you guessed it um extensive observability.”transcript, stated
“we usually log everything from inputs metadata uh from inputs metadata outputs uh uh documents retrieved through rag different tool invocations user feedback and evaluations”transcript, stated

model-routing (model-operations)

Evaluations support objective model comparison and cost optimization by checking whether Sword can switch to another or smaller model without degrading performance.

“objective model comparison. Can I switch to another model and maintain or even improve my current performance?”transcript, stated
“can I switch to a smaller model um and maintain or even improve my current performance.”transcript, stated

rag-retrieval (context)

RAG is one of the application paths explicitly stressed in dataset construction and logged in production observability, because retrieved documents affect model behavior.

“examples that stress test different parts of the application such as tool calling uh rag or different prompt branches”transcript, stated
“documents retrieved through rag different tool invocations user feedback and evaluations”transcript, stated

Tradeoffs

Evaluation dataset construction

Chose targeted and synthetic example selection over random real-data sampling alone.

Rationale: Targeted selection covers hard cases and rare long-tail behavior that random sampling misses.

“a common first step is to collect examples at random. However, this usually uh results in data sets that are over represented with simple and uh common use cases.”transcript, stated
“synthetic examples can be used to uh create examples that are long tail or that are rare and that haven't yet appeared in uh production.”transcript, stated

Criterion output design

Chose binary yes/no or pass/fail labels over more ambiguous grading outputs.

Rationale: Binary criteria reduce ambiguity and improve agreement between evaluators.

“We always try to keep outputs uh binary. So something like yes or no, pass or fail to uh reduce ambiguity and improve um alignment.”transcript, stated

Evaluator type selection

Chose human, code-based, and LLM-as-judge evaluators by task over a single evaluator mechanism for all criteria.

Rationale: Human review handles expert/tone judgments, code handles objective criteria at scale, and LLM-as-judge sits between them for complex but scalable checks.

“each one of these grading uh approaches is suited for different tasks with different uh with um with different failure modes.”transcript, stated
“they are able to evaluate things that are more uh complex and subjective than codebase evaluators”transcript, stated

Release gating

Chose manual vibe check plus evaluator metrics over automatic release when metrics improve.

Rationale: The vibe check protects against quality issues not yet encoded in criteria, even when evaluation metrics improve.

“before releasing the model to production we always or most of the times perform a v check round which is basically a manual inspection of uh outputs.”transcript, stated
“In that case we hold the release and perform another improvement cycle.”transcript, stated

Production safety response

Chose fallback or retry on guardrail failure over delivering the unsafe generated content.

Rationale: Guardrails are real-time patient-facing safety checks, so failures need an immediate safe response path.

“real-time safety checks that prevent unwanted content from reaching the end uh user.”transcript, stated
“when the guardrails fail uh you you can either fall back to a static message or uh retry the generation a few times.”transcript, stated

Online evaluation coverage

Chose all traces or subsampling depending on criticality over one fixed production-evaluation cadence.

Rationale: Critical issues justify broader evaluation coverage; less critical cases may use subsampling.

“depending on the criticality of the issue, these evaluators can be used to evaluate all production traces or just a subsample.”transcript, stated

Gotchas (what bit them)

Random dataset sampling hides hard healthcare cases.

Root cause: Randomly collected examples overrepresent simple and common use cases.

Resolution: Deliberately include challenging, rare, long-tail, tool-calling, RAG, prompt-branch, previous-issue, and new-feature examples.

“this usually uh results in data sets that are over represented with simple and uh common use cases.”transcript, stated
“challenging examples, rare examples, examples that stress test different parts of the application such as tool calling uh rag or different prompt branches”transcript, stated

Automated evaluators are only useful if they align with expert judgment.

Root cause: Healthcare criteria depend on clinical judgment, product taste, and tone, which automated evaluators can misread.

Resolution: Use clinical experts or PMs to annotate examples, then validate LLM judges with train/dev/test splits and disagreement analysis.

“the success of evaluation depends on making sure that these uh evaluators are aligned with expert judgment.”transcript, stated
“Then we evaluate the examples of the development set using the created evaluators and then we measure things such as true positive rate or true negative rate and then we analyze mistakes.”transcript, stated

An evaluator suite can miss full-picture quality problems.

Root cause: Metrics cover defined criteria, while new or subjective quality issues may not yet be represented.

Resolution: Run a manual vibe-check round before production; if metrics pass but the vibe check fails, hold release and repeat an improvement cycle.

“Um the goal is to ensure that no unexpected issues not yet covered by the evaluators uh surface”transcript, stated
“a new version can sometimes improve the evaluation metrics but uh fail the V check the V check. In that case we hold the release and perform another improvement cycle.”transcript, stated

A/B tests for LLM releases can be slow or statistically weak.

Root cause: Teams may lack enough data volume, stakeholders may resist holding back a new version, and statistical design still matters.

Resolution: Treat A/B tests as the ultimate production test but interpret them with the usual product-experiment discipline and keep offline/online evals as complementary signals.

“performing AB tests with large language models suffers suffers from the same problems than usual AB tests.”transcript, stated
“you need to make sure that the test is statistically sound so you don't uh take false conclusions.”transcript, stated

Guardrails must account for critical healthcare validations.

Root cause: Some failures, such as medical advice, are higher risk than ordinary latency or formatting issues.

Resolution: Use code-based evaluators for objective real-time checks and LLM-as-judge for critical validations, with static fallback or retry on failure.

“for latency considerations. However, for more critical validations like for example detecting uh medical uh advice, we can also rely on LLM as judge.”transcript, stated
“when the guardrails fail uh you you can either fall back to a static message or uh retry the generation a few times.”transcript, stated

Production debugging is weak without broad observability.

Root cause: Failure patterns and root causes require visibility into inputs, outputs, metadata, retrieved documents, tool invocations, feedback, and eval results.

Resolution: Log the full production trace context and use manual audits plus production evaluators to detect issues early and create new evaluations.

“by regularly reviewing production traces, we are able to detect uh failure patterns early, understand their root causes, mitigate the issues and create evaluations”transcript, stated
“this visibility allows us to have a full picture of what happens in production, debug faster and solve issues more efficiently.”transcript, stated

Evaluation

Sword evaluates Phoenix through an offline-to-online chain: targeted datasets, binary criteria, human annotations, evaluator suites, train/dev/test calibration for LLM judges, true-positive/true-negative analysis, disagreement review, pre-release vibe checks, production guardrails, A/B tests, manual audits, observability, and production-trace evaluators.

Metrics: Human alignment between evaluator outputs and expert labels. · True positive rate and true negative rate during judge development. · Pairwise human expert scores for major updates. · Code-based checks such as character-count limits. · A/B-test user feedback, usage, and acceptance metrics. · Production evaluator pass rates and threshold-triggered investigations. · Manual audit findings from production traces.

5 supporting quotes
“we measure things such as true positive rate or true negative rate and then we analyze mistakes.”transcript, stated
“Based on these expert scores, they make deployment decisions about whether a model is ready for production.”summary, stated
“make sure that the output of uh the model remains within a specific number of uh characters.”transcript, stated
“success metrics which can be uh user feedback metrics or usage metrics or acceptance metrics and then we measure the lift between the two uh model versions.”transcript, stated
“if pass rates drop below a specific threshold, the team is prompt to investigate and uh take corrective uh measure.”transcript, stated

Outcomes

The talk frames Phoenix as healthcare-at-scale and patient-facing, but it does not provide exact patient volume. Concrete scale signals include thousands of automated evaluations, three-way judge-calibration splits, production traces evaluated all-or-subsample by criticality, and A/B tests that can take up to two months if data volume is low.

4 supporting quotes
“everything that Fenix says uh when it says and uh what it says is uh validated both before and after release with offline and online evaluations.”transcript, stated
“examples that stress test different parts of the application such as tool calling uh rag or different prompt branches”transcript, stated
“each one of these grading uh approaches is suited for different tasks with different uh with um with different failure modes.”transcript, stated
“we set up uh guardrails, conduct tests and continue to monitor um in production.”transcript, stated