Simulate human behavior with mass LLMs
LlamaSim is a multi-LLM framework that aims to simulate human behavior at scale. Given a specific environment (e.g., voters in Pennsylvania, students at CMU), we replicate target groups, and aim to provide actionable insights for important questions/events.
More to come...
- Predictive Functionality
- Gradio Frontend (Local Demo)
- Agentic Functionality
- Demographically Aligned Agents
- Long-Term Memory (maybe mem0.ai?)
- Graph Theory Approach
- Live Data Feeds for Agents (allowing them to stay up-to-date)
- Live Demo
git clone https://github.com/jw-source/LlamaSim
mv env.txt .env
#create venv
python3 -m venv .venv
#set the venv
source .venv/bin/activate
# install dependancies
pip install -r requirements.txt
cd src/run.py
from network import Network
agent_network = Network(population="Pennsylvania Voters", num_agents=5, max_context_size=4000)
prompt = "Gas prices are an all-time high."
question = "Are you voting for Kamala Harris?"
agent_network.group_chat(prompt, "random", max_rounds=1)
agent_network.predict(prompt, question)