MPredict anythingMIROFISH 米罗鱼
Experiment protocolExperiment Design

Within-Subject vs. Between-Subject AI Agent Tests

Aug 6, 202612 min readMiroFish Editorial
Experiment strip
Protocol / pretest
  1. 01
    StageExposure model
  2. 02
    Control ATreatment B
  3. 03
    StageOrder control
  4. 04
    StageRepeat
  5. 05
    DecisionDesign check
Direct answer

Direct answer

Within-subject AI agent tests expose the same agent to both variants, which controls agent-level differences but can introduce memory, order, and contrast effects. Between-subject tests expose separate agents to each variant, preserving treatment isolation but increasing population variance. Choose the design that matches real exposure, then use counterbalancing, repeated runs, and held-out live outcomes to test its reliability.

Protocol artifact

Experiment design selector

Select the design based on exposure and contamination risk before considering which result looks cleaner.

Design questionWithin-subjectBetween-subjectSelection rule
ExposureEach agent sees A and BEach agent sees one armMirror plausible real exposure
VarianceAgent fixed effect controlledAgent mix adds varianceUse repeats and balance
Main riskCarryover and orderPopulation imbalanceTest the dominant threat
Best fitPaired judgmentIndependent experienceMatch the estimand
Q01

What is the difference between within-subject and between-subject agent tests?

Within-subject designs compare both treatments for each synthetic agent; between-subject designs compare separate groups assigned to one treatment each.

In a within-subject design, every agent can act as its own control. Stable traits, background, and baseline tendencies are held constant while treatment changes. The resulting paired contrast can be efficient when the task genuinely involves comparing alternatives.

In a between-subject design, agents experience only one condition. This more closely resembles many live product experiments and avoids direct comparison cues. However, treatment groups may differ because synthetic populations, generated histories, or run trajectories are not balanced perfectly.

Neither design is inherently more realistic. The right design represents the exposure and causal question. A buyer comparing two concepts side by side differs from a user who encounters one onboarding flow without seeing the alternative.

Q02

When does a within-subject design improve an agent test?

Use within-subject designs when stable differences between agents are large, both variants can plausibly be evaluated, and carryover can be controlled or measured.

Paired exposure is useful for message preference, concept comparison, comprehension, and structured trade-off tasks. Because the same agent evaluates both conditions, differences in verbosity, optimism, price sensitivity, and background do not enter the treatment contrast in the same way.

[Experimental] The 2026 agentic-experimentation preprint reports about 2.4 times lower standard errors from a within-subject design in its research setting. That estimate is not a universal efficiency gain. It depends on the agents, tasks, outcome coding, and correlation between paired responses.

Efficiency is valuable only if the pair is meaningful. Asking an agent to simulate mutually exclusive long-term experiences sequentially may produce a clean numerical contrast that is behaviorally incoherent.

Q03

What carryover and order effects can bias within-subject results?

The first treatment can teach, anchor, fatigue, or reveal the experiment to the agent, causing the second response to depend on exposure order rather than treatment alone.

Language-model agents retain conversational context unless it is explicitly reset. They may compare the second variant with the first, reuse earlier reasoning, infer the researcher's goal, or seek consistency. These behaviors can create a contrast effect even when a comparable real user would see only one condition.

Counterbalance order by running both A→B and B→A, and create fresh contexts for each order. Add a treatment-order field to the outcome ledger. If the preferred arm changes materially with order, report that sensitivity rather than averaging it away.

For experiences with memory, network interaction, or path dependence, a clean reset may erase the very state being studied. In that case, use separate agents or simulate each path from the same versioned initial state.

Q04

When is a between-subject design the safer choice?

Use between-subject designs when exposure must remain isolated, treatments create persistent state, direct comparison is unrealistic, or demand effects are likely.

Between-subject assignment fits landing pages, onboarding sequences, policy messages, and social interactions where one treatment changes later context. Each agent or simulated world receives one condition, preventing direct knowledge of the alternative from shaping the outcome.

The design must balance important baseline attributes across arms. Stratify or match synthetic agents on declared variables, reuse a common population frame, and repeat the entire assignment. Do not quietly regenerate a more skeptical population for one treatment.

When agents interact, randomization may need to occur at network or world level rather than individual level. Otherwise information can spill from treated agents to controls. That interference is sometimes the mechanism of interest, but it changes what the experiment estimates.

