Skip to content

LLM-Powered Agent Simulation

Instead of rule-based agents, we use Claude Opus as the reasoning engine:

Given:
- Your persona (income, location, preferences, habits)
- Real location data (competitors, distance, demographics)
- Mathematical model outputs (Huff probability, catchment zone)
- Company concept (what they want to open, pricing, target)
Reason as this person: Would you eat here? Why or why not?

Inherits all datasets from ABM Theory, plus:

DatasetWhat We UseLink
FEHD Restaurant LicencesAgent decision context (competitor options in prompt)View →
EthnicityLLM persona generation (cultural dining preferences)View →
Household IncomeAgent budget constraints in promptsView →
Border Crossing QueuesTourist/mainland visitor agent injection rateView →
FactorOpusSonnet
Persona consistencyExcellentGood
Nuanced tradeoffsExcellentGood
Contradictory reasoningHandles wellSometimes flattens
Cost per agent~$0.05~$0.01

For 10 agents, total cost: ~$0.50. Trivial compared to the analysis value.

This is the critical link. Each agent receives:

  1. Open Data — same for all agents (restaurants, demographics, transport)
  2. Model outputsHuff probability, catchment zone
  3. Company concept — your business profile, pricing, target customer

Different business concepts get different agent reactions at the same address. The models calculate different β values. The agents reason about different tradeoffs for a wine bar versus a quick-service lunch spot.

ComponentMethodCost
Open DataCKAN API, FEHD XML, MTR CSVFree
Mathematical modelsHuff + Gravity + CatchmentFree
Agent simulation10 × Claude Opus~$0.50
Total~$0.50

A comparable analysis from a retail consultancy: $50,000-100,000.

10 synthetic personas generated from demographic data for the target area. Each persona is prompted with:

  • Real location data pulled from open datasets
  • Mathematical model outputs (Huff probability, catchment population, site score)
  • The company’s business concept, pricing, and target customer profile

Claude Opus reasons as each persona and produces structured output: visit likelihood, key objections, unmet needs, and a natural-language explanation.

The MVP uses 10 hand-crafted synthetic personas. The next stage replaces these with MirrorFish — a population-scale agent simulation platform that generates hundreds of statistically accurate synthetic agents from demographic distributions.

MVPMirrorFish
Agent count10Hundreds
Persona sourceHand-crafted from demographicsStatistically generated populations
Demographic accuracyApproximateCensus-calibrated distributions
Cost~$0.50Higher compute cost
StatusIn developmentPlanned

MirrorFish agents would reflect the full heterogeneity of the target area: the right proportion of elderly residents, young professionals, domestic workers, tourists, and office commuters — each with internally consistent attributes drawn from real demographic data.

Still a placeholder: No LLM inference occurs server-side. The function returns a structured response that the frontend can use to run inference client-side.

Prompt template: A fully-formed prompt string is generated and returned, incorporating real context from the request:

  • District name and key demographics (population, median income)
  • Competitor count within 800m
  • Cuisine type(s), price band, floor area, target customers
  • Instructions to simulate 5 named personas with step-by-step reasoning

Hardcoded persona profiles: personaProfiles array contains 5 pre-written entries — Office Worker, Local Resident, Tourist, Foodie/Expat, Budget Student — each with:

  • reasoning: templated string referencing cuisine and price band
  • visitLikelihood: string like “Medium-High”, “Low-Medium”

Note: These are not LLM-generated. They fill the expected output structure before real inference is wired.

Placeholder verdict: A pre-written verdict string based on competition count and median income thresholds — gives a rough summary without LLM reasoning.

requiresLLM: true: Always present in the response. Signals to the frontend that client-side inference is expected to replace the placeholders with real LLM output.

DateChangeWhy
2026-03-25Prompt template updated with richer context (floor area, target customers, structured task)Initial template lacked service model and target customer context; makes LLM output more actionable
2026-03-24Initial implementation. Placeholder from launch; LLM inference deferred to client-side.