Population model creation is a paid feature on the Play and Launch pricing plans. Visit the account page in the dashboard to upgrade.
Prerequisites
Before creating a population, ensure you have:- Seed data from a target group of users or customers in the required CSV format
- A valid Semilattice API key
- A paid subscription on the Play or Launch pricing plans
- The Semilattice SDK installed
Creating a population
Parameters
Parameter | Type | Description |
---|---|---|
name | string | Display name for your population |
seed_data | file/path | CSV file containing tabular QA pair data |
population_options | object | Tells the API about the data in your seed data file |
description | string | Detailed description or documentation link (optional) |
reality_target | string | Description of the target user profile (optional) |
data_source | string | Description of where the seed data comes from (optional) |
effective_date | date | Date when the data was sourced in reality (optional) |
run_test | boolean | Whether to automatically test the population after creation |
Population options
Population options tell the API how to process your seed data. Semilattice supports single-choice, multiple-choice, and open-ended question types in seed data, so the API needs to know which of these types each column in the dataset represents.question_options
key. The value of question_options
should be a valid JSON list containing one object for each question column in the dataset. The sim_id
column does not need to be referenced.
Question options field descriptions:
-
question_number
: A 1-based index reference to the column in the seed data file these questions options describe. For example, when setting question objects for the 3rd question column in the dataset, which would be the 4th column in the CSV after thesim_id
column, thequestion_number
should be3
. -
question_type
: An enum describing the question type for that question column. Must be one of:single-choice
,multiple-choice
,open-ended
. -
limit
(optional): Formultiple-choice
questions only, this sets the maximum number of choices respondents were allowed to select.
- The
question_options
list must contain one object for each question column in the seed data file. - The
question_number
values should be integers corresponding to the 1-based column positions in your CSV file. The order of the question option objects doesn’t matter, but we suggest sequential ordering to avoid confusion. - The
question_type
specified for a column must match the actual data for that column in the CSV.
Population status flow
When you create a population, it goes through several status stages:1. Processing
Initially, your population will have a status of Processing
while Semilattice processes and stores your data.
2. Untested
Once processing completes, the status changes to Untested
. At this point:
- The population is ready to make predictions
- We don’t yet know its estimated accuracy
3. Testing
When you trigger accuracy testing, either automatically or manually (see below), the status changes to Testing
while Semilattice evaluates the population’s prediction accuracy.
4. Tested
Once testing completes, the status becomes Tested
and the population will have accuracy metrics available for review.
Testing population accuracy
To understand how accurate your population will be, you need to run a population test.Option 1: Automatic testing
Setrun_test=True
when creating the population:
Processing
→ Untested
→ Testing
→ Tested
Option 2: Manual testing
Alternatively, you can trigger testing manually on anUntested
population:
Understanding test results
Once testing is complete, your population will have:- Status:
Tested
- Accuracy metrics: Estimated accuracy scores