Survey into a new Survey that asks a language model to estimate response distributions for a target population. The source survey supplies the question wording, answer choices, and skip logic. Describe the target population on an Agent, then run the converted survey with one or more models.
These are model estimates, not responses from a real sample or measurements from a representative poll. Use them for structured exploration, and compare them with real survey data before relying on them.
Basic conversion
Create a regular survey as usual, then callto_meta_survey():
sample_size=100 asks the model to report approximate counts as well as probabilities. It does not create 100 simulated respondents or force percentages to exact whole numbers.
What gets generated
The conversion is based on each source question’s type and fixed response space:
Generated names use the source question index and name, for example
meta_0_likely_vote and meta_1_vote_choice. Dynamic response options and unsupported question types currently raise ValueError; they are not silently converted.
Free-text questions: propose a codebook, then estimate it
When every model generates its own theme labels, its distributions are difficult to compare. Use a two-step workflow when you want a common theme distribution:- Generate a candidate codebook once with
to_meta_theme_survey(). - Review and edit the labels.
- Pass the same approved labels to
to_meta_survey()for every model and run you want to compare.
QuestionList per source free-text question. It constrains each list to exactly num_themes labels. The Agent used for this auxiliary run may include the target population description when the proposed categories should reflect that population.
QuestionDistribution outcomes; if that source question has a skip condition, it adds Skipped by survey logic as another outcome. A question without a supplied codebook continues to use the generated-theme QuestionDict format.
Interpreting the denominator
The distribution for a fixed-codebook free-text question includes all members of the target population, including those skipped under survey logic. Ifk is the probability of a theme and r is the non-skipped share, the theme’s share among respondents who reached the question is k / r.
For the example above, the “why not vote?” question is asked only of people whose source answer is Unlikely. The generated distribution contains all seven theme shares and the share skipped because the respondent answered Likely. To compare reasons among non-voters, divide each theme probability by the sum of the seven theme probabilities (equivalently, by one minus the skipped share). EDSL returns the full-population distribution; it does not automatically renormalize it for analysis.
Themes for a “main reason” question should be mutually exclusive and collectively exhaustive, with an “Other” category when appropriate. For questions where multiple themes can apply to a response, use a multi-label design rather than interpreting a single-choice distribution as joint selections.
How skip logic is represented
If an earlier source question determines whether a later question is asked, the generated survey estimates the earlier distribution first and pipes it into the follow-up prompt. In the example,vote_choice includes a skipped outcome for respondents estimated as “Unlikely.” The free-text reason question, if added, would instead be skipped for respondents estimated as “Likely.”
Skip handling is currently prompt-guided. The model is instructed to use the piped distribution and return the corresponding skipped share, but the program does not yet compute that share or enforce cross-question consistency in Python. A response can pass its own distribution validation and still disagree with an earlier answer. Check the skipped outcomes against the source distributions before interpreting branch estimates.
Customize the framing
question_framing changes the lead-in used on generated estimate questions. It defaults to "For the population described by you":
Supported arguments
sample_size:Noneor a positive integer. When set, the prompt requests approximate respondent counts in addition to proportions.question_framing: Non-empty lead-in text included in each estimate question.themes_by_question: Optional mapping from source free-text question names to lists of fixed theme labels.
num_themes must be an integer of at least 2; it is the exact number of labels requested per question.
Inspecting results
Read the generated answer columns to see the distributions and validation flags:QuestionDistribution answers. Validation does not establish that an estimate is accurate, representative, or consistent with external evidence.
Limitations
- Cross-tab generation is not part of
to_meta_survey(). - Checkbox options and rank positions are estimated as separate marginals, not coherent joint response patterns.
- Uncoded free-text questions ask the model to invent labels;
QuestionDictchecks required fields and types but not list-length equality or probability arithmetic. - Piped/dynamic response options cannot be converted mechanically because the complete outcome space is not statically available.
- Skip shares are requested in prompts but not calculated or enforced across questions.
- The method currently supports multiple choice, yes/no, linear scale, checkbox, rank, and free-text questions.
