Skip to main content
Connic
Test

A/B Testing

Compare agent variants with exploratory traffic splits or statistically planned confidence experiments, then monitor quality, reliability, cost, and latency.

Last updated

Overview

A/B testing lets you run a base agent (control) and a test variant against live traffic in the same environment. Connic offers two analysis modes: use Confidence when you need a statistically controlled recommendation, or Exploratory when you only need a descriptive comparison. Both modes track reliability, cost, latency, and judge scores.

Planned Experiments
Choose a metric and objective, declare the expected baseline and target effect, then preview the required sample size before starting.
Side-by-Side Comparison
Follow the observed effect, adjusted interval, sample progress, allocation validity, operational metrics, and recommendation.
Safety Guardrails
Automatically pause variants that breach a failure-rate limit or a rolling judge-quality floor.

Creating Test Agents

Test variants are regular agent YAML files that follow a naming convention: {base-agent}-test-{name}. The part before -test- must match an existing base agent name. The part after is the test identifier.

agents/
agents/
order-processor.yamlbase agent
order-processor-test-faster-model.yamlvariant: "faster-model"
order-processor-test-new-prompt.yamlvariant: "new-prompt"
support-agent.yamlunrelated agent (not affected)

The base agent stays exactly the same. The variant can change anything: model, instructions, tools, temperature, etc.

agents/order-processor.yaml
name: order-processor
model: gemini/gemini-2.0-flash
description: "Processes incoming customer orders"
system_prompt: |
  You process incoming orders...
tools:
  - orders.process
  - inventory.check
agents/order-processor-test-faster-model.yaml
name: order-processor-test-faster-model
model: gemini/gemini-2.5-flash
description: "Processes incoming customer orders"
system_prompt: |
  You process incoming orders...
tools:
  - orders.process
  - inventory.check
Validation
If an agent name contains -test- but no matching base agent exists, the deployment will fail with an error.

Tool Versioning

Since each agent references tools by module path, you can point a variant at a different tool module to test new implementations. Create a new tool file and reference it in the variant.

tools/
tools/
orders.pycurrent implementation
orders_v2.pyexperimental implementation
inventory.py
agents/order-processor-test-new-tools.yaml
name: order-processor-test-new-tools
model: gemini/gemini-2.0-flash
description: "Processes incoming customer orders"
system_prompt: |
  You process incoming orders...
tools:
  - orders_v2.process    # different tool module
  - inventory.check

Choose an Analysis Mode

Confidence

Use a pre-registered statistical plan when you need a controlled recommendation. Connic calculates the sample targets, analyzes only at planned checkpoints, reports an adjusted confidence interval, and pauses when the evidence supports control, the variant, or an inconclusive result.

Exploratory

Use descriptive metrics when you are investigating behavior or do not need a statistical winner claim. You choose a minimum completed-run count per group and decide when to pause, conclude, or change the experiment.

Confidence plan
Primary metricSuccess rate, or a normalized score from an enabled automatic judge that evaluates every run without filters.
ObjectiveTest for superiority, or show that the variant is not worse than control by more than a declared non-inferiority margin.
Planning assumptionsSet the better direction, baseline, minimum detectable effect or margin, confidence level, statistical power, and a non-binding futility advisory threshold.
Randomization unitAssign each run independently, or keep every run with the same trusted session identity in one arm.
Plan previewSee the calculated control, variant, and total sample targets before creating the test.
Sequential decisions without repeated-peeking bias
Confidence tests use four planned analysis looks at 25%, 50%, 75%, and 100% of the target information. Connic applies O'Brien–Fleming boundaries, records each look, and widens the reported interval so it remains valid across the planned sequence. Before the first look, the observed effect and interval are descriptive only.

Traffic Assignment

The traffic percentage is the share assigned to the variant; the remainder stays on control. Confidence mode creates a durable assignment for every run or session and requires traffic in both arms. Its routing is exclusive, so only one confidence test can run for an agent in an environment at a time. Exploratory mode supports multiple concurrent variants as long as their combined traffic is at most 100%.

Session randomization requires a trusted session identity from the trigger path. All requests for that identity stay in the same arm, and only the first eligible run supplies the session's outcome. Pausing, concluding, or invalidating the test immediately returns new traffic to the base agent.

