survey.humanize() or survey.preview()), you can pass a humanize schema to control styling and optionality per question. The schema is validated against your survey before use.
Fields
dict
Map of question name (string) ->
HumanizeQuestionSchema.dict
Optional survey-level options (e.g. custom CSS).
HumanizeQuestionSchema (per question)
Eachquestions[question_name] value is a HumanizeQuestionSchema object.
boolean
default:false
Whether the question is optional. Default is
false when omitted.Supported question types: free_text, budget, checkbox, checkbox_with_other, file_upload, interview, likert_five, linear_scale, list, matrix, multiple_choice, multiple_choice_with_other, numerical, rank, top_k, yes_no.Note: optional currently has no effect for interview and rank.dict
Display format. Varies by question type:
- MC-style (
likert_five,linear_scale,multiple_choice,yes_no):"radio"(list of radio buttons) or"dropdown"(single<select>). Default is"radio". Use{"type": "radio"}or{"type": "dropdown"}. - Numerical (
numerical):"input"(number input field) or"slider"(range slider). Default is"input". Use{"type": "input"}or{"type": "slider", "min": 0, "max": 100, "step": 1}. For slider,minmust be less thanmax,stepmust be positive and not exceed(max - min). - Matrix (
matrix):"table"(the whole grid at once) or"carousel"(one item at a time). Default is"table". Use{"type": "table"}or{"type": "carousel"}.
format.dict
Matrix only (
matrix). Cells checked before the respondent touches the grid. Omit or set to null for an empty grid, which is what matrices render by default.A preselection changes what the question measures: it puts an answer in front of the respondent and asks them to disagree with it, so the answers lean toward the preselected column. It also removes the blank — a row left alone is recorded as the preselected option and cannot be told apart from a considered answer. Both are usually the point (a long grid where most rows are expected to be neutral is far cheaper to finish), but they are worth deciding before fielding rather than after.dict
Multiple choice only (
multiple_choice). Optional custom validation rules.array
default:[]
Checkbox only (
checkbox, checkbox_with_other). Options that stand alone: checking one clears every other selection — including any other exclusive option, and for checkbox_with_other the respondent’s “other” entries — and selecting anything else clears it. Use for options like "None of the above" or "Prefer not to say".Each entry must be the exact text of an option in the question’s question_options — matching is literal, so surrounding whitespace is not trimmed for you. Entries must be non-empty and unique. Because an exclusive option is an ordinary member of the option list, the submitted answer looks like any other selection. Defaults to an empty list, meaning no option is exclusive.string
default:"text"
Interview only (
interview). Controls the input mode offered to respondents."text"— text-based interview (default)."voice"— voice-based interview."both"— respondent can choose between text and voice.
dict
Interview only (
interview). The intro screen shown to the respondent before the interview begins. The intro screen is always shown; this field customizes its text. Omit or set to null to use the default text ("This will be a conversation with an AI agent.").dict
Interview only (
interview). Optional configuration for voice-mode interviews. Ignored when interview_mode is "text".dict
Interview only (
interview). Optional configuration for text-mode interviews. Ignored when interview_mode is "voice".dict
Optional comment input shown with the question.
Submitted comment text appears in survey results under
comment.{question_name}_comment.Supported question types: free_text, budget, checkbox, checkbox_with_other, likert_five, linear_scale, list, matrix, multiple_choice, multiple_choice_with_other, numerical, rank, top_k, yes_no.dict
Optional indicator shown after the respondent clicks Next, while the following question runs. Omit or set to
null for no indicator.Supported question types: free_text, budget, checkbox, checkbox_with_other, file_upload, likert_five, linear_scale, list, matrix, multiple_choice, multiple_choice_with_other, numerical, rank, top_k, yes_no.Note: not supported for compute or image_generation (both run in the background and auto-advance, so neither is ever the question a respondent submits), or for interview.Example
Validation
If the schema is invalid, Expected Parrot raisesHumanizeSchemaValidationError. Common causes:
- A key in
questionsis not a question name in the survey, or is an instruction. - A question’s type is not supported for humanize schema (e.g.
demand,dropdown). - A question’s entry has the wrong shape for its type (e.g. wrong field types or extra fields that aren’t allowed).
- Top-level structure is invalid (e.g.
questionsnot a dict, or an entry not a dict).
survey.preview(humanize_schema=...) to get a preview URL.
Ensure your humanize schema matches the parameters above for each question type in your survey.