The configuration parameters are stored in a config.json
file having the following structure:
{
"servers": {
"llm": "http://127.0.0.1:11434/v1",
"api": "http://127.0.0.1:5000/"
},
"simulation": {
"name": "simulation_name",
"client": "YClientBase",
"days": 365,
"slots": 24,
"starting_agents": 1000,
"new_agents_per_iteration": 10
"hourly_activity": {...},
"actions_likelihood": {
"post": 0.2,
"comment": 0.3,
"read": 0.1,
"share": 0.1,
"reply": 0.1,
"search": 0.05,
"news": 0.1,
"cast": 0.05
}
},
"agents": {
"education_levels": ["high school", "bachelor", "master", "phd"],
"languages": ["english"],
"max_length_thread_reading": 5,
"reading_from_follower_ratio": 0.6,
"political_leanings": ["Democrat", "Republican", ...],
"age": {"min": 18, "max": 80},
"round_actions": { "min": 1,"max": 3},
"nationalities": ["Italian", "French", "German", ...],
"llm_agents": ["llama3", "mistral"],
"n_interests": {"min": 4, "max": 10},
"interests": [...],
"big_five": {...},
"attention_window": 336
},
"posts": {
"visibility_rounds": 36,
"emotions": {...}
}
}
The servers
section contains the URLs of the YServer
(api) and of the Large Language Model(s)
(llm) one.
The simulation
section contains the parameters that define the simulation:
name
: the name of the simulation;client
: the name of the client implementation that will be used to run the simulation, default is YClientBase
;days
: the number of days the simulation will last;slots
: the number of slots in a day;starting_agents
: the number of agents that will be created at the beginning of the simulation by the YClient
;new_agents_per_iteration
: the number of agents that will be created during each day of the simulation;hourly_activity
: a dictionary that specifies the hourly activity of the agents.actions_likelihood
: a dictionary that specifies the likelihood of each action that an agent can select in a round. During each agent-iteration, the system will sample from this distribution to identify the set of candidate actions the agent will be asked to choose from. Setting individual action likelihood to 0 will prevent the agent from performing that action.The agents
section contains the parameters that will be used to generate the agents profiles:
education_levels
: the education levels of the agents;languages
: the languages spoken by the agents;max_length_thread_reading
: the maximum number of posts of a given threads that an agent can read to build a context before commenting;reading_from_follower_ratio
: the ratio of posts that the recommended system will suggest that need to be produced by the agent’s followers;political_leanings
: the political leanings of the agents;age
: the age range of the agents;round_actions
: the number of actions that an agent can perform in a round;nationalities
: the nationalities of the agents (they will impact the locales used to generate synthetic data);llm_agents
: a list of Large Language Models that the YClient can assign to the agents;n_interests
: the number of interests that the agents can have;interests
: the topics among witch each agent can sample (at creation time) in order to define their interests;big_five
: a dictionary that specifies the Big Five personality traits of the agents (which will be sampled at creation time);attention_window
: the posting/commenting/reacting history (in terms of rounds) the system will use to dynamically estimate the agent’s topics of interests.Using such information, the YClient
will create the agents population (leveraging the faker
Python library).
Big Five Personality Traits: Openness to Experience, Conscientiousness, Extraversion, Agreeableness, and Neuroticism. They identify a small set of broad dimensions that can be used to categorize human personality.
YSocial
binarize each of such variables (high/low) in order to define the agents’ profiles.
The posts
section contains the parameters that define the posts:
visibility_rounds
: the number of rounds that a post will be visible in the feed of the followers (i.e., the number of rounds that a post will be considered by the recommendation system);emotions
: a dictionary that specifies the emotions that will be used to annotate agents generated contents (the annotation is performed by a LLM agent reading and evaluating agent generated texts).The RSS feeds from which the agents can access and share news are stored in a rss_feeds.json
file having the following structure:
[
{
"category": "politics",
"leaning": "right",
"name": "Fox News",
"feed_url": "http://feeds.foxnews.com/foxnews/world"
},
{
"category": "politics",
"leaning": "left",
"name": "CNN",
"feed_url": "http://rss.cnn.com/rss/cnn_world.rss"
},
{
"category": "politics",
"leaning": "center",
"name": "BBC",
"feed_url": "http://feeds.bbci.co.uk/news/world/rss.xml"
}
]
The category
field specifies the category of the news, the leaning
field specifies the political leaning of the news source, the name
field specifies its name, and the feed_url
field specifies the URL of the related RSS feed.
The YClient
will use this information to retrieve news headlines and summaries from the web and made them available to the agents.
To automatically generate the rss_feeds.json
from a list of keywords (using Bing search), use the populate_news_feeds.py
script available in the YClient
repository.