human(ish)

Make participants behave like your users

Build personas from your real sessions, and choose the mission and typing setting your users need.

In our runs, a persona that stated what one real person did changed how participants used the app, and a persona that described who someone was changed it very little. This page covers what those runs showed, how to build personas from an export of your own sessions, and what to keep out of that export.

What our runs showed about personas and missions

These are observations from our own studies of one app, with 24 participants a run. Other apps and other models may behave differently.

Stating what the person does and knows moved behavior; a written background did not. Adding four written personas left path, pace, help use and retries within the spread between reruns. When each participant instead got a persona built from one real session (how much of the app that person looked at, which help they used, how long they stayed, whether they came back), participants followed the outcomes those personas stated, and followed habits about how the person goes about a step more loosely (the runs below have the counts). Two measures no persona stated, rounds skipped and games finished, moved toward the real users' values in both runs; taken over every unstated measure, the change was inside the run-to-run noise.

A persona that named a feature sent participants to that feature. In our runs, each participant whose persona mentioned a page went to that page. Name a feature in a persona only when the real person used it.

Holding a participant for a real session's length kept it in the app. It did not make the participant use the app the way the real person did. participants[].maxSessionMs and endAfterMs set how long a session lasts; in our runs, what happened in that time came from the persona's habits and the mission.

Check the typing setting and the mission. Participants get a short paragraph about typing in a chat or a search box as people do: a few plain words, one thing at a time. Anything else they write is as long as the person would make it. actor.typing replaces that paragraph with your own text, and false drops it. Replace it for a persona who writes formally in chat. A study with no actor.mission gives each participant the built-in mission: try the app for the first time, for a real first sitting, long enough to get what they came for and to know whether they would come back. Write your own mission when your users arrive with a job, such as booking a table or planning a trip a friend shared.

Build personas from an export of your sessions

Export one row per session, with only the columns that are measures: numbers and true/false values. Any analytics tool that can export a table works. A sketch for a trip planner's events table, in the PostgreSQL dialect (FILTER and BOOL_OR):

SELECT
  COUNT(*) FILTER (WHERE event = 'stop_added')                            AS stops_added,
  COUNT(*) FILTER (WHERE event = 'route_compared')                        AS routes_compared,
  BOOL_OR(event = 'plan_shared')                                          AS shared_the_plan
FROM events
GROUP BY session_key;

The query groups by a session key and does not select it. Save the result as JSON Lines, one session per line, or as one JSON array:

sessions.jsonl
{"stops_added": 3, "routes_compared": 2.1, "shared_the_plan": false}
{"stops_added": 1, "routes_compared": 4, "shared_the_plan": true}

Look at what the personas would say first, then build them:

npx humanish personas build sessions.jsonl --dry-run
npx humanish personas build sessions.jsonl --count 24

--dry-run prints each field the command would use and each it would skip, with the reason, and the first persona's text, and writes nothing. The build prints the same list before it writes.

The command reads fields whose values are all numbers or all true and false. null means the session has no value, and that line is left out of its persona. It skips text, lists and objects. It also skips a field whose name looks like an identifier, a time, a place or a person (session_id, userid, api_token, created_at, start_time, epoch_ms, phone, zip, display_name, and a field named just session or user), and a field with a number of a billion or more in any session, whole or not, which is usually an id or a time. These checks catch common names only, so a numeric id under an ordinary name still gets through: export only the columns that are measures. --measures stops_added,shared_the_plan reads only the fields you name, including one these checks would skip, and naming a text field is an error that says why.

It draws --count sessions, every session up to 50 by default, with --seed (default 1). The same export and seed give the same files. When --count is above the number of sessions, sessions are used more than once, evenly, and the output says so.