Force a version without contaminating a confidence test
In Trigger Manually, leave routing on Normal to apply the active test, or choose the base agent or a specific variant to force that version for one run. Forced runs remain visible in run history but are excluded from confidence analysis and safety guardrails.

Configuring Tests

After deploying your test variant, open the base agent's detail page and click Manage A/B Tests in the header.

1

Deploy your test variant

Push the variant agent YAML alongside the base agent. After deployment, it will appear as an available variant.

2

Choose the analysis

Click New Test, select a deployed variant, choose Confidence or Exploratory, and configure the traffic split.

3

Review the plan and guardrails

For Confidence, verify the calculated sample targets and decision looks. Optionally add failure-rate and judge-quality auto-pause rules.

4

Start and monitor

Tests begin as drafts. Click Start to route traffic, then open the test to follow its metrics and decision status.

Safety guardrails

Add either check independently, or use both for production experiments.

Failure auto-pause

Pause when the variant's failure rate exceeds the configured threshold across a complete rolling window of terminal runs.

Quality auto-pause

Pause when the variant's recent normalized score from a selected automatic judge falls below a configured floor after the minimum number of evaluations.

Reading Results

The test detail view shows a side-by-side comparison of control vs. variant:

RunsTotal completed runs for each group.
Avg CostAverage token cost per run.
Avg DurationAverage end-to-end execution time.
P50 / P95Median and 95th percentile duration. Useful for detecting tail latency.
Judge ScoresAverage normalized score from the selected metric or quality judge.
Judge CoveragePercentage of completed runs with a usable evaluation from the selected judge.
Success RatePercentage of runs that completed without errors.
Confidence decision status

Confidence tests add a live decision panel above the operational statistics. It reports the selected primary metric, control and variant values, effect in percentage points, sample progress for each arm, completed and upcoming looks, pending outcomes, and the current recommendation.

The allocation check detects a sample-ratio mismatch between the planned and observed traffic split. At a planned look, Connic reports a sequentially adjusted interval and may recommend the variant, recommend control, continue collecting, or stop as inconclusive. A detected allocation mismatch, failed required judge analysis, or breached safety guardrail pauses the test without a winner claim.

The A/B test detail view's Statistics panel for the concise-summary test, showing 260 control runs and 230 variant runs above a side-by-side table comparing average cost, average duration, P50 and P95 duration, average judge score, and success rate for each group.
The test detail view compares control and variant side by side across cost, latency (average, P50, P95), judge score, and success rate.
Runs in the history table show the variant as a pill next to the status badge. Use the test-variant filter to isolate control, one variant, or several variants when investigating individual runs.
The agent runs history table with one row tagged by a concise-summary pill next to its Completed status badge, marking it as part of an A/B test.
Runs routed to a variant show the test name as a pill next to the status badge in the runs history.

Deployment & Test Lifecycle

Tests move from Draft to Running, and can then be paused or concluded. Exploratory settings remain editable while running or paused. A confidence plan, traffic allocation, and its safety settings lock on the first start so the experiment cannot change underneath its evidence.

Pause and resume
A manually paused confidence test can resume with its original locked plan. A confidence test stopped by a decision boundary, safety guardrail, allocation mismatch, or analysis error cannot resume; conclude it and create a new test if you want another experiment.
Retained evidence
Once a confidence test starts, Connic retains its locked assumptions, judge snapshots, durable assignments, and completed analysis looks as experiment evidence. Started confidence tests cannot be deleted or assigned a manual winner.
Deployments are checked against active tests
When a deployment activates, Connic verifies every running or paused test. If its variant is no longer deployed, the test is marked Failed and traffic returns to control. Conclude tests you want to preserve as completed experiments before removing their variants.
Best Practices
  • Validate assumptions: Use realistic baseline data and choose the smallest effect that would change your decision
  • Plan for traffic: Check the calculated sample target and make sure the environment can reach it in a useful timeframe
  • Use a complete judge: A confidence metric or quality guardrail requires an enabled automatic judge with 100% sampling and no run filters
  • Change one thing at a time: For the clearest signal, each variant should differ in one dimension (model, prompt, or tools)
  • Add both guardrails: Failure and judge-quality thresholds catch different ways a variant can regress
  • Do not treat exploratory results as proof: Switch to Confidence when the decision needs a controlled error rate
  • Test in staging first: Validate that the variant works before running a production A/B test in separate environments