Q05

How should teams compare results across both designs?

Run a design sensitivity check, compare direction and mechanisms, and investigate disagreements before selecting the estimate that best supports the preferred variant.

Use the same source packet, treatments, population definition, outcome rubric, and model version. For within-subject runs, report paired contrasts by order. For between-subject runs, report arm distributions and baseline balance. Preserve the number of agents and repeated worlds.

Agreement across designs strengthens a directional screening conclusion because different failure modes lead to the same shortlist. Disagreement is diagnostic. It may reveal carryover, population imbalance, treatment interference, or an outcome that depends on explicit comparison.

Do not average incompatible estimands. A side-by-side preference and an independent conversion response answer different questions. Name the claim each design supports before comparing values.

  • Counterbalance A→B and B→A
  • Balance population attributes across arms
  • Repeat assignment, not just dialogue
  • Treat design disagreement as evidence
Q06

Which design should be taken into the live experiment?

Take the design that matches real assignment and exposure into production, using synthetic design checks to anticipate variance, interference, and instrumentation risks.

Most online experiments are between-subject because each unit receives one variant. Some research and preference studies legitimately use crossover or paired designs. The production protocol should follow the real decision, ethical constraints, washout period, and potential for spillover—not the simulated design with the smallest standard error.

Document any mismatch. A paired synthetic screen may efficiently rank creative concepts before a between-subject live test. That is acceptable when the team does not transfer the paired effect magnitude into the production power calculation.

After launch, compare which synthetic design better anticipated direction, heterogeneity, and mechanisms. Accumulated evidence can inform the default design for a narrow class of future decisions.

Protocol notes

How can design sensitivity be documented clearly?

Create a compact design-sensitivity table with one row per estimand and columns for within-subject direction, A→B order, B→A order, between-subject direction, baseline balance, repeated-world count, and material mechanism. Keep treatments, population evidence, coding, and model version fixed. Where the designs agree, state only the narrow directional conclusion they share. Where they disagree, open an investigation rather than selecting the smaller standard error. Check memory contamination, order anchoring, assignment imbalance, network spillover, and whether the two designs actually asked the same behavioral question.

The report should also explain alignment with the eventual live exposure. A paired creative-comparison task can be efficient for synthetic screening even if real users will see only one page. Mark that mismatch and prohibit transferring the paired magnitude into production power calculations. Conversely, a between-world simulation may reveal propagation and interference that an individual randomized test would estimate poorly. The useful design is the one that clarifies the decision and its failure modes. Precision is secondary when it is achieved by changing the estimand or giving agents information real users would never receive.

Record the preferred design and the rejected alternative with reasons, then revisit that choice when observed exposure reveals contamination, interference, or variance that the synthetic protocol missed. Design choice should remain a testable assumption, not a template inherited by every future experiment.

Where social interaction matters, add a separate interference note describing who can observe treatment, when information can cross arms, and whether the live randomization unit needs to move from person to group, network, market, or simulated world. Preserve that choice in the estimand.

Source ledger

Evidence used

  1. E-01
    Can AI Agents Simulate A/B Test Outcomes? A Validation Framework for Agentic Experimentation

    arXiv preprint

    [Experimental] A 2026 preprint evaluating agentic predictions against 67 historical marketing experiments. Its findings are preliminary and do not establish general predictive accuracy.

  2. E-02
    Designing Reliable Experiments with Generative Agent-Based Modeling

    arXiv preprint

    A research framework for experimental design with generative agents, including measurement, repeated trials, and design-validity concerns.

  3. E-07
    Estimating Causal Effects of Treatments in Randomized and Nonrandomized Studies

    Journal of Educational Psychology

    A foundational treatment of potential outcomes and the missing-counterfactual problem behind causal inference.

  4. E-06
    Minimum Information About a Simulation Experiment (MIASE)

    Nature Biotechnology

    A minimum-information standard intended to make simulation experiments interpretable and reproducible by other researchers.

  5. E-08
    Artificial Intelligence Risk Management Framework: Generative AI Profile

    National Institute of Standards and Technology

    NIST guidance for identifying, evaluating, and managing risks specific to generative AI systems.

Continue the experiment
From protocol to rehearsal

Stress-test the variants before production traffic decides.

Use your own source material to rehearse treatments, inspect mechanisms, and prepare a sharper live experiment.

Compare both designs