Repository navigation
feat(population): population packs and the global-respondents pack - #593
Merged
Merged
Conversation
Population conditioning belongs in althing, the conditioning harness, so benchmarks ask althing which personas answer instead of building their own. - althing.population: filter_personas (narrow a pack by attribute), allocate_population (split a sample budget across population members, repeats weighted, deterministic per seed), parse_population, load_pack_personas. - Bundled global-respondents pack: one minimal respondent persona per country (107, plain names), covering every GlobalOpinionQA country. - persona_system_prompt states country / gender / region when present (no bundled pack set them before, so existing prompts are unchanged). - `althing panel run --population "country=France,Japan"`. - Docs: population packs section, pack counts (15 packs, 339 personas). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
auto-tag.yml's bump push to main is rejected (GH013): the release-bot app is not a bypass actor on the main ruleset, so every auto-tag run since July has failed and nothing has published after 1.7.0. Pre-bumping in the PR takes the workflow's documented escape hatch: on merge it finds the artifacts already at the new version, skips the push, and tags, releases, and publishes v1.8.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying synthpanel with
|
| Latest commit: |
ecaf3ba
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f51ae57d.synthpanel.pages.dev |
| Branch Preview URL: | https://feat-population-packs.synthpanel.pages.dev |
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 population conditioning to Althing, so benchmarks ask Althing which personas answer instead of building their own conditioning. This came out of a SynthBench experiment where conditioning each GlobalOpinionQA question on the countries that answered it lifted Haiku 5.5 from 0.742 to 0.817 SPS. The first version put that logic in SynthBench; this PR moves the conditioning into Althing, where the persona harness lives. The companion SynthBench PR passes its question metadata to these APIs.
Changes
althing.populationfilter_personas(personas, {"country": [...]})keeps personas whose attributes match (case-insensitive). If nothing matches, the error names the values the pack doesn't cover.allocate_population(personas, key=, members=, n_samples=, seed=)splits a sample budget across population members. Each member gets an equal share, and a member listed twice gets twice the share, so pooled answers match a ground truth that averages over those groups. It's deterministic for a given seed.parse_population("country=France,Japan;gender=female")andload_pack_personas(pack_id).global-respondentspack: one minimal persona per country (name,country,background), 107 countries, using plain names that cover every GlobalOpinionQA country. It has no other demographics, so a run measures country conditioning alone. Richer packs can be added later and compared withpack calibrate.persona_system_promptnow statescountry,gender, andregionwhen a persona has them. No bundled pack set these fields before, so existing prompts are unchanged (a test pins the old output).althing panel run --population "country=France,Japan"narrows a panel to matching personas.docs/, and a CHANGELOG entry.Testing
tests/test_population.py(15 tests): population parsing, filtering, even and repeat-weighted allocation, more members than samples, determinism, unknown members, persona prompt with and without attributes, and pack integrity.test_mcp_data.pyis updated for 15 bundled packs.mainon Windows, and none are new.--persona-pack global-respondentswithclaude-code:haiku, end to end through these APIs.scripts/check_site_cli_sync.pypasses. Ruff and mypy show nothing new.Release note
SynthBench's
--persona-packneeds a published Althing that includesalthing.population. Until then, the SynthBench tests that use it skip.Release
This PR pre-bumps
__version__and the rendered version artifacts to 1.8.0. Merging withsemver:minormakesauto-tag.ymltagv1.8.0(latest tag is v1.7.0), create the GitHub Release, and dispatch the PyPI publish. The pre-bump is needed because the workflow's own bump push tomainhas failed with GH013 on every merge since July: the release-bot app isn't a bypass actor on the main ruleset. 1.8.0 also ships the subscription CLI providers (#592), which never published.🤖 Generated with Claude Code