PR #372 - LLM Epidemic (SIR) Model: Reasoning-Driven Behavioral Epidemiology #373
abhinavk0220
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone! 👋 Wanted to share the thinking behind PR #372 —
LLM Epidemic (SIR) model on mesa-examples.
Why this model?
The SIR model is arguably the most well-known ABM in existence.
Everyone understands Susceptible → Infected → Recovered. That
familiarity makes it the perfect canvas to demonstrate what
LLM-powered agents actually add that classical ABM cannot.
The core distinction
In a classical SIR model, behavior is governed by two fixed
parameters — β (infection rate) and γ (recovery rate). Every
agent is identical in how they respond to the epidemic. There
is no reasoning, no hesitation, no personal risk assessment.
In this model, agents reason at each step using Chain-of-Thought:
vs.
This produces epidemic curves that are shaped by emergent
behavioral heterogeneity some agents reason cautiously,
others don't mirroring the real-world complexity that
fixed-parameter models fundamentally cannot capture.
What this demonstrates about mesa-llm's potential
Classical ABM uses rules. Mesa-LLM uses reasoning. The epidemic
model makes this contrast viscerally clear because everyone
already has intuition about how epidemics spread and how human
behavior shapes them. An LLM agent that reasons "I should
isolate to protect my neighbors" vs one that reasons "the
risk is low, I'll move freely" produces fundamentally different
population-level outcomes not because of parameter tuning,
but because of qualitative reasoning differences.
This is exactly the kind of demonstration that shows mesa-llm's
production potential: models where agent cognition, not
parameter fitting, drives emergent behavior.
Setup
Included a
.env.examplefor straightforward API keyconfiguration — supports Gemini, OpenAI, Anthropic, and Ollama.
PR: #372
Would love feedback on the reasoning prompt design and whether
the action space (isolate/move_freely/seek_treatment) feels
representative!
Beta Was this translation helpful? Give feedback.
All reactions