Repository navigation
feat(althing): condition GlobalOpinionQA on althing population packs - #359
Merged
Merged
Conversation
Contributor
Dataset change detectedThis PR touches Before this PR can merge:
The Touched files: |
the-data-viking
marked this pull request as draft
October 10, 2026 00:28
GlobalOpinionQA's ground truth (without --country) averages over the
countries that answered each question. `--persona-pack global-respondents`
has althing answer each question with personas from those countries:
SynthBench supplies the question's respondent population, althing (the
conditioning harness) allocates samples and renders the personas.
- Question.respondent_population ({"country": [...]}, repeats kept);
GlobalOpinionQA fills it with plain country names (canonical_country
maps "Brazil (Non-national sample)", "S. Korea", ...).
- AlthingProvider(persona_pack=...): get_population_distribution uses
althing.population.allocate_population + persona_system_prompt and
pools per-persona samples; provider name gets `pack=<id>`, so these
runs hash to their own config_id; the pack content feeds the prompt
hash.
- Runner sends each question's population to a pack provider and stamps
config.persona_pack; datasets without populations exit 2 up front.
- `synthbench run --persona-pack` (althing only).
- providers.base.pool_distributions.
Uses survey-design metadata (which countries were asked), never answers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
the-data-viking
force-pushed
the
feat/country-mix-conditioning
branch
from
October 10, 2026 00:40
5298ad6 to
79b8a81
Compare
the-data-viking
marked this pull request as ready for review
October 10, 2026 01:04
the-data-viking
added a commit
that referenced
this pull request
Oct 10, 2026
althing 1.8.0 ships althing.population and the global-respondents pack, which --persona-pack (#359) calls. With 1.7.0 the flag fails with an upgrade message and the population tests skip. Co-authored-by: the-data-viking <wesley@thedataviking.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
the-data-viking
pushed a commit
that referenced
this pull request
Oct 10, 2026
--persona-pack (#359) gave conditioned runs their own config_id, but the leaderboard grouped rows by (display name, framework, dataset, effort, template), so a conditioned run silently merged with the same model's unconditioned run. - publish: persona_pack joins the dedupe, run-count, coverage, and per-question rollup keys; entries and run-index rows carry persona_pack. - leaderboard: _parse_provider_base strips " pack="; MODEL_MAP entries for the subscription-CLI providers (althing/claude-code:haiku, althing/codex:gpt-6-luna) as product rows. - findings: the ensemble-vs-best-single comparison excludes persona-pack rows (the lever measured is blending, not conditioning). - site: SynthBench Index keys and labels variants by persona pack; explore shows a pack= tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
the-data-viking
added a commit
that referenced
this pull request
Oct 10, 2026
… (+ persona-pack leaderboard rows) (#361) * fix(leaderboard): keep persona-pack runs as their own rows --persona-pack (#359) gave conditioned runs their own config_id, but the leaderboard grouped rows by (display name, framework, dataset, effort, template), so a conditioned run silently merged with the same model's unconditioned run. - publish: persona_pack joins the dedupe, run-count, coverage, and per-question rollup keys; entries and run-index rows carry persona_pack. - leaderboard: _parse_provider_base strips " pack="; MODEL_MAP entries for the subscription-CLI providers (althing/claude-code:haiku, althing/codex:gpt-6-luna) as product rows. - findings: the ensemble-vs-best-single comparison excludes persona-pack rows (the lever measured is blending, not conditioning). - site: SynthBench Index keys and labels variants by persona pack; explore shows a pack= tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * data(globalopinionqa): Haiku 5.5 and GPT-6 Luna via subscription CLIs Five 100-question x 30-sample GlobalOpinionQA runs, produced with althing 1.8.0 subscription providers (claude-code:haiku, codex:gpt-6-luna) under option parser v2 and refusal detector v3: - Haiku 5.5: natural 0.695, structured 0.742, structured + global-respondents pack 0.815 - GPT-6 Luna: structured 0.765, structured + global-respondents pack 0.809 Gated human_distribution stripped; all five pass synthbench validate --rehydrate-canonical. Findings block and FINDINGS.md regenerated (adds the Haiku 5.5 natural vs structured elicitation comparison). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: the-data-viking <wesley@thedataviking.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
synthbench run --persona-pack <id>(althing provider only). It conditions GlobalOpinionQA questions on an Althing population pack, e.g.global-respondents.Without
--country, a GlobalOpinionQA question's ground truth is the unweighted mean over the countries that answered it. Runs used to answer every sample under one generic persona with no country. With--persona-pack global-respondents, SynthBench passes each question's respondent population, and Althing chooses the personas from the pack and splits the samples across them. Althing is the conditioning harness (DataViking-Tech/Althing#593); SynthBench only supplies dataset metadata and measures the result.The conditioning uses survey-design information (which countries were asked each question). It never sees the human answers.
Changes
Question.respondent_population:{"country": [...]}, with one entry per group the ground truth averages over (repeats kept). GlobalOpinionQA fills it with plain country names:canonical_country()turns "Brazil (Non-national sample)" into "Brazil" and "S. Korea" into "South Korea". So a country surveyed twice gets twice the weight, as it does in the human average. With--country Xthe population is just X.AlthingProvider(persona_pack=...):get_population_distribution()callsalthing.population.allocate_populationand renders each persona with Althing'spersona_system_prompt. It samples each persona's share and pools them by sample count (providers.base.pool_distributions). The provider name getspack=<id>, which gives these runs their own config_id, and the pack's content feeds the prompt-template hash.config.persona_pack, and fails early (exit 2) on datasets without populations.--persona-pack. Non-althing providers reject it.Results
Haiku 5.5 (
althing/claude-code:haiku), GlobalOpinionQA, the same 100 questions (question_set_hash4f27a038…), 30 samples per question, structured elicitation. These come from realsynthbench runinvocations:--persona-pack global-respondentsDependencies
althing.population(feat(population): population packs and the global-respondents pack Althing#593). Until then, the tests that need it skip withimportorskip, and--persona-packfails with an "upgrade althing" message. Once Althing is released,pyproject.toml'salthing>=can be bumped.Testing
tests/test_population_conditioning.py(16 tests):canonical_countrymappings, and the population with repeats and with--country;AlthingProvider.get_population_distributionwith a fake client (repeat weighting, Brazil 20 / Japan 10).mainon Windows.🤖 Generated with Claude Code