Each persona goes to .humanish/local/personas/visitor-001.yaml and on, a folder humanish init adds to .gitignore. In a git repository, the command asks git whether it ignores that folder and warns when it does not. --prefix changes visitor, and --force replaces files that are already there. A rebuild with a smaller --count keeps the higher-numbered files from the earlier build and lists them so you can delete them. A file holds a neutral name and a background built from that session's measures, and nothing else from the export:

.humanish/local/personas/visitor-001.yaml
schema: humanish.persona.v1
id: visitor-001
name: Visitor 1
background: |-
  How this person used this app on an earlier visit, which is how they use it now:
  - stops added: about 3
  - routes compared: about 2.1
  - shared the plan: no

A field name becomes words, from snake_case or camelCase. Below 1,000, a number is rounded to a whole number, or to one decimal below 10; from 1,000 it keeps three significant digits. An exact 0 reads 0, and any other number reads about and the rounded value. The command ends with a participants: block that gives each participant one persona. Paste it into your study file and run npx humanish study check <study>.

The persona's text goes to the participant's model provider with every request, and the run bundle keeps it in each participant's persona brief.

Start with no configuration, then add a habits file where a habit is not followed

We ran personas from this command on a web game played in rounds, on one model, with a 15-minute session cap and 12 to 24 participants a run. Other apps and models may differ. Those runs showed:

  • With no habits file, 24 participants with lines phrased from the field names followed the outcomes their personas stated. A stated accuracy and the participant's actual accuracy correlated at r 0.90. Of the 8 personas that said the person started another game, 6 participants did; of the 16 that said no, none did. They followed habits about how the person goes about a step loosely: participants looked at about a third of the stated number of items per round.
  • With a habits file that gave one sentence per measure saying what the person does, 12 participants built from the same sessions followed the items-looked-at habit at r 0.99, at about three quarters of the stated number.
  • A stated count the session cap could not fit was not reached: personas stating 40 or more rounds played 5 to 10 inside the 15-minute cap.
  • A habit the app gives no control for was not followed in either run. The personas stated how often the person used hints, and in that app a hint appears after a wrong guess; there is nothing to press. State what the person does, such as how often they guess when unsure, and leave out what the app does in response.

So start with no configuration and read what participants did. For a habit about how the person goes about a step, add a sentence that says what they do, such as they compare about {value} routes before they pick one. Set participants[].maxSessionMs or execution.timeoutMs long enough for the longest sessions you want reproduced.

Phrase each habit in your own words with a habits file

--habits habits.yaml gives your own intro and a sentence for each measure. A number takes a sentence for zero, used for an exact 0, for one, used when the value rounds to 1, and for any other value; {value} is the rounded value. A true/false field takes a sentence for true and for false. A measure the file does not list keeps the default line. A recipe site's file might read:

habits.yaml
schema: humanish.habits.v1
intro: "How this cook uses the recipe site on any visit:"
measures:
  recipes_opened:
    zero: they leave before opening a recipe
    one: they open one recipe and cook it
    other: they open about {value} recipes before choosing one
  saved_a_recipe:
    "true": they save the recipe they cook
    "false": they never save a recipe

Quote "true" and "false" so YAML reads them as names. Each sentence is one line of at most 280 characters. A key, a form, a placeholder or a brace the file does not take is an error, and so is a form that does not fit the field, such as one on a true/false field.

Show how a person writes with writing samples

The builder never reads text. Writing samples are a separate step you take on purpose. When participants type into your app, a persona's writing_samples gives a few short messages a real person typed, so the participant writes in their manner. Choose them by hand, remove names, addresses and anything else that identifies someone, and keep such personas in .humanish/local/personas/. Persona files lists the field.

Keep people out of the export

The builder reads only numbers and true/false values, and checks names and sizes for ids, but your export is still yours to check. Do not export names, emails, user ids, session ids, IP addresses, timestamps, free text people typed, or anything else that identifies a person. Keep the export and the built personas out of git: humanish init adds .humanish/ to .gitignore, and the export file belongs there too.

Edit this page on GitHub