---
title: "compare"
description: "Evaluate alternatives against criteria"
canonical: "https://acs.synapti.ai/capabilities/compare/"
last_updated: "2026-11-16T01:14:10Z"
---

# compare

Evaluate alternatives against criteria

Generated from [schemas/capability_ontology.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/capability_ontology.yaml), [skills/compare/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/compare/SKILL.md) at commit 18c38b74ac21. Ontology version 2.2.0.

Layer: [UNDERSTAND](https://acs.synapti.ai/layers/understand/index.md)

## Safety

| Property | Value |
| --- | --- |
| Risk | Low |
| Changes state | No |
| Needs checkpoint | No |
| Needs approval | No |
| Overridable | No |
| Blocked from autonomy | No |

In a workflow, search, where the workflow has it, must come first (V102).

## Relationships

**Figure: Relationships of compare: 5 relationships with 5 capabilities.** compare has 5 relationships with 5 capabilities: 2 with edges into it and 3 with edges out of it.

| Capability | Row | Relationships |
| --- | --- | --- |
| [`search`](https://acs.synapti.ai/capabilities/search/index.md) | Edges into compare | `precedes` (into) |
| [`classify`](https://acs.synapti.ai/capabilities/classify/index.md) | Edges into compare | `enables` (into) |
| [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | Edges out of compare | `enables` (out of) |
| [`explain`](https://acs.synapti.ai/capabilities/explain/index.md) | Edges out of compare | `enables` (out of) |
| [`generate`](https://acs.synapti.ai/capabilities/generate/index.md) | Edges out of compare | `enables` (out of) |

- `enables`: Unlocks [`plan`](https://acs.synapti.ai/capabilities/plan/index.md), [`explain`](https://acs.synapti.ai/capabilities/explain/index.md), [`generate`](https://acs.synapti.ai/capabilities/generate/index.md)
- `enables`: Unlocked by [`classify`](https://acs.synapti.ai/capabilities/classify/index.md)
- `precedes`: Comes after, when both are present [`search`](https://acs.synapti.ai/capabilities/search/index.md)

## Contract

**Figure: Contract of compare: 3 inputs (1 required), 8 outputs.** compare takes 3 inputs, 1 required (filled pin) and 2 optional (hollow pin), and returns 8 outputs. The tables below list every field.

### Inputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `options` | array | Yes | Items to compare |
| `criteria` | array | No | Evaluation criteria |
| `weights` | object | No | Criteria weights |

### Outputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ranking` | array | Yes | Ordered options |
| `scores` | object | No | Scores per option |
| `recommendation` | string | No | Top choice |
| `tradeoffs` | array | No | Key tradeoffs |
| `evidence_anchors` | array of Anchor (or deprecated string or object) | Yes | What the output is based on, as evidence anchors (Standard v1.2 §6.5). An empty list grounds nothing, and the output is then marked inferred (§3.1). |
| `confidence` | number | Yes | The producer's probability that the output's claim is correct, self-reported unless the host documents a calibration (Standard v1.2 §4.1.1) From 0 to 1 |
| `inference_method` | string | No | How the output was reached when it is not grounded in evidence; with confidence it marks the output inferred (Standard v1.2 §3.1, §4.1.1). A producer should use model_knowledge, deduction, induction, abduction, analogy, statistical, simulation, assumption or an x- vendor value; a grounding policy (§5.20) requires one of them. |
| `uncertainty` | Uncertainty | No | The uncertainty of the output's principal value; its confidence equals the output's confidence (Standard v1.2 §4.1.1) |

The skill returns 12 fields: 6 are in compare's output contract (3 required) and 6 are the skill's own, outside the contract; it leaves out 2 contract fields (inference_method, uncertainty).

| Field of the skill's output | In the output contract |
| --- | --- |
| `options` | No, the skill's own |
| `criteria` | No, the skill's own |
| `comparison_matrix` | No, the skill's own |
| `ranking` | Yes, required |
| `scores` | Yes, optional |
| `recommendation` | Yes, optional |
| `recommendation_rationale` | No, the skill's own |
| `recommendation_confidence` | No, the skill's own |
| `tradeoffs` | Yes, optional |
| `confidence` | Yes, required |
| `evidence_anchors` | Yes, required |
| `assumptions` | No, the skill's own |
| `inference_method` | Yes, but the skill leaves it out |
| `uncertainty` | Yes, but the skill leaves it out |

## Used in workflows

**Figure: compare in workflows.** 17 workflows use compare, in 19 steps in all; its steps are the squares in an ink ring, and the key under the strips names the other squares.

- [`monitor_and_replan`](https://acs.synapti.ai/workflows/monitor-and-replan/index.md): step 3
- [`capability_gap_analysis`](https://acs.synapti.ai/workflows/capability-gap-analysis/index.md): steps 4 and 5
- [`digital_twin_sync_loop`](https://acs.synapti.ai/workflows/digital-twin-sync-loop/index.md): step 8
- [`data_pipeline_validation`](https://acs.synapti.ai/workflows/data-pipeline-validation/index.md): step 6
- [`anomaly_investigation`](https://acs.synapti.ai/workflows/anomaly-investigation/index.md): step 6
- [`report_generation`](https://acs.synapti.ai/workflows/report-generation/index.md): step 4
- [`model_monitoring`](https://acs.synapti.ai/workflows/model-monitoring/index.md): step 4
- [`patient_monitoring`](https://acs.synapti.ai/workflows/patient-monitoring/index.md): step 5
- [`clinical_alert_triage`](https://acs.synapti.ai/workflows/clinical-alert-triage/index.md): steps 4 and 7
- [`care_plan_review`](https://acs.synapti.ai/workflows/care-plan-review/index.md): step 7
- [`handoff_preparation`](https://acs.synapti.ai/workflows/handoff-preparation/index.md): step 10
- [`quality_control_loop`](https://acs.synapti.ai/workflows/quality-control-loop/index.md): step 4
- [`predictive_maintenance`](https://acs.synapti.ai/workflows/predictive-maintenance/index.md): step 7
- [`supply_chain_sync`](https://acs.synapti.ai/workflows/supply-chain-sync/index.md): step 5
- [`schedule_management`](https://acs.synapti.ai/workflows/schedule-management/index.md): step 6
- [`information_research`](https://acs.synapti.ai/workflows/information-research/index.md): step 7
- [`task_delegation`](https://acs.synapti.ai/workflows/task-delegation/index.md): step 4

## Claude Code skill

**Figure: What the compare skill's tools can do, against the ontology.** The skill may use 2 tools: 2 only read; the ontology marks compare as read-only, and every tool only reads.

| What they can do | Tools |
| --- | --- |
| Only read | `Read`, `Grep` |
| Run commands, which can change state | none |
| Change files | none |

**Figure: The field names each step of the compare procedure uses.** 8 of the procedure's 8 steps use the name of an input or output field of the compare skill as a word; 5 output fields of 12 are used by no step (comparison_matrix, recommendation_rationale, recommendation_confidence, confidence, assumptions).

| Step | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Enumerate options | `options` | `options` |
| 2. Define criteria | `options`, `criteria` | `options`, `criteria` |
| 3. Assign weights | `weights` |  |
| 4. Score each option | `options`, `criteria` | `options`, `criteria` |
| 5. Calculate weighted scores | `options`, `criteria` | `options`, `criteria`, `ranking`, `scores` |
| 6. Analyze tradeoffs | `options`, `criteria` | `options`, `criteria`, `tradeoffs` |
| 7. Formulate recommendation | `options` | `options`, `recommendation` |
| 8. Ground claims |  | `scores`, `evidence_anchors` |

Both examples of the skill write out every one of its 12 output fields.

**Figure: The field names each verification check of the compare skill uses.** 5 of the 6 checks use the name of an input or output field as a word; 8 output fields of 12 are named by no check (comparison_matrix, ranking, recommendation_rationale, recommendation_confidence, tradeoffs, confidence, evidence_anchors and assumptions).

| Check | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. All options evaluated against all criteria | `options`, `criteria` | `options`, `criteria` |
| 2. Criterion weights sum to 1.0 | `weights` |  |
| 3. All scores are in 0.0-1.0 range with rationale |  | `scores` |
| 4. Recommendation aligns with highest weighted score |  |  |
| 5. Tradeoffs identify criteria where recommendation is not best | `criteria` | `criteria`, `recommendation` |
| 6. Hard requirements (must-haves) properly filtered options | `options` | `options` |

**Figure: The neighbours the skill lists for compare, checked against the ontology and the catalogs.** The skill lists 7 capabilities as common neighbours of compare; 3 of them have an edge with it in the ontology, and 5 run next to it, in that order, in a catalog workflow (measure most often, 4 times). Under each tile, an edge reads from its source to its target, with compare's symbol in its place: "requires Cm" is a requires edge from the tile's capability to compare, so the tile's capability must run before compare; "Cm precedes" is a precedes edge from compare to the tile's capability.

| Listed as | Capability | Ontology edge | Next to it in a workflow |
| --- | --- | --- | --- |
| commonly follows | [`classify`](https://acs.synapti.ai/capabilities/classify/index.md) | `enables` | 3 times |
| commonly follows | [`measure`](https://acs.synapti.ai/capabilities/measure/index.md) | none | 4 times |
| commonly follows | [`predict`](https://acs.synapti.ai/capabilities/predict/index.md) | none | never |
| commonly follows | [`discover`](https://acs.synapti.ai/capabilities/discover/index.md) | none | 1 times |
| commonly precedes | [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | `enables` (into it) | 4 times |
| commonly precedes | [`generate`](https://acs.synapti.ai/capabilities/generate/index.md) | `enables` (into it) | 2 times |
| commonly precedes | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | none | never |

### Intent

Systematically evaluate multiple alternatives against defined criteria to produce a recommendation with transparent tradeoff analysis. Comparison enables informed decision-making through structured analysis.

**Success criteria:**
- All options evaluated against same criteria
- Criteria weighted by importance
- Clear recommendation with rationale
- Tradeoffs explicitly documented

**Compatible schemas:**
- `schemas/output_schema.yaml`

### Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `options` | Yes | array | Alternatives to compare (2+ items) |
| `criteria` | No | array | Evaluation dimensions (weight them with `weights`) |
| `weights` | No | object | Criteria weights |

Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).

### Procedure

1) **Enumerate options**: List all alternatives under consideration
   - Verify each option is viable (not obviously invalid)
   - Ensure options are at same abstraction level
   - Flag if options are not mutually exclusive

2) **Define criteria**: Establish evaluation dimensions
   - Quantitative criteria: measurable (cost, time, size)
   - Qualitative criteria: assessed (quality, maintainability, risk)
   - Apply hard requirements (must-haves) as filters to eliminate non-viable options

3) **Assign weights**: Determine relative importance of each criterion
   - Weights should sum to 1.0
   - If not provided, use equal weights
   - Document rationale for weight assignments

4) **Score each option**: Evaluate options against criteria
   - Quantitative: normalize to 0-1 scale
   - Qualitative: rate as 0.0 (poor) to 1.0 (excellent)
   - Document evidence for each score

5) **Calculate weighted scores**: Aggregate criteria scores
   - weighted_score = sum(criterion_score * criterion_weight)
   - Rank options by weighted score (`ranking`, `scores`)

6) **Analyze tradeoffs**: Document what each choice sacrifices
   - Identify criteria where top choice is not best
   - Quantify the gap between options on key criteria

7) **Formulate recommendation**: Propose choice with rationale
   - May recommend conditionally based on priorities
   - Flag if options are too close to distinguish

8) **Ground claims**: Attach evidence anchors to scores and analysis

### Output Contract

Return a structured object:

```yaml
options:
  - id: string  # Option identifier
    summary: string  # Brief description
criteria:
  - name: string  # Criterion name
    weight: number  # 0.0-1.0 importance weight
    type: quantitative | qualitative
comparison_matrix:
  - option_id: string
    scores:
      - criterion: string
        score: number  # 0.0-1.0 normalized score
        rationale: string  # Why this score
ranking:  # Options ordered best-first by weighted score
  - option_id: string
    weighted_score: number  # 0.0-1.0
scores:  # Weighted score per option
  <option_id>: number  # 0.0-1.0
recommendation: string  # Recommended (top) option ID
recommendation_rationale: string  # Why this option
recommendation_confidence: number  # 0.0-1.0 in recommendation
tradeoffs:
  - option: string
    pros: array[string]
    cons: array[string]
confidence: number  # probability that the comparison's conclusion is right (§4.1.1)
evidence_anchors: array[EvidenceAnchor]  # References to data sources; each {ref, kind} (STANDARD v1.2 §6.5)
assumptions: array[string]  # Conditions affecting comparison
```

#### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `options` | array | List of alternatives with summaries |
| `criteria` | array | Evaluation dimensions with weights |
| `comparison_matrix` | array | Scores for each option on each criterion |
| `ranking` | array\<object\> | Options ordered best-first, each with `option_id` and `weighted_score` |
| `scores` | object | Weighted score per option, keyed by option id |
| `recommendation` | string | Recommended option ID (the top of `ranking` unless rationale says otherwise) |
| `recommendation_rationale` | string | Why the recommended option was chosen |
| `recommendation_confidence` | number | 0.0-1.0 confidence in the recommendation |
| `tradeoffs` | array | Pros/cons for each option |
| `confidence` | number | Probability, 0.0-1.0, that the comparison's conclusion is right (§4.1.1) |
| `evidence_anchors` | array of evidence anchors (§6.5) | References supporting scores |
| `assumptions` | array[string] | Conditions that could change outcome |

### Examples

#### Example 1: Compare Database Options

**Input:**
```yaml
options:
  - id: "postgres"
    summary: "PostgreSQL relational database"
  - id: "mongodb"
    summary: "MongoDB document database"
  - id: "dynamodb"
    summary: "AWS DynamoDB managed service"
criteria: ["query_flexibility", "operational_overhead", "cost_at_scale", "team_familiarity"]
weights:
  query_flexibility: 0.3
  operational_overhead: 0.25
  cost_at_scale: 0.25
  team_familiarity: 0.2
```

The workload is mixed read/write at 10M records, run by a team of 3; the scores below assume that context.

**Output:**
```yaml
options:
  - id: "postgres"
    summary: "PostgreSQL relational database with JSONB support"
  - id: "mongodb"
    summary: "MongoDB document database with flexible schema"
  - id: "dynamodb"
    summary: "AWS DynamoDB fully managed NoSQL"
criteria:
  - name: "query_flexibility"
    weight: 0.3
    type: qualitative
  - name: "operational_overhead"
    weight: 0.25
    type: qualitative
  - name: "cost_at_scale"
    weight: 0.25
    type: quantitative
  - name: "team_familiarity"
    weight: 0.2
    type: qualitative
comparison_matrix:
  - option_id: "postgres"
    scores:
      - criterion: "query_flexibility"
        score: 0.95
        rationale: "Full SQL + JSONB queries, complex joins supported"
      - criterion: "operational_overhead"
        score: 0.6
        rationale: "Requires backup, replication, tuning expertise"
      - criterion: "cost_at_scale"
        score: 0.7
        rationale: "~$500/mo for 10M records on RDS"
      - criterion: "team_familiarity"
        score: 0.9
        rationale: "All 3 engineers have 3+ years PostgreSQL experience"
  - option_id: "mongodb"
    scores:
      - criterion: "query_flexibility"
        score: 0.75
        rationale: "Good document queries, limited joins"
      - criterion: "operational_overhead"
        score: 0.7
        rationale: "Atlas reduces ops burden, but sharding is complex"
      - criterion: "cost_at_scale"
        score: 0.6
        rationale: "~$700/mo for 10M records on Atlas"
      - criterion: "team_familiarity"
        score: 0.4
        rationale: "1 engineer with production MongoDB experience"
  - option_id: "dynamodb"
    scores:
      - criterion: "query_flexibility"
        score: 0.4
        rationale: "Limited query patterns, requires careful data modeling"
      - criterion: "operational_overhead"
        score: 0.95
        rationale: "Fully managed, auto-scaling, zero maintenance"
      - criterion: "cost_at_scale"
        score: 0.75
        rationale: "~$400/mo with on-demand pricing"
      - criterion: "team_familiarity"
        score: 0.3
        rationale: "No team experience with DynamoDB"
ranking:
  - option_id: "postgres"
    weighted_score: 0.79
  - option_id: "mongodb"
    weighted_score: 0.63
  - option_id: "dynamodb"
    weighted_score: 0.605
scores:
  postgres: 0.79
  mongodb: 0.63
  dynamodb: 0.605
recommendation: "postgres"
recommendation_rationale: "Highest weighted score (0.79) driven by query flexibility and team familiarity. Operational overhead is manageable with RDS."
recommendation_confidence: 0.8
tradeoffs:
  - option: "postgres"
    pros:
      - "Most flexible query capabilities"
      - "Team already proficient"
      - "Strong ecosystem and tooling"
    cons:
      - "Highest operational overhead"
      - "Requires capacity planning"
  - option: "mongodb"
    pros:
      - "Flexible document model"
      - "Good middle ground on ops"
    cons:
      - "Team learning curve"
      - "Higher cost than alternatives"
  - option: "dynamodb"
    pros:
      - "Zero operational burden"
      - "Lowest cost at scale"
    cons:
      - "Significant team ramp-up needed"
      - "Query pattern limitations"
confidence: 0.85
evidence_anchors:
  - {ref: "aws:pricing-calculator:dynamodb", kind: x-doc}
  - {ref: "mongodb:atlas-pricing:m30", kind: x-doc}
  - {ref: "team_survey:db_experience:2024", kind: human_note}
assumptions:
  - "Workload remains mixed read/write"
  - "No need for global distribution initially"
  - "Team composition stable for 6+ months"
```

**Evidence pattern:** Read pricing documentation, survey team skills, analyze workload patterns.

---

#### Example 2: Compare Refactoring Approaches

**Input:**
```yaml
options:
  - "incremental refactoring"
  - "complete rewrite"
  - "strangler fig pattern"
criteria: ["risk", "time_to_value", "final_quality"]
weights:
  risk: 0.4
  time_to_value: 0.35
  final_quality: 0.25
```

Hard requirement: any option must maintain production uptime.

**Output:**
```yaml
options:
  - id: "incremental"
    summary: "Gradual refactoring while maintaining existing system"
  - id: "rewrite"
    summary: "Complete rebuild from scratch"
  - id: "strangler"
    summary: "Progressively replace components behind abstraction"
criteria:
  - name: "risk"
    weight: 0.4
    type: qualitative
  - name: "time_to_value"
    weight: 0.35
    type: qualitative
  - name: "final_quality"
    weight: 0.25
    type: qualitative
comparison_matrix:
  - option_id: "incremental"
    scores:
      - criterion: "risk"
        score: 0.85
        rationale: "Small changes, easy rollback"
      - criterion: "time_to_value"
        score: 0.7
        rationale: "Continuous improvement, but slow overall"
      - criterion: "final_quality"
        score: 0.6
        rationale: "May accumulate tech debt from compromises"
  - option_id: "rewrite"
    scores:
      - criterion: "risk"
        score: 0.3
        rationale: "Big bang cutover, high failure risk"
      - criterion: "time_to_value"
        score: 0.2
        rationale: "No value until complete"
      - criterion: "final_quality"
        score: 0.9
        rationale: "Clean slate, optimal design"
  - option_id: "strangler"
    scores:
      - criterion: "risk"
        score: 0.75
        rationale: "Component-level risk, rollback per component"
      - criterion: "time_to_value"
        score: 0.8
        rationale: "Each component delivers value"
      - criterion: "final_quality"
        score: 0.8
        rationale: "Good design with some integration overhead"
ranking:
  - option_id: "strangler"
    weighted_score: 0.78
  - option_id: "incremental"
    weighted_score: 0.735
  - option_id: "rewrite"
    weighted_score: 0.415
scores:
  strangler: 0.78
  incremental: 0.735
  rewrite: 0.415
recommendation: "strangler"
recommendation_rationale: "Best balance of risk and time-to-value (0.78 weighted score). Delivers incremental value while achieving good final quality; incremental refactoring is close behind (0.735), within the 0.1 margin."
recommendation_confidence: 0.75
tradeoffs:
  - option: "strangler"
    pros:
      - "Incremental value delivery"
      - "Manageable risk"
    cons:
      - "Abstraction layer overhead"
      - "Longer total timeline than rewrite"
confidence: 0.8
evidence_anchors:
  - {ref: "fowler:strangler-fig-pattern", kind: x-doc}
  - {ref: "internal:outage-report:2024-q3", kind: x-doc}
assumptions:
  - "Team can maintain abstraction discipline"
  - "System is decomposable into components"
```

### Verification

- [ ] All options evaluated against all criteria
- [ ] Criterion weights sum to 1.0
- [ ] All scores are in 0.0-1.0 range with rationale
- [ ] Recommendation aligns with highest weighted score
- [ ] Tradeoffs identify criteria where recommendation is not best
- [ ] Hard requirements (must-haves) properly filtered options

**Verification tools:** Manual review of scoring rationale, stakeholder validation

### Safety Constraints

- `mutation`: false
- `requires_checkpoint`: false
- `requires_approval`: false
- `risk`: low

**Capability-specific rules:**
- Require at least 2 options for comparison
- Document evidence for all scores, not just final recommendation
- Flag when options are within margin of error (< 0.1 weighted score difference)
- Do not hide tradeoffs to favor a recommendation

### Composition Patterns

**Commonly follows:**
- `classify` - Compare classified alternatives
- `measure` - Use measurements as comparison inputs
- `predict` - Compare based on predicted outcomes
- `discover` - Compare discovered options

**Commonly precedes:**
- `plan` - Comparison informs action planning
- `generate` - Generate solution based on chosen option
- `mutate` - Apply the chosen option

**Anti-patterns:**
- Never compare without explicit criteria (biased comparison)
- Avoid comparison with single option (not a real comparison)
- Do not use compare for simple existence checking (use `detect`)

**Workflow references:**
- See `reference/composition_patterns.md#capability-gap-analysis` for comparing plans
- See `reference/composition_patterns.md#observe-model-act` for comparison in decision loops
