syndisco.Persona

class Persona(username: str = '', age: int = -1, sex: str = '', sexual_orientation: str = '', demographic_group: str = '', current_employment: str = '', education_level: str = '', special_instructions: str = '', personality_characteristics: list[str] = <factory>)

Bases: object

A dataclass holding information about the synthetic persona of a LLM actor. Includes name, Sociodemographic Background, personality and special instructions.

age: int = -1
current_employment: str = ''
demographic_group: str = ''
education_level: str = ''
static from_json_file(file_path: Path) list

Generate a list of personas from a properly formatted persona JSON file.

Parameters:

file_path (Path) – the path to the JSON file containing the personas

Returns:

a list of LlmPersona objects for each of the file entries

Return type:

list[LlmPersona]

personality_characteristics: list[str]
sex: str = ''
sexual_orientation: str = ''
special_instructions: str = ''
to_dict()
to_json_file(output_path: str) None

Serialize the data to a .json file.

Parameters:

output_path (str) – The path of the new file

username: str = ''