Skip to content
Back to skills

Edsl Results Validation

ASecurity

Audit assignment coverage in saved EDSL Results against the planned Jobs, or item completion by wave using exposure and answer records. Compare simulated EDSL survey results with human responses. Check survey compatibility, choose population or record-level comparisons, and create a reproducible study-specific analysis script with clear uncertainty and limitations.

  • 523 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 25, 2026
ai-agentspythongosqlspringapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add expectedparrot/edsl --skill edsl-results-validation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Edsl Results Validation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Edsl Results Validation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/expectedparrot-edsl-results-validation/badge)](https://www.skillsdirectory.com/skills/expectedparrot-edsl-results-validation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: edsl-results-validation
description: Audit assignment coverage in saved EDSL Results against the planned Jobs, or item completion by wave using exposure and answer records. Compare simulated EDSL survey results with human responses. Check survey compatibility, choose population or record-level comparisons, and create a reproducible study-specific analysis script with clear uncertainty and limitations.
tags: [edsl, results, human-data, validation, analysis]
---

# Audit saved Results and compare simulated results with human responses

Use this skill when a user wants to understand whether simulated respondents
answer like real respondents, or wants to compare model-generated answers with
human judgments. The first task is to identify what kind of comparison their
study supports. Do not assume every human-versus-simulation comparison is the
same problem.

For item completion by wave, read the [exposure and answer audit](references/item-completion.md). For known complete exposure lists, run the [bundled numeric audit](scripts/item_completion.py) to compute the CSV from the saved rows. It counts zero-valued ratings and includes items that nobody saw.

Before handing off a CSV, reopen the delivered file with `ep inspect report.csv`. Check its headers, row count and sample. A label containing a comma must round-trip as one cell. The inspection checks record layout. Verify report values separately.

If the analysis depends on which question a respondent saw first, run `ep results exposure responses.ep --question shade --question lights`. Inspect recorded presentation times, ties and missing evidence. For model interviews, concurrent answers can finish in a different order from their prompts. Use the report’s separate completion-order and presentation fields.

For a grouped scorecard, cross-tabulation, or pooled comparison from a saved
Results file, `ep results sql feedback.ep --query-file analysis.sql --output report.csv`
can write the table directly. Query `self` and use qualified names such as
`[answer.rating]` and `[scenario.site]`. Discover the available names with
`ep results columns --file feedback.ep`. Give report columns their desired
headings with SQL aliases.

For comparing two models, use `ep results sql --pair` on saved Results. Supply the answer field. The CLI reports the two model names in left/right order. Use --levels LEFT RIGHT to set their order, or --across to compare another text field. Repeat `--on` for participant, scenario and iteration, and for any subgroup identifiers needed in the report. Use `SELECT * FROM pairs WHERE left_value <> right_value` for the disagreement list. When filling a supplied CSV layout, project the requested aliases in header order. The pairing summary distinguishes an absent record from a recorded omission. Check duplicate-key errors before reporting model agreement.

For a panel or roster comparison, load the other inputs in the same query with
`ep results sql before.ep --table followup after.ep --table roster roster.csv --query-file analysis.sql --output report.csv`.
The primary wave is `self`. Use `--as spring` if an existing query calls it
`spring`. Join using the study's identifiers. A dot inside an EDSL field name is literal. For a CSV with header `site` and a Results column named `scenario.site`, join them with
`FROM roster LEFT JOIN self AS s ON roster.site = s."scenario.site"`.
On a missing-column error, read the suggested field for that input. If the query
uses an alias such as `s`, check which table the alias names before applying the hint.
CSV identifiers stay text. Use a left join from the roster when invited people
with no responses belong in the denominator.

## Choose the estimand before writing code

There are two distinct goals:

- **Population-level response patterns:** compare answer distributions between
  the simulated sample and human sample. This is appropriate when there is no
  one-to-one correct human answer for each simulated respondent. Use marginal
  distributions overall or within comparable subgroups.
- **Record-level agreement:** compare predictions and human labels for the same
  underlying records, cases, or vignettes. This requires a stable shared record
  identifier and a defensible human reference label. Do not describe a marginal
  distribution comparison as record-level accuracy.

Ask one concise question if the user's goal or the shared unit is unclear. If
there are multiple human judgments per record, preserve them for an inter-rater
analysis or document how adjudicated labels were made; do not silently select
the first response or treat an unresolved majority as ground truth.

For unweighted percentages of a categorical answer or checkbox choice, run
`ep results rate results.ep --column answer.recommend --value Yes --group-by scenario.region`.
Inspect `total`, `answered`, and `matched` alongside `percent`. Add `--output rates.csv`
for a handoff, with repeated `--report-column FIELD HEADING` to select and label the CSV columns. Each result row counts once, including separate iterations.

For a survey-weighted share, add `--weight agent.survey_weight` (or the qualified
weight column from the data). Report `answered` for the number of actual replies,
`answered_weight` for the represented base, and `percent` for the weighted share.
Repeat `--value` for several choices in the same table, for example `--value Walking --value Cycling`.
Each group gets one row per requested choice, including choices selected by nobody.
Use `--report-column value Choice` to label the option in a CSV. Each percentage
uses the answering people in that group as its base, so checkbox shares can sum to more than 100%.
The CSV receipt reports output rows, filtered Results rows and answering rows; the latter two count each source row once across choices.
A recorded reply with weight zero still counts toward the number of replies.
A zero represented base yields a blank percentage in CSV.

For a quick count of distinct responses and group-level numeric means, use
`ep results review results.ep --column answer.choice --column answer.rating --group-by agent.district`.
For a before/after comparison within groups, pass both columns with separate `--group-by` flags. Use `joint_segment_summary` for the combinations and `segment_summaries` for pooled values.
Each segment's `count` includes every result row. Use `numeric_counts` for
the denominator of each mean. When preparing a complete frequency table, check
`values_truncated` and `groups_truncated` before reporting the displayed rows.

## Inspect inputs and check comparability

Read the project files and inspect both `Results` objects before choosing
columns or metrics. Use `ep inspect <file.ep>` for local packages and the
available `Results` APIs for loaded objects. Humanize results can be retrieved
with `Coop().get_human_survey_responses(uuid)` when the user supplies or has
already authorized use of the survey UUID. Do not publish data, submit a job,
or contact respondents as part of this analysis.

When certifying that saved simulation Results cover a planned sample, run `ep results check-assignments pilot.ep --against study.ep --iterations 2` with the intended number of iterations. The command checks the joint respondent, scenario, model and iteration, including the contents of each assigned component. Inspect the error's counts and examples for missing or duplicated waves and changed stimuli. A matching row count alone can hide a missing respondent or iteration. Check completed answers separately.

Before calculating a comparison, make a compact compatibility table for every
question being considered:

| Check | What to verify |
|---|---|
| Identity | Both datasets contain the same intended item; matching names alone are not proof. |
| Type and scale | Question types, option labels, value coding, and scale direction agree. |
| Wording and conditions | Question wording, instructions, question order, and relevant scenario text are equivalent. |
| Routing and missingness | Skips, nonresponse, failed answers, and partial submissions have the same inclusion meaning. |
| Sampling unit | Identify a human respondent, simulated agent, scenario/record, model, and iteration; determine which rows are independent. |
| Subgroups and weights | Verify variables have the same definitions and coding on both sides; inspect missing and invalid weights. |

To investigate a missing answer, run `ep results outcomes results.ep --question q0 --column scenario.visit`. The saved task status, validation evidence, failure stage, and known provider-call count help distinguish a skip from a failure. Treat a blank with insufficient evidence as unknown. Use the recorded cause when deciding which respondents enter a denominator.

Stop or narrow the analysis when a material mismatch remains. Explain the
mismatch and either harmonize it with a documented rule, compare only the
compatible questions, or ask the user how to proceed. Never silently equate
different labels or reverse-coded scales.

## Build a study-specific analysis

This capability is an analysis workflow, not a built-in `ResultsFidelity`
method. Create a small, readable Python script in the study's existing analysis
directory (or ask where to save it if there is no clear location). The script
should load the user's existing result artifacts, perform the checks above,
calculate the selected comparison, and save machine-readable tables plus a
short interpretation. Do not rerun model jobs or collect human responses to
complete the comparison unless the user asks.

Prefer the smallest set of methods that answer the research question:

- **Nominal, single-choice answers:** show option shares side by side and a
  per-option difference. Total variation distance (TVD) is a useful compact
  summary: half the sum of absolute share differences, bounded from 0 (same
  shares) to 1 (no overlap). Jensen-Shannon distance is another bounded summary
  when a symmetric information-based measure is useful. Include the option
  table so the summary is interpretable.
- **Ordinal scales:** report the full category distribution and an ordinal
  summary such as mean/median or cumulative-share differences. Treating ordered
  categories as nominal may discard useful information; explain the metric if
  using TVD or Jensen-Shannon distance.
- **Numeric responses:** inspect range, units, and shape; compare meaningful
  summaries or distributions. Bin only with substantively justified cut points
  and report them.
- **Checkbox / multi-select answers:** compare selection rates separately for
  each option. These are not a single-choice distribution and their shares need
  not sum to one.
- **Free text:** use a documented coding rubric or a separate evaluation
  instrument. Do not compare raw string equality as if it measured semantic
  agreement.
- **Same records with reference labels:** join by the stable record identifier,
  validate join cardinality, report unmatched rows, then use a task-appropriate
  agreement measure. Keep human disagreement visible when there is no adjudicated
  reference.

Subgroup comparisons are useful only when the subgroup has the same meaning on
both sides and enough observations to interpret. Always report unweighted row
counts for each side and group. If using survey weights, validate finite,
non-negative values, explain the weighting target, and distinguish respondent
counts from weighted shares. Report effective sample size when weights vary
substantially.

## Uncertainty and dependence

Use uncertainty estimates only after identifying the sampling unit and design.
For independent respondent samples, a respondent-level bootstrap can show how
sample variation affects the distance. For repeated observations of the same
person, multiple iterations of an agent, clustered scenario assignment, or
repeated model runs, resample at the independent cluster (or use a suitable
design-based method); row-wise resampling would understate uncertainty.

A nonnegative distance has finite-sample upward bias, so a percentile bootstrap
interval can remain above zero even when samples come from the same population.
Do not interpret “interval excludes zero” as a test that the distributions
differ. If useful, compute a human split-half reference by repeatedly dividing
the human respondents into two groups and comparing their distributions. Label
it as a descriptive sampling-noise reference, not a significance threshold or
formal pass/fail criterion. State that half-samples are smaller than the full
human sample and therefore generally have more sampling variation.

Report methodological choices alongside results: included questions, exclusions,
missing-answer rule, weight variable, subgroup definitions, resampling unit,
metric, random seed, and number of resamples. Do not claim representativeness or
population validity from a convenience sample or a distance score alone.

For a small preview, run `ep results head results.ep --limit 2`. For a handoff, `ep results export results.ep --column "answer.*" --limit 10 --output preview.csv` writes up to ten matching rows. Use `--limit 0` for a header-only CSV. The Results path can also be supplied with `--file`.

## Deliverables

Create a reproducible analysis script and save outputs beside it, typically:

- a question compatibility table;
- a per-question (and per-model/subgroup, when relevant) summary table;
- option-level shares and differences;
- optional uncertainty estimates with the sampling unit stated;
- a concise Markdown interpretation noting limitations and unresolved mismatches.

Keep outputs traceable to source result files and avoid overwriting existing
reports. Before finishing, summarize which comparison was performed, what was
excluded, where the script and outputs were saved, and what the results can and
cannot establish.

## Related EDSL workflows

Use `edsl:edsl-human-survey` for deploying and retrieving human surveys, and
`edsl:edsl-prolific` when the user wants a paid, screened sample.

For a cost handoff, `ep inspect source.json --save results.ep` creates the shareable package. Run `ep results cost results.ep` on the saved copy to verify the recorded fresh, cached, and unknown amounts and review gaps.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.