DEV Community

Bohdan Hordii
Bohdan Hordii

Posted on Originally published at bohdanhordii.dev

Architectural Deep-Dive: Patient-specific rubric-based evaluation of large language models across longitudinal cancer care

Beyond Static Evals: Why Multi-Stage Agent Pipelines Fail Across Sequential Lifecycles

Most LLM benchmarks test models inside a vacuum: single-turn prompts, static question-answering datasets, and synthetic multiple-choice evaluations. In real production engineering, this creates a dangerous illusion of competence. When deployed inside multi-step stateful workflows—whether in clinical decision support, multi-agent automated refactoring, or enterprise incident remediation—models that excel at diagnosis frequently collapse during execution.

A recent paper, Patient-specific rubric-based evaluation of large language models across longitudinal cancer care (arXiv:2610.35847), provides empirical backing for an architectural failure mode we frequently observe in autonomous systems.


The Anatomy of Sequential Degradation

Evaluating 30 foundational and domain-adapted LLMs across longitudinal pipelines revealed three structural vulnerabilities:

  1. Diagnostic Success Does Not Transfer to Downstream Execution: A model showing 90%+ diagnostic accuracy frequently fails to follow protocol during sequential downstream execution.
  2. The Inversion of Failure Modes: Error types invert based on the pipeline phase:
    • Execution & Staging phases: Dominated by commission errors (explicit decision blunders, up to 48.2%).
    • Ingestion & Follow-up phases: Dominated by omission errors (silent drops of essential checks, 30.4% - 33.4%).
  3. Domain Fine-Tuning Backfires on Recall: Specialized, domain-tuned models showed higher omission rates than general-purpose frontier models due to aggressive pattern matching on narrow historical trajectories.
[Ingestion Phase] ---> [Processing Phase] ---> [Post-Action Phase]
  Silent Omission       Explicit Commission       Silent Omission
  Errors (~33%)         Errors (~48%)             Errors (~30%)
Enter fullscreen mode Exit fullscreen mode

The Prompt Granularity Paradox

The benchmark uncovered a critical tension in agent specification:

  • Broad Prompts: Yield lower baseline decision quality across all 30 models because the LLM lacks constrained guardrails.
  • Checklist-Style Prompts: Substantially increase nominal decision quality, but trigger a steep collapse in Evidence Faithfulness and Safety Adherence.

When given an exhaustive procedural checklist, the LLM prioritizes filling every rubric slot over grounding its decisions in the provided context, actively inventing assumptions to satisfy checklist constraints.


Architectural Solution: Phase-Adaptive Atomic Rubrics

To remediate this in production pipelines, avoid monolithic system prompts. Instead, implement a state-machine evaluator with phase-specific validation harnesses in Python:

from typing import List, Dict, Any
from pydantic import BaseModel, Field

class AtomicCriterion(BaseModel):
    criterion_id: str
    description: str
    phase: str
    is_critical: bool
    passed: bool = False
    evidence_span: str = Field(default="", description="Extracted ground-truth text")

class PhaseEvaluationHarness:
    def __init__(self, rubrics: Dict[str, List[AtomicCriterion]]):
        self.rubrics = rubrics

    def evaluate_step(
        self, 
        current_phase: str, 
        model_output: Dict[str, Any], 
        raw_context: str
    ) -> Dict[str, Any]:
        criteria = self.rubrics.get(current_phase, [])
        omissions = []
        unfaithful_claims = []

        for item in criteria:
            # Verify whether required action was executed
            action_taken = item.description in model_output.get("actions_performed", [])
            if not action_taken and item.is_critical:
                omissions.append(item.criterion_id)
                continue

            # Verify evidence grounding to prevent checklist hallucinations
            claim = model_output.get("justifications", {}).get(item.criterion_id, "")
            if claim and claim not in raw_context:
                unfaithful_claims.append(item.criterion_id)

        return {
            "phase": current_phase,
            "omission_count": len(omissions),
            "unfaithful_count": len(unfaithful_claims),
            "status": "REJECT" if omissions or unfaithful_claims else "PASS"
        }
Enter fullscreen mode Exit fullscreen mode

Engineering Takeaways

  1. Stop using single-turn benchmarks for multi-stage agents. Synthetic MMLU-style metrics do not predict sequential workflow reliability.
  2. De-couple prompt instruction from verification. Do not overload your agent prompt with massive checklists; run lightweight agent actions and verify them against atomic criteria out-of-band.
  3. Audit omissions at pipeline boundaries. Place strict gatekeepers at the initial context ingestion and final dispatch phases to catch silent step omission.

Canonical publication: https://bohdanhordii.dev

Author: Bohdan Hordii | Website: bohdanhordii.dev | Contact: @bohdan_hordii

Top comments (0)