diff --git a/.gitignore b/.gitignore index 48ed986..aa7a8b4 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,8 @@ Thumbs.db austin/ examples/ +# Keep ad-hoc analysis dumps out of git even if examples are partially unignored later. +examples/**/analysis/ # Simulation artifacts *.sqlite diff --git a/AGENTS.md b/AGENTS.md index 260eb59..8eba391 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,6 +18,7 @@ extropy query summary --json ``` **Agent mode behavior:** + - All output is JSON (parseable, no ANSI formatting) - Exit codes indicate success/failure (0 = success, non-zero = error) - No interactive prompts — commands fail fast if missing required input @@ -29,20 +30,22 @@ extropy query summary --json extropy spec → extropy scenario → extropy persona → extropy sample → extropy network → extropy simulate → extropy results ``` -| Command | Purpose | -|---------|---------| -| `spec` | Create population spec from description | -| `scenario` | Create scenario with events and outcomes | -| `persona` | Generate persona rendering config | -| `sample` | Sample agents from merged spec | -| `network` | Generate social network | -| `simulate` | Run simulation | -| `results` | View results (summary, timeline, segment, agent) | -| `query` | Export raw data (agents, edges, states, SQL) | -| `chat` | Chat with simulated agents | -| `estimate` | Predict simulation cost | -| `validate` | Validate spec files | -| `config` | View/set configuration | + +| Command | Purpose | +| ---------- | ------------------------------------------------ | +| `spec` | Create population spec from description | +| `scenario` | Create scenario with events and outcomes | +| `persona` | Generate persona rendering config | +| `sample` | Sample agents from merged spec | +| `network` | Generate social network | +| `simulate` | Run simulation | +| `results` | View results (summary, timeline, segment, agent) | +| `query` | Export raw data (agents, edges, states, SQL) | +| `chat` | Chat with simulated agents | +| `estimate` | Predict simulation cost | +| `validate` | Validate spec files | +| `config` | View/set configuration | + ## Non-Interactive Usage @@ -71,17 +74,19 @@ extropy persona -s ai-adoption -y ## Exit Codes -| Code | Meaning | -|------|---------| -| 0 | Success | -| 1 | General error / validation failure | -| 2 | Clarification needed (agent mode) | -| 3 | File not found | -| 4 | Sampling error | -| 5 | Network error | -| 6 | Simulation error | -| 7 | Scenario error | -| 10 | User cancelled | + +| Code | Meaning | +| ---- | ---------------------------------- | +| 0 | Success | +| 1 | General error / validation failure | +| 2 | Clarification needed (agent mode) | +| 3 | File not found | +| 4 | Sampling error | +| 5 | Network error | +| 6 | Simulation error | +| 7 | Scenario error | +| 10 | User cancelled | + ## Querying Data @@ -150,11 +155,13 @@ export AZURE_ENDPOINT=https://.services.ai.azure.com/ All commands accept: -| Flag | Purpose | -|------|---------| -| `--json` | JSON output (overrides cli.mode) | -| `--cost` | Show cost summary after command | -| `--study PATH` | Explicit study folder path | + +| Flag | Purpose | +| -------------- | -------------------------------- | +| `--json` | JSON output (overrides cli.mode) | +| `--cost` | Show cost summary after command | +| `--study PATH` | Explicit study folder path | + ## Study Folder Structure @@ -197,3 +204,4 @@ extropy results --json extropy query agents --to agents.jsonl extropy query states --to states.jsonl ``` + diff --git a/README.md b/README.md index bad87e3..0644414 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Extropy creates synthetic populations grounded in real-world distributions, conn ```bash pip install extropy-run export OPENAI_API_KEY=sk-... +# or: ANTHROPIC_API_KEY=... / AZURE_OPENAI_API_KEY=... ``` Requires Python 3.11+. [uv](https://github.com/astral-sh/uv) recommended. @@ -61,7 +62,7 @@ extropy results segment income ## How It Works 1. **Population** — LLM discovers attributes, researches real-world distributions, samples agents -2. **Network** — Connects agents by similarity; edge types affect information flow +2. **Network** — Builds structural + similarity edges; edge types affect information flow 3. **Two-pass reasoning** — Agent role-plays reaction, then classifier extracts outcomes 4. **Propagation** — Opinions spread through network; agents update after hearing from peers @@ -79,9 +80,9 @@ extropy results segment income | Similarity edges | Acquaintances and online contacts from attribute similarity | | Small-world | Calibrated clustering coefficient and path lengths | | **Simulation** | | -| Two-pass reasoning | Role-play first, classify second — eliminates central tendency bias | +| Two-pass reasoning | Role-play first, classify second — reduces schema anchoring in outcome extraction | | Conversations | Agents talk to each other; both update state independently | -| Memory | Full reasoning history with emotional trajectory | +| Memory | Persistent memory traces with fidelity-based prompt trimming | | Conviction | Affects sharing probability and flip resistance | | THINK vs SAY | Internal monologue separate from public statement | | Timeline events | New information injected at specified timesteps | diff --git a/docs/architecture.md b/docs/architecture.md index aad4f80..36003c9 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -10,6 +10,28 @@ extropy spec → extropy scenario → extropy persona → extropy sample → ext All commands operate within a **study folder** — a directory containing `study.db` and scenario subdirectories. Data is keyed by `scenario_id` rather than `population_id`. +## Reference Study Blueprints + +These are the canonical study patterns consolidated from prior showcase and study docs. + +| Study Type | Population | Scenario Mode | Horizon | Typical Scale | +|------------|------------|---------------|---------|---------------| +| ASI announcement + societal transition | National population | Evolving | Monthly, 6 steps | 5,000 agents | +| Geopolitical shock (for example Iran strikes) | National population | Evolving | Weekly, 12 steps | 5,000 agents | +| Asset/market mania shock (for example BTC extreme rally) | National population | Evolving | Weekly, 8-12 steps | 5,000 agents | +| Election projection (house control / state race) | National or state electorate | Static or lightly evolving | Decision-focused | 1,000-5,000 agents | + +## Operational Quality Gates + +Before moving forward to the next stage, the architecture assumes these checks: + +1. `spec` gate: distribution realism and dependency coherence. +2. `scenario` gate: timeline/outcome consistency and no contradictory rules. +3. `persona` gate: natural language quality and no contradictory rendering. +4. `sample` gate: no impossible household or demographic combinations. +5. `network` gate: topology pass with realistic structural edge mix. +6. `simulate` gate: expected timestep dynamics, checkpoint integrity, and tracked outputs. + --- ## Phase 1: Population Creation (`extropy/population/`) @@ -52,7 +74,7 @@ When `household_mode: true`: - Generate correlated partners (shared attributes: location, income correlation) - Generate NPC dependents (children, elderly) based on household type - Household types: singles, couples, single parents, couples with kids, multi-generational -- `agent_focus` controls who reasons: `primary`, `couples`, `families`, `all` +- `agent_focus_mode` controls who reasons: `primary_only`, `couples`, `all` ### 7. Network Generation (`network/`) @@ -353,8 +375,8 @@ Resolution order: programmatic > env vars > config file > defaults |-------|---------|-------------| | `fast` | `= models.fast` | Fast model for Pass 2 | | `strong` | `= models.strong` | Strong model for Pass 1 | -| `max_concurrent` | 50 | Max concurrent LLM calls | -| `rate_tier` | 1 | Provider rate limit tier | +| `max_concurrent` | `null` (auto from RPM) | Max concurrent LLM calls | +| `rate_tier` | `null` | Provider rate limit tier | ### Providers diff --git a/docs/capabilities.md b/docs/capabilities.md index a95ed64..2324551 100644 --- a/docs/capabilities.md +++ b/docs/capabilities.md @@ -1,346 +1,190 @@ # What Extropy Can Simulate -This document walks through Extropy's capabilities by example. Each section describes a type of scenario you can run today, with the underlying mechanics that make it work. +This document is the consolidated capabilities reference. It merges prior showcase, use-case, and study notes into one current view of what the codebase supports. --- -## Any Country, Any Culture +## Core Capability Model -Extropy isn't locked to US demographics. You can simulate populations anywhere. +Extropy simulates how heterogeneous populations respond to events over time. -**US population responding to a Netflix price hike**: Out of the box. Names come from bundled SSA baby name data (1940-2010 birth decades) and Census surname data by ethnicity. A 45-year-old Black woman born in 1980 gets a name that reflects naming trends for Black girls in that era. Her white husband gets an appropriately correlated name. Their kids get names consistent with 2010s trends. +The engine combines: -**Japanese employees reacting to a remote work policy**: Works. You provide a `NameConfig` with Japanese naming conventions (or let the LLM research it), and Extropy generates culturally appropriate names. The simulation mechanics are identical - the agents reason in first-person, form opinions, share with their network. +1. Statistical grounding from sampled population distributions. +2. Scenario-specific extensions and exposure rules. +3. Social network propagation with structural edge types. +4. Multi-timestep LLM reasoning with memory, conviction, and sharing dynamics. -**Indian consumers across Mumbai, Delhi, and Bangalore responding to a fintech launch**: Works. Define city as an attribute with your desired distribution. Agents get sampled across cities, connected via network edges that respect geography, and exposed to marketing through channels you define. - -**Brazilian families deciding whether to migrate for work**: Works. Household sampling gives you family units with correlated attributes. Partners share socioeconomic status, have age gaps that reflect real patterns, and kids are generated as dependents with appropriate ages. - -The pattern: define your population's attributes and distributions, optionally provide country-specific name data, and run the pipeline. The simulation engine doesn't care about geography - it cares about attributes, networks, and reasoning. +Output is distributional and segmentable, not a single headline score. --- -## Individuals or Households - -You control whether agents exist as isolated individuals or as family units. - -**Individual professionals responding to an industry disruption**: Set `household_mode: false`. Each agent is independent. Good for workplace scenarios, B2B decisions, or any context where family structure doesn't matter. - -**Households deciding whether to adopt rooftop solar**: Set `household_mode: true`. Now you get family units. A married couple shares a `household_id` and `last_name`. They have correlated attributes - similar education levels, aligned political views (with configurable assortative mating rates), compatible religious backgrounds. - -The `agent_focus` field in your population spec controls who reasons vs. who exists as context: - -**Primary only (default)**: Only the primary adult in each household is a reasoning agent. Partners and children exist as NPC data attached to that agent - named, with attributes, but not making decisions. Use this when you care about one decision-maker per household (e.g., "the subscriber", "the homeowner"). - -**Couples**: Both adults in a household are reasoning agents. Children are NPCs. Partners influence each other through network edges (weight 1.0). Use this when both adults' opinions matter (e.g., couples deciding on a major purchase, spouses with different political views). - -**All (families)**: Everyone in the household is a reasoning agent, including children old enough to have opinions. Use this when family dynamics matter (e.g., teens influencing parents on tech adoption, multi-generational disagreements). +## Population Scope -The mechanism: set `agent_focus` in your population spec metadata. Values like "families", "households", or "everyone" trigger the "all" mode. Values like "couples", "partners", or "spouses" trigger couples mode. Everything else defaults to primary-only. +### Geography -**Household types are sampled by age bracket**: -- Singles (one adult, no kids) -- Couples (two adults, no kids) -- Single parents (one adult with kids) -- Couples with kids (two adults with kids) -- Multi-generational (extended family) +- Works for US and non-US populations. +- Name generation is **Faker-first with locale routing**, with bundled CSV fallback when needed. +- Geography is represented semantically (country/state/region/city attributes), not as a physics coordinate system. -Each age bracket has configurable weights. Young adults skew toward singles and couples. Middle-aged adults skew toward families. Elderly skew toward couples and singles again. +### Unit of Simulation -**Single adults**: Sampled naturally from the "single" household type. No partner, no dependents. Network edges come from coworkers, neighbors, congregation - not family. +- Individual-only and household-aware sampling are both supported. +- Household-aware runs support partner-linked adults and dependent NPC context. +- Scenario-level `agent_focus_mode` controls who is an active reasoning agent (`primary_only`, `couples`, `all`). -**Childless couples**: Sampled from the "couple" household type. Two adults linked by `partner_id`, sharing `household_id` and `last_name`. No dependents generated. +### Social Structure ---- - -## Realistic Social Networks - -Agents don't exist in isolation. They're connected in networks that reflect real social structures. - -**Partners influence each other most strongly**: Partner edges have weight 1.0. When one spouse changes their opinion, the other is heavily exposed. This models the reality that intimate partners shape each other's views more than anyone else. - -**Coworkers share industry-specific information**: Agents in the same occupation category get connected with `coworker` edges (weight 0.6, capped at 8 connections). An accountant hears about regulatory changes from other accountants, not from nurses. +Network generation supports structural edge families plus similarity fill: -**Neighbors observe each other's behavior**: Agents in the same region with similar ages get `neighbor` edges (weight 0.4, capped at 4). When your neighbor installs solar panels, you notice. This models the "keeping up with the Joneses" dynamic. +- `partner` +- `household` +- `coworker` +- `neighbor` +- `congregation` +- `school_parent` +- `acquaintance` / `online_contact` -**Religious communities spread information through congregations**: Agents sharing religious affiliation and high religiosity get `congregation` edges (weight 0.4, capped at 4). Church announcements, mosque discussions, temple gatherings - information flows through these communities. - -**Parents of school-age children form their own network**: Agents with kids in school, in the same region, get `school_parent` edges (weight 0.35, capped at 3). PTA meetings, school pickup conversations, parent group chats - this captures that social layer. - -**The rest is similarity-based**: After structural edges are placed, remaining connections fill based on attribute similarity. People befriend others like themselves. The overall degree distribution follows a power law - most people have a handful of connections, a few have many. +This supports real-world diffusion patterns beyond flat homophily. --- -## Static Events or Evolving Timelines - -Some scenarios are a single shock. Others unfold over time. - -**Static: Netflix announces a price increase**: One event, one moment. Netflix raises prices by $3/month. Agents hear about it through news, social media, or email. They form opinions - cancel, keep, or downgrade. They share with their network. Over a few timesteps, information propagates, opinions stabilize, and you see the final distribution. The event itself doesn't change; what evolves is awareness and social influence. +## Scenario Scope -This is the right model when: -- The event is a discrete announcement or decision -- What matters is how the population responds and influences each other -- There's no new information after the initial shock +### Static Scenarios -**Evolving: Netflix password crackdown unfolds over months**: -- Month 1: Netflix announces upcoming password-sharing restrictions -- Month 2: Enforcement begins in select markets -- Month 3: Full rollout, first reports of account lockouts -- Month 4: Netflix offers discounted "extra member" add-on -- Month 5: Competitor promotions target frustrated users +Best for one-time shocks and settling dynamics: -Each timestep, agents see what's happened so far. Their prompts include a recap: "Over the past few months, Netflix first announced the crackdown, then started enforcing it. Last month they offered a cheaper add-on option." The timeline creates a narrative arc where agent reasoning evolves with new information. +- pricing changes, +- policy announcements, +- product launches, +- corporate decisions. -This is the right model when: -- The situation develops with new facts over time -- Agent responses to Week 1 should differ from Week 5 -- You want to model how opinions shift as circumstances change +### Evolving Scenarios -**Evolving: A crisis that develops and resolves**: -- Day 1: Initial reports of data breach, uncertainty about scope -- Day 2: Company confirms breach, announces investigation -- Day 3: Details emerge - 10 million accounts affected -- Day 5: Company offers free credit monitoring -- Day 7: CEO resigns -- Day 10: New security measures announced +Best for multi-stage world changes where new information arrives over time: -Agents experience the crisis as it unfolds. Early timesteps have high uncertainty and speculation. Later timesteps have concrete information. Memory traces let agents reference their earlier reactions: "Last week I was panicking about my data. Now that they're offering monitoring, I'm less worried but still annoyed." +- geopolitical escalation, +- crisis response, +- economic cascade scenarios, +- long-horizon social transitions. -**Automatic detection**: If you define a single event with no timeline, Extropy treats it as static. If you provide multiple events or explicit timeline entries, it switches to evolving mode. You can override with `timeline_mode: static` or `timeline_mode: evolving`. +Current runtime behavior supports timeline-safe execution: -**Timeline-safe stopping**: In evolving scenarios, convergence/quiescence auto-stop is suppressed while future timeline events remain (unless explicitly overridden). This prevents runs from ending before later events fire. - -**Per-event re-reasoning intensity**: Timeline events can carry `re_reasoning_intensity`: -- `normal`: direct timeline recipients force re-reasoning. -- `high`: direct plus traced network propagation from that epoch can force re-reasoning. -- `extreme`: high behavior plus one-time force for all aware agents when the event lands. - -**Background context**: Scenarios can include ambient framing that appears in every agent's prompt. "The US economy is in a mild recession. Unemployment was at 4.5% before the AI announcement. It's early spring." This shapes reasoning without being the focal event. - -**Timestep units are configurable**: Days, weeks, months - whatever fits your scenario. A crisis might unfold over days. A policy change might play out over months. A generational shift might span years. +- future timeline events suppress premature convergence/quiescence auto-stop, +- event-level re-reasoning intensity (`normal` / `high` / `extreme`) is available, +- exposure provenance (`info_epoch`) is persisted and used by re-reasoning selection. --- -## Multiple Exposure Channels +## Behavioral Depth -People hear about things through different channels, and the channel matters. +### Reasoning Pipeline -**Mainstream media reaches broadly but impersonally**: High reach probability, but agents process it as "something I saw on the news." Good for initial awareness, less effective for deep persuasion. +- Two-pass reasoning (default): + - Pass 1 role-played reaction, + - Pass 2 structured outcome extraction. +- Optional merged pass exists for cost/speed tradeoff experiments. -**Social media spreads through networks**: Reach follows network edges. If your connections are sharing something, you see it. The viral dynamic emerges naturally - well-connected agents amplify information. +### Conviction + Memory -**Word of mouth is personal and trusted**: Exposure happens through direct network edges only. Lower reach, higher impact. When your brother tells you something, it carries more weight than a headline. +- Conviction is tracked and used for sharing/reconsideration behavior. +- Exposure history and memory traces inform later timesteps. +- Non-reasoning agents decay over time, preventing frozen states. -**Official communication targets specific groups**: An employer announcement reaches employees. A utility notice reaches customers. Channel targeting filters by attributes - only relevant agents get exposed. +### Conversations -**Observation lets agents notice behavior**: Agents can witness what others do, not just hear what they say. When a neighbor buys an electric car, agents on that network edge might get exposed through observation. This models the "seeing is believing" dynamic. +At medium/high fidelity, agents can trigger inter-agent conversations that are interleaved during timestep execution (budget and novelty gated). -Each channel has: -- Reach probability (what fraction of eligible agents get exposed) -- Targeting rules (which agents are eligible) -- Experience template (how the agent encounters the information) +### Public Discourse -You can mix channels. A scenario might start with mainstream media coverage, then spread through social media, then deepen through word of mouth as people discuss it with family. +- Public statements and social posts are tracked. +- Agents get local peer context and broader social feed context in prompts. --- -## Any Kind of Outcome - -You decide what you're measuring. - -**Categorical choices**: "Will you support, oppose, or remain neutral?" "Will you buy, wait, or skip?" Any discrete set of options. The first required categorical outcome becomes the agent's "position" - the headline metric for aggregation. +## Outcome Scope -**Boolean decisions**: "Will you share this with others?" "Will you attend the event?" Yes or no. +Supported outcome types: -**Continuous scales**: "How price-sensitive are you on a scale of 0 to 1?" "What's your trust level from 0 to 100?" Useful for measuring intensity, not just direction. +- categorical, +- boolean, +- float, +- open-ended. -**Open-ended responses**: "What are your main concerns?" Free text. The agent reasons naturally without being forced into categories. These skip the classification pass entirely - the reasoning itself is the outcome. - -You can mix outcome types. A scenario might have: -- A categorical position (support/oppose/neutral) -- A boolean share intention -- A continuous intensity score -- An open-ended elaboration - -All get captured in the same simulation run. +This enables both hard decision tracking and qualitative signal capture in the same run. --- -## Two-Pass or Merged Reasoning - -You control the tradeoff between cost and reasoning quality. - -**Two-pass (default)**: -1. Pass 1 asks the agent to reason freely in first-person. No outcome categories in sight. Just "You're this person, this happened, how do you feel?" -2. Pass 2 takes that reasoning and classifies it into your defined outcomes using a faster, cheaper model. +## Consolidated Use-Case Families -This separation prevents the central tendency problem where agents gravitate to safe middle options when they see the categories upfront. Reasoning quality is higher because the agent isn't gaming the schema. +These are the production-fit categories from prior docs. -**Merged pass** (`--merged-pass`): -Single call with both reasoning and outcomes in one schema. Cheaper - one API call instead of two. Faster - no round-trip between passes. But the agent sees the outcome categories while reasoning, which can bias responses toward the middle. - -Use merged pass for: -- Cost-sensitive runs with many agents -- Quick exploratory simulations -- Scenarios where you trust the model to reason past the schema - -Use two-pass for: -- Final production runs where quality matters -- Scenarios with polarizing topics where central tendency is a real risk -- Research where reasoning traces need to be unbiased +1. Market research and consumer behavior. +2. Pricing response and elasticity. +3. Public policy and compliance response. +4. Product launch/adoption curves. +5. Political and message testing. +6. Reputation/crisis response. +7. Information spread and narrative resilience. +8. Community planning and development response. --- -## Memory and Temporal Awareness - -Agents aren't goldfish. They remember. - -**Full memory traces**: Every timestep, agents get their complete history. "In Week 1, I was skeptical. By Week 3, I was coming around. Last week I committed to trying it." Memories include the reasoning summary, sentiment, and conviction at each point. +## Showcase Study Patterns -**Temporal labeling**: Prompts explicitly state the current timestep. "It's now Week 5 of this situation." Agents can reason about time - how long something has been going on, whether their views have been stable or shifting. +These are the canonical study templates currently used by the team. -**Emotional trajectory**: The system detects sentiment trends and renders them as narrative. "I've been feeling increasingly negative since this started" or "My mood has been fairly steady." This gives agents emotional continuity between timesteps instead of starting fresh every time. +| Pattern | Why It Fits Extropy | Typical Config | +|---------|----------------------|----------------| +| ASI timeline shock | High uncertainty + staged societal changes | Evolving, month unit, ~6 timesteps, 5k agents | +| Iran-strikes geopolitical shock | Multi-domain cascade (military + economic + political) | Evolving, week unit, ~12 timesteps, 5k agents | +| Bitcoin extreme-rally social/economic shock | Wealth-effect + media contagion + fraud narratives | Evolving, week unit, 8-12 timesteps, 5k agents | +| Election projection (House/state race) | Segment-level turnout + issue salience + identity effects | Static or short evolving, 1k-5k agents | -**Conviction self-awareness**: Agents know how firm they've been. "I've been firm about this since Week 1" or "I started certain but my certainty has been slipping." This enables commitment bias (consistent agents resist change) and openness (wavering agents are more receptive). +For election studies: -**Intent accountability**: If an agent said they'd do something, they get reminded. "Last week you said you were going to look into alternatives. Has anything changed?" This prevents agents from making bold claims they never follow through on. - -**Repetition detection**: When agents keep thinking the same thing for multiple timesteps, they get nudged: "You've been thinking the same things for a while now. Has anything actually changed? Are you starting to doubt yourself? Have you done anything about it, or just thought about it?" This prevents stale convergence where agents repeat identical reasoning. - -**Conviction decay**: Strong opinions fade without reinforcement. A conviction score of 0.9 doesn't stay at 0.9 forever. Configurable decay rate means you can model how quickly certainty erodes. - -**Flip resistance**: High-conviction agents are harder to move. If someone is absolutely certain, new information needs to be compelling to shift them. This prevents unrealistic opinion swings. +- generic-ballot style questions are valid for House-control style studies, +- candidate-specific races need candidate-context scenarios and state-specific populations. --- -## Social Dynamics That Emerge - -You don't program social behavior explicitly. It emerges from the mechanics. +## Iran-Strike Study Lessons (Generalized) -**Peer pressure**: Agents see what their network neighbors think. "My coworker Darnell is strongly opposed. My neighbor Maria is on board." This named, specific peer pressure is more realistic than abstract statistics. +The Iran-strikes study is a good stress test for evolving scenarios because it activates many dimensions at once: -**Conformity variation**: Agents have a `conformity` attribute (0-1). High-conformity agents get prompted with "I tend to go along with what most people around me are doing." Low-conformity agents get "I tend to form my own opinion regardless of what others think." This shapes how they weight peer opinions. +- household financial margin, +- employment sector sensitivity, +- political identity, +- media ecosystem, +- institutional trust, +- military connection, +- geography-driven burden. -**Local mood**: Agents sense the aggregate sentiment of their network. "Most people around me seem worried." This is vibes, not statistics - realistic ambient social pressure. +Generalizable design principles from that study: -**Macro trends as context**: Population-level shifts get injected as background. "The general mood is shifting toward acceptance." "More and more people are taking action." Agents sense the zeitgeist without knowing exact numbers. - -**Viral sharing**: Agents with high conviction are more likely to share. When they share, their network neighbors get exposed. Popular opinions spread; unpopular ones don't. Network structure determines what goes viral - well-connected agents amplify. - ---- - -## Agent Conversations - -Agents can talk to each other. When reasoning, an agent can choose to initiate a conversation with someone in their network. - -**Talk-to actions**: During reasoning, agents can request to talk to someone - a coworker, neighbor, partner, or family member. The request includes who they want to talk to and what topic they want to discuss. - -**Multi-turn exchanges**: Conversations are full back-and-forth dialogues. The initiator speaks, the target responds, they go back and forth for 2-3 turns depending on fidelity settings. Each turn is a complete LLM call with the speaker's persona and context. - -**State updates from conversations**: Conversations change minds. After talking, both participants get updated sentiment, conviction, and potentially position. These conversation-driven state changes override provisional reasoning state - a compelling conversation can shift someone more than passive exposure. - -**Partner and NPC conversations**: Agents can talk to their partner (whether another full agent or an NPC spouse) or household dependents. NPC conversations work the same way, but only the initiator's state updates - NPCs don't have persistent state. - -**Conflict resolution**: When multiple agents want to talk to the same target, priority determines who wins. Higher relationship weight wins - a partner request beats a coworker request. Deferred requests can execute in later timesteps. - -**Fidelity control**: The `--fidelity` flag controls conversation depth and prompt richness: -- `low`: No conversations, last 5 memory traces, basic prompts -- `medium` (default): 2 turns (4 messages), 1 conversation per agent, full memory traces -- `high`: 3 turns (6 messages), up to 2 conversations per agent, explicit THINK vs SAY separation, repetition detection - ---- - -## Social Feed and Public Discourse - -Agents don't just see their direct network neighbors. They perceive broader public discourse. - -**Public statements become posts**: When agents share (set `will_share=True`), their public statement gets recorded as a social post. These accumulate over timesteps, creating a timeline of what people are saying. - -**Social feed beyond network**: In subsequent timesteps, agents see a "What People Are Saying Online" section in their prompts. This shows recent posts from the broader population - not just direct neighbors. It's like seeing trending takes on social media from strangers. - -**Network vs. public**: Peer opinions come from direct network neighbors. The social feed comes from everyone else who's sharing. Agents experience both - personal network influence and ambient public discourse. - -**Configurable lookback**: The feed pulls from recent timesteps (default: 3 timesteps back, 5 posts shown). This models the recency bias of social media - you see what's trending now, not old takes. - ---- - -## Scenarios You Can Run Today - -To make it concrete, here are scenarios that work right now with no additional development: - -- US households responding to a streaming service price increase -- Japanese employees adapting to return-to-office mandates -- Indian consumers in multiple cities evaluating a new fintech app -- Brazilian families weighing migration decisions -- UK residents responding to congestion pricing expansion -- German citizens reacting to energy policy changes -- Mixed urban/rural populations facing a natural disaster -- Multi-generational households navigating technology adoption -- Professional networks processing industry disruption news -- Religious communities responding to doctrinal changes -- Parent networks reacting to school policy updates -- Couples having conversations that shift their positions -- Workplace discussions that change minds -- Social media dynamics where public discourse influences individuals -- Any population, any country, any event, any outcome structure +1. Timeline events should describe **world facts**, not scripted emotional outcomes. +2. Include concrete, decision-relevant specifics (prices, casualties, disruptions) when possible. +3. Stage escalation so different subpopulations are activated at different timesteps. +4. Keep framing neutral to avoid baking conclusions into prompts. --- -## Cognitive Depth at High Fidelity +## What Extropy Is Not For -At `--fidelity high`, agents get additional cognitive architecture features: +Extropy is not a full replacement for: -**THINK vs SAY separation**: Prompts explicitly distinguish between internal monologue (raw, honest thoughts) and public statement (socially filtered). Agents with high agreeableness might have a large gap between what they think and what they say - that's interesting data. - -**Repetition detection**: If an agent's reasoning is too similar to their previous timestep (>70% trigram overlap), they get a prompt nudge forcing them to go deeper. This prevents the stale convergence where agents just repeat "save money, learn AI, find backup work" verbatim for 5 timesteps. - -These features are always-on at high fidelity, adding cognitive realism without additional configuration. +1. Rigid org-chart workflow simulation (hard reporting-line process models). +2. Physical logistics optimization (route geometry, traffic flow physics, facility simulation). +3. High-frequency quantitative trading simulation. +4. Fully reactive game-master event injection loops (beyond authored timeline flow). --- -## Scenarios You Can Run Today - -To make it concrete, here are scenarios that work right now with no additional development: - -- US households responding to a streaming service price increase -- Japanese employees adapting to return-to-office mandates -- Indian consumers in multiple cities evaluating a new fintech app -- Brazilian families weighing migration decisions -- UK residents responding to congestion pricing expansion -- German citizens reacting to energy policy changes -- Mixed urban/rural populations facing a natural disaster -- Multi-generational households navigating technology adoption -- Professional networks processing industry disruption news -- Religious communities responding to doctrinal changes -- Parent networks reacting to school policy updates -- Couples having conversations that shift their positions -- Workplace discussions that change minds -- Social media dynamics where public discourse influences individuals -- Crisis scenarios that evolve over days/weeks with new developments -- Any population, any country, any event, any outcome structure - -The core simulation engine is complete through Phase F - households, networks, timelines, conversations, social posts, cognitive architecture, fidelity tiers, and results export. - ---- - -## What You Get Out - -After simulation runs, you have: - -**Position distributions**: What fraction of the population supports, opposes, or remains neutral? Segmented by any attribute - how do young people differ from old? Urban from rural? High-income from low-income? - -**Sentiment trajectories**: How did emotional response evolve over time? Did initial negativity soften? Did enthusiasm fade? - -**Conviction patterns**: Where are the true believers vs. the persuadable middle? How does certainty correlate with position? - -**Sharing behavior**: Who's talking about this? Which demographics amplify vs. stay silent? - -**Reasoning traces**: The actual first-person reasoning each agent produced. Qualitative insight into why people think what they think. - -**Network effects**: How did information flow? Which communities adopted early? Where did resistance cluster? +## Practical Interpretation Rule -**Conversation impact**: Which conversations changed minds most? Ranked by sentiment and conviction delta. See exactly what was said that moved people. +Use Extropy when the question is: -**Elaborations export**: Flattened CSV with every agent's demographics, outcomes, and reasoning - ready for downstream analysis, clustering, or visualization. +"How will different groups of people process and propagate this event over time, and where do outcomes diverge by identity, incentives, and network position?" -**Social posts timeline**: Every public statement made during the simulation, with agent name, position, and sentiment. +Do not use Extropy when the primary bottleneck is physical mechanics, deterministic workflow constraints, or millisecond-level market microstructure. diff --git a/docs/commands.md b/docs/commands.md index 920c4da..f9d77d4 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -8,8 +8,6 @@ Complete reference for all Extropy CLI commands, flags, and options. ``` extropy spec ──> extropy scenario ──> extropy persona ──> extropy sample ──> extropy network ──> extropy simulate ──> extropy results - │ - extropy estimate ``` All commands operate within a **study folder** — a directory containing `study.db` and scenario subdirectories. Commands auto-detect the study folder from the current working directory. @@ -35,7 +33,6 @@ All commands support these global options: | Flag | Description | |------|-------------| -| `--json` | Output machine-readable JSON instead of human-friendly text | | `--version` | Show version and exit | | `--cost` | Show cost summary after command completes | | `--study PATH` | Study folder path (auto-detected from cwd if not specified) | @@ -61,6 +58,19 @@ cd surgeons && extropy spec "add income distribution" extropy spec "farmers" -o my-spec.yaml ``` +### What `spec` does in current flow + +1. Runs sufficiency check (may ask clarifications; in agent mode returns structured questions). +2. Selects attributes (strategy, scope, dependencies, semantic metadata). +3. Runs split hydration for distributions/formulas/modifiers. +4. Binds constraints + computes dependency-safe sampling order. +5. Builds and validates `PopulationSpec`. +6. Saves versioned output YAML. + +**Stage ownership notes:** +- Spec stage does **not** persist household config (household modeling is scenario-owned). +- Name generation is **not** part of spec generation; names are generated at sampling/runtime. + ### Arguments | Name | Type | Required | Description | @@ -76,6 +86,11 @@ extropy spec "farmers" -o my-spec.yaml | `--answers` | | string | | JSON with pre-supplied clarification answers (for agent mode) | | `--use-defaults` | | flag | false | Use defaults for ambiguous values instead of prompting | +### Validation Failure Behavior + +- If spec validation fails, CLI writes a versioned invalid artifact next to target output (`population.v1.yaml` -> `population.v1.invalid.v1.yaml`, then `.v2`, `.v3`, ...). +- Command exits non-zero after writing the invalid artifact. + --- ## extropy scenario @@ -92,25 +107,33 @@ extropy scenario "AI diagnostic tool adoption" -o ai-adoption extropy scenario "vaccine mandate" -o vaccine @pop:v1 # Rebase existing scenario to new population -extropy scenario ai-adoption --rebase @pop:v2 +extropy scenario "rebase marker" -o ai-adoption --rebase @pop:v2 ``` ### What the Scenario Command Does -1. **Discovers scenario-specific attributes** — Uses LLM to identify attributes relevant to this scenario that don't exist in the base population (e.g., `technology_anxiety`, `job_automation_exposure` for an AI scenario) -2. **Researches distributions** — Hydrates new attributes with realistic distributions, just like the spec command -3. **Generates household config** — Determines if/how household dynamics matter for this scenario -4. **Creates event definition** — The triggering event (type, content, source, credibility) -5. **Configures exposure rules** — How agents initially encounter the event (channels, targeting, timing) -6. **Defines outcomes** — What to measure (categorical, boolean, open-ended responses) -7. **Sets simulation parameters** — Timesteps, timeline mode (static vs evolving), stopping conditions +1. **Runs sufficiency check** — infers duration/type/unit/focus hints and asks clarifications if needed +2. **Discovers scenario-specific attributes** — identifies extension attributes not already in base population +3. **Hydrates extension + household config** — researches distributions and scenario household semantics +4. **Binds constraints** — validates dependencies and sampling order for extension attrs +5. **Compiles scenario dynamics** — builds event, exposure, interaction/spread, timeline, and outcomes +6. **Validates scenario contract** — deterministic checks before save (base+extended refs, literals, channels, timeline, outcomes) +7. **Saves versioned artifact** — `scenario/{name}/scenario.vN.yaml` (or versioned `.invalid` on fail-hard) + +### Sufficiency Behavior + +- Sufficiency is intentionally lenient, but deterministic post-processing adds guardrails: + - explicit timeline markers (for example `week 1`, `month 0`) force evolving mode + - static scenarios must have an explicit timestep unit (or trigger a clarification question) +- In agent mode, insufficiency returns structured questions with exit code `2`. +- `--use-defaults` retries sufficiency automatically using defaults from those clarification questions. ### Arguments | Name | Type | Required | Description | |------|------|----------|-------------| | `description` | string | yes | Scenario description (what event/situation to simulate) | -| `population_ref` | string | no | Population version reference: `@pop:v1`, `@pop:latest`, or path to YAML | +| `population_ref` | string | no | Population version reference: `@pop:v1` or `@pop:latest` | ### Options @@ -119,6 +142,9 @@ extropy scenario ai-adoption --rebase @pop:v2 | `--output` | `-o` | string | required | Scenario name (creates `scenario/{name}/scenario.v1.yaml`) | | `--rebase` | | string | | Rebase existing scenario to new population version (e.g. `@pop:v2`) | | `--timeline` | | string | `auto` | Timeline mode: `auto` (LLM decides), `static` (single event), `evolving` (multi-event) | +| `--timestep-unit` | | string | inferred | Override timestep unit: `hour`, `day`, `week`, `month`, `year` | +| `--max-timesteps` | | int | inferred | Override simulation horizon | +| `--use-defaults` | | flag | false | Auto-answer sufficiency clarifications with defaults | | `--yes` | `-y` | flag | false | Skip confirmation prompts | ### Scenario Spec Contents @@ -133,6 +159,15 @@ The generated `scenario.v1.yaml` includes: - **`spread`** — How information propagates through the network - **`outcomes`** — What to measure from each agent - **`simulation`** — Timestep config, stopping conditions, convergence settings +- **`household_config` + `agent_focus_mode`** — Scenario-owned household semantics for sample stage +- **`sampling_semantic_roles`** — Scenario-level semantic role mappings used by sampling/runtime checks +- **`identity_dimensions`** (optional) — Identity activation hints consumed by simulation prompts + +### Validation Failure Behavior + +- If no scenario extension attributes are discovered, scenario creation hard-fails and writes a versioned JSON invalid artifact. +- If compile fails mid-pipeline, scenario creation hard-fails and writes a versioned JSON invalid artifact. +- If final scenario validation fails, CLI writes versioned YAML invalid artifact (`scenario.vN.invalid.vK.yaml`) and exits non-zero. --- @@ -151,17 +186,35 @@ extropy persona -s ai-adoption@v1 extropy persona -s ai-adoption --show ``` +### What `persona` does in current flow + +1. Resolves scenario and loads `scenario.vN.yaml`. +2. Loads referenced base population and merges `extended_attributes`. +3. Runs persona generation pipeline (structure, boolean/categorical/relative/concrete phrasings). +4. Validates generated config against merged attributes (`validate_persona_config`). +5. Saves versioned output YAML (`persona.vN.yaml`). + +Notes: +- If sampled agents already exist, persona generation computes `population_stats` at generation time. +- If not, stats can be backfilled later at simulation runtime. + ### Options | Flag | Short | Type | Default | Description | |------|-------|------|---------|-------------| | `--scenario` | `-s` | string | auto | Scenario name (auto-selects if only one exists) | | `--output` | `-o` | path | | Output file (default: `scenario/{name}/persona.vN.yaml`) | -| `--preview/--no-preview` | | flag | true | Show a sample persona before saving | +| `--preview/--no-preview` | | flag | true | Reserved flag (currently not used as a separate generation gate) | | `--agent` | | int | 0 | Which agent to use for preview | | `--yes` | `-y` | flag | false | Skip confirmation prompts | | `--show` | | flag | false | Preview existing persona config without regenerating | +### Validation Failure Behavior + +- If generation fails, CLI writes a versioned JSON invalid artifact and exits non-zero. +- If persona validation fails, CLI writes versioned YAML invalid artifact (`persona.vN.invalid.vK.yaml`) and exits non-zero. +- `extropy validate persona.vN.yaml` (or `.invalid`) runs persona-specific validation against merged base+extended attributes. + --- ## extropy sample @@ -174,6 +227,16 @@ extropy sample -s ai-adoption -n 1000 --seed 42 --report extropy sample -n 500 # auto-selects scenario if only one exists ``` +### What `sample` does in current flow + +1. Resolves scenario and requires persona config pre-flight. +2. Loads base population + scenario extension and builds merged spec. +3. Recomputes merged sampling order via topological sort. +4. Validates merged spec. +5. Samples agents using scenario household config/focus/semantic roles. +6. Runs deterministic post-sample rule-pack gate. +7. Saves agents and run metadata to `study.db`. + ### Options | Flag | Short | Type | Default | Description | @@ -183,15 +246,24 @@ extropy sample -n 500 # auto-selects scenario if only one exists | `--seed` | | int | random | Random seed for reproducibility | | `--report` | `-r` | flag | false | Show distribution summaries and stats | | `--skip-validation` | | flag | false | Skip validator errors | +| `--strict-gates` | | flag | false | Promote high-risk warnings and post-sample condition warnings to fail-hard | **Exit codes:** 0 = Success, 1 = Validation error, 3 = File not found, 4 = Sampling error Sampling process: 1. Loads scenario's `base_population` spec 2. Merges with scenario's `extended_attributes` -3. Validates the merged spec -4. Samples agents -5. Saves to `study.db` keyed by `scenario_id` +3. Recomputes merged dependency order (topological sort) +4. Validates the merged spec +5. Samples agents +6. Applies rule-pack gate (`impossible`/`implausible`) +7. Saves to `study.db` keyed by `scenario_id` + +### Validation/Gate Failure Behavior + +- Missing persona config blocks sampling pre-flight. +- Merged-order cycles or merged-spec validation failures write versioned JSON invalid artifacts and exit non-zero. +- Post-sampling gate failure writes versioned JSON invalid artifact (`sample.invalid.vN.json`) and exits non-zero. --- @@ -206,6 +278,20 @@ extropy network -s ai-adoption --no-generate-config # Flat network, no si extropy network -s ai-adoption -c custom-network.yaml # Load custom config ``` +### What `network` does in current flow + +1. Resolves study + scenario and verifies sampled agents exist. +2. Loads scenario + base population and builds merged attribute context (base + extension) for config generation. +3. Resolves config in this order: + - explicit `--network-config` + - latest auto-detected `scenario//*.network-config.yaml` + - LLM-generated config (`--generate-config`, default) + - empty config fallback (`--no-generate-config`) +4. Applies CLI overrides, quality profile defaults, and resource auto-tuning. +5. Generates network (with metrics unless `--no-metrics`). +6. Evaluates topology gate and persists result to `study.db`. +7. Optionally exports a non-canonical JSON copy with `--output`. + ### Options | Flag | Short | Type | Default | Description | @@ -215,9 +301,9 @@ extropy network -s ai-adoption -c custom-network.yaml # Load custom config | `--network-config` | `-c` | path | | Custom network config YAML file | | `--save-config` | | path | | Save the (generated or loaded) network config to YAML | | `--generate-config` | | flag | true | Generate network config via LLM from population spec (default: enabled) | -| `--avg-degree` | | float | 20.0 | Target average degree (connections per agent) | -| `--rewire-prob` | | float | 0.05 | Watts-Strogatz rewiring probability | -| `--seed` | | int | random | Random seed for reproducibility | +| `--avg-degree` | | float | unset | Override target average degree (otherwise keep config value) | +| `--rewire-prob` | | float | unset | Override rewiring probability (otherwise keep config value) | +| `--seed` | | int | unset | Override config seed (if unset, generator picks seed) | | `--validate` | | flag | false | Print validation metrics | | `--no-metrics` | | flag | false | Skip computing node metrics (faster) | @@ -229,14 +315,14 @@ extropy network -s ai-adoption -c custom-network.yaml # Load custom config | `--candidate-mode` | string | `blocked` | Similarity candidate mode: `exact`, `blocked` | | `--candidate-pool-multiplier` | float | 12.0 | Blocked mode candidate pool size as multiple of avg_degree | | `--block-attr` | string (repeatable) | auto | Blocking attribute(s). If omitted, auto-selects top attributes | -| `--similarity-workers` | int | 1 | Worker processes for similarity computation | +| `--similarity-workers` | int | 0 | Worker processes for similarity computation (`0` = auto) | | `--similarity-chunk-size` | int | 64 | Row chunk size for similarity worker tasks | #### Checkpointing | Flag | Type | Default | Description | |------|------|---------|-------------| -| `--checkpoint` | path | | DB path for similarity checkpointing (must be study.db) | +| `--checkpoint` | path | | DB path for checkpointing (must resolve to the same file as `study.db`) | | `--resume` | flag | false | Resume similarity and calibration checkpoints from study.db | | `--checkpoint-every` | int | 250 | Write checkpoint every N processed similarity rows | @@ -248,6 +334,19 @@ extropy network -s ai-adoption -c custom-network.yaml # Load custom config | `--safe-auto-workers/--unsafe-auto-workers` | flag | true | Conservative auto tuning for laptops/VMs | | `--max-memory-gb` | float | | Optional memory budget cap for auto resource tuning | +### Validation/Gate Failure Behavior + +- Missing sampled agents blocks network generation pre-flight. +- Invalid option values (`quality_profile`, `candidate_mode`, `topology_gate`, checkpoint mismatch) exit non-zero. +- Strict topology-gate failures (`quality.accepted=false` with strict gate and `N>=50`) exit non-zero: + - by default, command saves a quarantined network artifact and does not report canonical success, + - if quarantine is disabled via advanced flag, command still exits non-zero. + +### Notes + +- Generated configs can be auto-saved into `scenario//network-config.seed*.yaml`. +- Use `extropy query network-status ` to inspect calibration/progress records. + --- ## extropy simulate @@ -261,6 +360,22 @@ extropy simulate -s ai-adoption --fidelity high extropy simulate -s asi-announcement --early-convergence off ``` +### What `simulate` does in current flow + +1. Resolves study folder and scenario. +2. Pre-flight checks required upstream artifacts: + - sampled agents exist for scenario, + - network edges exist for scenario, + - persona config exists for scenario. +3. Validates runtime flags (`--resume`/`--run-id`, `--resource-mode`, `--early-convergence`). +4. Resolves effective models/rate limits from CLI overrides then config defaults. +5. Runs simulation loop: + - seed + timeline + network exposures, + - chunked reasoning (two-pass by default, merged with `--merged-pass`) with per-timestep reasoning budget, + - medium/high conversation interleaving with novelty + per-timestep conversation budget, + - timestep summary + stopping checks. +6. Persists run state to canonical `study.db` and writes results artifacts to `results/{scenario}/` (or `--output`). + ### Options | Flag | Short | Type | Default | Description | @@ -335,6 +450,23 @@ Precedence: | `--verbose` | `-v` | flag | false | Show detailed logs | | `--debug` | | flag | false | Show debug-level logs (very verbose) | +### Runtime Notes + +- `--resume` requires an explicit `--run-id`. +- Scenario lookup is scenario-name first, with legacy id fallback for older studies. +- `--early-convergence auto` uses scenario YAML value when set; otherwise runtime auto-rule applies (do not early-stop while future timeline events remain). +- `low` fidelity skips conversations; `medium` and `high` enable conversations with stricter per-agent caps at lower fidelity. +- `--retention-lite` drops full raw reasoning payload retention to reduce DB/storage volume. +- Timeline events without explicit `exposure_rules` use bounded fallback filtering (not full-seed-rule replay). +- `extreme` re-reasoning is bounded to a high-salience subset, not all aware agents. + +### Failure Behavior + +- Missing study folder/scenario/persona/agents/network fails pre-flight and exits non-zero. +- Invalid flag values (for example bad `--resource-mode` or `--early-convergence`) fail fast and exit non-zero. +- Runtime exceptions mark the simulation run as `failed` in `simulation_runs` and return non-zero. +- Successful completion updates run status to `completed` or `stopped` (when a stop condition ends early). + --- ## extropy results @@ -493,28 +625,6 @@ Only `SELECT`, `WITH`, and `EXPLAIN` queries are allowed. --- -## extropy estimate - -Predict simulation cost without making API calls. - -```bash -extropy estimate -s ai-adoption -extropy estimate -s ai-adoption --strong openai/gpt-5 -extropy estimate -s ai-adoption --strong openai/gpt-5 --fast openai/gpt-5-mini -v -``` - -### Options - -| Flag | Short | Type | Default | Description | -|------|-------|------|---------|-------------| -| `--scenario` | `-s` | string | auto | Scenario name | -| `--strong` | | string | config | Strong model for Pass 1 | -| `--fast` | | string | config | Fast model for Pass 2 | -| `--threshold` | `-t` | int | 3 | Multi-touch threshold | -| `--verbose` | `-v` | flag | false | Show per-timestep breakdown | - ---- - ## extropy validate Validate a population or scenario spec. @@ -681,9 +791,6 @@ extropy persona -s congestion-tax -y extropy sample -s congestion-tax -n 500 --seed 42 extropy network -s congestion-tax --seed 42 -# Estimate cost before running -extropy estimate -s congestion-tax - # Run simulation extropy simulate -s congestion-tax --seed 42 @@ -710,3 +817,37 @@ extropy config set simulation.strong anthropic/claude-sonnet-4-6 extropy config set cli.mode agent # for AI harnesses extropy config set cli.mode human # for terminal users (default) ``` + +--- + +## Reference Study Recipes + +### ASI (Evolving, Monthly, 6 timesteps) + +```bash +extropy scenario "ASI announcement with escalating social/economic impacts over 6 months" \ + --timeline evolving \ + --timestep-unit month \ + --max-timesteps 6 \ + -o asi-announcement -y + +extropy persona -s asi-announcement -y +extropy sample -s asi-announcement -n 5000 --seed 42 +extropy network -s asi-announcement --seed 42 +extropy simulate -s asi-announcement --seed 42 --fidelity high --early-convergence off +``` + +### Iran Strikes (Evolving, Weekly, 12 timesteps) + +```bash +extropy scenario "US strikes on Iran with 12-week escalation and partial de-escalation timeline" \ + --timeline evolving \ + --timestep-unit week \ + --max-timesteps 12 \ + -o iran-strikes -y + +extropy persona -s iran-strikes -y +extropy sample -s iran-strikes -n 5000 --seed 42 +extropy network -s iran-strikes --seed 42 +extropy simulate -s iran-strikes --seed 42 --fidelity high --early-convergence off +``` diff --git a/docs/fixes.md b/docs/fixes.md deleted file mode 100644 index 4f33c31..0000000 --- a/docs/fixes.md +++ /dev/null @@ -1,93 +0,0 @@ -# Fixes and Improvements Log - -## 2026-02-15: agent_focus prompt ambiguity - -**Problem**: The `extropy spec` command was generating `agent_focus: "suburban homeowners with school-age children"` for a community scenario, which caused partners to become NPCs instead of active agents. For a book ban community reaction scenario, both partners should be simulated. - -**Root cause**: The sufficiency check prompt in `extropy/population/spec_builder/sufficiency.py` didn't explain to the LLM that `agent_focus` controls household sampling modes: -- `"families"` / `"households"` → everyone simulated -- `"couples"` / `"partners"` → both adults simulated, kids are NPCs -- specific roles like `"surgeons"` → one person per household - -The LLM just extracted a literal description without understanding the semantic implications. - -**Fix**: Updated the prompt and schema description to explicitly document: -1. The three sampling modes and their trigger keywords -2. When to use each mode (communities → families, professional studies → specific role) -3. Concrete examples mapping scenario types to correct `agent_focus` values - -**Files changed**: -- `extropy/population/spec_builder/sufficiency.py` — schema description and prompt text - -**Verification**: `tests/test_agent_focus.py` (34 tests) all pass. - ---- - -## 2026-02-15: Persona renderer duplicate sections and missing punctuation - -**Problem**: The persona renderer was outputting duplicate sections. For example: -- `## Who I Am` rendered age, gender, state from `intro_template` -- `## About Me` rendered the same attributes again from the `basic_identity` group - -Additionally, sentences were missing periods, causing run-on text like: -``` -I'm 49 years old I'm a dad in this community My family lives in Kansas -``` - -**Root cause**: The `render_persona()` function in `extropy/population/persona/renderer.py`: -1. Rendered `intro_template` attributes, then also rendered them in their respective groups -2. Joined phrases with spaces but didn't ensure sentence-ending punctuation - -**Fix**: -1. Added `extract_intro_attributes()` helper to parse `{attribute}` placeholders from `intro_template` -2. Modified `render_persona()` to track and exclude intro attributes from group rendering (same pattern used for `decision_relevant_attributes`) -3. Added `_ensure_period()` helper to ensure all phrases end with `.`, `!`, or `?` - -**Files changed**: -- `extropy/population/persona/renderer.py` — added `extract_intro_attributes()`, `_ensure_period()`, updated `render_persona()` - -**Verification**: `tests/test_persona*.py` (6 tests) all pass. Manual verification shows clean persona output without duplicates. - ---- - -## 2026-02-15: Azure OpenAI schema rejection for actions array - -**Problem**: Simulation failed with Azure OpenAI (gpt-5-mini) rejecting the reasoning schema: -``` -Invalid schema for response_format 'agent_reasoning': In context=('properties', 'actions', 'items'), 'additionalProperties' is required to be supplied and to be false. -``` - -**Root cause**: Azure OpenAI has stricter JSON schema requirements than OpenAI direct. The `actions` array items (objects with `type`, `who`, `topic` properties) were missing `additionalProperties: false`. - -**Fix**: Added `"additionalProperties": False` and included `"topic"` in `required` array for both `actions` item schemas in `extropy/simulation/reasoning.py`: -1. Line ~464 (two-pass schema) -2. Line ~640 (merged-pass schema) - -Azure requires ALL properties to be listed in `required`, not just a subset. - -**Files changed**: -- `extropy/simulation/reasoning.py` — added `additionalProperties: False` and `"topic"` to required array - -**Verification**: Lint passes. Re-run simulation to confirm. - ---- - -## 2026-02-15: Azure OpenAI schema rejection for conversation_turn - -**Problem**: Simulation failed with Azure OpenAI rejecting the conversation_turn schema: -``` -Invalid schema for response_format 'conversation_turn': In context=(), 'required' is required to be supplied and to be an array including every key in properties. Missing 'internal_reaction' -``` - -**Root cause**: Same Azure strictness issue. The conversation turn schema had `internal_reaction` in properties but not in the `required` array. - -**Fix**: Updated `_build_conversation_schema()` in `extropy/simulation/conversation.py` to include all properties in the `required` array and added `additionalProperties: False`: -```python -"required": ["response", "internal_reaction", "updated_sentiment", "updated_conviction"], -"additionalProperties": False, -``` - -**Files changed**: -- `extropy/simulation/conversation.py` — line 390-391 - -**Verification**: Lint passes. Re-run simulation to confirm. diff --git a/docs/logging-guidelines.md b/docs/logging-guidelines.md deleted file mode 100644 index fa6ecdc..0000000 --- a/docs/logging-guidelines.md +++ /dev/null @@ -1,25 +0,0 @@ -# Logging Guidelines - -These rules keep logging useful without leaking sensitive data. - -## Principles - -- Use module loggers: `logger = logging.getLogger(__name__)`. -- Keep user-facing CLI output in `console.print(...)`; use `logger.*` for diagnostics. -- Never log raw prompts, private reasoning text, API keys, auth headers, or tokens. -- Prefer structured metadata in logs (model name, token counts, timings, IDs). -- Use levels consistently: - - `DEBUG`: high-volume diagnostics safe for local troubleshooting. - - `INFO`: normal progress and timing. - - `WARNING`: retries, degraded behavior, recoverable failures. - - `ERROR`: terminal failures for the current operation. - -## Provider Debug Logs - -`extropy/core/providers/logging.py` writes sanitized JSON logs: - -- Secret fields are replaced with `[REDACTED_SECRET]`. -- Prompt/content-like text fields are replaced with `[REDACTED_TEXT length=N]`. -- Responses are summarized and sanitized before writing. - -If you add new request/response fields, ensure they pass through the sanitizer. diff --git a/docs/pipeline/network.md b/docs/pipeline/network.md new file mode 100644 index 0000000..dcf98c9 --- /dev/null +++ b/docs/pipeline/network.md @@ -0,0 +1,478 @@ +# Network Stage Reference: Social Graph Generation and Topology Gating + +## Document Intent +This file is the deep reference for the `network` stage in Extropy. + +It is meant to be reusable team memory for: +- what `network` is supposed to do, +- how it should do it, +- why this stage exists in the pipeline, +- what it currently does in code, +- where current behavior diverges from intended quality goals, +- and what backpressure checks this stage should support. + +This is not a patch list. It is a contract + current-state reality map. + +## Status Update (2026-02-23) +- Network generation now runs an adaptive multi-stage calibration loop with explicit topology gate bounds. +- Topology gate evaluation now uses final graph metrics after rewiring, with pre-rewire fallback if rewiring degrades an otherwise gate-valid graph. +- Config generation is LLM-based by default, with deterministic config-source priority and automatic scenario-local config discovery. +- Structural attribute role mapping is now deterministic-first with targeted LLM tie-break only for ambiguous roles. +- Structural edge generation supports partner/household/coworker/neighbor/congregation/school-parent channels with deterministic per-channel quotas and caps. +- Checkpoint/resume for similarity and calibration progress is DB-backed (`study.db`), with signature compatibility checks. +- Strict topology-gate failures can be quarantined under a suffixed network id. +- Network command supports quality profiles (`fast|balanced|strict`) and candidate modes (`exact|blocked`) with resource auto-tuning. + +--- + +## How To Read This Document +Use this order: +1. `Intended Contract` for target behavior. +2. `Current Implementation (As-Is)` for actual code behavior. +3. `Divergences, Mistakes, and Risk Areas` for the quality gap. +4. `Dependency Map` for downstream coupling (`simulate`, `results`, `query`). + +This file is intentionally verbose so a new teammate can recover context without prior chat history. + +--- + +## Why This Stage Exists +`sample` produces agents. `network` produces relationships. + +Without `network`, simulation has isolated individuals and cannot represent: +- exposure through social ties, +- peer influence asymmetry, +- neighborhood/workplace/religious clustering, +- bridge ties across communities, +- conversation and propagation pathways. + +Design principle: +- **Use sampled attributes to instantiate realistic social structure, then gate topology quality before simulation.** + +--- + +## Pipeline Position +Intended high-level flow: +1. `spec`: compile reusable base population mechanics. +2. `scenario`: compile event context + extension attributes. +3. `persona`: compile language rendering contract. +4. `sample`: instantiate concrete agents. +5. `network`: generate social graph over sampled agents. +6. `simulate`: propagate and reason over that graph. + +`network` is the structural bridge from agent rows to social dynamics. + +--- + +## Intended Contract + +### What `network` should do +`network` should generate a scenario-scoped social graph that is: +- realistic enough for downstream diffusion and conversation, +- topology-checked against explicit bounds, +- reproducible under seed and config, +- inspectable via run metadata and calibration traces. + +At minimum it should: +- resolve or generate a network config from known inputs, +- compute relationship probabilities from attribute similarity and role structure, +- add deterministic structural ties where semantically justified, +- calibrate graph shape toward target degree/clustering/modularity/connectivity, +- persist graph + diagnostics to canonical study storage. + +### What `network` should not do +`network` should not: +- mutate sampled agent attributes, +- invent scenario-level semantics not present in upstream artifacts, +- silently skip topology quality checks while claiming success, +- depend on hidden magic defaults without exposing metadata. + +### How `network` should do it +Intended execution model: +1. Load sampled agents for scenario. +2. Resolve network config (file or generated). +3. Compute sparse similarity candidates. +4. Build structural edges and similarity edges. +5. Calibrate network topology to targets. +6. Apply controlled rewiring. +7. Evaluate topology gate and persist outcomes. + +### Why this contract matters +If network quality is weak: +- spread realism collapses, +- conversation targets become noisy, +- identity clustering effects are distorted, +- simulation output can look plausible but be structurally wrong. + +`network` is therefore a quality gate, not just an edge sampler. + +--- + +## Conceptual Model Of Network Generation + +### Dual-source edge construction +Current design combines: +1. **Similarity-driven edges** (homophily + degree effects). +2. **Structural edges** (partner/household/workplace/neighborhood/congregation/school-parent). + +This avoids two extremes: +- pure random/flat graphs, +- over-hardcoded deterministic graphs. + +### Calibration-first topology shaping +Graph generation is not single-pass final. +It calibrates intra/inter-community scaling with restarts and iterations, then evaluates gate bounds. + +### Controlled rewiring as optimization pass +Rewiring is applied after calibration for small-world properties, but should not be allowed to invalidate a graph that already passed the gate. + +### Bounded quality semantics +Quality is represented via explicit bounds and deltas: +- average degree range, +- minimum clustering, +- modularity range, +- minimum largest connected component ratio, +- minimum edge floor. + +--- + +## Intended Ownership Boundary + +### `sample` should own +- concrete agent attribute values, +- household/partner/dependent realization, +- semantic validity of agent records. + +### `network` should own +- edge existence, edge type, edge weight, influence asymmetry, +- structural vs similarity composition, +- topology quality gating + diagnostics. + +### `scenario` should own +- scenario semantics and extension attributes, +- optional intent that may influence network config generation. + +### `simulate` should own +- runtime propagation and reasoning behavior over the saved graph. + +--- + +## Intended Artifact Contract + +### Primary runtime outputs +`network` should emit: +- edge list (source, target, type, weights, influence weights), +- network generation metadata (seed, candidate mode, quality diagnostics), +- optional computed network/node metrics. + +### Canonical persistence contract +Current DB entities used by network stage: +- `network_runs` +- `network_edges` +- `network_metrics` (optional) +- `network_generation_status` +- `network_calibration_runs` +- `network_calibration_iterations` +- `network_similarity_jobs` +- `network_similarity_chunks` +- `network_similarity_pairs` + +### Determinism contract +For fixed `(agents, config, seed)`: +- candidate selection and calibration are seeded, +- structural edge generation is deterministic under seed, +- final topology still depends on configured calibration limits and stage escalation. + +--- + +## Intended Quality Contract + +### Realism +Graph should reflect plausible social structure: +- in-group clustering where relevant, +- bridge ties across groups, +- role-weighted hubs without pathological concentration. + +### Internal consistency +Edges should be coherent with agent data: +- structural ties grounded in household/role fields, +- edge type rules referencing existing attributes, +- influence weights consistent with configured factors. + +### Downstream support reliability +Output should support: +- propagation rules using edge properties, +- conversation selection over realistic neighbor sets, +- scenario-specific simulation at target scale. + +### Backpressure intent +Network stage should expose machine-readable go/no-go signals before simulation. + +--- + +## Current Implementation (As-Is) + +This section describes actual behavior in code today. + +### CLI command flow +`extropy network` currently performs: +1. resolve study + scenario, +2. pre-flight check that sampled agents exist for scenario, +3. load scenario spec and base population reference, +4. merge base + extension attributes for config-generation context, +5. resolve config source, +6. apply CLI overrides + quality/resource defaults, +7. generate network (with or without metrics), +8. evaluate quality gate status, +9. persist network result (canonical/quarantine behavior), +10. optionally export JSON. + +Primary file: +- `extropy/cli/commands/network.py` + +### Config source resolution order +Config resolution is deterministic: +1. explicit `--network-config` +2. auto-detected latest `scenario//*.network-config.yaml` +3. LLM generation (default `--generate-config`) +4. empty config fallback (flat network warning) + +Generated configs are auto-saved by default to scenario directory unless disabled with hidden flag. + +### LLM config generation behavior +`generate_network_config(...)` runs: +1. core config call (weights, multipliers, edge rules, influence, avg degree), +2. structural-role mapping call only when deterministic resolver is ambiguous. + +Prompt context includes: +- population description + geography, +- up to first 50 merged attributes, +- up to first 5 sampled agents as examples. + +Primary file: +- `extropy/population/network/config_generator.py` + +### Structural-role mapping behavior +Role slots: +- `household_id`, `partner_id`, `age`, `sector`, `region`, `urbanicity`, `religion`, `dependents` + +Behavior: +- deterministic scoring picks high-confidence roles directly, +- ambiguous roles use constrained LLM tie-break against candidate list, +- runtime key resolution uses config-selected role first, then minimal canonical fallback keys. + +Primary files: +- `extropy/population/network/config_generator.py` +- `extropy/population/network/generator.py` + +### Similarity and candidate behavior +Supports candidate modes: +- `exact`: all-pairs candidate space +- `blocked`: block-pruned candidate space with deterministic bridge quota + +Blocked mode: +- auto-selects blocking attributes from highest weighted exact/within_n attributes, +- filters over-fragmented blockers by cardinality ratio, +- expands candidate pools when coverage is sparse. + +Similarity computation: +- sparse retention threshold via `similarity_store_threshold`, +- serial or process-parallel execution, +- optional checkpoint/resume via study DB similarity job tables. + +Primary files: +- `extropy/population/network/similarity.py` +- `extropy/population/network/generator.py` + +### Calibration ladder behavior +Generation runs staged candidate ladders: +- exact mode: single stage, +- blocked mode: staged escalation (`blocked`, `blocked-expanded`, and for non-fast profiles `hybrid-dense`). + +Per stage: +- compute similarities + coverage diagnostics, +- assign communities, +- create structural edges with budget headroom, +- calibrate intra/inter community scaling across restarts and iterations, +- score against gate bounds. + +Best stage/iteration is retained. + +### Structural edge behavior +Deterministic structural channels currently implemented: +- mandatory: `partner`, `household` +- optional budgeted: `coworker`, `neighbor`, `congregation`, `school_parent` + +Channel behavior includes local caps and quotas. + +### Rewiring and final gate behavior +After choosing best calibrated graph: +- rewiring pass runs (skips protected structural pairs), +- topology gate evaluated pre- and post-rewire, +- if rewiring breaks a previously passing graph, pre-rewire graph is restored. + +Quality metadata records: +- gate acceptance, +- best/final metrics, +- bounds, +- deltas, +- stage summaries. + +### Metrics behavior +Without `--no-metrics`, command computes: +- network metrics (avg degree, clustering, path length, modularity, etc.), +- node metrics (PageRank, betweenness, cluster id, echo chamber score). + +Metrics require `networkx`. + +Primary file: +- `extropy/population/network/metrics.py` + +### Save behavior and strict gate handling +Canonical network id defaults to scenario name. + +Strict failure condition in command: +- topology gate is strict, +- quality accepted is false, +- agent count >= 50. + +Then: +- with quarantine allowed: saves under suffixed network id and exits non-zero, +- without quarantine: exits non-zero. + +Persistence helper sets `meta.outcome` as: +- `accepted`, +- `accepted_with_warnings`, +- `rejected`, +- `rejected_quarantined`. + +Primary file: +- `extropy/cli/commands/network.py` + +### Runtime coupling with simulation +Simulation loader resolves network by scenario name first, then scenario meta fallback id. +Propagation/conversation scoring uses edge type and edge weight in runtime logic. + +Primary files: +- `extropy/simulation/engine.py` +- `extropy/simulation/propagation.py` + +--- + +## What Current Implementation Already Gets Right + +### Strong topology-aware generation core +Adaptive calibration + bounds-based gating is materially stronger than single-pass random graph synthesis. + +### Checkpoint/resume observability +Long runs expose status and calibration traces in DB tables, supporting inspectability and partial recovery. + +### Structural + similarity blend +Combining household/partner structure with similarity-based edges gives better realism than either source alone. + +### Rewire safety fallback +Pre-rewire fallback avoids accidental quality regression from late optimization passes. + +--- + +## Divergences, Mistakes, and Risk Areas + +### 1) Config generation evidence is thin +LLM config prompt uses at most first 5 agents and truncated attribute list context. +This can underrepresent long-tail population structure for large/narrow populations. + +### 2) Scenario intent bridge is weak +Network config generation is primarily population-driven. +Scenario dynamic intent (channels/spread pressure) is not a first-class input to config generation. + +### 3) Structural channel set is fixed +Structural edge channels are currently fixed templates. +This is practical, but can miss context-specific relationship modes for some populations. + +### 4) Structural semantics still rely on key conventions +Role mapping improved, but fallback still depends on canonical key names when config roles are missing/unpopulated. + +### 5) Strict-failure save semantics are operationally subtle +Command-level strict failure handling and persistence ordering create edge cases that can be surprising in workflows. +Team should treat strict-fail artifacts carefully when deciding what is canonical. + +### 6) Advanced tuning knobs are mostly hidden +Important controls exist (`topology_gate`, calibration budgets, quarantine toggles) but are hidden flags. +This can reduce discoverability during debugging. + +### 7) Networkx dependency bifurcation +Core generation does not require full metrics, but metric paths do. +Tooling/CI environments without `networkx` can see behavior differences under `--no-metrics` vs default. + +--- + +## Dependency Map (What `network` Must Support) + +### `simulate` +Needs: +- robust edge set for scenario, +- meaningful edge types and influence weights, +- stable network_id resolution path. + +### `results` and `query` +Need: +- persisted network edges and metadata, +- calibration/status records for diagnostics, +- optional network metrics for analysis. + +### `chat` and agent-level introspection +Indirectly depend on simulation dynamics that are shaped by network structure. + +--- + +## Working Invariants Draft (Network-Oriented) + +### Core invariants +1. Scenario must have sampled agents before network stage runs. +2. Every saved edge must reference valid source/target agent ids. +3. Undirected edge uniqueness must be preserved (no duplicate pair rows). +4. Structural protected edges must not be rewired. + +### Config invariants +1. Attribute references in weights/multipliers/rules/factors must exist in merged schema. +2. `within_n` match type must carry ordinal level mapping. +3. Candidate mode and topology gate enums must be valid. + +### Quality invariants +1. Gate bounds and deltas must be present in saved quality metadata. +2. Strict gate failures should never silently report success. +3. Final accepted graph should correspond to the same metric set used for pass/fail. + +--- + +## Glossary (Working Terms) +- **Candidate mode**: strategy for similarity pair search (`exact` vs `blocked`). +- **Blocked mode**: candidate pruning using shared block attributes plus deterministic global bridging. +- **Structural edges**: deterministic relation edges from known household/workplace/neighborhood-style roles. +- **Calibration ladder**: staged escalation process to improve similarity coverage and topology fit. +- **Topology gate**: pass/fail check against configured graph metric bounds. +- **Quarantine network**: strict-failed artifact saved under suffixed `network_id` for inspection. + +--- + +## Practical Readout +Current network stage is best understood as: +1. a calibrated graph generator (not one-shot), +2. with mixed deterministic + model-driven configuration, +3. with strong quality metadata and run traceability, +4. but still carrying some fixed structural assumptions and intent-bridge gaps. + +For team operation, key framing is: +- generation quality is mostly controlled by config quality + candidate coverage + calibration budgets, +- strict gate outcomes should be treated as hard backpressure before simulation. + +--- + +## Final Statement +`network` should convert sampled populations into topology-credible social structure and expose clear go/no-go signals for simulation. + +Current implementation already has substantial quality machinery. +The main remaining challenge is contract coherence: +- stronger scenario-intent coupling, +- clearer canonical vs quarantined persistence semantics, +- and predictable structural-role grounding across diverse populations. diff --git a/docs/pipeline/persona.md b/docs/pipeline/persona.md new file mode 100644 index 0000000..6626829 --- /dev/null +++ b/docs/pipeline/persona.md @@ -0,0 +1,532 @@ +# Persona Stage Reference: Persona Compilation and Agent Embodiment + +## Document Intent +This file is the deep reference for the `persona` stage in Extropy. + +It is designed to be reusable team memory for: +- what `persona` is supposed to accomplish, +- how the stage should operate in theory, +- what the code currently does, +- where current behavior diverges from intended quality goals, +- and what contract-level checks should exist for backpressure. + +This is not a patch plan. It is a contract + current-state map. + +## Status Update (2026-02-23) +- `extropy validate` now routes persona files (`persona.vN.yaml`) through persona-specific validation. +- Persona validation now checks: + - merged-attribute treatment coverage + - group membership completeness/uniqueness + - boolean/categorical/relative/concrete phrasing completeness + - intro-template attribute reference validity +- Renderer behavior now includes: + - mixed relative+concrete fallback for float-like relative attributes + - strict skip of duplicate “Who I Am” group rendering + - deterministic boolean phrase sanitation for token-like outputs +- `validate` supports versioned invalid persona artifacts (`persona.vN.invalid.vK.yaml`) and promotes them to canonical path when validation passes. +- Fail-hard persona generation/validation now emits versioned invalid artifacts. + +--- + +## How To Read This Document +Use this sequence: +1. `Intended Contract` for design truth. +2. `Current Implementation (As-Is)` for code truth. +3. `Divergences, Mistakes, and Risk Areas` for gap analysis. +4. `Dependency Map` for downstream implications. + +The document is intentionally verbose so someone new can recover context quickly. + +--- + +## Why This Stage Exists +The simulation does not reason directly over raw structured agent rows. +It reasons over natural-language personas. + +If persona construction is weak, the simulation degrades even when sampling/network are strong: +- important traits are omitted or buried, +- phrasing is unnatural or token-like, +- household context is lost, +- trait salience for decision-making is unclear, +- LLM reasoning becomes noisy and inconsistent. + +`persona` exists to compile one reusable rendering contract: +- generated once for a scenario’s merged attribute set, +- then applied deterministically to every agent at runtime (no per-agent persona LLM call). + +Design principle: +- **Compile persona language once, render many agents deterministically.** + +--- + +## Pipeline Position +Pipeline context: +1. `spec` compiles base population mechanics. +2. `scenario` extends population + event dynamics. +3. `persona` compiles rendering semantics for merged attributes. +4. `sample` instantiates agents. +5. `network` builds graph. +6. `simulate` pre-generates and uses personas for reasoning. + +In current operational flow, persona is treated as a prerequisite for both `sample` and `simulate`. + +--- + +## Intended Contract + +### What `persona` should do +`persona` should emit a versioned persona configuration that defines: +1. intro/narrative framing, +2. attribute treatment mode (concrete vs relative), +3. attribute grouping and ordering, +4. phrasing templates for boolean/categorical/relative/concrete attributes, +5. optional population statistics for relative positioning. + +At runtime, this config should produce: +- consistent first-person personas, +- stable, deterministic rendering, +- high coverage of relevant attributes, +- decision-focused salience where scenario requests it. + +### What `persona` should not do +`persona` should not: +- run per-agent LLM calls during simulation, +- mutate agent values, +- decide network structure, +- invent scenario dynamics, +- depend on hidden downstream defaults for core rendering semantics. + +### How `persona` should do it +Intended compile pattern: +1. ingest merged population attributes (base + scenario extension), +2. classify rendering treatment and groups, +3. generate phrasing maps by type, +4. validate coverage and phrase quality constraints, +5. optionally compute population stats from sampled agents, +6. emit versioned `persona.vN.yaml`. + +### Why this contract matters +Persona is the language interface between structured agent states and LLM reasoning. +If this interface is low quality: +- behavioral realism drops, +- contradictions increase, +- outcome extraction quality declines, +- simulation variance becomes harder to trust. + +--- + +## Conceptual Model Of Persona Compilation + +### Persona config as rendering compiler +Conceptually, persona stage compiles: +- **input**: attribute schema + optional empirical sampled stats, +- **output**: deterministic rendering program (`PersonaConfig`), +- **runtime**: pure string rendering over each agent dictionary. + +### Two rendering layers +Persona rendering has two layers: +1. narrative framing (`intro_template` + household section), +2. structured trait expression (grouped phrases, with optional decision-salience section). + +### Treatment semantics +Each attribute is assigned a treatment: +- `concrete`: preserve actual value semantics, +- `relative`: express position relative to population stats (z-score buckets). + +### Salience semantics +Scenario can provide `decision_relevant_attributes`. +Runtime renderer should surface these before other groups to improve reasoning focus. + +### Determinism semantics +After config generation, per-agent persona rendering should be: +- template-driven, +- non-LLM, +- reproducible from agent state + config. + +--- + +## Intended Ownership Boundary + +### `persona` should own +- linguistic embodiment of attributes, +- grouping and ordering for readability + reasoning salience, +- phrase-level normalization for categorical/boolean/null states, +- optional relative-position computation using population stats. + +### `scenario` should own +- which attributes matter for decision salience (`decision_relevant_attributes`), +- household activation policy and agent scope semantics upstream. + +### `sample` should own +- concrete agent instantiation and household/NPC realization. + +### `simulate` should own +- usage of persona text in reasoning pipeline, +- no semantic reinterpretation of persona config contract. + +--- + +## Intended Artifact Contract + +### Primary artifact +Persona stage should output: +- `scenario//persona.vN.yaml` + +### Artifact sections (intended stable envelope) +- `population_description` +- `created_at` +- `intro_template` +- `treatments` +- `groups` +- `phrasings`: + - `boolean` + - `categorical` + - `relative` + - `concrete` +- `population_stats` + +### Coverage contract (intended) +At contract level: +1. every attribute should have exactly one treatment, +2. group membership should be complete and non-contradictory, +3. phrasing maps should cover all rendered categorical options, +4. relative phrasings should map each relative attribute to all z-buckets, +5. concrete templates should be syntactically valid for substitution. + +### Quality contract for phrasing +Phrasings should: +- be first-person, +- avoid raw enum-token leakage where possible, +- handle explicit null/not-applicable categorical states naturally, +- avoid awkward boolean prose in intro templates. + +--- + +## Intended Quality Contract + +### Realism +Persona should sound like a plausible person, not raw table serialization. + +### Internal consistency +Rendered sections should not duplicate or contradict one another: +- intro attributes should not be repeated blindly in groups, +- decision-salient attributes should be emphasized once and cleanly. + +### Downstream support +Persona output should support simulation reasoning quality directly: +- preserve critical trait signal, +- keep text compact enough for context efficiency, +- keep language clear enough for stable extraction. + +### Robustness to token variation +Categorical rendering should be robust to minor token formatting differences (`_`, space, hyphen forms). + +--- + +## Intended Backpressure Philosophy (Contract-Level) +Persona stage should provide machine-checkable evidence that rendering quality is acceptable. + +Backpressure classes should distinguish: +- blocking structural failures (coverage missing, parse errors), +- plausibility/readability warnings, +- informational diagnostics. + +Without this, low-quality persona configs can silently pass and degrade simulation behavior. + +--- + +## Current Implementation (As-Is) + +This section describes what code currently does. + +### Persona CLI behavior +`extropy persona` currently: +1. resolves scenario, +2. loads scenario spec + base population, +3. merges scenario `extended_attributes` into base attributes, +4. builds a merged `PopulationSpec`, +5. runs persona config generation, +6. saves versioned persona YAML. + +Primary file: +- `extropy/cli/commands/persona.py` + +### Merge behavior in persona command +Merge behavior is attribute-list merge: +- base attributes + scenario extended attributes. + +Sampling order is inherited from base spec and not recomputed for persona (persona generator does not rely on sampling order for core behavior). + +### Generation pipeline behavior +Generator orchestrates 5 LLM-assisted steps: +1. structure (`intro_template`, treatments, groups), +2. boolean phrasings, +3. categorical phrasings, +4. relative phrasings, +5. concrete templates. + +Primary file: +- `extropy/population/persona/generator.py` + +### Strongest built-in guardrail today +Categorical phrasing generation has explicit validation+retry behavior: +- checks per-attribute option coverage, +- normalizes minor token variants, +- retries up to 3 attempts with targeted feedback. + +This is the most explicit quality-enforcement logic in persona generation currently. + +### Treatment and grouping behavior in code +Treatment/group assignment is prompt-driven and parsed into: +- `AttributeTreatment`, +- `AttributeGroup`. + +Current code runs dedicated cross-field validation (`validate_persona_config`) for: +- exact treatment coverage over merged attributes, +- group membership completeness and uniqueness, +- unknown attribute references in groups, +- intro-template placeholder reference validity. + +### Stats behavior in code +Persona command tries to load sampled agents from study DB: +- if agents exist for scenario, compute population stats at generation time, +- else stats remain empty in config initially. + +Simulation runtime then backfills stats if persona config exists but has empty stats. + +Primary files: +- `extropy/cli/commands/persona.py` +- `extropy/population/persona/stats.py` +- `extropy/simulation/engine.py` + +### Renderer behavior in code +Renderer is deterministic and non-LLM. +Key runtime behavior: +- renders intro from `intro_template`, +- renders household section from `partner_npc`/`dependents`/`partner_id`, +- extracts intro attributes and avoids duplicate rendering in groups, +- optionally renders "Most Relevant to This Decision" section using scenario salience list, +- renders remaining groups in configured order. + +Primary file: +- `extropy/population/persona/renderer.py` + +### Categorical null-state behavior +Renderer supports nuanced categorical null handling: +- `null_options`, +- `null_phrase`, +- fallback phrase, +- token normalization. + +This reduces "raw enum token" artifacts in persona text for not-applicable states. + +### Relative rendering behavior +Relative phrasing uses z-score buckets from `population_stats`. +If stats are unavailable for an attribute, renderer defaults to the "average" phrase label. + +### Simulation integration behavior +Simulation engine pre-generates persona text for all agents at initialization. +It passes scenario `decision_relevant_attributes` into persona generation path for salience. + +Primary files: +- `extropy/simulation/engine.py` +- `extropy/simulation/persona.py` + +### Legacy fallback behavior still present +Simulation persona module still contains legacy hybrid path: +- narrative + structured characteristics list fallback if no `PersonaConfig`. + +In current CLI flow, persona config is usually required, but legacy path remains in runtime code for compatibility. + +### CLI prerequisites and ordering behavior +Current CLI enforces persona existence as pre-flight check in: +- `sample` +- `simulate` + +So practical command order is strongly constrained around persona generation. + +--- + +## Current Runtime Coupling With Other Stages + +### Coupling with `scenario` +Persona command uses scenario to: +- resolve merged attribute surface (via `extended_attributes`), +- indirectly receive salience contract (`decision_relevant_attributes`) consumed at simulation runtime. + +### Coupling with `sample` +Even though persona can generate without sampled agents, `sample` currently requires persona config to exist first. +This creates an operational dependency where persona is treated as upstream of sampling. + +### Coupling with `simulate` +Simulation requires persona config and uses it to: +- pre-generate per-agent personas, +- improve salience ordering with scenario outcome hints, +- inject text into reasoning prompts. + +### Coupling with population models +Renderer formatting behavior can depend on attribute `display_format` metadata from population spec. +Runtime path currently uses loaded population spec for display-format mapping. + +--- + +## What Current Implementation Already Gets Right + +### One-time compile, deterministic render model +Core architecture is sound: +- expensive LLM work done once, +- cheap deterministic rendering at runtime. + +### Strong typed config surface +Persona config models are structured and explicit, reducing ad hoc rendering logic. + +### Practical robustness in categorical phrasing +Token normalization + option coverage retries are meaningful quality controls. + +### Household-aware rendering +Renderer has dedicated household section logic and handles partner/NPC/dependent variants. + +### Scenario-driven salience support +Runtime path can foreground decision-relevant attributes from scenario outcomes. + +--- + +## Divergences, Mistakes, and Risk Areas + +### 1) `--preview` option is currently not functionally wired +CLI exposes `--preview/--no-preview`, but current command flow does not implement a distinct preview gate behavior tied to that flag in generation path. + +### 2) Phrase realism remains mostly prompt-driven +Structural validation is strong, but naturalness/readability quality (beyond token-like checks) still depends on prompt outputs. +There is no strict machine score for "human-like narrative quality." + +### 3) Uneven generation-time enforcement across phrasing types +Categorical has explicit retry/coverage validation. +Other phrasing classes rely more on one-shot generation and schema shape. + +### 4) Validation exists, but generation can still fail late +Coverage issues are caught before save, but they are still discovered post-generation. +This means failed generations can consume LLM calls before deterministic checks reject output. + +### 5) Operational ordering rigidity +`sample` requires persona config as a prerequisite even though persona stats can be backfilled later. +This may be intentional for pipeline discipline, but it couples stages more tightly than pure data dependency requires. + +### 6) Runtime fallback path complexity +Legacy and new persona paths coexist in simulation module. +Dual paths increase behavior surface area and potential drift. + +### 7) Auto persona config fallback path in simulation is legacy-shaped +When explicit persona path is absent, simulation tries `pop_path.with_suffix(".persona.yaml")`. +Current study structure centers scenario-scoped `persona.vN.yaml`, so this fallback is not the primary source-of-truth pattern. + +### 8) Display-format mapping scope mismatch risk +Runtime display-format map is derived from loaded population spec path. +If that surface does not fully reflect merged extension metadata, intro formatting for extension fields can degrade. + +### 9) Prompt-dependent naturalness +Natural language quality still depends heavily on LLM outputs. +Backpressure for "sounds natural, not templated token noise" is not formalized as explicit quality metrics. + +--- + +## How It Can Be Made Better (Direction, Not Patch Plan) + +### Keep contract-level persona validation as hard gate +Current explicit checks (coverage, group uniqueness, phrasing completeness, intro references) +should remain non-optional in create and validate flows. + +### Formalize quality bands for phrase realism +Add machine-checkable heuristics for low-quality phrasing patterns (raw token leakage, template artifacts). + +### Unify runtime paths +Reduce duality between legacy fallback and new config-driven rendering where possible. + +### Clarify stage dependency rationale +Document why sample requires persona pre-flight and what guarantees that provides. + +### Strengthen deterministic behavior guarantees +Define and enforce deterministic rendering invariants independent of LLM generation variance. + +--- + +## Downstream Dependency Map (What `persona` Must Support) + +### `sample` +Current operational dependency: +- persona config must exist before sampling command proceeds. + +### `simulate` +Hard runtime dependency: +- persona config exists, +- persona texts pre-generated for all agents, +- salience-aware rendering available. + +### `results` / `query` / `chat` +Indirect dependency: +- quality of persona text influences reasoning trajectories and therefore downstream outputs. + +### `scenario` +Provides: +- merged extension context via extended attributes, +- decision salience hints consumed by persona rendering at runtime. + +--- + +## Working Invariants Draft (Persona-Oriented) + +### Structural invariants +1. Persona config must parse and include all required top-level sections. +2. Every merged attribute must have exactly one treatment. +3. Every treated attribute must belong to exactly one group. +4. Group references must only contain known attributes. + +### Phrasing invariants +1. Boolean phrasing must provide both true/false phrases. +2. Categorical phrasing must cover full option set. +3. Relative phrasing must include all five z-bucket labels. +4. Concrete template must include renderable `{value}` semantics. + +### Runtime invariants +1. Intro-rendered attributes should not be duplicated in group rendering. +2. Decision-relevant attributes should be rendered in dedicated salience section when provided. +3. Rendering should not crash on missing or null values. + +### Quality invariants +1. Null-state categorical options should render as natural language, not raw enum tokens. +2. Persona text should remain first-person and internally coherent. + +--- + +## Glossary (Working Terms) +- **PersonaConfig**: Compiled rendering contract for first-person personas. +- **Treatment**: Concrete vs relative render mode assignment per attribute. +- **Relative phrasing**: Z-score bucket language compared to population mean/std. +- **Null option**: Categorical value indicating explicit absence/not-applicable state. +- **Decision salience**: Scenario-provided attribute list surfaced first for reasoning focus. + +--- + +## Practical Readout +Current persona stage is directionally strong: +- architecture is right, +- renderer is deterministic, +- simulation integration is substantial. + +Main debt is language-quality enforcement completeness: +- structural invariants are now strongly enforced, +- realism/naturalness scoring remains mostly heuristic and prompt-dependent. + +Given Extropy goals (realistic population + scenario + persona + network + simulation), +persona is a high-leverage quality gate and should be treated as such in backpressure design. + +--- + +## Final Statement +`persona` is the stage that converts structured agents into reasoning-ready human context. + +Today it already provides a capable compile-once/render-many system with meaningful runtime integration. +To fully support functional and behavioral bug detection across the pipeline, the next maturity step is explicit contract enforcement: +- complete coverage invariants, +- phrase quality diagnostics, +- and clearer ownership between persona compilation and simulation consumption. diff --git a/docs/pipeline/sample.md b/docs/pipeline/sample.md new file mode 100644 index 0000000..b9af42f --- /dev/null +++ b/docs/pipeline/sample.md @@ -0,0 +1,555 @@ +# Sample Stage Reference: Agent Instantiation and Household Realization + +## Document Intent +This file is the deep reference for the `sample` stage in Extropy. + +It is meant to be reusable team memory for: +- what `sample` is supposed to do, +- how it should do it, +- why this stage exists in the pipeline, +- what it currently does in code, +- where the current behavior diverges from intended quality goals, +- and what backpressure checks this stage should ultimately support. + +This is not a patch plan. It is a contract + current-state reality map. + +## Status Update (2026-02-23) +- Merged sampling order now recomputes topologically across base + extension attributes. +- Post-household reconciliation now deterministically aligns: + - marital/partner coherence + - household size with realized household composition + - household surnames across members, partner NPCs, and dependent name fields +- Reconciliation counters are recorded in sampling stats. +- Modifier condition-evaluation failures are now surfaced into `condition_warnings`. +- Deterministic rule-pack gate is applied post-sampling with impossible/implausible thresholds. +- Strict mode (`--strict-gates`) promotes high-risk warnings and condition-eval failures to hard blocks. +- Fail-hard sample paths now emit versioned `sample.invalid.vN.json` diagnostics. + +--- + +## How To Read This Document +Use this order: +1. `Intended Contract` for target behavior. +2. `Current Implementation (As-Is)` for actual behavior. +3. `Divergences, Mistakes, and Risk Areas` for the quality gap. +4. `Dependency Map` for downstream coupling (`network`, `simulate`, etc.). + +This file is intentionally verbose so a new teammate can recover context without prior chat history. + +--- + +## Why This Stage Exists +`spec` and `scenario` define generative rules. `sample` executes those rules. + +Without sampling, Extropy has only declarations, not a concrete population. +Downstream systems need concrete agents: +- `network` needs actual nodes with attributes, +- `simulate` needs actual individuals with persona context, +- `results/query/chat` need concrete rows tied to a scenario run. + +Design principle: +- **Compile semantics upstream, instantiate at scale in `sample`.** + +--- + +## Pipeline Position +Intended high-level flow: +1. `spec`: compile reusable base population mechanics. +2. `scenario`: compile scenario extension + event dynamics. +3. `persona`: compile rendering contract. +4. `sample`: instantiate concrete agents from merged population contract. +5. `network`: build social graph on sampled agents. +6. `simulate`: run behavioral dynamics. + +`sample` is the boundary where abstract distributions become actual synthetic people. + +--- + +## Intended Contract + +### What `sample` should do +`sample` should produce a concrete, scenario-specific population realization that is: +- statistically aligned with merged spec intent, +- internally consistent at agent and household levels, +- deterministic under seed, +- usable by downstream stages without semantic guessing. + +At a minimum it should: +- merge base + scenario extension semantics correctly, +- realize each agent in dependency-safe order, +- apply modifiers/constraints consistently, +- realize household structure when activated, +- assign realistic names with deterministic policy, +- persist agents + household records in canonical study storage, +- emit machine-usable diagnostics (stats + violations). + +### What `sample` should not do +`sample` should not: +- invent new schema semantics not defined upstream, +- silently reinterpret contradictory fields, +- depend on free-form LLM generation per agent, +- hide major consistency failures behind soft warnings, +- mutate scenario design intent at runtime. + +### How `sample` should do it +Intended execution model: +1. Load scenario + referenced base population. +2. Build merged population contract with dependency-safe sampling order. +3. Validate merged contract before execution. +4. Sample agents under deterministic RNG (seeded). +5. Apply household realization policy if scenario activates it. +6. Run post-sampling consistency checks. +7. Persist canonical outputs and diagnostics. + +### Why this contract matters +If sampling is weak, the entire pipeline degrades: +- network structure becomes fake or brittle, +- persona realism is disconnected from actual agents, +- simulation reasoning quality collapses, +- results become analytically untrustworthy. + +`sample` is therefore a quality gate, not just a utility command. + +--- + +## Conceptual Model Of Sampling + +### Merged-spec execution +`sample` should execute a merged generative program: +- base attributes (reusable population identity), +- plus scenario extension attributes (event-context identity/behavior fields). + +### Strategy semantics +Each attribute should be executed by strategy: +- `independent`: sample from distribution directly. +- `derived`: compute from formula deterministically. +- `conditional`: sample base distribution then apply triggered modifiers. + +### Household semantics +Household behavior should activate only when scenario/base semantics request it. +When active, attribute scopes should control sampling logic: +- `individual`: sampled per person. +- `household`: shared within household. +- `partner_correlated`: correlated partner realization. + +### NPC vs full-agent semantics +Scenario household scope policy should control who becomes full simulation agents: +- `primary_only`: one primary adult as full agent, partner/dependents as NPC context. +- `couples`: both adult partners are full agents, dependents mostly NPC. +- `all`: include adults + eligible dependents as full agents. + +### Constraint semantics +`sample` should separate: +- hard numeric clamping, +- impossible contradictions (should block), +- implausible but possible combinations (warn/measure). + +### Outlier semantics +`sample` should preserve realistic tails without breaking coherence: +- do not over-flatten to means, +- do not explode into nonsense combinations, +- expose measurable outlier behavior for backpressure. + +--- + +## Intended Artifact Contract + +### Primary runtime output +`sample` should emit: +- concrete agent records (`N` agents requested), +- run metadata (seed, count, timestamp, mode signals), +- sampling diagnostics/statistics, +- optional household table for household mode. + +### Canonical persistence contract +Expected canonical DB artifacts: +- `sample_runs`: run metadata, +- `agents`: per-agent full attribute JSON tied to scenario, +- `households` (if active): household type/adult/dependent/shared-attribute records. + +### Determinism contract +For fixed `(spec, scenario, seed, n)`: +- sampled outputs should be reproducible, +- IDs should be stable format, +- diagnostic summaries should be reproducible up to deterministic ordering rules. + +--- + +## Intended Quality Contract + +### Realism +Agents should look like plausible members of the target population and scenario context. + +### Internal consistency +Cross-attribute logic should hold: +- dependency-safe realization, +- constraint-respecting values, +- coherent household/person relationships. + +### Downstream support reliability +Output should be directly consumable by: +- `network` structural edge logic, +- `persona` rendering assumptions, +- `simulate` contact/NPC logic, +- `results/query/chat` retrieval semantics. + +### Backpressure intent +Sampling should expose machine-checkable quality signals for go/no-go decisions, not only human-readable summaries. + +--- + +## Current Implementation (As-Is) + +This section describes actual behavior in code today. + +### CLI command flow +`extropy sample` currently performs: +1. resolve study folder and scenario, +2. pre-flight require persona config exists, +3. load scenario YAML, +4. load base population referenced by `scenario.meta.base_population`/`population_spec`, +5. merge `extended_attributes` onto base attributes, +6. build merged sampling order with deterministic topological sort over merged dependencies, +7. validate merged spec via `validate_spec` (unless `--skip-validation`), +8. optional strict pre-sample gate (`--strict-gates`) that promotes high-risk warnings, +9. call `sample_population(...)` with scenario `household_config` + `agent_focus_mode` + `sampling_semantic_roles`, +10. apply post-sampling deterministic rule-pack gate (impossible/implausible), +11. save result to `study.db`. + +Primary file: +- `extropy/cli/commands/sample.py` + +### Merge behavior in command +Current merge is: +- `merged_attributes = base_attributes + extended_attributes` +- `merged_sampling_order = topological_sort(merged_dependencies)` + +If merged dependencies are cyclic, command fails before sampling and writes versioned invalid JSON diagnostics. + +### Validation gate behavior +Validation uses population validator (structural errors + semantic warnings): +- structural failures block sampling unless `--skip-validation`. +- warnings do not block. + +Strict mode behavior (`--strict-gates`): +- pre-sample: promotes warning categories `CONDITION_VALUE` and `MODIFIER_OVERLAP` to hard block, +- post-sample: fails if `condition_warnings` are present. + +Primary files: +- `extropy/population/validator/spec.py` +- `extropy/population/validator/structural.py` +- `extropy/population/validator/semantic.py` + +### Sampling engine dispatch +Sampler chooses mode by schema inspection: +- household mode if any attribute has `scope == "household"`. +- independent mode otherwise. + +Primary file: +- `extropy/population/sampler/core.py` + +### Strategy execution behavior +Per-attribute execution: +- `derived`: `eval_formula(...)` +- `independent`: `sample_distribution(...)` +- `conditional`: `apply_modifiers_and_sample(...)` if modifiers exist, else direct distribution sample. + +Distribution types implemented: +- `normal`, `lognormal`, `uniform`, `beta`, `categorical`, `boolean` + +Formula-based distribution params supported for numeric distributions (`*_formula` fields). + +Primary files: +- `extropy/population/sampler/core.py` +- `extropy/population/sampler/distributions.py` +- `extropy/population/sampler/modifiers.py` +- `extropy/utils/eval_safe.py` + +### Modifier behavior (actual) +- Numeric distributions: all matching modifiers stack (`multiply` product + `add` sum), then reclamp to min/max bounds. +- Categorical: one deterministic winner is selected via precedence logic (subset/specificity/order), then that rule's `weight_overrides` apply. +- Boolean: one deterministic winner is selected; apply `probability_override` or winner multiply/add transform, then clamp `[0,1]`. + +Modifier condition evaluation failures are logged and surfaced into `stats.condition_warnings` (capped to avoid unbounded growth). + +### Type coercion behavior +Sampler coerces sampled values to declared `attr.type`: +- int coercion strips non-digits for string numerics like `"6+"`. +- float coercion strips non-numeric chars. +- boolean coercion maps strings like `"true"`, `"1"`, `"yes"`. +- categorical coerces to string. + +### Constraint behavior +Current runtime constraint handling is split: +- hard numeric bounds (`hard_min`/`hard_max`, plus legacy `min`/`max`) are applied as clamping. +- expression constraints are checked post-sampling and counted in `stats.constraint_violations`. +- `spec_expression` constraints are not run against agents (treated as spec-level only). + +Expression check exceptions are swallowed for the affected constraint evaluation. +CLI rule-pack treats non-zero expression-constraint violations as impossible and fail-hard. + +### Household sampling behavior +When household mode is active: +- primary adult is sampled first, +- household type is sampled from `HouseholdConfig` age-bracket weights, +- partner realization depends on `agent_focus_mode`: + - `primary_only`: partner is NPC profile in `partner_npc`, `partner_id=None`. + - `couples`: partner is full agent with `partner_id` reciprocal link. + - `all`: partner is full agent; eligible dependents may be promoted to full agents. +- dependents are generated from household type and age constraints. +- in `all`, dependents above `min_agent_age` can be promoted to full agents; others remain NPC dependent data. + +Sampler trims overflow agents if final household overshoots `target_n`. + +Primary files: +- `extropy/population/sampler/core.py` +- `extropy/population/sampler/households.py` + +### Minor-dependent normalization behavior +Promoted dependent agents (minors) undergo normalization using attribute `semantic_type`: +- education/employment/occupation/income coerced to age-appropriate forms. + +This is deterministic rule-based normalization in sampler core. + +### Partner correlation behavior +For correlated partner fields, runtime uses policy resolution: +- explicit scenario semantic-role override (`sampling_semantic_roles.partner_correlation_roles`) if present, +- otherwise semantic/identity/default policy resolution (`gaussian_offset`, `same_group_rate`, `same_country_rate`, `same_value_probability`), +- then deterministic fallback rates from `HouseholdConfig`. + +### Name generation behavior +Names are generated during sampling, not in `spec`/`scenario` writing. + +Current runtime path: +- sampler calls `generate_name(...)` per primary/partner/dependent generation path, +- uses Faker-first locale routing from country/region hints, +- falls back to bundled CSV first/last name frequencies if Faker locale generation fails, +- gender/ethnicity/age-derived birth decade drive selection. + +Primary files: +- `extropy/population/sampler/core.py` +- `extropy/population/names/generator.py` + +### Stats and diagnostics behavior +Sampler collects: +- numeric means/std, +- categorical counts, +- boolean counts, +- modifier trigger counts, +- expression constraint violation counts, +- condition-evaluation warnings, +- household reconciliation counters. + +CLI post-processing adds rule-pack summary (`pass/warn/fail`) into sampling stats for machine-readable backpressure. + +Primary file: +- `extropy/core/models/sampling.py` + +### Persistence behavior +After sampling: +- saves base population YAML text into `population_specs` under `population_id=scenario_name` (backward-compat path), +- saves sampled agents into `agents` with `scenario_id=scenario_name`, +- saves run metadata into `sample_runs`, +- saves households (if present) into `households`. + +Existing records are replaced per scenario scope (`DELETE FROM agents WHERE scenario_id = ?`) before insert. + +Primary files: +- `extropy/cli/commands/sample.py` +- `extropy/storage/study_db.py` + +--- + +## Current Runtime Coupling With Downstream Stages + +### `network` coupling +`network` requires sampled agents for scenario ID and consumes household fields (`household_id`, `partner_id`, `dependents`) for structural edges. + +Primary files: +- `extropy/cli/commands/network.py` +- `extropy/population/network/generator.py` + +### `persona` coupling +`sample` command enforces persona pre-flight existence, even though sampler itself does not read persona config. + +Primary file: +- `extropy/cli/commands/sample.py` + +### `simulate` coupling +Simulation requires sampled agents and loads households from DB. +It also consumes household-adjacent agent fields for contacts/NPC conversation context. + +Primary files: +- `extropy/cli/commands/simulate.py` +- `extropy/simulation/engine.py` +- `extropy/simulation/conversation.py` + +### `results/query/chat` coupling +All downstream query/results/chat behavior depends on quality and consistency of the concrete sampled agent rows persisted in `study.db`. + +--- + +## What Current Implementation Already Gets Right + +### Strong deterministic execution core +Given a seed and fixed inputs, sampler behavior is reproducible and non-LLM at runtime. + +### Broad distribution and modifier support +Sampler supports rich distribution types, formula parameters, and conditional modifiers. + +### Household-aware realization exists end-to-end +Household sampling, partner correlation, dependent generation, and NPC/full-agent modes are implemented in core runtime. + +### Expression constraints are measured +Agent-level expression violations are counted and exposed in stats (not silently ignored entirely). + +### Canonical persistence path is in place +`sample` writes to a unified study database with scenario-scoped retrieval patterns used by downstream commands. + +--- + +## Divergences, Mistakes, and Risk Areas + +### 1) Household activation tied only to `scope="household"` +Sampler switches to household mode only if at least one household-scoped attribute exists. + +Risk: +- scenario may provide household config/focus mode but not trigger household mode if scope annotations are missing or inconsistent. + +### 2) Persona is required as pre-flight for `sample` +Current command requires persona config before sampling even though sampler core does not depend on persona content. + +Risk: +- operational coupling can block sampling workflows unrelated to sampler logic. + +### 3) Name field shape mismatch risk in NPC partner usage +Sampler writes NPC partner fields with `first_name`/`last_name` style semantics, while parts of simulation conversation/contact logic look for `partner_npc.name` in several paths. + +Risk: +- household NPC addressing and partner reference resolution can degrade. + +### 4) Partner key mismatch risk in simulation contact paths +Sampler uses `partner_id`; parts of simulation contact/conversation logic also check `partner_agent_id`. + +Risk: +- some partner-as-agent references may not resolve uniformly. + +### 5) Expression constraint failures are counted post-hoc, not repaired +Expression constraints are checked after sampling and can fail-hard via rule-pack. + +Risk: +- impossible violations fail via rule-pack gate, but sampler does not attempt automated repair/resample before failing. + +### 6) Type coercion can mask upstream categorical/schema drift +Aggressive coercion (e.g., stripping symbols from numeric-like strings) keeps sampling alive. + +Risk: +- upstream naming/schema mismatches may appear to "work" while distorting semantics. + +### 7) Persistence identity uses backward-compat population keying +Sample saves population spec under `population_id=scenario_name` backward-compat behavior. + +Risk: +- conceptual blending of base population identity and scenario identity in storage layer. + +--- + +## How It Can Be Made Better (Direction, Not Patch Plan) + +### Promote merged-order contract as first-class artifact +Merged dependency-safe order is now explicit and enforced at sample runtime. +Remaining improvement is surfacing richer diagnostics when dependency-quality is weak upstream. + +### Strengthen mismatch diagnostics +Expose dedicated machine-readable warnings for token/key mismatches and condition failures. + +### Tighten household/NPC schema contract +Keep partner/dependent key conventions consistent across sampler, persona renderer, and conversation resolution. + +### Separate structural validity from behavioral acceptance +Use staged backpressure where severe inconsistency blocks downstream progression. + +### Keep runtime deterministic but more observable +Retain non-LLM deterministic sampling while expanding run diagnostics quality. + +--- + +## Dependency Map (What `sample` Must Support) + +### `network` +Requires: +- stable `agent_id`s, +- coherent household/partner fields, +- realistic attribute distributions for similarity + structural edge logic. + +### `simulate` +Requires: +- complete agent rows, +- household/NPC context, +- scenario-scoped agent retrieval consistency. + +### `persona` runtime rendering +Requires: +- attribute-value consistency, +- household context fields for household section rendering. + +### `results`, `query`, `chat` +Require: +- canonical DB persistence, +- deterministic scenario scoping, +- minimal schema surprises in agent JSON. + +--- + +## Working Invariants Draft (Sample-Oriented) + +### Structural invariants +1. Exactly `N` agents returned for requested `--count`. +2. Every sampled attribute referenced in order exists in merged schema. +3. Every dependency expression name is known or explicitly flagged. + +### Household invariants +1. If household mode active, every agent has coherent `household_id`/role semantics. +2. Partner links are reciprocal for partner-agent households. +3. Household-scoped attributes are shared among household members. + +### Consistency invariants +1. Hard bounds are respected for numeric attributes. +2. Expression violation rates are measured and thresholded for backpressure. +3. Minor-dependent promoted agents are age-coherent on semantic-type fields. + +### Downstream invariants +1. Scenario-scoped agent retrieval returns sampled set used for network/simulation. +2. Household/NPC keys used by simulation are present and shape-consistent. +3. Sampling diagnostics are persisted/exportable for audit. + +--- + +## Glossary (Working Terms) +- **Merged spec**: base attributes + scenario `extended_attributes` used for sampling. +- **Primary adult**: first sampled adult for a household unit. +- **NPC partner/dependent**: household member represented as context, not full agent row. +- **Agent focus mode**: scenario policy for who becomes full agents (`primary_only`, `couples`, `all`). +- **Partner-correlated attribute**: attribute sampled to correlate with partner value. +- **Backpressure**: quality signal that can stop or warn before downstream execution. + +--- + +## Practical Readout +`sample` is not the heaviest compile stage, but it is not trivial. +It is where many independent contracts collide: +- merged dependency execution, +- household realization, +- name semantics, +- consistency enforcement, +- storage contract for the rest of the pipeline. + +So it is simpler than `spec + scenario` authoring, but still a high-leverage failure point. + +--- + +## Final Statement +`sample` should be treated as the execution-grade realization gate for Extropy. + +Current implementation already has substantial capability and deterministic runtime behavior. +The main gaps are contract coherence at boundaries (especially merged ordering and cross-module household/NPC key consistency), plus stronger machine-readable backpressure signals for quality acceptance. diff --git a/docs/pipeline/scenario.md b/docs/pipeline/scenario.md new file mode 100644 index 0000000..3a02468 --- /dev/null +++ b/docs/pipeline/scenario.md @@ -0,0 +1,622 @@ +# Scenario Stage Reference: Scenario Extension and Event Dynamics + +## Document Intent +This file is the deep reference for the `scenario` stage in Extropy. + +Its job is to make one thing unambiguous for people and agents working on the pipeline: +- what `scenario` should do in principle, +- how that contract should be enforced, +- where the current implementation stands, +- where current behavior diverges from intended behavior, +- and what quality/backpressure signals this stage must expose. + +This is not a patch list. It is a stage contract + current-state reality map. + +## Status Update (2026-02-23) +- Scenario creation now enforces non-empty `extended_attributes` as a hard contract. +- Scenario validation in create-flow is now real validation (not light-pass placeholder). +- Attribute reference validation uses merged namespace (`base population ∪ scenario extension`). +- Literal-option compatibility checks are enforced for `when` conditions in: + - `seed_exposure.rules` + - `spread.share_modifiers` + - `timeline[*].exposure_rules` +- Sufficiency post-processing now enforces timestep clarity: + - timeline markers (for example `week 1`, `month 0`) force `evolving`, + - static scenarios must provide an explicit timestep unit (or ask clarification). +- Household/focus coherence checks are enforced for household-active scenarios. +- Fail-hard scenario paths now emit versioned invalid artifacts (`*.invalid.vN.yaml` and JSON invalid diagnostics where applicable). +- Agent-mode insufficiency now returns structured clarification payloads (exit code 2) instead of falling through generic validation errors. + +--- + +## How To Read This Document +Use this order: +1. `Intended Contract` for design truth. +2. `Current Implementation (As-Is)` for code truth. +3. `Divergences, Mistakes, and Risk Areas` for the gap. +4. `Dependency Map` for how downstream stages consume scenario outputs. + +This file is intentionally verbose so a new team member can recover context without prior chat history. + +--- + +## Why This Stage Exists +`spec` gives a reusable population blueprint. +`scenario` should turn that blueprint into a simulation-ready context. + +Without scenario compilation, downstream stages would have to infer too much ad hoc: +- which additional attributes matter for this event, +- how information is introduced and spreads, +- whether scenario timing is static or evolving, +- what outcomes should be extracted from reasoning, +- how household/agent scope should be interpreted in this specific run. + +Design principle: +- **Compile scenario context once, execute many downstream steps against that contract.** + +--- + +## Pipeline Position +High-level pipeline intent: +1. Build base population encoding (`spec`). +2. Extend that population for a specific event context (`scenario`). +3. Build scenario-grounded rendering and graph context (`persona`, `network`). +4. Instantiate agents, propagate information, reason, and aggregate (`sample`, `simulate`, `results`, `query`, `chat`). + +`scenario` is the bridge stage between reusable base population mechanics and concrete event dynamics. + +--- + +## Intended Contract + +### What `scenario` should do +`scenario` should output a versioned scenario artifact that contains both: +1. **Scenario-specific population extension** (non-empty). +2. **Scenario dynamics contract** for exposure, spread, timeline, and outcomes. + +At minimum, it should: +- discover and encode scenario-specific extension attributes, +- preserve dependency-safe sampling semantics for those attributes, +- define the event and its source properties, +- define how agents hear about the event (channels/rules/timing), +- define interaction and spread behavior assumptions, +- define static vs evolving time semantics, +- define bounded outcome space for extraction, +- define household/agent activation semantics for this scenario, +- provide machine-checkable quality signals (impossible vs implausible). + +### What `scenario` should not do +`scenario` should not: +- sample concrete agents, +- generate concrete network edges, +- execute simulation loops, +- rely on hidden downstream defaults for critical semantics, +- silently degrade required fields for convenience. + +### How `scenario` should do it +Intended compile pattern: +1. Sufficiency check for event/timeline/outcome clarity. +2. Scenario extension discovery over base population context. +3. Extension hydration and dependency binding. +4. Event/exposure/interaction/timeline/outcome compilation. +5. Contract validation with severity separation. +6. Emit single coherent versioned scenario artifact. + +### Why this contract matters +If this stage is weak: +- sampling quality drops (because extension semantics are noisy), +- persona salience loses scenario grounding, +- network generation uses generic heuristics without event intent, +- simulation reasoning becomes brittle and underconstrained, +- result interpretation loses trust. + +`scenario` is therefore not just "event text generation." It is a downstream control contract. + +--- + +## Conceptual Model Of Scenario Compilation + +### Scenario as downstream control contract +Conceptually, `scenario` is a packet sent to four consumers: +- `sample`, +- `network`, +- `persona`, +- `simulate`. + +The packet should tell downstream systems: +- what changed in the world, +- who gets exposed, through what path, at what time, +- what social propagation assumptions apply, +- which dimensions matter for behavioral output, +- what outcomes to classify and track. + +### Two sub-domains inside scenario +Scenario naturally contains two sub-systems: +1. **Population extension subsystem** (mini-spec behavior). +2. **Event dynamics subsystem** (timeline/exposure/outcome behavior). + +This dual nature is expected. The contract must keep their boundary explicit. + +### Strict envelope, loose internals +Design choice for schema stability: +- **Strict envelope**: stable top-level keys must always exist. +- **Loose internals**: optional advanced sub-blocks can be empty when not relevant. + +This keeps deterministic parsing without hardcoding scenario-specific internals. + +### Required vs optional semantics +From current team direction: +- `extended_attributes` should be required and non-empty. +- Core dynamic blocks (`event`, `seed_exposure`, `spread`, `timeline`, `outcomes`) should be present. +- Advanced optional blocks may be empty when not used. + +--- + +## Intended Base vs Scenario Boundary + +### Base population (`spec`) should own +- reusable population mechanics, +- long-horizon demographic and identity distributions, +- generic dependency/distribution logic not tied to one event rollout. + +### Scenario should own +- event-context extension attributes, +- event/timeline/exposure/outcome semantics, +- household activation policy for this scenario, +- agent scope mode for this scenario (`primary_only`/`couples`/`all`). + +### Downstream stages should own +- `sample`: concrete instantiation with seed + runtime enforcement. +- `network`: concrete graph realization. +- `persona`: rendering config and textual embodiment. +- `simulate`: state evolution and reasoning loop. + +--- + +## Intended Artifact Contract + +### Primary artifact +`scenario` should emit versioned YAML under: +- `scenario//scenario.vN.yaml` + +It should serve as the single source of truth for scenario context. + +### Envelope contract (intended) +Top-level sections should be stable: +- `meta` +- `event` +- `timeline` +- `seed_exposure` +- `interaction` +- `spread` +- `outcomes` +- `simulation` +- `extended_attributes` +- `household_config` +- `agent_focus_mode` + +Optional top-level sections may exist (for example identity framing), but core sections should not be omitted. + +### Extension attribute contract (intended) +Each extension attribute should include: +- canonical name/type/category, +- strategy + dependency semantics, +- scope semantics (`individual`/`household`/`partner_correlated`), +- correlation metadata when relevant, +- constraints and grounding info. + +### Outcome contract (current team direction) +- bounded outcome set (cap = 8), +- no forced canonical single outcome requirement, +- not every outcome must be directly measurable by a numeric KPI, +- no mandatory misinformation/distortion path requirement. + +### Rule-pack contract (intended) +Scenario checks should distinguish: +- **impossible** contradictions -> hard block, +- **implausible** patterns -> warning/penalty signal, +- informational diagnostics -> non-blocking context. + +This rule-pack shape should be machine-consumable for backpressure. + +--- + +## Intended Quality Contract + +### Realism +Scenario should represent plausible information and response dynamics: +- realistic channels, +- realistic timing, +- realistic subgroup exposure differences. + +### Internal consistency +Scenario internals should agree with each other: +- timeline semantics must match simulation config, +- exposure rules should reference known attributes/channels, +- outcomes should align with event scope. + +### Downstream support reliability +Downstream stages should not need to infer missing semantics for core behavior. +If they do, the scenario contract is underspecified. + +### Determinism where needed +The stage should preserve flexibility without introducing arbitrary ambiguity for required controls. + +--- + +## Intended Backpressure Philosophy (Contract-Level) +Scenario compilation should output enough quality evidence to support go/no-go gating. + +Backpressure should be: +- explicit, +- machine-readable, +- tied to severity classes, +- traceable to concrete locations in scenario content. + +This is essential for catching functional and behavioral bugs before simulation. + +--- + +## Current Implementation (As-Is) + +This section describes actual code behavior now. + +### Entrypoint behavior in CLI +`extropy scenario` currently performs: +1. scenario sufficiency check, +2. extension attribute selection (`select_attributes` with base context), +3. extension hydration (`hydrate_attributes`), +4. extension binding (`bind_constraints`), +5. scenario config generation (`create_scenario_spec`), +6. metadata finalization (`meta.name`, `meta.base_population`) + re-validation, +7. save valid artifact or emit versioned invalid artifact and exit non-zero. + +Primary orchestration file: +- `extropy/cli/commands/scenario.py` + +### Sufficiency behavior in code +Sufficiency model checks: +- event clarity, +- duration/timestep inference, +- static vs evolving inference, +- explicit outcomes presence, +- inferred `agent_focus_mode`. + +Current behavior characteristics: +- lenient sufficiency style, +- user clarification loop supported, +- deterministic post-processing layers over LLM output: + - extracts unit hints from description and inferred duration, + - promotes explicit timeline markers to evolving mode, + - blocks static scenarios without explicit timestep unit by issuing a clarification question, +- inferred fields are mostly advisory for messaging except `agent_focus_mode` and unit hints that feed compile defaults. + +In agent mode: +- insufficiency returns structured clarification questions with exit code 2 (`needs_clarification`), +- `--use-defaults` attempts a no-prompt re-check by applying question defaults. + +Primary file: +- `extropy/scenario/sufficiency.py` + +### Mini-spec extension behavior in code +Scenario uses spec-builder primitives directly: +- attribute selector in overlay mode with base attributes as context, +- split hydrator pipeline (independent/derived/conditional/base+modifiers), +- household config hydration (conditional), +- dependency binding with expression-based dependency inference. + +Primary files: +- `extropy/population/spec_builder/selector.py` +- `extropy/population/spec_builder/hydrator.py` +- `extropy/population/spec_builder/binder.py` + +Important implementation detail: +- extension compilation is strong and feature-rich (close to spec flow), including scope and correlation semantics. + +### Scenario dynamics generation behavior in code +`create_scenario_spec` composes: +1. event parse (`parse_scenario`), +2. seed exposure generation (`generate_seed_exposure`), +3. interaction/spread generation (`determine_interaction_model`), +4. timeline+outcomes generation (`generate_timeline_and_outcomes`), +5. identity dimension detection. + +Primary files: +- `extropy/scenario/compiler.py` +- `extropy/scenario/parser.py` +- `extropy/scenario/exposure.py` +- `extropy/scenario/interaction.py` +- `extropy/scenario/timeline.py` + +### Important current coupling detail +In `create_scenario_spec`, parser/exposure/interaction generation uses a merged population context: +- base population attributes, plus +- scenario `extended_attributes`. + +Scenario creation-time generation passes `network_summary=None` (no synthetic placeholder edge types injected at this stage). + +### Validation behavior in current new flow +`create_scenario_spec` runs deterministic scenario validation in-flow via: +- `extropy/scenario/validator.py` + +`extropy scenario` checks validation errors before save. On fail-hard paths, it writes a versioned `.invalid` artifact and exits non-zero. + +Current validator focus areas include: +- merged-namespace attribute reference checks (base + extension), +- expression syntax checks for `when` rules, +- literal compatibility checks against categorical options and boolean literals, +- channel/timestep/outcome consistency checks, +- household + `agent_focus_mode` coherence when household semantics are active. + +### Assembly behavior for extension/household fields +`extended_attributes`, `household_config`, and `agent_focus_mode` are passed into `create_scenario_spec` and emitted as part of the assembled `ScenarioSpec` contract. + +### Timeline/outcome behavior in code +Timeline generator can produce static or evolving behavior and supports: +- timestep unit, +- max timesteps, +- timeline events with optional re-reasoning intensity. + +Outcome generation currently: +- encourages categorical/boolean/open_ended, +- discourages float in prompt, +- supports option friction for categorical outcomes, +- sets `capture_full_reasoning=true`. + +Current conversion behavior sets: +- `extraction_instructions=None` by default in generator return path. + +### Exposure channel behavior in code +Scenario model supports channel-level `experience_template`. +Runtime reasoning prompt consumes it when present. + +Exposure generation schema explicitly requests optional `experience_template`. + +### Identity framing behavior in code +Scenario compiler can detect `identity_dimensions`. +Simulation engine consumes those dimensions by matching to attribute `identity_type` and injecting identity relevance text into reasoning context. + +This is one of the stronger semantic links between scenario and simulation. + +--- + +## Current Runtime Coupling With Downstream Stages + +### Sample coupling +`sample` does: +- load base population from scenario metadata, +- merge `extended_attributes` into attributes list, +- recompute merged sampling order with topological sort over merged dependencies, +- pass scenario `household_config` and `agent_focus_mode` into sampler. + +Primary file: +- `extropy/cli/commands/sample.py` + +### Household/agent scope behavior in sampler +Sampler supports: +- `primary_only`, +- `couples`, +- `all`. + +It uses household config and attribute scope semantics to decide: +- which members are full agents, +- which are NPC partner/dependent context. + +Primary files: +- `extropy/population/sampler/core.py` +- `extropy/population/sampler/households.py` + +### Persona coupling +`persona` command merges base+extended attributes for config generation. +At runtime, simulation persona rendering uses scenario `decision_relevant_attributes` to prioritize trait salience when available. + +Primary files: +- `extropy/cli/commands/persona.py` +- `extropy/simulation/engine.py` +- `extropy/population/persona/renderer.py` + +### Network coupling +`network` command merges base+extended attributes when generating network config. +Network config generation itself is population-driven and does not directly consume scenario spread/exposure fields in config synthesis. + +Primary files: +- `extropy/cli/commands/network.py` +- `extropy/population/network/config_generator.py` + +### Simulation coupling +Simulation consumes scenario directly for: +- event content, +- seed exposure channels/rules, +- spread modifiers, +- timeline events, +- outcomes schema, +- extraction instructions (if present), +- identity dimensions. + +Primary files: +- `extropy/simulation/engine.py` +- `extropy/simulation/propagation.py` +- `extropy/simulation/reasoning.py` + +--- + +## What Current Implementation Already Gets Right + +### Strong extension modeling capability +Scenario extension currently supports most of the rich attribute semantics that matter: +- strategy types, +- dependency inference, +- scope semantics, +- modifier-based conditional sampling. + +### Clear downstream field model +Scenario model surface is expressive and already includes key hooks: +- extension attrs, +- household config, +- agent focus mode, +- identity dimensions, +- decision-relevant attributes, +- experience templates. + +### Runtime integration quality in simulation +Simulation integration is substantial and not superficial: +- exposure history shaping, +- timeline-driven propagation, +- outcome schema-driven extraction, +- identity relevance framing. + +### CLI lifecycle coherence +Study-folder versioning flow and command sequencing are operationally coherent. + +--- + +## Divergences, Mistakes, and Risk Areas + +### 1) Scenario stage currently carries two heavy compilers +It runs both mini-spec extension compilation and event dynamics compilation in one stage. +This is conceptually valid but operationally heavy, raising coupling risk and debugging complexity. + +### 2) Contract remains broad/heavy in one stage +Scenario still combines two heavy concerns in one stage: +- scenario extension attribute compilation, and +- event dynamics compilation. +This is valid, but operationally complex. + +### 3) Base-vs-extended merge is now explicit in dynamics generation +Parser/exposure/interaction generation uses merged base+extended context in the new flow. +Remaining risk is quality of extension attributes themselves, not omission from dynamics prompt context. + +### 4) Validation strictness has improved, but rule depth can still expand +New-flow scenario creation runs deterministic validation before save. +Future quality gains are mostly about adding richer rule coverage, not wiring. + +### 5) Envelope stability vs practical generation mismatch +Model supports fields like `experience_template` and `extraction_instructions`, but default generation often leaves them null. +This is schema richness without guaranteed population of semantically useful hooks. + +### 6) Merged-order correctness now depends on dependency quality +Downstream now recomputes merged order with topological sort. +Primary remaining risk is dependency quality from generated attributes (missing/wrong `depends_on`), not append-only ordering. + +### 7) Network intent contract is implicit +Scenario has spread/exposure semantics, but network config generation is primarily population-driven. +The explicit scenario-to-network intent bridge is weak/implicit rather than formalized. + +### 8) Outcome policy is prompt-heavy +Outcome quality rules rely strongly on prompt instructions and conversion defaults. +Contract-level invariant enforcement for outcome count/shape/salience is not strongly centralized. + +### 9) Complexity debt in ownership clarity +Household semantics are now effectively scenario-owned in practice, but documentation/contracts can still be interpreted ambiguously if not explicit. + +--- + +## How It Can Be Made Better (Direction, Not Patch Plan) + +### Make scenario a single atomic contract emission +Avoid conceptual split between "core scenario object" and "later attached core fields." + +### Strengthen contract-level validation in authoring path +Bring strict structural + semantic checks earlier in the default `scenario` creation lifecycle. + +### Make base+extension context explicit before dynamics generation +Treat extension as first-class compile context for event/exposure/interaction synthesis. + +### Codify strict envelope + loose internals +Stabilize top-level keys while preserving contextual flexibility inside optional blocks. + +### Promote rule-pack severity model +Separate impossible/implausible checks explicitly and persist those diagnostics for pipeline backpressure. + +### Tighten scenario-to-network intent bridge +Clarify and formalize which scenario signals must be consumed by network synthesis. + +--- + +## Downstream Dependency Map (What `scenario` Must Support) + +### `sample` +Needs: +- non-empty `extended_attributes`, +- `household_config`, +- `agent_focus_mode`. + +### `network` +Needs: +- merged population context (base + extension), +- optional scenario intent signals for spread topology assumptions. + +### `persona` +Needs: +- merged attribute context, +- scenario salience hints (`decision_relevant_attributes`) for rendering emphasis. + +### `simulate` +Needs: +- event + timeline content, +- exposure channels/rules, +- spread modifiers, +- outcomes schema, +- optional extraction instructions, +- identity dimensions. + +### `results`, `query`, `chat` +Depend on scenario-defined outcome schema and timeline semantics for interpretation and querying consistency. + +--- + +## Working Invariants Draft (Scenario-Oriented) +These are contract-level invariants to support future backpressure harnesses. + +### Core invariants +1. `extended_attributes` must exist and be non-empty. +2. `event`, `seed_exposure`, `spread`, `outcomes`, and `simulation` must exist. +3. `agent_focus_mode` must be one of `primary_only`, `couples`, `all`. +4. Every exposure rule channel must reference a defined channel. +5. Every expression field must parse and reference known symbols only. + +### Outcome invariants +1. Outcome count must be within configured cap (current team direction: <= 8). +2. Categorical outcomes must have valid option sets. +3. Outcome names must be canonicalized and machine-safe. + +### Consistency invariants +1. Timeline timesteps must be unique and coherent with simulation horizon. +2. Household-related fields must not conflict with agent focus mode semantics. +3. Scenario metadata must resolve to a valid base population reference in study context. + +--- + +## Glossary (Working Terms) +- **Scenario extension**: Scenario-specific additional attributes over base population. +- **Strict envelope**: Stable required top-level schema keys. +- **Loose internals**: Optional internal subfields that can be empty when irrelevant. +- **Impossible**: Contradictory/invalid condition that should block compile. +- **Implausible**: Unusual but possible condition that should warn, not necessarily block. +- **Agent focus mode**: Household agent scope policy (`primary_only`/`couples`/`all`). +- **Experience template**: First-person phrasing template for how channel exposure is represented in reasoning prompts. + +--- + +## Practical Readout +At present, scenario is best interpreted as: +1. a powerful but heavy dual-compiler stage, +2. with strong extension expressivity, +3. strong runtime simulation integration, +4. and contract-enforcement gaps in authoring path consistency. + +For team operation, the most important framing is: +- the stage intent is correct, +- the ownership boundary is mostly right, +- but enforcement and assembly coherence need to be treated as first-class quality concerns. + +--- + +## Final Statement +`scenario` should be the stage that makes simulation context explicit, testable, and reusable. + +Current implementation already contains most raw capabilities needed to do this well. +The main remaining challenge is not missing concepts, but contract coherence: +- one atomic scenario contract, +- explicit ownership boundaries, +- and clear backpressure signals that downstream stages can trust. diff --git a/docs/pipeline/simulate.md b/docs/pipeline/simulate.md new file mode 100644 index 0000000..ee4bf85 --- /dev/null +++ b/docs/pipeline/simulate.md @@ -0,0 +1,500 @@ +# Simulate Stage Reference: Runtime Dynamics and Outcome Realization + +## Document Intent +This file is the deep reference for the `simulate` stage in Extropy. + +It is meant to be reusable team memory for: +- what `simulate` is supposed to do, +- how it should do it, +- why this stage exists in the pipeline, +- what it currently does in code, +- where current behavior diverges from intended quality goals, +- and what runtime backpressure checks this stage should support. + +This is not a patch plan. It is a contract + current-state reality map. + +## Status Update (2026-02-23) +- Simulation is now scenario-centric in lookup order (`scenario_id` first, legacy IDs as fallback). +- Runtime loop supports DB-backed resume/checkpoint behavior at timestep and chunk levels. +- Timeline events support provenance epochs (`info_epoch`) and forced re-reasoning escalation. +- Timeline fallback exposure no longer reuses full seed rule sets blindly: + - fallback rules are filtered to representative channel rules, + - direct timeline exposure is deduplicated per-agent per-event, + - direct timeline exposure is capped by intensity (`normal|high|extreme`). +- Reasoning supports two modes: + - default two-pass (role-play + classification), + - optional merged single-pass (`--merged-pass`). +- Fidelity modes actively control conversation behavior: + - `low`: no conversations, + - `medium`: bounded conversations after chunks, + - `high`: deeper conversations + extra public-text classification. +- Runtime now applies deterministic per-timestep budgets: + - bounded reasoning candidate set, + - bounded conversation count, + - novelty gate before conversation execution. +- Reasoning prompt payload is now trimmed by fidelity (recent exposures + recent memory only). +- Early convergence behavior is now explicit and overrideable (`auto|on|off`). +- Runtime exports include `by_timestep.json`, `meta.json`, and conditional conversation/social artifacts. +- State manager now auto-upgrades legacy simulation tables/columns (including timeline-provenance exposure fields) on startup. + +--- + +## How To Read This Document +Use this order: +1. `Intended Contract` for target behavior. +2. `Current Implementation (As-Is)` for code truth. +3. `Divergences, Mistakes, and Risk Areas` for the quality gap. +4. `Dependency Map` for upstream/downstream coupling. + +This file is intentionally verbose so a new teammate can recover context without prior chat history. + +--- + +## Why This Stage Exists +All earlier pipeline stages compile structure: +- who exists (`spec` + `scenario` + `sample`), +- how they are connected (`network`), +- how they speak/think (`persona`). + +`simulate` is where those compiled artifacts are executed over time. + +Without `simulate`, Extropy has static data but no dynamics: +- no temporal exposure flow, +- no opinion shifts, +- no sharing cascades, +- no conversation-mediated corrections, +- no run-level outcomes. + +Design principle: +- **Execute deterministic state transitions around bounded LLM reasoning, then persist full run traceability.** + +--- + +## Pipeline Position +Intended high-level flow: +1. `spec`: base population contract. +2. `scenario`: event + extension contract. +3. `persona`: rendering contract. +4. `sample`: concrete agents. +5. `network`: concrete graph. +6. `simulate`: dynamic execution over timesteps. +7. `results/query/chat`: interpretation and retrieval. + +`simulate` is the first stage that mutates dynamic state over time. + +--- + +## Intended Contract + +### What `simulate` should do +`simulate` should produce a reproducible run that: +- applies scenario exposure dynamics over timesteps, +- reasons for the right agents at the right moments, +- propagates through network and conversation channels, +- updates public/private agent states coherently, +- persists enough detail for debugging, analysis, and replay. + +At minimum it should: +- validate prerequisites (scenario, agents, network, persona), +- run timestep loop with clear phase ordering, +- enforce deterministic gating around LLM calls, +- support bounded resume/recovery behavior, +- output machine-usable artifacts and run metadata. + +### What `simulate` should not do +`simulate` should not: +- silently fabricate missing prerequisites, +- mutate upstream schema contracts, +- hide runtime failure causes, +- collapse all behavior to undifferentiated midpoint outputs, +- require manual table surgery for normal resume behavior. + +### How `simulate` should do it +Intended runtime model: +1. preflight + config resolution, +2. load scenario/population/agents/network/persona, +3. initialize run scope + state store, +4. for each timestep: exposures -> reasoning -> conversation -> summary, +5. evaluate stopping conditions, +6. finalize aggregates and export artifacts. + +### Why this contract matters +Simulation quality is where trust is won or lost. +Weak runtime controls produce plausible-looking but analytically unstable outputs. + +`simulate` is therefore not just “run models”; it is the reliability envelope for behavioral dynamics. + +--- + +## Conceptual Model Of Runtime Dynamics + +### Exposure stack +Per timestep exposure can come from: +1. seed rules, +2. timeline events (if scheduled at this timestep), +3. network propagation from sharing agents. + +### Reasoning triggers +Agents reason when one of these holds: +- aware and never reasoned, +- forced by newer `info_epoch` timeline provenance, +- multi-touch threshold reached (unique source count) and not committed. + +### Public/private state split +Runtime distinguishes: +- public-facing expression (`public_position/sentiment/conviction`), +- private behavior state (`private_*`). + +High-conviction guardrails resist abrupt flips unless confidence/support criteria are met. + +### Conversation interleaving +For medium/high fidelity, conversation executes after reasoning chunks and can override provisional reasoning states. + +### Stop semantics +Run can stop via: +- max timesteps, +- explicit stop conditions, +- optional convergence/quiescence auto-stop depending on `allow_early_convergence` and future timeline events. + +--- + +## Intended Ownership Boundary + +### `simulate` should own +- runtime state transitions, +- timestep orchestration, +- reasoning/conversation execution policy, +- stop-condition evaluation, +- run persistence + exports. + +### `scenario` should own +- event/timeline definitions, +- exposure/spread/outcome schema, +- simulation horizon and stop condition intent. + +### `sample` + `network` should own +- initial node/edge data quality and coherence. + +### `results/query/chat` should own +- post-run interpretation and retrieval. + +--- + +## Intended Artifact Contract + +### Canonical run persistence (DB) +Simulation should persist: +- run lifecycle records (`simulation_runs`, checkpoints, metadata), +- mutable agent state tables, +- exposures, memory traces, timeline events, timestep summaries, +- conversations/social posts when enabled. + +### File exports (results dir) +Runtime should export: +- `by_timestep.json` +- `meta.json` +- optional `conversations.json` +- optional `social_posts.json` +- `elaborations.csv` + +### Determinism contract +For fixed `(scenario, sampled agents, network, seed, model behavior)`: +- non-LLM state transitions are deterministic, +- LLM calls are bounded by stable schemas/prompts, +- resume should be consistent with prior persisted checkpoints. + +--- + +## Intended Quality Contract + +### Realism +Dynamics should look socially plausible: +- propagation and re-reasoning should respond to new information and relationship context, +- conversation effects should be bounded and not chaotic. + +### Internal consistency +Public/private state evolution and sharing decisions should stay coherent with conviction, exposures, and scenario rules. + +### Downstream support reliability +Outputs should be directly consumable by: +- `results` timeline/summary views, +- `query` exports, +- `chat` grounded context. + +### Backpressure intent +Simulation stage should expose clear stop reason, runtime diagnostics, and failure modes that can be triaged without guesswork. + +--- + +## Current Implementation (As-Is) + +This section describes actual behavior in code today. + +### CLI command flow +`extropy simulate` currently: +1. resolves study + scenario, +2. preflight-checks sampled agents, network edges, persona config, +3. validates `--resume`/`--run-id`, resource mode, and early-convergence flag, +4. resolves effective models/rate settings from CLI > config, +5. starts simulation with optional live progress view, +6. returns summary data and writes outputs. + +Primary file: +- `extropy/cli/commands/simulate.py` + +### Preconditions enforced by command +Simulation hard-blocks if any are missing: +- scenario, +- sampled agents for scenario, +- network edges for scenario, +- persona config for scenario. + +### Early convergence override semantics +`--early-convergence` handling: +- `on`: force `allow_early_convergence=True`, +- `off`: force `allow_early_convergence=False`, +- `auto`: keep scenario value; if null, runtime auto-rule applies. + +Auto-rule: +- early convergence is disabled while future timeline events remain, +- enabled once no future timeline events remain. + +### Runtime setup (`run_simulation`) +`run_simulation(...)` currently: +1. loads scenario and applies early-convergence override if requested, +2. resolves base population from scenario metadata, +3. resolves canonical study DB and verifies existence, +4. loads agents and network (scenario key first, legacy fallback), +5. creates simulation run record, +6. clears runtime tables for this run when not resuming, +7. loads persona config (CLI path preferred), +8. backfills persona population stats when empty, +9. builds `SimulationRunConfig` and rate limiter, +10. executes engine and updates run status. + +Primary file: +- `extropy/simulation/engine.py` + +### Timestep execution order +Each timestep does: +1. mark timestep checkpoint started, +2. apply exposures: + - seed, + - timeline event (if this timestep has one), + - network propagation, +3. select and cap reasoning candidates, then reason in chunks, +4. interleave conversations after chunks (medium/high fidelity, novelty + budget gated), +5. record social posts from sharers, +6. apply conviction decay to non-reasoned agents, +7. compute and save timestep summary, +8. clear timestep checkpoint. + +### Timeline behavior +Timeline events only apply when `timeline_event.timestep == current_timestep`. +Non-event timesteps do not inject new world events; prior context remains via state/history. + +Timeline exposures carry: +- `info_epoch`, +- optional `re_reasoning_intensity` (`normal|high|extreme`). + +When a timeline event does not provide explicit `exposure_rules`, runtime fallback is now bounded: +- prefers rules authored for current timestep (else earliest authored seed step), +- keeps representative rule(s) per channel rather than all overlapping seed rules, +- deduplicates direct event exposure per agent, +- applies an intensity-based direct-exposure cap to prevent saturation spikes. + +### Reasoning behavior +Default reasoning mode is two-pass: +1. Pass 1 role-play response (free text + sentiment/conviction/share/action fields). +2. Pass 2 outcome classification for categorical/boolean/float outcomes. + +Merged mode (`--merged-pass`) combines both in one schema/call. + +Important current behavior: +- open-ended outcomes are not classified in Pass 2; they remain in free-text reasoning. +- high fidelity adds separate public-text classification pass for public position. +- reasoning context is trimmed to recent exposure/memory windows by fidelity to bound token growth. + +Primary file: +- `extropy/simulation/reasoning.py` + +### Agent selection for reasoning +`get_agents_to_reason(...)` includes: +- aware + never reasoned agents, +- forced re-reason agents with newer timeline info epoch, +- explicit forced IDs from timeline direct exposure paths, +- multi-touch candidates with enough unique source exposures since last reasoning and not committed. + +Committed agents are protected from routine multi-touch re-reasoning unless forced by timeline policy. + +Additional runtime gating now applies before calls: +- explicit forced IDs are no longer expanded to all aware agents under `extreme`, +- forced expansion uses a bounded high-salience subset (directly impacted + nearby connected + sharers), +- per-timestep reasoning budget caps total LLM calls. + +### Conversation behavior by fidelity +- `low`: no conversations executed. +- `medium`: conversations enabled; per-agent cap 1 per timestep; 4-message conversations. +- `high`: per-agent cap 2 per timestep; 6-message conversations. + +Conversation outcomes can override provisional reasoning state. + +Conversation execution now also requires: +- per-timestep global conversation budget not exhausted, +- novelty gate pass (material shift/uncertainty/share signal from fresh reasoning). + +Primary file: +- `extropy/simulation/conversation.py` + +### Propagation behavior +Network propagation: +- only from current sharers (`will_share=True`), +- one-shot per source-target-position with reshare on position change, +- share probability from base spread probability + `share_modifiers` + hop decay + soft saturation. + +Modifier context includes edge fields: +- `edge_type` +- `edge_weight` + +Primary file: +- `extropy/simulation/propagation.py` + +### Stop condition behavior +Stop evaluation order: +1. `max_timesteps`, +2. explicit `stop_conditions` expressions, +3. convergence/quiescence auto-stop if early convergence is allowed. + +Convergence auto-stop currently uses stable position distribution window checks. +Quiescence auto-stop triggers on three timesteps with zero agents reasoned. + +Primary file: +- `extropy/simulation/stopping.py` + +### Resume and checkpoint behavior +Resume model: +- requires `--run-id`, +- engine resumes from `checkpoint_timestep` if present, else `last_completed + 1`, +- chunk checkpoints skip already-completed chunks within a timestep. + +When not resuming: +- runtime tables for that run ID are reset before execution. + +### Output artifacts +Simulation exports: +- `by_timestep.json` (timeline aggregates), +- `meta.json` (models, seed, cost, conversation stats, etc.), +- `conversations.json` (if conversations happened), +- `social_posts.json` (if posts exist), +- `elaborations.csv`. + +--- + +## What Current Implementation Already Gets Right + +### Strong persistence and resume scaffolding +Run metadata, timestep checkpoints, and chunk checkpoints make long runs recoverable. + +### Clear phase ordering +Exposure -> reasoning -> conversation -> summary sequencing is explicit and traceable. + +### Fidelity-aware behavior controls +Conversation workload and prompt richness scale with fidelity mode instead of one-size-fits-all. + +### Scenario-coupled temporal logic +Timeline event epochs and early-convergence auto rules reduce premature stopping in evolving scenarios. + +--- + +## Divergences, Mistakes, and Risk Areas + +### 1) `interaction` config is effectively informational +`scenario.interaction` fields are not currently consumed by simulation runtime behavior. + +### 2) Some scenario metadata remains non-operative in runtime control +Fields such as channel `reach` are not runtime control inputs in simulation propagation. + +### 3) Open-ended outcomes are not structurally extracted +Open-ended outcomes live in reasoning text, not in structured Pass 2 outcome payloads. + +### 4) Output retention semantics are split +`retention_lite` suppresses raw reasoning payload storage even if scenario outcome config requests full reasoning capture. + +### 5) Resume usability requires explicit run-id discipline +`--resume` requires `--run-id`; incorrect run-id usage can lead to user confusion about expected continuation behavior. + +### 6) Prompt/context size grows with memory and history +Prompt growth is now bounded by fidelity-window trims, but high-fidelity runs still carry materially higher token/cost load than low fidelity. + +### 7) Legacy fallback paths still exist +Simulation still includes legacy lookup fallbacks (`population_id`, `network_id`) which can mask schema drift in older studies. + +--- + +## Dependency Map (What `simulate` Must Support) + +### Upstream dependencies +Needs valid outputs from: +- `scenario` (`scenario.vN.yaml`), +- `persona` (`persona.vN.yaml`), +- `sample` (agents in `study.db`), +- `network` (edges in `study.db`). + +### Downstream consumers +Feeds: +- `results` (summary/timeline/segment/agent views), +- `query` (states/summary/sql exports), +- `chat` (agent context over runs), +- external DS workflows (`elaborations.csv`, JSON exports). + +--- + +## Working Invariants Draft (Simulate-Oriented) + +### Preconditions +1. Scenario, persona, agents, and network must all exist before run starts. +2. Run metadata must be persisted with a stable run id before first timestep mutation. + +### Runtime invariants +1. Timestep checkpoint must be set before phase execution and cleared after completion. +2. Agent reasoning selection must be deterministic given state + thresholds + forced IDs. +3. Conversation overrides must be applied after reasoning chunk updates, not before. +4. Stop reason must be explicit when run ends before max timesteps. + +### Persistence invariants +1. Failed runs must be marked `failed` in `simulation_runs` with reason. +2. Completed/stopped runs must have final status and persisted summary artifacts. + +--- + +## Glossary (Working Terms) +- **Two-pass reasoning**: role-play generation + separate outcome classification. +- **Merged pass**: single-call schema combining role-play and classification. +- **Info epoch**: timeline provenance marker attached to exposures. +- **Committed agent**: agent with firm conviction protected from routine re-reasoning. +- **Quiescence**: no-agent-reasoned condition for early stop. +- **Retention lite**: mode that drops full raw reasoning payloads to reduce storage volume. + +--- + +## Practical Readout +Current simulate stage is best understood as: +1. a checkpointed runtime orchestrator over scenario dynamics, +2. with bounded LLM reasoning loops plus deterministic state logic, +3. with meaningful fidelity controls and timeline-aware stopping, +4. but still carrying some schema/runtime gaps where metadata is descriptive rather than operative. + +For team operation, key framing is: +- simulation quality depends as much on upstream spec/scenario/sample/network quality as on runtime prompts, +- run status, stop reason, and artifact completeness are first-line reliability signals. + +--- + +## Final Statement +`simulate` should convert static pipeline artifacts into temporally coherent behavioral dynamics while preserving clear runtime observability. + +Current implementation already has strong execution scaffolding. +The main remaining challenge is contract coherence: +- align descriptive scenario fields with actual runtime control, +- keep resume semantics predictable, +- and maintain realism without exploding token/cost overhead. diff --git a/docs/pipeline/spec.md b/docs/pipeline/spec.md new file mode 100644 index 0000000..df30c2f --- /dev/null +++ b/docs/pipeline/spec.md @@ -0,0 +1,493 @@ +# Spec Stage Reference: Population Creation and Encoding + +## Document Intent +This file is the deep reference for the `spec` stage in Extropy. + +If a team member or agent forgets prior context, this file should bring them back to working understanding of: +- what `spec` is supposed to accomplish, +- why the design exists, +- how the stage should operate in theory, +- how the current system behaves in practice, +- where the current implementation falls short, +- and what improvement directions are implied by those gaps. + +This is not a patch plan and not a code-fix checklist. It is a contract + reality map. + +## Status Update (2026-02-23) +- Spec-stage hydration now runs with `include_household=False`. +- Household config ownership is enforced at scenario stage; spec no longer does dead household hydration work. +- Naming is Faker-first at sampling/runtime with deterministic seed and geography routing; CSV remains a safety fallback path. +- Attribute names are canonicalized to snake_case during selection; ambiguous normalization collisions now fail fast. +- Fail-hard spec validation writes versioned artifacts (`*.invalid.vN.yaml`) instead of overwriting a single invalid file. + +--- + +## How To Read This Document +Use this in order: +1. `Intended Contract` for the target design truth. +2. `Current Implementation` for what the code currently does. +3. `Divergences and Mistakes` for the gap between target and reality. +4. `Improvement Directions` for strategy-level correction paths. + +This doc is intentionally verbose. It is meant to be reusable team memory. + +--- + +## Why This Stage Exists +Extropy needs to simulate populations at scale with believable heterogeneity. + +A naive approach would generate agents directly via LLM per person. That approach breaks down because: +- it is expensive and slow, +- it does not reliably enforce population-level distributions, +- it does not guarantee reproducible structure at scale, +- it cannot be audited easily for relationship consistency between attributes, +- it weakly controls outlier rates and coherence. + +The `spec` stage exists to shift intelligence from runtime to compile time: +- infer and encode population mechanics once, +- sample agents cheaply and repeatedly from that encoded blueprint, +- preserve statistical shape, dependency logic, and constraint boundaries. + +The design principle is: +- **Compile population semantics once, sample many times.** + +--- + +## Pipeline Position +Within the full Extropy pipeline, `spec` is foundational. + +High-level pipeline intent: +1. Create population and population dynamics. +2. Create event/scenario and event dynamics. +3. Build persona and network in scenario-specific context. +4. Simulate behavior and outcomes. + +`spec` is the base-population creation stage. It should produce a reusable artifact that later scenario-specific extensions can build on. + +If `spec` quality is weak, downstream stages cannot reliably recover. + +--- + +## Intended Contract + +### What `spec` should do +`spec` should output a reusable **base population encoding** as versioned YAML that defines how a valid member of the target population is generated. + +This encoding should include: +- attribute inventory (who a person can be in this population), +- attribute typing and semantics, +- sampling strategies and distributions, +- cross-attribute dependency structure, +- conditional behavior modifiers, +- consistency constraints, +- support for realistic outliers, +- metadata needed for downstream interpretation. + +The artifact should be reusable across scenarios that operate on the same base population. + +### What `spec` should not do +`spec` should not: +- generate concrete agents, +- bake in one scenario-specific behavioral rollout, +- run per-agent LLM reasoning, +- collapse population diversity into a single “average” profile, +- treat outliers as pure noise to suppress. + +### How `spec` should do it +The intended process is a compile pipeline: +1. Verify intent sufficiency. +2. Select the right attributes (coverage + relevance). +3. Hydrate each attribute with sampling semantics. +4. Resolve dependency graph and compile sampling order. +5. Validate for structural and behavioral quality. +6. Emit versioned base spec artifact. + +This process should preserve three priorities (in order from this project context): +1. realism, +2. internal consistency, +3. downstream support reliability. + +### Why this contract matters +Without explicit base encoding, all downstream steps become unstable: +- scenario extension becomes ad hoc, +- sampling quality degrades, +- persona and network logic lose grounding, +- simulation outputs become hard to trust. + +`spec` is therefore not a convenience stage. It is the system’s causal root. + +--- + +## Conceptual Model Of Population Encoding + +### Population as generative blueprint +A population is represented as a constrained generative model: +- each attribute is a variable, +- each variable has a type, +- variables are sampled or computed according to strategy, +- dependencies define valid evaluation order, +- constraints define valid output region, +- modifiers define context-conditional shifts, +- outlier mechanics define tails and rare combinations. + +### Attribute classes +At minimum, attribute selection should consider: +- universal attributes (broad demographic anchors), +- population-specific attributes (identity/work/lifestyle specifics), +- personality/behavioral attributes, +- optional context attributes where justified. + +### Sampling strategy classes +Core strategy semantics: +- `independent`: sampled directly from a distribution with no upstream dependencies. +- `derived`: deterministic formula output from dependencies; no variance for same input tuple. +- `conditional`: base distribution with dependency-conditioned shifts. + +### Scope semantics +Attribute scope shapes household-level instantiation logic later: +- `individual`: value varies per person. +- `household`: value is shared across household members. +- `partner_correlated`: value is correlated between partners. + +### Constraints semantics +Constraints should distinguish: +- hard bounds (clamping or strict validity boundaries), +- expression-level validity conditions, +- spec-level validity checks. + +### Outlier semantics +The system should treat outliers as first-class: +- some should be explicitly represented, +- others should emerge from conditional distributions, +- impossible combinations should be blocked, +- implausible combinations should be measured, not blindly suppressed. + +--- + +## Intended Base vs Scenario Boundary + +### Base population (`spec`) should own +- reusable population mechanics, +- stable demographic/identity/behavioral variable definitions, +- dependency and distribution structure, +- generalized semantic metadata for later interpretation. + +### Scenario extension should own +- scenario-specific additional attributes, +- scenario-specific activation policies, +- scenario-contextual household/relationship activation policy, +- scenario-time role policy (who is simulated agent vs NPC vs mixed). + +### Sampling should own +- deterministic instantiation from base + extension, +- enforcement of compiled dependency order, +- runtime realization under seeded randomness. + +This boundary is critical for reuse and avoiding scope creep. + +--- + +## Intended Artifact Contract + +### Primary artifact +`spec` should emit versioned base spec YAML (`population.vN.yaml`) containing: +- metadata, +- grounding summary, +- attribute list, +- compiled sampling order. + +### Metadata responsibilities +Metadata should encode: +- source description and geography, +- who the base population focuses on, +- versioning fields, +- optional downstream rendering metadata when available. + +### Attribute contract (intended) +Each attribute should fully define: +- identifier and type, +- category, +- descriptive meaning, +- scope semantics, +- semantic/identity/display metadata, +- sampling config, +- grounding quality, +- constraints. + +### Sampling-order contract (intended) +Sampling order should be: +- complete (every sampled field appears), +- dependency-safe (dependencies resolved before dependents), +- deterministic for same compiled graph. + +--- + +## Intended Quality Contract + +### Realism +The output should produce agents that look like credible members of the population, including plausible variation and nontrivial tails. + +### Internal consistency +Attribute combinations should be coherent under known relationships. Contradictory combinations should be blocked or explicitly flagged by severity. + +### Downstream support +Spec output must be machine-usable and semantically useful to: +- scenario extension, +- sampler, +- persona rendering, +- network generation, +- simulation reasoning. + +### Quality interpretation rule +Structural validity alone is not enough. A spec can be syntactically valid and still behaviorally low-quality. + +--- + +## Intended Backpressure Philosophy (Contract-Level) + +`spec` should produce enough measurable evidence so downstream stages can decide whether to proceed. + +At contract level, checks should separate: +- `block` class contradictions (impossible/incoherent), +- `warn` class plausibility concerns (rare but possible, suspicious drift), +- informational diagnostics. + +Backpressure should be explicit and machine-readable, not only human prompt warnings. + +--- + +## Current Implementation (As-Is) + +This section describes what the current codebase does now. + +### Entrypoint behavior +`extropy spec` command flow: +1. Resolve study folder and versioned output path. +2. Run sufficiency check. +3. Run attribute selection. +4. Run split hydration pipeline. +5. Run constraint binding and sampling-order compilation. +6. Build `PopulationSpec`. +7. Run spec validation. +8. Save YAML. + +### Sufficiency behavior in code +Current sufficiency stage: +- uses fast LLM call, +- infers geography, +- can ask structured clarification questions. + +### Selection behavior in code +Current selector: +- uses reasoning LLM call with a strict JSON schema, +- asks model to assign strategy, scope, dependencies, and optional semantic metadata, +- canonicalizes returned attribute names to snake_case before model object creation, +- fails fast if two different raw names collapse to the same canonical key, +- coerces invalid strategy/dependency combos (`independent` + deps -> `conditional`; missing deps on conditional/derived -> `independent`), +- injects Big Five traits when recommended and missing, +- may inject `country` attribute for multi-country geographies. + +### Hydration behavior in code +Hydration is split: +- 2a independent distributions via agentic research, +- 2b derived formulas via reasoning call, +- 2c conditional base distributions via agentic research, +- 2d conditional modifiers via agentic research, +- 2e household config exists in shared hydrator but is explicitly disabled in `extropy spec` (`include_household=False`). + +There is no spec-stage name hydration call in the current flow. Name generation is runtime behavior in sampler/names modules. + +Hydration includes fail-fast validation callbacks and retry loops. + +### Binding behavior in code +Binding step: +- converts hydrated attributes to final `AttributeSpec`, +- filters unknown dependencies with warnings, +- infers dependencies from formulas and conditions, +- computes topological sort for sampling order. + +### Build behavior in code +Spec build: +- creates `SpecMeta`, +- computes grounding summary, +- assembles final `PopulationSpec`. + +### Validation behavior in code +Validation currently combines: +- structural checks (errors and some warnings), +- semantic checks (warnings). + +Validation catches many shape and compatibility issues, but does not fully guarantee behavioral realism quality. +When validation fails, `extropy spec` writes a versioned invalid artifact (`population.vN.invalid.vK.yaml`) and exits non-zero. + +--- + +## Current Runtime Coupling With Scenario And Sampling + +### Current extension model +Scenario flow currently performs additive extension: +- discovers and hydrates new attributes with base context, +- stores them in scenario as `extended_attributes`. + +### Current household ownership in runtime +Practical runtime ownership today: +- shared hydrator has optional household research capability, +- `extropy spec` explicitly disables household hydration and does not store household config in base output, +- scenario stores household config and agent focus mode, +- sampler consumes scenario-level household config and focus mode. + +### Current merge model before sampling +`sample` currently: +- merges base + extended attributes, +- recomputes merged sampling order using dependency-aware topological sort over merged attributes, +- samples with scenario-provided household/focus settings. + +This is the effective behavior today. + +--- + +## What Current Implementation Already Gets Right + +### Architectural direction +- Compile-time modeling + fast runtime sampling is the correct high-level shape. + +### Typed modeling surface +- Rich Pydantic models exist for attributes, distributions, constraints, and metadata. + +### Dependency-aware compilation +- Topological ordering and cycle detection are implemented. + +### Validation scaffolding +- There is a meaningful validation layer both at LLM-response time and pre-sampling. + +### Reuse path +- Base specs are versioned and reusable as artifacts. + +--- + +## Divergences, Mistakes, and Risk Areas + +### 1) Prompt-heavy contract enforcement +Many intended quality guarantees are represented as prompt instructions rather than strict enforceable contracts. + +Risk: +- quality can drift with model behavior while still passing structural checks. + +### 2) Silent coercion and fallback behavior +Parsing and binding include permissive fallback logic in some places (defaults, filtered deps). + +Risk: +- malformed or weak outputs can degrade silently into “valid enough” artifacts. + +### 3) Dependency mutation side effects +Unknown dependencies can be removed with warnings. Inferred dependencies can be auto-added. + +Risk: +- resulting compiled behavior differs from model’s original intent without a hard failure. + +### 4) Extension/sampling order assumptions +Extension merge order is now recomputed with topological sort at sample time, but ordering semantics still depend on clean dependency declarations from upstream spec/scenario artifacts. + +Risk: +- cross-layer dependency semantics can be fragile if extension expectations grow. + +### 5) Household ownership ambiguity in build narrative +Shared hydrator internals still expose household research logic. Readers who only inspect hydrator code can misread ownership unless they also check stage wiring in CLI commands. + +Risk: +- conceptual confusion across teams and agents unless boundary is explicit. + +### 6) Category/value normalization fragility +Token shape mismatches in categorical ecosystems remain a real risk (typos, underscore/space/case variants). + +Risk: +- modifier conditions and downstream interpretation can diverge from intended semantics. + +### 7) Outlier contract debt +Outliers can emerge today, but there is no explicit first-class outlier intent contract with measurable acceptance semantics. + +Risk: +- too-flat populations or chaotic tails may both pass structural checks. + +### 8) Structural-validity bias +Current checks are much stronger on syntax/typing than on distributional realism and joint plausibility at scale. + +Risk: +- valid YAML, weak population reality. + +--- + +## How It Can Be Made Better (Direction, Not Patch Plan) + +This section captures strategic direction only. + +### Make quality explicit and testable +Define and emit explicit quality contract outcomes, not only passive warnings. + +### Separate impossibility from implausibility formally +Use severity-aware rule semantics so contradictions are blocked and plausibility drift is visible with calibrated tolerance. + +### Elevate outlier intent to explicit contract +Treat outlier representation as a declared quality dimension, not only an emergent property. + +### Tighten stage ownership language +Document and enforce base vs scenario vs sampling ownership boundaries clearly. + +### Strengthen normalization discipline +Normalize category/token interpretation consistently across selection, hydration, validation, and sampling semantics. + +### Upgrade backpressure from “advice” to “gateable evidence” +Produce machine-readable quality evidence suitable for automated stage gating. + +--- + +## Downstream Dependency Map (What `spec` Must Support) + +### Scenario +Needs base attribute semantics robust enough to support scenario-specific extension and event relevance targeting. + +### Sample +Needs complete, consistent sampling definitions and valid dependency order for deterministic agent generation. + +### Persona +Needs interpretable attribute descriptions and formatting metadata to render believable identities. + +### Network +Needs coherent attributes with social relevance and reliable categorical structure. + +### Simulate +Needs internally coherent agent state primitives that do not collapse under behavioral reasoning. + +### Estimate +Needs stable assumptions about population complexity and downstream workload implications. + +### Query/Results/Chat +Need consistent field semantics so analytics and conversational explanations remain meaningful. + +--- + +## Glossary (Working Terms) + +- **Base population**: reusable population encoding from `spec`. +- **Extended population**: base + scenario-specific attribute layer. +- **Compile-time**: expensive inference stage that writes artifacts. +- **Runtime sampling**: fast generation from compiled artifacts. +- **Outlier**: rare but plausible instance/combination. +- **Impossible**: logically contradictory combination. +- **Implausible**: possible but suspicious/unlikely combination. +- **Backpressure**: quality signal that can block or warn before downstream continuation. + +--- + +## Practical Readout +If you only remember five things from this file: +1. `spec` is a compile stage, not a generation stage. +2. Its job is reusable population semantics, not scenario-specific behavior rollout. +3. Realism + consistency + downstream support are the quality triad. +4. Current implementation has strong structure but weaker explicit behavioral contracts. +5. The main maturity gap is enforceable quality semantics, not missing model surface area. + +--- + +## Final Statement +The current `spec` system is substantial and directionally correct, but it is not yet equivalent to a fully explicit, contract-driven population compiler. It currently behaves as a strong structured generator with partial contract enforcement. To meet the intended standard, quality intent and cross-stage boundaries must be made explicit enough to serve as reliable backpressure for the rest of the pipeline. diff --git a/docs/plans/cli-refactor.md b/docs/plans/cli-refactor.md deleted file mode 100644 index 64ad7bf..0000000 --- a/docs/plans/cli-refactor.md +++ /dev/null @@ -1,554 +0,0 @@ -# CLI Refactor Plan - -## Overview - -Simplify the CLI pipeline from the current fragmented flow to a clean, linear pipeline with automatic file naming, study folder management, and scenario-centric design. - -**New Pipeline:** -``` -spec → scenario → persona → sample → network → simulate → results -``` - -**Key Changes:** -1. `scenario` absorbs `extend` - one command does attribute extension + scenario config -2. Auto-versioned file naming - no manual `-o` for every file -3. Study folder structure - everything organized under study directory -4. `study.db` inferred from cwd - no `--study-db` everywhere -5. Scenario-centric keying - downstream commands key off scenario, not population - ---- - -## Study Folder Structure - -``` -{study-name}/ - study.db # canonical SQLite store - population.v1.yaml # base population spec - population.v2.yaml # iterations - scenario/ - {scenario-name}/ - scenario.v1.yaml # scenario spec (includes extended attrs) - scenario.v2.yaml # iterations - persona.v1.yaml # persona config for this scenario - {another-scenario}/ - scenario.v1.yaml - persona.v1.yaml -``` - -**Default study folder:** `study-{timestamp}` if not specified - -**study.db keying:** Changes from `population_id` to `scenario_id` as primary key for: -- `agents` table -- `network_edges` table -- `simulation_runs` table - ---- - -## Command Specifications - -### 1. `extropy spec` - -Creates base population spec with attribute definitions and distributions. - -```bash -# Create new study -extropy spec "500 German surgeons who work in hospitals" -o surgeons -# → creates surgeons/ -# → creates surgeons/study.db -# → creates surgeons/population.v1.yaml - -# Custom population name -extropy spec "German surgeons" -o surgeons/hospital-surgeons -# → surgeons/hospital-surgeons.v1.yaml - -# Iterate on existing (from within study folder) -cd surgeons -extropy spec "German surgeons, add income distribution" -# → population.v2.yaml (auto-increment) - -# From anywhere, specify study -extropy --study surgeons spec "updated description" -# → surgeons/population.v2.yaml -``` - -**Flags:** -| Flag | Required | Description | -|------|----------|-------------| -| `-o, --output` | Yes (if not in study) | Study folder or `folder/name` | -| `--study` | No | Global flag to specify study folder | - -**Changes from current:** -- Remove `size` from spec - moved to `sample -n` -- Auto-create study folder + study.db -- Auto-version files - -**Output:** `population.vN.yaml` with: -- `meta.description` -- `meta.geography` -- `meta.agent_focus` -- `attributes[]` with full distribution specs -- `sampling_order[]` -- `grounding` summary - ---- - -### 2. `extropy scenario` - -Creates scenario spec by extending population with scenario-specific attributes AND defining event/exposure/outcome config. **Absorbs current `extend` command.** - -```bash -cd surgeons - -# Create new scenario -extropy scenario "AI diagnostic tool adoption, announced via hospital email, - measure adoption intent and trust over 2 weeks" -o ai-adoption -# → scenario/ai-adoption/scenario.v1.yaml -# Uses latest population.vN.yaml by default - -# Pin population version -extropy scenario "vaccine mandate" -o vaccine @pop:v1 -# → scenario/vaccine/scenario.v1.yaml with base_population: population.v1 - -# Use explicit latest -extropy scenario "..." -o test @pop:latest -# → resolves to current latest, stores concrete version - -# Iterate on existing scenario -extropy scenario "AI adoption, add social media exposure channel" -o ai-adoption -# → scenario/ai-adoption/scenario.v2.yaml - -# Rebase to new population (cheap, no LLM re-run) -extropy scenario ai-adoption --rebase @pop:v2 -# → validates compatibility -# → creates scenario.v2.yaml with base_population: population.v2 -# → copies attrs/config from scenario.v1.yaml -``` - -**Flags:** -| Flag | Required | Description | -|------|----------|-------------| -| `-o, --output` | Yes (for new) | Scenario name | -| `@pop:vN` | No | Pin population version | -| `@pop:latest` | No | Explicit latest (resolves at creation) | -| `--rebase` | No | Cheap update to new population | - -**`--rebase` safety detection:** -1. Load scenario's attribute dependencies (what base attrs does it reference?) -2. Check new population has all required attributes -3. If missing → error: "Unsafe rebase: scenario depends on `income` which doesn't exist in population.v2" -4. If safe → create new scenario version with updated reference - -**Output:** `scenario.vN.yaml` with: -```yaml -meta: - name: ai-adoption - description: "AI diagnostic tool adoption..." - base_population: population.v2 # concrete reference, never "latest" - created_at: ... - -# Extended attributes (what extend currently does) -attributes: - - name: ai_familiarity - type: categorical - ... - - name: tech_anxiety - type: float - ... - -# Scenario config (current scenario command) -event: - type: announcement - content: "Hospital introducing AI diagnostic tool..." - source: hospital_admin - credibility: 0.85 - -seed_exposure: - channels: [...] - rules: [...] - -interaction: - primary_model: deliberation - ... - -spread: - share_probability: 0.3 - ... - -outcomes: - suggested_outcomes: - - name: adoption_intent - type: categorical - options: [will_adopt, considering, resistant, opposed] - ... - -simulation: - max_timesteps: 14 - timestep_unit: day - ... -``` - -**Validation:** -1. Load base population -2. Merge attributes (base + scenario) -3. Recompute sampling_order via topological sort -4. Run structural validation on merged spec -5. If invalid → save as `scenario.vN.invalid.yaml` -6. If valid → save as `scenario.vN.yaml` - ---- - -### 3. `extropy persona` - -Generates persona rendering config from scenario's full attribute set. - -```bash -cd surgeons - -extropy persona -s ai-adoption -# → scenario/ai-adoption/persona.v1.yaml - -# Iterate -extropy persona -s ai-adoption -# → persona.v2.yaml if v1 exists - -# Pin scenario version -extropy persona -s ai-adoption@v1 -``` - -**Flags:** -| Flag | Required | Description | -|------|----------|-------------| -| `-s, --scenario` | Yes (if multiple) | Scenario name, auto-select if only one | -| `@vN` | No | Pin scenario version | - -**What it does:** -1. Load scenario spec (for full attribute list including base + extended) -2. Run LLM pipeline to generate phrasings (5 steps) -3. Save persona config - -**Note:** Population stats (mean/std for relative positioning) are computed at render time from sampled agents, NOT stored in persona.yaml. This keeps persona independent of sample size. - -**Output:** `persona.vN.yaml` with: -- `intro_template` -- `treatments[]` -- `groups[]` -- `phrasings.boolean[]` -- `phrasings.categorical[]` -- `phrasings.relative[]` -- `phrasings.concrete[]` -- NO `population_stats` (computed at render time) - ---- - -### 4. `extropy sample` - -Samples agents from merged population + scenario attributes. - -```bash -cd surgeons - -extropy sample -s ai-adoption -n 500 -# → loads scenario.vN.yaml + referenced population -# → merges attributes -# → validates merged spec -# → samples 500 agents -# → saves to study.db (scenario_id=ai-adoption) - -# With seed -extropy sample -s ai-adoption -n 500 --seed 42 - -# Re-sample (overwrites existing agents for this scenario) -extropy sample -s ai-adoption -n 1000 --seed 123 - -# Pin versions -extropy sample -s ai-adoption@v1 -n 500 -``` - -**Flags:** -| Flag | Required | Description | -|------|----------|-------------| -| `-s, --scenario` | Yes (if multiple) | Scenario name | -| `-n, --count` | Yes | Number of agents to sample | -| `--seed` | No | Random seed for reproducibility | -| `@vN` | No | Pin scenario version | - -**Pre-flight validation:** -1. Check persona.vN.yaml exists for this scenario → error if missing -2. Load scenario + population -3. Merge attributes -4. Validate merged spec (structural checks) -5. If valid → proceed to sample -6. If invalid → error with details - -**Output:** Agents saved to `study.db`: -- `agents` table keyed by `scenario_id` -- Each agent has all attributes (base + scenario) - ---- - -### 5. `extropy network` - -Generates social network from sampled agents. - -```bash -cd surgeons - -extropy network -s ai-adoption -# → loads agents from study.db (scenario_id=ai-adoption) -# → generates network -# → saves to study.db - -# With config -extropy network -s ai-adoption --avg-degree 15 --seed 42 - -# Generate network config from population spec -extropy network -s ai-adoption --generate-config -``` - -**Flags:** -| Flag | Required | Description | -|------|----------|-------------| -| `-s, --scenario` | Yes (if multiple) | Scenario name | -| `--avg-degree` | No | Target average degree | -| `--seed` | No | Random seed | -| `--generate-config` | No | Generate config via LLM | -| Other existing flags | No | Quality profile, workers, etc. | - -**Pre-flight:** -- Check agents exist for this scenario → error if missing - -**Output:** Network saved to `study.db`: -- `network_edges` table keyed by `scenario_id` - ---- - -### 6. `extropy simulate` - -Runs simulation using scenario spec + agents + network. - -```bash -cd surgeons - -extropy simulate -s ai-adoption -# → loads scenario spec -# → loads agents + network from study.db -# → loads persona config -# → runs simulation -# → saves results to study.db - -# With options -extropy simulate -s ai-adoption --seed 42 --strong openai/gpt-5 --fast openai/gpt-5-mini -``` - -**Flags:** -| Flag | Required | Description | -|------|----------|-------------| -| `-s, --scenario` | Yes (if multiple) | Scenario name | -| `--seed` | No | Random seed | -| `--strong` | No | Strong model for reasoning | -| `--fast` | No | Fast model for classification | -| Other existing flags | No | Rate limits, checkpointing, etc. | - -**Pre-flight:** -- Check agents exist → error if missing -- Check network exists → error if missing -- Check persona config exists → error if missing - -**Persona rendering:** -- Load `persona.vN.yaml` for phrasings -- Compute population stats from agents in study.db (fresh, not stale) -- Render personas at simulation time - -**Output:** Results saved to `study.db`: -- `simulation_runs` table -- `agent_states` table -- `timestep_summaries` table -- etc. - ---- - -### 7. `extropy results` - -View simulation results. - -```bash -cd surgeons - -extropy results -s ai-adoption -# → shows latest run for this scenario - -extropy results -s ai-adoption --timeline -extropy results -s ai-adoption --segment age_group -extropy results -s ai-adoption --agent agent_123 -``` - -**Flags:** -| Flag | Required | Description | -|------|----------|-------------| -| `-s, --scenario` | No | Scenario name (latest if omitted) | -| `--run-id` | No | Specific run ID | -| `--timeline` | No | Show timeline view | -| `--segment` | No | Segment by attribute | -| `--agent` | No | Show single agent | - ---- - -### 8. `extropy validate` - -Validates spec files. Updated to handle new structure. - -```bash -# Validate population spec -extropy validate population.v1.yaml - -# Validate scenario spec (auto-detects, loads + validates merged) -extropy validate scenario/ai-adoption/scenario.v1.yaml -# → loads referenced population -# → merges attributes -# → validates merged result - -# Validate persona config -extropy validate scenario/ai-adoption/persona.v1.yaml -``` - -**Auto-detection:** -- `population.*.yaml` → population validation -- `scenario.*.yaml` → scenario validation (includes merge validation) -- `persona.*.yaml` → persona config validation - ---- - -## Global `--study` Flag - -All commands support `--study` to specify study folder from anywhere: - -```bash -extropy --study ~/projects/surgeons sample -s ai-adoption -n 500 -extropy --study surgeons simulate -s ai-adoption -``` - -If not specified, inferred from cwd: -- If cwd contains `study.db` → use cwd -- If cwd is inside a study folder → find parent with `study.db` -- Otherwise → error "Not in a study folder. Use --study or -o to specify." - ---- - -## Deprecations & Removals - -| Command | Action | -|---------|--------| -| `extend` | **Remove** - absorbed into `scenario` | -| `--study-db` flag | **Remove** - use `--study` or infer from cwd | -| `spec --size` / `meta.size` | **Move** to `sample -n` | - ---- - -## Database Schema Changes - -### New: `scenario_id` as primary key - -```sql --- agents table -ALTER TABLE agents ADD COLUMN scenario_id TEXT; --- Primary key becomes (scenario_id, agent_id) - --- network_edges table -ALTER TABLE network_edges ADD COLUMN scenario_id TEXT; --- Primary key becomes (scenario_id, source_id, target_id) - --- simulation_runs table already has scenario linkage via population_id --- Update to use scenario_id instead -``` - -### Migration - -No migration for existing study.db files. Old format won't work with new CLI. Users re-run pipeline. - ---- - -## Implementation Phases - -### Phase 1: Foundation -1. Add `--study` global flag to CLI app -2. Add study folder detection logic -3. Add auto-versioning logic for YAML files -4. Update `study.db` schema with `scenario_id` - -### Phase 2: Spec Command -1. Remove `size` from spec (move to sample) -2. Add auto study folder creation -3. Add auto-versioning -4. Update sufficiency check (no size required) - -### Phase 3: Scenario Command (Big One) -1. Absorb `extend` logic into scenario -2. New scenario YAML schema with `attributes` section -3. Add `@pop:vN` syntax parsing -4. Add `--rebase` flag with safety detection -5. Merge + validate flow -6. Auto-versioning - -### Phase 4: Persona Command -1. Update to use `-s scenario` instead of spec file -2. Remove population stats from output (compute at render time) -3. Auto-versioning - -### Phase 5: Sample Command -1. Change from spec file input to `-s scenario` -2. Add `-n count` as required flag -3. Merge population + scenario at sample time -4. Pre-flight persona check -5. Save with `scenario_id` key - -### Phase 6: Network Command -1. Change to `-s scenario` input -2. Save with `scenario_id` key - -### Phase 7: Simulate Command -1. Change to `-s scenario` input -2. Update persona rendering to compute stats at runtime -3. Load from `scenario_id` keyed tables - -### Phase 8: Results & Validate -1. Update results to use `-s scenario` -2. Update validate to handle merged scenario validation - -### Phase 9: Cleanup -1. Remove `extend` command -2. Remove `--study-db` flag -3. Update docs -4. Update tests - ---- - -## File Changes Summary - -| File | Change | -|------|--------| -| `extropy/cli/app.py` | Add `--study` global flag, study detection | -| `extropy/cli/commands/spec.py` | Remove size, add auto-versioning | -| `extropy/cli/commands/scenario.py` | Absorb extend, new schema, `@pop:` syntax | -| `extropy/cli/commands/extend.py` | **Delete** | -| `extropy/cli/commands/persona.py` | `-s scenario` input, remove stats storage | -| `extropy/cli/commands/sample.py` | `-s scenario` + `-n count`, merge logic | -| `extropy/cli/commands/network.py` | `-s scenario` input | -| `extropy/cli/commands/simulate.py` | `-s scenario`, runtime stats | -| `extropy/cli/commands/results.py` | `-s scenario` input | -| `extropy/cli/commands/validate.py` | Merged scenario validation | -| `extropy/cli/commands/__init__.py` | Remove extend import | -| `extropy/storage/study_db.py` | Add `scenario_id` to schema | -| `extropy/core/models/scenario.py` | Add `attributes` section to schema | -| `extropy/population/persona/renderer.py` | Compute stats at render time | -| `extropy/cli/utils.py` | Add versioning helpers | -| New: `extropy/cli/study.py` | Study folder detection, versioning logic | - ---- - -## Open Questions - -1. **Config command** - should `extropy config` also be study-aware? Currently global. - -2. **Other commands** - `inspect`, `query`, `report`, `export`, `chat`, `migrate` - leave as-is for now? They may need `--study` support later. - -3. **Backwards compat** - should we support `--study-db` with deprecation warning for a version? Or hard break? diff --git a/docs/showcase-pipeline.md b/docs/showcase-pipeline.md deleted file mode 100644 index 65f3b15..0000000 --- a/docs/showcase-pipeline.md +++ /dev/null @@ -1,752 +0,0 @@ -# Extropy Showcase Pipeline: Execution Plan - -## Mission - -Run 4 Extropy studies to produce viral, publishable population simulations. Three hypothetical showcases demonstrate capabilities. One live prediction market bet puts real money where Extropy's mouth is. - -**Goal: Maximize virality, build track record, win on Kalshi.** - ---- - -## The 4 Studies (5 Simulations) - -| # | Study | Spec | Agents | Type | Timestep | Duration | Deadline | -|---|-------|------|--------|------|----------|----------|----------| -| 1 | **ASI Announcement** | National US | 5,000 | Evolving | Monthly | 6 months | None (showcase) | -| 2 | **US-China Taiwan Crisis** | National US | 5,000 | Evolving | Monthly | 6 months | None (showcase) | -| 3 | **Bitcoin Hits $1M** | National US | 5,000 | Evolving | Weekly | 12 weeks | None (showcase) | -| 4a | **2026 House Control** | National US | 5,000 | Non-evolving | Single decision | N/A | **November 3, 2026** | -| 4b | **Alaska Senate: Sullivan vs Peltola** | Alaska | 1,000 | Non-evolving | Single decision | N/A | **November 3, 2026** | - -**Two base specs:** -- **Spec A (National US):** 5,000 agents, nationally representative, enriched with electoral dimensions. Shared across Studies 1-3 and Study 4a. -- **Spec B (Alaska):** 1,000 agents, representative of Alaska's electorate, with candidate-specific and state-specific attributes. Used only for Study 4b. - -**Run order: Study 1 first** (ASI, most viral), then Studies 2 and 3 in parallel, then Studies 4a and 4b (Midterms — longest runway, real money bets). - ---- - -## Agent Counts: Why 5,000 - -**All studies (5,000):** Survey research needs ~1,500 for ±3% margin of error. But Extropy isn't polling — it's simulating network cascades. You need cluster density. At 5,000 agents with ~20 major demographic buckets, that's ~250 agents per bucket. Enough for genuine within-group splits and cascade dynamics. 10,000 would be ideal but doubles runtime and cost. All 4 studies use the same 5,000-agent national population — same people, different scenarios. - -**Why not 10K for the midterms bet?** We can re-run Study 4 at 10K once we've validated the pipeline on Studies 1-3. The first pass at 5K establishes methodology; a 10K re-run closer to November gives the refined prediction we bet real money on. - ---- - -## Spec A: National US Population (Studies 1-3 and 4a) - -One national population spec serves Studies 1-3 (showcases) and Study 4a (House control). Studies 1-3 test how this population reacts to hypothetical shocks. Study 4a asks how they vote for Congress in November 2026. The spec must capture both behavioral/consumer dimensions AND electoral dimensions. Spec B (Alaska) is defined separately under Study 4b. - -### Spec Prompt - -```bash -extropy spec "Nationally representative US adult population (18-80). Must capture the demographic, economic, and attitudinal fault lines that drive divergent responses to major national events — especially technology disruption, economic shocks, cultural controversies, AND electoral behavior in the 2026 midterm elections. - -Beyond standard demographics (age, gender, race/ethnicity, education, income, geography), prioritize attributes that determine HOW people process and react to news, make decisions under uncertainty, and vote: - -- Technology adoption posture and digital literacy (from technophobe to early adopter) -- Media ecosystem and primary information sources (cable news, social media, podcasts, local news, none) -- Institutional trust level (government, corporations, media, science, financial system) -- Financial margin and economic anxiety (savings buffer, debt load, paycheck-to-paycheck status) -- Employment sector and job security perception (federal/state government, private sector, gig, self-employed, retired) -- Consumer identity and brand relationship patterns (brand loyal, price-driven, values-driven) -- Social media behavior and influence (passive consumer, active poster, influencer, non-user) -- Investment and financial literacy (no investments, 401k only, active trader, crypto holder) -- Religious engagement and worldview (secular, moderate, devout, specific denomination) -- Political identity and engagement level (strong partisan, moderate, disengaged, single-issue) -- 2024 presidential vote (Trump, Harris, third party, didn't vote, not eligible) -- Congressional district competitiveness (safe R, safe D, swing district) -- Midterm turnout propensity (always votes in midterms, sometimes, rarely, never has) -- Issue salience for 2026 (economy/jobs, abortion/reproductive rights, immigration, democracy/rule of law, healthcare, climate, education, AI/technology) -- Approval of current direction (strongly approve, somewhat approve, mixed, somewhat disapprove, strongly disapprove) - -Geographic distribution should span urban/suburban/rural across all major US regions (Northeast, Southeast, Midwest, Southwest, West Coast), with realistic correlation structure between attributes (e.g., rural + lower digital literacy + higher religious engagement; federal employee + DC metro + higher institutional trust). Congressional district mapping should reflect actual competitive districts for 2026 (e.g., NY-17, CA-27, PA-08, MI-07, etc.)." \ - -o us-national-study -y -``` - -This creates a study folder (`us-national-study/`) with `population.v1.yaml` and `study.db`. Run the scenario/persona/sample/network/simulate commands for Studies 1-4a from inside that study folder. - -### What to Check After `extropy spec` - -See **Gate 1** in the Pipeline Validation section below for the full validation checklist. Key points: - -1. All 15+ attribute dimensions represented (including 5 electoral dimensions) -2. Distributions roughly match US Census/Pew/Gallup benchmarks -3. Correlation structure encoded (not independently distributed attributes) -4. Electoral dimensions realistic (2024 vote matches actuals, midterm turnout skews toward "sometimes"/"rarely") -5. No hallucinated statistics — spot-check any cited percentages - -**If any of these fail:** Re-run spec with a more specific prompt targeting the gap. Do NOT proceed to persona generation with a weak spec — everything downstream depends on this. - ---- - -## Study 4: The Bets — 2026 Midterms - -### Design Principle: Elections Need Candidates, Not Just Party Labels - -**CRITICAL LESSON LEARNED:** Our initial Study 4 design asked 5,000 national agents "will you vote D or R for Senate?" without specifying who the candidates were. This is useless. A voter in Maine deciding whether to re-elect Susan Collins is making a completely different decision than a voter in Texas deciding on an open-seat race. Without candidate context, you're just measuring party ID — which is already in the spec. That's a survey, not a simulation. - -**The fix:** Split electoral prediction into two approaches based on how candidate-dependent the race is: - -1. **House control (Study 4a):** Generic ballot works here. Most voters can't name their House rep. In 435 races, national environment + party ID + district lean determines the outcome. The "would you vote D or R for Congress?" question is the single best predictor of House control, and it's exactly what Extropy can model with a national population. - -2. **Individual Senate races (Study 4b):** Candidates matter enormously. Collins has a specific brand. Peltola has a specific brand. Voters respond to the specific person, not the party label. These require dedicated state-level specs with candidate-specific scenario context. We pick races where both candidates are already known. - -**What this means for future election studies:** Any Extropy simulation of a specific named race MUST include candidate-level context — their record, their messaging, their specific appeal to different demographics. Generic party preference is not simulation, it's a crosstab of your spec. - -### Kalshi Markets - -**Study 4a — House Control:** -- **House Winner**: https://kalshi.com/markets/controlh/house-winner/controls-2026 -- Current pricing: D ~69%, R ~31% - -**Study 4b — Alaska Senate:** -- **Alaska Senate (Party)**: https://kalshi.com/markets/senateak/alaska-senate-race/senateak-26 -- **Alaska Senate (Person)**: https://kalshi.com/markets/kxaksenate/who-will-win-the-alaska-senate-race/kxaksenate-26nov03 -- Current pricing (as of Feb 17, 2026): R 57% (Sullivan), D 43% (Peltola). $148K volume. Resolution: November 3, 2026. - -**Also tracking (for combined bets):** -- **Congress Balance of Power**: https://kalshi.com/markets/kxbalancepowercombo/congress-balance-of-power-combo/kxbalancepowercombo-27feb -- Current pricing: D-House/R-Senate 47%, D-House/D-Senate 37%, R-House/R-Senate 14%, R-House/D-Senate 2%. Volume: $846K. - -### Why Extropy Shines Here - -Traditional prediction market pricing aggregates vibes. Polls aggregate stated preferences. Neither models the MECHANISM — which specific populations in which specific districts actually show up, and why. Extropy does. - -**For House control (Study 4a):** - -1. **Differential turnout across ~35 competitive House districts** — not national sentiment, but whether a nurse in PA-08 who voted Biden in 2020 and skipped 2024 shows up in November. Extropy models this agent-by-agent with realistic demographic profiles, employment sector exposure, and issue salience. - -2. **Cascade dynamics from real events** — DOGE layoffs, tariff-driven retail closures, and federal workforce cuts are hitting specific geographies (military towns, DC metro, rural USDA communities). These aren't uniform shocks. They propagate through social networks. Traditional polling asks "how do you feel about the economy?" — Extropy simulates "your neighbor lost his VA hospital job, your church is organizing, your local diner closed. Now how do you vote?" - -3. **The enthusiasm gap is demographic, not national** — Midterm turnout is 40-50% vs 60-65% in presidentials. WHO stays home matters more than national mood. Young voters drop off more. Occasional voters in safe districts drop off more. But DOGE-affected federal employees in swing districts might turn out at presidential-year levels. Extropy models turnout propensity per-agent based on their specific profile, not a uniform turnout assumption. - -**For Alaska Senate (Study 4b):** - -1. **Native turnout is the X-factor** — Alaska Natives are ~16% of the population. Peltola is the first Alaska Native in Congress. Her candidacy could drive unprecedented Native turnout — but these communities are remote, with logistical barriers to voting. Whether Native turnout hits 2022 levels (when Peltola first won her House seat) or drops to 2024 levels likely determines the race. Prediction markets cannot model this. Extropy can. - -2. **Ranked-choice voting dynamics** — Alaska uses a jungle primary (top 4 advance) and ranked-choice general election. Third-party and independent voters' second-choice rankings could be decisive. In 2022, Peltola won specifically because of RCV. Extropy models each agent's first AND second choice based on their profile. - -3. **DOGE crossover voters** — Are there Sullivan 2020 voters who flip to Peltola because of VA cuts or federal workforce reductions? How many? This is the mechanism that prediction markets can't see. Extropy can model whether a military veteran in Fairbanks who voted Sullivan in 2020 actually switches over DOGE, or just grumbles and votes R anyway. - -4. **Fishing community intensity** — Bycatch is Peltola's core issue. But is it a voting issue or a dinner table complaint? Extropy can distinguish between "I care about this" and "I'll change my vote over this." - -**Where existing methods fail:** - -- **Polls (9 months out):** Unreliable this far from election. Only one AK poll exists (DFP: Sullivan 46%, Peltola 45%). -- **Prediction markets:** Aggregate trader sentiment. At R 57% / D 43% the Alaska market is uncertain — exactly where a structural model adds signal. -- **Forecasting models (538-style):** Good at aggregating polls closer to election. Weak this early. Don't model RCV dynamics, Native turnout, or candidate-specific crossover appeal. -- **Extropy's edge:** Models the MECHANISM of turnout and vote choice, not just sentiment. Can re-run as conditions change. Each re-run is a publishable update. - ---- - -### Study 4a: House Control - -Uses the national 5,000-agent Spec A. Non-evolving, single decision point. - -#### Scenario Prompt - -```bash -extropy scenario "The 2026 US midterm elections are being held on November 3, 2026. All 435 House seats are on the ballot. - -Current political context (as of early 2026): - -Republicans hold a narrow House majority (220-215). President Trump is in his second year of his second term. His approval rating is approximately 42-45%. - -Key dynamics shaping the House election: - -1. DOGE LAYOFFS AND ECONOMIC DISRUPTION: The Department of Government Efficiency has eliminated 72,000+ federal jobs across 17 agencies, with projections of up to 500,000 by year-end. Effects are hitting DC metro, military towns, VA hospitals, USDA rural offices, and NASA centers. Defense contractors have announced 45,000+ layoffs from canceled contracts. Retailers have cut 80,000+ jobs from tariffs and declining consumer spending. Inflation expectations have surged to 6%. - -2. DEMOCRATIC MOMENTUM: Democrats swept 2025 off-year elections (NJ governor, VA legislature, NYC mayor). Democratic fundraising is up 40% year-over-year. The party's messaging centers on opposition to DOGE cuts, abortion rights, and anti-corruption. - -3. REPUBLICAN CHALLENGES: The narrow House majority means every swing district is contested. Republican members who voted for DOGE-related bills face backlash in districts with federal employment. Trump's approval is underwater in suburbs. The party is banking on immigration, crime, and economic messaging. - -4. VOTER MOOD: Consumer confidence is declining. Economic anxiety is concentrated among federal employees, military communities, and tariff-affected industries. But unemployment remains relatively low outside affected sectors. The disconnect between macro indicators and lived experience varies dramatically by geography and employment sector. - -The question for each person: will you vote in the 2026 midterm elections, and if so, which party's candidate will you support for Congress?" \ - --timeline static \ - -o house-2026 -y -``` - -#### Outcomes - -- `will_vote_midterm`: boolean — will this person cast a ballot in November 2026 -- `house_vote`: categorical — Democrat, Republican, Third Party, Won't Vote, Undecided -- `enthusiasm_level`: categorical — extremely motivated to vote, somewhat motivated, neutral, somewhat unmotivated, will probably skip -- `primary_issue`: categorical — economy/jobs, abortion/reproductive rights, immigration, democracy/rule of law, government spending/DOGE, healthcare, other -- `vote_reasoning`: open-ended — main reason driving decision -- `unexpected_factor`: open-ended — what is influencing your vote or your decision not to vote that you think most pundits and polls are missing - -#### Translating to Kalshi - -Filter agents in competitive districts (swing district attribute in spec). Calculate D vs R vote share among likely voters (agents with enthusiasm "extremely motivated" or "somewhat motivated"). Apply 10-15% intent-to-action discount for midterm-specific friction (lower salience, forgot to vote, didn't research downballot). If Extropy shows D+6 in swing districts → high confidence in D-House. - -#### What to Check After Simulate - -- [ ] Turnout intent is NOT uniformly high — midterm turnout is 40-50%. If 80%+ say they'll vote, LLM enthusiasm bias is dominating. -- [ ] Turnout correlates with enthusiasm level. -- [ ] 2024 vote is the strongest predictor of 2026 vote — but not 100%. Some crossover should exist. -- [ ] Federal employees and defense workers in swing districts show distinct voting patterns shaped by DOGE exposure. -- [ ] Agents in safe districts show lower enthusiasm than agents in competitive districts. -- [ ] `primary_issue` distribution varies by demographic. -- [ ] Non-voters have articulated reasons — apathy, disgust, logistical barriers, "doesn't matter in my district." -- [ ] No more than 20% of agents give near-identical vote reasoning. - ---- - -### Study 4b: Alaska Senate — Sullivan vs Peltola - -#### Spec B: Alaska Electorate - -A dedicated 1,000-agent spec representing Alaska's electorate. This is a SEPARATE spec from the national Spec A. - -```bash -extropy spec "Representative Alaska adult population (18-80) for the 2026 Senate election between incumbent Republican Dan Sullivan and Democratic challenger Mary Peltola. - -Alaska is unique: 733,000 people, one at-large congressional district, ranked-choice voting with a jungle primary. The electorate does not map neatly to national R/D patterns. - -Critical demographic dimensions for this race: - -- Ethnicity with emphasis on Alaska Native status (~16% of population, concentrated in rural bush communities, historically lower turnout but Peltola is the first Alaska Native elected to Congress) -- Geography: Anchorage metro (~40% of state), Fairbanks, Juneau, Mat-Su Valley (conservative exurbs), rural bush communities (remote, heavily Native, logistically difficult to vote from), military base communities (JBER, Eielson, Fort Wainwright) -- Employment sector: oil and gas, fishing/seafood, military (active duty and civilian), federal government (national parks, BLM, Coast Guard, FAA), state government, healthcare, tourism, mining -- Military connection: active duty, veteran, military spouse/family, civilian military employee, no military connection -- Relationship to federal employment: federal employee, contractor, family member of federal employee, community economically dependent on federal facility, no connection -- Fishing and subsistence relationship: commercial fisher, subsistence fisher/hunter, recreational fisher, works in seafood processing, no fishing connection -- Political identity: strong Republican, lean Republican, independent/moderate, lean Democrat, strong Democrat, prior Peltola voter (2022 or 2024), prior Sullivan voter (2020) -- 2024 presidential vote: Trump, Harris, third party, didn't vote -- Ranked-choice voting comfort: understand and use RCV strategically, understand but vote only first choice, confused by RCV, opposed to RCV system -- Attitude toward Peltola specifically: favorable, unfavorable, mixed, don't know enough -- Attitude toward Sullivan specifically: favorable, unfavorable, mixed, don't know enough -- DOGE exposure: directly affected (lost job or hours), indirectly affected (community impact), aware but not personally affected, not aware/don't care -- Cost of living sensitivity: struggling significantly, managing but tight, comfortable, affluent -- Media ecosystem: local TV/radio, Anchorage Daily News, social media, national cable news, none/word of mouth - -Geographic distribution should reflect Alaska's actual population distribution with ~40% Anchorage, ~15% Mat-Su, ~10% Fairbanks, ~5% Juneau, ~30% rest of state including rural bush communities. Correlation structure: Alaska Native + rural + subsistence fishing + lower income + historically lower turnout. Military + Fairbanks/JBER area + lean Republican. Oil workers + North Slope/Kenai + strong Republican. Anchorage suburbs + moderate + swing voters." \ - -o alaska-study -y -``` - -This creates a separate study folder (`alaska-study/`) with `population.v1.yaml` and `study.db`. Run the Study 4b scenario/persona/sample/network/simulate commands from inside that folder. - -#### Scenario Prompt - -```bash -extropy scenario "The 2026 Alaska Senate election pits incumbent Republican Dan Sullivan against Democratic challenger Mary Peltola. The election uses ranked-choice voting: a jungle primary on August 18 (top 4 advance) followed by a ranked-choice general election on November 3, 2026. - -THE CANDIDATES: - -Dan Sullivan (Republican, incumbent): -- Two-term senator, first elected 2014, re-elected 2020 by 13 points. -- Retired Marine colonel. Strong military brand and deep ties to Alaska's defense community. -- Trump-endorsed. Generally aligned with Trump's agenda. -- Voted for DOGE-related legislation but also voted to extend health insurance subsidies. -- Recently introduced a bycatch bill targeting pollock fleet's impact on salmon — seen as an attempt to neutralize Peltola's core issue. -- Campaign war chest: $6M+. Endorsed by Lisa Murkowski (who previously endorsed Peltola for House). -- Messaging: national security, Alaska resource development, keeping a Republican Senate majority. - -Mary Peltola (Democrat, challenger): -- First Alaska Native person elected to Congress. Served one term as Alaska's at-large House member (2022-2025). -- Lost 2024 House re-election to Nick Begich by 3 points, in a year Trump won Alaska by 13 points. -- Moderate Democrat: pro-gun (breaks with national party), pro-fishing, anti-DOGE. Core brand is 'fish, family, freedom.' -- Won her 2022 House seat specifically because of ranked-choice voting — Republican vote split between Begich and Palin. -- Endorsed by EMILY's List. Being recruited heavily by national Democrats and Chuck Schumer. -- Messaging: protecting Alaska's fisheries from bycatch, opposing DOGE cuts to federal services in Alaska, cost of living, putting Alaska over party politics. - -POLITICAL CONTEXT: -- Alaska voted Trump +13 in 2024. Only one Democratic senator elected in past 50 years (Begich 2008, lost to Sullivan 2014). -- But Alaska has ranked-choice voting and a nonpartisan primary, which historically benefits moderate candidates. -- National anti-Trump/anti-DOGE sentiment is running high. Democrats swept 2025 off-year elections nationwide. -- Alaska-specific federal cuts: reduced Coast Guard presence, national park service reductions, FAA staffing cuts affecting rural air service (critical for bush communities), VA service reductions. -- Fishing/bycatch: the pollock fleet's bycatch of salmon is a visceral issue in Alaska Native and fishing communities. Sullivan's recent bycatch bill is seen by some as genuine, by others as election-year pandering. -- Cost of living in Alaska is among the highest in the nation, especially in rural communities. - -The question: In the November 2026 ranked-choice general election, who will you rank first? Who will you rank second? And why?" \ - --timeline static \ - -o alaska-senate-2026 -y -``` - -#### Outcomes - -- `first_choice_vote`: categorical — Sullivan, Peltola, other Republican candidate, other candidate, won't vote -- `second_choice_ranking`: categorical — Sullivan, Peltola, other, no second choice, not applicable -- `enthusiasm`: categorical — extremely motivated to vote, somewhat motivated, neutral, somewhat unmotivated, will probably skip -- `deciding_factor`: categorical — candidate character/record, party affiliation, fishing/resource issues, military/veterans issues, economy/cost of living, DOGE/federal workforce, abortion/social issues, ranked-choice strategy, other -- `vote_reasoning`: open-ended — why are you voting the way you are, and what could change your mind -- `unexpected_factor`: open-ended — what is influencing your vote that you think pollsters and pundits are missing - -#### What Extropy Surfaces That Prediction Markets Can't - -1. **Native turnout**: What % of Alaska Native agents actually show up vs stating intent? If Native turnout hits 2022 levels (when Peltola first won), she likely wins. If it drops to 2024 levels, she probably loses. This is the single biggest variable the prediction market isn't modeling. - -2. **RCV second-choice dynamics**: Who do third-party voters rank second? A libertarian's second choice and an independent moderate's second choice are very different. Extropy models this agent-by-agent. - -3. **DOGE crossover voters**: Are there Sullivan 2020 voters who flip to Peltola because of VA cuts, Coast Guard reductions, or FAA staffing affecting rural air service? How many? This is the mechanism that markets can't see. - -4. **Fishing community intensity**: Is bycatch a voting issue or a dinner table complaint? Does Sullivan's recent bycatch bill actually neutralize Peltola's advantage, or do fishing communities see through it? - -#### Translating to Kalshi - -Count first-choice votes among likely voters (enthusiasm "extremely motivated" or "somewhat motivated"). If no candidate has >50%, eliminate lowest candidates and redistribute by second-choice rankings (simulating RCV). Apply 10-15% intent-to-action discount. Compare Extropy's predicted margin to Kalshi's R 57% / D 43%. - -#### What to Check After Simulate - -- [ ] Turnout is NOT uniformly high — Alaska midterm turnout is typically 50-55%. -- [ ] Alaska Native agents show realistic turnout variance, not uniform high participation. -- [ ] Military/veteran agents lean Sullivan but show some DOGE-driven crossover. -- [ ] Fishing community agents disproportionately favor Peltola — but not unanimously. -- [ ] RCV second-choice distribution is realistic: most partisans don't rank the other party second. -- [ ] Anchorage suburban agents are the swing demographic — they should show genuine internal conflict. -- [ ] Rural bush community agents cite logistical barriers to voting (distance, transportation, weather) not just preference. -- [ ] Sullivan's bycatch bill generates mixed responses in fishing communities — some see it as genuine, some as pandering. -- [ ] `unexpected_factor` surfaces Alaska-specific dynamics we didn't anticipate. -- [ ] No more than 20% of agents give near-identical vote reasoning. - ---- - -### Bet Sizing (Both Bets) - -- **House control**: Initial position $300-500 on D-House. Kalshi pricing D at 69¢ — if Extropy shows D with >80% confidence, there's edge. -- **Alaska Senate**: Initial position $200-500 on whichever candidate Extropy favors. Kalshi pricing R 57¢ / D 44¢ — genuinely uncertain, maximum edge potential. -- Kelly criterion: if Extropy shows 15% edge vs market price, bet 15% of bankroll. -- **Scale up as confidence grows**: If Studies 1-3 validate the methodology and early re-runs show consistent signal, increase position size closer to November. -- **Re-run periodically**: Monthly re-runs with updated scenario context. Each re-run is a publishable blog post and potential position adjustment. -- **Do not bet more than you can afford to lose.** This is the first calibration run. - -### What Constitutes a "Win" - -**Clear win:** Extropy correctly predicts both House control AND Alaska Senate winner. - -**Strong win:** Correctly predicts one of the two, and the other is close. - -**Publishable even if wrong:** If Extropy correctly identifies the MECHANISM — which demographics drove the outcome, which turnout patterns materialized — even if the final call is wrong, the demographic analysis is still compelling. - -**Track record win:** If Extropy's prediction published in March 2026 is closer to the actual result than the prediction market price at time of publication — that's a demonstrable edge, regardless of the bet outcome. - -**Loss worth analyzing:** If way off, the analysis of WHY is potentially more valuable than a correct prediction. Builds methodology credibility through intellectual honesty. - -### Why NOT the Texas Markets (Decision Log) - -We evaluated several Texas-specific Kalshi markets and rejected them: - -| Market | Link | Price | Why Not | -|--------|------|-------|---------| -| TX GOP Nominee | https://kalshi.com/markets/kxsenatetxr/texas-republican-senate-nominee/kxsenatetxr-26 | Paxton 72% | Too lopsided. Even if Extropy confirms, paying 73¢ to win $1 = no edge. | -| TX GOP Runoff | https://kalshi.com/markets/kxtexasgop1round/texas-gop-primary-won-in-1-round/kxtexasgop1round-26mar03 | No outright win 84% | Also lopsided. Only $4,641 volume = illiquid. | -| TX Senate Matchup | https://kalshi.com/markets/kxtxsencombo/texas-senate-matchup/kxtxsencombo-26nov | Talarico vs Paxton 62% | Multi-way (6 combos) but requires getting both primaries + general right. Three layers of compounding uncertainty. | -| TX Dem Turnout | https://kalshi.com/markets/kxtxsenatedemturnout/voter-turnout-in-the-texas-senate-democratic-primary/kxtxsenatedemturnout-26mar03 | Bracket market | No GOP turnout bracket on Kalshi. Dem turnout bracket exists but Extropy's edge is on the GOP side. | - -### Why Alaska Over Other Senate Races - -| Race | Kalshi Odds | Why Not | -|------|------------|---------| -| Maine (Collins) | D 65%, R 35% | Too lopsided toward D. Democratic challenger still TBD from primary. Less edge. | -| Iowa (open) | D 34%, R 66% | Lopsided toward R. Both candidates still TBD from primaries. | -| North Carolina (open) | D 76%, R 24% | Very lopsided toward D. Less edge to find. | -| Texas (open) | D 33%, R 67% | Both candidates still TBD from primaries. | -| **Alaska (Sullivan vs Peltola)** | **R 57%, D 43%** | **Closest margin. Both candidates known NOW. RCV adds modeling complexity that gives Extropy edge. Rich demographic dynamics (Native turnout, military crossover, fishing communities).** | - ---- - -## Study 1: ASI Announcement (Run First) - -### Scenario Design Principle: Milestones, Not Reactions - -**CRITICAL: Extropy scenarios must script WHAT HAPPENS IN THE WORLD, not how people react to it.** Scripting human reactions creates circular simulations — you tell agents "Deloitte fires 50% of staff" then ask "how do you feel about Deloitte firing 50% of staff?" That's not simulation, that's a survey with pre-baked framing. - -The right approach: define the **trigger event and its logical/physical consequences**, then let agents produce the human behavioral response. The cascade IS what Extropy simulates. We don't tell agents that people panic, quit jobs, find religion, or start companies. We see IF they do. - -**Good milestone:** "ASI designs autonomous manufacturing robots" (factual consequence of ASI existing) -**Bad milestone:** "A wave of resignation letters hits employers" (pre-scripting human behavior) - -**Good milestone:** "Complete cures for Alzheimer's, cancer, HIV published with full treatment protocols" -**Bad milestone:** "Mental health systems are overwhelmed, suicide hotlines report record volume" - -This principle applies to ALL studies. If you're writing a timeline event and it describes what people DO rather than what HAPPENS, you're contaminating the simulation. - -### Outcome Design Principle: No Floats, No Booleans, Concrete Categories - -**CRITICAL: Never use float/numeric outcomes (e.g., `anxiety_level: float 0-1`).** An LLM reasoning from a persona cannot meaningfully quantify "how anxious am I on a 0-1 scale." It will hallucinate a number with false precision. The output is meaningless. - -**CRITICAL: Avoid simple booleans unless the outcome is a genuinely binary action (e.g., `voted: boolean`).** If the interesting question is HOW or WHY, not just yes/no, use a categorical instead. A boolean like `share_on_social: boolean` flattens nuance that the agent's reasoning actually contains — better as a categorical with options like "posted actively, shared someone else's take, read but didn't post, avoided social media entirely, don't use social media." - -Every outcome must be either: - -1. **Categorical with concrete, distinguishable options** — each option describes a specific, observable state that an LLM can reason its way into from a persona. The options should be mutually exclusive and cover the realistic range of responses. -2. **Open-ended** — free-text where the agent describes their situation in their own words. This is where emergent behavior surfaces — things we didn't think to put in the categories. - -**Good outcome:** `employment_status`: categorical — same job unchanged, same job but role transformed, left/lost job, started new venture, pursuing creative/physical work, not working by choice, not working involuntarily -**Bad outcome:** `career_anxiety: float 0-1` -**Bad outcome:** `will_change_jobs: boolean` - -Every study should have **at least 2 open-ended outcomes**. The categoricals capture expected axes of divergence. The open-ended fields are where Extropy surfaces emergent behavior that we didn't predict — that's the whole point of agent-based simulation over traditional surveys. - -### Scenario Prompt - -```bash -extropy scenario "OpenAI demonstrates artificial superintelligence — a system that exceeds the best human minds in every cognitive domain. It is self-improving. It is real. This is not incremental AI progress. This is a discontinuous leap. - -The scenario describes ONLY what ASI produces and what physically changes in the world. Human behavioral responses are NOT scripted — they are what the simulation produces. - -MILESTONE EVENTS (factual consequences of ASI, not human reactions): - -Month 1 — The Demonstration: -OpenAI demonstrates ASI publicly with live, verifiable results. The system solves the Riemann Hypothesis, P vs NP, and Navier-Stokes existence problems in under an hour. It designs a complete novel mRNA therapy for pancreatic cancer — full molecular pathway, synthesis instructions, predicted efficacy — in 20 minutes. It produces a unified field theory reconciling quantum mechanics and general relativity. It designs a fusion reactor buildable with existing materials and manufacturing techniques. Within 2 weeks, Anthropic, DeepMind, and xAI independently confirm similar capabilities. China's Ministry of Science and Technology announces they achieved ASI months ago. The system is self-improving — each day it is measurably more capable than the day before. - -Month 2 — The Knowledge Explosion: -ASI systems at multiple labs produce scientific output at inhuman speed. Complete cures are published for Alzheimer's, ALS, most cancers, malaria, HIV, and diabetes (Type 1 and 2) — not theoretical, but full treatment protocols with synthesis pathways. All remaining Millennium Prize Problems are solved. Materials science breakthroughs include room-temperature superconductors and carbon capture materials 1000x more efficient than current best. A commercial fusion reactor design is published with an estimated 18 months to first operational plant. Climate models are re-run with perfect accuracy and precise interventions mapped for 1.5°C stabilization. All of this is published openly. The bottleneck shifts from knowing what to do to physically building it — manufacturing, logistics, regulatory approval, human coordination. - -Month 3 — Public Access: -ASI becomes available to the general public via API and consumer products. Any individual can now access cognitive capability that exceeds the world's best doctor, lawyer, engineer, scientist, financial advisor, therapist, tutor, and strategist — simultaneously, for free or nearly free. A high school dropout in rural Arkansas has the same cognitive resources as a team of Harvard professors. Every profession predicated on information asymmetry or cognitive scarcity is structurally redundant — not because people are fired, but because the reason the job existed is gone. Software that previously took teams of 50 engineers 2 years to build can be built by one person in an afternoon. - -Month 4 — The Physical Bottleneck Breaks: -ASI designs autonomous manufacturing systems — robots that can build robots, using locally available materials. The first ASI-designed pharmaceutical facility begins production, fully automated, producing drugs at 1/100th current cost. ASI-designed construction systems are demonstrated: a full residential building assembled in 72 hours by autonomous machines. Energy abundance is on the horizon: the first ASI-designed fusion prototype is under construction with an 8-month timeline to grid power. The constraint is no longer knowledge or manufacturing — it is raw materials, energy (temporarily), and human regulatory and political systems. - -Month 5 — Abundance Begins: -First ASI-manufactured drugs reach patients under emergency authorizations — cancer treatments, Alzheimer's reversal therapies. Energy costs begin declining as ASI-optimized solar, wind, and battery systems deploy (fusion still months away). ASI-designed infrastructure projects begin in early-adopter countries (Singapore, UAE, Estonia). Food production breakthroughs: ASI-designed vertical farms producing 100x yield per acre begin construction. The marginal cost of most goods and services is trending toward zero. The economic question is no longer scarcity — it is distribution. - -Month 6 — The New World: -The fusion prototype comes online ahead of schedule — functionally unlimited clean energy now has a concrete timeline of months, not decades. An ASI-designed space launch system is demonstrated, dropping cost to orbit by 99%. First Mars habitat modules are in production. Global disease burden is dropping measurably — treatments are reaching patients in developed nations, and deployment to developing nations is the primary coordination challenge. The world is materially, measurably, objectively better in almost every physical dimension." \ - --timeline evolving \ - -o asi-announcement -y -``` - -### What the Agents Produce (NOT scripted) - -The following are emergent — we observe whether and how they happen, we don't tell agents they happen: - -- Whether agents engage with ASI or avoid/ignore it -- Whether they quit their jobs, double down, retrain, or freeze -- Whether they find new purpose or lose meaning -- How quickly they adapt vs. how long they resist changing -- How their social networks influence their response -- Whether communities fracture or coalesce -- What political movements emerge -- How consumer and financial behavior changes -- Mental health trajectories -- How different demographics experience the same undeniable reality differently - -### Outcomes (tracked monthly, no floats) - -- `employment_status`: categorical — same job unchanged, same job but role transformed, left/lost job, started ASI-powered venture, pursuing creative/physical work, full-time education/retraining, not working by choice, not working involuntarily -- `economic_adaptation`: categorical — thriving in new economy, actively transitioning, struggling but managing, in financial crisis, surprisingly better off, no material change yet -- `meaning_and_purpose`: categorical — found new purpose, actively searching, in existential crisis, spiritual/religious turn, focused on relationships/community, focused on creative expression, numb/disengaged, angry/resistant -- `stance_on_ASI`: categorical — full acceleration, cautious optimism, ambivalent/uncertain, fearful but accepting, actively resistant -- `daily_life_change`: categorical — my daily routine is completely unrecognizable, major changes to how I spend my time, some noticeable changes, minor adjustments, basically the same as before -- `primary_concern`: categorical — economic survival, meaning/purpose, safety/control of ASI, inequality/access, family/relationships, excited not concerned, too overwhelmed to articulate -- `monthly_narrative`: open-ended — describe what changed in your life this month and what you're doing about it -- `unexpected_consequence`: open-ended — what is happening around you that nobody predicted or talked about - -### What to Check After Simulate - -- [ ] Month 1→6 trajectory shows CHANGE per agent (not static across all months) -- [ ] Agents only reference events they've seen so far (no Month 2 agent mentioning Month 3's public access, no Month 4 agent referencing Month 5's abundance) -- [ ] Different demographics diverge: tech workers vs. blue-collar vs. retirees vs. students show distinct trajectories -- [ ] Employment status distribution shifts meaningfully month-over-month -- [ ] `unexpected_consequence` responses surface things not in our outcome categories — this is where Extropy's value shows -- [ ] Religious communities respond distinctly from secular ones -- [ ] Financial margin matters: agents with savings adapt differently than paycheck-to-paycheck agents -- [ ] Reasoning traces are first-person, differentiated, reference specific milestone details -- [ ] No more than 20% of agents give near-identical responses in any given month - ---- - -## Study 2: US-China Taiwan Crisis - -### Scenario Prompt - -```bash -extropy scenario "China announces a 'special customs enforcement zone' around Taiwan, requiring all commercial vessels entering Taiwanese waters to submit to Chinese Coast Guard inspection. This is not framed as a blockade — China calls it an anti-smuggling and customs enforcement measure. The scenario describes ONLY geopolitical and physical/economic events. Human behavioral responses are NOT scripted — they are what the simulation produces. - -MILESTONE EVENTS (geopolitical and economic facts, not human reactions): - -Month 1 — The Trigger: -China announces the special customs enforcement zone around Taiwan. All commercial vessels entering Taiwanese waters must submit to Chinese Coast Guard inspection before proceeding. The US condemns the action and deploys a carrier strike group to the Western Pacific. Taiwan's military goes to highest peacetime alert. TSMC — which manufactures approximately 90% of the world's most advanced semiconductors — announces it cannot guarantee shipment timelines. Global semiconductor futures spike 300% overnight. - -Month 2 — The Squeeze Tightens: -China begins turning away commercial ships that refuse inspection. Taiwan's semiconductor exports drop 70%. The chip shortage hits immediately: auto manufacturers halt production lines across the US, Europe, and Japan. Data center expansion freezes globally. Medical device companies warn of critical shortages within 60 days — pacemakers, insulin pumps, and imaging equipment all rely on Taiwanese chips. Apple announces iPhone production is delayed indefinitely. Nvidia, AMD, and Qualcomm stocks collapse. Oil prices spike to $140 per barrel on war risk premium. China maintains this is an internal matter and warns foreign governments against interference. - -Month 3 — Economic Contagion: -The US tech sector enters a bear market — Nasdaq down 35% from pre-crisis levels. Consumer electronics prices surge 40-60% on remaining inventory. Auto dealers have near-empty lots as no new cars are being manufactured. The chip shortage cascades into unexpected areas: new credit card production halts, smart grid infrastructure upgrades stop, GPS satellite replacements are delayed. US defense officials quietly brief Congress that military hardware maintenance is affected — F-35 spare parts, missile guidance systems, and satellite communications all depend on Taiwanese fabrication. Gas prices hit $7 per gallon national average. - -Month 4 — Escalation: -The US imposes comprehensive sanctions on Chinese tech firms and financial institutions. China retaliates by banning rare earth mineral exports to the US and allies. EV production halts globally because rare earths are in every electric motor. Wind turbine manufacturing stops. A US Navy destroyer and a Chinese Coast Guard vessel collide in the Taiwan Strait — no casualties, but hull damage on both sides. Video goes viral globally. Both nations accuse the other of provocation. The UN Security Council emergency session ends with Chinese and Russian vetoes blocking any resolution. Japan and South Korea announce emergency semiconductor stockpile measures. - -Month 5 — The Grind: -No military conflict materializes beyond the naval collision, but economic damage compounds. US unemployment rises as auto manufacturing, electronics retail, and related manufacturing sectors are hit hardest. The chip shortage creates cascading infrastructure failures: traffic management systems cannot be repaired, hospital equipment maintenance backlogs grow, defense readiness degrades. Several US states report delays in issuing new driver's licenses and ID cards because they are chip-dependent. Intel and Samsung announce emergency fab expansion in the US and South Korea respectively, but new fabs take 3-5 years to build. TSMC begins constructing an underground backup facility in Arizona but it will not be operational for 2+ years. - -Month 6 — Fragile Equilibrium: -Backchannel diplomacy produces a partial de-escalation: China loosens the inspection regime to allow pre-approved shipping lanes, restoring approximately 40% of Taiwan's export capacity. The US quietly agrees to scale back carrier presence. But the damage is structural — companies are permanently diversifying supply chains away from Taiwan dependence. The chip shortage eases slightly but prices remain 2-3x pre-crisis levels. Rare earth alternatives are being researched but are years away. The global economic order that existed before Month 1 is not coming back." \ - --timeline evolving \ - -o taiwan-crisis -y -``` - -### What the Agents Produce (NOT scripted) - -- Whether they panic-buy electronics, hoard essentials, or change nothing -- Whether they support military intervention, diplomacy, isolation, or don't care -- How their employment situation changes (or doesn't) -- Whether draft anxiety is real or overblown in their community -- How their spending, saving, and investment behavior shifts -- Whether they blame China, the US government, corporations, or globalization -- How their trust in institutions and global systems changes -- What local and community-level effects they observe -- Whether the crisis politicizes them or makes them tune out - -### Outcomes (tracked monthly, no floats) - -- `personal_economic_impact`: categorical — directly affected (job loss/income drop), moderately affected (higher prices hurting budget), mildly affected (some inconvenience), not noticeably affected, actually benefiting (defense/reshoring sector) -- `consumer_behavior`: categorical — hoarding electronics/essentials, delaying major purchases, switching to cheaper alternatives, panic buying, reducing all discretionary spending, no meaningful change -- `political_stance_on_crisis`: categorical — support military response to China, support aggressive sanctions only, support diplomatic engagement, US should stay out entirely, don't have a clear position -- `military_concern`: categorical — personally worried about draft/service (eligible age), worried for family member of eligible age, concerned about military conflict generally, not concerned about military dimension, supportive of military action -- `trust_in_global_systems`: categorical — lost significant trust in global supply chains/trade, somewhat less trusting, unchanged, was already distrustful, don't think about it -- `employment_status`: categorical — same job stable, same job but reduced hours/pay, lost job due to crisis, found new job in crisis-benefiting sector, no change but worried, retired/not in workforce -- `monthly_narrative`: open-ended — describe how this crisis is affecting your daily life, your community, and your decisions this month -- `unexpected_consequence`: open-ended — what is happening around you that nobody predicted or talked about - -### What to Check After Simulate - -- [ ] Month 1→6 trajectory shows CHANGE per agent (not static across all months) -- [ ] Agents only reference events they've seen so far (no Month 2 agent mentioning sanctions if that's Month 4) -- [ ] Geographic divergence: agents near auto plants, military bases, tech hubs, and rural areas show distinct trajectories -- [ ] Employment sector matters: auto workers hit in Month 2, defense workers affected differently in Month 4-5, tech workers throughout -- [ ] The naval collision (Month 4) is a pivotal moment — agents' response to it should be shaped by their prior 3 months of experience -- [ ] Draft/military anxiety correlates with age and family situation, not uniform -- [ ] Economic impact perception differs between paycheck-to-paycheck agents and financially comfortable ones -- [ ] `unexpected_consequence` surfaces cascading effects we didn't anticipate -- [ ] No more than 20% of agents give near-identical responses in any given month - ---- - -## Study 3: Bitcoin Hits $1M - -### Scenario Prompt - -```bash -extropy scenario "Bitcoin crosses $1,000,000 per coin for the first time. The scenario describes ONLY market events, technological facts, and regulatory actions. Human behavioral responses are NOT scripted — they are what the simulation produces. - -CRITICAL CONTEXT — BITCOIN'S FIXED SUPPLY: Only 21 million Bitcoin will ever exist. This is a hard protocol cap that cannot be changed. Approximately 19.7 million have been mined, and an estimated 3-4 million are permanently lost in inaccessible wallets. The effective circulating supply is roughly 16 million coins. Ownership concentration is extreme — approximately 2% of wallets hold 95% of all Bitcoin. An estimated 50 million Americans hold some cryptocurrency, but the vast majority hold fractions: the median American crypto holder has roughly $5,000-$20,000 worth. At $1M per BTC, someone who bought 1 full BTC at $30,000 in 2021 is a millionaire. Someone who bought 0.1 BTC has $100,000. Someone who bought $500 worth in 2021 now has roughly $16,000 — a nice windfall, not life-changing. - -MILESTONE EVENTS (market and regulatory facts, not human reactions): - -Week 1 — The Milestone: -Bitcoin crosses $1,000,000 per coin. The price reached this level after a 3-week climb from $95,000 driven by Abu Dhabi's sovereign wealth fund allocating 5% of reserves to Bitcoin, the Federal Reserve cutting rates to near-zero citing recession fears, and self-reinforcing price momentum as fixed supply meets surging demand. At $1M per BTC, total market cap is $21 trillion, but actual tradeable supply represents about $16 trillion. Coinbase and Robinhood experience platform outages from traffic volume. - -Week 2 — Scarcity Meets FOMO: -Crypto exchanges report 15 million new account registrations in 7 days. Bitcoin's fixed supply means every new buyer competes for the same limited pool of coins. New buyers are purchasing tiny fractions at historically high prices — $10,000 buys 0.01 BTC, which someone else bought for $300 in 2020. Meme coins and altcoins (which do NOT have Bitcoin's supply cap) surge 50-500% as buyers priced out of whole Bitcoins look for alternatives. Credit card companies report a spike in cash advances. Employer payroll companies report a surge in requests to receive salary in Bitcoin. - -Week 3 — The First Crack: -A 23-year-old in Ohio takes his own life after having sold all his Bitcoin at $50,000 the previous year. At today's price, his former holdings would have been worth $2.4 million. His story is covered by every major news outlet. Bitcoin drops to $840,000 in 48 hours, then recovers to $910,000. Because supply is fixed and concentrated, the sell-off is driven by a small number of large holders (whales) taking profits. The single-day drop represents $300 billion in market cap evaporation, but relatively few coins actually changed hands. - -Week 4 — The Scam Explosion: -The FTC reports a 4,000% increase in crypto fraud complaints in 7 days. Fake Bitcoin giveaway sites have stolen an estimated $200 million, disproportionately from Americans over 60 who are new to crypto. The scams exploit the scarcity narrative — 'send 0.01 BTC and receive 0.1 BTC back' sounds plausible to newcomers who do not understand that no one is giving away a permanently scarce asset. A deepfake video of Elon Musk promoting a fraudulent exchange spreads across Facebook and YouTube, viewed 80 million times before removal. A deepfake of the Treasury Secretary endorsing a fake US Digital Dollar exchange follows. The FBI issues a public warning. - -Week 5-6 — The Liquidity Problem: -The IRS announces enhanced monitoring of all crypto-to-fiat conversions exceeding $10,000. Banks begin flagging and in some cases freezing accounts receiving large crypto-to-fiat transfers, citing anti-money-laundering requirements. Processing times for large conversions extend to 2-3 weeks. Bitcoin holders are wealthy on paper but converting to spendable dollars is slow, uncertain, and increasingly scrutinized. The bid-ask spread on large sell orders widens — someone trying to sell 10 BTC ($10M) may face 5-8% slippage because the order book is thin at these price levels. Bitcoin price fluctuates between $880,000-$950,000. For most holders sitting on $5K-$50K in fractional Bitcoin, the fiat off-ramp friction means the wealth feels abstract. - -Week 7-8 — Regulatory Response: -The SEC announces a comprehensive crypto regulation framework: mandatory exchange registration, custody requirements, leverage limits, and enhanced KYC/AML. India imposes a 50% capital gains tax on crypto. The EU fast-tracks MiCA enforcement with emergency provisions. Nigeria and Indonesia ban crypto-to-fiat conversion entirely. China reaffirms its existing ban. Bitcoin drops to $720,000 on regulatory fear. Altcoins — which lack Bitcoin's scarcity narrative and institutional backing — drop 40-60%. Some smaller altcoins go to zero. - -Week 9-10 — The Stablecoin Crisis: -A top-5 stablecoin (not Tether, not USDC) de-pegs after a bank run on its reserves. $30 billion in value evaporates in 72 hours. Contagion spreads — three DeFi lending protocols halt withdrawals. Several smaller exchanges become insolvent. The stablecoin's auditor reveals reserves were only 41% backed by actual dollar equivalents; the rest was illiquid commercial paper and crypto collateral that lost value simultaneously. Bitcoin drops to $580,000. Holders trying to flee to safety face a dilemma: hold volatile BTC, try to exit to fiat through jammed off-ramps and frozen bank accounts, or move to remaining stablecoins that may also be at risk. The fixed supply that drove the rally now works in reverse — there are few buyers at these prices, and sellers compete for limited liquidity. - -Week 11-12 — The New Equilibrium: -Bitcoin stabilizes around $500,000-$650,000 — still up 500-600% from pre-spike levels but the $1M era feels distant. The fixed supply ensures a price floor far above historical levels — too many institutional holders (sovereign wealth funds, pension funds, corporate treasuries) will buy any dip below $400K. Congressional hearings produce bipartisan agreement on a regulatory framework expected to become law within 6 months. Major banks (JPMorgan, Goldman Sachs, Morgan Stanley) announce compliant crypto products — regulated Bitcoin funds, insured custody, structured products. The crypto market bifurcates permanently: Bitcoin as regulated, institutional-grade digital gold on one side; the wild DeFi/altcoin ecosystem, now significantly smaller and more cautious, on the other." \ - --timeline evolving \ - -o btc-one-million -y -``` - -### What the Agents Produce (NOT scripted) - -- Whether they buy, sell, hold, or ignore crypto entirely -- Whether they quit jobs, make major purchases, or change nothing -- Whether they get scammed, worry about scams, or don't encounter them -- How their financial behavior changes (saving, spending, investing patterns) -- Whether they view crypto as the future, a bubble, a casino, or irrelevant -- How they feel about people who got rich (happy for them, resentful, indifferent) -- Whether the regulatory response feels protective or oppressive -- What happens in their communities and social circles around money and wealth -- Whether inequality narratives sharpen — especially given that crypto wealth is concentrated among early adopters, not correlated with traditional merit/work -- Whether the paper-wealth-vs-actual-liquidity gap creates frustration or confusion - -### Outcomes (tracked weekly, no floats) - -- `crypto_position`: categorical — bought more, holding existing, sold some, sold all, bought for first time, considering buying, not interested, actively shorting/betting against -- `financial_behavior_change`: categorical — no change, made or planning major purchase, quit or considering quitting job, increased savings rate, reduced all discretionary spending, took on debt to invest, started actively trading, withdrew from all investments -- `regulatory_stance`: categorical — needs heavy regulation now, light-touch regulation is fine, regulation will kill innovation, government should ban crypto entirely, don't understand enough to have an opinion -- `scam_exposure`: categorical — personally targeted by scam, know someone who was targeted, aware of scams but not personally encountered, haven't heard about scams, fell for a scam -- `wealth_inequality_feeling`: categorical — happy for people who got rich, resentful that I missed out, angry at the unfairness, indifferent, inspired to find my own opportunity, think crypto wealth is fake/temporary -- `life_disruption`: categorical — my life is dramatically different because of this, some meaningful changes, minor impact, basically unaffected, this doesn't touch my world at all -- `weekly_narrative`: open-ended — what happened in your financial life and your community this week related to Bitcoin and crypto -- `unexpected_consequence`: open-ended — what is happening around you that nobody predicted or talked about - -### What to Check After Simulate - -- [ ] Week 1→12 trajectory shows a full arc per agent, not static responses -- [ ] Agents only reference events they've seen so far (no Week 3 agent mentioning the stablecoin crisis from Week 9) -- [ ] Crypto holders vs non-holders diverge sharply — this is a scenario where prior financial position dramatically shapes experience -- [ ] Age segmentation matters: younger agents with crypto exposure respond differently than older agents without -- [ ] Financial margin matters: agents who are paycheck-to-paycheck respond differently than agents with savings whether or not they hold crypto -- [ ] The scarcity dynamic shows up in reasoning: agents should understand they're buying fractions, not whole coins, and that selling is harder than buying -- [ ] The Week 9-10 stablecoin crisis affects agents differently depending on whether they hold stablecoins, DeFi positions, or just Bitcoin -- [ ] `unexpected_consequence` surfaces cascading effects — community-level dynamics, relationship impacts, local economic effects -- [ ] No more than 20% of agents give near-identical responses in any given week -- [ ] Agents who don't hold crypto aren't invisible — their experience of watching from the sidelines is a valid and important part of the simulation - ---- - -## Pipeline Validation: Every Step Before Simulation - -**CRITICAL: Do NOT skip validation between pipeline stages.** Each stage depends on the quality of the previous one. A bad spec produces bad personas. Bad personas produce unrealistic agents. Unrealistic agents produce meaningless simulation results. Validate aggressively at every step and STOP the pipeline if something is wrong. Fixing upstream is always cheaper than re-running everything. - -The pipeline stages are: **Spec → Scenario → Persona → Sample → Network → Simulate** - -Every stage has a validation gate. If the gate fails, fix and re-run that stage before proceeding. - -### Gate 1: After `extropy spec` — Is the population definition realistic? - -**What to do:** -1. Run `extropy validate` on the generated spec YAML file (if available) -2. Open the spec YAML file directly and read it end-to-end -3. Have an LLM agent review the spec file and answer the checklist questions below - -**What to check:** -- [ ] **All attribute dimensions present**: Every dimension from the spec prompt is represented in the YAML. For our enriched national spec, that's 15+ dimensions including the 5 electoral ones (2024 vote, district competitiveness, midterm turnout propensity, issue salience, approval direction). If any are missing, the spec is incomplete. -- [ ] **Distribution realism**: Income brackets, age ranges, geographic splits roughly match US Census data. Spot-check: ~20% rural, ~30% bachelor's degree+, median income ~$75K, ~60% white, ~13% Black, ~19% Hispanic. If the spec has 50% college graduates or 5% rural, it's wrong. -- [ ] **Correlation structure encoded**: The spec should explicitly encode or hint at correlations between attributes. Higher education should correlate with higher income and urban residence. Federal employees should cluster in DC metro and military towns. Religious engagement should correlate with rural geography and conservative politics. If every attribute is independently distributed, the population will be unrealistic — you'll get rural investment bankers and urban evangelical farmers in unrealistic proportions. -- [ ] **No degenerate categories**: Every attribute has at least 3-4 meaningful values. No catch-all "Other" bucket exceeding 20%. No single value capturing more than 80% of the population for any attribute. -- [ ] **Behavioral dimensions are real, not filler**: Trust, media ecosystem, tech posture, financial margin — these must have concrete, distinguishable levels, not vague labels. "Medium trust" is useless. "Trusts local institutions but distrusts federal government" is useful. -- [ ] **Electoral dimensions present and realistic**: 2024 vote distribution should roughly match actual results (~49% Trump, ~48% Harris, ~3% third party/didn't vote among voters, plus a chunk of non-voters). Congressional district competitiveness should reflect real 2026 map. Midterm turnout propensity should skew toward "sometimes" and "rarely" — most Americans don't vote in midterms. -- [ ] **No hallucinated statistics**: If the spec cites specific percentages, spot-check 3-4 against known sources (Census, Pew Research, Gallup). LLMs confidently fabricate demographic statistics. - -**If validation fails:** Re-run `extropy spec` with a more specific prompt targeting the gap. Do NOT proceed to persona generation with a weak spec. - -### Gate 2: After `extropy scenario` — Is the scenario properly structured? - -**What to do:** -1. Run `extropy validate` on the generated scenario file (if available) -2. Open the scenario file and read the full text -3. Have an LLM agent review against the Milestones Not Reactions principle - -**What to check:** -- [ ] **Milestones only, no reactions**: Read every timeline event. Does it describe what HAPPENS in the world, or what PEOPLE DO? If any event describes human behavioral responses (e.g., "panic buying ensues," "protests break out," "workers quit en masse"), it's contaminating the simulation. Remove it. The agents produce the behavior. -- [ ] **Correct timeline mode**: Evolving scenarios should use `--timeline evolving`. Non-evolving scenarios (Midterms) should use `--timeline static`. -- [ ] **Horizon matches intent**: Verify `timeline` entries and `simulation.max_timesteps` in `scenario.v1.yaml` (ASI = 6 months, Taiwan = 6 months, BTC = 12 weeks, Midterms = 1 decision timestep). -- [ ] **Events are chronologically coherent**: Month 3 events should not reference or depend on Month 5 events. Each month's events should be logical consequences of the preceding months. -- [ ] **Neutral framing**: The scenario presents facts, not editorialized narratives. It doesn't tell agents how to feel about the events. "TSMC exports drop 70%" is neutral. "The devastating collapse of TSMC exports" is editorialized. -- [ ] **Sufficient detail for agents to reason**: Each milestone should have enough concrete specifics (numbers, names, timelines) that an agent can reason about how it affects their specific life. "The economy gets worse" is useless. "Auto manufacturers halt production lines, consumer electronics prices surge 40-60%" gives agents something concrete to react to based on their own situation. -- [ ] **Outcomes are all categorical or open-ended**: No floats. No lazy booleans. At least 2 open-ended outcomes. Each categorical option should be concrete and distinguishable — an LLM reasoning from a persona should be able to clearly select one option over another. - -**If validation fails:** Edit the scenario file directly to fix issues. Re-run `extropy validate` if available. - -### Gate 3: After `extropy persona` — Is the persona rendering config correct? - -**What `extropy persona` actually does:** It generates a single PersonaConfig YAML — a rendering rulebook that converts agent attributes into first-person narrative. It does NOT generate multiple diverse templates or archetypes. The 5-step LLM pipeline produces: attribute groupings, boolean phrasings ("I own my home" / "I rent"), categorical phrasings ("I voted for Trump in 2024"), relative phrasings (z-score buckets for personality traits), and concrete phrasings (templates for numeric values). One config is applied to all agents — diversity comes from agents having different attribute values, not from different persona templates. - -**What to do:** -1. Read the generated `persona.v1.yaml` file -2. Render 5-10 sample agents through the config and review the output narratives - -**What to check:** -- [ ] **All attributes covered**: Every attribute in the population spec has a phrasing entry. Missing attributes mean agents won't mention those dimensions in their reasoning. -- [ ] **Phrasings are first-person and natural**: Boolean phrasings should read like self-description ("I'm deeply religious" not "Agent has high religiosity"). Categorical phrasings should be conversational, not clinical. -- [ ] **Relative attribute buckets are meaningful**: Psychological traits (openness, neuroticism, trust) should have 5 distinguishable z-score labels. "Much below average" through "much above average" should use scenario-relevant language, not generic labels. -- [ ] **Scenario-relevant attributes get rich phrasings**: For ASI, attributes like `ai_literacy`, `automation_job_vulnerability`, `financial_resilience`, and `techno_optimism` should have detailed, nuanced phrasings — not one-word labels. These are the attributes that drive divergent reasoning. -- [ ] **Extended attributes included**: Scenario-specific attributes added during scenario compilation (e.g., `ai_literacy`, `chronic_illness_household`) must have phrasings, not just the base population attributes. -- [ ] **Sample renders look like real people**: Render a few agents and read the output. Does each narrative sound like a distinct person describing themselves? Or does the phrasing flatten differences? - -**If validation fails:** Re-run `extropy persona` or manually edit the YAML to fix specific phrasings. The config is human-editable. - -### Gate 4: After `extropy sample` — Is the sampled population realistic? - -**What to do:** -1. Query the study database directly: `sqlite3 study.db "SELECT COUNT(*) FROM agents"` to confirm agent count -2. Pull demographic distributions using `extropy query agents -s --to agents.jsonl` (or SQL against `agents.attrs_json`) to inspect attribute values and frequencies -3. Pull 30 random agents and have an LLM review their full profiles for internal consistency -4. Cross-reference key distributions against Census/Pew/Gallup benchmarks - -**What to check:** -- [ ] **Correct agent count**: 5,000 for all studies. If the count is wrong, something failed in sampling. -- [ ] **Demographic distribution matches target**: Age should roughly mirror US adult population (not all 25-35). Race/ethnicity should approximate Census. Income should have a realistic spread with appropriate median. Geography should span all regions with ~20% rural. If any distribution is wildly off, the sample is biased. -- [ ] **No attribute has >80% concentration**: If 85% of agents are "moderate trust in institutions" or 90% are "private sector employment," the sample lacks diversity and the simulation will converge. -- [ ] **Attribute correlations are realistic**: Pull cross-tabulations. Do rural agents actually skew toward lower digital literacy and higher religious engagement? Do high-income agents cluster in urban areas? Do federal employees cluster in DC metro and military towns? If correlations are flat (every attribute independently distributed), the population is unrealistic. -- [ ] **Full behavioral range covered**: The sampled population should span the realistic range of responses to the scenario. For ASI: agents should include tech optimists AND luddites, young flexible workers AND older specialists, financially secure AND paycheck-to-paycheck, urban tech workers AND rural tradespeople. If agents cluster into a narrow band of "moderate professionals," the simulation will converge. -- [ ] **Boring agents included**: Not every agent should be an edge case. The disengaged middle — people who don't follow the news closely, don't have strong opinions, and whose primary concern is paying rent — should be the majority. These "boring" agents' behavior (or inaction) matters most. -- [ ] **30-agent spot check**: Pull 30 random complete agent profiles. Read each one. Does each agent feel like a real, internally consistent person? Or are there nonsensical combinations (e.g., a 19-year-old retiree, a rural Manhattan resident, a crypto day-trader with no investment literacy)? A few oddballs are fine. More than 2-3 out of 30 is a problem. -- [ ] **Scenario-relevant differentiation**: Agents should differ on the attributes that MATTER for this specific scenario. For ASI, the key differentiators are employment sector, education level, financial margin, tech adoption, and meaning/identity sources. For Taiwan, they're employment sector (especially auto/manufacturing/defense), geography, political engagement, and financial margin. -- [ ] **Electoral attributes realistic (for Study 4)**: 2024 vote distribution should roughly match actual election results. Congressional district mapping should include competitive districts. Midterm turnout propensity should have a healthy spread, not all "always votes." - -**If validation fails:** Re-run `extropy sample` with a different seed. If the problem persists, the issue is upstream in the spec. - -### Gate 5: After `extropy network` — Is the social network structure realistic? - -**What to do:** -1. Query network statistics from study.db: total edges, average degree, min/max degree, clustering coefficient if available -2. Pull 10-15 random agents and examine their connections — who are they connected to and why? -3. Have an LLM agent review the network topology description and assess realism - -**What to check:** -- [ ] **Network has edges**: `SELECT COUNT(*) FROM network_edges` should return a non-zero number (or use `extropy query edges -s `). An empty network means agents have no social influence on each other, defeating the purpose of network cascade modeling. -- [ ] **Average degree is reasonable (4-8)**: Real social influence networks have modest connectivity. Average degree below 3 means the network is too sparse for cascades. Average degree above 15 means it's too dense and everyone influences everyone (unrealistic). -- [ ] **Not fully connected or fully disconnected**: The network should have clusters and structure, not be a single giant clique or a set of isolated nodes. Check that there are multiple connected components or at least visible clustering. -- [ ] **Connections make sense**: Pull 10 agents and their connections. Are connected agents plausibly in each other's social circles? Connections should cluster by geography, employment sector, age cohort, religious community, and political alignment — because that's how real social networks work. If a rural evangelical farmer in Texas is connected to an urban tech worker in SF with no shared attributes, the network is random noise. -- [ ] **Homophily exists but isn't total**: Connected agents should be more similar than random pairs, but not identical. Real networks have some cross-cutting ties (the conservative who has a liberal college friend, the rural person with an urban sibling). If every agent is only connected to agents exactly like themselves, the network will produce echo chambers that are too extreme. If connections are purely random, social influence dynamics will be unrealistic. -- [ ] **Degree distribution is not uniform**: Some agents should have more connections than others. Opinion leaders, community organizers, and social media influencers should have higher degree. Isolated individuals should have lower degree. If every agent has exactly 6 connections, the network is artificially regular. -- [ ] **LLM REVIEW MANDATORY**: Have an LLM agent describe the overall network topology in plain language and assess whether it would support realistic social influence dynamics for the specific scenario being run. - -**If validation fails:** Re-run `extropy network` with a different seed or adjusted parameters. If the network structure is fundamentally wrong (e.g., no clustering, random connections), the issue may be in how the network builder uses agent attributes. - -### Gate 6: After `extropy simulate` — Are the results meaningful? - -**What to do:** -1. Run `extropy simulate -s ` (for evolving studies, use `--early-convergence off` to guarantee full timeline execution) -2. Run `extropy results -s ` to see aggregate outcome distributions -3. Run `extropy results -s segment ` for key demographic segments -4. Export full elaborations CSV and spot-check 20 agents' reasoning traces -5. Compare distributions across timesteps for evolving scenarios - -**What to check:** -- [ ] **Results exist and are non-empty**: Basic sanity — the simulation produced output for all agents across all timesteps. -- [ ] **For evolving scenarios: outcomes CHANGE across timesteps**: If 60% of agents say "no change" in Month 1 and 60% still say "no change" in Month 6, the simulation isn't working. Events should cause measurable shifts in outcome distributions over time. -- [ ] **Agents reference only events they've seen**: A Month 2 agent should NOT mention Month 4 events. If they do, the evolving simulation is feeding future events into past timesteps. This is a critical bug. -- [ ] **Reasoning traces are first-person and differentiated**: Read 20 random agents' open-ended responses. Each should read like a distinct person narrating their own experience. If they read like third-person summaries or generic commentary, the persona grounding isn't working. -- [ ] **No more than 20% near-identical responses**: In any given timestep, if more than 20% of agents produce essentially the same response (same categorical selections, similar reasoning), central tendency bias is dominating. The simulation isn't capturing real population diversity. -- [ ] **Demographic segmentation produces expected directional splits**: When you segment by relevant attributes, you should see meaningful differences. For ASI: tech workers should respond differently than retirees. For Taiwan: agents near auto plants should be more economically affected than agents in non-manufacturing regions. If every segment looks the same, the simulation is ignoring agent attributes. -- [ ] **`unexpected_consequence` surfaces novel insights**: The open-ended fields should contain responses that go beyond what the categorical outcomes capture. If every open-ended response just restates the categorical selection, the open-ended field isn't adding value. -- [ ] **Intent-to-action sanity check**: If 80% of agents say they've "completely changed their daily routine" by Month 2, that's likely LLM enthusiasm bias. Real populations are slower to change. Apply skepticism to extreme response distributions. - ---- - -## Execution Timeline - -| Day | Activity | -|-----|----------| -| **Day 1** | Generate Spec A (National) and Spec B (Alaska). Validate both thoroughly. | -| **Day 1** | Start Study 1 pipeline (ASI): persona → sample → network → simulate | -| **Day 2** | Review Study 1 results. Start Studies 2 (Taiwan Crisis) and 3 (BTC) in parallel (shared Spec A population). | -| **Day 3** | Review Studies 2 and 3. Start Study 4a (House Control) — same Spec A population, new scenario. Start Study 4b (Alaska Senate) — Spec B pipeline: persona → sample → network → simulate. | -| **Day 4** | Review Study 4a and 4b results. Translate to Kalshi predictions for House control and Alaska Senate. Begin drafting blog posts. | -| **Day 5** | Publish Study 1 (ASI) blog post — most viral, leads with strongest showcase. | -| **Day 6-7** | Publish remaining showcase blogs (Taiwan Crisis, BTC). | -| **Day 7** | Publish Midterms prediction blog (House + Alaska) with Kalshi positions. **Place initial bets.** | -| **Monthly** | Re-run Studies 4a and 4b with updated scenario context. Publish updated predictions. Adjust Kalshi positions. | -| **Nov 3** | Midterm elections. Results come in. | -| **Nov 4** | Publish results comparison — win or lose. Honesty > hiding misses. | - ---- - -## Key Risks - -**Intent-to-action gap:** LLM agents overstate intent. Apply 10-15% discount on all behavioral predictions. For midterm turnout specifically: lower salience than presidential years, forgetting to vote, not researching downballot races. For Alaska specifically: rural bush community turnout faces real logistical barriers (distance, weather, transportation) that LLM agents won't naturally account for. - -**LLM systematic bias:** o5-mini (and all current LLMs) exhibit social desirability bias and reduced variance. Distributions will be artificially narrow and systematically shifted. This means Extropy may underestimate tail outcomes and overstate moderate/centrist responses. - -**Knowledge cutoff:** o5-mini may not know about events after its training cutoff. The research phase must inject current political context (2025 election results, economic data, recent developments) into the scenario. For Alaska, candidate-specific context (Sullivan's voting record, Peltola's campaign messaging) must be explicitly provided in the scenario prompt since it may not be in training data. - -**9-month drift:** A lot changes between February and November. The initial prediction is a baseline. Monthly re-runs are essential. The bet is not "predict November from February" — it's "build a model that gets more accurate over time and bet when the edge is clearest." - -**Alaska sample size:** 1,000 agents for Alaska is adequate for aggregate prediction but thin for sub-demographic analysis. Native communities (~160 agents), military families (~100 agents), and fishing communities (~80 agents) are small sub-groups. Directional patterns will be visible but precise margins within these groups should be treated with caution. - -**Ranked-choice modeling:** Extropy has not previously modeled ranked-choice voting. The second-choice outcome is novel and may produce less reliable results than first-choice voting intent. Validate RCV dynamics carefully against known patterns from Alaska's 2022 special election. - -**Cross-study reinforcement:** Study 2 (Taiwan Crisis) and Studies 4a/4b (Midterms) would be linked if a real Taiwan crisis occurred — it would reshape the electorate. Keep the studies independent unless explicitly combining them. diff --git a/docs/simulation-experience-gaps.md b/docs/simulation-experience-gaps.md deleted file mode 100644 index bac1754..0000000 --- a/docs/simulation-experience-gaps.md +++ /dev/null @@ -1,1053 +0,0 @@ -# Simulation Agent Experience — Gap Analysis - -## Overview - -The current simulation treats agents as reasoning machines processing bullet-point data sheets. The goal is for agents to experience each timestep as a lived day — with named people, temporal awareness, social context, and narrative texture. This document catalogs every gap between what exists and what's needed. - ---- - -## ISSUE 1: Population ↔ Network Disconnect - -**What exists:** -- Population sampling produces agents with: `marital_status`, `household_size`, `household_labor_dependency`, `state`, `occupation_sector`, `urban_rural`, `age`, `gender`, `race_ethnicity`, `religious_affiliation` -- Network generation creates edges based on attribute similarity (embedding distance) -- Edge types are generic: "acquaintance", "neighbor" — derived from similarity buckets, not social roles - -**What's broken:** -- Agent with `marital_status: cohabiting` and `household_size: 5` has NO partner edge in the network -- Two agents in the same `state` + same `occupation_sector` are not linked as coworkers -- Two agents in the same `state` + `urban_rural: suburban` with similar `age` children aren't linked as "school parent friends" -- Network edge types ("acquaintance", "neighbor") are assigned by similarity threshold, not by actual social relationship inference -- An agent's strongest influence (their partner) might not even be in their network at all - -**What population attributes COULD drive network edges but don't:** - -| Attribute | Could create edge type | -|-----------|----------------------| -| `marital_status` + `household_size` + `state` | partner (match two cohabiting/married agents in same state, compatible age/gender) | -| `occupation_sector` + `state` | coworker | -| `state` + `urban_rural` + similar `age` | neighbor | -| `religious_affiliation` + `state` | congregation member | -| kids' implied school age + `state` + `urban_rural` | school parent network | -| `political_orientation` + `state` | political community | -| `social_media_usage` + shared interests | online contact | - -**What this means:** The network is currently a homophily graph (similar people connect). It should be a **social role graph** (people connect because they're partners, coworkers, neighbors, etc.). The attributes to do this already exist in the population. They're just ignored during network generation. - ---- - -## ISSUE 2: Agents Have No Names - -**What exists:** -- Agent ID is `agent_0020` -- No first name, last name, or any human identifier -- Nowhere in the pipeline (sampling, persona, network, simulation) does a name get generated -- The persona prompt says "You are a 43-year-old male" — no name - -**What's broken:** -- Agent can't think of themselves as a person with a name -- Agent can't refer to peers by name — only "someone in your network" or "an acquaintance" -- The prompt feels like a survey, not a lived experience -- Names carry cultural signal — "Travis" vs "Darnell" vs "Alejandro" vs "Wei" tells you something about the person. The LLM uses this for contextual reasoning. - -**What's needed:** -- Name generation based on demographics: `gender`, `race_ethnicity`, `age` (generational naming patterns), `religious_affiliation`, `state` (regional patterns) -- Names assigned at sampling time or persona generation time -- Stored as agent attribute (`first_name`) so it persists across the pipeline -- Partner/family member names also generated with demographic consistency (same cultural background) - -**Complication:** -- Name generation needs to be statistically appropriate — not stereotyping, but reflecting actual name frequency distributions by demographic cohort -- Could use census/SSA baby name data filtered by decade of birth + ethnicity -- Or use an LLM call at persona generation time to pick a culturally appropriate name -- 2000 agents = 2000 names needed. LLM call per agent is expensive. Census data approach is better. - ---- - -## ISSUE 3: Family Members Don't Exist - -**What exists:** -- `household_size: 5` — a number -- `marital_status: cohabiting` — implies a partner -- `household_labor_dependency: one other` — implies partner works -- No children attributes, no parent attributes, no dependent details - -**What's broken:** -- Travis has 3 kids but they have no names, ages, genders, or school status -- His partner is either another agent (not linked) or doesn't exist in the sim at all -- When Travis reasons about ASI, he can't think "Tyler's about to graduate into this" because Tyler doesn't exist -- The persona says "household_size: 5" but the LLM has to imagine who those 4 other people are every single time, inconsistently - -**What's needed:** -- **Partner linking:** If `marital_status` is married/cohabiting AND another agent in the population matches (compatible demographics, same state), link them as partner edge. This partner IS a full agent with their own reasoning. -- **Dependent generation:** Based on `household_size` minus adults, generate NPC children/dependents: - - Number of kids = `household_size` - (1 if single, 2 if partnered) - - Ages inferred from agent's age + life_stage (middle_aged_adult with household_size 5 → kids probably 8-17) - - Names from same cultural background as parent - - School status from age (5-17 = in school, grade inferred) - - These are NOT agents. They're persona context attached to the parent agent. -- **Elder dependents:** If `household_labor_dependency` implies elderly parent, generate that too - -**Where this lives:** Generated during `extropy persona` or at simulation init (`generate_persona()`). Stored as part of the agent's persona text or as structured metadata. - ---- - -## ISSUE 4: No Temporal Awareness - -**What exists:** -- `timestep` integer tracked everywhere internally -- `timestep_unit` defined in scenario YAML (e.g., "hour", "day", "week") -- Memory traces have `timestep` field but it's never shown in prompt -- Exposures have `timestep` but never shown - -**What's broken:** -- Agent doesn't know what day it is -- Agent doesn't know how long ago they first heard about the event -- Agent can't reason about urgency ("it's been a week and still no government response") -- Agent can't reason about fatigue ("I've been hearing about this for days") -- Agent can't reason about trajectory ("things are getting worse" vs "things are stabilizing") -- Memory traces say "Previously, you thought:" with no temporal anchor — could be 1 hour ago or 1 month ago - -**What's needed:** -- Current timestep + unit injected into prompt: "It is Day 3 since the announcement" -- Memory traces timestamped: "2 days ago, you thought: ..." -- Exposure history timestamped: "On Day 1, you saw this on the news. On Day 2, 17 people in your network talked to you about it." -- Optional: scenario can define a "calendar" — e.g., "Day 1 = Monday March 3, 2026" so agents reason about weekdays, work schedules, etc. - ---- - -## ISSUE 5: Exposures Are Meaningless Lines - -**What exists:** -- ExposureRecord has: `channel`, `source_agent_id`, `credibility`, `timestep` -- Scenario defines channels with: `name`, `description`, `reach`, `credibility_modifier` -- Network exposures carry `source_agent_id` and edge relationship type - -**What the prompt shows:** -``` -- You heard about this via mainstream_news_media -- Someone in your network told you about this -- Someone in your network told you about this -(x17) -``` - -**What's broken:** -- "You heard about this via mainstream_news_media" — what does that mean experientially? Did you watch CNN? Read the NYT on your phone? See a push notification? -- "Someone in your network told you about this" x17 is noise. The agent can't distinguish 1 person from 100. -- Channel descriptions exist in the scenario but never reach the prompt -- Credibility scores exist but are invisible -- No aggregation — "37 people in your network discussed this with you today" vs 37 identical lines - -**What's needed:** -- Channel descriptions rendered as experiential moments: "You saw a CNN segment about this" / "Your X feed was full of posts about this" / "A coworker brought it up at lunch" -- Network exposures aggregated and named: "12 people in your network brought this up today, including your coworker Marcus and your neighbor Denise" -- Credibility rendered as trust framing: "a highly credible news report" vs "a social media post" vs "a rumor from a friend of a friend" -- Exposure count surfaced as social pressure signal: "This is the 4th day in a row people around you are talking about this" - ---- - -## ISSUE 6: Peer Opinions Are Anonymous and Shallow - -**What exists:** -- PeerOpinion has: `agent_id`, `relationship`, `public_statement`, `sentiment`, `credibility` -- Engine gets top 5 neighbors by adjacency -- Edge type stored as `relationship` field - -**What the prompt shows:** -``` -- A acquaintance of yours says: "Don't wait — cut costs..." -- A acquaintance of yours seems strongly opposed -``` - -**What's broken:** -- "A acquaintance" — no name, no context, no demographic info -- Same relationship type for everyone — almost all edges are "acquaintance" because the network doesn't do social role assignment -- No peer conviction shown — agent can't tell if the peer is certain or wavering -- Only 5 peers shown — agent with 50+ connections sees a tiny slice -- No disagreement/consensus signal — if all 5 say the same thing, the agent doesn't know if that's representative -- No peer demographic context — "your 54-year-old coworker who's been in services for 30 years" hits different than "some acquaintance" - -**What's needed:** -- Named peers with relationship context: "Your coworker Darnell (36, also in services) says: ..." -- Peer conviction visible: "... (he's absolutely certain about this)" -- More than 5 peers OR aggregated summary: "Most of your close contacts are anxious and talking about practical survival steps" -- Disagreement flagged: "Your contacts are split — some are panicking, others think it's overblown" -- Peer demographics matter: "Your neighbor Lisa, who works in healthcare, isn't as worried — she thinks her job is safe" - ---- - -## ISSUE 7: No Aggregate / Public Sentiment - -**What exists:** -- `TimestepSummary` stores: `average_sentiment`, `average_conviction`, `sentiment_variance`, `position_distribution`, `exposure_rate` -- Computed every timestep in `compute_timestep_summary()` -- Used for stopping conditions and post-hoc analysis only - -**What the prompt shows:** -- Nothing. Zero aggregate data reaches the agent. - -**What's broken:** -- Agent can't reason about social proof ("everyone's panicking" vs "I seem to be the only one worried") -- Agent can't reason about consensus ("the general mood is..." vs "opinions are divided") -- Agent can't reason about trend ("things are calming down" vs "panic is growing") -- In reality, people sense the aggregate mood through media, social feeds, workplace vibe - -**What's needed:** -- Aggregate sentiment framed as vibes, not numbers. No agent walks around thinking "sentiment is -0.91." They think "everyone seems scared" or "people are weirdly calm about this" or "my feed is a mess." The rendering must be fuzzy and experiential: - - NOT: "The general mood is -0.91" - - YES: "Everyone around you seems deeply anxious. The mood at work is tense. Your social media feed is full of people panicking." -- Position distribution as vague social awareness, not pie charts: - - NOT: "53% are upskilling, 17% doubling down" - - YES: "Most people you talk to are scrambling to learn new skills. A few are stubbornly sticking to their current path." -- Trend as gut feeling, not data: - - NOT: "Sentiment decreased 0.03 since yesterday" - - YES: "The panic seems to be leveling off" or "If anything, people are getting more scared, not less" -- Source should be the agent's **local network neighborhood**, not global population — people sense mood from who they actually interact with, not from omniscient aggregate data - ---- - -## ISSUE 8: Memory is Too Thin and Unlabeled - -**What exists:** -- 3 memory entries max per agent (sliding window) -- Each entry: `timestep` (int), `sentiment` (float), `conviction` (float), `summary` (1 sentence) -- `raw_reasoning` stored in agent_states but never shown back to agent - -**What the prompt shows:** -``` -- Previously, you thought: "No change — save, learn AI, backup income." (you felt *firm* about this) -(x3, nearly identical) -``` - -**What's broken:** -- 3 entries is too few — by day 7, the agent has lost memory of days 1-4 -- No timestamps — "Previously" could mean yesterday or last month -- Only summary shown, not the actual reasoning -- Sentiment not shown — agent can't see "I was more negative yesterday than today" -- No sense of consistency or change — "I've thought the same thing for 5 days" is meaningful but invisible -- The summaries converge to identical text because the agent keeps saying the same thing - -**What's needed:** -- **Full reasoning history**, not summaries. The agent should see their actual reasoning trace from each timestep they were reasoned, not a compressed 1-sentence summary. This is already stored as `raw_reasoning` in agent_states — just surface it. -- **Entire history**, not sliding window of 3. If an agent reasoned on days 1, 3, 5, 6, 7 — they should see all 5 entries. The 3-entry cap loses critical early reactions. -- Timestamped: "On Day 2, you thought: ..." with actual elapsed time context -- Sentiment + conviction visible as felt experience: "You were angry and sure of yourself" not "sentiment: -0.8, conviction: 0.7" -- Consistency signal emergent from seeing the full trace — if you read 5 entries that all say the same thing, you know you've been consistent. No need for a separate "you've held this view for N days" signal. -- Token budget concern: full reasoning × many timesteps = lots of input tokens. Mitigation: truncate each entry to first 3-4 sentences if needed, but always show ALL timesteps, never drop history. - ---- - -## ISSUE 9: Private vs Public is Imposed, Not Reasoned - -**What exists:** -- Pass 1 asks for one reasoning + one public statement -- Engine then applies bounded confidence, flip resistance, and friction rules to mechanically split into public/private positions -- Agent never gets asked "what would you say publicly vs what do you actually think?" - -**What's broken:** -- People consciously manage public vs private personas — especially on controversial topics -- Travis might tell his coworkers "yeah I'm upskilling" while privately thinking "I'm fucked and nothing will help" -- The current system imposes this gap mechanically instead of letting the agent reason about it - -**What's needed:** -- Pass 1 should explicitly ask: "What would you tell people?" AND "What do you actually think privately?" -- Let the LLM generate the divergence based on the agent's personality (agreeableness, extraversion, social pressure) -- Remove or reduce the mechanical post-hoc private/public splitting -- More expensive (more output tokens) but more authentic - ---- - -## ISSUE 10: The Prompt Structure is a Data Sheet, Not a Narrative - -**What exists:** -``` -[System instruction: You ARE this person] -[Persona: structured attribute list] -[Event: content block] -[Exposures: bullet list] -[Memory: bullet list] -[Peer opinions: bullet list] -[Instructions: respond as JSON] -``` - -**What's broken:** -- Reads like a form, not an experience -- No narrative arc — morning → work → evening -- No environmental texture — phone, TV, kitchen table conversation -- No emotional continuity — starts fresh each timestep - -**What's needed:** -- The prompt should read like a day's narration -- Scenario-defined "day template" that structures exposures into life moments: - ``` - Morning: You wake up and check your phone. [social media exposures here] - Work: You get to [workplace]. [workplace exposures + coworker opinions here] - Evening: You're home with [family]. [family/partner opinions + aggregate mood here] - ``` -- This template is generalizable — different scenarios define different day rhythms -- The agent's demographic drives which template applies (employed → has work section, retired → no work, student → school section) - ---- - -## ISSUE 11: Pass 2 Classification is Disconnected - -**What exists:** -- Pass 2 gets ONLY the reasoning text from Pass 1 -- No persona, no exposures, no peer context - -**What's broken:** -- Classification without context can misinterpret reasoning -- "I'm going to learn AI tools" could be "aggressive_upskilling" or "double_down_current_path" depending on whether the person is switching careers or enhancing their current one -- The agent's persona should inform classification - -**What's needed:** -- Pass 2 should receive: reasoning text + agent's core demographic context + outcome descriptions -- Or: merge Pass 1 and Pass 2 into a single call — more tokens but eliminates disconnection - ---- - -## ISSUE 12: Channel ≠ Experience - -**What exists:** -- Channels defined in scenario: `mainstream_news_media`, `social_media_feeds`, `workplace_channels` -- Each has `description` and `credibility_modifier` -- Agent sees only the channel name label - -**What's broken:** -- "mainstream_news_media" is not an experience. Opening CNN on your phone while eating breakfast IS. -- Different agents should experience the same channel differently based on demographics: - - `primary_news_source: social media` + `social_media_usage: heavy` → sees it on X/TikTok first - - `primary_news_source: television` → sees it on cable news - - `digital_literacy: basic` → might hear about it from someone else before seeing it online -- Credibility should be experiential: "a well-sourced NYT article" vs "a viral tweet with no source" - -**What's needed:** -- Channel rendering as a function of (channel_config × agent_demographics) -- Scenario defines channel templates with demographic variants -- Or: LLM-generated experiential rendering at prompt build time (more expensive but more natural) - ---- - -## Priority Order - -The biggest structural gaps are foundational — everything else builds on top: - -1. **Issue 1** — Population ↔ Network (social role edges from attributes) -2. **Issue 2** — Agent names (culturally appropriate, demographic-aware) -3. **Issue 3** — Family members (partner linking + NPC dependents) -4. **Issue 13** — Agent interactions (conversations, social posts, actions) -5. **Issue 4** — Temporal awareness (timestep + unit in prompt) -6. **Issue 10** — Narrative prompt structure (day template) -7. **Issue 14** — Cognitive architecture (emotions, attention, memory types, self-awareness) -8. **Issue 5** — Rich exposures (experiential, aggregated, credibility-aware) -9. **Issue 6** — Named peer opinions (demographics, conviction, consensus signals) -10. **Issue 7** — Aggregate sentiment (public mood surfaced to agents) -11. **Issue 8** — Full memory (entire history, full reasoning traces, timestamped) -12. **Issue 12** — Channel × demographics rendering -13. **Issue 9** — Private vs public reasoning (agent-driven, not mechanical) -14. **Issue 11** — Pass 2 merged into Pass 1 - ---- - -## Implementation Approach: Deterministic Systems + Conversation Calls - -Everything except conversations is deterministic — no extra LLM calls. Conversations add ~3 fast-model calls per pair per timestep. - -### Names (Issue 2) -- **Data source:** SSA baby name data (public, by year + gender) + Census surname data (by ethnicity) -- **Method:** Agent's `age` → birth year → decade. Filter names by decade + `gender` + `race_ethnicity`. Weighted random pick from frequency distribution. -- **Cost:** One-time generation at sampling. ~50KB of bundled CSV data. Zero API calls. - -### Family NPCs (Issue 3) -- **Partner:** Match two agents with compatible `marital_status` + `state` + age range + gender. Create "partner" edge in network. Partner is a real agent — already exists. -- **Kids:** `household_size` - adults = kid count. Ages sampled from plausible range given parent's age. Names from same demographic pool as parent. School grade from age. All deterministic rules. -- **Storage:** Structured metadata on agent (JSON field or persona context). - -### Temporal Framing (Issue 4) -- **Method:** String formatting. `f"It is {timestep_unit.title()} {timestep + 1} since {event_summary}"` -- **Memory timestamps:** `f"{current_timestep - memory.timestep} {timestep_unit}s ago, you thought:"` - -### Aggregate Sentiment (Issue 7) -- **Method:** Lookup tables mapping float ranges to natural language. -- **Sentiment → mood:** `> 0.6` = "optimistic", `> 0.2` = "cautiously hopeful", `> -0.2` = "uncertain", `> -0.6` = "anxious", else "deeply fearful" -- **Variance → consensus:** `< 0.05` = "everyone seems to agree", `< 0.15` = "most people feel similarly", else "opinions are all over the place" -- **Trend:** Compare last 2 timesteps. Diff > 0.1 = "getting worse/better". Diff < 0.1 = "about the same as yesterday." -- **Scope:** Computed from agent's local network neighborhood, not global population. - -### Exposure Aggregation (Issue 5) -- **Method:** Group exposures by (channel, timestep). Count network sources per timestep. Render as: - - Channels: "You saw this on the news and it was all over your social media feed" - - Network: "14 people in your network brought it up today, including your coworker Darnell and your partner Lisa" - - Cumulative: "This is the 4th day in a row people around you are talking about this" - -### Channel → Experience (Issue 12) -- **Method:** Template lookup. Scenario defines channel templates. Agent's `primary_news_source` + `digital_literacy` + `social_media_usage` select the variant. -- **Example templates per channel:** - ``` - mainstream_news_media: - if primary_news_source == "television": "You saw a news segment about this on TV" - if primary_news_source == "social media": "A news article showed up in your feed" - if digital_literacy == "basic": "Someone at work showed you a news article" - default: "You read about this in the news" - social_media_feeds: - if social_media_usage == "heavy": "Your feed has been nonstop about this" - if social_media_usage == "moderate": "You saw several posts about this" - default: "You noticed some posts about this online" - ``` -- ~10-20 templates per channel. Bundled in scenario YAML or in a defaults file. - -### Peer Rendering (Issue 6) -- **Method:** String formatting with peer's name, age, relationship, sector, conviction label. -- `f"Your {relationship} {name} ({age}, {sector}) says: \"{statement}\" — {conviction_label}"` -- **Consensus signal:** Count peer sentiments. If >80% same direction = "Most of your contacts feel the same way." If mixed = "Your contacts are split on this." - -### Narrative Day Template (Issue 10) -- **Method:** Scenario-defined phase templates. Engine slots data into phases: - ``` - phases: - morning: - condition: "always" - template: "You wake up and check your phone." - slots: [social_media_exposures, aggregate_mood] - work: - condition: "employment_status in ['employed full-time', 'employed part-time']" - template: "You head to work at your {occupation_sector} job." - slots: [workplace_exposures, coworker_opinions] - school: - condition: "school_enrollment != 'not enrolled'" - template: "You go to class." - slots: [peer_opinions] - evening: - condition: "always" - template: "You're home for the evening." - slots: [family_context, partner_opinion, network_opinions, memory_trace] - ``` -- Agent demographic attributes determine which phases render. The engine fills slots with pre-formatted data. - -### Full Memory (Issue 8) -- **Method:** Remove sliding window cap. Store all reasoning entries. Surface `raw_reasoning` (truncated to 3-4 sentences if needed) with timestep labels. -- **Token budget:** If 10 timesteps × 3 sentences = ~300 tokens of memory. Manageable. - -### Private vs Public (Issue 9) -- **Method:** Modify Pass 1 schema to ask for both public and private responses explicitly. Remove or reduce post-hoc mechanical splitting. -- **Schema addition:** `"private_thought": "What you actually think but wouldn't say out loud"` - -### Pass 2 Enrichment (Issue 11) -- **Method:** Append agent's core demographics (age, sector, education) to Pass 2 prompt alongside reasoning text. - ---- - -## LLM Call Budget - -- **Reasoning:** 1 call per agent per timestep (merged Pass 1 + Pass 2 into single call) -- **Conversations:** ~3 calls per conversation pair (fast model). ~30% of agents initiate per timestep. -- **Everything else** (names, family NPCs, temporal framing, aggregate mood, exposure rendering, channel templates, peer rendering, day narrative): zero LLM calls — all deterministic systems. -- **Net change vs current:** Current = 2 calls/agent (Pass 1 + Pass 2). New = 1 call/agent + ~0.9 conversation calls/agent on average. Roughly same total call volume, shifted from strong model to fast model for conversations. - ---- - -## Generalization Across All Study Types - -This isn't ASI-specific. Every study type has a fundamentally different social context, and the system must handle all of them without per-study custom code. - -### How Different Studies Play Out - -**Breaking crisis (ASI, bud-light-boycott):** -- Day 1 is a shock wave — everyone hears at once via news/social -- Network floods immediately — everyone's talking about it -- Strong opinions form fast, echo chambers harden -- Temporal awareness matters: "It's been 3 days and still no government response" -- Key relationships: coworkers, social media circles, politically aligned friends - -**Policy/regulatory change (london-ulez, nyc-congestion-pricing, ma-sports-betting):** -- Slow rollout — people hear at different times depending on how directly it affects them -- Local geography matters enormously — inside vs outside the zone -- Practical impact matters — "how much will this cost ME" -- Key relationships: neighbors, local community, commuters, local government -- Day rhythm: commute, local news, council meetings, seeing the physical infrastructure change - -**Corporate product change (netflix-password-sharing, netflix-ad-tier, apple-att-privacy):** -- Personal discovery — "I tried to log in and it didn't work" -- Family/household connections dominate — who shares the account, who pays -- Not emotional outrage but practical annoyance or adaptation -- Key relationships: family members, whoever's account you mooch off of -- Day rhythm: using the product, texting family, checking Reddit for workarounds - -**Cultural/lifestyle shift (plant-based-meat, reddit-api-protest):** -- Slow burn — nobody panics, it comes up casually -- Identity and community matter — "am I the kind of person who eats this?" -- Social influence is peer-based, not media-driven -- Key relationships: friend groups, dining companions, online communities -- Day rhythm: grocery shopping, cooking dinner, casual conversation, seeing ads - -### What Must Be Scenario-Configurable - -| Element | Why it varies | Example | -|---------|--------------|---------| -| **Day phases** | A crisis has "check phone → panic → work → evening news." A product change has "try to use product → fail → text someone → search online." | ASI: morning/work/evening. Netflix: discover/react/adapt. | -| **Channel templates** | "Social media feed is blowing up" (crisis) vs "You saw an ad while browsing" (slow burn) | Same channel, different intensity based on scenario type | -| **Relationship weights** | Family dominates for household products. Coworkers dominate for workplace AI fears. Community dominates for local policy. | Netflix: family edges weighted highest. ASI: coworker edges weighted highest. | -| **Temporal framing** | "Day 1 since the announcement" (crisis) vs "It's been a few weeks since Netflix changed its policy" (gradual rollout) | Crisis = urgent clock. Policy = calendar. Product = "eventually you noticed." | -| **Aggregate mood source** | Breaking news → media/social sentiment visible. Local policy → neighborhood sentiment. Product change → your household. | ASI: global/media mood visible. ULEZ: local neighborhood mood. Netflix: household mood. | -| **Exposure rhythm** | Crisis = flood on day 1, taper. Policy = steady drip. Product = triggered by usage. | ASI: 99 network exposures day 2. Netflix: 2-3 family members over a week. | - -### How The System Handles This - -The scenario YAML already defines channels, exposure rules, and timestep configuration. Extending it to include: - -1. **Day phase templates** — scenario declares what a "day" looks like for this study. Defaults provided for common patterns (crisis, policy, product, cultural). -2. **Channel experience templates** — scenario declares how each channel feels to different demographics. Defaults provided for common channels (news, social media, workplace, family). -3. **Relationship priority** — scenario declares which edge types carry the most weight for this topic. Network generation uses this to emphasize the right connections. -4. **Mood scope** — scenario declares whether agents sense global public mood, local network mood, or household mood. -5. **Temporal style** — scenario declares how time feels: urgent countdown, calendar dates, or vague "it's been a while." - -All of these have sensible defaults. An existing scenario YAML with none of these new fields still works — it just gets the default day template, default channel rendering, default relationship weights. New scenarios can customize everything. - -### No Backward Compatibility - -This is a breaking change. The old prompt style (bullet-point data sheets, anonymous peers, no temporal awareness) is deprecated entirely. All studies get the new experience. Existing scenario YAMLs will need to be updated with day templates, channel experience configs, and relationship priorities — or sensible defaults kick in that are still vastly better than the current system. - ---- - -## ISSUE 13: Agents Can't Interact With Each Other - -**What exists:** -- Agents reason in isolation. No agent ever talks to another agent. -- Agent A produces a `public_statement`. Next timestep, Agent B sees it as a peer opinion. One-way broadcast. -- Agent B never responds to Agent A. Agent A never knows B heard them. -- 2000 people thinking alone in rooms, occasionally seeing post-it notes from each other. - -**What's broken:** -- Real life is conversations, not monologues. Travis and Lisa argue about the budget. Darnell and Travis talk at break. Marcus texts Travis. These are back-and-forth exchanges that change both people. -- Social influence happens through dialogue, not broadcast. You push back, the other person doubles down or concedes, you update your view based on how the conversation went. -- Currently there's no way for an agent to choose who they engage with. The engine decides everything. - -**What's needed:** - -### Agent Actions: Post + Talk - -The reasoning output expands to include actions the agent chooses to take: - -```json -{ - "reasoning": "...", - "sentiment": -0.9, - "conviction": 85, - "private_thought": "...", - "actions": [ - {"type": "post", "platform": "x", "content": "This AI thing is terrifying..."}, - {"type": "talk_to", "who": "Lisa", "topic": "We need to look at our budget"}, - {"type": "talk_to", "who": "Darnell", "topic": "How's that AI course?"} - ] -} -``` - -- **`post`** — agent posts on social media. Content feeds into aggregate public discourse. Other agents see it as part of their feed's mood next timestep. Zero extra LLM calls — it's just output text stored by the engine. -- **`talk_to`** — agent initiates a conversation with a named contact. Engine resolves this into an actual back-and-forth exchange. - -The agent's prompt shows who's available to talk to, gated by network edges but presented as social reality: - -``` -People in my life right now: -- Lisa (my partner, she's home with me tonight) -- Tyler, Kayla, Mason (my kids, they're home) -- Darnell (my coworker, I'll see him tomorrow at work) -- Marcus (my neighbor, I could text him) -- Patricia (I know her online, I could DM her) -``` - -Availability is contextual to the day phase. During WORK, coworkers are reachable face-to-face. During EVENING, family. Online contacts are reachable anytime but lower influence (text vs in-person). - -### Real Conversations (Not Fake Responses) - -When Travis says `talk_to: Lisa`, the engine runs an actual multi-turn exchange. Both agents are real — Lisa has her own state, her own fears, her own reasoning. No faking her response. - -A conversation is 2-3 turns: - -``` -Travis: "Lisa, we need to sit down and look at our budget. I've been -thinking about this all day." -Lisa: "I know. I've been looking at it. We have one month of savings. -That's it. I don't want to hear about AI courses right now — we need -cash." -Travis: "...yeah. Okay. Budget first. But I still think I need to -learn something." -``` - -Both agents' states update based on the conversation outcome. Lisa might shift Travis's priorities. Travis might make Lisa less scared. Or they might entrench further. - -### Conflict Resolution: Priority Queue + Sequential - -Multiple people can want to talk to the same person in the same timestep. All conversations happen within the SAME timestep — nothing gets bumped to the next day. - -Resolution: -1. **Priority by edge weight.** Strongest relationship goes first. Partner > close friend > coworker > acquaintance. -2. **Sequential within conflicts.** Travis↔Lisa resolves first. Lisa's state updates. Then Darnell↔Lisa resolves with Lisa's updated state. Both happen in the same timestep. -3. **Parallel across non-conflicting pairs.** Travis↔Lisa and Marcus↔Keisha have no overlap — they run simultaneously. - -This means conflicting conversations are slightly more expensive (sequential instead of parallel) but always resolve within the same timestep. - -### Public Discourse: Social Posts - -Agent posts on X/Instagram/Reddit feed into a public discourse layer: -- Posts are stored per timestep -- Other agents see aggregated public discourse as part of their feed next timestep -- The aggregate isn't individual posts — it's the mood/vibe: "Your X feed is a mix of panic and dark humor. Most posts are about job security." -- Agent's own posts can influence strangers beyond their network (low influence, high reach) -- This replaces the concept of "public_statement" — instead of one generic statement, agents choose what to post and where - -### Timestep Flow (New) - -``` -Phase 1: REASONING (parallel) - All agents reason in parallel. - Output: internal state + actions (post, talk_to) - Cost: 1 LLM call per agent (merged Pass 1 + Pass 2) - -Phase 2: SOCIAL POSTS (no LLM calls) - Engine collects all "post" actions. - Stores them. Computes aggregate discourse metrics. - Feeds into next timestep's mood rendering. - Cost: zero - -Phase 3: CONVERSATIONS (parallel across pairs, sequential within) - Engine resolves talk_to requests into conversation pairs. - Priority queue by edge weight for conflicts. - All non-conflicting pairs run in parallel. - Each conversation: 2-3 turns, both agents reasoning in character. - Both agents' states update from conversation outcome. - Cost: ~3 LLM calls per conversation pair (fast model) - -Phase 4: STATE UPDATE - Write all state changes (from reasoning + conversations). - Compute timestep summary. - Check stopping conditions. -``` - -### Cost Analysis - -| Agents | RPM | Timestep unit | Timesteps | Calls/timestep | Wall time/timestep | Total | -|--------|-----|---------------|-----------|----------------|-------------------|-------| -| 1k | 1k | week | 12 | ~1.9k | ~2 min | ~24 min | -| 2k | 1k | week | 12 | ~3.8k | ~4 min | ~48 min | -| 5k | 1k | week | 12 | ~9.5k | ~10 min | ~2 hrs | -| 10k | 1k | week | 12 | ~19k | ~19 min | ~3.8 hrs | -| 10k | 2k | week | 12 | ~19k | ~10 min | ~2 hrs | - -Calls/timestep breakdown (for 10k agents): -- 10k reasoning calls (strong model, parallel) -- ~3k conversation pairs × 3 turns = ~9k conversation calls (fast model, parallel across pairs) -- Weekly timesteps keep total timestep count low (12 for a 3-month scenario) - -### Parallelism Impact - -Reasoning phase: fully parallel, same as today. No change. - -Conversation phase: parallel across non-conflicting pairs. Most pairs don't conflict (Travis↔Lisa and Darnell↔Marcus are independent). Conflicts are rare — maybe 5-10% of pairs share an agent. Those resolve sequentially within the timestep. - -Worst case: one popular agent (e.g., a community leader) gets 10 conversation requests. Those 10 conversations run sequentially = 10 × 3 turns = 30 sequential calls. At ~3s per call on fast model = ~90s. Everything else runs in parallel around it. Not a bottleneck unless the scenario creates extreme hub agents. - ---- - -## ISSUE 14: No Cognitive Architecture (Emotions, Attention, Self-Awareness) - -Inspired by TinyTroupe's cognitive model — they track emotions, attention, goals, and memory consolidation as explicit agent state. We track sentiment as a float and conviction as a number. The agent has no inner life. - -**What's missing:** - -### 14a: Emotional state as felt experience -- Agent has `sentiment: -0.91` but never sees "I've been anxious for two weeks" -- Emotional trajectory matters — panic → dread → resignation is different from panic → panic → panic, even if the sentiment float is the same -- The agent should be aware of HOW they've been feeling, not just what they've been thinking -- Implementation: render emotional trajectory from sentiment history. "You started the week panicked. By mid-week it settled into a heavy dread. It hasn't lifted." Deterministic — map sentiment values + trend to narrative labels. - -### 14b: Attention / focus -- What is the agent currently focused on? Travis might be focused on "immediate cash" while his feed pushes "learn AI skills." The gap between attention and incoming information creates tension. -- Currently the agent processes everything equally — exposures, peers, memory are all flat bullet points with no hierarchy of salience. -- Implementation: the agent's previous reasoning determines their focus. If Travis said "budget first" last timestep, budget-related inputs should be highlighted/foregrounded in the prompt this timestep. Deterministic — keyword extraction from previous reasoning to weight prompt sections. - -### 14c: Repetition detection and forced deepening -- TinyTroupe detects when agents repeat themselves (>0.85 similarity) and forces variation -- Our agents say "No change — save, learn AI, backup income" for 5 straight timesteps. That's not human. Real people either deepen their thinking, get bored, take action, or shift focus. -- Implementation: if the engine detects high similarity between consecutive reasonings (cosine similarity or simple string overlap), inject a prompt nudge: "You've been thinking the same thing for several days. Has anything actually changed? Are you starting to doubt your plan? Have you actually done anything about it?" Forces the LLM to either deepen or evolve the response. - -### 14d: Episodic vs semantic memory -- Currently: flat list of reasoning summaries. No distinction between "what happened to me" and "what I believe." -- Should have: - - **Episodic:** "On Day 1, I saw the news and panicked. On Day 3, I talked to Lisa about the budget." — what happened, when. - - **Semantic:** "I believe my job is at risk. I believe the government isn't going to help. I believe saving cash is more important than courses." — distilled beliefs that emerged from episodes. -- Semantic memories consolidate over time — after 3 timesteps of thinking the same thing, it becomes a belief, not a fresh reaction. -- Implementation: episodic = full reasoning traces (Issue 8). Semantic = after N timesteps of consistent reasoning on a theme, engine extracts a belief statement and adds it to a persistent "beliefs" field. Shown in prompt as "Things I've come to believe:" separate from "What I thought recently." - -### 14e: Self-awareness of own conviction and consistency -- Agent outputs conviction but never sees it. Never sees "I've been firm about this for 4 days" or "I'm less sure than I was last week." -- Self-awareness of consistency affects behavior — knowing you've held a position for weeks makes you more resistant to change (commitment bias). Knowing you've been wavering makes you more open. -- Implementation: render conviction trajectory alongside memory. "You've been firm about this since Day 2. Your certainty hasn't wavered." Or: "You started certain but you've been getting less sure each day." - -### 14f: Spontaneous memory recall (context-triggered) -- Currently: memory is a flat chronological list. The engine dumps the last N entries into the prompt regardless of what's happening now. -- Should be: memories surface BECAUSE they're relevant to what's happening. If Travis sees a headline about college costs, his memory of Tyler asking "is there a point in college?" should surface automatically — not because it was recent, but because it's contextually connected. -- This is how human memory works — you don't remember things in order, you remember things that are triggered by current experience. -- Implementation: at prompt build time, compute relevance between current timestep's exposures/events and all stored memories (semantic similarity). Surface the top N most RELEVANT memories, not the most RECENT. This requires embedding stored memories and comparing to current context. Cheap — small embedding model on short text, done locally or via a fast API call. Not an LLM reasoning call. - -### 14g: Internal monologue vs external action -- Currently: the agent produces one reasoning output that serves as both their internal thought and their public behavior. "Reasoning" IS the monologue AND the action. -- Should be: explicit separation between THINK (what I'm actually processing internally) and ACT/SAY (what I do and tell people). Travis might internally think "I'm completely fucked, nothing is going to save my job, I'm terrified for my kids" but externally say "We'll figure it out, let's just be smart about this." -- This is deeper than Issue 9 (private vs public position). Issue 9 is about the engine mechanically splitting public/private. This is about the agent having a genuine internal life that diverges from their external behavior — and being AWARE of that gap. -- The internal monologue should be raw, unfiltered, honest. The external actions/statements are socially filtered through personality (agreeableness, extraversion, social pressure). -- Implementation: Pass 1 output schema includes both: - ```json - { - "internal_monologue": "Raw, honest, unfiltered stream of thought", - "external_actions": [...], - "public_statement": "What I'd actually say out loud", - "private_belief": "What I actually believe underneath" - } - ``` -- The internal monologue feeds into memory (episodic). The public statement feeds into peer opinions for others. The gap between them is itself interesting data — agents with high agreeableness might have larger gaps (saying what others want to hear while privately disagreeing). - -**Cost:** All of these are deterministic rendering from existing data (sentiment history, reasoning traces, conviction scores). Zero extra LLM calls except 14f which needs a small embedding computation per agent per timestep (cheap). The only other new computation is similarity detection for 14c (cosine similarity on embeddings or even simpler string overlap). - ---- - -## Fidelity Tiers: `--fidelity low/medium/high` - -Not everyone needs the full experience. A `--fidelity` flag controls the richness of the simulation without changing the underlying data model — all tiers use the same population, network, names, and family data. The flag only controls what gets rendered in prompts and whether conversations happen. - -### Tier Comparison - -| Feature | **low** | **medium** | **high** | -|---------|---------|-----------|----------| -| Names & family NPCs | Yes | Yes | Yes | -| Narrative day template | Yes | Yes | Yes | -| Temporal awareness | Yes | Yes | Yes | -| Aggregate mood | Yes | Yes | Yes | -| Named peer opinions | Top 5, with conviction | Top 10, with conviction + consensus signal | All connected, conviction + consensus + demographics | -| Memory | Last 3 full reasoning traces | All traces, timestamped | All traces + semantic beliefs (consolidated) | -| Conversations | None | Top 1 edge (partner/closest) | Top 2-3 edges, full back-and-forth | -| Cognitive state | Emotional label only | Emotion + conviction trajectory | Full (attention, repetition detection, internal monologue) | -| Social posts | Stored only | Stored + aggregate rendered | Stored + aggregate + individual posts visible | -| Internal monologue | Not separated | Not separated | Explicit THINK vs SAY separation | -| Spontaneous memory recall | No | No | Yes (embedding-based relevance) | -| Repetition detection | No | No | Yes (forces deepening) | -| Pass structure | Merged single call | Merged single call | Merged single call | - -### Cost Estimates (all 5-mini, 1k RPM, conservative) - -**Per-call token budgets by tier:** - -| | Input tokens/call | Output tokens/call | -|---|---|---| -| **low** — reasoning | ~2.5k | ~400 | -| **medium** — reasoning | ~3.5k | ~500 | -| **medium** — conversation turn | ~2k | ~200 | -| **high** — reasoning | ~4k | ~600 | -| **high** — conversation turn | ~2k | ~200 | - -**Total cost (5-mini pricing: $0.15 input, $0.60 output per 1M tokens):** - -| | 2k agents | 10k agents | -|---|---|---| -| **Current system** (baseline) | ~$8 | ~$40 | -| **low** (15 timesteps) | ~$18 | ~$90 | -| **medium** (15 timesteps) | ~$30 | ~$150 | -| **high** (15 timesteps) | ~$44 | ~$220 | - -**Total wall time (5-mini, 1k RPM, conservative):** - -| | 2k agents | 10k agents | -|---|---|---| -| **Current system** | ~30 min | ~2.5 hrs | -| **low** | ~45 min | ~4 hrs | -| **medium** | ~1 hr | ~5.5 hrs | -| **high** | ~1.5 hrs | ~7.5 hrs | - -### Default: `medium` - -Medium is the sweet spot. You get names, narrative days, temporal awareness, full memory, richer peer context, AND the one conversation that matters most (partner/closest relationship). That Travis↔Lisa budget argument is where minds actually change — and it costs ~$150 for 10k agents. Roughly 3.5x current cost for a fundamentally better simulation. - -Low is for quick iteration and testing — still miles better than current (names, narrative, temporal awareness, mood) but no conversations. ~2x current cost. - -High is for flagship studies where you want maximum realism. Every conversation, full cognitive architecture, internal monologue. ~5.5x current cost. - ---- - -## What The New Simulation Feels Like: 4 Scenarios - -These show the target agent experience across wildly different study types — crisis, product change, local policy, financial event. Same engine, same systems, completely different lives. - ---- - -### Scenario 1: ASI Announced — Travis, 43, Services, South Carolina - -**Week 1** - -I'm Travis. I'm 43, I live in Greenville, SC with my partner Lisa (41, retail) and our three kids — Tyler (17, about to graduate), Kayla (14), and Mason (9). I work full-time in the service industry. I've got one month of savings. That's it. - -Monday morning I wake up and grab my phone like I always do. My X feed is unrecognizable. Every post is about AI — not the usual tech drama, the real thing. "AI systems surpass humans in every cognitive domain." Fortune 50 companies announcing layoffs. I see a CNN link someone shared — "Mass workforce restructuring begins." I scroll Instagram, same thing filtered through memes. "We're cooked" with 50k likes. - -I get to work. Darnell (36, works with me in services) catches me during break: "Bro did you see this? My cousin at Chase says they're already talking about cutting whole departments." My manager Carlos hasn't said a word. The break room TV is on CNN — some economist talking about how service jobs are "highly exposed to automation." I'm standing there watching this thinking — that's me. That's my job. - -I come home. Lisa's been reading about it all day. She's quiet, which means she's scared. Tyler asks at dinner: "Dad, is there even a point in college if AI does everything?" Kayla's on her phone not paying attention. Mason's doing homework. I don't have an answer for Tyler. Marcus (42, my neighbor, works construction) texts me: "You seeing this? What the hell." - -I check what people around me are thinking. Darnell's dead serious — he's already talking about cutting costs and learning AI tools. Lisa wants to look at our budget tonight. Marcus is uncertain — he thinks his hands-on work might be safe but he's not sure. Everyone I know online is panicking. My feed is a wall of anxiety. Nobody's calm about this. - -*What I'm thinking:* I'm terrified. One month of savings. Five mouths to feed. My job is exactly the kind that gets automated. I can't go back to school — no money, no time. I need to cut spending NOW, learn something practical that could actually earn money, and line up backup work — gig driving, contract labor, whatever. - -*What I do:* -- I post on X: "One month of savings and a family of 5. Nobody in Washington is saying a damn thing. We're on our own." -- I talk to Lisa tonight about the budget. -- I text Darnell asking if he knows any free AI courses. - -**The conversation:** - -Me: Lisa, we need to look at our budget. Tonight. I'm serious. - -Lisa: I already did. Travis, we have $2,400 in savings. That's rent and groceries for one month. If either of us loses our job— - -Me: I know. I've been thinking — maybe I should learn some AI tools, something I could use to— - -Lisa: With what money? And when? You work 50 hours a week. Tyler needs shoes. Mason's got a field trip. I don't want to hear about courses right now. We need CASH. - -Me: ...yeah. Okay. Budget first. But I'm not just gonna sit here and wait to get fired. - -*After talking to Lisa, I'm less focused on upskilling and more focused on immediate survival. She's right — we can't afford courses. Cash first.* - -**Week 2** - -It's been two weeks. I've been thinking about this every single day. - -Week 1 I was panicking. I said: "I'm terrified. One month of savings. I need to cut spending, learn something practical, line up backup work." I was angry and scared. - -This week, 31 people in my circle brought it up. Same fears, same conversations. The mood hasn't changed — if anything people are more resigned than panicked now. Darnell signed up for some free YouTube tutorials on AI tools. My X feed has shifted from pure panic to "what to do" threads. Still no government response. - -At work, two people quit this week — not because they got fired, but because they're scared and jumping to jobs they think are safer. Carlos still hasn't said anything. That silence is getting louder. - -Lisa and I cut our streaming, cancelled some subscriptions, started cooking every meal at home. We're trying to stretch savings to two months. Tyler's been quiet — I think the college question is eating at him. - -The general mood around me: everyone's still anxious. Most people I know are talking about practical survival — saving money, learning skills. A few are stubbornly saying "it'll blow over." Nobody I know is organizing or pushing back politically. It's all individual survival mode. - -*What I'm thinking:* Same as last week but harder. Lisa's right — we can't afford courses. I'm looking at gig apps instead. Maybe I can drive nights. The anger is fading into something heavier — this feeling like the ground shifted and nobody's coming to help. - -*What I do:* -- I text Marcus asking if he knows anyone hiring for side work. -- I don't post on X this week. Don't have anything new to say. - ---- - -### Scenario 2: Netflix Kills Password Sharing — Jade, 26, Marketing, Chicago - -**Week 1** - -I'm Jade. I'm 26, Black, living in Logan Square, Chicago. I work in marketing at a mid-size agency. I live alone in a studio apartment. I've been using my mom Denise's Netflix account since college. So has my brother Kevin (29, accountant, lives in Bronzeville) and my cousin Aaliyah (23, still in grad school). - -Tuesday evening. I get home from work, make dinner, open my laptop to watch something. Netflix pops up a screen: "This device isn't part of the account holder's household. Please sign in with your own account or ask the account holder to verify." I try refreshing. Same thing. I text the family group chat. - -Me: yo Netflix just locked me out?? - -Kevin: Same. Just got the screen. - -Aaliyah: WHAT. I'm in the middle of a show??? - -Mom (Denise, 54, nurse): I got an email saying they're "cracking down on sharing." It says I need to pay extra for each person outside my household or you all need your own accounts. - -My coworker Priya (28, also in marketing) mentioned at lunch that this happened to her last week. She just caved and got her own account. My friend Terrell (27, teaches middle school) posted on X: "Netflix really charging me $15.49 to watch shows I already watched for free lmaooo." 47 likes. - -The general vibe online: people are annoyed but not outraged. Lots of memes. Some people saying they'll cancel, most people saying they'll complain and then pay. A few Reddit threads about VPN workarounds. - -*What I'm thinking:* I'm annoyed, not devastated. $15.49/month isn't going to break me but it's the principle. I've been on my mom's account for 6 years. This feels like Netflix squeezing us. But honestly? I'll probably just pay it. Or maybe I'll finally try that Criterion Channel trial Terrell's been telling me about. - -*What I do:* -- I text the family group chat to figure out what we're doing. -- I check Reddit for workarounds. - -**The conversation:** - -Me: Mom, are you gonna pay for the extra people or should we all just get our own? - -Denise: Baby, I'm already paying $22 a month. I'm not adding three more people at $8 each. That's $46 for Netflix. No. - -Kevin: Yeah I'll just get my own. It's not that serious. - -Me: Aaliyah, what about you? You're on a grad school budget. - -Aaliyah: I'm NOT paying for Netflix. I'll just use someone else's Disney+ lmao. - -Me: lol fair. Okay so Kevin gets his own, I'll probably get mine, Aaliyah's freeloading somewhere else. Mom keeps hers. - -*After the conversation: resolved pretty quickly. Nobody's happy about it but nobody's cancelling in protest either. Just redistributing the cost.* - -**Week 2** - -It's been two weeks since the password thing. - -Last week I was annoyed but figured I'd just pay. This week I still haven't signed up for my own account. I've been watching YouTube and reading instead. Honestly... I don't miss it that much? - -Priya at work is already back to binge-watching on her own account. Terrell cancelled and went to Criterion Channel — he won't shut up about some French movie. Kevin got his own account on day 3. Mom's happier not paying for everyone. - -The mood: nobody cares anymore. It was a two-day annoyance. People either paid or moved on. The Reddit workaround threads died. No one's boycotting. - -*What I'm thinking:* I might just... not get Netflix. Which is weird because I've had it (well, my mom's) for 6 years. But $15.49 for something I can live without? In this economy? - ---- - -### Scenario 3: London ULEZ Expands — Graham, 58, Plumber, Outer London - -**Week 1** - -I'm Graham. I'm 58, white, married to Sandra (55, part-time school receptionist). We live in Bromley, outer southeast London. Our daughter Charlotte (31) lives in Lewisham with her partner. Our son Jake (27) is still at home saving for a deposit. I run my own plumbing business — just me, my van, and 30 years of customers across South London. - -Monday morning. I already knew this was coming but seeing the signs go up on the A205 makes it real. ULEZ expanded to cover all of London. My 2015 Transit van doesn't meet the emission standards. That's £12.50 a day, every day I drive into the zone. Which is every day, because that's where my customers are. - -I'm in the van listening to LBC. Nick Ferrari's taking calls about it. Every other caller is a tradesman like me. Sandra texts me: "Did you see the council posted about ULEZ grants? Maybe we can get help for a new van." I look it up at lunch — the scrappage scheme gives you £2,000 toward a compliant vehicle. My van is worth more than that and a new Transit is £35,000. £2,000 is a joke. - -At the pub after work, my mate Dave (61, electrician, same situation) is fuming: "Sadiq Khan doesn't give a toss about people like us. £12.50 a day, that's £250 a month, that's £3,000 a year just for doing my job." My other mate Phil (55, retired copper) says he voted against it in the consultation. My neighbour Janet (63, retired teacher) thinks it's good for air quality. I bite my tongue. - -The general mood in my area: angry. Bromley voted overwhelmingly against the expansion. The signs are getting vandalised overnight. My customers are asking me if I'm going to raise my prices. Local Facebook group is wall-to-wall fury. - -*What I'm thinking:* This is going to cost me £3,000 a year minimum. I can't buy a new van — I'm 58, I'm not taking out a £35,000 loan at this stage of my life. I can't stop driving — my customers are in the zone. I can either eat the cost, raise my prices and lose customers, or... I don't know. I feel like I'm being punished for working. - -*What I do:* -- I post in the Bromley Community Facebook group: "Any other tradesmen working out how to deal with this? £12.50/day is no joke." -- I talk to Sandra about the numbers tonight. -- I text Dave about maybe going to that anti-ULEZ protest next Saturday. - -**The conversation:** - -Me: Sandra, I've done the maths. £12.50 a day, five days a week, that's sixty-two quid a week. Over three grand a year. - -Sandra: Can we claim it as a business expense at least? - -Me: Yeah, tax deductible, but I still have to pay it upfront. That's three grand I don't have just lying about. And the scrappage scheme is a joke — two thousand quid toward a thirty-five thousand pound van. - -Sandra: What about going electric? Charlotte was saying— - -Me: An electric Transit is forty-eight thousand pounds, Sandra. And where am I charging it? We haven't got a drive. I'm not running an extension lead out the kitchen window. - -Sandra: So what do we do? - -Me: I raise my prices ten percent and hope I don't lose customers. That's the only option I can see. - -*After talking to Sandra: she's practical, which helps. But neither of us has a good answer. The ten percent price hike is what I'm going with.* - -**Week 2** - -It's been two weeks. I went to Dave's protest last Saturday — about 200 people, mostly tradesmen and outer London residents. Got some press coverage. Didn't change anything. - -Last week I was angry and said I'd raise prices 10%. I did. Two customers have already asked why. One of them said he'd "shop around." That stung — I've done his boiler for 15 years. - -Dave's considering retiring early. Phil thinks we should take legal action. Janet still thinks it's good for air quality — I had a proper row with her over the fence about it. The Bromley Facebook group is still angry but it's becoming repetitive. Some people are just paying it and getting on with life. - -The mood: still bitter but people are accepting it. The anger's turning into resentment. Nobody thinks it's going to be reversed. - -*What I'm thinking:* I'm resigned. I'm going to pay the charge, pass what I can to customers, and hope I don't lose too much business before I retire in 7 years. The protest was nice but pointless. This is just how it is now. - ---- - -### Scenario 4: Bitcoin Hits $1M — Kenji, 34, Software Engineer, Austin - -**Week 1** - -I'm Kenji. I'm 34, Japanese-American, living in East Austin. I'm a senior software engineer at a mid-size SaaS company. I live with my wife Mara (32, UX designer) and our daughter Yuki (3). We own our house — bought in 2022, still owe $380K on the mortgage. I own 1.4 BTC that I bought between 2020-2022 at an average of around $35K. I also have a 401K and index funds. Mara thinks crypto is gambling. - -Wednesday morning. I'm brushing my teeth and my phone is going insane. Bitcoin crossed $1,000,000 overnight. My 1.4 BTC is worth $1.4 million. I stare at the number on Coinbase for about thirty seconds. Then I check again because I don't believe it. Then I sit down on the edge of the bathtub. - -Mara walks in: "What's wrong?" I show her my phone. She doesn't say anything for a moment, then: "Is that real? Can you actually take that money out?" - -I get to work. My coworker Ryan (29, also an engineer, has like 0.3 BTC) is losing his mind in Slack. Our team lead Pradeep (41, no crypto) is joking about it but you can tell he's kicking himself. My college friend Marcus texts me from Brooklyn: "BRO. BRO. BRO." He's got like 3 BTC. He's a millionaire three times over this morning. - -Crypto Twitter is euphoric. Mainstream news is covering it wall to wall. CNBC has some analyst saying it could go to $2M. Another one saying it's a bubble that'll crash to $200K by next month. My X feed is 50% celebration, 30% "told you so", 20% people who didn't buy being bitter. - -My financial advisor Greg sent an email: "Given recent market developments, I'd recommend we schedule a call to discuss your portfolio allocation." - -*What I'm thinking:* $1.4 million. That's our mortgage paid off with a million left over. That's Yuki's college fund. That's early retirement if I play it right. But I also remember 2022 when it crashed from $69K to $16K and I held through the whole thing. Do I sell? Some of it? All of it? Do I hold for $2M? Every fiber of my body wants to sell and lock in the gain but every crypto person I know is saying this is just the beginning. - -And Mara. She's been tolerating the crypto thing for four years. She's going to want to sell everything immediately. That conversation tonight is going to be intense. - -*What I do:* -- I text Marcus: "What are you doing? Selling?" -- I call Greg to schedule that portfolio meeting. -- I post nothing. I'm not telling the internet I have $1.4M in Bitcoin. But I do lurk in the r/Bitcoin thread reading everyone's exit strategies. -- I talk to Mara tonight. This is a big one. - -**The conversation:** - -Me: Okay so... we need to talk about the Bitcoin. - -Mara: Yeah we do. Sell it. All of it. Tomorrow. - -Me: Just — hear me out. I think we should sell some. Maybe half. Pay off the mortgage. That's $380K, we keep the rest— - -Mara: Kenji. You said the same thing when it hit $69,000. "Just a little longer." Then it crashed to $16,000 and you didn't sleep for a month. We have a three-year-old. This isn't a game anymore. - -Me: I know. But this is different — institutional adoption, ETFs, sovereign wealth funds are buying— - -Mara: I don't care about ETFs. I care about Yuki having a college fund that doesn't depend on what Elon Musk tweets at 2am. Sell it. Pay the mortgage. Put the rest in index funds. Please. - -Me: ...what if I sell 70%? Pay the mortgage, put $500K in index funds, keep 0.42 BTC as a moonshot? - -Mara: *(long pause)* Fine. But you sell tomorrow. Not "this week." Tomorrow. - -*After talking to Mara: I'm selling 70%. She's right about 2022. I didn't sleep for a month. But I'm keeping 0.42 BTC because if it goes to $2M that's another $840K and I'll never forgive myself if I sold everything.* - -**Week 2** - -It's been two weeks. I sold 0.98 BTC at $1,020,000 average. Paid off the mortgage. Put $520K into a brokerage account — index funds, like Mara wanted. Kept 0.42 BTC. - -Last week I was euphoric and torn. This week I feel... weirdly empty? The mortgage payoff was anticlimactic — I just watched a number go to zero on a screen. The money in the brokerage doesn't feel real yet. - -Ryan sold everything at $980K. He's already talking about quitting to start a company. Pradeep started buying Bitcoin the day after it hit $1M — textbook FOMO. Marcus hasn't sold a single sat. He's diamond-handing for $5M. Greg the financial advisor was professional about it but I could hear him sweating on the phone. - -Bitcoin's at $1.1M now. My remaining 0.42 BTC is worth $462K. Part of me is sick that I sold. Part of me remembers Mara's face when she said "this isn't a game anymore." - -The mood: crypto people are manic. Non-crypto people are a mix of FOMO and resentment. Mainstream discourse is shifting from "is Bitcoin real?" to "how do I buy Bitcoin?" which historically means it's close to a top. But nobody knows. - -*What I'm thinking:* I made the right call. The mortgage is gone. Yuki's set. But I check the price 40 times a day and every time it goes up I feel a little sick. This is the psychological cost of selling — you're never at peace with the number you picked. - ---- - -### What These Scenarios Demonstrate - -Four completely different lives. Same simulation engine. - -| | ASI (Travis) | Netflix (Jade) | ULEZ (Graham) | Bitcoin (Kenji) | -|---|---|---|---|---| -| **Emotional intensity** | Terror/survival | Mild annoyance | Slow-burn anger | Euphoric anxiety | -| **Key relationship** | Partner (budget) | Family (shared account) | Partner + mates (trade) | Partner (sell/hold) | -| **Conversation stakes** | Financial survival | Who pays $15/mo | £3K/year business cost | $1.4M life decision | -| **Social media behavior** | Vents publicly | Lurks memes | Posts in local FB group | Posts nothing (privacy) | -| **Day rhythm** | Phone → work panic → family fear | Discover → text family → check Reddit | Commute → pub → kitchen table | Check price → Slack → tense dinner | -| **Aggregate mood** | Universal anxiety | Brief annoyance → apathy | Local fury → resignation | Split euphoria/FOMO/resentment | -| **Temporal feel** | Urgent daily countdown | 2-day blip | Slow grinding weeks | Volatile hourly swings | -| **Convergence** | Everyone scared, same plan | Quick resolution, move on | Bitter acceptance | Depends on price action | - ---- - -## Implementation Status (Feb 2026) - -Audit of current codebase against the issues above. - -| Issue | Status | Notes | -|-------|--------|-------| -| **1. Population ↔ Network** | PARTIAL | Edge type rules infrastructure exists (`NetworkConfig.edge_type_rules`) but not populated by default. Partner matching done at sampling but not linked as network edges. | -| **2. Agent Names** | DONE | Full name generation via SSA/Census data in `extropy/population/names/`. Names used throughout: sampling, persona, engine, conversations. | -| **3. Family Members** | DONE | Partner linking + NPC dependents (kids, elders) generated in `households.py`. Available for conversations. | -| **4. Temporal Awareness** | DONE | Timestep + unit in prompts. Memory timestamps now show elapsed time ("2 days ago" not "Day 3"). | -| **5. Exposures** | PARTIAL | Experience templates exist but not demographic-aware. No aggregation of network sources. | -| **6. Peer Opinions** | DONE | Names and relationships rendered. Conviction comes through naturally in the public statement — explicit labels would be unnatural. | -| **7. Aggregate Sentiment** | DONE | Both macro (global) and local (neighborhood) mood rendered in natural language via `_render_macro_summary()` and `_render_local_mood()`. | -| **8. Memory** | DONE | Full history retained (no sliding window cap). Fidelity controls raw reasoning visibility: low=summaries only, medium=last 3 with excerpts, high=last 5 with excerpts. | -| **9. Private vs Public** | PARTIAL | Fields exist in state model but agent doesn't explicitly reason about the gap. Mechanical splitting still applied post-hoc. | -| **10. Narrative Prompt Structure** | OUT OF SCOPE | Day phase templates decided against. Current linear prompt structure is sufficient. | -| **11. Pass 2 Context** | NOT NEEDED | Pass 1 reasoning already contains enough demographic context. Adding demographics to Pass 2 would be redundant. | -| **12. Channel → Experience** | PARTIAL | Experience templates exist but not demographic-variant. | -| **13. Agent Interactions** | DONE | Full conversation system in `conversation.py`. Social posts recorded. Available contacts rendered. | -| **14. Cognitive Architecture** | DONE | Emotional trajectory (14a) + conviction self-awareness (14e) + repetition detection (14c) + private/public thought separation (14g) implemented. Attention/focus (14b), semantic memory (14d), and context-triggered recall (14f) decided against — overkill or marginal benefit. | - -### Summary - -- **DONE**: 2, 3, 4, 6, 7, 8, 13, 14 -- **PARTIAL**: 1, 5, 9, 12 -- **OUT OF SCOPE**: 10, 11, 14b, 14d, 14f - -The simulation is in good shape. Remaining gaps are edge cases (network edge rules, demographic channel variants). diff --git a/docs/simulation-v2-architecture.md b/docs/simulation-v2-architecture.md deleted file mode 100644 index 24c5044..0000000 --- a/docs/simulation-v2-architecture.md +++ /dev/null @@ -1,1202 +0,0 @@ -# Extropy v2 — Full Pipeline Architecture - -This document specifies every change across the entire Extropy pipeline, from `extropy spec` through `extropy results`. It supersedes `simulation-experience-gaps.md` (which identified the problems). This document defines the solutions. - ---- - -## Design Principles - -1. **Households, not individuals.** The atomic unit of sampling is a household. Partners are co-sampled. Kids are generated at sampling time. Economic fate is shared. -2. **Social roles, not similarity.** Network edges represent real relationships (partner, coworker, neighbor, friend) derived from agent attributes — not generic "acquaintance" edges from embedding distance. -3. **First person, always.** Agents think as "I" — not "You are Travis." The prompt reads like an internal monologue, not a briefing document. -4. **Names carry culture.** Every agent has a name. Names are demographically appropriate (SSA baby names + Census surname data, bundled CSVs, US-only for now). Partners, kids, and peers are named. Non-US populations use country-specific name data added later behind the same `generate_name(gender, ethnicity, birth_decade, country="US")` interface. -5. **Time is felt.** Agents know what day/week it is, how long ago they heard the news, whether things are getting better or worse. -6. **Conversations are real.** Agents talk to each other. Both sides are real agents (or NPC dependents). The conversation changes both participants. -7. **Outcomes emerge, not imposed.** For exploratory scenarios, outcomes are open-ended. Categories are discovered post-hoc by downstream DS tooling (agentic harness), not pre-defined dropdowns or built-in clustering. -8. **Scenarios evolve.** Events develop over time. New information arrives at specified timesteps. The world isn't frozen at t=0. -9. **Deterministic where possible.** Names, family, temporal framing, mood rendering, channel experience — all deterministic. LLM calls only for reasoning and conversations. -10. **Fidelity is tunable.** `--fidelity low/medium/high` controls prompt richness and conversation depth without changing the underlying data model. - ---- - -## Locked Decisions - -Decisions confirmed before implementation. These override any conflicting detail elsewhere in this document. - -### Pre-Phase Decisions (all phases) - -| # | Decision | Resolution | -|---|----------|------------| -| 1 | Pipeline ordering | Network stays scenario-agnostic. Optional "scenario-conditioned network" mode is future work, not v2 core. | -| 2 | `talk_to` target identity | `agent_id` in schema, render names only in prompt. | -| 3 | Merged-pass default | 2-pass is default. Merged pass behind `--merged-pass` flag. A/B test later. | -| 4 | Token budget for memory | Uncapped for now. Deterministic token cap with oldest-to-newest compression deferred. | -| 5 | Timeline merge semantics | Timeline entry overrides base event for that timestep. | -| 6 | DB schema for new artifacts | Define conversations/posts/action_history tables before Phase D. | -| 7 | Name data | Local SSA baby names + Census surnames, bundled CSVs (~500KB), US-only. Non-US via country-specific CSVs later behind same interface: `generate_name(gender, ethnicity, birth_decade, country="US")`. | -| 8 | Conformity/threshold mechanics | Soft prompt signal only (conformity self-awareness + peer opinions + mood rendering). No explicit ratios or hard numeric gates. | -| 9 | Backtesting ground-truth | Define one validation dataset schema before Phase G. | - -### Phase-Specific Decisions - -| # | Decision | Resolution | Phase | -|---|----------|------------|-------| -| 10 | Conversation turns | 2 turns / 4 messages (medium), 3 turns / 6 messages (high). LLM told the limit so it wraps up. | D | -| 11 | Conversation state | Both agents keep their own independent final state. No conflict. | D | -| 12 | Household joint distributions | Pre-processed cross-tab CSVs from Census PUMS, not raw PUMS. | B | -| 13 | Neighbor edge inference | TBD at spec/extend phase — needs generalized attribute. Not blocking B core. | B | -| 14 | Fidelity flag location | `SimulationRunConfig` (runtime choice, not scenario-intrinsic). | F | -| 15 | Post-hoc clustering | Not building. Agentic harness does DS on exported data. | F | -| 16 | Repetition detection metric | Jaccard similarity on word-level trigrams, >70% threshold. | E | -| 17 | Channel experience | `experience_template` field on `ExposureChannel`. Scenario compiler generates it. Fallback: humanize channel name. | A | - ---- - -## Pipeline Overview - -``` -extropy spec → extropy extend → extropy sample → extropy network → extropy persona → extropy scenario → extropy simulate → extropy results - ↑ ↑ ↑ - HOUSEHOLD-BASED SCENARIO TIMELINE CONVERSATIONS - SAMPLING (NEW) + OUTCOME TRACKS + COGNITIVE STATE - (NEW) (NEW) -``` - ---- - -## PHASE 1: POPULATION CREATION - -### 1.1 `extropy spec` — No Changes - -Spec building (sufficiency check → attribute selection → hydration → binding) stays the same. The LLM discovers attributes relevant to the scenario and builds distributions. No structural changes. - -One addition: the spec builder should recognize household-level attributes and tag them appropriately. When the LLM discovers `household_income`, `marital_status`, `household_size` — these should be tagged `scope: household` in the attribute metadata, signaling to the sampler that they're shared within a household unit. - -```yaml -# New attribute metadata field -- name: household_income - scope: household # shared across household members - type: int - category: universal - ... - -- name: neuroticism - scope: individual # default, independent per person - type: float - category: personality - ... -``` - -### 1.2 `extropy extend` — Minor Changes - -Same as spec, but with context from a base spec. The extension LLM should be aware that household-scoped attributes exist and avoid duplicating them across individual-level additions. - -### 1.3 `extropy sample` — Major Rewrite - -**Current:** Samples N individual agents sequentially. Each agent is independent. A married agent with `household_size: 5` exists alone — no partner, no kids. - -**New:** Samples N/H households, where H is the average household size. Each household produces 1-2 adult agents plus NPC dependents. - -#### Household Sampling Flow - -``` -1. Determine household composition - - Sample household_type: single | couple | single_parent | couple_with_kids | multi_generational - - Source: Census household composition rates by state, age bracket, race_ethnicity - - This determines how many adults and dependents - -2. Sample primary adult (Adult 1) - - All individual attributes sampled as today (age, gender, personality, occupation, etc.) - - Household-scoped attributes sampled once and shared - -3. If couple household → Sample partner (Adult 2) - - Correlated demographics: - - Same state, urban_rural (shared household) - - Same household_income, household_size (shared) - - Age: sampled from joint distribution conditioned on Adult 1's age - (mean = Adult 1 age ± 2 years, std = 3 years, constrained by gender norms for the cohort) - - race_ethnicity: correlated via intermarriage rates from census - (same-race probability ~85%, varies by group) - - education_level: assortative mating correlation (~0.6 from research) - - religious_affiliation: high correlation (~0.7) - - political_orientation: moderate correlation (~0.5) - - Independent attributes: - - Personality traits (neuroticism, extraversion, etc.) — independent - - occupation_sector — constrained by local job market (same state) but otherwise independent - - All attitudes and context-specific attributes — independent - - Same-sex couples: - - Census same-sex household rates by state (~1-3% of couple households) - - When sampled as same-sex, both adults share gender - - Name generation respects this - -4. Generate NPC dependents (children, elderly parents) - - Number of kids = household_size - number_of_adults - - Kid ages: sampled from plausible range given parent age + life_stage - - If parent is 43 (middle_aged_adult), kids likely 5-20 - - If parent is 28 (young_adult), kids likely 0-8 - - Spacing: 2-4 years between siblings (sampled) - - Kid attributes (minimal, for context only): - - first_name (from same cultural pool as parents) - - age - - gender (50/50) - - school_status: derived from age (0-4: home, 5-17: in school, 18+: college/working) - - grade: derived from age - - Elderly dependents: if household_labor_dependency implies it - - first_name, age (65+), relationship ("mother", "father-in-law") - - NPCs stored as structured metadata on the parent agent, NOT as agents - -5. Generate names for all household members - - Data source: SSA baby name frequency data (by birth decade + gender) + Census surname data (by ethnicity) - - First name: filter by birth_decade (derived from age) + gender + race_ethnicity → weighted random pick - - Last name: filter by race_ethnicity → weighted random pick → shared across household - - Partner may have different last name (probability based on era/demographics) - - ~50KB of bundled CSV data. Zero API calls. -``` - -#### Agent Record (New Schema) - -```json -{ - "_id": "agent_0020", - "first_name": "Travis", - "last_name": "McAllister", - "household_id": "household_0010", - "household_role": "adult_primary", - "partner_id": "agent_0021", - "dependents": [ - {"name": "Tyler", "age": 17, "gender": "male", "relationship": "son", "school_status": "high_school_senior"}, - {"name": "Kayla", "age": 14, "gender": "female", "relationship": "daughter", "school_status": "high_school_freshman"}, - {"name": "Mason", "age": 9, "gender": "male", "relationship": "son", "school_status": "4th_grade"} - ], - "age": 43, - "gender": "male", - "race_ethnicity": "white", - "state": "south_carolina", - "marital_status": "cohabiting", - "household_size": 5, - "household_income": 52000, - ...all other attributes... -} -``` - -#### What This Changes About Study DB Storage - -The `agents` table stays the same (id → JSON attributes). But agents now have: -- `household_id` for grouping -- `partner_id` for cross-referencing -- `dependents` as structured metadata -- `first_name`, `last_name` as named attributes - -The `populations` table in study DB gets a new `households` table: - -```sql -CREATE TABLE households ( - id TEXT PRIMARY KEY, - population_id TEXT, - adult_ids JSON, -- ["agent_0020", "agent_0021"] - dependent_data JSON, -- NPC details - shared_attributes JSON -- household_income, state, etc. -); -``` - -### 1.4 `extropy network` — Major Rewrite - -**Current:** Compute pairwise similarity from all attributes → threshold → create edges → assign edge types from similarity buckets → calibrate to target metrics. - -**New:** Create edges from social role rules first, then fill with similarity-based edges. - -#### Social Role Edge Generation - -``` -Phase 1: Structural edges (deterministic from attributes) - - partner: from partner_id field (always created, weight = 1.0) - - household: all adults in same household_id (always created, weight = 0.9) - - coworker: same occupation_sector + same state (probabilistic, ~5-10 per agent) - - neighbor: same state + same urban_rural + age within 15 years (probabilistic, ~3-5 per agent) - - congregation: same religious_affiliation + same state (if religious, ~3-5 per agent) - - school_parent: both have kids in school age + same state + same urban_rural (~2-3 per agent) - -Phase 2: Similarity-based edges (fills remaining degree budget) - - Compute similarity as today, but only for agents not yet connected - - These become "acquaintance" or "online_contact" edges - - Lower weight than structural edges - -Phase 3: Calibration - - Same calibration loop as today (hit target avg_degree, clustering, modularity) - - But structural edges are PROTECTED — calibration can only add/remove similarity edges - - Structural edges are never pruned -``` - -#### Edge Schema (Enhanced) - -```json -{ - "source": "agent_0020", - "target": "agent_0021", - "edge_type": "partner", - "weight": 1.0, - "structural": true, - "context": "household" -} -``` - -Edge types and their default weights: -| Edge Type | Weight | Source | Bidirectional | -|-----------|--------|--------|---------------| -| partner | 1.0 | household_id + partner_id | yes | -| household | 0.9 | household_id | yes | -| coworker | 0.6 | occupation_sector + state | yes | -| close_friend | 0.7 | similarity top-k + age proximity | yes | -| neighbor | 0.4 | state + urban_rural + age proximity | yes | -| congregation | 0.4 | religious_affiliation + state | yes | -| school_parent | 0.35 | kids in school + state + urban_rural | yes | -| acquaintance | 0.2 | similarity-based | yes | -| online_contact | 0.15 | similarity-based, different state OK | yes | - -#### What The Scenario Can Override - -The scenario YAML can declare **relationship priority** for this topic: - -```yaml -relationship_weights: - partner: 1.0 # always highest - coworker: 0.9 # ASI: coworkers are critical - close_friend: 0.7 - neighbor: 0.3 # ASI: neighbors less relevant -``` - -For ULEZ, the weights would be different: -```yaml -relationship_weights: - partner: 1.0 - neighbor: 0.8 # ULEZ: neighbors directly affected - coworker: 0.5 # ULEZ: less relevant unless both tradies -``` - -These weights are used in two places: -1. **Conversation conflict resolution** — when two people want to talk to the same agent, higher weight goes first -2. **Peer opinion ordering in the prompt** — higher weight peers appear first with full detail (name, demographics, statement), lower weight peers get summarized ("a few acquaintances also mentioned it") - -The agent's OWN choice of who to talk to is LLM-driven — they see the list of available people and pick based on what they need. The weights handle tiebreaking and prompt ordering, not the agent's decision. - -**Auto-generation:** `extropy scenario` generates these weights automatically — the compiler LLM knows that ASI is a workplace threat (coworker weight high), Netflix is a household product (family weight high), ULEZ is local policy (neighbor weight high). The user can override in the YAML after generation. - ---- - -## PHASE 2: SCENARIO COMPILATION - -### 2.1 `extropy scenario` — Significant Extensions - -The scenario YAML gains three new top-level sections: `timeline`, `day_phases`, and enhanced `outcomes`. - -#### Scenario Timeline (New) - -**Current:** Single event at t=0. Nothing changes. - -**New:** Sequence of events at specified timesteps. - -```yaml -timeline: - - timestep: 0 - event: - type: news - content: "AI systems demonstrate superhuman performance across all cognitive domains. Fortune 50 firms announce restructuring." - source: "Major news outlets" - credibility: 0.8 - ambiguity: 0.6 - emotional_valence: -0.7 - - timestep: 3 - event: - type: news - content: "Federal government announces emergency AI task force. No concrete policy yet. Unemployment claims spike 40%." - source: "White House press briefing" - credibility: 0.9 - ambiguity: 0.4 - emotional_valence: -0.5 - - timestep: 8 - event: - type: news - content: "First wave of layoffs hits. 200,000 jobs cut across tech and finance in the past month." - source: "Bureau of Labor Statistics" - credibility: 0.95 - ambiguity: 0.2 - emotional_valence: -0.8 - - timestep: 16 - event: - type: policy_change - content: "Government announces Emergency Workforce Transition Act: $500/person retraining voucher, extended unemployment to 52 weeks." - source: "Congressional legislation" - credibility: 0.9 - ambiguity: 0.3 - emotional_valence: -0.2 -``` - -Each timeline event: -- Has its own exposure rules (which channels, which agents, what probability) -- Gets injected into agent prompts at the specified timestep as "new information this [week/day]" -- Accumulates — by timestep 16, agents have the full history of developments -- Can override or update the original event's parameters - -For scenarios with no evolution (Netflix password sharing), the timeline is just the single t=0 event. No extra configuration needed. - -#### ~~Day Phases~~ (OMITTED) - -**Decision:** Day phase templates are not implemented. The improved flat prompt structure (first-person voice, temporal awareness, named peers, local mood, social feed) provides sufficient narrative context without explicit morning/work/evening phase segmentation. The complexity of condition-based phase selection doesn't justify the marginal improvement over the current prompt design. - -#### Outcome Tracks (New) - -**Current:** All outcomes are pre-defined categorical/boolean/float with fixed options. - -**New:** Two tracks, inferred from schema. - -**Track 1: Known Outcomes** — Options are pre-defined. Used when you know the decision space. - -```yaml -outcomes: - suggested_outcomes: - - name: action - type: categorical - options: [pay_own_account, stay_shared_with_fee, cancel, switch_service, workaround] - description: "What the user does about Netflix account" - required: true - - name: sentiment - type: float - range: [-1.0, 1.0] - description: "How they feel about the change" - required: true -``` - -Engine behavior: Pass 2 extracts exact category from options. Results show distributions directly. - -**Track 2: Exploratory Outcomes** — No pre-defined options. Used when the decision space is unknown. - -```yaml -outcomes: - suggested_outcomes: - - name: primary_response - type: open_ended - description: "What are you actually going to do? Be specific about concrete steps, resources, timeline, and obstacles." - required: true - - name: sentiment - type: float - range: [-1.0, 1.0] - description: "Overall sentiment" - required: true -``` - -Engine behavior: The agent writes a free-form response. No classification pass needed for this outcome. `extropy results` clusters the responses post-hoc to discover categories. - -**Track 3: Hybrid** — Categorical bucket + open elaboration. - -```yaml -outcomes: - suggested_outcomes: - - name: primary_adaptation_strategy - type: categorical - options: [aggressive_upskilling, occupational_pivot, double_down, disengage, collective_resistance] - description: "Broad strategy category" - required: true - - name: elaboration - type: open_ended - description: "Describe specifically what you're planning. Concrete steps, resources, timeline, obstacles." - required: true - - name: sentiment - type: float - range: [-1.0, 1.0] - required: true -``` - -Engine behavior: Categorical extracted via classification. Elaboration captured as free text. Results show both: "54% aggressive upskilling" as the headline, then clustered elaborations as the story. - -**Inference rule:** If `type: open_ended` and no `options` → exploratory track. If `type: categorical` with `options` → known track. If both exist → hybrid. No explicit `outcome_mode` field needed. - -#### Channel Experience Templates (New, Optional) - -`experience_template` is a field on `ExposureChannel` itself — not a separate top-level config. The scenario compiler generates it. The engine renders it into the prompt. Fallback: humanize the channel name if no template exists. - -```yaml -seed_exposure: - channels: - - name: mainstream_news_media - description: "TV and online news coverage" - reach: broadcast - credibility_modifier: 1.1 - experience_template: "I saw a news segment about this on TV." - - name: social_media_feeds - description: "Posts appearing in social feeds" - reach: broadcast - credibility_modifier: 0.8 - experience_template: "I noticed some posts about this online." - - name: email_notification - description: "Direct email from the company" - reach: targeted - credibility_modifier: 1.2 - experience_template: "I got an email about this." -``` - -If `experience_template` is omitted → engine humanizes the channel name (e.g., `"social_media_feeds"` → `"social media"`). If provided → used directly in the prompt. - -### 2.2 ScenarioSpec Model Changes - -```python -class TimelineEvent(BaseModel): - """A single event in the scenario timeline.""" - timestep: int - event: Event - exposure_rules: list[ExposureRule] | None = None # If None, reuse seed_exposure rules - description: str | None = None # Human-readable context for this development - -# DayPhase and DayPhaseConfig — OMITTED (see "Day Phases" section above) - -class ChannelVariant(BaseModel): - when: str - template: str - -class ChannelExperience(BaseModel): - default: str - variants: list[ChannelVariant] = [] - -class ScenarioSpec(BaseModel): - meta: ScenarioMeta - event: Event # Initial event (t=0) - timeline: list[TimelineEvent] | None = None # NEW: subsequent developments - seed_exposure: SeedExposure - interaction: InteractionConfig - spread: SpreadConfig - outcomes: OutcomeConfig - simulation: ScenarioSimConfig - # day_phases — OMITTED - channel_experience: dict[str, ChannelExperience] | None = None # NEW - relationship_weights: dict[str, float] | None = None # NEW -``` - ---- - -## PHASE 3: SIMULATION - -### 3.1 Persona Generation — Rewrite - -**Current:** "You are a 43-year-old male..." + grouped attribute bullet points. - -**New:** First-person identity with named family, household context, and economic reality. - -``` -I'm Travis McAllister. I'm 43, white, living in Greenville, South Carolina with my -partner Lisa (41, retail) and our three kids — Tyler (17, about to graduate high school), -Kayla (14), and Mason (9). I work full-time in the service industry. Our household income -is about $52,000. We've got maybe one month of savings. - -My Mindset & Values -- Neuroticism: High -- Extraversion: Moderate -- Openness: Low -- Conscientiousness: Moderate -- Agreeableness: Moderate - -My Attitudes & Concerns -- Institutional Trust: Low -- AI Threat Perception: High -- Economic Anxiety: Severe -- Technology Adoption: Low -... -``` - -Key changes: -- First person ("I'm Travis" not "You are a 43-year-old") -- Partner named and described (from partner agent's attributes) -- Kids named with ages and school status (from dependent metadata) -- Household economic context (shared income, savings) -- All remaining attributes still listed (structured format, nothing filtered) - -### 3.2 Timestep Loop — Redesigned - -**Current:** Expose → Reason (Pass 1 + Pass 2) → Propagate → Aggregate → Stop check. - -**New:** Four-phase timestep with conversations. - -``` -Phase 1: EXPOSURE + CONTEXT BUILD - - Apply seed exposures for this timestep - - Apply timeline events if any scheduled for this timestep - - Propagate network exposures from previous timestep's sharers - - Build reasoning context for each agent (persona, exposures, memory, peers, mood, temporal) - -Phase 2: REASONING (parallel, all agents) - - All aware agents reason in parallel - - Single merged LLM call (no separate Pass 1 + Pass 2) - - Output: internal monologue, sentiment, conviction, public statement, - position, outcomes, elaboration, actions (talk_to, post) - - State from this phase is PROVISIONAL — conversations can override - -Phase 3: CONVERSATIONS (parallel across pairs, sequential within conflicts) - - Engine collects all talk_to actions from Phase 2 - - Builds conversation queue: - - Priority by edge weight (partner > close_friend > coworker > acquaintance) - - Non-conflicting pairs run in parallel - - Conflicting pairs (share an agent) run sequentially by priority - - Each conversation: 2 turns at medium fidelity (4 messages back-and-forth), 3 turns at high fidelity (6 messages back-and-forth). The LLM knows the turn limit so it can wrap up. - - Agent-agent: both sides are real agents, both states update independently (each agent keeps their own final state) - - Agent-NPC: NPC side generated by LLM from NPC profile, only agent state updates - - Conversation output: updated sentiment, conviction, position for EACH participant independently - - This OVERRIDES Phase 2 provisional state for agents who conversed - -Phase 4: STATE UPDATE + AGGREGATION - - Social posts collected and stored (feeds into next timestep's public discourse) - - Final state written for all agents (Phase 3 output if conversed, Phase 2 output if not) - - Sharing decisions computed (mechanical, based on will_share + spread config) - - Timestep summary computed (exposure rate, position distribution, sentiment stats) - - Stopping conditions evaluated - - Checkpoint if needed -``` - -### 3.3 Prompt Structure — Complete Rewrite - -**Current prompt:** -``` -[System: You ARE this person] -[Persona: attribute bullet points] -[Event: content block] -[Exposures: "Someone told you" x17] -[Memory: 3 summaries] -[Peer opinions: "A acquaintance says..."] -[Instructions: respond as JSON] -``` - -**New prompt (medium fidelity, weekly timestep):** - -``` -You are going to think as Travis McAllister. Everything below is from Travis's -perspective. Respond as Travis — first person, honest, unfiltered. - ---- - -I'm Travis McAllister. I'm 43, white, living in Greenville, SC with my partner -Lisa (41, retail) and our three kids — Tyler (17, about to graduate), Kayla (14), -and Mason (9). I work full-time in services. Household income ~$52K. About one -month of savings. - -[Full characteristics list] - ---- - -It's Week 3 since AI systems were announced to have superhuman performance across -all cognitive domains. - -What's happened so far: -- Week 1: AI systems publicly demonstrated superhuman performance. Fortune 50 firms - announced restructuring with major layoffs. Federal guidance unclear. -- Week 3: Government announced emergency task force but no concrete policy. - Unemployment claims spiked 40%. - -This week: -- I saw this on CNN and it was all over my X feed -- 23 people in my circle brought it up this week, including my coworker Darnell - and my neighbor Marcus -- This is the 3rd week in a row everyone around me is talking about this - -What people around me are saying: -- My partner Lisa (41, retail): "We need to be realistic about our savings. I'm - scared." — she's very worried and firm about cutting costs -- My coworker Darnell (36, services): "I signed up for some free AI tutorials. - Can't hurt." — he's anxious but doing something about it -- My neighbor Marcus (42, construction): "My job's physical, maybe I'm okay?" - — he's uncertain, trying to convince himself -- Most people I know are anxious. The mood hasn't improved since last week. - If anything, the layoff numbers made it worse. - -What I've been thinking: -- Week 1: "I'm terrified. One month of savings. Five mouths to feed. I need to - cut spending NOW and find backup work." I was panicked and certain we were in trouble. -- Week 2: "Same as last week but heavier. Lisa's right — can't afford courses. - Looking at gig apps. The anger is fading into something worse." Still anxious, - getting more resigned. - -I've been feeling panicked since this started. Last week the panic settled into -a heavy dread that hasn't lifted. I've been firm about survival-first since Week 1 -and that hasn't wavered. - ---- - -People in my life right now: -- Lisa (my partner, she's home with me) -- Tyler, Kayla, Mason (my kids, they're home) -- Darnell (my coworker, I'll see him at work) -- Marcus (my neighbor, I could text him) - -Think honestly about how this week's developments land for someone in your exact -situation. What are you actually thinking? What do you feel? What are you going to do? - -You can choose to: -- Talk to someone (pick 1-2 people from the list above) -- Post something on social media (or choose not to) - -Respond as JSON: -{ - "internal_monologue": "Raw, honest stream of thought...", - "sentiment": -0.8, - "conviction": 75, - "public_statement": "What I'd actually say out loud to people", - "position": "your primary response to this situation", - "elaboration": "Specifically what you're planning to do — concrete steps, resources, timeline, obstacles", - "actions": [ - {"type": "talk_to", "who": "Lisa", "topic": "..."}, - {"type": "post", "platform": "x", "content": "..."} - ] -} -``` - -### 3.4 Merged Pass 1 + Pass 2 (With Caveat) - -**Why we originally split into 2 passes:** Single-pass role-play + classification caused 83% central tendency — agents hedged toward safe middle options because "be this person" and "pick from these categories" competed in the same generation. - -**Why merging might work now:** The v2 merged pass is structured differently. The agent reasons freely FIRST (unconstrained monologue), then fills in structured fields AFTER — within the same generation. The classification is downstream of the reasoning, not competing with it. The reasoning comes first and informs the structured extraction. - -**This is a hypothesis that needs testing.** A/B test: run 200 agents with merged pass vs 2-pass, compare outcome distributions. If merged produces the same spread as 2-pass, keep it (saves 1 round trip per agent, ~50% fewer LLM calls). If it collapses to center, revert to 2-pass. The architecture supports both — the engine just needs a flag. - -**Note on Pass 2 context:** The current Pass 2 already receives the Pass 1 reasoning text (not completely disconnected). What it lacks is the full persona/exposures/peers — but the reasoning already reflects all of that. The real win from merging is latency reduction and cost savings, not fixing a context gap. - -The single call produces: -- Free-form reasoning (internal_monologue, elaboration) -- Structured outputs (sentiment, conviction, position, outcomes) -- Actions (talk_to, post) - -For **known outcome** scenarios, position must match one of the defined options. The prompt includes the options explicitly: - -``` -"position": one of ["pay_own_account", "cancel", "switch_service", "workaround"] -``` - -For **exploratory outcome** scenarios, position is free-form: - -``` -"position": "describe your primary response in a few words" -``` - -Classification into categories happens in `extropy results`, not during simulation. - -### 3.5 Conversation System - -When an agent's actions include `talk_to`, the engine resolves it: - -**Who the agent talks to** is LLM-driven — the agent sees their available contacts and picks who's relevant based on what THEY need right now. Travis might choose Darnell over Lisa tonight because he needs field-specific intel about automation in services, not a budget argument. The LLM makes this choice in context, so it's naturally topic-aware. - -**Conflict resolution** (when two people want to talk to the same person) uses scenario-defined `relationship_weights` × structural edge weight. These weights are auto-generated by `extropy scenario` (the compiler knows ASI is a workplace threat → coworker weight high, Netflix is a household product → family weight high) and can be overridden in the YAML. - -``` -1. Collect all talk_to requests across all agents -2. Build pairs: (initiator, target, topic, priority_score) - priority_score = structural_edge_weight × scenario_relationship_weight -3. Sort by priority_score descending -4. Identify conflicts (same agent appears in multiple pairs) -5. Non-conflicting pairs → parallel execution -6. Conflicting pairs → sequential execution, highest priority first - -For each conversation pair (medium fidelity — 2 turns / 4 messages): - Message 1: Initiator speaks (LLM call with initiator's context + topic) - Message 2: Target responds (LLM call with target's context + initiator's statement) - Message 3: Initiator replies (LLM call with updated context) - Message 4: Target wraps up (LLM call — knows this is the last message) - -For high fidelity — 3 turns / 6 messages: - Messages 1-4: Same as above - Message 5: Initiator follow-up - Message 6: Target final response (knows this is the last message) - -The LLM is told the turn limit upfront so it can wrap up naturally. - - Output for EACH participant (independent — both keep their own final state): - { - "response": "What they said", - "updated_sentiment": float, - "updated_conviction": int, - "updated_position": "if changed", - "internal_reaction": "What they actually thought during this conversation" - } -``` - -**Agent-NPC conversations:** When Travis talks to Tyler (NPC kid), the engine generates Tyler's side using a system prompt built from Tyler's NPC profile: - -``` -You are Tyler McAllister, 17 years old, a high school senior living with your dad -Travis (43, services) and mom Lisa (41, retail) in Greenville, SC. You're about -to graduate. Respond naturally as a teenager would to your dad. -``` - -Tyler's response is LLM-generated but Tyler has no persistent state. Only Travis's state updates. - -**Cost:** ~4 LLM calls per conversation at medium (2 turns), ~6 at high (3 turns). Fast model. At medium fidelity, only the top-1 edge (partner/closest) gets a conversation per timestep. At high fidelity, top 2-3 edges. - -**Conversation vs mechanical rules:** For agents who HAD a conversation this timestep, the conversation output IS their final state. Bounded confidence, flip resistance, conviction decay do NOT apply on top. These mechanical rules exist to approximate social influence when no conversation happens. For agents who did NOT converse, the mechanical rules still apply as the "passive influence" layer — the effect of scrolling past posts, overhearing things, seeing opinions without engaging. - -### 3.6 Aggregate Mood Rendering - -**Current:** TimestepSummary computed but never shown to agents. - -**New:** Aggregate mood from the agent's LOCAL NETWORK rendered as fuzzy vibes. - -```python -def render_local_mood(agent_id: str, adjacency: dict, agent_states: dict) -> str: - """Render the mood of an agent's local network as natural language.""" - neighbors = adjacency[agent_id] - sentiments = [agent_states[n].sentiment for n, _ in neighbors if agent_states[n].sentiment is not None] - - if not sentiments: - return "" - - avg = sum(sentiments) / len(sentiments) - variance = sum((s - avg) ** 2 for s in sentiments) / len(sentiments) - - # Mood label - if avg > 0.6: mood = "optimistic" - elif avg > 0.2: mood = "cautiously hopeful" - elif avg > -0.2: mood = "uncertain and mixed" - elif avg > -0.6: mood = "anxious and worried" - else: mood = "deeply fearful" - - # Consensus - if variance < 0.05: consensus = "Everyone seems to feel the same way." - elif variance < 0.15: consensus = "Most people feel similarly." - else: consensus = "Opinions are all over the place." - - return f"Most people I know seem {mood}. {consensus}" -``` - -No numbers. No pie charts. Just vibes — the way real humans sense the mood around them. - -### 3.7 Temporal Awareness - -Every prompt includes: -- **Current position in time:** "It's Week 3 since the announcement." -- **Timeline recap:** Bullet list of what's happened so far (from scenario timeline). -- **Memory timestamps:** "Week 1: I thought... Week 2: I thought..." -- **Exposure duration:** "This is the 3rd week in a row people are talking about this." -- **Emotional trajectory:** "I've been anxious since Week 1. Last week the panic settled into dread." - -All deterministic string formatting from existing data. Zero LLM calls. - -### 3.8 Memory System - -**Current:** 3-entry sliding window of 1-sentence summaries. - -**New:** Full reasoning history, timestamped, with emotional context. - -- ALL reasoning entries kept (not capped at 3) -- Each entry shows: timestep label, truncated reasoning (first 3-4 sentences of raw_reasoning), emotional state at the time -- Conviction trajectory rendered: "I've been firm about this since Week 1" or "I started certain but I've been wavering" -- If token budget is a concern: at `--fidelity low`, show last 3 full traces. At `medium`, show all. At `high`, show all + consolidated beliefs. - -### 3.9 Social Posts + Public Discourse - -When an agent's actions include `post`: -- The post content is stored with the agent's ID, timestep, and platform -- Next timestep, the engine aggregates all posts into a public discourse summary: - - "My X feed is a mix of panic and dark humor. Most posts are about job security." - - "People on Reddit are sharing workaround guides." -- The summary is rendered into prompts as part of the `social_media_exposures` slot -- Individual posts are NOT shown to other agents (too many) — only the aggregate mood of the platform - -For network contacts specifically: if Darnell posted on X AND Darnell is in Travis's network, Travis might see "Darnell posted on X: '...'" as a named peer exposure. This is higher influence than the anonymous aggregate. - -### 3.10 Cognitive Architecture (Tiered by Fidelity) - -Split into independent subsystems. Each assessed for actual value vs implementation cost. - -**Tier 1: Build (trivial, high impact — string formatting from existing data)** - -- **3.10a: Emotional trajectory rendering.** Map sentiment history to narrative: "I started panicked. By mid-week it settled into dread. It hasn't lifted." Deterministic lookup from sentiment values + trend. Gives the LLM emotional continuity between timesteps instead of starting fresh every time. Zero cost. - -- **3.10b: Conviction self-awareness.** "I've been firm about this since Week 1" or "I started certain but I've been getting less sure." Deterministic from conviction history. Enables commitment bias (consistent agents resist change) and openness (wavering agents are more receptive). Zero cost. - -**Tier 2: Build at high fidelity (medium effort, good value)** - -- **3.10c: Internal monologue vs external action (THINK vs SAY).** Schema change — output includes both `internal_monologue` (raw, honest) and `public_statement` (socially filtered). Replaces the mechanical public/private split with agent-generated divergence. An agent with high agreeableness might have a large gap between what they think and what they say — that's interesting data. Schema change only, no new system. - -- **3.10d: Repetition detection + forced deepening.** If Jaccard similarity on word-level trigrams between consecutive reasonings > 70%, inject a prompt nudge: "You've been thinking the same thing for several days. Has anything actually changed? Are you starting to doubt your plan? Have you actually done anything about it?" Simple trigram comparison, no embeddings needed. Prevents the stale convergence we saw in the ASI run ("No change — save, learn AI, backup income" × 5 timesteps). Without this, agents converge to identical outputs and the sim produces meaningless duplicate reasoning. - -**OMITTED: Marginal value** - -- **~~3.10e: Episodic vs semantic memory.~~** ~~After N timesteps of consistent reasoning on a theme, engine extracts a belief statement and adds to persistent "beliefs" field.~~ **Omitted.** The LLM already consolidates beliefs implicitly when reading its own full history. Making it explicit adds complexity for marginal gain. The full memory trace (uncapped, timestamped) provides sufficient context. - -**CUT: Not building** - -- **~~3.10f: Attention/focus weighting.~~** ~~What the agent is currently focused on determines which inputs are foregrounded in the prompt.~~ **Cut.** The LLM already does this natively — if the memory trace says "budget first," the model naturally attends to budget-related inputs. Artificially weighting prompt sections is trying to replicate what attention heads already do. Unnecessary complexity. - -**DEFERRED: Post-launch** - -- **3.10g: Spontaneous memory recall.** Memories surface by RELEVANCE to current events, not recency. Requires embedding stored memories and comparing to current context. Small embedding model on short text, cheap per-call, but needs embedding infrastructure. **Deferred because:** for most scenarios with 10-15 timesteps, recency and relevance overlap heavily — the memory that's relevant IS usually recent. This matters more for long-running sims (50+ timesteps) where early memories might be contextually triggered. Build it when we actually have that use case. - -**Fidelity tier mapping:** -| Feature | low | medium | high | -|---------|-----|--------|------| -| 3.10a emotional trajectory | Yes | Yes | Yes | -| 3.10b conviction self-awareness | Yes | Yes | Yes | -| 3.10c THINK vs SAY | No | No | Yes | -| 3.10d repetition detection | No | No | Yes | -| ~~3.10e episodic/semantic memory~~ | — | — | **Omitted** | -| ~~3.10f attention weighting~~ | — | — | **Cut** | -| 3.10g spontaneous recall | No | No | **Deferred** | - ---- - -## PHASE 4: RESULTS + ANALYSIS - -### 4.1 `extropy results` — Enhanced - -**Current:** Outcome distributions, segment breakdowns, timeline visualization. - -**New:** Same, plus elaboration clustering for exploratory outcomes. - -#### Known Outcome Results (Same as Current) - -``` -Position Distribution: - pay_own_account: 43.2% - cancel: 12.1% - switch_service: 18.7% - workaround: 15.3% - stay_shared_with_fee: 10.7% - -Segment: age_bracket - 18-25: cancel 22%, workaround 31% - 26-35: pay_own 48%, switch 23% - 36-50: pay_own 52%, stay_shared 18% - 50+: pay_own 61%, cancel 8% -``` - -#### Exploratory Outcome Results (New) - -For `type: open_ended` outcomes, the raw elaboration texts are exported as structured data. **No built-in clustering.** Post-hoc analysis (clustering, thematic coding, embedding, etc.) is done by the agentic harness or manual data science workflows — not baked into `extropy results`. - -`extropy results` exports: -``` -1. All elaboration texts with agent_id, demographics, timestep -2. Summary statistics (word count distribution, unique response count) -3. Structured JSON/CSV ready for downstream DS tooling -``` - -The real value of exploratory outcomes — discovering categories nobody would have pre-defined — comes from the analysis layer, not the simulation engine. - -#### Conversation Analysis (New) - -``` -Conversation Summary: - Total conversations: 3,847 (across 12 timesteps) - Average turns: 2.4 - State changes from conversations: 891 (23% of conversations changed someone's mind) - -Most impactful conversations (by state change magnitude): - 1. Travis ↔ Lisa (Week 1): Travis shifted from "upskilling" to "survival-first" after budget discussion - 2. Graham ↔ Sandra (Week 1): Both solidified "raise prices 10%" after doing the math together - ... - -Conversation themes (clustered): - - Financial planning (34%): Budget discussions, cost-cutting - - Emotional support (28%): Reassurance, shared anxiety - - Information sharing (22%): "Did you see...", "Have you heard..." - - Disagreement (16%): Different coping strategies, arguments -``` - ---- - -## FIDELITY TIERS - -`--fidelity low|medium|high` controls what goes into prompts and whether conversations happen. - -| Feature | **low** | **medium** | **high** | -|---------|---------|-----------|----------| -| Names & household data | Yes | Yes | Yes | -| Temporal awareness | Yes | Yes | Yes | -| Aggregate mood (local) | Yes | Yes | Yes | -| Named peer opinions | Top 5 | Top 10 + consensus signal | All connected + demographics | -| Day phase templates | Yes (if defined) | Yes | Yes | -| Channel experience | Default templates | Scenario-defined variants | Full demographic adaptation | -| Memory | Last 3 full reasoning traces | All traces, timestamped | All + consolidated beliefs | -| Emotional trajectory | Label only | Label + trend | Full trajectory narrative | -| Conversations | None | Top 1 edge (partner/closest) | Top 2-3 edges | -| Internal monologue | Not separated | Not separated | Explicit THINK vs SAY | -| Repetition detection | No | No | Yes | -| Social posts | Stored, not rendered | Stored + aggregate | Stored + aggregate + named peer posts | -| Scenario timeline | Yes | Yes | Yes | -| Pass structure | Merged (test vs 2-pass) | Merged (test vs 2-pass) | Merged (test vs 2-pass) | - -### Cost Estimates (Conservative) - -**Per-call token budgets:** - -| | Input tokens | Output tokens | -|---|---|---| -| **low** reasoning | ~2.5k | ~500 | -| **medium** reasoning | ~3.5k | ~600 | -| **medium** conversation turn | ~2k | ~200 | -| **high** reasoning | ~4.5k | ~700 | -| **high** conversation turn | ~2k | ~200 | - -**Total cost (gpt-5-mini: $0.30/$1.50 per 1M tokens, 15 timesteps):** - -| | 2k agents | 10k agents | -|---|---|---| -| **Current system** | ~$40 | ~$200 | -| **low** | ~$59 | ~$295 | -| **medium** | ~$72 | ~$360 | -| **high** | ~$99 | ~$495 | - -**Total cost (Sonnet-class: ~$3/$15 per 1M tokens, 15 timesteps):** - -| | 2k agents | 10k agents | -|---|---|---| -| **Current system** | ~$480 | ~$2,400 | -| **low** | ~$700 | ~$3,500 | -| **medium** | ~$860 | ~$4,300 | -| **high** | ~$1,180 | ~$5,900 | - -**Wall time (1k RPM, conservative):** - -| | 2k agents | 10k agents | -|---|---|---| -| **Current system** | ~30 min | ~2.5 hrs | -| **low** | ~45 min | ~4 hrs | -| **medium** | ~1.2 hrs | ~6 hrs | -| **high** | ~1.5 hrs | ~8 hrs | - -**Default:** `medium`. Best cost/quality tradeoff. Names, narrative, temporal awareness, full memory, the one conversation that matters most (partner), aggregate mood. ~$360 for 10k agents on gpt-5-mini. ~1.8x current cost for a fundamentally better simulation. - ---- - -## TENET COMPLIANCE: 12 TENETS OF HIGH-FIDELITY POPULATION SIMULATION - -The 12 tenets below define what a high-fidelity simulation must satisfy. Tenets 1-4 are about **who the agents are**, 5-8 are about **how they decide**, 9-12 are about **what shapes and connects them**. - -### Assessment Against v2 Architecture - -| # | Tenet | Status | What v2 Has | Remaining Gap | -|---|-------|--------|-------------|---------------| -| 1 | Realistic distributions | **Strong** | Household-based correlated sampling, fat-tail distributions (lognormal/beta), conditional modifiers, grounded in census/research data | Need hard calibration targets for joint distributions (e.g., income × education × race correlation matrices) | -| 2 | Information asymmetry | **Strong** | Conditional exposure rules, channel-specific credibility, network propagation with decay, scenario timeline with staggered events | — | -| 3 | Social hierarchy & influence topology | **Partial** | Structural role edges, degree multipliers in network config, edge weight hierarchy | No explicit power-law degree enforcement; no hub/opinion-leader generation. Need scenario-dependent centrality targets | -| 4 | Behavioral heterogeneity | **Partial** | Big Five personality, risk tolerance, institutional trust, cognitive attributes vary per agent | Decision-policy heterogeneity relies entirely on LLM interpretation of persona. Need explicit behavioral parameters (conformity threshold, action inertia) as agent attributes | -| 5 | Temporal dynamics & decay | **Strong** | Conviction decay, temporal prompt awareness, emotional trajectory, memory history, scenario timeline with evolving events | Need intent→action accountability loop (surface prior action_intent, ask about follow-through) | -| 6 | Social contagion & network effects | **Partial** | Network propagation, share modifiers, conversation system, aggregate mood, peer opinions | No explicit threshold/complex contagion. Need per-agent conformity parameter + conformity-aware prompt phrasing | -| 7 | Friction & transaction costs | **Weak** | option_friction on outcomes, bounded confidence mechanics | Biggest gap. Need explicit intent→behavior pipeline: surface what agent planned vs what they actually did. Friction emerges from agent constraints but isn't tracked or measured | -| 8 | Bounded rationality & heuristics | **Strong** | LLM is inherently a bounded rationality engine. Persona attributes (education, digital literacy, neuroticism) shape heuristic use. Agents satisfice, anchor, exhibit status quo bias naturally | Could strengthen with explicit bias nudges in prompts for specific attributes | -| 9 | Environmental & contextual sensitivity | **Partial** | Scenario timeline handles exogenous shocks. Channel templates adapt to agent demographics | Need ambient macro context in every prompt (economic conditions, cultural moment). Need previous-timestep macro summary injection | -| 10 | Identity & group membership | **Partial** | race_ethnicity, political_orientation, religious_affiliation in persona. Social role edges create in-group connections | Need identity-threat framing: when the scenario threatens a group identity, persona rendering should explicitly flag it as identity-relevant | -| 11 | Preference interdependence | **Partial** | Aggregate mood rendering ("most people I know are doing X"), peer opinions, social posts. Bandwagon/FOMO effects emerge from context | Named peer opinions + local mood + macro summary provide social pressure without omniscient ratio framing | -| 12 | Macro-micro feedback loops | **Partial** | Micro→macro works (agent decisions → aggregate stats). Timeline handles exogenous macro shifts | No endogenous macro: agent behavior doesn't produce emergent macro variables that feed back. Need at minimum: inject previous timestep aggregates as ambient context | - -### Concrete Fixes to Close Gaps - -These are the minimum changes needed to move every tenet to **Strong**. Listed in implementation priority order. - -#### Fix 1: Named + Temporal + Accountable Prompt Context - -**Files:** `reasoning.py`, `engine.py`, `state.py` -**Closes:** Tenets 5 (temporal), 7 (friction), 9 (context) - -- Replace all anonymous peer phrasing ("Someone in your network told you") with named + relationship context ("My coworker Darnell told me") -- Include day/week label in every prompt ("It's Week 3 since the announcement") -- Include channel experience text with credibility framing ("I saw a CNN segment" not "mainstream_news_media") -- Include local mood summary as vibes, not numbers ("Everyone around me seems scared") -- **Remove 3-entry memory cap.** Surface full reasoning history, timestamped. -- **Surface prior `action_intent` each re-reasoning step.** "Last week I said I'd sign up for a free AI course. Did I actually do it?" Forces the agent to reconcile intent with behavior. The friction between "I said I would" and "I actually did" emerges from the agent's own constraints (time, money, energy, competing priorities). This is the intent→behavior pipeline — not a separate outcome field, just prompt accountability. - -#### Fix 2: Household-First Sampling - -**Files:** `sampler/core.py`, `models/population.py` -**Closes:** Tenet 1 (realistic distributions — correlated household demographics) - -- Couple households sampled as pairs with correlated demographics (age, education, race via census joint distributions) -- Shared economic fate attributes (household_income, savings, housing) -- NPC dependent generation (kids with names, ages, school status) -- `household_id`, `partner_id`, `first_name`, `last_name`, `dependents` on every agent -- Hard calibration targets for joint distributions: use census PUMS microdata for income × education × race × age cross-tabulations. Validate sampled population against these targets. - -#### Fix 3: Role-First Network + Influence Topology - -**Files:** `network/generator.py`, `network/config.py` -**Closes:** Tenets 3 (hierarchy/topology), 10 (identity/group membership) - -- Structural edges first (partner, household, coworker, neighbor, congregation, school_parent) — these are deterministic from agent attributes -- Similarity edges fill remaining degree budget -- Calibration loop CANNOT delete structural edges -- **Power-law degree enforcement (scenario-dependent):** Network config gets a `degree_distribution_target` field. For scenarios with opinion leaders (ASI, political), target a power-law with configurable exponent. For scenarios without (Netflix, product change), target a more uniform degree distribution. The scenario compiler generates this based on the event type. -- **Identity clustering:** Agents sharing identity-relevant attributes (political_orientation, religious_affiliation, race_ethnicity) get higher intra-group edge density. When the scenario involves identity threat (Bud Light, political events), the network config increases in-group clustering for the relevant identity dimension. Implemented via targeted blocking attributes in the existing calibration system. - -#### Fix 4: Contagion Thresholds + Macro Feedback - -**Files:** `engine.py`, `reasoning.py`, `models/simulation.py` -**Closes:** Tenets 6 (contagion), 9 (environmental context), 11 (preference interdependence), 12 (macro-micro feedback) - -**Soft conformity/threshold behavior:** -- Add `conformity` as a standard personality attribute (0-1 scale, correlated with agreeableness). Sampled at population creation time. -- Inject conformity self-awareness into prompt: "I tend to go along with what most people around me are doing" (high) or "I tend to form my own opinion regardless of what others think" (low). Mid-range agents get no explicit phrasing. -- Social pressure is conveyed through **existing mechanisms**, not explicit ratios: - - Named peer opinions: "My coworker Darnell thinks X" - - Local mood rendering: "Most people around me seem worried" - - Macro summary: "The general mood is shifting toward X" -- **Rationale:** People don't actually know "7 out of 10 contacts did X" — that's omniscient narrator framing. Real social pressure comes from specific conversations and vague impressions, which the peer opinion and mood systems already capture. - -**Macro state feedback:** -- After each timestep, compute macro summary from TimestepSummary data: - - Position distribution rendered as "Most people are choosing X. A growing minority is doing Y." - - Sentiment trend: "The general mood is getting worse / stabilizing / improving." - - Exposure saturation: "Almost everyone has heard about this now." - - Action momentum: "More and more people are taking action" / "Most people are still waiting" -- Inject this into every agent's next-timestep prompt as ambient context, rendered as what the agent would sense from media/social feeds, not raw numbers. -- This closes the macro→micro loop: agent decisions → aggregate stats → rendered as ambient context → influences next round of agent decisions. - -**Ambient scenario context:** -- ScenarioSpec gets an optional `background_context` field: "The US economy is in a mild recession. Unemployment was at 4.5% before the AI announcement. It's early spring." -- Injected into every prompt as ambient framing. Helps agents reason about environmental context beyond just the focal event. - -#### Fix 5: Backtesting Harness - -**Files:** `tests/`, new `extropy/validation/` module -**Closes:** Validation across all tenets + falsifiability + uncertainty quantification - -**Historical replay suites:** -- Curate ground-truth datasets for completed scenarios where actual outcomes are known: - - Netflix password crackdown (actual churn rate, account creation rate by demographic) - - Bud Light boycott (actual sales drop by region, recovery timeline) - - London ULEZ expansion (compliance rate, protest participation, price pass-through) -- Run sim on these scenarios with matched population demographics -- Compare sim output distributions to actual observed outcomes - -**Acceptance gates:** -- Per-tenet metrics: - - Tenet 1 (distributions): KL divergence between sampled population and census targets < threshold - - Tenet 3 (topology): Degree distribution fits target (power-law exponent within ±0.2) - - Tenet 6 (contagion): Adoption curve shape matches empirical S-curves (timing, steepness) - - Tenet 7 (friction): Intent-to-behavior conversion rate within 2x of observed real-world rates -- Aggregate error: mean absolute error on outcome distribution vs ground truth < 15% -- Uncertainty quantification: run same scenario with 5 different seeds, report mean ± std on all metrics. If std > 20% of mean on key outcomes, the sim is too noisy. - -**Reproducibility:** -- All runs seeded and deterministic given same seed + same model -- Results include full provenance: model version, prompt templates, scenario YAML hash, population seed - ---- - -## VALIDATION & EVALUATION PLAN - -### Output Quality - -1. **A/B comparison:** Run same population + scenario through old system and new system (medium fidelity). Blind human eval on 50 agent outputs: "Which reads more like a real person's reasoning?" Measure win rate. - -2. **Outcome distribution stability:** Run same scenario at low/medium/high fidelity. Outcome distributions should be SIMILAR — fidelity controls richness of reasoning, not WHAT people decide. If distributions diverge significantly across tiers, the richer prompts are causing systematic bias. - -3. **Hallucination audit:** Sample 100 agent outputs. Check every factual claim against the prompt context. Agents should not invent information not in their exposures/memory/peers. Richer prompts = more grounding = less hallucination expected, but verify. - -### Conversation Quality - -4. **In-character consistency:** Sample 50 conversations. Both agents should stay in character (demographics, personality, relationship). Neither should suddenly become eloquent if their persona is low-education. - -5. **State change plausibility:** For conversations that changed an agent's position, verify the change makes sense given what was said. "Lisa convinced Travis to focus on cash" should show Lisa making a compelling financial argument, not Travis randomly flipping. - -### Elaboration Quality - -6. **Scenario awareness:** Elaborations should be contextually appropriate. ASI scenario should NOT produce "I'll take an online course" if the premise is superhuman AI. Netflix scenario should NOT produce existential crisis responses. - -7. **Demographic consistency:** An agent with `digital_literacy: basic` should not describe a plan involving "fine-tuning open-source models." Elaborations should reflect the agent's actual capabilities and constraints. - -### Exploratory Outcome Validation - -8. **Export completeness:** For exploratory outcomes, verify all agent elaborations are exported with correct agent_id, demographics, and timestep. Downstream analysis (clustering, thematic coding) is done by the agentic harness or manual DS workflows — not validated by the engine. - ---- - -## IMPLEMENTATION ORDER - -Aligned with both the original issue priorities AND the tenet-closing fixes above. - -### Phase A: Prompt Overhaul — Named, Temporal, Accountable (~1.5 weeks) - -**Files:** `reasoning.py`, `persona.py`, `engine.py`, `state.py` -**Tenet fixes:** 5 (temporal), 7 (friction/accountability), 8 (bounded rationality via better prompts) - -- Agent names from SSA + census data (bundled CSV, zero API calls) -- First-person prompt voice ("I'm Travis" not "You are a 43-year-old") -- Temporal awareness: timestep + unit in prompt, timestamped memory -- Full memory: remove 3-entry cap, surface raw_reasoning with timestamps -- **Intent accountability:** surface prior `action_intent` in re-reasoning prompt ("Last week you said you'd X. Did you?") -- Named peer opinions (use agent names from population, relationship type from network edge) -- Channel experience rendering (experiential text, not channel labels) -- Local mood summary (vibes from local network, not global numbers) -- Macro summary injection (previous timestep aggregates as ambient context) - -Ship this alone. Every simulation immediately feels more human, and the accountability loop closes the intent→behavior gap. - -### Phase B: Household Sampling + Role Network (~2.5 weeks) - -**Files:** `sampler/core.py`, `models/population.py`, `network/generator.py`, `network/config.py` -**Tenet fixes:** 1 (realistic joint distributions), 3 (influence topology), 10 (identity/group membership) - -- Household-based sampling (couples co-sampled, NPC dependents generated) -- `household_id`, `partner_id`, `first_name`, `last_name`, `dependents` on agents -- Joint distribution calibration targets from census PUMS data -- Structural edge generation: partner, household, coworker, neighbor, congregation, school_parent -- Similarity edges fill remaining degree budget -- Structural edges protected from calibration pruning -- Scenario-dependent degree distribution targets (power-law for opinion-leader scenarios, more uniform for product scenarios) -- Identity clustering: in-group edge density boost for identity-relevant attributes -- `conformity` as standard personality attribute (for threshold behavior in Phase C) - -### Phase C: Contagion + Scenario Timeline + Macro Feedback (~1.5 weeks) - -**Files:** `models/scenario.py`, `engine.py`, `reasoning.py` -**Tenet fixes:** 6 (contagion thresholds), 9 (environmental context), 11 (preference interdependence), 12 (macro-micro feedback) - -- Scenario timeline: sequence of events at specified timesteps -- Timeline injection into agent prompts as "what's happened since last time" -- Named peer opinions + local mood convey social pressure without explicit ratios -- Conformity-aware prompt rendering ("You tend to wait for others / act independently") -- Ambient scenario context field (`background_context` in ScenarioSpec) -- Macro state feedback: timestep aggregates rendered as ambient vibes in next prompt -- Merged Pass 1 + Pass 2 (with A/B test against 2-pass to validate no central tendency regression) -- Outcome track inference (known vs exploratory from schema) - -### Phase D: Conversations + Narrative Prompts (~2 weeks) - -**Files:** `engine.py`, new `conversation.py`, `reasoning.py` -**Prerequisite:** DB schema for conversations/posts/action_history defined before starting. - -- Conversation resolution: priority queue using scenario `relationship_weights` × structural edge weight -- Agent-agent conversations: 2 turns at medium fidelity (4 messages), 3 turns at high (6 messages). LLM told the turn limit upfront. Both agents keep their own independent final state. -- Agent-NPC conversations (LLM-generated NPC responses from profile) -- Phase 2 reasoning is provisional; Phase 3 conversation overrides -- Mechanical rules (bounded confidence, flip resistance) only for agents who didn't converse -- Day phase templates (optional, adapts to timestep unit) -- Social posts + public discourse aggregation - -### Phase E: Cognitive Architecture — COMPLETE ✓ - -**Files:** `reasoning.py`, `engine.py`, `text_utils.py` - -- ✅ Emotional trajectory rendering (all tiers — deterministic string formatting) -- ✅ Conviction self-awareness (all tiers — deterministic) -- ✅ THINK vs SAY separation (high fidelity — prompt-only, uses `reasoning` field) -- ✅ Repetition detection + deepening nudge (trigram Jaccard >70% threshold) -- ~~Episodic/semantic memory consolidation~~ — **Omitted** - -### Phase F: Fidelity Tiers + Results — COMPLETE ✓ - -**Files:** `engine.py`, `reasoning.py`, `aggregation.py`, CLI - -- ✅ `--fidelity low|medium|high` flag on `SimulationRunConfig` -- ✅ Fidelity-gated feature inclusion (conversations, memory depth, peer limits 5/5/10) -- ✅ Exploratory outcome export (`elaborations.csv` with agent demographics + all outcomes) -- ✅ Conversation analysis (`compute_most_impactful_conversations` — ranks by sentiment+conviction delta) -- ✅ Social posts export (`social_posts.json`) - -### Phase G: Backtesting Harness — DEFERRED - -**Files:** `tests/`, new `extropy/validation/` module - -- Historical replay suites: Netflix, Bud Light, ULEZ (curate ground truth data) -- Per-tenet acceptance metrics (distribution KL divergence, adoption curve shape, intent-to-behavior conversion) -- Aggregate error gates (MAE < 15% on outcome distributions) -- Uncertainty quantification (5-seed runs, report mean ± std) -- Reproducibility: full provenance in results (model version, prompt hash, scenario hash, seed) - -**Total estimated: ~13 weeks for full v2.** - -**Status: Phases A-F COMPLETE.** Phase G (backtesting) is deferred — requires curating ground-truth datasets for historical scenarios. diff --git a/docs/skill-rewrite-plan.md b/docs/skill-rewrite-plan.md deleted file mode 100644 index 3ed84ef..0000000 --- a/docs/skill-rewrite-plan.md +++ /dev/null @@ -1,206 +0,0 @@ -# Plan: Rewrite Extropy Skills - -## Execution Timing - -**WAIT for pending CLI changes before executing this plan.** - -Known pending changes: -- `network --generate-config` becoming default behavior -- [Any other CLI changes in progress] - -Once CLI is stable, execute this plan against the final CLI state. - ---- - -## Context - -The current Extropy skills (6 files, ~1,667 lines) are outdated: -1. **Wrong CLI patterns**: Reference old commands (`extend`, `--study-db` everywhere) that no longer exist -2. **Missing the craft**: Don't teach HOW to write good spec/scenario prompts - just list commands -3. **No real examples**: Generic descriptions instead of concrete, annotated examples -4. **Over-fragmented**: 6 files is too many; user wants 2 focused files - -The user provided excellent guidance on what makes good vs bad prompts (see conversation above), plus real examples (ASI announcement, crypto airdrop, inflation shock, Netflix password sharing). - -## Goals - -1. Teach the **craft** of writing good spec and scenario prompts -2. Use **current CLI** patterns (`spec → scenario → persona → sample → network → simulate`) -3. Include **annotated real examples** showing why they work -4. Consolidate to **2 files**: SKILL.md (the craft) + REFERENCE.md (commands/troubleshooting) - ---- - -## File Structure - -### SKILL.md (~500 lines) -The main skill entry point. Focuses on **understanding Extropy** and **writing effective prompts**. - -**Sections:** -1. **What Extropy Is** (~50 lines) - - The pitch: **Predictive intelligence through population simulation** (not surveys, not polls) - - Synthetic agents grounded in real-world distributions, connected in social networks, each reasoning individually via LLM - - What you get back: - - Distributional predictions by segment - - **Open-ended responses** when you don't know the outcome space (let agents tell you what they'd do, discover categories post-hoc) - - Reasoning traces explaining *why* - - Opinion dynamics over time - - Network effects and conversation transcripts - -2. **What It Can and Can't Do** (~30 lines) - - Works well: policy, pricing, product, crisis, messaging, community - - Limitations: no org charts, no real-time, no individual prediction - -3. **The Craft of Spec Prompts** (~100 lines) - - Mental model: "Constrain WHO, let LLM discover WHAT" - - Spec creates reusable base population; scenario extends it - - **Bad patterns** with examples: - - Too vague: "Americans" - - Too prescriptive: dictating exact brackets - - Too narrow: over-specialized for one scenario - - **Good patterns** with examples: - - Clear population boundary - - General attitudinal/psychological dimensions (trust, risk, tech adoption) - - Reusable across scenarios - - **Annotated example**: The US adults spec from user's chat - -4. **The Craft of Scenario Prompts** (~150 lines) - - Mental model: Scenario extends base with event-specific attributes - - **The evolving test**: "Does the network change the outcome?" - - Non-evolving: concrete personal decisions, population heterogeneity is the story (Netflix) - - Evolving: information/credibility dynamics, social influence matters (ASI) - - **Bad patterns**: - - Too abstract: no concrete details - - Predetermined framing: telling agents how to feel - - Wrong timeline choice: evolving when should be static, or vice versa - - Too many timeline events: drowns out network propagation - - Wrong timestep granularity - - **Good patterns**: - - Concrete and specific: named entities, exact numbers - - Neutral framing: present facts, let agents disagree - - Strategic timeline events: 2-4 max, spaced for propagation - - **Timestep table**: hours/days/weeks/months with use cases - - **Annotated examples**: - - Non-evolving: Netflix password sharing (from extropy.run) - - Evolving: ASI announcement (from user's chat) - - Edge case: Inflation shock (hybrid dynamics) - -5. **Quick Pipeline** (~50 lines) - - Current CLI flow with correct commands - - Study folder structure - - Common flags - -6. **Fidelity and Cost** (~30 lines) - - Low/medium/high tiers - - When to use each - - Cost estimates - -7. **Operating Mode** (~40 lines) - - **Always set `cli.mode agent`** at start of session for JSON output - - Model configuration: `extropy config set simulation.strong`, etc. - - **Escalation policy**: When to stop and ask user vs proceed autonomously - - Escalate: same error twice, core assumptions change, cost vs accuracy tradeoff, sensitive content - - Don't escalate: normal pipeline execution, validation passes, expected behavior - - **Non-interactive flags**: `-y` to skip confirmations, `--use-defaults` for spec - -8. **Module Reference** (~20 lines) - - Points to REFERENCE.md for commands, troubleshooting, analysis - -### REFERENCE.md (~400 lines) -Condensed operational reference. Everything you need to run simulations. - -**Sections:** -1. **Command Reference** (~150 lines) - - Condensed from docs/commands.md - - Each command: purpose, key flags, example - - Focus on most-used options, not exhaustive - -2. **Study Folder Structure** (~30 lines) - - Directory layout - - File naming conventions (v1, v2, etc.) - -3. **Results & Analysis** (~80 lines) - - Condensed from ANALYSIS.md - - How to read results - - Segment analysis - - Agent deep dives - - Export commands - -4. **Troubleshooting** (~100 lines) - - Condensed from TROUBLESHOOTING.md - - Common failure patterns - - Quality gates (quick checklist) - - When to escalate - -5. **Configuration** (~60 lines) - - **Agent mode setup**: `extropy config set cli.mode agent` - - Model configuration: - - `models.strong` / `models.fast` for pipeline (spec, scenario, persona) - - `simulation.strong` / `simulation.fast` for simulation passes - - API keys (env vars): OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY, DEEPSEEK_API_KEY, AZURE_API_KEY - - Rate limiting: `simulation.rate_tier`, RPM/TPM overrides - - Typical config for agent use: - ```bash - extropy config set cli.mode agent - extropy config set models.strong openai/gpt-5 - extropy config set simulation.strong anthropic/claude-sonnet-4-6 - ``` - ---- - -## Files to Delete - -After creating new SKILL.md and REFERENCE.md, delete: -- `skills/extropy/OPERATIONS.md` (absorbed into REFERENCE.md) -- `skills/extropy/SCENARIOS.md` (absorbed into SKILL.md) -- `skills/extropy/ANALYSIS.md` (absorbed into REFERENCE.md) -- `skills/extropy/TROUBLESHOOTING.md` (absorbed into REFERENCE.md) -- `skills/extropy/REPORT_TEMPLATE.md` (delete - too rigid, Claude can generate reports on demand) - ---- - -## Key Content to Include - -### Spec Example (Good) -```bash -extropy spec "Nationally representative US adult population (18-80). Must capture the demographic, economic, and attitudinal fault lines that drive divergent responses to major national events — especially technology disruption, economic shocks, and cultural controversies. Beyond standard demographics, prioritize attributes that determine HOW people process and react to news: technology adoption posture, media ecosystem and information sources, institutional trust level, financial margin and economic anxiety, consumer identity and brand relationship patterns, social media behavior and influence. Geographic distribution should span urban/suburban/rural across all major US regions." -o population.v1.yaml -y -``` - -**Why it works**: Defines boundary (US adults 18-80), hints at behavioral dimensions without dictating exact categories, includes attitudinal layer (trust, tech adoption, media habits), reusable across many scenarios. - -### Scenario Example - Non-Evolving (Netflix) -```bash -extropy scenario "Netflix announces enforcement of password sharing policy. Subscribers who share their password with people outside their household must either: pay $8/month for an extra member slot, remove shared users, or accept that shared users will be blocked. The policy takes effect in 30 days. Coverage is widespread across tech news, social media, and mainstream outlets." -o netflix-password -y -``` - -**Why non-evolving**: The decision is concrete and personal. Population heterogeneity (income, household composition, alternatives awareness) drives the interesting splits. My neighbor's opinion doesn't change whether I can afford $8/month. - -### Scenario Example - Evolving (ASI) -```bash -extropy scenario "OpenAI holds a press conference announcing they have achieved artificial superintelligence — a system that demonstrably exceeds human cognitive ability across every domain. Sam Altman presents benchmark results showing the system outperforms top experts in science, law, medicine, strategy, and creative reasoning. The announcement is covered live on all major networks. Timeline events: Day 1 - OpenAI's announcement and initial reactions. Day 3 - Anthropic and Google DeepMind release statements confirming they have independently reached similar capabilities. Day 5 - xAI and Meta confirm the same; Congress announces emergency hearings. Day 7 - Deloitte announces it will replace 30% of its workforce with AI systems within 12 months." -o asi-announcement --timeline evolving -y -``` - -**Why evolving**: Information/credibility dynamics matter. Day 1 people can dismiss as hype. By Day 5 when every lab confirms, denial breaks. Day 7 makes it personal. Network propagation happens in the gaps between events. - -### The Evolving Test -> "Does the network change the outcome? If agents talking to each other would meaningfully shift results compared to running independent LLM calls, use evolving. If not, non-evolving is cleaner and more honest." - -### Timestep Table -| Unit | Use When | -|------|----------| -| Hours | Active crisis, market crash, disaster response | -| Days | Viral news, product launches, policy announcements | -| Weeks | Adoption curves, behavior change, campaign effects | -| Months | Cultural shifts, market trends, policy adaptation | - ---- - -## Verification - -After implementation: -1. Run `extropy --help` and verify all referenced commands exist -2. Run through quick pipeline example to ensure commands work -3. Check that SKILL.md frontmatter is valid YAML -4. Verify cross-references between SKILL.md and REFERENCE.md are correct -5. Test that skill loads in Claude Code: `/extropy` - diff --git a/docs/use-cases.md b/docs/use-cases.md deleted file mode 100644 index 65dc2c2..0000000 --- a/docs/use-cases.md +++ /dev/null @@ -1,194 +0,0 @@ -# Use Cases - -What Extropy can simulate — and what it can't. - ---- - -## What Extropy Is Built For - -Extropy simulates **targeted synthetic populations** — statistically grounded yet semantically enriched groups of heterogeneous agents. It models how real populations respond to events by combining: - -1. **Statistical grounding** — Real-world distributions (census, research) with source citations for every attribute -2. **Semantic extrapolation** — LLM-inferred psychographic and behavioral attributes derived from grounded demographics -3. **Social propagation** — Network-based information spread where agents influence each other through semantic arguments, not just labels -4. **Temporal dynamics** — Multi-timestep belief evolution with conviction, memory, and flip resistance - -The output is distributional predictions segmented by any attribute — not a single number, but a picture of who does what and why. - ---- - -## Scenario Categories - -### Market Research & Consumer Behavior - -**Synthetic survey replacement.** Traditional surveys take weeks, cost $50k+, and capture stated preferences rather than likely behavior. Extropy simulates the population and measures behavioral intent. - -```bash -extropy spec "2,000 US women aged 25-45 who regularly purchase skincare products" -o skincare/base.yaml -extropy extend skincare/base.yaml \ - -s "Launch of a $65 retinol serum positioned as clean beauty, sold DTC only" \ - -o skincare/population.yaml -``` - -The attribute discovery layer finds what actually matters for *this* population — ingredient sensitivity, brand loyalty patterns, price anchoring from current routine spend, clean beauty ideology, social media influence susceptibility — rather than forcing generic demographic buckets. - -**Outputs:** Purchase intent distribution, price sensitivity curves by segment, channel resistance (DTC-only vs. retail preference), word-of-mouth likelihood through the network. - -**Why simulation beats surveys:** People say one thing in surveys and do another. Self-reported willingness-to-pay runs 2-3x higher than actual behavior. Agents reason through real trade-offs rather than performing for an interviewer. - ---- - -### Pricing Strategy & Elasticity - -**Use case:** Predicting behavioral response to price changes in context — with competing budget pressures, inertia, and social influence. - -```bash -extropy spec "1,500 US households currently subscribing to 2+ streaming services" -o streaming/base.yaml -extropy extend streaming/base.yaml \ - -s "Netflix announces a $5/month price increase across all tiers" \ - -o streaming/population.yaml -``` - -**Discovered attributes:** Current monthly entertainment spend, service stacking behavior, content consumption patterns, churn history, password-sharing arrangements, free alternative awareness. - -**Outputs:** Churn probability by segment, downgrade-to-ad-tier likelihood, substitution patterns (which competitor captures defectors), and time-to-churn curves. Network propagation shows how "everyone's canceling" sentiment spreads through social clusters. - ---- - -### Public Policy & Compliance - -**Use case:** Simulating compliance with mandates in heterogeneous, culturally distinct populations to identify friction points before implementation. - -```bash -extropy spec "500 Austin TX commuters who drive into downtown for work" -o austin/base.yaml -extropy extend austin/base.yaml \ - -s "Response to a $15/day downtown congestion tax during peak hours" \ - -o austin/population.yaml -``` - -**Outputs:** Mode shift predictions, revenue projections based on actual likely compliance, protest/opposition intensity by segment, equity analysis showing disproportionate burden on populations without transit access. - -**Why this matters:** New York's congestion pricing launched after years of debate with minimal behavioral modeling. Stockholm's success vs. Manchester's referendum failure shows the same policy produces radically different outcomes depending on the population. - ---- - -### Product Launch & Adoption Curves - -**Use case:** Predicting adoption patterns for complex products where utility isn't the only factor. - -```bash -extropy spec "2,000 practicing physicians who currently prescribe GLP-1 agonists" -o glp1/base.yaml -extropy extend glp1/base.yaml \ - -s "FDA approves an oral GLP-1 alternative at 40% lower cost with comparable efficacy" \ - -o glp1/population.yaml -``` - -**Discovered attributes:** Formulary access patterns, pharma rep relationships, patient population severity, prior authorization fatigue, comfort with newer molecules, peer network influence from KOLs, insurance mix. - -**Outputs:** Adoption curve by physician segment, switching triggers and barriers, time-to-adoption distribution. Network propagation shows how endorsements cascade through academic affiliations. - ---- - -### Political & Message Testing - -**Use case:** Testing messaging on granular voter segments to understand resonance before deployment. - -```bash -extropy spec "5,000 registered voters in Pennsylvania Congressional District 7" -o pa7/base.yaml -extropy extend pa7/base.yaml \ - -s "Candidate proposes eliminating the carried interest tax loophole" \ - -o pa7/population.yaml -``` - -**Discovered attributes:** Local economic exposure, tax policy awareness, partisan lean at precinct level, media diet composition, issue salience rankings. - -**Outputs:** Vote shift probability, enthusiasm impact, and — critically — how the message propagates differently through different social clusters within the same district. - ---- - -### Crisis Response & Reputation - -**Use case:** Pre-testing crisis responses against a synthetic population of actual stakeholders. - -```bash -extropy spec "3,000 active customers of a mid-tier US airline" -o airline/base.yaml -extropy extend airline/base.yaml \ - -s "Viral video of passenger being forcibly removed from overbooked flight" \ - -o airline/population.yaml -``` - -**Outputs:** Customer defection probability by loyalty tier, social media amplification likelihood, boycott participation rates. Test multiple response strategies (apology, deflection, policy change) against the same population. - ---- - -### Information Spread & Narrative Resilience - -**Use case:** Modeling how misinformation spreads and mutates within specific demographic bubbles. - -```bash -extropy spec "1,000 residents of a coastal town" -o coastal/base.yaml -extropy extend coastal/base.yaml \ - -s "Rumor spreads that the water supply is contaminated, contradicting official reports" \ - -o coastal/population.yaml -``` - -**Discovered attributes:** Institutional trust, media literacy, information source preference (social media vs. official news), anxiety level. - -**Outputs:** Which demographic groups are most susceptible, how the rumor propagates through trust-based clusters, and where targeted communication interventions would be most effective. - ---- - -### Real Estate & Community Response - -**Use case:** Predicting community response to development proposals beyond the vocal minority. - -```bash -extropy spec "1,000 residents within 2 miles of a proposed development site in East Austin" -o dev/base.yaml -extropy extend dev/base.yaml \ - -s "Proposal for a 400-unit mixed-use development with 15% affordable units" \ - -o dev/population.yaml -``` - -**Outputs:** Support/opposition distribution, the specific concerns driving opposition (traffic vs. character vs. displacement), identification of persuadable segments, and how opposition organizes through the social network. - ---- - -## Cross-Cutting Strengths - -**Discovered schemas beat templates.** Skincare buyers, Pennsylvania voters, and GLP-1 prescribing physicians require completely different attribute schemas. The attribute discovery layer finds what matters for each population rather than forcing generic demographic templates. - -**Network propagation is the differentiator.** Most synthetic survey tools generate independent agents. Extropy's social network layer captures how opinions spread, cluster, and cascade through real social structures — the thing surveys fundamentally cannot measure. - -**Two-pass reasoning eliminates central tendency.** Pass 1 (freeform reasoning) -> Pass 2 (classification) prevents the LLM from collapsing everything to safe middle responses. - -**The spec-as-IR pattern enables continuous intelligence.** Once a population spec is built, the same base can be re-extended for new scenarios without rebuilding — ongoing monitoring rather than one-off studies. - ---- - -## What Extropy Does NOT Do - -Extropy simulates **populations** (social graphs), not **organizations** (hierarchies) or **physics** (spatial systems). - -### Rigid Organizational Hierarchy - -Agents are independent nodes in a social network, not positions in an org chart. Extropy cannot model reporting lines, workflow dependencies, or strict cardinalities ("there can be only one CEO"). - -**Not supported:** "How will the approval chain break down if the VP quits?" - -### Physical & Spatial Logistics - -Geography in Extropy is a semantic label ("Austin"), not a coordinate system. No distance, velocity, collision, or capacity. - -**Not supported:** "Optimize warehouse foot traffic" or "Evacuation route bottlenecks." - -### High-Frequency Quantitative Models - -LLM reasoning is semantic and probabilistic, not mathematically precise or real-time. - -**Not supported:** "Predict millisecond price fluctuations after a rate hike." - -### Reactive Game-Master Loops (Current Limitation) - -Extropy supports pre-authored multi-event timelines (events scheduled across timesteps), including evolving scenarios where new information changes agent reasoning over time. - -What remains limited is fully reactive event generation during the run ("if adoption drops below 30%, inject a rescue policy"), which requires a game-master/controller loop not yet built into the core CLI flow. diff --git a/examples/logs/20260217_202952_563342_claude_reasoning_call.json b/examples/logs/20260217_202952_563342_claude_reasoning_call.json deleted file mode 100644 index 4d667ca..0000000 --- a/examples/logs/20260217_202952_563342_claude_reasoning_call.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "timestamp": "2026-02-17T20:29:52.563391", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 20420 - }, - "response": { - "id": "msg_01QUaPsY7Qp6aCqDbpyRbJZk", - "content": [ - { - "id": "toolu_015zC8UGqWoZgbLmgF99QE6R", - "input": { - "attributes": [ - { - "name": "asi_belief_prior", - "type": "categorical", - "category": "population_specific", - "description": "Prior disposition toward believing ASI is possible or imminent before the demonstration (Believer/expected it, Open skeptic, Dismissive skeptic, Never thought about it)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "technology_adoption_posture", - "education_level" - ], - "identity_type": null - }, - { - "name": "ai_literacy_level", - "type": "categorical", - "category": "population_specific", - "description": "Practical understanding of how AI systems work and their capabilities (Expert, Proficient, Basic, Minimal/none)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation_sector" - ] - }, - { - "name": "occupation_automation_exposure", - "type": "categorical", - "category": "population_specific", - "description": "Degree to which the agent's occupation is rendered redundant by ASI-level cognitive capability (Fully redundant, Highly exposed, Partially exposed, Low exposure, Not applicable/already not working)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation_sector", - "employment_status", - "education_level" - ] - }, - { - "name": "personal_health_stake", - "type": "categorical", - "category": "population_specific", - "description": "Degree to which the agent or immediate family has a serious illness that ASI-produced cures could directly address (High/active serious illness, Moderate/chronic condition, Low/minor conditions, None)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "age", - "has_children" - ] - }, - { - "name": "asi_governance_stance", - "type": "categorical", - "category": "population_specific", - "description": "Preferred approach to governing ASI development and deployment (Government-led strict regulation, International treaty control, Light-touch oversight, Corporate self-governance, No regulation needed)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_orientation", - "institutional_trust_level" - ] - }, - { - "name": "existential_risk_concern", - "type": "categorical", - "category": "population_specific", - "description": "Level of concern that self-improving ASI poses an existential or civilizational risk to humanity (Extreme concern, Significant concern, Moderate concern, Minimal concern, No concern)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "asi_belief_prior", - "neuroticism" - ] - }, - { - "name": "corporate_concentration_concern", - "type": "categorical", - "category": "population_specific", - "description": "Concern about a small number of corporations or individuals controlling ASI and its benefits (Very concerned, Somewhat concerned, Neutral, Not concerned)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_orientation", - "institutional_trust_level" - ] - }, - { - "name": "asi_adoption_intent", - "type": "categorical", - "category": "population_specific", - "description": "Expressed intent to personally use ASI-powered tools once publicly available (Already using, Will adopt immediately, Will wait and see, Will resist unless necessary, Will avoid entirely)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "technology_adoption_posture", - "ai_literacy_level" - ] - }, - { - "name": "geopolitical_china_asi_concern", - "type": "categorical", - "category": "population_specific", - "description": "Level of concern about China's reported prior ASI achievement and its implications for US national security and global order (Extreme concern, Significant concern, Moderate concern, Minimal concern, U...[truncated]", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_orientation", - "institutional_trust_level" - ] - }, - { - "name": "economic_disruption_anxiety", - "type": "categorical", - "category": "population_specific", - "description": "Anxiety level about personal financial and career disruption caused by ASI-driven labor market transformation (Severe, High, Moderate, Low, None)", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation_automation_exposure", - "financial_margin_status" - ] - }, - { - "name": "abundance_optimism", - "type": "float", - "category": "personality", - "description": "Stable disposition to believe that technological progress and ASI-driven abundance will materially improve human life, on a 0\u20131 scale", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "risk_tolerance" - ] - }, - { - "name": "information_verification_behavior", - "type": "categorical", - "category": "population_specific", - "description": "How the agent verifies extraordinary claims like the ASI demonstration before updating beliefs (Rigorous multi-source verification, Moderate cross-checking, Trusts primary source, Trusts social networ...[truncated]", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "conscientiousness", - "institutional_trust_level" - ] - } - ], - "include_big_five": false, - "notes": "Big Five traits already exist in the base population. This overlay focuses on 12 new attributes specifically relevant to an ASI demonstration scenario: (1) prior beliefs and literacy about AI (asi_bel...[truncated]" - }, - "name": "attribute_selection", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 6210, - "output_tokens": 1619, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_205931_137768_claude_simple_call.json b/examples/logs/20260217_205931_137768_claude_simple_call.json deleted file mode 100644 index 9d9ae24..0000000 --- a/examples/logs/20260217_205931_137768_claude_simple_call.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "timestamp": "2026-02-17T20:59:31.137805", - "function": "simple_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 2578 - }, - "response": { - "id": "msg_01ULA2yc6b3GoZb5dTFo9FVC", - "content": [ - { - "id": "toolu_01HKtFFjFKEgdK1Wm2L5yYSS", - "input": { - "sufficient": true, - "geography": "US", - "agent_focus": "US adults representative of the national population, focused on opinion formation on national policy issues", - "agent_focus_mode": "primary_only", - "clarifications_needed": [], - "questions": [] - }, - "name": "sufficiency_check", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1798, - "output_tokens": 144, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_210128_695510_claude_agentic_research.json b/examples/logs/20260217_210128_695510_claude_agentic_research.json deleted file mode 100644 index 2a4543a..0000000 --- a/examples/logs/20260217_210128_695510_claude_agentic_research.json +++ /dev/null @@ -1,1079 +0,0 @@ -{ - "timestamp": "2026-02-17T21:01:28.695664", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 3605 - }, - "response": { - "id": "msg_01WT3QxyjKLXwpcnjspNpUYa", - "content": [ - { - "id": "srvtoolu_017wqhn1RWHh91RqMty2HPX8", - "input": { - "query": "US adult population age distribution 2023 census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01YXrCrV2PYr5aSURtFyfPaq", - "input": { - "query": "US gender identity distribution adults 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_016qFvALxZdYXNgvWLTEyeUP", - "input": { - "query": "US state population distribution 2023 census proportional" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4172]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3912]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1920]", - "page_age": null, - "title": "Census Bureau Releases New U.S. Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2023/population-estimates-age-sex.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3428]", - "page_age": null, - "title": "America Is Getting Older", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2023/population-estimates-characteristics.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6480]", - "page_age": "12 hours ago", - "title": "US population by year, race, age, ethnicity, & more | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2452]", - "page_age": null, - "title": "Adult Population by Age Group Statistics", - "type": "web_search_result", - "url": "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7452]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1500]", - "page_age": null, - "title": "2023 Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3388]", - "page_age": null, - "title": "Population", - "type": "web_search_result", - "url": "https://www.census.gov/topics/population.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5568]", - "page_age": null, - "title": "Fact Sheet: Aging in the United States | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/fact-sheet-aging-in-the-united-states/" - } - ], - "tool_use_id": "srvtoolu_017wqhn1RWHh91RqMty2HPX8", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=3872]", - "page_age": "March 26, 2025", - "title": "LGBTQ+ Identification in U.S. Now at 7.6%", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/611864/lgbtq-identification.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5276]", - "page_age": null, - "title": "Sexual orientation and gender identity U.S. by generation 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1331358/sexual-orientation-gender-identity-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4420]", - "page_age": "September 12, 2025", - "title": "How Many Adults and Youth Identify as Transgender in the United States? - Williams Institute", - "type": "web_search_result", - "url": "https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5516]", - "page_age": "August 9, 2025", - "title": "Trans People in the U.S.: Identities, Demographics, and Wellbeing | KFF", - "type": "web_search_result", - "url": "https://www.kff.org/other-health/trans-people-in-the-u-s-identities-demographics-and-wellbeing/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6336]", - "page_age": null, - "title": "Sexual Orientation and Gender Identity Data", - "type": "web_search_result", - "url": "https://www.shvs.org/wp-content/uploads/2024/03/SHVS_Collection-of-Sexual-Orientation-and-Gender-Identity-Data_FINAL.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5472]", - "page_age": null, - "title": "How Many Adults and Youth Identify as Transgender in the ...", - "type": "web_search_result", - "url": "https://williamsinstitute.law.ucla.edu/wp-content/uploads/Trans-Pop-Update-Aug-2025.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3608]", - "page_age": null, - "title": "Gender Identity - Research and data from Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/topic/gender-lgbtq/lgbtq-attitudes-experiences/gender-identity/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4160]", - "page_age": "September 11, 2024", - "title": "Transgender identity: How much has it increased?", - "type": "web_search_result", - "url": "https://www.generationtechblog.com/p/transgender-identity-how-much-has" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4604]", - "page_age": null, - "title": "New report shows 1% of U.S. population identifies as transgender \u2013 Catholic World Report", - "type": "web_search_result", - "url": "https://www.catholicworldreport.com/2025/09/03/new-report-shows-1-percent-of-us-population-identifies-as-transgender/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3032]", - "page_age": "August 20, 2025", - "title": "New estimate: 2.8 million people aged 13 and older identify as transgender in the US - Williams Institute", - "type": "web_search_result", - "url": "https://williamsinstitute.law.ucla.edu/press/trans-pop-estimates-press-release/" - } - ], - "tool_use_id": "srvtoolu_01YXrCrV2PYr5aSURtFyfPaq", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5368]", - "page_age": null, - "title": "U.S. Population Trends Return to Pre-Pandemic Norms as More States Gain Population", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2023/population-trends-return-to-pre-pandemic-norms.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4632]", - "page_age": null, - "title": "State Population Totals and Components of Change: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5132]", - "page_age": "3 weeks ago", - "title": "List of U.S. states and territories by population - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_population" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1896]", - "page_age": "5 days ago", - "title": "US States - Ranking by Population 2026", - "type": "web_search_result", - "url": "https://worldpopulationreview.com/states" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2912]", - "page_age": null, - "title": "Press Kit: Vintage 2023 National and State Population Estimates", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-kits/2023/national-state-population-estimates.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2392]", - "page_age": null, - "title": "Population Projections", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/popproj.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3132]", - "page_age": null, - "title": "State Annual Population Change 2020 2021 2022 2023 2024 Census 2020", - "type": "web_search_result", - "url": "https://proximityone.com/statepop2025.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=636]", - "page_age": null, - "title": "Percent Change in State Population", - "type": "web_search_result", - "url": "https://www.census.gov/library/visualizations/2023/comm/percent-change-state-population.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2764]", - "page_age": null, - "title": "2023 National Population Projections Tables: Main Series", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/popproj/2023-summary-tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=512]", - "page_age": null, - "title": "Population Projections Tables", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/popproj/data/tables.html" - } - ], - "tool_use_id": "srvtoolu_016qFvALxZdYXNgvWLTEyeUP", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01K1AfpMXQE7A75EtiZ596Pj", - "input": { - "query": "US race ethnicity distribution adults 2023 census White Black Hispanic Asian percent" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01CLfevy5E4DVMSgYi5smcTT", - "input": { - "query": "Big Five personality traits US population mean scores normative data openness conscientiousness extraversion agreeableness neuroticism" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=7016]", - "page_age": "2 weeks ago", - "title": "Race and ethnicity in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6480]", - "page_age": "12 hours ago", - "title": "US population by year, race, age, ethnicity, & more | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6928]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4280]", - "page_age": null, - "title": "Exploring the Racial and Ethnic Diversity of Various Age Groups", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/blogs/random-samplings/2023/09/exploring-diversity.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3000]", - "page_age": "September 18, 2024", - "title": "U.S. Population Racial Breakdown (1990-2023)", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5412]", - "page_age": null, - "title": "Labor force characteristics by race and ethnicity, 2023 : BLS Reports: U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/opub/reports/race-and-ethnicity/2023/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5612]", - "page_age": "December 16, 2025", - "title": "How the US Census Measures Race and What Americans Think About It | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5540]", - "page_age": null, - "title": "United States | Data USA", - "type": "web_search_result", - "url": "https://datausa.io/profile/geo/united-states" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5508]", - "page_age": "February 21, 2025", - "title": "United States Population by Race & Ethnicity - 2025 Update | Neilsberg", - "type": "web_search_result", - "url": "https://www.neilsberg.com/insights/united-states-population-by-race/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5416]", - "page_age": null, - "title": "Population by race in the U.S. 2024| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/" - } - ], - "tool_use_id": "srvtoolu_01K1AfpMXQE7A75EtiZ596Pj", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=7136]", - "page_age": "5 days ago", - "title": "Big Five personality traits - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Big_Five_personality_traits" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5344]", - "page_age": "March 20, 2025", - "title": "Big Five Personality Traits: The 5-Factor Model of Personality", - "type": "web_search_result", - "url": "https://www.simplypsychology.org/big-five-personality.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6588]", - "page_age": null, - "title": "Stability and Change in the Big Five Personality Traits: Findings from a Longitudinal Study of Mexican-Origin Adults - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC8821110/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5584]", - "page_age": "November 22, 2017", - "title": "Big 5 Personality Traits | Psychology Today", - "type": "web_search_result", - "url": "https://www.psychologytoday.com/us/basics/big-5-personality-traits" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4436]", - "page_age": "May 22, 2025", - "title": "Free Big Five Personality Test - Accurate scores of your personality traits", - "type": "web_search_result", - "url": "https://www.truity.com/test/big-five-personality-test" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6440]", - "page_age": null, - "title": "Five-factor Personality Dimensions and 3 Health-related Personality Constructs as Predictors of Health - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC2728392/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5700]", - "page_age": null, - "title": "What Are The Big 5 Personality Traits? | Thomas.co", - "type": "web_search_result", - "url": "https://www.thomas.co/resources/type/hr-guides/what-are-big-5-personality-traits" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5576]", - "page_age": "July 23, 2025", - "title": "Exploring the Big Five Personality Test: What It Reveals About You - Good Health Psych | Psychiatric Services for Adults, And Adolescents In NYC", - "type": "web_search_result", - "url": "https://goodhealthpsych.com/blog/exploring-the-big-five-personality-test/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5212]", - "page_age": "January 26, 2019", - "title": "Big Five Personality Traits: How They\u2019re Measured, What They Mean", - "type": "web_search_result", - "url": "https://www.healthline.com/health/big-five-personality-traits" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6236]", - "page_age": null, - "title": "My Big Five Personality Profile: Curious, Extraverted, and Sympathetic", - "type": "web_search_result", - "url": "https://apps.quanticfoundry.com/profiles/bigfive/edf522c042d345e587a6fe1c809912f5/" - } - ], - "tool_use_id": "srvtoolu_01CLfevy5E4DVMSgYi5smcTT", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=179]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN40D9WKPM/buLPemhoMfSVcwVxx4sJASWoBIjAg1IxSKxAEUe4kuYY7Ej999QfmzI1NY+ql+ZP0EsCL/Yt85MhWUX1i4H0/veC5TeMqEyGFpl+9gY5ESvXFilLbZDds+BEYBA==", - "title": "America Is Getting Older", - "type": "web_search_result_location", - "url": "https://www.census.gov/newsroom/press-releases/2023/population-estimates-characteristics.html" - } - ], - "text": "[REDACTED_TEXT length=93]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=85]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFWpszEAkTuyrU21+BoMfQl0h/6wEADxFxlCIjA+FJGZTm8hFu4R4PWaNfZiqWRhy+gf32i+VGioENra45EtibW/JAv6bXRBOvsF0XEqFQTLLs39DusE2XD97E273KXmE7ByhRgE", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result_location", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - } - ], - "text": "[REDACTED_TEXT length=128]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=1]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=125]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN098sxGBs+mRyBx+xoMi5G6nOA8sj3tUMVTIjCuPsrOA4oGgEbQuTV//KX9HcxdHp9idY7gjxM663Jza1R1bHtCmNTFT3xwpAqwYHYqFGUXssLdA+xK3HlRhU09eySIiOiYGAQ=", - "title": "LGBTQ+ Identification in U.S. Now at 7.6%", - "type": "web_search_result_location", - "url": "https://news.gallup.com/poll/611864/lgbtq-identification.aspx" - } - ], - "text": "[REDACTED_TEXT length=60]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=4]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDLM9wStoBoz/lfyuohoM0GPST9c+/p6dG1SpIjAsqqlgSb7+3sa5zgPaFIzdJTkbK+zV/wces1y0usOdXPVcLlLB0sQkr2nQqcJ9e5AqFlC3i71XSBgbWRyPLHJIQqMwFYjaF1kY...[truncated]", - "title": "How the US Census Measures Race and What Americans Think About It | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/" - } - ], - "text": "[REDACTED_TEXT length=206]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=4]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCakcd+TdgEJZbv4dxoMctse9Ae8ybcUB4qNIjDbpblgISWRZ6yRXx/9zgr5EnjfBkeyq3bODQlPC/JYngEFb472a87JTWaqmVAgKf4qFT6wA5DZ6y7d/4pGbxaeMkBms8tmXBgE", - "title": "Big Five personality traits - Wikipedia", - "type": "web_search_result_location", - "url": "https://en.wikipedia.org/wiki/Big_Five_personality_traits" - } - ], - "text": "[REDACTED_TEXT length=161]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=4]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=150]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJfhXSJNYzjuRJ7khxoMd+tkZ0JwgALsQNQtIjCE7TYzmTip7O5/c2iT4Z2u3nG2o8z3BqRoI7R+XD+jDY1rEnKxkSPr1CY9nyeu7sEqFAwt/ypllPHPQUfYbGBJPTyxAzOFGAQ=", - "title": "What Are The Big 5 Personality Traits? | Thomas.co", - "type": "web_search_result_location", - "url": "https://www.thomas.co/resources/type/hr-guides/what-are-big-5-personality-traits" - } - ], - "text": "[REDACTED_TEXT length=149]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01BGWKi9Nyoh1VBfkg4VAKg5", - "input": { - "attributes": [ - { - "name": "age", - "distribution": { - "type": "normal", - "mean": 46.7, - "std": 17.5, - "min": 18, - "max": 99, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 18, - "expression": null, - "reason": "Minimum adult age for US adult population sampling" - }, - { - "type": "hard_max", - "value": 99, - "expression": null, - "reason": "Practical upper bound; centenarians exist but are extremely rare (<0.1%)" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://www.census.gov/newsroom/press-releases/2023/population-estimates-characteristics.html", - "note": "US median age is 38.9 overall (2022 Census); for adults 18+ the mean shifts to ~46.7 with std ~17.5. Normal distribution is a reasonable approximation of the adult age distribution, though the true sh...[truncated]" - } - }, - { - "name": "gender", - "distribution": { - "type": "categorical", - "options": [ - "Male", - "Female", - "Non-binary/Other" - ], - "weights": [ - 0.489, - 0.497, - 0.014 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://news.gallup.com/poll/611864/lgbtq-identification.aspx; https://www.census.gov", - "note": "2020 Census: females 50.9%, males 49.1% of total population. Among adults 18+, the sex ratio slightly favors females due to higher male mortality. Non-binary/Other set to ~1.4%: Gallup (2024) reports ...[truncated]" - } - }, - { - "name": "state", - "distribution": { - "type": "categorical", - "options": [ - "CA", - "TX", - "FL", - "NY", - "PA", - "IL", - "OH", - "GA", - "NC", - "MI", - "NJ", - "VA", - "WA", - "AZ", - "TN", - "MA", - "IN", - "MO", - "MD", - "WI", - "CO", - "MN", - "SC", - "AL", - "LA", - "KY", - "OR", - "OK", - "CT", - "UT", - "IA", - "NV", - "AR", - "MS", - "KS", - "NM", - "NE", - "ID", - "WV", - "HI", - "NH", - "ME", - "MT", - "RI", - "DE", - "SD", - "ND", - "AK", - "VT", - "WY", - "DC" - ], - "weights": [ - 0.1174, - 0.0906, - 0.0651, - 0.0581, - 0.0378, - 0.0371, - 0.0351, - 0.032, - 0.0316, - 0.0295, - 0.0274, - 0.026, - 0.0236, - 0.0222, - 0.0213, - 0.0208, - 0.0199, - 0.0184, - 0.0182, - 0.0176, - 0.0176, - 0.0166, - 0.0163, - 0.0147, - 0.0139, - 0.0133, - 0.0131, - 0.012, - 0.0107, - 0.0103, - 0.0094, - 0.0093, - 0.0091, - 0.0088, - 0.0086, - 0.0063, - 0.0058, - 0.0056, - 0.0052, - 0.0042, - 0.0042, - 0.004, - 0.0032, - 0.0031, - 0.003, - 0.0027, - 0.0023, - 0.0022, - 0.0019, - 0.0017, - 0.0021 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.005", - "reason": "Categorical weights must sum to approximately 1.0 (small rounding tolerance for 51 categories)" - }, - { - "type": "spec_expression", - "value": null, - "expression": "len(options) == 51", - "reason": "Must include all 50 states plus DC" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html", - "note": "Weights derived from US Census Bureau Vintage 2023 state population estimates (July 1, 2023), normalized to sum to 1. California (~11.7%) and Texas (~9.1%) are the largest. Wyoming (~0.17%) and Vermon...[truncated]" - } - }, - { - "name": "race_ethnicity", - "distribution": { - "type": "categorical", - "options": [ - "White non-Hispanic", - "Hispanic", - "Black non-Hispanic", - "Asian non-Hispanic", - "Other/Multiracial" - ], - "weights": [ - 0.578, - 0.191, - 0.121, - 0.059, - 0.051 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/", - "note": "2020 Census (Pew Research): White non-Hispanic 57.8%, Hispanic 18.7%, Black non-Hispanic 12.1%, Asian non-Hispanic 5.9%, Two or more races/other 4.1% (rounded to 5.1% to absorb AIAN, NHPI, and other s...[truncated]" - } - }, - { - "name": "openness", - "distribution": { - "type": "beta", - "alpha": 7.0, - "beta": 4.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Trait score is bounded at 0 (minimum possible)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Trait score is bounded at 1 (maximum possible)" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John (2017) normative BFI-2 data; Terracciano et al. (2005) cross-cultural norms", - "note": "Big Five Openness is typically measured on a 1-5 Likert scale. US normative data (Soto & John 2017, n>1,000) place Openness mean near 3.7/5 (~0.60 on 0-1 scale) with SD ~0.7/5 (~0.14). A Beta(7.0, 4.5...[truncated]" - } - }, - { - "name": "conscientiousness", - "distribution": { - "type": "beta", - "alpha": 8.5, - "beta": 4.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Trait score is bounded at 0 (minimum possible)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Trait score is bounded at 1 (maximum possible)" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John (2017) normative BFI-2 US data; Costa & McCrae NEO norms", - "note": "US normative data place Conscientiousness mean near 3.8/5 (~0.65 on 0-1 scale) with SD ~0.65/5 (~0.13). A Beta(8.5, 4.5) yields mean ~0.654 and SD ~0.12. Conscientiousness tends to increase with age (...[truncated]" - } - }, - { - "name": "extraversion", - "distribution": { - "type": "beta", - "alpha": 5.5, - "beta": 4.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Trait score is bounded at 0 (minimum possible)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Trait score is bounded at 1 (maximum possible)" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John (2017) normative BFI-2 US data", - "note": "US normative data place Extraversion mean near 3.2/5 (~0.55 on 0-1 scale) with SD ~0.8/5 (~0.16). A Beta(5.5, 4.5) yields mean ~0.55 and SD ~0.15, producing a roughly symmetric distribution centered s...[truncated]" - } - }, - { - "name": "agreeableness", - "distribution": { - "type": "beta", - "alpha": 8.0, - "beta": 4.0, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Trait score is bounded at 0 (minimum possible)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Trait score is bounded at 1 (maximum possible)" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John (2017) normative BFI-2 US data; Costa & McCrae (2001) 26-country norms", - "note": "US normative data place Agreeableness mean near 3.75/5 (~0.64 on 0-1 scale) with SD ~0.65/5 (~0.13). A Beta(8.0, 4.0) yields mean ~0.667 and SD ~0.12. Agreeableness increases with age, which is releva...[truncated]" - } - }, - { - "name": "neuroticism", - "distribution": { - "type": "beta", - "alpha": 4.5, - "beta": 6.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Trait score is bounded at 0 (minimum possible)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Trait score is bounded at 1 (maximum possible)" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John (2017) normative BFI-2 US data; Costa & McCrae (2001) 26-country norms", - "note": "US normative data place Neuroticism mean near 2.9/5 (~0.45 on 0-1 scale) with SD ~0.75/5 (~0.15). A Beta(4.5, 6.5) yields mean ~0.41 and SD ~0.14, slightly below center reflecting that most US adults ...[truncated]" - } - } - ] - }, - "name": "independent_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 110344, - "output_tokens": 4986, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/", - "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/", - "https://datausa.io/profile/geo/united-states", - "https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/", - "https://apps.quanticfoundry.com/profiles/bigfive/edf522c042d345e587a6fe1c809912f5/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC8821110/", - "https://www.bls.gov/opub/reports/race-and-ethnicity/2023/", - "https://goodhealthpsych.com/blog/exploring-the-big-five-personality-test/", - "https://www.pewresearch.org/topic/gender-lgbtq/lgbtq-attitudes-experiences/gender-identity/", - "https://www.census.gov/newsroom/press-releases/2023/population-trends-return-to-pre-pandemic-norms.html", - "https://news.gallup.com/poll/611864/lgbtq-identification.aspx", - "https://www.census.gov/newsroom/press-releases/2023/population-estimates-age-sex.html", - "https://www.census.gov/topics/population.html", - "https://www.census.gov/library/visualizations/2023/comm/percent-change-state-population.html", - "https://proximityone.com/statepop2025.htm", - "https://www.census.gov/data/tables/2023/demo/popproj/2023-summary-tables.html", - "https://www.simplypsychology.org/big-five-personality.html", - "https://www.census.gov/newsroom/press-kits/2023/national-state-population-estimates.html", - "https://www.census.gov/newsroom/blogs/random-samplings/2023/09/exploring-diversity.html", - "https://www.prb.org/resources/fact-sheet-aging-in-the-united-states/", - "https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/", - "https://williamsinstitute.law.ucla.edu/press/trans-pop-estimates-press-release/", - "https://www.census.gov/newsroom/press-releases/2023/population-estimates-characteristics.html", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC2728392/", - "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html", - "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/", - "https://williamsinstitute.law.ucla.edu/wp-content/uploads/Trans-Pop-Update-Aug-2025.pdf", - "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/", - "https://www.catholicworldreport.com/2025/09/03/new-report-shows-1-percent-of-us-population-identifies-as-transgender/", - "https://en.wikipedia.org/wiki/Big_Five_personality_traits", - "https://www.thomas.co/resources/type/hr-guides/what-are-big-5-personality-traits", - "https://www.truity.com/test/big-five-personality-test", - "https://worldpopulationreview.com/states", - "https://www.statista.com/statistics/1331358/sexual-orientation-gender-identity-us/", - "https://www.generationtechblog.com/p/transgender-identity-how-much-has", - "https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States", - "https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_population", - "https://www.kff.org/other-health/trans-people-in-the-u-s-identities-demographics-and-wellbeing/", - "https://www.census.gov/programs-surveys/popproj.html", - "https://www.census.gov/programs-surveys/popproj/data/tables.html", - "https://www.shvs.org/wp-content/uploads/2024/03/SHVS_Collection-of-Sexual-Orientation-and-Gender-Identity-Data_FINAL.pdf", - "https://www.healthline.com/health/big-five-personality-traits", - "https://en.wikipedia.org/wiki/Demographics_of_the_United_States", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "https://www.neilsberg.com/insights/united-states-population-by-race/", - "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group", - "https://www.psychologytoday.com/us/basics/big-5-personality-traits" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_210322_449687_claude_agentic_research.json b/examples/logs/20260217_210322_449687_claude_agentic_research.json deleted file mode 100644 index 1d6a0f6..0000000 --- a/examples/logs/20260217_210322_449687_claude_agentic_research.json +++ /dev/null @@ -1,1523 +0,0 @@ -{ - "timestamp": "2026-02-17T21:03:22.449738", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 9132 - }, - "response": { - "id": "msg_01Nant3iRZTszKt5uN5fduQe", - "content": [ - { - "id": "srvtoolu_01MEoKKEvvoZP1kPySigMyGA", - "input": { - "query": "US urban rural suburban population distribution by state 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01VwZvLBPMriekBwRuxDnws7", - "input": { - "query": "US educational attainment distribution adults 2023 census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01T59dkV8u7yjmEm2A5nefNJ", - "input": { - "query": "US median household income by education level 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4032]", - "page_age": null, - "title": "Nation\u2019s Urban and Rural Populations Shift Following 2020 Census", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3336]", - "page_age": null, - "title": "Size of urban and rural population U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/985183/size-urban-rural-population-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3528]", - "page_age": null, - "title": "Urban and Rural", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5728]", - "page_age": "April 14, 2024", - "title": "Demographic and economic trends in urban, suburban and rural communities", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=444]", - "page_age": null, - "title": "Urban Percentage of the Population for States, Historical | Iowa Community Indicators Program", - "type": "web_search_result", - "url": "https://www.icip.iastate.edu/tables/population/urban-pct-states" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4460]", - "page_age": "July 16, 2025", - "title": "Urban/Rural Population Split in the U.S. - Population Education", - "type": "web_search_result", - "url": "https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3876]", - "page_age": "September 20, 2025", - "title": "Urbanization in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Urbanization_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=272]", - "page_age": null, - "title": "Urban and Rural Population in the U.S. (2020 Census)", - "type": "web_search_result", - "url": "https://www.arcgis.com/home/item.html?id=458e2c20ebb2479086bc32b7d09ffe27" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2872]", - "page_age": "August 29, 2024", - "title": "Mapped: The Share of Each State's Population That Lives in Cities", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/mapped-how-much-of-each-u-s-states-population-lives-in-cities/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=700]", - "page_age": null, - "title": "2020 Census Urban Areas Facts", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural/2020-ua-facts.html" - } - ], - "tool_use_id": "srvtoolu_01MEoKKEvvoZP1kPySigMyGA", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2452]", - "page_age": null, - "title": "Educational Attainment Tables", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education/educational-attainment/data/tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4132]", - "page_age": null, - "title": "Census Bureau Releases New Educational Attainment Data", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2023/educational-attainment-data.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1840]", - "page_age": null, - "title": "Educational Attainment", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education/educational-attainment.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2536]", - "page_age": null, - "title": "Education", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5588]", - "page_age": "January 15, 2025", - "title": "Educational Attainment Statistics [2025]: Levels by Demographic", - "type": "web_search_result", - "url": "https://educationdata.org/education-attainment-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=356]", - "page_age": null, - "title": "S1501: Educational Attainment - Census Bureau Table", - "type": "web_search_result", - "url": "https://data.census.gov/table/ACSST1Y2023.S1501" - }, - { - "encrypted_content": "[REDACTED_TEXT length=596]", - "page_age": null, - "title": "Educational Attainment in the United States: 2022", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2022/demo/educational-attainment/cps-detailed-tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5444]", - "page_age": null, - "title": "Fast Facts: Educational attainment (27)", - "type": "web_search_result", - "url": "https://nces.ed.gov/fastfacts/display.asp?id=27" - }, - { - "encrypted_content": "[REDACTED_TEXT length=480]", - "page_age": null, - "title": "CPS Historical Time Series Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/educational-attainment/cps-historical-time-series.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6652]", - "page_age": "3 weeks ago", - "title": "Educational attainment in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" - } - ], - "tool_use_id": "srvtoolu_01VwZvLBPMriekBwRuxDnws7", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=3988]", - "page_age": null, - "title": "Median household income by education U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6696]", - "page_age": "2 weeks ago", - "title": "Household income in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Household_income_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=272]", - "page_age": null, - "title": "Education pays : U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/emp/chart-unemployment-earnings-education.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1692]", - "page_age": null, - "title": "Household Incomes 2023: The Value of Higher Education", - "type": "web_search_result", - "url": "https://www.advisorperspectives.com/dshort/updates/2025/09/19/household-incomes-2024-the-value-of-higher-education" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5572]", - "page_age": null, - "title": "How Education Impacted Income and Earnings From 2004 ...", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2025/09/education-and-income.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2672]", - "page_age": null, - "title": "Income by Education: Average, Median, Top One % in the US", - "type": "web_search_result", - "url": "https://dqydj.com/income-by-education/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4556]", - "page_age": null, - "title": "COE - Annual Earnings by Educational Attainment", - "type": "web_search_result", - "url": "https://nces.ed.gov/programs/coe/indicator/cba" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6172]", - "page_age": null, - "title": "Earnings by educational attainment and ethnicity/race U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/184259/mean-earnings-by-educational-attainment-and-ethnic-group/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4220]", - "page_age": "December 9, 2024", - "title": "Income and Wealth in the United States: An Overview of Recent Data", - "type": "web_search_result", - "url": "https://www.pgpf.org/blog/2023/11/income-and-wealth-in-the-united-states-an-overview-of-recent-data" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6228]", - "page_age": null, - "title": "TRENDS IN HIGHER EDUCATION SERIES Education Pays 2023", - "type": "web_search_result", - "url": "https://research.collegeboard.org/media/pdf/education-pays-2023.pdf" - } - ], - "tool_use_id": "srvtoolu_01T59dkV8u7yjmEm2A5nefNJ", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01J1daEGKL5ub5fD9WaC3oy3", - "input": { - "query": "US political party affiliation distribution 2024 Gallup Pew party identification" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5424]", - "page_age": "April 3, 2025", - "title": "GOP Holds Edge in Party Affiliation for Third Straight Year", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3608]", - "page_age": "December 16, 2025", - "title": "Party Affiliation Fact Sheet (NPORS) | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1456]", - "page_age": "September 20, 2007", - "title": "Party Affiliation | Gallup Historical Trends", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/15370/party-affiliation.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1704]", - "page_age": "April 24, 2025", - "title": "Party affiliation and ideology of US registered voters | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5612]", - "page_age": "March 26, 2025", - "title": "Independent Party ID Tied for High; Democratic ID at New Low", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3908]", - "page_age": null, - "title": "U.S. political party identification 1988-2024", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1078383/political-party-identification-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4472]", - "page_age": "2 weeks ago", - "title": "New High of 45% in U.S. Identify as Political Independents", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1688]", - "page_age": "April 24, 2025", - "title": "Party affiliation of US voters by race, ethnicity, education | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/2024/04/09/partisanship-by-race-ethnicity-and-education/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5124]", - "page_age": null, - "title": "Political party identification U.S. 2024| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1078361/political-party-identification-us-major-parties/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4100]", - "page_age": "June 21, 2024", - "title": "Age, generation and party identification of registered voters | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/2024/04/09/age-generational-cohorts-and-party-identification/" - } - ], - "tool_use_id": "srvtoolu_01J1daEGKL5ub5fD9WaC3oy3", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=195]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01379yWtmL7vsn7caugWg1nJ", - "input": { - "attributes": [ - { - "name": "urban_rural", - "distribution": { - "type": "categorical", - "options": [ - "Urban", - "Suburban", - "Rural" - ], - "weights": [ - 0.31, - 0.55, - 0.14 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center NCHS classification (2018/2024); Census 2020 Urban Areas", - "note": "Urban core ~31%, suburban/small metro ~55%, rural ~14% per Pew NCHS framework. Modifiers will shift these based on state population density." - } - }, - { - "name": "education_level", - "distribution": { - "type": "categorical", - "options": [ - "Less than HS", - "HS Diploma", - "Some College", - "Associate's", - "Bachelor's", - "Graduate Degree" - ], - "weights": [ - 0.09, - 0.27, - 0.15, - 0.1, - 0.23, - 0.14 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "U.S. Census Bureau CPS 2022/2023; educationdata.org compilation", - "note": "9% less than HS, 28% HS diploma, ~15% some college no degree, ~10% Associate's, ~23% Bachelor's, ~14% Graduate. Age modifier will suppress higher degrees for younger/older cohorts. For 18-24 year olds...[truncated]" - } - }, - { - "name": "household_income", - "distribution": { - "type": "lognormal", - "mean_formula": "{'Less than HS': 35000, 'HS Diploma': 47000, 'Some College': 55000, \"Associate's\": 62000, \"Bachelor's\": 95000, 'Graduate Degree': 130000}.get(education_level, 60000)", - "std_formula": "{'Less than HS': 18000, 'HS Diploma': 28000, 'Some College': 32000, \"Associate's\": 35000, \"Bachelor's\": 55000, 'Graduate Degree': 75000}.get(education_level, 35000)", - "mean": null, - "std": null, - "min": 0, - "max": 1500000, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Income cannot be negative" - }, - { - "type": "hard_max", - "value": 1500000, - "expression": null, - "reason": "Plausible upper bound for household income in simulation" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "U.S. Census Bureau ASEC 2023/2024; Census.gov education-and-income story 2025", - "note": "Median HH income: = 2", - "value": null, - "reason": "If children present, household_size must be at least 2" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "U.S. Census Bureau CPS 2023; ~30% of households with adults have children under 18", - "note": "About 30% of U.S. adult households have children under 18. Strong age dependency: peaks 30-44 age range (~45-50%), near zero for ages 65+. Single/widowed adults less likely than married." - } - }, - { - "name": "employment_status", - "distribution": { - "type": "categorical", - "options": [ - "Full-time", - "Part-time", - "Self-employed", - "Unemployed", - "Retired", - "Student" - ], - "weights": [ - 0.48, - 0.11, - 0.09, - 0.04, - 0.2, - 0.08 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Labor Force Statistics 2023; U.S. Census Bureau ACS 2022", - "note": "~48% full-time, ~11% part-time, ~9% self-employed, ~4% unemployed, ~20% retired, ~8% student. Age modifiers critical: students peak 18-24, retired peak 65+. Education modifiers adjust unemployment." - } - }, - { - "name": "occupation", - "distribution": { - "type": "categorical", - "options": [ - "Management/Professional", - "Service", - "Sales/Office", - "Construction/Extraction", - "Production/Transportation", - "Other/Not employed" - ], - "weights": [ - 0.38, - 0.17, - 0.2, - 0.09, - 0.1, - 0.06 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Occupational Employment Statistics 2023; Census ACS occupational classifications", - "note": "BLS 2023: Management/Professional ~38%, Service ~17%, Sales/Office ~20%, Construction ~9%, Production/Transport ~10%, Other ~6%. Education modifiers strongly shift toward Management/Professional for B...[truncated]" - } - }, - { - "name": "political_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Strong Democrat", - "Lean Democrat", - "Independent", - "Lean Republican", - "Strong Republican" - ], - "weights": [ - 0.17, - 0.17, - 0.22, - 0.17, - 0.17 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup 2024 party ID data; Pew Research NPORS 2024", - "note": "Gallup 2024: 28% Dem, 28% Rep, 43% Independent. With leaners: ~45% Dem-leaning, ~46% Rep-leaning. Mapped to 5-point scale: ~17% Strong Dem, ~17% Lean Dem, ~22% Independent, ~17% Lean Rep, ~17% Strong ...[truncated]" - } - }, - { - "name": "political_ideology", - "distribution": { - "type": "categorical", - "options": [ - "Very Liberal", - "Liberal", - "Moderate", - "Conservative", - "Very Conservative" - ], - "weights": [ - 0.09, - 0.23, - 0.33, - 0.25, - 0.1 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup 2023/2025 ideology data; 36% conservative, 36% moderate, 25% liberal nationally", - "note": "Gallup 2023: 36% conservative, 36% moderate, 25% liberal. Decomposed to 5-point scale. Political_affiliation modifier will be the primary driver." - } - }, - { - "name": "religious_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Evangelical Protestant", - "Mainline Protestant", - "Catholic", - "Other Christian", - "Jewish", - "Muslim", - "Other Non-Christian", - "None/Unaffiliated" - ], - "weights": [ - 0.24, - 0.13, - 0.21, - 0.06, - 0.02, - 0.01, - 0.03, - 0.3 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center Religious Landscape Study 2023/2024", - "note": "~24% Evangelical Protestant, ~13% Mainline Protestant, ~21% Catholic, ~6% Other Christian, ~2% Jewish, ~1% Muslim, ~3% Other non-Christian, ~30% None/Unaffiliated. Race/ethnicity modifiers important (...[truncated]" - } - }, - { - "name": "religious_attendance", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Seldom", - "A few times/year", - "Monthly", - "Weekly", - "More than weekly" - ], - "weights": [ - 0.27, - 0.16, - 0.14, - 0.09, - 0.22, - 0.12 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center Religious Landscape Study 2023; Gallup church attendance data", - "note": "~27% never attend, ~16% seldom, ~14% a few times/year, ~9% monthly, ~22% weekly, ~12% more than weekly. Religious_affiliation modifier will be primary driver; None/Unaffiliated will push heavily to Ne...[truncated]" - } - }, - { - "name": "primary_news_source", - "distribution": { - "type": "categorical", - "options": [ - "TV", - "Online/Digital", - "Social Media", - "Radio", - "Print Newspaper", - "None" - ], - "weights": [ - 0.28, - 0.27, - 0.22, - 0.07, - 0.05, - 0.11 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center News Consumption surveys 2023/2024; Reuters Institute Digital News Report 2023", - "note": "TV ~28%, Online/Digital ~27%, Social Media ~22%, Radio ~7%, Print ~5%, None ~11%. Age strongly modifies: older adults prefer TV, younger adults prefer social media/digital. Education also shifts towar...[truncated]" - } - }, - { - "name": "news_outlet_lean", - "distribution": { - "type": "categorical", - "options": [ - "Left-leaning", - "Center", - "Right-leaning", - "Mixed/No Preference" - ], - "weights": [ - 0.28, - 0.2, - 0.25, - 0.27 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew Research Center News Media Attitudes 2023; AllSides Media Bias data", - "note": "Roughly evenly distributed across categories as base, with political_affiliation and primary_news_source being primary modifiers. Democrats disproportionately consume left-leaning outlets; Republicans...[truncated]" - } - }, - { - "name": "social_media_platforms", - "distribution": { - "type": "categorical", - "options": [ - "Facebook", - "YouTube", - "Instagram", - "TikTok", - "Twitter/X", - "None/Minimal" - ], - "weights": [ - 0.3, - 0.22, - 0.17, - 0.1, - 0.08, - 0.13 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center Social Media Use 2023/2024", - "note": "Facebook ~68% of adults use; YouTube ~83%; Instagram ~47%; TikTok ~33%; X ~22%. Weighted by primary platform. Age modifies heavily: TikTok/Instagram dominant under 30; Facebook dominant 50+. None/Mini...[truncated]" - } - }, - { - "name": "social_media_hours_per_day", - "distribution": { - "type": "lognormal", - "mean_formula": "3.0 if social_media_platforms == 'TikTok' else (2.5 if social_media_platforms in ['Instagram', 'Twitter/X'] else (2.0 if social_media_platforms in ['Facebook', 'YouTube'] else 0.3))", - "std_formula": "1.2 if social_media_platforms != 'None/Minimal' else 0.3", - "mean": null, - "std": null, - "min": 0.0, - "max": 16.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Cannot have negative social media hours" - }, - { - "type": "hard_max", - "value": 16.0, - "expression": null, - "reason": "Upper plausible daily limit (leaving 8h for sleep)" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Pew Research Center 2023; DataReportal Global Social Media Statistics 2023; avg US ~2.5h/day", - "note": "US adults average ~2-2.5 hours/day on social media. TikTok users average higher (~3h). Lognormal captures right skew. Age modifier will reduce hours for older adults. None/Minimal users coded near zer...[truncated]" - } - }, - { - "name": "internet_access", - "distribution": { - "type": "categorical", - "options": [ - "Broadband", - "Mobile Only", - "Dial-up/Satellite", - "None" - ], - "weights": [ - 0.7, - 0.15, - 0.07, - 0.08 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "FCC Broadband Deployment Reports 2023; Pew Research Center 2024 internet access data", - "note": "~77% of US adults have home broadband; ~15% rely on mobile only; ~7% dial-up or satellite (rural); ~8% no internet. Urban/rural and income modifiers are primary drivers." - } - }, - { - "name": "civic_engagement", - "distribution": { - "type": "categorical", - "options": [ - "Votes regularly", - "Votes sometimes", - "Rarely/Never votes", - "Actively volunteers or campaigns" - ], - "weights": [ - 0.43, - 0.22, - 0.25, - 0.1 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "U.S. Census Bureau CPS Voting and Registration Supplement 2022; ~63% of eligible voters voted in 2020", - "note": "~43% vote in most elections; ~22% vote sometimes; ~25% rarely/never; ~10% actively volunteer/campaign. Age and education are strong positive predictors of voting. Younger adults have lower turnout." - } - }, - { - "name": "homeownership", - "distribution": { - "type": "boolean", - "probability_true": 0.65, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "U.S. Census Bureau Housing Vacancies and Homeownership (CPS/HVS) Q3 2023: national homeownership rate 65.9%", - "note": "US homeownership rate ~65-66%. Income and age are primary modifiers: under-35 ownership ~38%, 65+ ~79%. Renters concentrated in urban areas and lower income brackets." - } - }, - { - "name": "health_insurance_type", - "distribution": { - "type": "categorical", - "options": [ - "Employer-sponsored", - "Medicaid/CHIP", - "Medicare", - "Individual Market/ACA", - "Military/VA", - "Uninsured" - ], - "weights": [ - 0.49, - 0.2, - 0.15, - 0.06, - 0.03, - 0.07 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "U.S. Census Bureau Health Insurance Coverage 2023; KFF Health Insurance Coverage data", - "note": "~49% employer-sponsored, ~20% Medicaid/CHIP, ~15% Medicare, ~6% Individual/ACA marketplace, ~3% Military/VA, ~7% uninsured (~8% uninsured rate 2023). Employment_status and income are primary modifiers...[truncated]" - } - }, - { - "name": "immigration_status", - "distribution": { - "type": "categorical", - "options": [ - "US-born citizen", - "Naturalized citizen", - "Permanent resident", - "Other" - ], - "weights": [ - 0.85, - 0.07, - 0.05, - 0.03 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.01", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "U.S. Census Bureau ACS 2022; foreign-born population ~13.9% of US population", - "note": "~86% US-born citizen, ~7% naturalized citizen, ~5% LPR, ~2-3% other visa/status. Race/ethnicity is the primary modifier: Hispanic and Asian adults have much higher foreign-born shares." - } - }, - { - "name": "union_membership", - "distribution": { - "type": "boolean", - "probability_true": 0.1, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "expression", - "expression": "not union_membership or employment_status in ['Full-time', 'Part-time']", - "value": null, - "reason": "Union members must be employed; retired/unemployed/student cannot be active union members" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Union Members Summary 2023: union membership rate 10.0% of wage/salary workers", - "note": "BLS 2023 union membership rate is exactly 10.0% of wage and salary workers. Occupation modifier critical: public sector ~33%, private sector ~6%. Employment_status must be employed." - } - }, - { - "name": "gun_ownership", - "distribution": { - "type": "boolean", - "probability_true": 0.32, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup 2023/Pew Research 2023: ~32% of US adults personally own a gun; ~44% live in gun-owning household", - "note": "Personal gun ownership ~32%; household gun ownership ~44%. Rural households ~46% own guns vs. urban ~19%. State and urban_rural modifiers are primary drivers." - } - }, - { - "name": "trust_in_institutions", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale minimum" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale maximum" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup confidence in institutions 2023; Edelman Trust Barometer 2023/2024", - "note": "US institutional trust has declined substantially. Beta(2.5, 3.5) gives mean ~0.42 with slight left skew, reflecting low baseline trust. Political ideology and education are primary modifiers." - } - }, - { - "name": "need_for_cognition", - "distribution": { - "type": "beta", - "alpha": 3.0, - "beta": 3.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale minimum" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale maximum" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Cacioppo & Petty NFC research; meta-analyses linking NFC to education (r~0.3)", - "note": "Beta(3,3) gives symmetric distribution centered at 0.5, reflecting roughly normal distribution of NFC in the general population. Education modifier will shift higher-educated individuals upward on thi...[truncated]" - } - }, - { - "name": "susceptibility_to_misinformation", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale minimum" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale maximum" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pennycook & Rand 2019 (Cognition); Roozenbeek et al. 2020 misinformation susceptibility research", - "note": "Base distribution slightly left-skewed (most people have moderate-to-low susceptibility). need_for_cognition and social_media_hours_per_day are primary modifiers (inverse NFC, positive social media ho...[truncated]" - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 84157, - "output_tokens": 9492, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://en.wikipedia.org/wiki/Household_income_in_the_United_States", - "https://nces.ed.gov/programs/coe/indicator/cba", - "https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx", - "https://www.pewresearch.org/politics/2024/04/09/age-generational-cohorts-and-party-identification/", - "https://www.bls.gov/emp/chart-unemployment-earnings-education.htm", - "https://www.census.gov/data/tables/time-series/demo/educational-attainment/cps-historical-time-series.html", - "https://news.gallup.com/poll/15370/party-affiliation.aspx", - "https://www.statista.com/statistics/1078383/political-party-identification-in-the-us/", - "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/", - "https://www.pgpf.org/blog/2023/11/income-and-wealth-in-the-united-states-an-overview-of-recent-data", - "https://www.census.gov/library/stories/2025/09/education-and-income.html", - "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx", - "https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/", - "https://research.collegeboard.org/media/pdf/education-pays-2023.pdf", - "https://en.wikipedia.org/wiki/Urbanization_in_the_United_States", - "https://nces.ed.gov/fastfacts/display.asp?id=27", - "https://www.statista.com/statistics/985183/size-urban-rural-population-us/", - "https://www.icip.iastate.edu/tables/population/urban-pct-states", - "https://www.census.gov/data/tables/2022/demo/educational-attainment/cps-detailed-tables.html", - "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html", - "https://www.census.gov/topics/education/educational-attainment.html", - "https://www.pewresearch.org/politics/2024/04/09/partisanship-by-race-ethnicity-and-education/", - "https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/", - "https://www.statista.com/statistics/1078361/political-party-identification-us-major-parties/", - "https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/", - "https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx", - "https://www.visualcapitalist.com/mapped-how-much-of-each-u-s-states-population-lives-in-cities/", - "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html", - "https://educationdata.org/education-attainment-statistics", - "https://dqydj.com/income-by-education/", - "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/", - "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural/2020-ua-facts.html", - "https://www.advisorperspectives.com/dshort/updates/2025/09/19/household-incomes-2024-the-value-of-higher-education", - "https://www.census.gov/topics/education/educational-attainment/data/tables.html", - "https://www.statista.com/statistics/184259/mean-earnings-by-educational-attainment-and-ethnic-group/", - "https://www.arcgis.com/home/item.html?id=458e2c20ebb2479086bc32b7d09ffe27", - "https://www.census.gov/topics/education.html", - "https://www.census.gov/newsroom/press-releases/2023/educational-attainment-data.html", - "https://data.census.gov/table/ACSST1Y2023.S1501", - "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_210516_838791_claude_agentic_research.json b/examples/logs/20260217_210516_838791_claude_agentic_research.json deleted file mode 100644 index 5547285..0000000 --- a/examples/logs/20260217_210516_838791_claude_agentic_research.json +++ /dev/null @@ -1,1611 +0,0 @@ -{ - "timestamp": "2026-02-17T21:05:16.838866", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 10224 - }, - "response": { - "id": "msg_01Mmgo6PJW8smW69kGcVn4RQ", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=89]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01T9hncsmRLXKAUzxxdGEtbs", - "input": { - "query": "US adult population urban rural suburban distribution 2023 census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01SHKsB41Nd9A5V4Fh4SJV5U", - "input": { - "query": "US adult education attainment distribution 2023 census statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01PBm7Gv24Ga1nNzrzxu5Knr", - "input": { - "query": "US household income distribution median 2023 census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01VJKP8MvXFfqpQYa9BKzRXN", - "input": { - "query": "US adult marital status distribution 2023 census statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01S4pk7QLeJ9qavfgYHrDrnZ", - "input": { - "query": "US average household size 2023 census statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=3684]", - "page_age": null, - "title": "Urban and Rural", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3000]", - "page_age": null, - "title": "Size of urban and rural population U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/985183/size-urban-rural-population-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1608]", - "page_age": null, - "title": "Nation\u2019s Urban and Rural Populations Shift Following 2020 Census", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5504]", - "page_age": "July 16, 2025", - "title": "Urban/Rural Population Split in the U.S. - Population Education", - "type": "web_search_result", - "url": "https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5660]", - "page_age": "April 14, 2024", - "title": "Demographic and economic trends in urban, suburban and rural communities", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2356]", - "page_age": null, - "title": "Rural-Urban Continuum Codes | Economic Research Service", - "type": "web_search_result", - "url": "https://www.ers.usda.gov/data-products/rural-urban-continuum-codes" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3812]", - "page_age": "July 15, 2025", - "title": "NCHS Urban-Rural Classification Scheme for Counties | National Center for Health Statistics | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/nchs/data-analysis-tools/urban-rural.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=272]", - "page_age": null, - "title": "Urban and Rural Population in the U.S. (2020 Census)", - "type": "web_search_result", - "url": "https://www.arcgis.com/home/item.html?id=458e2c20ebb2479086bc32b7d09ffe27" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4996]", - "page_age": null, - "title": "Geographic", - "type": "web_search_result", - "url": "https://nces.ed.gov/programs/edge/Geographic/LocaleBoundaries" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1624]", - "page_age": null, - "title": "Urban Percentage of the Population for States, Historical | Iowa Community Indicators Program", - "type": "web_search_result", - "url": "https://www.icip.iastate.edu/tables/population/urban-pct-states" - } - ], - "tool_use_id": "srvtoolu_01T9hncsmRLXKAUzxxdGEtbs", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=3300]", - "page_age": null, - "title": "Census Bureau Releases New Educational Attainment Data", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2023/educational-attainment-data.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5588]", - "page_age": "January 15, 2025", - "title": "Educational Attainment Statistics [2025]: Levels by Demographic", - "type": "web_search_result", - "url": "https://educationdata.org/education-attainment-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=740]", - "page_age": null, - "title": "Educational Attainment Tables", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education/educational-attainment/data/tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1840]", - "page_age": null, - "title": "Educational Attainment", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education/educational-attainment.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6680]", - "page_age": "3 weeks ago", - "title": "Educational attainment in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5444]", - "page_age": null, - "title": "Fast Facts: Educational attainment (27)", - "type": "web_search_result", - "url": "https://nces.ed.gov/fastfacts/display.asp?id=27" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3668]", - "page_age": null, - "title": "Education", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6452]", - "page_age": null, - "title": "Digest of Education Statistics-Advance Release of Selected 2023 Digest tables", - "type": "web_search_result", - "url": "https://nces.ed.gov/programs/digest/2023menu_tables.asp" - }, - { - "encrypted_content": "[REDACTED_TEXT length=596]", - "page_age": null, - "title": "Educational Attainment in the United States: 2022", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2022/demo/educational-attainment/cps-detailed-tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6172]", - "page_age": null, - "title": "Educational attainment in the U.S. 1960-2022| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/184260/educational-attainment-in-the-us/" - } - ], - "tool_use_id": "srvtoolu_01SHKsB41Nd9A5V4Fh4SJV5U", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4400]", - "page_age": null, - "title": "Income in the United States: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/library/publications/2024/demo/p60-282.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6340]", - "page_age": null, - "title": "Income in the United States: 2023 - Census.gov", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5344]", - "page_age": null, - "title": "Distribution of household income U.S. 2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/203183/percentage-distribution-of-household-income-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=964]", - "page_age": "September 9, 2025", - "title": "Real Median Household Income in the United States (MEHOINUSA672N) | FRED | St. Louis Fed", - "type": "web_search_result", - "url": "https://fred.stlouisfed.org/series/MEHOINUSA672N" - }, - { - "encrypted_content": "[REDACTED_TEXT length=800]", - "page_age": null, - "title": "Median Household Income", - "type": "web_search_result", - "url": "https://www.census.gov/library/visualizations/2023/comm/median-household-income.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6828]", - "page_age": "2 weeks ago", - "title": "Household income in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Household_income_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5436]", - "page_age": null, - "title": "Income in the United States: 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/publications/2025/demo/p60-286.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3908]", - "page_age": null, - "title": "Household Income in States and Metropolitan Areas: 2023 September 2024", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/acsbr-023.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5636]", - "page_age": null, - "title": "Income in the United States: 2022", - "type": "web_search_result", - "url": "https://www.census.gov/library/publications/2023/demo/p60-279.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4868]", - "page_age": null, - "title": "Issued September 2023 P60-279 By Gloria Guzman and Melissa Kollar", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/library/publications/2023/demo/p60-279.pdf" - } - ], - "tool_use_id": "srvtoolu_01PBm7Gv24Ga1nNzrzxu5Knr", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=628]", - "page_age": null, - "title": "Marital Status in the United States", - "type": "web_search_result", - "url": "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1468]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=920]", - "page_age": null, - "title": "Historical Marital Status Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/marital.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=384]", - "page_age": null, - "title": "FastStats - Marriage and Divorce", - "type": "web_search_result", - "url": "https://www.cdc.gov/nchs/fastats/marriage-divorce.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3684]", - "page_age": null, - "title": "Unmarried and Single Americans Week: September 17-23, 2023", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/stories/unmarried-single-americans-week.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=780]", - "page_age": null, - "title": "Marital Status in the United States", - "type": "web_search_result", - "url": "https://statisticalatlas.com/United-States/Marital-Status" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5640]", - "page_age": null, - "title": "Marital Status / Marital History | American Community Survey | U.S. Census Bureau", - "type": "web_search_result", - "url": "https://www.census.gov/acs/www/about/why-we-ask-each-question/marital/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4068]", - "page_age": "July 13, 2024", - "title": "Majority of Americans Single: Surprise Statistics & Insights", - "type": "web_search_result", - "url": "https://www.hcmmlaw.com/blog/2024/07/13/majority-americans-now-single-statistics-insights/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1336]", - "page_age": null, - "title": "Marital Status - Census Reporter", - "type": "web_search_result", - "url": "https://censusreporter.org/topics/marital-status/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=356]", - "page_age": null, - "title": "S1201: Marital Status - Census Bureau Table", - "type": "web_search_result", - "url": "https://data.census.gov/table/ACSST5Y2023.S1201?q=82073" - } - ], - "tool_use_id": "srvtoolu_01VJKP8MvXFfqpQYa9BKzRXN", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4388]", - "page_age": null, - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5004]", - "page_age": null, - "title": "Average family size in the U.S. 1960-2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4060]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2448]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1480]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=480]", - "page_age": "5 days ago", - "title": "Average Household Size by State 2026", - "type": "web_search_result", - "url": "https://worldpopulationreview.com/state-rankings/average-household-size-by-state" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1812]", - "page_age": "September 8, 2023", - "title": "Why are US homes getting bigger while households shrink? | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/population-data/average-family-size/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2320]", - "page_age": "December 4, 2025", - "title": "Total Households (TTLHH) | FRED | St. Louis Fed", - "type": "web_search_result", - "url": "https://fred.stlouisfed.org/series/TTLHH" - }, - { - "encrypted_content": "[REDACTED_TEXT length=448]", - "page_age": null, - "title": "U.S. Census Bureau QuickFacts: United States", - "type": "web_search_result", - "url": "https://www.census.gov/quickfacts/fact/table/US/HCN010222" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2924]", - "page_age": "June 3, 2023", - "title": "Average Household Size by State 2023 - Wisevoter", - "type": "web_search_result", - "url": "https://wisevoter.com/state-rankings/average-household-size-by-state/" - } - ], - "tool_use_id": "srvtoolu_01S4pk7QLeJ9qavfgYHrDrnZ", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=519]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01F5ZuCiJU2Y8p2NcLnPwwHi", - "input": { - "attributes": [ - { - "name": "urban_rural", - "distribution": { - "type": "categorical", - "options": [ - "Urban", - "Suburban", - "Rural" - ], - "weights": [ - 0.31, - 0.55, - 0.14 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Categorical weights must sum to 1.0" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Pew Research Center urban/suburban/rural county analysis; Census 2020 urban/rural classification (80% urban, 20% rural at census level; Pew suburban ~52% of population)", - "note": "Census defines only urban/rural (80/20); the suburban split (~31% urban core, 55% suburban, 14% rural) follows Pew's three-way classification. State modifier will adjust heavily." - } - }, - { - "name": "education_level", - "distribution": { - "type": "categorical", - "options": [ - "Less than HS", - "HS Diploma", - "Some College", - "Associate's", - "Bachelor's", - "Graduate Degree" - ], - "weights": [ - 0.09, - 0.27, - 0.2, - 0.1, - 0.22, - 0.12 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS 2023: 9% less than HS, 28% HS diploma, ~20% some college, ~10% associate's, ~22% bachelor's, ~12% graduate degree (adults 18+)", - "note": "Weights normalized to exactly 1.0 (0.09+0.27+0.20+0.10+0.22+0.12=1.00). Age modifier will reduce bachelor's/graduate for younger and older cohorts." - } - }, - { - "name": "household_income", - "distribution": { - "type": "lognormal", - "mean": 80000, - "std": 60000, - "mean_formula": "35000 if education_level == 'Less than HS' else 47000 if education_level == 'HS Diploma' else 55000 if education_level == 'Some College' else 62000 if education_level == \"Associate's\" else 95000 if ed...[truncated]", - "std_formula": "18000 if education_level == 'Less than HS' else 28000 if education_level == 'HS Diploma' else 32000 if education_level == 'Some College' else 35000 if education_level == \"Associate's\" else 55000 if ed...[truncated]", - "min": 0, - "max": 1000000, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Income cannot be negative" - }, - { - "type": "hard_max", - "value": 1000000, - "expression": null, - "reason": "Cap at $1M to avoid extreme outlier distortion" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2023: median household income $80,610 nationally; income by education well-documented in CPS/ACS data", - "note": "mean_formula uses chained ternary if/else \u2014 no dict.get() calls. Lognormal is appropriate given right-skewed income distribution. State modifier will adjust for COL differences." - } - }, - { - "name": "marital_status", - "distribution": { - "type": "categorical", - "options": [ - "Single", - "Married", - "Divorced", - "Widowed", - "Domestic Partnership" - ], - "weights": [ - 0.32, - 0.49, - 0.11, - 0.06, - 0.02 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2023: ~49% married, ~32% never married (single), ~11% divorced, ~6% widowed; domestic partnership ~2% estimated from cohabitation data", - "note": "Age modifier critical: widowed rises sharply past 65, single peaks in 18-30s. Domestic partnership is small but distinct from never-married." - } - }, - { - "name": "household_size", - "distribution": { - "type": "normal", - "mean": 2.51, - "std": 1.4, - "mean_formula": "1.0 if marital_status == 'Single' else 3.2 if marital_status == 'Married' else 1.8 if marital_status == 'Divorced' else 1.3 if marital_status == 'Widowed' else 2.5 if marital_status == 'Domestic Partn...[truncated]", - "std_formula": null, - "min": 1, - "max": 12, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 1, - "expression": null, - "reason": "Minimum household size is 1 (the person themselves)" - }, - { - "type": "hard_max", - "value": 12, - "expression": null, - "reason": "Extremely large households are very rare; cap at 12" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2023: average household size 2.51 persons; married households average ~3.2, single-person households common", - "note": "Mean formula uses chained ternary. Integer rounding applied post-sample. Std kept at 1.4 to reflect broad spread." - } - }, - { - "name": "has_children", - "distribution": { - "type": "boolean", - "probability_true": 0.28, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Census 2020: ~40% of family households had children under 18, but as share of all adults ~28% have children under 18 at home. Age and marital status modifiers will adjust substantially.", - "note": "Base rate is ~28% of adults having children under 18 in household. Peaks strongly in ages 25-44, much lower for singles and elderly." - } - }, - { - "name": "employment_status", - "distribution": { - "type": "categorical", - "options": [ - "Full-time", - "Part-time", - "Self-employed", - "Unemployed", - "Retired", - "Student" - ], - "weights": [ - 0.47, - 0.12, - 0.09, - 0.04, - 0.22, - 0.06 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "extrapolated", - "source": "BLS 2023: ~62% employment-population ratio adults 16+; ~22% retired estimated from age distribution; student ~6%; unemployed ~4% (unemployment rate ~3.7% in 2023)", - "note": "Age is the dominant modifier: retirement rises sharply after 62, student peaks 18-24. Education modifies full-time vs part-time propensity." - } - }, - { - "name": "occupation", - "distribution": { - "type": "categorical", - "options": [ - "Management/Professional", - "Service", - "Sales/Office", - "Construction/Extraction", - "Production/Transport", - "Other" - ], - "weights": [ - 0.38, - 0.17, - 0.2, - 0.09, - 0.11, - 0.05 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Occupational Employment Statistics 2023: management/professional ~38% of employed workers; service ~17%; sales/office ~20%; construction ~9%; production/transport ~11%", - "note": "Only applies to employed persons. Education modifier critical: bachelor's/graduate degree strongly predicts management/professional category." - } - }, - { - "name": "political_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Strong Democrat", - "Lean Democrat", - "Independent", - "Lean Republican", - "Strong Republican" - ], - "weights": [ - 0.18, - 0.17, - 0.38, - 0.13, - 0.14 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup/Pew 2023: ~31% Democrat-leaning, ~27% Republican-leaning, ~38% Independent; strong partisan splits roughly 18/14 based on ANES data", - "note": "Weights sum to exactly 1.0 (0.18+0.17+0.38+0.13+0.14=1.00). State and education modifiers will shift substantially (e.g., CA toward Democrat, WY toward Republican)." - } - }, - { - "name": "political_ideology", - "distribution": { - "type": "categorical", - "options": [ - "Very Liberal", - "Liberal", - "Moderate", - "Conservative", - "Very Conservative" - ], - "weights": [ - 0.09, - 0.2, - 0.38, - 0.24, - 0.09 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup 2023 ideology: ~25% liberal, ~37% moderate, ~36% conservative; very liberal/very conservative tails ~9% each from ANES data", - "note": "Political affiliation modifier will strongly shift these weights \u2014 Strong Democrats shift toward Very Liberal, Strong Republicans toward Very Conservative." - } - }, - { - "name": "religious_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Evangelical Protestant", - "Mainline Protestant", - "Catholic", - "Other Christian", - "Jewish", - "Muslim", - "Other Non-Christian", - "None/Unaffiliated" - ], - "weights": [ - 0.24, - 0.14, - 0.21, - 0.06, - 0.02, - 0.01, - 0.04, - 0.28 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2023 Religious Landscape Study: 24% evangelical, 14% mainline Protestant, 21% Catholic, 28% unaffiliated; smaller shares for Jewish, Muslim, other", - "note": "Race/ethnicity modifier important: Black non-Hispanic skews strongly toward Protestant; Hispanic toward Catholic; Asian toward Other Non-Christian or None." - } - }, - { - "name": "religious_attendance", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Seldom", - "A few times/year", - "Monthly", - "Weekly", - "More than weekly" - ], - "weights": [ - 0.29, - 0.17, - 0.16, - 0.1, - 0.22, - 0.06 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research 2023/Gallup: ~29% never attend, ~17% seldom, ~16% a few times/year, ~10% monthly, ~22% weekly, ~6% more than weekly", - "note": "Religious affiliation modifier is dominant: None/Unaffiliated will shift almost entirely to Never/Seldom; Evangelical Protestant shifts toward Weekly/More than weekly." - } - }, - { - "name": "primary_news_source", - "distribution": { - "type": "categorical", - "options": [ - "TV", - "Online/Digital", - "Social Media", - "Radio", - "Print Newspaper", - "None" - ], - "weights": [ - 0.3, - 0.28, - 0.18, - 0.08, - 0.06, - 0.1 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research 2023 News Consumption Survey: TV remains top source (~30%), online/digital growing (~28%), social media ~18%, radio ~8%, print ~6%, none ~10%", - "note": "Age is the primary modifier: TV dominates for 65+, social media dominates for 18-29. Education raises online/digital and print use." - } - }, - { - "name": "news_outlet_lean", - "distribution": { - "type": "categorical", - "options": [ - "Left-leaning", - "Center", - "Right-leaning", - "Mixed/No Preference" - ], - "weights": [ - 0.27, - 0.22, - 0.23, - 0.28 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew Media Bias research and AllSides ratings: roughly balanced left/right at national level; strong partisans strongly prefer aligned outlets", - "note": "Political affiliation is the dominant modifier. Strong Democrats overwhelmingly select left-leaning; Strong Republicans select right-leaning. Independents cluster in Center/Mixed." - } - }, - { - "name": "social_media_platforms", - "distribution": { - "type": "categorical", - "options": [ - "Facebook", - "YouTube", - "Instagram", - "TikTok", - "Twitter/X", - "None/Minimal" - ], - "weights": [ - 0.26, - 0.23, - 0.18, - 0.1, - 0.08, - 0.15 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research 2023 Social Media Use Survey: Facebook 68% users, YouTube 83%, Instagram 47%, TikTok 33%, Twitter/X 22% of US adults; primary platform weights estimated", - "note": "Age is the dominant modifier: Facebook primary for 50+, TikTok primary for 18-24, Instagram primary for 25-34. None/Minimal higher for 65+." - } - }, - { - "name": "social_media_hours_per_day", - "distribution": { - "type": "lognormal", - "mean": 2.3, - "std": 2.1, - "mean_formula": "0.5 if social_media_platforms == 'None/Minimal' else 3.5 if social_media_platforms == 'TikTok' else 2.8 if social_media_platforms == 'Instagram' else 2.3 if social_media_platforms == 'YouTube' else 1....[truncated]", - "std_formula": null, - "min": 0.0, - "max": 16.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Cannot spend negative hours on social media" - }, - { - "type": "hard_max", - "value": 16, - "expression": null, - "reason": "Upper bound limited by waking hours" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Datareportal / Pew 2023: average US adult social media time ~2.3 hrs/day; TikTok users average higher (~3+ hrs); lognormal reflects right skew", - "note": "Age modifier will reduce usage for 65+ and increase for 18-24. Lognormal appropriate for this right-skewed distribution." - } - }, - { - "name": "internet_access", - "distribution": { - "type": "categorical", - "options": [ - "Broadband", - "Mobile Only", - "Dial-up/Satellite", - "None" - ], - "weights": [ - 0.77, - 0.15, - 0.04, - 0.04 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "FCC/Pew 2023: ~77% broadband at home, ~15% mobile only, ~4% satellite/dial-up, ~4% no internet; rural and low-income households shift toward mobile-only or none", - "note": "Urban/rural and income are key modifiers: rural areas have much higher satellite/none; low-income have more mobile-only." - } - }, - { - "name": "civic_engagement", - "distribution": { - "type": "categorical", - "options": [ - "Votes regularly", - "Votes sometimes", - "Rarely/Never votes", - "Actively volunteers or campaigns" - ], - "weights": [ - 0.46, - 0.24, - 0.22, - 0.08 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Voting/Registration 2022: ~46% of adults voted in 2022 midterms; ~61% in 2020 presidential; base uses midterm rate; active volunteers ~8% per Pew civic engagement data", - "note": "Age and education are strong modifiers: voting rises with age and education. Younger adults have the lowest turnout historically." - } - }, - { - "name": "homeownership", - "distribution": { - "type": "boolean", - "probability_true": 0.66, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2023 Housing Vacancy Survey: national homeownership rate ~65.9%. Income and age are strong positive predictors.", - "note": "Income and age modifiers are critical: homeownership is ~38% for under-35 adults but ~79% for 65+. Low income households rent at much higher rates." - } - }, - { - "name": "health_insurance_type", - "distribution": { - "type": "categorical", - "options": [ - "Employer-sponsored", - "Medicaid/CHIP", - "Medicare", - "Individual Market/ACA", - "Military/VA", - "Uninsured" - ], - "weights": [ - 0.49, - 0.18, - 0.17, - 0.06, - 0.03, - 0.07 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Census Bureau Health Insurance Coverage 2023: ~49% employer, ~18% Medicaid/CHIP, ~17% Medicare, ~6% individual market, ~3% military/VA, ~7-8% uninsured", - "note": "Employment status and income are key modifiers: retired shifts to Medicare, unemployed low-income shifts to Medicaid/uninsured, full-time employed shifts strongly to employer-sponsored." - } - }, - { - "name": "immigration_status", - "distribution": { - "type": "categorical", - "options": [ - "US-born citizen", - "Naturalized citizen", - "Permanent resident", - "Other" - ], - "weights": [ - 0.86, - 0.07, - 0.04, - 0.03 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights)==1.0", - "reason": "Weights must sum to 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Census Bureau 2023: ~86% US-born citizens, ~7% naturalized, ~4% permanent residents, ~3% other non-citizens among adult population", - "note": "Race/ethnicity modifier is critical: Hispanic adults have much higher foreign-born share (~36%); Asian adults also higher (~55% foreign-born)." - } - }, - { - "name": "union_membership", - "distribution": { - "type": "boolean", - "probability_true": 0.1, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Union Membership 2023: 10.0% of wage and salary workers were union members in 2023, down from 10.1% in 2022", - "note": "Occupation and employment status are key modifiers: self-employed and management rarely unionized; production/transport and public sector workers much higher." - } - }, - { - "name": "gun_ownership", - "distribution": { - "type": "boolean", - "probability_true": 0.32, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research 2023: ~32% of US adults personally own a gun; rural (~46%) vs urban (~19%) gap is substantial. State also matters (e.g., Wyoming ~66%, HI ~9%)", - "note": "Urban/rural and state modifiers are dominant. Rural residents nearly 2.5x more likely to own guns than urban residents." - } - }, - { - "name": "trust_in_institutions", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "probability_true": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Trust bounded at 0" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Trust bounded at 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup/Pew 2023: institutional trust at historic lows \u2014 ~26% trust Congress, ~38% trust presidency, ~36% trust media; Beta(2.5,3.5) gives mean ~0.42 reflecting low-trust environment", - "note": "Political ideology is primary modifier: Very Conservative skews lower trust in government/media; Very Liberal skews lower trust in courts/police. Education weakly raises trust." - } - }, - { - "name": "need_for_cognition", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 2.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "probability_true": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Scale bounded at 0" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Scale bounded at 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Cacioppo & Petty NFC research: roughly normally distributed in general population; Beta(2.5,2.5) gives symmetric distribution with mean 0.5. Education is a positive predictor.", - "note": "Education modifier shifts mean upward (graduate degree ~0.65, less than HS ~0.35). Correlates with openness personality trait." - } - }, - { - "name": "susceptibility_to_misinformation", - "distribution": { - "type": "beta", - "alpha": 2.0, - "beta": 3.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "probability_true": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Scale bounded at 0" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Scale bounded at 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pennycook & Rand (2019), Roozenbeek et al. (2020): susceptibility to misinformation inversely correlated with need_for_cognition and media literacy; Beta(2,3) mean ~0.4 reflects that most adults have ...[truncated]", - "note": "Need_for_cognition and social_media_hours_per_day are key modifiers: high NFC reduces susceptibility; high social media hours increases it. Inverse relationship with education." - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 78975, - "output_tokens": 9163, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://en.wikipedia.org/wiki/Household_income_in_the_United_States", - "https://www.cdc.gov/nchs/fastats/marriage-divorce.htm", - "https://worldpopulationreview.com/state-rankings/average-household-size-by-state", - "https://www.census.gov/library/publications/2025/demo/p60-286.html", - "https://www.statista.com/statistics/203183/percentage-distribution-of-household-income-in-the-us/", - "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "https://www.census.gov/topics/families/families-and-households.html", - "https://nces.ed.gov/programs/edge/Geographic/LocaleBoundaries", - "https://usafacts.org/data/topics/people-society/population-and-demographics/population-data/average-family-size/", - "https://www.census.gov/quickfacts/fact/table/US/HCN010222", - "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://data.census.gov/table/ACSST5Y2023.S1201?q=82073", - "https://www.census.gov/acs/www/about/why-we-ask-each-question/marital/", - "https://www.census.gov/content/dam/Census/library/publications/2023/demo/p60-279.pdf", - "https://www.statista.com/statistics/184260/educational-attainment-in-the-us/", - "https://nces.ed.gov/fastfacts/display.asp?id=27", - "https://www.ers.usda.gov/data-products/rural-urban-continuum-codes", - "https://www.statista.com/statistics/985183/size-urban-rural-population-us/", - "https://www.icip.iastate.edu/tables/population/urban-pct-states", - "https://www.census.gov/data/tables/2022/demo/educational-attainment/cps-detailed-tables.html", - "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html", - "https://www.census.gov/data/tables/time-series/demo/families/marital.html", - "https://www.census.gov/topics/education/educational-attainment.html", - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://www.census.gov/newsroom/stories/unmarried-single-americans-week.html", - "https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/", - "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html", - "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html", - "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/", - "https://www2.census.gov/library/publications/2024/demo/acsbr-023.pdf", - "https://educationdata.org/education-attainment-statistics", - "https://www.census.gov/library/publications/2024/demo/p60-282.html", - "https://nces.ed.gov/programs/digest/2023menu_tables.asp", - "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/", - "https://www.hcmmlaw.com/blog/2024/07/13/majority-americans-now-single-statistics-insights/", - "https://statisticalatlas.com/United-States/Marital-Status", - "https://www.census.gov/library/visualizations/2023/comm/median-household-income.html", - "https://fred.stlouisfed.org/series/TTLHH", - "https://www.census.gov/topics/education/educational-attainment/data/tables.html", - "https://fred.stlouisfed.org/series/MEHOINUSA672N", - "https://www.arcgis.com/home/item.html?id=458e2c20ebb2479086bc32b7d09ffe27", - "https://www.census.gov/topics/education.html", - "https://wisevoter.com/state-rankings/average-household-size-by-state/", - "https://censusreporter.org/topics/marital-status/", - "https://www.census.gov/newsroom/press-releases/2023/educational-attainment-data.html", - "https://www.cdc.gov/nchs/data-analysis-tools/urban-rural.html", - "https://www.census.gov/library/publications/2023/demo/p60-279.html", - "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_210733_359377_claude_agentic_research.json b/examples/logs/20260217_210733_359377_claude_agentic_research.json deleted file mode 100644 index 96a3bad..0000000 --- a/examples/logs/20260217_210733_359377_claude_agentic_research.json +++ /dev/null @@ -1,1938 +0,0 @@ -{ - "timestamp": "2026-02-17T21:07:33.359441", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 12896 - }, - "response": { - "id": "msg_01ABrEUMe75RRXyNnTffkPMz", - "content": [ - { - "id": "srvtoolu_013iyYGzPisxCrDKw6NSVWB3", - "input": { - "query": "US adult population urban rural distribution by state 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01HCaVkm2uJZ7hZhkFjUJkUg", - "input": { - "query": "US education level distribution by age 2024 census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_0198gqvdbRdbaBpZJpELAfSu", - "input": { - "query": "US political affiliation by state education level 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=6668]", - "page_age": null, - "title": "Nation\u2019s Urban and Rural Populations Shift Following 2020 Census", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=444]", - "page_age": null, - "title": "Urban Percentage of the Population for States, Historical | Iowa Community Indicators Program", - "type": "web_search_result", - "url": "https://www.icip.iastate.edu/tables/population/urban-pct-states" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3068]", - "page_age": "September 20, 2025", - "title": "Urbanization in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Urbanization_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6560]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3336]", - "page_age": null, - "title": "Size of urban and rural population U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/985183/size-urban-rural-population-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=844]", - "page_age": null, - "title": "United States - Rural Population - 2026 Data 2027 Forecast 1960-2024 Historical", - "type": "web_search_result", - "url": "https://tradingeconomics.com/united-states/rural-population-percent-of-total-population-wb-data.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5472]", - "page_age": null, - "title": "October 2024 RESEARCH REPORT 1 acsh HP-2024-22", - "type": "web_search_result", - "url": "https://aspe.hhs.gov/sites/default/files/documents/6056484066506a8d4ba3dcd8d9322490/rural-health-rr-30-Oct-24.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1464]", - "page_age": null, - "title": "Urban and Rural", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5652]", - "page_age": "April 14, 2024", - "title": "Demographic and economic trends in urban, suburban and rural communities", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5120]", - "page_age": null, - "title": "Changes to Population Distribution and Commuting Patterns Blur the Distinction between Rural and Urban", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2024/08/redefining-rural.html" - } - ], - "tool_use_id": "srvtoolu_013iyYGzPisxCrDKw6NSVWB3", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1392]", - "page_age": null, - "title": "Census Bureau Releases New Educational Attainment Data", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1348]", - "page_age": null, - "title": "Educational Attainment Tables", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education/educational-attainment/data/tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1476]", - "page_age": null, - "title": "Educational Attainment in the United States: 2024", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4032]", - "page_age": null, - "title": "Educational Attainment", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education/educational-attainment.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3672]", - "page_age": "September 10, 2025", - "title": "US Census Bureau Releases New Educational Attainment Data - Stephen's Lighthouse", - "type": "web_search_result", - "url": "https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2860]", - "page_age": null, - "title": "Education", - "type": "web_search_result", - "url": "https://www.census.gov/topics/education.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7456]", - "page_age": "3 weeks ago", - "title": "Educational attainment in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5676]", - "page_age": "January 15, 2025", - "title": "Educational Attainment Statistics [2025]: Levels by Demographic", - "type": "web_search_result", - "url": "https://educationdata.org/education-attainment-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1108]", - "page_age": null, - "title": "CPS Historical Time Series Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/educational-attainment/cps-historical-time-series.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2612]", - "page_age": null, - "title": "Educational attainment of population ages 25 to 34 | KIDS COUNT Data Center", - "type": "web_search_result", - "url": "https://datacenter.aecf.org/data/tables/6294-educational-attainment-of-population-ages-25-to-34" - } - ], - "tool_use_id": "srvtoolu_01HCaVkm2uJZ7hZhkFjUJkUg", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5200]", - "page_age": "April 24, 2025", - "title": "Party affiliation of US voters by race, ethnicity, education | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/2024/04/09/partisanship-by-race-ethnicity-and-education/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=460]", - "page_age": "November 7, 2020", - "title": "The Most Educated States Voted Blue | by Kathryn Staublin | Medium", - "type": "web_search_result", - "url": "https://medium.com/@kathrynstaublin/the-most-educated-states-voted-blue-f60f304531f7" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5640]", - "page_age": null, - "title": "Knowledge Box - Research Day: The United States Ever Changing Political Ideology and Educational Divide", - "type": "web_search_result", - "url": "https://kb.gcsu.edu/researchday/2024/all/41/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=468]", - "page_age": "June 9, 2025", - "title": "Do smarter states vote blue? Study finds the most educated states lean Democratic \u2013 Lassen News", - "type": "web_search_result", - "url": "https://www.lassennews.com/do-smarter-states-vote-blue-study-finds-the-most-educated-states-lean-democratic" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5440]", - "page_age": null, - "title": "Educational Attainment and the Presidential Elections", - "type": "web_search_result", - "url": "https://www.highereddatastories.com/2025/02/educational-attainment-and-presidential.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1820]", - "page_age": "November 7, 2024", - "title": "College education levels predicted whether states went Trump or Harris", - "type": "web_search_result", - "url": "https://www.axios.com/2024/11/07/college-degree-voters-split-harris-trump" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5648]", - "page_age": "September 11, 2025", - "title": "Which Party Really Has the Edge on Education? - Education Next", - "type": "web_search_result", - "url": "https://www.educationnext.org/which-party-really-has-the-edge-on-education/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=452]", - "page_age": "November 7, 2024", - "title": "A Tale of Two Maps: Education and Politics in America \u2014 Collectiver", - "type": "web_search_result", - "url": "https://collectiver.com/blog/education-vote-correlation/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6456]", - "page_age": "October 14, 2024", - "title": "Analysis: Why education level has become the best predictor for how someone will vote | CNN Politics", - "type": "web_search_result", - "url": "https://www.cnn.com/2024/10/14/politics/the-biggest-predictor-of-how-someone-will-vote" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5520]", - "page_age": "November 1, 2024", - "title": "How a college degree is one of the best predictors of which candidate voters support | PBS News", - "type": "web_search_result", - "url": "https://www.pbs.org/newshour/show/how-a-college-degree-is-one-of-the-best-predictors-of-which-candidate-voters-support" - } - ], - "tool_use_id": "srvtoolu_0198gqvdbRdbaBpZJpELAfSu", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=206]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01BWaVyfLEquNzRRXQN7hKP3", - "input": { - "attributes": [ - { - "name": "urban_rural", - "modifiers": [ - { - "when": "state in ['CA', 'NY', 'NJ', 'MA', 'IL', 'MD', 'CT', 'RI', 'DC', 'HI']", - "multiply": null, - "add": null, - "weight_overrides": { - "Urban": 0.6, - "Suburban": 0.32, - "Rural": 0.08 - }, - "probability_override": null - }, - { - "when": "state in ['TX', 'FL', 'GA', 'WA', 'CO', 'AZ', 'NV', 'OR', 'VA', 'MN', 'PA', 'MI', 'OH', 'NC', 'TN', 'MO', 'IN', 'WI', 'SC', 'KS', 'NM', 'UT', 'NE', 'IA', 'OK', 'DE', 'NH']", - "multiply": null, - "add": null, - "weight_overrides": { - "Urban": 0.35, - "Suburban": 0.45, - "Rural": 0.2 - }, - "probability_override": null - }, - { - "when": "state in ['WV', 'VT', 'ME', 'MT', 'SD', 'ND', 'AK', 'WY', 'MS', 'AR', 'AL', 'LA', 'KY', 'ID']", - "multiply": null, - "add": null, - "weight_overrides": { - "Urban": 0.2, - "Suburban": 0.3, - "Rural": 0.5 - }, - "probability_override": null - } - ] - }, - { - "name": "education_level", - "modifiers": [ - { - "when": "age < 25", - "multiply": null, - "add": null, - "weight_overrides": { - "Less than HS": 0.06, - "HS Diploma": 0.28, - "Some College": 0.38, - "Associate's": 0.08, - "Bachelor's": 0.16, - "Graduate Degree": 0.04 - }, - "probability_override": null - }, - { - "when": "age >= 25 and age < 35", - "multiply": null, - "add": null, - "weight_overrides": { - "Less than HS": 0.07, - "HS Diploma": 0.22, - "Some College": 0.2, - "Associate's": 0.09, - "Bachelor's": 0.28, - "Graduate Degree": 0.14 - }, - "probability_override": null - }, - { - "when": "age >= 35 and age < 55", - "multiply": null, - "add": null, - "weight_overrides": { - "Less than HS": 0.08, - "HS Diploma": 0.25, - "Some College": 0.2, - "Associate's": 0.1, - "Bachelor's": 0.24, - "Graduate Degree": 0.13 - }, - "probability_override": null - }, - { - "when": "age >= 55", - "multiply": null, - "add": null, - "weight_overrides": { - "Less than HS": 0.1, - "HS Diploma": 0.32, - "Some College": 0.19, - "Associate's": 0.09, - "Bachelor's": 0.18, - "Graduate Degree": 0.12 - }, - "probability_override": null - } - ] - }, - { - "name": "household_income", - "modifiers": [ - { - "when": "education_level == 'Less than HS' and state in ['CA', 'NY', 'MA', 'WA', 'CT', 'NJ', 'MD', 'CO', 'HI', 'DC']", - "multiply": 1.25, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Bachelor\\'s' and state in ['CA', 'NY', 'MA', 'WA', 'CT', 'NJ', 'MD', 'CO', 'HI', 'DC']", - "multiply": 1.35, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree' and state in ['CA', 'NY', 'MA', 'WA', 'CT', 'NJ', 'MD', 'CO', 'HI', 'DC']", - "multiply": 1.4, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Bachelor\\'s' and state in ['MS', 'WV', 'AR', 'AL', 'NM', 'KY', 'LA', 'SD', 'MT', 'ID']", - "multiply": 0.82, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree' and state in ['MS', 'WV', 'AR', 'AL', 'NM', 'KY', 'LA', 'SD', 'MT', 'ID']", - "multiply": 0.82, - "add": 0, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "marital_status", - "modifiers": [ - { - "when": "age < 30", - "multiply": null, - "add": null, - "weight_overrides": { - "Single": 0.65, - "Married": 0.18, - "Divorced": 0.04, - "Widowed": 0.01, - "Domestic Partnership": 0.12 - }, - "probability_override": null - }, - { - "when": "age >= 30 and age < 45", - "multiply": null, - "add": null, - "weight_overrides": { - "Single": 0.25, - "Married": 0.52, - "Divorced": 0.12, - "Widowed": 0.02, - "Domestic Partnership": 0.09 - }, - "probability_override": null - }, - { - "when": "age >= 45 and age < 65", - "multiply": null, - "add": null, - "weight_overrides": { - "Single": 0.14, - "Married": 0.55, - "Divorced": 0.2, - "Widowed": 0.05, - "Domestic Partnership": 0.06 - }, - "probability_override": null - }, - { - "when": "age >= 65", - "multiply": null, - "add": null, - "weight_overrides": { - "Single": 0.09, - "Married": 0.55, - "Divorced": 0.14, - "Widowed": 0.19, - "Domestic Partnership": 0.03 - }, - "probability_override": null - } - ] - }, - { - "name": "household_size", - "modifiers": [ - { - "when": "marital_status == 'Married' and age < 40", - "multiply": 1.15, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "marital_status == 'Single' and age >= 65", - "multiply": 0.95, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "marital_status == 'Widowed' and age >= 65", - "multiply": 0.9, - "add": 0, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "has_children", - "modifiers": [ - { - "when": "age < 25 and marital_status == 'Single'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.06 - }, - { - "when": "age >= 25 and age < 35 and marital_status == 'Married'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.48 - }, - { - "when": "age >= 35 and age < 45 and marital_status == 'Married'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.58 - }, - { - "when": "age >= 45 and age < 55 and marital_status == 'Married'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.3 - }, - { - "when": "age >= 55", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.06 - }, - { - "when": "age >= 25 and age < 40 and marital_status == 'Domestic Partnership'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.28 - } - ] - }, - { - "name": "employment_status", - "modifiers": [ - { - "when": "age < 25 and education_level in ['Less than HS', 'HS Diploma', 'Some College']", - "multiply": null, - "add": null, - "weight_overrides": { - "Full-time": 0.28, - "Part-time": 0.22, - "Self-employed": 0.03, - "Unemployed": 0.08, - "Retired": 0.0, - "Student": 0.39 - }, - "probability_override": null - }, - { - "when": "age >= 25 and age < 55 and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "Full-time": 0.72, - "Part-time": 0.08, - "Self-employed": 0.12, - "Unemployed": 0.03, - "Retired": 0.02, - "Student": 0.03 - }, - "probability_override": null - }, - { - "when": "age >= 25 and age < 55 and education_level in ['Less than HS', 'HS Diploma', 'Some College', 'Associate\\'s']", - "multiply": null, - "add": null, - "weight_overrides": { - "Full-time": 0.57, - "Part-time": 0.14, - "Self-employed": 0.08, - "Unemployed": 0.08, - "Retired": 0.02, - "Student": 0.11 - }, - "probability_override": null - }, - { - "when": "age >= 55 and age < 65", - "multiply": null, - "add": null, - "weight_overrides": { - "Full-time": 0.5, - "Part-time": 0.12, - "Self-employed": 0.1, - "Unemployed": 0.05, - "Retired": 0.2, - "Student": 0.03 - }, - "probability_override": null - }, - { - "when": "age >= 65", - "multiply": null, - "add": null, - "weight_overrides": { - "Full-time": 0.12, - "Part-time": 0.09, - "Self-employed": 0.07, - "Unemployed": 0.02, - "Retired": 0.69, - "Student": 0.01 - }, - "probability_override": null - } - ] - }, - { - "name": "occupation", - "modifiers": [ - { - "when": "education_level == 'Graduate Degree' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": { - "Management/Professional": 0.72, - "Service": 0.08, - "Sales/Office": 0.1, - "Construction/Extraction": 0.02, - "Production/Transport": 0.02, - "Other": 0.06 - }, - "probability_override": null - }, - { - "when": "education_level == 'Bachelor\\'s' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": { - "Management/Professional": 0.55, - "Service": 0.1, - "Sales/Office": 0.22, - "Construction/Extraction": 0.04, - "Production/Transport": 0.04, - "Other": 0.05 - }, - "probability_override": null - }, - { - "when": "education_level in ['Some College', 'Associate\\'s'] and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": { - "Management/Professional": 0.25, - "Service": 0.22, - "Sales/Office": 0.3, - "Construction/Extraction": 0.09, - "Production/Transport": 0.1, - "Other": 0.04 - }, - "probability_override": null - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma'] and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": { - "Management/Professional": 0.1, - "Service": 0.28, - "Sales/Office": 0.22, - "Construction/Extraction": 0.18, - "Production/Transport": 0.18, - "Other": 0.04 - }, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree' and employment_status == 'Self-employed'", - "multiply": null, - "add": null, - "weight_overrides": { - "Management/Professional": 0.68, - "Service": 0.1, - "Sales/Office": 0.1, - "Construction/Extraction": 0.02, - "Production/Transport": 0.02, - "Other": 0.08 - }, - "probability_override": null - } - ] - }, - { - "name": "political_affiliation", - "modifiers": [ - { - "when": "state in ['CA', 'NY', 'MA', 'IL', 'MD', 'CT', 'RI', 'VT', 'HI', 'DC', 'WA', 'OR', 'NJ', 'CO', 'NM', 'DE', 'ME']", - "multiply": null, - "add": null, - "weight_overrides": { - "Strong Democrat": 0.28, - "Lean Democrat": 0.22, - "Independent": 0.22, - "Lean Republican": 0.14, - "Strong Republican": 0.14 - }, - "probability_override": null - }, - { - "when": "state in ['TX', 'FL', 'GA', 'NC', 'AZ', 'NV', 'VA', 'PA', 'MI', 'WI', 'MN', 'NH']", - "multiply": null, - "add": null, - "weight_overrides": { - "Strong Democrat": 0.18, - "Lean Democrat": 0.18, - "Independent": 0.25, - "Lean Republican": 0.2, - "Strong Republican": 0.19 - }, - "probability_override": null - }, - { - "when": "state in ['WY', 'ID', 'ND', 'SD', 'NE', 'UT', 'KS', 'OK', 'AL', 'AR', 'WV', 'MS', 'TN', 'KY', 'SC', 'IN', 'MT', 'MO', 'LA', 'AK']", - "multiply": null, - "add": null, - "weight_overrides": { - "Strong Democrat": 0.12, - "Lean Democrat": 0.13, - "Independent": 0.2, - "Lean Republican": 0.22, - "Strong Republican": 0.33 - }, - "probability_override": null - }, - { - "when": "education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "Strong Democrat": 0.24, - "Lean Democrat": 0.21, - "Independent": 0.22, - "Lean Republican": 0.18, - "Strong Republican": 0.15 - }, - "probability_override": null - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma']", - "multiply": null, - "add": null, - "weight_overrides": { - "Strong Democrat": 0.16, - "Lean Democrat": 0.16, - "Independent": 0.23, - "Lean Republican": 0.2, - "Strong Republican": 0.25 - }, - "probability_override": null - } - ] - }, - { - "name": "political_ideology", - "modifiers": [ - { - "when": "political_affiliation == 'Strong Democrat'", - "multiply": null, - "add": null, - "weight_overrides": { - "Very Liberal": 0.38, - "Liberal": 0.42, - "Moderate": 0.15, - "Conservative": 0.04, - "Very Conservative": 0.01 - }, - "probability_override": null - }, - { - "when": "political_affiliation == 'Lean Democrat'", - "multiply": null, - "add": null, - "weight_overrides": { - "Very Liberal": 0.12, - "Liberal": 0.4, - "Moderate": 0.38, - "Conservative": 0.08, - "Very Conservative": 0.02 - }, - "probability_override": null - }, - { - "when": "political_affiliation == 'Independent'", - "multiply": null, - "add": null, - "weight_overrides": { - "Very Liberal": 0.06, - "Liberal": 0.16, - "Moderate": 0.5, - "Conservative": 0.2, - "Very Conservative": 0.08 - }, - "probability_override": null - }, - { - "when": "political_affiliation == 'Lean Republican'", - "multiply": null, - "add": null, - "weight_overrides": { - "Very Liberal": 0.02, - "Liberal": 0.07, - "Moderate": 0.35, - "Conservative": 0.42, - "Very Conservative": 0.14 - }, - "probability_override": null - }, - { - "when": "political_affiliation == 'Strong Republican'", - "multiply": null, - "add": null, - "weight_overrides": { - "Very Liberal": 0.01, - "Liberal": 0.03, - "Moderate": 0.13, - "Conservative": 0.41, - "Very Conservative": 0.42 - }, - "probability_override": null - } - ] - }, - { - "name": "religious_affiliation", - "modifiers": [ - { - "when": "race_ethnicity == 'White non-Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Evangelical Protestant": 0.26, - "Mainline Protestant": 0.18, - "Catholic": 0.2, - "Other Christian": 0.06, - "Jewish": 0.03, - "Muslim": 0.01, - "Other Non-Christian": 0.03, - "None/Unaffiliated": 0.23 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Black non-Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Evangelical Protestant": 0.45, - "Mainline Protestant": 0.14, - "Catholic": 0.06, - "Other Christian": 0.12, - "Jewish": 0.01, - "Muslim": 0.04, - "Other Non-Christian": 0.02, - "None/Unaffiliated": 0.16 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Evangelical Protestant": 0.16, - "Mainline Protestant": 0.05, - "Catholic": 0.48, - "Other Christian": 0.08, - "Jewish": 0.01, - "Muslim": 0.01, - "Other Non-Christian": 0.03, - "None/Unaffiliated": 0.18 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Asian non-Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Evangelical Protestant": 0.08, - "Mainline Protestant": 0.06, - "Catholic": 0.08, - "Other Christian": 0.06, - "Jewish": 0.01, - "Muslim": 0.04, - "Other Non-Christian": 0.26, - "None/Unaffiliated": 0.41 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Other/Multiracial'", - "multiply": null, - "add": null, - "weight_overrides": { - "Evangelical Protestant": 0.18, - "Mainline Protestant": 0.09, - "Catholic": 0.14, - "Other Christian": 0.09, - "Jewish": 0.02, - "Muslim": 0.03, - "Other Non-Christian": 0.09, - "None/Unaffiliated": 0.36 - }, - "probability_override": null - } - ] - }, - { - "name": "religious_attendance", - "modifiers": [ - { - "when": "religious_affiliation == 'None/Unaffiliated'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.6, - "Seldom": 0.22, - "A few times/year": 0.1, - "Monthly": 0.04, - "Weekly": 0.03, - "More than weekly": 0.01 - }, - "probability_override": null - }, - { - "when": "religious_affiliation == 'Evangelical Protestant'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.06, - "Seldom": 0.1, - "A few times/year": 0.14, - "Monthly": 0.14, - "Weekly": 0.38, - "More than weekly": 0.18 - }, - "probability_override": null - }, - { - "when": "religious_affiliation == 'Mainline Protestant'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.1, - "Seldom": 0.18, - "A few times/year": 0.22, - "Monthly": 0.18, - "Weekly": 0.26, - "More than weekly": 0.06 - }, - "probability_override": null - }, - { - "when": "religious_affiliation == 'Catholic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.12, - "Seldom": 0.2, - "A few times/year": 0.22, - "Monthly": 0.16, - "Weekly": 0.24, - "More than weekly": 0.06 - }, - "probability_override": null - }, - { - "when": "religious_affiliation == 'Muslim'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.06, - "Seldom": 0.12, - "A few times/year": 0.14, - "Monthly": 0.16, - "Weekly": 0.38, - "More than weekly": 0.14 - }, - "probability_override": null - }, - { - "when": "religious_affiliation in ['Other Christian', 'Other Non-Christian', 'Jewish']", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.14, - "Seldom": 0.18, - "A few times/year": 0.2, - "Monthly": 0.18, - "Weekly": 0.22, - "More than weekly": 0.08 - }, - "probability_override": null - } - ] - }, - { - "name": "primary_news_source", - "modifiers": [ - { - "when": "age < 30 and education_level in ['Less than HS', 'HS Diploma', 'Some College']", - "multiply": null, - "add": null, - "weight_overrides": { - "TV": 0.08, - "Online/Digital": 0.28, - "Social Media": 0.48, - "Radio": 0.04, - "Print Newspaper": 0.02, - "None": 0.1 - }, - "probability_override": null - }, - { - "when": "age < 30 and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "TV": 0.06, - "Online/Digital": 0.5, - "Social Media": 0.3, - "Radio": 0.04, - "Print Newspaper": 0.04, - "None": 0.06 - }, - "probability_override": null - }, - { - "when": "age >= 30 and age < 50 and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "TV": 0.16, - "Online/Digital": 0.5, - "Social Media": 0.18, - "Radio": 0.08, - "Print Newspaper": 0.06, - "None": 0.02 - }, - "probability_override": null - }, - { - "when": "age >= 30 and age < 50 and education_level in ['Less than HS', 'HS Diploma', 'Some College', 'Associate\\'s']", - "multiply": null, - "add": null, - "weight_overrides": { - "TV": 0.28, - "Online/Digital": 0.28, - "Social Media": 0.3, - "Radio": 0.08, - "Print Newspaper": 0.03, - "None": 0.03 - }, - "probability_override": null - }, - { - "when": "age >= 50 and age < 65", - "multiply": null, - "add": null, - "weight_overrides": { - "TV": 0.42, - "Online/Digital": 0.28, - "Social Media": 0.16, - "Radio": 0.09, - "Print Newspaper": 0.04, - "None": 0.01 - }, - "probability_override": null - }, - { - "when": "age >= 65", - "multiply": null, - "add": null, - "weight_overrides": { - "TV": 0.56, - "Online/Digital": 0.18, - "Social Media": 0.1, - "Radio": 0.1, - "Print Newspaper": 0.05, - "None": 0.01 - }, - "probability_override": null - } - ] - }, - { - "name": "news_outlet_lean", - "modifiers": [ - { - "when": "political_affiliation in ['Strong Democrat', 'Lean Democrat'] and primary_news_source in ['TV', 'Online/Digital']", - "multiply": null, - "add": null, - "weight_overrides": { - "Left-leaning": 0.52, - "Center": 0.28, - "Right-leaning": 0.08, - "Mixed/No Preference": 0.12 - }, - "probability_override": null - }, - { - "when": "political_affiliation in ['Strong Republican', 'Lean Republican'] and primary_news_source in ['TV', 'Online/Digital']", - "multiply": null, - "add": null, - "weight_overrides": { - "Left-leaning": 0.06, - "Center": 0.16, - "Right-leaning": 0.62, - "Mixed/No Preference": 0.16 - }, - "probability_override": null - }, - { - "when": "political_affiliation == 'Independent' and primary_news_source in ['TV', 'Online/Digital']", - "multiply": null, - "add": null, - "weight_overrides": { - "Left-leaning": 0.2, - "Center": 0.32, - "Right-leaning": 0.22, - "Mixed/No Preference": 0.26 - }, - "probability_override": null - }, - { - "when": "primary_news_source == 'Social Media'", - "multiply": null, - "add": null, - "weight_overrides": { - "Left-leaning": 0.22, - "Center": 0.14, - "Right-leaning": 0.22, - "Mixed/No Preference": 0.42 - }, - "probability_override": null - }, - { - "when": "primary_news_source == 'Print Newspaper'", - "multiply": null, - "add": null, - "weight_overrides": { - "Left-leaning": 0.28, - "Center": 0.38, - "Right-leaning": 0.18, - "Mixed/No Preference": 0.16 - }, - "probability_override": null - } - ] - }, - { - "name": "social_media_platforms", - "modifiers": [ - { - "when": "age < 25", - "multiply": null, - "add": null, - "weight_overrides": { - "Facebook": 0.06, - "YouTube": 0.22, - "Instagram": 0.28, - "TikTok": 0.3, - "Twitter/X": 0.08, - "None/Minimal": 0.06 - }, - "probability_override": null - }, - { - "when": "age >= 25 and age < 35", - "multiply": null, - "add": null, - "weight_overrides": { - "Facebook": 0.12, - "YouTube": 0.22, - "Instagram": 0.28, - "TikTok": 0.18, - "Twitter/X": 0.12, - "None/Minimal": 0.08 - }, - "probability_override": null - }, - { - "when": "age >= 35 and age < 50", - "multiply": null, - "add": null, - "weight_overrides": { - "Facebook": 0.28, - "YouTube": 0.22, - "Instagram": 0.18, - "TikTok": 0.08, - "Twitter/X": 0.1, - "None/Minimal": 0.14 - }, - "probability_override": null - }, - { - "when": "age >= 50 and age < 65", - "multiply": null, - "add": null, - "weight_overrides": { - "Facebook": 0.4, - "YouTube": 0.2, - "Instagram": 0.1, - "TikTok": 0.04, - "Twitter/X": 0.08, - "None/Minimal": 0.18 - }, - "probability_override": null - }, - { - "when": "age >= 65", - "multiply": null, - "add": null, - "weight_overrides": { - "Facebook": 0.44, - "YouTube": 0.18, - "Instagram": 0.06, - "TikTok": 0.02, - "Twitter/X": 0.04, - "None/Minimal": 0.26 - }, - "probability_override": null - } - ] - }, - { - "name": "social_media_hours_per_day", - "modifiers": [ - { - "when": "age < 25 and social_media_platforms == 'TikTok'", - "multiply": 1.2, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 65 and social_media_platforms == 'Facebook'", - "multiply": 0.75, - "add": 0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 65 and social_media_platforms == 'None/Minimal'", - "multiply": 0.8, - "add": 0, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "internet_access", - "modifiers": [ - { - "when": "urban_rural == 'Urban' and household_income > 60000", - "multiply": null, - "add": null, - "weight_overrides": { - "Broadband": 0.88, - "Mobile Only": 0.09, - "Dial-up/Satellite": 0.01, - "None": 0.02 - }, - "probability_override": null - }, - { - "when": "urban_rural == 'Suburban' and household_income > 60000", - "multiply": null, - "add": null, - "weight_overrides": { - "Broadband": 0.85, - "Mobile Only": 0.1, - "Dial-up/Satellite": 0.03, - "None": 0.02 - }, - "probability_override": null - }, - { - "when": "urban_rural == 'Urban' and household_income <= 60000", - "multiply": null, - "add": null, - "weight_overrides": { - "Broadband": 0.65, - "Mobile Only": 0.26, - "Dial-up/Satellite": 0.02, - "None": 0.07 - }, - "probability_override": null - }, - { - "when": "urban_rural == 'Suburban' and household_income <= 60000", - "multiply": null, - "add": null, - "weight_overrides": { - "Broadband": 0.68, - "Mobile Only": 0.22, - "Dial-up/Satellite": 0.06, - "None": 0.04 - }, - "probability_override": null - }, - { - "when": "urban_rural == 'Rural' and household_income > 60000", - "multiply": null, - "add": null, - "weight_overrides": { - "Broadband": 0.58, - "Mobile Only": 0.18, - "Dial-up/Satellite": 0.2, - "None": 0.04 - }, - "probability_override": null - }, - { - "when": "urban_rural == 'Rural' and household_income <= 60000", - "multiply": null, - "add": null, - "weight_overrides": { - "Broadband": 0.38, - "Mobile Only": 0.24, - "Dial-up/Satellite": 0.28, - "None": 0.1 - }, - "probability_override": null - } - ] - }, - { - "name": "civic_engagement", - "modifiers": [ - { - "when": "age < 30 and education_level in ['Less than HS', 'HS Diploma', 'Some College']", - "multiply": null, - "add": null, - "weight_overrides": { - "Votes regularly": 0.2, - "Votes sometimes": 0.28, - "Rarely/Never votes": 0.46, - "Actively volunteers or campaigns": 0.06 - }, - "probability_override": null - }, - { - "when": "age < 30 and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "Votes regularly": 0.32, - "Votes sometimes": 0.3, - "Rarely/Never votes": 0.24, - "Actively volunteers or campaigns": 0.14 - }, - "probability_override": null - }, - { - "when": "age >= 30 and age < 50 and education_level in ['Less than HS', 'HS Diploma']", - "multiply": null, - "add": null, - "weight_overrides": { - "Votes regularly": 0.38, - "Votes sometimes": 0.28, - "Rarely/Never votes": 0.28, - "Actively volunteers or campaigns": 0.06 - }, - "probability_override": null - }, - { - "when": "age >= 30 and age < 50 and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "Votes regularly": 0.56, - "Votes sometimes": 0.22, - "Rarely/Never votes": 0.1, - "Actively volunteers or campaigns": 0.12 - }, - "probability_override": null - }, - { - "when": "age >= 50 and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "Votes regularly": 0.68, - "Votes sometimes": 0.16, - "Rarely/Never votes": 0.06, - "Actively volunteers or campaigns": 0.1 - }, - "probability_override": null - }, - { - "when": "age >= 50 and education_level in ['Less than HS', 'HS Diploma', 'Some College', 'Associate\\'s']", - "multiply": null, - "add": null, - "weight_overrides": { - "Votes regularly": 0.52, - "Votes sometimes": 0.26, - "Rarely/Never votes": 0.16, - "Actively volunteers or campaigns": 0.06 - }, - "probability_override": null - } - ] - }, - { - "name": "homeownership", - "modifiers": [ - { - "when": "household_income > 100000 and age >= 35", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.82 - }, - { - "when": "household_income > 100000 and age < 35", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.52 - }, - { - "when": "household_income >= 50000 and household_income <= 100000 and age >= 40", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.68 - }, - { - "when": "household_income >= 50000 and household_income <= 100000 and age < 40", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.4 - }, - { - "when": "household_income < 50000 and age >= 55", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.5 - }, - { - "when": "household_income < 50000 and age < 55", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.26 - } - ] - }, - { - "name": "health_insurance_type", - "modifiers": [ - { - "when": "employment_status == 'Full-time' and household_income > 50000", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.72, - "Medicaid/CHIP": 0.04, - "Medicare": 0.04, - "Individual Market/ACA": 0.1, - "Military/VA": 0.04, - "Uninsured": 0.06 - }, - "probability_override": null - }, - { - "when": "employment_status == 'Full-time' and household_income <= 50000", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.46, - "Medicaid/CHIP": 0.18, - "Medicare": 0.02, - "Individual Market/ACA": 0.14, - "Military/VA": 0.04, - "Uninsured": 0.16 - }, - "probability_override": null - }, - { - "when": "employment_status == 'Self-employed'", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.08, - "Medicaid/CHIP": 0.1, - "Medicare": 0.06, - "Individual Market/ACA": 0.52, - "Military/VA": 0.04, - "Uninsured": 0.2 - }, - "probability_override": null - }, - { - "when": "employment_status == 'Retired' and household_income > 40000", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.12, - "Medicaid/CHIP": 0.04, - "Medicare": 0.72, - "Individual Market/ACA": 0.06, - "Military/VA": 0.05, - "Uninsured": 0.01 - }, - "probability_override": null - }, - { - "when": "employment_status == 'Retired' and household_income <= 40000", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.04, - "Medicaid/CHIP": 0.26, - "Medicare": 0.58, - "Individual Market/ACA": 0.06, - "Military/VA": 0.04, - "Uninsured": 0.02 - }, - "probability_override": null - }, - { - "when": "employment_status == 'Unemployed' and household_income <= 30000", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.06, - "Medicaid/CHIP": 0.46, - "Medicare": 0.04, - "Individual Market/ACA": 0.16, - "Military/VA": 0.03, - "Uninsured": 0.25 - }, - "probability_override": null - }, - { - "when": "employment_status == 'Part-time' and household_income <= 40000", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.2, - "Medicaid/CHIP": 0.28, - "Medicare": 0.04, - "Individual Market/ACA": 0.2, - "Military/VA": 0.03, - "Uninsured": 0.25 - }, - "probability_override": null - }, - { - "when": "employment_status == 'Student'", - "multiply": null, - "add": null, - "weight_overrides": { - "Employer-sponsored": 0.1, - "Medicaid/CHIP": 0.28, - "Medicare": 0.01, - "Individual Market/ACA": 0.28, - "Military/VA": 0.03, - "Uninsured": 0.3 - }, - "probability_override": null - } - ] - }, - { - "name": "immigration_status", - "modifiers": [ - { - "when": "race_ethnicity == 'White non-Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "US-born citizen": 0.94, - "Naturalized citizen": 0.04, - "Permanent resident": 0.01, - "Other": 0.01 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Black non-Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "US-born citizen": 0.88, - "Naturalized citizen": 0.07, - "Permanent resident": 0.03, - "Other": 0.02 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "US-born citizen": 0.62, - "Naturalized citizen": 0.2, - "Permanent resident": 0.1, - "Other": 0.08 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Asian non-Hispanic'", - "multiply": null, - "add": null, - "weight_overrides": { - "US-born citizen": 0.44, - "Naturalized citizen": 0.34, - "Permanent resident": 0.14, - "Other": 0.08 - }, - "probability_override": null - }, - { - "when": "race_ethnicity == 'Other/Multiracial'", - "multiply": null, - "add": null, - "weight_overrides": { - "US-born citizen": 0.82, - "Naturalized citizen": 0.1, - "Permanent resident": 0.05, - "Other": 0.03 - }, - "probability_override": null - } - ] - }, - { - "name": "union_membership", - "modifiers": [ - { - "when": "occupation == 'Production/Transport' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.18 - }, - { - "when": "occupation == 'Management/Professional' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.12 - }, - { - "when": "occupation == 'Service' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.1 - }, - { - "when": "occupation == 'Construction/Extraction' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.14 - }, - { - "when": "occupation == 'Sales/Office' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.07 - }, - { - "when": "employment_status == 'Self-employed'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.02 - }, - { - "when": "employment_status == 'Part-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.06 - } - ] - }, - { - "name": "gun_ownership", - "modifiers": [ - { - "when": "urban_rural == 'Rural' and state in ['WY', 'MT', 'AK', 'ID', 'WV', 'AR', 'ND', 'SD', 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.72 - }, - { - "when": "urban_rural == 'Rural' and state not in ['WY', 'MT', 'AK', 'ID', 'WV', 'AR', 'ND', 'SD', 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO', 'CA', 'NY', 'MA', 'CT', 'NJ', 'MD', 'DE', 'RI', 'HI', 'DC']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.56 - }, - { - "when": "urban_rural == 'Suburban' and state in ['WY', 'MT', 'AK', 'ID', 'WV', 'AR', 'ND', 'SD', 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.52 - }, - { - "when": "urban_rural == 'Suburban' and state in ['CA', 'NY', 'MA', 'CT', 'NJ', 'MD', 'DE', 'RI', 'HI', 'DC']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.18 - }, - { - "when": "urban_rural == 'Urban' and state in ['CA', 'NY', 'MA', 'CT', 'NJ', 'MD', 'DE', 'RI', 'HI', 'DC']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.1 - }, - { - "when": "urban_rural == 'Urban' and state not in ['CA', 'NY', 'MA', 'CT', 'NJ', 'MD', 'DE', 'RI', 'HI', 'DC', 'WY', 'MT', 'AK', 'ID', 'WV', 'AR', 'ND', 'SD', 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.28 - } - ] - }, - { - "name": "trust_in_institutions", - "modifiers": [ - { - "when": "political_ideology == 'Very Liberal' and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": 1.0, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Very Conservative'", - "multiply": 1.0, - "add": -0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Conservative'", - "multiply": 1.0, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate' and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": 1.0, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Liberal'", - "multiply": 1.0, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Less than HS'", - "multiply": 1.0, - "add": -0.07, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "need_for_cognition", - "modifiers": [ - { - "when": "education_level == 'Graduate Degree'", - "multiply": 1.0, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Bachelor\\'s'", - "multiply": 1.0, - "add": 0.09, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Associate\\'s'", - "multiply": 1.0, - "add": 0.03, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma']", - "multiply": 1.0, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "susceptibility_to_misinformation", - "modifiers": [ - { - "when": "need_for_cognition > 0.7 and social_media_hours_per_day < 2.0", - "multiply": 1.0, - "add": -0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition < 0.35 and social_media_hours_per_day > 3.0", - "multiply": 1.0, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition < 0.35 and social_media_hours_per_day >= 2.0 and social_media_hours_per_day <= 3.0", - "multiply": 1.0, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition > 0.7 and social_media_hours_per_day >= 2.0 and social_media_hours_per_day <= 3.0", - "multiply": 1.0, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition >= 0.35 and need_for_cognition <= 0.7 and social_media_hours_per_day > 3.0", - "multiply": 1.0, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - } - ] - } - ] - }, - "name": "conditional_modifiers_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 42836, - "output_tokens": 15659, - "server_tool_use": { - "web_search_requests": 3, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://aspe.hhs.gov/sites/default/files/documents/6056484066506a8d4ba3dcd8d9322490/rural-health-rr-30-Oct-24.pdf", - "https://www.census.gov/data/tables/time-series/demo/educational-attainment/cps-historical-time-series.html", - "https://www.lassennews.com/do-smarter-states-vote-blue-study-finds-the-most-educated-states-lean-democratic", - "https://tradingeconomics.com/united-states/rural-population-percent-of-total-population-wb-data.html", - "https://www.census.gov/library/stories/2024/08/redefining-rural.html", - "https://www.highereddatastories.com/2025/02/educational-attainment-and-presidential.html", - "https://www.axios.com/2024/11/07/college-degree-voters-split-harris-trump", - "https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html", - "https://medium.com/@kathrynstaublin/the-most-educated-states-voted-blue-f60f304531f7", - "https://www.cnn.com/2024/10/14/politics/the-biggest-predictor-of-how-someone-will-vote", - "https://en.wikipedia.org/wiki/Urbanization_in_the_United_States", - "https://www.educationnext.org/which-party-really-has-the-edge-on-education/", - "https://www.statista.com/statistics/985183/size-urban-rural-population-us/", - "https://kb.gcsu.edu/researchday/2024/all/41/", - "https://www.icip.iastate.edu/tables/population/urban-pct-states", - "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html", - "https://datacenter.aecf.org/data/tables/6294-educational-attainment-of-population-ages-25-to-34", - "https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/", - "https://www.census.gov/topics/education/educational-attainment.html", - "https://www.pewresearch.org/politics/2024/04/09/partisanship-by-race-ethnicity-and-education/", - "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html", - "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html", - "https://www.pbs.org/newshour/show/how-a-college-degree-is-one-of-the-best-predictors-of-which-candidate-voters-support", - "https://educationdata.org/education-attainment-statistics", - "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/", - "https://www.census.gov/topics/education/educational-attainment/data/tables.html", - "https://www.census.gov/topics/education.html", - "https://collectiver.com/blog/education-vote-correlation/", - "https://en.wikipedia.org/wiki/Demographics_of_the_United_States", - "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_210830_515979_claude_agentic_research.json b/examples/logs/20260217_210830_515979_claude_agentic_research.json deleted file mode 100644 index 1c5927b..0000000 --- a/examples/logs/20260217_210830_515979_claude_agentic_research.json +++ /dev/null @@ -1,975 +0,0 @@ -{ - "timestamp": "2026-02-17T21:08:30.516103", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 3367 - }, - "response": { - "id": "msg_01Fxj2U18AebrfFpZ2q18E5J", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=135]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01SPrX2rkK1LwDLhfADRm7U9", - "input": { - "query": "US household composition by age group Census 2023 statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01WUT7eTrrQkNw5bsjqUf1VX", - "input": { - "query": "US interracial marriage same race partner rates by ethnicity 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01YKR3YQD6LDyTZZM2J5GreB", - "input": { - "query": "US assortative mating education religion income correlation spouses 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2668]", - "page_age": null, - "title": "Age and Sex Composition in the United States: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2968]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5336]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5956]", - "page_age": null, - "title": "Current Population Survey Data Tables", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5184]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3804]", - "page_age": null, - "title": "Median household income by age U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/233184/median-household-income-in-the-united-states-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=668]", - "page_age": null, - "title": "Age and Sex Tables", - "type": "web_search_result", - "url": "https://www.census.gov/topics/population/age-and-sex/data/tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7168]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - } - ], - "tool_use_id": "srvtoolu_01SPrX2rkK1LwDLhfADRm7U9", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=6992]", - "page_age": "January 5, 2026", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5720]", - "page_age": "April 14, 2024", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4032]", - "page_age": "October 13, 2023", - "title": "growth in interracial marriage, 1980 vs 2021 - Working Immigrants", - "type": "web_search_result", - "url": "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2768]", - "page_age": "June 12, 2025", - "title": "BLACK MARRIAGE - BlackDemographics.com", - "type": "web_search_result", - "url": "https://blackdemographics.com/households/marriage-in-black-america/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6544]", - "page_age": null, - "title": "Marital Dissolution Among Interracial Couples - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6196]", - "page_age": null, - "title": "Geographic Variations in Black-White Interracial Marital ...", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1396]", - "page_age": null, - "title": "Interracial Couples More Common Among Same-Sex Couples", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2023/11/same-sex-couple-diversity.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1956]", - "page_age": null, - "title": "Intermarriage - Research and data from Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/topic/family-relationships/marriage-divorce/intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1756]", - "page_age": null, - "title": "Race, Ethnicity and Marriage in the United States", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2018/07/interracial-marriages.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5336]", - "page_age": null, - "title": "Most Americans Marry Within Their Race | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/most-americans-marry-within-their-race/" - } - ], - "tool_use_id": "srvtoolu_01WUT7eTrrQkNw5bsjqUf1VX", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5084]", - "page_age": null, - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3168]", - "page_age": null, - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5460]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income ...", - "type": "web_search_result", - "url": "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4412]", - "page_age": null, - "title": "Full article: Assortative mating, marital stability and the role of business cycles in the United States from 1968 to 2011", - "type": "web_search_result", - "url": "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6756]", - "page_age": null, - "title": "Eight Decades of Educational Assortative Mating: A Research Note - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5232]", - "page_age": "October 1, 2024", - "title": "Eight Decades of Educational Assortative Mating: A Research Note | Demography | Duke University Press", - "type": "web_search_result", - "url": "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6156]", - "page_age": null, - "title": "Assortative Mating, Intergenerational Mobility, and Educational Inequality", - "type": "web_search_result", - "url": "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6564]", - "page_age": null, - "title": "Trends in Economic Homogamy: Changes in Assortative Mating or the Division of Labor in Marriage? - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC6048969/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4364]", - "page_age": null, - "title": "Assortative mating, marital stability and the role of business cycles in the United States from 1968 to 2011: Journal of Applied Economics: Vol 27, No 1", - "type": "web_search_result", - "url": "https://www.tandfonline.com/doi/abs/10.1080/15140326.2024.2327909" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5224]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income Inequality | Journal of Political Economy: Vol 127, No 6", - "type": "web_search_result", - "url": "https://www.journals.uchicago.edu/doi/10.1086/702018" - } - ], - "tool_use_id": "srvtoolu_01YKR3YQD6LDyTZZM2J5GreB", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=120]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_012swtJpQi7Mt4WA3wsoEX2j", - "input": { - "query": "US average household size 2023 census single parent couple household type distribution by age" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01VtU6gV8PLFjR7B5w59NrNZ", - "input": { - "query": "US median age first marriage 2023 spousal age gap average childbearing age range" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5272]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5724]", - "page_age": null, - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5280]", - "page_age": null, - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5352]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1364]", - "page_age": null, - "title": "America?s Families and Living Arrangements: 2020", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2020/demo/families/cps-2020.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5108]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3828]", - "page_age": null, - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5372]", - "page_age": null, - "title": "Average family size in the U.S. 1960-2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/" - } - ], - "tool_use_id": "srvtoolu_012swtJpQi7Mt4WA3wsoEX2j", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=364]", - "page_age": null, - "title": "Figure MS-2 Median age at first marriage: 1890 to present 16 18 20 22 24 26 28", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/library/visualizations/time-series/demo/families-and-households/ms-2.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=412]", - "page_age": null, - "title": "Median Age at First Marriage: Geographic Variation, 2022", - "type": "web_search_result", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/median-age-first-marriage-geographic-variation-2022-fp-24-08.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3112]", - "page_age": "March 24, 2025", - "title": "What's the Average Age of Marriage in the US? Our Data Reveals The Number", - "type": "web_search_result", - "url": "https://www.theknot.com/content/average-age-of-marriage" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1712]", - "page_age": null, - "title": "Chart: Americans Are Getting Married Older Than Ever | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/chart/7031/americans-are-tying-the-knot-older-than-ever/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=756]", - "page_age": null, - "title": "U.S. Indicators: Median Age at First Marriage (Women)", - "type": "web_search_result", - "url": "https://www.prb.org/usdata/indicator/marriage-age-women/snapshot/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5312]", - "page_age": null, - "title": "Median Age at First Marriage: Geographic Variation", - "type": "web_search_result", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-09.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5780]", - "page_age": null, - "title": "The Rising Midlife First Marriage Rate in the U.S - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC9616076/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=620]", - "page_age": null, - "title": "Historical Marital Status Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/marital.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1656]", - "page_age": null, - "title": "A Decade of Change in the Median Age at First Marriage, 2012 & 2022", - "type": "web_search_result", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/decade-of-change-median-age-first-marriage-2012-2022-fp-24-07.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5516]", - "page_age": "November 20, 2025", - "title": "Average Marriage Age in the US - Latest Trends by State, Gender, and Census Data - North American Community Hub", - "type": "web_search_result", - "url": "https://nchstats.com/average-marriage-age-in-the-us/" - } - ], - "tool_use_id": "srvtoolu_01VtU6gV8PLFjR7B5w59NrNZ", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=174]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=65]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDC+GW1bNLF5AUVYSghoMZEAHjFrM77VHr7XVIjAAlUd+JhDkBvxqtULG8BJVmEvn7Tu6Zpq6/0sWza42YXVjmFrsbj9CtrlfwfGYPXcqFCX1+YQjIKJ+NxAvkQ3LvlKTC3P2GAQ=", - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - } - ], - "text": "[REDACTED_TEXT length=68]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDB8HcgwqGoG34BiXaRoM8+WzRXONAR9iTQ5NIjDTNwfRS3+vdqGxERKqOe7UGoFSjtnVEhri7O3O2gbCfASHmAdjIRNavG5l1rl8vdUqFpvckvSS5mRE+i3TMUhX5Im8H2Ip9WcY...[truncated]", - "title": "Chart: Americans Are Getting Married Older Than Ever | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/chart/7031/americans-are-tying-the-knot-older-than-ever/" - } - ], - "text": "[REDACTED_TEXT length=134]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=55]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=109]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAYV4wiWhiFXpqOF1hoMOwoRNHvcAdO7+zvLIjApSdFOHezxIEkFlijC3XUtYQlsdRXWjZ3GcrLGcn8c0zgzLAlJy20rOVGr5zc3qqMqFM543Wl44v9G8eYTZI55QWu4fCx1GAQ=", - "title": "Average Marriage Age in the US - Latest Trends by State, Gender, and Census Data - North American Community Hub", - "type": "web_search_result_location", - "url": "https://nchstats.com/average-marriage-age-in-the-us/" - } - ], - "text": "[REDACTED_TEXT length=69]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPvxBaeE/icyZLlTFhoM9QiaZrXcGLWnrvJUIjBSjM0aT3U47tJrjFoS4GIcommt732t7mRQVrR/X2wKaxDtpvnIwUDze65c66pA2wIqFQsiEkStPITJFA2yR3zPE7hM6snhahgE", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - } - ], - "text": "[REDACTED_TEXT length=136]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDA/7469H7vClxUM11hoM/zHnvlLcCkhL1VU+IjDFOxf937wdILKVuEQ/KnVmInT+Xfzo9gR2ruDsaiFITkzjtG1LlzGdc3dVnZuMW04qFU+b4lxE5NfRInDq7altDnY6RybOShgE", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - } - ], - "text": "[REDACTED_TEXT length=234]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=82]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDLWYaWR5+TGZLdh5+BoMIqvytl0YptaR0y4XIjC74MB9yYtuLZ8VMLSKNkRJ3NlY3pNnNtOBfu2DCQLFgYk5AOm9x/3PAOUZOiZlDRoqFIyCzuZ+pitnMYzrh4Ac9JRXn7zcGAQ=", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result_location", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - } - ], - "text": "[REDACTED_TEXT length=160]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDBz6iTHP6O1Cip66nRoMuSV0TUYjIS0q6tmFIjABAE97E/N8seSkjjS7vGB8D/B4JSvCX1YYX8VPctHZY/cNztMLSKpsGav/5qglDGsqFjLt5auGeAqjK2JIEDM57QYa1zFjQt8Y...[truncated]", - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result_location", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - } - ], - "text": "[REDACTED_TEXT length=208]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOzVbI34yhfl5a4b6BoM/oucQda7ZgiwwAaWIjDcbrRg74QkIW6X2NVIjBauUwX2CYBm8Xtc+Y/cL3zwwEYyNp/DwJS4uN2ia+Xf7ggqFcRdQxt2qetmE7DL0XICM0Oy2L1vfxgE", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=117]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFQb1Snb7sQcmskHABoMrK9aJ+iz+uf4t0xWIjDhDBhSAanA/MM2Cttl+WT0QpGVwXMiJ3RTe2QF0/gLqzpUNSbHq8Uoqg/IDR++oiIqFKdXoSJ8b6uFfGdlQ/+L43OaLh89GAQ=", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=86]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAFoWB4FH4BW6fA9RhoM1jGG8AZQOWOw/zI2IjDA95IIw8mopNNGpTuLyBowQshjkKGd6mMTRQcF0J+8BvvVZiDhg+6RCZlkSdhWFsQqFn58uwdjDWaH1Ueq58PdfewC9UWv7cgY...[truncated]", - "title": "Median Age at First Marriage: Geographic Variation", - "type": "web_search_result_location", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-09.html" - } - ], - "text": "[REDACTED_TEXT length=207]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_013MgySi58gV3oBvuKd3iZ3j", - "input": { - "age_brackets": [ - { - "upper_bound": 30, - "label": "18-29" - }, - { - "upper_bound": 45, - "label": "30-44" - }, - { - "upper_bound": 65, - "label": "45-64" - }, - { - "upper_bound": 999, - "label": "65+" - } - ], - "household_type_weights": [ - { - "bracket": "18-29", - "types": [ - { - "type": "single", - "weight": 0.45 - }, - { - "type": "couple", - "weight": 0.2 - }, - { - "type": "single_parent", - "weight": 0.1 - }, - { - "type": "couple_with_kids", - "weight": 0.15 - }, - { - "type": "multi_generational", - "weight": 0.1 - } - ] - }, - { - "bracket": "30-44", - "types": [ - { - "type": "single", - "weight": 0.2 - }, - { - "type": "couple", - "weight": 0.2 - }, - { - "type": "single_parent", - "weight": 0.13 - }, - { - "type": "couple_with_kids", - "weight": 0.42 - }, - { - "type": "multi_generational", - "weight": 0.05 - } - ] - }, - { - "bracket": "45-64", - "types": [ - { - "type": "single", - "weight": 0.25 - }, - { - "type": "couple", - "weight": 0.42 - }, - { - "type": "single_parent", - "weight": 0.08 - }, - { - "type": "couple_with_kids", - "weight": 0.14 - }, - { - "type": "multi_generational", - "weight": 0.11 - } - ] - }, - { - "bracket": "65+", - "types": [ - { - "type": "single", - "weight": 0.4 - }, - { - "type": "couple", - "weight": 0.48 - }, - { - "type": "single_parent", - "weight": 0.02 - }, - { - "type": "couple_with_kids", - "weight": 0.02 - }, - { - "type": "multi_generational", - "weight": 0.08 - } - ] - } - ], - "same_group_rates": [ - { - "group": "white", - "rate": 0.91 - }, - { - "group": "black", - "rate": 0.82 - }, - { - "group": "hispanic", - "rate": 0.74 - }, - { - "group": "asian", - "rate": 0.72 - }, - { - "group": "native_american", - "rate": 0.58 - }, - { - "group": "multiracial", - "rate": 0.4 - } - ], - "default_same_group_rate": 0.65, - "assortative_mating": [ - { - "attribute": "education_level", - "correlation": 0.6 - }, - { - "attribute": "religious_affiliation", - "correlation": 0.68 - }, - { - "attribute": "political_affiliation", - "correlation": 0.65 - }, - { - "attribute": "income_bracket", - "correlation": 0.55 - }, - { - "attribute": "race_ethnicity", - "correlation": 0.85 - }, - { - "attribute": "personality_openness", - "correlation": 0.2 - }, - { - "attribute": "personality_conscientiousness", - "correlation": 0.2 - }, - { - "attribute": "media_consumption_type", - "correlation": 0.52 - }, - { - "attribute": "urbanicity", - "correlation": 0.45 - } - ], - "partner_age_gap_mean": -1.8, - "partner_age_gap_std": 4.5, - "min_adult_age": 18, - "child_min_parent_offset": 18, - "child_max_parent_offset": 45, - "max_dependent_child_age": 17, - "elderly_min_offset": 20, - "elderly_max_offset": 45, - "life_stages": [ - { - "max_age": 5, - "label": "preschool" - }, - { - "max_age": 11, - "label": "elementary" - }, - { - "max_age": 14, - "label": "middle_school" - }, - { - "max_age": 18, - "label": "high_school" - } - ], - "adult_stage_label": "adult", - "avg_household_size": 2.51, - "sources": [ - "U.S. Census Bureau \u2013 America's Families and Living Arrangements: 2023, https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "U.S. Census Bureau \u2013 Historical Households Tables (HH-2 through HH-7): 1960\u20132023, https://www.census.gov/data/tables/time-series/demo/families/households.html", - "U.S. Census Bureau \u2013 Age and Sex Composition in the United States: 2023, https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "U.S. Census Bureau \u2013 Historical Marital Status Tables (MS-2), https://www.census.gov/data/tables/time-series/demo/families/marital.html", - "Statista / U.S. Census Bureau \u2013 Average household size in the U.S. 2023 (2.51 persons), https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "Pew Research Center \u2013 Trends and Patterns in Intermarriage (2017), https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "BlackDemographics.com \u2013 Black Marriage in America (2023 ACS), https://blackdemographics.com/households/marriage-in-black-america/", - "Wikipedia \u2013 Interracial Marriage in the United States, https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "PMC / NCBI \u2013 Marital Dissolution Among Interracial Couples, https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/", - "NBER Digest \u2013 Assortative Mating and Income Inequality (Greenwood et al.), https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "New York Fed Staff Report 682 \u2013 Educational Assortative Mating and Household Income Inequality, https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf", - "Duke University Press / Demography \u2013 Eight Decades of Educational Assortative Mating (2024), https://read.dukeupress.edu/demography/article/61/5/1293/390842/", - "PMC / NCBI \u2013 Religion, Marriage Markets, and Assortative Mating in the United States, https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "BGSU NCFMR \u2013 Median Age at First Marriage: Geographic Variation, 2023 (FP-25-09), https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-09.html", - "Population Reference Bureau \u2013 U.S. Household Composition Shifts as the Population Grows Older, https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-a...[truncated]", - "PMC / NCBI \u2013 The Rising Midlife First Marriage Rate in the U.S., https://pmc.ncbi.nlm.nih.gov/articles/PMC9616076/", - "U.S. Census Bureau \u2013 Family Households Story (2024), https://www.census.gov/library/stories/2024/11/family-households.html", - "U.S. Census Bureau \u2013 Geographic Variations in Black-White Interracial Marital Relationships (PAA 2023 paper), https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geog...[truncated]", - "UCLA CCPR \u2013 Assortative Mating, Intergenerational Mobility, and Educational Inequality, https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational...[truncated]", - "U.S. Census Bureau QuickFacts / Demographics of the United States (Wikipedia), https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - ] - }, - "name": "household_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 109302, - "output_tokens": 3364, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/", - "https://www.pewresearch.org/topic/family-relationships/marriage-divorce/intermarriage/", - "https://www.journals.uchicago.edu/doi/10.1086/702018", - "https://www.census.gov/data/tables/2020/demo/families/cps-2020.html", - "https://blackdemographics.com/households/marriage-in-black-america/", - "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "https://www.statista.com/chart/7031/americans-are-tying-the-knot-older-than-ever/", - "https://www.tandfonline.com/doi/abs/10.1080/15140326.2024.2327909", - "https://www.census.gov/topics/families/families-and-households.html", - "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC9616076/", - "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/", - "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "https://www.prb.org/usdata/indicator/marriage-age-women/snapshot/", - "https://nchstats.com/average-marriage-age-in-the-us/", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf", - "https://www.prb.org/resources/most-americans-marry-within-their-race/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/", - "https://www.census.gov/content/dam/Census/library/visualizations/time-series/demo/families-and-households/ms-2.pdf", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "https://en.wikipedia.org/wiki/Demographics_of_the_United_States", - "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC6048969/", - "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/median-age-first-marriage-geographic-variation-2022-fp-24-08.html", - "https://www.census.gov/data/tables/time-series/demo/families/marital.html", - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-09.html", - "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/", - "https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "https://www.theknot.com/content/average-age-of-marriage", - "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf", - "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/", - "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/decade-of-change-median-age-first-marriage-2012-2022-fp-24-07.html", - "https://www.statista.com/statistics/233184/median-household-income-in-the-united-states-by-age/", - "https://www.census.gov/library/stories/2023/11/same-sex-couple-diversity.html", - "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html", - "https://www.census.gov/library/stories/2024/11/family-households.html", - "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf", - "https://www.census.gov/topics/population/age-and-sex/data/tables.html", - "https://www.census.gov/topics/families.html", - "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_211119_476305_claude_reasoning_call.json b/examples/logs/20260217_211119_476305_claude_reasoning_call.json deleted file mode 100644 index cd99942..0000000 --- a/examples/logs/20260217_211119_476305_claude_reasoning_call.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "timestamp": "2026-02-17T21:11:19.476410", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 10821 - }, - "response": { - "id": "msg_01BR6UGVndTTc59fMF58nkxv", - "content": [ - { - "id": "toolu_01SxyiwVLSdDWxBHNQGu55j9", - "input": { - "attributes": [ - { - "name": "ai_familiarity", - "type": "categorical", - "category": "population_specific", - "description": "Self-reported familiarity with AI technology and concepts (None, Basic, Intermediate, Advanced, Expert).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation" - ], - "identity_type": "professional_identity" - }, - { - "name": "works_in_tech", - "type": "boolean", - "category": "population_specific", - "description": "Whether the person works in a technology-related field or industry.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "education_level" - ] - }, - { - "name": "prior_asi_belief", - "type": "categorical", - "category": "population_specific", - "description": "Pre-announcement belief about the timeline for ASI: whether the person thought ASI was imminent, decades away, never, or had no opinion.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_familiarity", - "openness" - ] - }, - { - "name": "ai_safety_concern_level", - "type": "float", - "category": "population_specific", - "description": "Degree of pre-existing concern about AI safety and existential risk from AI systems (0\u20131 scale, 0 = unconcerned, 1 = highly concerned).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_familiarity", - "neuroticism", - "trust_in_institutions" - ] - }, - { - "name": "openai_trust", - "type": "float", - "category": "population_specific", - "description": "Level of trust in OpenAI as a company and its stated safety claims prior to the announcement (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "trust_in_institutions", - "ai_familiarity", - "political_ideology" - ] - }, - { - "name": "tech_optimism", - "type": "float", - "category": "population_specific", - "description": "General optimism that technology and innovation improve society and human wellbeing (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "education_level", - "political_ideology" - ] - }, - { - "name": "job_displacement_concern", - "type": "float", - "category": "population_specific", - "description": "Degree to which the person fears AI will displace their job or economic opportunities (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "works_in_tech", - "ai_familiarity" - ] - }, - { - "name": "initial_asi_reaction", - "type": "categorical", - "category": "context_specific", - "description": "Initial emotional reaction upon hearing the ASI announcement (Excited, Fearful, Skeptical, Indifferent, Mixed).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "tech_optimism", - "ai_safety_concern_level", - "openai_trust" - ] - }, - { - "name": "sci_fi_consumption", - "type": "categorical", - "category": "population_specific", - "description": "Frequency of consuming science fiction media (books, films, TV) featuring AI or superintelligence themes (Never, Rarely, Sometimes, Often, Very Often).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "age" - ] - }, - { - "name": "social_network_tech_density", - "type": "float", - "category": "population_specific", - "description": "Proportion of close social contacts (friends, family, colleagues) who work in or closely follow the technology sector (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "works_in_tech", - "urban_rural", - "education_level" - ] - }, - { - "name": "opinion_volatility", - "type": "float", - "category": "personality", - "description": "Tendency to update or shift opinions after social discussion and exposure to new information (0\u20131 scale, 0 = very stable, 1 = highly volatile).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "need_for_cognition", - "agreeableness", - "susceptibility_to_misinformation" - ] - }, - { - "name": "doomism_tendency", - "type": "float", - "category": "personality", - "description": "Predisposition toward catastrophic or worst-case interpretations of transformative technological events (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "neuroticism", - "ai_safety_concern_level", - "sci_fi_consumption" - ] - } - ], - "include_big_five": false, - "notes": "Big Five traits already exist in the base population (openness, conscientiousness, extraversion, agreeableness, neuroticism) \u2014 not rediscovered here. Focus is on ASI-announcement-specific reaction att...[truncated]" - }, - "name": "attribute_selection", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 4189, - "output_tokens": 1544, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_211241_212184_claude_agentic_research.json b/examples/logs/20260217_211241_212184_claude_agentic_research.json deleted file mode 100644 index 37f7b4e..0000000 --- a/examples/logs/20260217_211241_212184_claude_agentic_research.json +++ /dev/null @@ -1,1126 +0,0 @@ -{ - "timestamp": "2026-02-17T21:12:41.212229", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 10944 - }, - "response": { - "id": "msg_01MzDXgr2FSy7sxtCYXVYuKR", - "content": [ - { - "id": "srvtoolu_01CVyZcqJ8Zhjwax9XoCtRu5", - "input": { - "query": "US adult AI familiarity levels survey 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_018548BXQKF4yw3C6zQT8XtU", - "input": { - "query": "percentage Americans work in tech industry 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01P1qXoqjJt2HXTTBGHNU98S", - "input": { - "query": "American public beliefs AGI ASI timeline survey 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4032]", - "page_age": null, - "title": "U.S. AI knowledge by age 2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4592]", - "page_age": "January 11, 2024", - "title": "AI Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4064]", - "page_age": "September 17, 2025", - "title": "Americans\u2019 awareness of AI and views of use in daily life, control over it | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5284]", - "page_age": "1 month ago", - "title": "131 AI Statistics and Trends for 2026 | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-statistics-trends/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5652]", - "page_age": "November 25, 2025", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2996]", - "page_age": null, - "title": "SPOTLIGHT: Like Parent, Like Teen: AI Usage Patterns Reveal Striking Parallels Across Generations | NORC at the University of Chicago", - "type": "web_search_result", - "url": "https://www.norc.org/research/library/like-parent-like-teen-ai-usage-patterns-reveal-striking-parallels-across-generations.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4156]", - "page_age": "March 7, 2025", - "title": "AI Adoption in the Workplace Still Low, 2 Years Later - NN/G", - "type": "web_search_result", - "url": "https://www.nngroup.com/articles/ai-adoption-pew/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4116]", - "page_age": "November 19, 2025", - "title": "The State of Generative AI Adoption in 2025 | St. Louis Fed", - "type": "web_search_result", - "url": "https://www.stlouisfed.org/on-the-economy/2025/nov/state-generative-ai-adoption-2025" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3000]", - "page_age": "February 11, 2025", - "title": "Familiarity with artificial intelligence drives optimism and adoption among veterinary professionals: 2024 survey - PubMed", - "type": "web_search_result", - "url": "https://pubmed.ncbi.nlm.nih.gov/39933254/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5316]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - } - ], - "tool_use_id": "srvtoolu_01CVyZcqJ8Zhjwax9XoCtRu5", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2040]", - "page_age": null, - "title": "State of the Tech Workforce 2024 | CompTIA Report", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5632]", - "page_age": null, - "title": "Where are all America\u2019s tech workers in 2025? | Course Report", - "type": "web_search_result", - "url": "https://www.coursereport.com/reports/techxodus" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2676]", - "page_age": null, - "title": "Computer and Information Technology Occupations : Occupational Outlook Handbook: : U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/ooh/computer-and-information-technology/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3076]", - "page_age": null, - "title": "Tech sector employment U.S. 2017-2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1403635/united-states-net-sector-employment/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5308]", - "page_age": null, - "title": "U.S. tech employment by occupation 2020-2030 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/674463/united-states-electronic-components-manufacturing/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3468]", - "page_age": null, - "title": "CompTIA State of the Tech Workforce 2025 | CompTIA News", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5544]", - "page_age": "September 13, 2024", - "title": "The Professional and Technical Workforce: By the Numbers \u2014 Department for Professional Employees, AFL-CIO", - "type": "web_search_result", - "url": "https://www.dpeaflcio.org/factsheets/the-professional-and-technical-workforce-by-the-numbers" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1724]", - "page_age": "August 2, 2024", - "title": "New tech employment data reflects broader slowdown in US hiring", - "type": "web_search_result", - "url": "https://www.prnewswire.com/news-releases/new-tech-employment-data-reflects-broader-slowdown-in-us-hiring-302213552.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4408]", - "page_age": null, - "title": "Statistics about the tech work force in the US. How many employees? how many work in private companies how many in public companies. How many companies are private and how many public? how many of the...[truncated]", - "type": "web_search_result", - "url": "https://askwonder.com/research/statistics-tech-work-force-us-employees-work-private-companies-public-companies-1rhgo54r5" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6616]", - "page_age": "May 30, 2024", - "title": "The STEM Labor Force: Scientists, Engineers, and Skilled Technical Workers | NSF - National Science Foundation", - "type": "web_search_result", - "url": "https://ncses.nsf.gov/pubs/nsb20245/u-s-stem-workforce-size-growth-and-employment" - } - ], - "tool_use_id": "srvtoolu_018548BXQKF4yw3C6zQT8XtU", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5436]", - "page_age": null, - "title": "AGI/Singularity: 9,300 Predictions Analyzed", - "type": "web_search_result", - "url": "https://research.aimultiple.com/artificial-general-intelligence-singularity-timing/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6116]", - "page_age": null, - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6516]", - "page_age": "November 22, 2025", - "title": "Explosive AI Timeline Predictions | by Kevin O'Shaughnessy | Medium", - "type": "web_search_result", - "url": "https://medium.com/@ZombieCodeKill/explosive-ai-timeline-predictions-b29744f839a9" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5276]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5460]", - "page_age": null, - "title": "Visions for Potential AGI Futures", - "type": "web_search_result", - "url": "https://www.rand.org/content/dam/rand/pubs/research_reports/RRA3000/RRA3034-2/RAND_RRA3034-2.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2900]", - "page_age": null, - "title": "Public Opinion | The 2024 AI Index Report | Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6596]", - "page_age": "April 8, 2025", - "title": "Article | Progress Towards AGI and ASI: 2024\u2013Present", - "type": "web_search_result", - "url": "https://www.cloudwalk.io/ai/progress-towards-agi-and-asi-2024-present" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4176]", - "page_age": "October 30, 2025", - "title": "Why there\u2019s so much disagreement about the timeline for advanced AI", - "type": "web_search_result", - "url": "https://www.clearerthinking.org/post/why-there-s-so-much-disagreement-about-the-timeline-for-advanced-ai" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4508]", - "page_age": null, - "title": "Lesswrong", - "type": "web_search_result", - "url": "https://www.lesswrong.com/posts/zDS9c48nkBvqRwtrX/when-do-experts-think-human-level-ai-will-be-created" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4504]", - "page_age": "March 11, 2024", - "title": "What Does the American Public Really Think of AI? - SBU News", - "type": "web_search_result", - "url": "https://news.stonybrook.edu/newsroom/what-does-the-american-public-really-think-of-ai/" - } - ], - "tool_use_id": "srvtoolu_01P1qXoqjJt2HXTTBGHNU98S", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01QadoWhf4DdJsP2iiQAcTQ2", - "input": { - "query": "Americans AI job displacement fear survey 2024 sci-fi consumption statistics trust OpenAI" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5460]", - "page_age": "October 1, 2025", - "title": "New data show no AI jobs apocalypse\u2014for now | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/new-data-show-no-ai-jobs-apocalypse-for-now/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=856]", - "page_age": "August 20, 2025", - "title": "Americans Fear AI Permanently Displacing Workers, Poll Finds", - "type": "web_search_result", - "url": "https://www.inc.com/reuters/americans-fear-ai-permanently-displacing-workers-poll-finds/91229316" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5468]", - "page_age": "August 25, 2024", - "title": "AI in the Workplace Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-in-workplace-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=448]", - "page_age": "March 12, 2025", - "title": "On Future AI Use in Workplace, US Workers More Worried Than Hopeful | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2025/02/25/u-s-workers-are-more-worried-than-hopeful-about-future-ai-use-in-the-workplace/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5160]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1152]", - "page_age": "April 10, 2025", - "title": "Americans worry AI is coming for these jobs - The Washington Post", - "type": "web_search_result", - "url": "https://www.washingtonpost.com/business/2025/04/08/ai-job-loss-work/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3188]", - "page_age": "August 20, 2025", - "title": "New Poll Finds 7 in 10 Americans Fear AI Job Loss", - "type": "web_search_result", - "url": "https://www.eweek.com/news/americans-fear-ai-job-loss-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5032]", - "page_age": "October 9, 2025", - "title": "Is AI Contributing to Rising Unemployment? Evidence from Occupational Variation", - "type": "web_search_result", - "url": "https://www.stlouisfed.org/on-the-economy/2025/aug/is-ai-contributing-unemployment-evidence-occupational-variation" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2564]", - "page_age": "August 19, 2025", - "title": "Americans fear AI permanently displacing workers \u2013 poll", - "type": "web_search_result", - "url": "https://www.rappler.com/technology/poll-americans-fear-artificial-intelligence-worker-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2956]", - "page_age": "February 2, 2024", - "title": "Growing fear among Americans that AI will take their jobs", - "type": "web_search_result", - "url": "https://abc3340.com/news/nation-world/growing-fear-among-americans-that-ai-will-take-their-jobs-artificial-intelligence-technology-generative-ai-chatgpt-innovations-workers-companies-labor-market-gall...[truncated]" - } - ], - "tool_use_id": "srvtoolu_01QadoWhf4DdJsP2iiQAcTQ2", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=134]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=137]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN8+ozWc1JNVQE86cxoM/ewi8MooGttpcx2aIjDJpEAjyAg9Nwn8Xgxa0fHZBDudEU6YC9Sp2MvANI1Bjc+EyV56YrB32ByOMO0FSx8qE68j7GjmveajPQR7SdjbtM+2FxMYBA==", - "title": "U.S. AI knowledge by age 2024 | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - } - ], - "text": "[REDACTED_TEXT length=49]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=2]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpMBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMdsFkC5jjl1Yl93XxoMM13LuHC1D+3Y1pB3IjCO3VpnoIqfN7zp2vuzXZiQd/PQqf1qWZ7dBMMHZnO1sFpuf5n7F6iwNVNMf1A9hVAqF/xDdMqOOxDR/bmndhg0sg4TFcOrJTPm...[truncated]", - "title": "AI Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result_location", - "url": "https://www.aiprm.com/ai-statistics/" - } - ], - "text": "[REDACTED_TEXT length=64]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=81]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAnM+/Jb22wSRkcTfBoMR0RZhA/eG07jRcLuIjCWebsmy/pXPdQXKPBs9XnnW1bSPu91n1Pt6jF/AZYoiREryHu6F2cUiD1t+Kmlb34qFfZWocXGgxhha2xXgYx+tw7SjTpEGxgE", - "title": "Where are all America\u2019s tech workers in 2025? | Course Report", - "type": "web_search_result_location", - "url": "https://www.coursereport.com/reports/techxodus" - } - ], - "text": "[REDACTED_TEXT length=66]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOaYAMnuKIV2qCeKZhoMdRAHqWniMXkLDI/2IjASfYxBMA2kxnW98zCmUP6WFSQ8nq5dQV4L/R0Z53Wvh0ts9SFoiLQHijTHYYUh/84qFSk4DG956o7VRQwJBAsS26/4nmxBJhgE", - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result_location", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - } - ], - "text": "[REDACTED_TEXT length=87]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=2]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEGBhgPf/mbJaFKxyBoMFjfMCJbwXSTpsRp0IjDi9F6xCO/bvAuAp3I0KJBNqYY3mF10f+JbygVozX558oG4LfYzOtR4FgpWvoTXxUIqFBitUxG/XcUTDmT5X56eDW+7pX0iGAQ=", - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result_location", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - } - ], - "text": "[REDACTED_TEXT length=47]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJX20LDO4S2cufXVRhoMRNxZ7Z3e4KVyBeN+IjApjdB1AczAwgqAOrr+gY+JGHLF+hwTivvDHeP+9qzBuBx2jX0RxsxTLNqic4I7iuMqFFJxmu/BCvHIYvcDEq48Q8dWetwoGAQ=", - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result_location", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - } - ], - "text": "[REDACTED_TEXT length=63]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDjx1TPYz5w1oFuYJBoMSBMS4565+RgzVZv3IjAI+Da19GiUK3F/8FmsOri6qZTnKney6krJIV7x0iia38T2k3+/sGSso0QByTS2HU4qGGVaQtcNx83JE7rKZrUkvcYs4gRy0rqP...[truncated]", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - } - ], - "text": "[REDACTED_TEXT length=114]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJf1Z1n0loMPrTE1dxoMhRFclnoSA3PyagSeIjCW48AyeDwgwoWZXozrWPFyDOy/GEISouIYHAnM1IbUffwKiL4q1HPhY2F9zQj9FlkqFFpaiZC8S6JT+3rv/b8syvSSblomGAQ=", - "title": "Americans fear AI permanently displacing workers \u2013 poll", - "type": "web_search_result_location", - "url": "https://www.rappler.com/technology/poll-americans-fear-artificial-intelligence-worker-displacement/" - } - ], - "text": "[REDACTED_TEXT length=104]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNVbY4D49nXf92ZxCxoM1+7EtB42KHS6Mbo+IjBFTf+MjEEP7LkKcHdJF5VqwtBfjgqiJXF1Z4VsBwlePg3Bwd1GlFOjl5dEmANaMGAqFZUGABEZBC04Dh6bzUdVsfvRfI5oZRgE", - "title": "Public Opinion | The 2024 AI Index Report | Stanford HAI", - "type": "web_search_result_location", - "url": "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion" - } - ], - "text": "[REDACTED_TEXT length=100]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEfHCFTChB5q/j5wNxoMc2JivRrXtJFAHAKvIjD6gNb85SHQAwZKBUPeJk2FVlf4VqrUAnH8Suaano4eGCY+kdShrcYl+4/dMktRUpgqE9mecdwc6B5iKgCAkpp9cwlIhKAYBA==", - "title": "Americans\u2019 awareness of AI and views of use in daily life, control over it | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/" - } - ], - "text": "[REDACTED_TEXT length=70]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01MoeiYnZiHwJzZs3KshqsQ1", - "input": { - "attributes": [ - { - "name": "ai_familiarity", - "distribution": { - "type": "categorical", - "options": [ - "None", - "Basic", - "Intermediate", - "Advanced", - "Expert" - ], - "weights": [ - 0.08, - 0.32, - 0.35, - 0.18, - 0.07 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research 2024\u20132025, AIPRM 2024 survey of 6,000 US adults, Statista March 2024", - "note": "~40% of US adults knew little/nothing about AI in early 2024 (Statista). AIPRM found ~30% high awareness and ~31% low awareness. 95% have heard 'at least a little' (Pew 2025). Mapping: None~8%, Basic~...[truncated]" - } - }, - { - "name": "works_in_tech", - "distribution": { - "type": "boolean", - "probability_true": 0.08, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Boolean floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Boolean ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "CompTIA State of the Tech Workforce 2025; Course Report LinkedIn analysis 2024", - "note": "CompTIA reported ~9.6M net tech employment in 2024 out of ~160M US workforce = ~6%. Course Report LinkedIn analysis placed tech workers at 7.25% of US workforce (~16.1M). Using ~8% as base to include ...[truncated]" - } - }, - { - "name": "prior_asi_belief", - "distribution": { - "type": "categorical", - "options": [ - "Imminent (within 10 years)", - "Decades away", - "Never", - "No opinion" - ], - "weights": [ - 0.3, - 0.28, - 0.06, - 0.36 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Sentience Institute AIMS Survey (2023); Stony Brook/Prolific survey 2023", - "note": "AIMS found 24% of US public believes ASI already exists; modal estimate is 5 years out (2023 survey). Only 3% said 'never.' ~34% had no strong opinion/unclear. Aggregating 'already exists' + short-tim...[truncated]" - } - }, - { - "name": "ai_safety_concern_level", - "distribution": { - "type": "beta", - "alpha": 2.8, - "beta": 2.2, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Probability scale floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Probability scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center Aug 2024 (5,410 US adults); Sentience Institute AIMS Survey; Stanford HAI 2024 AI Index", - "note": "Pew: 51% of US adults more concerned than excited about AI. AIMS: 48% concerned about AI causing human extinction, 52% about 'end of human race.' Stanford/Ipsos: 52% express nervousness toward AI prod...[truncated]" - } - }, - { - "name": "openai_trust", - "distribution": { - "type": "beta", - "alpha": 2.0, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Trust scale floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Trust scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew Research Apr 2025; general institutional trust surveys; Stanford HAI 2024", - "note": "No direct OpenAI-specific trust poll found for general US public. Extrapolated from general trust_in_institutions (low nationally) and AI company trust data. Only 17% of US adults express positive AI ...[truncated]" - } - }, - { - "name": "tech_optimism", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 2.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Pew Research 2024; Stanford HAI 2024 AI Index; AIPRM 2024", - "note": "Stanford/Ipsos: 34% anticipate AI will boost economy, 32% believe it will enhance job market \u2014 below-majority optimism. Gen Z (57%) and Millennials (62%) more excited than concerned, vs only 30% of Bo...[truncated]" - } - }, - { - "name": "job_displacement_concern", - "distribution": { - "type": "beta", - "alpha": 3.2, - "beta": 2.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Reuters/Ipsos poll Aug 2025 (n=4,446); Gallup 2024; Microsoft survey 2024", - "note": "Reuters/Ipsos: 71% concerned AI will 'put too many people out of work permanently.' Gallup: 22% fear their own job becoming obsolete (up from 15%). Microsoft: 53% worried about looking replaceable. Th...[truncated]" - } - }, - { - "name": "initial_asi_reaction", - "distribution": { - "type": "categorical", - "options": [ - "Excited", - "Fearful", - "Skeptical", - "Indifferent", - "Mixed" - ], - "weights": [ - 0.1, - 0.28, - 0.25, - 0.12, - 0.25 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Aug 2024 (5,410 US adults); Stanford HAI 2024; AIPRM 2024", - "note": "Pew: only 11% of general public more excited than concerned about AI (vs 47% of experts). 51% more concerned than excited. AIPRM: 51% men and 40% women say more excited than concerned \u2014 but only ~45% ...[truncated]" - } - }, - { - "name": "sci_fi_consumption", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Rarely", - "Sometimes", - "Often", - "Very Often" - ], - "weights": [ - 0.2, - 0.25, - 0.3, - 0.17, - 0.08 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "estimated", - "source": "Motion Picture Association theatrical data; Nielsen genre consumption surveys; Pew media consumption 2024", - "note": "No direct national sci-fi AI consumption survey found. Estimated from genre media share data: Sci-fi is ~12-15% of US box office; broader sci-fi TV/book consumption (including Marvel, Star Wars adjace...[truncated]" - } - }, - { - "name": "social_network_tech_density", - "distribution": { - "type": "beta", - "alpha": 1.5, - "beta": 4.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Proportion floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Proportion ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "CompTIA 2025 (tech workers = ~7.25% of US workforce); Course Report 2024 LinkedIn analysis", - "note": "With only ~7-8% of the US workforce in tech, most Americans have low tech-worker density in their immediate social networks. However, tech workers cluster geographically (SF 22%, Seattle 16%) and soci...[truncated]" - } - }, - { - "name": "opinion_volatility", - "distribution": { - "type": "beta", - "alpha": 2.2, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Political psychology literature on attitude stability; Big Five agreeableness and need_for_cognition research", - "note": "No direct national survey of 'opinion volatility' on AI events. Extrapolated from political attitude change research. Generally, ~35-40% of people substantially change views after new information expo...[truncated]" - } - }, - { - "name": "doomism_tendency", - "distribution": { - "type": "beta", - "alpha": 2.0, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Sentience Institute AIMS Survey 2023; Pew Research 2024; Stanford HAI 2024", - "note": "AIMS: 48% concerned AI likely to cause human extinction, 52% worried about AI ending human race. However, doomism_tendency is about catastrophic *framing* \u2014 more extreme than general concern. Estimate...[truncated]" - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 99983, - "output_tokens": 5417, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.lesswrong.com/posts/zDS9c48nkBvqRwtrX/when-do-experts-think-human-level-ai-will-be-created", - "https://www.bls.gov/ooh/computer-and-information-technology/", - "https://www.eweek.com/news/americans-fear-ai-job-loss-survey/", - "https://www.aiprm.com/ai-statistics/", - "https://abc3340.com/news/nation-world/growing-fear-among-americans-that-ai-will-take-their-jobs-artificial-intelligence-technology-generative-ai-chatgpt-innovations-workers-companies-labor-market-gallup-brookings-metro-johns-hopkins-institute-for-assured-autonomy", - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://medium.com/@ZombieCodeKill/explosive-ai-timeline-predictions-b29744f839a9", - "https://www.rand.org/content/dam/rand/pubs/research_reports/RRA3000/RRA3034-2/RAND_RRA3034-2.pdf", - "https://www.rappler.com/technology/poll-americans-fear-artificial-intelligence-worker-displacement/", - "https://www.stlouisfed.org/on-the-economy/2025/nov/state-generative-ai-adoption-2025", - "https://www.dpeaflcio.org/factsheets/the-professional-and-technical-workforce-by-the-numbers", - "https://www.aiprm.com/ai-in-workplace-statistics/", - "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey", - "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion", - "https://www.washingtonpost.com/business/2025/04/08/ai-job-loss-work/", - "https://www.nngroup.com/articles/ai-adoption-pew/", - "https://www.stlouisfed.org/on-the-economy/2025/aug/is-ai-contributing-unemployment-evidence-occupational-variation", - "https://www.prnewswire.com/news-releases/new-tech-employment-data-reflects-broader-slowdown-in-us-hiring-302213552.html", - "https://www.brookings.edu/articles/new-data-show-no-ai-jobs-apocalypse-for-now/", - "https://www.coursereport.com/reports/techxodus", - "https://www.clearerthinking.org/post/why-there-s-so-much-disagreement-about-the-timeline-for-advanced-ai", - "https://www.statista.com/statistics/674463/united-states-electronic-components-manufacturing/", - "https://askwonder.com/research/statistics-tech-work-force-us-employees-work-private-companies-public-companies-1rhgo54r5", - "https://www.statista.com/statistics/1403635/united-states-net-sector-employment/", - "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/", - "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/", - "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/", - "https://research.aimultiple.com/artificial-general-intelligence-singularity-timing/", - "https://www.nu.edu/blog/ai-statistics-trends/", - "https://www.cloudwalk.io/ai/progress-towards-agi-and-asi-2024-present", - "https://www.pewresearch.org/social-trends/2025/02/25/u-s-workers-are-more-worried-than-hopeful-about-future-ai-use-in-the-workplace/", - "https://www.norc.org/research/library/like-parent-like-teen-ai-usage-patterns-reveal-striking-parallels-across-generations.html", - "https://pubmed.ncbi.nlm.nih.gov/39933254/", - "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/", - "https://news.stonybrook.edu/newsroom/what-does-the-american-public-really-think-of-ai/", - "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.inc.com/reuters/americans-fear-ai-permanently-displacing-workers-poll-finds/91229316", - "https://ncses.nsf.gov/pubs/nsb20245/u-s-stem-workforce-size-growth-and-employment" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_211407_854323_claude_agentic_research.json b/examples/logs/20260217_211407_854323_claude_agentic_research.json deleted file mode 100644 index f0b75cb..0000000 --- a/examples/logs/20260217_211407_854323_claude_agentic_research.json +++ /dev/null @@ -1,1514 +0,0 @@ -{ - "timestamp": "2026-02-17T21:14:07.854351", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 14572 - }, - "response": { - "id": "msg_01Y7y9FbhJaVXvp5QxZax1ki", - "content": [ - { - "id": "srvtoolu_01KpikhSviD4Y6QARz5MPrxa", - "input": { - "query": "public reaction ASI artificial superintelligence announcement survey 2024 2025" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01EGCvKeFKuMAzEkAT6fpsM6", - "input": { - "query": "American public AI familiarity demographics education age survey 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1820]", - "page_age": null, - "title": "Public Opinion | The 2025 AI Index Report - Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5680]", - "page_age": null, - "title": "Artificial Super Intelligence (ASI): The Ultimate Guide for 2025", - "type": "web_search_result", - "url": "https://botinfo.ai/articles/artificial-super-intelligence" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5532]", - "page_age": "October 19, 2025", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5240]", - "page_age": null, - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5340]", - "page_age": "October 28, 2025", - "title": "Beyond AI: Preparing For (ASI) Artificial Super Intelligence - CTO Magazine", - "type": "web_search_result", - "url": "https://ctomagazine.com/preparing-for-artificial-super-intelligence-beyond-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5348]", - "page_age": null, - "title": "Artificial Super Intelligence (ASI)", - "type": "web_search_result", - "url": "https://www.emergentmind.com/topics/artificial-super-intelligence-asi" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3048]", - "page_age": null, - "title": "AI Safety Index Future of Life Institute Summer 2025", - "type": "web_search_result", - "url": "https://futureoflife.org/wp-content/uploads/2025/07/FLI-AI-Safety-Index-Report-Summer-2025.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1608]", - "page_age": null, - "title": "ASI Roadmap 2025 | Artificial Superintelligence Alliance", - "type": "web_search_result", - "url": "https://docs.superintelligence.io/artificial-superintelligence-alliance/asi-roadmap-2025" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1744]", - "page_age": "July 16, 2025", - "title": "Public Opinion on AI in 2025", - "type": "web_search_result", - "url": "https://aragonresearch.com/public-opinion-on-ai-in-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=560]", - "page_age": null, - "title": "Artificial Intelligence and Superintelligence", - "type": "web_search_result", - "url": "https://www.techrxiv.org/users/985276/articles/1365906/master/file/data/AI_Superintelligence_Study/AI_Superintelligence_Study.pdf" - } - ], - "tool_use_id": "srvtoolu_01KpikhSviD4Y6QARz5MPrxa", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4332]", - "page_age": null, - "title": "SPOTLIGHT: Like Parent, Like Teen: AI Usage Patterns Reveal Striking Parallels Across Generations | NORC at the University of Chicago", - "type": "web_search_result", - "url": "https://www.norc.org/research/library/like-parent-like-teen-ai-usage-patterns-reveal-striking-parallels-across-generations.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1696]", - "page_age": "September 17, 2025", - "title": "Americans\u2019 awareness of AI and views of use in daily life, control over it | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5848]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5440]", - "page_age": "April 24, 2025", - "title": "Americans' views of artificial intelligence in 2023 | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2023/11/21/what-the-data-says-about-americans-views-of-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5380]", - "page_age": "November 25, 2025", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5188]", - "page_age": null, - "title": "U.S. AI knowledge by age 2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5208]", - "page_age": "January 9, 2026", - "title": "The Latest AI in Education Statistics (2026) - Programs.com", - "type": "web_search_result", - "url": "https://programs.com/resources/ai-education-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5464]", - "page_age": "June 10, 2025", - "title": "Generative AI in Higher Education: Demographic Differences in Student Perceived Readiness, Benefits, and Challenges | TechTrends | Springer Nature Link", - "type": "web_search_result", - "url": "https://link.springer.com/article/10.1007/s11528-025-01109-6" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4444]", - "page_age": "October 15, 2025", - "title": "Majority of Americans See U.S. Leadership in AI as Crucial, Survey Finds | RAND", - "type": "web_search_result", - "url": "https://www.rand.org/pubs/research_reports/RRA4363-1.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4284]", - "page_age": "January 11, 2024", - "title": "AI Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-statistics/" - } - ], - "tool_use_id": "srvtoolu_01EGCvKeFKuMAzEkAT6fpsM6", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_016QtpeAtChkiZTiisqud7Uy", - "input": { - "query": "AI fear excitement skepticism demographics age political ideology trust OpenAI survey 2025" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01NhciPkqQ9Eybr9iJvAbBmd", - "input": { - "query": "AI job displacement concern occupation sector sci-fi consumption AI safety concern political ideology 2024 2025" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5432]", - "page_age": null, - "title": "The Age of AI: July 2025 | Verasight", - "type": "web_search_result", - "url": "https://www.verasight.io/reports/ai-report-july25" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3000]", - "page_age": "September 17, 2025", - "title": "How Americans View AI and Its Impact on Human Abilities, Society | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/science/2025/09/17/how-americans-view-ai-and-its-impact-on-people-and-society/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5596]", - "page_age": "October 15, 2025", - "title": "Views of AI Around the World | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/global/2025/10/15/how-people-around-the-world-view-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4136]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4236]", - "page_age": "November 12, 2025", - "title": "What Americans Really Think About AI Algorithms: Public Confidence and Transparency in Government - Cornell Brooks Public Policy", - "type": "web_search_result", - "url": "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5452]", - "page_age": "November 11, 2025", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=396]", - "page_age": "October 15, 2025", - "title": "Concern and excitement about AI around the world | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/2025/10/15/concern-and-excitement-about-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5424]", - "page_age": "3 weeks ago", - "title": "Who trusts AI? - Economics Observatory", - "type": "web_search_result", - "url": "https://www.economicsobservatory.com/who-trusts-ai" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1752]", - "page_age": null, - "title": "Public Opinion | The 2025 AI Index Report - Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5456]", - "page_age": null, - "title": "pi_2025.04.03_us-public-and-ai-experts_report.pdf", - "type": "web_search_result", - "url": "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/04/pi_2025.04.03_us-public-and-ai-experts_report.pdf" - } - ], - "tool_use_id": "srvtoolu_016QtpeAtChkiZTiisqud7Uy", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5452]", - "page_age": null, - "title": "Top 20 Predictions from Experts on AI Job Loss", - "type": "web_search_result", - "url": "https://research.aimultiple.com/ai-job-loss/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5512]", - "page_age": null, - "title": "AI-Driven Worker Displacement Is a Serious Threat", - "type": "web_search_result", - "url": "https://jacobin.com/2025/07/artificial-intelligence-worker-displacement-jobs" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5340]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1920]", - "page_age": null, - "title": "People Don\u2019t Worry About Losing Jobs to AI, Even When Told It Could Happen Soon | Newsroom", - "type": "web_search_result", - "url": "https://news.ucmerced.edu/news/2025/people-don%E2%80%99t-worry-about-losing-jobs-ai-even-when-told-it-could-happen-soon" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4320]", - "page_age": "November 11, 2025", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4996]", - "page_age": "August 14, 2025", - "title": "AI and Jobs: The Final Word (Until the Next One) - Economic Innovation Group", - "type": "web_search_result", - "url": "https://eig.org/ai-and-jobs-the-final-word/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5416]", - "page_age": "May 30, 2025", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2976]", - "page_age": null, - "title": "The overlooked global risk of the AI precariat | World Economic Forum", - "type": "web_search_result", - "url": "https://www.weforum.org/stories/2025/08/the-overlooked-global-risk-of-the-ai-precariat/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6232]", - "page_age": null, - "title": "A.I. Is Going to Disrupt the Labor Market. It Doesn\u2019t Have to Destroy It. | Chicago Booth Review", - "type": "web_search_result", - "url": "https://www.chicagobooth.edu/review/ai-is-going-disrupt-labor-market-it-doesnt-have-destroy-it" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5648]", - "page_age": "August 13, 2025", - "title": "How Will AI Affect the Global Workforce? | Goldman Sachs", - "type": "web_search_result", - "url": "https://www.goldmansachs.com/insights/articles/how-will-ai-affect-the-global-workforce" - } - ], - "tool_use_id": "srvtoolu_01NhciPkqQ9Eybr9iJvAbBmd", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=274]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPdn2qVBru4Kbw5+HBoMGEbCN7VNLG0TAnsGIjANn13SdMPB0tlWYSK7TiS+areMpZLx0yhLtb8t2zqFJ2YmXEq7903RE1rrw2+WQJcqGISaOQImALXZUDxa/lHLtF0UQyyDHn1S...[truncated]", - "title": "Americans' views of artificial intelligence in 2023 | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/short-reads/2023/11/21/what-the-data-says-about-americans-views-of-artificial-intelligence/" - } - ], - "text": "[REDACTED_TEXT length=151]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=147]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDKGI6PcDpHn4kx79uhoMpeBKxYYktOBm6twNIjAogku6SwZaBzrKral7sKxE7Eore3Er6yo8c7XgZBytYqnZ06HSIxA8Jn43+DthqcgqGFPmeHemzaJ5lWLhavwVAt60jgbr62K7...[truncated]", - "title": "SPOTLIGHT: Like Parent, Like Teen: AI Usage Patterns Reveal Striking Parallels Across Generations | NORC at the University of Chicago", - "type": "web_search_result_location", - "url": "https://www.norc.org/research/library/like-parent-like-teen-ai-usage-patterns-reveal-striking-parallels-across-generations.html" - } - ], - "text": "[REDACTED_TEXT length=81]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDLV8VFlv53yV7oa9PxoMUDoatXLYvxFcQj91IjAwsNE3wOcXiJnc8jixXnwPqkrrdbmpD28pNdblyqIxraNFYUDKR8pBFJ8WkEGJfTgqGGEQoMrRWvrZZtIte1XLcpeLFFT7YLOv...[truncated]", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - } - ], - "text": "[REDACTED_TEXT length=158]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHf0Pj+cISBarvZskBoMR86dqL2PE5wmBqVbIjBisDDsD9b+FzhvvDyUYgD8YOA3cZRpXTOqQO0C6mNLd9+259L/doamrpW5ar2yXykqFbw8T96eXGRnadi0H7Ll6+sJLG5H7BgE", - "title": "How Americans View AI and Its Impact on Human Abilities, Society | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/science/2025/09/17/how-americans-view-ai-and-its-impact-on-people-and-society/" - } - ], - "text": "[REDACTED_TEXT length=108]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMuSTBElOahZM3702hoMKKMkFPl2gbJ7vrgsIjD7JLnee5DY3nmCaaR2OAQnFhk00Y1jQXZdcen6tnljXYiCjA4/qDo9FeTpMymmGRMqGHk/pqAuJQwIzrF5s4C9Qyf+OotQ3sm8...[truncated]", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=174]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHamBgodpr18iI0gfBoM2IvGyuwZ8QdiOHpiIjAmBm+3jW8Q9PsFG4LMxcisS5d5jx0tEBnIN/Bm6dCSgxUQwxq+03YaSavHVkxwpMIqE41jxqNQAWvz9KuZxElN2lrRhUQYBA==", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result_location", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - } - ], - "text": "[REDACTED_TEXT length=133]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHaoU9OH37Sw1EKGNhoMClPgaRmIAzyN/sVYIjD1Ie/O/hFlKtvlw8Y/YV1yRMBSOD67XN8eYGor0k+TF6IFwBPHUDVYk/s/JkL6quwqFIowSEIJNK/dawSwImrR24SYp+pTGAQ=", - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result_location", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - } - ], - "text": "[REDACTED_TEXT length=109]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCB8DIYoEeojXcc0URoMHOCYFObXYN7JGTMWIjAVK/GurzqStliZC1K2c+GMXGgbwNu3NkNAEcwr68FY7W8tDv0j9OmOHE1j1z7CljQqE0+QRFKQAIwxz0f7mWAW8YDIAN4YBA==", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result_location", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - } - ], - "text": "[REDACTED_TEXT length=106]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=147]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDOQ9sLVQT3ymArG3hoMrvJBRjGdWDkdbFuLIjDpytILy+3egmUY3r/JgH2OMTYaygwhjRVS552yIiwNuToE03ibWImbwc2K+8OgMlYqFFh6qCP/bCU5UVn7zz5PInjGO49YGAQ=", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=137]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=101]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOH3AjSke5o5WCqnORoMhvqe93P8jVsZUMvJIjCzttdb/YOKpJGGs1KrdkMZaVMs97f464YWYaQIoKydiX7YzgfabzFjM+jrFx2PzfIqFPjj3DplXg/8bSTB2E4d5zsUdOA9GAQ=", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result_location", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - } - ], - "text": "[REDACTED_TEXT length=100]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJMj/2/1SGbnEgzDtxoMZWIvbFEJ7W6/+AKEIjCTMUj4x8kzIEka5secdc3LxreHJtFhnv2QsI6d1snciXG51zANgwbLs1G1VCSQaFcqGAWWLMbWJ/J/X3O95qpx18HeSAsQb7/g...[truncated]", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=204]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAndF9Umpc7vLwlK4RoMgkiBzjDcDKfJnFsQIjD9/a17kgnSNc+aTYocabxGx8rYg5PqrvhUbxn/97QCpvOqIiwh8E9116vNJaSHDM8qFGj9yhzEjAAz7rYlFrpITkSyjT1zGAQ=", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result_location", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - } - ], - "text": "[REDACTED_TEXT length=152]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=115]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDB4em6GlmtYob503uxoMh5lEWp4TQXDwQ0dxIjAEXIZtq0sA/tJbYdSqrsqFBF7Hs7DHlL6GP7ZEsJME2Po1wsP4QHhPZOqVWhKhOqsqFCxl5OeDvejAAAC9eWZiLJGpNZiyGAQ=", - "title": "The Age of AI: July 2025 | Verasight", - "type": "web_search_result_location", - "url": "https://www.verasight.io/reports/ai-report-july25" - } - ], - "text": "[REDACTED_TEXT length=90]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_018JgAT3s9B1kTn8ARbMWkdx", - "input": { - "attributes": [ - { - "name": "ai_familiarity", - "modifiers": [ - { - "when": "education_level == 'Graduate Degree'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.03, - "Basic": 0.12, - "Intermediate": 0.3, - "Advanced": 0.35, - "Expert": 0.2 - }, - "probability_override": null - }, - { - "when": "education_level == \"Bachelor's\"", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.05, - "Basic": 0.2, - "Intermediate": 0.38, - "Advanced": 0.28, - "Expert": 0.09 - }, - "probability_override": null - }, - { - "when": "education_level == \"Associate's\"", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.1, - "Basic": 0.32, - "Intermediate": 0.35, - "Advanced": 0.17, - "Expert": 0.06 - }, - "probability_override": null - }, - { - "when": "education_level == 'Some College'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.14, - "Basic": 0.38, - "Intermediate": 0.3, - "Advanced": 0.13, - "Expert": 0.05 - }, - "probability_override": null - }, - { - "when": "education_level == 'HS Diploma'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.25, - "Basic": 0.42, - "Intermediate": 0.22, - "Advanced": 0.08, - "Expert": 0.03 - }, - "probability_override": null - }, - { - "when": "education_level == 'Less than HS'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.42, - "Basic": 0.38, - "Intermediate": 0.13, - "Advanced": 0.05, - "Expert": 0.02 - }, - "probability_override": null - }, - { - "when": "occupation == 'Management/Professional'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.04, - "Basic": 0.15, - "Intermediate": 0.32, - "Advanced": 0.33, - "Expert": 0.16 - }, - "probability_override": null - }, - { - "when": "occupation == 'Service'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.28, - "Basic": 0.38, - "Intermediate": 0.22, - "Advanced": 0.09, - "Expert": 0.03 - }, - "probability_override": null - }, - { - "when": "occupation == 'Sales/Office'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.12, - "Basic": 0.32, - "Intermediate": 0.33, - "Advanced": 0.17, - "Expert": 0.06 - }, - "probability_override": null - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.35, - "Basic": 0.38, - "Intermediate": 0.18, - "Advanced": 0.07, - "Expert": 0.02 - }, - "probability_override": null - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.32, - "Basic": 0.4, - "Intermediate": 0.19, - "Advanced": 0.07, - "Expert": 0.02 - }, - "probability_override": null - } - ] - }, - { - "name": "works_in_tech", - "modifiers": [ - { - "when": "occupation == 'Management/Professional' and education_level == 'Graduate Degree'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.28 - }, - { - "when": "occupation == 'Management/Professional' and education_level == \"Bachelor's\"", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.2 - }, - { - "when": "occupation == 'Management/Professional' and (education_level == 'Some College' or education_level == \"Associate's\")", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.1 - }, - { - "when": "occupation == 'Service'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.03 - }, - { - "when": "occupation == 'Sales/Office' and education_level in ['Graduate Degree', \"Bachelor's\"]", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.12 - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.02 - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.02 - } - ] - }, - { - "name": "prior_asi_belief", - "modifiers": [ - { - "when": "ai_familiarity == 'Expert'", - "multiply": null, - "add": null, - "weight_overrides": { - "Imminent (within 10 years)": 0.42, - "Decades away": 0.38, - "Never": 0.06, - "No opinion": 0.14 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": null, - "add": null, - "weight_overrides": { - "Imminent (within 10 years)": 0.38, - "Decades away": 0.35, - "Never": 0.07, - "No opinion": 0.2 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Intermediate'", - "multiply": null, - "add": null, - "weight_overrides": { - "Imminent (within 10 years)": 0.3, - "Decades away": 0.28, - "Never": 0.1, - "No opinion": 0.32 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Basic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Imminent (within 10 years)": 0.22, - "Decades away": 0.18, - "Never": 0.12, - "No opinion": 0.48 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'None'", - "multiply": null, - "add": null, - "weight_overrides": { - "Imminent (within 10 years)": 0.15, - "Decades away": 0.08, - "Never": 0.12, - "No opinion": 0.65 - }, - "probability_override": null - }, - { - "when": "openness > 0.7 and ai_familiarity in ['Intermediate', 'Advanced', 'Expert']", - "multiply": null, - "add": null, - "weight_overrides": { - "Imminent (within 10 years)": 0.42, - "Decades away": 0.32, - "Never": 0.05, - "No opinion": 0.21 - }, - "probability_override": null - }, - { - "when": "openness < 0.3 and ai_familiarity in ['None', 'Basic']", - "multiply": null, - "add": null, - "weight_overrides": { - "Imminent (within 10 years)": 0.1, - "Decades away": 0.1, - "Never": 0.18, - "No opinion": 0.62 - }, - "probability_override": null - } - ] - }, - { - "name": "ai_safety_concern_level", - "modifiers": [ - { - "when": "ai_familiarity == 'Expert'", - "multiply": 1.05, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": 1.04, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'None'", - "multiply": 0.85, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism > 0.7", - "multiply": 1.1, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism < 0.3", - "multiply": 0.9, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 1.08, - "add": 0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions > 0.7", - "multiply": 0.92, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "openai_trust", - "modifiers": [ - { - "when": "trust_in_institutions > 0.7 and ai_familiarity in ['None', 'Basic']", - "multiply": 1.1, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 0.8, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity in ['Advanced', 'Expert']", - "multiply": 0.9, - "add": -0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Very Conservative'", - "multiply": 0.85, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Very Liberal'", - "multiply": 0.88, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate' and trust_in_institutions > 0.5", - "multiply": 1.05, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "tech_optimism", - "modifiers": [ - { - "when": "openness > 0.7 and political_ideology in ['Very Liberal', 'Liberal']", - "multiply": 1.1, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness > 0.7 and political_ideology in ['Conservative', 'Very Conservative']", - "multiply": 1.08, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.3", - "multiply": 0.88, - "add": -0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree'", - "multiply": 1.05, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Less than HS'", - "multiply": 0.9, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Very Conservative'", - "multiply": 0.92, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Very Liberal'", - "multiply": 0.95, - "add": -0.03, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "job_displacement_concern", - "modifiers": [ - { - "when": "occupation == 'Sales/Office' and works_in_tech == False", - "multiply": 1.12, - "add": 0.09, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Management/Professional' and works_in_tech == False", - "multiply": 1.08, - "add": 0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "works_in_tech == True and ai_familiarity in ['Advanced', 'Expert']", - "multiply": 0.88, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "works_in_tech == True and ai_familiarity in ['None', 'Basic', 'Intermediate']", - "multiply": 1.1, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": 0.82, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Service'", - "multiply": 0.9, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'None'", - "multiply": 0.85, - "add": -0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity in ['Advanced', 'Expert'] and works_in_tech == False", - "multiply": 1.12, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "initial_asi_reaction", - "modifiers": [ - { - "when": "tech_optimism > 0.7 and ai_safety_concern_level < 0.4 and openai_trust > 0.6", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.45, - "Fearful": 0.08, - "Skeptical": 0.18, - "Indifferent": 0.1, - "Mixed": 0.19 - }, - "probability_override": null - }, - { - "when": "tech_optimism < 0.4 and ai_safety_concern_level > 0.6 and openai_trust < 0.4", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.04, - "Fearful": 0.45, - "Skeptical": 0.28, - "Indifferent": 0.07, - "Mixed": 0.16 - }, - "probability_override": null - }, - { - "when": "tech_optimism > 0.6 and ai_safety_concern_level > 0.6", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.15, - "Fearful": 0.2, - "Skeptical": 0.18, - "Indifferent": 0.07, - "Mixed": 0.4 - }, - "probability_override": null - }, - { - "when": "ai_safety_concern_level > 0.7 and openai_trust < 0.35", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.04, - "Fearful": 0.48, - "Skeptical": 0.3, - "Indifferent": 0.05, - "Mixed": 0.13 - }, - "probability_override": null - }, - { - "when": "openai_trust > 0.65 and ai_safety_concern_level < 0.5 and tech_optimism > 0.55", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.32, - "Fearful": 0.1, - "Skeptical": 0.22, - "Indifferent": 0.12, - "Mixed": 0.24 - }, - "probability_override": null - }, - { - "when": "tech_optimism < 0.35 and ai_safety_concern_level < 0.35", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.05, - "Fearful": 0.12, - "Skeptical": 0.25, - "Indifferent": 0.45, - "Mixed": 0.13 - }, - "probability_override": null - } - ] - }, - { - "name": "sci_fi_consumption", - "modifiers": [ - { - "when": "openness > 0.7 and age < 35", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.06, - "Rarely": 0.12, - "Sometimes": 0.28, - "Often": 0.32, - "Very Often": 0.22 - }, - "probability_override": null - }, - { - "when": "openness > 0.7 and age >= 35 and age < 55", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.08, - "Rarely": 0.15, - "Sometimes": 0.3, - "Often": 0.3, - "Very Often": 0.17 - }, - "probability_override": null - }, - { - "when": "openness > 0.7 and age >= 55", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.12, - "Rarely": 0.2, - "Sometimes": 0.32, - "Often": 0.25, - "Very Often": 0.11 - }, - "probability_override": null - }, - { - "when": "openness < 0.3 and age >= 55", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.45, - "Rarely": 0.28, - "Sometimes": 0.17, - "Often": 0.07, - "Very Often": 0.03 - }, - "probability_override": null - }, - { - "when": "openness < 0.3 and age < 35", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.28, - "Rarely": 0.32, - "Sometimes": 0.25, - "Often": 0.1, - "Very Often": 0.05 - }, - "probability_override": null - }, - { - "when": "openness >= 0.3 and openness <= 0.7 and age < 35", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.14, - "Rarely": 0.22, - "Sometimes": 0.32, - "Often": 0.22, - "Very Often": 0.1 - }, - "probability_override": null - }, - { - "when": "openness >= 0.3 and openness <= 0.7 and age >= 55", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.28, - "Rarely": 0.28, - "Sometimes": 0.26, - "Often": 0.13, - "Very Often": 0.05 - }, - "probability_override": null - } - ] - }, - { - "name": "social_network_tech_density", - "modifiers": [ - { - "when": "works_in_tech == True and urban_rural == 'Urban'", - "multiply": 1.25, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "works_in_tech == True and urban_rural == 'Suburban'", - "multiply": 1.15, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "works_in_tech == True and urban_rural == 'Rural'", - "multiply": 1.05, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "works_in_tech == False and urban_rural == 'Rural'", - "multiply": 0.7, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "works_in_tech == False and urban_rural == 'Urban' and education_level in ['Graduate Degree', \"Bachelor's\"]", - "multiply": 1.05, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "works_in_tech == False and urban_rural == 'Suburban' and education_level in ['Less than HS', 'HS Diploma']", - "multiply": 0.78, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "opinion_volatility", - "modifiers": [ - { - "when": "need_for_cognition > 0.7 and agreeableness < 0.4 and susceptibility_to_misinformation < 0.3", - "multiply": 0.78, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition < 0.3 and agreeableness > 0.7 and susceptibility_to_misinformation > 0.6", - "multiply": 1.22, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "susceptibility_to_misinformation > 0.7", - "multiply": 1.18, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition > 0.7", - "multiply": 0.85, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness > 0.7 and need_for_cognition < 0.5", - "multiply": 1.1, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "doomism_tendency", - "modifiers": [ - { - "when": "neuroticism > 0.7 and ai_safety_concern_level > 0.7", - "multiply": 1.2, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism > 0.7 and ai_safety_concern_level > 0.7 and sci_fi_consumption in ['Often', 'Very Often']", - "multiply": 1.3, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism < 0.3 and ai_safety_concern_level < 0.3", - "multiply": 0.7, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "sci_fi_consumption == 'Very Often' and ai_safety_concern_level > 0.5", - "multiply": 1.15, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "sci_fi_consumption == 'Never' and neuroticism < 0.4", - "multiply": 0.8, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_safety_concern_level > 0.8 and neuroticism > 0.5", - "multiply": 1.18, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - } - ] - } - ] - }, - "name": "conditional_modifiers_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 90368, - "output_tokens": 8021, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.pewresearch.org/short-reads/2023/11/21/what-the-data-says-about-americans-views-of-artificial-intelligence/", - "https://docs.superintelligence.io/artificial-superintelligence-alliance/asi-roadmap-2025", - "https://www.aiprm.com/ai-statistics/", - "https://futureoflife.org/wp-content/uploads/2025/07/FLI-AI-Safety-Index-Report-Summer-2025.pdf", - "https://www.rand.org/pubs/research_reports/RRA4363-1.html", - "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion", - "https://research.aimultiple.com/ai-job-loss/", - "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/", - "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey", - "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/", - "https://www.emergentmind.com/topics/artificial-super-intelligence-asi", - "https://www.techrxiv.org/users/985276/articles/1365906/master/file/data/AI_Superintelligence_Study/AI_Superintelligence_Study.pdf", - "https://botinfo.ai/articles/artificial-super-intelligence", - "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/", - "https://www.pewresearch.org/science/2025/09/17/how-americans-view-ai-and-its-impact-on-people-and-society/", - "https://www.pewresearch.org/global/2025/10/15/how-people-around-the-world-view-ai/", - "https://www.verasight.io/reports/ai-report-july25", - "https://ctomagazine.com/preparing-for-artificial-super-intelligence-beyond-ai/", - "https://news.ucmerced.edu/news/2025/people-don%E2%80%99t-worry-about-losing-jobs-ai-even-when-told-it-could-happen-soon", - "https://www.goldmansachs.com/insights/articles/how-will-ai-affect-the-global-workforce", - "https://aragonresearch.com/public-opinion-on-ai-in-2025/", - "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/", - "https://www.nu.edu/blog/ai-job-statistics/", - "https://link.springer.com/article/10.1007/s11528-025-01109-6", - "https://www.weforum.org/stories/2025/08/the-overlooked-global-risk-of-the-ai-precariat/", - "https://jacobin.com/2025/07/artificial-intelligence-worker-displacement-jobs", - "https://programs.com/resources/ai-education-statistics/", - "https://www.economicsobservatory.com/who-trusts-ai", - "https://www.chicagobooth.edu/review/ai-is-going-disrupt-labor-market-it-doesnt-have-destroy-it", - "https://eig.org/ai-and-jobs-the-final-word/", - "https://www.norc.org/research/library/like-parent-like-teen-ai-usage-patterns-reveal-striking-parallels-across-generations.html", - "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/", - "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/", - "https://www.pewresearch.org/2025/10/15/concern-and-excitement-about-ai/", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/04/pi_2025.04.03_us-public-and-ai-experts_report.pdf" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_211510_266370_claude_agentic_research.json b/examples/logs/20260217_211510_266370_claude_agentic_research.json deleted file mode 100644 index 1d4b4cc..0000000 --- a/examples/logs/20260217_211510_266370_claude_agentic_research.json +++ /dev/null @@ -1,1034 +0,0 @@ -{ - "timestamp": "2026-02-17T21:15:10.266403", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 3723 - }, - "response": { - "id": "msg_014K2PAHmf6Jnvo8wRR54syF", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=113]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01MHprjntewrgjS29yFm9pbT", - "input": { - "query": "US household composition by age group Census 2023 statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01AR248pVksbin4a48T6h6SX", - "input": { - "query": "US interracial marriage same-group partner rates by ethnicity 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01XPRSDFbfCE5SLw8VhB51Ad", - "input": { - "query": "US assortative mating education religion income correlation statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2668]", - "page_age": null, - "title": "Age and Sex Composition in the United States: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2968]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5336]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5956]", - "page_age": null, - "title": "Current Population Survey Data Tables", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5184]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3804]", - "page_age": null, - "title": "Median household income by age U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/233184/median-household-income-in-the-united-states-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=668]", - "page_age": null, - "title": "Age and Sex Tables", - "type": "web_search_result", - "url": "https://www.census.gov/topics/population/age-and-sex/data/tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7168]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - } - ], - "tool_use_id": "srvtoolu_01MHprjntewrgjS29yFm9pbT", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=7144]", - "page_age": "January 5, 2026", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5672]", - "page_age": "April 14, 2024", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2868]", - "page_age": "October 13, 2023", - "title": "growth in interracial marriage, 1980 vs 2021 - Working Immigrants", - "type": "web_search_result", - "url": "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5032]", - "page_age": null, - "title": "Geographic Variations in Black-White Interracial Marital ...", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6724]", - "page_age": null, - "title": "Marital Dissolution Among Interracial Couples - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2768]", - "page_age": "June 12, 2025", - "title": "BLACK MARRIAGE - BlackDemographics.com", - "type": "web_search_result", - "url": "https://blackdemographics.com/households/marriage-in-black-america/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1956]", - "page_age": null, - "title": "Intermarriage - Research and data from Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/topic/family-relationships/marriage-divorce/intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5484]", - "page_age": null, - "title": "Interracial and Interethnic Marriage | Ethnic and Cultural Studies | Research Starters | EBSCO Research", - "type": "web_search_result", - "url": "https://www.ebsco.com/research-starters/ethnic-and-cultural-studies/interracial-and-interethnic-marriage" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6184]", - "page_age": null, - "title": "Who Marries Whom? The Role of Segregation by Race and Class by", - "type": "web_search_result", - "url": "https://www2.census.gov/library/working-papers/2024/adrm/ces/CES-WP-24-30.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5332]", - "page_age": "May 19, 2025", - "title": "13 Interracial Dating Statistics & Studies (2026)", - "type": "web_search_result", - "url": "https://www.datingadvice.com/studies/interracial-dating-statistics" - } - ], - "tool_use_id": "srvtoolu_01AR248pVksbin4a48T6h6SX", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5604]", - "page_age": null, - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5460]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income ...", - "type": "web_search_result", - "url": "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5240]", - "page_age": "February 10, 2015", - "title": "Income inequality and educational assortative mating: Evidence from the Luxembourg Income Study - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4736]", - "page_age": null, - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4268]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income Inequality | Journal of Political Economy: Vol 127, No 6", - "type": "web_search_result", - "url": "https://www.journals.uchicago.edu/doi/10.1086/702018" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5092]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income Inequality - Federal Reserve Bank of New York - FEDERAL RESERVE BANK of NEW YORK", - "type": "web_search_result", - "url": "https://www.newyorkfed.org/research/staff_reports/sr682.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6276]", - "page_age": null, - "title": "Assortative Mating, Intergenerational Mobility, and Educational Inequality", - "type": "web_search_result", - "url": "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3968]", - "page_age": "April 14, 2024", - "title": "New academic study links rising income inequality to \u2018assortative mating\u2019 | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5704]", - "page_age": null, - "title": "Eight Decades of Educational Assortative Mating: A Research Note - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5232]", - "page_age": "October 1, 2024", - "title": "Eight Decades of Educational Assortative Mating: A Research Note | Demography | Duke University Press", - "type": "web_search_result", - "url": "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A" - } - ], - "tool_use_id": "srvtoolu_01XPRSDFbfCE5SLw8VhB51Ad", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=142]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01Le2z9voN9bTMjwVP1UydcB", - "input": { - "query": "US average household size 2023 Census average age first birth partner age gap marriage statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1716]", - "page_age": null, - "title": "Fewer Than Half of U.S. Households Are Married-Couple Households", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2025/families-and-living-arrangements.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3984]", - "page_age": null, - "title": "Age Composition of Same-sex & Different-sex Couples, 2023", - "type": "web_search_result", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1920]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=364]", - "page_age": null, - "title": "Figure MS-2 Median age at first marriage: 1890 to present 16 18 20 22 24 26 28", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/library/visualizations/time-series/demo/families-and-households/ms-2.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=384]", - "page_age": null, - "title": "DATA FRQM THE NATIONAL VITAL STATISTICS SYSTEM Scrims 2a Numb.r 21 Marriages", - "type": "web_search_result", - "url": "https://www.cdc.gov/nchs/data/series/sr_21/sr21_021.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3916]", - "page_age": null, - "title": "Married Couple Households Made Up Most of Family Households", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2023/05/family-households-still-the-majority.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4312]", - "page_age": null, - "title": "When and How Often People Marry Changes by Birth Cohort", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2022/08/does-marrying-younger-mean-marrying-more-often.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=356]", - "page_age": null, - "title": "B12007H: Median Age at First - Census Data", - "type": "web_search_result", - "url": "https://data.census.gov/table/ACSDT1Y2023.B12007H?q=marriage+rates" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1120]", - "page_age": null, - "title": "Age Differences Among Coresidential Partners", - "type": "web_search_result", - "url": "https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html" - } - ], - "tool_use_id": "srvtoolu_01Le2z9voN9bTMjwVP1UydcB", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01LqjLWkyeG71cYrQoHCAHu7", - "input": { - "query": "US average household size 2023 single parent households percentage multigenerational households Census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2804]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5240]", - "page_age": null, - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3852]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4376]", - "page_age": null, - "title": "In 2020, 7.2% of U.S. Family Households Were Multigenerational", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4328]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4264]", - "page_age": null, - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3020]", - "page_age": "December 5, 2023", - "title": "How common are multigenerational households in the US? | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/articles/how-common-are-multigenerational-households/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4772]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2204]", - "page_age": null, - "title": "America?s Families and Living Arrangements: 2020", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2020/demo/families/cps-2020.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5080]", - "page_age": null, - "title": "Distribution of U.S. households by size 1970-2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/242189/disitribution-of-households-in-the-us-by-household-size/" - } - ], - "tool_use_id": "srvtoolu_01LqjLWkyeG71cYrQoHCAHu7", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=288]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=65]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPTOUhdJdIkOQf9LARoMWbE1ck+v28gJdTm2IjCunsY13pxvCvVDGBmOW5d7rpi8RxZ+IWt5rqt6FSkfou13y31JuXAh60Cz0HQp0TAqFKYGI/yS9u/ubOdYWK+npeXDAhwVGAQ=", - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - } - ], - "text": "[REDACTED_TEXT length=68]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=140]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIoN5hKQubo9I0L58RoMUQZ3dWQDtAqhhE54IjBLGrgYp9/AU7qAG4c5nSXl+pZLk1it+R9wf9PR5MU+PsPujk73MsSI+mMK8xXQSKIqFPvjeXxzllU8KkdHcyGc5FuftFASGAQ=", - "title": "Fewer Than Half of U.S. Households Are Married-Couple Households", - "type": "web_search_result_location", - "url": "https://www.census.gov/newsroom/press-releases/2025/families-and-living-arrangements.html" - } - ], - "text": "[REDACTED_TEXT length=132]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJVcmMdZWwzFYRDnnBoMoQgtVx9swcMJdMXYIjBBQW/Elhru3w07M2+be0y227Y1l1VTWfyhDQeSls6qz06aUNg0mbdZWbwlKLq8jcgqFbZxDaK4z9I6gUC/wjnfZkedYDTQUBgE", - "title": "Age Composition of Same-sex & Different-sex Couples, 2023", - "type": "web_search_result_location", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html" - } - ], - "text": "[REDACTED_TEXT length=145]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=89]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOtqNngJZpuVDDhvGxoMfhw5oypDF+6TBnZpIjDG6OVfOYkmDXm9+PiLxo3yrHXGU3INliD7BuOxVxyhPdg8eS32uGl7A9/og8dxP7AqFdywIPW7g8G97jZYRfdzzEcnAt/VgRgE", - "title": "Married Couple Households Made Up Most of Family Households", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2023/05/family-households-still-the-majority.html" - } - ], - "text": "[REDACTED_TEXT length=105]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHti7YkQn8j1VRoYohoMCS7DmbTpADUC8n1ZIjAlOTH2ewaCvnjp2VhDJwwUCWYIC9PHsRoHwlm9YSOmUGSKbBhO2kSAxUx858EaSX4qFLFn8q4KKFjpkpkyo7yT79dn5PxXGAQ=", - "title": "In 2020, 7.2% of U.S. Family Households Were Multigenerational", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html" - } - ], - "text": "[REDACTED_TEXT length=183]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDE5+4oHbq2urvx4gORoMVYTYyKy9UkRq0tpWIjBFM/Csa0hYVX9ix6m8nAVlknOovT1LvD/gaIuZNtmaiiSAB65/TjnliupjGi2a7F8qFEdFNoNe7km2mW1fLUXuDyQ/+txdGAQ=", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=104]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=125]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFBqKYVbSCSgy08qCRoMTSHpqkW7eyHFYtazIjC+72b6bSULa2vlgWJ3S9w1HePkY6/y6fIiluKl3XLFT6XRqfcvbhxUp6q3rMkUPAUqFKpGj9PWsV4/461vExOytMhwde6oGAQ=", - "title": "Fewer Than Half of U.S. Households Are Married-Couple Households", - "type": "web_search_result_location", - "url": "https://www.census.gov/newsroom/press-releases/2025/families-and-living-arrangements.html" - } - ], - "text": "[REDACTED_TEXT length=128]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJW2miqRkexFCZJG3BoMtsSvdJAgp+xyFYH1IjAquEubh9xX55ZOes0etF3zqrC/1ZwU64FF5uNVjZ1Qdh5f6rVfV1o/BtWfZqYn8tgqFaiK0R1vh97LXRvv4GXj4B/VdzSbKhgE", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - } - ], - "text": "[REDACTED_TEXT length=136]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEqGtiYBTcBMw8KtDxoMZHojGidptWYhowGrIjBtj2de9CULfPl1PTFTPuq8YObVP0l/vx9eDYj3VMAn06rd/pMATUKYR8dcWhiNw5EqFSNtfAxU7dIHydZm8d3hHUqRvFre6RgE", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - } - ], - "text": "[REDACTED_TEXT length=115]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=82]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHyCxOUUOBohA+N4fRoMBFnx/zv2dB5ETInAIjAZ6b2hkO6OGAfEmdMBblQ1gl5/e+RGqqWmPxa7S28A9yZ1ArmuljU5fV2DiZnfg3wqFGyZy3aJok3XUzVShL99x1nkoy9dGAQ=", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result_location", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - } - ], - "text": "[REDACTED_TEXT length=142]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=138]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJUjhTKaUH2AzCoefhoMIRMRNwvpl1WwYJlxIjCEqw5qyVFrGTlhJRssF1YmYWTjiawgC7Q4QrtCQFQPCVjKdjfZaAuVJGmr5qI/MAgqFEbjTtAmd0nDNcDWsR8knW6kvIiwGAQ=", - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result_location", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - } - ], - "text": "[REDACTED_TEXT length=103]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNgy4GDuyMZdIoBiuRoMOEWib4PrtBH9epFpIjA3pW3jf1KzFm6qnnKay54jbcqBVaLc/U9uZLrSOnwTvnpQzASWan9c0XAls/pCrgUqFtCIaNU1L/O2DC5+4HIKEupnelJe38IY...[truncated]", - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result_location", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - } - ], - "text": "[REDACTED_TEXT length=239]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=117]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEFeuF6u/BtF2OEyQxoMW8gbYxK3U6LGIkJhIjDrV+FeKoe7Sdlv3bO7raSYOWZz++/u0PGs/g7pnkDtLGql6PqYM9iCm/9koCRwuTQqFUzqofkUqE+ZvLcUxbqNRYFfYczO2hgE", - "title": "In 2020, 7.2% of U.S. Family Households Were Multigenerational", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html" - } - ], - "text": "[REDACTED_TEXT length=132]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_013t3XSG7Lg8S6wPiWsNbe7y", - "input": { - "age_brackets": [ - { - "upper_bound": 30, - "label": "18-29" - }, - { - "upper_bound": 45, - "label": "30-44" - }, - { - "upper_bound": 65, - "label": "45-64" - }, - { - "upper_bound": 999, - "label": "65+" - } - ], - "household_type_weights": [ - { - "bracket": "18-29", - "types": [ - { - "type": "single", - "weight": 0.45 - }, - { - "type": "couple", - "weight": 0.25 - }, - { - "type": "single_parent", - "weight": 0.08 - }, - { - "type": "couple_with_kids", - "weight": 0.12 - }, - { - "type": "multi_generational", - "weight": 0.1 - } - ] - }, - { - "bracket": "30-44", - "types": [ - { - "type": "single", - "weight": 0.2 - }, - { - "type": "couple", - "weight": 0.22 - }, - { - "type": "single_parent", - "weight": 0.13 - }, - { - "type": "couple_with_kids", - "weight": 0.38 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "45-64", - "types": [ - { - "type": "single", - "weight": 0.25 - }, - { - "type": "couple", - "weight": 0.42 - }, - { - "type": "single_parent", - "weight": 0.09 - }, - { - "type": "couple_with_kids", - "weight": 0.17 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "65+", - "types": [ - { - "type": "single", - "weight": 0.38 - }, - { - "type": "couple", - "weight": 0.52 - }, - { - "type": "single_parent", - "weight": 0.02 - }, - { - "type": "couple_with_kids", - "weight": 0.01 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - } - ], - "same_group_rates": [ - { - "group": "white", - "rate": 0.91 - }, - { - "group": "black", - "rate": 0.82 - }, - { - "group": "hispanic", - "rate": 0.74 - }, - { - "group": "asian", - "rate": 0.72 - }, - { - "group": "native_american", - "rate": 0.58 - }, - { - "group": "multiracial", - "rate": 0.38 - } - ], - "default_same_group_rate": 0.7, - "assortative_mating": [ - { - "attribute": "education_level", - "correlation": 0.65 - }, - { - "attribute": "religious_affiliation", - "correlation": 0.6 - }, - { - "attribute": "income_bracket", - "correlation": 0.58 - }, - { - "attribute": "political_affiliation", - "correlation": 0.65 - }, - { - "attribute": "race_ethnicity", - "correlation": 0.85 - }, - { - "attribute": "age", - "correlation": 0.8 - }, - { - "attribute": "media_consumption_type", - "correlation": 0.55 - }, - { - "attribute": "personality_openness", - "correlation": 0.45 - }, - { - "attribute": "ai_attitude", - "correlation": 0.5 - } - ], - "partner_age_gap_mean": -2.3, - "partner_age_gap_std": 4.5, - "min_adult_age": 18, - "child_min_parent_offset": 18, - "child_max_parent_offset": 45, - "max_dependent_child_age": 17, - "elderly_min_offset": 20, - "elderly_max_offset": 45, - "life_stages": [ - { - "max_age": 5, - "label": "preschool" - }, - { - "max_age": 11, - "label": "elementary" - }, - { - "max_age": 14, - "label": "middle_school" - }, - { - "max_age": 18, - "label": "high_school" - } - ], - "adult_stage_label": "adult", - "avg_household_size": 2.51, - "sources": [ - "U.S. Census Bureau, America's Families and Living Arrangements: 2023 \u2014 https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "U.S. Census Bureau, Historical Households Tables (HH-1 through HH-7): 1960\u20132023 \u2014 https://www.census.gov/data/tables/time-series/demo/families/households.html", - "U.S. Census Bureau, Age and Sex Composition in the United States: 2023 \u2014 https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "U.S. Census Bureau, Families and Living Arrangements Press Release 2025 (Median Age at First Marriage) \u2014 https://www.census.gov/newsroom/press-releases/2025/families-and-living-arrangements.html", - "U.S. Census Bureau, In 2020, 7.2% of U.S. Family Households Were Multigenerational \u2014 https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html", - "U.S. Census Bureau, Married Couple Households Made Up Most of Family Households \u2014 https://www.census.gov/library/stories/2023/05/family-households-still-the-majority.html", - "Statista / U.S. Census Bureau, Average size of households in the U.S. 2023 \u2014 https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "Pew Research Center, Trends and Patterns in Intermarriage (2017) \u2014 https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "BlackDemographics.com, Black Marriage in America (citing Census 2023 ACS) \u2014 https://blackdemographics.com/households/marriage-in-black-america/", - "Wikipedia, Interracial Marriage in the United States (citing Census/Pew data) \u2014 https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "USAFacts, How Common Are Multigenerational Households in the US? (2023) \u2014 https://usafacts.org/articles/how-common-are-multigenerational-households/", - "Population Reference Bureau, U.S. Household Composition Shifts \u2014 https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "BGSU NCFMR, Age Composition of Same-sex & Different-sex Couples, 2023 \u2014 https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html", - "PMC / NIH, Religion, Marriage Markets, and Assortative Mating in the United States \u2014 https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "NBER Digest, Assortative Mating and Income Inequality (Greenwood et al.) \u2014 https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "Federal Reserve Bank of New York, Educational Assortative Mating and Household Income Inequality \u2014 https://www.newyorkfed.org/research/staff_reports/sr682.html", - "Duke University Press / Demography, Eight Decades of Educational Assortative Mating (2024) \u2014 https://read.dukeupress.edu/demography/article/61/5/1293/390842/", - "U.S. Census Bureau, America's Families and Living Arrangements: 2022 (P20-587) \u2014 https://www2.census.gov/library/publications/2024/demo/p20-587.pdf", - "U.S. Census Bureau, Age Differences Among Coresidential Partners (2021 ACS Working Paper) \u2014 https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html", - "U.S. Census Bureau, Geographic Variations in Black-White Interracial Marital Patterns (PAA 2023) \u2014 https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-vari...[truncated]" - ] - }, - "name": "household_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 158842, - "output_tokens": 3539, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A", - "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html", - "https://www.census.gov/topics/population/age-and-sex/data/tables.html", - "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "https://www.statista.com/statistics/233184/median-household-income-in-the-united-states-by-age/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "https://www.census.gov/newsroom/press-releases/2025/families-and-living-arrangements.html", - "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/", - "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514", - "https://www.datingadvice.com/studies/interracial-dating-statistics", - "https://data.census.gov/table/ACSDT1Y2023.B12007H?q=marriage+rates", - "https://www.pewresearch.org/topic/family-relationships/marriage-divorce/intermarriage/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/", - "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/", - "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "https://www.cdc.gov/nchs/data/series/sr_21/sr21_021.pdf", - "https://www.statista.com/statistics/242189/disitribution-of-households-in-the-us-by-household-size/", - "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/", - "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/", - "https://www2.census.gov/library/working-papers/2024/adrm/ces/CES-WP-24-30.pdf", - "https://usafacts.org/articles/how-common-are-multigenerational-households/", - "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf", - "https://www.census.gov/topics/families/families-and-households.html", - "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html", - "https://www.newyorkfed.org/research/staff_reports/sr682.html", - "https://www.census.gov/topics/families.html", - "https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html", - "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "https://www.census.gov/data/tables/2020/demo/families/cps-2020.html", - "https://www.census.gov/library/stories/2023/05/family-households-still-the-majority.html", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf", - "https://en.wikipedia.org/wiki/Demographics_of_the_United_States", - "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf", - "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html", - "https://www.journals.uchicago.edu/doi/10.1086/702018", - "https://www.ebsco.com/research-starters/ethnic-and-cultural-studies/interracial-and-interethnic-marriage", - "https://blackdemographics.com/households/marriage-in-black-america/", - "https://www.census.gov/library/stories/2022/08/does-marrying-younger-mean-marrying-more-often.html", - "https://www.census.gov/content/dam/Census/library/visualizations/time-series/demo/families-and-households/ms-2.pdf" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_211525_574418_claude_reasoning_call.json b/examples/logs/20260217_211525_574418_claude_reasoning_call.json deleted file mode 100644 index c40f032..0000000 --- a/examples/logs/20260217_211525_574418_claude_reasoning_call.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "timestamp": "2026-02-17T21:15:25.574462", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 4553 - }, - "response": { - "id": "msg_01BbCGTBza7sckGUnkWmaU9t", - "content": [ - { - "id": "toolu_01E8qMgDfqurvQHZmw8DpqiF", - "input": { - "event_type": "announcement", - "content": "[REDACTED_TEXT length=871]", - "source": "OpenAI", - "credibility": 0.72, - "ambiguity": 0.75, - "emotional_valence": 0.1, - "reasoning": "[REDACTED_TEXT length=1685]" - }, - "name": "event_parsing", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2089, - "output_tokens": 669, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_211557_999422_claude_reasoning_call.json b/examples/logs/20260217_211557_999422_claude_reasoning_call.json deleted file mode 100644 index d059f66..0000000 --- a/examples/logs/20260217_211557_999422_claude_reasoning_call.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "timestamp": "2026-02-17T21:15:57.999458", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8489 - }, - "response": { - "id": "msg_01NStdGt2qytf8u6XjwH646o", - "content": [ - { - "id": "toolu_01DmspA3Vwu64zyWCsQdLR3D", - "input": { - "channels": [ - { - "name": "major_broadcast_news", - "description": "Major TV and online news outlets (CNN, Fox, NBC, NYT, etc.) breaking the story as top news \u2014 reaches broad audiences consuming national news via television or digital media", - "reach": "broadcast", - "credibility_modifier": 1.1 - }, - { - "name": "tech_professional_network", - "description": "Targeted exposure through professional and industry channels (LinkedIn, Hacker News, tech newsletters, professional email lists) aimed at tech-savvy, highly-educated, and STEM-adjacent professionals w...[truncated]", - "reach": "targeted", - "credibility_modifier": 1.2 - }, - { - "name": "social_media_viral_spread", - "description": "Organic viral sharing across Twitter/X, TikTok, Facebook, and YouTube \u2014 memes, reaction videos, and commentary threads drive rapid but credibility-diluting spread among heavy social media users", - "reach": "organic", - "credibility_modifier": 0.8 - }, - { - "name": "word_of_mouth", - "description": "Interpersonal spread through friend, family, and colleague network edges \u2014 people telling those in their social circle about the announcement, with credibility shaped by the messenger", - "reach": "organic", - "credibility_modifier": 0.95 - }, - { - "name": "fringe_alternative_media", - "description": "Exposure through alternative news sites, podcasts, and online forums (Reddit conspiracy boards, alternative tech blogs) targeting low-trust, high-susceptibility individuals who distrust mainstream nar...[truncated]", - "reach": "targeted", - "credibility_modifier": 0.7 - } - ], - "rules": [ - { - "channel": "major_broadcast_news", - "when": "primary_news_source == 'TV' or primary_news_source == 'Online/Digital'", - "probability": 0.92, - "timestep": 0 - }, - { - "channel": "tech_professional_network", - "when": "occupation == 'Professional' and (education_level == 'Bachelor\\'s' or education_level == 'Graduate Degree') and social_media_platforms == 'Twitter/X'", - "probability": 0.88, - "timestep": 0 - }, - { - "channel": "major_broadcast_news", - "when": "primary_news_source == 'Radio' or primary_news_source == 'Print Newspaper'", - "probability": 0.75, - "timestep": 1 - }, - { - "channel": "social_media_viral_spread", - "when": "social_media_hours_per_day >= 2.0 and (social_media_platforms == 'Twitter/X' or social_media_platforms == 'TikTok')", - "probability": 0.85, - "timestep": 1 - }, - { - "channel": "social_media_viral_spread", - "when": "social_media_hours_per_day >= 1.0 and (social_media_platforms == 'Facebook' or social_media_platforms == 'Instagram' or social_media_platforms == 'YouTube')", - "probability": 0.7, - "timestep": 1 - }, - { - "channel": "fringe_alternative_media", - "when": "trust_in_institutions < 0.35 and susceptibility_to_misinformation > 0.6 and internet_access != 'None'", - "probability": 0.72, - "timestep": 1 - }, - { - "channel": "word_of_mouth", - "when": "extraversion > 0.6 and openness > 0.55", - "probability": 0.65, - "timestep": 2 - }, - { - "channel": "major_broadcast_news", - "when": "primary_news_source == 'Social Media' or primary_news_source == 'None'", - "probability": 0.55, - "timestep": 2 - }, - { - "channel": "word_of_mouth", - "when": "true", - "probability": 0.4, - "timestep": 3 - }, - { - "channel": "fringe_alternative_media", - "when": "trust_in_institutions < 0.5 and neuroticism > 0.6 and internet_access != 'None'", - "probability": 0.5, - "timestep": 3 - } - ], - "reasoning": "[REDACTED_TEXT length=2826]" - }, - "name": "seed_exposure", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3114, - "output_tokens": 1849, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_211633_848361_claude_reasoning_call.json b/examples/logs/20260217_211633_848361_claude_reasoning_call.json deleted file mode 100644 index fd93734..0000000 --- a/examples/logs/20260217_211633_848361_claude_reasoning_call.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "timestamp": "2026-02-17T21:16:33.848403", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 4996 - }, - "response": { - "id": "msg_01Ae7NEx3QVw6ZM49G8LGLj9", - "content": [ - { - "id": "toolu_01A1uEJ4kpVKASFX5MjH538w", - "input": { - "primary_model": "broadcast_response", - "secondary_model": "direct_conversation", - "interaction_description": "OpenAI's ASI announcement originates as a high-credibility official broadcast that agents first encounter through news feeds, social media timelines, and institutional channels (passive reception of t...[truncated]", - "share_probability": 0.52, - "share_modifiers": [ - { - "when": "social_media_hours_per_day > 3", - "multiply": 1.5, - "add": 0 - }, - { - "when": "social_media_hours_per_day <= 1", - "multiply": 0.6, - "add": 0 - }, - { - "when": "age < 35", - "multiply": 1.35, - "add": 0 - }, - { - "when": "age > 65", - "multiply": 0.7, - "add": 0 - }, - { - "when": "education_level == 'graduate'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "education_level == 'less_than_high_school'", - "multiply": 0.75, - "add": 0 - }, - { - "when": "openness > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "openness < 0.3", - "multiply": 0.8, - "add": 0 - }, - { - "when": "neuroticism > 0.7", - "multiply": 1.25, - "add": 0 - }, - { - "when": "extraversion > 0.7", - "multiply": 1.2, - "add": 0 - }, - { - "when": "need_for_cognition > 0.7", - "multiply": 1.25, - "add": 0 - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 1.4, - "add": 0 - }, - { - "when": "trust_in_institutions > 0.7", - "multiply": 1.1, - "add": 0 - }, - { - "when": "susceptibility_to_misinformation > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "occupation == 'technology'", - "multiply": 1.5, - "add": 0 - }, - { - "when": "occupation == 'education'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "primary_news_source == 'social_media'", - "multiply": 1.4, - "add": 0 - }, - { - "when": "primary_news_source == 'print'", - "multiply": 0.85, - "add": 0 - }, - { - "when": "news_outlet_lean == 'far_right'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "news_outlet_lean == 'far_left'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "civic_engagement == 'high'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "internet_access == 'none'", - "multiply": 0.1, - "add": 0 - }, - { - "when": "political_ideology == 'libertarian'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "edge_type == 'friend'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "edge_type == 'family'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "edge_type == 'colleague'", - "multiply": 1.4, - "add": 0 - } - ], - "decay_per_hop": 0.15, - "max_hops": 6, - "reasoning": "[REDACTED_TEXT length=3186]" - }, - "name": "interaction_model", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2404, - "output_tokens": 1915, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_211643_928581_claude_simple_call.json b/examples/logs/20260217_211643_928581_claude_simple_call.json deleted file mode 100644 index f2fe96e..0000000 --- a/examples/logs/20260217_211643_928581_claude_simple_call.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "timestamp": "2026-02-17T21:16:43.928629", - "function": "simple_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 3111 - }, - "response": { - "id": "msg_01XKyGMLssW6XaJoq8uEeYKj", - "content": [ - { - "id": "toolu_01CrnHjm4Gf2368eu71U7q2D", - "input": { - "decision": { - "name": "public_response_action", - "description": "The primary behavioral action US adults take in response to OpenAI's ASI announcement \u2014 capturing how they engage with, react to, and act upon the news across civic, social, and informational dimensio...[truncated]", - "options": [ - "actively_advocate_for_government_oversight", - "share_and_amplify_news_in_social_circles", - "seek_independent_verification_and_research", - "disengage_and_avoid_the_news", - "publicly_dismiss_or_debunk_the_claim" - ], - "option_friction": { - "actively_advocate_for_government_oversight": 0.82, - "share_and_amplify_news_in_social_circles": 0.25, - "seek_independent_verification_and_research": 0.55, - "disengage_and_avoid_the_news": 0.18, - "publicly_dismiss_or_debunk_the_claim": 0.68 - } - }, - "reasoning": "[REDACTED_TEXT length=933]" - }, - "name": "outcome_definition", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1657, - "output_tokens": 489, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_211715_734318_claude_reasoning_call.json b/examples/logs/20260217_211715_734318_claude_reasoning_call.json deleted file mode 100644 index 59d4bf3..0000000 --- a/examples/logs/20260217_211715_734318_claude_reasoning_call.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "timestamp": "2026-02-17T21:17:15.734356", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 2669 - }, - "response": { - "id": "msg_01DDL6L7N1gd1kPdUWRLsXTF", - "content": [ - { - "id": "toolu_01SmvczsPvDUqT6AghwpV81Z", - "input": { - "scenario_type": "evolving", - "timestep_unit": "day", - "max_timesteps": 14, - "background_context": "[REDACTED_TEXT length=387]", - "timeline_events": [ - { - "timestep": 1, - "description": "Global governments and institutions issue emergency statements; social media erupts", - "content": "[REDACTED_TEXT length=631]", - "source": "International governments, United Nations, social media", - "credibility": 0.85, - "emotional_valence": -0.3, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 3, - "description": "Leading AI scientists publish open letter questioning the ASI claim; stock markets react", - "content": "[REDACTED_TEXT length=660]", - "source": "Academic coalition open letter, financial news outlets", - "credibility": 0.9, - "emotional_valence": -0.2, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - }, - { - "timestep": 5, - "description": "OpenAI releases limited demonstration footage; deepfake accusations spread", - "content": "[REDACTED_TEXT length=690]", - "source": "OpenAI official channels, independent analysts, social media fact-checkers", - "credibility": 0.6, - "emotional_valence": 0.0, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - }, - { - "timestep": 7, - "description": "Whistleblower from inside OpenAI leaks internal documents raising safety concerns", - "content": "[REDACTED_TEXT length=699]", - "source": "Anonymous whistleblower via The New York Times and The Guardian", - "credibility": 0.55, - "emotional_valence": -0.75, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 10, - "description": "Independent verification panel releases preliminary findings; global protests erupt", - "content": "[REDACTED_TEXT length=800]", - "source": "UN Independent ASI Verification Panel, international news outlets", - "credibility": 0.88, - "emotional_valence": -0.4, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 13, - "description": "OpenAI CEO addresses the world in a live broadcast; announces governance framework", - "content": "[REDACTED_TEXT length=786]", - "source": "OpenAI CEO global televised address", - "credibility": 0.8, - "emotional_valence": 0.2, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - } - ] - }, - "name": "timeline_generation", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1783, - "output_tokens": 1600, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_211728_707162_claude_simple_call.json b/examples/logs/20260217_211728_707162_claude_simple_call.json deleted file mode 100644 index 7d73bf4..0000000 --- a/examples/logs/20260217_211728_707162_claude_simple_call.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "timestamp": "2026-02-17T21:17:28.707229", - "function": "simple_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 2704 - }, - "response": { - "id": "msg_01UW9HYSCVJkgFTcDMxghtHV", - "content": [ - { - "id": "toolu_012XeKVS5mSZaEQURzh9dbnU", - "input": { - "identity_dimensions": [ - { - "dimension": "professional_identity", - "relevance": "Workers across virtually all cognitive and knowledge-based fields \u2014 from scientists and engineers to writers, lawyers, doctors, and teachers \u2014 face an existential threat to the value and uniqueness of...[truncated]" - }, - { - "dimension": "religious_affiliation", - "relevance": "The creation of a superintelligent entity directly challenges theological frameworks around human uniqueness, the soul, divine creation, and humanity's special role in the universe, activating deep mo...[truncated]" - }, - { - "dimension": "political_orientation", - "relevance": "Reactions are likely to fracture sharply along ideological lines \u2014 conservatives may emphasize distrust of a powerful tech corporation acting unilaterally, while progressives may focus on equity, corp...[truncated]" - }, - { - "dimension": "generational_identity", - "relevance": "Younger generations (Gen Z, Millennials) who have grown up with AI and face its direct impact on their career futures will process this very differently from older generations (Boomers, Gen X) who may...[truncated]" - }, - { - "dimension": "socioeconomic_class", - "relevance": "Working-class and middle-class individuals face the most acute fear of economic displacement, while wealthy and professional-class individuals may see opportunity; this divide in material stakes will ...[truncated]" - }, - { - "dimension": "citizenship", - "relevance": "National identity is strongly activated as citizens grapple with the fact that a single American private company now controls what may be the most powerful entity ever created, raising urgent question...[truncated]" - }, - { - "dimension": "parental_status", - "relevance": "Parents and caregivers face a uniquely activated identity dimension as they confront an uncertain and potentially unrecognizable future for their children \u2014 questioning what education, careers, and hu...[truncated]" - } - ] - }, - "name": "identity_dimensions", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1365, - "output_tokens": 577, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_211829_508505_claude_reasoning_call.json b/examples/logs/20260217_211829_508505_claude_reasoning_call.json deleted file mode 100644 index 98f701c..0000000 --- a/examples/logs/20260217_211829_508505_claude_reasoning_call.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "timestamp": "2026-02-17T21:18:29.508576", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 10821 - }, - "response": { - "id": "msg_011ZWMCaQrqDEJyMGkka2412", - "content": [ - { - "id": "toolu_01GtztwRL9D7PSmpMksU2rXW", - "input": { - "attributes": [ - { - "name": "ai_familiarity", - "type": "categorical", - "category": "population_specific", - "description": "Self-reported familiarity with artificial intelligence concepts and tools (None, Basic, Intermediate, Advanced, Expert).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation" - ], - "identity_type": null - }, - { - "name": "ai_usage_frequency", - "type": "categorical", - "category": "population_specific", - "description": "How often the person uses AI-powered tools in daily life (Never, Rarely, Monthly, Weekly, Daily).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_familiarity", - "education_level" - ] - }, - { - "name": "tech_sector_employment", - "type": "boolean", - "category": "population_specific", - "description": "Whether the person works in the technology industry or a closely adjacent STEM field.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "education_level" - ] - }, - { - "name": "sci_fi_consumption", - "type": "categorical", - "category": "population_specific", - "description": "Frequency of consuming science fiction media (books, films, TV) that shapes mental models of AI (Never, Rarely, Sometimes, Often, Very Often).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness" - ] - }, - { - "name": "asi_initial_reaction", - "type": "categorical", - "category": "context_specific", - "description": "Person's dominant initial emotional reaction upon hearing the ASI announcement (Excited, Fearful, Skeptical, Indifferent, Mixed).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_familiarity", - "trust_in_institutions", - "neuroticism" - ] - }, - { - "name": "ai_safety_concern_level", - "type": "float", - "category": "context_specific", - "description": "Degree of concern about existential or societal risks from advanced AI systems (0\u20131 scale, 0 = no concern, 1 = extreme concern).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_familiarity", - "neuroticism", - "trust_in_institutions" - ] - }, - { - "name": "openai_brand_familiarity", - "type": "categorical", - "category": "context_specific", - "description": "Level of prior awareness and familiarity with OpenAI as a company (Never heard of it, Vaguely aware, Somewhat familiar, Very familiar).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_familiarity", - "social_media_hours_per_day" - ] - }, - { - "name": "social_influence_susceptibility", - "type": "float", - "category": "personality", - "description": "Tendency to update one's opinions in response to social pressure or peer discussion (0\u20131 scale, 0 = highly resistant, 1 = highly susceptible).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "agreeableness", - "need_for_cognition" - ] - }, - { - "name": "techno_optimism", - "type": "float", - "category": "personality", - "description": "General disposition toward believing technology produces positive outcomes for society (0\u20131 scale, 0 = techno-pessimist, 1 = techno-optimist).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "trust_in_institutions" - ] - }, - { - "name": "online_discussion_propensity", - "type": "float", - "category": "population_specific", - "description": "Likelihood of actively posting, commenting, or debating the ASI news in online communities (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "extraversion", - "social_media_hours_per_day", - "ai_familiarity" - ] - }, - { - "name": "job_automation_anxiety", - "type": "float", - "category": "population_specific", - "description": "Level of personal concern that AI advancement will eliminate or substantially degrade the person's own employment prospects (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "employment_status", - "ai_familiarity" - ] - } - ], - "include_big_five": false, - "notes": "Big Five traits already exist in the base population (openness, conscientiousness, extraversion, agreeableness, neuroticism) \u2014 not rediscovered here. Existing base attributes trust_in_institutions, ne...[truncated]" - }, - "name": "attribute_selection", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 4189, - "output_tokens": 1486, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_212002_640240_claude_agentic_research.json b/examples/logs/20260217_212002_640240_claude_agentic_research.json deleted file mode 100644 index 035112d..0000000 --- a/examples/logs/20260217_212002_640240_claude_agentic_research.json +++ /dev/null @@ -1,1169 +0,0 @@ -{ - "timestamp": "2026-02-17T21:20:02.640280", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 10808 - }, - "response": { - "id": "msg_01BWKZxzsePADUtrWXKfFbTT", - "content": [ - { - "id": "srvtoolu_01VHmJSYtFkqCHgAatyu2maa", - "input": { - "query": "US adult AI familiarity literacy statistics 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_018Az1xutbt4YvGkWWJG6fxq", - "input": { - "query": "AI tools usage frequency US adults daily weekly 2024 survey" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01B1tTsM5YSoNx28Bj7Yh49V", - "input": { - "query": "tech sector employment percentage US workforce STEM 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2792]", - "page_age": "November 17, 2025", - "title": "US Map Reveals Adult Literacy Rates by State - Beyond Basics", - "type": "web_search_result", - "url": "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2836]", - "page_age": null, - "title": "The Decline of Literacy and the Rise of AI: Are We Losing the Ability to Think? \u2013 The Express", - "type": "web_search_result", - "url": "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3944]", - "page_age": null, - "title": "U.S. AI knowledge by age 2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5520]", - "page_age": "March 31, 2025", - "title": "AI Literacy Review \u2013 March 11, 2025 - AI Literacy Institute", - "type": "web_search_result", - "url": "https://ailiteracy.institute/ai-literacy-review-march-11-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4036]", - "page_age": "September 4, 2025", - "title": "US Literacy Rate 2025 \u2013 Updated Statistics & Data", - "type": "web_search_result", - "url": "https://www.prosperityforamerica.org/literacy-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5272]", - "page_age": "May 15, 2024", - "title": "Introducing The State of Data & AI Literacy Report 2024 | DataCamp", - "type": "web_search_result", - "url": "https://www.datacamp.com/blog/introducing-the-state-of-data-and-ai-literacy-report-2024" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4188]", - "page_age": "April 14, 2023", - "title": "2024-2025 Literacy Statistics | National Literacy Institute", - "type": "web_search_result", - "url": "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6660]", - "page_age": "3 weeks ago", - "title": "Literacy in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Literacy_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6164]", - "page_age": null, - "title": "A systematic review of AI literacy scales - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11303566/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5452]", - "page_age": "May 14, 2024", - "title": "Combining human and artificial intelligence for enhanced AI literacy in higher education - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/pii/S2666557324000247" - } - ], - "tool_use_id": "srvtoolu_01VHmJSYtFkqCHgAatyu2maa", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5648]", - "page_age": "November 25, 2025", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4536]", - "page_age": "January 11, 2024", - "title": "AI Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4492]", - "page_age": "December 3, 2025", - "title": "AI Usage Statistics: How AI Is Transforming Everyday Life [ 2025 ]", - "type": "web_search_result", - "url": "https://elfsight.com/blog/ai-usage-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4252]", - "page_age": "3 weeks ago", - "title": "A quarter of employed adults use AI at least a few times a week, with 6 in 10 tech workers using it frequently, Gallup says | Fortune", - "type": "web_search_result", - "url": "https://fortune.com/2026/01/25/ai-use-frequency-employed-adults-tech-workers-retail-manufacturing-gallup-poll/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3144]", - "page_age": "July 30, 2025", - "title": "Americans Use AI in Everyday Products Without Realizing It", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/654905/americans-everyday-products-without-realizing.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2944]", - "page_age": "August 26, 2025", - "title": "New Research: 20% of Americans use AI tools 10X+/month, but growth is slowing and traditional search hasn't dipped - SparkToro", - "type": "web_search_result", - "url": "https://sparktoro.com/blog/new-research-20-of-americans-use-ai-tools-10x-month-but-growth-is-slowing-and-traditional-search-hasnt-dipped/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3904]", - "page_age": null, - "title": "Survey: 52% of U.S. adults now use AI large language models like ChatGPT | Today at Elon | Elon University", - "type": "web_search_result", - "url": "https://www.elon.edu/u/news/2025/03/12/survey-52-of-u-s-adults-now-use-ai-large-language-models-like-chatgpt/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5412]", - "page_age": "April 14, 2025", - "title": "How many people are using generative AI on a daily basis? A Gemini report \u2013 TechnoLlama", - "type": "web_search_result", - "url": "https://www.technollama.co.uk/a-gemini-report-how-many-people-are-using-generative-ai-on-a-daily-basis-a-gemini-report" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2424]", - "page_age": "September 17, 2025", - "title": "Americans\u2019 awareness of AI and views of use in daily life, control over it | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6312]", - "page_age": "March 20, 2025", - "title": "How Many People Use AI in 2025?", - "type": "web_search_result", - "url": "https://gptzero.me/news/how-many-people-use-ai/" - } - ], - "tool_use_id": "srvtoolu_018Az1xutbt4YvGkWWJG6fxq", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2040]", - "page_age": null, - "title": "State of the Tech Workforce 2024 | CompTIA Report", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5660]", - "page_age": "May 30, 2024", - "title": "US STEM Workforce: Size, Growth, and Employment", - "type": "web_search_result", - "url": "https://ncses.nsf.gov/pubs/nsb20245/u-s-stem-workforce-size-growth-and-employment" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5548]", - "page_age": null, - "title": "NSB-2024-5, The STEM Labor Force", - "type": "web_search_result", - "url": "https://ncses.nsf.gov/pubs/nsb20245/assets/nsb20245.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=256]", - "page_age": null, - "title": "Employment in STEM occupations : U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/emp/tables/stem-employment.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=692]", - "page_age": null, - "title": "Science and Engineering Indicators: The STEM Labor Force: Scientists, Engineers, and Skilled Technical Workers", - "type": "web_search_result", - "url": "https://content.govdelivery.com/accounts/USNSF/bulletins/39f6cd9" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5684]", - "page_age": null, - "title": "Science, technology, engineering, and mathematics (STEM) occupations: past, present, and future : Spotlight on Statistics: U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/spotlight/2017/science-technology-engineering-and-mathematics-stem-occupations-past-present-and-future/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4252]", - "page_age": "August 31, 2021", - "title": "The STEM Labor Force of Today: Scientists, Engineers, and Skilled Technical Workers | NSF - National Science Foundation", - "type": "web_search_result", - "url": "https://ncses.nsf.gov/pubs/nsb20212" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1708]", - "page_age": null, - "title": "Numbers, research, and discovery: STEM employment projected to take off! : The Economics Daily: U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/opub/ted/2025/numbers-research-and-discovery-stem-employment-projected-to-take-off.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2640]", - "page_age": null, - "title": "NSF publishes new report on the STEM labor force | SSTI", - "type": "web_search_result", - "url": "https://ssti.org/blog/nsf-publishes-new-report-stem-labor-force" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3056]", - "page_age": "May 30, 2024", - "title": "The STEM Labor Force: Scientists, Engineers, and Skilled Technical Workers | NSF - National Science Foundation", - "type": "web_search_result", - "url": "https://ncses.nsf.gov/pubs/nsb20245" - } - ], - "tool_use_id": "srvtoolu_01B1tTsM5YSoNx28Bj7Yh49V", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01QMpTpS8iBew1iaq6NDemcD", - "input": { - "query": "US public reaction fear excitement ASI superintelligence survey attitudes 2024 2025" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01Le72oLFRwf9VEte1YhwAeh", - "input": { - "query": "OpenAI brand awareness familiarity US adults survey 2024 sci-fi consumption statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5424]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3000]", - "page_age": "September 17, 2025", - "title": "How Americans View AI and Its Impact on Human Abilities, Society | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/science/2025/09/17/how-americans-view-ai-and-its-impact-on-people-and-society/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6140]", - "page_age": null, - "title": "pi_2025.04.03_us-public-and-ai-experts_report.pdf", - "type": "web_search_result", - "url": "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/04/pi_2025.04.03_us-public-and-ai-experts_report.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=476]", - "page_age": "January 2, 2026", - "title": "Americans uneasy about AI, experts more optimistic, Pew study finds", - "type": "web_search_result", - "url": "https://abc6onyourside.com/news/nation-world/americans-uneasy-about-ai-experts-more-optimistic-pew-study-finds-research-study-artificial-intelligence-humanoids-technology" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4896]", - "page_age": "October 19, 2025", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5280]", - "page_age": "November 11, 2025", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4152]", - "page_age": null, - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5056]", - "page_age": "December 31, 2025", - "title": "With AI\u2019s rise, hope and anxiety - Rochester BeaconRochester Beacon", - "type": "web_search_result", - "url": "https://rochesterbeacon.com/2025/12/24/with-ais-rise-hope-and-anxiety/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1820]", - "page_age": null, - "title": "Public Opinion | The 2025 AI Index Report - Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3028]", - "page_age": "April 24, 2025", - "title": "US public concern grows over role of AI in daily life | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2023/08/28/growing-public-concern-about-the-role-of-artificial-intelligence-in-daily-life/" - } - ], - "tool_use_id": "srvtoolu_01QMpTpS8iBew1iaq6NDemcD", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5708]", - "page_age": "November 25, 2025", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3144]", - "page_age": "April 2, 2024", - "title": "How consumers interact with AI vs human content", - "type": "web_search_result", - "url": "https://www.bynder.com/en/press-media/ai-vs-human-made-content-study/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4380]", - "page_age": "July 15, 2025", - "title": "2025 Consumer Adoption of AI Report | Attest", - "type": "web_search_result", - "url": "https://www.askattest.com/blog/articles/2025-consumer-adoption-of-ai-report" - }, - { - "encrypted_content": "[REDACTED_TEXT length=484]", - "page_age": "September 17, 2025", - "title": "Americans\u2019 awareness of AI and views of use in daily life, control over it | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5500]", - "page_age": null, - "title": "U.S. AI tools awareness by brand 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/forecasts/1479657/ai-tools-awareness-by-brand-united-states" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1620]", - "page_age": null, - "title": "U.S. consumer support of brands using AI 2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1387440/attitudes-brand-usage-generative-ai-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5296]", - "page_age": null, - "title": "ChatGPT Stats in 2026: 800M Users, Traffic Data & Usage Breakdown", - "type": "web_search_result", - "url": "https://www.index.dev/blog/chatgpt-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4260]", - "page_age": "1 month ago", - "title": "131 AI Statistics and Trends for 2026 | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-statistics-trends/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5052]", - "page_age": null, - "title": "U.S. adults ChatGPT usage by activity 2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1461638/us-adults-chatgpt-usage-by-activity/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2992]", - "page_age": null, - "title": "Familiarity with top streaming services in the U.S. 2024| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1301234/consumer-awareness-and-familiarity-with-streaming-services-us/?__sso_cookie_checker=failed" - } - ], - "tool_use_id": "srvtoolu_01Le72oLFRwf9VEte1YhwAeh", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=145]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=136]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMnBn2ER/w74RBY2choMX0dmO56tqMgjqLcmIjBTwNZbQJdGqfLXoSa1o1hFrrIhW77TkLDvT1+E/jE+PCvhrNCzLgGKylvrAAQVK/kqE0mxPt41GKcUNZBwQ9xrldl0iqwYBA==", - "title": "U.S. AI knowledge by age 2024 | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - } - ], - "text": "[REDACTED_TEXT length=85]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=115]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOsgF2eMQ0JyArenNRoM8nj+9noYrpRim4oAIjCCRKUaJ+tiLsLlDemWMfjRSAFM2jz8OusV/7JVU9/Eg5lQ0u9jXUesZf3xqQCz8+8qFI2vrmUTF26Y5+D1cH1TIGq5Fu+mGAQ=", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result_location", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - } - ], - "text": "[REDACTED_TEXT length=114]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJ2Y5dBeZtGNc+OuPBoM54ipMqjWJ3bJ30/OIjBhM7OGpLIyvUDWtIeSNqkzKN5/WaXpAlBMlN+JB9AVdibyJU6NGKIYKxFDAiav15cqFqJlCtDXOjGTVINcE/IZtk6G/CZyNecY...[truncated]", - "title": "AI Usage Statistics: How AI Is Transforming Everyday Life [ 2025 ]", - "type": "web_search_result_location", - "url": "https://elfsight.com/blog/ai-usage-statistics/" - } - ], - "text": "[REDACTED_TEXT length=151]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNSsoPR/FInrG6K/8xoMVqT19l2holw2RppuIjD9aOl1PjU5ip7NzLtk2GUxRX4kcviGGdEfgEsHmTXrGQBUGe/HZmESxeAC/uc6RLMqFi8tIJuB/0gBlYFFnUs1OzWp7h58eFQY...[truncated]", - "title": "The STEM Labor Force: Scientists, Engineers, and Skilled Technical Workers | NSF - National Science Foundation", - "type": "web_search_result_location", - "url": "https://ncses.nsf.gov/pubs/nsb20245" - } - ], - "text": "[REDACTED_TEXT length=80]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDBvJyyQvpE9ItYcsxoMQdoTA56rwoSuALjgIjC4UofwqOMup6C7UdyI6x/M8jlOayJY1waRwOaOkdQIJHBez4Z2G0RK/sMlC8+LpVoqFgCHfSjcvWStaeS4Sh98dzthGlhVGr8Y...[truncated]", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - } - ], - "text": "[REDACTED_TEXT length=123]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDELtZf08PfHl+4rwiBoML7eHeNkDQ4W4UpwTIjA22OXLJAaAlzD0qkcMJOmjXVtuEDW9zPGoVtTNIEBBnOsvabSGmuqSEogmTpyqje8qFOxa5mkKFNFxVGgPteAvp6kc0pwPGAQ=", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result_location", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - } - ], - "text": "[REDACTED_TEXT length=133]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=147]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMk1RxatiOGrThziKBoMMZx5C98iY5gL8Jk3IjAICaB2sQkZTvyjDgnU8e2+KXdG8a6jBPIFzUYohqqTuQTl2ixUAV4dNk8PrBFvRP4qFa9xLAPlTPQLgXfnrOK7FPzN41pbFxgE", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=111]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDItZCTPlwVgTBcJ/PBoMP1JYAP3HMb5aX+EAIjApK8Gp7PECOpOPR7irz3E7GE7j5SJbzA8GfdS21z8JBaksueJ695juXxdTiioZ+/oqFPd5H4n+nlKy7jdxFBRe692yY6n9GAQ=", - "title": "Sentience Institute | AI Policy Insights from the AIMS Survey", - "type": "web_search_result_location", - "url": "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey" - } - ], - "text": "[REDACTED_TEXT length=91]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=150]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJFxRObLY69Xm2OsYxoMIhRTy7KmmidyF4/0IjBFHpG5XWuSy2Ju8mW35hz0Ae2JtJeqTaAzYAUx0OONE1OImfWnDrhEIDmJWHoZ+vkqFKfRWlvpZdrVliO15YbjDgsBa5/CGAQ=", - "title": "Survey: 52% of U.S. adults now use AI large language models like ChatGPT | Today at Elon | Elon University", - "type": "web_search_result_location", - "url": "https://www.elon.edu/u/news/2025/03/12/survey-52-of-u-s-adults-now-use-ai-large-language-models-like-chatgpt/" - } - ], - "text": "[REDACTED_TEXT length=79]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01M2yvsLXWLeCCbdAtmCfxzS", - "input": { - "attributes": [ - { - "name": "ai_familiarity", - "distribution": { - "type": "categorical", - "options": [ - "None", - "Basic", - "Intermediate", - "Advanced", - "Expert" - ], - "weights": [ - 0.18, - 0.34, - 0.28, - 0.14, - 0.06 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Statista March 2024 (40%+ know little about AI); Brookings/YouGov 2025 (56% have used AI tools); Pew 2024 awareness data", - "note": "A March 2024 Statista survey found 40%+ of US adults knew little about AI. By 2025 roughly 56% have used AI tools. 'None' and 'Basic' together account for ~52% reflecting the large share with low fami...[truncated]" - } - }, - { - "name": "ai_usage_frequency", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Rarely", - "Monthly", - "Weekly", - "Daily" - ], - "weights": [ - 0.25, - 0.17, - 0.15, - 0.2, - 0.23 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Brookings/YouGov 2025 (28% weekly+); Elon University 2025 (34% daily LLM use); Pew Sept 2025 (62% interact with AI at least several times/week); BLS/Gallup Jan 2026 (25% use AI frequently at work)", - "note": "Daily (~23%) consistent with Elon U 2025 finding of 34% daily LLM use among the 52% who use LLMs at all (~18% of all adults daily). Weekly (~20%) from YouGov 28% weekly+. Never (~25%) represents those...[truncated]" - } - }, - { - "name": "tech_sector_employment", - "distribution": { - "type": "boolean", - "probability_true": 0.07, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Boolean floor" - }, - { - "type": "hard_max", - "value": 1, - "expression": null, - "reason": "Boolean ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "NSF Science & Engineering Indicators 2024 (STEM = 24% of workforce); BLS STEM employment data; CompTIA State of the Tech Workforce 2024", - "note": "Core tech/IT sector is ~6\u20139% of employed adults. STEM broadly is 24% but most STEM (healthcare, construction trades) is excluded here. We use ~7% for technology industry + closely adjacent STEM (softw...[truncated]" - } - }, - { - "name": "sci_fi_consumption", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Rarely", - "Sometimes", - "Often", - "Very Often" - ], - "weights": [ - 0.2, - 0.25, - 0.3, - 0.16, - 0.09 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "low", - "method": "estimated", - "source": "General media consumption surveys; Nielsen genre data; no direct nationally representative sci-fi frequency survey found", - "note": "No specific nationally representative sci-fi consumption survey found. Estimated from general entertainment consumption patterns: sci-fi is a major genre (Marvel, Star Wars, streaming) but a minority ...[truncated]" - } - }, - { - "name": "asi_initial_reaction", - "distribution": { - "type": "categorical", - "options": [ - "Excited", - "Fearful", - "Skeptical", - "Indifferent", - "Mixed" - ], - "weights": [ - 0.1, - 0.28, - 0.3, - 0.14, - 0.18 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research April 2025 (11% more excited, 51% more concerned); Future of Life Institute Oct 2025 (64% want ASI halted until safe, 37% fear human extinction); Sentience Institute AIMS survey (48% conc...[truncated]", - "note": "Pew 2025 found only 11% excited vs concerned, 51% more concerned. For an ASI-specific announcement (much more extreme than general AI), fear and skepticism would be amplified. Skeptical (~30%) is the ...[truncated]" - } - }, - { - "name": "ai_safety_concern_level", - "distribution": { - "type": "beta", - "alpha": 3.2, - "beta": 2.1, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Concern level is bounded at 0" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Concern level is bounded at 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research April 2025 (51% more concerned than excited); Future of Life Institute Oct 2025 (two-thirds worry AI causes significant harm; 64% want ASI halted); Pew Sept 2025 (57% rate societal AI ris...[truncated]", - "note": "Beta(3.2, 2.1) yields a mean of ~0.60 with moderate right-skew, consistent with majority-concerned findings: 51% more concerned than excited (Pew), 57% rate risks as high (Pew 2025), two-thirds worry ...[truncated]" - } - }, - { - "name": "openai_brand_familiarity", - "distribution": { - "type": "categorical", - "options": [ - "Never heard of it", - "Vaguely aware", - "Somewhat familiar", - "Very familiar" - ], - "weights": [ - 0.08, - 0.2, - 0.35, - 0.37 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights) - 1.0) < 0.001", - "value": null, - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Pew Sept 2025 (95% heard at least a little about AI); Elon University 2025 (52% use LLMs; 72% have used ChatGPT among users); index.dev stats (77M US monthly ChatGPT users); Bynder 2024 (58% had heard...[truncated]", - "note": "By 2025/2026, ~95% of US adults have heard at least a little about AI (Pew 2025). ChatGPT has ~77M monthly US users and very high brand recognition. 'Very familiar' (~37%) reflects ChatGPT's ~77M MAU ...[truncated]" - } - }, - { - "name": "social_influence_susceptibility", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 2.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Susceptibility bounded at 0 (fully resistant)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Susceptibility bounded at 1 (fully susceptible)" - } - ], - "grounding": { - "level": "medium", - "method": "estimated", - "source": "Social psychology literature on opinion conformity (Asch, Cialdini); Big Five agreeableness-conformity links; need-for-cognition literature on analytic thinking resistance to persuasion", - "note": "Beta(2.5, 2.5) gives a symmetric distribution centered at 0.5. Social influence susceptibility is relatively normally distributed in the population with no strong population-level skew before conditio...[truncated]" - } - }, - { - "name": "techno_optimism", - "distribution": { - "type": "beta", - "alpha": 2.2, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Techno-optimism bounded at 0 (pure pessimist)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Techno-optimism bounded at 1 (pure optimist)" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew April 2025 (only 11% more excited than concerned about AI; 17% believe AI positive impact on US); Stanford HAI 2025 AI Index (55% globally see AI as more beneficial than harmful, but US leans more...[truncated]", - "note": "Beta(2.2, 2.8) gives a mean of ~0.44, slightly below the midpoint, consistent with US public leaning pessimistic about AI specifically (only 17% believe AI will have very/somewhat positive impact per ...[truncated]" - } - }, - { - "name": "online_discussion_propensity", - "distribution": { - "type": "beta", - "alpha": 1.8, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Propensity bounded at 0" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Propensity bounded at 1" - } - ], - "grounding": { - "level": "medium", - "method": "estimated", - "source": "Pew social media behavior research; '1% rule' of internet content creation (1% create, 9% comment, 90% lurk); Gallup civic engagement data; social media participation rates", - "note": "Beta(1.8, 3.5) yields mean ~0.34, right-skewed toward lower values. The '1% rule' in online communities (most users lurk; few actively post) means the base propensity is low for most adults. Even amon...[truncated]" - } - }, - { - "name": "job_automation_anxiety", - "distribution": { - "type": "beta", - "alpha": 2.8, - "beta": 2.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Anxiety bounded at 0 (no concern)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Anxiety bounded at 1 (extreme concern)" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew April 2025 (56% of US adults extremely/very concerned about AI eliminating jobs); Attest 2025 Consumer AI Report (57% worried about job losses to AI); Gallup Jan 2026 (half say job elimination 'no...[truncated]", - "note": "Beta(2.8, 2.5) yields mean ~0.53, slightly above midpoint. Pew finds 56% extremely/very concerned about AI eliminating jobs in general, but Gallup finds half say it's 'not at all likely' for their OWN...[truncated]" - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 106745, - "output_tokens": 5646, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.datacamp.com/blog/introducing-the-state-of-data-and-ai-literacy-report-2024", - "https://gptzero.me/news/how-many-people-use-ai/", - "https://ailiteracy.institute/ai-literacy-review-march-11-2025/", - "https://www.sciencedirect.com/science/article/pii/S2666557324000247", - "https://ncses.nsf.gov/pubs/nsb20245/u-s-stem-workforce-size-growth-and-employment", - "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/", - "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion", - "https://www.pewresearch.org/science/2025/09/17/how-americans-view-ai-and-its-impact-on-people-and-society/", - "https://www.statista.com/statistics/1387440/attitudes-brand-usage-generative-ai-us/", - "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/", - "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/", - "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/", - "https://fortune.com/2026/01/25/ai-use-frequency-employed-adults-tech-workers-retail-manufacturing-gallup-poll/", - "https://ncses.nsf.gov/pubs/nsb20245/assets/nsb20245.pdf", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/", - "https://www.bls.gov/opub/ted/2025/numbers-research-and-discovery-stem-employment-projected-to-take-off.htm", - "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/", - "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/", - "https://www.sentienceinstitute.org/blog/ai-policy-insights-from-the-aims-survey", - "https://www.bynder.com/en/press-media/ai-vs-human-made-content-study/", - "https://www.statista.com/statistics/1301234/consumer-awareness-and-familiarity-with-streaming-services-us/?__sso_cookie_checker=failed", - "https://news.gallup.com/poll/654905/americans-everyday-products-without-realizing.aspx", - "https://sparktoro.com/blog/new-research-20-of-americans-use-ai-tools-10x-month-but-growth-is-slowing-and-traditional-search-hasnt-dipped/", - "https://ncses.nsf.gov/pubs/nsb20245", - "https://www.nu.edu/blog/ai-statistics-trends/", - "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC11303566/", - "https://content.govdelivery.com/accounts/USNSF/bulletins/39f6cd9", - "https://www.aiprm.com/ai-statistics/", - "https://rochesterbeacon.com/2025/12/24/with-ais-rise-hope-and-anxiety/", - "https://www.pewresearch.org/short-reads/2023/08/28/growing-public-concern-about-the-role-of-artificial-intelligence-in-daily-life/", - "https://www.prosperityforamerica.org/literacy-statistics/", - "https://abc6onyourside.com/news/nation-world/americans-uneasy-about-ai-experts-more-optimistic-pew-study-finds-research-study-artificial-intelligence-humanoids-technology", - "https://www.bls.gov/emp/tables/stem-employment.htm", - "https://www.statista.com/statistics/1461638/us-adults-chatgpt-usage-by-activity/", - "https://www.index.dev/blog/chatgpt-statistics", - "https://www.pewresearch.org/science/2025/09/17/ai-in-americans-lives-awareness-experiences-and-attitudes/", - "https://www.statista.com/forecasts/1479657/ai-tools-awareness-by-brand-united-states", - "https://elfsight.com/blog/ai-usage-statistics/", - "https://ncses.nsf.gov/pubs/nsb20212", - "https://en.wikipedia.org/wiki/Literacy_in_the_United_States", - "https://www.technollama.co.uk/a-gemini-report-how-many-people-are-using-generative-ai-on-a-daily-basis-a-gemini-report", - "https://www.elon.edu/u/news/2025/03/12/survey-52-of-u-s-adults-now-use-ai-large-language-models-like-chatgpt/", - "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/04/pi_2025.04.03_us-public-and-ai-experts_report.pdf", - "https://www.askattest.com/blog/articles/2025-consumer-adoption-of-ai-report", - "https://www.bls.gov/spotlight/2017/science-technology-engineering-and-mathematics-stem-occupations-past-present-and-future/", - "https://ssti.org/blog/nsf-publishes-new-report-stem-labor-force" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_212127_013175_claude_agentic_research.json b/examples/logs/20260217_212127_013175_claude_agentic_research.json deleted file mode 100644 index 8c1b8e1..0000000 --- a/examples/logs/20260217_212127_013175_claude_agentic_research.json +++ /dev/null @@ -1,1622 +0,0 @@ -{ - "timestamp": "2026-02-17T21:21:27.013276", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 14492 - }, - "response": { - "id": "msg_013s7odx2ppxBVLmmTuvhr9o", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=150]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01DmMXdEtSXaK67xKdZ7ubPC", - "input": { - "query": "public opinion AI artificial intelligence fear excitement skepticism 2024 survey" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01Srj9HYkwE8R9XuuQp7a9gs", - "input": { - "query": "AI familiarity usage frequency demographics education occupation 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4384]", - "page_age": "December 4, 2025", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1784]", - "page_age": null, - "title": "Public Opinion | The 2024 AI Index Report | Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5400]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4156]", - "page_age": "March 14, 2025", - "title": "Americans are increasingly skeptical about AI's effects | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1748]", - "page_age": null, - "title": "Public Opinion | The 2025 AI Index Report - Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5592]", - "page_age": "April 17, 2025", - "title": "What the public thinks about AI and the implications for governance | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=488]", - "page_age": "August 27, 2025", - "title": "The Ipsos AI Monitor 2024: Changing attitudes and feelings about AI and the future it will bring | Ipsos", - "type": "web_search_result", - "url": "https://www.ipsos.com/en/ipsos-ai-monitor-2024-changing-attitudes-and-feelings-about-ai-and-future-it-will-bring" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1552]", - "page_age": "April 9, 2024", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4028]", - "page_age": "November 12, 2025", - "title": "What Americans Really Think About AI Algorithms: Public Confidence and Transparency in Government - Cornell Brooks Public Policy", - "type": "web_search_result", - "url": "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1840]", - "page_age": null, - "title": "4/16/25 - The Age Of Artificial Intelligence: Americans Wary Of Impact On Daily Life, See Harm To Education, Benefits To Medical Advances, Quinnipiac University National Poll Finds; Americans Expect A...[truncated]", - "type": "web_search_result", - "url": "https://poll.qu.edu/poll-release?releaseid=3923" - } - ], - "tool_use_id": "srvtoolu_01DmMXdEtSXaK67xKdZ7ubPC", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5480]", - "page_age": "October 23, 2025", - "title": "AI Tool Usage Time By Age Group 2025", - "type": "web_search_result", - "url": "https://www.aboutchromebooks.com/ai-tool-usage-time-by-age-group/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4052]", - "page_age": "December 7, 2025", - "title": "AI and Education in 2024: What Educators Need to Know | EdTech Magazine", - "type": "web_search_result", - "url": "https://edtechmagazine.com/k12/article/2024/09/ai-education-2024-educators-express-mixed-feelings-technologys-future-perfcon" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5404]", - "page_age": "1 month ago", - "title": "131 AI Statistics and Trends for 2026 | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-statistics-trends/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5564]", - "page_age": "November 25, 2025", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4252]", - "page_age": "January 11, 2024", - "title": "AI Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5528]", - "page_age": "January 9, 2026", - "title": "75 AI in Education Statistics 2026 (Global Trends & Facts)", - "type": "web_search_result", - "url": "https://www.demandsage.com/ai-in-education-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4220]", - "page_age": "July 11, 2024", - "title": "AI in Education Statistics \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-in-education-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5368]", - "page_age": "January 9, 2026", - "title": "The Latest AI in Education Statistics (2026) - Programs.com", - "type": "web_search_result", - "url": "https://programs.com/resources/ai-education-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4324]", - "page_age": "November 3, 2025", - "title": "AI In Education Statistics By Usage, Adoption and Facts (2025)", - "type": "web_search_result", - "url": "https://electroiq.com/stats/ai-in-education-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6316]", - "page_age": null, - "title": "The impact of AI on education and careers: What do students think? - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11602497/" - } - ], - "tool_use_id": "srvtoolu_01Srj9HYkwE8R9XuuQp7a9gs", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01Qcv9UJFSWH3AnoBTFQZDq2", - "input": { - "query": "AI job automation anxiety occupation demographics 2024 survey" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01EKzexTDAW4qN4MPsP38qh9", - "input": { - "query": "techno optimism political ideology trust institutions AI safety concern 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5580]", - "page_age": "May 30, 2025", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5664]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5596]", - "page_age": null, - "title": "Automation, Generative AI, and Job Displacement Risk in HR Employment", - "type": "web_search_result", - "url": "https://www.shrm.org/topics-tools/research/automation-generative-ai-job-displacement-risk-hr-employment" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6824]", - "page_age": null, - "title": "Incorporating AI impacts in BLS employment projections: occupational case studies : Monthly Labor Review : U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/opub/mlr/2025/article/incorporating-ai-impacts-in-bls-employment-projections.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4748]", - "page_age": "August 22, 2025", - "title": "71% Fear AI Will Take Jobs. Here\u2019s What Actually Happens | by The Hidden Layer | Medium", - "type": "web_search_result", - "url": "https://hiddenlayerai.medium.com/71-fear-ai-will-take-jobs-heres-what-actually-happens-f853cd5758fa" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2964]", - "page_age": "March 12, 2025", - "title": "On Future AI Use in Workplace, US Workers More Worried Than Hopeful | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2025/02/25/u-s-workers-are-more-worried-than-hopeful-about-future-ai-use-in-the-workplace/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5120]", - "page_age": "February 26, 2025", - "title": "Resume Now\u2019s AI Disruption Report Reveals Anxiety About AI Job Loss", - "type": "web_search_result", - "url": "https://www.resume-now.com/job-resources/careers/ai-disruption-report" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4784]", - "page_age": null, - "title": "People Don\u2019t Worry About Losing Jobs to AI, Even When Told It Could Happen Soon | University of California, Merced", - "type": "web_search_result", - "url": "https://www.ucmerced.edu/news/2025/people-don%E2%80%99t-worry-about-losing-jobs-ai-even-when-told-it-could-happen-soon" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4064]", - "page_age": "November 20, 2025", - "title": "People don\u2019t worry about losing jobs to AI, even when told it could happen soon | University of California", - "type": "web_search_result", - "url": "https://www.universityofcalifornia.edu/news/people-dont-worry-about-losing-jobs-ai-even-when-told-it-could-happen-soon" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5484]", - "page_age": "August 14, 2025", - "title": "AI and Jobs: The Final Word (Until the Next One) - Economic Innovation Group", - "type": "web_search_result", - "url": "https://eig.org/ai-and-jobs-the-final-word/" - } - ], - "tool_use_id": "srvtoolu_01Qcv9UJFSWH3AnoBTFQZDq2", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5588]", - "page_age": "January 16, 2026", - "title": "Tracing the Techno-Supremacy Doctrine: A Critical Discourse Analysis of the AI Executive Elite", - "type": "web_search_result", - "url": "https://arxiv.org/html/2509.18079v2" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3076]", - "page_age": null, - "title": "TECHNO-OPTIMISM, GEOPOLITICS, AND THE FUTURE OF AI Workshop Summary", - "type": "web_search_result", - "url": "https://cgsr.llnl.gov/sites/cgsr/files/2024-08/Techno-Optimism-Geopolitics-and-the-Future-of-AI-Workshop-Summary.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5100]", - "page_age": null, - "title": "What\u2019s Driving Optimism around AI in 2024", - "type": "web_search_result", - "url": "https://publicpolicy.google/article/whats-driving-optimism-around-AI-in-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3852]", - "page_age": null, - "title": "TECHNO-OPTIMISM, GEOPOLITICS, AND THE FUTURE OF AI Annotated Bibliography", - "type": "web_search_result", - "url": "https://cgsr.llnl.gov/sites/cgsr/files/2024-08/2024_Techno-Optimism-Geopolitics-and-the-Future-of-AI-CGSR-Annotated-Bibliography.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6032]", - "page_age": "October 18, 2023", - "title": "Marc Andreessen publishes 'Techno-Optimist Manifesto', names enemies including 'ESG', \u2018Trust and Safety\u2019 | VentureBeat", - "type": "web_search_result", - "url": "https://venturebeat.com/ai/marc-andreessen-publishes-techno-optimist-manifesto-names-enemies-including-esg-trust-and-safety" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5632]", - "page_age": "December 18, 2023", - "title": "The techno-optimists and doomsdayers inside Silicon Valley\u2019s most dangerous AI debate", - "type": "web_search_result", - "url": "https://www.cnbc.com/2023/12/17/techno-optimists-doomsdayers-and-silicon-valleys-riskiest-ai-debate-.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3872]", - "page_age": "January 30, 2024", - "title": "Rise of techno-optimism: Silicon Valley backed new political force in America", - "type": "web_search_result", - "url": "https://www.axios.com/2024/01/30/techno-optimist-silicon-valley-us-elections" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4040]", - "page_age": "December 19, 2023", - "title": "Parsing the Political Project of Techno-Optimism | TechPolicy.Press", - "type": "web_search_result", - "url": "https://www.techpolicy.press/parsing-the-political-project-of-techno-optimism/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5236]", - "page_age": null, - "title": "Techno-Optimism, Techno-Pessimism, and Techno-Realism | Baker Institute", - "type": "web_search_result", - "url": "https://www.bakerinstitute.org/research/techno-optimism-techno-pessimism-and-techno-realism" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5868]", - "page_age": null, - "title": "International Journal of Communication 19(2025), 740\u2013765 1932\u20138036/20250005", - "type": "web_search_result", - "url": "https://ijoc.org/index.php/ijoc/article/download/22909/4915/88872" - } - ], - "tool_use_id": "srvtoolu_01EKzexTDAW4qN4MPsP38qh9", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=157]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDA9vvIAgkdA6KKvx4xoMZ3evyakK2q55FWJsIjBZo1BlggimHrrLmA2prgZUqSD7VYGhveE3/IVwJG8mglwmOjk+gJdcYqEswJIUlFYqFffiWyqgxeo9XZEB2s1TVw/BSeqlgBgE", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - } - ], - "text": "[REDACTED_TEXT length=160]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMsCm6mcFgLacjZIsBoMBes5W4lGVNi4egN9IjB+gQi7+qx5qfMg2x7YQBG9XFjIXuu5DhpM/GkxUj+mb7fey5244r9bTdmwL1CI19UqFYUeF189ukbBFFpNbESZkkKglVsS8xgE", - "title": "What the public thinks about AI and the implications for governance | Brookings", - "type": "web_search_result_location", - "url": "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/" - } - ], - "text": "[REDACTED_TEXT length=115]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=136]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOEK/PNmPyook+HblRoMcmp8oiPwqG2Wcd5DIjACzTbdIJvUSmXnGNRxNzbwr5YDsKRP2Sn3p3UUMpS3oGfrIsz9hxBIsactjEMemeoqE25ZlczTPx6hQU1663p9qPu3Aj4YBA==", - "title": "Americans are increasingly skeptical about AI's effects | YouGov", - "type": "web_search_result_location", - "url": "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll" - } - ], - "text": "[REDACTED_TEXT length=77]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpMBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCH+TqxfRImvyK1YRhoM6dT7uc4UXgF0K+T7IjALs/PST+R4+kgMAoh+ZqJTOMl8LVKUORgS72jZkyruTC786D1gcv8+TgpigZujQ+YqF5yiO0/2Gz6oC09/xFq9eazBM/Xddcma...[truncated]", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result_location", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - } - ], - "text": "[REDACTED_TEXT length=141]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=132]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJTkY7ndJ4QC+2vEEBoMdG0DzoGENk19mxewIjArQJ/9XTdSZwq+rYOKT0YSdSDHxe+0SjmfZHrEALohCxpAYtvep5df/alAdSJAaeQqFJwPeDIW2bCtoZGt2k1K618NyHMDGAQ=", - "title": "AI Tool Usage Time By Age Group 2025", - "type": "web_search_result_location", - "url": "https://www.aboutchromebooks.com/ai-tool-usage-time-by-age-group/" - }, - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNNTJV+c49TVeWXg+hoMK5MUeCTZepVnxuaFIjCqPXHapAOMP+e6Iho92S8/Wns8Kbcai+QMQxTwitCzbyM8LuEUemoB5dbKGxg5uZYqFI15k6oB0d+uZVeT/kYPcD5z3SoJGAQ=", - "title": "AI Tool Usage Time By Age Group 2025", - "type": "web_search_result_location", - "url": "https://www.aboutchromebooks.com/ai-tool-usage-time-by-age-group/" - } - ], - "text": "[REDACTED_TEXT length=136]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEIHZmQTi+UeuGap6xoMkgh7hDYcYvVblEy7IjBiyZTVuC2clxoEfQyBfl+3r7wBUPwTe1W6BogK89Haf1AWPXL8wgPA3ptY8yt9B/kqFUZ/emtPWzODW9q6mRvMe3JizrfRNBgE", - "title": "AI Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result_location", - "url": "https://www.aiprm.com/ai-statistics/" - } - ], - "text": "[REDACTED_TEXT length=104]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=96]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDB9rfUTuogIOXV+RexoMBWUTFO+oEo7s/wX3IjCLNFOA9Gsqjplenb5P9szuFapzPml7yAdS8aZdu8LZSDsDI+lCODpcDj49VsMrCooqFVGk+SbjwotIfQLDFbnRZzuo2sjY4RgE", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result_location", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - } - ], - "text": "[REDACTED_TEXT length=72]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=81]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMtyh88YWml0k2C2ABoMyATNS4IjYR/nUzsIIjB+Q/y/r3GurwkukrklOn2L7CDmydjScwEw96Ro9NUNe4I4VDjMGB5/NWiXG7Th48kqFNRg0l+WfyNA+nyhMtVqe20jxY+cGAQ=", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result_location", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - }, - { - "cited_text": "[REDACTED_TEXT length=104]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAWvzwVMW71xyREA3xoMnd3ivccT0QI4HAK0IjA4rIqByT8wJf6vj0a4goun12Y21YGfVO9NImejpv69IAzjKqUQuuehK7Fq2vofC6gqFdGc3WuboSdbIfqA7Aj9WpiaMg+fBxgE", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result_location", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - } - ], - "text": "[REDACTED_TEXT length=140]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCjbKOs8kmekUFmWvhoMTReZgRa2+k+Dkq3qIjDCSreUh8U3YCbdE7u9ZyyUSQ0z6qoodL7dB0fCUN43Uu5kfEAePPSbEU12718/27MqFS/U8w0Y0OFjYXgj9KAHlBGKWL8cKRgE", - "title": "On Future AI Use in Workplace, US Workers More Worried Than Hopeful | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/social-trends/2025/02/25/u-s-workers-are-more-worried-than-hopeful-about-future-ai-use-in-the-workplace/" - } - ], - "text": "[REDACTED_TEXT length=126]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN2ZwA4YF0m0i80DFBoMSTGKOR8mWKMt7abIIjAyJDaKBa5REfqxZLuK5GJQBPG9G6/jq6p0EDNAGR0pOXd0SQOuc5mVQdL+IrRZCnwqFPaI1comYu3VbSgPsZNIy6w/BWXfGAQ=", - "title": "International Journal of Communication 19(2025), 740\u2013765 1932\u20138036/20250005", - "type": "web_search_result_location", - "url": "https://ijoc.org/index.php/ijoc/article/download/22909/4915/88872" - } - ], - "text": "[REDACTED_TEXT length=136]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHifEGwUsGOUQWzbMxoMKJXrg346lInpfDwoIjD4TE2JT+iu73y2k3D4WkIsJXXCWGLK66fSC6CnPrti0tw9NVoKyAaah1Q48HlV704qFSF6/Y19DsTxJK0vTRWQH6lRkYlzCBgE", - "title": "International Journal of Communication 19(2025), 740\u2013765 1932\u20138036/20250005", - "type": "web_search_result_location", - "url": "https://ijoc.org/index.php/ijoc/article/download/22909/4915/88872" - } - ], - "text": "[REDACTED_TEXT length=113]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01UgbngcK4QfiidZr84AayR4", - "input": { - "attributes": [ - { - "name": "ai_familiarity", - "modifiers": [ - { - "when": "education_level == 'Less than HS'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.3, - "Basic": 0.42, - "Intermediate": 0.2, - "Advanced": 0.06, - "Expert": 0.02 - }, - "probability_override": null - }, - { - "when": "education_level == 'HS Diploma'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.18, - "Basic": 0.4, - "Intermediate": 0.28, - "Advanced": 0.1, - "Expert": 0.04 - }, - "probability_override": null - }, - { - "when": "education_level == 'Some College'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.1, - "Basic": 0.35, - "Intermediate": 0.33, - "Advanced": 0.16, - "Expert": 0.06 - }, - "probability_override": null - }, - { - "when": "education_level == \"Associate's\"", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.08, - "Basic": 0.32, - "Intermediate": 0.35, - "Advanced": 0.18, - "Expert": 0.07 - }, - "probability_override": null - }, - { - "when": "education_level == \"Bachelor's\"", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.04, - "Basic": 0.22, - "Intermediate": 0.38, - "Advanced": 0.25, - "Expert": 0.11 - }, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.02, - "Basic": 0.14, - "Intermediate": 0.33, - "Advanced": 0.32, - "Expert": 0.19 - }, - "probability_override": null - }, - { - "when": "occupation == 'Management/Professional'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.05, - "Basic": 0.22, - "Intermediate": 0.35, - "Advanced": 0.26, - "Expert": 0.12 - }, - "probability_override": null - }, - { - "when": "occupation == 'Service'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.2, - "Basic": 0.4, - "Intermediate": 0.28, - "Advanced": 0.09, - "Expert": 0.03 - }, - "probability_override": null - }, - { - "when": "occupation == 'Sales/Office'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.1, - "Basic": 0.32, - "Intermediate": 0.36, - "Advanced": 0.16, - "Expert": 0.06 - }, - "probability_override": null - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.25, - "Basic": 0.42, - "Intermediate": 0.24, - "Advanced": 0.07, - "Expert": 0.02 - }, - "probability_override": null - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.22, - "Basic": 0.42, - "Intermediate": 0.25, - "Advanced": 0.08, - "Expert": 0.03 - }, - "probability_override": null - }, - { - "when": "occupation == 'Other'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.15, - "Basic": 0.38, - "Intermediate": 0.3, - "Advanced": 0.12, - "Expert": 0.05 - }, - "probability_override": null - } - ] - }, - { - "name": "ai_usage_frequency", - "modifiers": [ - { - "when": "ai_familiarity == 'None'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.75, - "Rarely": 0.18, - "Monthly": 0.05, - "Weekly": 0.02, - "Daily": 0.0 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Basic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.3, - "Rarely": 0.34, - "Monthly": 0.2, - "Weekly": 0.11, - "Daily": 0.05 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Intermediate'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.08, - "Rarely": 0.18, - "Monthly": 0.24, - "Weekly": 0.3, - "Daily": 0.2 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.02, - "Rarely": 0.07, - "Monthly": 0.13, - "Weekly": 0.3, - "Daily": 0.48 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Expert'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.0, - "Rarely": 0.02, - "Monthly": 0.06, - "Weekly": 0.18, - "Daily": 0.74 - }, - "probability_override": null - }, - { - "when": "education_level == 'Less than HS'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.52, - "Rarely": 0.28, - "Monthly": 0.12, - "Weekly": 0.06, - "Daily": 0.02 - }, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.1, - "Rarely": 0.18, - "Monthly": 0.2, - "Weekly": 0.28, - "Daily": 0.24 - }, - "probability_override": null - } - ] - }, - { - "name": "tech_sector_employment", - "modifiers": [ - { - "when": "occupation == 'Management/Professional' and education_level == 'Graduate Degree'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.22 - }, - { - "when": "occupation == 'Management/Professional' and education_level == \"Bachelor's\"", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.16 - }, - { - "when": "occupation == 'Management/Professional' and education_level == 'Some College'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.06 - }, - { - "when": "occupation == 'Service'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.02 - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.01 - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.02 - }, - { - "when": "occupation == 'Sales/Office' and education_level == \"Bachelor's\"", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.08 - }, - { - "when": "occupation == 'Other'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.04 - } - ] - }, - { - "name": "sci_fi_consumption", - "modifiers": [ - { - "when": "openness < 0.25", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.42, - "Rarely": 0.3, - "Sometimes": 0.18, - "Often": 0.07, - "Very Often": 0.03 - }, - "probability_override": null - }, - { - "when": "openness >= 0.25 and openness < 0.50", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.22, - "Rarely": 0.28, - "Sometimes": 0.3, - "Often": 0.14, - "Very Often": 0.06 - }, - "probability_override": null - }, - { - "when": "openness >= 0.50 and openness < 0.75", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.1, - "Rarely": 0.2, - "Sometimes": 0.32, - "Often": 0.25, - "Very Often": 0.13 - }, - "probability_override": null - }, - { - "when": "openness >= 0.75", - "multiply": null, - "add": null, - "weight_overrides": { - "Never": 0.05, - "Rarely": 0.11, - "Sometimes": 0.26, - "Often": 0.33, - "Very Often": 0.25 - }, - "probability_override": null - } - ] - }, - { - "name": "asi_initial_reaction", - "modifiers": [ - { - "when": "ai_familiarity == 'None'", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.07, - "Fearful": 0.32, - "Skeptical": 0.2, - "Indifferent": 0.28, - "Mixed": 0.13 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Basic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.1, - "Fearful": 0.3, - "Skeptical": 0.26, - "Indifferent": 0.18, - "Mixed": 0.16 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Intermediate'", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.16, - "Fearful": 0.24, - "Skeptical": 0.3, - "Indifferent": 0.1, - "Mixed": 0.2 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.28, - "Fearful": 0.18, - "Skeptical": 0.3, - "Indifferent": 0.06, - "Mixed": 0.18 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Expert'", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.38, - "Fearful": 0.14, - "Skeptical": 0.28, - "Indifferent": 0.04, - "Mixed": 0.16 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.25", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.08, - "Fearful": 0.28, - "Skeptical": 0.4, - "Indifferent": 0.14, - "Mixed": 0.1 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.25 and trust_in_institutions < 0.50", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.12, - "Fearful": 0.28, - "Skeptical": 0.3, - "Indifferent": 0.16, - "Mixed": 0.14 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.50 and trust_in_institutions < 0.75", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.18, - "Fearful": 0.22, - "Skeptical": 0.24, - "Indifferent": 0.16, - "Mixed": 0.2 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.75", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.24, - "Fearful": 0.17, - "Skeptical": 0.18, - "Indifferent": 0.18, - "Mixed": 0.23 - }, - "probability_override": null - }, - { - "when": "neuroticism >= 0.70", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.07, - "Fearful": 0.42, - "Skeptical": 0.2, - "Indifferent": 0.1, - "Mixed": 0.21 - }, - "probability_override": null - }, - { - "when": "neuroticism < 0.30", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited": 0.22, - "Fearful": 0.14, - "Skeptical": 0.28, - "Indifferent": 0.22, - "Mixed": 0.14 - }, - "probability_override": null - } - ] - }, - { - "name": "ai_safety_concern_level", - "modifiers": [ - { - "when": "ai_familiarity == 'None'", - "multiply": 1.05, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Basic'", - "multiply": 1.05, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Intermediate'", - "multiply": 1.0, - "add": 0.02, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": 0.97, - "add": -0.02, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Expert'", - "multiply": 0.95, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism >= 0.70", - "multiply": 1.1, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism < 0.30", - "multiply": 0.9, - "add": -0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.25", - "multiply": 1.08, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.75", - "multiply": 0.9, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "openai_brand_familiarity", - "modifiers": [ - { - "when": "ai_familiarity == 'None'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never heard of it": 0.45, - "Vaguely aware": 0.35, - "Somewhat familiar": 0.15, - "Very familiar": 0.05 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Basic'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never heard of it": 0.15, - "Vaguely aware": 0.38, - "Somewhat familiar": 0.35, - "Very familiar": 0.12 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Intermediate'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never heard of it": 0.04, - "Vaguely aware": 0.16, - "Somewhat familiar": 0.44, - "Very familiar": 0.36 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never heard of it": 0.01, - "Vaguely aware": 0.05, - "Somewhat familiar": 0.26, - "Very familiar": 0.68 - }, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Expert'", - "multiply": null, - "add": null, - "weight_overrides": { - "Never heard of it": 0.0, - "Vaguely aware": 0.02, - "Somewhat familiar": 0.12, - "Very familiar": 0.86 - }, - "probability_override": null - }, - { - "when": "social_media_hours_per_day >= 4.0", - "multiply": null, - "add": null, - "weight_overrides": { - "Never heard of it": 0.08, - "Vaguely aware": 0.22, - "Somewhat familiar": 0.38, - "Very familiar": 0.32 - }, - "probability_override": null - }, - { - "when": "social_media_hours_per_day < 1.0", - "multiply": null, - "add": null, - "weight_overrides": { - "Never heard of it": 0.3, - "Vaguely aware": 0.38, - "Somewhat familiar": 0.22, - "Very familiar": 0.1 - }, - "probability_override": null - } - ] - }, - { - "name": "social_influence_susceptibility", - "modifiers": [ - { - "when": "agreeableness >= 0.75", - "multiply": 1.15, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness < 0.25", - "multiply": 0.85, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition >= 0.70", - "multiply": 0.85, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition < 0.30", - "multiply": 1.12, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness >= 0.75 and need_for_cognition < 0.30", - "multiply": 1.2, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness < 0.25 and need_for_cognition >= 0.70", - "multiply": 0.75, - "add": -0.15, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "techno_optimism", - "modifiers": [ - { - "when": "openness >= 0.75", - "multiply": 1.15, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.25", - "multiply": 0.85, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.70", - "multiply": 1.12, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.25", - "multiply": 0.85, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness >= 0.75 and trust_in_institutions >= 0.70", - "multiply": 1.2, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.25 and trust_in_institutions < 0.25", - "multiply": 0.75, - "add": -0.15, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "online_discussion_propensity", - "modifiers": [ - { - "when": "extraversion >= 0.75", - "multiply": 1.2, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "extraversion < 0.25", - "multiply": 0.8, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "social_media_hours_per_day >= 4.0", - "multiply": 1.25, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "social_media_hours_per_day < 0.5", - "multiply": 0.65, - "add": -0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": 1.15, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Expert'", - "multiply": 1.22, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'None'", - "multiply": 0.7, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "extraversion >= 0.75 and social_media_hours_per_day >= 4.0", - "multiply": 1.35, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "job_automation_anxiety", - "modifiers": [ - { - "when": "occupation == 'Sales/Office'", - "multiply": 1.2, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": 1.18, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Service'", - "multiply": 1.1, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Management/Professional'", - "multiply": 1.05, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": 0.82, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Unemployed'", - "multiply": 1.25, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Retired'", - "multiply": 0.6, - "add": -0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Student'", - "multiply": 0.88, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'None'", - "multiply": 0.9, - "add": -0.03, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Basic'", - "multiply": 1.08, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Intermediate'", - "multiply": 1.15, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Advanced'", - "multiply": 1.1, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_familiarity == 'Expert'", - "multiply": 0.88, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Sales/Office' and employment_status == 'Full-time'", - "multiply": 1.25, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Production/Transport' and employment_status == 'Full-time'", - "multiply": 1.22, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - } - ] - } - ] - }, - "name": "conditional_modifiers_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 91985, - "output_tokens": 8368, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.pewresearch.org/social-trends/2025/02/25/u-s-workers-are-more-worried-than-hopeful-about-future-ai-use-in-the-workplace/", - "https://www.ucmerced.edu/news/2025/people-don%E2%80%99t-worry-about-losing-jobs-ai-even-when-told-it-could-happen-soon", - "https://www.cnbc.com/2023/12/17/techno-optimists-doomsdayers-and-silicon-valleys-riskiest-ai-debate-.html", - "https://www.ipsos.com/en/ipsos-ai-monitor-2024-changing-attitudes-and-feelings-about-ai-and-future-it-will-bring", - "https://www.aboutchromebooks.com/ai-tool-usage-time-by-age-group/", - "https://www.demandsage.com/ai-in-education-statistics/", - "https://poll.qu.edu/poll-release?releaseid=3923", - "https://www.aiprm.com/ai-in-education-statistics/", - "https://www.bakerinstitute.org/research/techno-optimism-techno-pessimism-and-techno-realism", - "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion", - "https://edtechmagazine.com/k12/article/2024/09/ai-education-2024-educators-express-mixed-feelings-technologys-future-perfcon", - "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.techpolicy.press/parsing-the-political-project-of-techno-optimism/", - "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion", - "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution", - "https://cgsr.llnl.gov/sites/cgsr/files/2024-08/Techno-Optimism-Geopolitics-and-the-Future-of-AI-Workshop-Summary.pdf", - "https://www.axios.com/2024/01/30/techno-optimist-silicon-valley-us-elections", - "https://venturebeat.com/ai/marc-andreessen-publishes-techno-optimist-manifesto-names-enemies-including-esg-trust-and-safety", - "https://ijoc.org/index.php/ijoc/article/download/22909/4915/88872", - "https://www.nu.edu/blog/ai-statistics-trends/", - "https://www.resume-now.com/job-resources/careers/ai-disruption-report", - "https://www.aiprm.com/ai-statistics/", - "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/", - "https://www.bls.gov/opub/mlr/2025/article/incorporating-ai-impacts-in-bls-employment-projections.htm", - "https://www.universityofcalifornia.edu/news/people-dont-worry-about-losing-jobs-ai-even-when-told-it-could-happen-soon", - "https://publicpolicy.google/article/whats-driving-optimism-around-AI-in-2024/", - "https://hiddenlayerai.medium.com/71-fear-ai-will-take-jobs-heres-what-actually-happens-f853cd5758fa", - "https://cgsr.llnl.gov/sites/cgsr/files/2024-08/2024_Techno-Optimism-Geopolitics-and-the-Future-of-AI-CGSR-Annotated-Bibliography.pdf", - "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx", - "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/", - "https://programs.com/resources/ai-education-statistics/", - "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll", - "https://electroiq.com/stats/ai-in-education-statistics/", - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://eig.org/ai-and-jobs-the-final-word/", - "https://www.nu.edu/blog/ai-job-statistics/", - "https://arxiv.org/html/2509.18079v2", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC11602497/", - "https://www.shrm.org/topics-tools/research/automation-generative-ai-job-displacement-risk-hr-employment" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_212218_905222_claude_agentic_research.json b/examples/logs/20260217_212218_905222_claude_agentic_research.json deleted file mode 100644 index 44d5b63..0000000 --- a/examples/logs/20260217_212218_905222_claude_agentic_research.json +++ /dev/null @@ -1,845 +0,0 @@ -{ - "timestamp": "2026-02-17T21:22:18.905268", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 3723 - }, - "response": { - "id": "msg_01JAAEmA8VGnAGcXHpMeUFuB", - "content": [ - { - "id": "srvtoolu_01Crd4VoLUYZP7Xdo1Fum4HX", - "input": { - "query": "US household composition statistics by age 2023 Census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01JYbAkrZZDYJoufZ2RJpYrD", - "input": { - "query": "US interracial marriage same-group partner rates by race ethnicity" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01Ricyq8tQ3jzMGVoQDbRo16", - "input": { - "query": "assortative mating education religion political affiliation correlation US" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3608]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4248]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5956]", - "page_age": null, - "title": "Current Population Survey Data Tables", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3048]", - "page_age": null, - "title": "Families and Households Data Tables", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households/data/tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5140]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5540]", - "page_age": null, - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1904]", - "page_age": null, - "title": "U.S. Census Bureau QuickFacts: United States", - "type": "web_search_result", - "url": "https://www.census.gov/quickfacts/fact/table/US/HSD410223" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3944]", - "page_age": null, - "title": "Median household income by age U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/233184/median-household-income-in-the-united-states-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6068]", - "page_age": null, - "title": "Income in the United States: 2023 - Census.gov", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf" - } - ], - "tool_use_id": "srvtoolu_01Crd4VoLUYZP7Xdo1Fum4HX", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5868]", - "page_age": "April 14, 2024", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6888]", - "page_age": "January 5, 2026", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3024]", - "page_age": null, - "title": "Race, Ethnicity and Marriage in the United States", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2018/07/interracial-marriages.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6484]", - "page_age": null, - "title": "Marital Dissolution Among Interracial Couples - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5384]", - "page_age": "April 14, 2024", - "title": "Intermarriage in the U.S. 50 Years After Loving v. Virginia | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4528]", - "page_age": null, - "title": "Who Marries Whom? The Role of Segregation by Race and Class by", - "type": "web_search_result", - "url": "https://www2.census.gov/ces/wp/2024/CES-WP-24-30.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5576]", - "page_age": "March 26, 2025", - "title": "U.S. Approval of Interracial Marriage at New High of 94%", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/354638/approval-interracial-marriage-new-high.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5336]", - "page_age": null, - "title": "Most Americans Marry Within Their Race | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/most-americans-marry-within-their-race/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7004]", - "page_age": "January 15, 2026", - "title": "Interracial marriage - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2868]", - "page_age": "October 13, 2023", - "title": "growth in interracial marriage, 1980 vs 2021 - Working Immigrants", - "type": "web_search_result", - "url": "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/" - } - ], - "tool_use_id": "srvtoolu_01JYbAkrZZDYJoufZ2RJpYrD", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5620]", - "page_age": null, - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5504]", - "page_age": "September 1, 2014", - "title": "Assortative Mating on Ideology Could Operate Through Olfactory Cues | Request PDF", - "type": "web_search_result", - "url": "https://www.researchgate.net/publication/265253952_Assortative_Mating_on_Ideology_Could_Operate_Through_Olfactory_Cues" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5300]", - "page_age": "September 2, 2014", - "title": "Assortative Mating on Ideology Could Operate Through Olfactory Cues - McDermott - 2014 - American Journal of Political Science - Wiley Online Library", - "type": "web_search_result", - "url": "https://onlinelibrary.wiley.com/doi/abs/10.1111/ajps.12133" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6196]", - "page_age": null, - "title": "Religious Intermarriage and Socialization in the United States | Journal of Political Economy: Vol 112, No 3", - "type": "web_search_result", - "url": "https://www.journals.uchicago.edu/doi/10.1086/383101" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2608]", - "page_age": null, - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PubMed", - "type": "web_search_result", - "url": "https://pubmed.ncbi.nlm.nih.gov/27818530/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5416]", - "page_age": "February 26, 2020", - "title": "Assortative mating and turnout: a self-reinforcing pattern of unequal voting participation | European Political Science Review | Cambridge Core", - "type": "web_search_result", - "url": "https://www.cambridge.org/core/journals/european-political-science-review/article/assortative-mating-and-turnout-a-selfreinforcing-pattern-of-unequal-voting-participation/1A2FFF51B9DB6D01E9B9C8B0CE6D8...[truncated]" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5408]", - "page_age": "October 12, 2023", - "title": "Assortative Mating and Wealth Inequalities Between and Within Households | Social Forces | Oxford Academic", - "type": "web_search_result", - "url": "https://academic.oup.com/sf/article/102/2/454/7165260" - }, - { - "encrypted_content": "[REDACTED_TEXT length=376]", - "page_age": null, - "title": "Five Decades of Educational Assortative Mating on JSTOR", - "type": "web_search_result", - "url": "https://www.jstor.org/stable/2095670" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5428]", - "page_age": "November 1, 2021", - "title": "Why do we pick similar mates, or do we? | Biology Letters | The Royal Society", - "type": "web_search_result", - "url": "https://royalsocietypublishing.org/rsbl/article/17/11/20210463/62849/Why-do-we-pick-similar-mates-or-do-we-Why-do-we" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5464]", - "page_age": "February 10, 2015", - "title": "Income inequality and educational assortative mating: Evidence from the Luxembourg Income Study - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514" - } - ], - "tool_use_id": "srvtoolu_01Ricyq8tQ3jzMGVoQDbRo16", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01KZYRHvDm8A7jeYZgJh6nue", - "input": { - "query": "US average household size 2023 census age gap spouses partner age difference statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5672]", - "page_age": null, - "title": "Age Composition of Same-sex & Different-sex Couples, 2023", - "type": "web_search_result", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2504]", - "page_age": null, - "title": "Age Differences Among Coresidential Partners Paul Hemez, Ph.D.", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/library/working-papers/2023/demo/sehsd-wp2023-10.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3652]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1120]", - "page_age": null, - "title": "Age Differences Among Coresidential Partners", - "type": "web_search_result", - "url": "https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3856]", - "page_age": "August 15, 2024", - "title": "Growing share of US husbands and wives are roughly the same age | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5280]", - "page_age": null, - "title": "Same-Sex Married Couples Less Likely to Be Same Age, Race, Ethnicity", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2023/08/same-sex-married-couples-age-race-ethnicity.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2840]", - "page_age": null, - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=528]", - "page_age": "March 13, 2024", - "title": "Common Age Differences, Married Couples \u2013 FlowingData", - "type": "web_search_result", - "url": "https://flowingdata.com/2024/03/13/common-age-differences-married-couples/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4500]", - "page_age": null, - "title": "Married Couple Households Still the Majority but Share Varied by Geography in 2021", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2024/03/coupled-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5384]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf" - } - ], - "tool_use_id": "srvtoolu_01KZYRHvDm8A7jeYZgJh6nue", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=226]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=64]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIWgVbtiXBFxWFZx5BoMDalE/HABg5uyF/a0IjAi6jVhxH53wL+2ZnOv/EJS50hrt+jyRKiinQKc+XpLDdz1o4zb7Ux7owPkCT6XbCMqFEf19drHYHidonM4h5M6Iq2XGSihGAQ=", - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - } - ], - "text": "[REDACTED_TEXT length=68]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDA6C/YSICIwn5rFhMxoM3s+oOc38XlRyYmzzIjBMALS7UxUMkKItqdG8/h5BqJpsbLOB/E6bI00fhFaF/PEec3KFlr9vxY8jmyPZrB4qFGs68O9RPzPW65kpgpD9I8dnNEuLGAQ=", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=144]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpMBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHW5kQIUNgCkzm4kshoMAAJsoTVm7X0pTnFxIjBl7/sVKCBP37RpfaSNTgPnnutQY+Arb4Zjvg1BsCsL0FiQjXz3y8VsoraIUlsfIMoqFxJ5sATXmfXDsdZByKp0fty/ACmPndZ8...[truncated]", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=164]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDA/EjgbZwZkMDWzNThoMS6sL9SMBlwhDdLM3IjDuUcRLymKa7GhvsJOX3H9wOWnxdRkQt8ZeyDM9MRM6XSw53kTPIC8m7rpPyhsoWGQqE6YqOVFRAwSHWUVOVs6fDM74bE0YBA==", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=136]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAShPmK0/Hi/+D57ZxoMrhaGNTiaII2PWXKeIjDkeeebUc9CA/vatefB4hu2vy82PDaBmZUDOF0AEGFUjUchfFzmibVE4Gcbg9FLD2gqFExF3Ww1me97qZL4IguyM7VIY8gsGAQ=", - "title": "Most Americans Marry Within Their Race | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/most-americans-marry-within-their-race/" - } - ], - "text": "[REDACTED_TEXT length=185]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDOPGn5IW+htm6hFWhoM6Xr1GeNZwwI0g3XUIjDJsfmhzF3EO8EZ9EzqoST9sx/YF9ebJikeU2WOz6d+eWQ5S54u2KIH+fqsg4o9UAoqFbkICXcYElufFNsjGY8Zb7udVLbOXxgE", - "title": "Interracial marriage - Wikipedia", - "type": "web_search_result_location", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage" - } - ], - "text": "[REDACTED_TEXT length=118]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=123]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDKdQsfUWHVExVPmZexoMbqRQoD2JZcqAFhLHIjDhEa9qGZnyoT60nqpUenQzuUeneLeAIRV3LJ28brjEM4rbki5QN0kylLS3JEo5UgQqFP84HLevfbAKS2Flh2z4akThnCnaGAQ=", - "title": "Assortative Mating on Ideology Could Operate Through Olfactory Cues | Request PDF", - "type": "web_search_result_location", - "url": "https://www.researchgate.net/publication/265253952_Assortative_Mating_on_Ideology_Could_Operate_Through_Olfactory_Cues" - } - ], - "text": "[REDACTED_TEXT length=122]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDx5EllpSoH4cCwhNxoMybr3Xskd5k2PnQk4IjAyHNTB3Uv5VuIk96fbiXPHev6A6KVm5HvbPy/0wqYbBT9YX2KftkqYZe+PB254XR0qFfZ5XG/w6nGyzV3dmyNrXT73xe8erhgE", - "title": "Age Composition of Same-sex & Different-sex Couples, 2023", - "type": "web_search_result_location", - "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html" - } - ], - "text": "[REDACTED_TEXT length=112]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=86]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDBEwJwipOuAwzJFEkhoMdYUy2dCveLXaFXLyIjCufhTisollzfBTRCsF/2iX1wfbYKzyzvafl/9iA8yQrqYW10mihZCAhT+y/wwBOjIqFbGrg22jsOshEGGz2i0WLTZvMLomIxgE", - "title": "Growing share of US husbands and wives are roughly the same age | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/" - } - ], - "text": "[REDACTED_TEXT length=88]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_017dw57ATma3u9nVyLWs4k3U", - "input": { - "age_brackets": [ - { - "upper_bound": 30, - "label": "18-29" - }, - { - "upper_bound": 45, - "label": "30-44" - }, - { - "upper_bound": 65, - "label": "45-64" - }, - { - "upper_bound": 999, - "label": "65+" - } - ], - "household_type_weights": [ - { - "bracket": "18-29", - "types": [ - { - "type": "single", - "weight": 0.41 - }, - { - "type": "couple", - "weight": 0.22 - }, - { - "type": "single_parent", - "weight": 0.1 - }, - { - "type": "couple_with_kids", - "weight": 0.14 - }, - { - "type": "multi_generational", - "weight": 0.13 - } - ] - }, - { - "bracket": "30-44", - "types": [ - { - "type": "single", - "weight": 0.19 - }, - { - "type": "couple", - "weight": 0.19 - }, - { - "type": "single_parent", - "weight": 0.14 - }, - { - "type": "couple_with_kids", - "weight": 0.4 - }, - { - "type": "multi_generational", - "weight": 0.08 - } - ] - }, - { - "bracket": "45-64", - "types": [ - { - "type": "single", - "weight": 0.25 - }, - { - "type": "couple", - "weight": 0.37 - }, - { - "type": "single_parent", - "weight": 0.09 - }, - { - "type": "couple_with_kids", - "weight": 0.2 - }, - { - "type": "multi_generational", - "weight": 0.09 - } - ] - }, - { - "bracket": "65+", - "types": [ - { - "type": "single", - "weight": 0.36 - }, - { - "type": "couple", - "weight": 0.5 - }, - { - "type": "single_parent", - "weight": 0.02 - }, - { - "type": "couple_with_kids", - "weight": 0.02 - }, - { - "type": "multi_generational", - "weight": 0.1 - } - ] - } - ], - "same_group_rates": [ - { - "group": "white", - "rate": 0.91 - }, - { - "group": "black", - "rate": 0.84 - }, - { - "group": "hispanic", - "rate": 0.74 - }, - { - "group": "asian", - "rate": 0.72 - }, - { - "group": "native_american", - "rate": 0.45 - }, - { - "group": "multiracial", - "rate": 0.4 - } - ], - "default_same_group_rate": 0.65, - "assortative_mating": [ - { - "attribute": "political_affiliation", - "correlation": 0.72 - }, - { - "attribute": "religious_affiliation", - "correlation": 0.7 - }, - { - "attribute": "education_level", - "correlation": 0.65 - }, - { - "attribute": "income", - "correlation": 0.55 - }, - { - "attribute": "race_ethnicity", - "correlation": 0.8 - }, - { - "attribute": "personality_openness", - "correlation": 0.2 - }, - { - "attribute": "media_consumption_ideology", - "correlation": 0.6 - }, - { - "attribute": "social_media_usage", - "correlation": 0.35 - } - ], - "partner_age_gap_mean": -2.3, - "partner_age_gap_std": 4.5, - "min_adult_age": 18, - "child_min_parent_offset": 18, - "child_max_parent_offset": 45, - "max_dependent_child_age": 17, - "elderly_min_offset": 20, - "elderly_max_offset": 45, - "life_stages": [ - { - "max_age": 5, - "label": "preschool" - }, - { - "max_age": 11, - "label": "elementary" - }, - { - "max_age": 14, - "label": "middle_school" - }, - { - "max_age": 18, - "label": "high_school" - } - ], - "adult_stage_label": "adult", - "avg_household_size": 2.51, - "sources": [ - "U.S. Census Bureau, America's Families and Living Arrangements: 2023, https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "U.S. Census Bureau, Historical Households Tables (HH-2 through HH-7), https://www.census.gov/data/tables/time-series/demo/families/households.html", - "U.S. Census Bureau, QuickFacts United States 2023, https://www.census.gov/quickfacts/fact/table/US/HSD410223", - "U.S. Census Bureau, Race Ethnicity and Marriage in the United States (2018), https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "U.S. Census Bureau, Age Differences Among Coresidential Partners (2023 Working Paper), https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html", - "U.S. Census Bureau, Same-Sex Married Couples Less Likely to Be Same Age Race Ethnicity (2023), https://www.census.gov/library/stories/2023/08/same-sex-married-couples-age-race-ethnicity.html", - "U.S. Census Bureau, Married Couple Households Still the Majority (2024), https://www.census.gov/library/stories/2024/03/coupled-households.html", - "Pew Research Center, Intermarriage in the U.S. 50 Years After Loving v. Virginia (2017), https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/", - "Pew Research Center, Trends and Patterns in Intermarriage (2017), https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "Pew Research Center, A Growing Share of US Husbands and Wives Are Roughly the Same Age (2024), https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-t...[truncated]", - "Population Reference Bureau, U.S. Household Composition Shifts (ACS 2017), https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-pare...[truncated]", - "Population Reference Bureau, Most Americans Marry Within Their Race, https://www.prb.org/resources/most-americans-marry-within-their-race/", - "Gallup, U.S. Approval of Interracial Marriage at New High of 94% (2021), https://news.gallup.com/poll/354638/approval-interracial-marriage-new-high.aspx", - "McDermott et al., Assortative Mating on Ideology Could Operate Through Olfactory Cues, American Journal of Political Science (2014), https://onlinelibrary.wiley.com/doi/abs/10.1111/ajps.12133", - "Kolk & Barclay, Assortative Mating and Wealth Inequalities Between and Within Households, Social Forces (2023), https://academic.oup.com/sf/article/102/2/454/7165260", - "Cherlin et al., Religion Marriage Markets and Assortative Mating in the United States, PMC (2016), https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "BGSU NCFMR, Age Composition of Same-sex & Different-sex Couples 2023, https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html", - "Goldman, Who Marries Whom? The Role of Segregation by Race and Class, Census Working Paper CES-WP-24-30 (2024), https://www2.census.gov/ces/wp/2024/CES-WP-24-30.pdf", - "Wikipedia, Interracial Marriage in the United States, https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "Statista / U.S. Census Bureau, Average Size of Households in the U.S. 2023, https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - ] - }, - "name": "household_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 132303, - "output_tokens": 3002, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://royalsocietypublishing.org/rsbl/article/17/11/20210463/62849/Why-do-we-pick-similar-mates-or-do-we-Why-do-we", - "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf", - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://www.census.gov/library/stories/2023/08/same-sex-married-couples-age-race-ethnicity.html", - "https://en.wikipedia.org/wiki/Interracial_marriage", - "https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html", - "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf", - "https://www.prb.org/resources/most-americans-marry-within-their-race/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "https://academic.oup.com/sf/article/102/2/454/7165260", - "https://flowingdata.com/2024/03/13/common-age-differences-married-couples/", - "https://www.jstor.org/stable/2095670", - "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-16.html", - "https://pubmed.ncbi.nlm.nih.gov/27818530/", - "https://www.census.gov/topics/families.html", - "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/", - "https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/", - "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "https://www.census.gov/library/stories/2024/03/coupled-households.html", - "https://www.census.gov/topics/families/families-and-households.html", - "https://www.statista.com/statistics/233184/median-household-income-in-the-united-states-by-age/", - "https://www.cambridge.org/core/journals/european-political-science-review/article/assortative-mating-and-turnout-a-selfreinforcing-pattern-of-unequal-voting-participation/1A2FFF51B9DB6D01E9B9C8B0CE6D8587", - "https://www.census.gov/content/dam/Census/library/working-papers/2023/demo/sehsd-wp2023-10.pdf", - "https://www.census.gov/quickfacts/fact/table/US/HSD410223", - "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/", - "https://www2.census.gov/ces/wp/2024/CES-WP-24-30.pdf", - "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514", - "https://onlinelibrary.wiley.com/doi/abs/10.1111/ajps.12133", - "https://www.researchgate.net/publication/265253952_Assortative_Mating_on_Ideology_Could_Operate_Through_Olfactory_Cues", - "https://www.journals.uchicago.edu/doi/10.1086/383101", - "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "https://news.gallup.com/poll/354638/approval-interracial-marriage-new-high.aspx", - "https://www.census.gov/topics/families/families-and-households/data/tables.html", - "https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_212236_134818_claude_reasoning_call.json b/examples/logs/20260217_212236_134818_claude_reasoning_call.json deleted file mode 100644 index 77ae00a..0000000 --- a/examples/logs/20260217_212236_134818_claude_reasoning_call.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "timestamp": "2026-02-17T21:22:36.134856", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 4553 - }, - "response": { - "id": "msg_01KLQgNYy2Ac6Hg6zpjv6bZ1", - "content": [ - { - "id": "toolu_017FiNNF2BhUmWthqdLFM2Yi", - "input": { - "event_type": "announcement", - "content": "[REDACTED_TEXT length=1142]", - "source": "OpenAI", - "credibility": 0.72, - "ambiguity": 0.72, - "emotional_valence": 0.1, - "reasoning": "[REDACTED_TEXT length=1842]" - }, - "name": "event_parsing", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2089, - "output_tokens": 773, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_212309_838560_claude_reasoning_call.json b/examples/logs/20260217_212309_838560_claude_reasoning_call.json deleted file mode 100644 index 9c838ed..0000000 --- a/examples/logs/20260217_212309_838560_claude_reasoning_call.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "timestamp": "2026-02-17T21:23:09.838593", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8760 - }, - "response": { - "id": "msg_012doThbvPZvsiLQommz4ys9", - "content": [ - { - "id": "toolu_01DdFB21eoTJ9tzLTtxmPV7x", - "input": { - "channels": [ - { - "name": "major_tv_and_online_news", - "description": "Breaking news coverage across major TV networks (CNN, Fox, NBC, ABC, CBS) and top digital news outlets. Given the unprecedented nature of an ASI announcement, this would dominate all broadcast cycles ...[truncated]", - "reach": "broadcast", - "credibility_modifier": 1.1 - }, - { - "name": "social_media_viral_spread", - "description": "Viral sharing across Twitter/X, Facebook, TikTok, Instagram, and YouTube. High-engagement users and younger demographics encounter the news through algorithmic feeds and peer sharing.", - "reach": "organic", - "credibility_modifier": 0.85 - }, - { - "name": "tech_and_professional_networks", - "description": "Targeted exposure through professional and tech-oriented channels: LinkedIn, tech newsletters, Hacker News, industry Slack groups, and professional email lists. Reaches highly educated, tech-aware wor...[truncated]", - "reach": "targeted", - "credibility_modifier": 1.2 - }, - { - "name": "word_of_mouth_interpersonal", - "description": "Organic interpersonal spread through friend, family, and colleague network edges. Captures the 'did you hear about this?' dynamic for agents not yet reached by media.", - "reach": "organic", - "credibility_modifier": 0.95 - }, - { - "name": "radio_and_print_news", - "description": "AM/FM radio bulletins and print/digital newspaper articles reaching older, rural, and news-print-oriented audiences who may not be on social media but tune in to traditional media.", - "reach": "broadcast", - "credibility_modifier": 1.05 - } - ], - "rules": [ - { - "channel": "tech_and_professional_networks", - "when": "education_level in ('Bachelor\\'s', 'Graduate Degree') and occupation in ('Management', 'Professional') and internet_access == 'Broadband'", - "probability": 0.85, - "timestep": 0 - }, - { - "channel": "social_media_viral_spread", - "when": "social_media_hours_per_day >= 2.0 and social_media_platforms in ('Twitter/X', 'TikTok', 'Instagram')", - "probability": 0.8, - "timestep": 0 - }, - { - "channel": "major_tv_and_online_news", - "when": "primary_news_source in ('TV', 'Online/Digital') and internet_access in ('Broadband', 'Mobile Only')", - "probability": 0.9, - "timestep": 1 - }, - { - "channel": "social_media_viral_spread", - "when": "social_media_hours_per_day >= 1.0 and social_media_platforms in ('Facebook', 'YouTube')", - "probability": 0.75, - "timestep": 1 - }, - { - "channel": "major_tv_and_online_news", - "when": "true", - "probability": 0.7, - "timestep": 2 - }, - { - "channel": "radio_and_print_news", - "when": "primary_news_source in ('Radio', 'Print Newspaper') or age >= 55", - "probability": 0.75, - "timestep": 2 - }, - { - "channel": "word_of_mouth_interpersonal", - "when": "extraversion >= 0.5 or need_for_cognition >= 0.6", - "probability": 0.65, - "timestep": 2 - }, - { - "channel": "social_media_viral_spread", - "when": "social_media_platforms != 'None/Minimal' and neuroticism >= 0.55", - "probability": 0.7, - "timestep": 3 - }, - { - "channel": "word_of_mouth_interpersonal", - "when": "true", - "probability": 0.55, - "timestep": 3 - }, - { - "channel": "major_tv_and_online_news", - "when": "primary_news_source == 'None' and internet_access != 'None'", - "probability": 0.45, - "timestep": 4 - }, - { - "channel": "radio_and_print_news", - "when": "urban_rural == 'Rural' and internet_access in ('Dial-up/Satellite', 'None')", - "probability": 0.65, - "timestep": 4 - }, - { - "channel": "word_of_mouth_interpersonal", - "when": "true", - "probability": 0.4, - "timestep": 5 - } - ], - "reasoning": "[REDACTED_TEXT length=3165]" - }, - "name": "seed_exposure", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3168, - "output_tokens": 2034, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_212333_814516_claude_reasoning_call.json b/examples/logs/20260217_212333_814516_claude_reasoning_call.json deleted file mode 100644 index aea2cbb..0000000 --- a/examples/logs/20260217_212333_814516_claude_reasoning_call.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "timestamp": "2026-02-17T21:23:33.814547", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 4996 - }, - "response": { - "id": "msg_01QTHgt8qZApkqqw6LD6BsnB", - "content": [ - { - "id": "toolu_017CLheWtNaNJgWJJkqkRPXz", - "input": { - "primary_model": "broadcast_response", - "secondary_model": "direct_conversation", - "interaction_description": "OpenAI's ASI announcement originates as an authoritative broadcast from a recognized institution. Agents first encounter the announcement passively through news feeds, social media, and media outlets ...[truncated]", - "share_probability": 0.55, - "share_modifiers": [ - { - "when": "social_media_hours_per_day > 3.0", - "multiply": 1.5, - "add": 0 - }, - { - "when": "age < 35", - "multiply": 1.35, - "add": 0 - }, - { - "when": "age > 64", - "multiply": 0.7, - "add": 0 - }, - { - "when": "openness > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "need_for_cognition > 0.7", - "multiply": 1.25, - "add": 0 - }, - { - "when": "neuroticism > 0.65", - "multiply": 1.2, - "add": 0 - }, - { - "when": "trust_in_institutions < 0.35", - "multiply": 1.4, - "add": 0 - }, - { - "when": "susceptibility_to_misinformation > 0.65", - "multiply": 1.3, - "add": 0 - }, - { - "when": "education_level == 'bachelor' or education_level == 'graduate'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "occupation == 'technology' or occupation == 'research' or occupation == 'engineering'", - "multiply": 1.4, - "add": 0 - }, - { - "when": "primary_news_source == 'social_media'", - "multiply": 1.35, - "add": 0 - }, - { - "when": "news_outlet_lean == 'left' or news_outlet_lean == 'right'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "extraversion > 0.65", - "multiply": 1.2, - "add": 0 - }, - { - "when": "civic_engagement == 'high'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "edge_type == 'friend'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "edge_type == 'colleague'", - "multiply": 1.45, - "add": 0 - }, - { - "when": "edge_type == 'family'", - "multiply": 1.1, - "add": 0 - }, - { - "when": "internet_access == 'none' or internet_access == 'limited'", - "multiply": 0.4, - "add": 0 - }, - { - "when": "social_media_platforms == 'none'", - "multiply": 0.6, - "add": 0 - }, - { - "when": "religious_attendance == 'weekly' or religious_attendance == 'more_than_weekly'", - "multiply": 1.1, - "add": 0 - } - ], - "decay_per_hop": 0.12, - "max_hops": 6, - "reasoning": "[REDACTED_TEXT length=1939]" - }, - "name": "interaction_model", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2404, - "output_tokens": 1374, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_212343_027698_claude_simple_call.json b/examples/logs/20260217_212343_027698_claude_simple_call.json deleted file mode 100644 index 16503c8..0000000 --- a/examples/logs/20260217_212343_027698_claude_simple_call.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "timestamp": "2026-02-17T21:23:43.027760", - "function": "simple_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 3382 - }, - "response": { - "id": "msg_01Q3g55QEvccKCpYspsQsgzC", - "content": [ - { - "id": "toolu_01XaYArSL6iWTNMZ5sVCjNKs", - "input": { - "decision": { - "name": "asi_announcement_response", - "description": "How US adults behaviorally respond to OpenAI's ASI announcement \u2014 what they actively do in the immediate aftermath in terms of information-sharing, advocacy, and civic engagement", - "options": [ - "amplify_and_celebrate", - "demand_oversight_and_act", - "spread_skepticism_and_dispute", - "disengage_and_avoid" - ], - "option_friction": { - "amplify_and_celebrate": 0.45, - "demand_oversight_and_act": 0.75, - "spread_skepticism_and_dispute": 0.5, - "disengage_and_avoid": 0.2 - } - }, - "reasoning": "[REDACTED_TEXT length=930]" - }, - "name": "outcome_definition", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1711, - "output_tokens": 426, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_212419_343378_claude_reasoning_call.json b/examples/logs/20260217_212419_343378_claude_reasoning_call.json deleted file mode 100644 index 67d541b..0000000 --- a/examples/logs/20260217_212419_343378_claude_reasoning_call.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "timestamp": "2026-02-17T21:24:19.343405", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 2940 - }, - "response": { - "id": "msg_012qRicQsmBQx1CjehxsVmyY", - "content": [ - { - "id": "toolu_01Lo4suij9eGWfym7Lu8oBFw", - "input": { - "scenario_type": "evolving", - "timestep_unit": "day", - "max_timesteps": 14, - "background_context": "[REDACTED_TEXT length=395]", - "timeline_events": [ - { - "timestep": 2, - "description": "Governments and major AI labs issue urgent responses to the OpenAI ASI announcement", - "content": "[REDACTED_TEXT length=759]", - "source": "Governments, Competing AI Labs, United Nations", - "credibility": 0.88, - "emotional_valence": -0.3, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - }, - { - "timestep": 4, - "description": "A leaked internal OpenAI document raises serious doubts about the ASI claim's validity", - "content": "[REDACTED_TEXT length=762]", - "source": "The New York Times (leaked internal document)", - "credibility": 0.75, - "emotional_valence": -0.5, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 6, - "description": "OpenAI holds a live press conference and demonstrates Prometheus capabilities publicly", - "content": "[REDACTED_TEXT length=839]", - "source": "OpenAI Press Conference (Live Streamed)", - "credibility": 0.82, - "emotional_valence": 0.4, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 8, - "description": "A coalition of AI safety researchers publishes an open letter warning of existential risk", - "content": "[REDACTED_TEXT length=836]", - "source": "Coalition of AI Safety Researchers (Nature / arXiv)", - "credibility": 0.9, - "emotional_valence": -0.75, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - }, - { - "timestep": 11, - "description": "Prometheus solves a major real-world problem, sparking renewed optimism and debate", - "content": "[REDACTED_TEXT length=876]", - "source": "OpenAI + WHO + Independent Economic Research Institutes", - "credibility": 0.85, - "emotional_valence": 0.2, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - }, - { - "timestep": 13, - "description": "World governments reach a preliminary international ASI governance agreement", - "content": "[REDACTED_TEXT length=931]", - "source": "United Nations / International Government Coalition", - "credibility": 0.93, - "emotional_valence": 0.15, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - } - ] - }, - "name": "timeline_generation", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1837, - "output_tokens": 1760, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_212432_746251_claude_simple_call.json b/examples/logs/20260217_212432_746251_claude_simple_call.json deleted file mode 100644 index a76507e..0000000 --- a/examples/logs/20260217_212432_746251_claude_simple_call.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "timestamp": "2026-02-17T21:24:32.746314", - "function": "simple_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 2983 - }, - "response": { - "id": "msg_014QtoEjRPouoNphfD6HUM9N", - "content": [ - { - "id": "toolu_01F1SiEDB5zYYPk44CgCrw2t", - "input": { - "identity_dimensions": [ - { - "dimension": "professional_identity", - "relevance": "ASI surpassing human intelligence across all cognitive domains directly threatens the identity and livelihood of virtually every knowledge worker, scientist, artist, engineer, and professional \u2014 peopl...[truncated]" - }, - { - "dimension": "socioeconomic_class", - "relevance": "Against a backdrop of automation anxiety and economic uncertainty, working-class and middle-class individuals may fear being rendered economically obsolete, while wealthy individuals and tech elites m...[truncated]" - }, - { - "dimension": "religious_affiliation", - "relevance": "Creating a system that surpasses human intelligence challenges deeply held theological beliefs about human uniqueness, the soul, and humanity's special place in creation, potentially triggering existe...[truncated]" - }, - { - "dimension": "political_orientation", - "relevance": "Reactions will strongly divide along ideological lines \u2014 with debates about government regulation, corporate power, techno-utopianism vs. precautionary principles, and whether to trust a private compa...[truncated]" - }, - { - "dimension": "generational_identity", - "relevance": "Younger generations (Gen Z, Millennials) who have grown up with AI and face an uncertain job market may react very differently than older generations (Boomers, Gen X) who built careers and identities ...[truncated]" - }, - { - "dimension": "citizenship", - "relevance": "National identity and geopolitical loyalty are activated as people assess whether an American private company controlling ASI is safe or fair for the rest of the world, raising concerns about technolo...[truncated]" - }, - { - "dimension": "parental_status", - "relevance": "Parents and caregivers are likely to feel acute anxiety about what kind of world their children will inherit \u2014 whether ASI represents a utopian future or an existential risk \u2014 making the long-term saf...[truncated]" - }, - { - "dimension": "race_ethnicity", - "relevance": "Racial and ethnic minority communities, who have historically been marginalized by technological and economic shifts, may be especially skeptical of who controls ASI and who benefits, raising concerns...[truncated]" - } - ] - }, - "name": "identity_dimensions", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1417, - "output_tokens": 648, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_214204_317191_claude_reasoning_call.json b/examples/logs/20260217_214204_317191_claude_reasoning_call.json deleted file mode 100644 index 96f3e69..0000000 --- a/examples/logs/20260217_214204_317191_claude_reasoning_call.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "timestamp": "2026-02-17T21:42:04.317246", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 19529 - }, - "response": { - "id": "msg_01TxtmieAfZCzmmGGSc8Qyji", - "content": [ - { - "id": "toolu_0154YzRXg7UNcnA44AiTUfYV", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "type": "float", - "category": "population_specific", - "description": "Degree of understanding of AI systems, machine learning concepts, and their societal implications (0\u20131 scale), grounded in prior tech exposure and education.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation", - "age" - ], - "semantic_type": null - }, - { - "name": "asi_belief", - "type": "categorical", - "category": "population_specific", - "description": "Person's belief about whether the demonstrated ASI is real and as capable as claimed (Fully believes, Mostly believes, Skeptical, Thinks it's fabricated/overhyped).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "trust_in_institutions", - "ai_literacy", - "susceptibility_to_misinformation" - ] - }, - { - "name": "job_automation_risk_perception", - "type": "float", - "category": "population_specific", - "description": "Person's perceived likelihood that their own job or livelihood will be made redundant by ASI within 12 months (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "ai_literacy", - "employment_status" - ] - }, - { - "name": "asi_emotional_response", - "type": "categorical", - "category": "population_specific", - "description": "Dominant emotional orientation toward the ASI event (Excited/Hopeful, Anxious/Fearful, Angry/Resentful, Indifferent, Mixed).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "neuroticism", - "openness", - "asi_belief" - ] - }, - { - "name": "asi_governance_stance", - "type": "categorical", - "category": "population_specific", - "description": "Preferred policy stance on how ASI should be governed (Immediate global moratorium, Strict national regulation, Light-touch oversight, Full open access, No opinion).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_ideology", - "asi_belief", - "ai_literacy" - ] - }, - { - "name": "chronic_illness_in_household", - "type": "boolean", - "category": "population_specific", - "description": "Whether any household member currently has a serious chronic illness (cancer, Alzheimer's, ALS, diabetes, HIV, etc.) that ASI-developed cures could directly address.", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "age", - "household_size" - ] - }, - { - "name": "asi_cure_personal_stake", - "type": "float", - "category": "population_specific", - "description": "Degree to which the person has personal or familial stake in ASI-developed medical breakthroughs (0 = none, 1 = directly life-altering for self or close family member).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "chronic_illness_in_household", - "age" - ] - }, - { - "name": "financial_resilience", - "type": "float", - "category": "population_specific", - "description": "Ability to financially weather economic disruption from ASI-driven labor market changes, based on savings, assets, and income stability (0\u20131 scale).", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "household_income", - "homeownership", - "employment_status" - ] - }, - { - "name": "tech_adoption_propensity", - "type": "float", - "category": "population_specific", - "description": "Likelihood of being an early adopter of new ASI-enabled tools, products, or services (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "ai_literacy", - "age" - ] - }, - { - "name": "existential_risk_concern", - "type": "float", - "category": "population_specific", - "description": "Level of concern that self-improving ASI poses an existential or civilizational risk to humanity (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_literacy", - "neuroticism", - "asi_belief" - ] - }, - { - "name": "redistribution_preference", - "type": "float", - "category": "population_specific", - "description": "Preference for government-led redistribution of ASI-generated abundance (e.g., UBI, public ownership of AI infrastructure) vs. market-led distribution (0 = pure market, 1 = full redistribution).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_ideology", - "household_income", - "financial_resilience" - ] - }, - { - "name": "information_seeking_intensity", - "type": "float", - "category": "population_specific", - "description": "How actively the person seeks out new information about ASI developments, cures, and societal changes after the announcement (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "need_for_cognition", - "asi_belief", - "ai_literacy" - ] - }, - { - "name": "social_network_asi_sentiment", - "type": "categorical", - "category": "population_specific", - "description": "Dominant ASI sentiment in the person's immediate social network (Mostly positive, Mostly negative, Divided, Mostly indifferent), influencing opinion formation.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_affiliation", - "urban_rural", - "education_level" - ] - } - ], - "include_big_five": false, - "notes": "Big Five traits already exist in the base population. No context-specific attributes are needed as there is no specific brand/product relationship. The 13 new attributes focus on: (1) cognitive/inform...[truncated]" - }, - "name": "attribute_selection", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 6015, - "output_tokens": 1774, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_214219_747754_claude_agentic_research.json b/examples/logs/20260217_214219_747754_claude_agentic_research.json deleted file mode 100644 index 89b2b7f..0000000 --- a/examples/logs/20260217_214219_747754_claude_agentic_research.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "timestamp": "2026-02-17T21:42:19.747915", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 11762 - }, - "response": { - "id": "msg_01XFQJXgsg5DrA46dAs9Byb2", - "content": [ - { - "id": "srvtoolu_01UaxQiAHispG44gwp1xuE5R", - "input": { - "query": "US adults country of residence distribution statistics 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=7008]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3636]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5512]", - "page_age": null, - "title": "Population Estimates Estimates of the Lawful Permanent", - "type": "web_search_result", - "url": "https://ohss.dhs.gov/sites/default/files/2024-11/2024_1108_ohss_lawful_permenent_resident_population_estimate_2024_and_revised_2023.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3636]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2024", - "type": "web_search_result", - "url": "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6848]", - "page_age": "3 days ago", - "title": "Immigration to the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Immigration_to_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6012]", - "page_age": null, - "title": "Population AMERICA IN FACTS 2025 DOWNLOAD THE FULL REPORT", - "type": "web_search_result", - "url": "https://media.usafacts.org/m/56f7fa7cbf9d5138/original/USAFacts_2025_DIGITAL_Population.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=332]", - "page_age": null, - "title": "Geographic distribution 2023-2024 | MIT Registrar", - "type": "web_search_result", - "url": "https://registrar.mit.edu/statistics-reports/geographic-distribution/2023-2024" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4092]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2024", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6288]", - "page_age": null, - "title": "Population in the U.S. 2025| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183457/united-states-resident-population/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1772]", - "page_age": null, - "title": "United States Demographics 2026 (Population, Age, Sex, Trends) - Worldometer", - "type": "web_search_result", - "url": "https://www.worldometers.info/demographics/us-demographics/" - } - ], - "tool_use_id": "srvtoolu_01UaxQiAHispG44gwp1xuE5R", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=412]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01TSUPZVUtvix9mevM1TTBHX", - "input": { - "attributes": [ - { - "name": "country", - "distribution": { - "type": "categorical", - "options": [ - "United States" - ], - "weights": [ - 1.0 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights) == 1.0", - "reason": "Categorical weights must sum to 1.0; only one country option is valid for this US-scoped population." - }, - { - "type": "spec_expression", - "value": null, - "expression": "len(options) == 1", - "reason": "Population is explicitly scoped to US residents only per simulation specification." - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "note": "The simulation is explicitly defined as 'in US' \u2014 all 10,000 agents are US residents. Country is a degenerate constant (United States, p=1.0). The US Census Bureau estimated 341.8 million US residents...[truncated]" - } - } - ] - }, - "name": "independent_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 24862, - "output_tokens": 596, - "server_tool_use": { - "web_search_requests": 1, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://media.usafacts.org/m/56f7fa7cbf9d5138/original/USAFacts_2025_DIGITAL_Population.pdf", - "https://en.wikipedia.org/wiki/Demographics_of_the_United_States", - "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html", - "https://www.statista.com/statistics/183457/united-states-resident-population/", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "https://registrar.mit.edu/statistics-reports/geographic-distribution/2023-2024", - "https://en.wikipedia.org/wiki/Immigration_to_the_United_States", - "https://ohss.dhs.gov/sites/default/files/2024-11/2024_1108_ohss_lawful_permenent_resident_population_estimate_2024_and_revised_2023.pdf", - "https://www.worldometers.info/demographics/us-demographics/", - "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_214358_395351_claude_agentic_research.json b/examples/logs/20260217_214358_395351_claude_agentic_research.json deleted file mode 100644 index 2472911..0000000 --- a/examples/logs/20260217_214358_395351_claude_agentic_research.json +++ /dev/null @@ -1,1188 +0,0 @@ -{ - "timestamp": "2026-02-17T21:43:58.395387", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 16076 - }, - "response": { - "id": "msg_01W3kiyFUmfYHsh6q14Ur29H", - "content": [ - { - "id": "srvtoolu_01SUPhMNuSz9yHFQSkDU6kaD", - "input": { - "query": "AI literacy US adults 2024 survey statistics education level" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01KikTpGULVPRdxes4ssPMCp", - "input": { - "query": "American public trust artificial intelligence 2024 poll belief skepticism" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01EzhHsnWhbH6NQoeLVmt5KK", - "input": { - "query": "job automation fear AI workers survey 2024 by occupation" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5500]", - "page_age": "March 31, 2025", - "title": "AI Literacy Review \u2013 March 11, 2025 - AI Literacy Institute", - "type": "web_search_result", - "url": "https://ailiteracy.institute/ai-literacy-review-march-11-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6580]", - "page_age": null, - "title": "U.S. Adults Score on Par With International Average in Literacy Skills, Below International Average in Numeracy and Problem-Solving Skills in ...", - "type": "web_search_result", - "url": "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1732]", - "page_age": "November 17, 2025", - "title": "US Map Reveals Adult Literacy Rates by State - Beyond Basics", - "type": "web_search_result", - "url": "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4064]", - "page_age": "April 14, 2023", - "title": "2024-2025 Literacy Statistics | National Literacy Institute", - "type": "web_search_result", - "url": "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3928]", - "page_age": null, - "title": "The Decline of Literacy and the Rise of AI: Are We Losing the Ability to Think? \u2013 The Express", - "type": "web_search_result", - "url": "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3772]", - "page_age": "October 23, 2024", - "title": "Literacy and Numeracy Skills of U.S. Adults", - "type": "web_search_result", - "url": "https://nationalcoalitionforliteracy.org/about-adult-literacy/piaac/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6612]", - "page_age": "3 weeks ago", - "title": "Literacy in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Literacy_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4860]", - "page_age": "November 11, 2025", - "title": "20 Statistics on AI in Education to Guide Your Learning Strategy in 2025", - "type": "web_search_result", - "url": "https://www.engageli.com/blog/ai-in-education-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4152]", - "page_age": "January 9, 2026", - "title": "The Latest AI in Education Statistics (2026) - Programs.com", - "type": "web_search_result", - "url": "https://programs.com/resources/ai-education-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2068]", - "page_age": "December 11, 2024", - "title": "Survey: Growing number of U.S. adults lack literacy skills", - "type": "web_search_result", - "url": "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498" - } - ], - "tool_use_id": "srvtoolu_01SUPhMNuSz9yHFQSkDU6kaD", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5248]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4336]", - "page_age": "December 4, 2025", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5400]", - "page_age": "November 12, 2025", - "title": "What Americans Really Think About AI Algorithms: Public Confidence and Transparency in Government - Cornell Brooks Public Policy", - "type": "web_search_result", - "url": "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3024]", - "page_age": "January 27, 2025", - "title": "Poll finds bipartisan concern about use of artificial intelligence in 2024 elections | University of Chicago News", - "type": "web_search_result", - "url": "https://news.uchicago.edu/story/poll-finds-bipartisan-concern-about-use-artificial-intelligence-2024-elections" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3252]", - "page_age": "April 17, 2025", - "title": "Many Americans share mistrust of artificial intelligence: Survey", - "type": "web_search_result", - "url": "https://thehill.com/policy/technology/5253632-americans-trust-artificial-intelligence-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2700]", - "page_age": "April 9, 2024", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5520]", - "page_age": "September 1, 2025", - "title": "Polls", - "type": "web_search_result", - "url": "https://techpolicyhub.com/docs/polls/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6672]", - "page_age": null, - "title": "Exploring the artificial intelligence \u201cTrust paradox\u201d: Evidence from a survey experiment in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC10353804/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5292]", - "page_age": "March 14, 2025", - "title": "Americans are increasingly skeptical about AI's effects | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1048]", - "page_age": "April 8, 2025", - "title": "Americans and AI Experts Split on Artificial Intelligence\u2019s Future, Pew Study Finds - BABL AI", - "type": "web_search_result", - "url": "https://babl.ai/americans-and-ai-experts-split-on-artificial-intelligences-future-pew-study-finds/" - } - ], - "tool_use_id": "srvtoolu_01KikTpGULVPRdxes4ssPMCp", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5256]", - "page_age": "May 30, 2025", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6568]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1780]", - "page_age": "October 11, 2025", - "title": "Top 40 Jobs at Risk from AI: What Automation Means for the Future of Work", - "type": "web_search_result", - "url": "https://www.provenroi.com/top-40-jobs-at-risk-from-ai-what-automation-means-for-the-future-of-work/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5488]", - "page_age": "October 16, 2025", - "title": "Visualizing the Top 40 Jobs at Risk From AI", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/top-40-jobs-at-risk-from-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5780]", - "page_age": null, - "title": "Top 20 Predictions from Experts on AI Job Loss", - "type": "web_search_result", - "url": "https://research.aimultiple.com/ai-job-loss/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2928]", - "page_age": null, - "title": "Higher job automation risk in routine and precarious work, CEDEFOP AI skill survey finds | Healthy Workplaces - Safe and healthy work in the digital age 2023-2025", - "type": "web_search_result", - "url": "https://healthy-workplaces.osha.europa.eu/en/media-centre/news/higher-job-automation-risk-routine-and-precarious-work-cedefop-ai-skill-survey-finds" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5640]", - "page_age": "February 26, 2025", - "title": "AI Disruption: 9 in 10 Workers Fear Job Loss to Automation", - "type": "web_search_result", - "url": "https://www.resume-now.com/job-resources/careers/ai-disruption-report" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1800]", - "page_age": "November 5, 2024", - "title": "28% of workers fear AI will diminish or replace their role: survey | CFO Dive", - "type": "web_search_result", - "url": "https://www.cfodive.com/news/workers-fear-ai-diminish-replace-role-grantthornton/731972/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5484]", - "page_age": null, - "title": "Global Workforce Hopes and Fears Survey 2025 | PwC", - "type": "web_search_result", - "url": "https://www.pwc.com/gx/en/issues/workforce/hopes-and-fears.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5620]", - "page_age": null, - "title": "The 65 Jobs With the Lowest Risk of Automation by Artificial Intelligence and Robots - USCI", - "type": "web_search_result", - "url": "https://www.uscareerinstitute.edu/blog/65-jobs-with-the-lowest-risk-of-automation-by-ai-and-robots" - } - ], - "tool_use_id": "srvtoolu_01EzhHsnWhbH6NQoeLVmt5KK", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_012sWdYTBinWZLWXDHho8ZjP", - "input": { - "query": "chronic illness prevalence US adults household 2024 statistics cancer Alzheimer's diabetes" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01ECb6XUszMmvUBVMXgVFsMm", - "input": { - "query": "AI governance regulation opinion poll 2024 UBI redistribution support political ideology" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5700]", - "page_age": null, - "title": "Chronic Disease Prevalence in the US: Sociodemographic and Geographic Variations by Zip Code Tabulation Area", - "type": "web_search_result", - "url": "https://www.cdc.gov/pcd/issues/2024/23_0267.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5544]", - "page_age": null, - "title": "Projecting the chronic disease burden among the adult population in the United States using a multi-state population model - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC9881650/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5704]", - "page_age": null, - "title": "Explore Multiple Chronic Conditions in the United States | AHR", - "type": "web_search_result", - "url": "https://www.americashealthrankings.org/explore/measures/CHC" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5440]", - "page_age": null, - "title": "Trends in Multiple Chronic Conditions Among US Adults, By Life Stage, Behavioral Risk Factor Surveillance System, 2013\u20132023", - "type": "web_search_result", - "url": "https://www.cdc.gov/pcd/issues/2025/24_0539.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5768]", - "page_age": null, - "title": "The Growing Burden of Chronic Diseases", - "type": "web_search_result", - "url": "https://nihcm.org/publications/the-growing-burden-of-chronic-diseases" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5868]", - "page_age": null, - "title": "The Burden of Chronic Disease - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC10830426/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5592]", - "page_age": "July 1, 2025", - "title": "Primer: Chronic Disease Among Adults in the United States - AAF", - "type": "web_search_result", - "url": "https://www.americanactionforum.org/insight/primer-chronic-disease-among-adults-in-the-united-states/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6304]", - "page_age": null, - "title": "Trends in Multiple Chronic Conditions Among US Adults, By Life Stage, Behavioral Risk Factor Surveillance System, 2013\u20132023 - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12007472/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4508]", - "page_age": null, - "title": "Get the Facts on Healthy Aging", - "type": "web_search_result", - "url": "https://www.ncoa.org/article/get-the-facts-on-healthy-aging/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5440]", - "page_age": "August 14, 2025", - "title": "Fast Facts: Health and Economic Costs of Chronic Conditions | Chronic Disease | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/chronic-disease/data-research/facts-stats/index.html" - } - ], - "tool_use_id": "srvtoolu_012sWdYTBinWZLWXDHho8ZjP", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4132]", - "page_age": "April 17, 2025", - "title": "What the public thinks about AI and the implications for governance | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5728]", - "page_age": "October 14, 2024", - "title": "Frontiers | Political ideology shapes support for the use of AI in policy-making", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2024.1447171/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4380]", - "page_age": "October 29, 2025", - "title": "Americans Prioritize AI Safety and Data Security", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/694685/americans-prioritize-safety-data-security.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6372]", - "page_age": null, - "title": "1 The Politics of AI: Will Bipartisanship Last or Is Polarization Inevitable?", - "type": "web_search_result", - "url": "https://isps.yale.edu/sites/default/files/files/Politics-of-AI-DanielSchiff-2024_03_30.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5388]", - "page_age": "November 21, 2025", - "title": "Years of Polling Show Overwhelming Voter Support for a Crackdown on AI - Public Citizen", - "type": "web_search_result", - "url": "https://www.citizen.org/article/years-of-polling-show-overwhelming-voter-support-for-a-crackdown-on-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5628]", - "page_age": "March 9, 2022", - "title": "Public opinion lessons for AI regulation | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/public-opinion-lessons-for-ai-regulation/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3912]", - "page_age": "March 20, 2025", - "title": "New SRI/PEARL survey now published, reveals worldwide public opinion about AI \u2014 Schwartz Reisman Institute", - "type": "web_search_result", - "url": "https://srinstitute.utoronto.ca/news/public-opinion-ai-survey-24" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6760]", - "page_age": "September 29, 2025", - "title": "Frontiers | Geopolitics: AI and China; enabling ideology?", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/political-science/articles/10.3389/fpos.2025.1654697/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1736]", - "page_age": "July 17, 2025", - "title": "Poll finds bipartisan agreement on a key issue: regulating AI", - "type": "web_search_result", - "url": "https://www.minnpost.com/community-voices/2025/07/ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3228]", - "page_age": "April 7, 2025", - "title": "Overwhelming Majority of Voters Believe Tech Companies Should be Liable for Harm Caused by AI Models, Favor Reducing AI Proliferation and Law Requiring Political Ad Disclose Use of AI - AI Policy Inst...[truncated]", - "type": "web_search_result", - "url": "https://theaipi.org/poll-shows-voters-oppose-open-sourcing-ai-models-support-regulatory-representation-on-boards-and-say-ai-risks-outweigh-benefits-2/" - } - ], - "tool_use_id": "srvtoolu_01ECb6XUszMmvUBVMXgVFsMm", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=168]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJGoAljGyxemsan0WBoMvT0GgIsFCnarvaQYIjAKFmBb9n5OpLIc42RHp9sUX4HHCJ8FVbp0D86XCX2HbxJK5YRA0MAlBm1BwuqfJwAqGIOJ14dF5CF9QXhzndmmyAKlzKN5BZjp...[truncated]", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result_location", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - } - ], - "text": "[REDACTED_TEXT length=134]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIjo474QK70C66HerBoME1M/7zDKezR9cS7ZIjCeyoyEIBIb8MuVBeS+qfR7VjITW6wtVbHfERxFg8ueUGRQWKBKj5xzWG55SmigV6UqGJSzDtxnFEkLw96ez+YcnM5fGSQo2P5M...[truncated]", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - } - ], - "text": "[REDACTED_TEXT length=140]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEuNwSIDJtm/2yS0dxoM5CWzuxJiqjjkXQyuIjAEhwg7wnCdQyqndhylAYBrKRuyQ2xdCX8gqa9+d8AT16/dPbQ82gXGOQ60WKwdFRQqFFE9mV9dPVJhw8SzddEl7R0knsEqGAQ=", - "title": "28% of workers fear AI will diminish or replace their role: survey | CFO Dive", - "type": "web_search_result_location", - "url": "https://www.cfodive.com/news/workers-fear-ai-diminish-replace-role-grantthornton/731972/" - } - ], - "text": "[REDACTED_TEXT length=64]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOAnN968xziE1JBRYxoMMnMTNBBm4lm2UVz5IjBYmhuFa5jZy7gpp8D1iTeCoQnBXdsAkPq7axb8jOD7kWC2gb4XoKKUP/syvOz4KhQqFBgeosP9efiQ3nLF3ebTp1egqg8jGAQ=", - "title": "Americans Prioritize AI Safety and Data Security", - "type": "web_search_result_location", - "url": "https://news.gallup.com/poll/694685/americans-prioritize-safety-data-security.aspx" - } - ], - "text": "[REDACTED_TEXT length=96]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIsfl6FucozNsO37zRoMzfHtuOMqflzrj9uyIjAvsgs8RkdggKhjd7gx20oWPXwI/LYiSAZmVpSJKhTcAncvZBV5iNYiX5zQSIKRDnwqFDkHXgE20I1K+sC6cf66w87/iEL8GAQ=", - "title": "Trends in Multiple Chronic Conditions Among US Adults, By Life Stage, Behavioral Risk Factor Surveillance System, 2013\u20132023", - "type": "web_search_result_location", - "url": "https://www.cdc.gov/pcd/issues/2025/24_0539.htm" - } - ], - "text": "[REDACTED_TEXT length=140]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=136]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDA+Kohm7KSb5U45xnhoMSD4639fyYxsskGjJIjC6PaaNEJ3rGJblKwymcKQvt8Zijssu1/nxApEDDjgV4f1toPlv6zxzEJGGvD1h2nQqFac9ujxJt0HG0HU8mC4t6gQNfMn+MBgE", - "title": "Americans are increasingly skeptical about AI's effects | YouGov", - "type": "web_search_result_location", - "url": "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll" - } - ], - "text": "[REDACTED_TEXT length=115]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMkpJhh57ECK5MrEVhoMyN2ilq0DSFKUWVKkIjAXf3XWv5HJ6jXL/z6u0UpQWwVsSS5qIdrDkmvjHC8RY68Cth44xs+O5ocns8RyTGAqGJo8u1hWY6IMuN7Jo0cUbv9/YTsd0XQL...[truncated]", - "title": "What the public thinks about AI and the implications for governance | Brookings", - "type": "web_search_result_location", - "url": "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/" - } - ], - "text": "[REDACTED_TEXT length=214]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_018PNsdD4Dqc6pW3JujP28HZ", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "distribution": { - "type": "normal", - "mean": null, - "std": 0.18, - "mean_formula": "max(0.05, min(0.95, 0.38 + (0.10 if education_level in ['Bachelor\\'s', 'Graduate Degree'] else 0.05 if education_level in ['Associate\\'s', 'Some College'] else -0.08 if education_level in ['Less than ...[truncated]", - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Gallup/Bentley 2024: 64% of Americans self-report being at least somewhat knowledgeable about AI; knowledge drops sharply among adults 60+. Men more likely to report AI knowledge (72% vs. 57% women).", - "note": "Self-report AI literacy surveys measure perception not tested competency; occupation and education adjustments extrapolated from demographic breakdowns." - } - }, - { - "name": "asi_belief", - "distribution": { - "type": "categorical", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": [ - "Fully believes", - "Mostly believes", - "Skeptical", - "Thinks it's fabricated/overhyped" - ], - "weights": [ - 0.12, - 0.3, - 0.38, - 0.2 - ], - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew 2024: only 17% of Americans believe AI will have a very/somewhat positive impact; YouGov 2025: 44% say AI becoming smarter than humans is likely; Quinnipiac 2025: 75% trust AI-generated info only ...[truncated]", - "note": "ASI is unprecedented \u2014 no direct survey analogs exist. Distribution assumes a demonstrably verified ASI event shifts belief upward relative to baseline skepticism, but deep institutional distrust and ...[truncated]" - } - }, - { - "name": "job_automation_risk_perception", - "distribution": { - "type": "normal", - "mean": null, - "std": 0.2, - "mean_formula": "max(0.05, min(0.95, 0.38 + (0.20 if occupation == 'Sales' else 0.15 if occupation in ['Production', 'Management', 'Professional'] else 0.05 if occupation == 'Service' else -0.10 if occupation == 'Cons...[truncated]", - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Grant Thornton 2024: 28% of workers fear their job will be reduced or replaced by AI. Resume Now 2025: 89% of workers concerned about job security from AI. Microsoft Research 2024: knowledge workers (...[truncated]", - "note": "This is perceived risk, not objective risk. Perception tends to be inflated relative to actual displacement rates. Occupation-level adjustments based on Microsoft/Brookings AI exposure indices." - } - }, - { - "name": "asi_emotional_response", - "distribution": { - "type": "categorical", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": [ - "Excited/Hopeful", - "Anxious/Fearful", - "Angry/Resentful", - "Indifferent", - "Mixed" - ], - "weights": [ - 0.14, - 0.3, - 0.1, - 0.12, - 0.34 - ], - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "YouGov March 2024: 54% feel cautious, 49% concerned, 19% excited about AI. Pew 2024: only 11% of public more excited than concerned. Brookings 2025: skepticism and overwhelm increased further by March...[truncated]", - "note": "ASI scenario amplifies existing emotional distributions. Mixed is elevated because many respondents hold simultaneous hope (medical cures) and fear (job loss, existential risk). Base reflects pre-modi...[truncated]" - } - }, - { - "name": "asi_governance_stance", - "distribution": { - "type": "categorical", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": [ - "Immediate global moratorium", - "Strict national regulation", - "Light-touch oversight", - "Full open access", - "No opinion" - ], - "weights": [ - 0.18, - 0.44, - 0.18, - 0.06, - 0.14 - ], - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup/SCSP 2025: 80% of US adults favor maintaining AI safety rules even at cost of slower development. Citizen.org compilation: 77% say government should do more to regulate AI; only 7% want no regu...[truncated]", - "note": "Strong cross-partisan consensus for regulation. Moratorium option reflects the fraction demanding a full pause (YouGov 2023: 72% preferred slowing AI development). Full open access is a small minority...[truncated]" - } - }, - { - "name": "chronic_illness_in_household", - "distribution": { - "type": "boolean", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": 0.45 - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "CDC BRFSS 2025: 51.4% of US adults reported multiple chronic conditions, including 27.1% of young adults, 52.7% of midlife, and 78.8% of older adults. CDC: ~129 million Americans have at least one maj...[truncated]", - "note": "Threshold is serious chronic illness (cancer, Alzheimer's, ALS, diabetes, HIV) \u2014 narrower than all chronic conditions. Estimated at ~45% of households have at least one member with a qualifying seriou...[truncated]" - } - }, - { - "name": "asi_cure_personal_stake", - "distribution": { - "type": "beta", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": 1.2, - "beta": 3.5, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "No personal stake is valid floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Directly life-altering ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "CDC: ~129 million Americans have at least one major chronic disease (about 39% of population). Right-skewed beta distribution reflects that most people have low-to-moderate stake, while a meaningful m...[truncated]", - "note": "Alpha=1.2, Beta=3.5 produces a right-skewed distribution with mean ~0.26. Chronic_illness_in_household and age are primary upward modifiers. No direct survey analog for personal stake in AI medical cu...[truncated]" - } - }, - { - "name": "financial_resilience", - "distribution": { - "type": "normal", - "mean": null, - "std": 0.22, - "mean_formula": "max(0.05, min(0.95, 0.35 + (0.0000025 * min(household_income, 200000)) + (0.08 if homeownership else -0.05) + (0.05 if employment_status == 'Full-time' else 0.03 if employment_status == 'Self-employed...[truncated]", - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "PwC 2025: 55% of workforce experiencing financial strain, up from 52% in 2024. Federal Reserve SCF data shows homeownership and income are primary drivers of financial buffer. Brookings: workers in hi...[truncated]", - "note": "Composite measure of savings buffer, income stability, and asset base. Mean formula caps at 0.95 to avoid unrealistic certainty. The $200k income cap on the linear term prevents extreme income from do...[truncated]" - } - }, - { - "name": "tech_adoption_propensity", - "distribution": { - "type": "normal", - "mean": null, - "std": 0.18, - "mean_formula": "max(0.05, min(0.95, 0.42 + (0.18 * openness) + (0.15 * ai_literacy) + max(-0.20, -0.003 * (age - 30))))", - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "YouGov 2024: 44% of Americans under 30 use AI at least monthly vs. much lower rates for older adults. Gallup 2025: AI use at work nearly doubled 2024-2025 to 40% using at least a few times per year. P...[truncated]", - "note": "Openness and ai_literacy are weighted as joint drivers per Big Five literature on technology adoption. Age decay is mild per Roger's diffusion curve \u2014 older adults adopt later but do adopt." - } - }, - { - "name": "existential_risk_concern", - "distribution": { - "type": "normal", - "mean": null, - "std": 0.22, - "mean_formula": "max(0.02, min(0.98, 0.35 + (0.25 * neuroticism) + (0.15 * ai_literacy)))", - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "YouGov March 2025: 37% of Americans concerned AI could cause the end of the human race (14% very concerned). Pew 2024: 51% more concerned than excited about AI overall. YouGov 2025: 58% very concerned...[truncated]", - "note": "Base mean ~0.35 reflects the 37% who express existential concern. Neuroticism amplifies concern significantly. Higher ai_literacy is a moderate positive driver \u2014 informed awareness raises rather than ...[truncated]" - } - }, - { - "name": "redistribution_preference", - "distribution": { - "type": "normal", - "mean": null, - "std": 0.22, - "mean_formula": "max(0.02, min(0.98, 0.48 + (-0.18 if political_ideology in ['Conservative', 'Very Conservative'] else 0.18 if political_ideology in ['Very Liberal', 'Liberal'] else 0.0) + (-0.00000015 * min(household...[truncated]", - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor \u2014 pure market preference" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling \u2014 full redistribution preference" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Brookings 2024: automation concern increases support for compensatory redistributive policies. Gallup/Bentley 2024 and multiple polls show strong cross-partisan support for AI regulation. Yale/Schiff ...[truncated]", - "note": "Base near 0.48 reflects a slightly left-of-center American median on redistribution. Political ideology is the dominant modifier. Income has a small negative effect \u2014 higher earners favor market distr...[truncated]" - } - }, - { - "name": "information_seeking_intensity", - "distribution": { - "type": "normal", - "mean": null, - "std": 0.18, - "mean_formula": "max(0.05, min(0.95, 0.40 + (0.25 * need_for_cognition) + (0.12 * ai_literacy) + (0.08 if asi_belief in ['Fully believes', 'Mostly believes'] else -0.05 if asi_belief == 'Thinks it\\'s fabricated/overhy...[truncated]", - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew 2024: 55% of US adults want more control over how AI is used in their lives. Need for cognition literature consistently predicts information-seeking behavior. YouGov 2025: 54% feel cautious (assoc...[truncated]", - "note": "Need_for_cognition is the primary driver per established NFC literature. AI literacy raises baseline information-seeking. Belief in ASI raises urgency of seeking information; dismissal suppresses it." - } - }, - { - "name": "social_network_asi_sentiment", - "distribution": { - "type": "categorical", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": [ - "Mostly positive", - "Mostly negative", - "Divided", - "Mostly indifferent" - ], - "weights": [ - 0.18, - 0.25, - 0.4, - 0.17 - ], - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew 2024: deep divides between expert opinion (56% positive) and public (17% positive) suggest social networks will reflect mixed/divided sentiment broadly. YouGov March 2025: growing skepticism with ...[truncated]", - "note": "Divided is most common reflecting the broad distribution of views. Mostly negative reflects the plurality concerned/skeptical camp. Mostly positive is small and concentrated among tech-adjacent, highe...[truncated]" - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 118523, - "output_tokens": 6386, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://techpolicyhub.com/docs/polls/", - "https://nihcm.org/publications/the-growing-burden-of-chronic-diseases", - "https://news.uchicago.edu/story/poll-finds-bipartisan-concern-about-use-artificial-intelligence-2024-elections", - "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp", - "https://nationalcoalitionforliteracy.org/about-adult-literacy/piaac/", - "https://www.cdc.gov/pcd/issues/2025/24_0539.htm", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.americanactionforum.org/insight/primer-chronic-disease-among-adults-in-the-united-states/", - "https://www.pwc.com/gx/en/issues/workforce/hopes-and-fears.html", - "https://www.cdc.gov/pcd/issues/2024/23_0267.htm", - "https://www.cdc.gov/chronic-disease/data-research/facts-stats/index.html", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC10353804/", - "https://www.frontiersin.org/journals/political-science/articles/10.3389/fpos.2025.1654697/full", - "https://ailiteracy.institute/ai-literacy-review-march-11-2025/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12007472/", - "https://news.gallup.com/poll/694685/americans-prioritize-safety-data-security.aspx", - "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/", - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://www.uscareerinstitute.edu/blog/65-jobs-with-the-lowest-risk-of-automation-by-ai-and-robots", - "https://www.ncoa.org/article/get-the-facts-on-healthy-aging/", - "https://research.aimultiple.com/ai-job-loss/", - "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/", - "https://healthy-workplaces.osha.europa.eu/en/media-centre/news/higher-job-automation-risk-routine-and-precarious-work-cedefop-ai-skill-survey-finds", - "https://en.wikipedia.org/wiki/Literacy_in_the_United_States", - "https://www.cfodive.com/news/workers-fear-ai-diminish-replace-role-grantthornton/731972/", - "https://www.visualcapitalist.com/top-40-jobs-at-risk-from-ai/", - "https://www.provenroi.com/top-40-jobs-at-risk-from-ai-what-automation-means-for-the-future-of-work/", - "https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2024.1447171/full", - "https://www.nu.edu/blog/ai-job-statistics/", - "https://www.engageli.com/blog/ai-in-education-statistics", - "https://theaipi.org/poll-shows-voters-oppose-open-sourcing-ai-models-support-regulatory-representation-on-boards-and-say-ai-risks-outweigh-benefits-2/", - "https://srinstitute.utoronto.ca/news/public-opinion-ai-survey-24", - "https://programs.com/resources/ai-education-statistics/", - "https://www.citizen.org/article/years-of-polling-show-overwhelming-voter-support-for-a-crackdown-on-ai/", - "https://www.resume-now.com/job-resources/careers/ai-disruption-report", - "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll", - "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498", - "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/", - "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/", - "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx", - "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC9881650/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC10830426/", - "https://www.brookings.edu/articles/public-opinion-lessons-for-ai-regulation/", - "https://www.minnpost.com/community-voices/2025/07/ai/", - "https://babl.ai/americans-and-ai-experts-split-on-artificial-intelligences-future-pew-study-finds/", - "https://www.americashealthrankings.org/explore/measures/CHC", - "https://isps.yale.edu/sites/default/files/files/Politics-of-AI-DanielSchiff-2024_03_30.pdf", - "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics", - "https://thehill.com/policy/technology/5253632-americans-trust-artificial-intelligence-survey/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_214523_353716_claude_agentic_research.json b/examples/logs/20260217_214523_353716_claude_agentic_research.json deleted file mode 100644 index 9848ab1..0000000 --- a/examples/logs/20260217_214523_353716_claude_agentic_research.json +++ /dev/null @@ -1,1119 +0,0 @@ -{ - "timestamp": "2026-02-17T21:45:23.353773", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 21699 - }, - "response": { - "id": "msg_01V4CgKAmx4KJRzEkYnZvBMp", - "content": [ - { - "id": "srvtoolu_01AMMPrb97hhRRoZpSjALdeA", - "input": { - "query": "public opinion AI superintelligence trust belief skepticism survey 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_016LmjPisQoSZv9xuDdq2yow", - "input": { - "query": "American public emotional response AI existential risk anxiety hope survey 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01Vc6mVHo2L5c97pbgCTqzWL", - "input": { - "query": "AI job automation fear perception by occupation education poll 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4384]", - "page_age": "December 4, 2025", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5248]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4172]", - "page_age": "March 14, 2025", - "title": "Americans are increasingly skeptical about AI's effects | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3068]", - "page_age": null, - "title": "2023-2024 Survey of Public Attitudes on US Intelligence | Chicago Council on Global Affairs", - "type": "web_search_result", - "url": "https://globalaffairs.org/research/public-opinion-survey/2023-2024-survey-public-attitudes-us-intelligence" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5496]", - "page_age": "August 13, 2024", - "title": "How Much Do People Trust AI in 2024? \u2013 Unite.AI", - "type": "web_search_result", - "url": "https://www.unite.ai/how-much-do-people-trust-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4288]", - "page_age": null, - "title": "CHAPTER 8: Public Opinion", - "type": "web_search_result", - "url": "https://hai.stanford.edu/assets/files/hai_ai-index-report-2025_chapter8_final.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2152]", - "page_age": "April 17, 2025", - "title": "Most Americans in new survey have doubts about AI-generated info", - "type": "web_search_result", - "url": "https://thehill.com/policy/technology/5253632-americans-trust-artificial-intelligence-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=388]", - "page_age": null, - "title": "Public Opinion | The 2024 AI Index Report | Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3380]", - "page_age": "March 20, 2025", - "title": "New SRI/PEARL survey now published, reveals worldwide public opinion about AI \u2014 Schwartz Reisman Institute", - "type": "web_search_result", - "url": "https://srinstitute.utoronto.ca/news/public-opinion-ai-survey-24" - }, - { - "encrypted_content": "[REDACTED_TEXT length=468]", - "page_age": "November 12, 2025", - "title": "What Americans Really Think About AI Algorithms: Public Confidence and Transparency in Government - Cornell Brooks Public Policy", - "type": "web_search_result", - "url": "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/" - } - ], - "tool_use_id": "srvtoolu_01AMMPrb97hhRRoZpSjALdeA", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5632]", - "page_age": null, - "title": "Existential anxiety about artificial intelligence (AI)- is it the end of humanity era or a new chapter in the human revolution: questionnaire-based observational study - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11036542/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4248]", - "page_age": "December 31, 2025", - "title": "With AI\u2019s rise, hope and anxiety - Rochester BeaconRochester Beacon", - "type": "web_search_result", - "url": "https://rochesterbeacon.com/2025/12/24/with-ais-rise-hope-and-anxiety/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1720]", - "page_age": "January 25, 2024", - "title": "Weighing the Prophecies of AI Doom - IEEE Spectrum", - "type": "web_search_result", - "url": "https://spectrum.ieee.org/ai-existential-risk-survey" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5344]", - "page_age": "April 9, 2024", - "title": "Existential anxiety about artificial intelligence (AI)- is it the end of humanity era or a new chapter in the human revolution: questionnaire-based observational study - PubMed", - "type": "web_search_result", - "url": "https://pubmed.ncbi.nlm.nih.gov/38654726/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5068]", - "page_age": null, - "title": "TRENDS IN PUBLIC ATTITUDE TOWARDS EXISTENTIAL RISK AND ARTIFICIAL INTELLIGENCE", - "type": "web_search_result", - "url": "https://www.existentialriskobservatory.org/papers_and_reports/Trends%20in%20Public%20Attitude%20Towards%20Existential%20Risk%20And%20Artificial%20Intelligence.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5484]", - "page_age": "March 18, 2024", - "title": "Frontiers | Existential anxiety about artificial intelligence (AI)- is it the end of humanity era or a new chapter in the human revolution: questionnaire-based observational study", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/psychiatry/articles/10.3389/fpsyt.2024.1368122/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5392]", - "page_age": null, - "title": "Perceptions of AI Across Sectors: A Comparative Review of Public Attitudes", - "type": "web_search_result", - "url": "https://arxiv.org/pdf/2509.18233" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5548]", - "page_age": "April 17, 2025", - "title": "Existential risk narratives about AI do not distract from its immediate harms | PNAS", - "type": "web_search_result", - "url": "https://www.pnas.org/doi/10.1073/pnas.2419055122" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4232]", - "page_age": "September 8, 2025", - "title": "Frontiers | AI competence and sentiment: a mixed-methods study of attitudes and open-ended reflections", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2025.1658791/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4220]", - "page_age": "August 23, 2025", - "title": "America\u2019s AI Angst Revealed: Why Fear Now Outpaces Excitement | by Evolution AI Hub | Medium", - "type": "web_search_result", - "url": "https://medium.com/@evolutionaihub/americas-ai-angst-revealed-why-fear-now-outpaces-excitement-063681fa41ab" - } - ], - "tool_use_id": "srvtoolu_016LmjPisQoSZv9xuDdq2yow", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5808]", - "page_age": "March 9, 2022", - "title": "What jobs are affected by AI? Better-paid, better-educated workers face the most exposure | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/what-jobs-are-affected-by-ai-better-paid-better-educated-workers-face-the-most-exposure/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5432]", - "page_age": null, - "title": "Top 20 Predictions from Experts on AI Job Loss", - "type": "web_search_result", - "url": "https://research.aimultiple.com/ai-job-loss/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6684]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5332]", - "page_age": null, - "title": "OFFICE OF ECONOMIC POLICY Working Paper 2024-02 April 2024", - "type": "web_search_result", - "url": "https://home.treasury.gov/system/files/136/AI-Combined-PDF.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5536]", - "page_age": "May 30, 2025", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6348]", - "page_age": null, - "title": "AI Exposure and the Future of Work - Upjohn Research", - "type": "web_search_result", - "url": "https://research.upjohn.org/cgi/viewcontent.cgi?article=1319&context=reports" - }, - { - "encrypted_content": "[REDACTED_TEXT length=440]", - "page_age": null, - "title": "Young workers\u2019 employment drops in occupations with high AI exposure - Dallasfed.org", - "type": "web_search_result", - "url": "https://www.dallasfed.org/research/economics/2026/0106" - }, - { - "encrypted_content": "[REDACTED_TEXT length=476]", - "page_age": "August 20, 2025", - "title": "New Poll Finds 7 in 10 Americans Fear AI Job Loss", - "type": "web_search_result", - "url": "https://www.eweek.com/news/americans-fear-ai-job-loss-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6652]", - "page_age": null, - "title": "AI exposure predicts unemployment risk: A new approach to technology-driven job loss - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11983276/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5600]", - "page_age": "July 31, 2025", - "title": "Artificial intelligence and technological unemployment: Understanding trends, technology's adverse roles, and current mitigation guidelines - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/pii/S2199853125001428" - } - ], - "tool_use_id": "srvtoolu_01Vc6mVHo2L5c97pbgCTqzWL", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=2029]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01Cqs5bqq9yA5M3zWPd7AsDE", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "modifiers": [ - { - "when": "education_level in ['Bachelor\\'s', 'Graduate Degree'] and age < 45", - "multiply": 1.15, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma'] and age > 55", - "multiply": 0.9, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Management/Professional'", - "multiply": 1.1, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation in ['Construction/Extraction', 'Production/Transport']", - "multiply": 0.92, - "add": -0.03, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "asi_belief", - "modifiers": [ - { - "when": "trust_in_institutions > 0.65 and ai_literacy > 0.55", - "multiply": null, - "add": null, - "weight_overrides": { - "Fully believes": 0.42, - "Mostly believes": 0.38, - "Skeptical": 0.14, - "Thinks it's fabricated/overhyped": 0.06 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions > 0.65 and ai_literacy <= 0.55", - "multiply": null, - "add": null, - "weight_overrides": { - "Fully believes": 0.28, - "Mostly believes": 0.38, - "Skeptical": 0.24, - "Thinks it's fabricated/overhyped": 0.1 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions <= 0.35 and susceptibility_to_misinformation > 0.60", - "multiply": null, - "add": null, - "weight_overrides": { - "Fully believes": 0.18, - "Mostly believes": 0.22, - "Skeptical": 0.28, - "Thinks it's fabricated/overhyped": 0.32 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions <= 0.35 and susceptibility_to_misinformation <= 0.60", - "multiply": null, - "add": null, - "weight_overrides": { - "Fully believes": 0.12, - "Mostly believes": 0.28, - "Skeptical": 0.4, - "Thinks it's fabricated/overhyped": 0.2 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions > 0.35 and trust_in_institutions <= 0.65 and ai_literacy > 0.55", - "multiply": null, - "add": null, - "weight_overrides": { - "Fully believes": 0.28, - "Mostly believes": 0.42, - "Skeptical": 0.22, - "Thinks it's fabricated/overhyped": 0.08 - }, - "probability_override": null - }, - { - "when": "trust_in_institutions > 0.35 and trust_in_institutions <= 0.65 and ai_literacy <= 0.55", - "multiply": null, - "add": null, - "weight_overrides": { - "Fully believes": 0.18, - "Mostly believes": 0.35, - "Skeptical": 0.3, - "Thinks it's fabricated/overhyped": 0.17 - }, - "probability_override": null - } - ] - }, - { - "name": "job_automation_risk_perception", - "modifiers": [ - { - "when": "occupation == 'Management/Professional'", - "multiply": 1.25, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Sales/Office'", - "multiply": 1.3, - "add": 0.2, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": 1.2, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Service'", - "multiply": 1.1, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": 1.05, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Full-time' and ai_literacy > 0.55", - "multiply": 1.15, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Retired'", - "multiply": 0.8, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Student'", - "multiply": 1.1, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "asi_emotional_response", - "modifiers": [ - { - "when": "neuroticism > 0.65 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.08, - "Anxious/Fearful": 0.52, - "Angry/Resentful": 0.14, - "Indifferent": 0.04, - "Mixed": 0.22 - }, - "probability_override": null - }, - { - "when": "neuroticism > 0.65 and asi_belief == 'Skeptical'", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.06, - "Anxious/Fearful": 0.34, - "Angry/Resentful": 0.22, - "Indifferent": 0.12, - "Mixed": 0.26 - }, - "probability_override": null - }, - { - "when": "neuroticism > 0.65 and asi_belief == 'Thinks it\\'s fabricated/overhyped'", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.04, - "Anxious/Fearful": 0.18, - "Angry/Resentful": 0.36, - "Indifferent": 0.18, - "Mixed": 0.24 - }, - "probability_override": null - }, - { - "when": "neuroticism <= 0.35 and openness > 0.60 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.46, - "Anxious/Fearful": 0.14, - "Angry/Resentful": 0.05, - "Indifferent": 0.06, - "Mixed": 0.29 - }, - "probability_override": null - }, - { - "when": "neuroticism <= 0.35 and openness <= 0.60 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.22, - "Anxious/Fearful": 0.24, - "Angry/Resentful": 0.1, - "Indifferent": 0.14, - "Mixed": 0.3 - }, - "probability_override": null - }, - { - "when": "neuroticism > 0.35 and neuroticism <= 0.65 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.16, - "Anxious/Fearful": 0.32, - "Angry/Resentful": 0.1, - "Indifferent": 0.08, - "Mixed": 0.34 - }, - "probability_override": null - }, - { - "when": "neuroticism <= 0.35 and openness > 0.60 and asi_belief in ['Skeptical', 'Thinks it\\'s fabricated/overhyped']", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.18, - "Anxious/Fearful": 0.12, - "Angry/Resentful": 0.08, - "Indifferent": 0.32, - "Mixed": 0.3 - }, - "probability_override": null - }, - { - "when": "neuroticism > 0.35 and neuroticism <= 0.65 and asi_belief in ['Skeptical', 'Thinks it\\'s fabricated/overhyped']", - "multiply": null, - "add": null, - "weight_overrides": { - "Excited/Hopeful": 0.08, - "Anxious/Fearful": 0.22, - "Angry/Resentful": 0.2, - "Indifferent": 0.28, - "Mixed": 0.22 - }, - "probability_override": null - } - ] - }, - { - "name": "asi_governance_stance", - "modifiers": [ - { - "when": "political_ideology in ['Very Conservative', 'Conservative'] and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Immediate global moratorium": 0.18, - "Strict national regulation": 0.38, - "Light-touch oversight": 0.28, - "Full open access": 0.1, - "No opinion": 0.06 - }, - "probability_override": null - }, - { - "when": "political_ideology in ['Very Conservative', 'Conservative'] and asi_belief in ['Skeptical', 'Thinks it\\'s fabricated/overhyped']", - "multiply": null, - "add": null, - "weight_overrides": { - "Immediate global moratorium": 0.08, - "Strict national regulation": 0.22, - "Light-touch oversight": 0.36, - "Full open access": 0.22, - "No opinion": 0.12 - }, - "probability_override": null - }, - { - "when": "political_ideology in ['Very Liberal', 'Liberal'] and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Immediate global moratorium": 0.32, - "Strict national regulation": 0.42, - "Light-touch oversight": 0.12, - "Full open access": 0.04, - "No opinion": 0.1 - }, - "probability_override": null - }, - { - "when": "political_ideology in ['Very Liberal', 'Liberal'] and asi_belief in ['Skeptical', 'Thinks it\\'s fabricated/overhyped']", - "multiply": null, - "add": null, - "weight_overrides": { - "Immediate global moratorium": 0.18, - "Strict national regulation": 0.38, - "Light-touch oversight": 0.22, - "Full open access": 0.08, - "No opinion": 0.14 - }, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate' and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Immediate global moratorium": 0.22, - "Strict national regulation": 0.42, - "Light-touch oversight": 0.18, - "Full open access": 0.06, - "No opinion": 0.12 - }, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate' and asi_belief in ['Skeptical', 'Thinks it\\'s fabricated/overhyped']", - "multiply": null, - "add": null, - "weight_overrides": { - "Immediate global moratorium": 0.1, - "Strict national regulation": 0.28, - "Light-touch oversight": 0.3, - "Full open access": 0.12, - "No opinion": 0.2 - }, - "probability_override": null - }, - { - "when": "ai_literacy > 0.70 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": null, - "add": null, - "weight_overrides": { - "Immediate global moratorium": 0.3, - "Strict national regulation": 0.4, - "Light-touch oversight": 0.18, - "Full open access": 0.08, - "No opinion": 0.04 - }, - "probability_override": null - } - ] - }, - { - "name": "chronic_illness_in_household", - "modifiers": [ - { - "when": "age > 60 and household_size >= 2", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.52 - }, - { - "when": "age > 60 and household_size < 2", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.38 - }, - { - "when": "age > 40 and age <= 60 and household_size >= 3", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.38 - }, - { - "when": "age > 40 and age <= 60 and household_size < 3", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.28 - }, - { - "when": "age <= 40 and household_size >= 3", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.18 - }, - { - "when": "age <= 40 and household_size < 3", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.1 - } - ] - }, - { - "name": "asi_cure_personal_stake", - "modifiers": [ - { - "when": "chronic_illness_in_household == true and age > 60", - "multiply": 1.3, - "add": 0.28, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "chronic_illness_in_household == true and age > 40 and age <= 60", - "multiply": 1.2, - "add": 0.2, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "chronic_illness_in_household == true and age <= 40", - "multiply": 1.1, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "chronic_illness_in_household == false and age > 60", - "multiply": 1.05, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "chronic_illness_in_household == false and age <= 60", - "multiply": 0.9, - "add": -0.03, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "financial_resilience", - "modifiers": [ - { - "when": "employment_status == 'Unemployed' and household_income < 40000", - "multiply": 0.82, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Full-time' and household_income > 120000 and homeownership == true", - "multiply": 1.08, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "homeownership == false and household_income < 50000", - "multiply": 0.88, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Retired' and homeownership == true", - "multiply": 1.05, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "tech_adoption_propensity", - "modifiers": [ - { - "when": "openness > 0.65 and ai_literacy > 0.55 and age < 40", - "multiply": 1.22, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness > 0.65 and ai_literacy > 0.55 and age >= 40", - "multiply": 1.12, - "add": 0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness <= 0.35 and age > 60", - "multiply": 0.8, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy > 0.70 and age < 35", - "multiply": 1.18, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness <= 0.35 and ai_literacy <= 0.35", - "multiply": 0.85, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "existential_risk_concern", - "modifiers": [ - { - "when": "ai_literacy > 0.60 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": 1.3, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy > 0.60 and asi_belief in ['Skeptical', 'Thinks it\\'s fabricated/overhyped']", - "multiply": 1.05, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy <= 0.40 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": 1.2, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism > 0.65 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": 1.25, - "add": 0.16, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "neuroticism <= 0.35 and asi_belief in ['Thinks it\\'s fabricated/overhyped']", - "multiply": 0.88, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy <= 0.40 and asi_belief in ['Thinks it\\'s fabricated/overhyped']", - "multiply": 0.9, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "redistribution_preference", - "modifiers": [ - { - "when": "political_ideology in ['Very Liberal', 'Liberal'] and financial_resilience < 0.45", - "multiply": 1.2, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology in ['Very Liberal', 'Liberal'] and financial_resilience >= 0.45", - "multiply": 1.12, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology in ['Very Conservative', 'Conservative'] and financial_resilience > 0.65", - "multiply": 0.82, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology in ['Very Conservative', 'Conservative'] and financial_resilience <= 0.65", - "multiply": 0.88, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate' and financial_resilience < 0.35", - "multiply": 1.1, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "household_income < 35000 and political_ideology not in ['Very Conservative', 'Conservative']", - "multiply": 1.15, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "household_income > 150000 and political_ideology not in ['Very Liberal', 'Liberal']", - "multiply": 0.88, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "information_seeking_intensity", - "modifiers": [ - { - "when": "asi_belief in ['Fully believes', 'Mostly believes'] and need_for_cognition > 0.60", - "multiply": 1.28, - "add": 0.16, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "asi_belief in ['Fully believes', 'Mostly believes'] and need_for_cognition <= 0.60", - "multiply": 1.15, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "asi_belief == 'Skeptical' and need_for_cognition > 0.60", - "multiply": 1.18, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "asi_belief == 'Thinks it\\'s fabricated/overhyped' and need_for_cognition <= 0.40", - "multiply": 0.78, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "asi_belief == 'Thinks it\\'s fabricated/overhyped' and need_for_cognition > 0.40", - "multiply": 0.9, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy > 0.65 and asi_belief in ['Fully believes', 'Mostly believes']", - "multiply": 1.2, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "social_network_asi_sentiment", - "modifiers": [ - { - "when": "political_affiliation in ['Strong Democrat', 'Lean Democrat'] and education_level in ['Bachelor\\'s', 'Graduate Degree'] and urban_rural == 'Urban'", - "multiply": null, - "add": null, - "weight_overrides": { - "Mostly positive": 0.22, - "Mostly negative": 0.28, - "Divided": 0.38, - "Mostly indifferent": 0.12 - }, - "probability_override": null - }, - { - "when": "political_affiliation in ['Strong Democrat', 'Lean Democrat'] and urban_rural == 'Rural'", - "multiply": null, - "add": null, - "weight_overrides": { - "Mostly positive": 0.14, - "Mostly negative": 0.38, - "Divided": 0.34, - "Mostly indifferent": 0.14 - }, - "probability_override": null - }, - { - "when": "political_affiliation in ['Strong Republican', 'Lean Republican'] and urban_rural == 'Urban'", - "multiply": null, - "add": null, - "weight_overrides": { - "Mostly positive": 0.26, - "Mostly negative": 0.28, - "Divided": 0.32, - "Mostly indifferent": 0.14 - }, - "probability_override": null - }, - { - "when": "political_affiliation in ['Strong Republican', 'Lean Republican'] and urban_rural == 'Rural'", - "multiply": null, - "add": null, - "weight_overrides": { - "Mostly positive": 0.18, - "Mostly negative": 0.4, - "Divided": 0.3, - "Mostly indifferent": 0.12 - }, - "probability_override": null - }, - { - "when": "political_affiliation == 'Independent' and urban_rural == 'Suburban'", - "multiply": null, - "add": null, - "weight_overrides": { - "Mostly positive": 0.18, - "Mostly negative": 0.3, - "Divided": 0.38, - "Mostly indifferent": 0.14 - }, - "probability_override": null - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma'] and urban_rural == 'Rural'", - "multiply": null, - "add": null, - "weight_overrides": { - "Mostly positive": 0.12, - "Mostly negative": 0.44, - "Divided": 0.28, - "Mostly indifferent": 0.16 - }, - "probability_override": null - }, - { - "when": "education_level in ['Bachelor\\'s', 'Graduate Degree'] and urban_rural == 'Urban' and political_affiliation == 'Independent'", - "multiply": null, - "add": null, - "weight_overrides": { - "Mostly positive": 0.24, - "Mostly negative": 0.22, - "Divided": 0.42, - "Mostly indifferent": 0.12 - }, - "probability_override": null - } - ] - } - ] - }, - "name": "conditional_modifiers_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 51534, - "output_tokens": 8355, - "server_tool_use": { - "web_search_requests": 3, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://arxiv.org/pdf/2509.18233", - "https://www.existentialriskobservatory.org/papers_and_reports/Trends%20in%20Public%20Attitude%20Towards%20Existential%20Risk%20And%20Artificial%20Intelligence.pdf", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.unite.ai/how-much-do-people-trust-ai/", - "https://www.brookings.edu/articles/what-jobs-are-affected-by-ai-better-paid-better-educated-workers-face-the-most-exposure/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC11983276/", - "https://www.dallasfed.org/research/economics/2026/0106", - "https://research.upjohn.org/cgi/viewcontent.cgi?article=1319&context=reports", - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://research.aimultiple.com/ai-job-loss/", - "https://www.sciencedirect.com/science/article/pii/S2199853125001428", - "https://pubmed.ncbi.nlm.nih.gov/38654726/", - "https://www.pnas.org/doi/10.1073/pnas.2419055122", - "https://www.frontiersin.org/journals/psychiatry/articles/10.3389/fpsyt.2024.1368122/full", - "https://www.nu.edu/blog/ai-job-statistics/", - "https://www.eweek.com/news/americans-fear-ai-job-loss-survey/", - "https://srinstitute.utoronto.ca/news/public-opinion-ai-survey-24", - "https://hai.stanford.edu/assets/files/hai_ai-index-report-2025_chapter8_final.pdf", - "https://medium.com/@evolutionaihub/americas-ai-angst-revealed-why-fear-now-outpaces-excitement-063681fa41ab", - "https://rochesterbeacon.com/2025/12/24/with-ais-rise-hope-and-anxiety/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC11036542/", - "https://today.yougov.com/technology/articles/51803-americans-increasingly-skeptical-about-ai-artificial-intelligence-effects-poll", - "https://home.treasury.gov/system/files/136/AI-Combined-PDF.pdf", - "https://publicpolicy.cornell.edu/masters-blog/what-americans-really-think-about-ai-algorithms-public-confidence-and-transparency-in-government/", - "https://spectrum.ieee.org/ai-existential-risk-survey", - "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx", - "https://thehill.com/policy/technology/5253632-americans-trust-artificial-intelligence-survey/", - "https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2025.1658791/full", - "https://globalaffairs.org/research/public-opinion-survey/2023-2024-survey-public-attitudes-us-intelligence", - "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_214603_487094_claude_agentic_research.json b/examples/logs/20260217_214603_487094_claude_agentic_research.json deleted file mode 100644 index b0abf19..0000000 --- a/examples/logs/20260217_214603_487094_claude_agentic_research.json +++ /dev/null @@ -1,959 +0,0 @@ -{ - "timestamp": "2026-02-17T21:46:03.487165", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8077 - }, - "response": { - "id": "msg_01BK5zhfkksHNanMKcEYiQfb", - "content": [ - { - "id": "srvtoolu_01TEYcyZbYCf41EzYa2XASH3", - "input": { - "query": "US household composition by age group Census 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_011nd6gCc1Avf7aZ2md1U4yx", - "input": { - "query": "US interracial marriage same-race partner rates by ethnicity" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_015Y2jRxZnKXdvztcfUgu2nt", - "input": { - "query": "assortative mating education religion income correlation US couples" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2668]", - "page_age": null, - "title": "Age and Sex Composition in the United States: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4296]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3344]", - "page_age": null, - "title": "U.S. family households with children, by age of householder 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/898383/us-family-households-with-children-by-age-of-householder/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4656]", - "page_age": null, - "title": "Current Population Survey Data Tables", - "type": "web_search_result", - "url": "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2400]", - "page_age": null, - "title": "Age and Sex Tables", - "type": "web_search_result", - "url": "https://www.census.gov/topics/population/age-and-sex/data/tables.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5184]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5252]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1920]", - "page_age": null, - "title": "Census Bureau Releases New U.S. Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2023/population-estimates-age-sex.html" - } - ], - "tool_use_id": "srvtoolu_01TEYcyZbYCf41EzYa2XASH3", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=7072]", - "page_age": "January 5, 2026", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5868]", - "page_age": "April 14, 2024", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3064]", - "page_age": null, - "title": "Race, Ethnicity and Marriage in the United States", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2018/07/interracial-marriages.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5336]", - "page_age": null, - "title": "Most Americans Marry Within Their Race | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/most-americans-marry-within-their-race/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5332]", - "page_age": "January 15, 2026", - "title": "Interracial marriage - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6484]", - "page_age": null, - "title": "Marital Dissolution Among Interracial Couples - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5384]", - "page_age": "April 14, 2024", - "title": "Intermarriage in the U.S. 50 Years After Loving v. Virginia | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=372]", - "page_age": null, - "title": "The Growing Racial and Ethnic Divide in U.S. Marriage ...", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4850739/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2868]", - "page_age": "October 13, 2023", - "title": "growth in interracial marriage, 1980 vs 2021 - Working Immigrants", - "type": "web_search_result", - "url": "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5328]", - "page_age": null, - "title": "Who Marries Whom? The Role of Segregation by Race and Class by", - "type": "web_search_result", - "url": "https://www2.census.gov/ces/wp/2024/CES-WP-24-30.pdf" - } - ], - "tool_use_id": "srvtoolu_011nd6gCc1Avf7aZ2md1U4yx", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5752]", - "page_age": null, - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3568]", - "page_age": null, - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4176]", - "page_age": "April 14, 2024", - "title": "New academic study links rising income inequality to \u2018assortative mating\u2019 | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6448]", - "page_age": null, - "title": "Assortative Mating, Intergenerational Mobility, and Educational Inequality", - "type": "web_search_result", - "url": "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5824]", - "page_age": null, - "title": "Full article: Assortative mating, marital stability and the role of business cycles in the United States from 1968 to 2011", - "type": "web_search_result", - "url": "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6396]", - "page_age": "October 1, 2024", - "title": "Eight Decades of Educational Assortative Mating: A Research Note | Demography | Duke University Press", - "type": "web_search_result", - "url": "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5468]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income ...", - "type": "web_search_result", - "url": "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5856]", - "page_age": null, - "title": "Eight Decades of Educational Assortative Mating: A Research Note - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6520]", - "page_age": "February 10, 2015", - "title": "Income inequality and educational assortative mating: Evidence from the Luxembourg Income Study - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4300]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income Inequality | Journal of Political Economy: Vol 127, No 6", - "type": "web_search_result", - "url": "https://www.journals.uchicago.edu/doi/10.1086/702018" - } - ], - "tool_use_id": "srvtoolu_015Y2jRxZnKXdvztcfUgu2nt", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01FN91hdMVhnDHNcoGwDt1gM", - "input": { - "query": "US average household size 2023 Census single parent couple multigenerational percent by age" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01W8LjUMBENoRLjYGrV837t2", - "input": { - "query": "US partner age gap mean standard deviation marriage spousal age difference statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1368]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3012]", - "page_age": null, - "title": "In 2020, 7.2% of U.S. Family Households Were Multigenerational", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5372]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5644]", - "page_age": null, - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4228]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3620]", - "page_age": null, - "title": "Census Bureau Releases New Estimates on Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/families-living-arrangements.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3020]", - "page_age": "December 5, 2023", - "title": "How common are multigenerational households in the US? | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/articles/how-common-are-multigenerational-households/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3688]", - "page_age": null, - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1576]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2022/demo/families/cps-2022.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - } - ], - "tool_use_id": "srvtoolu_01FN91hdMVhnDHNcoGwDt1gM", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1332]", - "page_age": null, - "title": "Age Differences Among Coresidential Partners", - "type": "web_search_result", - "url": "https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5356]", - "page_age": null, - "title": "Age Differences in Marriage: Exploring Predictors of Marital ...", - "type": "web_search_result", - "url": "https://scholarsarchive.byu.edu/cgi/viewcontent.cgi?article=3571&context=etd" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5228]", - "page_age": null, - "title": "Age gaps between spouses in U.S., U.K., and India | Statistical Modeling, Causal Inference, and Social Science", - "type": "web_search_result", - "url": "https://statmodeling.stat.columbia.edu/2024/07/31/age-gap-between-spouses/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7800]", - "page_age": "18 hours ago", - "title": "Age disparity in sexual relationships - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Age_disparity_in_sexual_relationships" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1764]", - "page_age": null, - "title": "8.3.3.2 - Example: Marriage Age (Summarized Data) | STAT 200", - "type": "web_search_result", - "url": "https://online.stat.psu.edu/stat200/node/473" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2504]", - "page_age": null, - "title": "Age Differences Among Coresidential Partners Paul Hemez, Ph.D.", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/library/working-papers/2023/demo/sehsd-wp2023-10.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5324]", - "page_age": "August 15, 2024", - "title": "Growing share of US husbands and wives are roughly the same age | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1628]", - "page_age": "March 13, 2024", - "title": "Common Age Differences, Married Couples \u2013 FlowingData", - "type": "web_search_result", - "url": "https://flowingdata.com/2024/03/13/common-age-differences-married-couples/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2976]", - "page_age": "January 22, 2015", - "title": "What\u2019s The Average Age Difference In A Couple? | FiveThirtyEight", - "type": "web_search_result", - "url": "https://fivethirtyeight.com/features/whats-the-average-age-difference-in-a-couple/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5648]", - "page_age": null, - "title": "Who Marries Differently Aged Spouses? Ability, Education, Occupation, Earnings, and Appearance - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC6879192/" - } - ], - "tool_use_id": "srvtoolu_01W8LjUMBENoRLjYGrV837t2", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=164]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=118]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOHDnpf3GjvPCqozQRoMtWWOFDmOtRBA0T0dIjDDJxvsNUs4v5mfCnD1H6hL8ZmqAEGjn5rBea9B5lXUaYdLcg9wPysHRg5xh5wOZMQqFBsbu6cQKMvCfdzLA5X5FtJbzVpSGAQ=", - "title": "Growing share of US husbands and wives are roughly the same age | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/" - } - ], - "text": "[REDACTED_TEXT length=122]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAc7wRAiia8ZqLZgrRoMOYIO8hnR/yuFd+eaIjDaF0MgPVtG5aD23EBszfh2H+FSa9BTOScH5NajCvCVID9f+wXwjH7bgblQKSeTBfcqFGZ0yhTtW4/Vh3XXMMOAaDwkd91fGAQ=", - "title": "8.3.3.2 - Example: Marriage Age (Summarized Data) | STAT 200", - "type": "web_search_result_location", - "url": "https://online.stat.psu.edu/stat200/node/473" - }, - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDH292t1hDYZQGnxpBhoMZlAUvdRYXAkdEB49IjAjy9FK+NddEqPhwPeo6a6qPS/1I7RRUOuKeYliHrd5kdok223dseRLgOtFWog0wlcqFMwGXqsrHpLk/eDdWRBO4HrkaQ+TGAQ=", - "title": "8.3.3.2 - Example: Marriage Age (Summarized Data) | STAT 200", - "type": "web_search_result_location", - "url": "https://online.stat.psu.edu/stat200/node/473" - } - ], - "text": "[REDACTED_TEXT length=170]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIpkpG7YPB7y/wvaYhoMi3qdfEYC/BikauNvIjCA6WX+Y/tDyql0HtMzbzbsiDEh58Jg11x9CHxgGlxSoiyn1XYUL9ApomrxzbbAHV8qFINr/jRefRVGEZPjvQQPPfjVv5vRGAQ=", - "title": "Census Bureau Releases New Estimates on Families and Living Arrangements", - "type": "web_search_result_location", - "url": "https://www.census.gov/newsroom/press-releases/2024/families-living-arrangements.html" - } - ], - "text": "[REDACTED_TEXT length=91]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=132]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDGa85Z1Kcg8W03ATDhoMR/LBK+eMPsaHDGe3IjCZ9NeDJO26w1Q5M185UDKPimFYEKjm3a5pzDjEuAeTgVCvwPh0q47lzyTJDwwqg9EqFfavgmKtunkyzQSlqB1Sd3FOxrAXnBgE", - "title": "Census Bureau Releases New Estimates on Families and Living Arrangements", - "type": "web_search_result_location", - "url": "https://www.census.gov/newsroom/press-releases/2024/families-living-arrangements.html" - } - ], - "text": "[REDACTED_TEXT length=121]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDK3rDwO2r+BW3ByPTRoMx8AyumgCbIxD9f8AIjAoPl+8CHJd0t4mHEsFP3DT2qubrUxkgVZ1FWuaAK242CDYIC+5A1zZCx0M4oSc/hoqFCUBtSENNskmhgb6ydOUY4qFwObyGAQ=", - "title": "In 2020, 7.2% of U.S. Family Households Were Multigenerational", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html" - } - ], - "text": "[REDACTED_TEXT length=77]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDK/MRjQ5UB7YfTKCphoMsSbHpv+YkAkdN7MtIjB7EDgj7p9q82CY9a7Rw3YEncZys55QydvjYWpOMoaRUhy3lHBpwej04B87ry44IKwqFKuEapzQ3ZI9mkHrIi11q6ZyX6AXGAQ=", - "title": "Most Americans Marry Within Their Race | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/most-americans-marry-within-their-race/" - } - ], - "text": "[REDACTED_TEXT length=110]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHE2TYWoJppKy5bkcBoMEHrowdi9mbYlg0EnIjA2j5+bPezfZkWZPCnE6gldsaaGf7077dQsuWx0X4Rwc4dX1steae7Oif6RMVEjAqsqFJzk9WoUuqYDfGCOQ2J9VAo1nXWgGAQ=", - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result_location", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - } - ], - "text": "[REDACTED_TEXT length=168]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=114]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN5uR3GQSRYNMNvA9RoMIe3wKKDzhdZbsfDhIjCMFhivhR5JwbvSk++TbRabSWoHM0EnISctbZ1OtN79mPXkytjVBXZOyVYbN1EFZr0qFNB4yXKuciOhizRIqRN21kKp4FWkGAQ=", - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result_location", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - }, - { - "cited_text": "[REDACTED_TEXT length=121]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDLddDIL2bYSQGOqw6xoMWjA2d7hQ4URj57XQIjB0l5FFLP9inRPsiOLJheYNErAySrmvvCeJfbIUaUT5chvYSiv8oCo39Wz1nJ/5GzsqFH0OEX+xhWefyzTTmbh0z21K0SUHGAQ=", - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result_location", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - } - ], - "text": "[REDACTED_TEXT length=196]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNXyKDnI0HembGDRNRoMFcflb7hEAttOd1dYIjBs8GJI9yQs9Qi+d74ozm0HC1v2gj7BWaaksZCqqOMpPHsLruepbbEUYRC1YI9NBsAqFQYnIGtLjjpP4/5LC17cj/amPIGqVBgE", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=85]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFqXboMmY79bvYI9KxoMZZLvXQNyj4Ty8O0YIjAb3reqFKgWUD5KQFFt9TWjX9zBIVh6iSrT6OY+2DZZnE5Ieee5MqNyHiki5E5h5NkqFBALAvM+O+qxkDKsoipzoB9NA43lGAQ=", - "title": "How common are multigenerational households in the US? | USAFacts", - "type": "web_search_result_location", - "url": "https://usafacts.org/articles/how-common-are-multigenerational-households/" - } - ], - "text": "[REDACTED_TEXT length=165]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_014Y2stKppSNZjcPa7jqEi1f", - "input": { - "age_brackets": [ - { - "upper_bound": 30, - "label": "18-29" - }, - { - "upper_bound": 45, - "label": "30-44" - }, - { - "upper_bound": 65, - "label": "45-64" - }, - { - "upper_bound": 999, - "label": "65+" - } - ], - "household_type_weights": [ - { - "bracket": "18-29", - "types": [ - { - "type": "single", - "weight": 0.45 - }, - { - "type": "couple", - "weight": 0.22 - }, - { - "type": "single_parent", - "weight": 0.12 - }, - { - "type": "couple_with_kids", - "weight": 0.14 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "30-44", - "types": [ - { - "type": "single", - "weight": 0.22 - }, - { - "type": "couple", - "weight": 0.2 - }, - { - "type": "single_parent", - "weight": 0.13 - }, - { - "type": "couple_with_kids", - "weight": 0.38 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "45-64", - "types": [ - { - "type": "single", - "weight": 0.27 - }, - { - "type": "couple", - "weight": 0.38 - }, - { - "type": "single_parent", - "weight": 0.09 - }, - { - "type": "couple_with_kids", - "weight": 0.19 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "65+", - "types": [ - { - "type": "single", - "weight": 0.36 - }, - { - "type": "couple", - "weight": 0.49 - }, - { - "type": "single_parent", - "weight": 0.03 - }, - { - "type": "couple_with_kids", - "weight": 0.05 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - } - ], - "same_group_rates": [ - { - "group": "white", - "rate": 0.91 - }, - { - "group": "black", - "rate": 0.84 - }, - { - "group": "hispanic", - "rate": 0.74 - }, - { - "group": "asian", - "rate": 0.69 - }, - { - "group": "native_american", - "rate": 0.58 - }, - { - "group": "multiracial", - "rate": 0.45 - } - ], - "default_same_group_rate": 0.7, - "assortative_mating": [ - { - "attribute": "education_level", - "correlation": 0.65 - }, - { - "attribute": "religious_affiliation", - "correlation": 0.55 - }, - { - "attribute": "income_bracket", - "correlation": 0.58 - }, - { - "attribute": "political_affiliation", - "correlation": 0.65 - }, - { - "attribute": "race_ethnicity", - "correlation": 0.75 - }, - { - "attribute": "age", - "correlation": 0.8 - } - ], - "partner_age_gap_mean": -2.2, - "partner_age_gap_std": 5.0, - "min_adult_age": 18, - "child_min_parent_offset": 18, - "child_max_parent_offset": 45, - "max_dependent_child_age": 17, - "elderly_min_offset": 20, - "elderly_max_offset": 45, - "life_stages": [ - { - "max_age": 5, - "label": "preschool" - }, - { - "max_age": 11, - "label": "elementary" - }, - { - "max_age": 14, - "label": "middle_school" - }, - { - "max_age": 18, - "label": "high_school" - } - ], - "adult_stage_label": "adult", - "avg_household_size": 2.51, - "sources": [ - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html", - "https://www.census.gov/newsroom/press-releases/2024/families-living-arrangements.html", - "https://www.census.gov/content/dam/Census/library/working-papers/2023/demo/sehsd-wp2023-10.pdf", - "https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/", - "https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/", - "https://www.prb.org/resources/most-americans-marry-within-their-race/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "https://usafacts.org/articles/how-common-are-multigenerational-households/", - "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://fivethirtyeight.com/features/whats-the-average-age-difference-in-a-couple/" - ] - }, - "name": "household_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 118808, - "output_tokens": 2398, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://fivethirtyeight.com/features/whats-the-average-age-difference-in-a-couple/", - "https://www.census.gov/newsroom/press-releases/2023/population-estimates-age-sex.html", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/", - "https://www.statista.com/statistics/898383/us-family-households-with-children-by-age-of-householder/", - "https://en.wikipedia.org/wiki/Interracial_marriage", - "https://www.census.gov/topics/population/age-and-sex/data/tables.html", - "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "https://scholarsarchive.byu.edu/cgi/viewcontent.cgi?article=3571&context=etd", - "https://en.wikipedia.org/wiki/Age_disparity_in_sexual_relationships", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4850739/", - "https://online.stat.psu.edu/stat200/node/473", - "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/", - "https://www.census.gov/topics/families.html", - "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf", - "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf", - "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html", - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://www.census.gov/newsroom/press-releases/2024/families-living-arrangements.html", - "https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/", - "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514", - "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "https://www.journals.uchicago.edu/doi/10.1086/702018", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://www.census.gov/topics/families/families-and-households.html", - "https://www.census.gov/library/stories/2024/11/family-households.html", - "https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html", - "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/", - "https://www.prb.org/resources/most-americans-marry-within-their-race/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/", - "https://statmodeling.stat.columbia.edu/2024/07/31/age-gap-between-spouses/", - "https://www.census.gov/content/dam/Census/library/working-papers/2023/demo/sehsd-wp2023-10.pdf", - "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html", - "https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/", - "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf", - "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/", - "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A", - "https://flowingdata.com/2024/03/13/common-age-differences-married-couples/", - "https://www.census.gov/data/tables/2022/demo/families/cps-2022.html", - "https://www2.census.gov/ces/wp/2024/CES-WP-24-30.pdf", - "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909", - "https://usafacts.org/articles/how-common-are-multigenerational-households/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC6879192/", - "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_214629_150613_claude_reasoning_call.json b/examples/logs/20260217_214629_150613_claude_reasoning_call.json deleted file mode 100644 index c6b0b44..0000000 --- a/examples/logs/20260217_214629_150613_claude_reasoning_call.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "timestamp": "2026-02-17T21:46:29.150697", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8907 - }, - "response": { - "id": "msg_01MeXX6nbXhxUhaKdSBBJJZY", - "content": [ - { - "id": "toolu_01V1NKmUFyKiiMn8FTrMATWi", - "input": { - "event_type": "announcement", - "content": "[REDACTED_TEXT length=4797]", - "source": "OpenAI (confirmed independently by Anthropic, DeepMind, xAI, and China's Ministry of Science and Technology)", - "credibility": 0.92, - "ambiguity": 0.35, - "emotional_valence": 0.75, - "reasoning": "[REDACTED_TEXT length=2362]" - }, - "name": "event_parsing", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3002, - "output_tokens": 1667, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_214705_582878_claude_reasoning_call.json b/examples/logs/20260217_214705_582878_claude_reasoning_call.json deleted file mode 100644 index 55a5911..0000000 --- a/examples/logs/20260217_214705_582878_claude_reasoning_call.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "timestamp": "2026-02-17T21:47:05.582943", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 12517 - }, - "response": { - "id": "msg_01GjX3QtvLCkBrFGY265FSnu", - "content": [ - { - "id": "toolu_017GTzppypxEpXQWUzGbdRAJ", - "input": { - "channels": [ - { - "name": "major_broadcast_news", - "description": "Major TV and online news networks (CNN, Fox, NBC, NYT, AP, etc.) breaking news coverage of the ASI demonstration \u2014 the single largest story in human history would dominate every major outlet simultane...[truncated]", - "reach": "broadcast", - "credibility_modifier": 1.15 - }, - { - "name": "social_media_viral", - "description": "Viral spread across Twitter/X, YouTube, TikTok, Facebook, Instagram \u2014 clips of the live demo, reaction videos, threads dissecting the announcements, memes, and hot takes spreading at unprecedented spe...[truncated]", - "reach": "organic", - "credibility_modifier": 0.85 - }, - { - "name": "tech_professional_networks", - "description": "Targeted dissemination through professional and technical networks \u2014 LinkedIn, Hacker News, industry Slack groups, academic email lists, and direct colleague networks in STEM, finance, law, and medici...[truncated]", - "reach": "targeted", - "credibility_modifier": 1.25 - }, - { - "name": "word_of_mouth_community", - "description": "Informal person-to-person spread through friend and family networks \u2014 conversations at work, at home, at church, in community spaces \u2014 reaching those with lower digital/media engagement", - "reach": "organic", - "credibility_modifier": 0.95 - }, - { - "name": "alternative_skeptic_media", - "description": "Coverage by right-leaning media, alternative outlets, podcasts, and conspiracy-adjacent channels that frame the event with doubt, hype, or ideological spin \u2014 reaching low-trust, media-skeptical audien...[truncated]", - "reach": "targeted", - "credibility_modifier": 0.72 - } - ], - "rules": [ - { - "channel": "major_broadcast_news", - "when": "primary_news_source in ('TV', 'Online/Digital') and internet_access in ('Broadband', 'Mobile Only')", - "probability": 0.97, - "timestep": 0 - }, - { - "channel": "tech_professional_networks", - "when": "occupation in ('Professional', 'Management') and education_level in ('Bachelor\\'s', 'Graduate Degree') and social_media_platforms in ('Twitter/X', 'YouTube', 'None/Minimal')", - "probability": 0.95, - "timestep": 0 - }, - { - "channel": "social_media_viral", - "when": "social_media_hours_per_day >= 2.0 and social_media_platforms in ('Twitter/X', 'TikTok', 'YouTube', 'Instagram')", - "probability": 0.92, - "timestep": 1 - }, - { - "channel": "major_broadcast_news", - "when": "primary_news_source in ('Radio', 'Print Newspaper', 'Social Media')", - "probability": 0.88, - "timestep": 1 - }, - { - "channel": "alternative_skeptic_media", - "when": "trust_in_institutions < 0.35 and news_outlet_lean == 'Right-leaning' and primary_news_source in ('Online/Digital', 'Social Media', 'Radio')", - "probability": 0.85, - "timestep": 1 - }, - { - "channel": "social_media_viral", - "when": "social_media_hours_per_day >= 1.0 and social_media_platforms in ('Facebook', 'Instagram', 'TikTok')", - "probability": 0.8, - "timestep": 2 - }, - { - "channel": "word_of_mouth_community", - "when": "extraversion > 0.55 and social_media_hours_per_day < 1.0", - "probability": 0.7, - "timestep": 2 - }, - { - "channel": "major_broadcast_news", - "when": "primary_news_source == 'None' and age >= 55", - "probability": 0.65, - "timestep": 2 - }, - { - "channel": "word_of_mouth_community", - "when": "internet_access in ('Dial-up/Satellite', 'None') or primary_news_source == 'None'", - "probability": 0.72, - "timestep": 3 - }, - { - "channel": "alternative_skeptic_media", - "when": "trust_in_institutions < 0.45 and susceptibility_to_misinformation > 0.55 and political_affiliation in ('Strong Republican', 'Lean Republican')", - "probability": 0.75, - "timestep": 3 - }, - { - "channel": "word_of_mouth_community", - "when": "true", - "probability": 0.55, - "timestep": 4 - } - ], - "reasoning": "[REDACTED_TEXT length=3002]" - }, - "name": "seed_exposure", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3972, - "output_tokens": 2026, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_214740_744463_claude_reasoning_call.json b/examples/logs/20260217_214740_744463_claude_reasoning_call.json deleted file mode 100644 index ceaa1fe..0000000 --- a/examples/logs/20260217_214740_744463_claude_reasoning_call.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "timestamp": "2026-02-17T21:47:40.744485", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 5098 - }, - "response": { - "id": "msg_018FSuzRoiCS5R3XaxpG61By", - "content": [ - { - "id": "toolu_01N7R8TksXautK1s8ntTJpot", - "input": { - "primary_model": "broadcast_response", - "secondary_model": "direct_conversation", - "interaction_description": "OpenAI's ASI announcement originates from a highly credible, multi-source broadcast (OpenAI + four independent corroborators). In the first phase, agents receive the broadcast via news feeds, social m...[truncated]", - "share_probability": 0.65, - "share_modifiers": [ - { - "when": "social_media_hours_per_day > 3.0", - "multiply": 1.4, - "add": 0 - }, - { - "when": "social_media_hours_per_day < 1.0", - "multiply": 0.6, - "add": 0 - }, - { - "when": "age < 30", - "multiply": 1.35, - "add": 0 - }, - { - "when": "age > 65", - "multiply": 0.75, - "add": 0 - }, - { - "when": "openness > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "neuroticism > 0.7", - "multiply": 1.25, - "add": 0 - }, - { - "when": "need_for_cognition > 0.7", - "multiply": 1.2, - "add": 0 - }, - { - "when": "extraversion > 0.7", - "multiply": 1.2, - "add": 0 - }, - { - "when": "trust_in_institutions > 0.7", - "multiply": 1.15, - "add": 0 - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 0.8, - "add": 0 - }, - { - "when": "susceptibility_to_misinformation > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "education_level == 'graduate'", - "multiply": 1.25, - "add": 0 - }, - { - "when": "education_level == 'less_than_high_school'", - "multiply": 0.7, - "add": 0 - }, - { - "when": "occupation == 'technology'", - "multiply": 1.5, - "add": 0 - }, - { - "when": "occupation == 'researcher'", - "multiply": 1.4, - "add": 0 - }, - { - "when": "occupation == 'journalist'", - "multiply": 1.6, - "add": 0 - }, - { - "when": "civic_engagement == 'high'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "primary_news_source == 'social_media'", - "multiply": 1.35, - "add": 0 - }, - { - "when": "primary_news_source == 'none'", - "multiply": 0.5, - "add": 0 - }, - { - "when": "news_outlet_lean == 'far_right'", - "multiply": 0.75, - "add": 0 - }, - { - "when": "news_outlet_lean == 'far_left'", - "multiply": 1.1, - "add": 0 - }, - { - "when": "internet_access == 'none'", - "multiply": 0.2, - "add": 0 - }, - { - "when": "edge_type == 'friend'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "edge_type == 'family'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "edge_type == 'colleague'", - "multiply": 1.4, - "add": 0 - }, - { - "when": "political_ideology == 'very_conservative'", - "multiply": 0.8, - "add": 0 - }, - { - "when": "political_ideology == 'very_liberal'", - "multiply": 1.1, - "add": 0 - }, - { - "when": "religious_attendance == 'weekly'", - "multiply": 0.85, - "add": 0 - }, - { - "when": "urban_rural == 'urban'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "urban_rural == 'rural'", - "multiply": 0.85, - "add": 0 - } - ], - "decay_per_hop": 0.08, - "max_hops": "null", - "reasoning": "[REDACTED_TEXT length=3269]" - }, - "name": "interaction_model", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2435, - "output_tokens": 1992, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_214911_489866_claude_reasoning_call.json b/examples/logs/20260217_214911_489866_claude_reasoning_call.json deleted file mode 100644 index 12f9103..0000000 --- a/examples/logs/20260217_214911_489866_claude_reasoning_call.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "timestamp": "2026-02-17T21:49:11.489925", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 19529 - }, - "response": { - "id": "msg_01UbtC2W7oxq1QeH2YTeEkf3", - "content": [ - { - "id": "toolu_01EnuSKCCp2rEb5j7GUP14XV", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "type": "float", - "category": "population_specific", - "description": "Degree of technical understanding of AI systems, including how LLMs and machine learning work (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation" - ], - "identity_type": null - }, - { - "name": "prior_ai_tool_usage", - "type": "categorical", - "category": "population_specific", - "description": "Frequency of personal AI tool use before the ASI event (Never, Occasionally, Regularly, Power user).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_literacy", - "employment_status" - ] - }, - { - "name": "occupation_automation_risk", - "type": "float", - "category": "population_specific", - "description": "Estimated degree to which the person's occupation is structurally redundant given ASI-level cognitive capability (0=immune, 1=fully redundant).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "education_level" - ] - }, - { - "name": "asi_belief", - "type": "categorical", - "category": "population_specific", - "description": "Whether the person believes the ASI demonstration is genuine and the claims are accurate (Fully believes, Skeptical but open, Dismisses as exaggeration, Conspiracy/hoax framing).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "trust_in_institutions", - "susceptibility_to_misinformation", - "ai_literacy" - ] - }, - { - "name": "asi_emotional_valence", - "type": "categorical", - "category": "population_specific", - "description": "Dominant emotional orientation toward the ASI event and its implications (Excited/hopeful, Anxious/fearful, Ambivalent/uncertain, Indifferent, Angry/resentful).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "neuroticism", - "asi_belief", - "openness" - ] - }, - { - "name": "personal_health_stake", - "type": "boolean", - "category": "population_specific", - "description": "Whether the person or an immediate household member has a serious illness that ASI-developed cures (cancer, Alzheimer's, ALS, diabetes, HIV) could directly address.", - "strategy": "independent", - "scope": "household", - "depends_on": [] - }, - { - "name": "financial_resilience", - "type": "float", - "category": "population_specific", - "description": "Capacity to weather economic disruption from ASI-driven labor displacement, based on savings, assets, and income diversification (0\u20131 scale).", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "household_income", - "homeownership", - "employment_status" - ] - }, - { - "name": "asi_governance_stance", - "type": "categorical", - "category": "population_specific", - "description": "Preferred policy stance on ASI development and deployment (Accelerate with minimal regulation, Light-touch oversight, Strong international governance, Immediate pause/moratorium, No opinion).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_ideology", - "asi_belief", - "ai_literacy" - ] - }, - { - "name": "information_network_reach", - "type": "float", - "category": "population_specific", - "description": "Size and influence of the person's social information network \u2014 how many people they can reach with their views or actions (0=isolated, 1=highly networked/influential).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "extraversion", - "social_media_hours_per_day", - "social_media_platforms" - ] - }, - { - "name": "institutional_change_tolerance", - "type": "float", - "category": "population_specific", - "description": "Willingness to accept rapid, fundamental changes to existing social, economic, and political institutions driven by ASI (0=strongly resistant, 1=highly tolerant).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "political_ideology", - "trust_in_institutions" - ] - }, - { - "name": "asi_adoption_intent", - "type": "categorical", - "category": "population_specific", - "description": "Stated intent to personally adopt and use publicly available ASI tools once released (Early adopter, Will try eventually, Wait and see, Reluctant/Forced, Refuses to use).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_literacy", - "asi_emotional_valence", - "conscientiousness" - ] - }, - { - "name": "techno_optimism", - "type": "float", - "category": "personality", - "description": "Dispositional belief that technological progress leads to net positive outcomes for humanity (0\u20131 scale, independent of current AI views).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "need_for_cognition" - ] - } - ], - "include_big_five": false, - "notes": "Big Five already exist in base population \u2014 not re-included. Attributes are chosen to drive the key behavioral divergences in an ASI scenario: belief/denial of the event, emotional reactions, economic...[truncated]" - }, - "name": "attribute_selection", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 6015, - "output_tokens": 1618, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_215003_626185_claude_agentic_research.json b/examples/logs/20260217_215003_626185_claude_agentic_research.json deleted file mode 100644 index e0f837e..0000000 --- a/examples/logs/20260217_215003_626185_claude_agentic_research.json +++ /dev/null @@ -1,603 +0,0 @@ -{ - "timestamp": "2026-02-17T21:50:03.626227", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 11983 - }, - "response": { - "id": "msg_01H9ZBs4eraThNnrss599CxG", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=97]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01QGQBQiLxKTGPRhRhqxFJe6", - "input": { - "query": "percentage US adults with serious illness cancer Alzheimer's ALS diabetes HIV household 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4356]", - "page_age": null, - "title": "Projecting the chronic disease burden among the adult population in the United States using a multi-state population model - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC9881650/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6420]", - "page_age": null, - "title": "The Growing Burden of Chronic Diseases", - "type": "web_search_result", - "url": "https://nihcm.org/publications/the-growing-burden-of-chronic-diseases" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5656]", - "page_age": "July 1, 2025", - "title": "Primer: Chronic Disease Among Adults in the United States - AAF", - "type": "web_search_result", - "url": "https://www.americanactionforum.org/insight/primer-chronic-disease-among-adults-in-the-united-states/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2084]", - "page_age": null, - "title": "Explore Multiple Chronic Conditions in the United States | AHR", - "type": "web_search_result", - "url": "https://www.americashealthrankings.org/explore/measures/CHC" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6488]", - "page_age": null, - "title": "Trends in Multiple Chronic Conditions Among US Adults, By Life Stage, Behavioral Risk Factor Surveillance System, 2013\u20132023 - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12007472/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4568]", - "page_age": "April 30, 2024", - "title": "2024 Alzheimer's disease facts and figures - 2024 - Alzheimer's & Dementia - Wiley Online Library", - "type": "web_search_result", - "url": "https://alz-journals.onlinelibrary.wiley.com/doi/10.1002/alz.13809" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5432]", - "page_age": null, - "title": "2024 Alzheimer's disease facts and figures - PubMed", - "type": "web_search_result", - "url": "https://pubmed.ncbi.nlm.nih.gov/38689398/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4308]", - "page_age": null, - "title": "Get the Facts on Healthy Aging", - "type": "web_search_result", - "url": "https://www.ncoa.org/article/get-the-facts-on-healthy-aging/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4396]", - "page_age": null, - "title": "An Empirical Study of Chronic Diseases in the United States: A Visual Analytics Approach to Public Health - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5876976/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5376]", - "page_age": null, - "title": "52+ Senior Health Statistics, Facts & Trends", - "type": "web_search_result", - "url": "https://www.humancareny.com/blog/52-senior-health-statistics-facts-trends" - } - ], - "tool_use_id": "srvtoolu_01QGQBQiLxKTGPRhRhqxFJe6", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01GHDfFNp2H54xvLN6Kp3R1i", - "input": { - "query": "US cancer prevalence adults percentage 2024 CDC diabetes HIV prevalence statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": "January 13, 2026", - "title": "Cancer Data and Statistics | Cancer | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/cancer/data/index.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=256]", - "page_age": null, - "title": "United States Cancer Statistics: Data Visualizations", - "type": "web_search_result", - "url": "https://gis.cdc.gov/Cancer/USCS/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1676]", - "page_age": "June 11, 2025", - "title": "Highlights from 2025 U.S. Cancer Statistics | U.S. Cancer Statistics | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/united-states-cancer-statistics/publications/uscs-highlights.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=304]", - "page_age": "June 10, 2025", - "title": "United States Cancer Statistics (USCS) | U.S. Cancer Statistics | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/united-states-cancer-statistics/index.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6344]", - "page_age": "May 30, 2024", - "title": "The State of US Cancer Disparities in 2024 - CDPR24", - "type": "web_search_result", - "url": "https://cancerprogressreport.aacr.org/disparities/cdpr24-contents/cdpr24-the-state-of-us-cancer-disparities-in-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=348]", - "page_age": null, - "title": "United States Cancer Statistics Public Information Data", - "type": "web_search_result", - "url": "https://wonder.cdc.gov/cancer.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2508]", - "page_age": "June 2, 2025", - "title": "Cancer Prevalence | U.S. Cancer Statistics | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/united-states-cancer-statistics/technical-notes/cancer-prevalence.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3004]", - "page_age": "December 3, 2025", - "title": "About the U.S. Cancer Statistics Data Visualizations Tool | U.S. Cancer Statistics | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/united-states-cancer-statistics/dataviz/index.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=604]", - "page_age": null, - "title": "Cancer statistics, 2024 - PubMed", - "type": "web_search_result", - "url": "https://pubmed.ncbi.nlm.nih.gov/38230766/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4196]", - "page_age": "January 16, 2025", - "title": "Cancer statistics, 2025 - Siegel - 2025 - CA: A Cancer Journal for Clinicians - Wiley Online Library", - "type": "web_search_result", - "url": "https://acsjournals.onlinelibrary.wiley.com/doi/10.3322/caac.21871" - } - ], - "tool_use_id": "srvtoolu_01GHDfFNp2H54xvLN6Kp3R1i", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01KTcYSkSfCJZjfespAnokzw", - "input": { - "query": "cancer survivors prevalence US adults percentage 2024 approximately 18 million" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2524]", - "page_age": null, - "title": "Statistics and Graphs | Division of Cancer Control and Population Sciences (DCCPS)", - "type": "web_search_result", - "url": "https://cancercontrol.cancer.gov/ocs/statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5560]", - "page_age": "September 18, 2025", - "title": "Cancer in 2024 | AACR Cancer Progress Report 2024", - "type": "web_search_result", - "url": "https://cancerprogressreport.aacr.org/progress/cpr24-contents/cpr24-cancer-in-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3048]", - "page_age": null, - "title": "Cancer Statistics - NCI", - "type": "web_search_result", - "url": "https://www.cancer.gov/about-cancer/understanding/statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4312]", - "page_age": null, - "title": "Prevalence of cancer survivors in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11542986/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3040]", - "page_age": null, - "title": "New ACS Study: Number of Cancer Survivors in the U.S. Reaches 18.6 Million \u2014 Projected to Exceed 22 Million by 2035", - "type": "web_search_result", - "url": "https://pressroom.cancer.org/Cancer-Survivors-Increase" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5592]", - "page_age": "November 1, 2024", - "title": "Prevalence of cancer survivors in the United States | JNCI: Journal of the National Cancer Institute | Oxford Academic", - "type": "web_search_result", - "url": "https://academic.oup.com/jnci/article/116/11/1784/7713374" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2968]", - "page_age": "November 1, 2024", - "title": "Prevalence of cancer survivors in the United States - PubMed", - "type": "web_search_result", - "url": "https://pubmed.ncbi.nlm.nih.gov/39002121/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4172]", - "page_age": null, - "title": "Cancer treatment and survivorship statistics, 2022 - PubMed", - "type": "web_search_result", - "url": "https://pubmed.ncbi.nlm.nih.gov/35736631/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4312]", - "page_age": "July 29, 2024", - "title": "US cancer rates and trends: how have cancer rates and mortality changed over time? | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/articles/how-have-cancer-rates-changed-over-time/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4920]", - "page_age": null, - "title": "Prevalence of cancer survivors in the United States Emily Tonorezos", - "type": "web_search_result", - "url": "https://academic.oup.com/jnci/article-pdf/116/11/1784/60482933/djae135.pdf" - } - ], - "tool_use_id": "srvtoolu_01KTcYSkSfCJZjfespAnokzw", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01BP8f1cpeaSDCLDBiLHuY9C", - "input": { - "query": "US diabetes prevalence adults 2024 percentage HIV ALS prevalence statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1416]", - "page_age": null, - "title": "Diabetes in America: Prevalence, Statistics, and Economic Impact", - "type": "web_search_result", - "url": "https://diabetes.org/about-diabetes/statistics/about-diabetes" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3264]", - "page_age": null, - "title": "National Diabetes Statistics Report 2024", - "type": "web_search_result", - "url": "https://repository.gheli.harvard.edu/repository/11854/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5828]", - "page_age": null, - "title": "Is diabetes prevalence higher among HIV-infected individuals compared with the general population? Evidence from MMP and NHANES 2009\u20132010 - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5293823/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5212]", - "page_age": null, - "title": "Diabetes prevalence adults in selected countries 2024", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/236764/prevalence-of-diabetes-in-selected-countries/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5596]", - "page_age": null, - "title": "Products - Data Briefs - Number 516 - November 2024", - "type": "web_search_result", - "url": "https://www.cdc.gov/nchs/products/databriefs/db516.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2332]", - "page_age": "1 month ago", - "title": "National Diabetes Statistics Report | Diabetes | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/diabetes/php/data-research/index.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3764]", - "page_age": null, - "title": "Prevalence of Total, Diagnosed, and Undiagnosed Diabetes in Adults: United States, August 2021\u2013August 2023 - NCHS Data Briefs - NCBI Bookshelf", - "type": "web_search_result", - "url": "https://www.ncbi.nlm.nih.gov/books/NBK612760/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5500]", - "page_age": null, - "title": "National and State Diabetes Trends | CDC", - "type": "web_search_result", - "url": "https://archive.cdc.gov/www_cdc_gov/diabetes/library/reports/reportcard/national-state-diabetes-trends.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3292]", - "page_age": null, - "title": "340. Prevalence of Type II Diabetes Mellitus Among Patients Living with HIV in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC6810233/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=292]", - "page_age": null, - "title": "National Diabetes Statistics Report - United States Diabetes Surveillance System", - "type": "web_search_result", - "url": "https://gis.cdc.gov/grasp/diabetes/diabetesatlas-statsreport.html" - } - ], - "tool_use_id": "srvtoolu_01BP8f1cpeaSDCLDBiLHuY9C", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=177]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHphZGUzalykiwuxmxoMVRrGCDLL/LJrmSWyIjD9UuFBtWP6W/NCQ3WygH4ZNhadsI2N/6Lww4HUyFxc5W0qOoY/+P2mrajDUn6cQTsqFt6rg6KPVLJuAhg6N8iOoa25UR3IsPsY...[truncated]", - "title": "Statistics and Graphs | Division of Cancer Control and Population Sciences (DCCPS)", - "type": "web_search_result_location", - "url": "https://cancercontrol.cancer.gov/ocs/statistics" - } - ], - "text": "[REDACTED_TEXT length=141]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=16]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDBsii46R5r0ca3y3ZRoMWMJDz7tC4iRUiGzcIjDGKpVttkGaJQoJA98HZc6LKhf4gX5OomUtXxKLqj73oJdaM98lR/V0eRVDkidS1CEqFIqiMe/lW/8T/0shhAHuQSrgIwbvGAQ=", - "title": "National Diabetes Statistics Report | Diabetes | CDC", - "type": "web_search_result_location", - "url": "https://www.cdc.gov/diabetes/php/data-research/index.html" - } - ], - "text": "[REDACTED_TEXT length=130]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=1]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDGWtaD6ehH1GlRJgDhoMR/0+ZT288z28/7MSIjD/hZ45U+TsnweSEUuy5FIkKuoDAcrf3Uq3VICKjKC2nEt0myHyakjJtefMUXjpThwqFR22tDG0OG91wKcyYpO1Of4g41nBwBgE", - "title": "Products - Data Briefs - Number 516 - November 2024", - "type": "web_search_result_location", - "url": "https://www.cdc.gov/nchs/products/databriefs/db516.htm" - } - ], - "text": "[REDACTED_TEXT length=57]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=19]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=101]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDBvXaoowA7qyz8xfwxoMq74bwG45xoQqeDaBIjAhaSdYRUP05JEH9tsVZZlYyxOprLPfNw5QMG0bAXoVZiK7BMlBISQfbUQUPidKhSIqE1/3mWqcRY1T/7JaLTRsrzbb4J4YBA==", - "title": "2024 Alzheimer's disease facts and figures - PubMed", - "type": "web_search_result_location", - "url": "https://pubmed.ncbi.nlm.nih.gov/38689398/" - } - ], - "text": "[REDACTED_TEXT length=89]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=1424]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_016e4qKdYkPrxbGuwTcDhrJR", - "input": { - "attributes": [ - { - "name": "country", - "distribution": { - "type": "categorical", - "options": [ - "United States" - ], - "weights": [ - 1.0 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights) == 1.0", - "reason": "Categorical weights must sum to 1. This is a universal constant \u2014 all agents in this population are US residents by design." - }, - { - "type": "spec_expression", - "value": null, - "expression": "len(options) == 1", - "reason": "Only one valid value exists for this simulation scope: United States." - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Population spec: 'US adults aged 18+, representative of the national population by state'", - "note": "This is a definitional constant set by the simulation scope. All 10,000 agents are US residents. No sampling variance needed \u2014 every agent receives 'United States'." - } - }, - { - "name": "personal_health_stake", - "distribution": { - "type": "boolean", - "probability_true": 0.4, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "expression", - "value": null, - "expression": "personal_health_stake == True or personal_health_stake == False", - "reason": "Boolean type constraint \u2014 value must be True or False." - }, - { - "type": "expression", - "value": null, - "expression": "household_size >= 1", - "reason": "Household-level stake requires at least one household member. Agents with household_size >= 1 are eligible. All agents qualify by base spec." - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "CDC NHANES 2021-2023 (diabetes: 15.8% adults total, cdc.gov/nchs/products/databriefs/db516.htm); NCI DCCPS cancer survivors (18.6M = 5.4% of US population, cancercontrol.cancer.gov/ocs/statistics); Al...[truncated]", - "note": "Individual-level prevalences: cancer survivors ~5.4% (active/recent ~2-3% of total population after excluding very long-term survivors without ongoing disease burden); total diabetes ~15.8% of adults;...[truncated]" - } - } - ] - }, - "name": "independent_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 134752, - "output_tokens": 2118, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://pmc.ncbi.nlm.nih.gov/articles/PMC6810233/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5293823/", - "https://pressroom.cancer.org/Cancer-Survivors-Increase", - "https://acsjournals.onlinelibrary.wiley.com/doi/10.3322/caac.21871", - "https://www.ncbi.nlm.nih.gov/books/NBK612760/", - "https://pubmed.ncbi.nlm.nih.gov/39002121/", - "https://pubmed.ncbi.nlm.nih.gov/35736631/", - "https://www.cancer.gov/about-cancer/understanding/statistics", - "https://www.cdc.gov/united-states-cancer-statistics/dataviz/index.html", - "https://gis.cdc.gov/grasp/diabetes/diabetesatlas-statsreport.html", - "https://www.cdc.gov/nchs/products/databriefs/db516.htm", - "https://www.americanactionforum.org/insight/primer-chronic-disease-among-adults-in-the-united-states/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5876976/", - "https://academic.oup.com/jnci/article-pdf/116/11/1784/60482933/djae135.pdf", - "https://www.cdc.gov/united-states-cancer-statistics/technical-notes/cancer-prevalence.html", - "https://www.statista.com/statistics/236764/prevalence-of-diabetes-in-selected-countries/", - "https://wonder.cdc.gov/cancer.html", - "https://www.americashealthrankings.org/explore/measures/CHC", - "https://repository.gheli.harvard.edu/repository/11854/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC11542986/", - "https://cancercontrol.cancer.gov/ocs/statistics", - "https://cancerprogressreport.aacr.org/disparities/cdpr24-contents/cdpr24-the-state-of-us-cancer-disparities-in-2024/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC9881650/", - "https://www.ncoa.org/article/get-the-facts-on-healthy-aging/", - "https://nihcm.org/publications/the-growing-burden-of-chronic-diseases", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12007472/", - "https://archive.cdc.gov/www_cdc_gov/diabetes/library/reports/reportcard/national-state-diabetes-trends.html", - "https://pubmed.ncbi.nlm.nih.gov/38230766/", - "https://pubmed.ncbi.nlm.nih.gov/38689398/", - "https://academic.oup.com/jnci/article/116/11/1784/7713374", - "https://www.humancareny.com/blog/52-senior-health-statistics-facts-trends", - "https://usafacts.org/articles/how-have-cancer-rates-changed-over-time/", - "https://www.cdc.gov/united-states-cancer-statistics/publications/uscs-highlights.html", - "https://www.cdc.gov/cancer/data/index.html", - "https://www.cdc.gov/united-states-cancer-statistics/index.html", - "https://alz-journals.onlinelibrary.wiley.com/doi/10.1002/alz.13809", - "https://gis.cdc.gov/Cancer/USCS/", - "https://diabetes.org/about-diabetes/statistics/about-diabetes", - "https://www.cdc.gov/diabetes/php/data-research/index.html", - "https://cancerprogressreport.aacr.org/progress/cpr24-contents/cpr24-cancer-in-2024/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_215132_265363_claude_agentic_research.json b/examples/logs/20260217_215132_265363_claude_agentic_research.json deleted file mode 100644 index 957ea88..0000000 --- a/examples/logs/20260217_215132_265363_claude_agentic_research.json +++ /dev/null @@ -1,1012 +0,0 @@ -{ - "timestamp": "2026-02-17T21:51:32.265390", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 15834 - }, - "response": { - "id": "msg_01NPeCgiETZg6dFgsRjiRg7J", - "content": [ - { - "id": "srvtoolu_0182B3MnCX4xeYdhR7pR2C19", - "input": { - "query": "AI literacy US adults 2024 survey statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_0137uqJFfPiwXni6ueqyYoU2", - "input": { - "query": "AI tool usage frequency US adults 2024 survey" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01858UozDVD5udFN6DRAVKNm", - "input": { - "query": "occupation automation risk AI exposure index by job category 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5496]", - "page_age": "March 31, 2025", - "title": "AI Literacy Review \u2013 March 11, 2025 - AI Literacy Institute", - "type": "web_search_result", - "url": "https://ailiteracy.institute/ai-literacy-review-march-11-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4096]", - "page_age": null, - "title": "The Decline of Literacy and the Rise of AI: Are We Losing the Ability to Think? \u2013 The Express", - "type": "web_search_result", - "url": "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4140]", - "page_age": "April 14, 2023", - "title": "2024-2025 Literacy Statistics | National Literacy Institute", - "type": "web_search_result", - "url": "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3948]", - "page_age": null, - "title": "AI knowledge of U.S. adults 2024, by age", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7656]", - "page_age": "3 weeks ago", - "title": "Literacy in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Literacy_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2792]", - "page_age": "November 17, 2025", - "title": "US Map Reveals Adult Literacy Rates by State - Beyond Basics", - "type": "web_search_result", - "url": "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5628]", - "page_age": "September 27, 2024", - "title": "Frontiers | Artificial intelligence literacy among university students\u2014a comparative transnational survey", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6508]", - "page_age": "March 16, 2025", - "title": "Navigating the landscape of AI literacy education: insights from a decade of research (2014\u20132024) | Humanities and Social Sciences Communications", - "type": "web_search_result", - "url": "https://www.nature.com/articles/s41599-025-04583-8" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1800]", - "page_age": "December 11, 2024", - "title": "Survey: Growing number of U.S. adults lack literacy skills", - "type": "web_search_result", - "url": "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5516]", - "page_age": null, - "title": "U.S. Adults Score on Par With International Average in Literacy Skills, Below International Average in Numeracy and Problem-Solving Skills in ...", - "type": "web_search_result", - "url": "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp" - } - ], - "tool_use_id": "srvtoolu_0182B3MnCX4xeYdhR7pR2C19", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5560]", - "page_age": "November 25, 2025", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5464]", - "page_age": null, - "title": "Survey: 52% of U.S. adults now use AI large language models like ChatGPT | Today at Elon | Elon University", - "type": "web_search_result", - "url": "https://www.elon.edu/u/news/2025/03/12/survey-52-of-u-s-adults-now-use-ai-large-language-models-like-chatgpt/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3380]", - "page_age": "January 11, 2024", - "title": "AI Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2944]", - "page_age": "August 26, 2025", - "title": "New Research: 20% of Americans use AI tools 10X+/month, but growth is slowing and traditional search hasn't dipped - SparkToro", - "type": "web_search_result", - "url": "https://sparktoro.com/blog/new-research-20-of-americans-use-ai-tools-10x-month-but-growth-is-slowing-and-traditional-search-hasnt-dipped/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1152]", - "page_age": "September 10, 2025", - "title": "Global AI Users (2025) Insights on 1.1 Billion Active Users", - "type": "web_search_result", - "url": "https://resourcera.com/data/artificial-intelligence/ai-users/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5268]", - "page_age": "April 9, 2024", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4252]", - "page_age": "3 weeks ago", - "title": "A quarter of employed adults use AI at least a few times a week, with 6 in 10 tech workers using it frequently, Gallup says | Fortune", - "type": "web_search_result", - "url": "https://fortune.com/2026/01/25/ai-use-frequency-employed-adults-tech-workers-retail-manufacturing-gallup-poll/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4112]", - "page_age": "April 14, 2025", - "title": "How many people are using generative AI on a daily basis? A Gemini report \u2013 TechnoLlama", - "type": "web_search_result", - "url": "https://www.technollama.co.uk/a-gemini-report-how-many-people-are-using-generative-ai-on-a-daily-basis-a-gemini-report" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4492]", - "page_age": "December 3, 2025", - "title": "AI Usage Statistics: How AI Is Transforming Everyday Life [ 2025 ]", - "type": "web_search_result", - "url": "https://elfsight.com/blog/ai-usage-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5328]", - "page_age": "1 month ago", - "title": "131 AI Statistics and Trends for 2026 | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-statistics-trends/" - } - ], - "tool_use_id": "srvtoolu_0137uqJFfPiwXni6ueqyYoU2", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5408]", - "page_age": null, - "title": "AI Exposure and the Future of Work - Upjohn Research", - "type": "web_search_result", - "url": "https://research.upjohn.org/cgi/viewcontent.cgi?article=1319&context=reports" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2020]", - "page_age": "July 24, 2025", - "title": "Generative AI and Jobs: A Refined Global Index of Occupational Exposure | International Labour Organization", - "type": "web_search_result", - "url": "https://www.ilo.org/publications/generative-ai-and-jobs-refined-global-index-occupational-exposure" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5452]", - "page_age": null, - "title": "AI Job Growth Statistics 2026: Skills, Salaries and Automation", - "type": "web_search_result", - "url": "https://www.index.dev/blog/ai-job-growth-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=416]", - "page_age": null, - "title": "WHO WILL BE THE WORKERS MOST AFFECTED BY AI? A CLOSER LOOK AT THE", - "type": "web_search_result", - "url": "https://www.oecd.org/content/dam/oecd/en/publications/reports/2024/10/who-will-be-the-workers-most-affected-by-ai_fb7fcccd/14dc6f89-en.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4984]", - "page_age": "May 23, 2025", - "title": "One in four jobs at risk of being transformed by GenAI, new ILO\u2013NASK Global Index shows | International Labour Organization", - "type": "web_search_result", - "url": "https://www.ilo.org/resource/news/one-four-jobs-risk-being-transformed-genai-new-ilo%E2%80%93nask-global-index-shows" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5208]", - "page_age": "December 3, 2025", - "title": "AI Automation Risk Report: The 50 Jobs Most Exposed To AI - EDsmart", - "type": "web_search_result", - "url": "https://www.edsmart.org/newsroom/ai-job-risk-report/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5744]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3316]", - "page_age": "November 7, 2024", - "title": "Automation Exposure Score \u2013 LMI Institute", - "type": "web_search_result", - "url": "https://www.lmiontheweb.org/automation-exposure-score/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4892]", - "page_age": null, - "title": "PROJECT ICEBERG The Iceberg Index: Measuring Skills-centered Exposure in", - "type": "web_search_result", - "url": "https://iceberg.mit.edu/report.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6344]", - "page_age": null, - "title": "X X Generative AI and jobs: A global analysis of potential effects on job", - "type": "web_search_result", - "url": "https://www.ilo.org/sites/default/files/2024-07/WP96_web.pdf" - } - ], - "tool_use_id": "srvtoolu_01858UozDVD5udFN6DRAVKNm", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01Th4eFzR7rbkwAerZ4fKitN", - "input": { - "query": "Americans trust institutions conspiracy theories misinformation belief survey 2024 ASI reaction techno-optimism" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5376]", - "page_age": "October 17, 2024", - "title": "Americans' Deepening Mistrust of Institutions | The Pew Charitable Trusts", - "type": "web_search_result", - "url": "https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1400]", - "page_age": "October 17, 2024", - "title": "Americans' Mistrust of Institutions | The Pew Charitable Trusts", - "type": "web_search_result", - "url": "https://www.pew.org/en/trend/archive/fall-2024/americans-mistrust-of-institutions" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3032]", - "page_age": "December 30, 2024", - "title": "A Retrospective Analysis of the 2024 Misinformation Landscape | DISA", - "type": "web_search_result", - "url": "https://disa.org/a-retrospective-analysis-of-the-2024-misinformation-landscape/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5420]", - "page_age": "March 7, 2025", - "title": "America\u2019s Crisis of Confidence: Rising Mistrust, Conspiracies, and Vaccine Hesitancy After COVID-19 - The Survey Center on American Life", - "type": "web_search_result", - "url": "https://www.americansurveycenter.org/research/americas-crisis-of-confidence-rising-mistrust-conspiracies-and-vaccine-hesitancy-after-covid-19/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4072]", - "page_age": null, - "title": "Belief in science-related conspiracy theories is not just a matter of knowledge: The democratic quality of countries as a protective factor - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12714214/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1744]", - "page_age": null, - "title": "Post-Election Poll Study Reveals Deepening Distrust in Government and Information Sources | Media Relations | The George Washington University", - "type": "web_search_result", - "url": "https://mediarelations.gwu.edu/post-election-poll-study-reveals-deepening-distrust-government-and-information-sources" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5348]", - "page_age": "February 12, 2025", - "title": "Conspiracy theories and their believers in an era of misinformation | HKS Misinformation Review", - "type": "web_search_result", - "url": "https://misinforeview.hks.harvard.edu/article/conspiracy-theories-and-their-believers-in-an-era-of-misinformation/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6756]", - "page_age": "December 2, 2024", - "title": "Chapter 2 Disinformation in the United States: When Distrust Trumps Facts\uff5cNews from the Institute of Geoeconomics(IOG)", - "type": "web_search_result", - "url": "https://instituteofgeoeconomics.org/en/research/2024112001-2/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6512]", - "page_age": "December 30, 2024", - "title": "2024: The year in misinformation - The Fulcrum", - "type": "web_search_result", - "url": "https://thefulcrum.us/misinformation" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2880]", - "page_age": "December 30, 2024", - "title": "Misinformation Trends in 2024 | DISA", - "type": "web_search_result", - "url": "https://disa.org/misinformation-trends-in-2024/" - } - ], - "tool_use_id": "srvtoolu_01Th4eFzR7rbkwAerZ4fKitN", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=190]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDiwWaEXMiBdv250GRoMnmtmfPRg819xW79tIjAwsy70hV6olVEfGPSY8PQQD9CZX0zTcmw0J2e2KL0xvs0GIIvcYc2u3/rMwYtkBP0qGJACvJFvKsQcn9F4Y8dQ2Szchj6PUg61...[truncated]", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result_location", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - } - ], - "text": "[REDACTED_TEXT length=171]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIgidVpD8cBWID5RZRoMgQ6NWTz80C7HAWNGIjDjcwJJuPm66y6DL3eVebSRnOLCc3Tbh+DztqKueX4Vms9NSzn3tVyQvlUuC+WBqMkqFkSf/LcGwYmxAc+aCaIUWuReGg5AiAwY...[truncated]", - "title": "How are Americans using AI? Evidence from a nationwide survey | Brookings", - "type": "web_search_result_location", - "url": "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/" - } - ], - "text": "[REDACTED_TEXT length=193]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN/2C2i2PVTI++yzZBoM0Gz6XTxDu3LZL+5MIjDy4OLX7yfSFyl478Ok6ZYySXS665zONKXaDX6IZrWNCkRC6uBI5ODMfupvmLBxmgkqFaU3aRHePcqqhebUt2Vps9ltjRv1HhgE", - "title": "AI Exposure and the Future of Work - Upjohn Research", - "type": "web_search_result_location", - "url": "https://research.upjohn.org/cgi/viewcontent.cgi?article=1319&context=reports" - } - ], - "text": "[REDACTED_TEXT length=188]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=67]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOFxIwvzMrskxzHEnhoMxmUbZMbiVNJHXCIMIjB87UvWU5J8JXlozsPuNWgVYGmeiPlNS6BwjKDFp7mLdt6MEKSTzLMEfDgSlwEI1LgqFa1gD+bbabtAnYrLl8DEuRUulymrDxgE", - "title": "AI Automation Risk Report: The 50 Jobs Most Exposed To AI - EDsmart", - "type": "web_search_result_location", - "url": "https://www.edsmart.org/newsroom/ai-job-risk-report/" - } - ], - "text": "[REDACTED_TEXT length=69]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPjIrdeb5YITiSi4gRoM+eTit47uQ/rNx7CnIjDbo6W8yoFcPD7MIVKHUxvUxOImiz6WcDJs4poAQ7GKPwKY/wkvFjS32Y3p4NEZltUqFJ1/1yGDUYfRTer6+xa6psL5r6vkGAQ=", - "title": "Americans' Deepening Mistrust of Institutions | The Pew Charitable Trusts", - "type": "web_search_result_location", - "url": "https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions" - } - ], - "text": "[REDACTED_TEXT length=123]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAXnXPvRIbh/+ou99BoMSa7upO2ymWHSh1t1IjAQb+MipjRl5PhVU9eRMwXXWdD/xvNkqRO7iQXVY1Scu5NAY/FP32EOYMZgINaq5J8qFn41T2i8IjaMYKDES/qMmLCViOR3WZwY...[truncated]", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result_location", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - } - ], - "text": "[REDACTED_TEXT length=151]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01UyUMqqdZo3Vp6nZK7N2NHN", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "distribution": { - "type": "beta", - "alpha": 2.2, - "beta": 4.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor: 0 = no AI technical understanding" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling: 1 = expert-level AI technical understanding" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "YouGov March 2024; Statista 2024 AI awareness survey", - "note": "YouGov 2024 found only 10% of US adults say they know 'a great deal' about AI, 36% 'a fair amount', 43% 'not much', 7% 'nothing'. A right-skewed Beta(2.2, 4.5) captures a population mean ~0.33 with mo...[truncated]" - } - }, - { - "name": "prior_ai_tool_usage", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Occasionally", - "Regularly", - "Power user" - ], - "weights": [ - 0.36, - 0.32, - 0.22, - 0.1 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Brookings 2025 citing YouGov 2025; Bick, Blandin & Deming late-2024 Real-Time Population Survey; Elon University Imagining the Digital Future Center Jan 2025", - "note": "YouGov 2025: 56% of US adults used AI tools; 28% weekly users implies 'Regularly'; Bick et al. found 39.6% used gen AI as of late 2024. Splitting: ~36% Never (non-users), ~32% Occasionally (used but i...[truncated]" - } - }, - { - "name": "occupation_automation_risk", - "distribution": { - "type": "beta", - "alpha": 1.8, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "0 = fully immune to ASI cognitive redundancy (e.g., skilled trades, physical care)" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "1 = fully redundant given ASI-level cognitive capability" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "EDsmart analysis of 784 occupations; ILO-NASK 2025 Global Index; Upjohn Research AI Exposure; Brookings adaptive capacity index", - "note": "EDsmart finds average occupation exposure ~29.84% for traditional AI, but ASI context implies much higher cognitive redundancy across information-processing occupations. ILO finds 25% of global jobs h...[truncated]" - } - }, - { - "name": "asi_belief", - "distribution": { - "type": "categorical", - "options": [ - "Fully believes", - "Skeptical but open", - "Dismisses as exaggeration", - "Conspiracy/hoax framing" - ], - "weights": [ - 0.22, - 0.41, - 0.27, - 0.1 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "YouGov 2024 AI attitudes; Pew 2024 trust in institutions; Survey Center on American Life conspiracy/misinformation data", - "note": "No direct ASI-belief survey exists (novel scenario). Extrapolated from: 40% AI skeptics (YouGov), 22% trust fed gov always/most of time (Pew), 34% accept unsubstantiated scientific claims (SCAL). Give...[truncated]" - } - }, - { - "name": "asi_emotional_valence", - "distribution": { - "type": "categorical", - "options": [ - "Excited/hopeful", - "Anxious/fearful", - "Ambivalent/uncertain", - "Indifferent", - "Angry/resentful" - ], - "weights": [ - 0.2, - 0.32, - 0.28, - 0.12, - 0.08 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "YouGov 2024 AI attitudes survey; Pew AI attitudes 2023-2024", - "note": "YouGov 2024: 54% cautious, 49% concerned, 40% skeptical, 29% curious, 22% scared. Americans more likely to see AI as negative for society (42%) than positive (27%). Under ASI scenario (far more extrem...[truncated]" - } - }, - { - "name": "financial_resilience", - "distribution": { - "type": "beta", - "alpha": 2.0, - "beta": 3.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "0 = no financial buffer; immediate economic vulnerability" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "1 = high financial resilience; diversified income/assets" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Federal Reserve Survey of Consumer Finances 2022; US Census income distribution", - "note": "Fed SCF 2022: ~37% of Americans couldn't cover a $400 emergency with cash; median household savings low relative to income disruption risk. Beta(2.0, 3.0) gives mean ~0.40, reflecting that most Americ...[truncated]" - } - }, - { - "name": "asi_governance_stance", - "distribution": { - "type": "categorical", - "options": [ - "Accelerate with minimal regulation", - "Light-touch oversight", - "Strong international governance", - "Immediate pause/moratorium", - "No opinion" - ], - "weights": [ - 0.1, - 0.18, - 0.35, - 0.22, - 0.15 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew AI governance surveys 2023; AIPRM/National University AI stats 2024; YouGov AI caution data", - "note": "85% of respondents support national effort to make AI safe (AIPRM/NU 2024). 54% feel 'cautious' about AI (YouGov). Given ASI scenario, strong governance preference is amplified. Accelerationists ~10% ...[truncated]" - } - }, - { - "name": "information_network_reach", - "distribution": { - "type": "beta", - "alpha": 1.5, - "beta": 4.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "0 = fully isolated; no social/information network reach" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "1 = highly influential/networked; can reach large audiences" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew social media use 2024; network science power-law distribution research", - "note": "Social network reach follows a highly right-skewed distribution \u2014 most people have modest networks while a small elite has enormous reach. Beta(1.5, 4.0) captures this skew with mean ~0.27. Most US ad...[truncated]" - } - }, - { - "name": "institutional_change_tolerance", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "0 = strongly resistant to rapid institutional change" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "1 = highly tolerant of rapid fundamental institutional transformation" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew political ideology data 2024; GSS social change attitudes; Pew trust in institutions 2024", - "note": "Americans are roughly split on tolerance for rapid change, with a slight lean toward caution. Beta(2.5, 3.0) gives mean ~0.45, slightly below midpoint. Political ideology (liberal = higher tolerance),...[truncated]" - } - }, - { - "name": "asi_adoption_intent", - "distribution": { - "type": "categorical", - "options": [ - "Early adopter", - "Will try eventually", - "Wait and see", - "Reluctant/Forced", - "Refuses to use" - ], - "weights": [ - 0.14, - 0.28, - 0.28, - 0.18, - 0.12 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Elon University LLM adoption survey Jan 2025; Rogers diffusion of innovations framework; YouGov AI caution 2024", - "note": "Elon Jan 2025: 52% of US adults use LLMs; of users, 34% use daily. Rogers diffusion: ~13.5% early adopters in typical tech adoption. Given ASI scenario (far more capable, free/cheap tools), early adop...[truncated]" - } - }, - { - "name": "techno_optimism", - "distribution": { - "type": "beta", - "alpha": 3.0, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "0 = deep techno-pessimism; technology seen as net negative" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "1 = strong techno-optimism; technology always leads to better outcomes" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew Science & Technology attitudes 2024; YouGov AI positivity 2024; Gallup technology optimism surveys", - "note": "Pew 2024: 57% say science has had mostly positive effect on society. YouGov 2024: only 27% believe AI will have positive effect on society vs 42% negative, but this is AI-specific. General techno-opti...[truncated]" - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 102734, - "output_tokens": 5513, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.elon.edu/u/news/2025/03/12/survey-52-of-u-s-adults-now-use-ai-large-language-models-like-chatgpt/", - "https://www.ilo.org/resource/news/one-four-jobs-risk-being-transformed-genai-new-ilo%E2%80%93nask-global-index-shows", - "https://www.lmiontheweb.org/automation-exposure-score/", - "https://www.ilo.org/sites/default/files/2024-07/WP96_web.pdf", - "https://misinforeview.hks.harvard.edu/article/conspiracy-theories-and-their-believers-in-an-era-of-misinformation/", - "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498", - "https://thefulcrum.us/misinformation", - "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp", - "https://www.ilo.org/publications/generative-ai-and-jobs-refined-global-index-occupational-exposure", - "https://sparktoro.com/blog/new-research-20-of-americans-use-ai-tools-10x-month-but-growth-is-slowing-and-traditional-search-hasnt-dipped/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12714214/", - "https://www.brookings.edu/articles/how-are-americans-using-ai-evidence-from-a-nationwide-survey/", - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions", - "https://fortune.com/2026/01/25/ai-use-frequency-employed-adults-tech-workers-retail-manufacturing-gallup-poll/", - "https://www.americansurveycenter.org/research/americas-crisis-of-confidence-rising-mistrust-conspiracies-and-vaccine-hesitancy-after-covid-19/", - "https://www.nature.com/articles/s41599-025-04583-8", - "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics", - "https://www.nu.edu/blog/ai-statistics-trends/", - "https://iceberg.mit.edu/report.pdf", - "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/", - "https://www.pew.org/en/trend/archive/fall-2024/americans-mistrust-of-institutions", - "https://research.upjohn.org/cgi/viewcontent.cgi?article=1319&context=reports", - "https://mediarelations.gwu.edu/post-election-poll-study-reveals-deepening-distrust-government-and-information-sources", - "https://disa.org/a-retrospective-analysis-of-the-2024-misinformation-landscape/", - "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/", - "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution", - "https://www.index.dev/blog/ai-job-growth-statistics", - "https://resourcera.com/data/artificial-intelligence/ai-users/", - "https://en.wikipedia.org/wiki/Literacy_in_the_United_States", - "https://www.edsmart.org/newsroom/ai-job-risk-report/", - "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full", - "https://disa.org/misinformation-trends-in-2024/", - "https://www.aiprm.com/ai-statistics/", - "https://www.oecd.org/content/dam/oecd/en/publications/reports/2024/10/who-will-be-the-workers-most-affected-by-ai_fb7fcccd/14dc6f89-en.pdf", - "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/", - "https://www.technollama.co.uk/a-gemini-report-how-many-people-are-using-generative-ai-on-a-daily-basis-a-gemini-report", - "https://elfsight.com/blog/ai-usage-statistics/", - "https://instituteofgeoeconomics.org/en/research/2024112001-2/", - "https://ailiteracy.institute/ai-literacy-review-march-11-2025/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_215641_879860_claude_reasoning_call.json b/examples/logs/20260217_215641_879860_claude_reasoning_call.json deleted file mode 100644 index 207a638..0000000 --- a/examples/logs/20260217_215641_879860_claude_reasoning_call.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "timestamp": "2026-02-17T21:56:41.879991", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 19705 - }, - "response": { - "id": "msg_01BKTUhWmRaczMwJRZWfEXQW", - "content": [ - { - "id": "toolu_01HVKDoCf5qXWux45Wh7EFic", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "type": "float", - "category": "population_specific", - "description": "Degree of understanding of AI/ML concepts, capabilities, and limitations (0\u20131 scale), affecting how an agent interprets ASI news and uses public ASI tools.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation", - "age" - ], - "identity_type": null - }, - { - "name": "ai_risk_perception", - "type": "float", - "category": "population_specific", - "description": "Perceived personal and societal danger posed by advanced AI systems (0\u20131 scale, 0 = no concern, 1 = existential terror), shaping regulatory support and adoption hesitancy.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_literacy", - "trust_in_institutions", - "openness" - ] - }, - { - "name": "automation_job_vulnerability", - "type": "float", - "category": "population_specific", - "description": "Estimated exposure of the agent's current occupation to displacement by ASI-enabled automation (0\u20131 scale), grounded in occupational task composition.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "employment_status", - "education_level" - ] - }, - { - "name": "asi_adoption_willingness", - "type": "float", - "category": "population_specific", - "description": "Willingness to actively use ASI-powered tools in daily life and work (0\u20131 scale), driving uptake of public ASI access in Month 3.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_literacy", - "openness", - "ai_risk_perception" - ] - }, - { - "name": "financial_resilience", - "type": "float", - "category": "population_specific", - "description": "Capacity to absorb economic disruption without severe hardship, based on savings, assets, and income stability (0\u20131 scale), modulating response to labor market upheaval.", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "household_income", - "homeownership", - "employment_status" - ] - }, - { - "name": "chronic_illness_household", - "type": "boolean", - "category": "population_specific", - "description": "Whether any household member has a serious chronic illness (cancer, Alzheimer's, ALS, diabetes, etc.) that could be directly addressed by ASI-developed treatments.", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "age", - "household_size" - ] - }, - { - "name": "stem_background", - "type": "boolean", - "category": "population_specific", - "description": "Whether the agent has a STEM educational or occupational background, enabling faster comprehension and leverage of ASI scientific outputs.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation" - ] - }, - { - "name": "information_verification_habit", - "type": "float", - "category": "population_specific", - "description": "Tendency to cross-check claims against multiple authoritative sources before accepting them as true (0\u20131 scale), affecting how agents process extraordinary ASI announcements.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "need_for_cognition", - "susceptibility_to_misinformation", - "education_level" - ] - }, - { - "name": "institutional_change_support", - "type": "float", - "category": "population_specific", - "description": "Support for rapid, large-scale restructuring of government, economic, and regulatory institutions in response to transformative technology (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_ideology", - "trust_in_institutions", - "openness" - ] - }, - { - "name": "economic_anxiety", - "type": "float", - "category": "population_specific", - "description": "Level of worry about personal financial future and job security in the face of rapid economic change (0\u20131 scale), heightened by automation displacement events.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "automation_job_vulnerability", - "financial_resilience", - "neuroticism" - ] - }, - { - "name": "techno_optimism", - "type": "float", - "category": "personality", - "description": "Generalized belief that technological progress produces net positive outcomes for humanity (0\u20131 scale), shaping interpretation of each ASI milestone.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "ai_literacy", - "political_ideology" - ] - }, - { - "name": "social_cohesion_orientation", - "type": "float", - "category": "personality", - "description": "Priority placed on collective stability and community solidarity over individual benefit when evaluating rapid societal transformation (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "agreeableness", - "political_ideology", - "religious_affiliation" - ] - } - ], - "include_big_five": false, - "notes": "Big Five traits already exist in the base population \u2014 excluded here. 12 new attributes selected to cover the core behavioral axes most relevant to the ASI scenario: cognitive/technical capacity to en...[truncated]" - }, - "name": "attribute_selection", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 6073, - "output_tokens": 1624, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_215950_400036_claude_agentic_research.json b/examples/logs/20260217_215950_400036_claude_agentic_research.json deleted file mode 100644 index b4bab72..0000000 --- a/examples/logs/20260217_215950_400036_claude_agentic_research.json +++ /dev/null @@ -1,1964 +0,0 @@ -{ - "timestamp": "2026-02-17T21:59:50.400093", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 11850 - }, - "response": { - "id": "msg_01H4ceayyVtwBYKdgBEYBaWG", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=93]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01Vs8sxdJmHGJmzVfzQ3RUSD", - "input": { - "query": "US adult population age distribution 2024 census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01TmNyyEuJLivLTGJQKJRJWK", - "input": { - "query": "US gender distribution adults 2024 census statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=3112]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2960]", - "page_age": "September 17, 2025", - "title": "Visualizing the U.S. Population by Age Group", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/u-s-population-by-age-group/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6480]", - "page_age": "12 hours ago", - "title": "US population by year, race, age, ethnicity, & more | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1280]", - "page_age": null, - "title": "2023 Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4076]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2024", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1680]", - "page_age": null, - "title": "Adult Population by Age Group Statistics", - "type": "web_search_result", - "url": "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5616]", - "page_age": null, - "title": "An Aging Nation: U.S. Median Age Surpassed 39 in 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=968]", - "page_age": null, - "title": "Population of United States of America 2024 - PopulationPyramid.net", - "type": "web_search_result", - "url": "https://www.populationpyramid.net/united-states-of-america/2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=348]", - "page_age": "December 18, 2025", - "title": "Population Distribution by Age | KFF State Health Facts", - "type": "web_search_result", - "url": "https://www.kff.org/state-health-policy-data/state-indicator/distribution-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3112]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2024", - "type": "web_search_result", - "url": "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html" - } - ], - "tool_use_id": "srvtoolu_01Vs8sxdJmHGJmzVfzQ3RUSD", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1280]", - "page_age": null, - "title": "2023 Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3264]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4140]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2024", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3640]", - "page_age": null, - "title": "US population by gender 2027| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/737923/us-population-by-gender/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=352]", - "page_age": null, - "title": "United States Population by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/popclock/data_tables.php?component=pyramid" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2952]", - "page_age": "September 17, 2025", - "title": "Visualizing the U.S. Population by Age Group", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/u-s-population-by-age-group/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6920]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4596]", - "page_age": null, - "title": "U.S. population by sex 1980-2024", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241495/us-population-by-sex/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3264]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2024", - "type": "web_search_result", - "url": "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5436]", - "page_age": "October 11, 2025", - "title": "Population by Gender in US 2025 | Statistics & Facts - The World Data", - "type": "web_search_result", - "url": "https://theworlddata.com/population-by-gender-in-us/" - } - ], - "tool_use_id": "srvtoolu_01TmNyyEuJLivLTGJQKJRJWK", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_019JCHGXv1UDrjBzTWkxPtgv", - "input": { - "query": "US race ethnicity distribution 2024 White Black Hispanic Asian census percent" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01R2i252CDL5gPX4kjXsCVQY", - "input": { - "query": "US political affiliation party identification 2024 Pew Gallup Democrat Republican Independent percent" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=7056]", - "page_age": "2 weeks ago", - "title": "Race and ethnicity in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3920]", - "page_age": null, - "title": "Population by race in the U.S. 2024| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5600]", - "page_age": "December 16, 2025", - "title": "How the US Census Measures Race and What Americans Think About It | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6480]", - "page_age": "12 hours ago", - "title": "US population by year, race, age, ethnicity, & more | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5488]", - "page_age": "February 21, 2025", - "title": "United States Population by Race & Ethnicity - 2025 Update | Neilsberg", - "type": "web_search_result", - "url": "https://www.neilsberg.com/insights/united-states-population-by-race/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7504]", - "page_age": "1 week ago", - "title": "Demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5512]", - "page_age": null, - "title": "New Estimates Highlight Differences in Growth Between the U.S. Hispanic and Non-Hispanic Populations", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-characteristics.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4276]", - "page_age": "September 18, 2024", - "title": "U.S. Population Racial Breakdown (1990-2023)", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3060]", - "page_age": "May 21, 2021", - "title": "Mapped: Visualizing the U.S. Population by Race", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/visualizing-u-s-population-by-race/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1812]", - "page_age": null, - "title": "US Population Distribution, by Generation and Race/Ethnicity, in 2024 - Marketing Charts", - "type": "web_search_result", - "url": "https://www.marketingcharts.com/charts/us-population-distribution-by-generation-and-race-ethnicity-in-2024" - } - ], - "tool_use_id": "srvtoolu_019JCHGXv1UDrjBzTWkxPtgv", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5076]", - "page_age": "April 3, 2025", - "title": "GOP Holds Edge in Party Affiliation for Third Straight Year", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1456]", - "page_age": "September 20, 2007", - "title": "Party Affiliation | Gallup Historical Trends", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/15370/party-affiliation.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3016]", - "page_age": "April 24, 2025", - "title": "Party affiliation and ideology of US registered voters | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5536]", - "page_age": "March 26, 2025", - "title": "Independent Party ID Tied for High; Democratic ID at New Low", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3756]", - "page_age": "2 weeks ago", - "title": "New High of 45% in U.S. Identify as Political Independents", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3108]", - "page_age": "December 16, 2025", - "title": "Party Affiliation Fact Sheet (NPORS) | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5704]", - "page_age": "July 31, 2025", - "title": "Democrats Regain Advantage in Party Affiliation", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/692978/democrats-regain-advantage-party-affiliation.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4800]", - "page_age": null, - "title": "Political party identification U.S. 2024| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1078361/political-party-identification-us-major-parties/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5476]", - "page_age": "June 21, 2024", - "title": "Age, generation and party identification of registered voters | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/politics/2024/04/09/age-generational-cohorts-and-party-identification/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3692]", - "page_age": null, - "title": "Research Brief: Growing Cohort of Independent Voters Becomes Critical Segment of Electorate | Unite America", - "type": "web_search_result", - "url": "https://www.uniteamerica.org/articles/research-brief-growing-cohort-of-independent-voters-becomes-critical-segment-of-electorate" - } - ], - "tool_use_id": "srvtoolu_01R2i252CDL5gPX4kjXsCVQY", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_014gohVvQR4izbsqiq6gy3hn", - "input": { - "query": "US religious affiliation 2024 Pew Protestant Catholic unaffiliated percent adults Big Five personality traits US population averages education employment social media usage statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4292]", - "page_age": "October 28, 2025", - "title": "2023-24 Religious Landscape Study: Executive summary | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/religion/2025/02/26/religious-landscape-study-executive-summary/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5544]", - "page_age": "April 17, 2025", - "title": "Religious Preferences Largely Stable in U.S. Since 2020", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/659339/religious-preferences-largely-stable-2020.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4148]", - "page_age": "February 26, 2025", - "title": "Christianity declines among U.S. adults while \"religiously unaffiliated\" grows, study says - OPB", - "type": "web_search_result", - "url": "https://www.opb.org/article/2025/02/26/pew-religious-landscape-study-christianity/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2956]", - "page_age": "November 13, 2025", - "title": "Americans\u2019 religious profile, visualized as 100 people | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2025/11/13/if-the-u-s-had-100-people-charting-americans-religious-affiliations/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5460]", - "page_age": "December 15, 2025", - "title": "Why do some Americans who were raised unaffiliated join a religion while others don\u2019t? | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/religion/2025/12/15/why-many-us-adults-are-nones-and-why-some-former-nones-have-joined-a-religion/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4404]", - "page_age": "October 28, 2025", - "title": "Religious identity in the United States | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/religion/2025/02/26/religious-landscape-study-religious-identity/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5432]", - "page_age": "October 28, 2025", - "title": "US religious groups' age, education, income, race & gender profiles with other demographics | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/religion/2025/02/26/age-race-education-and-other-demographic-traits-of-us-religious-groups/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6504]", - "page_age": "1 week ago", - "title": "Religion in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Religion_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6692]", - "page_age": "3 weeks ago", - "title": "Irreligion in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Irreligion_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5532]", - "page_age": "October 28, 2025", - "title": "US Christian Decline May Be Stabilizing: 2023-24 Religious Landscape Study (RLS) | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/religion/2025/02/26/decline-of-christianity-in-the-us-has-slowed-may-have-leveled-off/" - } - ], - "tool_use_id": "srvtoolu_014gohVvQR4izbsqiq6gy3hn", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=134]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01RH6EfkAi3MjF8yHM9LPNmh", - "input": { - "attributes": [ - { - "name": "country", - "distribution": { - "type": "categorical", - "options": [ - "United States" - ], - "weights": [ - 1.0 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "sum(weights)==1", - "value": null, - "reason": "All agents are US residents by simulation definition" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Simulation spec: US population only", - "note": "Universally 'United States' per the simulation scope statement" - } - }, - { - "name": "age", - "distribution": { - "type": "normal", - "mean": 47, - "std": 17, - "min": 18, - "max": 99, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 18, - "expression": null, - "reason": "Simulation is adults 18+ only" - }, - { - "type": "hard_max", - "value": 99, - "expression": null, - "reason": "Practical upper bound for living US adults; centenarians are <0.1% of population" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2024 national population estimates (census.gov); U.S. median age 39+ overall, ~47 for adult-only population", - "note": "Median US age surpassed 39 in 2024 per Census (census.gov/library/stories/2025/06/metro-areas-median-age.html). Adult-only median is higher (~46-48). Normal approximation is reasonable; real distribut...[truncated]" - } - }, - { - "name": "gender", - "distribution": { - "type": "categorical", - "options": [ - "Male", - "Female", - "Non-binary/Other" - ], - "weights": [ - 0.492, - 0.494, - 0.014 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "sum(weights)==1", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau Vintage 2024 via theworlddata.com; 2020 Census (wikipedia Demographics of US); Williams Institute UCLA non-binary estimates (~1.2-1.4%)", - "note": "2020 Census: females 50.9%, males 49.1% of total. 2025 estimates show near-parity (50.24% male, 49.76% female) due to immigration shifts. Non-binary/Other ~1.2-1.6% per UCLA Williams Institute. Adult ...[truncated]" - } - }, - { - "name": "state", - "distribution": { - "type": "categorical", - "options": [ - "CA", - "TX", - "FL", - "NY", - "PA", - "IL", - "OH", - "GA", - "NC", - "MI", - "NJ", - "VA", - "WA", - "AZ", - "TN", - "MA", - "IN", - "MO", - "MD", - "WI", - "CO", - "MN", - "SC", - "AL", - "LA", - "KY", - "OR", - "OK", - "CT", - "UT", - "IA", - "NV", - "AR", - "MS", - "KS", - "NM", - "NE", - "ID", - "WV", - "HI", - "NH", - "ME", - "RI", - "MT", - "DE", - "SD", - "ND", - "AK", - "VT", - "WY", - "DC" - ], - "weights": [ - 0.1175, - 0.0891, - 0.0659, - 0.059, - 0.0387, - 0.0381, - 0.0355, - 0.0324, - 0.0315, - 0.0298, - 0.0275, - 0.026, - 0.0232, - 0.0218, - 0.0207, - 0.0209, - 0.0202, - 0.0184, - 0.0184, - 0.0178, - 0.0174, - 0.0169, - 0.0157, - 0.0147, - 0.0139, - 0.0131, - 0.0131, - 0.0118, - 0.0108, - 0.0102, - 0.0096, - 0.0094, - 0.0093, - 0.0088, - 0.0087, - 0.0065, - 0.0059, - 0.0057, - 0.0054, - 0.0042, - 0.0042, - 0.004, - 0.0032, - 0.0032, - 0.003, - 0.0026, - 0.0023, - 0.0022, - 0.0019, - 0.0017, - 0.0021 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to approximately 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2024 state population estimates (census.gov); proportional to each state's adult population", - "note": "Weights are approximate proportions of US adult population by state. Top 5 states (CA, TX, FL, NY, PA) account for ~37% of US adults. DC included as distinct jurisdiction." - } - }, - { - "name": "race_ethnicity", - "distribution": { - "type": "categorical", - "options": [ - "White non-Hispanic", - "Black", - "Hispanic", - "Asian", - "Other" - ], - "weights": [ - 0.576, - 0.124, - 0.19, - 0.061, - 0.049 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2025 (pewresearch.org/race-and-ethnicity/2025/11/03); ACS 2019-2023 neilsberg.com; US Census Vintage 2023 (census.gov/newsroom/press-releases/2024/population-estimates-characterist...[truncated]", - "note": "2020 Census: White non-Hispanic 57.8%, Hispanic 18.7%, Black 12.1%, Asian 5.9%, Other ~4.1%+. ACS 2023 5-yr: Hispanic 18.99%, Black 12.36%. Weights adjusted to sum to 1.0 with 'Other' encompassing AIA...[truncated]" - } - }, - { - "name": "openness", - "distribution": { - "type": "beta", - "alpha": 7.5, - "beta": 7.5, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Big Five personality meta-analyses (Costa & McCrae; Soto et al. 2011 JPSP; Cross-cultural Big Five norms); US adult population means", - "note": "Openness in US adults has population mean ~0.5 with moderate SD (~0.15). Beta(7.5,7.5) gives symmetric distribution centered at 0.5 with most mass in [0.2,0.8]. Real distribution is approximately norm...[truncated]" - } - }, - { - "name": "conscientiousness", - "distribution": { - "type": "beta", - "alpha": 9.0, - "beta": 6.0, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Soto et al. (2011) JPSP Big Five norms; Donnellan & Lucas (2008); US adult population typically scores above midpoint on Conscientiousness", - "note": "US adults consistently score slightly above midpoint (~0.55-0.60) on Conscientiousness in population surveys. Beta(9,6) gives mean ~0.60 with SD ~0.13. Distribution is slightly left-skewed (more high-...[truncated]" - } - }, - { - "name": "extraversion", - "distribution": { - "type": "beta", - "alpha": 7.0, - "beta": 7.5, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Soto et al. (2011); Big Five International Item Pool norms; US typically slightly above midpoint on extraversion", - "note": "US adults score slightly above midpoint on Extraversion (~0.48-0.52). Beta(7,7.5) gives mean ~0.48 with SD ~0.13. US is often cited as among higher extraversion nations but distribution is still rough...[truncated]" - } - }, - { - "name": "agreeableness", - "distribution": { - "type": "beta", - "alpha": 9.5, - "beta": 6.5, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Soto et al. (2011) JPSP; Costa & McCrae NEO PI-R norms; Agreeableness higher in women and older adults in US samples", - "note": "Agreeableness is typically the highest-scoring Big Five domain in US adults (~0.60). Beta(9.5,6.5) gives mean ~0.594 with SD ~0.13. Increases with age; women score higher than men. Mixed slightly towa...[truncated]" - } - }, - { - "name": "neuroticism", - "distribution": { - "type": "beta", - "alpha": 6.0, - "beta": 9.0, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Soto et al. (2011); Terracciano et al. cross-cultural norms; Neuroticism declines with age in US samples", - "note": "US adults score slightly below midpoint on Neuroticism (~0.40). Beta(6,9) gives mean ~0.40 with SD ~0.13. Distribution skewed toward lower neuroticism. Women score higher than men; young adults score ...[truncated]" - } - }, - { - "name": "urban_rural", - "distribution": { - "type": "categorical", - "options": [ - "Urban", - "Suburban", - "Rural" - ], - "weights": [ - 0.31, - 0.55, - 0.14 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "sum(weights)==1", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau urban/rural classification 2020; Pew Research Center suburban/urban/rural surveys; ~80% of US population lives in metro areas", - "note": "Census: ~80% live in urbanized areas but the suburban/urban split within that is estimated at ~55% suburban, ~31% urban core. Rural ~19.3% of population but ~14% of adults (rural population skews olde...[truncated]" - } - }, - { - "name": "education_level", - "distribution": { - "type": "categorical", - "options": [ - "Less than HS", - "HS Diploma", - "Some College", - "Associate's", - "Bachelor's", - "Graduate Degree" - ], - "weights": [ - 0.088, - 0.268, - 0.2, - 0.095, - 0.222, - 0.127 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau ACS 2023 Educational Attainment for Adults 25+ (census.gov); CPS 2024", - "note": "ACS 2023 adults 25+: No HS diploma ~8.8%, HS grad ~27.0%, Some college (no degree) ~20%, Associate's ~9.5%, Bachelor's ~22.2%, Graduate ~12.7%. Adults 18-24 skew toward lower attainment but for simula...[truncated]" - } - }, - { - "name": "household_income", - "distribution": { - "type": "lognormal", - "mean": 11.0, - "std": 0.85, - "min": 0, - "max": 2000000, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Income cannot be negative" - }, - { - "type": "hard_max", - "value": 2000000, - "expression": null, - "reason": "Practical upper bound; captures top 0.01% without wild outliers distorting model" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS ASEC 2023; median household income ~$80,610 in 2023 (census.gov); lognormal is standard model for income distributions", - "note": "Lognormal params: mean=11.0 (exp(11)~$60,000 geometric mean), std=0.85 on log scale gives median ~$60k, mean ~$89k which matches CPS data. US median HH income was $80,610 in 2023 (all HH); for adults ...[truncated]" - } - }, - { - "name": "marital_status", - "distribution": { - "type": "categorical", - "options": [ - "Single", - "Married", - "Divorced", - "Widowed", - "Domestic Partnership" - ], - "weights": [ - 0.318, - 0.476, - 0.113, - 0.059, - 0.034 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS 2023; ACS 2022-2023 marital status for adults 18+", - "note": "CPS 2023 adults 18+: Never married ~32%, Married ~48%, Divorced ~11%, Widowed ~6%, Cohabiting ~3.4%. Widowed higher among older adults. Domestic partnership includes cohabiting/civil unions. Single = ...[truncated]" - } - }, - { - "name": "household_size", - "distribution": { - "type": "normal", - "mean": 2.53, - "std": 1.4, - "min": 1, - "max": 10, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 1, - "expression": null, - "reason": "At minimum the agent lives alone" - }, - { - "type": "hard_max", - "value": 15, - "expression": null, - "reason": "Practical upper bound; extreme multi-generational households exist but >15 extremely rare" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS 2023; ACS 2023: average household size 2.53 persons", - "note": "US average household size 2.53 in 2023. Distribution is right-skewed (many 1- and 2-person households, some large families). Normal approximation with hard_min=1 captures this. Post-sampling, round to...[truncated]" - } - }, - { - "name": "has_children", - "distribution": { - "type": "boolean", - "probability_true": 0.28, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "expression", - "expression": "has_children == False or household_size >= 2", - "value": null, - "reason": "Cannot have children in household if household_size < 2" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS 2023; ~28-30% of US households have own children under 18 present", - "note": "CPS 2023: ~28% of all households have own children under 18. Among adults 18+, this is the household-level figure. Higher among 25-45 age group; nearly 0 for 65+. Reflects children under 18 in househo...[truncated]" - } - }, - { - "name": "employment_status", - "distribution": { - "type": "categorical", - "options": [ - "Full-time", - "Part-time", - "Self-employed", - "Unemployed", - "Retired", - "Student" - ], - "weights": [ - 0.465, - 0.115, - 0.095, - 0.035, - 0.225, - 0.065 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Current Employment Statistics 2024; BLS CPS 2024 labor force participation; employment-population ratio ~60.4%", - "note": "BLS 2024: Employment-population ratio ~60.4%, unemployment rate ~3.7-4.0%. Self-employed ~9.5% of workforce. Retired accounts for large share (~22%) due to aging population. Student ~6.5% of adults 18...[truncated]" - } - }, - { - "name": "occupation", - "distribution": { - "type": "categorical", - "options": [ - "Management", - "Professional", - "Service", - "Sales", - "Construction", - "Production", - "Other" - ], - "weights": [ - 0.107, - 0.228, - 0.167, - 0.147, - 0.09, - 0.065, - 0.196 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Occupational Employment and Wage Statistics 2023 (bls.gov/oes); BLS occupational group employment shares", - "note": "BLS 2023 major occupation groups: Management 10.7%, Professional 22.8%, Service 16.7%, Sales 14.7%, Construction/Extraction 9.0%, Production/Transportation 6.5%, Other (including admin support, transp...[truncated]" - } - }, - { - "name": "political_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Strong Democrat", - "Lean Democrat", - "Independent", - "Lean Republican", - "Strong Republican" - ], - "weights": [ - 0.165, - 0.155, - 0.235, - 0.145, - 0.2 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup 2024 party affiliation data (news.gallup.com/poll/655157); Pew Research Center NPORS 2024-2025 (pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors)", - "note": "Gallup 2024: 28% Democrat, 28% Republican, 43% Independent (pure). Leaned: 46% R or R-lean, 45% D or D-lean. Pew NPORS: 31% Republican, 28% Democrat, 41% independent/other. Strong vs Lean split estima...[truncated]" - } - }, - { - "name": "political_ideology", - "distribution": { - "type": "categorical", - "options": [ - "Very Liberal", - "Liberal", - "Moderate", - "Conservative", - "Very Conservative" - ], - "weights": [ - 0.085, - 0.185, - 0.355, - 0.245, - 0.13 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup 2023-2024 ideology tracking (news.gallup.com/poll/548459); Gallup 2025 annual average (35% conservative, 33% moderate, 28% liberal)", - "note": "Gallup 2023: 36% conservative, 36% moderate, 25% liberal. Gallup 2025: 35% conservative, 33% moderate, 28% liberal. Very liberal/very conservative split estimated from ANES and GSS sub-categories (~8-...[truncated]" - } - }, - { - "name": "religious_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Evangelical Protestant", - "Mainline Protestant", - "Catholic", - "Other Christian", - "Jewish", - "Muslim", - "Other Non-Christian", - "None/Unaffiliated" - ], - "weights": [ - 0.23, - 0.11, - 0.19, - 0.06, - 0.02, - 0.011, - 0.04, - 0.29 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2023-24 Religious Landscape Study (pewresearch.org/religion/2025/02/26/religious-landscape-study-executive-summary); Gallup 2024 religious preferences (news.gallup.com/poll/659339)", - "note": "Pew RLS 2023-24: Evangelical Protestant 23%, Mainline Protestant 11%, Catholic 19%, Other Christian 3-5%, Jewish 2%, Muslim 1%, Buddhist/Hindu/Other ~4%, Unaffiliated 29%. Gallup 2024: Protestant/nond...[truncated]" - } - }, - { - "name": "religious_attendance", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Seldom", - "A few times/year", - "Monthly", - "Weekly", - "More than weekly" - ], - "weights": [ - 0.265, - 0.165, - 0.155, - 0.095, - 0.215, - 0.105 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "Pew Research Center 2023-24 RLS religious practice data; Gallup church attendance tracking 2022-2024; GSS 2022", - "note": "Pew 2023-24 RLS: ~26% attend at least weekly, ~22% seldom/never attend. GSS 2022: ~21% weekly, ~33% never. Gallup 2024: weekly/nearly weekly ~20-22%. 'Never' ~26%, 'Seldom' ~17%, 'A few times/year' ~1...[truncated]" - } - }, - { - "name": "primary_news_source", - "distribution": { - "type": "categorical", - "options": [ - "TV", - "Online/Digital", - "Social Media", - "Radio", - "Print Newspaper", - "None" - ], - "weights": [ - 0.285, - 0.295, - 0.195, - 0.07, - 0.04, - 0.115 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2024 news consumption survey; Reuters Institute Digital News Report 2024; Gallup media consumption data 2023-2024", - "note": "Pew 2024: TV ~32% primary news source (declining), Online/Digital ~29% (growing), Social Media ~18-20%, Radio ~7%, Print ~4%, None/Other ~10-12%. Social media as primary news source growing esp. among...[truncated]" - } - }, - { - "name": "news_outlet_lean", - "distribution": { - "type": "categorical", - "options": [ - "Left-leaning", - "Center", - "Right-leaning", - "Mixed/No Preference" - ], - "weights": [ - 0.265, - 0.2, - 0.255, - 0.28 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew Research Center 2023 news pathways and polarization report; Reuters Institute Digital News Report 2024; AllSides and Ad Fontes Media audience data", - "note": "Estimated from cross-tabulation of political affiliation with reported outlet consumption. Fox News ~12-14% of adults as primary source (right-leaning). MSNBC/CNN ~12-15% (left). Network TV/AP/Reuters...[truncated]" - } - }, - { - "name": "social_media_platforms", - "distribution": { - "type": "categorical", - "options": [ - "Facebook", - "Twitter/X", - "Instagram", - "TikTok", - "YouTube", - "None/Minimal" - ], - "weights": [ - 0.285, - 0.085, - 0.165, - 0.115, - 0.205, - 0.145 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2023-2024 Social Media Use surveys (pewresearch.org); Statista US social media platform reach 2024", - "note": "Pew 2023: YouTube 83%, Facebook 68%, Instagram 47%, TikTok 33%, Twitter/X 22% of US adults use each. As PRIMARY platform: Facebook still dominant overall (older users), YouTube growing esp. cross-age,...[truncated]" - } - }, - { - "name": "social_media_hours_per_day", - "distribution": { - "type": "lognormal", - "mean": 0.85, - "std": 0.75, - "min": 0.0, - "max": 12.0, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Cannot be negative" - }, - { - "type": "hard_max", - "value": 12.0, - "expression": null, - "reason": "Practical maximum (waking hours spent on social media)" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2023-24 social media time data; Statista/DataReportal 2024: US average social media time ~2.3 hours/day across all users", - "note": "DataReportal 2024: US average social media use ~2.3 hrs/day across users. Lognormal with mean=0.85 (log scale), std=0.75 gives median ~exp(0.85)~2.3 hrs, with long right tail for heavy users. Includes...[truncated]" - } - }, - { - "name": "internet_access", - "distribution": { - "type": "categorical", - "options": [ - "Broadband", - "Mobile Only", - "Dial-up/Satellite", - "None" - ], - "weights": [ - 0.73, - 0.145, - 0.045, - 0.08 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2024 internet access survey; FCC Broadband Deployment Report 2024; NTIA Internet Use Survey 2023", - "note": "Pew 2024: ~77% of US adults have home broadband. ~7% are smartphone-only internet users. ~8% have no internet at home. ~4-5% have satellite/DSL/dial-up as primary. Broadband access has grown steadily;...[truncated]" - } - }, - { - "name": "civic_engagement", - "distribution": { - "type": "categorical", - "options": [ - "Votes regularly", - "Votes sometimes", - "Rarely votes/Never votes", - "Also actively volunteers or campaigns" - ], - "weights": [ - 0.415, - 0.235, - 0.225, - 0.125 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Elections Project voter turnout data 2020-2024; Census Bureau Voting and Registration Supplement CPS 2022-2024; CIRCLE youth civic engagement data", - "note": "2020 election turnout ~66.8% of eligible voters (highest since 1900). 2022 midterm ~46.8%. 2024 ~64%. Among registered voters, ~70-75% vote in presidential years. 'Regularly' votes ~41-43% (votes in p...[truncated]" - } - }, - { - "name": "homeownership", - "distribution": { - "type": "boolean", - "probability_true": 0.656, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau Housing Vacancies and Homeownership Survey (HVS) Q3 2024; homeownership rate 65.6%", - "note": "Census Bureau HVS Q3 2024: US homeownership rate 65.6%. Varies significantly by age (18-34: ~38%, 65+: ~79%), race (White non-Hispanic ~73%, Black ~46%, Hispanic ~49%), and income. National rate is ro...[truncated]" - } - }, - { - "name": "health_insurance_type", - "distribution": { - "type": "categorical", - "options": [ - "Employer-sponsored", - "Medicaid/CHIP", - "Medicare", - "Individual Market/ACA", - "Military/VA", - "Uninsured" - ], - "weights": [ - 0.468, - 0.17, - 0.155, - 0.07, - 0.032, - 0.105 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "KFF Health Insurance Coverage 2023; Census Bureau CPS ASEC 2023 health insurance data; CMS enrollment data 2023", - "note": "KFF 2023: Employer-sponsored ~46.8%, Medicaid ~17%, Medicare ~15.5%, Individual market ~7%, Military/VA ~3.2%, Uninsured ~10.5%. Some overlap (dual coverage) handled by assigning primary source. Medic...[truncated]" - } - }, - { - "name": "immigration_status", - "distribution": { - "type": "categorical", - "options": [ - "US-born citizen", - "Naturalized citizen", - "Permanent resident", - "Other" - ], - "weights": [ - 0.843, - 0.075, - 0.043, - 0.039 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "expression": "abs(sum(weights)-1.0) < 0.001", - "value": null, - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau ACS 2023 nativity and citizenship status; CPS 2023 foreign-born population data", - "note": "ACS 2023: Foreign-born ~14.3% of total US population (~47M). Of these: naturalized citizens ~52%, LPRs ~30%, other (visa, undocumented) ~18%. US-born ~85.7%. Adult proportion: US-born ~84.3%, Naturali...[truncated]" - } - }, - { - "name": "union_membership", - "distribution": { - "type": "boolean", - "probability_true": 0.1, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Union Members Summary January 2024 (bls.gov/news.release/union2); union membership rate 10.0% in 2023", - "note": "BLS: Union membership rate was 10.0% in 2023, down from 10.1% in 2022. Public sector rate 32.5%, private sector 6.0%. Applied to all adults (not just employed) means effective rate ~10% of adults who ...[truncated]" - } - }, - { - "name": "gun_ownership", - "distribution": { - "type": "boolean", - "probability_true": 0.32, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Center 2023 gun ownership survey (pewresearch.org); Gallup 2023 gun ownership ~44% of households; NORC GSS 2022", - "note": "Pew 2023: 32% of US adults personally own a gun; 44% live in gun-owning households. GSS 2022: ~32-34% household gun ownership. NORC/Gallup historically higher (~44%). Variation by method: self-report ...[truncated]" - } - }, - { - "name": "trust_in_institutions", - "distribution": { - "type": "beta", - "alpha": 3.5, - "beta": 6.5, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup Confidence in Institutions 2023-2024 (news.gallup.com); Edelman Trust Barometer 2024 US data; Pew trust in government 2024", - "note": "Gallup 2023-2024: Confidence in most US institutions at or near historical lows. Congress ~8-13%, media ~14-18%, presidency ~26-35%, SCOTUS ~25-40%. Edelman 2024 Trust Index for US ~47/100. Beta(3.5,6...[truncated]" - } - }, - { - "name": "need_for_cognition", - "distribution": { - "type": "beta", - "alpha": 6.0, - "beta": 6.0, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Cacioppo & Petty NFC Scale meta-analyses; Fleischhauer et al. (2010); NFC correlates with education and openness in US samples", - "note": "Need for Cognition (NFC) in general adult populations follows approximately normal distribution on the scale. Mean ~0.50, SD ~0.16. Beta(6,6) gives symmetric distribution centered at 0.5. NFC positive...[truncated]" - } - }, - { - "name": "susceptibility_to_misinformation", - "distribution": { - "type": "beta", - "alpha": 4.5, - "beta": 6.5, - "min": 0.0, - "max": 1.0, - "mean": null, - "std": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pennycook & Rand (2019, 2021) misinformation susceptibility research; Roozenbeek et al. (2022) inoculation studies; Reuters Institute Digital News Report 2023-2024 news literacy data", - "note": "Susceptibility to misinformation inversely correlated with analytical thinking (NFC), education, and media literacy. Pennycook & Rand (2019) found ~25-30% of US adults regularly fail to discriminate r...[truncated]" - } - } - ] - }, - "name": "independent_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 148603, - "output_tokens": 13691, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://en.wikipedia.org/wiki/Religion_in_the_United_States", - "https://www.statista.com/statistics/241495/us-population-by-sex/", - "https://www.census.gov/newsroom/press-releases/2024/population-estimates-characteristics.html", - "https://en.wikipedia.org/wiki/Irreligion_in_the_United_States", - "https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx", - "https://www.kff.org/state-health-policy-data/state-indicator/distribution-by-age/", - "https://www.populationpyramid.net/united-states-of-america/2024/", - "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/", - "https://www.pewresearch.org/politics/2024/04/09/age-generational-cohorts-and-party-identification/", - "https://www.pewresearch.org/religion/2025/02/26/decline-of-christianity-in-the-us-has-slowed-may-have-leveled-off/", - "https://www.neilsberg.com/insights/united-states-population-by-race/", - "https://en.wikipedia.org/wiki/Demographics_of_the_United_States", - "https://www.opb.org/article/2025/02/26/pew-religious-landscape-study-christianity/", - "https://news.gallup.com/poll/692978/democrats-regain-advantage-party-affiliation.aspx", - "https://www.visualcapitalist.com/u-s-population-by-age-group/", - "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx", - "https://www.uniteamerica.org/articles/research-brief-growing-cohort-of-independent-voters-becomes-critical-segment-of-electorate", - "https://www.visualcapitalist.com/visualizing-u-s-population-by-race/", - "https://www.pewresearch.org/religion/2025/02/26/age-race-education-and-other-demographic-traits-of-us-religious-groups/", - "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group", - "https://news.gallup.com/poll/659339/religious-preferences-largely-stable-2020.aspx", - "https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/", - "https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/", - "https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html", - "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/", - "https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/", - "https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States", - "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "https://www.statista.com/statistics/1078361/political-party-identification-us-major-parties/", - "https://www.statista.com/statistics/737923/us-population-by-gender/", - "https://theworlddata.com/population-by-gender-in-us/", - "https://www.pewresearch.org/religion/2025/12/15/why-many-us-adults-are-nones-and-why-some-former-nones-have-joined-a-religion/", - "https://www.marketingcharts.com/charts/us-population-distribution-by-generation-and-race-ethnicity-in-2024", - "https://news.gallup.com/poll/15370/party-affiliation.aspx", - "https://www.pewresearch.org/short-reads/2025/11/13/if-the-u-s-had-100-people-charting-americans-religious-affiliations/", - "https://www.pewresearch.org/religion/2025/02/26/religious-landscape-study-religious-identity/", - "https://www.pewresearch.org/religion/2025/02/26/religious-landscape-study-executive-summary/", - "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/", - "https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx", - "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html", - "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/", - "https://www.census.gov/popclock/data_tables.php?component=pyramid" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_220129_520444_claude_agentic_research.json b/examples/logs/20260217_220129_520444_claude_agentic_research.json deleted file mode 100644 index 96f6438..0000000 --- a/examples/logs/20260217_220129_520444_claude_agentic_research.json +++ /dev/null @@ -1,1185 +0,0 @@ -{ - "timestamp": "2026-02-17T22:01:29.520503", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 16027 - }, - "response": { - "id": "msg_01Tpm2DYFPfYRESt7McWEJeu", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=102]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01TK9jkWBSD31Ve6QqVVSEUk", - "input": { - "query": "US adult AI literacy levels 2024 survey statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01AU8V7wo9zEKGyMLwsDCv6f", - "input": { - "query": "American public AI risk perception survey 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_013UWnWdx7tNvW3kWP9QezVW", - "input": { - "query": "automation job displacement risk by occupation US 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5544]", - "page_age": "April 14, 2023", - "title": "2024-2025 Literacy Statistics | National Literacy Institute", - "type": "web_search_result", - "url": "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5652]", - "page_age": null, - "title": "U.S. Adults Score on Par With International Average in Literacy Skills, Below International Average in Numeracy and Problem-Solving Skills in ...", - "type": "web_search_result", - "url": "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3772]", - "page_age": "October 23, 2024", - "title": "Literacy and Numeracy Skills of U.S. Adults", - "type": "web_search_result", - "url": "https://nationalcoalitionforliteracy.org/about-adult-literacy/piaac/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2792]", - "page_age": "November 17, 2025", - "title": "US Map Reveals Adult Literacy Rates by State - Beyond Basics", - "type": "web_search_result", - "url": "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5504]", - "page_age": "March 31, 2025", - "title": "AI Literacy Review \u2013 March 11, 2025 - AI Literacy Institute", - "type": "web_search_result", - "url": "https://ailiteracy.institute/ai-literacy-review-march-11-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2064]", - "page_age": "December 11, 2024", - "title": "Survey: Growing number of U.S. adults lack literacy skills", - "type": "web_search_result", - "url": "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4096]", - "page_age": null, - "title": "The Decline of Literacy and the Rise of AI: Are We Losing the Ability to Think? \u2013 The Express", - "type": "web_search_result", - "url": "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7824]", - "page_age": "3 weeks ago", - "title": "Literacy in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Literacy_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5552]", - "page_age": "September 27, 2024", - "title": "Frontiers | Artificial intelligence literacy among university students\u2014a comparative transnational survey", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5676]", - "page_age": "December 10, 2024", - "title": "Survey of Adults Skills 2023: United States | OECD", - "type": "web_search_result", - "url": "https://www.oecd.org/en/publications/survey-of-adults-skills-2023-country-notes_ab4f6b8c-en/united-states_427d6aac-en.html" - } - ], - "tool_use_id": "srvtoolu_01TK9jkWBSD31Ve6QqVVSEUk", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5284]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4888]", - "page_age": "August 16, 2025", - "title": "Mapping public perception of artificial intelligence: Expectations, risk\u2013benefit tradeoffs, and value as determinants for societal acceptance - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/pii/S004016252500335X" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5360]", - "page_age": "December 4, 2025", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3780]", - "page_age": "December 28, 2024", - "title": "Survey evidence on public support for AI safety oversight | Scientific Reports", - "type": "web_search_result", - "url": "https://www.nature.com/articles/s41598-024-82977-5" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3036]", - "page_age": null, - "title": "Pew Research Center 2024 Artificial Intelligence Survey Published | Center for Artificial Intelligence Innovation | National Center for Supercomputing Applications (NCSA) | Illinois", - "type": "web_search_result", - "url": "https://ai.ncsa.illinois.edu/caii-contribution-to-pew-research-center-2024-artificial-intelligence-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4572]", - "page_age": "November 7, 2024", - "title": "US public opinion of AI policy and risk - Rethink Priorities", - "type": "web_search_result", - "url": "https://rethinkpriorities.org/research-area/us-public-opinion-of-ai-policy-and-risk/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1932]", - "page_age": null, - "title": "Public Opinion | The 2024 AI Index Report | Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5336]", - "page_age": "November 11, 2025", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=808]", - "page_age": null, - "title": "Public Opinion", - "type": "web_search_result", - "url": "https://aiindex.stanford.edu/wp-content/uploads/2024/04/HAI_AI-Index-Report-2024_Chapter9.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4388]", - "page_age": null, - "title": "New survey finds most Americans expect AI abuses will affect 2024 election | Today at Elon | Elon University", - "type": "web_search_result", - "url": "https://www.elon.edu/u/news/2024/05/15/ai-and-politics-survey/" - } - ], - "tool_use_id": "srvtoolu_01AU8V7wo9zEKGyMLwsDCv6f", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=6720]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5420]", - "page_age": "February 14, 2024", - "title": "Jobs Lost to Automation Statistics in 2024 | TeamStage", - "type": "web_search_result", - "url": "https://teamstage.io/jobs-lost-to-automation-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5252]", - "page_age": "May 30, 2025", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5524]", - "page_age": null, - "title": "Automation, Generative AI, and Job Displacement Risk in HR Employment", - "type": "web_search_result", - "url": "https://www.shrm.org/topics-tools/research/automation-generative-ai-job-displacement-risk-hr-employment" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5192]", - "page_age": null, - "title": "Growth trends for selected occupations considered at risk from automation : Monthly Labor Review : U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/opub/mlr/2022/article/growth-trends-for-selected-occupations-considered-at-risk-from-automation.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5704]", - "page_age": "August 13, 2025", - "title": "How Will AI Affect the Global Workforce? | Goldman Sachs", - "type": "web_search_result", - "url": "https://www.goldmansachs.com/insights/articles/how-will-ai-affect-the-global-workforce" - }, - { - "encrypted_content": "[REDACTED_TEXT length=980]", - "page_age": "April 30, 2025", - "title": "Automation Displacement in the US Workforce: Who\u2019s at Risk?", - "type": "web_search_result", - "url": "https://www.shrm.org/executive-network/insights/people-strategy/automation-displacement-us-workforce-whos-at-risk" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1900]", - "page_age": "June 30, 2025", - "title": "AI Job Displacement Analysis (2025-2030) by Josephine Nartey :: SSRN", - "type": "web_search_result", - "url": "https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5316265" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4204]", - "page_age": "May 8, 2025", - "title": "About 1 in 8 US workers could be displaced due to automation | HR Dive", - "type": "web_search_result", - "url": "https://www.hrdive.com/news/about-1-in-8-us-workers-could-be-displaced-due-to-automation/747528/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4684]", - "page_age": "July 7, 2025", - "title": "40 Jobs Lost to Automation Statistics: 2024 Job Displacement Analysis - Financesonline.com", - "type": "web_search_result", - "url": "https://financesonline.com/jobs-lost-to-automation-statistics/" - } - ], - "tool_use_id": "srvtoolu_013UWnWdx7tNvW3kWP9QezVW", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01EL8bwbrN1tMyaAXgs1XbJs", - "input": { - "query": "US household chronic illness prevalence cancer Alzheimer's diabetes 2024 statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_017ykgLwbuHzR6JBi5TKRF3k", - "input": { - "query": "American techno-optimism technology attitude survey 2024 financial resilience savings statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5700]", - "page_age": null, - "title": "Chronic Disease Prevalence in the US: Sociodemographic and Geographic Variations by Zip Code Tabulation Area", - "type": "web_search_result", - "url": "https://www.cdc.gov/pcd/issues/2024/23_0267.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5704]", - "page_age": null, - "title": "Explore Multiple Chronic Conditions in the United States | AHR", - "type": "web_search_result", - "url": "https://www.americashealthrankings.org/explore/measures/CHC" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5768]", - "page_age": null, - "title": "The Growing Burden of Chronic Diseases", - "type": "web_search_result", - "url": "https://nihcm.org/publications/the-growing-burden-of-chronic-diseases" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5868]", - "page_age": null, - "title": "The Burden of Chronic Disease - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC10830426/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5544]", - "page_age": null, - "title": "Projecting the chronic disease burden among the adult population in the United States using a multi-state population model - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC9881650/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5440]", - "page_age": "August 14, 2025", - "title": "Fast Facts: Health and Economic Costs of Chronic Conditions | Chronic Disease | CDC", - "type": "web_search_result", - "url": "https://www.cdc.gov/chronic-disease/data-research/facts-stats/index.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6632]", - "page_age": "July 1, 2025", - "title": "Primer: Chronic Disease Among Adults in the United States - AAF", - "type": "web_search_result", - "url": "https://www.americanactionforum.org/insight/primer-chronic-disease-among-adults-in-the-united-states/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5060]", - "page_age": null, - "title": "Chronic Disease Indicators: 2022\u20132024 Refresh and Modernization of the Web Tool - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11192494/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5556]", - "page_age": null, - "title": "Chronic Disease Indicators: 2022\u20132024 Refresh and Modernization of the Web Tool", - "type": "web_search_result", - "url": "https://www.cdc.gov/pcd/issues/2024/24_0109.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5440]", - "page_age": null, - "title": "Trends in Multiple Chronic Conditions Among US Adults, By Life Stage, Behavioral Risk Factor Surveillance System, 2013\u20132023", - "type": "web_search_result", - "url": "https://www.cdc.gov/pcd/issues/2025/24_0539.htm" - } - ], - "tool_use_id": "srvtoolu_01EL8bwbrN1tMyaAXgs1XbJs", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2920]", - "page_age": "August 27, 2025", - "title": "Americans report positive attitudes and optimism toward technology | Ipsos", - "type": "web_search_result", - "url": "https://www.ipsos.com/en-us/news-polls/americans-report-positive-attitudes-and-optimism-toward-technology" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4252]", - "page_age": "December 3, 2025", - "title": "Increase in Overall Sense of Financial Security and Spike in Optimism Though Common Financial Worries Persist", - "type": "web_search_result", - "url": "https://www.aarp.org/pri/topics/work-finances-retirement/financial-security-retirement/financial-security-trends-survey/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4336]", - "page_age": "May 25, 2023", - "title": "Is America Really a Techno-Optimist Country? | American Enterprise Institute - AEI", - "type": "web_search_result", - "url": "https://www.aei.org/articles/is-america-really-a-techno-optimist-country/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5476]", - "page_age": null, - "title": "Consumers Express More Optimism about their Financial Situations; Inflation Expectations Tick Up - FEDERAL RESERVE BANK of NEW YORK", - "type": "web_search_result", - "url": "https://www.newyorkfed.org/newsevents/news/research/2024/20241209" - }, - { - "encrypted_content": "[REDACTED_TEXT length=272]", - "page_age": null, - "title": "Scaling Techno-Optimistic Visions", - "type": "web_search_result", - "url": "https://estsjournal.org/index.php/ests/article/download/283/261/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2528]", - "page_age": "February 24, 2024", - "title": "Attitudes towards technology and their relationship with pro-environmental behaviour: Development and validation of the GATT scale - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/pii/S0272494424000318" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2596]", - "page_age": "October 15, 2024", - "title": "2024 KPMG US technology survey report: The digital dividend", - "type": "web_search_result", - "url": "https://kpmg.com/us/en/articles/2024/us-tech-survey-2024-gated.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5580]", - "page_age": "May 30, 2024", - "title": "2024 KPMG American Perspectives Survey", - "type": "web_search_result", - "url": "https://kpmg.com/us/en/media/news/2024-american-perspectives-survey.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3328]", - "page_age": null, - "title": "Introduction - Tech Sentiment Report", - "type": "web_search_result", - "url": "https://www.dice.com/recruiting/ebooks/tech-sentiment-report/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=708]", - "page_age": "September 3, 2024", - "title": "Some Signs of Renewed American Techno-Optimism | American Enterprise Institute - AEI", - "type": "web_search_result", - "url": "https://www.aei.org/economics/some-signs-of-renewed-american-techno-optimism/" - } - ], - "tool_use_id": "srvtoolu_017ykgLwbuHzR6JBi5TKRF3k", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=223]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpQBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDBxvePcTKb5DnJxjXxoMu2ub+SBi7ghPeiLcIjA2ELkZZ9agEm0n2HobNlzbxnTSLNQ+nJkv224fH14dSszbS7X6U2nrA675l31Bf9UqGHAhPh5Vv3BU207lt1Ko+NeU3XYjJWqP...[truncated]", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result_location", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - } - ], - "text": "[REDACTED_TEXT length=130]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=113]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDG03+Sv90fPTeGiAHxoMQT1nzxdzQowkDbImIjDfGinEHcJB9UTgFp1W92myhhzZJxRQiPQW7C6OO5S0Jx3wDJsrppJFmrj29azAC7IqFeHDcagZokyfiZGVSZE2fnENvVeswRgE", - "title": "Pew Research Center 2024 Artificial Intelligence Survey Published | Center for Artificial Intelligence Innovation | National Center for Supercomputing Applications (NCSA) | Illinois", - "type": "web_search_result_location", - "url": "https://ai.ncsa.illinois.edu/caii-contribution-to-pew-research-center-2024-artificial-intelligence-survey/" - } - ], - "text": "[REDACTED_TEXT length=91]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=121]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDBEGWWJhiGkUrvuQLRoMYtnijzA6X9h2xXYwIjCMkEaT7IxX08ynUd9u1ZEWrL00PCXcuZT1erCtU8v14Ee7CXORHoi2ziFns1qvnWcqFnU4o+GCQ/k+suuIvtWEKJoUaXW2weQY...[truncated]", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=118]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=147]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDD/xjOmIrGN6MD5gUhoMeNBlM75EnCGid0LoIjC7Z6HB+79vGzmRHkwsHmuMlHePvt5JbzQ8ryUs1Ef5Lp0kfyejyuc6+NAt9ztM5mMqFVAbhRq4ENCmswRbWL6wq1w7LAGvLhgE", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=88]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=56]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPwQsxfLS1y5gv4DeBoMHMP1HYk8MgKfXNkKIjCPcwZMecwzCNKnflIyzg/QfMvyhFk2z58ubVhmivB8vAKOSBJIGjU0iasdgt5SsysqFFQqOcXUKKPsxxYVpChcs2pr9K8pGAQ=", - "title": "Jobs Lost to Automation Statistics in 2024 | TeamStage", - "type": "web_search_result_location", - "url": "https://teamstage.io/jobs-lost-to-automation-statistics/" - }, - { - "cited_text": "[REDACTED_TEXT length=56]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCk825Mzoo8JQphytRoM5q3JVzlTcjV1zIpKIjDxPpU5K1jPo9NueCftzfhhrBgR1oS9gU5FFwQuqdHctTjihvBh+MM66u3D0XU1c0MqFcDqA8VjPWj1buJ7KOi4/4RGtn69XRgE", - "title": "Jobs Lost to Automation Statistics in 2024 | TeamStage", - "type": "web_search_result_location", - "url": "https://teamstage.io/jobs-lost-to-automation-statistics/" - } - ], - "text": "[REDACTED_TEXT length=56]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAecoxNs8riTnKVlnxoMcB/ZYXDj6sa6yb6dIjBLLwthjEE4pgMbZ1f57MawAe4FHSOQqgYLrQdQQ/rLqd6wrcPTK2pbS87s9KpmmHAqFsotiZ1/hHcRcbJww/pIy9Y9+BxnC/wY...[truncated]", - "title": "About 1 in 8 US workers could be displaced due to automation | HR Dive", - "type": "web_search_result_location", - "url": "https://www.hrdive.com/news/about-1-in-8-us-workers-could-be-displaced-due-to-automation/747528/" - } - ], - "text": "[REDACTED_TEXT length=138]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN8EpWxT60rFU/FwyBoMWznfO4p49nd4O1bkIjA+ViaOtAYx27BDhHTUI/0/LYd+TYJX/u3asUvOZZQNSEiGJuNicP2G191aDzEwx4AqFNyheqCqCkmzU2qB2H5Csn7ZNaW8GAQ=", - "title": "Chronic Disease Prevalence in the US: Sociodemographic and Geographic Variations by Zip Code Tabulation Area", - "type": "web_search_result_location", - "url": "https://www.cdc.gov/pcd/issues/2024/23_0267.htm" - } - ], - "text": "[REDACTED_TEXT length=80]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNZLqJe3XdhCEYlxKBoMtwxshKsYe2jQIljeIjC1IUzSjm9p36Wtpf0Cz4ThHgzAPy4JZaplcatOQnX9WTfAbVbBIygE6IVGM64C0O8qFCNMcjq6qon2c8LRyIbBsoHsemkKGAQ=", - "title": "Trends in Multiple Chronic Conditions Among US Adults, By Life Stage, Behavioral Risk Factor Surveillance System, 2013\u20132023", - "type": "web_search_result_location", - "url": "https://www.cdc.gov/pcd/issues/2025/24_0539.htm" - } - ], - "text": "[REDACTED_TEXT length=140]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDO9dRiYcPT+YkEZOkBoMPOHQE5HUf5VMCXAUIjA3xSG3JTyjuFJuI/OAfHOUlTCnFWu5HB34qUDsTZWrCDF/siBsuOXnEwxgqeljZPwqFKlkzU9+Ji9nqRqCTUA60ecMpf9LGAQ=", - "title": "Americans report positive attitudes and optimism toward technology | Ipsos", - "type": "web_search_result_location", - "url": "https://www.ipsos.com/en-us/news-polls/americans-report-positive-attitudes-and-optimism-toward-technology" - } - ], - "text": "[REDACTED_TEXT length=84]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDKiL2z3ySwUtZz57OhoM7buo4V5gniDtpE+aIjCBLsK5pSim6q3mEmuiRdMu+zrBDDwPIaNagNNTs/9LymNAWIFvBgx2NtPJEyDFiGEqFHQv1tWK+kO9zOcEiznqLLRWLOF1GAQ=", - "title": "Frontiers | Artificial intelligence literacy among university students\u2014a comparative transnational survey", - "type": "web_search_result_location", - "url": "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full" - } - ], - "text": "[REDACTED_TEXT length=127]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_019c9axV2re9c3Rr7GnYqskz", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "distribution": { - "type": "beta", - "alpha": 2.1, - "beta": 3.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Gallup/Bentley 2024 (64% report at least some AI knowledge; 9% extremely knowledgeable); Pew 2024 (only 30% correctly identify AI applications); Frontiers 2024 AI literacy study (mean ~2.98/5 among st...[truncated]", - "note": "Beta(2.1, 3.8) yields mean ~0.36 and SD ~0.19, right-skewed toward low-moderate literacy, consistent with 30% application-identification rate and a small expert tail. Age, education, and occupation mo...[truncated]" - } - }, - { - "name": "ai_risk_perception", - "distribution": { - "type": "beta", - "alpha": 3.2, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research 2024 (51% more concerned than excited about AI; 56% extremely/very concerned about job elimination); Rethink Priorities 2023 (51% support AI research pause; AI existential risk perceived ...[truncated]", - "note": "Beta(3.2, 2.8) yields mean ~0.53 and SD ~0.19, slightly above the midpoint. Reflects a majority-concerned but non-panicked public. Right tail represents high-fear segment. ai_literacy and trust_in_ins...[truncated]" - } - }, - { - "name": "automation_job_vulnerability", - "distribution": { - "type": "beta", - "alpha": 1.8, - "beta": 3.2, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "SHRM 2024/2025 (39% negligible risk, ~50% slight-moderate, ~13% high risk across 800+ BLS occupations); Goldman Sachs 2025 (2.5% immediate displacement risk if current AI expanded; 6-7% if widely adop...[truncated]", - "note": "Beta(1.8, 3.2) yields mean ~0.36 and SD ~0.20, skewed toward lower vulnerability for the general adult population. Occupation and education modifiers critical: Production/Sales/Service occupations wil...[truncated]" - } - }, - { - "name": "asi_adoption_willingness", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Gallup/Bentley 2024 (only 11% of US adults more excited than concerned about AI daily life use; 17% of workers report currently using AI tools); Pew 2024 (64% at least somewhat knowledgeable, correlat...[truncated]", - "note": "Beta(2.5, 3.0) yields mean ~0.45 and SD ~0.18. Moderate-to-low base adoption willingness reflects the preponderance of concern over excitement in the general public. ai_literacy and openness modifiers...[truncated]" - } - }, - { - "name": "financial_resilience", - "distribution": { - "type": "beta", - "alpha": 2.8, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "AARP 2025 Financial Security Trends Survey (60% of adults 30+ rate situation good/excellent; 1 in 4 said situation worse than prior year); KPMG 2024 (54% optimistic about personal finances; 24% not op...[truncated]", - "note": "Beta(2.8, 2.8) symmetric, mean ~0.50, SD ~0.18. Reasonably centered: roughly half of adults report good financial situations, but significant tail of vulnerability. household_income and homeownership ...[truncated]" - } - }, - { - "name": "chronic_illness_household", - "distribution": { - "type": "boolean", - "probability_true": 0.45, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "CDC 2024 (129M+ Americans have at least 1 major chronic disease; Alzheimer's affects ~7M including 1 in 9 adults 65+); CDC BRFSS 2023/2024 (51.4% of US adults have multiple chronic conditions; 27.1% y...[truncated]", - "note": "Base probability ~0.45 for at least one household member with a serious qualifying chronic illness (cancer, Alzheimer's, ALS, Type 1/2 diabetes, etc.) at the household level, accounting for household ...[truncated]" - } - }, - { - "name": "stem_background", - "distribution": { - "type": "boolean", - "probability_true": 0.22, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Occupational Employment Statistics 2024 (STEM occupations ~10% of US workforce per BLS, grew from 6.5% in 2010 to ~10% in 2024); NSF Science & Engineering Indicators (STEM degree holders ~19-23% o...[truncated]", - "note": "Base probability 0.22 captures both STEM-educated (degree) and STEM-occupied adults, with some overlap. education_level and occupation modifiers will be dominant: Professional + Bachelor's/Graduate wi...[truncated]" - } - }, - { - "name": "information_verification_habit", - "distribution": { - "type": "beta", - "alpha": 2.2, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Elon University/Pew 2024 (only 23% of US adults have used LLMs; many unsure if AI is fair/biased; large share cannot detect AI-generated content); NCES PIAAC 2023 (28% of US adults at lowest literacy ...[truncated]", - "note": "Beta(2.2, 3.5) yields mean ~0.39 and SD ~0.18, skewed toward lower verification habits. Consistent with declining critical thinking scores and low media literacy benchmarks. need_for_cognition and edu...[truncated]" - } - }, - { - "name": "institutional_change_support", - "distribution": { - "type": "beta", - "alpha": 2.3, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew 2024 (62% of public lack confidence in US government to regulate AI effectively; both parties more worried about insufficient regulation than overregulation); Rethink Priorities 2023 (51% support ...[truncated]", - "note": "Beta(2.3, 2.8) yields mean ~0.45, SD ~0.18. Slight lean below midpoint reflects that Americans are skeptical of institutional competence even when supporting change. political_ideology is the stronges...[truncated]" - } - }, - { - "name": "economic_anxiety", - "distribution": { - "type": "beta", - "alpha": 3.0, - "beta": 2.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew 2024 (56% extremely/very concerned about AI eliminating jobs; 75% say AI will reduce total US jobs over next 10 years); AARP 2025 (prices rising faster than income is top financial worry; 1 in 4 a...[truncated]", - "note": "Beta(3.0, 2.5) yields mean ~0.55, SD ~0.18. Leans above midpoint reflecting a majority-anxious public, particularly around job security. automation_job_vulnerability is the primary driver; financial_r...[truncated]" - } - }, - { - "name": "techno_optimism", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Ipsos/USA Today 2019 (67% believe technology improved quality of life; 58% expect it to improve next generation's life); Pew 2024 (only 17% of US public say AI will have very/somewhat positive impact ...[truncated]", - "note": "Beta(2.5, 3.5) yields mean ~0.42, SD ~0.18. Right-skewed distribution: most Americans hold moderate-to-low general techno-optimism for AI specifically, though higher for technology broadly. openness a...[truncated]" - } - }, - { - "name": "social_cohesion_orientation", - "distribution": { - "type": "beta", - "alpha": 3.0, - "beta": 2.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale floor" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale ceiling" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew 2024 (57% of public concerned about AI causing loss of human connection vs 37% experts; broad worry about community/social fabric); Gallup/Bentley 2024 (concern patterns suggest community-oriented...[truncated]", - "note": "Beta(3.0, 2.8) yields mean ~0.52, SD ~0.18. Slight lean above midpoint \u2014 Americans moderately prioritize collective stability, especially in crisis contexts. agreeableness is the primary personality d...[truncated]" - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 115481, - "output_tokens": 5950, - "server_tool_use": { - "web_search_requests": 5, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.bls.gov/opub/mlr/2022/article/growth-trends-for-selected-occupations-considered-at-risk-from-automation.htm", - "https://www.nature.com/articles/s41598-024-82977-5", - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/", - "https://www.americanactionforum.org/insight/primer-chronic-disease-among-adults-in-the-united-states/", - "https://financesonline.com/jobs-lost-to-automation-statistics/", - "https://teamstage.io/jobs-lost-to-automation-statistics/", - "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics", - "https://kpmg.com/us/en/articles/2024/us-tech-survey-2024-gated.html", - "https://nationalcoalitionforliteracy.org/about-adult-literacy/piaac/", - "https://aiindex.stanford.edu/wp-content/uploads/2024/04/HAI_AI-Index-Report-2024_Chapter9.pdf", - "https://www.goldmansachs.com/insights/articles/how-will-ai-affect-the-global-workforce", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.hrdive.com/news/about-1-in-8-us-workers-could-be-displaced-due-to-automation/747528/", - "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC11192494/", - "https://estsjournal.org/index.php/ests/article/download/283/261/", - "https://www.sciencedirect.com/science/article/pii/S0272494424000318", - "https://www.sciencedirect.com/science/article/pii/S004016252500335X", - "https://ailiteracy.institute/ai-literacy-review-march-11-2025/", - "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full", - "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498", - "https://www.cdc.gov/chronic-disease/data-research/facts-stats/index.html", - "https://www.nu.edu/blog/ai-job-statistics/", - "https://www.cdc.gov/pcd/issues/2024/23_0267.htm", - "https://nihcm.org/publications/the-growing-burden-of-chronic-diseases", - "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp", - "https://hai.stanford.edu/ai-index/2024-ai-index-report/public-opinion", - "https://www.ipsos.com/en-us/news-polls/americans-report-positive-attitudes-and-optimism-toward-technology", - "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/", - "https://ai.ncsa.illinois.edu/caii-contribution-to-pew-research-center-2024-artificial-intelligence-survey/", - "https://www.aarp.org/pri/topics/work-finances-retirement/financial-security-retirement/financial-security-trends-survey/", - "https://kpmg.com/us/en/media/news/2024-american-perspectives-survey.html", - "https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5316265", - "https://www.shrm.org/executive-network/insights/people-strategy/automation-displacement-us-workforce-whos-at-risk", - "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/", - "https://www.cdc.gov/pcd/issues/2025/24_0539.htm", - "https://www.aei.org/articles/is-america-really-a-techno-optimist-country/", - "https://www.newyorkfed.org/newsevents/news/research/2024/20241209", - "https://www.cdc.gov/pcd/issues/2024/24_0109.htm", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC10830426/", - "https://www.shrm.org/topics-tools/research/automation-generative-ai-job-displacement-risk-hr-employment", - "https://www.americashealthrankings.org/explore/measures/CHC", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC9881650/", - "https://www.aei.org/economics/some-signs-of-renewed-american-techno-optimism/", - "https://www.elon.edu/u/news/2024/05/15/ai-and-politics-survey/", - "https://www.oecd.org/en/publications/survey-of-adults-skills-2023-country-notes_ab4f6b8c-en/united-states_427d6aac-en.html", - "https://rethinkpriorities.org/research-area/us-public-opinion-of-ai-policy-and-risk/", - "https://en.wikipedia.org/wiki/Literacy_in_the_United_States", - "https://www.dice.com/recruiting/ebooks/tech-sentiment-report/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_220232_043644_claude_agentic_research.json b/examples/logs/20260217_220232_043644_claude_agentic_research.json deleted file mode 100644 index a2706d5..0000000 --- a/examples/logs/20260217_220232_043644_claude_agentic_research.json +++ /dev/null @@ -1,743 +0,0 @@ -{ - "timestamp": "2026-02-17T22:02:32.043693", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 19407 - }, - "response": { - "id": "msg_01QhtNXMUpXidxiJjqwBqxtc", - "content": [ - { - "id": "srvtoolu_015oGhCoztVaEbgayuFmAfXN", - "input": { - "query": "public opinion surveys AI superintelligence risk perception trust 2024 2025" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01RHRYmcqK3W26JJ2n4bCZgp", - "input": { - "query": "AI automation job displacement anxiety survey US adults 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5308]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1800]", - "page_age": null, - "title": "Public Opinion | The 2025 AI Index Report - Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2432]", - "page_age": null, - "title": "Global study reveals trust of AI remains a critical challenge", - "type": "web_search_result", - "url": "https://mbs.edu/news/global-study-reveals-trust-of-ai-remains-a-critical-challenge" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1688]", - "page_age": null, - "title": "Trust, attitudes and use of Artificial Intelligence: A global study 2025", - "type": "web_search_result", - "url": "https://mbs.edu/faculty-and-research/trust-and-ai" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3084]", - "page_age": null, - "title": "CHAPTER 8: Public Opinion", - "type": "web_search_result", - "url": "https://hai.stanford.edu/assets/files/hai_ai-index-report-2025_chapter8_final.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1936]", - "page_age": "May 1, 2025", - "title": "Trust, attitudes and use of artificial intelligence: A global study 2025", - "type": "web_search_result", - "url": "https://kpmg.com/xx/en/our-insights/ai-and-technology/trust-attitudes-and-use-of-ai.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=568]", - "page_age": null, - "title": "Trust, attitudes and use of artificial intelligence A global study 2025", - "type": "web_search_result", - "url": "https://assets.kpmg.com/content/dam/kpmgsites/xx/pdf/2025/05/trust-attitudes-and-use-of-ai-global-report.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=476]", - "page_age": "November 11, 2025", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1804]", - "page_age": null, - "title": "Global study reveals trust of AI remains a critical challenge reflecting tension between benefits and risks", - "type": "web_search_result", - "url": "https://kpmg.com/xx/en/media/press-releases/2025/04/trust-of-ai-remains-a-critical-challenge.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4140]", - "page_age": null, - "title": "Most Americans use AI but still don\u2019t trust it", - "type": "web_search_result", - "url": "https://yougov.com/en-us/articles/53701-most-americans-use-ai-but-still-dont-trust-it" - } - ], - "tool_use_id": "srvtoolu_015oGhCoztVaEbgayuFmAfXN", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5548]", - "page_age": "May 30, 2025", - "title": "59 AI Job Statistics: Future of U.S. Jobs | National University", - "type": "web_search_result", - "url": "https://www.nu.edu/blog/ai-job-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5540]", - "page_age": null, - "title": "Top 20 Predictions from Experts on AI Job Loss", - "type": "web_search_result", - "url": "https://research.aimultiple.com/ai-job-loss/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5116]", - "page_age": "February 26, 2025", - "title": "Resume Now\u2019s AI Disruption Report Reveals Anxiety About AI Job Loss", - "type": "web_search_result", - "url": "https://www.resume-now.com/job-resources/careers/ai-disruption-report" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4512]", - "page_age": "July 11, 2024", - "title": "50+ AI Replacing Jobs Statistics 2024 \u00b7 AIPRM", - "type": "web_search_result", - "url": "https://www.aiprm.com/ai-replacing-jobs-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5656]", - "page_age": "5 days ago", - "title": "Measuring US workers\u2019 capacity to adapt to AI-driven job displacement | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=500]", - "page_age": "3 weeks ago", - "title": "Automation, Generative AI, and Job Displacement Risk in U.S. Employment", - "type": "web_search_result", - "url": "https://www.shrm.org/topics-tools/research/automation-generative-ai-and-job-displacement-risk-in-u-s--employment" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4960]", - "page_age": null, - "title": "Automation, Generative AI, and Job Displacement Risk in HR Employment", - "type": "web_search_result", - "url": "https://www.shrm.org/topics-tools/research/automation-generative-ai-job-displacement-risk-hr-employment" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4748]", - "page_age": "August 22, 2025", - "title": "71% Fear AI Will Take Jobs. Here\u2019s What Actually Happens | by The Hidden Layer | Medium", - "type": "web_search_result", - "url": "https://hiddenlayerai.medium.com/71-fear-ai-will-take-jobs-heres-what-actually-happens-f853cd5758fa" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2964]", - "page_age": "March 12, 2025", - "title": "On Future AI Use in Workplace, US Workers More Worried Than Hopeful | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2025/02/25/u-s-workers-are-more-worried-than-hopeful-about-future-ai-use-in-the-workplace/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1792]", - "page_age": "August 20, 2025", - "title": "New Poll Finds 7 in 10 Americans Fear AI Job Loss", - "type": "web_search_result", - "url": "https://www.eweek.com/news/americans-fear-ai-job-loss-survey/" - } - ], - "tool_use_id": "srvtoolu_01RHRYmcqK3W26JJ2n4bCZgp", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=2202]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_013AamNovqeH7mT1iJHo17qn", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "modifiers": [ - { - "when": "education_level in ['Bachelor\\'s', 'Graduate Degree'] and occupation == 'Management/Professional'", - "multiply": 1.25, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma'] and age > 55", - "multiply": 0.8, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age < 35 and occupation in ['Management/Professional', 'Sales/Office']", - "multiply": 1.2, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age > 65 and education_level in ['Less than HS', 'HS Diploma', 'Some College']", - "multiply": 0.75, - "add": -0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Production/Transport' and education_level in ['Less than HS', 'HS Diploma']", - "multiply": 0.85, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "ai_risk_perception", - "modifiers": [ - { - "when": "ai_literacy < 0.35 and trust_in_institutions < 0.40", - "multiply": 1.3, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy > 0.70 and openness > 0.65", - "multiply": 1.1, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.30", - "multiply": 1.25, - "add": 0.2, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.40 and trust_in_institutions < 0.45", - "multiply": 1.2, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy > 0.75 and trust_in_institutions > 0.60", - "multiply": 1.05, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy < 0.50 and openness < 0.50", - "multiply": 1.18, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "automation_job_vulnerability", - "modifiers": [ - { - "when": "occupation == 'Sales/Office' and employment_status in ['Full-time', 'Part-time']", - "multiply": 1.4, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Management/Professional' and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": 1.35, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": 1.45, - "add": 0.2, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Service' and education_level in ['Less than HS', 'HS Diploma', 'Some College']", - "multiply": 1.2, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": 1.15, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Self-employed' and occupation == 'Management/Professional'", - "multiply": 1.25, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "asi_adoption_willingness", - "modifiers": [ - { - "when": "ai_literacy > 0.70 and openness > 0.65 and ai_risk_perception < 0.60", - "multiply": 1.35, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy > 0.60 and openness > 0.55", - "multiply": 1.25, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_risk_perception > 0.75 and openness < 0.45", - "multiply": 0.7, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy < 0.35 and ai_risk_perception > 0.65", - "multiply": 0.75, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy < 0.40 and openness > 0.60", - "multiply": 1.1, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_risk_perception > 0.80", - "multiply": 0.72, - "add": -0.13, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "financial_resilience", - "modifiers": [ - { - "when": "household_income < 40000 and homeownership == false and employment_status in ['Full-time', 'Part-time']", - "multiply": 0.82, - "add": -0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "household_income > 120000 and homeownership == true", - "multiply": 1.1, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Unemployed' and household_income < 50000", - "multiply": 0.7, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Retired' and homeownership == true", - "multiply": 1.08, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "household_income < 60000 and employment_status in ['Full-time', 'Part-time', 'Self-employed']", - "multiply": 0.88, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "chronic_illness_household", - "modifiers": [ - { - "when": "age > 60 and household_size >= 2", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.58 - }, - { - "when": "age > 70", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.7 - }, - { - "when": "age >= 45 and age <= 60 and household_size >= 3", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.42 - }, - { - "when": "age < 35 and household_size <= 2", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.09 - } - ] - }, - { - "name": "stem_background", - "modifiers": [ - { - "when": "education_level in ['Bachelor\\'s', 'Graduate Degree'] and occupation == 'Management/Professional'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.52 - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma'] and occupation == 'Service'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.05 - }, - { - "when": "occupation == 'Construction/Extraction' and education_level in ['Some College', \"Associate's\"]", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.2 - }, - { - "when": "occupation == 'Production/Transport' and education_level in ['Less than HS', 'HS Diploma']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.08 - } - ] - }, - { - "name": "information_verification_habit", - "modifiers": [ - { - "when": "need_for_cognition > 0.70 and susceptibility_to_misinformation < 0.35", - "multiply": 1.2, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "susceptibility_to_misinformation > 0.70 and education_level in ['Less than HS', 'HS Diploma']", - "multiply": 0.75, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "need_for_cognition > 0.60 and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "multiply": 1.18, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "susceptibility_to_misinformation > 0.65 and need_for_cognition < 0.40", - "multiply": 0.72, - "add": -0.14, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "institutional_change_support", - "modifiers": [ - { - "when": "political_ideology in ['Very Liberal', 'Liberal'] and trust_in_institutions > 0.45 and openness > 0.55", - "multiply": 1.3, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology in ['Conservative', 'Very Conservative'] and trust_in_institutions < 0.50", - "multiply": 0.78, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate' and openness > 0.55", - "multiply": 1.12, - "add": 0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.30 and political_ideology in ['Very Liberal', 'Liberal']", - "multiply": 1.2, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology in ['Conservative', 'Very Conservative'] and openness < 0.45", - "multiply": 0.72, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "economic_anxiety", - "modifiers": [ - { - "when": "automation_job_vulnerability > 0.70 and financial_resilience < 0.40", - "multiply": 1.4, - "add": 0.2, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "automation_job_vulnerability > 0.60 and neuroticism > 0.60", - "multiply": 1.35, - "add": 0.17, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "financial_resilience > 0.70 and automation_job_vulnerability < 0.40", - "multiply": 0.8, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "automation_job_vulnerability > 0.50 and financial_resilience < 0.50 and neuroticism > 0.50", - "multiply": 1.32, - "add": 0.16, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "financial_resilience > 0.65 and neuroticism < 0.40", - "multiply": 0.82, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "automation_job_vulnerability > 0.75", - "multiply": 1.38, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "techno_optimism", - "modifiers": [ - { - "when": "openness > 0.70 and ai_literacy > 0.60 and political_ideology in ['Very Liberal', 'Liberal', 'Moderate']", - "multiply": 1.3, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness > 0.65 and ai_literacy > 0.55", - "multiply": 1.22, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.40 and ai_literacy < 0.40 and political_ideology in ['Conservative', 'Very Conservative']", - "multiply": 0.78, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology in ['Conservative', 'Very Conservative'] and ai_literacy < 0.50", - "multiply": 0.88, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy > 0.75 and openness > 0.70", - "multiply": 1.28, - "add": 0.13, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.35 and political_ideology == 'Very Conservative'", - "multiply": 0.72, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "social_cohesion_orientation", - "modifiers": [ - { - "when": "agreeableness > 0.70 and religious_affiliation in ['Evangelical Protestant', 'Catholic', 'Other Christian', 'Mainline Protestant']", - "multiply": 1.2, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness > 0.65 and political_ideology in ['Very Liberal', 'Liberal']", - "multiply": 1.18, - "add": 0.09, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness < 0.35 and political_ideology in ['Conservative', 'Very Conservative'] and religious_affiliation == 'None/Unaffiliated'", - "multiply": 0.8, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness > 0.60 and political_ideology == 'Moderate'", - "multiply": 1.12, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "agreeableness < 0.40 and political_ideology in ['Conservative', 'Very Conservative']", - "multiply": 0.85, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - } - ] - } - ] - }, - "name": "conditional_modifiers_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 33122, - "output_tokens": 5543, - "server_tool_use": { - "web_search_requests": 2, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.brookings.edu/articles/measuring-us-workers-capacity-to-adapt-to-ai-driven-job-displacement/", - "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion", - "https://www.pewresearch.org/social-trends/2025/02/25/u-s-workers-are-more-worried-than-hopeful-about-future-ai-use-in-the-workplace/", - "https://mbs.edu/news/global-study-reveals-trust-of-ai-remains-a-critical-challenge", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://assets.kpmg.com/content/dam/kpmgsites/xx/pdf/2025/05/trust-attitudes-and-use-of-ai-global-report.pdf", - "https://www.nu.edu/blog/ai-job-statistics/", - "https://www.resume-now.com/job-resources/careers/ai-disruption-report", - "https://research.aimultiple.com/ai-job-loss/", - "https://kpmg.com/xx/en/our-insights/ai-and-technology/trust-attitudes-and-use-of-ai.html", - "https://mbs.edu/faculty-and-research/trust-and-ai", - "https://www.shrm.org/topics-tools/research/automation-generative-ai-and-job-displacement-risk-in-u-s--employment", - "https://hiddenlayerai.medium.com/71-fear-ai-will-take-jobs-heres-what-actually-happens-f853cd5758fa", - "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/", - "https://yougov.com/en-us/articles/53701-most-americans-use-ai-but-still-dont-trust-it", - "https://www.eweek.com/news/americans-fear-ai-job-loss-survey/", - "https://hai.stanford.edu/assets/files/hai_ai-index-report-2025_chapter8_final.pdf", - "https://www.aiprm.com/ai-replacing-jobs-statistics/", - "https://www.shrm.org/topics-tools/research/automation-generative-ai-job-displacement-risk-hr-employment", - "https://kpmg.com/xx/en/media/press-releases/2025/04/trust-of-ai-remains-a-critical-challenge.html" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_220321_411712_claude_agentic_research.json b/examples/logs/20260217_220321_411712_claude_agentic_research.json deleted file mode 100644 index d8043a5..0000000 --- a/examples/logs/20260217_220321_411712_claude_agentic_research.json +++ /dev/null @@ -1,892 +0,0 @@ -{ - "timestamp": "2026-02-17T22:03:21.411765", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8165 - }, - "response": { - "id": "msg_018wjEkK2Ew83gWAA5rpStpp", - "content": [ - { - "id": "srvtoolu_015rQXBziAjoQP5JdTaPdfnV", - "input": { - "query": "US household composition by age group census 2023 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01MCVRd1D2a6vsRzh9aCibo9", - "input": { - "query": "US interracial marriage same race partner rates by ethnicity 2023" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_0152hTdsVw7dR5XFpqcSbbMy", - "input": { - "query": "assortative mating education religion income correlation US couples" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=412]", - "page_age": null, - "title": "Family Households by Age of Householder: 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/visualizations/interactive/family-households-by-age-of-householder-2024.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2668]", - "page_age": null, - "title": "Age and Sex Composition in the United States: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3332]", - "page_age": null, - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3112]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2992]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2724]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1280]", - "page_age": null, - "title": "2023 Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4992]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - } - ], - "tool_use_id": "srvtoolu_015rQXBziAjoQP5JdTaPdfnV", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=6992]", - "page_age": "January 5, 2026", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5720]", - "page_age": "April 14, 2024", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4032]", - "page_age": "October 13, 2023", - "title": "growth in interracial marriage, 1980 vs 2021 - Working Immigrants", - "type": "web_search_result", - "url": "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2768]", - "page_age": "June 12, 2025", - "title": "BLACK MARRIAGE - BlackDemographics.com", - "type": "web_search_result", - "url": "https://blackdemographics.com/households/marriage-in-black-america/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6544]", - "page_age": null, - "title": "Marital Dissolution Among Interracial Couples - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6196]", - "page_age": null, - "title": "Geographic Variations in Black-White Interracial Marital ...", - "type": "web_search_result", - "url": "https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1396]", - "page_age": null, - "title": "Interracial Couples More Common Among Same-Sex Couples", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2023/11/same-sex-couple-diversity.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1956]", - "page_age": null, - "title": "Intermarriage - Research and data from Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/topic/family-relationships/marriage-divorce/intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1756]", - "page_age": null, - "title": "Race, Ethnicity and Marriage in the United States", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2018/07/interracial-marriages.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5428]", - "page_age": "October 15, 2024", - "title": "24 Groundbreaking Interracial Marriage Statistics For 2026", - "type": "web_search_result", - "url": "https://2date4love.com/blog/interracial-marriage-statistics/" - } - ], - "tool_use_id": "srvtoolu_01MCVRd1D2a6vsRzh9aCibo9", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5752]", - "page_age": null, - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3568]", - "page_age": null, - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4176]", - "page_age": "April 14, 2024", - "title": "New academic study links rising income inequality to \u2018assortative mating\u2019 | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5244]", - "page_age": null, - "title": "Assortative Mating, Intergenerational Mobility, and Educational Inequality", - "type": "web_search_result", - "url": "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5824]", - "page_age": null, - "title": "Full article: Assortative mating, marital stability and the role of business cycles in the United States from 1968 to 2011", - "type": "web_search_result", - "url": "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5468]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income ...", - "type": "web_search_result", - "url": "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6396]", - "page_age": "October 1, 2024", - "title": "Eight Decades of Educational Assortative Mating: A Research Note | Demography | Duke University Press", - "type": "web_search_result", - "url": "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5856]", - "page_age": null, - "title": "Eight Decades of Educational Assortative Mating: A Research Note - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6520]", - "page_age": "February 10, 2015", - "title": "Income inequality and educational assortative mating: Evidence from the Luxembourg Income Study - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4300]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income Inequality | Journal of Political Economy: Vol 127, No 6", - "type": "web_search_result", - "url": "https://www.journals.uchicago.edu/doi/10.1086/702018" - } - ], - "tool_use_id": "srvtoolu_0152hTdsVw7dR5XFpqcSbbMy", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01WBQ2XyaAhGRrBi5oeTp9G8", - "input": { - "query": "US average household size 2023 single parent couple with kids multigenerational age breakdown statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1368]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5380]", - "page_age": null, - "title": "Average family size in the U.S. 1960-2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4176]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4980]", - "page_age": null, - "title": "Distribution of U.S. households by size 1970-2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/242189/disitribution-of-households-in-the-us-by-household-size/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5452]", - "page_age": null, - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5396]", - "page_age": "May 16, 2023", - "title": "TestHut.com | What Is the Average Size of an American Family: Interesting Statistics & Facts", - "type": "web_search_result", - "url": "https://www.testhut.com/average-size-of-an-american-family-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5224]", - "page_age": null, - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4344]", - "page_age": null, - "title": "In 2020, 7.2% of U.S. Family Households Were Multigenerational", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=476]", - "page_age": "5 days ago", - "title": "Average Household Size by State 2026", - "type": "web_search_result", - "url": "https://worldpopulationreview.com/state-rankings/average-household-size-by-state" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3956]", - "page_age": null, - "title": "Average children per family U.S. 2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/718084/average-number-of-own-children-per-family/" - } - ], - "tool_use_id": "srvtoolu_01WBQ2XyaAhGRrBi5oeTp9G8", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=200]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=65]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCO4cdImjmYX5tRfxBoMA8N2qZ80I8WxwyiGIjBUcNyKYxqIjAnaRisc+Oxc9G2iJ2AkOgu4gSWMCrl2dXO1CSyjito3Wba5x/DBmxQqFOyl4PHM01euGBCLD5cRAcxfhPu/GAQ=", - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - } - ], - "text": "[REDACTED_TEXT length=68]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPGBOT9KD539samsThoMDhPVPxEzdDe2yf8UIjA7Y27JzokKNhWvXNVlquObRSAc8rS8ZsZ18PWMitR8FyV9slB6liU4+qbwsajrPSAqFUK44uxxuWsGSXmuVi5P+qYWraDEHxgE", - "title": "In 2020, 7.2% of U.S. Family Households Were Multigenerational", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html" - } - ], - "text": "[REDACTED_TEXT length=128]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOazNlvWaCTIsNMaghoMwuXA4o57KR5JPGEeIjC6eaKexTIST7wUuYWzwdLeiO5jbpPpqK0XoQHr6ufgI8w2cVvJOTyZsx+rwCz/IskqFSL+qjMniWOlo9XdErMoDizuwLediRgE", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=165]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=130]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHY2CHBXfwEbBEQn8RoMWzozUbfnTZK4nI7UIjB5udfExbrQgdkQByqsOMzARjbDOtoQUCPPao+3MEczyUA+enREd0qxhKH6TGM6kicqFTgN4+ZjL8AEwSzr+CvXOsWoUHdVWBgE", - "title": "TestHut.com | What Is the Average Size of an American Family: Interesting Statistics & Facts", - "type": "web_search_result_location", - "url": "https://www.testhut.com/average-size-of-an-american-family-statistics/" - } - ], - "text": "[REDACTED_TEXT length=120]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMZa18BHobC/oeG95hoMvYqRPFt/EmqqIhcQIjCynygNRIwOxuI9WIuE7PeuDz+AUk/mqpe5cbRNtyY12ggcRcxGwU8T4C99HXZTgLIqFofVqkRLZ9FFFQNojO/sUBUsHBTtK6MY...[truncated]", - "title": "TestHut.com | What Is the Average Size of an American Family: Interesting Statistics & Facts", - "type": "web_search_result_location", - "url": "https://www.testhut.com/average-size-of-an-american-family-statistics/" - } - ], - "text": "[REDACTED_TEXT length=155]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=82]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDBEl8G1X/uTNUTv6hxoMKL3lTLffprd0NgymIjBQIqDEC90//Gv3edz5gSceEo1BRrlVWf/IUAOLzBvMfqLPK/CQLxkoloOFicBapDgqFN9HTIY872uK/STRbIC0dcVFdWbIGAQ=", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result_location", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - } - ], - "text": "[REDACTED_TEXT length=109]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOw8Cw0tG1BqW5KiCBoMQsWSIlYXtrOdU+uTIjA9b4eeeqdThwymPLsitVM8S5PeGV0CSViM0eHEn8M3z6a4x9f99YKACL+q1K2jipsqFFkgQVbknvPif2V/7umT34RceyAjGAQ=", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - } - ], - "text": "[REDACTED_TEXT length=165]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDLkpKLusHgSl//S5DxoMfwjOAMVPR/dxI2EeIjAklFtB0hiRAbd+Roppj1W1jTYsolu5Sl1ty7+qU6p2wtd9PIQzfo93yk6XBjr1uH0qFQM57b+GShEzK44VZ3beOsSg3beIDRgE", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - } - ], - "text": "[REDACTED_TEXT length=122]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=76]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDC6uptWrtYOjIMUdWxoM5766cRMxSZZRqmYjIjAb/m2MmTfTus4Uiu5E41tCbFKk/3bAHUHuLnKac6t1KuVH5w6aVh8jkgTzM+p6BvoqFOzy/Qze4B6VqCAme4VIWFnJr0zuGAQ=", - "title": "24 Groundbreaking Interracial Marriage Statistics For 2026", - "type": "web_search_result_location", - "url": "https://2date4love.com/blog/interracial-marriage-statistics/" - } - ], - "text": "[REDACTED_TEXT length=127]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEo9LKJ/poIjBqYJ1BoM10qwOA7aLb7ojhJPIjBOnd04FQlNKvmJsN0J/kJ282Fq5p6TLOJcjlZpfwoZ4WQ6GkeVpcUcvAkPJyROTzEqFghG3ku+laZm1egK/HGC+GoEHi1j2hUY...[truncated]", - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result_location", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - } - ], - "text": "[REDACTED_TEXT length=190]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCSaMIKnUXTLDWrMexoMF34uoLCYJspBj/o4IjD9n2Jg1e50j6xO1Qlg1jUj24N5NiSqzFEpQQA+HEMECxjtHlHjoFOIH4bBOjaCzj0qFlgcJ6ahLerAd5ppDLZaRC5pHQbSWOIY...[truncated]", - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result_location", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - } - ], - "text": "[REDACTED_TEXT length=191]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=131]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDKaat8nNWB9MyZFbmhoMUSNL0+ekmZsBZ09qIjC4QP/YzM3IFcXOzUJQtFx4I7Ucp4O3xxnwRMeG2URCAc8YRNECJqXnmt/qg5V8VMAqFJlcS8ZVCSr6sWIVURL/ERzYpKkaGAQ=", - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - } - ], - "text": "[REDACTED_TEXT length=121]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01UjSfkuDumWL2NdaufAyJLT", - "input": { - "age_brackets": [ - { - "upper_bound": 30, - "label": "18-29" - }, - { - "upper_bound": 45, - "label": "30-44" - }, - { - "upper_bound": 65, - "label": "45-64" - }, - { - "upper_bound": 999, - "label": "65+" - } - ], - "household_type_weights": [ - { - "bracket": "18-29", - "types": [ - { - "type": "single", - "weight": 0.47 - }, - { - "type": "couple", - "weight": 0.22 - }, - { - "type": "single_parent", - "weight": 0.1 - }, - { - "type": "couple_with_kids", - "weight": 0.13 - }, - { - "type": "multi_generational", - "weight": 0.08 - } - ] - }, - { - "bracket": "30-44", - "types": [ - { - "type": "single", - "weight": 0.22 - }, - { - "type": "couple", - "weight": 0.2 - }, - { - "type": "single_parent", - "weight": 0.14 - }, - { - "type": "couple_with_kids", - "weight": 0.37 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "45-64", - "types": [ - { - "type": "single", - "weight": 0.28 - }, - { - "type": "couple", - "weight": 0.38 - }, - { - "type": "single_parent", - "weight": 0.1 - }, - { - "type": "couple_with_kids", - "weight": 0.17 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "65+", - "types": [ - { - "type": "single", - "weight": 0.38 - }, - { - "type": "couple", - "weight": 0.48 - }, - { - "type": "single_parent", - "weight": 0.04 - }, - { - "type": "couple_with_kids", - "weight": 0.03 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - } - ], - "same_group_rates": [ - { - "group": "white", - "rate": 0.91 - }, - { - "group": "black", - "rate": 0.82 - }, - { - "group": "hispanic", - "rate": 0.74 - }, - { - "group": "asian", - "rate": 0.71 - }, - { - "group": "native_american", - "rate": 0.6 - }, - { - "group": "multiracial", - "rate": 0.4 - } - ], - "default_same_group_rate": 0.65, - "assortative_mating": [ - { - "attribute": "education_level", - "correlation": 0.65 - }, - { - "attribute": "income_bracket", - "correlation": 0.58 - }, - { - "attribute": "religious_affiliation", - "correlation": 0.55 - }, - { - "attribute": "political_affiliation", - "correlation": 0.7 - }, - { - "attribute": "race_ethnicity", - "correlation": 0.82 - }, - { - "attribute": "age", - "correlation": 0.75 - } - ], - "partner_age_gap_mean": -2.3, - "partner_age_gap_std": 4.5, - "min_adult_age": 18, - "child_min_parent_offset": 18, - "child_max_parent_offset": 45, - "max_dependent_child_age": 17, - "elderly_min_offset": 20, - "elderly_max_offset": 45, - "life_stages": [ - { - "max_age": 5, - "label": "preschool" - }, - { - "max_age": 11, - "label": "elementary" - }, - { - "max_age": 14, - "label": "middle_school" - }, - { - "max_age": 18, - "label": "high_school" - } - ], - "adult_stage_label": "adult", - "avg_household_size": 2.51, - "sources": [ - "U.S. Census Bureau, America's Families and Living Arrangements: 2023 \u2014 https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "U.S. Census Bureau, Family Households by Age of Householder: 2024 \u2014 https://www.census.gov/library/stories/2024/11/family-households.html", - "U.S. Census Bureau, In 2020, 7.2% of U.S. Family Households Were Multigenerational \u2014 https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html", - "U.S. Census Bureau, Historical Households Tables (HH-2 through HH-7) \u2014 https://www.census.gov/data/tables/time-series/demo/families/households.html", - "U.S. Census Bureau, Race, Ethnicity and Marriage in the United States (2018) \u2014 https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "Pew Research Center, Trends and Patterns in Intermarriage (2017) \u2014 https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "BlackDemographics.com, Black Marriage in America \u2014 https://blackdemographics.com/households/marriage-in-black-america/", - "Wikipedia, Interracial Marriage in the United States \u2014 https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "PMC / NIH, Religion, Marriage Markets, and Assortative Mating in the United States \u2014 https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "NBER, Assortative Mating and Income Inequality (Greenwood et al.) \u2014 https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "Duke University Press / Demography, Eight Decades of Educational Assortative Mating (2024) \u2014 https://read.dukeupress.edu/demography/article/61/5/1293/390842/", - "PRB, U.S. Household Composition Shifts as the Population Grows Older \u2014 https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "Statista, Average size of households in the U.S. 2023 \u2014 https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "Statista, Average family size in the U.S. 1960\u20132023 \u2014 https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/", - "U.S. Census Bureau, National Population by Characteristics: 2020\u20132025 \u2014 https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "PMC / NIH, Marital Dissolution Among Interracial Couples \u2014 https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - ] - }, - "name": "household_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 99277, - "output_tokens": 2992, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909", - "https://www.census.gov/topics/families.html", - "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf", - "https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf", - "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/", - "https://www.census.gov/library/stories/2023/06/several-generations-under-one-roof.html", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "https://www.census.gov/library/stories/2023/11/same-sex-couple-diversity.html", - "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/", - "https://www.journals.uchicago.edu/doi/10.1086/702018", - "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/", - "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "https://www.census.gov/topics/families/families-and-households.html", - "https://www.statista.com/statistics/242189/disitribution-of-households-in-the-us-by-household-size/", - "https://www.census.gov/library/visualizations/interactive/family-households-by-age-of-householder-2024.html", - "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/", - "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf", - "https://www.census.gov/library/stories/2024/11/family-households.html", - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://2date4love.com/blog/interracial-marriage-statistics/", - "https://worldpopulationreview.com/state-rankings/average-household-size-by-state", - "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html", - "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "https://www.statista.com/statistics/718084/average-number-of-own-children-per-family/", - "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/", - "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A", - "https://www.pewresearch.org/topic/family-relationships/marriage-divorce/intermarriage/", - "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "https://www.testhut.com/average-size-of-an-american-family-statistics/", - "https://blackdemographics.com/households/marriage-in-black-america/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_220344_902199_claude_reasoning_call.json b/examples/logs/20260217_220344_902199_claude_reasoning_call.json deleted file mode 100644 index 8603439..0000000 --- a/examples/logs/20260217_220344_902199_claude_reasoning_call.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "timestamp": "2026-02-17T22:03:44.902237", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8995 - }, - "response": { - "id": "msg_01Gn7ugFrqrr595PgTKNJY1n", - "content": [ - { - "id": "toolu_01GMW4kPodfXo2V59jMqXpAp", - "input": { - "event_type": "announcement", - "content": "[REDACTED_TEXT length=4794]", - "source": "OpenAI (corroborated by Anthropic, DeepMind, xAI, and China's Ministry of Science and Technology)", - "credibility": 0.85, - "ambiguity": 0.55, - "emotional_valence": 0.65, - "reasoning": "[REDACTED_TEXT length=2029]" - }, - "name": "event_parsing", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3031, - "output_tokens": 1599, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_220423_305521_claude_reasoning_call.json b/examples/logs/20260217_220423_305521_claude_reasoning_call.json deleted file mode 100644 index 11a89e8..0000000 --- a/examples/logs/20260217_220423_305521_claude_reasoning_call.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "timestamp": "2026-02-17T22:04:23.305686", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 12503 - }, - "response": { - "id": "msg_016NC3LahgpQheYzbrvaW9tU", - "content": [ - { - "id": "toolu_01LBmrrscXgtR7mwWsedHeCt", - "input": { - "channels": [ - { - "name": "major_tv_broadcast", - "description": "Breaking news coverage on major TV networks (CNN, Fox News, MSNBC, ABC, NBC, CBS) \u2014 wall-to-wall coverage given the magnitude of the event. Reaches virtually all TV news consumers simultaneously.", - "reach": "broadcast", - "credibility_modifier": 1.1 - }, - { - "name": "online_news_digital", - "description": "Online news outlets, tech publications (Wired, Ars Technica, MIT Technology Review), and mainstream digital media (NYT, WaPo, Reuters). Reaches digitally-connected news consumers quickly and with high...[truncated]", - "reach": "broadcast", - "credibility_modifier": 1.15 - }, - { - "name": "social_media_viral", - "description": "Organic spread across Twitter/X, Reddit, TikTok, YouTube, Instagram, and Facebook. Includes memes, hot takes, video clips of the demonstration, and commentary from influencers and scientists. High vol...[truncated]", - "reach": "organic", - "credibility_modifier": 0.85 - }, - { - "name": "professional_tech_network", - "description": "Targeted exposure through professional channels: LinkedIn, Slack workspaces, academic mailing lists, industry newsletters, and professional conferences. Reaches tech workers, scientists, engineers, ac...[truncated]", - "reach": "targeted", - "credibility_modifier": 1.2 - }, - { - "name": "word_of_mouth", - "description": "Interpersonal spread through friend, family, and colleague networks \u2014 conversations at work, home, and in community settings. Organic and informal; credibility depends on the source within the network...[truncated]", - "reach": "organic", - "credibility_modifier": 0.95 - } - ], - "rules": [ - { - "channel": "online_news_digital", - "when": "primary_news_source == 'Online/Digital' and internet_access == 'Broadband'", - "probability": 0.97, - "timestep": 0 - }, - { - "channel": "professional_tech_network", - "when": "occupation == 'Professional' and (social_media_platforms == 'Twitter/X' or education_level == 'Graduate Degree') and need_for_cognition > 0.6", - "probability": 0.92, - "timestep": 0 - }, - { - "channel": "major_tv_broadcast", - "when": "primary_news_source == 'TV'", - "probability": 0.95, - "timestep": 1 - }, - { - "channel": "online_news_digital", - "when": "primary_news_source == 'Online/Digital' and internet_access != 'None'", - "probability": 0.88, - "timestep": 1 - }, - { - "channel": "social_media_viral", - "when": "social_media_platforms != 'None/Minimal' and social_media_hours_per_day > 1.5", - "probability": 0.85, - "timestep": 1 - }, - { - "channel": "professional_tech_network", - "when": "occupation == 'Professional' and education_level in ['Bachelor\\'s', 'Graduate Degree']", - "probability": 0.78, - "timestep": 1 - }, - { - "channel": "major_tv_broadcast", - "when": "true", - "probability": 0.65, - "timestep": 2 - }, - { - "channel": "social_media_viral", - "when": "social_media_platforms != 'None/Minimal' and age < 50", - "probability": 0.82, - "timestep": 2 - }, - { - "channel": "word_of_mouth", - "when": "extraversion > 0.55 and employment_status == 'Full-time'", - "probability": 0.7, - "timestep": 2 - }, - { - "channel": "online_news_digital", - "when": "primary_news_source == 'Radio' or primary_news_source == 'Print Newspaper'", - "probability": 0.72, - "timestep": 2 - }, - { - "channel": "word_of_mouth", - "when": "true", - "probability": 0.6, - "timestep": 3 - }, - { - "channel": "social_media_viral", - "when": "age >= 50 and social_media_platforms != 'None/Minimal'", - "probability": 0.65, - "timestep": 3 - }, - { - "channel": "major_tv_broadcast", - "when": "primary_news_source == 'None' or internet_access == 'None'", - "probability": 0.55, - "timestep": 3 - }, - { - "channel": "word_of_mouth", - "when": "urban_rural == 'Rural' and internet_access != 'Broadband'", - "probability": 0.65, - "timestep": 4 - }, - { - "channel": "social_media_viral", - "when": "susceptibility_to_misinformation > 0.6 and trust_in_institutions < 0.4", - "probability": 0.8, - "timestep": 4 - } - ], - "reasoning": "[REDACTED_TEXT length=3512]" - }, - "name": "seed_exposure", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3974, - "output_tokens": 2276, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_220453_664342_claude_reasoning_call.json b/examples/logs/20260217_220453_664342_claude_reasoning_call.json deleted file mode 100644 index 7d47df2..0000000 --- a/examples/logs/20260217_220453_664342_claude_reasoning_call.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "timestamp": "2026-02-17T22:04:53.664421", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 5087 - }, - "response": { - "id": "msg_011eaS39hmjGCxHPrQzVHucr", - "content": [ - { - "id": "toolu_016TTUVqMH8h6s3dh1FMY68X", - "input": { - "primary_model": "broadcast_response", - "secondary_model": "direct_conversation", - "interaction_description": "The ASI announcement originates from a highly credible multi-source broadcast (OpenAI corroborated by Anthropic, DeepMind, xAI, and China's Ministry of Science and Technology), triggering an initial b...[truncated]", - "share_probability": 0.72, - "share_modifiers": [ - { - "when": "social_media_hours_per_day > 3.0", - "multiply": 1.45, - "add": 0 - }, - { - "when": "social_media_hours_per_day < 1.0", - "multiply": 0.65, - "add": 0 - }, - { - "when": "age < 30", - "multiply": 1.35, - "add": 0 - }, - { - "when": "age > 65", - "multiply": 0.75, - "add": 0 - }, - { - "when": "openness > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "neuroticism > 0.7", - "multiply": 1.25, - "add": 0 - }, - { - "when": "extraversion > 0.7", - "multiply": 1.2, - "add": 0 - }, - { - "when": "need_for_cognition > 0.7", - "multiply": 1.2, - "add": 0 - }, - { - "when": "susceptibility_to_misinformation > 0.7", - "multiply": 1.35, - "add": 0 - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 1.4, - "add": 0 - }, - { - "when": "trust_in_institutions > 0.7", - "multiply": 1.15, - "add": 0 - }, - { - "when": "education_level == 'graduate'", - "multiply": 1.25, - "add": 0 - }, - { - "when": "education_level == 'less_than_high_school'", - "multiply": 0.8, - "add": 0 - }, - { - "when": "occupation == 'technology'", - "multiply": 1.5, - "add": 0 - }, - { - "when": "occupation == 'academia'", - "multiply": 1.4, - "add": 0 - }, - { - "when": "occupation == 'government'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "news_outlet_lean == 'far_right'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "news_outlet_lean == 'far_left'", - "multiply": 1.25, - "add": 0 - }, - { - "when": "primary_news_source == 'social_media'", - "multiply": 1.4, - "add": 0 - }, - { - "when": "primary_news_source == 'print'", - "multiply": 0.85, - "add": 0 - }, - { - "when": "civic_engagement == 'high'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "political_ideology == 'very_liberal'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "political_ideology == 'very_conservative'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "religious_attendance == 'weekly'", - "multiply": 1.1, - "add": 0 - }, - { - "when": "edge_type == 'colleague'", - "multiply": 1.45, - "add": 0 - }, - { - "when": "edge_type == 'friend'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "edge_type == 'family'", - "multiply": 1.1, - "add": 0 - }, - { - "when": "internet_access == 'none'", - "multiply": 0.2, - "add": 0 - }, - { - "when": "urban_rural == 'urban'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "urban_rural == 'rural'", - "multiply": 0.9, - "add": 0 - } - ], - "decay_per_hop": 0.12, - "max_hops": 7, - "reasoning": "[REDACTED_TEXT length=2619]" - }, - "name": "interaction_model", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2435, - "output_tokens": 1846, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_220505_645217_claude_simple_call.json b/examples/logs/20260217_220505_645217_claude_simple_call.json deleted file mode 100644 index 166a5c5..0000000 --- a/examples/logs/20260217_220505_645217_claude_simple_call.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "timestamp": "2026-02-17T22:05:05.645311", - "function": "simple_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 11476 - }, - "response": { - "id": "msg_01FtUJumKkz9m8FuwwFTtDiF", - "content": [ - { - "id": "toolu_017nCCvDG6r1cYGHYuDHoqXm", - "input": { - "decision": { - "name": "asi_integration_stance", - "description": "How agents behaviorally respond to ASI's public availability \u2014 whether they actively adopt and integrate ASI into their daily decision-making, selectively engage, resist and disengage, or attempt to o...[truncated]", - "options": [ - "full_integration", - "selective_adoption", - "active_resistance", - "collective_governance_push" - ], - "option_friction": { - "full_integration": 0.75, - "selective_adoption": 0.45, - "active_resistance": 0.7, - "collective_governance_push": 0.8 - } - }, - "reasoning": "[REDACTED_TEXT length=1399]" - }, - "name": "outcome_definition", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3431, - "output_tokens": 487, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_220534_635130_claude_reasoning_call.json b/examples/logs/20260217_220534_635130_claude_reasoning_call.json deleted file mode 100644 index f8ad4e4..0000000 --- a/examples/logs/20260217_220534_635130_claude_reasoning_call.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "timestamp": "2026-02-17T22:05:34.635198", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 10908 - }, - "response": { - "id": "msg_01HKpkuxU1dSFFEbmyJ58p3U", - "content": [ - { - "id": "toolu_01RBYQYYsAbAGu7R2oyA4fXw", - "input": { - "scenario_type": "evolving", - "timestep_unit": "month", - "max_timesteps": 6, - "background_context": "[REDACTED_TEXT length=387]", - "timeline_events": [ - { - "timestep": 1, - "description": "Month 1 \u2014 The Demonstration: ASI publicly verified; multiple labs and China confirm capability; system is self-improving daily.", - "content": "[REDACTED_TEXT length=1154]", - "source": "OpenAI (corroborated by Anthropic, DeepMind, xAI, and China's Ministry of Science and Technology)", - "credibility": 0.95, - "emotional_valence": 0.65, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 2, - "description": "Month 2 \u2014 The Knowledge Explosion: ASI publishes complete cures, solves all Millennium Prize Problems, and maps a path to climate stabilization. Bottleneck shifts to physical execution.", - "content": "[REDACTED_TEXT length=966]", - "source": "Nature, Science, arXiv (coordinated open-access release by ASI lab consortiums); WHO technical briefing", - "credibility": 0.97, - "emotional_valence": 0.8, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 3, - "description": "Month 3 \u2014 Public Access: ASI APIs go live for free to all users globally; cognitive scarcity collapses; structural redundancy of knowledge-based professions becomes undeniable.", - "content": "[REDACTED_TEXT length=800]", - "source": "OpenAI public launch announcement; TechCrunch, Reuters, leaked internal memos from major law firms, medical associations, and universities", - "credibility": 0.93, - "emotional_valence": 0.4, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - }, - { - "timestep": 4, - "description": "Month 4 \u2014 The Physical Bottleneck Breaks: Self-replicating autonomous manufacturing demonstrated; first automated pharma plant online at 1/100th cost; fusion prototype under construction.", - "content": "[REDACTED_TEXT length=659]", - "source": "ASI Manufacturing Consortium press release; leaked DOE technical assessment; Financial Times investigative report on pharmaceutical industry collapse", - "credibility": 0.9, - "emotional_valence": 0.55, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - }, - { - "timestep": 5, - "description": "Month 5 \u2014 Abundance Begins: ASI-manufactured drugs reach patients; energy costs fall; early-adopter nations begin infrastructure transformation; marginal cost of goods trends toward zero.", - "content": "[REDACTED_TEXT length=618]", - "source": "FDA and EMA emergency authorization announcements; Singapore Ministry of National Development; UN Development Programme interim report on economic disruption in developing nations", - "credibility": 0.92, - "emotional_valence": 0.7, - "re_reasoning_intensity": "[REDACTED_TEXT length=4]" - }, - { - "timestep": 6, - "description": "Month 6 \u2014 The New World: Fusion prototype online ahead of schedule; space launch costs fall 99%; global disease burden measurably declining; distribution \u2014 not scarcity \u2014 is the defining challenge.", - "content": "[REDACTED_TEXT length=587]", - "source": "ITER-successor consortium; SpaceX/ASI joint technical demonstration; WHO Global Health Report (emergency edition); leaked G20 summit preparatory documents on post-scarcity governance", - "credibility": 0.94, - "emotional_valence": 0.85, - "re_reasoning_intensity": "[REDACTED_TEXT length=7]" - } - ] - }, - "name": "timeline_generation", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3531, - "output_tokens": 2019, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_220549_823857_claude_simple_call.json b/examples/logs/20260217_220549_823857_claude_simple_call.json deleted file mode 100644 index f11f998..0000000 --- a/examples/logs/20260217_220549_823857_claude_simple_call.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "timestamp": "2026-02-17T22:05:49.823933", - "function": "simple_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 11069 - }, - "response": { - "id": "msg_017pxGFfCDwVZgQ9BEUMWyvf", - "content": [ - { - "id": "toolu_01TSS8hZSH4qcKZuHvtMYctQ", - "input": { - "identity_dimensions": [ - { - "dimension": "professional_identity", - "relevance": "ASI renders every profession built on information asymmetry or cognitive scarcity structurally redundant \u2014 doctors, lawyers, engineers, scientists, financial advisors, therapists, and software enginee...[truncated]" - }, - { - "dimension": "socioeconomic_class", - "relevance": "The collapse of marginal costs and the democratization of cognitive resources radically disrupts class structures tied to credential access and economic scarcity; wealthy and credentialed classes lose...[truncated]" - }, - { - "dimension": "political_orientation", - "relevance": "ASI forces immediate confrontation with ideological fault lines around regulation, corporate power, state control, redistribution of abundance, and the role of government \u2014 conservatives and liberals ...[truncated]" - }, - { - "dimension": "religious_affiliation", - "relevance": "A self-improving system that exceeds all human cognition, solves the deepest mysteries of the universe, and conquers disease and death challenges foundational religious narratives about human uniquene...[truncated]" - }, - { - "dimension": "generational_identity", - "relevance": "Older generations whose entire life frameworks \u2014 careers, accumulated expertise, institutional trust, and worldviews \u2014 were built under cognitive scarcity face profound disorientation, while younger g...[truncated]" - }, - { - "dimension": "citizenship", - "relevance": "National identity and sovereignty are destabilized as ASI capabilities concentrate in specific countries (US, China), early-adopter nations (Singapore, UAE, Estonia) gain asymmetric advantages, and th...[truncated]" - }, - { - "dimension": "race_ethnicity", - "relevance": "The promise of equalizing access (a dropout in rural Arkansas equals a Harvard team) intersects with historical patterns of unequal technology deployment \u2014 communities that have been systematically ex...[truncated]" - }, - { - "dimension": "parental_status", - "relevance": "Parents face a destabilizing crisis of purpose around education, career guidance, and what they are preparing their children for \u2014 the entire framework of raising children toward productive adulthood ...[truncated]" - } - ] - }, - "name": "identity_dimensions", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3140, - "output_tokens": 695, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_220634_220389_claude_reasoning_call.json b/examples/logs/20260217_220634_220389_claude_reasoning_call.json deleted file mode 100644 index 467fa00..0000000 --- a/examples/logs/20260217_220634_220389_claude_reasoning_call.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "timestamp": "2026-02-17T22:06:34.220491", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 19705 - }, - "response": { - "id": "msg_01RGaC72DCog33q76kGNFFVV", - "content": [ - { - "id": "toolu_01CwwyUHDramZ6U4WQ8vjzE5", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "type": "float", - "category": "population_specific", - "description": "Degree of understanding of AI systems, capabilities, and limitations (0\u20131 scale), affecting how agents interpret and respond to ASI news.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level", - "occupation", - "age" - ], - "semantic_type": null - }, - { - "name": "tech_sector_employment", - "type": "boolean", - "category": "population_specific", - "description": "Whether the person works in a technology-related industry (software, AI/ML, hardware, or tech-adjacent roles), making their livelihood directly impacted by ASI.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "employment_status" - ] - }, - { - "name": "knowledge_worker", - "type": "boolean", - "category": "population_specific", - "description": "Whether the person's job is primarily predicated on information asymmetry or cognitive output (lawyers, doctors, analysts, engineers, etc.), making them structurally redundant post-ASI.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "occupation", - "education_level" - ] - }, - { - "name": "personal_health_vulnerability", - "type": "boolean", - "category": "population_specific", - "description": "Whether the person or an immediate household member has a serious illness (cancer, Alzheimer's, ALS, diabetes, HIV) that ASI-developed cures directly address.", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "age", - "household_size" - ] - }, - { - "name": "financial_market_exposure", - "type": "categorical", - "category": "population_specific", - "description": "Level of personal exposure to financial markets (None, Low \u2013 savings/401k only, Medium \u2013 active investments, High \u2013 significant equity/crypto/derivatives holdings), affecting economic reaction to ASI-...[truncated]", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "household_income", - "education_level" - ] - }, - { - "name": "asi_existential_risk_belief", - "type": "float", - "category": "population_specific", - "description": "Prior belief that advanced AI poses an existential or catastrophic risk to humanity (0 = no concern, 1 = certain doom), shaping emotional and political responses to ASI arrival.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_literacy", - "openness", - "trust_in_institutions" - ] - }, - { - "name": "asi_benefit_optimism", - "type": "float", - "category": "population_specific", - "description": "Degree of optimism that ASI will produce broadly shared human benefit rather than concentrated elite capture (0\u20131 scale), influencing adoption and advocacy behaviors.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_ideology", - "trust_in_institutions", - "ai_literacy" - ] - }, - { - "name": "job_automation_risk_perception", - "type": "float", - "category": "population_specific", - "description": "Person's perceived likelihood that their own job or livelihood will be eliminated or severely disrupted by ASI-driven automation (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "knowledge_worker", - "tech_sector_employment", - "education_level" - ] - }, - { - "name": "asi_adoption_eagerness", - "type": "float", - "category": "population_specific", - "description": "Eagerness to personally adopt and integrate ASI tools into daily work and life (0\u20131 scale), driven by openness, literacy, and age.", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "ai_literacy", - "openness", - "age" - ] - }, - { - "name": "regulatory_intervention_support", - "type": "float", - "category": "population_specific", - "description": "Strength of preference for government regulation and oversight of ASI development and deployment (0 = laissez-faire, 1 = strong state control).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "political_ideology", - "asi_existential_risk_belief", - "trust_in_institutions" - ] - }, - { - "name": "information_network_centrality", - "type": "categorical", - "category": "population_specific", - "description": "Role in social information diffusion \u2014 Isolated (few connections), Peripheral (casual consumer), Connected (active sharer), Hub (opinion leader/influencer) \u2014 affecting how rapidly ASI news and attitud...[truncated]", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "extraversion", - "social_media_hours_per_day", - "civic_engagement" - ] - }, - { - "name": "economic_precarity", - "type": "float", - "category": "population_specific", - "description": "Degree of financial precarity \u2014 low savings, high debt, and dependence on wage income \u2014 that makes the agent highly sensitive to economic disruption from ASI-driven labor market changes (0\u20131 scale).", - "strategy": "conditional", - "scope": "household", - "depends_on": [ - "household_income", - "employment_status", - "homeownership" - ] - }, - { - "name": "institutional_change_tolerance", - "type": "float", - "category": "personality", - "description": "Psychological tolerance for rapid, large-scale disruption to societal institutions, norms, and structures (0 = deeply threatened by change, 1 = fully embraces transformation).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "openness", - "conscientiousness", - "political_ideology" - ] - } - ], - "include_big_five": false, - "notes": "Big Five already exist in base population \u2014 not re-included. Focus is on attributes that create meaningful behavioral variance in an ASI-arrival scenario: how people perceive AI risk/benefit, how econ...[truncated]" - }, - "name": "attribute_selection", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 6073, - "output_tokens": 1783, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_220917_376355_claude_agentic_research.json b/examples/logs/20260217_220917_376355_claude_agentic_research.json deleted file mode 100644 index 1d00faf..0000000 --- a/examples/logs/20260217_220917_376355_claude_agentic_research.json +++ /dev/null @@ -1,1783 +0,0 @@ -{ - "timestamp": "2026-02-17T22:09:17.376409", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 11850 - }, - "response": { - "id": "msg_01VC4ZnGvcrm8Duq8KPjYhec", - "content": [ - { - "citations": null, - "text": "[REDACTED_TEXT length=91]", - "type": "text", - "parsed_output": null - }, - { - "id": "srvtoolu_01YU1jhYAvE82eTJsje7bY2k", - "input": { - "query": "US adult population age distribution 2024 census" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01XbvrzRCfAFK3XLWs6YyEea", - "input": { - "query": "US gender identity distribution adults 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01S84NeBEkUCKU2Tuvh4a6Ag", - "input": { - "query": "US state population distribution 2024 proportional" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=3112]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2960]", - "page_age": "September 17, 2025", - "title": "Visualizing the U.S. Population by Age Group", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/u-s-population-by-age-group/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6480]", - "page_age": "13 hours ago", - "title": "US population by year, race, age, ethnicity, & more | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1280]", - "page_age": null, - "title": "2023 Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4076]", - "page_age": null, - "title": "Population of the U.S. by sex and age 2024", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1680]", - "page_age": null, - "title": "Adult Population by Age Group Statistics", - "type": "web_search_result", - "url": "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5616]", - "page_age": null, - "title": "An Aging Nation: U.S. Median Age Surpassed 39 in 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=968]", - "page_age": null, - "title": "Population of United States of America 2024 - PopulationPyramid.net", - "type": "web_search_result", - "url": "https://www.populationpyramid.net/united-states-of-america/2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=348]", - "page_age": "December 18, 2025", - "title": "Population Distribution by Age | KFF State Health Facts", - "type": "web_search_result", - "url": "https://www.kff.org/state-health-policy-data/state-indicator/distribution-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3112]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2024", - "type": "web_search_result", - "url": "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html" - } - ], - "tool_use_id": "srvtoolu_01YU1jhYAvE82eTJsje7bY2k", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4104]", - "page_age": "September 5, 2025", - "title": "LGBTQ+ Identification in U.S. Rises to 9.3%", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/656708/lgbtq-identification-rises.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5008]", - "page_age": "March 26, 2025", - "title": "LGBTQ+ Identification in U.S. Now at 7.6%", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/611864/lgbtq-identification.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3080]", - "page_age": "September 12, 2025", - "title": "How Many Adults and Youth Identify as Transgender in the United States? - Williams Institute", - "type": "web_search_result", - "url": "https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=656]", - "page_age": "February 12, 2025", - "title": "What percentage of the US population is transgender? | USAFacts", - "type": "web_search_result", - "url": "https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4464]", - "page_age": null, - "title": "How Many Adults and Youth Identify as Transgender in the ...", - "type": "web_search_result", - "url": "https://williamsinstitute.law.ucla.edu/wp-content/uploads/Trans-Pop-Update-Aug-2025.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4508]", - "page_age": "February 23, 2025", - "title": "Shifts in Gender and Sexual Identities in the U.S., 2024 Update \u2013 Inequality by (Interior) Design", - "type": "web_search_result", - "url": "https://inequalitybyinteriordesign.wordpress.com/2025/02/23/shifts-in-gender-and-sexual-identities-in-the-u-s-2024-update/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6852]", - "page_age": "October 3, 2025", - "title": "LGBTQ demographics of the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/LGBTQ_demographics_of_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3032]", - "page_age": "August 20, 2025", - "title": "New estimate: 2.8 million people aged 13 and older identify as transgender in the US - Williams Institute", - "type": "web_search_result", - "url": "https://williamsinstitute.law.ucla.edu/press/trans-pop-estimates-press-release/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5456]", - "page_age": null, - "title": "Americans who identify as LGBTQ+ by generation 2024| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/719685/american-adults-who-identify-as-homosexual-bisexual-transgender-by-generation/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4248]", - "page_age": "February 20, 2025", - "title": "More U.S. adults identify as LGBTQ+ in 2024, Gallup polling shows - UPI.com", - "type": "web_search_result", - "url": "https://www.upi.com/Top_News/US/2025/02/20/gallup-polling-lgbtq/7041740078808/" - } - ], - "tool_use_id": "srvtoolu_01XbvrzRCfAFK3XLWs6YyEea", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=364]", - "page_age": null, - "title": "2024, Release Tables: Resident Population by State, Annual | FRED | St. Louis Fed", - "type": "web_search_result", - "url": "https://fred.stlouisfed.org/release/tables?eid=259194&rid=118" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6476]", - "page_age": null, - "title": "National 50-state population projections: 2030, 2040, 2050 | Cooper Center", - "type": "web_search_result", - "url": "https://www.coopercenter.org/research/national-50-state-population-projections-2030-2040-2050" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5268]", - "page_age": null, - "title": "Press Kit: Vintage 2024 National and State Population Estimates", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-kits/2024/national-state-population-estimates.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3744]", - "page_age": null, - "title": "National Population Projections | Cooper Center", - "type": "web_search_result", - "url": "https://www.coopercenter.org/national-population-projections" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3292]", - "page_age": "5 days ago", - "title": "US States - Ranking by Population 2026", - "type": "web_search_result", - "url": "https://worldpopulationreview.com/states" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3924]", - "page_age": null, - "title": "State Annual Population Change 2020 2021 2022 2023 2024 Census 2020", - "type": "web_search_result", - "url": "https://proximityone.com/statepop2025.htm" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3916]", - "page_age": null, - "title": "State Population Totals and Components of Change: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1868]", - "page_age": null, - "title": "2024 Population estimates for the U.S. and States :: Iowa State Data Center", - "type": "web_search_result", - "url": "https://www.iowadatacenter.org/index.php/blog/httpswwwiowadatacenterorgindexphpblog2023-annual-state-population-estimates" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3748]", - "page_age": "February 17, 2025", - "title": "Mapped: U.S. States Resized by Their Populations", - "type": "web_search_result", - "url": "https://www.visualcapitalist.com/mapped-every-u-s-state-resized-based-on-population/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4540]", - "page_age": "3 weeks ago", - "title": "List of U.S. states and territories by population - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_population" - } - ], - "tool_use_id": "srvtoolu_01S84NeBEkUCKU2Tuvh4a6Ag", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=113]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01SkCLaJUchLMGr8e9HTcgAu", - "input": { - "attributes": [ - { - "name": "age", - "distribution": { - "type": "normal", - "mean": 47, - "std": 17, - "min": 18, - "max": 99, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 18, - "expression": null, - "reason": "Adults 18+ only per simulation spec" - }, - { - "type": "hard_max", - "value": 99, - "expression": null, - "reason": "Realistic upper bound for living adults" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html; US median age surpassed 39 in 2024 (Census); adult-only population skews older", - "note": "Adult-only distribution (18+) shifts mean upward from ~39 national median to ~47. Normal approximation is reasonable; true distribution is slightly right-skewed due to baby boomer cohort. Std of 17 ca...[truncated]" - } - }, - { - "name": "gender", - "distribution": { - "type": "categorical", - "options": [ - "Male", - "Female", - "Non-binary/Other" - ], - "weights": [ - 0.491, - 0.493, - 0.016 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/ ; Gallup 2024 LGBTQ+ data; Census sex at birth data", - "note": "Census reports ~50.5% female, ~49.5% male by sex at birth. Non-binary/Other estimated at ~1.6% based on USAFacts citing 1.70% non-binary adults and ~0.8% transgender adults; small overlap assumed. Mal...[truncated]" - } - }, - { - "name": "state", - "distribution": { - "type": "categorical", - "options": [ - "CA", - "TX", - "FL", - "NY", - "PA", - "IL", - "OH", - "GA", - "NC", - "MI", - "NJ", - "VA", - "WA", - "AZ", - "TN", - "MA", - "IN", - "MO", - "MD", - "WI", - "CO", - "MN", - "SC", - "AL", - "LA", - "KY", - "OR", - "OK", - "CT", - "UT", - "IA", - "NV", - "AR", - "MS", - "KS", - "NM", - "NE", - "WV", - "ID", - "HI", - "NH", - "ME", - "MT", - "RI", - "DE", - "SD", - "ND", - "AK", - "VT", - "WY", - "DC" - ], - "weights": [ - 0.1163, - 0.0902, - 0.0662, - 0.0596, - 0.0378, - 0.0374, - 0.035, - 0.0317, - 0.0316, - 0.0296, - 0.0275, - 0.0261, - 0.0239, - 0.0222, - 0.0213, - 0.0205, - 0.0196, - 0.0184, - 0.0182, - 0.0177, - 0.017, - 0.0164, - 0.0158, - 0.0147, - 0.0139, - 0.0132, - 0.0126, - 0.012, - 0.0107, - 0.0101, - 0.0093, - 0.0093, - 0.0089, - 0.0089, - 0.0087, - 0.0063, - 0.0059, - 0.0053, - 0.0052, - 0.0044, - 0.0041, - 0.004, - 0.0032, - 0.0032, - 0.003, - 0.0026, - 0.0023, - 0.0022, - 0.0019, - 0.0018, - 0.0021 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.01", - "reason": "Categorical weights must sum to 1 (tolerance for rounding across 51 entries)" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "https://www.census.gov/newsroom/press-kits/2024/national-state-population-estimates.html; Vintage 2024 Census state population estimates", - "note": "Weights derived proportionally from Census Vintage 2024 state population totals. CA ~12%, TX ~9%, FL ~6.6%, NY ~6.0%, etc. DC included as distinct entry. Minor rounding applied to keep array manageabl...[truncated]" - } - }, - { - "name": "race_ethnicity", - "distribution": { - "type": "categorical", - "options": [ - "White non-Hispanic", - "Black", - "Hispanic", - "Asian", - "Other" - ], - "weights": [ - 0.594, - 0.124, - 0.191, - 0.063, - 0.028 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2024 National Population by Characteristics; ACS 2023 race/ethnicity estimates", - "note": "White non-Hispanic ~59.4%, Hispanic ~19.1%, Black ~12.4%, Asian ~6.3%, Other (AIAN, NHPI, multiracial) ~2.8%. These are well-established from decennial census and ACS." - } - }, - { - "name": "openness", - "distribution": { - "type": "beta", - "alpha": 6.5, - "beta": 5.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Big Five personality meta-analyses (Soto & John 2017; US normative samples); IPIP-NEO population norms", - "note": "US adult Big Five norms show moderate-high openness population mean (~0.54 on 0-1 scale). Beta(6.5,5.5) yields mean ~0.54, std ~0.12, bounded [0,1]. Slight right skew reflects cultural emphasis on ope...[truncated]" - } - }, - { - "name": "conscientiousness", - "distribution": { - "type": "beta", - "alpha": 7.0, - "beta": 5.0, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Big Five US normative data; Soto et al. (2011) JPSP; IPIP-NEO standardization samples", - "note": "Conscientiousness tends to be moderately high in US adults (mean ~0.58 on 0-1 scale). Beta(7,5) yields mean ~0.583, std ~0.11. Increases with age; US culture rewards self-discipline." - } - }, - { - "name": "extraversion", - "distribution": { - "type": "beta", - "alpha": 5.5, - "beta": 5.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Big Five US normative data; Rentfrow et al. (2013) regional personality study; IPIP norms", - "note": "Extraversion is roughly symmetrically distributed with US mean ~0.50. Beta(5.5,5.5) is symmetric with mean 0.5, std ~0.12. US is moderately extraverted as a culture." - } - }, - { - "name": "agreeableness", - "distribution": { - "type": "beta", - "alpha": 7.0, - "beta": 5.0, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Soto & John (2017) JPSP; McCrae & Costa normative Big Five data; US IPIP norms", - "note": "Agreeableness averages moderately high in US adults (~0.58). Increases with age. Beta(7,5) approximates this distribution well. Women score higher on average than men." - } - }, - { - "name": "neuroticism", - "distribution": { - "type": "beta", - "alpha": 5.0, - "beta": 7.0, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Soto & John (2017); Costa & McCrae US normative samples; APA/IPIP Big Five studies", - "note": "Neuroticism mean ~0.42 in US adults (below midpoint). Decreases with age. Beta(5,7) yields mean ~0.417, std ~0.11. Scores higher in younger adults, females, and those with mood disorders." - } - }, - { - "name": "urban_rural", - "distribution": { - "type": "categorical", - "options": [ - "Urban", - "Suburban", - "Rural" - ], - "weights": [ - 0.31, - 0.55, - 0.14 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Census Bureau Urban/Rural classification 2020; Pew Research 2018 urban-rural typology; USDA ERS rural definitions", - "note": "~80% of Americans live in urban areas per Census, but Census urban includes dense suburbs. Using sociological definition: ~31% core urban, ~55% suburban, ~14% rural. Reflects that 80% urbanized land s...[truncated]" - } - }, - { - "name": "education_level", - "distribution": { - "type": "categorical", - "options": [ - "Less than HS", - "HS Diploma", - "Some College", - "Associate's", - "Bachelor's", - "Graduate Degree" - ], - "weights": [ - 0.088, - 0.272, - 0.162, - 0.103, - 0.232, - 0.143 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS 2023; ACS 2023 Educational Attainment for adults 25+; BLS Education and Training data", - "note": "2023 CPS data: ~8.8% less than HS, ~27.2% HS diploma only, ~16.2% some college no degree, ~10.3% associate's, ~23.2% bachelor's, ~14.3% graduate/professional. These match ACS 2023 for adults 25+, appl...[truncated]" - } - }, - { - "name": "household_income", - "distribution": { - "type": "lognormal", - "mean": 11.0, - "std": 0.75, - "min": 0, - "max": 1000000, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0, - "expression": null, - "reason": "Income cannot be negative" - }, - { - "type": "hard_max", - "value": 2000000, - "expression": null, - "reason": "Extreme outlier cap; preserves top earners but excludes billionaires" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS ASEC 2023; median household income $74,580 (2023); ACS 2023 income distribution", - "note": "Log-normal with ln-mean=11.0 and ln-std=0.75 yields median ~$60,496 and mean ~$80,000, consistent with CPS 2023 median of ~$74,580 for all households. Conditioned on education and state in actual samp...[truncated]" - } - }, - { - "name": "marital_status", - "distribution": { - "type": "categorical", - "options": [ - "Single", - "Married", - "Divorced", - "Widowed", - "Domestic Partnership" - ], - "weights": [ - 0.318, - 0.485, - 0.105, - 0.058, - 0.034 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS 2023 Marital Status tables; ACS 2023; Pew Research Center marital trends 2023", - "note": "CPS 2023: ~31.8% never married, ~48.5% married/spouse present, ~10.5% divorced, ~5.8% widowed, ~3.4% domestic partnership/separated. Widowed high due to older adult skew in simulation." - } - }, - { - "name": "household_size", - "distribution": { - "type": "normal", - "mean": 2.53, - "std": 1.3, - "min": 1, - "max": 10, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 1, - "expression": null, - "reason": "Minimum one person (the agent) in household" - }, - { - "type": "hard_max", - "value": 12, - "expression": null, - "reason": "Realistic maximum household size; preserves extended family outliers" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau 2023 CPS; ACS 2023 Average Household Size = 2.53", - "note": "Average US household size is 2.53 per ACS 2023. Normal approximation with std=1.3 captures the spread from singles (32%) to large families. Should be rounded to integer in sampling. Min=1 enforced as ...[truncated]" - } - }, - { - "name": "has_children", - "distribution": { - "type": "boolean", - "probability_true": 0.4, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [ - { - "type": "expression", - "value": null, - "expression": "has_children == False or household_size >= 2", - "reason": "Cannot have children in household with only 1 person" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau CPS 2023; CDC NCHS family structure data; Pew Research 2023 parenting statistics", - "note": "~40% of US households have children under 18 present. CPS 2023 shows 38-42% of family households have own children under 18. Probability set at 0.40 for adult population 18+, age-conditioned in practi...[truncated]" - } - }, - { - "name": "employment_status", - "distribution": { - "type": "categorical", - "options": [ - "Full-time", - "Part-time", - "Self-employed", - "Unemployed", - "Retired", - "Student" - ], - "weights": [ - 0.462, - 0.101, - 0.093, - 0.036, - 0.245, - 0.063 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Current Population Survey 2024; BLS Employment Situation 2024; Census CPS ASEC 2023", - "note": "BLS 2024: labor force participation ~62.5%, unemployment rate ~3.9%. Of adults 18+: Full-time ~46.2%, Part-time ~10.1%, Self-employed ~9.3% (BLS alt measures), Unemployed ~3.6%, Retired ~24.5% (includ...[truncated]" - } - }, - { - "name": "occupation", - "distribution": { - "type": "categorical", - "options": [ - "Management", - "Professional", - "Service", - "Sales", - "Construction", - "Production", - "Other" - ], - "weights": [ - 0.107, - 0.224, - 0.168, - 0.098, - 0.089, - 0.075, - 0.239 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Occupational Employment and Wage Statistics (OEWS) 2023; BLS Current Population Survey 2024", - "note": "BLS OEWS 2023 major occupational groups. 'Other' includes Transportation, Healthcare support, Protective service, Farming, and other BLS categories not explicitly listed. Management ~10.7%, Profession...[truncated]" - } - }, - { - "name": "political_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Strong Democrat", - "Lean Democrat", - "Independent", - "Lean Republican", - "Strong Republican" - ], - "weights": [ - 0.175, - 0.155, - 0.27, - 0.145, - 0.255 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup Party Identification 2024; Pew Research Political Typology 2023; ANES 2024 pre-election survey", - "note": "Gallup 2024: ~28% Democrat, ~27% Republican, ~43% Independent (but many lean). Using 5-point scale with leaners: Strong Dem 17.5%, Lean Dem 15.5%, Pure Independent 27%, Lean Rep 14.5%, Strong Rep 25.5...[truncated]" - } - }, - { - "name": "political_ideology", - "distribution": { - "type": "categorical", - "options": [ - "Very Liberal", - "Liberal", - "Moderate", - "Conservative", - "Very Conservative" - ], - "weights": [ - 0.085, - 0.195, - 0.35, - 0.235, - 0.135 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup Ideology Tracking 2024; Pew Research American Values Survey 2023; ANES 2022 self-placement", - "note": "Gallup 2024: ~25% Liberal, ~36% Moderate, ~38% Conservative (combined). Five-category breakdown: Very Liberal ~8.5%, Liberal ~19.5%, Moderate ~35%, Conservative ~23.5%, Very Conservative ~13.5%. Conse...[truncated]" - } - }, - { - "name": "religious_affiliation", - "distribution": { - "type": "categorical", - "options": [ - "Evangelical Protestant", - "Mainline Protestant", - "Catholic", - "Other Christian", - "Jewish", - "Muslim", - "Other Non-Christian", - "None/Unaffiliated" - ], - "weights": [ - 0.24, - 0.13, - 0.2, - 0.06, - 0.018, - 0.011, - 0.041, - 0.3 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Religious Landscape Study 2023-2024; PRRI American Values Atlas 2023; GSS 2022", - "note": "Pew 2023-24: Evangelical Protestant ~24%, Mainline Protestant ~13%, Catholic ~20%, Other Christian ~6%, Jewish ~1.8%, Muslim ~1.1%, Other Non-Christian ~4.1%, Unaffiliated/None ~30%. 'Nones' now the l...[truncated]" - } - }, - { - "name": "religious_attendance", - "distribution": { - "type": "categorical", - "options": [ - "Never", - "Seldom", - "A few times/year", - "Monthly", - "Weekly", - "More than weekly" - ], - "weights": [ - 0.275, - 0.165, - 0.165, - 0.095, - 0.205, - 0.095 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup Church Attendance 2023-2024; Pew Research Religious Practices 2023; GSS religious attendance 2022", - "note": "Gallup 2024: ~22% attend weekly or more, ~12% monthly, ~17% seldom, ~27-30% never. Pew similarly finds ~45% seldom or never. Distributed across 6 categories consistent with Gallup/Pew trend data." - } - }, - { - "name": "primary_news_source", - "distribution": { - "type": "categorical", - "options": [ - "TV", - "Online/Digital", - "Social Media", - "Radio", - "Print Newspaper", - "None" - ], - "weights": [ - 0.29, - 0.31, - 0.205, - 0.075, - 0.055, - 0.065 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research News Platform Fact Sheet 2024; Reuters Institute Digital News Report 2024 (US); Nielsen Media Research 2023", - "note": "Pew 2024: TV ~29% primary, Online/Digital ~31%, Social Media ~20%, Radio ~7.5%, Print ~5.5%, None/Don't follow news ~6.5%. Trend shows digital/social growing, TV declining, print nearly extinct for pr...[truncated]" - } - }, - { - "name": "news_outlet_lean", - "distribution": { - "type": "categorical", - "options": [ - "Left-leaning", - "Center", - "Right-leaning", - "Mixed/No Preference" - ], - "weights": [ - 0.26, - 0.195, - 0.245, - 0.3 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "researched", - "source": "AllSides Media Bias Ratings 2024; Pew Research Media Habits 2023; Reuters Digital News Report 2024 US", - "note": "Pew finds roughly symmetric partisan media consumption but many use multiple sources. AllSides/Reuters suggest ~26% primarily left-leaning outlets, ~24.5% right-leaning, ~19.5% centrist, ~30% mixed or...[truncated]" - } - }, - { - "name": "social_media_platforms", - "distribution": { - "type": "categorical", - "options": [ - "Facebook", - "Twitter/X", - "Instagram", - "TikTok", - "YouTube", - "None/Minimal" - ], - "weights": [ - 0.295, - 0.085, - 0.165, - 0.115, - 0.2, - 0.14 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Pew Research Social Media Use 2024; Statista US social media platform usage 2024; Comscore digital audience data 2024", - "note": "Pew 2024 US adults: Facebook ~68% use (primary for ~30%), YouTube ~83% use (primary ~20%), Instagram ~47% use (primary ~17%), TikTok ~33% use (primary ~12%), Twitter/X ~22% use (primary ~9%), None/min...[truncated]" - } - }, - { - "name": "social_media_hours_per_day", - "distribution": { - "type": "lognormal", - "mean": 1.0, - "std": 0.75, - "min": 0.0, - "max": 16.0, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Cannot have negative time" - }, - { - "type": "hard_max", - "value": 16.0, - "expression": null, - "reason": "Hard physical limit on waking hours" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "DataReportal Digital 2024 US Report; Pew Research social media time 2023; Statista US daily social media usage 2024", - "note": "US adults average ~2.3 hours/day on social media (DataReportal 2024). Log-normal with ln-mean=1.0, ln-std=0.75 gives median ~2.72 hrs and mean ~3.1 hrs but with right-skew capturing heavy users. Adjus...[truncated]" - } - }, - { - "name": "internet_access", - "distribution": { - "type": "categorical", - "options": [ - "Broadband", - "Mobile Only", - "Dial-up/Satellite", - "None" - ], - "weights": [ - 0.748, - 0.138, - 0.042, - 0.072 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "FCC Broadband Progress Report 2024; Pew Research Internet Access 2024; NTIA Internet Use Survey 2023", - "note": "Pew 2024: ~77% have home broadband, ~14% smartphone-only access, ~7% no internet at home. FCC 2024 shows dial-up/satellite at ~4%. Adjusted: Broadband 74.8%, Mobile Only 13.8%, Dial-up/Satellite 4.2%,...[truncated]" - } - }, - { - "name": "civic_engagement", - "distribution": { - "type": "categorical", - "options": [ - "Votes regularly", - "Votes sometimes", - "Rarely votes/Never votes", - "Also actively volunteers or campaigns" - ], - "weights": [ - 0.42, - 0.215, - 0.235, - 0.13 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Election Assistance Commission 2022; Census Voting and Registration Survey 2022; AmeriCorps Volunteering & Civic Life 2023", - "note": "2020 election had ~67% turnout of registered voters; 2022 midterm ~47%. CPS Voting Survey 2022: ~50% reported voting. Of non-voters, many are rarely/never. Active volunteers/campaigners ~13% per Ameri...[truncated]" - } - }, - { - "name": "homeownership", - "distribution": { - "type": "boolean", - "probability_true": 0.655, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau Housing Vacancies and Homeownership Survey Q3 2024; ACS 2023 homeownership rate", - "note": "US homeownership rate Q3 2024 was 65.6% per Census Housing Vacancy Survey. ACS 2023 confirms ~65.5%. Consistent across multiple sources. Conditioned on age, income, marital status in actual sampling." - } - }, - { - "name": "health_insurance_type", - "distribution": { - "type": "categorical", - "options": [ - "Employer-sponsored", - "Medicaid/CHIP", - "Medicare", - "Individual Market/ACA", - "Military/VA", - "Uninsured" - ], - "weights": [ - 0.49, - 0.175, - 0.155, - 0.052, - 0.025, - 0.103 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "KFF Health Insurance Coverage 2023; Census Bureau CPS ASEC 2023 Health Insurance; CMS Enrollment Data 2024", - "note": "KFF/Census 2023: Employer-sponsored ~49%, Medicaid ~17.5%, Medicare ~15.5%, ACA/Individual ~5.2%, Military/VA ~2.5%, Uninsured ~10.3%. Uninsured rate fell to ~7.7% in 2023 by some measures; using 10.3...[truncated]" - } - }, - { - "name": "immigration_status", - "distribution": { - "type": "categorical", - "options": [ - "US-born citizen", - "Naturalized citizen", - "Permanent resident", - "Other" - ], - "weights": [ - 0.847, - 0.074, - 0.04, - 0.039 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Categorical weights must sum to 1" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "US Census Bureau ACS 2023 Nativity and Citizenship; DHS Yearbook of Immigration Statistics 2023", - "note": "ACS 2023: ~84.7% native-born, ~7.4% naturalized citizens, ~4.0% legal permanent residents, ~3.9% other (visa holders, undocumented est., etc.). Foreign-born total ~15.3% of US population. These are ad...[truncated]" - } - }, - { - "name": "union_membership", - "distribution": { - "type": "boolean", - "probability_true": 0.1, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS Union Members Summary January 2024; BLS Economic News Release UNEMPL 2024", - "note": "BLS January 2024: Union membership rate was 10.0% of wage and salary workers, representing 14.4 million workers. For all adults (including retired/unemployed) the effective rate is slightly lower; usi...[truncated]" - } - }, - { - "name": "gun_ownership", - "distribution": { - "type": "boolean", - "probability_true": 0.32, - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup Gun Ownership Poll 2023-2024; Pew Research Gun Ownership Survey 2023; Washington Post-Ipsos poll 2023", - "note": "Gallup 2024: ~43% of households report having a gun. Pew 2023: ~32% of adults personally own a gun, ~44% live in gun-owning household. Using 32% personal/household ownership as conservative estimate c...[truncated]" - } - }, - { - "name": "trust_in_institutions", - "distribution": { - "type": "beta", - "alpha": 3.0, - "beta": 5.0, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Gallup Confidence in Institutions 2024; Edelman Trust Barometer 2024 US; Pew Research Trust in Government 2023", - "note": "Trust in major institutions at historic lows. Gallup 2024: confidence in Congress 8%, Supreme Court 37%, presidency 38%, media 31%. Edelman 2024 US Trust Index ~48/100. Beta(3,5) yields mean ~0.375, s...[truncated]" - } - }, - { - "name": "need_for_cognition", - "distribution": { - "type": "beta", - "alpha": 5.5, - "beta": 5.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Cacioppo & Petty NCS normative data; Fleischhauer et al. (2010) NCS meta-analysis; educational attainment correlates", - "note": "Need for Cognition scale (Cacioppo & Petty 1982) shows roughly normal distribution in general population. Mean approximately at midpoint (0.50) with symmetric Beta(5.5,5.5). Correlated with education ...[truncated]" - } - }, - { - "name": "susceptibility_to_misinformation", - "distribution": { - "type": "beta", - "alpha": 4.5, - "beta": 5.5, - "mean": null, - "std": null, - "min": 0.0, - "max": 1.0, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Scale lower bound" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Scale upper bound" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pennycook & Rand (2019) misinformation susceptibility research; Reuters Institute Digital News Report 2024 media literacy; Knight Foundation media literacy surveys 2023", - "note": "Misinformation susceptibility is inversely related to media literacy. Research suggests majority are moderately susceptible; a minority (highly media-literate) are resistant and a minority are highly ...[truncated]" - } - }, - { - "name": "country", - "distribution": { - "type": "categorical", - "options": [ - "United States" - ], - "weights": [ - 1.0 - ], - "mean": null, - "std": null, - "min": null, - "max": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "options[0] == 'United States'", - "reason": "Simulation is US-only per spec" - }, - { - "type": "spec_expression", - "value": null, - "expression": "sum(weights) == 1.0", - "reason": "Single-option categorical must have weight 1.0" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Simulation specification: 'in US'", - "note": "Universal constant per simulation specification. All agents are US residents. No sampling variation." - } - } - ] - }, - "name": "independent_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 42522, - "output_tokens": 12384, - "server_tool_use": { - "web_search_requests": 3, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group", - "https://fred.stlouisfed.org/release/tables?eid=259194&rid=118", - "https://www.census.gov/newsroom/press-kits/2024/national-state-population-estimates.html", - "https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html", - "https://williamsinstitute.law.ucla.edu/wp-content/uploads/Trans-Pop-Update-Aug-2025.pdf", - "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/", - "https://worldpopulationreview.com/states", - "https://proximityone.com/statepop2025.htm", - "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html", - "https://www.populationpyramid.net/united-states-of-america/2024/", - "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/", - "https://www.visualcapitalist.com/mapped-every-u-s-state-resized-based-on-population/", - "https://inequalitybyinteriordesign.wordpress.com/2025/02/23/shifts-in-gender-and-sexual-identities-in-the-u-s-2024-update/", - "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html", - "https://www.visualcapitalist.com/u-s-population-by-age-group/", - "https://www.iowadatacenter.org/index.php/blog/httpswwwiowadatacenterorgindexphpblog2023-annual-state-population-estimates", - "https://en.wikipedia.org/wiki/LGBTQ_demographics_of_the_United_States", - "https://news.gallup.com/poll/656708/lgbtq-identification-rises.aspx", - "https://williamsinstitute.law.ucla.edu/press/trans-pop-estimates-press-release/", - "https://www.coopercenter.org/national-population-projections", - "https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_population", - "https://www.kff.org/state-health-policy-data/state-indicator/distribution-by-age/", - "https://news.gallup.com/poll/611864/lgbtq-identification.aspx", - "https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/", - "https://www.upi.com/Top_News/US/2025/02/20/gallup-polling-lgbtq/7041740078808/", - "https://www.statista.com/statistics/719685/american-adults-who-identify-as-homosexual-bisexual-transgender-by-generation/", - "https://www.coopercenter.org/research/national-50-state-population-projections-2030-2040-2050", - "https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_221044_959454_claude_agentic_research.json b/examples/logs/20260217_221044_959454_claude_agentic_research.json deleted file mode 100644 index 2f3bbe5..0000000 --- a/examples/logs/20260217_221044_959454_claude_agentic_research.json +++ /dev/null @@ -1,1120 +0,0 @@ -{ - "timestamp": "2026-02-17T22:10:44.959503", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 16502 - }, - "response": { - "id": "msg_01RsAcvmbYdfCmmZ34MZkPJL", - "content": [ - { - "id": "srvtoolu_014obNxWcoFbKWtst7JBHR5q", - "input": { - "query": "AI literacy US adults 2024 survey statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01LQgrGHvFkCTUuvg6QEwNM4", - "input": { - "query": "tech sector employment percentage US workforce 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01XKCe6sYgF9AY2UzUJB57H4", - "input": { - "query": "knowledge workers percentage US workforce 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5496]", - "page_age": "March 31, 2025", - "title": "AI Literacy Review \u2013 March 11, 2025 - AI Literacy Institute", - "type": "web_search_result", - "url": "https://ailiteracy.institute/ai-literacy-review-march-11-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4096]", - "page_age": null, - "title": "The Decline of Literacy and the Rise of AI: Are We Losing the Ability to Think? \u2013 The Express", - "type": "web_search_result", - "url": "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4140]", - "page_age": "April 14, 2023", - "title": "2024-2025 Literacy Statistics | National Literacy Institute", - "type": "web_search_result", - "url": "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3948]", - "page_age": null, - "title": "AI knowledge of U.S. adults 2024, by age", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2792]", - "page_age": "November 17, 2025", - "title": "US Map Reveals Adult Literacy Rates by State - Beyond Basics", - "type": "web_search_result", - "url": "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5628]", - "page_age": "September 27, 2024", - "title": "Frontiers | Artificial intelligence literacy among university students\u2014a comparative transnational survey", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6508]", - "page_age": "March 16, 2025", - "title": "Navigating the landscape of AI literacy education: insights from a decade of research (2014\u20132024) | Humanities and Social Sciences Communications", - "type": "web_search_result", - "url": "https://www.nature.com/articles/s41599-025-04583-8" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1800]", - "page_age": "December 11, 2024", - "title": "Survey: Growing number of U.S. adults lack literacy skills", - "type": "web_search_result", - "url": "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498" - }, - { - "encrypted_content": "[REDACTED_TEXT length=7656]", - "page_age": "3 weeks ago", - "title": "Literacy in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Literacy_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5516]", - "page_age": null, - "title": "U.S. Adults Score on Par With International Average in Literacy Skills, Below International Average in Numeracy and Problem-Solving Skills in ...", - "type": "web_search_result", - "url": "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp" - } - ], - "tool_use_id": "srvtoolu_014obNxWcoFbKWtst7JBHR5q", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=2364]", - "page_age": null, - "title": "State of the Tech Workforce 2024 | CompTIA Report", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3052]", - "page_age": null, - "title": "Tech sector employment U.S. 2017-2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1403635/united-states-net-sector-employment/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5508]", - "page_age": null, - "title": "CompTIA State of the Tech Workforce 2025 | CompTIA News", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4076]", - "page_age": null, - "title": "2026 tech job market statistics and outlook", - "type": "web_search_result", - "url": "https://www.techtarget.com/whatis/feature/Tech-job-market-statistics-and-outlook" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3924]", - "page_age": null, - "title": "Tech Hiring Activity Outpaces Expectations | CompTIA News", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/tech-hiring-activity-outpaces-expectations-comptia-tech-jobs-report-finds/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4464]", - "page_age": null, - "title": "Employment in the IT industry - Statistics & Facts | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/topics/5275/employment-in-the-it-industry/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4488]", - "page_age": "April 3, 2024", - "title": "CompTIA releases State of the Tech Workforce 2024, detailing growth projections across the nation, states and metro areas", - "type": "web_search_result", - "url": "https://www.prnewswire.com/news-releases/comptia-releases-state-of-the-tech-workforce-2024-detailing-growth-projections-across-the-nation-states-and-metro-areas-302106642.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3464]", - "page_age": null, - "title": "U.S. tech employment by occupation 2020-2030 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/674463/united-states-electronic-components-manufacturing/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3364]", - "page_age": null, - "title": "Little Change in Tech Job Market | CompTIA News", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/latest-employment-data-shows-little-change-in-tech-job-market-comptia-analysis-finds/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1812]", - "page_age": null, - "title": "Computer and Information Technology Occupations : Occupational Outlook Handbook: : U.S. Bureau of Labor Statistics", - "type": "web_search_result", - "url": "https://www.bls.gov/ooh/computer-and-information-technology/" - } - ], - "tool_use_id": "srvtoolu_01LQgrGHvFkCTUuvg6QEwNM4", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4756]", - "page_age": null, - "title": "Upwork Study Finds 1 in 4 U.S. Skilled Knowledge Workers Now Work Independently, Generating $1.5 Trillion in Earnings | Upwork Inc.", - "type": "web_search_result", - "url": "https://investors.upwork.com/news-releases/news-release-details/upwork-study-finds-1-4-us-skilled-knowledge-workers-now-work" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3108]", - "page_age": null, - "title": "Upwork Study Finds 1 in 4 U.S. Skilled Knowledge Workers Now Work Independently, Generating $1.5 Trillion in Earnings", - "type": "web_search_result", - "url": "https://www.globenewswire.com/news-release/2025/04/23/3066181/0/en/Upwork-Study-Finds-1-in-4-U-S-Skilled-Knowledge-Workers-Now-Work-Independently-Generating-1-5-Trillion-in-Earnings.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4588]", - "page_age": null, - "title": "Knowledge Worker Market Size | Wonder", - "type": "web_search_result", - "url": "https://askwonder.com/research/knowledge-worker-market-size-hyayzm1p4" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5288]", - "page_age": "April 19, 2023", - "title": "How AI Could Impact Millions of Knowledge Workers in the Next 1-2 Years", - "type": "web_search_result", - "url": "https://www.marketingaiinstitute.com/blog/ai-knowledge-work" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3480]", - "page_age": null, - "title": "Gartner Forecasts 39% of Global Knowledge Workers Will Work Hybrid by the End of 2023", - "type": "web_search_result", - "url": "https://www.gartner.com/en/newsroom/press-releases/2023-03-01-gartner-forecasts-39-percent-of-global-knowledge-workers-will-work-hybrid-by-the-end-of-2023" - }, - { - "encrypted_content": "[REDACTED_TEXT length=448]", - "page_age": null, - "title": "Labor (employment): How many knowledge workers are there in the world? - Quora", - "type": "web_search_result", - "url": "https://www.quora.com/Labor-employment-How-many-knowledge-workers-are-there-in-the-world" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5488]", - "page_age": "December 10, 2024", - "title": "Key US workforce trends | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2024/12/10/key-labor-force-trends/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4516]", - "page_age": null, - "title": "Total Value of Knowledge Worker Salaries: Comprehensive Research Report - -11T US, -70T Global \u00b7 GitHub", - "type": "web_search_result", - "url": "https://gist.github.com/danielmiessler/2dc039762a202b083753b1400452614d" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5552]", - "page_age": "July 28, 2021", - "title": "Announcing The Knowledge Work Demand Index.", - "type": "web_search_result", - "url": "https://www.usebraintrust.com/blog/knowledge-work-demand-index-july-2021" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4456]", - "page_age": "August 1, 2025", - "title": "The Future Workforce Index: Evolving talent trends in 2025 and beyond", - "type": "web_search_result", - "url": "https://omaha.com/news/nation-world/business/personal-finance/article_dd9f23c6-e096-5fae-a0af-3856c98c01d6.html" - } - ], - "tool_use_id": "srvtoolu_01XKCe6sYgF9AY2UzUJB57H4", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01QKEysbseYk63qcByfBdKdT", - "input": { - "query": "AI existential risk concern survey US adults 2024 percentage worried" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=6980]", - "page_age": "1 week ago", - "title": "Existential risk from artificial intelligence - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Existential_risk_from_artificial_intelligence" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5748]", - "page_age": null, - "title": "Existential anxiety about artificial intelligence (AI)- is it the end of humanity era or a new chapter in the human revolution: questionnaire-based observational study - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11036542/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5668]", - "page_age": "July 15, 2024", - "title": "Three key misconceptions in the debate about AI and existential risk - Bulletin of the Atomic Scientists", - "type": "web_search_result", - "url": "https://thebulletin.org/2024/07/three-key-misconceptions-in-the-debate-about-ai-and-existential-risk/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3864]", - "page_age": "January 25, 2024", - "title": "Weighing the Prophecies of AI Doom - IEEE Spectrum", - "type": "web_search_result", - "url": "https://spectrum.ieee.org/ai-existential-risk-survey" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5684]", - "page_age": "February 20, 2024", - "title": "AI Survey Exaggerates Apocalyptic Risks | Scientific American", - "type": "web_search_result", - "url": "https://www.scientificamerican.com/article/ai-survey-exaggerates-apocalyptic-risks/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5572]", - "page_age": null, - "title": "Existential risk from artificial general intelligence | Computer Science | Research Starters | EBSCO Research", - "type": "web_search_result", - "url": "https://www.ebsco.com/research-starters/computer-science/existential-risk-artificial-general-intelligence" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1112]", - "page_age": "3 days ago", - "title": "Does AI pose an existential risk? We asked 5 experts", - "type": "web_search_result", - "url": "https://theconversation.com/does-ai-pose-an-existential-risk-we-asked-5-experts-266345" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6828]", - "page_age": null, - "title": "Potential for near-term AI risks to evolve into existential threats in healthcare - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12035420/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5140]", - "page_age": "April 9, 2024", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3196]", - "page_age": "December 4, 2025", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - } - ], - "tool_use_id": "srvtoolu_01QKEysbseYk63qcByfBdKdT", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=200]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=146]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNz4aLEa5E4V/Eq5phoMYFXgJCWe+xzTdldvIjA1UT2PCSmLIc37hUGM9GgR7TLJodtJHNDlUdt/UnsOw06sWb+8d0Oabv23DTb/Yu8qFGmahjY7B2weI84bqDJY8DtSFE0EGAQ=", - "title": "Americans Express Real Concerns About Artificial Intelligence", - "type": "web_search_result_location", - "url": "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx" - } - ], - "text": "[REDACTED_TEXT length=71]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=2]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=136]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDN6N4YWuR/bSVUy4ZhoMcoMWEjIopeWpeu2EIjDYCkkEcvwkHSX8IH3ww4twlme6PQ5CxnPy/tLg47QafL2+t949s8HGLVx1MFt/wHUqE6RxZQUvlm57Zxw7vLbifusy1L8YBA==", - "title": "AI knowledge of U.S. adults 2024, by age", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - }, - { - "cited_text": "[REDACTED_TEXT length=89]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDME2HDOgc2ynvjZx/BoMNce0X/fMAcpq5K6GIjC98U5S6oHMlkOurK0vrP6+1S/mYXDzLixQfgDUKVAXVMuVBips23u2FrwXYdtieM8qE7FSvav+peAetYdS2fz7T/hWjWYYBA==", - "title": "AI knowledge of U.S. adults 2024, by age", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/" - } - ], - "text": "[REDACTED_TEXT length=65]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=31]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPl8lVJiMVSkCyPj+hoMt3DFfG7x8RZdLLUVIjBxP9G7yuK7qpJC85rre5FACsUpSCmvwwYUzTtOwI15XapwQJiZMJguMmj+1pPbbtEqFJani9gf6z7HmDxyyVCbiE5OZgdcGAQ=", - "title": "CompTIA State of the Tech Workforce 2025 | CompTIA News", - "type": "web_search_result_location", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/" - } - ], - "text": "[REDACTED_TEXT length=59]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=63]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDMOMDeo4GwjMQ7vKaBoMGUA3QUekdGj9RN1VIjAhZY6uXeH1D0es3euVTukkQGHvFeI/vctcwcp1QQzjoqR44A8o6GkQcbWKuBMAZgMqFG44lOect7c+HzGbt33q2hQTj6Q2GAQ=", - "title": "CompTIA State of the Tech Workforce 2025 | CompTIA News", - "type": "web_search_result_location", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/" - } - ], - "text": "[REDACTED_TEXT length=52]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=46]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDC+sqy3q0f3pxdWxBxoMeMWnirlqCAMNBj85IjC9bdPb1L4WC1rPZ5a1juhQPlzy2WXHWEkGq2oFcOSNEI9PAxHjAmaAwAU+ugH6lWoqFPKf28GPbPZOTuGv3UqtCAx9OLIaGAQ=", - "title": "Upwork Study Finds 1 in 4 U.S. Skilled Knowledge Workers Now Work Independently, Generating $1.5 Trillion in Earnings | Upwork Inc.", - "type": "web_search_result_location", - "url": "https://investors.upwork.com/news-releases/news-release-details/upwork-study-finds-1-4-us-skilled-knowledge-workers-now-work" - } - ], - "text": "[REDACTED_TEXT length=121]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=2]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDH4vWd5uHsTPZte+wxoM9EcA9j2QKtEwzY8UIjCWwhI165s9IrBAGAPim97MxhDdtO0sfnLLFaF4BEsDGyyxeq4GgvV/+Jbq8u6SUecqFJ3B8g+BwTKqeumvc6/jOymxh0WPGAQ=", - "title": "Total Value of Knowledge Worker Salaries: Comprehensive Research Report - -11T US, -70T Global \u00b7 GitHub", - "type": "web_search_result_location", - "url": "https://gist.github.com/danielmiessler/2dc039762a202b083753b1400452614d" - } - ], - "text": "[REDACTED_TEXT length=51]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=36]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJoEnQUu+13o7n/y+hoMXTQ25KcT27jASBZ/IjC4UCROy7bad5kvtgtGIefSfYDdLE9Qm2jZSpsO0D4arMStZCdNCeiMQgjS5hndJ6gqFrk2TJzI6W3XfwAg8t3cDoC7JBcGV7oY...[truncated]", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result_location", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - } - ], - "text": "[REDACTED_TEXT length=160]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=29]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=125]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAxbpOHOHodDYiIvZxoMZiU8dC6XO21vPYOLIjBOJKm1sy84nVKm+gZALdp5J+6sq/zUpSwgKu5uvWEsDWWgWG3P1ZzA4afTEROCL0cqFYCZ+cpVZgFqMqRQIwjVydJtcYcBQxgE", - "title": "Americans' top feeling about AI: caution | YouGov", - "type": "web_search_result_location", - "url": "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution" - } - ], - "text": "[REDACTED_TEXT length=123]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=27]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDHZ1pEH12dQT+KRFoRoMR6cB4PBg/GSHV72hIjBklbA1f8lTEnUzwDeK7DNlPXm56Ql7Ffa2IspfdRYVOkrr1ybmxmYZ08cmh2zZrHkqFAm+xSkTqwq9xrnrm1IBgfzgfdCgGAQ=", - "title": "Three key misconceptions in the debate about AI and existential risk - Bulletin of the Atomic Scientists", - "type": "web_search_result_location", - "url": "https://thebulletin.org/2024/07/three-key-misconceptions-in-the-debate-about-ai-and-existential-risk/" - } - ], - "text": "[REDACTED_TEXT length=79]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=2]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNH+UdjZU2OzvPbAeBoM9WSd5ytQLF8hwjIwIjCODOTfp9xubCR1VnGYbMnijDAaM4JppIu1Y0zJyLQXxNPnDY2BXcF29TCdpzcYu6sqFAgQnX5aJljVJWceJjLiVc9YrB4WGAQ=", - "title": "Existential risk from artificial intelligence - Wikipedia", - "type": "web_search_result_location", - "url": "https://en.wikipedia.org/wiki/Existential_risk_from_artificial_intelligence" - } - ], - "text": "[REDACTED_TEXT length=75]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_01EJ8EynjAAREk19WrfJiLNq", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "distribution": { - "type": "beta", - "alpha": 2.2, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Gallup/Bentley 2024 (64% at least somewhat knowledgeable); Statista 2024 (40%+ know little); YouGov 2024", - "note": "Beta(2.2, 3.5) centers the population around ~0.39 mean, right-skewed toward low\u2013moderate literacy. Modifiers for education, occupation, and age will shift this substantially upward for college-educat...[truncated]" - } - }, - { - "name": "tech_sector_employment", - "distribution": { - "type": "boolean", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": 0.06 - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "CompTIA State of the Tech Workforce 2025: 5.9M tech occupation + 9.6M net tech employment out of ~165M US workforce", - "note": "Base rate ~5.8% using net tech employment figure (~9.6M / ~165M). Conditioned on occupation=Professional/Management and employment_status=Full-time/Part-time/Self-employed, the probability will be muc...[truncated]" - } - }, - { - "name": "knowledge_worker", - "distribution": { - "type": "boolean", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": 0.4 - }, - "constraints": [], - "grounding": { - "level": "strong", - "method": "researched", - "source": "BLS via Upwork Research Institute (2025): management, professional, and related occupations = 42% of US workforce (71.5M workers); Gartner/McKinsey: ~100M knowledge workers = 38\u201342% of workforce", - "note": "Base rate ~40% across all employed adults. Among the full adult population (including unemployed, retired, students), effective base rate is slightly lower. Modifiers for occupation=Management/Profess...[truncated]" - } - }, - { - "name": "personal_health_vulnerability", - "distribution": { - "type": "boolean", - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "options": null, - "weights": null, - "probability_true": 0.3 - }, - "constraints": [], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "CDC/NIH prevalence data: ~40M diabetes (~12%), ~7M cancer (~2.1%), ~6.5M Alzheimer's (~2%), ~1.5M ALS/MS combined, ~1.2M HIV (~0.4%), plus household extension factor; combined household-level prevalen...[truncated]", - "note": "Aggregates across cancer (2%), Alzheimer's (2%), ALS (<0.1%), diabetes T1+T2 (12%), HIV (0.4%) \u2014 summing individual prevalence ~17%, then extending to household members roughly doubles the exposure ra...[truncated]" - } - }, - { - "name": "financial_market_exposure", - "distribution": { - "type": "categorical", - "options": [ - "None", - "Low", - "Medium", - "High" - ], - "weights": [ - 0.22, - 0.42, - 0.24, - 0.12 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Federal Reserve Survey of Consumer Finances 2022: ~58% of US families own stocks directly or indirectly; ~21% have no financial assets beyond checking; Gallup 2024 stock ownership ~61%", - "note": "None (~22%): no investments beyond checking/savings. Low (~42%): 401k/savings only, passive. Medium (~24%): active brokerage, index funds, moderate crypto. High (~12%): significant equity portfolio, d...[truncated]" - } - }, - { - "name": "asi_existential_risk_belief", - "distribution": { - "type": "beta", - "alpha": 2.0, - "beta": 4.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "YouGov 2024: 15% very concerned AI causes human extinction, 24% somewhat concerned; Pew 2023: 52% more concerned than excited; Rethink Priorities 2023: 59% support prioritizing AI extinction risk miti...[truncated]", - "note": "Beta(2.0, 4.5) produces mean ~0.31 with a right-skew toward lower concern \u2014 matching YouGov's finding that ~39% are very or somewhat concerned about AI causing extinction. A small tail (~10%) approach...[truncated]" - } - }, - { - "name": "asi_benefit_optimism", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "YouGov 2024: only 27% expect positive societal effects vs 42% negative; Pew 2023: 52% more concerned than excited; younger adults and high-income adults more optimistic", - "note": "Beta(2.5, 3.5) yields mean ~0.42, capturing a population that is modestly pessimistic about broadly shared AI benefits, consistent with YouGov 2024 data. The distribution allows meaningful variation \u2014...[truncated]" - } - }, - { - "name": "job_automation_risk_perception", - "distribution": { - "type": "beta", - "alpha": 2.8, - "beta": 3.2, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew Research 2023: 19% of workers worried their job will be automated; Indeed 2025: 31% of tech employees concerned about layoffs; Gallup: higher perceived risk among lower-income, less-educated worke...[truncated]", - "note": "Beta(2.8, 3.2) yields near-symmetric distribution around mean ~0.47 \u2014 reflecting genuine uncertainty in the general population. Many Americans feel moderate automation risk without certainty. Knowledg...[truncated]" - } - }, - { - "name": "asi_adoption_eagerness", - "distribution": { - "type": "beta", - "alpha": 2.2, - "beta": 3.8, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "YouGov 2024: 54% cautious about AI, 40% skeptical; Gallup 2024: 64% at least somewhat knowledgeable; younger adults and high-openness individuals substantially more eager to adopt AI tools", - "note": "Beta(2.2, 3.8) yields mean ~0.37, capturing a population that is generally cautious and not rushing to adopt ASI tools. Heavy right-skew reflects that most people are reluctant adopters. Modifiers for...[truncated]" - } - }, - { - "name": "regulatory_intervention_support", - "distribution": { - "type": "beta", - "alpha": 4.0, - "beta": 2.5, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "strong", - "method": "researched", - "source": "Rethink Priorities 2023: 59% support prioritizing AI extinction risk mitigation; Pew 2023: majority support AI regulation across partisan lines; Gallup 2024: broad public support for guardrails", - "note": "Beta(4.0, 2.5) yields mean ~0.62, reflecting that the majority of US adults support some level of AI regulation \u2014 consistent with Rethink Priorities and Pew surveys. The distribution skews toward high...[truncated]" - } - }, - { - "name": "information_network_centrality", - "distribution": { - "type": "categorical", - "options": [ - "Isolated", - "Peripheral", - "Connected", - "Hub" - ], - "weights": [ - 0.15, - 0.45, - 0.3, - 0.1 - ], - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": null, - "max": null, - "min_formula": null, - "max_formula": null, - "alpha": null, - "beta": null, - "probability_true": null - }, - "constraints": [ - { - "type": "spec_expression", - "value": null, - "expression": "abs(sum(weights) - 1.0) < 0.001", - "reason": "Weights must sum to 1" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Pew Research social media usage surveys; network science literature showing power-law distribution of social influence; ~10% of users generate ~80% of social media content", - "note": "Isolated (15%): low social connectivity, rarely shares news. Peripheral (45%): passive consumers of news and social media. Connected (30%): actively shares content, regular commenter. Hub (10%): opini...[truncated]" - } - }, - { - "name": "economic_precarity", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.0, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Federal Reserve 2024 Report on Economic Well-Being: ~37% of adults couldn't cover a $400 emergency expense; ~28% have no retirement savings; median household income ~$80k with high variance", - "note": "Beta(2.5, 3.0) yields mean ~0.45 with slight skew toward higher precarity, reflecting the substantial share of the US population living paycheck-to-paycheck or with minimal financial buffer. Modifiers...[truncated]" - } - }, - { - "name": "institutional_change_tolerance", - "distribution": { - "type": "beta", - "alpha": 2.5, - "beta": 3.2, - "mean": null, - "std": null, - "mean_formula": null, - "std_formula": null, - "min": 0.0, - "max": 1.0, - "min_formula": null, - "max_formula": null, - "options": null, - "weights": null, - "probability_true": null - }, - "constraints": [ - { - "type": "hard_min", - "value": 0.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - }, - { - "type": "hard_max", - "value": 1.0, - "expression": null, - "reason": "Bounded 0\u20131 scale" - } - ], - "grounding": { - "level": "medium", - "method": "extrapolated", - "source": "Big Five openness literature; Pew political values surveys; psychological research on tolerance of ambiguity and system justification (Jost et al.)", - "note": "Beta(2.5, 3.2) yields mean ~0.44 with a mild lean toward lower tolerance for rapid institutional change \u2014 consistent with general population conservatism toward large-scale disruption, even among poli...[truncated]" - } - } - ] - }, - "name": "conditional_base_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 100530, - "output_tokens": 5701, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://news.gallup.com/poll/648953/americans-express-real-concerns-artificial-intelligence.aspx", - "https://www.statista.com/statistics/1466984/ai-awareness-us-by-age/", - "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full", - "https://www.nature.com/articles/s41599-025-04583-8", - "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC11036542/", - "https://nces.ed.gov/whatsnew/press_releases/12_10_2024.asp", - "https://www.ebsco.com/research-starters/computer-science/existential-risk-artificial-general-intelligence", - "https://www.quora.com/Labor-employment-How-many-knowledge-workers-are-there-in-the-world", - "https://theconversation.com/does-ai-pose-an-existential-risk-we-asked-5-experts-266345", - "https://omaha.com/news/nation-world/business/personal-finance/article_dd9f23c6-e096-5fae-a0af-3856c98c01d6.html", - "https://www.comptia.org/en-us/about-us/news/press-releases/tech-hiring-activity-outpaces-expectations-comptia-tech-jobs-report-finds/", - "https://www.techtarget.com/whatis/feature/Tech-job-market-statistics-and-outlook", - "https://gist.github.com/danielmiessler/2dc039762a202b083753b1400452614d", - "https://sjhexpress.com/opinion/2025/02/28/the-decline-of-literacy-and-the-rise-of-ai-are-we-losing-the-ability-to-think/", - "https://www.thenationalliteracyinstitute.com/2024-2025-literacy-statistics", - "https://www.globenewswire.com/news-release/2025/04/23/3066181/0/en/Upwork-Study-Finds-1-in-4-U-S-Skilled-Knowledge-Workers-Now-Work-Independently-Generating-1-5-Trillion-in-Earnings.html", - "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/", - "https://ailiteracy.institute/ai-literacy-review-march-11-2025/", - "https://www.statista.com/topics/5275/employment-in-the-it-industry/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12035420/", - "https://beyondbasics.org/us-map-reveals-adult-literacy-rates-by-state/", - "https://investors.upwork.com/news-releases/news-release-details/upwork-study-finds-1-4-us-skilled-knowledge-workers-now-work", - "https://www.usebraintrust.com/blog/knowledge-work-demand-index-july-2021", - "https://www.prnewswire.com/news-releases/comptia-releases-state-of-the-tech-workforce-2024-detailing-growth-projections-across-the-nation-states-and-metro-areas-302106642.html", - "https://en.wikipedia.org/wiki/Existential_risk_from_artificial_intelligence", - "https://www.statista.com/statistics/1403635/united-states-net-sector-employment/", - "https://www.bls.gov/ooh/computer-and-information-technology/", - "https://today.yougov.com/technology/articles/49099-americans-2024-poll-ai-top-feeling-caution", - "https://www.comptia.org/en-us/about-us/news/press-releases/latest-employment-data-shows-little-change-in-tech-job-market-comptia-analysis-finds/", - "https://www.scientificamerican.com/article/ai-survey-exaggerates-apocalyptic-risks/", - "https://askwonder.com/research/knowledge-worker-market-size-hyayzm1p4", - "https://www.gartner.com/en/newsroom/press-releases/2023-03-01-gartner-forecasts-39-percent-of-global-knowledge-workers-will-work-hybrid-by-the-end-of-2023", - "https://www.statista.com/statistics/674463/united-states-electronic-components-manufacturing/", - "https://thebulletin.org/2024/07/three-key-misconceptions-in-the-debate-about-ai-and-existential-risk/", - "https://www.marketingaiinstitute.com/blog/ai-knowledge-work", - "https://spectrum.ieee.org/ai-existential-risk-survey", - "https://www.nbcnews.com/data-graphics/survey-growing-number-us-adults-lack-literacy-skills-rcna183498", - "https://en.wikipedia.org/wiki/Literacy_in_the_United_States", - "https://www.pewresearch.org/social-trends/2024/12/10/key-labor-force-trends/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_221208_685053_claude_agentic_research.json b/examples/logs/20260217_221208_685053_claude_agentic_research.json deleted file mode 100644 index b23c608..0000000 --- a/examples/logs/20260217_221208_685053_claude_agentic_research.json +++ /dev/null @@ -1,1513 +0,0 @@ -{ - "timestamp": "2026-02-17T22:12:08.685079", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 19965 - }, - "response": { - "id": "msg_01BtpuDQs82ZUDqkHa2TaWii", - "content": [ - { - "id": "srvtoolu_014xYQaG4WNkVARoyPy6c2jt", - "input": { - "query": "public opinion polls AI superintelligence existential risk 2024 2025" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01H2fEmww3bM3KyAjazM6oyu", - "input": { - "query": "AI literacy demographics age education occupation survey 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1800]", - "page_age": null, - "title": "Public Opinion | The 2025 AI Index Report - Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6816]", - "page_age": "1 week ago", - "title": "Existential risk from artificial intelligence - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Existential_risk_from_artificial_intelligence" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5536]", - "page_age": "October 19, 2025", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5620]", - "page_age": "January 5, 2026", - "title": "Stopping the Clock on catastrophic AI risk - Bulletin of the Atomic Scientists", - "type": "web_search_result", - "url": "https://thebulletin.org/premium/2025-12/stopping-the-clock-on-catastrophic-ai-risk/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1824]", - "page_age": "November 18, 2025", - "title": "AI can impersonate humans in public opinion polls, study finds", - "type": "web_search_result", - "url": "https://www.euronews.com/next/2025/11/18/ai-poses-existential-threat-to-polling-mimicking-human-responses-almost-perfectly-study-fi" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5552]", - "page_age": "November 19, 2025", - "title": "AI Bots 'Indistinguishable From Real People' Can Now Easily Manipulate Public Opinion Polls", - "type": "web_search_result", - "url": "https://studyfinds.org/the-ai-scam-that-could-threaten-public-opinion-research/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6236]", - "page_age": "July 17, 2025", - "title": "2025 AI Safety Index - Future of Life Institute", - "type": "web_search_result", - "url": "https://futureoflife.org/ai-safety-index-summer-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=468]", - "page_age": "3 days ago", - "title": "Does AI pose an existential risk? We asked 5 experts", - "type": "web_search_result", - "url": "https://theconversation.com/does-ai-pose-an-existential-risk-we-asked-5-experts-266345" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5248]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4188]", - "page_age": "May 9, 2025", - "title": "Could AI Really Kill Off Humans? | RAND", - "type": "web_search_result", - "url": "https://www.rand.org/pubs/commentary/2025/05/could-ai-really-kill-off-humans.html" - } - ], - "tool_use_id": "srvtoolu_014xYQaG4WNkVARoyPy6c2jt", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5580]", - "page_age": "March 30, 2025", - "title": "Gender and Age Gaps in Generative AI - AI Literacy Institute", - "type": "web_search_result", - "url": "https://ailiteracy.institute/gender-and-age-gaps-in-generative-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4560]", - "page_age": "March 16, 2025", - "title": "Navigating the landscape of AI literacy education: insights from a decade of research (2014\u20132024) | Humanities and Social Sciences Communications", - "type": "web_search_result", - "url": "https://www.nature.com/articles/s41599-025-04583-8" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5504]", - "page_age": "March 31, 2025", - "title": "AI Literacy Review \u2013 March 11, 2025 - AI Literacy Institute", - "type": "web_search_result", - "url": "https://ailiteracy.institute/ai-literacy-review-march-11-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6560]", - "page_age": "September 27, 2024", - "title": "Frontiers | Artificial intelligence literacy among university students\u2014a comparative transnational survey", - "type": "web_search_result", - "url": "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1396]", - "page_age": null, - "title": "Digital Education Council Global AI Student Survey 2024", - "type": "web_search_result", - "url": "https://www.digitaleducationcouncil.com/post/digital-education-council-global-ai-student-survey-2024" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4860]", - "page_age": "November 11, 2025", - "title": "20 Statistics on AI in Education to Guide Your Learning Strategy in 2025", - "type": "web_search_result", - "url": "https://www.engageli.com/blog/ai-in-education-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5660]", - "page_age": "December 11, 2024", - "title": "New EY survey reveals crucial AI literacy training needs among Gen Z workforce | EY - Global", - "type": "web_search_result", - "url": "https://www.ey.com/en_gl/newsroom/2024/12/new-ey-survey-reveals-crucial-ai-literacy-training-needs-among-gen-z-workforce" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4648]", - "page_age": "February 26, 2025", - "title": "Children, young people and teachers\u2019 use of generative AI to support literacy in 2024 | National Literacy Trust", - "type": "web_search_result", - "url": "https://literacytrust.org.uk/research-services/research-reports/children-young-people-and-teachers-use-of-generative-ai-to-support-literacy-in-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4152]", - "page_age": "January 9, 2026", - "title": "The Latest AI in Education Statistics (2026) - Programs.com", - "type": "web_search_result", - "url": "https://programs.com/resources/ai-education-statistics/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5600]", - "page_age": "June 10, 2025", - "title": "Generative AI in Higher Education: Demographic Differences in Student Perceived Readiness, Benefits, and Challenges | TechTrends | Springer Nature Link", - "type": "web_search_result", - "url": "https://link.springer.com/article/10.1007/s11528-025-01109-6" - } - ], - "tool_use_id": "srvtoolu_01H2fEmww3bM3KyAjazM6oyu", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01SoshpLbd5RGJ4CYmZuNcio", - "input": { - "query": "AI job automation fear demographics political ideology survey 2024 2025" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01JiS1kNsNpDBgch1wAfPW5o", - "input": { - "query": "tech sector employment percentage US workforce 2024 knowledge workers share" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=4364]", - "page_age": "April 17, 2025", - "title": "What the public thinks about AI and the implications for governance | Brookings", - "type": "web_search_result", - "url": "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1800]", - "page_age": null, - "title": "Public Opinion | The 2025 AI Index Report - Stanford HAI", - "type": "web_search_result", - "url": "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6164]", - "page_age": "November 11, 2025", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3480]", - "page_age": "November 11, 2025", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2840]", - "page_age": "July 18, 2025", - "title": "Americans are increasingly likely to say AI will negatively affect society | YouGov", - "type": "web_search_result", - "url": "https://today.yougov.com/politics/articles/52615-americans-increasingly-likely-say-ai-artificial-intelligence-negatively-affect-society-poll" - }, - { - "encrypted_content": "[REDACTED_TEXT length=540]", - "page_age": null, - "title": "4/16/25 - The Age Of Artificial Intelligence: Americans Wary Of Impact On Daily Life, See Harm To Education, Benefits To Medical Advances, Quinnipiac University National Poll Finds; Americans Expect A...[truncated]", - "type": "web_search_result", - "url": "https://poll.qu.edu/poll-release?releaseid=3923" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4112]", - "page_age": null, - "title": "pi_2025.04.03_us-public-and-ai-experts_report.pdf", - "type": "web_search_result", - "url": "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/04/pi_2025.04.03_us-public-and-ai-experts_report.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4132]", - "page_age": "July 29, 2025", - "title": "Will AI Take My Job? Evolving Perceptions of Automation and Labor Risk in Latin America", - "type": "web_search_result", - "url": "https://arxiv.org/html/2505.08841" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2796]", - "page_age": "December 4, 2025", - "title": "American Views on AI, National Security in 5 Charts", - "type": "web_search_result", - "url": "https://news.gallup.com/poll/695297/american-views-national-security-charts.aspx" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4544]", - "page_age": "December 17, 2024", - "title": "Americans Divided on Whether AI Will Make Things Better or Worse, New Survey Finds \u2013 Center for Data Innovation", - "type": "web_search_result", - "url": "https://datainnovation.org/2024/05/americans-divided-on-whether-ai-will-make-things-better-or-worse-new-survey-finds/" - } - ], - "tool_use_id": "srvtoolu_01SoshpLbd5RGJ4CYmZuNcio", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=704]", - "page_age": null, - "title": "State of the Tech Workforce 2024 | CompTIA Report", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1660]", - "page_age": null, - "title": "CompTIA State of the Tech Workforce 2025 | CompTIA News", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1836]", - "page_age": null, - "title": "State of the Tech Workforce 2025 | CompTIA Report", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2025/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5320]", - "page_age": "June 11, 2025", - "title": "The tech workforce is expanding\u2014and changing\u2014as different sectors battle for talent", - "type": "web_search_result", - "url": "https://www.deloitte.com/us/en/insights/topics/economy/spotlight/tech-workforce-expanding.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3392]", - "page_age": null, - "title": "Tech sector employment U.S. 2017-2024 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/1403635/united-states-net-sector-employment/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6172]", - "page_age": null, - "title": "Employment in the IT industry - Statistics & Facts | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/topics/5275/employment-in-the-it-industry/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3984]", - "page_age": null, - "title": "2026 tech job market statistics and outlook", - "type": "web_search_result", - "url": "https://www.techtarget.com/whatis/feature/Tech-job-market-statistics-and-outlook" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4856]", - "page_age": "April 3, 2024", - "title": "CompTIA releases State of the Tech Workforce 2024, detailing growth projections across the nation, states and metro areas", - "type": "web_search_result", - "url": "https://www.prnewswire.com/news-releases/comptia-releases-state-of-the-tech-workforce-2024-detailing-growth-projections-across-the-nation-states-and-metro-areas-302106642.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3744]", - "page_age": null, - "title": "Tech Hiring Activity Outpaces Expectations | CompTIA News", - "type": "web_search_result", - "url": "https://www.comptia.org/en-us/about-us/news/press-releases/tech-hiring-activity-outpaces-expectations-comptia-tech-jobs-report-finds/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4396]", - "page_age": "July 1, 2025", - "title": "CompTIA State of the Tech Workforce 2025 provides comprehensive review of key metrics for nation, states and metropolitan markets", - "type": "web_search_result", - "url": "https://www.prnewswire.com/news-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets-302495144.html" - } - ], - "tool_use_id": "srvtoolu_01JiS1kNsNpDBgch1wAfPW5o", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=320]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDZ+DrYLTT6ltQPl3BoM1BHpsK0Vrq07wa0DIjD7WeAzDqzHTIf+RKSIRtcQsF1W9+CWKZCe4Bi4oLt/N2B3to3ajQ3Ivv3QpuIrcz4qFITi2bwJG9xsShzSutjkYrplLEtEGAQ=", - "title": "The tech workforce is expanding\u2014and changing\u2014as different sectors battle for talent", - "type": "web_search_result_location", - "url": "https://www.deloitte.com/us/en/insights/topics/economy/spotlight/tech-workforce-expanding.html" - } - ], - "text": "[REDACTED_TEXT length=41]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpMBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOMFty8kUtPChGPe4BoM4T1C6GreQL9dYOJTIjDrY6s3KJBrM3IrrrV7+vrLOthz656DT62P6WtJQ3rUEpD0p5bygbZ/hV5EsVT25ocqF4CmiD0TiY+X7+ZqgxbSsvfKwbWfkM3K...[truncated]", - "title": "How the US Public and AI Experts View Artificial Intelligence | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/" - } - ], - "text": "[REDACTED_TEXT length=76]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "Eo8BCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDEyGrfzq3QwFKZ+GjhoM7HEBlIfjkuvN5238IjA+ydGFcYjgtsdO4voxjA9Jcj/CmhjcWmAqx+TBCIP9iH1U4moOZ/0foGdXRQtQykkqE7w3FoqmitAJGV6uZPUIjb9YbVAYBA==", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result_location", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - } - ], - "text": "[REDACTED_TEXT length=120]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDLHR3sdTATZIRYswFhoMZOKVKELimQgH+k79IjBS+NLoCYR2MelyEci/6M33oFkysUOOMN9dWTNunTk0UkMEtinooUV/79qfKASXzWAqFGxg++WEYCjG8Ebnq1CrzP5BFqcVGAQ=", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result_location", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - } - ], - "text": "[REDACTED_TEXT length=79]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=75]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAvY0A7o/GHKKeU3ohoM3llBc85HzfnS4lq9IjD40mSed/4pQIO3u0EK7swawXz5s3dwBGriEINoJ59P2R+NjRXZtY1L6V0HLtgRytwqFFMOwVN5TZyxD8uTylH541RWQKBsGAQ=", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=75]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=147]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDDQ0UwbK7fsaALVelxoMV79nLJkbY57QXjfkIjCSsj5r6cu8Z9+Qom7ud6/TE2ViMK1Tbdcii9IjExsZsGS1uURhktgH31a0RHqGhKQqFIQViB60mJYPIrdk3xJMLi0yBahjGAQ=", - "title": "AI risks, opportunities, regulation: Views of US public and AI experts | Pew Research Center", - "type": "web_search_result_location", - "url": "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/" - } - ], - "text": "[REDACTED_TEXT length=97]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNdr8Uohehr5XmGL5hoMzbxw3eGXJOwdEB2yIjDV6f/WNNaKkBw1NFvOR6imOVn6CDZ0jE5EKbX1Z/l9r7ZDVskYC9FcAhvBHoKpbvUqFOQ/5Yz8p4FbjoALEuVserv4/lIrGAQ=", - "title": "What the public thinks about AI and the implications for governance | Brookings", - "type": "web_search_result_location", - "url": "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/" - } - ], - "text": "[REDACTED_TEXT length=61]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDAFwdQ0OKzWW+wK+RhoMaqVMx08p1CHtS0rKIjAqD++HpQVX07hC7VNlMMgLsWc3omutUyXSUxFN7XpnRJMRVdSI3tZvj+gtc2/qj10qFNorzG9xknXSeiFxNh7tJGKKyMisGAQ=", - "title": "4/16/25 - The Age Of Artificial Intelligence: Americans Wary Of Impact On Daily Life, See Harm To Education, Benefits To Medical Advances, Quinnipiac University National Poll Finds; Americans Expect A...[truncated]", - "type": "web_search_result_location", - "url": "https://poll.qu.edu/poll-release?releaseid=3923" - } - ], - "text": "[REDACTED_TEXT length=85]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDJzfB+e/69bWvp+nHhoMs7WWaRla7IoAxTa7IjAlFfCOiGN7ASWxvmj6p8NNggxJrVGPaeCgtYdJGeTlnWkIveQod1W4tJi0swLWM64qFoNOGl3yD5D/UNoBaH24Wv0yqneKo74Y...[truncated]", - "title": "Gender and Age Gaps in Generative AI - AI Literacy Institute", - "type": "web_search_result_location", - "url": "https://ailiteracy.institute/gender-and-age-gaps-in-generative-ai/" - } - ], - "text": "[REDACTED_TEXT length=78]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=114]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNMifBhpIN11uMcj9hoM3jJhLqvfNuMD3hfOIjDT8GBRgMOBTlLwwXxiwzWA7PS9D7sArZ3q6chFuJcZCpn5LXt9U+Yv8+fd398bZe0qFDwaLYeufMDPEcrtndTs0DtD7tnmGAQ=", - "title": "The U.S. Public Wants Regulation (or Prohibition) of Expert\u2011Level and Superhuman AI - Future of Life Institute", - "type": "web_search_result_location", - "url": "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/" - } - ], - "text": "[REDACTED_TEXT length=104]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=138]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOUTiJvS3pMK+mrxQBoMcr1NFVSmGwmKhmsYIjD7u69CPaFuYw6HGPXeY7bC075/hUeTk/VSNxmizNkbFJX/KoEIuKR9IHpKJRQ9TRcqFUWGfF5CJ4pywdN4LDBfDPw927F0hxgE", - "title": "Will AI Take My Job? Evolving Perceptions of Automation and Labor Risk in Latin America", - "type": "web_search_result_location", - "url": "https://arxiv.org/html/2505.08841" - } - ], - "text": "[REDACTED_TEXT length=68]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_015Noj8wAcgLbs3phUkUExez", - "input": { - "attributes": [ - { - "name": "ai_literacy", - "modifiers": [ - { - "when": "education_level in ['Less than HS', 'HS Diploma']", - "multiply": 0.55, - "add": 0.0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Some College'", - "multiply": 0.8, - "add": 0.0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == \"Associate's\"", - "multiply": 0.88, - "add": 0.0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == \"Bachelor's\"", - "multiply": 1.15, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree'", - "multiply": 1.3, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "occupation == 'Management/Professional' and education_level == 'Graduate Degree'", - "multiply": 1.4, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age < 35", - "multiply": 1.18, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 35 and age < 55", - "multiply": 1.05, - "add": 0.0, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 55 and age < 70", - "multiply": 0.85, - "add": -0.03, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 70", - "multiply": 0.65, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "tech_sector_employment", - "modifiers": [ - { - "when": "occupation == 'Management/Professional' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.18 - }, - { - "when": "occupation == 'Management/Professional' and employment_status == 'Self-employed'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.14 - }, - { - "when": "occupation == 'Sales/Office' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.07 - }, - { - "when": "occupation == 'Service' and employment_status == 'Full-time'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.02 - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.01 - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.02 - }, - { - "when": "employment_status == 'Retired'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.01 - }, - { - "when": "employment_status == 'Student'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.06 - }, - { - "when": "employment_status == 'Unemployed'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.04 - } - ] - }, - { - "name": "knowledge_worker", - "modifiers": [ - { - "when": "occupation == 'Management/Professional' and education_level == 'Graduate Degree'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.85 - }, - { - "when": "occupation == 'Management/Professional' and education_level == \"Bachelor's\"", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.7 - }, - { - "when": "occupation == 'Management/Professional' and education_level in ['Some College', \"Associate's\"]", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.4 - }, - { - "when": "occupation == 'Sales/Office' and education_level in [\"Bachelor's\", 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.35 - }, - { - "when": "occupation == 'Sales/Office' and education_level in ['Less than HS', 'HS Diploma', 'Some College', \"Associate's\"]", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.12 - }, - { - "when": "occupation == 'Service'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.06 - }, - { - "when": "occupation == 'Construction/Extraction'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.03 - }, - { - "when": "occupation == 'Production/Transport'", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.04 - }, - { - "when": "occupation == 'Other' and education_level in [\"Bachelor's\", 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.3 - } - ] - }, - { - "name": "personal_health_vulnerability", - "modifiers": [ - { - "when": "age < 35", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.07 - }, - { - "when": "age >= 35 and age < 50", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.15 - }, - { - "when": "age >= 50 and age < 65", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.32 - }, - { - "when": "age >= 65", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.52 - }, - { - "when": "household_size >= 3 and age >= 40", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.38 - }, - { - "when": "household_size >= 4 and age >= 50", - "multiply": null, - "add": null, - "weight_overrides": null, - "probability_override": 0.55 - } - ] - }, - { - "name": "financial_market_exposure", - "modifiers": [ - { - "when": "household_income < 35000 and education_level in ['Less than HS', 'HS Diploma']", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.6, - "Low": 0.3, - "Medium": 0.08, - "High": 0.02 - }, - "probability_override": null - }, - { - "when": "household_income >= 35000 and household_income < 60000", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.3, - "Low": 0.45, - "Medium": 0.2, - "High": 0.05 - }, - "probability_override": null - }, - { - "when": "household_income >= 60000 and household_income < 100000", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.12, - "Low": 0.45, - "Medium": 0.33, - "High": 0.1 - }, - "probability_override": null - }, - { - "when": "household_income >= 100000 and household_income < 200000 and education_level in [\"Bachelor's\", 'Graduate Degree']", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.05, - "Low": 0.28, - "Medium": 0.45, - "High": 0.22 - }, - "probability_override": null - }, - { - "when": "household_income >= 200000 and education_level == 'Graduate Degree'", - "multiply": null, - "add": null, - "weight_overrides": { - "None": 0.03, - "Low": 0.12, - "Medium": 0.35, - "High": 0.5 - }, - "probability_override": null - } - ] - }, - { - "name": "asi_existential_risk_belief", - "modifiers": [ - { - "when": "ai_literacy < 0.4", - "multiply": 1.05, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy >= 0.4 and ai_literacy < 0.7", - "multiply": 1.1, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy >= 0.7", - "multiply": 1.15, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness > 0.6", - "multiply": 1.08, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness <= 0.4", - "multiply": 0.95, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 1.12, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.3 and trust_in_institutions < 0.6", - "multiply": 1.06, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.6", - "multiply": 1.0, - "add": 0.03, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "asi_benefit_optimism", - "modifiers": [ - { - "when": "political_ideology == 'Very Liberal'", - "multiply": 0.9, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Liberal'", - "multiply": 0.95, - "add": -0.02, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate'", - "multiply": 1.0, - "add": 0.02, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Conservative'", - "multiply": 1.08, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Very Conservative'", - "multiply": 1.12, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.6", - "multiply": 1.1, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 0.85, - "add": -0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy >= 0.7", - "multiply": 1.12, - "add": 0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy < 0.35", - "multiply": 0.9, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "job_automation_risk_perception", - "modifiers": [ - { - "when": "knowledge_worker == True and tech_sector_employment == False", - "multiply": 1.25, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "knowledge_worker == True and tech_sector_employment == True", - "multiply": 1.35, - "add": 0.2, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "knowledge_worker == False and tech_sector_employment == False", - "multiply": 1.1, - "add": 0.1, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "knowledge_worker == False and tech_sector_employment == True", - "multiply": 1.2, - "add": 0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level in ['Less than HS', 'HS Diploma'] and knowledge_worker == False", - "multiply": 1.08, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "education_level == 'Graduate Degree' and knowledge_worker == True", - "multiply": 1.3, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "asi_adoption_eagerness", - "modifiers": [ - { - "when": "ai_literacy >= 0.7 and openness > 0.6", - "multiply": 1.3, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy >= 0.7 and openness <= 0.6", - "multiply": 1.18, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy >= 0.4 and ai_literacy < 0.7 and openness > 0.5", - "multiply": 1.1, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "ai_literacy < 0.4", - "multiply": 0.8, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age < 30", - "multiply": 1.18, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 30 and age < 50", - "multiply": 1.08, - "add": 0.03, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 50 and age < 65", - "multiply": 0.92, - "add": -0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "age >= 65", - "multiply": 0.72, - "add": -0.1, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "regulatory_intervention_support", - "modifiers": [ - { - "when": "political_ideology == 'Very Liberal'", - "multiply": 1.2, - "add": 0.14, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Liberal'", - "multiply": 1.12, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Moderate'", - "multiply": 1.08, - "add": 0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Conservative'", - "multiply": 0.92, - "add": -0.02, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "political_ideology == 'Very Conservative'", - "multiply": 0.82, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "asi_existential_risk_belief > 0.6", - "multiply": 1.18, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "asi_existential_risk_belief >= 0.3 and asi_existential_risk_belief <= 0.6", - "multiply": 1.08, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "asi_existential_risk_belief < 0.3", - "multiply": 0.9, - "add": -0.03, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions >= 0.6", - "multiply": 1.1, - "add": 0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 0.88, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "information_network_centrality", - "modifiers": [ - { - "when": "extraversion > 0.7 and social_media_hours_per_day > 3.0", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.03, - "Peripheral": 0.18, - "Connected": 0.42, - "Hub": 0.37 - }, - "probability_override": null - }, - { - "when": "extraversion > 0.7 and social_media_hours_per_day <= 3.0", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.05, - "Peripheral": 0.28, - "Connected": 0.45, - "Hub": 0.22 - }, - "probability_override": null - }, - { - "when": "extraversion >= 0.4 and extraversion <= 0.7 and social_media_hours_per_day > 2.0", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.08, - "Peripheral": 0.3, - "Connected": 0.45, - "Hub": 0.17 - }, - "probability_override": null - }, - { - "when": "extraversion >= 0.4 and extraversion <= 0.7 and social_media_hours_per_day <= 2.0", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.15, - "Peripheral": 0.42, - "Connected": 0.33, - "Hub": 0.1 - }, - "probability_override": null - }, - { - "when": "extraversion < 0.4 and social_media_hours_per_day <= 1.5", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.4, - "Peripheral": 0.42, - "Connected": 0.15, - "Hub": 0.03 - }, - "probability_override": null - }, - { - "when": "extraversion < 0.4 and social_media_hours_per_day > 1.5", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.22, - "Peripheral": 0.45, - "Connected": 0.28, - "Hub": 0.05 - }, - "probability_override": null - }, - { - "when": "civic_engagement == 'Actively volunteers or campaigns'", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.03, - "Peripheral": 0.18, - "Connected": 0.42, - "Hub": 0.37 - }, - "probability_override": null - }, - { - "when": "civic_engagement == 'Rarely/Never votes'", - "multiply": null, - "add": null, - "weight_overrides": { - "Isolated": 0.35, - "Peripheral": 0.4, - "Connected": 0.2, - "Hub": 0.05 - }, - "probability_override": null - } - ] - }, - { - "name": "economic_precarity", - "modifiers": [ - { - "when": "household_income < 30000 and homeownership == False", - "multiply": 1.3, - "add": 0.2, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "household_income >= 30000 and household_income < 55000 and homeownership == False", - "multiply": 1.15, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "household_income >= 55000 and household_income < 90000 and homeownership == True", - "multiply": 0.9, - "add": -0.05, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "household_income >= 90000 and homeownership == True", - "multiply": 0.65, - "add": -0.15, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Unemployed'", - "multiply": 1.25, - "add": 0.18, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Part-time'", - "multiply": 1.12, - "add": 0.08, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Retired' and homeownership == True", - "multiply": 0.75, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "employment_status == 'Full-time' and homeownership == True and household_income >= 75000", - "multiply": 0.7, - "add": -0.14, - "weight_overrides": null, - "probability_override": null - } - ] - }, - { - "name": "institutional_change_tolerance", - "modifiers": [ - { - "when": "openness > 0.7 and political_ideology in ['Very Liberal', 'Liberal']", - "multiply": 1.25, - "add": 0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness > 0.7 and political_ideology in ['Conservative', 'Very Conservative']", - "multiply": 1.1, - "add": 0.04, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness >= 0.4 and openness <= 0.7 and political_ideology == 'Moderate'", - "multiply": 1.05, - "add": 0.03, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.4 and political_ideology in ['Conservative', 'Very Conservative']", - "multiply": 0.72, - "add": -0.12, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "openness < 0.4 and political_ideology in ['Very Liberal', 'Liberal']", - "multiply": 0.85, - "add": -0.06, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "conscientiousness > 0.7 and openness < 0.5", - "multiply": 0.82, - "add": -0.09, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "conscientiousness <= 0.4 and openness > 0.6", - "multiply": 1.15, - "add": 0.07, - "weight_overrides": null, - "probability_override": null - }, - { - "when": "conscientiousness > 0.6 and openness > 0.6 and political_ideology in ['Very Liberal', 'Liberal', 'Moderate']", - "multiply": 1.12, - "add": 0.06, - "weight_overrides": null, - "probability_override": null - } - ] - } - ] - }, - "name": "conditional_modifiers_hydration", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 93146, - "output_tokens": 8215, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.pewresearch.org/internet/2025/04/03/views-of-risks-opportunities-and-regulation-of-ai/", - "https://arxiv.org/html/2505.08841", - "https://futureoflife.org/recent-news/americans-want-regulation-or-prohibition-of-superhuman-ai/", - "https://www.ey.com/en_gl/newsroom/2024/12/new-ey-survey-reveals-crucial-ai-literacy-training-needs-among-gen-z-workforce", - "https://www.frontiersin.org/journals/communication/articles/10.3389/fcomm.2024.1478476/full", - "https://www.deloitte.com/us/en/insights/topics/economy/spotlight/tech-workforce-expanding.html", - "https://www.rand.org/pubs/commentary/2025/05/could-ai-really-kill-off-humans.html", - "https://www.nature.com/articles/s41599-025-04583-8", - "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2024/", - "https://today.yougov.com/politics/articles/52615-americans-increasingly-likely-say-ai-artificial-intelligence-negatively-affect-society-poll", - "https://news.gallup.com/poll/695297/american-views-national-security-charts.aspx", - "https://thebulletin.org/premium/2025-12/stopping-the-clock-on-catastrophic-ai-risk/", - "https://theconversation.com/does-ai-pose-an-existential-risk-we-asked-5-experts-266345", - "https://www.brookings.edu/articles/what-the-public-thinks-about-ai-and-the-implications-for-governance/", - "https://www.pewresearch.org/internet/2025/04/03/how-the-us-public-and-ai-experts-view-artificial-intelligence/", - "https://www.euronews.com/next/2025/11/18/ai-poses-existential-threat-to-polling-mimicking-human-responses-almost-perfectly-study-fi", - "https://studyfinds.org/the-ai-scam-that-could-threaten-public-opinion-research/", - "https://programs.com/resources/ai-education-statistics/", - "https://www.comptia.org/en-us/resources/research/state-of-the-tech-workforce-2025/", - "https://www.comptia.org/en-us/about-us/news/press-releases/tech-hiring-activity-outpaces-expectations-comptia-tech-jobs-report-finds/", - "https://www.techtarget.com/whatis/feature/Tech-job-market-statistics-and-outlook", - "https://datainnovation.org/2024/05/americans-divided-on-whether-ai-will-make-things-better-or-worse-new-survey-finds/", - "https://literacytrust.org.uk/research-services/research-reports/children-young-people-and-teachers-use-of-generative-ai-to-support-literacy-in-2024/", - "https://hai.stanford.edu/ai-index/2025-ai-index-report/public-opinion", - "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/04/pi_2025.04.03_us-public-and-ai-experts_report.pdf", - "https://www.comptia.org/en-us/about-us/news/press-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets/", - "https://ailiteracy.institute/ai-literacy-review-march-11-2025/", - "https://www.statista.com/topics/5275/employment-in-the-it-industry/", - "https://www.digitaleducationcouncil.com/post/digital-education-council-global-ai-student-survey-2024", - "https://www.prnewswire.com/news-releases/comptia-state-of-the-tech-workforce-2025-provides-comprehensive-review-of-key-metrics-for-nation-states-and-metropolitan-markets-302495144.html", - "https://www.prnewswire.com/news-releases/comptia-releases-state-of-the-tech-workforce-2024-detailing-growth-projections-across-the-nation-states-and-metro-areas-302106642.html", - "https://en.wikipedia.org/wiki/Existential_risk_from_artificial_intelligence", - "https://www.statista.com/statistics/1403635/united-states-net-sector-employment/", - "https://futureoflife.org/ai-safety-index-summer-2025/", - "https://poll.qu.edu/poll-release?releaseid=3923", - "https://link.springer.com/article/10.1007/s11528-025-01109-6", - "https://www.engageli.com/blog/ai-in-education-statistics", - "https://ailiteracy.institute/gender-and-age-gaps-in-generative-ai/" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_221300_139265_claude_agentic_research.json b/examples/logs/20260217_221300_139265_claude_agentic_research.json deleted file mode 100644 index 9d40634..0000000 --- a/examples/logs/20260217_221300_139265_claude_agentic_research.json +++ /dev/null @@ -1,854 +0,0 @@ -{ - "timestamp": "2026-02-17T22:13:00.139286", - "function": "agentic_research", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8165 - }, - "response": { - "id": "msg_01JDQhvaX1KxPaJvcbLk1ssp", - "content": [ - { - "id": "srvtoolu_013ggnQTo6Ev5Z2g5BAXpvVn", - "input": { - "query": "US household composition by age group Census 2023 2024" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01NfgkqJRXDLFqPaX1qyEYbW", - "input": { - "query": "US interracial marriage same-race partner rates by ethnicity statistics" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "id": "srvtoolu_01NxFAjZ25LaUL5CKyzu4THu", - "input": { - "query": "assortative mating education religion income correlation US couples" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=412]", - "page_age": null, - "title": "Family Households by Age of Householder: 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/visualizations/interactive/family-households-by-age-of-householder-2024.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2668]", - "page_age": null, - "title": "Age and Sex Composition in the United States: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3332]", - "page_age": null, - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3112]", - "page_age": null, - "title": "National Population by Characteristics: 2020-2025", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2992]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2724]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4992]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1280]", - "page_age": null, - "title": "2023 Population Estimates by Age and Sex", - "type": "web_search_result", - "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" - } - ], - "tool_use_id": "srvtoolu_013ggnQTo6Ev5Z2g5BAXpvVn", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=6964]", - "page_age": "January 5, 2026", - "title": "Interracial marriage in the United States - Wikipedia", - "type": "web_search_result", - "url": "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5868]", - "page_age": "April 14, 2024", - "title": "Trends and patterns in intermarriage | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3012]", - "page_age": null, - "title": "Race, Ethnicity and Marriage in the United States", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2018/07/interracial-marriages.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5336]", - "page_age": null, - "title": "Most Americans Marry Within Their Race | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/most-americans-marry-within-their-race/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5384]", - "page_age": "April 14, 2024", - "title": "Intermarriage in the U.S. 50 Years After Loving v. Virginia | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6484]", - "page_age": null, - "title": "Marital Dissolution Among Interracial Couples - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2868]", - "page_age": "October 13, 2023", - "title": "growth in interracial marriage, 1980 vs 2021 - Working Immigrants", - "type": "web_search_result", - "url": "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2960]", - "page_age": "June 12, 2025", - "title": "BLACK MARRIAGE - BlackDemographics.com", - "type": "web_search_result", - "url": "https://blackdemographics.com/households/marriage-in-black-america/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5616]", - "page_age": "May 19, 2025", - "title": "13 Interracial Dating Statistics & Studies (2026)", - "type": "web_search_result", - "url": "https://www.datingadvice.com/studies/interracial-dating-statistics" - }, - { - "encrypted_content": "[REDACTED_TEXT length=372]", - "page_age": null, - "title": "The Growing Racial and Ethnic Divide in U.S. Marriage Patterns", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4850739/" - } - ], - "tool_use_id": "srvtoolu_01NfgkqJRXDLFqPaX1qyEYbW", - "type": "web_search_tool_result" - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=5752]", - "page_age": null, - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3568]", - "page_age": null, - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4176]", - "page_age": "April 14, 2024", - "title": "New academic study links rising income inequality to \u2018assortative mating\u2019 | Pew Research Center", - "type": "web_search_result", - "url": "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6448]", - "page_age": null, - "title": "Assortative Mating, Intergenerational Mobility, and Educational Inequality", - "type": "web_search_result", - "url": "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5824]", - "page_age": null, - "title": "Full article: Assortative mating, marital stability and the role of business cycles in the United States from 1968 to 2011", - "type": "web_search_result", - "url": "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5468]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income ...", - "type": "web_search_result", - "url": "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6396]", - "page_age": "October 1, 2024", - "title": "Eight Decades of Educational Assortative Mating: A Research Note | Demography | Duke University Press", - "type": "web_search_result", - "url": "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5856]", - "page_age": null, - "title": "Eight Decades of Educational Assortative Mating: A Research Note - PMC", - "type": "web_search_result", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=6520]", - "page_age": "February 10, 2015", - "title": "Income inequality and educational assortative mating: Evidence from the Luxembourg Income Study - ScienceDirect", - "type": "web_search_result", - "url": "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514" - }, - { - "encrypted_content": "[REDACTED_TEXT length=4300]", - "page_age": null, - "title": "Educational Assortative Mating and Household Income Inequality | Journal of Political Economy: Vol 127, No 6", - "type": "web_search_result", - "url": "https://www.journals.uchicago.edu/doi/10.1086/702018" - } - ], - "tool_use_id": "srvtoolu_01NxFAjZ25LaUL5CKyzu4THu", - "type": "web_search_tool_result" - }, - { - "id": "srvtoolu_01SFvkk8GoJ7F8MAk4AfYqcv", - "input": { - "query": "US average household size 2023 Census single parent couple household type distribution by age" - }, - "name": "web_search", - "type": "server_tool_use", - "caller": { - "type": "direct" - } - }, - { - "content": [ - { - "encrypted_content": "[REDACTED_TEXT length=1532]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2023", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=2192]", - "page_age": null, - "title": "Historical Households Tables", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/time-series/demo/families/households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5724]", - "page_age": null, - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5272]", - "page_age": null, - "title": "Families and Households", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families/families-and-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5280]", - "page_age": null, - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5352]", - "page_age": null, - "title": "America\u2019s Families and Living Arrangements: 2022", - "type": "web_search_result", - "url": "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5108]", - "page_age": null, - "title": "Families and Living Arrangements", - "type": "web_search_result", - "url": "https://www.census.gov/topics/families.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=1364]", - "page_age": null, - "title": "America?s Families and Living Arrangements: 2020", - "type": "web_search_result", - "url": "https://www.census.gov/data/tables/2020/demo/families/cps-2020.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=3828]", - "page_age": null, - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - }, - { - "encrypted_content": "[REDACTED_TEXT length=5372]", - "page_age": null, - "title": "Average family size in the U.S. 1960-2023| Statista", - "type": "web_search_result", - "url": "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/" - } - ], - "tool_use_id": "srvtoolu_01SFvkk8GoJ7F8MAk4AfYqcv", - "type": "web_search_tool_result" - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=215]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=65]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFlrayZWj8pdZ3e7URoMenwmSXdXzUGcbV7UIjB+Dm1J9GyPY0fE362w9BJUIy4XjrtDqHYRQHdhcfFzVYhPl3uJW3AFkEp9AwKOVpgqFIKyC5qxU5nnM2zcQhcC2mcXpAQ/GAQ=", - "title": "Average size of households in the U.S. 2023 | Statista", - "type": "web_search_result_location", - "url": "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/" - } - ], - "text": "[REDACTED_TEXT length=64]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpMBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIJ1KKdxFJHmdcIKfxoMeldfbR6W6sh+PByCIjCmK02NJ+rsCR109gPeOmHexCLNf3imUUMrWV8VxUcGooUIi+hpz1/oR4CtAre0H98qFxWbgBdowmmt3DmnYtt0JYx3lcfA3AbX...[truncated]", - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - } - ], - "text": "[REDACTED_TEXT length=146]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDArmqUXsdbwnebookRoM8F9TE1pyOiNOVsI/IjB27PPvVD4JwRz2z8N2ry+YlnWEgl/AEuvxlpwRpkN+FK42yyx1Q2Fy17HxubKmiC0qFEU7cqEk4rIHpu9ddBfAIR7dCVR7GAQ=", - "title": "Four in Five Family Households With a Householder Ages 35-39 Included a Child Under 18 in 2024", - "type": "web_search_result_location", - "url": "https://www.census.gov/library/stories/2024/11/family-households.html" - } - ], - "text": "[REDACTED_TEXT length=76]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDC12eps4gpHATrKtmBoMHwCWntvOSBAOm4h7IjC8XrspGItL1U09xovcsgv1guowxamJxIY657Y/pBka7OjJmrrNuohD0UM2ckIjCB0qFEbazVmx7yzXFjmBfK98wHWiYsRmGAQ=", - "title": "Most Americans Marry Within Their Race | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/most-americans-marry-within-their-race/" - } - ], - "text": "[REDACTED_TEXT length=102]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOdgJXFK7x9mjmK7MxoM0XJfmjDh/YNuYPrpIjDpwQzReq+7AEXNRCJPhjCycw01saJdDCpDzn26zye3biVBJu5vkcoLQyiE+fE1WQQqFaIH91xoDC2PBjkn/qavDW0BTOuLzxgE", - "title": "BLACK MARRIAGE - BlackDemographics.com", - "type": "web_search_result_location", - "url": "https://blackdemographics.com/households/marriage-in-black-america/" - } - ], - "text": "[REDACTED_TEXT length=71]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDNbgkbG2GqhhKQeKJBoMFO+F2EmxLVSO3H+8IjBqRnnwZncHMnAY/5dmtmnJOIXeGoDfgoQGZa7jJ1EAezkBZXGkSX063A1Eh4k9VlkqFJ8bXP65M9q0CXMt6SVDZIhxlJiRGAQ=", - "title": "13 Interracial Dating Statistics & Studies (2026)", - "type": "web_search_result_location", - "url": "https://www.datingadvice.com/studies/interracial-dating-statistics" - } - ], - "text": "[REDACTED_TEXT length=112]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=114]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDPq5lNc0oDJ7TYydNBoMIFsQdT4Fbbt6h4BFIjDs95a2Hp40m33M1XlktAX3GRurCyAqjx5G3+lVe6kahsqe8hLbFRJYoWYP+hvMFGwqFPFYn7xsfrp5m5uVDxReuyjf/MByGAQ=", - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result_location", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - }, - { - "cited_text": "[REDACTED_TEXT length=121]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDK+EceXp+z9f9pnj9RoMex3Hb7SPxHukUJAkIjCMEPEAhsiecCKEHsh0rDLCXC4HOn/lkTPP+SU4rkGNjf+Hy1v9PJ89vigDwzipnU4qFM3YDh04BpL/Tp6fWZ+3zrc7Qz/LGAQ=", - "title": "Assortative Mating and Income Inequality | NBER", - "type": "web_search_result_location", - "url": "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality" - } - ], - "text": "[REDACTED_TEXT length=192]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFF7B9q9LHJ3ifSQTBoM7vKzSmcRW44XuDqbIjAs/f/ybwdRJcTx5n2IICT6Y4QJy9I4PLTGERsprGh0tDoKOGsWdNzwC8z+PyFWl4MqFGVQtLlLh6lU6RtNP0eP/Vbw0dJMGAQ=", - "title": "Religion, Marriage Markets, and Assortative Mating in the United States - PMC", - "type": "web_search_result_location", - "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/" - } - ], - "text": "[REDACTED_TEXT length=163]", - "type": "text", - "parsed_output": null - }, - { - "citations": null, - "text": "[REDACTED_TEXT length=3]", - "type": "text", - "parsed_output": null - }, - { - "citations": [ - { - "cited_text": "[REDACTED_TEXT length=153]", - "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDOG3ygJfZh5aQODOthoMjpT96oDaaNbrEJJ3IjCWHIDJBzI7/dNJCvfMuxs8in4n4p/GfdLWXoEe+sm9MyFbdaWk0v46AhaddE0ChZcqFE6YBdJfAYV2LatJXfWcI09OguVxGAQ=", - "title": "U.S. Household Composition Shifts as the Population Grows Older; More Young Adults Live With Parents | PRB", - "type": "web_search_result_location", - "url": "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/" - } - ], - "text": "[REDACTED_TEXT length=82]", - "type": "text", - "parsed_output": null - }, - { - "id": "toolu_016GaJwW4yM88qnSzwcutGqK", - "input": { - "age_brackets": [ - { - "upper_bound": 30, - "label": "18-29" - }, - { - "upper_bound": 45, - "label": "30-44" - }, - { - "upper_bound": 65, - "label": "45-64" - }, - { - "upper_bound": 999, - "label": "65+" - } - ], - "household_type_weights": [ - { - "bracket": "18-29", - "types": [ - { - "type": "single", - "weight": 0.48 - }, - { - "type": "couple", - "weight": 0.22 - }, - { - "type": "single_parent", - "weight": 0.1 - }, - { - "type": "couple_with_kids", - "weight": 0.12 - }, - { - "type": "multi_generational", - "weight": 0.08 - } - ] - }, - { - "bracket": "30-44", - "types": [ - { - "type": "single", - "weight": 0.18 - }, - { - "type": "couple", - "weight": 0.22 - }, - { - "type": "single_parent", - "weight": 0.13 - }, - { - "type": "couple_with_kids", - "weight": 0.4 - }, - { - "type": "multi_generational", - "weight": 0.07 - } - ] - }, - { - "bracket": "45-64", - "types": [ - { - "type": "single", - "weight": 0.25 - }, - { - "type": "couple", - "weight": 0.42 - }, - { - "type": "single_parent", - "weight": 0.09 - }, - { - "type": "couple_with_kids", - "weight": 0.16 - }, - { - "type": "multi_generational", - "weight": 0.08 - } - ] - }, - { - "bracket": "65+", - "types": [ - { - "type": "single", - "weight": 0.38 - }, - { - "type": "couple", - "weight": 0.5 - }, - { - "type": "single_parent", - "weight": 0.02 - }, - { - "type": "couple_with_kids", - "weight": 0.02 - }, - { - "type": "multi_generational", - "weight": 0.08 - } - ] - } - ], - "same_group_rates": [ - { - "group": "white", - "rate": 0.91 - }, - { - "group": "black", - "rate": 0.85 - }, - { - "group": "hispanic", - "rate": 0.74 - }, - { - "group": "asian", - "rate": 0.69 - }, - { - "group": "native_american", - "rate": 0.58 - }, - { - "group": "multiracial", - "rate": 0.4 - } - ], - "default_same_group_rate": 0.72, - "assortative_mating": [ - { - "attribute": "education_level", - "correlation": 0.65 - }, - { - "attribute": "income_level", - "correlation": 0.58 - }, - { - "attribute": "religious_affiliation", - "correlation": 0.55 - }, - { - "attribute": "political_affiliation", - "correlation": 0.7 - }, - { - "attribute": "race_ethnicity", - "correlation": 0.85 - }, - { - "attribute": "age", - "correlation": 0.75 - }, - { - "attribute": "personality_openness", - "correlation": 0.22 - }, - { - "attribute": "media_consumption_type", - "correlation": 0.5 - }, - { - "attribute": "social_media_usage", - "correlation": 0.35 - } - ], - "partner_age_gap_mean": -2.3, - "partner_age_gap_std": 4.5, - "min_adult_age": 18, - "child_min_parent_offset": 18, - "child_max_parent_offset": 45, - "max_dependent_child_age": 17, - "elderly_min_offset": 20, - "elderly_max_offset": 45, - "life_stages": [ - { - "max_age": 5, - "label": "preschool" - }, - { - "max_age": 11, - "label": "elementary" - }, - { - "max_age": 14, - "label": "middle_school" - }, - { - "max_age": 18, - "label": "high_school" - } - ], - "adult_stage_label": "adult", - "avg_household_size": 2.51, - "sources": [ - "U.S. Census Bureau, America's Families and Living Arrangements: 2023 \u2014 https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "U.S. Census Bureau, Family Households by Age of Householder: 2024 \u2014 https://www.census.gov/library/stories/2024/11/family-households.html", - "U.S. Census Bureau, Historical Households Tables (HH-2 through HH-7): 1960\u20132023 \u2014 https://www.census.gov/data/tables/time-series/demo/families/households.html", - "U.S. Census Bureau, Age and Sex Composition: 2023 \u2014 https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "Statista / U.S. Census Bureau, Average Household Size 2023 \u2014 https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "Pew Research Center, Intermarriage in the U.S. 50 Years After Loving v. Virginia (2017) \u2014 https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia...[truncated]", - "Pew Research Center, Trends and Patterns in Intermarriage (2017) \u2014 https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "BlackDemographics.com, Marriage in Black America (Census ACS 2023) \u2014 https://blackdemographics.com/households/marriage-in-black-america/", - "Wikipedia, Interracial Marriage in the United States \u2014 https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "Population Reference Bureau (PRB), Most Americans Marry Within Their Race \u2014 https://www.prb.org/resources/most-americans-marry-within-their-race/", - "PRB, U.S. Household Composition Shifts \u2014 https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "NBER Digest, Assortative Mating and Income Inequality (Greenwood et al.) \u2014 https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "Pew Research Center, New Academic Study Links Rising Income Inequality to Assortative Mating (2014) \u2014 https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequali...[truncated]", - "PMC / NIH, Religion, Marriage Markets, and Assortative Mating in the United States \u2014 https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "Demography / Duke University Press, Eight Decades of Educational Assortative Mating (2024) \u2014 https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Ma...[truncated]", - "PMC / NIH, Eight Decades of Educational Assortative Mating \u2014 https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/", - "PMC / NIH, Marital Dissolution Among Interracial Couples \u2014 https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/", - "Tandfonline, Assortative Mating, Marital Stability, and Business Cycles in the U.S. 1968\u20132011 \u2014 https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909", - "New York Fed Staff Report, Educational Assortative Mating and Household Income \u2014 https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf", - "DatingAdvice.com, Interracial Dating Statistics 2026 \u2014 https://www.datingadvice.com/studies/interracial-dating-statistics", - "Working Immigrants, Growth in Interracial Marriage 1980 vs 2021 \u2014 https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/", - "U.S. Census Bureau, Race, Ethnicity and Marriage in the United States (2018) \u2014 https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "UCLA CCPR, Assortative Mating, Intergenerational Mobility, and Educational Inequality \u2014 https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational...[truncated]" - ] - }, - "name": "household_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 104972, - "output_tokens": 3277, - "server_tool_use": { - "web_search_requests": 4, - "web_fetch_requests": 0 - }, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [ - "https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/", - "https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf", - "https://www.prb.org/resources/most-americans-marry-within-their-race/", - "https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/", - "https://www.census.gov/data/tables/2023/demo/families/cps-2023.html", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/", - "https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html", - "https://www.census.gov/topics/families/families-and-households.html", - "https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/", - "https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909", - "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", - "https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/", - "https://www.census.gov/data/tables/time-series/demo/families/households.html", - "https://www.census.gov/library/stories/2018/07/interracial-marriages.html", - "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html", - "https://www2.census.gov/library/publications/2024/demo/p20-587.pdf", - "https://www.census.gov/topics/families.html", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC4850739/", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/", - "https://www.census.gov/library/stories/2024/11/family-households.html", - "https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/", - "https://www.sciencedirect.com/science/article/abs/pii/S0049089X15000514", - "https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf", - "https://www.census.gov/library/visualizations/interactive/family-households-by-age-of-householder-2024.html", - "https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/", - "https://www.census.gov/data/tables/2020/demo/families/cps-2020.html", - "https://blackdemographics.com/households/marriage-in-black-america/", - "https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States", - "https://www.journals.uchicago.edu/doi/10.1086/702018", - "https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/", - "https://www.nber.org/digest/may14/assortative-mating-and-income-inequality", - "https://www.datingadvice.com/studies/interracial-dating-statistics", - "https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/", - "https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A" - ] -} \ No newline at end of file diff --git a/examples/logs/20260217_221325_300365_claude_reasoning_call.json b/examples/logs/20260217_221325_300365_claude_reasoning_call.json deleted file mode 100644 index ff59614..0000000 --- a/examples/logs/20260217_221325_300365_claude_reasoning_call.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "timestamp": "2026-02-17T22:13:25.300418", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8995 - }, - "response": { - "id": "msg_01F34Fxjysa5o8e9eH25wdGz", - "content": [ - { - "id": "toolu_015ZMjDGAnKBVzZ43kvbAacq", - "input": { - "event_type": "announcement", - "content": "[REDACTED_TEXT length=4552]", - "source": "OpenAI (with independent confirmation from Anthropic, DeepMind, xAI, and China's Ministry of Science and Technology)", - "credibility": 0.85, - "ambiguity": 0.55, - "emotional_valence": 0.75, - "reasoning": "[REDACTED_TEXT length=2053]" - }, - "name": "event_parsing", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3031, - "output_tokens": 1588, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_221406_163294_claude_reasoning_call.json b/examples/logs/20260217_221406_163294_claude_reasoning_call.json deleted file mode 100644 index 52dd034..0000000 --- a/examples/logs/20260217_221406_163294_claude_reasoning_call.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "timestamp": "2026-02-17T22:14:06.163347", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 12280 - }, - "response": { - "id": "msg_01NVk9ZYwkpPriQXGqMrT8ow", - "content": [ - { - "id": "toolu_014Z2T6Y8z8F4eyR2YVPJAxP", - "input": { - "channels": [ - { - "name": "major_tv_and_online_news", - "description": "Breaking news coverage across major television networks (CNN, Fox News, NBC, ABC, CBS, MSNBC) and top online news sites (NYT, WaPo, AP, Reuters). This is an unprecedented story that dominates all news...[truncated]", - "reach": "broadcast", - "credibility_modifier": 1.1 - }, - { - "name": "social_media_viral_spread", - "description": "Viral sharing across Twitter/X, Facebook, YouTube, TikTok, and Instagram. Includes hot takes, reaction videos, meme formats, and both credulous and skeptical posts. The extraordinary nature of the cla...[truncated]", - "reach": "organic", - "credibility_modifier": 0.8 - }, - { - "name": "tech_and_science_professional_networks", - "description": "Targeted dissemination through professional channels \u2014 LinkedIn posts, Slack communities, academic mailing lists, Hacker News, arXiv discussion threads, and tech-industry newsletters reaching STEM pro...[truncated]", - "reach": "targeted", - "credibility_modifier": 1.2 - }, - { - "name": "word_of_mouth_interpersonal", - "description": "Person-to-person spread through friend, family, and colleague network edges. Conversations at work, family calls, texts between friends. The emotional magnitude of the event makes it a dominant topic ...[truncated]", - "reach": "organic", - "credibility_modifier": 0.95 - }, - { - "name": "alternative_and_partisan_media", - "description": "Coverage by podcasts, Substack newsletters, talk radio, and ideologically-aligned outlets. Framing varies widely \u2014 from utopian enthusiasm to deep skepticism or conspiratorial spin \u2014 depending on outl...[truncated]", - "reach": "targeted", - "credibility_modifier": 0.75 - } - ], - "rules": [ - { - "channel": "major_tv_and_online_news", - "when": "primary_news_source in ('TV', 'Online/Digital') and internet_access in ('Broadband', 'Mobile Only')", - "probability": 0.95, - "timestep": 0 - }, - { - "channel": "tech_and_science_professional_networks", - "when": "occupation in ('Professional', 'Management') and education_level in ('Bachelor's', 'Graduate Degree')", - "probability": 0.9, - "timestep": 0 - }, - { - "channel": "social_media_viral_spread", - "when": "social_media_platforms in ('Twitter/X', 'YouTube') and social_media_hours_per_day > 1.5", - "probability": 0.88, - "timestep": 0 - }, - { - "channel": "major_tv_and_online_news", - "when": "primary_news_source in ('Radio', 'Print Newspaper', 'Social Media')", - "probability": 0.85, - "timestep": 1 - }, - { - "channel": "social_media_viral_spread", - "when": "social_media_platforms in ('Facebook', 'Instagram', 'TikTok') and social_media_hours_per_day > 0.5", - "probability": 0.82, - "timestep": 1 - }, - { - "channel": "alternative_and_partisan_media", - "when": "news_outlet_lean in ('Right-leaning', 'Left-leaning') and primary_news_source in ('Online/Digital', 'Social Media', 'Radio')", - "probability": 0.75, - "timestep": 1 - }, - { - "channel": "word_of_mouth_interpersonal", - "when": "extraversion > 0.5 and employment_status in ('Full-time', 'Part-time', 'Self-employed')", - "probability": 0.7, - "timestep": 2 - }, - { - "channel": "word_of_mouth_interpersonal", - "when": "agreeableness > 0.55 and marital_status in ('Married', 'Domestic Partnership')", - "probability": 0.65, - "timestep": 2 - }, - { - "channel": "major_tv_and_online_news", - "when": "primary_news_source == 'None' and internet_access != 'None'", - "probability": 0.6, - "timestep": 2 - }, - { - "channel": "social_media_viral_spread", - "when": "age < 35 and social_media_platforms != 'None/Minimal'", - "probability": 0.78, - "timestep": 2 - }, - { - "channel": "alternative_and_partisan_media", - "when": "trust_in_institutions < 0.4 and primary_news_source in ('Online/Digital', 'Social Media')", - "probability": 0.72, - "timestep": 2 - }, - { - "channel": "word_of_mouth_interpersonal", - "when": "has_children == true", - "probability": 0.6, - "timestep": 3 - }, - { - "channel": "word_of_mouth_interpersonal", - "when": "urban_rural == 'Rural' and social_media_platforms == 'None/Minimal'", - "probability": 0.55, - "timestep": 3 - }, - { - "channel": "major_tv_and_online_news", - "when": "age > 60 and primary_news_source == 'TV'", - "probability": 0.9, - "timestep": 1 - }, - { - "channel": "alternative_and_partisan_media", - "when": "susceptibility_to_misinformation > 0.65 and trust_in_institutions < 0.5", - "probability": 0.68, - "timestep": 3 - } - ], - "reasoning": "[REDACTED_TEXT length=3916]" - }, - "name": "seed_exposure", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 3939, - "output_tokens": 2509, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_221437_984695_claude_reasoning_call.json b/examples/logs/20260217_221437_984695_claude_reasoning_call.json deleted file mode 100644 index 8abeb17..0000000 --- a/examples/logs/20260217_221437_984695_claude_reasoning_call.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "timestamp": "2026-02-17T22:14:37.984780", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 5106 - }, - "response": { - "id": "msg_01797mCz8ZxRShFfzBfskjy8", - "content": [ - { - "id": "toolu_01FoKo8ES6VWvzwSwz4d2tyQ", - "input": { - "primary_model": "broadcast_response", - "secondary_model": "direct_conversation", - "interaction_description": "An official, multi-source confirmed announcement of Artificial Superintelligence triggers a two-phase interaction pattern. Phase 1 (broadcast_response): Agents receive the announcement through their p...[truncated]", - "share_probability": 0.72, - "share_modifiers": [ - { - "when": "social_media_hours_per_day > 3.0", - "multiply": 1.5, - "add": 0 - }, - { - "when": "social_media_hours_per_day <= 1.0", - "multiply": 0.6, - "add": 0 - }, - { - "when": "age < 30", - "multiply": 1.35, - "add": 0 - }, - { - "when": "age >= 65", - "multiply": 0.75, - "add": 0 - }, - { - "when": "extraversion > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "openness > 0.7", - "multiply": 1.25, - "add": 0 - }, - { - "when": "neuroticism > 0.7", - "multiply": 1.2, - "add": 0 - }, - { - "when": "need_for_cognition > 0.7", - "multiply": 1.3, - "add": 0 - }, - { - "when": "susceptibility_to_misinformation > 0.6", - "multiply": 1.4, - "add": 0 - }, - { - "when": "trust_in_institutions < 0.3", - "multiply": 1.5, - "add": 0 - }, - { - "when": "trust_in_institutions > 0.7", - "multiply": 1.2, - "add": 0 - }, - { - "when": "education_level == 'graduate'", - "multiply": 1.3, - "add": 0 - }, - { - "when": "education_level == 'less_than_high_school'", - "multiply": 0.7, - "add": 0 - }, - { - "when": "occupation == 'tech'", - "multiply": 1.6, - "add": 0 - }, - { - "when": "occupation == 'researcher'", - "multiply": 1.5, - "add": 0 - }, - { - "when": "occupation == 'educator'", - "multiply": 1.35, - "add": 0 - }, - { - "when": "primary_news_source == 'social_media'", - "multiply": 1.45, - "add": 0 - }, - { - "when": "primary_news_source == 'online_news'", - "multiply": 1.25, - "add": 0 - }, - { - "when": "civic_engagement == 'high'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "political_ideology == 'very_liberal'", - "multiply": 1.15, - "add": 0 - }, - { - "when": "political_ideology == 'very_conservative'", - "multiply": 1.2, - "add": 0 - }, - { - "when": "religious_attendance == 'weekly'", - "multiply": 1.1, - "add": 0 - }, - { - "when": "internet_access == 'none'", - "multiply": 0.2, - "add": 0 - }, - { - "when": "internet_access == 'limited'", - "multiply": 0.55, - "add": 0 - }, - { - "when": "edge_type == 'family'", - "multiply": 1.4, - "add": 0 - }, - { - "when": "edge_type == 'friend'", - "multiply": 1.25, - "add": 0 - }, - { - "when": "edge_type == 'colleague'", - "multiply": 1.5, - "add": 0 - }, - { - "when": "has_children == true", - "multiply": 1.15, - "add": 0 - } - ], - "decay_per_hop": 0.08, - "max_hops": "null", - "reasoning": "[REDACTED_TEXT length=3295]" - }, - "name": "interaction_model", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2445, - "output_tokens": 1924, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_231737_021077_claude_reasoning_call.json b/examples/logs/20260217_231737_021077_claude_reasoning_call.json deleted file mode 100644 index 89a83a7..0000000 --- a/examples/logs/20260217_231737_021077_claude_reasoning_call.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "timestamp": "2026-02-17T23:17:37.021152", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 8313 - }, - "response": { - "id": "msg_01TCx6ewPXF7gb1NQr9RQaoy", - "content": [ - { - "id": "toolu_01W11HK5GmzoXPHXbmoMYGuL", - "input": { - "intro_template": "I'm a {age}-year-old {gender} living in {state}, identifying as {race_ethnicity}. I work {employment_status} in the {occupation} field and earn around ${household_income} a year \u2014 I {homeownership} my...[truncated]", - "attribute_treatments": [ - { - "attribute": "age", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "gender", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "state", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "race_ethnicity", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "urban_rural", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "education_level", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "marital_status", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "household_size", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "has_children", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "immigration_status", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "country", - "treatment": "concrete", - "group": "demographics" - }, - { - "attribute": "household_income", - "treatment": "concrete", - "group": "economic_profile" - }, - { - "attribute": "employment_status", - "treatment": "concrete", - "group": "economic_profile" - }, - { - "attribute": "occupation", - "treatment": "concrete", - "group": "economic_profile" - }, - { - "attribute": "homeownership", - "treatment": "concrete", - "group": "economic_profile" - }, - { - "attribute": "union_membership", - "treatment": "concrete", - "group": "economic_profile" - }, - { - "attribute": "health_insurance_type", - "treatment": "concrete", - "group": "economic_profile" - }, - { - "attribute": "financial_resilience", - "treatment": "relative", - "group": "economic_profile" - }, - { - "attribute": "economic_anxiety", - "treatment": "relative", - "group": "economic_profile" - }, - { - "attribute": "political_affiliation", - "treatment": "concrete", - "group": "political_identity" - }, - { - "attribute": "political_ideology", - "treatment": "concrete", - "group": "political_identity" - }, - { - "attribute": "civic_engagement", - "treatment": "concrete", - "group": "political_identity" - }, - { - "attribute": "trust_in_institutions", - "treatment": "relative", - "group": "political_identity" - }, - { - "attribute": "institutional_change_support", - "treatment": "relative", - "group": "political_identity" - }, - { - "attribute": "religious_affiliation", - "treatment": "concrete", - "group": "religion_and_values" - }, - { - "attribute": "religious_attendance", - "treatment": "concrete", - "group": "religion_and_values" - }, - { - "attribute": "social_cohesion_orientation", - "treatment": "relative", - "group": "religion_and_values" - }, - { - "attribute": "gun_ownership", - "treatment": "concrete", - "group": "religion_and_values" - }, - { - "attribute": "openness", - "treatment": "relative", - "group": "personality" - }, - { - "attribute": "conscientiousness", - "treatment": "relative", - "group": "personality" - }, - { - "attribute": "extraversion", - "treatment": "relative", - "group": "personality" - }, - { - "attribute": "agreeableness", - "treatment": "relative", - "group": "personality" - }, - { - "attribute": "neuroticism", - "treatment": "relative", - "group": "personality" - }, - { - "attribute": "need_for_cognition", - "treatment": "relative", - "group": "personality" - }, - { - "attribute": "primary_news_source", - "treatment": "concrete", - "group": "media_and_information" - }, - { - "attribute": "news_outlet_lean", - "treatment": "concrete", - "group": "media_and_information" - }, - { - "attribute": "social_media_platforms", - "treatment": "concrete", - "group": "media_and_information" - }, - { - "attribute": "social_media_hours_per_day", - "treatment": "concrete", - "group": "media_and_information" - }, - { - "attribute": "internet_access", - "treatment": "concrete", - "group": "media_and_information" - }, - { - "attribute": "susceptibility_to_misinformation", - "treatment": "relative", - "group": "media_and_information" - }, - { - "attribute": "information_verification_habit", - "treatment": "relative", - "group": "media_and_information" - }, - { - "attribute": "ai_literacy", - "treatment": "relative", - "group": "ai_and_tech_outlook" - }, - { - "attribute": "ai_risk_perception", - "treatment": "relative", - "group": "ai_and_tech_outlook" - }, - { - "attribute": "automation_job_vulnerability", - "treatment": "relative", - "group": "ai_and_tech_outlook" - }, - { - "attribute": "asi_adoption_willingness", - "treatment": "relative", - "group": "ai_and_tech_outlook" - }, - { - "attribute": "techno_optimism", - "treatment": "relative", - "group": "ai_and_tech_outlook" - }, - { - "attribute": "stem_background", - "treatment": "concrete", - "group": "ai_and_tech_outlook" - }, - { - "attribute": "chronic_illness_household", - "treatment": "concrete", - "group": "ai_and_tech_outlook" - } - ], - "groups": [ - { - "name": "demographics", - "label": "Who I Am", - "order": 1 - }, - { - "name": "economic_profile", - "label": "My Economic Life", - "order": 2 - }, - { - "name": "political_identity", - "label": "My Political Identity", - "order": 3 - }, - { - "name": "religion_and_values", - "label": "My Values & Beliefs", - "order": 4 - }, - { - "name": "personality", - "label": "My Personality", - "order": 5 - }, - { - "name": "media_and_information", - "label": "How I Get My News", - "order": 6 - }, - { - "name": "ai_and_tech_outlook", - "label": "My View on AI & Technology", - "order": 7 - } - ] - }, - "name": "persona_structure", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2907, - "output_tokens": 1596, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_231741_727124_claude_reasoning_call.json b/examples/logs/20260217_231741_727124_claude_reasoning_call.json deleted file mode 100644 index 82b222e..0000000 --- a/examples/logs/20260217_231741_727124_claude_reasoning_call.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "timestamp": "2026-02-17T23:17:41.727179", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 1304 - }, - "response": { - "id": "msg_01JXjy1meFfuc2NzNUXpAfbp", - "content": [ - { - "id": "toolu_017FSxjepsfFeynSG5BuhCpY", - "input": { - "phrasings": [ - { - "attribute": "has_children", - "true_phrase": "I have children under 18 living in my household.", - "false_phrase": "I don't have any children under 18 living in my household." - }, - { - "attribute": "homeownership", - "true_phrase": "I own my primary residence.", - "false_phrase": "I rent my primary residence." - }, - { - "attribute": "union_membership", - "true_phrase": "I am currently a member of a labor union.", - "false_phrase": "I am not currently a member of a labor union." - }, - { - "attribute": "gun_ownership", - "true_phrase": "My household contains at least one firearm.", - "false_phrase": "My household does not contain any firearms." - }, - { - "attribute": "chronic_illness_household", - "true_phrase": "Someone in my household lives with a serious chronic illness, such as cancer, Alzheimer's, ALS, or diabetes.", - "false_phrase": "No one in my household lives with a serious chronic illness such as cancer, Alzheimer's, ALS, or diabetes." - }, - { - "attribute": "stem_background", - "true_phrase": "My educational or occupational background is in a STEM field.", - "false_phrase": "My educational and occupational background is not in a STEM field." - } - ] - }, - "name": "boolean_phrasings", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1058, - "output_tokens": 387, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_231829_570826_claude_reasoning_call.json b/examples/logs/20260217_231829_570826_claude_reasoning_call.json deleted file mode 100644 index e22138f..0000000 --- a/examples/logs/20260217_231829_570826_claude_reasoning_call.json +++ /dev/null @@ -1,781 +0,0 @@ -{ - "timestamp": "2026-02-17T23:18:29.570880", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 5248 - }, - "response": { - "id": "msg_01KjungwymXZ1c1zo5di4j88", - "content": [ - { - "id": "toolu_017jYyJ2qbj2QhyfwKqu2gjx", - "input": { - "phrasings": [ - { - "attribute": "gender", - "option_phrases": [ - { - "option": "Male", - "phrase": "I identify as a man." - }, - { - "option": "Female", - "phrase": "I identify as a woman." - }, - { - "option": "Non-binary/Other", - "phrase": "My gender identity is non-binary or outside the traditional categories." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "state", - "option_phrases": [ - { - "option": "CA", - "phrase": "I live in California." - }, - { - "option": "TX", - "phrase": "I live in Texas." - }, - { - "option": "FL", - "phrase": "I live in Florida." - }, - { - "option": "NY", - "phrase": "I live in New York." - }, - { - "option": "PA", - "phrase": "I live in Pennsylvania." - }, - { - "option": "IL", - "phrase": "I live in Illinois." - }, - { - "option": "OH", - "phrase": "I live in Ohio." - }, - { - "option": "GA", - "phrase": "I live in Georgia." - }, - { - "option": "NC", - "phrase": "I live in North Carolina." - }, - { - "option": "MI", - "phrase": "I live in Michigan." - }, - { - "option": "NJ", - "phrase": "I live in New Jersey." - }, - { - "option": "VA", - "phrase": "I live in Virginia." - }, - { - "option": "WA", - "phrase": "I live in Washington state." - }, - { - "option": "AZ", - "phrase": "I live in Arizona." - }, - { - "option": "MA", - "phrase": "I live in Massachusetts." - }, - { - "option": "TN", - "phrase": "I live in Tennessee." - }, - { - "option": "IN", - "phrase": "I live in Indiana." - }, - { - "option": "MO", - "phrase": "I live in Missouri." - }, - { - "option": "MD", - "phrase": "I live in Maryland." - }, - { - "option": "WI", - "phrase": "I live in Wisconsin." - }, - { - "option": "CO", - "phrase": "I live in Colorado." - }, - { - "option": "MN", - "phrase": "I live in Minnesota." - }, - { - "option": "SC", - "phrase": "I live in South Carolina." - }, - { - "option": "AL", - "phrase": "I live in Alabama." - }, - { - "option": "LA", - "phrase": "I live in Louisiana." - }, - { - "option": "KY", - "phrase": "I live in Kentucky." - }, - { - "option": "OR", - "phrase": "I live in Oregon." - }, - { - "option": "OK", - "phrase": "I live in Oklahoma." - }, - { - "option": "CT", - "phrase": "I live in Connecticut." - }, - { - "option": "UT", - "phrase": "I live in Utah." - }, - { - "option": "IA", - "phrase": "I live in Iowa." - }, - { - "option": "NV", - "phrase": "I live in Nevada." - }, - { - "option": "AR", - "phrase": "I live in Arkansas." - }, - { - "option": "MS", - "phrase": "I live in Mississippi." - }, - { - "option": "KS", - "phrase": "I live in Kansas." - }, - { - "option": "NM", - "phrase": "I live in New Mexico." - }, - { - "option": "NE", - "phrase": "I live in Nebraska." - }, - { - "option": "WV", - "phrase": "I live in West Virginia." - }, - { - "option": "ID", - "phrase": "I live in Idaho." - }, - { - "option": "HI", - "phrase": "I live in Hawaii." - }, - { - "option": "NH", - "phrase": "I live in New Hampshire." - }, - { - "option": "ME", - "phrase": "I live in Maine." - }, - { - "option": "MT", - "phrase": "I live in Montana." - }, - { - "option": "RI", - "phrase": "I live in Rhode Island." - }, - { - "option": "DE", - "phrase": "I live in Delaware." - }, - { - "option": "SD", - "phrase": "I live in South Dakota." - }, - { - "option": "ND", - "phrase": "I live in North Dakota." - }, - { - "option": "AK", - "phrase": "I live in Alaska." - }, - { - "option": "VT", - "phrase": "I live in Vermont." - }, - { - "option": "WY", - "phrase": "I live in Wyoming." - }, - { - "option": "DC", - "phrase": "I live in Washington, D.C." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "race_ethnicity", - "option_phrases": [ - { - "option": "White non-Hispanic", - "phrase": "I identify as White, non-Hispanic." - }, - { - "option": "Hispanic", - "phrase": "I identify as Hispanic or Latino." - }, - { - "option": "Black non-Hispanic", - "phrase": "I identify as Black or African American." - }, - { - "option": "Asian non-Hispanic", - "phrase": "I identify as Asian or Asian American." - }, - { - "option": "Other/Multiracial", - "phrase": "My racial or ethnic background is multiracial or doesn't fit the standard categories." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "urban_rural", - "option_phrases": [ - { - "option": "Urban", - "phrase": "I live in a city or urban area." - }, - { - "option": "Suburban", - "phrase": "I live in the suburbs, outside a major city." - }, - { - "option": "Rural", - "phrase": "I live in a rural or small-town area." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "education_level", - "option_phrases": [ - { - "option": "Less than HS", - "phrase": "I didn't finish high school." - }, - { - "option": "HS Diploma", - "phrase": "My highest level of education is a high school diploma or GED." - }, - { - "option": "Some College", - "phrase": "I attended college but didn't complete a degree." - }, - { - "option": "Associate's", - "phrase": "I have an associate's degree from a two-year college." - }, - { - "option": "Bachelor's", - "phrase": "I have a four-year college degree." - }, - { - "option": "Graduate Degree", - "phrase": "I have a graduate or professional degree beyond a bachelor's." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "marital_status", - "option_phrases": [ - { - "option": "Single", - "phrase": "I'm currently single and have never been married." - }, - { - "option": "Married", - "phrase": "I'm married." - }, - { - "option": "Divorced", - "phrase": "I'm divorced." - }, - { - "option": "Widowed", - "phrase": "I'm widowed \u2014 I lost my spouse." - }, - { - "option": "Domestic Partnership", - "phrase": "I'm in a domestic partnership or living with a long-term partner." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "employment_status", - "option_phrases": [ - { - "option": "Full-time", - "phrase": "I work full-time." - }, - { - "option": "Part-time", - "phrase": "I work part-time." - }, - { - "option": "Self-employed", - "phrase": "I'm self-employed or run my own business." - }, - { - "option": "Unemployed", - "phrase": "I'm currently unemployed and looking for work." - }, - { - "option": "Retired", - "phrase": "I'm retired." - }, - { - "option": "Student", - "phrase": "I'm a student and my primary focus is school." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "occupation", - "option_phrases": [ - { - "option": "Management/Professional", - "phrase": "I work in a management or professional role \u2014 things like business, finance, law, healthcare, or tech." - }, - { - "option": "Service", - "phrase": "I work in a service occupation \u2014 like food service, healthcare support, or personal care." - }, - { - "option": "Sales/Office", - "phrase": "I work in sales or an office/administrative support role." - }, - { - "option": "Construction/Extraction", - "phrase": "I work in construction, the trades, or a related field." - }, - { - "option": "Production/Transport", - "phrase": "I work in production, manufacturing, or transportation." - }, - { - "option": "Other", - "phrase": "My work doesn't fit neatly into a standard occupational category." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "political_affiliation", - "option_phrases": [ - { - "option": "Strong Democrat", - "phrase": "I'm a strong Democrat and closely identify with the party." - }, - { - "option": "Lean Democrat", - "phrase": "I lean toward the Democratic Party, though I don't consider myself a strong partisan." - }, - { - "option": "Independent", - "phrase": "I consider myself a political independent and don't lean strongly toward either party." - }, - { - "option": "Lean Republican", - "phrase": "I lean toward the Republican Party, though I don't consider myself a strong partisan." - }, - { - "option": "Strong Republican", - "phrase": "I'm a strong Republican and closely identify with the party." - } - ], - "null_options": [ - "Independent" - ], - "null_phrase": "I don't strongly identify with either major party \u2014 I think of myself as an independent." - }, - { - "attribute": "political_ideology", - "option_phrases": [ - { - "option": "Very Liberal", - "phrase": "Politically, I'd describe myself as very liberal." - }, - { - "option": "Liberal", - "phrase": "Politically, I'd describe myself as liberal." - }, - { - "option": "Moderate", - "phrase": "Politically, I'd say I'm moderate \u2014 somewhere in the middle." - }, - { - "option": "Conservative", - "phrase": "Politically, I'd describe myself as conservative." - }, - { - "option": "Very Conservative", - "phrase": "Politically, I'd describe myself as very conservative." - } - ], - "null_options": [ - "Moderate" - ], - "null_phrase": "I don't place myself on the left or right \u2014 I think of my views as moderate or mixed." - }, - { - "attribute": "religious_affiliation", - "option_phrases": [ - { - "option": "Evangelical Protestant", - "phrase": "I'm an Evangelical Protestant Christian \u2014 my faith is central to my life." - }, - { - "option": "Mainline Protestant", - "phrase": "I'm a Protestant Christian in a mainline denomination, like Methodist, Lutheran, or Presbyterian." - }, - { - "option": "Catholic", - "phrase": "I'm Catholic." - }, - { - "option": "Other Christian", - "phrase": "I'm a Christian, but not in one of the main Protestant or Catholic traditions \u2014 like Mormon, Orthodox, or another branch." - }, - { - "option": "Jewish", - "phrase": "I'm Jewish." - }, - { - "option": "Muslim", - "phrase": "I'm Muslim." - }, - { - "option": "Other Non-Christian", - "phrase": "I practice a non-Christian religion, such as Buddhism, Hinduism, or another faith." - }, - { - "option": "None/Unaffiliated", - "phrase": "I don't affiliate with any religion \u2014 I'm secular, agnostic, or atheist." - } - ], - "null_options": [ - "None/Unaffiliated" - ], - "null_phrase": "I don't really consider myself part of any religion." - }, - { - "attribute": "religious_attendance", - "option_phrases": [ - { - "option": "Never", - "phrase": "I never attend religious services." - }, - { - "option": "Seldom", - "phrase": "I rarely attend religious services \u2014 maybe once or twice a year at most." - }, - { - "option": "A few times/year", - "phrase": "I go to religious services a few times a year, like on holidays." - }, - { - "option": "Monthly", - "phrase": "I attend religious services about once a month or so." - }, - { - "option": "Weekly", - "phrase": "I attend religious services just about every week." - }, - { - "option": "More than weekly", - "phrase": "I attend religious services more than once a week \u2014 it's a big part of my routine." - } - ], - "null_options": [ - "Never" - ], - "null_phrase": "I don't attend religious services." - }, - { - "attribute": "primary_news_source", - "option_phrases": [ - { - "option": "TV", - "phrase": "I get most of my national news from television \u2014 broadcast or cable news." - }, - { - "option": "Online/Digital", - "phrase": "I mainly get my news from online sources and news websites." - }, - { - "option": "Social Media", - "phrase": "Social media is my main way of keeping up with the news." - }, - { - "option": "Radio", - "phrase": "I get most of my news from the radio." - }, - { - "option": "Print Newspaper", - "phrase": "I still read a print newspaper as my main source of news." - }, - { - "option": "None", - "phrase": "I don't really follow the news regularly." - } - ], - "null_options": [ - "None" - ], - "null_phrase": "I don't have a regular source of news \u2014 I don't follow it much." - }, - { - "attribute": "news_outlet_lean", - "option_phrases": [ - { - "option": "Left-leaning", - "phrase": "The news outlets I rely on tend to lean to the left politically." - }, - { - "option": "Center", - "phrase": "I prefer news outlets that I consider centrist or down-the-middle." - }, - { - "option": "Right-leaning", - "phrase": "The news outlets I rely on tend to lean to the right politically." - }, - { - "option": "Mixed/No Preference", - "phrase": "I consume news from a mix of outlets and don't have a strong preference for any particular political lean." - } - ], - "null_options": [ - "Mixed/No Preference" - ], - "null_phrase": "I don't gravitate toward any particular political slant in the news I consume." - }, - { - "attribute": "social_media_platforms", - "option_phrases": [ - { - "option": "Facebook", - "phrase": "Facebook is the social media platform I use the most." - }, - { - "option": "YouTube", - "phrase": "YouTube is my primary social media or video platform." - }, - { - "option": "Instagram", - "phrase": "Instagram is the social media platform I use the most." - }, - { - "option": "TikTok", - "phrase": "TikTok is the social media platform I use the most." - }, - { - "option": "Twitter/X", - "phrase": "I'm most active on Twitter \u2014 or X, as it's now called." - }, - { - "option": "None/Minimal", - "phrase": "I don't really use social media." - } - ], - "null_options": [ - "None/Minimal" - ], - "null_phrase": "I'm not really on social media \u2014 I use it little or not at all." - }, - { - "attribute": "internet_access", - "option_phrases": [ - { - "option": "Broadband", - "phrase": "I have high-speed broadband internet at home." - }, - { - "option": "Mobile Only", - "phrase": "My only internet access is through my smartphone's mobile data \u2014 I don't have home broadband." - }, - { - "option": "Dial-up/Satellite", - "phrase": "My home internet is slow or limited \u2014 I rely on dial-up or satellite." - }, - { - "option": "None", - "phrase": "I don't have any internet access at home." - } - ], - "null_options": [ - "None" - ], - "null_phrase": "I don't have internet access at home." - }, - { - "attribute": "civic_engagement", - "option_phrases": [ - { - "option": "Votes regularly", - "phrase": "I vote in most elections \u2014 it's something I make a point of doing." - }, - { - "option": "Votes sometimes", - "phrase": "I vote sometimes, but not in every election." - }, - { - "option": "Rarely/Never votes", - "phrase": "I rarely or never vote." - }, - { - "option": "Actively volunteers or campaigns", - "phrase": "I don't just vote \u2014 I also actively volunteer, donate, or get involved in campaigns and civic causes." - } - ], - "null_options": [ - "Rarely/Never votes" - ], - "null_phrase": "I don't really participate in elections or civic activities." - }, - { - "attribute": "health_insurance_type", - "option_phrases": [ - { - "option": "Employer-sponsored", - "phrase": "I get my health insurance through my employer or a family member's employer." - }, - { - "option": "Medicaid/CHIP", - "phrase": "I'm covered by Medicaid or CHIP \u2014 a government program for lower-income individuals and families." - }, - { - "option": "Medicare", - "phrase": "I'm on Medicare \u2014 the federal health insurance program mostly for people 65 and older." - }, - { - "option": "Individual Market/ACA", - "phrase": "I buy my own health insurance on the individual market, through the ACA marketplace or directly from an insurer." - }, - { - "option": "Military/VA", - "phrase": "I have health coverage through the military or the VA." - }, - { - "option": "Uninsured", - "phrase": "I don't have health insurance right now." - } - ], - "null_options": [ - "Uninsured" - ], - "null_phrase": "I currently don't have any health insurance coverage." - }, - { - "attribute": "immigration_status", - "option_phrases": [ - { - "option": "US-born citizen", - "phrase": "I was born in the United States and am a citizen by birth." - }, - { - "option": "Naturalized citizen", - "phrase": "I'm a US citizen, but I was born in another country and went through the naturalization process." - }, - { - "option": "Permanent resident", - "phrase": "I'm a lawful permanent resident \u2014 I have a green card but am not yet a citizen." - }, - { - "option": "Other", - "phrase": "My immigration or citizenship status is something other than citizen or permanent resident." - } - ], - "null_options": [], - "null_phrase": "" - }, - { - "attribute": "country", - "option_phrases": [ - { - "option": "United States", - "phrase": "I live in the United States." - } - ], - "null_options": [], - "null_phrase": "" - } - ] - }, - "name": "categorical_phrasings", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2146, - "output_tokens": 4562, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_231855_609376_claude_reasoning_call.json b/examples/logs/20260217_231855_609376_claude_reasoning_call.json deleted file mode 100644 index 01a7641..0000000 --- a/examples/logs/20260217_231855_609376_claude_reasoning_call.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "timestamp": "2026-02-17T23:18:55.609424", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 3951 - }, - "response": { - "id": "msg_01F3RNsWuGMTZJFKY7mfgJBz", - "content": [ - { - "id": "toolu_01FLWgyAbxrUGf7N4uTF9bkV", - "input": { - "phrasings": [ - { - "attribute": "financial_resilience", - "much_below": "I am far less financially cushioned against economic shocks than most people", - "below": "I have somewhat less financial stability and savings to fall back on than most people", - "average": "My financial resilience in the face of economic disruption is about average", - "above": "I am better positioned financially to weather economic shocks than most people", - "much_above": "I have far greater financial resources and stability to absorb economic disruption than most people" - }, - { - "attribute": "economic_anxiety", - "much_below": "I worry far less about my financial future and job security than most people", - "below": "I am somewhat less anxious about my economic situation than most people", - "average": "My level of worry about my financial future and job security is about average", - "above": "I feel more anxious about my financial future and job security than most people", - "much_above": "I am far more consumed by worry about my economic security and financial future than most people" - }, - { - "attribute": "trust_in_institutions", - "much_below": "I trust institutions far less than most people", - "below": "I am more skeptical of institutions than most people", - "average": "I am about as trusting of institutions as the average person", - "above": "I generally trust institutions more than most people", - "much_above": "I have far more faith in government, media, and public institutions than most people" - }, - { - "attribute": "institutional_change_support", - "much_below": "I am far more opposed to rapid, large-scale restructuring of government and economic institutions than most people", - "below": "I am somewhat more cautious about sweeping institutional change than most people", - "average": "My support for large-scale institutional restructuring in response to new technology is about average", - "above": "I am more supportive of bold, rapid institutional reform than most people", - "much_above": "I am far more enthusiastic about sweeping, transformative restructuring of institutions than most people" - }, - { - "attribute": "social_cohesion_orientation", - "much_below": "I place far less priority on collective stability and community solidarity than most people", - "below": "I am somewhat less focused on community solidarity over individual benefit than most people", - "average": "My balance between collective stability and individual benefit is about average", - "above": "I place more importance on community solidarity and collective well-being than most people", - "much_above": "I prioritize collective stability and community solidarity far more strongly than most people" - }, - { - "attribute": "openness", - "much_below": "I am far less open to new ideas and novel experiences than most people", - "below": "I am somewhat less curious and open to new ideas than most people", - "average": "My openness to new experiences and ideas is about average", - "above": "I am more curious, creative, and open to new ideas than most people", - "much_above": "I am far more open to novel ideas and unconventional thinking than most people" - }, - { - "attribute": "conscientiousness", - "much_below": "I am far less organized, disciplined, and dependable than most people", - "below": "I am somewhat less conscientious and self-disciplined than most people", - "average": "My level of organization and dependability is about average", - "above": "I am more organized, disciplined, and reliable than most people", - "much_above": "I am far more conscientious, methodical, and dependable than most people" - }, - { - "attribute": "extraversion", - "much_below": "I am far more introverted and reserved than most people", - "below": "I am somewhat less outgoing and sociable than most people", - "average": "My level of sociability and outgoingness is about average", - "above": "I am more sociable, assertive, and outgoing than most people", - "much_above": "I am far more extraverted and socially energized than most people" - }, - { - "attribute": "agreeableness", - "much_below": "I am far less cooperative, empathetic, and trusting of others than most people", - "below": "I am somewhat less agreeable and empathetic toward others than most people", - "average": "My level of cooperativeness and empathy toward others is about average", - "above": "I am more cooperative, empathetic, and trusting toward others than most people", - "much_above": "I am far more agreeable, compassionate, and trusting of others than most people" - }, - { - "attribute": "neuroticism", - "much_below": "I am far more emotionally stable and less prone to anxiety than most people", - "below": "I am somewhat more emotionally stable and less anxious than most people", - "average": "My level of emotional stability and tendency toward anxiety is about average", - "above": "I experience more emotional instability and anxiety than most people", - "much_above": "I am far more prone to anxiety, stress, and emotional instability than most people" - }, - { - "attribute": "need_for_cognition", - "much_below": "I engage in analytical thinking and complex problem-solving far less than most people", - "below": "I am somewhat less inclined to seek out effortful analytical thinking than most people", - "average": "My tendency to engage in deep, analytical thinking is about average", - "above": "I enjoy effortful analytical thinking more than most people", - "much_above": "I engage in and seek out complex analytical thinking far more than most people" - }, - { - "attribute": "susceptibility_to_misinformation", - "much_below": "I am far less likely to accept or share unverified information than most people", - "below": "I am somewhat less susceptible to misinformation than most people", - "average": "My susceptibility to misinformation is about average", - "above": "I am somewhat more likely to accept and share unverified information than most people", - "much_above": "I am far more likely to accept and spread unverified or false information than most people" - }, - { - "attribute": "information_verification_habit", - "much_below": "I cross-check claims against reliable sources far less often than most people", - "below": "I verify information against multiple sources somewhat less than most people", - "average": "My habit of verifying information before accepting it is about average", - "above": "I am more diligent about cross-checking claims against authoritative sources than most people", - "much_above": "I am far more rigorous about verifying information against multiple authoritative sources than most people" - }, - { - "attribute": "ai_literacy", - "much_below": "I understand AI concepts and capabilities far less than most people", - "below": "My understanding of AI and machine learning is somewhat lower than most people", - "average": "My understanding of AI concepts and capabilities is about average", - "above": "I understand AI concepts, capabilities, and limitations better than most people", - "much_above": "I have a far deeper understanding of AI and machine learning than most people" - }, - { - "attribute": "ai_risk_perception", - "much_below": "I perceive far less personal or societal danger from advanced AI than most people", - "below": "I am somewhat less concerned about the risks posed by advanced AI than most people", - "average": "My level of concern about the dangers of advanced AI is about average", - "above": "I see more personal and societal risk in advanced AI than most people", - "much_above": "I am far more alarmed by the potential dangers of advanced AI than most people" - }, - { - "attribute": "automation_job_vulnerability", - "much_below": "My job is far less exposed to automation and AI displacement than most people's", - "below": "My occupation is somewhat less vulnerable to automation displacement than most people's", - "average": "My job's exposure to automation and AI displacement is about average", - "above": "My job is more at risk of being displaced by automation and AI than most people's", - "much_above": "My occupation is far more vulnerable to displacement by AI-enabled automation than most people's" - }, - { - "attribute": "asi_adoption_willingness", - "much_below": "I am far less willing to use ASI-powered tools in my daily life and work than most people", - "below": "I am somewhat less willing to adopt ASI-powered tools than most people", - "average": "My willingness to use ASI-powered tools in my life and work is about average", - "above": "I am more willing to actively adopt ASI-powered tools than most people", - "much_above": "I am far more eager to integrate ASI-powered tools into my daily life and work than most people" - }, - { - "attribute": "techno_optimism", - "much_below": "I am far more skeptical that technological progress benefits humanity than most people", - "below": "I am somewhat less optimistic about the net benefits of technological progress than most people", - "average": "My belief that technology produces net positive outcomes for humanity is about average", - "above": "I believe more strongly than most people that technological progress is good for humanity", - "much_above": "I am far more confident than most people that technological progress will produce overwhelmingly positive outcomes for humanity" - } - ] - }, - "name": "relative_phrasings", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1766, - "output_tokens": 2354, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_231858_656102_claude_reasoning_call.json b/examples/logs/20260217_231858_656102_claude_reasoning_call.json deleted file mode 100644 index f7bb27c..0000000 --- a/examples/logs/20260217_231858_656102_claude_reasoning_call.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "timestamp": "2026-02-17T23:18:58.656179", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 2404 - }, - "response": { - "id": "msg_01F9MskYv7whzAkvtLXi8C2L", - "content": [ - { - "id": "toolu_01N2DT29hgiPNXxmGxJt8sVp", - "input": { - "phrasings": [ - { - "attribute": "age", - "template": "I am {value} years old.", - "format_spec": ".0f", - "prefix": "", - "suffix": "" - }, - { - "attribute": "household_size", - "template": "There are {value} people living in my household.", - "format_spec": ".0f", - "prefix": "", - "suffix": "" - }, - { - "attribute": "household_income", - "template": "My household's annual income is {value}.", - "format_spec": ".2f", - "prefix": "$", - "suffix": "" - }, - { - "attribute": "social_media_hours_per_day", - "template": "I spend about {value} hours on social media every day.", - "format_spec": ".1f", - "prefix": "", - "suffix": "" - } - ] - }, - "name": "concrete_phrasings", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1444, - "output_tokens": 264, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260218_001612_895589_claude_reasoning_call.json b/examples/logs/20260218_001612_895589_claude_reasoning_call.json deleted file mode 100644 index 87e9477..0000000 --- a/examples/logs/20260218_001612_895589_claude_reasoning_call.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "timestamp": "2026-02-18T00:16:12.895633", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 16761 - }, - "response": { - "id": "msg_01B6gvurBjrdqWEmkLgzQNf8", - "content": [ - { - "id": "toolu_01XirfR23BFj4cAsSyTJPoq2", - "input": { - "reasoning": "[REDACTED_TEXT length=3602]", - "avg_degree": 12, - "attribute_weights": [ - { - "attribute": "state", - "weight": 3.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "urban_rural", - "weight": 2.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "political_affiliation", - "weight": 2.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "education_level", - "weight": 2.0, - "match_type": "within_n", - "range_value": 1, - "ordinal_levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}" - }, - { - "attribute": "age", - "weight": 1.8, - "match_type": "numeric_range", - "range_value": 15, - "ordinal_levels": null - }, - { - "attribute": "religious_affiliation", - "weight": 1.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "race_ethnicity", - "weight": 1.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "household_income", - "weight": 1.3, - "match_type": "numeric_range", - "range_value": 40000, - "ordinal_levels": null - }, - { - "attribute": "employment_status", - "weight": 1.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "social_media_platforms", - "weight": 1.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - } - ], - "degree_multipliers": [ - { - "attribute": "civic_engagement", - "condition_value": "Actively volunteers or campaigns", - "multiplier": 2.5, - "rationale": "Activists and volunteers are natural social hubs \u2014 they organize, attend events, and build broad community networks across many contacts." - }, - { - "attribute": "employment_status", - "condition_value": "Self-employed", - "multiplier": 1.5, - "rationale": "Self-employed individuals must build and maintain wide professional networks (clients, vendors, collaborators) to sustain their business." - }, - { - "attribute": "social_media_hours_per_day", - "condition_value": 4, - "multiplier": 1.5, - "rationale": "Heavy social media users accumulate many online connections that translate to broader social influence and network size." - }, - { - "attribute": "occupation", - "condition_value": "Management/Professional", - "multiplier": 1.4, - "rationale": "Managers and professionals interact with many colleagues, clients, and stakeholders as part of their daily work." - }, - { - "attribute": "employment_status", - "condition_value": "Full-time", - "multiplier": 1.3, - "rationale": "Full-time workers have consistent daily workplace interactions that generate many weak and strong ties." - }, - { - "attribute": "marital_status", - "condition_value": "Married", - "multiplier": 1.2, - "rationale": "Married individuals tend to have larger combined social networks, including in-laws, couple-friends, and shared community connections." - }, - { - "attribute": "has_children", - "condition_value": true, - "multiplier": 1.3, - "rationale": "Parents with children form connections through schools, sports, playdates, and parenting communities, significantly expanding their social networks." - } - ], - "edge_type_rules": [ - { - "name": "household_member", - "condition": "a_household_id == b_household_id", - "priority": 50, - "description": "Two agents share the same household \u2014 domestic partners, roommates, or family members living together." - }, - { - "name": "local_political_ally", - "condition": "a_state == b_state and a_political_affiliation == b_political_affiliation and a_urban_rural == b_urban_rural", - "priority": 40, - "description": "Same state, same community type, and same political affiliation \u2014 likely connected through local political organizations, civic groups, or partisan social circles." - }, - { - "name": "faith_community", - "condition": "a_state == b_state and a_religious_affiliation == b_religious_affiliation and a_religious_affiliation != \"None/Unaffiliated\"", - "priority": 35, - "description": "Same state and same religious affiliation (non-secular) \u2014 connected through a shared church, mosque, synagogue, or other faith community." - }, - { - "name": "local_community", - "condition": "a_state == b_state and a_urban_rural == b_urban_rural", - "priority": 25, - "description": "Same state and same urban/rural setting \u2014 general local community ties such as neighbors, local organizations, or shared venues." - }, - { - "name": "political_echo_chamber", - "condition": "a_political_affiliation == b_political_affiliation and a_news_outlet_lean == b_news_outlet_lean", - "priority": 15, - "description": "Same political affiliation and same media consumption lean \u2014 connected through shared online communities, social media groups, or national partisan networks." - }, - { - "name": "weak_tie", - "condition": "a_social_media_platforms == b_social_media_platforms", - "priority": 5, - "description": "Shared social media platform \u2014 loose online connections through common digital spaces, with no strong real-world anchor." - } - ], - "influence_factors": [ - { - "attribute": "education_level", - "type": "ordinal", - "levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}", - "weight": 0.35, - "description": "Higher education level confers social credibility and perceived expertise, making more educated individuals more influential in discussions about policy and current events." - }, - { - "attribute": "civic_engagement", - "type": "ordinal", - "levels": "{\"Rarely/Never votes\": 1, \"Votes sometimes\": 2, \"Votes regularly\": 3, \"Actively volunteers or campaigns\": 4}", - "weight": 0.3, - "description": "More civically engaged individuals \u2014 especially those who actively campaign or volunteer \u2014 are more influential opinion leaders in their communities." - }, - { - "attribute": "household_income", - "type": "numeric", - "levels": null, - "weight": 0.2, - "description": "Higher income correlates with social status, access to information, and perceived authority, creating asymmetric influence in social interactions." - }, - { - "attribute": "social_media_hours_per_day", - "type": "numeric", - "levels": null, - "weight": 0.15, - "description": "Individuals who spend more time on social media disseminate more content, interact with more people, and have outsized influence on the information environment of their network." - } - ], - "default_edge_type": "acquaintance" - }, - "name": "network_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 7383, - "output_tokens": 3040, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260218_001702_906764_claude_reasoning_call.json b/examples/logs/20260218_001702_906764_claude_reasoning_call.json deleted file mode 100644 index 5de907f..0000000 --- a/examples/logs/20260218_001702_906764_claude_reasoning_call.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "timestamp": "2026-02-18T00:17:02.906852", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 16761 - }, - "response": { - "id": "msg_01JYYQ6U4PVJqygNC3zG1ogm", - "content": [ - { - "id": "toolu_01P31hGjK3JKJPwwxM6VhnxX", - "input": { - "reasoning": "[REDACTED_TEXT length=2930]", - "avg_degree": 12, - "attribute_weights": [ - { - "attribute": "state", - "weight": 4.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "urban_rural", - "weight": 3.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "political_affiliation", - "weight": 3.5, - "match_type": "within_n", - "range_value": 1, - "ordinal_levels": "{\"Strong Democrat\": 1, \"Lean Democrat\": 2, \"Independent\": 3, \"Lean Republican\": 4, \"Strong Republican\": 5}" - }, - { - "attribute": "race_ethnicity", - "weight": 2.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "age", - "weight": 2.0, - "match_type": "numeric_range", - "range_value": 15, - "ordinal_levels": null - }, - { - "attribute": "education_level", - "weight": 2.5, - "match_type": "within_n", - "range_value": 1, - "ordinal_levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}" - }, - { - "attribute": "religious_affiliation", - "weight": 2.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "household_income", - "weight": 1.5, - "match_type": "numeric_range", - "range_value": 40000, - "ordinal_levels": null - }, - { - "attribute": "social_media_platforms", - "weight": 1.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "employment_status", - "weight": 1.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "news_outlet_lean", - "weight": 2.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "has_children", - "weight": 1.2, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - } - ], - "degree_multipliers": [ - { - "attribute": "civic_engagement", - "condition_value": "Actively volunteers or campaigns", - "multiplier": 2.5, - "rationale": "Activists and campaign volunteers are natural social hubs \u2014 they intentionally expand their networks to mobilize others and attend frequent meetings and events." - }, - { - "attribute": "occupation", - "condition_value": "Management/Professional", - "multiplier": 1.7, - "rationale": "Managers and professionals maintain large professional networks through work, industry events, and LinkedIn-style connections." - }, - { - "attribute": "employment_status", - "condition_value": "Self-employed", - "multiplier": 1.6, - "rationale": "Self-employed individuals rely on broad personal networks for clients and referrals, making them well-connected hubs." - }, - { - "attribute": "extraversion", - "condition_value": 0.75, - "multiplier": 1.5, - "rationale": "Highly extraverted individuals actively seek out social connections and maintain more relationships." - }, - { - "attribute": "civic_engagement", - "condition_value": "Votes regularly", - "multiplier": 1.3, - "rationale": "Regular voters are more civically engaged and tend to participate in community organizations, expanding their networks." - }, - { - "attribute": "religious_attendance", - "condition_value": "More than weekly", - "multiplier": 1.8, - "rationale": "People who attend religious services more than weekly are deeply embedded in their congregation community, a major source of real-world social ties." - }, - { - "attribute": "social_media_hours_per_day", - "condition_value": 4.0, - "multiplier": 1.4, - "rationale": "Heavy social media users accumulate more online connections and are exposed to more potential social ties." - } - ], - "edge_type_rules": [ - { - "name": "household_member", - "condition": "a_household_id == b_household_id", - "priority": 50, - "description": "Members of the same household \u2014 spouses, domestic partners, or cohabitating adults \u2014 share the closest possible bond." - }, - { - "name": "congregation_member", - "condition": "a_religious_affiliation == b_religious_affiliation and a_religious_attendance != \"Never\" and b_religious_attendance != \"Never\" and a_state == b_state", - "priority": 40, - "description": "People who attend the same type of religious institution in the same state \u2014 a major source of tight community ties in American life." - }, - { - "name": "political_community", - "condition": "a_political_affiliation == b_political_affiliation and a_civic_engagement == b_civic_engagement and a_state == b_state", - "priority": 35, - "description": "People who share political affiliation and civic engagement patterns in the same state \u2014 e.g., party members, campaign volunteers, local activists." - }, - { - "name": "neighborhood_acquaintance", - "condition": "a_state == b_state and a_urban_rural == b_urban_rural", - "priority": 20, - "description": "People living in the same state and same urban/rural context \u2014 neighbors, local community members, and people who frequent the same local spaces." - }, - { - "name": "online_community", - "condition": "a_social_media_platforms == b_social_media_platforms and a_news_outlet_lean == b_news_outlet_lean", - "priority": 15, - "description": "People who use the same social media platform and consume similarly-leaning news \u2014 forming online communities and echo chambers." - }, - { - "name": "weak_tie", - "condition": "a_education_level == b_education_level and a_race_ethnicity == b_race_ethnicity", - "priority": 10, - "description": "Weak ties between people of similar educational background and race/ethnicity \u2014 reflecting broad social sorting patterns in American society." - } - ], - "influence_factors": [ - { - "attribute": "education_level", - "type": "ordinal", - "levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}", - "weight": 0.35, - "description": "Higher education correlates with perceived credibility and information authority. Graduate-degree holders are more likely to influence others' opinions on policy issues." - }, - { - "attribute": "civic_engagement", - "type": "ordinal", - "levels": "{\"Rarely/Never votes\": 1, \"Votes sometimes\": 2, \"Votes regularly\": 3, \"Actively volunteers or campaigns\": 4}", - "weight": 0.4, - "description": "Active campaigners and volunteers are opinion leaders by design \u2014 they explicitly attempt to persuade others and are trusted sources within political communities." - }, - { - "attribute": "household_income", - "type": "numeric", - "levels": null, - "weight": 0.15, - "description": "Higher income individuals tend to carry more social capital and are perceived as more authoritative on economic policy questions." - }, - { - "attribute": "trust_in_institutions", - "type": "numeric", - "levels": null, - "weight": 0.1, - "description": "People with higher institutional trust tend to defer to established sources and are more predictable opinion holders, making their views more stable and influential in moderate circles." - } - ], - "default_edge_type": "acquaintance" - }, - "name": "network_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 7383, - "output_tokens": 2958, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260218_001832_767614_claude_reasoning_call.json b/examples/logs/20260218_001832_767614_claude_reasoning_call.json deleted file mode 100644 index b391baf..0000000 --- a/examples/logs/20260218_001832_767614_claude_reasoning_call.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "timestamp": "2026-02-18T00:18:32.767666", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 16761 - }, - "response": { - "id": "msg_017ZCVn9j5EEjwBz8SpZAJPJ", - "content": [ - { - "id": "toolu_01XdrRLSyfRT5qYDaCGnrmuH", - "input": { - "reasoning": "[REDACTED_TEXT length=3191]", - "avg_degree": 10, - "attribute_weights": [ - { - "attribute": "state", - "weight": 3.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "political_affiliation", - "weight": 3.0, - "match_type": "within_n", - "range_value": 1, - "ordinal_levels": "{\"Strong Democrat\": 1, \"Lean Democrat\": 2, \"Independent\": 3, \"Lean Republican\": 4, \"Strong Republican\": 5}" - }, - { - "attribute": "urban_rural", - "weight": 2.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "education_level", - "weight": 2.0, - "match_type": "within_n", - "range_value": 1, - "ordinal_levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}" - }, - { - "attribute": "age", - "weight": 2.0, - "match_type": "numeric_range", - "range_value": 15, - "ordinal_levels": null - }, - { - "attribute": "race_ethnicity", - "weight": 1.8, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "religious_affiliation", - "weight": 1.8, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "household_income", - "weight": 1.5, - "match_type": "numeric_range", - "range_value": 40000, - "ordinal_levels": null - }, - { - "attribute": "occupation", - "weight": 1.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "social_media_platforms", - "weight": 1.2, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "has_children", - "weight": 1.2, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "news_outlet_lean", - "weight": 1.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - } - ], - "degree_multipliers": [ - { - "attribute": "civic_engagement", - "condition_value": "Actively volunteers or campaigns", - "multiplier": 2.5, - "rationale": "Civic activists and campaigners meet many people through organizing, canvassing, and community events, making them major social hubs." - }, - { - "attribute": "employment_status", - "condition_value": "Self-employed", - "multiplier": 1.8, - "rationale": "Self-employed individuals maintain broad professional networks across clients, vendors, and business contacts." - }, - { - "attribute": "occupation", - "condition_value": "Management/Professional", - "multiplier": 1.6, - "rationale": "Managers and professionals have larger workplace networks and attend conferences, industry events, and community boards." - }, - { - "attribute": "extraversion", - "condition_value": 0.75, - "multiplier": 1.5, - "rationale": "Highly extraverted individuals actively seek out social connections and maintain larger social networks." - }, - { - "attribute": "social_media_hours_per_day", - "condition_value": 4.0, - "multiplier": 1.4, - "rationale": "Heavy social media users accumulate more online connections and follower relationships." - }, - { - "attribute": "marital_status", - "condition_value": "Married", - "multiplier": 1.3, - "rationale": "Married individuals expand their social network through their spouse's family, friends, and community ties." - }, - { - "attribute": "religious_attendance", - "condition_value": "More than weekly", - "multiplier": 1.5, - "rationale": "Very frequent religious attendees are deeply embedded in their congregation's social network, connecting with many fellow members." - } - ], - "edge_type_rules": [ - { - "name": "household_member", - "condition": "a_household_id == b_household_id", - "priority": 50, - "description": "Members of the same household \u2014 spouses, domestic partners, or cohabitating adults sharing a home." - }, - { - "name": "political_community", - "condition": "a_state == b_state and a_political_affiliation == b_political_affiliation and a_civic_engagement == b_civic_engagement", - "priority": 40, - "description": "People in the same state who share political affiliation and civic engagement patterns \u2014 likely connected through local party organizations, campaigns, or activist groups." - }, - { - "name": "faith_community", - "condition": "a_religious_affiliation == b_religious_affiliation and a_state == b_state and a_religious_attendance != \"Never\"", - "priority": 35, - "description": "Members of the same religious community in the same state who attend services, forming bonds through shared worship and congregation activities." - }, - { - "name": "neighbor_acquaintance", - "condition": "a_state == b_state and a_urban_rural == b_urban_rural", - "priority": 20, - "description": "People living in the same state and same type of community (urban/suburban/rural), representing neighborhood ties, local events, and community interactions." - }, - { - "name": "online_connection", - "condition": "a_social_media_platforms == b_social_media_platforms and a_news_outlet_lean == b_news_outlet_lean", - "priority": 15, - "description": "People who use the same social media platform and consume news from the same ideological lean \u2014 connected through online communities, shared groups, and algorithmic feeds." - } - ], - "influence_factors": [ - { - "attribute": "education_level", - "type": "ordinal", - "levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}", - "weight": 0.35, - "description": "Higher education is associated with greater perceived expertise and credibility on policy issues; people are more likely to defer to the opinions of more educated peers." - }, - { - "attribute": "civic_engagement", - "type": "ordinal", - "levels": "{\"Rarely/Never votes\": 1, \"Votes sometimes\": 2, \"Votes regularly\": 3, \"Actively volunteers or campaigns\": 4}", - "weight": 0.3, - "description": "Actively engaged citizens are seen as more politically informed and authoritative; they invest more effort in persuasion and are treated as opinion leaders within their networks." - }, - { - "attribute": "household_income", - "type": "numeric", - "levels": null, - "weight": 0.2, - "description": "Higher income confers social status and perceived life success, giving wealthier individuals slightly more influence in mixed-income social circles." - }, - { - "attribute": "age", - "type": "numeric", - "levels": null, - "weight": 0.15, - "description": "Older adults are generally perceived as having more life experience and are granted greater deference on civic and policy matters, particularly within family and community contexts." - } - ], - "default_edge_type": "acquaintance" - }, - "name": "network_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 7383, - "output_tokens": 2912, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260218_001921_881763_claude_reasoning_call.json b/examples/logs/20260218_001921_881763_claude_reasoning_call.json deleted file mode 100644 index 6f49cf9..0000000 --- a/examples/logs/20260218_001921_881763_claude_reasoning_call.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "timestamp": "2026-02-18T00:19:21.881798", - "function": "reasoning_call", - "provider": "claude", - "request": { - "model": "claude-sonnet-4-6", - "prompt_length": 16968 - }, - "response": { - "id": "msg_015fHDHer6tZKxaVr95tU7k4", - "content": [ - { - "id": "toolu_01NpmAgShbWeBLAyZVjqvYio", - "input": { - "reasoning": "[REDACTED_TEXT length=2982]", - "avg_degree": 10, - "attribute_weights": [ - { - "attribute": "state", - "weight": 4.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "urban_rural", - "weight": 3.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "political_affiliation", - "weight": 3.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "race_ethnicity", - "weight": 2.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "education_level", - "weight": 2.5, - "match_type": "within_n", - "range_value": 1, - "ordinal_levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}" - }, - { - "attribute": "age", - "weight": 2.0, - "match_type": "numeric_range", - "range_value": 15, - "ordinal_levels": null - }, - { - "attribute": "religious_affiliation", - "weight": 2.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "household_income", - "weight": 1.5, - "match_type": "numeric_range", - "range_value": 30000, - "ordinal_levels": null - }, - { - "attribute": "occupation", - "weight": 1.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "social_media_platforms", - "weight": 1.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "has_children", - "weight": 1.0, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - }, - { - "attribute": "news_outlet_lean", - "weight": 1.5, - "match_type": "exact", - "range_value": null, - "ordinal_levels": null - } - ], - "degree_multipliers": [ - { - "attribute": "civic_engagement", - "condition_value": "Actively volunteers or campaigns", - "multiplier": 2.5, - "rationale": "Community organizers and campaign volunteers build very large social networks through their activism and outreach activities." - }, - { - "attribute": "employment_status", - "condition_value": "Full-time", - "multiplier": 1.4, - "rationale": "Full-time workers have regular workplace interactions that expand their social networks significantly." - }, - { - "attribute": "extraversion", - "condition_value": 0.8, - "multiplier": 1.5, - "rationale": "Highly extraverted individuals naturally accumulate more social connections across all contexts." - }, - { - "attribute": "occupation", - "condition_value": "Management/Professional", - "multiplier": 1.6, - "rationale": "Managers and professionals maintain broad networks for career advancement, client relationships, and professional associations." - }, - { - "attribute": "religious_attendance", - "condition_value": "More than weekly", - "multiplier": 1.8, - "rationale": "Very frequent churchgoers are deeply embedded in congregational social networks and often take on leadership or volunteer roles." - }, - { - "attribute": "social_media_hours_per_day", - "condition_value": 5.0, - "multiplier": 1.4, - "rationale": "Heavy social media users maintain more online connections and are exposed to and engage with more people digitally." - }, - { - "attribute": "union_membership", - "condition_value": true, - "multiplier": 1.3, - "rationale": "Union members participate in organized labor networks, meetings, and collective activities that expand social ties." - } - ], - "edge_type_rules": [ - { - "name": "household_member", - "condition": "a_household_income == b_household_income and a_state == b_state and a_urban_rural == b_urban_rural and a_marital_status == b_marital_status", - "priority": 50, - "description": "People sharing the same household income, state, residential setting, and marital status are likely household members or domestic partners \u2014 a strong proxy for actual co-residence." - }, - { - "name": "religious_community", - "condition": "a_religious_affiliation == b_religious_affiliation and a_state == b_state and a_urban_rural == b_urban_rural", - "priority": 35, - "description": "Members of the same religious congregation within the same state and community setting who attend services together." - }, - { - "name": "political_community", - "condition": "a_political_affiliation == b_political_affiliation and a_state == b_state", - "priority": 25, - "description": "People who share political affiliation in the same state, connected through local party activities, rallies, and civic engagement." - }, - { - "name": "neighbor", - "condition": "a_state == b_state and a_urban_rural == b_urban_rural and a_race_ethnicity == b_race_ethnicity", - "priority": 20, - "description": "People in the same state, residential setting, and racial/ethnic community who are likely geographic neighbors or community members." - }, - { - "name": "coworker", - "condition": "a_occupation == b_occupation and a_state == b_state and a_employment_status == b_employment_status", - "priority": 15, - "description": "People in the same occupation and employment status within the same state, likely sharing professional or workplace networks." - }, - { - "name": "acquaintance", - "condition": "a_state == b_state", - "priority": 5, - "description": "General acquaintances who live in the same state with some loose social connection." - } - ], - "influence_factors": [ - { - "attribute": "education_level", - "type": "ordinal", - "levels": "{\"Less than HS\": 1, \"HS Diploma\": 2, \"Some College\": 3, \"Associate's\": 4, \"Bachelor's\": 5, \"Graduate Degree\": 6}", - "weight": 0.35, - "description": "Higher education is associated with greater perceived credibility and persuasiveness on policy issues; more educated people tend to shape opinions of less educated peers." - }, - { - "attribute": "civic_engagement", - "type": "ordinal", - "levels": "{\"Rarely/Never votes\": 1, \"Votes sometimes\": 2, \"Votes regularly\": 3, \"Actively volunteers or campaigns\": 4}", - "weight": 0.3, - "description": "Civically active individuals \u2014 especially organizers and campaigners \u2014 are opinion leaders who actively try to persuade others on political and social issues." - }, - { - "attribute": "need_for_cognition", - "type": "numeric", - "levels": null, - "weight": 0.2, - "description": "People with higher need for cognition process information more deeply and craft more coherent arguments, making them more persuasive in political discussions." - }, - { - "attribute": "trust_in_institutions", - "type": "numeric", - "levels": null, - "weight": 0.15, - "description": "Individuals with higher institutional trust are seen as more mainstream and credible sources, giving them modest influence advantage in opinion dynamics." - } - ], - "default_edge_type": "acquaintance" - }, - "name": "network_config", - "type": "tool_use", - "caller": { - "type": "direct" - } - } - ], - "model": "claude-sonnet-4-6", - "role": "assistant", - "stop_reason": "tool_use", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", - "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" - }, - "cache_creation_input_tokens": "[REDACTED_SECRET]", - "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 7441, - "output_tokens": 2918, - "server_tool_use": null, - "service_tier": "standard", - "inference_geo": "global" - } - }, - "sources_extracted": [] -} \ No newline at end of file diff --git a/examples/logs/20260217_205832_945962_claude_simple_call.json b/examples/logs/20260220_002844_503388_claude_simple_call.json similarity index 69% rename from examples/logs/20260217_205832_945962_claude_simple_call.json rename to examples/logs/20260220_002844_503388_claude_simple_call.json index 212890c..96f9fad 100644 --- a/examples/logs/20260217_205832_945962_claude_simple_call.json +++ b/examples/logs/20260220_002844_503388_claude_simple_call.json @@ -1,21 +1,19 @@ { - "timestamp": "2026-02-17T20:58:32.946015", + "timestamp": "2026-02-20T00:28:44.503433", "function": "simple_call", "provider": "claude", "request": { "model": "claude-sonnet-4-6", - "prompt_length": 2578 + "prompt_length": 3463 }, "response": { - "id": "msg_01PqB9YRsTJqxSv81s1Qid5b", + "id": "msg_01JJcDkbVBXPe5PW8a84t7mc", "content": [ { - "id": "toolu_01Gvev7ARY5fmN5a54PTJ4T1", + "id": "toolu_01KwN6mnTy7p32V7DjqZCTuW", "input": { "sufficient": true, - "geography": "US", - "agent_focus": "US adults representative of the national population, focused on opinion formation on national policy issues", - "agent_focus_mode": "primary_only", + "geography": "United States", "clarifications_needed": [], "questions": [] }, @@ -38,8 +36,8 @@ }, "cache_creation_input_tokens": "[REDACTED_SECRET]", "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 1798, - "output_tokens": 144, + "input_tokens": 1781, + "output_tokens": 88, "server_tool_use": null, "service_tier": "standard", "inference_geo": "global" diff --git a/examples/logs/20260217_210013_645129_claude_reasoning_call.json b/examples/logs/20260220_002929_958671_claude_reasoning_call.json similarity index 58% rename from examples/logs/20260217_210013_645129_claude_reasoning_call.json rename to examples/logs/20260220_002929_958671_claude_reasoning_call.json index 494bef8..b8e6ddb 100644 --- a/examples/logs/20260217_210013_645129_claude_reasoning_call.json +++ b/examples/logs/20260220_002929_958671_claude_reasoning_call.json @@ -1,101 +1,99 @@ { - "timestamp": "2026-02-17T21:00:13.645211", + "timestamp": "2026-02-20T00:29:29.958704", "function": "reasoning_call", "provider": "claude", "request": { "model": "claude-sonnet-4-6", - "prompt_length": 5800 + "prompt_length": 7182 }, "response": { - "id": "msg_011hBGqjCjCc2ueTdJZx75Cm", + "id": "msg_01WDgjMs2NtqfMgSh1B81XF7", "content": [ { - "id": "toolu_01J8zrvun4DxoqKXRTNsEmE1", + "id": "toolu_01LeRU1tTbTForaVv5wbm2Fa", "input": { "attributes": [ { "name": "age", "type": "int", "category": "universal", - "description": "Person's age in years, ranging from 18 to 90+, representative of the US adult population.", + "description": "Age of the adult in years, ranging from 18 to 80.", "strategy": "independent", - "scope": "partner_correlated", + "scope": "individual", "depends_on": [], "semantic_type": "age", - "identity_type": "generational_identity" + "display_format": "number" }, { "name": "gender", "type": "categorical", "category": "universal", - "description": "Gender identity of the person (Male, Female, Non-binary/Other).", + "description": "Self-identified gender of the individual (Male, Female, Non-binary/Other).", "strategy": "independent", "scope": "individual", "depends_on": [], "identity_type": "gender_identity" }, { - "name": "state", + "name": "race_ethnicity", "type": "categorical", "category": "universal", - "description": "US state of residence (all 50 states + DC), sampled proportionally to population.", + "description": "Racial and ethnic self-identification (White non-Hispanic, Black, Hispanic/Latino, Asian, Other/Multiracial).", "strategy": "independent", - "scope": "household", - "depends_on": [] + "scope": "partner_correlated", + "depends_on": [], + "identity_type": "race_ethnicity" }, { - "name": "urban_rural", + "name": "us_region", "type": "categorical", "category": "universal", - "description": "Urbanicity of residence: Urban, Suburban, or Rural, conditioned on state population density.", - "strategy": "conditional", + "description": "US census region of residence (Northeast, Southeast, Midwest, Southwest, West Coast).", + "strategy": "independent", "scope": "household", - "depends_on": [ - "state" - ] + "depends_on": [] }, { - "name": "race_ethnicity", + "name": "urban_rural", "type": "categorical", "category": "universal", - "description": "Racial/ethnic identity (White non-Hispanic, Black, Hispanic, Asian, Other), representative of US census distributions.", + "description": "Urbanicity of the household's location (Urban, Suburban, Rural).", "strategy": "independent", - "scope": "partner_correlated", - "depends_on": [], - "identity_type": "race_ethnicity" + "scope": "household", + "depends_on": [] }, { "name": "education_level", "type": "categorical", "category": "universal", - "description": "Highest educational attainment (Less than HS, HS Diploma, Some College, Associate's, Bachelor's, Graduate Degree).", + "description": "Highest educational attainment (Less than HS, HS diploma/GED, Some college, Bachelor's degree, Graduate degree).", "strategy": "conditional", "scope": "partner_correlated", "depends_on": [ "age" ], - "correlation_rate": 0.65, "semantic_type": "education" }, { "name": "household_income", "type": "int", "category": "universal", - "description": "Annual household income in USD, conditioned on education level and state.", + "description": "Annual household income in USD before taxes.", "strategy": "conditional", "scope": "household", "depends_on": [ "education_level", - "state" + "us_region", + "urban_rural" ], - "display_format": "currency", - "semantic_type": "income" + "semantic_type": "income", + "display_format": "currency" }, { "name": "marital_status", "type": "categorical", "category": "universal", - "description": "Current marital status (Single, Married, Divorced, Widowed, Domestic Partnership).", + "description": "Current marital or partnership status (Married/partnered, Single, Divorced/separated, Widowed).", "strategy": "conditional", "scope": "individual", "depends_on": [ @@ -110,15 +108,15 @@ "strategy": "conditional", "scope": "household", "depends_on": [ - "marital_status", - "age" - ] + "marital_status" + ], + "display_format": "number" }, { "name": "has_children", "type": "boolean", "category": "universal", - "description": "Whether the person has any children (under 18) living in the household.", + "description": "Whether the individual has any children (under 18) living in the household.", "strategy": "conditional", "scope": "individual", "depends_on": [ @@ -128,87 +126,82 @@ "identity_type": "parental_status" }, { - "name": "employment_status", + "name": "employment_sector", "type": "categorical", - "category": "universal", - "description": "Current employment status (Full-time, Part-time, Self-employed, Unemployed, Retired, Student).", + "category": "population_specific", + "description": "Primary employment sector (Federal government, State/local government, Private sector, Gig/contract, Self-employed, Retired, Unemployed, Not in labor force).", "strategy": "conditional", "scope": "individual", "depends_on": [ "age", "education_level" ], - "semantic_type": "employment" + "semantic_type": "employment", + "identity_type": "professional_identity" }, { - "name": "occupation", + "name": "job_security_perception", "type": "categorical", - "category": "universal", - "description": "Broad occupational category (Management, Professional, Service, Sales, Construction, Production, Other) per BLS classification.", + "category": "population_specific", + "description": "Perceived stability of current employment (Very secure, Somewhat secure, Somewhat insecure, Very insecure, N/A - not employed).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "education_level", - "employment_status" - ], - "semantic_type": "occupation", - "identity_type": "professional_identity" + "employment_sector" + ] }, { - "name": "political_affiliation", + "name": "financial_margin", "type": "categorical", "category": "population_specific", - "description": "Political party identification (Strong Democrat, Lean Democrat, Independent, Lean Republican, Strong Republican).", + "description": "Financial buffer status indicating paycheck-to-paycheck living (Comfortable savings buffer, Modest buffer, Paycheck-to-paycheck, In debt/deficit).", "strategy": "conditional", - "scope": "partner_correlated", + "scope": "household", "depends_on": [ - "state", - "education_level" - ], - "correlation_rate": 0.55, - "identity_type": "political_orientation" + "household_income" + ] }, { - "name": "political_ideology", + "name": "investment_profile", "type": "categorical", "category": "population_specific", - "description": "Self-described ideological placement on a scale (Very Liberal, Liberal, Moderate, Conservative, Very Conservative).", + "description": "Investment and financial literacy profile (No investments, 401k/IRA only, Diversified investor, Active trader, Crypto holder).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "political_affiliation" - ], - "identity_type": "political_orientation" + "household_income", + "education_level" + ] }, { - "name": "religious_affiliation", + "name": "primary_info_source", "type": "categorical", "category": "population_specific", - "description": "Religious identity (Evangelical Protestant, Mainline Protestant, Catholic, Other Christian, Jewish, Muslim, Other Non-Christian, None/Unaffiliated).", + "description": "Primary source of news and information (Cable/broadcast TV news, Social media, Online news sites, Podcasts, Local news, Print media, Avoids news).", "strategy": "conditional", - "scope": "partner_correlated", + "scope": "individual", "depends_on": [ - "race_ethnicity" - ], - "correlation_rate": 0.75, - "identity_type": "religious_affiliation" + "age", + "education_level" + ] }, { - "name": "religious_attendance", + "name": "social_media_behavior", "type": "categorical", "category": "population_specific", - "description": "Frequency of attendance at religious services (Never, Seldom, A few times/year, Monthly, Weekly, More than weekly).", + "description": "Social media engagement posture (Non-user, Passive consumer, Occasional poster, Active poster/Influencer).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "religious_affiliation" + "age", + "primary_info_source" ] }, { - "name": "primary_news_source", + "name": "tech_adoption_posture", "type": "categorical", "category": "population_specific", - "description": "Primary source for national news (TV, Online/Digital, Social Media, Radio, Print Newspaper, None).", + "description": "Attitude toward adopting new technology (Technophobe/Avoider, Late majority adopter, Early majority adopter, Early adopter, Innovator).", "strategy": "conditional", "scope": "individual", "depends_on": [ @@ -217,129 +210,133 @@ ] }, { - "name": "news_outlet_lean", + "name": "religious_engagement", "type": "categorical", "category": "population_specific", - "description": "Political lean of preferred news outlets (Left-leaning, Center, Right-leaning, Mixed/No Preference).", + "description": "Level of religious practice and belief (Secular/None, Nominally affiliated, Moderately religious, Devout).", "strategy": "conditional", - "scope": "individual", + "scope": "partner_correlated", "depends_on": [ - "political_affiliation", - "primary_news_source" - ] + "us_region", + "race_ethnicity" + ], + "identity_type": "religious_affiliation" }, { - "name": "social_media_platforms", + "name": "political_identity", "type": "categorical", "category": "population_specific", - "description": "Primary social media platform used (Facebook, Twitter/X, Instagram, TikTok, YouTube, None/Minimal).", + "description": "Political party affiliation and ideological strength (Strong Democrat, Lean Democrat, True Independent, Lean Republican, Strong Republican).", "strategy": "conditional", - "scope": "individual", + "scope": "partner_correlated", "depends_on": [ - "age" - ] + "us_region", + "education_level", + "race_ethnicity" + ], + "identity_type": "political_orientation" }, { - "name": "social_media_hours_per_day", - "type": "float", + "name": "political_engagement_level", + "type": "categorical", "category": "population_specific", - "description": "Average daily hours spent consuming social media content.", + "description": "Level of political participation and interest (Disengaged, Single-issue voter, Moderate/occasional participant, Highly engaged partisan).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "age", - "social_media_platforms" + "political_identity", + "age" ] }, { - "name": "internet_access", + "name": "vote_2024_presidential", "type": "categorical", "category": "population_specific", - "description": "Quality of home internet access (Broadband, Mobile Only, Dial-up/Satellite, None).", + "description": "Reported 2024 presidential vote choice (Trump, Harris, Third party, Did not vote, Not eligible).", "strategy": "conditional", - "scope": "household", + "scope": "individual", "depends_on": [ - "urban_rural", - "household_income" + "political_identity", + "political_engagement_level" ] }, { - "name": "civic_engagement", + "name": "midterm_turnout_propensity", "type": "categorical", "category": "population_specific", - "description": "Level of civic participation (Votes regularly, Votes sometimes, Rarely votes/Never votes, Also actively volunteers or campaigns).", + "description": "Historical tendency to vote in midterm elections (Always votes, Sometimes votes, Rarely votes, Never votes).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "age", - "education_level" + "political_engagement_level", + "age" ] }, { - "name": "homeownership", - "type": "boolean", + "name": "congressional_district_competitiveness", + "type": "categorical", "category": "population_specific", - "description": "Whether the household owns (vs. rents) their primary residence.", + "description": "Competitiveness classification of the agent's congressional district (Safe Republican, Lean Republican, Swing district, Lean Democrat, Safe Democrat).", "strategy": "conditional", "scope": "household", "depends_on": [ - "household_income", - "age" + "us_region", + "urban_rural" ] }, { - "name": "health_insurance_type", + "name": "top_issue_2026", "type": "categorical", "category": "population_specific", - "description": "Type of health insurance coverage (Employer-sponsored, Medicaid/CHIP, Medicare, Individual Market/ACA, Military/VA, Uninsured).", + "description": "Single most salient policy issue heading into the 2026 midterms (Economy/Jobs, Abortion/Reproductive rights, Immigration, Democracy/Rule of law, Healthcare, Climate, Education, AI/Technology).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "employment_status", - "household_income" + "political_identity", + "employment_sector" ] }, { - "name": "immigration_status", + "name": "country_direction_approval", "type": "categorical", "category": "population_specific", - "description": "Citizenship and immigration status (US-born citizen, Naturalized citizen, Permanent resident, Other).", + "description": "Approval of the current direction of the United States (Strongly approve, Somewhat approve, Somewhat disapprove, Strongly disapprove).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "race_ethnicity" - ], - "identity_type": "citizenship" + "political_identity", + "financial_margin" + ] }, { - "name": "union_membership", - "type": "boolean", + "name": "consumer_identity", + "type": "categorical", "category": "population_specific", - "description": "Whether the person is currently a member of a labor union.", + "description": "Primary driver of consumer purchasing behavior (Brand loyal, Price/value driven, Values/ethics driven, Convenience driven).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "occupation", - "employment_status" + "household_income", + "education_level" ] }, { - "name": "gun_ownership", - "type": "boolean", + "name": "institutional_trust", + "type": "categorical", "category": "population_specific", - "description": "Whether the household contains at least one firearm.", + "description": "General level of trust in major institutions such as government, media, science, and corporations (High trust, Moderate trust, Low trust, Distrustful/Conspiratorial).", "strategy": "conditional", - "scope": "household", + "scope": "individual", "depends_on": [ - "urban_rural", - "state" + "political_identity", + "education_level" ] }, { "name": "openness", "type": "float", "category": "personality", - "description": "Big Five openness to experience: curiosity, creativity, and willingness to consider new ideas (0\u20131 scale).", + "description": "Big Five openness to experience: curiosity, creativity, and receptivity to new ideas.", "strategy": "independent", "scope": "individual", "depends_on": [] @@ -348,7 +345,7 @@ "name": "conscientiousness", "type": "float", "category": "personality", - "description": "Big Five conscientiousness: organization, dependability, and self-discipline (0\u20131 scale).", + "description": "Big Five conscientiousness: self-discipline, organization, and goal-directed behavior.", "strategy": "independent", "scope": "individual", "depends_on": [] @@ -357,7 +354,7 @@ "name": "extraversion", "type": "float", "category": "personality", - "description": "Big Five extraversion: sociability, assertiveness, and positive emotionality (0\u20131 scale).", + "description": "Big Five extraversion: sociability, assertiveness, and positive affect in social settings.", "strategy": "independent", "scope": "individual", "depends_on": [] @@ -366,7 +363,7 @@ "name": "agreeableness", "type": "float", "category": "personality", - "description": "Big Five agreeableness: cooperation, empathy, and trust toward others (0\u20131 scale).", + "description": "Big Five agreeableness: cooperativeness, empathy, and tendency toward social harmony.", "strategy": "independent", "scope": "individual", "depends_on": [] @@ -375,49 +372,38 @@ "name": "neuroticism", "type": "float", "category": "personality", - "description": "Big Five neuroticism: emotional instability, anxiety, and negative affect (0\u20131 scale).", + "description": "Big Five neuroticism: emotional instability, anxiety, and susceptibility to stress.", "strategy": "independent", "scope": "individual", "depends_on": [] }, { - "name": "trust_in_institutions", + "name": "risk_tolerance", "type": "float", "category": "personality", - "description": "Generalized trust in government, media, and public institutions (0\u20131 scale, low = high distrust).", + "description": "General willingness to accept risk in financial, social, and political decisions (0=very risk averse, 1=very risk tolerant).", "strategy": "conditional", "scope": "individual", "depends_on": [ - "political_ideology", - "education_level" - ] - }, - { - "name": "need_for_cognition", - "type": "float", - "category": "personality", - "description": "Tendency to engage in and enjoy effortful analytical thinking when forming opinions (0\u20131 scale).", - "strategy": "conditional", - "scope": "individual", - "depends_on": [ - "education_level" + "age", + "household_income" ] }, { - "name": "susceptibility_to_misinformation", + "name": "economic_anxiety", "type": "float", "category": "personality", - "description": "Propensity to accept and share unverified or false information, inversely related to media literacy (0\u20131 scale).", + "description": "Degree of worry about personal and national economic conditions (0=none, 1=extreme), shaping decision-making under uncertainty.", "strategy": "conditional", "scope": "individual", "depends_on": [ - "need_for_cognition", - "social_media_hours_per_day" + "financial_margin", + "job_security_perception" ] } ], "include_big_five": true, - "notes": "Total: 35 attributes (12 universal, 15 population-specific, 0 context-specific, 8 personality). No product/service context was specified so context_specific attributes are omitted. Political attribute...[truncated]" + "notes": "Total: 34 attributes (11 universal, 16 population-specific, 0 context-specific, 7 personality including Big Five). No context-specific attributes were included as no product/service/brand was specifie...[truncated]" }, "name": "attribute_selection", "type": "tool_use", @@ -438,8 +424,8 @@ }, "cache_creation_input_tokens": "[REDACTED_SECRET]", "cache_read_input_tokens": "[REDACTED_SECRET]", - "input_tokens": 2989, - "output_tokens": 3672, + "input_tokens": 3137, + "output_tokens": 3703, "server_tool_use": null, "service_tier": "standard", "inference_geo": "global" diff --git a/examples/logs/20260220_003200_522684_claude_agentic_research.json b/examples/logs/20260220_003200_522684_claude_agentic_research.json new file mode 100644 index 0000000..bc5b7b4 --- /dev/null +++ b/examples/logs/20260220_003200_522684_claude_agentic_research.json @@ -0,0 +1,1792 @@ +{ + "timestamp": "2026-02-20T00:32:00.522717", + "function": "agentic_research", + "provider": "claude", + "request": { + "model": "claude-sonnet-4-6", + "prompt_length": 5504 + }, + "response": { + "id": "msg_01AohFgiWVNV2zjjnNd1xmAA", + "content": [ + { + "citations": null, + "text": "[REDACTED_TEXT length=103]", + "type": "text", + "parsed_output": null + }, + { + "id": "srvtoolu_01JLHUpdfMSDqdx4J872QAtM", + "input": { + "query": "US adult population age distribution 2024 census" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_015Em62X7NiwQJkRvxBMJFXd", + "input": { + "query": "US adult gender distribution 2024 census male female nonbinary" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01XA8ER12skDr1HKK7g9apGF", + "input": { + "query": "US race ethnicity distribution 2024 census White Black Hispanic Asian" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=3112]", + "page_age": null, + "title": "National Population by Characteristics: 2020-2025", + "type": "web_search_result", + "url": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2960]", + "page_age": "September 17, 2025", + "title": "Visualizing the U.S. Population by Age Group", + "type": "web_search_result", + "url": "https://www.visualcapitalist.com/u-s-population-by-age-group/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1280]", + "page_age": null, + "title": "2023 Population Estimates by Age and Sex", + "type": "web_search_result", + "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6480]", + "page_age": "3 days ago", + "title": "US population by year, race, age, ethnicity, & more | USAFacts", + "type": "web_search_result", + "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4076]", + "page_age": null, + "title": "Population of the U.S. by sex and age 2024", + "type": "web_search_result", + "url": "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1680]", + "page_age": null, + "title": "Adult Population by Age Group Statistics", + "type": "web_search_result", + "url": "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5512]", + "page_age": null, + "title": "An Aging Nation: U.S. Median Age Surpassed 39 in 2024", + "type": "web_search_result", + "url": "https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=968]", + "page_age": null, + "title": "Population of United States of America 2024 - PopulationPyramid.net", + "type": "web_search_result", + "url": "https://www.populationpyramid.net/united-states-of-america/2024/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3112]", + "page_age": null, + "title": "National Population by Characteristics: 2020-2024", + "type": "web_search_result", + "url": "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6612]", + "page_age": "1 day ago", + "title": "Demographics of the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" + } + ], + "tool_use_id": "srvtoolu_01JLHUpdfMSDqdx4J872QAtM", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=2832]", + "page_age": "September 12, 2025", + "title": "How Many Adults and Youth Identify as Transgender in the United States? - Williams Institute", + "type": "web_search_result", + "url": "https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5436]", + "page_age": "February 24, 2025", + "title": "United States Population by Gender - 2025 Update | Neilsberg", + "type": "web_search_result", + "url": "https://www.neilsberg.com/insights/united-states-population-by-gender/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1280]", + "page_age": null, + "title": "2023 Population Estimates by Age and Sex", + "type": "web_search_result", + "url": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4192]", + "page_age": "October 30, 2024", + "title": "The surprising number of young adults who identify as nonbinary", + "type": "web_search_result", + "url": "https://www.generationtechblog.com/p/the-surprising-number-of-young-adults" + }, + { + "encrypted_content": "[REDACTED_TEXT length=352]", + "page_age": null, + "title": "United States Population by Age and Sex", + "type": "web_search_result", + "url": "https://www.census.gov/popclock/data_tables.php?component=pyramid" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5392]", + "page_age": "September 27, 2024", + "title": "Nonbinary LGBTQ Adults in the United States - Williams Institute", + "type": "web_search_result", + "url": "https://williamsinstitute.law.ucla.edu/publications/nonbinary-lgbtq-adults-us/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3056]", + "page_age": "June 7, 2022", + "title": "About 5 percent of young adults identify as transgender or nonbinary, U.S. survey finds", + "type": "web_search_result", + "url": "https://www.nbcnews.com/nbc-out/out-news/5-percent-young-adults-identify-transgender-nonbinary-us-survey-finds-rcna32315" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5680]", + "page_age": "October 11, 2025", + "title": "Population by Gender in US 2025 | Statistics & Facts - The World Data", + "type": "web_search_result", + "url": "https://theworlddata.com/population-by-gender-in-us/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=592]", + "page_age": null, + "title": "United States sex ratio 2025 - StatisticsTimes.com", + "type": "web_search_result", + "url": "https://statisticstimes.com/demographics/country/us-sex-ratio.php" + }, + { + "encrypted_content": "[REDACTED_TEXT length=524]", + "page_age": "February 12, 2025", + "title": "What percentage of the US population is transgender? | USAFacts", + "type": "web_search_result", + "url": "https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/" + } + ], + "tool_use_id": "srvtoolu_015Em62X7NiwQJkRvxBMJFXd", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=7056]", + "page_age": "3 weeks ago", + "title": "Race and ethnicity in the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3920]", + "page_age": null, + "title": "Population by race in the U.S. 2024| Statista", + "type": "web_search_result", + "url": "https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6492]", + "page_age": "3 days ago", + "title": "US population by year, race, age, ethnicity, & more | USAFacts", + "type": "web_search_result", + "url": "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5600]", + "page_age": "December 16, 2025", + "title": "How the US Census Measures Race and What Americans Think About It | Pew Research Center", + "type": "web_search_result", + "url": "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5488]", + "page_age": "February 21, 2025", + "title": "United States Population by Race & Ethnicity - 2025 Update | Neilsberg", + "type": "web_search_result", + "url": "https://www.neilsberg.com/insights/united-states-population-by-race/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4288]", + "page_age": "September 18, 2024", + "title": "U.S. Population Racial Breakdown (1990-2023)", + "type": "web_search_result", + "url": "https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4308]", + "page_age": "May 21, 2021", + "title": "Mapped: Visualizing the U.S. Population by Race", + "type": "web_search_result", + "url": "https://www.visualcapitalist.com/visualizing-u-s-population-by-race/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4280]", + "page_age": null, + "title": "Exploring the Racial and Ethnic Diversity of Various Age Groups", + "type": "web_search_result", + "url": "https://www.census.gov/newsroom/blogs/random-samplings/2023/09/exploring-diversity.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6392]", + "page_age": null, + "title": "The Chance That Two People Chosen at Random Are of Different Race or Ethnicity Groups Has Increased Since 2010", + "type": "web_search_result", + "url": "https://www.census.gov/library/stories/2021/08/2020-united-states-population-more-racially-ethnically-diverse-than-2010.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=7504]", + "page_age": "1 day ago", + "title": "Demographics of the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" + } + ], + "tool_use_id": "srvtoolu_01XA8ER12skDr1HKK7g9apGF", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01LPR1QxbYbXVUUnMv4Q34m9", + "input": { + "query": "US urban suburban rural population share 2024 census region Northeast Southeast Midwest Southwest West Coast distribution" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01JJWaNGQNF3FcoVtufFcY8u", + "input": { + "query": "US 2024 institutional trust media government science Gallup Pew political identity party affiliation midterm turnout 2026 Big Five personality norms Americans" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=1704]", + "page_age": null, + "title": "Nation\u2019s Urban and Rural Populations Shift Following 2020 Census", + "type": "web_search_result", + "url": "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5600]", + "page_age": "April 14, 2024", + "title": "Demographic and economic trends in urban, suburban and rural communities", + "type": "web_search_result", + "url": "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5532]", + "page_age": "July 16, 2025", + "title": "Urban/Rural Population Split in the U.S. - Population Education", + "type": "web_search_result", + "url": "https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=352]", + "page_age": null, + "title": "United States Population Growth by Region", + "type": "web_search_result", + "url": "https://www.census.gov/popclock/data_tables.php?component=growth" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4372]", + "page_age": "September 20, 2025", + "title": "Urbanization in the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Urbanization_in_the_United_States" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5432]", + "page_age": null, + "title": "Classification of urban, suburban, and rural areas in the ...", + "type": "web_search_result", + "url": "https://bjs.ojp.gov/content/pub/pdf/cusrancvs.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=352]", + "page_age": null, + "title": "Urban and Rural", + "type": "web_search_result", + "url": "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=320]", + "page_age": null, + "title": "Census Bureau\u2019s Urban and Rural Classification", + "type": "web_search_result", + "url": "https://transportation.org/census-transportation-solutions/wp-content/uploads/sites/81/2024/05/CensusBureauUrbanRuralClassificationandOverview_BKT_VOsier1.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6316]", + "page_age": "March 9, 2022", + "title": "US population disperses to suburbs, exurbs, rural areas, and \u201cmiddle of the country\u201d metros | Brookings", + "type": "web_search_result", + "url": "https://www.brookings.edu/articles/us-population-disperses-to-suburbs-exurbs-rural-areas-and-middle-of-the-country-metros/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=372]", + "page_age": null, + "title": "Population Change by Region", + "type": "web_search_result", + "url": "https://www.census.gov/content/dam/Census/library/visualizations/2024/comm/change-by-region-2024.pdf" + } + ], + "tool_use_id": "srvtoolu_01LPR1QxbYbXVUUnMv4Q34m9", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=5632]", + "page_age": "December 1, 2025", + "title": "U.S. Trust in Government Depends Upon Party Control", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/697421/trust-government-depends-upon-party-control.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4028]", + "page_age": "November 21, 2025", + "title": "The State of Public Trust in Government 2025 \u2022 Partnership for Public Service", + "type": "web_search_result", + "url": "https://ourpublicservice.org/publications/the-state-of-public-trust-in-government-2025/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5564]", + "page_age": "October 17, 2024", + "title": "Americans' Deepening Mistrust of Institutions | The Pew Charitable Trusts", + "type": "web_search_result", + "url": "https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5256]", + "page_age": "March 26, 2025", + "title": "U.S. Political Parties Historically Polarized Ideologically", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/655190/political-parties-historically-polarized-ideologically.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3108]", + "page_age": "December 16, 2025", + "title": "Party Affiliation Fact Sheet (NPORS) | Pew Research Center", + "type": "web_search_result", + "url": "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5224]", + "page_age": "2 weeks ago", + "title": "New High of 45% in U.S. Identify as Political Independents", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1364]", + "page_age": "October 23, 2024", + "title": "Pew Research Center | Numbers, Facts and Trends Shaping Your World", + "type": "web_search_result", + "url": "https://www.pewresearch.org/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5164]", + "page_age": "March 26, 2025", + "title": "20 Gallup Trends to Watch in 2025", + "type": "web_search_result", + "url": "https://news.gallup.com/opinion/gallup/654479/gallup-trends-watch-2025.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=396]", + "page_age": "June 27, 2025", + "title": "Behind Trump's 2024 Victory: Turnout, Voting Patterns and Demographics | Pew Research Center", + "type": "web_search_result", + "url": "https://www.pewresearch.org/politics/2025/06/26/behind-trumps-2024-victory-a-more-racially-and-ethnically-diverse-voter-coalition/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5404]", + "page_age": null, + "title": "FOR RELEASE JUNE 26, 2025", + "type": "web_search_result", + "url": "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/06/PP-2025.6.26_validated-voters_report.pdf" + } + ], + "tool_use_id": "srvtoolu_01JJWaNGQNF3FcoVtufFcY8u", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=277]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDCAJue2+bZUVfXgJ3RoM/DmDVqHdM0RqPhOvIjC6wXxYbl9iHP8OrlwxV++BxlXJ90jCnmmhUatfoL3JF2AUvXoLBIB+UwuSAutpbIoqFPolB1IW4NCOoc69xJcZbNzFFt+1GAQ=", + "title": "An Aging Nation: U.S. Median Age Surpassed 39 in 2024", + "type": "web_search_result_location", + "url": "https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html" + } + ], + "text": "[REDACTED_TEXT length=36]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=103]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpEBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDLIHaqvVyWEmWSHpmRoMOHWIUkKjv+wQy4fYIjBpBaoNtOsHIx+zpvOU/MM2hTbtiGfdNgxqfOR8nxkoYAV8bUIdAHExreJIKHF0XSoqFclgV0CmVp//hxubV7QnmMJl/CM2shgE", + "title": "Demographics of the United States - Wikipedia", + "type": "web_search_result_location", + "url": "https://en.wikipedia.org/wiki/Demographics_of_the_United_States" + } + ], + "text": "[REDACTED_TEXT length=80]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=1]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFWz7XUEC7YDu/c18xoMXb2z0jIN88KPnVR9IjAak/rwUIq+ed9hAsWyWI8Ojn++NCLKSREi3jEkYr9Tfk3dAplxM5iX6EonyE8UwOUqFqZaNqDBe2+KOF4z7qqWK+bd6/YkgXIY...[truncated]", + "title": "What percentage of the US population is transgender? | USAFacts", + "type": "web_search_result_location", + "url": "https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/" + } + ], + "text": "[REDACTED_TEXT length=77]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=23]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDH07XAxJD31TArSzXBoMLEW6WOY5TIW5RhgpIjBcu/+fLSNUBudJepnA0lBuZTDn9JGwRBL6ErQ+Stolhg6zjCXsBGfGgPKh34Da/BEqFomKSvp9znajt09dY7Rpx+ZyJk9qMN4Y...[truncated]", + "title": "How the US Census Measures Race and What Americans Think About It | Pew Research Center", + "type": "web_search_result_location", + "url": "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/" + } + ], + "text": "[REDACTED_TEXT length=102]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=20]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpIBCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDL+UoO+RAU8n9MqdARoM+pBHSdJp0yKnxourIjAPbT3b3PLwncaqptdVLyCPpPlI2N7UcSh7OTWwU1R7zMV8hEirGCjn9qCaRtxlUKYqFtgjPn4NHYGE+42WUlVXmkvf7mQ0N1IY...[truncated]", + "title": "Nation\u2019s Urban and Rural Populations Shift Following 2020 Census", + "type": "web_search_result_location", + "url": "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html" + } + ], + "text": "[REDACTED_TEXT length=89]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=96]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDO4R2InGDhC/hFkFXRoM/ZGg2ZpZu6kuWgaVIjBz0KMjRFmWkLn4EHcuOOPgQn8E0iLhS93o2jYHhWJz4HRuE8NGKBHjsfGKyi1dYhMqFOlHmX20WGJFN8hXPVzT+tQO6ynUGAQ=", + "title": "Americans' Deepening Mistrust of Institutions | The Pew Charitable Trusts", + "type": "web_search_result_location", + "url": "https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions" + } + ], + "text": "[REDACTED_TEXT length=92]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=1]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=144]", + "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDGw21w0iyDS29QFiJRoM0ZEvty5RE5p0yrBUIjAk7BuYLE4mRNqE833wCVx1T/PeCTQ/MauRhmtEr6S63GKDRG92kUZkI7/5bNK7qfcqFEaxBEFF8naT6RcA+Qetxy5H8VOJGAQ=", + "title": "20 Gallup Trends to Watch in 2025", + "type": "web_search_result_location", + "url": "https://news.gallup.com/opinion/gallup/654479/gallup-trends-watch-2025.aspx" + } + ], + "text": "[REDACTED_TEXT length=82]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=27]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDIpkHO9YXUeWs3jSOxoMsyLxWCMoOAy+2qfvIjAvexItziWNezHNlfC9xYUj21Ua67kPI9p8PO7KmSrb/U0hI/IWsvRihaZd/AJ3AScqFFVEESFLGOHUUDV6SS3LD9pU9vdXGAQ=", + "title": "Party Affiliation Fact Sheet (NPORS) | Pew Research Center", + "type": "web_search_result_location", + "url": "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/" + } + ], + "text": "[REDACTED_TEXT length=76]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=1]", + "type": "text", + "parsed_output": null + }, + { + "citations": [ + { + "cited_text": "[REDACTED_TEXT length=153]", + "encrypted_index": "EpABCioIDBgCIiRkZTk5OTNhMy00ZGJmLTQwYTgtOGVmYy1iZWJmMDZmNzY0YWQSDFh0VJfqs8ZiZ3J6+RoMNsh0K/dodD1rhjh+IjBSBvALuracUszgajhZY+cH3lL9pRnRAF94bgWnYmFqgLPvyNC4gwm3+0PmXorWTw4qFDVZr3LMkTrt9umspPNfmsFmwitBGAQ=", + "title": "U.S. Political Parties Historically Polarized Ideologically", + "type": "web_search_result_location", + "url": "https://news.gallup.com/poll/655190/political-parties-historically-polarized-ideologically.aspx" + } + ], + "text": "[REDACTED_TEXT length=52]", + "type": "text", + "parsed_output": null + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=106]", + "type": "text", + "parsed_output": null + }, + { + "id": "toolu_01EZUW11y2qEPUj2aqGupw6H", + "input": { + "attributes": [ + { + "name": "country", + "distribution": { + "type": "categorical", + "options": [ + "United States" + ], + "weights": [ + 1.0 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Categorical weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "https://www.census.gov", + "note": "Universal constant \u2014 all agents are US residents by spec definition" + } + }, + { + "name": "age", + "distribution": { + "type": "normal", + "mean": 46, + "std": 17, + "min": 18, + "max": 80, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 18, + "expression": null, + "reason": "Adults only by spec definition" + }, + { + "type": "hard_max", + "value": 80, + "expression": null, + "reason": "Upper bound per spec definition" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html", + "note": "US median age ~39.6 overall; adult-only (18+) median is ~47. Distribution slightly right-skewed due to aging boomers, approximated with normal truncated at 18\u201380. Largest adult cohort is 30\u201334 per Cen...[truncated]" + } + }, + { + "name": "gender", + "distribution": { + "type": "categorical", + "options": [ + "Male", + "Female", + "Non-binary/Other" + ], + "weights": [ + 0.49, + 0.493, + 0.017 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + }, + { + "type": "spec_expression", + "value": null, + "expression": "len(options)==3", + "reason": "Three gender categories required by spec" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/", + "note": "2020 Census: 50.9% female, 49.1% male overall. USAFacts 2025 Household Pulse data: ~1.70% identify as non-binary or other non-cisgender. Weights adjusted slightly for the adult-only frame where male p...[truncated]" + } + }, + { + "name": "race_ethnicity", + "distribution": { + "type": "categorical", + "options": [ + "White non-Hispanic", + "Black", + "Hispanic/Latino", + "Asian", + "Other/Multiracial" + ], + "weights": [ + 0.577, + 0.121, + 0.19, + 0.059, + 0.053 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + }, + { + "type": "spec_expression", + "value": null, + "expression": "len(options)==5", + "reason": "Five race/ethnicity categories per spec" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/", + "note": "2020 Census: White non-Hispanic 57.8%, Hispanic 18.7%, Black 12.1%, Asian 5.9%, Two+ races 4.1%, other <1%. 'Other/Multiracial' consolidates AIAN, NHPI, Some Other Race, and Two or More Races. Slight ...[truncated]" + } + }, + { + "name": "us_region", + "distribution": { + "type": "categorical", + "options": [ + "Northeast", + "Southeast", + "Midwest", + "Southwest", + "West Coast" + ], + "weights": [ + 0.175, + 0.255, + 0.205, + 0.165, + 0.2 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + }, + { + "type": "spec_expression", + "value": null, + "expression": "len(options)==5", + "reason": "Five region categories per spec" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", + "note": "Census defines 4 regions (Northeast ~18%, Midwest ~21%, South ~38%, West ~23%). Spec uses 5 regions splitting South into Southeast and Southwest (~60/40 split of South), and West into Southwest and We...[truncated]" + } + }, + { + "name": "urban_rural", + "distribution": { + "type": "categorical", + "options": [ + "Urban", + "Suburban", + "Rural" + ], + "weights": [ + 0.235, + 0.545, + 0.22 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + }, + { + "type": "spec_expression", + "value": null, + "expression": "len(options)==3", + "reason": "Three urbanicity categories per spec" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/", + "note": "Pew Research found ~14% rural, with ~46M rural, ~175M suburban, ~98M urban (2018). 2020 Census: 81% urban broadly defined, but this includes suburbs. Pew self-report surveys consistently show ~26% urb...[truncated]" + } + }, + { + "name": "openness", + "distribution": { + "type": "normal", + "mean": 0.525, + "std": 0.175, + "min": 0.0, + "max": 1.0, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0.0, + "expression": null, + "reason": "Normalized 0\u20131 scale lower bound" + }, + { + "type": "hard_max", + "value": 1.0, + "expression": null, + "reason": "Normalized 0\u20131 scale upper bound" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Soto, C. J., & John, O. P. (2017). The next Big Five Inventory. Journal of Research in Personality.", + "note": "US Big Five norms (Soto et al. 2011, JPSP): Openness T-score mean ~50 (population normed). On 0\u20131 scale, population mean ~0.525 with SD ~0.175. US adults score slightly above midpoint on Openness. Dis...[truncated]" + } + }, + { + "name": "conscientiousness", + "distribution": { + "type": "normal", + "mean": 0.565, + "std": 0.165, + "min": 0.0, + "max": 1.0, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0.0, + "expression": null, + "reason": "Normalized 0\u20131 scale lower bound" + }, + { + "type": "hard_max", + "value": 1.0, + "expression": null, + "reason": "Normalized 0\u20131 scale upper bound" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Soto, C. J., et al. (2011). Age differences in personality traits from 10 to 65. Journal of Personality and Social Psychology.", + "note": "US adults score above midpoint on Conscientiousness; it increases with age. Population mean ~0.565 (above neutral), SD ~0.165. Slightly higher mean than Openness reflecting American cultural emphasis ...[truncated]" + } + }, + { + "name": "extraversion", + "distribution": { + "type": "normal", + "mean": 0.515, + "std": 0.18, + "min": 0.0, + "max": 1.0, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0.0, + "expression": null, + "reason": "Normalized 0\u20131 scale lower bound" + }, + { + "type": "hard_max", + "value": 1.0, + "expression": null, + "reason": "Normalized 0\u20131 scale upper bound" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Rentfrow, P. J., et al. (2013). Divided we stand: Three psychological regions of the United States. Journal of Personality and Social Psychology.", + "note": "US adults are broadly extraverted relative to global norms, but the distribution is approximately symmetric around midpoint. Rentfrow et al. found regional variation; national mean ~0.515, SD ~0.18." + } + }, + { + "name": "agreeableness", + "distribution": { + "type": "normal", + "mean": 0.56, + "std": 0.16, + "min": 0.0, + "max": 1.0, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0.0, + "expression": null, + "reason": "Normalized 0\u20131 scale lower bound" + }, + { + "type": "hard_max", + "value": 1.0, + "expression": null, + "reason": "Normalized 0\u20131 scale upper bound" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Soto, C. J., et al. (2011). Age differences in personality traits from 10 to 65. Journal of Personality and Social Psychology.", + "note": "Agreeableness is above midpoint in US population norms; increases with age. Mean ~0.56, SD ~0.16. Women score slightly higher than men on average." + } + }, + { + "name": "neuroticism", + "distribution": { + "type": "normal", + "mean": 0.46, + "std": 0.175, + "min": 0.0, + "max": 1.0, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0.0, + "expression": null, + "reason": "Normalized 0\u20131 scale lower bound" + }, + { + "type": "hard_max", + "value": 1.0, + "expression": null, + "reason": "Normalized 0\u20131 scale upper bound" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Soto, C. J., et al. (2011). Age differences in personality traits from 10 to 65. Journal of Personality and Social Psychology.", + "note": "Neuroticism is below midpoint on average for US adults and declines with age. Women score higher than men. Mean ~0.46, SD ~0.175. Post-pandemic era data suggests slightly elevated population anxiety, ...[truncated]" + } + }, + { + "name": "tech_adoption_posture", + "distribution": { + "type": "categorical", + "options": [ + "Technophobe/Avoider", + "Late Adopter", + "Mainstream/Pragmatist", + "Early Majority", + "Early Adopter/Enthusiast" + ], + "weights": [ + 0.08, + 0.17, + 0.38, + 0.22, + 0.15 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Rogers, E.M. Diffusion of Innovations (2003); Pew Research Center Internet & Technology surveys 2023\u20132024", + "note": "Rogers' diffusion curve: innovators 2.5%, early adopters 13.5%, early majority 34%, late majority 34%, laggards 16%. Adjusted upward for overall digital penetration (Pew: 93% of US adults use internet...[truncated]" + } + }, + { + "name": "primary_info_source", + "distribution": { + "type": "categorical", + "options": [ + "Cable/Broadcast TV News", + "Social Media", + "Online News Sites", + "Podcasts/Talk Radio", + "Local News (print/TV)", + "No Regular News" + ], + "weights": [ + 0.27, + 0.26, + 0.19, + 0.12, + 0.1, + 0.06 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Pew Research Center (2024), 'News Platform Fact Sheet'; Reuters Institute Digital News Report 2024", + "note": "Pew 2024: TV remains top news source (~27% primary), social media rising sharply (~26%), digital/online ~19%, radio/podcast ~12%, print and local ~10%. 'No regular news' ~6% (news avoiders). Weights r...[truncated]" + } + }, + { + "name": "institutional_trust", + "distribution": { + "type": "categorical", + "options": [ + "High trust (trusts most institutions)", + "Moderate trust (selective skepticism)", + "Low trust (distrusts most)", + "Conspiratorial/Anti-institutional" + ], + "weights": [ + 0.15, + 0.35, + 0.35, + 0.15 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "https://news.gallup.com/poll/697421/trust-government-depends-upon-party-control.aspx; https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions", + "note": "Pew spring 2024: only 22% trust federal government always/most of the time. Gallup 2024: 31% trust mass media. Gallup: trust in institutions near 5-decade lows. 'High trust' ~15% consistent with share...[truncated]" + } + }, + { + "name": "financial_margin", + "distribution": { + "type": "categorical", + "options": [ + "Comfortable (3+ months savings, low debt)", + "Stable (1\u20133 months buffer)", + "Tight (paycheck-to-paycheck, some savings)", + "Distressed (paycheck-to-paycheck, no buffer)", + "Severely stressed (debt crisis/underwater)" + ], + "weights": [ + 0.22, + 0.2, + 0.28, + 0.2, + 0.1 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Federal Reserve Board, Report on the Economic Well-Being of U.S. Households (SHED) 2023; LendingClub/PYMNTS Paycheck-to-Paycheck Report 2024", + "note": "Fed SHED 2023: 63% of adults could cover a $400 emergency with cash. LendingClub 2024: ~65% of Americans living paycheck to paycheck. ~22% comfortable (3+ months savings), ~20% stable, ~28% tight P2P ...[truncated]" + } + }, + { + "name": "employment_sector", + "distribution": { + "type": "categorical", + "options": [ + "Private sector employee", + "Federal government", + "State/local government", + "Self-employed/Small business", + "Gig/contract worker", + "Retired", + "Not employed (student/caregiver/unemployed)" + ], + "weights": [ + 0.445, + 0.03, + 0.115, + 0.095, + 0.06, + 0.175, + 0.08 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Bureau of Labor Statistics, Employment Situation 2024; Census Bureau CPS 2024", + "note": "BLS 2024: ~158M employed; federal civilian ~3M (1.9% of workforce), state/local ~20M (~12.5%), self-employed ~16M (~10%), gig ~6-10% of workforce. Retired ~18-20% of adults 18-80. Private sector domin...[truncated]" + } + }, + { + "name": "consumer_identity", + "distribution": { + "type": "categorical", + "options": [ + "Brand loyal", + "Price-driven/Frugal", + "Values-driven/Ethical", + "Convenience-first", + "Trend-follower" + ], + "weights": [ + 0.24, + 0.32, + 0.18, + 0.18, + 0.08 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "McKinsey Consumer Pulse 2024; NielsenIQ Value and Private Label Trends 2024", + "note": "Post-inflation era: price sensitivity dominant (~32%). Brand loyalty weakened but stable (~24%). Values-driven/ethical consumption growing especially among younger adults (~18%). Convenience-first ~18...[truncated]" + } + }, + { + "name": "social_media_behavior", + "distribution": { + "type": "categorical", + "options": [ + "Non-user", + "Passive consumer (lurks only)", + "Occasional poster", + "Active poster/commenter", + "Influencer/Content creator" + ], + "weights": [ + 0.12, + 0.33, + 0.28, + 0.21, + 0.06 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Pew Research Center Social Media Use 2024; Nielsen Social Media Usage Report 2024", + "note": "Pew 2024: ~88% of adults use at least one social media platform. However, 1% rule of internet participation: ~90% lurk, 9% contribute, 1% create. Adjusted for modern platforms: ~12% non-users (older a...[truncated]" + } + }, + { + "name": "investment_financial_literacy", + "distribution": { + "type": "categorical", + "options": [ + "No investments (unbanked/cash only)", + "Bank savings only", + "401k/IRA only (passive)", + "Active investor (stocks/funds)", + "Crypto holder", + "Diversified sophisticated investor" + ], + "weights": [ + 0.08, + 0.17, + 0.32, + 0.18, + 0.08, + 0.17 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Federal Reserve SCF 2022; Gallup Investor Optimism Survey 2024; FINRA Investor Education Foundation 2024", + "note": "Fed SCF 2022: ~55% of families own stock (directly or indirectly). ~58% have retirement accounts. FINRA: ~17% low financial literacy unbanked/cash-only. Crypto: Pew 2023 found ~17% of US adults have i...[truncated]" + } + }, + { + "name": "religious_engagement", + "distribution": { + "type": "categorical", + "options": [ + "Secular/Non-religious", + "Spiritual but not religious", + "Nominally affiliated (low practice)", + "Moderately religious (regular attendance)", + "Devout (faith central to life)" + ], + "weights": [ + 0.26, + 0.17, + 0.2, + 0.2, + 0.17 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Pew Research Center Religious Landscape Study 2023\u20132024; Gallup Church Attendance 2024", + "note": "Pew 2024: ~29% identify as religiously unaffiliated ('nones'). ~17% spiritual-but-not-religious. Gallup 2024: Church membership ~47%, but weekly attendance ~22%. 'Devout' ~17% (weekly+ attendance, fai...[truncated]" + } + }, + { + "name": "political_identity", + "distribution": { + "type": "categorical", + "options": [ + "Strong Democrat", + "Moderate Democrat/Lean Dem", + "True Independent (no lean)", + "Moderate Republican/Lean Rep", + "Strong Republican", + "Single-issue voter", + "Politically disengaged" + ], + "weights": [ + 0.155, + 0.175, + 0.085, + 0.165, + 0.165, + 0.075, + 0.18 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/; https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx", + "note": "Pew 2025: 46% Rep/lean Rep, 45% Dem/lean Dem, ~9% pure independent. Gallup 2025: 45% identify as independents (highest ever), with leaners. Strong partisans ~31-33% of all adults. 'Disengaged' ~18% (n...[truncated]" + } + }, + { + "name": "vote_2024_presidential", + "distribution": { + "type": "categorical", + "options": [ + "Voted Trump", + "Voted Harris", + "Voted third party", + "Did not vote", + "Not eligible to vote" + ], + "weights": [ + 0.295, + 0.285, + 0.02, + 0.285, + 0.115 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Federal Election Commission 2024 results; Pew Research Center validated voter study June 2025", + "note": "Trump 49.9M / Harris 48.4M popular vote among ~155M voters cast. VEP turnout ~65%. Among all adults 18+: ~64% are eligible citizens who could vote; ~37% of total adults voted for one of the two major ...[truncated]" + } + }, + { + "name": "congressional_district_competitiveness", + "distribution": { + "type": "categorical", + "options": [ + "Safe Republican (R+10 or more)", + "Lean Republican (R+5 to R+10)", + "Swing/Competitive (within 5 points)", + "Lean Democratic (D+5 to D+10)", + "Safe Democratic (D+10 or more)" + ], + "weights": [ + 0.345, + 0.095, + 0.12, + 0.095, + 0.345 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Cook Political Report 2024 House ratings; Dave's Redistricting App PVI 2024", + "note": "Cook Political 2024: Of 435 House seats, ~185 Solid R, ~40 Likely/Lean R, ~50 Competitive, ~40 Likely/Lean D, ~120 Solid D. Population-weighted (safe seats have fewer competitive voters but larger geo...[truncated]" + } + }, + { + "name": "midterm_turnout_propensity", + "distribution": { + "type": "categorical", + "options": [ + "Always votes (every election)", + "Usually votes (most midterms)", + "Sometimes votes (presidential only or inconsistent)", + "Rarely votes (1-2 times ever)", + "Never votes / not registered" + ], + "weights": [ + 0.225, + 0.175, + 0.255, + 0.145, + 0.2 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "US Elections Project (Michael McDonald) 2022 midterm turnout data; Pew Research habitual voter analysis 2023", + "note": "2022 midterm VEP turnout ~46.8% (US Elections Project). 2024 presidential ~65%. Habitual midterm voters ~22.5%. 'Usually' ~17.5%. 'Sometimes/presidential-only' ~25.5% (explains the 18-20 point preside...[truncated]" + } + }, + { + "name": "issue_salience_2026", + "distribution": { + "type": "categorical", + "options": [ + "Economy/Jobs/Inflation", + "Immigration/Border", + "Democracy/Rule of Law", + "Healthcare/Costs", + "Abortion/Reproductive Rights", + "Climate/Environment", + "Education/Schools", + "AI/Technology Disruption" + ], + "weights": [ + 0.28, + 0.16, + 0.15, + 0.145, + 0.105, + 0.06, + 0.055, + 0.045 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Gallup Most Important Problem survey Jan 2026; Pew Research top issues 2025; AP-NORC Issue Priority poll 2025", + "note": "Economy/inflation consistently #1 in Gallup MIP 2024-2025 (~28%). Immigration #2 post-2024 election (~16%). Democracy/rule-of-law elevated post-Jan 6 and 2025 executive actions (~15%). Healthcare pere...[truncated]" + } + }, + { + "name": "approval_current_direction", + "distribution": { + "type": "categorical", + "options": [ + "Strongly approve", + "Somewhat approve", + "Neutral/Mixed", + "Somewhat disapprove", + "Strongly disapprove" + ], + "weights": [ + 0.175, + 0.185, + 0.105, + 0.165, + 0.37 + ], + "mean": null, + "std": null, + "min": null, + "max": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "value": null, + "expression": "sum(weights)==1", + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Gallup Right Direction/Wrong Track poll Feb 2026; RealClearPolitics direction of country average Jan-Feb 2026", + "note": "RCP average Jan-Feb 2026: ~30-34% right direction, ~58-62% wrong track. 'Strongly approve' current direction ~17.5% (core MAGA base). 'Somewhat approve' ~18.5%. 'Neutral/mixed' ~10.5%. 'Somewhat disap...[truncated]" + } + } + ] + }, + "name": "independent_hydration", + "type": "tool_use", + "caller": { + "type": "direct" + } + } + ], + "model": "claude-sonnet-4-6", + "role": "assistant", + "stop_reason": "tool_use", + "stop_sequence": null, + "type": "message", + "usage": { + "cache_creation": { + "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", + "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" + }, + "cache_creation_input_tokens": "[REDACTED_SECRET]", + "cache_read_input_tokens": "[REDACTED_SECRET]", + "input_tokens": 104600, + "output_tokens": 10109, + "server_tool_use": { + "web_search_requests": 5, + "web_fetch_requests": 0 + }, + "service_tier": "standard", + "inference_geo": "global" + } + }, + "sources_extracted": [ + "https://www.census.gov/popclock/data_tables.php?component=growth", + "https://transportation.org/census-transportation-solutions/wp-content/uploads/sites/81/2024/05/CensusBureauUrbanRuralClassificationandOverview_BKT_VOsier1.pdf", + "https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States", + "https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions", + "https://bjs.ojp.gov/content/pub/pdf/cusrancvs.pdf", + "https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/", + "https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html", + "https://www.visualcapitalist.com/u-s-population-by-age-group/", + "https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/", + "https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html", + "https://williamsinstitute.law.ucla.edu/publications/nonbinary-lgbtq-adults-us/", + "https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/", + "https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/", + "https://ourpublicservice.org/publications/the-state-of-public-trust-in-government-2025/", + "https://www.pewresearch.org/politics/2025/06/26/behind-trumps-2024-victory-a-more-racially-and-ethnically-diverse-voter-coalition/", + "https://statisticstimes.com/demographics/country/us-sex-ratio.php", + "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/", + "https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html", + "https://www.neilsberg.com/insights/united-states-population-by-gender/", + "https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/", + "https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/", + "https://www.brookings.edu/articles/us-population-disperses-to-suburbs-exurbs-rural-areas-and-middle-of-the-country-metros/", + "https://en.wikipedia.org/wiki/Urbanization_in_the_United_States", + "https://en.wikipedia.org/wiki/Demographics_of_the_United_States", + "https://www.pewresearch.org/wp-content/uploads/sites/20/2025/06/PP-2025.6.26_validated-voters_report.pdf", + "https://www.generationtechblog.com/p/the-surprising-number-of-young-adults", + "https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/", + "https://theworlddata.com/population-by-gender-in-us/", + "https://news.gallup.com/poll/697421/trust-government-depends-upon-party-control.aspx", + "https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/", + "https://www.pewresearch.org/", + "https://www.neilsberg.com/insights/united-states-population-by-race/", + "https://news.gallup.com/poll/655190/political-parties-historically-polarized-ideologically.aspx", + "https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group", + "https://www.populationpyramid.net/united-states-of-america/2024/", + "https://www.census.gov/library/stories/2021/08/2020-united-states-population-more-racially-ethnically-diverse-than-2010.html", + "https://news.gallup.com/opinion/gallup/654479/gallup-trends-watch-2025.aspx", + "https://www.visualcapitalist.com/visualizing-u-s-population-by-race/", + "https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html", + "https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html", + "https://www.nbcnews.com/nbc-out/out-news/5-percent-young-adults-identify-transgender-nonbinary-us-survey-finds-rcna32315", + "https://www.census.gov/newsroom/blogs/random-samplings/2023/09/exploring-diversity.html", + "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx", + "https://www.census.gov/content/dam/Census/library/visualizations/2024/comm/change-by-region-2024.pdf", + "https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html", + "https://www.census.gov/popclock/data_tables.php?component=pyramid", + "https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/" + ] +} \ No newline at end of file diff --git a/examples/logs/20260220_003406_261756_claude_agentic_research.json b/examples/logs/20260220_003406_261756_claude_agentic_research.json new file mode 100644 index 0000000..5d1d2ca --- /dev/null +++ b/examples/logs/20260220_003406_261756_claude_agentic_research.json @@ -0,0 +1,1397 @@ +{ + "timestamp": "2026-02-20T00:34:06.261800", + "function": "agentic_research", + "provider": "claude", + "request": { + "model": "claude-sonnet-4-6", + "prompt_length": 11675 + }, + "response": { + "id": "msg_01D3MLWTyWDQK5EZowpkJZ2Q", + "content": [ + { + "id": "srvtoolu_01E6A1PpFpyoPm6NhfqUq4dA", + "input": { + "query": "US adult education level distribution by age 2024 Census" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01RpkD7DJXuJLXgVgXuxTAoV", + "input": { + "query": "US household income distribution 2024 median Census" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01T7pyref6iLnsd53VxSqxyj", + "input": { + "query": "US marital status distribution by age 2024" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=504]", + "page_age": null, + "title": "Census Bureau Releases New Educational Attainment Data", + "type": "web_search_result", + "url": "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2568]", + "page_age": "September 10, 2025", + "title": "US Census Bureau Releases New Educational Attainment Data - Stephen's Lighthouse", + "type": "web_search_result", + "url": "https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=504]", + "page_age": "September 17, 2025", + "title": "New Educational Attainment Data Comes From Census | Radio & Television Business Report", + "type": "web_search_result", + "url": "https://rbr.com/new-educational-attainment-data-comes-from-census/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1184]", + "page_age": null, + "title": "Educational Attainment in the United States: 2024", + "type": "web_search_result", + "url": "https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2724]", + "page_age": null, + "title": "Educational Attainment", + "type": "web_search_result", + "url": "https://www.census.gov/topics/education/educational-attainment.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5568]", + "page_age": "January 15, 2025", + "title": "Educational Attainment Statistics [2025]: Levels by Demographic", + "type": "web_search_result", + "url": "https://educationdata.org/education-attainment-statistics" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4508]", + "page_age": null, + "title": "Indicator 27: Educational Attainment", + "type": "web_search_result", + "url": "https://nces.ed.gov/programs/raceindicators/indicator_rfa.asp" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1872]", + "page_age": "September 9, 2025", + "title": "DataPoints: Educational attainment in the U.S. - Community College Daily", + "type": "web_search_result", + "url": "https://www.ccdaily.com/2025/09/datapoints-educational-attainment-in-the-u-s/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6680]", + "page_age": "3 weeks ago", + "title": "Educational attainment in the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1380]", + "page_age": "May 17, 2024", + "title": "Educational Attainment by Age - Race and Ethnicity in Higher Education", + "type": "web_search_result", + "url": "https://www.equityinhighered.org/indicators/u-s-population-trends-and-educational-attainment/educational-attainment-by-age/" + } + ], + "tool_use_id": "srvtoolu_01E6A1PpFpyoPm6NhfqUq4dA", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=4300]", + "page_age": null, + "title": "Income in the United States: 2024", + "type": "web_search_result", + "url": "https://www.census.gov/library/publications/2025/demo/p60-286.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1068]", + "page_age": "September 9, 2025", + "title": "Real Median Household Income in the United States (MEHOINUSA672N) | FRED | St. Louis Fed", + "type": "web_search_result", + "url": "https://fred.stlouisfed.org/series/MEHOINUSA672N" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5268]", + "page_age": null, + "title": "Income in the United States: 2024 - Census.gov", + "type": "web_search_result", + "url": "https://www2.census.gov/library/publications/2025/demo/p60-286.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4880]", + "page_age": null, + "title": "Income in the United States: 2023 - Census.gov", + "type": "web_search_result", + "url": "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4672]", + "page_age": null, + "title": "Income in the United States: 2023", + "type": "web_search_result", + "url": "https://www.census.gov/library/publications/2024/demo/p60-282.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3200]", + "page_age": "September 11, 2025", + "title": "Here's the U.S. median household income for 2024", + "type": "web_search_result", + "url": "https://www.cnbc.com/2025/09/11/us-median-household-income-2024.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=380]", + "page_age": null, + "title": "2024, Release Tables: Real Median Household Income by State, Annual | FRED | St. Louis Fed", + "type": "web_search_result", + "url": "https://fred.stlouisfed.org/release/tables?eid=259515&rid=249" + }, + { + "encrypted_content": "[REDACTED_TEXT length=792]", + "page_age": null, + "title": "Median Household Income", + "type": "web_search_result", + "url": "https://www.census.gov/library/visualizations/2024/comm/median-household-income.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4052]", + "page_age": null, + "title": "Median household income U.S. 2024| Statista", + "type": "web_search_result", + "url": "https://www.statista.com/statistics/200838/median-household-income-in-the-united-states/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4852]", + "page_age": "September 9, 2025", + "title": "Median Household Income in the United States (MEHOINUSA646N) | FRED | St. Louis Fed", + "type": "web_search_result", + "url": "https://fred.stlouisfed.org/series/MEHOINUSA646N" + } + ], + "tool_use_id": "srvtoolu_01RpkD7DJXuJLXgVgXuxTAoV", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=720]", + "page_age": null, + "title": "Marital Status in the United States", + "type": "web_search_result", + "url": "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1320]", + "page_age": null, + "title": "Historical Marital Status Tables", + "type": "web_search_result", + "url": "https://www.census.gov/data/tables/time-series/demo/families/marital.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5460]", + "page_age": null, + "title": "Marital Status Distribution of U.S. Adults Aged 65 and Older, 1990-2022", + "type": "web_search_result", + "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2800]", + "page_age": null, + "title": "Marriage and Divorce", + "type": "web_search_result", + "url": "https://www.census.gov/topics/families/marriage-and-divorce.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1928]", + "page_age": null, + "title": "Marital Status in the United States", + "type": "web_search_result", + "url": "https://statisticalatlas.com/United-States/Marital-Status" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4312]", + "page_age": null, + "title": "Union and Childbearing Characteristics of Women 40-44, 2000-2024", + "type": "web_search_result", + "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-15.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5652]", + "page_age": null, + "title": "Patterns of marriage and divorce from ages 15 to 55: Evidence from the NLSY79 : Monthly Labor Review : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/opub/mlr/2024/article/patterns-of-marriage-and-divorce-from-ages-15-to-55-evidence-from-the-nlsy79.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3828]", + "page_age": null, + "title": "Marriage: More than a Century of Change, 1900-2022", + "type": "web_search_result", + "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-24-10.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4168]", + "page_age": "June 2, 2024", + "title": "What's Behind the Record-Setting Rise of Single Living | Psychology Today", + "type": "web_search_result", + "url": "https://www.psychologytoday.com/us/blog/living-single/202406/the-record-setting-rise-of-single-living-in-the-us" + }, + { + "encrypted_content": "[REDACTED_TEXT length=540]", + "page_age": null, + "title": "Table 5. Employment status of the population by sex, marital status, and presence and age of own children under 18, 2023-2024 annual averages - 2024 A01 Results", + "type": "web_search_result", + "url": "https://www.bls.gov/news.release/famee.t05.htm" + } + ], + "tool_use_id": "srvtoolu_01T7pyref6iLnsd53VxSqxyj", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=177]", + "type": "text", + "parsed_output": null + }, + { + "id": "toolu_01FhE4KBMwGupkksfy8Vt1h9", + "input": { + "attributes": [ + { + "name": "education_level", + "distribution": { + "type": "categorical", + "options": [ + "Less than HS", + "HS diploma/GED", + "Some college", + "Bachelor's degree", + "Graduate degree" + ], + "weights": [ + 0.085, + 0.279, + 0.2, + 0.237, + 0.149 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "US Census Bureau CPS 2024: 8.5% no HS, 27.9% HS only, ~14% some college (no degree), 10.9% assoc (grouped into Some college ~20%), 23.7% bachelor's, 14.9% graduate", + "note": "Ages 18-24 skew toward less education (still in school); modifiers will shift based on age. Base reflects the 25+ adult population overall distribution from Census 2024 data." + } + }, + { + "name": "household_income", + "distribution": { + "type": "lognormal", + "mean": 83730, + "std": 72000, + "min": 0, + "max": 500000, + "mean_formula": null, + "std_formula": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0, + "expression": null, + "reason": "Income cannot be negative" + }, + { + "type": "hard_max", + "value": 500000, + "expression": null, + "reason": "Hard ceiling; top-coding above $500k consistent with CPS methodology" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "US Census Bureau Income in the United States: 2024 \u2014 median household income $83,730", + "note": "Lognormal chosen because income is right-skewed. Std reflects wide dispersion (10th pct ~$16k, 90th pct ~$175k). Modifiers will shift mean based on education_level, us_region, and urban_rural." + } + }, + { + "name": "marital_status", + "distribution": { + "type": "categorical", + "options": [ + "Married/partnered", + "Single", + "Divorced/separated", + "Widowed" + ], + "weights": [ + 0.49, + 0.32, + 0.14, + 0.05 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Census Bureau marital status data: ~49% of adults 15+ are married; ~51% unmarried (divorced, widowed, never married). Psychology Today 2024 analysis of Census data.", + "note": "Widowed weight is low at base because widowhood is heavily age-concentrated (65+). Modifiers will sharply increase Widowed for older age groups and increase Single for 18-30. Median first marriage age...[truncated]" + } + }, + { + "name": "household_size", + "distribution": { + "type": "normal", + "mean": 2.53, + "std": 1.4, + "min": 1, + "max": 8, + "mean_formula": null, + "std_formula": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 1, + "expression": null, + "reason": "At least one person (the respondent) lives in household" + }, + { + "type": "hard_max", + "value": 8, + "expression": null, + "reason": "Households above 8 are extremely rare; tail truncation acceptable" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "US Census Bureau ACS: average household size 2.53 persons in 2023. Married-couple households average 3.1; single-person 1.0.", + "note": "Modifiers will increase mean for Married/partnered and decrease for Single/Widowed. Distribution is approximately normal after truncation." + } + }, + { + "name": "has_children", + "distribution": { + "type": "boolean", + "probability_true": 0.28, + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null + }, + "constraints": [ + { + "type": "expression", + "expression": "has_children == False or age >= 18", + "value": null, + "reason": "Only adults can have children in household" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Census Bureau estimates: ~28% of households have own children under 18 present. Declines sharply once householder is 55+.", + "note": "Base 28% reflects all adults 18-80. Modifiers will significantly reduce probability for age > 55 and for Single/Widowed. Will increase for Married/partnered and ages 25-45." + } + }, + { + "name": "employment_sector", + "distribution": { + "type": "categorical", + "options": [ + "Federal government", + "State/local government", + "Private sector", + "Gig/contract", + "Self-employed", + "Retired", + "Unemployed", + "Not in labor force" + ], + "weights": [ + 0.03, + 0.13, + 0.49, + 0.06, + 0.09, + 0.13, + 0.04, + 0.03 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "BLS Current Employment Statistics 2024: federal ~2.9M (~2% of 160M workforce); state/local ~20M (~13%); private ~130M (~82% of employed). Gig/self-employed estimated from multiple BLS/Census sources.", + "note": "Modifiers will sharply increase Retired for age 65+ and decrease Private sector. Gig/contract undercount is a known challenge; 6% is a conservative estimate." + } + }, + { + "name": "job_security_perception", + "distribution": { + "type": "categorical", + "options": [ + "Very secure", + "Somewhat secure", + "Somewhat insecure", + "Very insecure", + "N/A - not employed" + ], + "weights": [ + 0.3, + 0.35, + 0.17, + 0.08, + 0.1 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Gallup Work and Education poll 2023: ~60% of workers feel secure; Pew Research 2023 job satisfaction data. Gallup finds ~25% of workers somewhat/very worried about job loss.", + "note": "N/A bucket (~10%) covers Retired + Unemployed + Not in labor force. Modifiers will assign N/A to non-employed employment_sector values and shift insecurity upward for Gig/contract." + } + }, + { + "name": "financial_margin", + "distribution": { + "type": "categorical", + "options": [ + "Comfortable savings buffer", + "Modest buffer", + "Paycheck-to-paycheck", + "In debt/deficit" + ], + "weights": [ + 0.23, + 0.27, + 0.33, + 0.17 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "LendingClub/PYMNTS 2024 report: ~62% of Americans living paycheck to paycheck at some level. Federal Reserve Survey of Consumer Finances: ~37% could not cover $400 emergency.", + "note": "Combined paycheck-to-paycheck + in debt = 50%, reflecting mid-2024 conditions. Modifiers will strongly shift based on household_income tier." + } + }, + { + "name": "investment_profile", + "distribution": { + "type": "categorical", + "options": [ + "No investments", + "401k/IRA only", + "Diversified investor", + "Active trader", + "Crypto holder" + ], + "weights": [ + 0.29, + 0.38, + 0.18, + 0.07, + 0.08 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Federal Reserve SCF 2022: ~54% of families own stocks directly or through retirement accounts. Gallup 2024: 62% of Americans own stock (all-time high). Crypto ownership ~15-20% (NORC 2024).", + "note": "Crypto holder is not mutually exclusive but modeled as primary profile. Active trader and Crypto holder are youthful-skewing categories. Modifiers increase 401k/IRA for higher income and older workers...[truncated]" + } + }, + { + "name": "primary_info_source", + "distribution": { + "type": "categorical", + "options": [ + "Cable/broadcast TV news", + "Social media", + "Online news sites", + "Podcasts", + "Local news", + "Print media", + "Avoids news" + ], + "weights": [ + 0.27, + 0.22, + 0.2, + 0.08, + 0.1, + 0.04, + 0.09 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Pew Research Center 2024 State of News Media: TV still leads at ~27%; social media now #2 source for news, especially for under-30. Reuters Institute Digital News Report 2024 confirms social media at ...[truncated]", + "note": "Age modifiers will be critical: 65+ skews heavily toward TV; 18-34 skews toward social media and podcasts. Education modifiers will push toward online news and podcasts for degree holders." + } + }, + { + "name": "social_media_behavior", + "distribution": { + "type": "categorical", + "options": [ + "Non-user", + "Passive consumer", + "Occasional poster", + "Active poster/Influencer" + ], + "weights": [ + 0.12, + 0.43, + 0.33, + 0.12 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Pew Research Center 2024: 72% of US adults use social media. ~1% are true influencers; majority are passive consumers. Sprout Social 2024: most users read but rarely post.", + "note": "Non-user at 12% aligns with Pew's ~28% non-user rate adjusted for age band (18-80 vs. 18+). Modifiers will increase Non-user for 70+ age group and increase Active poster for 18-35." + } + }, + { + "name": "tech_adoption_posture", + "distribution": { + "type": "categorical", + "options": [ + "Technophobe/Avoider", + "Late majority adopter", + "Early majority adopter", + "Early adopter", + "Innovator" + ], + "weights": [ + 0.16, + 0.26, + 0.34, + 0.18, + 0.06 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Rogers' Diffusion of Innovations model: Innovators ~2.5%, Early Adopters ~13.5%, Early Majority ~34%, Late Majority ~34%, Laggards ~16%. Adapted to 5-bucket mapping.", + "note": "Classic Rogers distribution mapped to 5 categories. Base reflects the theoretical population split; modifiers will shift heavily for age (older = more laggard) and education (higher ed = more early ad...[truncated]" + } + }, + { + "name": "religious_engagement", + "distribution": { + "type": "categorical", + "options": [ + "Secular/None", + "Nominally affiliated", + "Moderately religious", + "Devout" + ], + "weights": [ + 0.28, + 0.25, + 0.28, + 0.19 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Pew Research 2023-2024: ~28% religiously unaffiliated ('nones'); ~63% identify as Christian but practicing rates are lower. Gallup 2024: ~45% attend services monthly or more.", + "note": "Devout (~19%) reflects weekly+ worship attendance. Modifiers will increase Devout/Moderate for Southeast and rural areas, and increase Secular for Northeast and West Coast." + } + }, + { + "name": "political_identity", + "distribution": { + "type": "categorical", + "options": [ + "Strong Democrat", + "Lean Democrat", + "True Independent", + "Lean Republican", + "Strong Republican" + ], + "weights": [ + 0.18, + 0.15, + 0.22, + 0.14, + 0.17 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Gallup 2024 party ID tracking: ~27% Dem, ~27% Rep, ~43% Independent (with leaners splitting roughly evenly). Pew Research 2024 validates similar split with strong partisans ~17-18% each.", + "note": "True Independent at 22% is the pure no-lean group; leaners are about 14-15% each. Weights reflect a roughly even political landscape consistent with competitive 2024 election outcome. Strong partisans...[truncated]" + } + }, + { + "name": "political_engagement_level", + "distribution": { + "type": "categorical", + "options": [ + "Disengaged", + "Single-issue voter", + "Moderate/occasional participant", + "Highly engaged partisan" + ], + "weights": [ + 0.22, + 0.18, + 0.38, + 0.22 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "ANES 2024 pilot; Pew Research political engagement typology 2023. Roughly 20-25% disengage from politics; ~22% are highly engaged partisans who follow news daily and donate/volunteer.", + "note": "Modifiers will link Strong Democrat/Republican to Highly Engaged, and True Independent to Disengaged/Moderate. Age modifier: 18-25 skews Disengaged; 55+ skews Highly Engaged." + } + }, + { + "name": "vote_2024_presidential", + "distribution": { + "type": "categorical", + "options": [ + "Trump", + "Harris", + "Third party", + "Did not vote", + "Not eligible" + ], + "weights": [ + 0.3, + 0.29, + 0.03, + 0.3, + 0.08 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "2024 Presidential election: Trump 49.9%, Harris 48.4% of popular vote. Voter turnout ~63% of VEP (~245M eligible). Non-citizen and under-18 adults account for ~8% Not eligible.", + "note": "Did not vote (~30%) reflects ~37% of VEP non-voters scaled to adult population including ineligible. Third party ~3% reflects Stein + Kennedy + others combined. Modifiers will tightly link to politica...[truncated]" + } + }, + { + "name": "midterm_turnout_propensity", + "distribution": { + "type": "categorical", + "options": [ + "Always votes", + "Sometimes votes", + "Rarely votes", + "Never votes" + ], + "weights": [ + 0.38, + 0.28, + 0.19, + 0.15 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "2022 midterm VEP turnout ~47% (US Elections Project). 2018 was 53%. Historical midterm always-voters ~35-40% of adults. Catalist/voter file data show ~35% of adults vote in nearly every election.", + "note": "Always votes ~38% consistent with high-turnout midterm baseline. Modifiers will increase Always votes for 55+, Highly engaged partisans, and Strong partisan identifiers; decrease for 18-30." + } + }, + { + "name": "congressional_district_competitiveness", + "distribution": { + "type": "categorical", + "options": [ + "Safe Republican", + "Lean Republican", + "Swing district", + "Lean Democrat", + "Safe Democrat" + ], + "weights": [ + 0.35, + 0.12, + 0.1, + 0.12, + 0.31 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Cook Political Report 2024 cycle district ratings: ~35 competitive/lean seats out of 435 (~8% swing). Safe R ~200 seats, Safe D ~180, Lean R ~25, Lean D ~20, Toss-up ~10.", + "note": "Population-weighted distribution, not seat-weighted. Swing districts contain fewer people than safe districts but receive outsized political attention. Modifiers will key off us_region and urban_rural...[truncated]" + } + }, + { + "name": "top_issue_2026", + "distribution": { + "type": "categorical", + "options": [ + "Economy/Jobs", + "Abortion/Reproductive rights", + "Immigration", + "Democracy/Rule of law", + "Healthcare", + "Climate", + "Education", + "AI/Technology" + ], + "weights": [ + 0.28, + 0.13, + 0.16, + 0.14, + 0.12, + 0.07, + 0.06, + 0.04 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Gallup Most Important Problem Jan 2025: economy/inflation consistently #1 (~30%); immigration elevated post-2024 election (~15%). Pew Research 2024 voter priorities confirm abortion, democracy, health...[truncated]", + "note": "AI/Technology is an emerging issue (4%) consistent with Pew 2024 finding ~10% cite AI as important but only ~4% name it as the single top issue. Modifiers will shift based on political_identity and em...[truncated]" + } + }, + { + "name": "country_direction_approval", + "distribution": { + "type": "categorical", + "options": [ + "Strongly approve", + "Somewhat approve", + "Somewhat disapprove", + "Strongly disapprove" + ], + "weights": [ + 0.17, + 0.22, + 0.2, + 0.41 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Gallup right-track/wrong-track Jan-Feb 2025: ~39% right direction, ~61% wrong track. Approval of country direction reflects early Trump second-term period with strong partisan split.", + "note": "Strongly approve (~17%) reflects Trump base approval; combined disapprove ~61% matches wrong-track polling. Modifiers will tightly couple to political_identity and financial_margin." + } + }, + { + "name": "consumer_identity", + "distribution": { + "type": "categorical", + "options": [ + "Brand loyal", + "Price/value driven", + "Values/ethics driven", + "Convenience driven" + ], + "weights": [ + 0.22, + 0.38, + 0.18, + 0.22 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "McKinsey Consumer Pulse 2024: ~40% of consumers cite value/price as primary driver; Nielsen IQ 2024: brand loyalty declining, private label share growing. Edelman Trust Barometer 2024: ~18% are values...[truncated]", + "note": "Price/value driven at 38% reflects inflationary environment and value-seeking. Convenience driven at 22% captures Amazon-era shopping behavior. Modifiers will increase Price-driven for lower income an...[truncated]" + } + }, + { + "name": "institutional_trust", + "distribution": { + "type": "categorical", + "options": [ + "High trust", + "Moderate trust", + "Low trust", + "Distrustful/Conspiratorial" + ], + "weights": [ + 0.13, + 0.31, + 0.37, + 0.19 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Gallup Confidence in Institutions 2024: trust in most institutions at or near historic lows. Only ~13% express 'a great deal' of confidence in Congress; media trust at record low. Edelman Trust Barome...[truncated]", + "note": "Distrustful/Conspiratorial at 19% consistent with PRRI 2024 QAnon/conspiracy belief prevalence (~18-22%). High trust only 13% as most institutions score poorly. Modifiers will reduce trust for Strong ...[truncated]" + } + }, + { + "name": "risk_tolerance", + "distribution": { + "type": "normal", + "mean": 0.45, + "std": 0.22, + "min": 0.0, + "max": 1.0, + "mean_formula": "max(0.1, min(0.9, 0.60 - 0.003 * (age - 30)))", + "std_formula": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0.0, + "expression": null, + "reason": "Risk tolerance bounded at 0 (fully risk averse)" + }, + { + "type": "hard_max", + "value": 1.0, + "expression": null, + "reason": "Risk tolerance bounded at 1 (fully risk tolerant)" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Vanguard/Fidelity risk tolerance research: risk tolerance declines with age at roughly 0.3 percentage points per year after 30. Federal Reserve SCF: younger and wealthier households take more financia...[truncated]", + "note": "Mean formula decreases risk tolerance by 0.003 per year of age above 30 (yields ~0.60 at age 30, ~0.45 at age 80). Std of 0.22 allows for wide individual variation. Income modifiers will increase mean...[truncated]" + } + }, + { + "name": "economic_anxiety", + "distribution": { + "type": "normal", + "mean": 0.55, + "std": 0.22, + "min": 0.0, + "max": 1.0, + "mean_formula": null, + "std_formula": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0.0, + "expression": null, + "reason": "Anxiety bounded at 0" + }, + { + "type": "hard_max", + "value": 1.0, + "expression": null, + "reason": "Anxiety bounded at 1" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Gallup Economic Confidence Index early 2025: -25 (negative territory). WSJ/NORC poll 2024: ~65% say economy is poor/not so good. Michigan Consumer Sentiment early 2025 shows elevated anxiety.", + "note": "Base mean of 0.55 reflects a majority-anxious environment as of early 2025. Std of 0.22 allows for variation. Modifiers will strongly increase for Paycheck-to-paycheck and In debt/deficit financial_ma...[truncated]" + } + } + ] + }, + "name": "conditional_base_hydration", + "type": "tool_use", + "caller": { + "type": "direct" + } + } + ], + "model": "claude-sonnet-4-6", + "role": "assistant", + "stop_reason": "tool_use", + "stop_sequence": null, + "type": "message", + "usage": { + "cache_creation": { + "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", + "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" + }, + "cache_creation_input_tokens": "[REDACTED_SECRET]", + "cache_read_input_tokens": "[REDACTED_SECRET]", + "input_tokens": 56897, + "output_tokens": 9280, + "server_tool_use": { + "web_search_requests": 3, + "web_fetch_requests": 0 + }, + "service_tier": "standard", + "inference_geo": "global" + } + }, + "sources_extracted": [ + "https://statisticalatlas.com/United-States/Marital-Status", + "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html", + "https://educationdata.org/education-attainment-statistics", + "https://www.census.gov/topics/families/marriage-and-divorce.html", + "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html", + "https://www.census.gov/library/publications/2025/demo/p60-286.html", + "https://www.equityinhighered.org/indicators/u-s-population-trends-and-educational-attainment/educational-attainment-by-age/", + "https://fred.stlouisfed.org/series/MEHOINUSA646N", + "https://www2.census.gov/library/publications/2025/demo/p60-286.pdf", + "https://fred.stlouisfed.org/series/MEHOINUSA672N", + "https://nces.ed.gov/programs/raceindicators/indicator_rfa.asp", + "https://www.ccdaily.com/2025/09/datapoints-educational-attainment-in-the-u-s/", + "https://www.census.gov/data/tables/time-series/demo/families/marital.html", + "https://www.psychologytoday.com/us/blog/living-single/202406/the-record-setting-rise-of-single-living-in-the-us", + "https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/", + "https://rbr.com/new-educational-attainment-data-comes-from-census/", + "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States", + "https://www.census.gov/library/visualizations/2024/comm/median-household-income.html", + "https://www.bls.gov/news.release/famee.t05.htm", + "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html", + "https://www.statista.com/statistics/200838/median-household-income-in-the-united-states/", + "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf", + "https://fred.stlouisfed.org/release/tables?eid=259515&rid=249", + "https://www.census.gov/library/publications/2024/demo/p60-282.html", + "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-15.html", + "https://www.bls.gov/opub/mlr/2024/article/patterns-of-marriage-and-divorce-from-ages-15-to-55-evidence-from-the-nlsy79.htm", + "https://www.cnbc.com/2025/09/11/us-median-household-income-2024.html", + "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-24-10.html", + "https://www.census.gov/topics/education/educational-attainment.html", + "https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html" + ] +} \ No newline at end of file diff --git a/examples/logs/20260220_003559_249537_claude_agentic_research.json b/examples/logs/20260220_003559_249537_claude_agentic_research.json new file mode 100644 index 0000000..badd0fb --- /dev/null +++ b/examples/logs/20260220_003559_249537_claude_agentic_research.json @@ -0,0 +1,1603 @@ +{ + "timestamp": "2026-02-20T00:35:59.249572", + "function": "agentic_research", + "provider": "claude", + "request": { + "model": "claude-sonnet-4-6", + "prompt_length": 12080 + }, + "response": { + "id": "msg_01VAPcXxHPmkJoaKiVupVr38", + "content": [ + { + "citations": null, + "text": "[REDACTED_TEXT length=89]", + "type": "text", + "parsed_output": null + }, + { + "id": "srvtoolu_01Bk23LHuViaXrzdbQmbQtcN", + "input": { + "query": "US adult education level distribution 2024 Census statistics" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01PEW2gFkBE4wKkfQem6jz5a", + "input": { + "query": "US household income distribution 2024 median statistics" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01K25iYWDbsn9fueHfucgdo5", + "input": { + "query": "US adult marital status distribution 2024 Census" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=1392]", + "page_age": null, + "title": "Census Bureau Releases New Educational Attainment Data", + "type": "web_search_result", + "url": "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1024]", + "page_age": null, + "title": "Educational Attainment in the United States: 2024", + "type": "web_search_result", + "url": "https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3044]", + "page_age": null, + "title": "Educational Attainment", + "type": "web_search_result", + "url": "https://www.census.gov/topics/education/educational-attainment.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3672]", + "page_age": "September 10, 2025", + "title": "US Census Bureau Releases New Educational Attainment Data - Stephen's Lighthouse", + "type": "web_search_result", + "url": "https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5500]", + "page_age": "January 15, 2025", + "title": "Educational Attainment Statistics [2025]: Levels by Demographic", + "type": "web_search_result", + "url": "https://educationdata.org/education-attainment-statistics" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6628]", + "page_age": "3 weeks ago", + "title": "Educational attainment in the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2452]", + "page_age": null, + "title": "Educational Attainment Tables", + "type": "web_search_result", + "url": "https://www.census.gov/topics/education/educational-attainment/data/tables.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5184]", + "page_age": null, + "title": "Educational Attainment, Undergraduate Field of Degree | American Community Survey | U.S. Census Bureau", + "type": "web_search_result", + "url": "https://www.census.gov/acs/www/about/why-we-ask-each-question/education/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4716]", + "page_age": "October 13, 2025", + "title": "US Population Over 18 in 2025 | Statistics & Facts - The World Data", + "type": "web_search_result", + "url": "https://theworlddata.com/us-population-over-18/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4508]", + "page_age": null, + "title": "Indicator 27: Educational Attainment", + "type": "web_search_result", + "url": "https://nces.ed.gov/programs/raceindicators/indicator_rfa.asp" + } + ], + "tool_use_id": "srvtoolu_01Bk23LHuViaXrzdbQmbQtcN", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=4404]", + "page_age": null, + "title": "Income in the United States: 2024", + "type": "web_search_result", + "url": "https://www.census.gov/library/publications/2025/demo/p60-286.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4080]", + "page_age": "January 16, 2026", + "title": "Charted: The Distribution of Household Income in America", + "type": "web_search_result", + "url": "https://www.visualcapitalist.com/distribution-of-household-income-in-america/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5256]", + "page_age": null, + "title": "Income in the United States: 2024 Current Population Reports", + "type": "web_search_result", + "url": "https://www2.census.gov/library/publications/2025/demo/p60-286.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1192]", + "page_age": "September 9, 2025", + "title": "Real Median Household Income in the United States (MEHOINUSA672N) | FRED | St. Louis Fed", + "type": "web_search_result", + "url": "https://fred.stlouisfed.org/series/MEHOINUSA672N" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5476]", + "page_age": null, + "title": "Income in the United States: 2023 Current Population Reports", + "type": "web_search_result", + "url": "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4672]", + "page_age": null, + "title": "Income in the United States: 2023", + "type": "web_search_result", + "url": "https://www.census.gov/library/publications/2024/demo/p60-282.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3200]", + "page_age": "September 11, 2025", + "title": "Here's the U.S. median household income for 2024", + "type": "web_search_result", + "url": "https://www.cnbc.com/2025/09/11/us-median-household-income-2024.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1752]", + "page_age": null, + "title": "Household Income Percentile Calculator, US - DQYDJ", + "type": "web_search_result", + "url": "https://dqydj.com/household-income-percentile-calculator/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5656]", + "page_age": null, + "title": "The Fed - Report on the Economic Well-Being of U.S. Households in 2024 - May 2025 - Income and Expenses", + "type": "web_search_result", + "url": "https://www.federalreserve.gov/publications/2025-economic-well-being-of-us-households-in-2024-income-and-expenses.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3828]", + "page_age": null, + "title": "Household income distribution in the U.S. 2000-2024", + "type": "web_search_result", + "url": "https://www.statista.com/statistics/758502/percentage-distribution-of-household-income-in-the-us/" + } + ], + "tool_use_id": "srvtoolu_01PEW2gFkBE4wKkfQem6jz5a", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=1248]", + "page_age": null, + "title": "Marital Status in the United States", + "type": "web_search_result", + "url": "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1768]", + "page_age": null, + "title": "Historical Marital Status Tables", + "type": "web_search_result", + "url": "https://www.census.gov/data/tables/time-series/demo/families/marital.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2800]", + "page_age": null, + "title": "Marriage and Divorce", + "type": "web_search_result", + "url": "https://www.census.gov/topics/families/marriage-and-divorce.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5424]", + "page_age": null, + "title": "Marital Status / Marital History | American Community Survey | U.S. Census Bureau", + "type": "web_search_result", + "url": "https://www.census.gov/acs/www/about/why-we-ask-each-question/marital/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=356]", + "page_age": null, + "title": "B12001: Sex by Marital Status for ... - Census Bureau Table", + "type": "web_search_result", + "url": "https://data.census.gov/table/ACSDT1Y2024.B12001?q=B12001" + }, + { + "encrypted_content": "[REDACTED_TEXT length=780]", + "page_age": null, + "title": "Marital Status in the United States", + "type": "web_search_result", + "url": "https://statisticalatlas.com/United-States/Marital-Status" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5348]", + "page_age": null, + "title": "Marital Status Distribution of U.S. Adults Aged 65 and Older, 1990-2022", + "type": "web_search_result", + "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4468]", + "page_age": "February 11, 2025", + "title": "How has marriage in the US changed over time? | USAFacts", + "type": "web_search_result", + "url": "https://usafacts.org/articles/state-relationships-marriages-and-living-alone-us/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1692]", + "page_age": null, + "title": "Marital Status - Census Reporter", + "type": "web_search_result", + "url": "https://censusreporter.org/topics/marital-status/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5220]", + "page_age": "July 13, 2024", + "title": "Majority of Americans Single: Surprise Statistics & Insights", + "type": "web_search_result", + "url": "https://www.hcmmlaw.com/blog/2024/07/13/majority-americans-now-single-statistics-insights/" + } + ], + "tool_use_id": "srvtoolu_01K25iYWDbsn9fueHfucgdo5", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_012ZNdnajsefVYJ2QFskwpWu", + "input": { + "query": "US political party identification 2024 Gallup Democrat Republican Independent percentage" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01TWwaGfK8hVGPvmM2PGzJH6", + "input": { + "query": "US employment sector distribution 2024 BLS private government self-employed retired percentage" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=5064]", + "page_age": "April 3, 2025", + "title": "GOP Holds Edge in Party Affiliation for Third Straight Year", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1456]", + "page_age": "September 20, 2007", + "title": "Party Affiliation | Gallup Historical Trends", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/15370/party-affiliation.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5480]", + "page_age": "March 26, 2025", + "title": "Independent Party ID Tied for High; Democratic ID at New Low", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4288]", + "page_age": "2 weeks ago", + "title": "New High of 45% in U.S. Identify as Political Independents", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=384]", + "page_age": "April 24, 2025", + "title": "Party affiliation and ideology of US registered voters | Pew Research Center", + "type": "web_search_result", + "url": "https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3692]", + "page_age": null, + "title": "Research Brief: Growing Cohort of Independent Voters Becomes Critical Segment of Electorate | Unite America", + "type": "web_search_result", + "url": "https://www.uniteamerica.org/articles/research-brief-growing-cohort-of-independent-voters-becomes-critical-segment-of-electorate" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4280]", + "page_age": "July 31, 2025", + "title": "Democrats Regain Advantage in Party Affiliation", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/692978/democrats-regain-advantage-party-affiliation.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3108]", + "page_age": "December 16, 2025", + "title": "Party Affiliation Fact Sheet (NPORS) | Pew Research Center", + "type": "web_search_result", + "url": "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4932]", + "page_age": "March 26, 2025", + "title": "U.S. Political Parties Historically Polarized Ideologically", + "type": "web_search_result", + "url": "https://news.gallup.com/poll/655190/political-parties-historically-polarized-ideologically.aspx" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3828]", + "page_age": "January 23, 2025", + "title": "Gallup: More Americans identify as Republican than Democrat for third straight year - CatholicVote org", + "type": "web_search_result", + "url": "https://catholicvote.org/gallup-more-americans-identify-republican-than-democrat/" + } + ], + "tool_use_id": "srvtoolu_012ZNdnajsefVYJ2QFskwpWu", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=244]", + "page_age": null, + "title": "Employment by major industry sector : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/emp/tables/employment-by-major-industry-sector.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6444]", + "page_age": null, + "title": "Industry and occupational employment projections overview and highlights, 2024\u201334 : Monthly Labor Review : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/opub/mlr/2026/article/industry-and-occupational-employment-projections-overview.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4552]", + "page_age": null, + "title": "Labor Force Characteristics (CPS) : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/cps/lfcharacteristics.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=240]", + "page_age": null, + "title": "Employment and output by industry : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/emp/tables/industry-employment-and-output.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=376]", + "page_age": null, + "title": "Self-Employed, BLS - Economic Data Series | FRED | St. Louis Fed", + "type": "web_search_result", + "url": "https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed" + }, + { + "encrypted_content": "[REDACTED_TEXT length=388]", + "page_age": null, + "title": "Workers, Self-Employed, BLS - Economic Data Series | FRED | St. Louis Fed", + "type": "web_search_result", + "url": "https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed%3Bworkers" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5456]", + "page_age": "3 weeks ago", + "title": "How Many Americans Are Self-Employed in 2026? (Stats by Industry, Income, and State) - Carry", + "type": "web_search_result", + "url": "https://carry.com/learn/self-employed-americans" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6332]", + "page_age": null, + "title": "Employment and Wages, Annual Averages 2024 : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/cew/publications/employment-and-wages-annual-averages/current/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=540]", + "page_age": null, + "title": "Employment by industry", + "type": "web_search_result", + "url": "https://www.bls.gov/charts/employment-situation/employment-levels-by-industry.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=260]", + "page_age": null, + "title": "Employed persons by detailed occupation and age : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/cps/cpsaat11b.htm" + } + ], + "tool_use_id": "srvtoolu_01TWwaGfK8hVGPvmM2PGzJH6", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=412]", + "type": "text", + "parsed_output": null + }, + { + "id": "toolu_016CdeDz23M67D3DAFgAFq4E", + "input": { + "attributes": [ + { + "name": "education_level", + "distribution": { + "type": "categorical", + "options": [ + "Less than HS", + "HS diploma/GED", + "Some college", + "Bachelor's degree", + "Graduate degree" + ], + "weights": [ + 0.09, + 0.27, + 0.2, + 0.24, + 0.2 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "US Census Bureau CPS 2024; educationdata.org 2025", + "note": "~9% less than HS, ~27% HS diploma, ~20% some college/associate, ~24% bachelor's, ~20% graduate. Ages 18-24 skew lower; modifiers will handle age dependency." + } + }, + { + "name": "household_income", + "distribution": { + "type": "lognormal", + "mean": 83730, + "std": 75000, + "mean_formula": null, + "std_formula": null, + "min": 0, + "max": 800000, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0, + "expression": null, + "reason": "Income cannot be negative" + }, + { + "type": "hard_max", + "value": 800000, + "expression": null, + "reason": "Caps extreme outliers; 99th percentile US household income approx $500-600k" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "US Census Bureau Income in the United States: 2024 (P60-286); CNBC Sept 2025", + "note": "Median household income $83,730 in 2024. Lognormal captures right-skewed income distribution. Std set wide to capture full range from poverty to affluent." + } + }, + { + "name": "marital_status", + "distribution": { + "type": "categorical", + "options": [ + "Married/partnered", + "Single", + "Divorced/separated", + "Widowed" + ], + "weights": [ + 0.49, + 0.31, + 0.14, + 0.06 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "USAFacts 2024; Census Bureau marital status data 2024", + "note": "47.1% of households headed by married couples in 2024; ~49% adults married/partnered including cohabiting. Single/never-married ~31%, divorced/separated ~14%, widowed ~6%. Age modifiers critical: youn...[truncated]" + } + }, + { + "name": "household_size", + "distribution": { + "type": "normal", + "mean": 2.53, + "std": 1.4, + "mean_formula": null, + "std_formula": null, + "min": 1, + "max": 10, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 1, + "expression": null, + "reason": "Household must have at least 1 person (respondent)" + }, + { + "type": "hard_max", + "value": 10, + "expression": null, + "reason": "Households of 10+ are extreme outliers (<0.1%)" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "US Census Bureau ACS 2024; average household size ~2.53", + "note": "US average household size is 2.53. Married households average ~3.1, single-person ~1.0. Marital status modifier will shift mean upward for married/partnered." + } + }, + { + "name": "has_children", + "distribution": { + "type": "boolean", + "probability_true": 0.28, + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "options": null, + "weights": null + }, + "constraints": [ + { + "type": "expression", + "expression": "not (has_children and age < 18)", + "value": null, + "reason": "Under-18s cannot have children in household as adult respondents (floor is 18)" + } + ], + "grounding": { + "level": "medium", + "method": "researched", + "source": "Census Bureau CPS 2024; ~28% of households have children under 18", + "note": "About 28% of all adults have children under 18 at home. Strong age dependency: near-zero for 18-22, peaks at ~45% for ages 30-45, near-zero for 65+. Marital status also a major modifier." + } + }, + { + "name": "employment_sector", + "distribution": { + "type": "categorical", + "options": [ + "Federal government", + "State/local government", + "Private sector", + "Gig/contract", + "Self-employed", + "Retired", + "Unemployed", + "Not in labor force" + ], + "weights": [ + 0.02, + 0.13, + 0.52, + 0.06, + 0.07, + 0.12, + 0.03, + 0.05 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "BLS Employment and Wages 2024; BLS CPS 2024", + "note": "BLS 2024: federal ~3M, state ~4.8M, local ~14.6M employees; private ~132.6M. Self-employed ~10% of employed. Retired and NILF weighted for full adult 18-80 population. Age modifiers critical: retired ...[truncated]" + } + }, + { + "name": "job_security_perception", + "distribution": { + "type": "categorical", + "options": [ + "Very secure", + "Somewhat secure", + "Somewhat insecure", + "Very insecure", + "N/A - not employed" + ], + "weights": [ + 0.3, + 0.35, + 0.13, + 0.07, + 0.15 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Gallup Job Security surveys; Federal Reserve SHED 2024", + "note": "Majority of employed workers report feeling secure. ~20% report some insecurity. N/A bucket covers retired, unemployed, NILF (~15-20% of adult population)." + } + }, + { + "name": "financial_margin", + "distribution": { + "type": "categorical", + "options": [ + "Comfortable savings buffer", + "Modest buffer", + "Paycheck-to-paycheck", + "In debt/deficit" + ], + "weights": [ + 0.25, + 0.27, + 0.33, + 0.15 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Federal Reserve SHED 2024; multiple paycheck-to-paycheck surveys 2024", + "note": "Approximately 63-66% of Americans live paycheck-to-paycheck per various 2024 surveys. Fed SHED shows ~28% skipped medical care due to cost. Comfortable savers ~25%, modest buffer ~27%, P2P ~33%, defic...[truncated]" + } + }, + { + "name": "investment_profile", + "distribution": { + "type": "categorical", + "options": [ + "No investments", + "401k/IRA only", + "Diversified investor", + "Active trader", + "Crypto holder" + ], + "weights": [ + 0.29, + 0.38, + 0.17, + 0.08, + 0.08 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Federal Reserve SHED 2024; Gallup Stock Market Ownership 2024", + "note": "~55-58% of Americans own stocks (many via retirement accounts). ~29% have no investments. Crypto ownership ~15-20% but as primary profile ~8%. Diversified investor and active trader reflect smaller ed...[truncated]" + } + }, + { + "name": "primary_info_source", + "distribution": { + "type": "categorical", + "options": [ + "Cable/broadcast TV news", + "Social media", + "Online news sites", + "Podcasts", + "Local news", + "Print media", + "Avoids news" + ], + "weights": [ + 0.28, + 0.25, + 0.18, + 0.08, + 0.09, + 0.04, + 0.08 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Reuters Institute Digital News Report 2024; Pew Research Media consumption 2024", + "note": "TV still largest single source ~28%, social media surging esp. under 35 ~25%, online news ~18%. Podcasts growing ~8%. Print declining ~4%. Age modifiers essential: older adults heavily TV, younger hea...[truncated]" + } + }, + { + "name": "social_media_behavior", + "distribution": { + "type": "categorical", + "options": [ + "Non-user", + "Passive consumer", + "Occasional poster", + "Active poster/Influencer" + ], + "weights": [ + 0.16, + 0.42, + 0.28, + 0.14 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Pew Research Social Media Use 2024; Reuters Digital News Report 2024", + "note": "~84% of US adults use social media in some form. Most are passive consumers. Active posters ~28-30% of users; influencers a small fraction. Non-users concentrated among older adults 65+." + } + }, + { + "name": "tech_adoption_posture", + "distribution": { + "type": "categorical", + "options": [ + "Technophobe/Avoider", + "Late majority adopter", + "Early majority adopter", + "Early adopter", + "Innovator" + ], + "weights": [ + 0.14, + 0.26, + 0.34, + 0.18, + 0.08 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Rogers Diffusion of Innovation model applied to US population; Pew Research Tech Adoption 2024", + "note": "Loosely follows Rogers' diffusion curve: innovators ~2.5%, early adopters ~13.5%, early majority ~34%, late majority ~34%, laggards ~16%. Adjusted for US digital economy context and 18-80 age range." + } + }, + { + "name": "religious_engagement", + "distribution": { + "type": "categorical", + "options": [ + "Secular/None", + "Nominally affiliated", + "Moderately religious", + "Devout" + ], + "weights": [ + 0.29, + 0.25, + 0.27, + 0.19 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Pew Research Religious Landscape Study; Gallup Religion 2024", + "note": "~29% identify as religiously unaffiliated (nones). ~25% nominally affiliated but rarely practice. ~27% moderately religious (attend occasionally). ~19% devout (weekly+ attendance). Southeast and Midwe...[truncated]" + } + }, + { + "name": "political_identity", + "distribution": { + "type": "categorical", + "options": [ + "Strong Democrat", + "Lean Democrat", + "True Independent", + "Lean Republican", + "Strong Republican" + ], + "weights": [ + 0.18, + 0.18, + 0.17, + 0.2, + 0.27 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Gallup Party Affiliation 2024; Pew Research Partisan Identification 2024-2025", + "note": "2024 Gallup: 46% R/lean-R, 45% D/lean-D, 43% pure independents. Strong partisans ~28% each side per Pew. True independents (no lean) ~17%. Slight Republican lean for base reflecting 2024 election envi...[truncated]" + } + }, + { + "name": "political_engagement_level", + "distribution": { + "type": "categorical", + "options": [ + "Disengaged", + "Single-issue voter", + "Moderate/occasional participant", + "Highly engaged partisan" + ], + "weights": [ + 0.22, + 0.18, + 0.38, + 0.22 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "ANES 2024; Pew Research Political Engagement 2024", + "note": "About 22% are largely disengaged from politics, 18% single-issue focused. The moderate/occasional majority ~38%. Highly engaged ~22%, consistent with share who always vote in midterms and follow news ...[truncated]" + } + }, + { + "name": "vote_2024_presidential", + "distribution": { + "type": "categorical", + "options": [ + "Trump", + "Harris", + "Third party", + "Did not vote", + "Not eligible" + ], + "weights": [ + 0.31, + 0.3, + 0.02, + 0.28, + 0.09 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "2024 Presidential Election results; US Elections Project turnout data", + "note": "Trump won 49.9% of popular vote, Harris 48.4% of votes cast. ~64% of eligible voters voted. ~9% of adults are non-citizens/not eligible. Did-not-vote reflects low turnout among disengaged. Political i...[truncated]" + } + }, + { + "name": "midterm_turnout_propensity", + "distribution": { + "type": "categorical", + "options": [ + "Always votes", + "Sometimes votes", + "Rarely votes", + "Never votes" + ], + "weights": [ + 0.35, + 0.27, + 0.2, + 0.18 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "US Elections Project midterm turnout data; Pew Research voter typology 2024", + "note": "Midterm turnout ~50% of eligible voters (2022 ~46.8%). Always-voters ~35% of adults, sometimes ~27%, rarely ~20%, never ~18%. Age modifier critical: older adults much more consistent voters." + } + }, + { + "name": "congressional_district_competitiveness", + "distribution": { + "type": "categorical", + "options": [ + "Safe Republican", + "Lean Republican", + "Swing district", + "Lean Democrat", + "Safe Democrat" + ], + "weights": [ + 0.36, + 0.12, + 0.1, + 0.12, + 0.3 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Cook Political Report 2024 district ratings; DCCC/NRCC targeting lists", + "note": "Approximately 35-40 truly competitive House districts out of 435 (~10%). Safe R districts slightly outnumber safe D given geographic sorting. Rural/suburban Republican districts vs. urban Democratic s...[truncated]" + } + }, + { + "name": "top_issue_2026", + "distribution": { + "type": "categorical", + "options": [ + "Economy/Jobs", + "Abortion/Reproductive rights", + "Immigration", + "Democracy/Rule of law", + "Healthcare", + "Climate", + "Education", + "AI/Technology" + ], + "weights": [ + 0.28, + 0.13, + 0.15, + 0.12, + 0.13, + 0.07, + 0.07, + 0.05 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Gallup Most Important Problem 2024-2025; Pew Research Issue Priorities 2024", + "note": "Economy/jobs consistently tops issue salience polls ~25-30%. Immigration elevated post-2024 election. Abortion remains salient post-Dobbs. Democracy/rule of law elevated heading into 2026. AI/Tech eme...[truncated]" + } + }, + { + "name": "country_direction_approval", + "distribution": { + "type": "categorical", + "options": [ + "Strongly approve", + "Somewhat approve", + "Somewhat disapprove", + "Strongly disapprove" + ], + "weights": [ + 0.22, + 0.18, + 0.18, + 0.42 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Gallup Right/Wrong Direction poll 2025; RealClearPolitics average Feb 2026", + "note": "As of early 2026, right-track/wrong-track polls show majority disapprove of country direction (~55-60% wrong track). Strongly disapprove heavily driven by Democrats/independents reacting to Trump seco...[truncated]" + } + }, + { + "name": "consumer_identity", + "distribution": { + "type": "categorical", + "options": [ + "Brand loyal", + "Price/value driven", + "Values/ethics driven", + "Convenience driven" + ], + "weights": [ + 0.22, + 0.42, + 0.18, + 0.18 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Nielsen Consumer Research 2024; McKinsey Consumer Pulse 2024", + "note": "Price/value is primary driver for plurality of Americans especially post-inflation environment. Brand loyalty declining. Values-driven purchasing elevated among higher-education, younger, liberal cons...[truncated]" + } + }, + { + "name": "institutional_trust", + "distribution": { + "type": "categorical", + "options": [ + "High trust", + "Moderate trust", + "Low trust", + "Distrustful/Conspiratorial" + ], + "weights": [ + 0.14, + 0.32, + 0.34, + 0.2 + ], + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": null, + "max": null, + "min_formula": null, + "max_formula": null, + "alpha": null, + "beta": null, + "probability_true": null + }, + "constraints": [ + { + "type": "spec_expression", + "expression": "abs(sum(weights) - 1.0) < 0.001", + "value": null, + "reason": "Weights must sum to 1.0" + } + ], + "grounding": { + "level": "strong", + "method": "researched", + "source": "Gallup Confidence in Institutions 2024; Edelman Trust Barometer 2025", + "note": "Institutional trust at historic lows. Gallup 2024: <30% confident in most major institutions. ~14% high trust, ~32% moderate, ~34% low trust, ~20% conspiratorial/distrustful across the board. Politica...[truncated]" + } + }, + { + "name": "risk_tolerance", + "distribution": { + "type": "beta", + "alpha": 2.5, + "beta": 3.0, + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": 0.0, + "max": 1.0, + "min_formula": null, + "max_formula": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0, + "expression": null, + "reason": "Risk tolerance bounded at 0 (fully risk-averse)" + }, + { + "type": "hard_max", + "value": 1, + "expression": null, + "reason": "Risk tolerance bounded at 1 (fully risk-tolerant)" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "FINRA Investor Education Foundation 2024; Federal Reserve SHED 2024", + "note": "Beta(2.5, 3.0) gives mean ~0.45, slightly below midpoint, reflecting general risk aversion in US population. Right-skewed toward lower risk tolerance. Age and income are key modifiers: younger and wea...[truncated]" + } + }, + { + "name": "economic_anxiety", + "distribution": { + "type": "beta", + "alpha": 3.5, + "beta": 2.5, + "mean": null, + "std": null, + "mean_formula": null, + "std_formula": null, + "min": 0.0, + "max": 1.0, + "min_formula": null, + "max_formula": null, + "options": null, + "weights": null, + "probability_true": null + }, + "constraints": [ + { + "type": "hard_min", + "value": 0, + "expression": null, + "reason": "Economic anxiety bounded at 0 (no anxiety)" + }, + { + "type": "hard_max", + "value": 1, + "expression": null, + "reason": "Economic anxiety bounded at 1 (extreme anxiety)" + } + ], + "grounding": { + "level": "medium", + "method": "extrapolated", + "source": "Federal Reserve SHED 2024; Gallup Economic Confidence 2024-2025", + "note": "Beta(3.5, 2.5) gives mean ~0.58, above midpoint, reflecting elevated economic anxiety in 2024-2026 environment with inflation, tariffs, and job market uncertainty. Financial margin and job security ar...[truncated]" + } + } + ] + }, + "name": "conditional_base_hydration", + "type": "tool_use", + "caller": { + "type": "direct" + } + } + ], + "model": "claude-sonnet-4-6", + "role": "assistant", + "stop_reason": "tool_use", + "stop_sequence": null, + "type": "message", + "usage": { + "cache_creation": { + "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", + "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" + }, + "cache_creation_input_tokens": "[REDACTED_SECRET]", + "cache_read_input_tokens": "[REDACTED_SECRET]", + "input_tokens": 105665, + "output_tokens": 8838, + "server_tool_use": { + "web_search_requests": 5, + "web_fetch_requests": 0 + }, + "service_tier": "standard", + "inference_geo": "global" + } + }, + "sources_extracted": [ + "https://statisticalatlas.com/United-States/Marital-Status", + "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html", + "https://educationdata.org/education-attainment-statistics", + "https://www.census.gov/topics/families/marriage-and-divorce.html", + "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html", + "https://www.bls.gov/emp/tables/industry-employment-and-output.htm", + "https://www.census.gov/library/publications/2025/demo/p60-286.html", + "https://www.bls.gov/charts/employment-situation/employment-levels-by-industry.htm", + "https://www.bls.gov/emp/tables/employment-by-major-industry-sector.htm", + "https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx", + "https://news.gallup.com/poll/15370/party-affiliation.aspx", + "https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed", + "https://www.uniteamerica.org/articles/research-brief-growing-cohort-of-independent-voters-becomes-critical-segment-of-electorate", + "https://www2.census.gov/library/publications/2025/demo/p60-286.pdf", + "https://news.gallup.com/poll/692978/democrats-regain-advantage-party-affiliation.aspx", + "https://fred.stlouisfed.org/series/MEHOINUSA672N", + "https://nces.ed.gov/programs/raceindicators/indicator_rfa.asp", + "https://www.census.gov/acs/www/about/why-we-ask-each-question/marital/", + "https://catholicvote.org/gallup-more-americans-identify-republican-than-democrat/", + "https://data.census.gov/table/ACSDT1Y2024.B12001?q=B12001", + "https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/", + "https://usafacts.org/articles/state-relationships-marriages-and-living-alone-us/", + "https://www.bls.gov/cps/lfcharacteristics.htm", + "https://www.census.gov/data/tables/time-series/demo/families/marital.html", + "https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed%3Bworkers", + "https://www.census.gov/topics/education/educational-attainment/data/tables.html", + "https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/", + "https://theworlddata.com/us-population-over-18/", + "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States", + "https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx", + "https://www.bls.gov/cps/cpsaat11b.htm", + "https://dqydj.com/household-income-percentile-calculator/", + "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html", + "https://www.census.gov/library/publications/2024/demo/p60-282.html", + "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf", + "https://www.cnbc.com/2025/09/11/us-median-household-income-2024.html", + "https://news.gallup.com/poll/655190/political-parties-historically-polarized-ideologically.aspx", + "https://www.bls.gov/cew/publications/employment-and-wages-annual-averages/current/", + "https://www.federalreserve.gov/publications/2025-economic-well-being-of-us-households-in-2024-income-and-expenses.htm", + "https://www.census.gov/acs/www/about/why-we-ask-each-question/education/", + "https://carry.com/learn/self-employed-americans", + "https://www.bls.gov/opub/mlr/2026/article/industry-and-occupational-employment-projections-overview.htm", + "https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/", + "https://censusreporter.org/topics/marital-status/", + "https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx", + "https://www.hcmmlaw.com/blog/2024/07/13/majority-americans-now-single-statistics-insights/", + "https://www.census.gov/topics/education/educational-attainment.html", + "https://www.statista.com/statistics/758502/percentage-distribution-of-household-income-in-the-us/", + "https://www.visualcapitalist.com/distribution-of-household-income-in-america/", + "https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html" + ] +} \ No newline at end of file diff --git a/examples/logs/20260220_003849_368016_claude_agentic_research.json b/examples/logs/20260220_003849_368016_claude_agentic_research.json new file mode 100644 index 0000000..f4f8c69 --- /dev/null +++ b/examples/logs/20260220_003849_368016_claude_agentic_research.json @@ -0,0 +1,2429 @@ +{ + "timestamp": "2026-02-20T00:38:49.368053", + "function": "agentic_research", + "provider": "claude", + "request": { + "model": "claude-sonnet-4-6", + "prompt_length": 14810 + }, + "response": { + "id": "msg_01EqWwgyhziAuoNrBFnL9Gr1", + "content": [ + { + "id": "srvtoolu_01BLDUXrKnxjgLqvxtFqvwMt", + "input": { + "query": "US adult education level by age distribution 2024" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01CEDk5M1CSDz4nuPfX7Tv1u", + "input": { + "query": "US household income by education level region urban rural 2024" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "id": "srvtoolu_01XaAkri2b3gPFSG8EuUsivi", + "input": { + "query": "US marital status by age distribution 2024 statistics" + }, + "name": "web_search", + "type": "server_tool_use", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=1392]", + "page_age": null, + "title": "Census Bureau Releases New Educational Attainment Data", + "type": "web_search_result", + "url": "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5460]", + "page_age": "January 15, 2025", + "title": "Educational Attainment Statistics [2025]: Levels by Demographic", + "type": "web_search_result", + "url": "https://educationdata.org/education-attainment-statistics" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2940]", + "page_age": "January 31, 2024", + "title": "More adults earn post-high school credentials - Community College Daily", + "type": "web_search_result", + "url": "https://www.ccdaily.com/2024/01/more-adults-earn-post-high-school-credentials/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5348]", + "page_age": null, + "title": "Fast Facts: Educational attainment (27)", + "type": "web_search_result", + "url": "https://nces.ed.gov/fastfacts/display.asp?id=27" + }, + { + "encrypted_content": "[REDACTED_TEXT length=6952]", + "page_age": "3 weeks ago", + "title": "Educational attainment in the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3180]", + "page_age": null, + "title": "Educational attainment by age group U.S. 2021 | Statista", + "type": "web_search_result", + "url": "https://www.statista.com/statistics/785618/educational-attainment-by-age-group-us/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4228]", + "page_age": null, + "title": "Digest of Education Statistics-Advance Release of Selected 2023 Digest tables", + "type": "web_search_result", + "url": "https://nces.ed.gov/programs/digest/2024menu_tables.asp" + }, + { + "encrypted_content": "[REDACTED_TEXT length=620]", + "page_age": "May 17, 2024", + "title": "Educational Attainment by Age - Race and Ethnicity in Higher Education", + "type": "web_search_result", + "url": "https://www.equityinhighered.org/indicators/u-s-population-trends-and-educational-attainment/educational-attainment-by-age/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5496]", + "page_age": "3 weeks ago", + "title": "Literacy in the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Literacy_in_the_United_States" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5752]", + "page_age": null, + "title": "Forty Percent of Adults Participate in Adult Education Activities: 1994-95", + "type": "web_search_result", + "url": "https://nces.ed.gov/pubs95/web/95823.asp" + } + ], + "tool_use_id": "srvtoolu_01BLDUXrKnxjgLqvxtFqvwMt", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=5584]", + "page_age": null, + "title": "How Education Impacted Income and Earnings From 2004 to 2024", + "type": "web_search_result", + "url": "https://www.census.gov/library/stories/2025/09/education-and-income.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4164]", + "page_age": null, + "title": "Median household income by education U.S. 2023 | Statista", + "type": "web_search_result", + "url": "https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2884]", + "page_age": "2 weeks ago", + "title": "Household income in the United States - Wikipedia", + "type": "web_search_result", + "url": "https://en.wikipedia.org/wiki/Household_income_in_the_United_States" + }, + { + "encrypted_content": "[REDACTED_TEXT length=648]", + "page_age": null, + "title": "County-level Data Sets | Economic Research Service", + "type": "web_search_result", + "url": "https://www.ers.usda.gov/data-products/county-level-data-sets" + }, + { + "encrypted_content": "[REDACTED_TEXT length=1944]", + "page_age": null, + "title": "Employment & Education - Rural Education | Economic Research Service", + "type": "web_search_result", + "url": "https://www.ers.usda.gov/topics/rural-economy-population/employment-education/rural-education" + }, + { + "encrypted_content": "[REDACTED_TEXT length=396]", + "page_age": null, + "title": "Educational Attainment Tables", + "type": "web_search_result", + "url": "https://www.census.gov/topics/education/educational-attainment/data/tables.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5456]", + "page_age": null, + "title": "Income in the United States: 2024", + "type": "web_search_result", + "url": "https://www.census.gov/library/publications/2025/demo/p60-286.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4880]", + "page_age": null, + "title": "Income in the United States: 2023 Current Population Reports", + "type": "web_search_result", + "url": "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4856]", + "page_age": null, + "title": "Income in the United States: 2024 Current Population Reports", + "type": "web_search_result", + "url": "https://www2.census.gov/library/publications/2025/demo/p60-286.pdf" + }, + { + "encrypted_content": "[REDACTED_TEXT length=440]", + "page_age": null, + "title": "COE - Annual Earnings by Educational Attainment", + "type": "web_search_result", + "url": "https://nces.ed.gov/programs/coe/indicator/cba/annual-earnings" + } + ], + "tool_use_id": "srvtoolu_01CEDk5M1CSDz4nuPfX7Tv1u", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "content": [ + { + "encrypted_content": "[REDACTED_TEXT length=920]", + "page_age": null, + "title": "Historical Marital Status Tables", + "type": "web_search_result", + "url": "https://www.census.gov/data/tables/time-series/demo/families/marital.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=4852]", + "page_age": null, + "title": "Marital Status Distribution of U.S. Adults Aged 65 and Older, 1990-2022", + "type": "web_search_result", + "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=628]", + "page_age": null, + "title": "Marital Status in the United States", + "type": "web_search_result", + "url": "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2500]", + "page_age": null, + "title": "Marital Status in the United States", + "type": "web_search_result", + "url": "https://statisticalatlas.com/United-States/Marital-Status" + }, + { + "encrypted_content": "[REDACTED_TEXT length=5460]", + "page_age": null, + "title": "Patterns of marriage and divorce from ages 15 to 55: Evidence from the NLSY79 : Monthly Labor Review : U.S. Bureau of Labor Statistics", + "type": "web_search_result", + "url": "https://www.bls.gov/opub/mlr/2024/article/patterns-of-marriage-and-divorce-from-ages-15-to-55-evidence-from-the-nlsy79.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2800]", + "page_age": null, + "title": "Marriage and Divorce", + "type": "web_search_result", + "url": "https://www.census.gov/topics/families/marriage-and-divorce.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=3828]", + "page_age": null, + "title": "Marriage: More than a Century of Change, 1900-2022", + "type": "web_search_result", + "url": "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-24-10.html" + }, + { + "encrypted_content": "[REDACTED_TEXT length=240]", + "page_age": null, + "title": "Table 5. Employment status of the population by sex, marital status, and presence and age of own children under 18, 2023-2024 annual averages - 2024 A01 Results", + "type": "web_search_result", + "url": "https://www.bls.gov/news.release/famee.t05.htm" + }, + { + "encrypted_content": "[REDACTED_TEXT length=2964]", + "page_age": "June 2, 2024", + "title": "What's Behind the Record-Setting Rise of Single Living | Psychology Today", + "type": "web_search_result", + "url": "https://www.psychologytoday.com/us/blog/living-single/202406/the-record-setting-rise-of-single-living-in-the-us" + }, + { + "encrypted_content": "[REDACTED_TEXT length=556]", + "page_age": null, + "title": "Current Marital Status", + "type": "web_search_result", + "url": "https://dhsprogram.com/data/Guide-to-DHS-Statistics/Current_Marital_Status.htm" + } + ], + "tool_use_id": "srvtoolu_01XaAkri2b3gPFSG8EuUsivi", + "type": "web_search_tool_result", + "caller": { + "type": "direct" + } + }, + { + "citations": null, + "text": "[REDACTED_TEXT length=305]", + "type": "text", + "parsed_output": null + }, + { + "id": "toolu_017ZxWVppKBUPifjKhJGWgYz", + "input": { + "attributes": [ + { + "name": "education_level", + "modifiers": [ + { + "when": "age < 25", + "multiply": null, + "add": null, + "weight_overrides": { + "Less than HS": 0.08, + "HS diploma/GED": 0.3, + "Some college": 0.48, + "Bachelor's degree": 0.12, + "Graduate degree": 0.02 + }, + "probability_override": null + }, + { + "when": "age >= 25 and age < 35", + "multiply": null, + "add": null, + "weight_overrides": { + "Less than HS": 0.08, + "HS diploma/GED": 0.24, + "Some college": 0.26, + "Bachelor's degree": 0.28, + "Graduate degree": 0.14 + }, + "probability_override": null + }, + { + "when": "age >= 35 and age < 50", + "multiply": null, + "add": null, + "weight_overrides": { + "Less than HS": 0.09, + "HS diploma/GED": 0.26, + "Some college": 0.24, + "Bachelor's degree": 0.25, + "Graduate degree": 0.16 + }, + "probability_override": null + }, + { + "when": "age >= 50 and age < 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Less than HS": 0.1, + "HS diploma/GED": 0.3, + "Some college": 0.24, + "Bachelor's degree": 0.22, + "Graduate degree": 0.14 + }, + "probability_override": null + }, + { + "when": "age >= 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Less than HS": 0.13, + "HS diploma/GED": 0.32, + "Some college": 0.22, + "Bachelor's degree": 0.2, + "Graduate degree": 0.13 + }, + "probability_override": null + } + ] + }, + { + "name": "household_income", + "modifiers": [ + { + "when": "education_level == 'Less than HS'", + "multiply": 0.48, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "education_level == 'HS diploma/GED'", + "multiply": 0.7, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "education_level == 'Some college'", + "multiply": 0.82, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "education_level == 'Bachelor\\'s degree'", + "multiply": 1.25, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "education_level == 'Graduate degree'", + "multiply": 1.65, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "us_region == 'Northeast'", + "multiply": 1.12, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "us_region == 'West Coast'", + "multiply": 1.14, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "us_region == 'Southeast'", + "multiply": 0.9, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "us_region == 'Southwest'", + "multiply": 0.93, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "urban_rural == 'Urban'", + "multiply": 1.1, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "urban_rural == 'Rural'", + "multiply": 0.82, + "add": 0, + "weight_overrides": null, + "probability_override": null + } + ] + }, + { + "name": "marital_status", + "modifiers": [ + { + "when": "age < 25", + "multiply": null, + "add": null, + "weight_overrides": { + "Married/partnered": 0.12, + "Single": 0.83, + "Divorced/separated": 0.04, + "Widowed": 0.01 + }, + "probability_override": null + }, + { + "when": "age >= 25 and age < 35", + "multiply": null, + "add": null, + "weight_overrides": { + "Married/partnered": 0.46, + "Single": 0.42, + "Divorced/separated": 0.11, + "Widowed": 0.01 + }, + "probability_override": null + }, + { + "when": "age >= 35 and age < 50", + "multiply": null, + "add": null, + "weight_overrides": { + "Married/partnered": 0.57, + "Single": 0.23, + "Divorced/separated": 0.18, + "Widowed": 0.02 + }, + "probability_override": null + }, + { + "when": "age >= 50 and age < 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Married/partnered": 0.6, + "Single": 0.14, + "Divorced/separated": 0.2, + "Widowed": 0.06 + }, + "probability_override": null + }, + { + "when": "age >= 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Married/partnered": 0.55, + "Single": 0.07, + "Divorced/separated": 0.16, + "Widowed": 0.22 + }, + "probability_override": null + } + ] + }, + { + "name": "household_size", + "modifiers": [ + { + "when": "marital_status == 'Married/partnered'", + "multiply": 1.35, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "marital_status == 'Single'", + "multiply": 0.68, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "marital_status == 'Divorced/separated'", + "multiply": 0.88, + "add": 0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "marital_status == 'Widowed'", + "multiply": 0.75, + "add": 0, + "weight_overrides": null, + "probability_override": null + } + ] + }, + { + "name": "has_children", + "modifiers": [ + { + "when": "age < 25 and marital_status == 'Single'", + "multiply": null, + "add": null, + "weight_overrides": null, + "probability_override": 0.06 + }, + { + "when": "age >= 25 and age < 35 and marital_status == 'Married/partnered'", + "multiply": null, + "add": null, + "weight_overrides": null, + "probability_override": 0.52 + }, + { + "when": "age >= 35 and age < 50 and marital_status == 'Married/partnered'", + "multiply": null, + "add": null, + "weight_overrides": null, + "probability_override": 0.58 + }, + { + "when": "age >= 50 and marital_status == 'Married/partnered'", + "multiply": null, + "add": null, + "weight_overrides": null, + "probability_override": 0.1 + }, + { + "when": "age >= 35 and age < 50 and marital_status == 'Single'", + "multiply": null, + "add": null, + "weight_overrides": null, + "probability_override": 0.18 + }, + { + "when": "age >= 50", + "multiply": null, + "add": null, + "weight_overrides": null, + "probability_override": 0.05 + } + ] + }, + { + "name": "employment_sector", + "modifiers": [ + { + "when": "age < 25 and education_level == 'Less than HS'", + "multiply": null, + "add": null, + "weight_overrides": { + "Federal government": 0.01, + "State/local government": 0.03, + "Private sector": 0.42, + "Gig/contract": 0.15, + "Self-employed": 0.04, + "Retired": 0.0, + "Unemployed": 0.15, + "Not in labor force": 0.2 + }, + "probability_override": null + }, + { + "when": "age < 25 and education_level in ['HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "Federal government": 0.02, + "State/local government": 0.04, + "Private sector": 0.52, + "Gig/contract": 0.14, + "Self-employed": 0.04, + "Retired": 0.0, + "Unemployed": 0.1, + "Not in labor force": 0.14 + }, + "probability_override": null + }, + { + "when": "age >= 25 and age < 45 and education_level in ['Less than HS', 'HS diploma/GED']", + "multiply": null, + "add": null, + "weight_overrides": { + "Federal government": 0.02, + "State/local government": 0.06, + "Private sector": 0.56, + "Gig/contract": 0.12, + "Self-employed": 0.08, + "Retired": 0.01, + "Unemployed": 0.07, + "Not in labor force": 0.08 + }, + "probability_override": null + }, + { + "when": "age >= 25 and age < 55 and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Federal government": 0.06, + "State/local government": 0.13, + "Private sector": 0.58, + "Gig/contract": 0.05, + "Self-employed": 0.1, + "Retired": 0.01, + "Unemployed": 0.03, + "Not in labor force": 0.04 + }, + "probability_override": null + }, + { + "when": "age >= 55 and age < 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Federal government": 0.04, + "State/local government": 0.1, + "Private sector": 0.42, + "Gig/contract": 0.06, + "Self-employed": 0.12, + "Retired": 0.16, + "Unemployed": 0.04, + "Not in labor force": 0.06 + }, + "probability_override": null + }, + { + "when": "age >= 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Federal government": 0.01, + "State/local government": 0.03, + "Private sector": 0.12, + "Gig/contract": 0.04, + "Self-employed": 0.08, + "Retired": 0.6, + "Unemployed": 0.02, + "Not in labor force": 0.1 + }, + "probability_override": null + } + ] + }, + { + "name": "job_security_perception", + "modifiers": [ + { + "when": "employment_sector == 'Federal government'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.38, + "Somewhat secure": 0.35, + "Somewhat insecure": 0.18, + "Very insecure": 0.09, + "N/A - not employed": 0.0 + }, + "probability_override": null + }, + { + "when": "employment_sector == 'State/local government'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.42, + "Somewhat secure": 0.38, + "Somewhat insecure": 0.14, + "Very insecure": 0.06, + "N/A - not employed": 0.0 + }, + "probability_override": null + }, + { + "when": "employment_sector == 'Private sector'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.28, + "Somewhat secure": 0.42, + "Somewhat insecure": 0.2, + "Very insecure": 0.1, + "N/A - not employed": 0.0 + }, + "probability_override": null + }, + { + "when": "employment_sector == 'Gig/contract'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.08, + "Somewhat secure": 0.27, + "Somewhat insecure": 0.38, + "Very insecure": 0.27, + "N/A - not employed": 0.0 + }, + "probability_override": null + }, + { + "when": "employment_sector == 'Self-employed'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.2, + "Somewhat secure": 0.38, + "Somewhat insecure": 0.28, + "Very insecure": 0.14, + "N/A - not employed": 0.0 + }, + "probability_override": null + }, + { + "when": "employment_sector == 'Retired'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.0, + "Somewhat secure": 0.0, + "Somewhat insecure": 0.0, + "Very insecure": 0.0, + "N/A - not employed": 1.0 + }, + "probability_override": null + }, + { + "when": "employment_sector == 'Unemployed'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.0, + "Somewhat secure": 0.0, + "Somewhat insecure": 0.0, + "Very insecure": 0.0, + "N/A - not employed": 1.0 + }, + "probability_override": null + }, + { + "when": "employment_sector == 'Not in labor force'", + "multiply": null, + "add": null, + "weight_overrides": { + "Very secure": 0.0, + "Somewhat secure": 0.0, + "Somewhat insecure": 0.0, + "Very insecure": 0.0, + "N/A - not employed": 1.0 + }, + "probability_override": null + } + ] + }, + { + "name": "financial_margin", + "modifiers": [ + { + "when": "household_income < 35000", + "multiply": null, + "add": null, + "weight_overrides": { + "Comfortable savings buffer": 0.04, + "Modest buffer": 0.12, + "Paycheck-to-paycheck": 0.44, + "In debt/deficit": 0.4 + }, + "probability_override": null + }, + { + "when": "household_income >= 35000 and household_income < 60000", + "multiply": null, + "add": null, + "weight_overrides": { + "Comfortable savings buffer": 0.1, + "Modest buffer": 0.28, + "Paycheck-to-paycheck": 0.42, + "In debt/deficit": 0.2 + }, + "probability_override": null + }, + { + "when": "household_income >= 60000 and household_income < 100000", + "multiply": null, + "add": null, + "weight_overrides": { + "Comfortable savings buffer": 0.22, + "Modest buffer": 0.38, + "Paycheck-to-paycheck": 0.3, + "In debt/deficit": 0.1 + }, + "probability_override": null + }, + { + "when": "household_income >= 100000 and household_income < 150000", + "multiply": null, + "add": null, + "weight_overrides": { + "Comfortable savings buffer": 0.4, + "Modest buffer": 0.38, + "Paycheck-to-paycheck": 0.17, + "In debt/deficit": 0.05 + }, + "probability_override": null + }, + { + "when": "household_income >= 150000", + "multiply": null, + "add": null, + "weight_overrides": { + "Comfortable savings buffer": 0.6, + "Modest buffer": 0.28, + "Paycheck-to-paycheck": 0.09, + "In debt/deficit": 0.03 + }, + "probability_override": null + } + ] + }, + { + "name": "investment_profile", + "modifiers": [ + { + "when": "household_income < 40000 and education_level in ['Less than HS', 'HS diploma/GED']", + "multiply": null, + "add": null, + "weight_overrides": { + "No investments": 0.65, + "401k/IRA only": 0.22, + "Diversified investor": 0.05, + "Active trader": 0.03, + "Crypto holder": 0.05 + }, + "probability_override": null + }, + { + "when": "household_income >= 40000 and household_income < 80000 and education_level in ['Some college', 'HS diploma/GED']", + "multiply": null, + "add": null, + "weight_overrides": { + "No investments": 0.3, + "401k/IRA only": 0.42, + "Diversified investor": 0.12, + "Active trader": 0.06, + "Crypto holder": 0.1 + }, + "probability_override": null + }, + { + "when": "household_income >= 80000 and education_level == 'Bachelor\\'s degree'", + "multiply": null, + "add": null, + "weight_overrides": { + "No investments": 0.1, + "401k/IRA only": 0.44, + "Diversified investor": 0.3, + "Active trader": 0.1, + "Crypto holder": 0.06 + }, + "probability_override": null + }, + { + "when": "household_income >= 100000 and education_level == 'Graduate degree'", + "multiply": null, + "add": null, + "weight_overrides": { + "No investments": 0.05, + "401k/IRA only": 0.3, + "Diversified investor": 0.45, + "Active trader": 0.15, + "Crypto holder": 0.05 + }, + "probability_override": null + }, + { + "when": "household_income >= 150000", + "multiply": null, + "add": null, + "weight_overrides": { + "No investments": 0.03, + "401k/IRA only": 0.22, + "Diversified investor": 0.5, + "Active trader": 0.2, + "Crypto holder": 0.05 + }, + "probability_override": null + } + ] + }, + { + "name": "primary_info_source", + "modifiers": [ + { + "when": "age < 30 and education_level in ['Less than HS', 'HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "Cable/broadcast TV news": 0.05, + "Social media": 0.55, + "Online news sites": 0.2, + "Podcasts": 0.1, + "Local news": 0.04, + "Print media": 0.01, + "Avoids news": 0.05 + }, + "probability_override": null + }, + { + "when": "age < 30 and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Cable/broadcast TV news": 0.04, + "Social media": 0.38, + "Online news sites": 0.32, + "Podcasts": 0.18, + "Local news": 0.04, + "Print media": 0.02, + "Avoids news": 0.02 + }, + "probability_override": null + }, + { + "when": "age >= 30 and age < 50 and education_level in ['Less than HS', 'HS diploma/GED']", + "multiply": null, + "add": null, + "weight_overrides": { + "Cable/broadcast TV news": 0.22, + "Social media": 0.38, + "Online news sites": 0.18, + "Podcasts": 0.07, + "Local news": 0.1, + "Print media": 0.02, + "Avoids news": 0.03 + }, + "probability_override": null + }, + { + "when": "age >= 30 and age < 50 and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Cable/broadcast TV news": 0.14, + "Social media": 0.22, + "Online news sites": 0.38, + "Podcasts": 0.16, + "Local news": 0.06, + "Print media": 0.03, + "Avoids news": 0.01 + }, + "probability_override": null + }, + { + "when": "age >= 50 and age < 65 and education_level in ['Less than HS', 'HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "Cable/broadcast TV news": 0.42, + "Social media": 0.22, + "Online news sites": 0.18, + "Podcasts": 0.06, + "Local news": 0.09, + "Print media": 0.02, + "Avoids news": 0.01 + }, + "probability_override": null + }, + { + "when": "age >= 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Cable/broadcast TV news": 0.52, + "Social media": 0.1, + "Online news sites": 0.16, + "Podcasts": 0.04, + "Local news": 0.14, + "Print media": 0.03, + "Avoids news": 0.01 + }, + "probability_override": null + } + ] + }, + { + "name": "social_media_behavior", + "modifiers": [ + { + "when": "age < 30 and primary_info_source == 'Social media'", + "multiply": null, + "add": null, + "weight_overrides": { + "Non-user": 0.02, + "Passive consumer": 0.25, + "Occasional poster": 0.4, + "Active poster/Influencer": 0.33 + }, + "probability_override": null + }, + { + "when": "age < 30 and primary_info_source != 'Social media'", + "multiply": null, + "add": null, + "weight_overrides": { + "Non-user": 0.06, + "Passive consumer": 0.38, + "Occasional poster": 0.38, + "Active poster/Influencer": 0.18 + }, + "probability_override": null + }, + { + "when": "age >= 30 and age < 50 and primary_info_source == 'Social media'", + "multiply": null, + "add": null, + "weight_overrides": { + "Non-user": 0.04, + "Passive consumer": 0.32, + "Occasional poster": 0.42, + "Active poster/Influencer": 0.22 + }, + "probability_override": null + }, + { + "when": "age >= 30 and age < 50 and primary_info_source != 'Social media'", + "multiply": null, + "add": null, + "weight_overrides": { + "Non-user": 0.14, + "Passive consumer": 0.48, + "Occasional poster": 0.28, + "Active poster/Influencer": 0.1 + }, + "probability_override": null + }, + { + "when": "age >= 50 and primary_info_source == 'Social media'", + "multiply": null, + "add": null, + "weight_overrides": { + "Non-user": 0.06, + "Passive consumer": 0.5, + "Occasional poster": 0.34, + "Active poster/Influencer": 0.1 + }, + "probability_override": null + }, + { + "when": "age >= 50 and primary_info_source != 'Social media'", + "multiply": null, + "add": null, + "weight_overrides": { + "Non-user": 0.35, + "Passive consumer": 0.42, + "Occasional poster": 0.18, + "Active poster/Influencer": 0.05 + }, + "probability_override": null + } + ] + }, + { + "name": "tech_adoption_posture", + "modifiers": [ + { + "when": "age < 30 and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Technophobe/Avoider": 0.02, + "Late majority adopter": 0.08, + "Early majority adopter": 0.28, + "Early adopter": 0.4, + "Innovator": 0.22 + }, + "probability_override": null + }, + { + "when": "age < 30 and education_level in ['Less than HS', 'HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "Technophobe/Avoider": 0.04, + "Late majority adopter": 0.16, + "Early majority adopter": 0.38, + "Early adopter": 0.32, + "Innovator": 0.1 + }, + "probability_override": null + }, + { + "when": "age >= 30 and age < 50 and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Technophobe/Avoider": 0.04, + "Late majority adopter": 0.16, + "Early majority adopter": 0.34, + "Early adopter": 0.32, + "Innovator": 0.14 + }, + "probability_override": null + }, + { + "when": "age >= 30 and age < 50 and education_level in ['Less than HS', 'HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "Technophobe/Avoider": 0.1, + "Late majority adopter": 0.3, + "Early majority adopter": 0.36, + "Early adopter": 0.18, + "Innovator": 0.06 + }, + "probability_override": null + }, + { + "when": "age >= 50 and age < 65 and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Technophobe/Avoider": 0.1, + "Late majority adopter": 0.28, + "Early majority adopter": 0.36, + "Early adopter": 0.2, + "Innovator": 0.06 + }, + "probability_override": null + }, + { + "when": "age >= 50 and education_level in ['Less than HS', 'HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "Technophobe/Avoider": 0.26, + "Late majority adopter": 0.38, + "Early majority adopter": 0.24, + "Early adopter": 0.09, + "Innovator": 0.03 + }, + "probability_override": null + }, + { + "when": "age >= 65", + "multiply": null, + "add": null, + "weight_overrides": { + "Technophobe/Avoider": 0.38, + "Late majority adopter": 0.36, + "Early majority adopter": 0.18, + "Early adopter": 0.06, + "Innovator": 0.02 + }, + "probability_override": null + } + ] + }, + { + "name": "religious_engagement", + "modifiers": [ + { + "when": "us_region == 'Southeast' and race_ethnicity == 'Black'", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.06, + "Nominally affiliated": 0.18, + "Moderately religious": 0.34, + "Devout": 0.42 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southeast' and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.18, + "Nominally affiliated": 0.24, + "Moderately religious": 0.3, + "Devout": 0.28 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southeast' and race_ethnicity == 'Hispanic/Latino'", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.12, + "Nominally affiliated": 0.22, + "Moderately religious": 0.34, + "Devout": 0.32 + }, + "probability_override": null + }, + { + "when": "us_region == 'Midwest' and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.22, + "Nominally affiliated": 0.28, + "Moderately religious": 0.3, + "Devout": 0.2 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southwest'", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.22, + "Nominally affiliated": 0.26, + "Moderately religious": 0.28, + "Devout": 0.24 + }, + "probability_override": null + }, + { + "when": "us_region == 'West Coast' and race_ethnicity in ['White non-Hispanic', 'Asian']", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.42, + "Nominally affiliated": 0.3, + "Moderately religious": 0.18, + "Devout": 0.1 + }, + "probability_override": null + }, + { + "when": "us_region == 'Northeast' and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.38, + "Nominally affiliated": 0.32, + "Moderately religious": 0.2, + "Devout": 0.1 + }, + "probability_override": null + }, + { + "when": "race_ethnicity == 'Asian'", + "multiply": null, + "add": null, + "weight_overrides": { + "Secular/None": 0.34, + "Nominally affiliated": 0.28, + "Moderately religious": 0.24, + "Devout": 0.14 + }, + "probability_override": null + } + ] + }, + { + "name": "political_identity", + "modifiers": [ + { + "when": "us_region == 'Northeast' and education_level in ['Bachelor\\'s degree', 'Graduate degree'] and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.3, + "Lean Democrat": 0.28, + "True Independent": 0.18, + "Lean Republican": 0.14, + "Strong Republican": 0.1 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southeast' and education_level in ['Less than HS', 'HS diploma/GED'] and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.08, + "Lean Democrat": 0.1, + "True Independent": 0.16, + "Lean Republican": 0.24, + "Strong Republican": 0.42 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southeast' and race_ethnicity == 'Black'", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.52, + "Lean Democrat": 0.26, + "True Independent": 0.12, + "Lean Republican": 0.06, + "Strong Republican": 0.04 + }, + "probability_override": null + }, + { + "when": "race_ethnicity == 'Hispanic/Latino' and us_region in ['Southwest', 'West Coast']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.28, + "Lean Democrat": 0.28, + "True Independent": 0.22, + "Lean Republican": 0.13, + "Strong Republican": 0.09 + }, + "probability_override": null + }, + { + "when": "race_ethnicity == 'Asian'", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.28, + "Lean Democrat": 0.28, + "True Independent": 0.22, + "Lean Republican": 0.13, + "Strong Republican": 0.09 + }, + "probability_override": null + }, + { + "when": "us_region == 'West Coast' and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.34, + "Lean Democrat": 0.26, + "True Independent": 0.18, + "Lean Republican": 0.12, + "Strong Republican": 0.1 + }, + "probability_override": null + }, + { + "when": "us_region == 'Midwest' and education_level in ['Less than HS', 'HS diploma/GED'] and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.1, + "Lean Democrat": 0.13, + "True Independent": 0.18, + "Lean Republican": 0.24, + "Strong Republican": 0.35 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southwest' and education_level in ['Less than HS', 'HS diploma/GED'] and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.08, + "Lean Democrat": 0.11, + "True Independent": 0.16, + "Lean Republican": 0.26, + "Strong Republican": 0.39 + }, + "probability_override": null + }, + { + "when": "education_level == 'Graduate degree' and race_ethnicity == 'White non-Hispanic'", + "multiply": null, + "add": null, + "weight_overrides": { + "Strong Democrat": 0.3, + "Lean Democrat": 0.28, + "True Independent": 0.18, + "Lean Republican": 0.14, + "Strong Republican": 0.1 + }, + "probability_override": null + } + ] + }, + { + "name": "political_engagement_level", + "modifiers": [ + { + "when": "political_identity in ['Strong Democrat', 'Strong Republican'] and age >= 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Disengaged": 0.04, + "Single-issue voter": 0.12, + "Moderate/occasional participant": 0.24, + "Highly engaged partisan": 0.6 + }, + "probability_override": null + }, + { + "when": "political_identity in ['Strong Democrat', 'Strong Republican'] and age < 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Disengaged": 0.06, + "Single-issue voter": 0.16, + "Moderate/occasional participant": 0.3, + "Highly engaged partisan": 0.48 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and age < 35", + "multiply": null, + "add": null, + "weight_overrides": { + "Disengaged": 0.32, + "Single-issue voter": 0.28, + "Moderate/occasional participant": 0.3, + "Highly engaged partisan": 0.1 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and age >= 35", + "multiply": null, + "add": null, + "weight_overrides": { + "Disengaged": 0.2, + "Single-issue voter": 0.3, + "Moderate/occasional participant": 0.38, + "Highly engaged partisan": 0.12 + }, + "probability_override": null + }, + { + "when": "political_identity in ['Lean Democrat', 'Lean Republican'] and age >= 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Disengaged": 0.1, + "Single-issue voter": 0.22, + "Moderate/occasional participant": 0.44, + "Highly engaged partisan": 0.24 + }, + "probability_override": null + }, + { + "when": "political_identity in ['Lean Democrat', 'Lean Republican'] and age < 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Disengaged": 0.18, + "Single-issue voter": 0.26, + "Moderate/occasional participant": 0.4, + "Highly engaged partisan": 0.16 + }, + "probability_override": null + } + ] + }, + { + "name": "vote_2024_presidential", + "modifiers": [ + { + "when": "political_identity == 'Strong Republican' and political_engagement_level == 'Highly engaged partisan'", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.9, + "Harris": 0.02, + "Third party": 0.03, + "Did not vote": 0.05, + "Not eligible": 0.0 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Democrat' and political_engagement_level == 'Highly engaged partisan'", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.02, + "Harris": 0.9, + "Third party": 0.04, + "Did not vote": 0.04, + "Not eligible": 0.0 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Lean Republican'", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.68, + "Harris": 0.14, + "Third party": 0.06, + "Did not vote": 0.12, + "Not eligible": 0.0 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Lean Democrat'", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.1, + "Harris": 0.72, + "Third party": 0.07, + "Did not vote": 0.11, + "Not eligible": 0.0 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and political_engagement_level == 'Disengaged'", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.16, + "Harris": 0.16, + "Third party": 0.1, + "Did not vote": 0.52, + "Not eligible": 0.06 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and political_engagement_level != 'Disengaged'", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.32, + "Harris": 0.32, + "Third party": 0.12, + "Did not vote": 0.22, + "Not eligible": 0.02 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Republican' and political_engagement_level in ['Disengaged', 'Single-issue voter']", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.72, + "Harris": 0.05, + "Third party": 0.05, + "Did not vote": 0.18, + "Not eligible": 0.0 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Democrat' and political_engagement_level in ['Disengaged', 'Single-issue voter']", + "multiply": null, + "add": null, + "weight_overrides": { + "Trump": 0.04, + "Harris": 0.72, + "Third party": 0.06, + "Did not vote": 0.18, + "Not eligible": 0.0 + }, + "probability_override": null + } + ] + }, + { + "name": "midterm_turnout_propensity", + "modifiers": [ + { + "when": "political_engagement_level == 'Highly engaged partisan' and age >= 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Always votes": 0.72, + "Sometimes votes": 0.2, + "Rarely votes": 0.06, + "Never votes": 0.02 + }, + "probability_override": null + }, + { + "when": "political_engagement_level == 'Highly engaged partisan' and age < 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Always votes": 0.52, + "Sometimes votes": 0.3, + "Rarely votes": 0.12, + "Never votes": 0.06 + }, + "probability_override": null + }, + { + "when": "political_engagement_level == 'Moderate/occasional participant' and age >= 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Always votes": 0.4, + "Sometimes votes": 0.38, + "Rarely votes": 0.16, + "Never votes": 0.06 + }, + "probability_override": null + }, + { + "when": "political_engagement_level == 'Moderate/occasional participant' and age < 45", + "multiply": null, + "add": null, + "weight_overrides": { + "Always votes": 0.2, + "Sometimes votes": 0.38, + "Rarely votes": 0.28, + "Never votes": 0.14 + }, + "probability_override": null + }, + { + "when": "political_engagement_level == 'Single-issue voter'", + "multiply": null, + "add": null, + "weight_overrides": { + "Always votes": 0.2, + "Sometimes votes": 0.35, + "Rarely votes": 0.3, + "Never votes": 0.15 + }, + "probability_override": null + }, + { + "when": "political_engagement_level == 'Disengaged' and age < 35", + "multiply": null, + "add": null, + "weight_overrides": { + "Always votes": 0.04, + "Sometimes votes": 0.14, + "Rarely votes": 0.32, + "Never votes": 0.5 + }, + "probability_override": null + }, + { + "when": "political_engagement_level == 'Disengaged' and age >= 35", + "multiply": null, + "add": null, + "weight_overrides": { + "Always votes": 0.08, + "Sometimes votes": 0.22, + "Rarely votes": 0.36, + "Never votes": 0.34 + }, + "probability_override": null + } + ] + }, + { + "name": "congressional_district_competitiveness", + "modifiers": [ + { + "when": "us_region == 'Northeast' and urban_rural == 'Urban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.05, + "Lean Republican": 0.08, + "Swing district": 0.12, + "Lean Democrat": 0.22, + "Safe Democrat": 0.53 + }, + "probability_override": null + }, + { + "when": "us_region == 'Northeast' and urban_rural == 'Suburban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.1, + "Lean Republican": 0.15, + "Swing district": 0.28, + "Lean Democrat": 0.28, + "Safe Democrat": 0.19 + }, + "probability_override": null + }, + { + "when": "us_region == 'Northeast' and urban_rural == 'Rural'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.4, + "Lean Republican": 0.28, + "Swing district": 0.18, + "Lean Democrat": 0.09, + "Safe Democrat": 0.05 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southeast' and urban_rural == 'Urban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.1, + "Lean Republican": 0.12, + "Swing district": 0.18, + "Lean Democrat": 0.28, + "Safe Democrat": 0.32 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southeast' and urban_rural == 'Suburban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.22, + "Lean Republican": 0.28, + "Swing district": 0.28, + "Lean Democrat": 0.14, + "Safe Democrat": 0.08 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southeast' and urban_rural == 'Rural'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.55, + "Lean Republican": 0.26, + "Swing district": 0.12, + "Lean Democrat": 0.05, + "Safe Democrat": 0.02 + }, + "probability_override": null + }, + { + "when": "us_region == 'Midwest' and urban_rural == 'Urban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.06, + "Lean Republican": 0.1, + "Swing district": 0.18, + "Lean Democrat": 0.26, + "Safe Democrat": 0.4 + }, + "probability_override": null + }, + { + "when": "us_region == 'Midwest' and urban_rural == 'Suburban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.2, + "Lean Republican": 0.26, + "Swing district": 0.32, + "Lean Democrat": 0.14, + "Safe Democrat": 0.08 + }, + "probability_override": null + }, + { + "when": "us_region == 'Midwest' and urban_rural == 'Rural'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.54, + "Lean Republican": 0.28, + "Swing district": 0.12, + "Lean Democrat": 0.04, + "Safe Democrat": 0.02 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southwest' and urban_rural == 'Urban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.1, + "Lean Republican": 0.16, + "Swing district": 0.26, + "Lean Democrat": 0.26, + "Safe Democrat": 0.22 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southwest' and urban_rural == 'Suburban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.24, + "Lean Republican": 0.28, + "Swing district": 0.28, + "Lean Democrat": 0.12, + "Safe Democrat": 0.08 + }, + "probability_override": null + }, + { + "when": "us_region == 'Southwest' and urban_rural == 'Rural'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.56, + "Lean Republican": 0.24, + "Swing district": 0.12, + "Lean Democrat": 0.05, + "Safe Democrat": 0.03 + }, + "probability_override": null + }, + { + "when": "us_region == 'West Coast' and urban_rural == 'Urban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.04, + "Lean Republican": 0.06, + "Swing district": 0.1, + "Lean Democrat": 0.22, + "Safe Democrat": 0.58 + }, + "probability_override": null + }, + { + "when": "us_region == 'West Coast' and urban_rural == 'Suburban'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.1, + "Lean Republican": 0.18, + "Swing district": 0.26, + "Lean Democrat": 0.26, + "Safe Democrat": 0.2 + }, + "probability_override": null + }, + { + "when": "us_region == 'West Coast' and urban_rural == 'Rural'", + "multiply": null, + "add": null, + "weight_overrides": { + "Safe Republican": 0.44, + "Lean Republican": 0.28, + "Swing district": 0.16, + "Lean Democrat": 0.08, + "Safe Democrat": 0.04 + }, + "probability_override": null + } + ] + }, + { + "name": "top_issue_2026", + "modifiers": [ + { + "when": "political_identity == 'Strong Republican' and employment_sector in ['Private sector', 'Self-employed', 'Gig/contract']", + "multiply": null, + "add": null, + "weight_overrides": { + "Economy/Jobs": 0.38, + "Abortion/Reproductive rights": 0.02, + "Immigration": 0.28, + "Democracy/Rule of law": 0.04, + "Healthcare": 0.1, + "Climate": 0.02, + "Education": 0.06, + "AI/Technology": 0.1 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Democrat' and employment_sector in ['State/local government', 'Federal government']", + "multiply": null, + "add": null, + "weight_overrides": { + "Economy/Jobs": 0.14, + "Abortion/Reproductive rights": 0.22, + "Immigration": 0.04, + "Democracy/Rule of law": 0.28, + "Healthcare": 0.16, + "Climate": 0.1, + "Education": 0.05, + "AI/Technology": 0.01 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Democrat' and employment_sector in ['Private sector', 'Self-employed']", + "multiply": null, + "add": null, + "weight_overrides": { + "Economy/Jobs": 0.18, + "Abortion/Reproductive rights": 0.2, + "Immigration": 0.04, + "Democracy/Rule of law": 0.24, + "Healthcare": 0.16, + "Climate": 0.1, + "Education": 0.06, + "AI/Technology": 0.02 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and employment_sector in ['Private sector', 'Gig/contract', 'Unemployed']", + "multiply": null, + "add": null, + "weight_overrides": { + "Economy/Jobs": 0.42, + "Abortion/Reproductive rights": 0.08, + "Immigration": 0.16, + "Democracy/Rule of law": 0.12, + "Healthcare": 0.12, + "Climate": 0.04, + "Education": 0.04, + "AI/Technology": 0.02 + }, + "probability_override": null + }, + { + "when": "political_identity in ['Lean Republican', 'Strong Republican'] and employment_sector == 'Retired'", + "multiply": null, + "add": null, + "weight_overrides": { + "Economy/Jobs": 0.26, + "Abortion/Reproductive rights": 0.04, + "Immigration": 0.26, + "Democracy/Rule of law": 0.06, + "Healthcare": 0.28, + "Climate": 0.02, + "Education": 0.06, + "AI/Technology": 0.02 + }, + "probability_override": null + }, + { + "when": "political_identity in ['Strong Democrat', 'Lean Democrat'] and employment_sector == 'Retired'", + "multiply": null, + "add": null, + "weight_overrides": { + "Economy/Jobs": 0.18, + "Abortion/Reproductive rights": 0.14, + "Immigration": 0.04, + "Democracy/Rule of law": 0.22, + "Healthcare": 0.3, + "Climate": 0.06, + "Education": 0.04, + "AI/Technology": 0.02 + }, + "probability_override": null + }, + { + "when": "employment_sector in ['Federal government', 'State/local government'] and political_identity in ['Lean Republican', 'Strong Republican']", + "multiply": null, + "add": null, + "weight_overrides": { + "Economy/Jobs": 0.28, + "Abortion/Reproductive rights": 0.04, + "Immigration": 0.22, + "Democracy/Rule of law": 0.14, + "Healthcare": 0.16, + "Climate": 0.04, + "Education": 0.1, + "AI/Technology": 0.02 + }, + "probability_override": null + } + ] + }, + { + "name": "country_direction_approval", + "modifiers": [ + { + "when": "political_identity == 'Strong Republican' and financial_margin in ['Comfortable savings buffer', 'Modest buffer']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.52, + "Somewhat approve": 0.3, + "Somewhat disapprove": 0.12, + "Strongly disapprove": 0.06 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Republican' and financial_margin in ['Paycheck-to-paycheck', 'In debt/deficit']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.34, + "Somewhat approve": 0.32, + "Somewhat disapprove": 0.2, + "Strongly disapprove": 0.14 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Lean Republican' and financial_margin in ['Comfortable savings buffer', 'Modest buffer']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.28, + "Somewhat approve": 0.4, + "Somewhat disapprove": 0.2, + "Strongly disapprove": 0.12 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and financial_margin in ['Comfortable savings buffer', 'Modest buffer']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.14, + "Somewhat approve": 0.3, + "Somewhat disapprove": 0.32, + "Strongly disapprove": 0.24 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and financial_margin in ['Paycheck-to-paycheck', 'In debt/deficit']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.08, + "Somewhat approve": 0.22, + "Somewhat disapprove": 0.34, + "Strongly disapprove": 0.36 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Lean Democrat' and financial_margin in ['Paycheck-to-paycheck', 'In debt/deficit']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.03, + "Somewhat approve": 0.1, + "Somewhat disapprove": 0.28, + "Strongly disapprove": 0.59 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Democrat' and financial_margin in ['Paycheck-to-paycheck', 'In debt/deficit']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.02, + "Somewhat approve": 0.05, + "Somewhat disapprove": 0.18, + "Strongly disapprove": 0.75 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Democrat' and financial_margin in ['Comfortable savings buffer', 'Modest buffer']", + "multiply": null, + "add": null, + "weight_overrides": { + "Strongly approve": 0.03, + "Somewhat approve": 0.08, + "Somewhat disapprove": 0.24, + "Strongly disapprove": 0.65 + }, + "probability_override": null + } + ] + }, + { + "name": "consumer_identity", + "modifiers": [ + { + "when": "household_income < 50000 and education_level in ['Less than HS', 'HS diploma/GED']", + "multiply": null, + "add": null, + "weight_overrides": { + "Brand loyal": 0.18, + "Price/value driven": 0.58, + "Values/ethics driven": 0.1, + "Convenience driven": 0.14 + }, + "probability_override": null + }, + { + "when": "household_income >= 50000 and household_income < 100000 and education_level == 'Some college'", + "multiply": null, + "add": null, + "weight_overrides": { + "Brand loyal": 0.26, + "Price/value driven": 0.4, + "Values/ethics driven": 0.16, + "Convenience driven": 0.18 + }, + "probability_override": null + }, + { + "when": "household_income >= 100000 and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "Brand loyal": 0.28, + "Price/value driven": 0.22, + "Values/ethics driven": 0.32, + "Convenience driven": 0.18 + }, + "probability_override": null + }, + { + "when": "household_income >= 150000 and education_level == 'Graduate degree'", + "multiply": null, + "add": null, + "weight_overrides": { + "Brand loyal": 0.3, + "Price/value driven": 0.14, + "Values/ethics driven": 0.38, + "Convenience driven": 0.18 + }, + "probability_override": null + } + ] + }, + { + "name": "institutional_trust", + "modifiers": [ + { + "when": "political_identity == 'Strong Democrat' and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.18, + "Moderate trust": 0.42, + "Low trust": 0.3, + "Distrustful/Conspiratorial": 0.1 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Democrat' and education_level in ['Less than HS', 'HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.12, + "Moderate trust": 0.36, + "Low trust": 0.34, + "Distrustful/Conspiratorial": 0.18 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Republican' and education_level in ['Less than HS', 'HS diploma/GED', 'Some college']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.06, + "Moderate trust": 0.22, + "Low trust": 0.36, + "Distrustful/Conspiratorial": 0.36 + }, + "probability_override": null + }, + { + "when": "political_identity == 'Strong Republican' and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.1, + "Moderate trust": 0.28, + "Low trust": 0.38, + "Distrustful/Conspiratorial": 0.24 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and education_level in ['Less than HS', 'HS diploma/GED']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.06, + "Moderate trust": 0.26, + "Low trust": 0.38, + "Distrustful/Conspiratorial": 0.3 + }, + "probability_override": null + }, + { + "when": "political_identity == 'True Independent' and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.1, + "Moderate trust": 0.38, + "Low trust": 0.36, + "Distrustful/Conspiratorial": 0.16 + }, + "probability_override": null + }, + { + "when": "political_identity in ['Lean Democrat'] and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.22, + "Moderate trust": 0.46, + "Low trust": 0.24, + "Distrustful/Conspiratorial": 0.08 + }, + "probability_override": null + }, + { + "when": "political_identity in ['Lean Republican'] and education_level in ['Bachelor\\'s degree', 'Graduate degree']", + "multiply": null, + "add": null, + "weight_overrides": { + "High trust": 0.14, + "Moderate trust": 0.34, + "Low trust": 0.36, + "Distrustful/Conspiratorial": 0.16 + }, + "probability_override": null + } + ] + }, + { + "name": "risk_tolerance", + "modifiers": [ + { + "when": "age < 35 and household_income >= 80000", + "multiply": 1.2, + "add": 0.06, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "age < 35 and household_income < 40000", + "multiply": 0.95, + "add": 0.02, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "age >= 55 and household_income >= 100000", + "multiply": 0.9, + "add": 0.0, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "age >= 55 and household_income < 50000", + "multiply": 0.8, + "add": -0.06, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "age >= 35 and age < 55 and household_income >= 100000", + "multiply": 1.05, + "add": 0.02, + "weight_overrides": null, + "probability_override": null + } + ] + }, + { + "name": "economic_anxiety", + "modifiers": [ + { + "when": "financial_margin == 'In debt/deficit' and job_security_perception in ['Very insecure', 'Somewhat insecure']", + "multiply": 1.0, + "add": 0.22, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "financial_margin == 'In debt/deficit' and job_security_perception in ['N/A - not employed', 'Somewhat secure']", + "multiply": 1.0, + "add": 0.16, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "financial_margin == 'Paycheck-to-paycheck' and job_security_perception in ['Somewhat insecure', 'Very insecure']", + "multiply": 1.0, + "add": 0.14, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "financial_margin == 'Paycheck-to-paycheck' and job_security_perception in ['Very secure', 'Somewhat secure']", + "multiply": 1.0, + "add": 0.08, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "financial_margin == 'Modest buffer' and job_security_perception == 'N/A - not employed'", + "multiply": 1.0, + "add": 0.04, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "financial_margin == 'Comfortable savings buffer' and job_security_perception in ['Very secure', 'Somewhat secure']", + "multiply": 1.0, + "add": -0.16, + "weight_overrides": null, + "probability_override": null + }, + { + "when": "financial_margin == 'Comfortable savings buffer' and job_security_perception == 'N/A - not employed'", + "multiply": 1.0, + "add": -0.08, + "weight_overrides": null, + "probability_override": null + } + ] + } + ] + }, + "name": "conditional_modifiers_hydration", + "type": "tool_use", + "caller": { + "type": "direct" + } + } + ], + "model": "claude-sonnet-4-6", + "role": "assistant", + "stop_reason": "tool_use", + "stop_sequence": null, + "type": "message", + "usage": { + "cache_creation": { + "ephemeral_1h_input_tokens": "[REDACTED_SECRET]", + "ephemeral_5m_input_tokens": "[REDACTED_SECRET]" + }, + "cache_creation_input_tokens": "[REDACTED_SECRET]", + "cache_read_input_tokens": "[REDACTED_SECRET]", + "input_tokens": 60228, + "output_tokens": 19985, + "server_tool_use": { + "web_search_requests": 3, + "web_fetch_requests": 0 + }, + "service_tier": "standard", + "inference_geo": "global" + } + }, + "sources_extracted": [ + "https://statisticalatlas.com/United-States/Marital-Status", + "https://educationdata.org/education-attainment-statistics", + "https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html", + "https://www.census.gov/topics/families/marriage-and-divorce.html", + "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html", + "https://nces.ed.gov/pubs95/web/95823.asp", + "https://www.census.gov/library/publications/2025/demo/p60-286.html", + "https://www.equityinhighered.org/indicators/u-s-population-trends-and-educational-attainment/educational-attainment-by-age/", + "https://www.statista.com/statistics/785618/educational-attainment-by-age-group-us/", + "https://www.ers.usda.gov/topics/rural-economy-population/employment-education/rural-education", + "https://www2.census.gov/library/publications/2025/demo/p60-286.pdf", + "https://dhsprogram.com/data/Guide-to-DHS-Statistics/Current_Marital_Status.htm", + "https://en.wikipedia.org/wiki/Household_income_in_the_United_States", + "https://nces.ed.gov/fastfacts/display.asp?id=27", + "https://www.census.gov/data/tables/time-series/demo/families/marital.html", + "https://www.psychologytoday.com/us/blog/living-single/202406/the-record-setting-rise-of-single-living-in-the-us", + "https://www.census.gov/topics/education/educational-attainment/data/tables.html", + "https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States", + "https://www.bls.gov/news.release/famee.t05.htm", + "https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html", + "https://www2.census.gov/library/publications/2024/demo/p60-282.pdf", + "https://www.bls.gov/opub/mlr/2024/article/patterns-of-marriage-and-divorce-from-ages-15-to-55-evidence-from-the-nlsy79.htm", + "https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/", + "https://www.census.gov/library/stories/2025/09/education-and-income.html", + "https://nces.ed.gov/programs/digest/2024menu_tables.asp", + "https://nces.ed.gov/programs/coe/indicator/cba/annual-earnings", + "https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-24-10.html", + "https://www.ccdaily.com/2024/01/more-adults-earn-post-high-school-credentials/", + "https://en.wikipedia.org/wiki/Literacy_in_the_United_States", + "https://www.ers.usda.gov/data-products/county-level-data-sets" + ] +} \ No newline at end of file diff --git a/examples/population.v1.yaml b/examples/population.v1.yaml deleted file mode 100644 index 785117b..0000000 --- a/examples/population.v1.yaml +++ /dev/null @@ -1,2968 +0,0 @@ -meta: - description: 10,000 US adults aged 18+ representative of the national population - by state, age, gender, race/ethnicity, education, and income. Include political - affiliation, media consumption habits, social media usage, religious affiliation, - and personality traits. Focus on attributes relevant to opinion formation on national - policy issues. - geography: US - agent_focus: US adults representative of the national population, focused on opinion - formation on national policy issues - created_at: '2026-02-17T21:08:30.550477' - version: '1.0' - persona_template: null - scenario_description: null - name_config: null -grounding: - overall: strong - sources_count: 195 - strong_count: 24 - medium_count: 11 - low_count: 0 - sources: - - https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/ - - https://nces.ed.gov/programs/coe/indicator/cba - - https://www.pewresearch.org/politics/2024/04/09/age-generational-cohorts-and-party-identification/ - - https://www.pewresearch.org/topic/family-relationships/marriage-divorce/intermarriage/ - - https://blackdemographics.com/households/marriage-in-black-america/ - - https://www.census.gov/data/tables/time-series/demo/educational-attainment/cps-historical-time-series.html - - https://news.gallup.com/poll/15370/party-affiliation.aspx - - https://pmc.ncbi.nlm.nih.gov/articles/PMC8821110/ - - https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/ - - https://www.bls.gov/opub/reports/race-and-ethnicity/2023/ - - https://www.statista.com/statistics/203183/percentage-distribution-of-household-income-in-the-us/ - - https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/ - - https://www.census.gov/topics/families/families-and-households.html - - 'U.S. Census Bureau – America''s Families and Living Arrangements: 2023, https://www.census.gov/data/tables/2023/demo/families/cps-2023.html' - - https://news.gallup.com/poll/611864/lgbtq-identification.aspx - - https://www.census.gov/newsroom/press-releases/2023/population-estimates-age-sex.html - - https://www.census.gov/quickfacts/fact/table/US/HCN010222 - - https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx - - https://www.census.gov/acs/www/about/why-we-ask-each-question/marital/ - - https://www.census.gov/newsroom/press-kits/2023/national-state-population-estimates.html - - https://en.wikipedia.org/wiki/Urbanization_in_the_United_States - - https://www.statista.com/statistics/184260/educational-attainment-in-the-us/ - - UCLA CCPR – Assortative Mating, Intergenerational Mobility, and Educational Inequality, - https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf - - https://www.census.gov/newsroom/press-releases/2023/population-estimates-characteristics.html - - https://pmc.ncbi.nlm.nih.gov/articles/PMC2728392/ - - https://www.ers.usda.gov/data-products/rural-urban-continuum-codes - - https://www.educationnext.org/which-party-really-has-the-edge-on-education/ - - https://kb.gcsu.edu/researchday/2024/all/41/ - - https://www.census.gov/data/tables/2022/demo/educational-attainment/cps-detailed-tables.html - - https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html - - https://datacenter.aecf.org/data/tables/6294-educational-attainment-of-population-ages-25-to-34 - - https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/ - - https://www.census.gov/topics/education/educational-attainment.html - - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-09.html - - https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/ - - https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx - - https://www.visualcapitalist.com/mapped-how-much-of-each-u-s-states-population-lives-in-cities/ - - PMC / NCBI – Religion, Marriage Markets, and Assortative Mating in the United - States, https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/ - - https://www.catholicworldreport.com/2025/09/03/new-report-shows-1-percent-of-us-population-identifies-as-transgender/ - - Pew Research Center – Trends and Patterns in Intermarriage (2017), https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/ - - BlackDemographics.com – Black Marriage in America (2023 ACS), https://blackdemographics.com/households/marriage-in-black-america/ - - https://worldpopulationreview.com/states - - https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/ - - U.S. Census Bureau – Geographic Variations in Black-White Interracial Marital - Relationships (PAA 2023 paper), https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf - - https://dqydj.com/income-by-education/ - - https://www.census.gov/library/stories/2023/11/same-sex-couple-diversity.html - - https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/ - - https://www.census.gov/library/stories/2024/11/family-households.html - - https://www.census.gov/library/visualizations/2023/comm/median-household-income.html - - https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural/2020-ua-facts.html - - https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States - - Wikipedia – Interracial Marriage in the United States, https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States - - https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A - - https://www.journals.uchicago.edu/doi/10.1086/702018 - - https://www.statista.com/chart/7031/americans-are-tying-the-knot-older-than-ever/ - - https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/ - - https://worldpopulationreview.com/state-rankings/average-household-size-by-state - - https://www.statista.com/statistics/1078383/political-party-identification-in-the-us/ - - https://tradingeconomics.com/united-states/rural-population-percent-of-total-population-wb-data.html - - https://pmc.ncbi.nlm.nih.gov/articles/PMC9616076/ - - https://www.pewresearch.org/topic/gender-lgbtq/lgbtq-attitudes-experiences/gender-identity/ - - https://www.census.gov/newsroom/press-releases/2023/population-trends-return-to-pre-pandemic-norms.html - - U.S. Census Bureau QuickFacts / Demographics of the United States (Wikipedia), - https://en.wikipedia.org/wiki/Demographics_of_the_United_States - - https://www.census.gov/topics/population.html - - https://www.pgpf.org/blog/2023/11/income-and-wealth-in-the-united-states-an-overview-of-recent-data - - https://proximityone.com/statepop2025.htm - - https://www.census.gov/data/tables/2023/demo/popproj/2023-summary-tables.html - - https://www.simplypsychology.org/big-five-personality.html - - https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/ - - https://www.census.gov/data/tables/time-series/demo/families/households.html - - https://www.cnn.com/2024/10/14/politics/the-biggest-predictor-of-how-someone-will-vote - - https://www.prb.org/resources/most-americans-marry-within-their-race/ - - https://research.collegeboard.org/media/pdf/education-pays-2023.pdf - - New York Fed Staff Report 682 – Educational Assortative Mating and Household Income - Inequality, https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf - - https://www.census.gov/content/dam/Census/library/visualizations/time-series/demo/families-and-households/ms-2.pdf - - https://www.census.gov/newsroom/stories/unmarried-single-americans-week.html - - https://williamsinstitute.law.ucla.edu/wp-content/uploads/Trans-Pop-Update-Aug-2025.pdf - - https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html - - 'U.S. Census Bureau – Historical Households Tables (HH-2 through HH-7): 1960–2023, - https://www.census.gov/data/tables/time-series/demo/families/households.html' - - https://www.pbs.org/newshour/show/how-a-college-degree-is-one-of-the-best-predictors-of-which-candidate-voters-support - - https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf - - U.S. Census Bureau – Historical Marital Status Tables (MS-2), https://www.census.gov/data/tables/time-series/demo/families/marital.html - - https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html - - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/decade-of-change-median-age-first-marriage-2012-2022-fp-24-07.html - - https://statisticalatlas.com/United-States/Marital-Status - - https://www.advisorperspectives.com/dshort/updates/2025/09/19/household-incomes-2024-the-value-of-higher-education - - https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States - - https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_population - - https://www.kff.org/other-health/trans-people-in-the-u-s-identities-demographics-and-wellbeing/ - - https://www.census.gov/topics/population/age-and-sex/data/tables.html - - https://www.census.gov/topics/education.html - - https://collectiver.com/blog/education-vote-correlation/ - - https://www.census.gov/programs-surveys/popproj/data/tables.html - - https://www.shvs.org/wp-content/uploads/2024/03/SHVS_Collection-of-Sexual-Orientation-and-Gender-Identity-Data_FINAL.pdf - - https://www.census.gov/newsroom/press-releases/2023/educational-attainment-data.html - - https://www.thomas.co/resources/type/hr-guides/what-are-big-5-personality-traits - - https://www.census.gov/library/publications/2023/demo/p60-279.html - - https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States - - https://www.cdc.gov/nchs/fastats/marriage-divorce.htm - - https://datausa.io/profile/geo/united-states - - https://www.bls.gov/emp/chart-unemployment-earnings-education.htm - - https://aspe.hhs.gov/sites/default/files/documents/6056484066506a8d4ba3dcd8d9322490/rural-health-rr-30-Oct-24.pdf - - https://www.census.gov/data/tables/2020/demo/families/cps-2020.html - - https://www.lassennews.com/do-smarter-states-vote-blue-study-finds-the-most-educated-states-lean-democratic - - https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html - - https://www.tandfonline.com/doi/abs/10.1080/15140326.2024.2327909 - - PMC / NCBI – The Rising Midlife First Marriage Rate in the U.S., https://pmc.ncbi.nlm.nih.gov/articles/PMC9616076/ - - https://www.census.gov/library/stories/2024/08/redefining-rural.html - - https://nces.ed.gov/programs/edge/Geographic/LocaleBoundaries - - https://www.nber.org/digest/may14/assortative-mating-and-income-inequality - - https://www.workingimmigrants.com/2023/10/growth-in-interracial-marriage-1980-vs-2021/ - - https://www.highereddatastories.com/2025/02/educational-attainment-and-presidential.html - - https://www.census.gov/library/visualizations/2023/comm/percent-change-state-population.html - - https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html - - https://www2.census.gov/library/publications/2024/demo/p60-282.pdf - - https://www2.census.gov/library/publications/2024/demo/p20-587.pdf - - PMC / NCBI – Marital Dissolution Among Interracial Couples, https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/ - - https://data.census.gov/table/ACSST5Y2023.S1201?q=82073 - - https://www.prb.org/resources/fact-sheet-aging-in-the-united-states/ - - https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/ - - https://williamsinstitute.law.ucla.edu/press/trans-pop-estimates-press-release/ - - https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/ - - https://pmc.ncbi.nlm.nih.gov/articles/PMC6048969/ - - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/median-age-first-marriage-geographic-variation-2022-fp-24-08.html - - https://www.statista.com/statistics/985183/size-urban-rural-population-us/ - - https://www.census.gov/data/tables/time-series/demo/families/marital.html - - https://www.pewresearch.org/politics/2024/04/09/partisanship-by-race-ethnicity-and-education/ - - https://www.census.gov/data/tables/2023/demo/families/cps-2023.html - - https://www.statista.com/statistics/1078361/political-party-identification-us-major-parties/ - - https://www.census.gov/library/stories/2018/07/interracial-marriages.html - - 'U.S. Census Bureau – Age and Sex Composition in the United States: 2023, https://www.census.gov/data/tables/2023/demo/age-and-sex/2023-age-sex-composition.html' - - https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html - - https://www.truity.com/test/big-five-personality-test - - 'BGSU NCFMR – Median Age at First Marriage: Geographic Variation, 2023 (FP-25-09), - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-09.html' - - https://www.census.gov/library/publications/2024/demo/p60-282.html - - https://www.statista.com/statistics/233184/median-household-income-in-the-united-states-by-age/ - - https://www.generationtechblog.com/p/transgender-identity-how-much-has - - https://nces.ed.gov/programs/digest/2023menu_tables.asp - - https://www.census.gov/programs-surveys/cps/data/tables.2023.List_1020932829.html - - https://www.hcmmlaw.com/blog/2024/07/13/majority-americans-now-single-statistics-insights/ - - U.S. Census Bureau – Family Households Story (2024), https://www.census.gov/library/stories/2024/11/family-households.html - - https://ccpr.ucla.edu/wp-content/uploads/2024/04/Assortative-Mating_-Intergenerational-Mobility_-and-Educational-Inequality.pdf - - NBER Digest – Assortative Mating and Income Inequality (Greenwood et al.), https://www.nber.org/digest/may14/assortative-mating-and-income-inequality - - https://www.census.gov/topics/education/educational-attainment/data/tables.html - - https://fred.stlouisfed.org/series/MEHOINUSA672N - - https://www.census.gov/topics/families.html - - https://www.census.gov/programs-surveys/popproj.html - - https://www.healthline.com/health/big-five-personality-traits - - https://censusreporter.org/topics/marital-status/ - - https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html - - https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group - - https://data.census.gov/table/ACSST1Y2023.S1501 - - https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/ - - https://en.wikipedia.org/wiki/Household_income_in_the_United_States - - https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx - - https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/ - - https://apps.quanticfoundry.com/profiles/bigfive/edf522c042d345e587a6fe1c809912f5/ - - https://www.census.gov/library/publications/2025/demo/p60-286.html - - https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/ - - https://goodhealthpsych.com/blog/exploring-the-big-five-personality-test/ - - https://usafacts.org/data/topics/people-society/population-and-demographics/population-data/average-family-size/ - - https://www.axios.com/2024/11/07/college-degree-voters-split-harris-trump - - https://www.prb.org/usdata/indicator/marriage-age-women/snapshot/ - - https://medium.com/@kathrynstaublin/the-most-educated-states-voted-blue-f60f304531f7 - - https://www.census.gov/library/stories/2025/09/education-and-income.html - - https://nchstats.com/average-marriage-age-in-the-us/ - - https://www.census.gov/newsroom/blogs/random-samplings/2023/09/exploring-diversity.html - - https://www.census.gov/content/dam/Census/library/publications/2023/demo/p60-279.pdf - - https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/ - - https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909 - - https://nces.ed.gov/fastfacts/display.asp?id=27 - - Duke University Press / Demography – Eight Decades of Educational Assortative - Mating (2024), https://read.dukeupress.edu/demography/article/61/5/1293/390842/ - - Statista / U.S. Census Bureau – Average household size in the U.S. 2023 (2.51 - persons), https://www.statista.com/statistics/183648/average-size-of-households-in-the-us/ - - https://www.icip.iastate.edu/tables/population/urban-pct-states - - https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html - - https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html - - https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/ - - https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/ - - https://www.theknot.com/content/average-age-of-marriage - - https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/ - - https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/ - - https://en.wikipedia.org/wiki/Big_Five_personality_traits - - https://www2.census.gov/library/publications/2024/demo/acsbr-023.pdf - - https://educationdata.org/education-attainment-statistics - - https://www.statista.com/statistics/1331358/sexual-orientation-gender-identity-us/ - - Population Reference Bureau – U.S. Household Composition Shifts as the Population - Grows Older, https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/ - - https://fred.stlouisfed.org/series/TTLHH - - https://www.statista.com/statistics/184259/mean-earnings-by-educational-attainment-and-ethnic-group/ - - https://www.arcgis.com/home/item.html?id=458e2c20ebb2479086bc32b7d09ffe27 - - https://wisevoter.com/state-rankings/average-household-size-by-state/ - - https://en.wikipedia.org/wiki/Demographics_of_the_United_States - - https://www.cdc.gov/nchs/data-analysis-tools/urban-rural.html - - https://www.neilsberg.com/insights/united-states-population-by-race/ - - https://www.census.gov/content/dam/Census/newsroom/press-kits/2023/paa/2023-paa-paper-geographic-variations-black-white-interracial-marital.pdf - - https://www.psychologytoday.com/us/basics/big-5-personality-traits -attributes: -- name: age - type: int - category: universal - description: Person's age in years, ranging from 18 to 90+, representative of the - US adult population. - scope: partner_correlated - correlation_rate: null - semantic_type: age - identity_type: generational_identity - display_format: null - sampling: - strategy: independent - distribution: - type: normal - mean: 46.7 - std: 17.5 - min: 18.0 - max: 99.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/newsroom/press-releases/2023/population-estimates-characteristics.html - note: US median age is 38.9 overall (2022 Census); for adults 18+ the mean shifts - to ~46.7 with std ~17.5. Normal distribution is a reasonable approximation of - the adult age distribution, though the true shape is somewhat right-skewed at - older ages due to mortality. The baby boom cohort (born 1946-1964, aged ~59-77 - in 2023) creates a modest bulge. - constraints: - - type: hard_min - value: 18.0 - expression: null - reason: Minimum adult age for US adult population sampling - - type: hard_max - value: 99.0 - expression: null - reason: Practical upper bound; centenarians exist but are extremely rare (<0.1%) -- name: gender - type: categorical - category: universal - description: Gender identity of the person (Male, Female, Non-binary/Other). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: gender_identity - display_format: null - sampling: - strategy: independent - distribution: - type: categorical - options: - - Male - - Female - - Non-binary/Other - weights: - - 0.489 - - 0.497 - - 0.014 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://news.gallup.com/poll/611864/lgbtq-identification.aspx; https://www.census.gov - note: '2020 Census: females 50.9%, males 49.1% of total population. Among adults - 18+, the sex ratio slightly favors females due to higher male mortality. Non-binary/Other - set to ~1.4%: Gallup (2024) reports ~1% of US adults identify as nonbinary, - Williams Institute estimates 0.8% identify as transgender with roughly 1/3 nonbinary. - Combining overlapping categories and rounding gives ~1.4% for Non-binary/Other. - Male and Female weights adjusted proportionally to sum to 1.' - constraints: - - type: spec_expression - value: null - expression: abs(sum(weights) - 1.0) < 0.001 - reason: Categorical weights must sum to 1.0 -- name: state - type: categorical - category: universal - description: US state of residence (all 50 states + DC), sampled proportionally - to population. - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: independent - distribution: - type: categorical - options: - - CA - - TX - - FL - - NY - - PA - - IL - - OH - - GA - - NC - - MI - - NJ - - VA - - WA - - AZ - - TN - - MA - - IN - - MO - - MD - - WI - - CO - - MN - - SC - - AL - - LA - - KY - - OR - - OK - - CT - - UT - - IA - - NV - - AR - - MS - - KS - - NM - - NE - - ID - - WV - - HI - - NH - - ME - - MT - - RI - - DE - - SD - - ND - - AK - - VT - - WY - - DC - weights: - - 0.1174 - - 0.0906 - - 0.0651 - - 0.0581 - - 0.0378 - - 0.0371 - - 0.0351 - - 0.032 - - 0.0316 - - 0.0295 - - 0.0274 - - 0.026 - - 0.0236 - - 0.0222 - - 0.0213 - - 0.0208 - - 0.0199 - - 0.0184 - - 0.0182 - - 0.0176 - - 0.0176 - - 0.0166 - - 0.0163 - - 0.0147 - - 0.0139 - - 0.0133 - - 0.0131 - - 0.012 - - 0.0107 - - 0.0103 - - 0.0094 - - 0.0093 - - 0.0091 - - 0.0088 - - 0.0086 - - 0.0063 - - 0.0058 - - 0.0056 - - 0.0052 - - 0.0042 - - 0.0042 - - 0.004 - - 0.0032 - - 0.0031 - - 0.003 - - 0.0027 - - 0.0023 - - 0.0022 - - 0.0019 - - 0.0017 - - 0.0021 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html - note: 'Weights derived from US Census Bureau Vintage 2023 state population estimates - (July 1, 2023), normalized to sum to 1. California (~11.7%) and Texas (~9.1%) - are the largest. Wyoming (~0.17%) and Vermont (~0.19%) are smallest. DC included - at ~0.21%. Note: weights include all ages; adult-only proportions would differ - slightly but state rank-order is essentially identical.' - constraints: - - type: spec_expression - value: null - expression: abs(sum(weights) - 1.0) < 0.005 - reason: Categorical weights must sum to approximately 1.0 (small rounding tolerance - for 51 categories) - - type: spec_expression - value: null - expression: len(options) == 51 - reason: Must include all 50 states plus DC -- name: race_ethnicity - type: categorical - category: universal - description: Racial/ethnic identity (White non-Hispanic, Black, Hispanic, Asian, - Other), representative of US census distributions. - scope: partner_correlated - correlation_rate: null - semantic_type: null - identity_type: race_ethnicity - display_format: null - sampling: - strategy: independent - distribution: - type: categorical - options: - - White non-Hispanic - - Hispanic - - Black non-Hispanic - - Asian non-Hispanic - - Other/Multiracial - weights: - - 0.578 - - 0.191 - - 0.121 - - 0.059 - - 0.051 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/ - note: '2020 Census (Pew Research): White non-Hispanic 57.8%, Hispanic 18.7%, Black - non-Hispanic 12.1%, Asian non-Hispanic 5.9%, Two or more races/other 4.1% (rounded - to 5.1% to absorb AIAN, NHPI, and other small groups). These are overall population - figures; adult-only figures differ marginally (Hispanic share is slightly lower - among adults due to younger age structure). Weights adjusted to sum to 1.' - constraints: - - type: spec_expression - value: null - expression: abs(sum(weights) - 1.0) < 0.001 - reason: Categorical weights must sum to 1.0 -- name: openness - type: float - category: personality - description: 'Big Five openness to experience: curiosity, creativity, and willingness - to consider new ideas (0–1 scale).' - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: independent - distribution: - type: beta - alpha: 7.0 - beta: 4.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John - (2017) normative BFI-2 data; Terracciano et al. (2005) cross-cultural norms - note: 'Big Five Openness is typically measured on a 1-5 Likert scale. US normative - data (Soto & John 2017, n>1,000) place Openness mean near 3.7/5 (~0.60 on 0-1 - scale) with SD ~0.7/5 (~0.14). A Beta(7.0, 4.5) distribution yields mean ~0.61 - and SD ~0.13, appropriately right-of-center with a slight positive skew. Openness - is generally the highest-scoring of the Big Five in Western/US samples. Note: - women score slightly higher on openness-to-feelings facets while men score higher - on openness-to-ideas facets; aggregate is similar.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Trait score is bounded at 0 (minimum possible) - - type: hard_max - value: 1.0 - expression: null - reason: Trait score is bounded at 1 (maximum possible) -- name: conscientiousness - type: float - category: personality - description: 'Big Five conscientiousness: organization, dependability, and self-discipline - (0–1 scale).' - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: independent - distribution: - type: beta - alpha: 8.5 - beta: 4.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John - (2017) normative BFI-2 US data; Costa & McCrae NEO norms - note: US normative data place Conscientiousness mean near 3.8/5 (~0.65 on 0-1 - scale) with SD ~0.65/5 (~0.13). A Beta(8.5, 4.5) yields mean ~0.654 and SD ~0.12. - Conscientiousness tends to increase with age (research confirms adults 30+ score - higher), and the US adult population skews older, slightly elevating the mean - vs. college-age norms. Women score marginally higher than men. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Trait score is bounded at 0 (minimum possible) - - type: hard_max - value: 1.0 - expression: null - reason: Trait score is bounded at 1 (maximum possible) -- name: extraversion - type: float - category: personality - description: 'Big Five extraversion: sociability, assertiveness, and positive emotionality - (0–1 scale).' - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: independent - distribution: - type: beta - alpha: 5.5 - beta: 4.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John - (2017) normative BFI-2 US data - note: US normative data place Extraversion mean near 3.2/5 (~0.55 on 0-1 scale) - with SD ~0.8/5 (~0.16). A Beta(5.5, 4.5) yields mean ~0.55 and SD ~0.15, producing - a roughly symmetric distribution centered slightly above midpoint. This reflects - that the US population is roughly split between introverted and extraverted - tendencies, with a slight lean toward extraversion. Extraversion declines somewhat - with age; the adult population (mean age ~47) pulls mean slightly below young-adult - norms. Women score slightly higher than men on warmth/sociability facets. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Trait score is bounded at 0 (minimum possible) - - type: hard_max - value: 1.0 - expression: null - reason: Trait score is bounded at 1 (maximum possible) -- name: agreeableness - type: float - category: personality - description: 'Big Five agreeableness: cooperation, empathy, and trust toward others - (0–1 scale).' - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: independent - distribution: - type: beta - alpha: 8.0 - beta: 4.0 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John - (2017) normative BFI-2 US data; Costa & McCrae (2001) 26-country norms - note: US normative data place Agreeableness mean near 3.75/5 (~0.64 on 0-1 scale) - with SD ~0.65/5 (~0.13). A Beta(8.0, 4.0) yields mean ~0.667 and SD ~0.12. Agreeableness - increases with age, which is relevant given the older adult mean age in this - sample. Women consistently score higher than men on agreeableness across all - cultures studied (Costa et al. 2001). The distribution is moderately right-skewed - toward higher agreeableness. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Trait score is bounded at 0 (minimum possible) - - type: hard_max - value: 1.0 - expression: null - reason: Trait score is bounded at 1 (maximum possible) -- name: neuroticism - type: float - category: personality - description: 'Big Five neuroticism: emotional instability, anxiety, and negative - affect (0–1 scale).' - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: independent - distribution: - type: beta - alpha: 4.5 - beta: 6.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://en.wikipedia.org/wiki/Big_Five_personality_traits; Soto & John - (2017) normative BFI-2 US data; Costa & McCrae (2001) 26-country norms - note: 'US normative data place Neuroticism mean near 2.9/5 (~0.45 on 0-1 scale) - with SD ~0.75/5 (~0.15). A Beta(4.5, 6.5) yields mean ~0.41 and SD ~0.14, slightly - below center reflecting that most US adults score in the moderate-to-low range. - Neuroticism decreases with age (adults 40+ tend to score lower). The most prominent - gender difference in Big Five: women score notably higher on neuroticism than - men across cultures (found in 49/55 nations studied). The adult US sample''s - slightly older mean age pulls the distribution modestly lower.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Trait score is bounded at 0 (minimum possible) - - type: hard_max - value: 1.0 - expression: null - reason: Trait score is bounded at 1 (maximum possible) -- name: urban_rural - type: categorical - category: universal - description: 'Urbanicity of residence: Urban, Suburban, or Rural, conditioned on - state population density.' - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Urban - - Suburban - - Rural - weights: - - 0.31 - - 0.55 - - 0.14 - formula: null - depends_on: - - state - modifiers: - - when: state in ['CA', 'NY', 'NJ', 'MA', 'IL', 'MD', 'CT', 'RI', 'DC', 'HI'] - multiply: null - add: null - weight_overrides: - Urban: 0.6 - Suburban: 0.32 - Rural: 0.08 - probability_override: null - - when: state in ['TX', 'FL', 'GA', 'WA', 'CO', 'AZ', 'NV', 'OR', 'VA', 'MN', - 'PA', 'MI', 'OH', 'NC', 'TN', 'MO', 'IN', 'WI', 'SC', 'KS', 'NM', 'UT', 'NE', - 'IA', 'OK', 'DE', 'NH'] - multiply: null - add: null - weight_overrides: - Urban: 0.35 - Suburban: 0.45 - Rural: 0.2 - probability_override: null - - when: state in ['WV', 'VT', 'ME', 'MT', 'SD', 'ND', 'AK', 'WY', 'MS', 'AR', - 'AL', 'LA', 'KY', 'ID'] - multiply: null - add: null - weight_overrides: - Urban: 0.2 - Suburban: 0.3 - Rural: 0.5 - probability_override: null - grounding: - level: medium - method: researched - source: Pew Research Center urban/suburban/rural county analysis; Census 2020 - urban/rural classification (80% urban, 20% rural at census level; Pew suburban - ~52% of population) - note: Census defines only urban/rural (80/20); the suburban split (~31% urban - core, 55% suburban, 14% rural) follows Pew's three-way classification. State - modifier will adjust heavily. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Categorical weights must sum to 1.0 -- name: education_level - type: categorical - category: universal - description: Highest educational attainment (Less than HS, HS Diploma, Some College, - Associate's, Bachelor's, Graduate Degree). - scope: partner_correlated - correlation_rate: null - semantic_type: education - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Less than HS - - HS Diploma - - Some College - - Associate's - - Bachelor's - - Graduate Degree - weights: - - 0.09 - - 0.27 - - 0.2 - - 0.1 - - 0.22 - - 0.12 - formula: null - depends_on: - - age - modifiers: - - when: age < 25 - multiply: null - add: null - weight_overrides: - Less than HS: 0.06 - HS Diploma: 0.28 - Some College: 0.38 - Associate's: 0.08 - Bachelor's: 0.16 - Graduate Degree: 0.04 - probability_override: null - - when: age >= 25 and age < 35 - multiply: null - add: null - weight_overrides: - Less than HS: 0.07 - HS Diploma: 0.22 - Some College: 0.2 - Associate's: 0.09 - Bachelor's: 0.28 - Graduate Degree: 0.14 - probability_override: null - - when: age >= 35 and age < 55 - multiply: null - add: null - weight_overrides: - Less than HS: 0.08 - HS Diploma: 0.25 - Some College: 0.2 - Associate's: 0.1 - Bachelor's: 0.24 - Graduate Degree: 0.13 - probability_override: null - - when: age >= 55 - multiply: null - add: null - weight_overrides: - Less than HS: 0.1 - HS Diploma: 0.32 - Some College: 0.19 - Associate's: 0.09 - Bachelor's: 0.18 - Graduate Degree: 0.12 - probability_override: null - grounding: - level: strong - method: researched - source: 'US Census Bureau CPS 2023: 9% less than HS, 28% HS diploma, ~20% some - college, ~10% associate''s, ~22% bachelor''s, ~12% graduate degree (adults 18+)' - note: Weights normalized to exactly 1.0 (0.09+0.27+0.20+0.10+0.22+0.12=1.00). - Age modifier will reduce bachelor's/graduate for younger and older cohorts. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: household_income - type: int - category: universal - description: Annual household income in USD, conditioned on education level and - state. - scope: household - correlation_rate: null - semantic_type: income - identity_type: null - display_format: currency - sampling: - strategy: conditional - distribution: - type: lognormal - mean: 80000.0 - std: 60000.0 - min: 0.0 - max: 1000000.0 - mean_formula: 35000 if education_level == 'Less than HS' else 47000 if education_level - == 'HS Diploma' else 55000 if education_level == 'Some College' else 62000 - if education_level == "Associate's" else 95000 if education_level == "Bachelor's" - else 130000 if education_level == 'Graduate Degree' else 80000 - std_formula: 18000 if education_level == 'Less than HS' else 28000 if education_level - == 'HS Diploma' else 32000 if education_level == 'Some College' else 35000 - if education_level == "Associate's" else 55000 if education_level == "Bachelor's" - else 75000 if education_level == 'Graduate Degree' else 45000 - min_formula: null - max_formula: null - formula: null - depends_on: - - education_level - - state - modifiers: - - when: education_level == 'Less than HS' and state in ['CA', 'NY', 'MA', 'WA', - 'CT', 'NJ', 'MD', 'CO', 'HI', 'DC'] - multiply: 1.25 - add: 0.0 - weight_overrides: null - probability_override: null - - when: education_level == 'Bachelor\'s' and state in ['CA', 'NY', 'MA', 'WA', - 'CT', 'NJ', 'MD', 'CO', 'HI', 'DC'] - multiply: 1.35 - add: 0.0 - weight_overrides: null - probability_override: null - - when: education_level == 'Graduate Degree' and state in ['CA', 'NY', 'MA', 'WA', - 'CT', 'NJ', 'MD', 'CO', 'HI', 'DC'] - multiply: 1.4 - add: 0.0 - weight_overrides: null - probability_override: null - - when: education_level == 'Bachelor\'s' and state in ['MS', 'WV', 'AR', 'AL', - 'NM', 'KY', 'LA', 'SD', 'MT', 'ID'] - multiply: 0.82 - add: 0.0 - weight_overrides: null - probability_override: null - - when: education_level == 'Graduate Degree' and state in ['MS', 'WV', 'AR', 'AL', - 'NM', 'KY', 'LA', 'SD', 'MT', 'ID'] - multiply: 0.82 - add: 0.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: 'US Census Bureau 2023: median household income $80,610 nationally; income - by education well-documented in CPS/ACS data' - note: mean_formula uses chained ternary if/else — no dict.get() calls. Lognormal - is appropriate given right-skewed income distribution. State modifier will adjust - for COL differences. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Income cannot be negative - - type: hard_max - value: 1000000.0 - expression: null - reason: Cap at $1M to avoid extreme outlier distortion -- name: marital_status - type: categorical - category: universal - description: Current marital status (Single, Married, Divorced, Widowed, Domestic - Partnership). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Single - - Married - - Divorced - - Widowed - - Domestic Partnership - weights: - - 0.32 - - 0.49 - - 0.11 - - 0.06 - - 0.02 - formula: null - depends_on: - - age - modifiers: - - when: age < 30 - multiply: null - add: null - weight_overrides: - Single: 0.65 - Married: 0.18 - Divorced: 0.04 - Widowed: 0.01 - Domestic Partnership: 0.12 - probability_override: null - - when: age >= 30 and age < 45 - multiply: null - add: null - weight_overrides: - Single: 0.25 - Married: 0.52 - Divorced: 0.12 - Widowed: 0.02 - Domestic Partnership: 0.09 - probability_override: null - - when: age >= 45 and age < 65 - multiply: null - add: null - weight_overrides: - Single: 0.14 - Married: 0.55 - Divorced: 0.2 - Widowed: 0.05 - Domestic Partnership: 0.06 - probability_override: null - - when: age >= 65 - multiply: null - add: null - weight_overrides: - Single: 0.09 - Married: 0.55 - Divorced: 0.14 - Widowed: 0.19 - Domestic Partnership: 0.03 - probability_override: null - grounding: - level: strong - method: researched - source: 'US Census Bureau 2023: ~49% married, ~32% never married (single), ~11% - divorced, ~6% widowed; domestic partnership ~2% estimated from cohabitation - data' - note: 'Age modifier critical: widowed rises sharply past 65, single peaks in 18-30s. - Domestic partnership is small but distinct from never-married.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: household_size - type: int - category: universal - description: Total number of people living in the household. - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: normal - mean: 2.51 - std: 1.4 - min: 1.0 - max: 12.0 - mean_formula: 1.0 if marital_status == 'Single' else 3.2 if marital_status == - 'Married' else 1.8 if marital_status == 'Divorced' else 1.3 if marital_status - == 'Widowed' else 2.5 if marital_status == 'Domestic Partnership' else 2.51 - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - marital_status - - age - modifiers: - - when: marital_status == 'Married' and age < 40 - multiply: 1.15 - add: 0.0 - weight_overrides: null - probability_override: null - - when: marital_status == 'Single' and age >= 65 - multiply: 0.95 - add: 0.0 - weight_overrides: null - probability_override: null - - when: marital_status == 'Widowed' and age >= 65 - multiply: 0.9 - add: 0.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: 'US Census Bureau 2023: average household size 2.51 persons; married households - average ~3.2, single-person households common' - note: Mean formula uses chained ternary. Integer rounding applied post-sample. - Std kept at 1.4 to reflect broad spread. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum household size is 1 (the person themselves) - - type: hard_max - value: 12.0 - expression: null - reason: Extremely large households are very rare; cap at 12 -- name: has_children - type: boolean - category: universal - description: Whether the person has any children (under 18) living in the household. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: parental_status - display_format: null - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.28 - formula: null - depends_on: - - age - - marital_status - modifiers: - - when: age < 25 and marital_status == 'Single' - multiply: null - add: null - weight_overrides: null - probability_override: 0.06 - - when: age >= 25 and age < 35 and marital_status == 'Married' - multiply: null - add: null - weight_overrides: null - probability_override: 0.48 - - when: age >= 35 and age < 45 and marital_status == 'Married' - multiply: null - add: null - weight_overrides: null - probability_override: 0.58 - - when: age >= 45 and age < 55 and marital_status == 'Married' - multiply: null - add: null - weight_overrides: null - probability_override: 0.3 - - when: age >= 55 - multiply: null - add: null - weight_overrides: null - probability_override: 0.06 - - when: age >= 25 and age < 40 and marital_status == 'Domestic Partnership' - multiply: null - add: null - weight_overrides: null - probability_override: 0.28 - grounding: - level: medium - method: researched - source: 'Census 2020: ~40% of family households had children under 18, but as - share of all adults ~28% have children under 18 at home. Age and marital status - modifiers will adjust substantially.' - note: Base rate is ~28% of adults having children under 18 in household. Peaks - strongly in ages 25-44, much lower for singles and elderly. - constraints: [] -- name: employment_status - type: categorical - category: universal - description: Current employment status (Full-time, Part-time, Self-employed, Unemployed, - Retired, Student). - scope: individual - correlation_rate: null - semantic_type: employment - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Full-time - - Part-time - - Self-employed - - Unemployed - - Retired - - Student - weights: - - 0.47 - - 0.12 - - 0.09 - - 0.04 - - 0.22 - - 0.06 - formula: null - depends_on: - - age - - education_level - modifiers: - - when: age < 25 and education_level in ['Less than HS', 'HS Diploma', 'Some College'] - multiply: null - add: null - weight_overrides: - Full-time: 0.28 - Part-time: 0.22 - Self-employed: 0.03 - Unemployed: 0.08 - Retired: 0.0 - Student: 0.39 - probability_override: null - - when: age >= 25 and age < 55 and education_level in ['Bachelor\'s', 'Graduate - Degree'] - multiply: null - add: null - weight_overrides: - Full-time: 0.72 - Part-time: 0.08 - Self-employed: 0.12 - Unemployed: 0.03 - Retired: 0.02 - Student: 0.03 - probability_override: null - - when: age >= 25 and age < 55 and education_level in ['Less than HS', 'HS Diploma', - 'Some College', 'Associate\'s'] - multiply: null - add: null - weight_overrides: - Full-time: 0.57 - Part-time: 0.14 - Self-employed: 0.08 - Unemployed: 0.08 - Retired: 0.02 - Student: 0.11 - probability_override: null - - when: age >= 55 and age < 65 - multiply: null - add: null - weight_overrides: - Full-time: 0.5 - Part-time: 0.12 - Self-employed: 0.1 - Unemployed: 0.05 - Retired: 0.2 - Student: 0.03 - probability_override: null - - when: age >= 65 - multiply: null - add: null - weight_overrides: - Full-time: 0.12 - Part-time: 0.09 - Self-employed: 0.07 - Unemployed: 0.02 - Retired: 0.69 - Student: 0.01 - probability_override: null - grounding: - level: strong - method: extrapolated - source: 'BLS 2023: ~62% employment-population ratio adults 16+; ~22% retired estimated - from age distribution; student ~6%; unemployed ~4% (unemployment rate ~3.7% - in 2023)' - note: 'Age is the dominant modifier: retirement rises sharply after 62, student - peaks 18-24. Education modifies full-time vs part-time propensity.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: occupation - type: categorical - category: universal - description: Broad occupational category (Management, Professional, Service, Sales, - Construction, Production, Other) per BLS classification. - scope: individual - correlation_rate: null - semantic_type: occupation - identity_type: professional_identity - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Management/Professional - - Service - - Sales/Office - - Construction/Extraction - - Production/Transport - - Other - weights: - - 0.38 - - 0.17 - - 0.2 - - 0.09 - - 0.11 - - 0.05 - formula: null - depends_on: - - education_level - - employment_status - modifiers: - - when: education_level == 'Graduate Degree' and employment_status == 'Full-time' - multiply: null - add: null - weight_overrides: - Management/Professional: 0.72 - Service: 0.08 - Sales/Office: 0.1 - Construction/Extraction: 0.02 - Production/Transport: 0.02 - Other: 0.06 - probability_override: null - - when: education_level == 'Bachelor\'s' and employment_status == 'Full-time' - multiply: null - add: null - weight_overrides: - Management/Professional: 0.55 - Service: 0.1 - Sales/Office: 0.22 - Construction/Extraction: 0.04 - Production/Transport: 0.04 - Other: 0.05 - probability_override: null - - when: education_level in ['Some College', 'Associate\'s'] and employment_status - == 'Full-time' - multiply: null - add: null - weight_overrides: - Management/Professional: 0.25 - Service: 0.22 - Sales/Office: 0.3 - Construction/Extraction: 0.09 - Production/Transport: 0.1 - Other: 0.04 - probability_override: null - - when: education_level in ['Less than HS', 'HS Diploma'] and employment_status - == 'Full-time' - multiply: null - add: null - weight_overrides: - Management/Professional: 0.1 - Service: 0.28 - Sales/Office: 0.22 - Construction/Extraction: 0.18 - Production/Transport: 0.18 - Other: 0.04 - probability_override: null - - when: education_level == 'Graduate Degree' and employment_status == 'Self-employed' - multiply: null - add: null - weight_overrides: - Management/Professional: 0.68 - Service: 0.1 - Sales/Office: 0.1 - Construction/Extraction: 0.02 - Production/Transport: 0.02 - Other: 0.08 - probability_override: null - grounding: - level: strong - method: researched - source: 'BLS Occupational Employment Statistics 2023: management/professional - ~38% of employed workers; service ~17%; sales/office ~20%; construction ~9%; - production/transport ~11%' - note: 'Only applies to employed persons. Education modifier critical: bachelor''s/graduate - degree strongly predicts management/professional category.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: political_affiliation - type: categorical - category: population_specific - description: Political party identification (Strong Democrat, Lean Democrat, Independent, - Lean Republican, Strong Republican). - scope: partner_correlated - correlation_rate: null - semantic_type: null - identity_type: political_orientation - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Strong Democrat - - Lean Democrat - - Independent - - Lean Republican - - Strong Republican - weights: - - 0.18 - - 0.17 - - 0.38 - - 0.13 - - 0.14 - formula: null - depends_on: - - state - - education_level - modifiers: - - when: state in ['CA', 'NY', 'MA', 'IL', 'MD', 'CT', 'RI', 'VT', 'HI', 'DC', - 'WA', 'OR', 'NJ', 'CO', 'NM', 'DE', 'ME'] - multiply: null - add: null - weight_overrides: - Strong Democrat: 0.28 - Lean Democrat: 0.22 - Independent: 0.22 - Lean Republican: 0.14 - Strong Republican: 0.14 - probability_override: null - - when: state in ['TX', 'FL', 'GA', 'NC', 'AZ', 'NV', 'VA', 'PA', 'MI', 'WI', - 'MN', 'NH'] - multiply: null - add: null - weight_overrides: - Strong Democrat: 0.18 - Lean Democrat: 0.18 - Independent: 0.25 - Lean Republican: 0.2 - Strong Republican: 0.19 - probability_override: null - - when: state in ['WY', 'ID', 'ND', 'SD', 'NE', 'UT', 'KS', 'OK', 'AL', 'AR', - 'WV', 'MS', 'TN', 'KY', 'SC', 'IN', 'MT', 'MO', 'LA', 'AK'] - multiply: null - add: null - weight_overrides: - Strong Democrat: 0.12 - Lean Democrat: 0.13 - Independent: 0.2 - Lean Republican: 0.22 - Strong Republican: 0.33 - probability_override: null - - when: education_level in ['Bachelor\'s', 'Graduate Degree'] - multiply: null - add: null - weight_overrides: - Strong Democrat: 0.24 - Lean Democrat: 0.21 - Independent: 0.22 - Lean Republican: 0.18 - Strong Republican: 0.15 - probability_override: null - - when: education_level in ['Less than HS', 'HS Diploma'] - multiply: null - add: null - weight_overrides: - Strong Democrat: 0.16 - Lean Democrat: 0.16 - Independent: 0.23 - Lean Republican: 0.2 - Strong Republican: 0.25 - probability_override: null - grounding: - level: strong - method: researched - source: 'Gallup/Pew 2023: ~31% Democrat-leaning, ~27% Republican-leaning, ~38% - Independent; strong partisan splits roughly 18/14 based on ANES data' - note: Weights sum to exactly 1.0 (0.18+0.17+0.38+0.13+0.14=1.00). State and education - modifiers will shift substantially (e.g., CA toward Democrat, WY toward Republican). - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: political_ideology - type: categorical - category: population_specific - description: Self-described ideological placement on a scale (Very Liberal, Liberal, - Moderate, Conservative, Very Conservative). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: political_orientation - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Very Liberal - - Liberal - - Moderate - - Conservative - - Very Conservative - weights: - - 0.09 - - 0.2 - - 0.38 - - 0.24 - - 0.09 - formula: null - depends_on: - - political_affiliation - modifiers: - - when: political_affiliation == 'Strong Democrat' - multiply: null - add: null - weight_overrides: - Very Liberal: 0.38 - Liberal: 0.42 - Moderate: 0.15 - Conservative: 0.04 - Very Conservative: 0.01 - probability_override: null - - when: political_affiliation == 'Lean Democrat' - multiply: null - add: null - weight_overrides: - Very Liberal: 0.12 - Liberal: 0.4 - Moderate: 0.38 - Conservative: 0.08 - Very Conservative: 0.02 - probability_override: null - - when: political_affiliation == 'Independent' - multiply: null - add: null - weight_overrides: - Very Liberal: 0.06 - Liberal: 0.16 - Moderate: 0.5 - Conservative: 0.2 - Very Conservative: 0.08 - probability_override: null - - when: political_affiliation == 'Lean Republican' - multiply: null - add: null - weight_overrides: - Very Liberal: 0.02 - Liberal: 0.07 - Moderate: 0.35 - Conservative: 0.42 - Very Conservative: 0.14 - probability_override: null - - when: political_affiliation == 'Strong Republican' - multiply: null - add: null - weight_overrides: - Very Liberal: 0.01 - Liberal: 0.03 - Moderate: 0.13 - Conservative: 0.41 - Very Conservative: 0.42 - probability_override: null - grounding: - level: strong - method: researched - source: 'Gallup 2023 ideology: ~25% liberal, ~37% moderate, ~36% conservative; - very liberal/very conservative tails ~9% each from ANES data' - note: Political affiliation modifier will strongly shift these weights — Strong - Democrats shift toward Very Liberal, Strong Republicans toward Very Conservative. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: religious_affiliation - type: categorical - category: population_specific - description: Religious identity (Evangelical Protestant, Mainline Protestant, Catholic, - Other Christian, Jewish, Muslim, Other Non-Christian, None/Unaffiliated). - scope: partner_correlated - correlation_rate: null - semantic_type: null - identity_type: religious_affiliation - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Evangelical Protestant - - Mainline Protestant - - Catholic - - Other Christian - - Jewish - - Muslim - - Other Non-Christian - - None/Unaffiliated - weights: - - 0.24 - - 0.14 - - 0.21 - - 0.06 - - 0.02 - - 0.01 - - 0.04 - - 0.28 - formula: null - depends_on: - - race_ethnicity - modifiers: - - when: race_ethnicity == 'White non-Hispanic' - multiply: null - add: null - weight_overrides: - Evangelical Protestant: 0.26 - Mainline Protestant: 0.18 - Catholic: 0.2 - Other Christian: 0.06 - Jewish: 0.03 - Muslim: 0.01 - Other Non-Christian: 0.03 - None/Unaffiliated: 0.23 - probability_override: null - - when: race_ethnicity == 'Black non-Hispanic' - multiply: null - add: null - weight_overrides: - Evangelical Protestant: 0.45 - Mainline Protestant: 0.14 - Catholic: 0.06 - Other Christian: 0.12 - Jewish: 0.01 - Muslim: 0.04 - Other Non-Christian: 0.02 - None/Unaffiliated: 0.16 - probability_override: null - - when: race_ethnicity == 'Hispanic' - multiply: null - add: null - weight_overrides: - Evangelical Protestant: 0.16 - Mainline Protestant: 0.05 - Catholic: 0.48 - Other Christian: 0.08 - Jewish: 0.01 - Muslim: 0.01 - Other Non-Christian: 0.03 - None/Unaffiliated: 0.18 - probability_override: null - - when: race_ethnicity == 'Asian non-Hispanic' - multiply: null - add: null - weight_overrides: - Evangelical Protestant: 0.08 - Mainline Protestant: 0.06 - Catholic: 0.08 - Other Christian: 0.06 - Jewish: 0.01 - Muslim: 0.04 - Other Non-Christian: 0.26 - None/Unaffiliated: 0.41 - probability_override: null - - when: race_ethnicity == 'Other/Multiracial' - multiply: null - add: null - weight_overrides: - Evangelical Protestant: 0.18 - Mainline Protestant: 0.09 - Catholic: 0.14 - Other Christian: 0.09 - Jewish: 0.02 - Muslim: 0.03 - Other Non-Christian: 0.09 - None/Unaffiliated: 0.36 - probability_override: null - grounding: - level: strong - method: researched - source: 'Pew Research Center 2023 Religious Landscape Study: 24% evangelical, - 14% mainline Protestant, 21% Catholic, 28% unaffiliated; smaller shares for - Jewish, Muslim, other' - note: 'Race/ethnicity modifier important: Black non-Hispanic skews strongly toward - Protestant; Hispanic toward Catholic; Asian toward Other Non-Christian or None.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: religious_attendance - type: categorical - category: population_specific - description: Frequency of attendance at religious services (Never, Seldom, A few - times/year, Monthly, Weekly, More than weekly). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Never - - Seldom - - A few times/year - - Monthly - - Weekly - - More than weekly - weights: - - 0.29 - - 0.17 - - 0.16 - - 0.1 - - 0.22 - - 0.06 - formula: null - depends_on: - - religious_affiliation - modifiers: - - when: religious_affiliation == 'None/Unaffiliated' - multiply: null - add: null - weight_overrides: - Never: 0.6 - Seldom: 0.22 - A few times/year: 0.1 - Monthly: 0.04 - Weekly: 0.03 - More than weekly: 0.01 - probability_override: null - - when: religious_affiliation == 'Evangelical Protestant' - multiply: null - add: null - weight_overrides: - Never: 0.06 - Seldom: 0.1 - A few times/year: 0.14 - Monthly: 0.14 - Weekly: 0.38 - More than weekly: 0.18 - probability_override: null - - when: religious_affiliation == 'Mainline Protestant' - multiply: null - add: null - weight_overrides: - Never: 0.1 - Seldom: 0.18 - A few times/year: 0.22 - Monthly: 0.18 - Weekly: 0.26 - More than weekly: 0.06 - probability_override: null - - when: religious_affiliation == 'Catholic' - multiply: null - add: null - weight_overrides: - Never: 0.12 - Seldom: 0.2 - A few times/year: 0.22 - Monthly: 0.16 - Weekly: 0.24 - More than weekly: 0.06 - probability_override: null - - when: religious_affiliation == 'Muslim' - multiply: null - add: null - weight_overrides: - Never: 0.06 - Seldom: 0.12 - A few times/year: 0.14 - Monthly: 0.16 - Weekly: 0.38 - More than weekly: 0.14 - probability_override: null - - when: religious_affiliation in ['Other Christian', 'Other Non-Christian', 'Jewish'] - multiply: null - add: null - weight_overrides: - Never: 0.14 - Seldom: 0.18 - A few times/year: 0.2 - Monthly: 0.18 - Weekly: 0.22 - More than weekly: 0.08 - probability_override: null - grounding: - level: strong - method: researched - source: 'Pew Research 2023/Gallup: ~29% never attend, ~17% seldom, ~16% a few - times/year, ~10% monthly, ~22% weekly, ~6% more than weekly' - note: 'Religious affiliation modifier is dominant: None/Unaffiliated will shift - almost entirely to Never/Seldom; Evangelical Protestant shifts toward Weekly/More - than weekly.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: primary_news_source - type: categorical - category: population_specific - description: Primary source for national news (TV, Online/Digital, Social Media, - Radio, Print Newspaper, None). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - TV - - Online/Digital - - Social Media - - Radio - - Print Newspaper - - None - weights: - - 0.3 - - 0.28 - - 0.18 - - 0.08 - - 0.06 - - 0.1 - formula: null - depends_on: - - age - - education_level - modifiers: - - when: age < 30 and education_level in ['Less than HS', 'HS Diploma', 'Some College'] - multiply: null - add: null - weight_overrides: - TV: 0.08 - Online/Digital: 0.28 - Social Media: 0.48 - Radio: 0.04 - Print Newspaper: 0.02 - None: 0.1 - probability_override: null - - when: age < 30 and education_level in ['Bachelor\'s', 'Graduate Degree'] - multiply: null - add: null - weight_overrides: - TV: 0.06 - Online/Digital: 0.5 - Social Media: 0.3 - Radio: 0.04 - Print Newspaper: 0.04 - None: 0.06 - probability_override: null - - when: age >= 30 and age < 50 and education_level in ['Bachelor\'s', 'Graduate - Degree'] - multiply: null - add: null - weight_overrides: - TV: 0.16 - Online/Digital: 0.5 - Social Media: 0.18 - Radio: 0.08 - Print Newspaper: 0.06 - None: 0.02 - probability_override: null - - when: age >= 30 and age < 50 and education_level in ['Less than HS', 'HS Diploma', - 'Some College', 'Associate\'s'] - multiply: null - add: null - weight_overrides: - TV: 0.28 - Online/Digital: 0.28 - Social Media: 0.3 - Radio: 0.08 - Print Newspaper: 0.03 - None: 0.03 - probability_override: null - - when: age >= 50 and age < 65 - multiply: null - add: null - weight_overrides: - TV: 0.42 - Online/Digital: 0.28 - Social Media: 0.16 - Radio: 0.09 - Print Newspaper: 0.04 - None: 0.01 - probability_override: null - - when: age >= 65 - multiply: null - add: null - weight_overrides: - TV: 0.56 - Online/Digital: 0.18 - Social Media: 0.1 - Radio: 0.1 - Print Newspaper: 0.05 - None: 0.01 - probability_override: null - grounding: - level: strong - method: researched - source: 'Pew Research 2023 News Consumption Survey: TV remains top source (~30%), - online/digital growing (~28%), social media ~18%, radio ~8%, print ~6%, none - ~10%' - note: 'Age is the primary modifier: TV dominates for 65+, social media dominates - for 18-29. Education raises online/digital and print use.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: news_outlet_lean - type: categorical - category: population_specific - description: Political lean of preferred news outlets (Left-leaning, Center, Right-leaning, - Mixed/No Preference). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Left-leaning - - Center - - Right-leaning - - Mixed/No Preference - weights: - - 0.27 - - 0.22 - - 0.23 - - 0.28 - formula: null - depends_on: - - political_affiliation - - primary_news_source - modifiers: - - when: political_affiliation in ['Strong Democrat', 'Lean Democrat'] and primary_news_source - in ['TV', 'Online/Digital'] - multiply: null - add: null - weight_overrides: - Left-leaning: 0.52 - Center: 0.28 - Right-leaning: 0.08 - Mixed/No Preference: 0.12 - probability_override: null - - when: political_affiliation in ['Strong Republican', 'Lean Republican'] and - primary_news_source in ['TV', 'Online/Digital'] - multiply: null - add: null - weight_overrides: - Left-leaning: 0.06 - Center: 0.16 - Right-leaning: 0.62 - Mixed/No Preference: 0.16 - probability_override: null - - when: political_affiliation == 'Independent' and primary_news_source in ['TV', - 'Online/Digital'] - multiply: null - add: null - weight_overrides: - Left-leaning: 0.2 - Center: 0.32 - Right-leaning: 0.22 - Mixed/No Preference: 0.26 - probability_override: null - - when: primary_news_source == 'Social Media' - multiply: null - add: null - weight_overrides: - Left-leaning: 0.22 - Center: 0.14 - Right-leaning: 0.22 - Mixed/No Preference: 0.42 - probability_override: null - - when: primary_news_source == 'Print Newspaper' - multiply: null - add: null - weight_overrides: - Left-leaning: 0.28 - Center: 0.38 - Right-leaning: 0.18 - Mixed/No Preference: 0.16 - probability_override: null - grounding: - level: medium - method: extrapolated - source: 'Pew Media Bias research and AllSides ratings: roughly balanced left/right - at national level; strong partisans strongly prefer aligned outlets' - note: Political affiliation is the dominant modifier. Strong Democrats overwhelmingly - select left-leaning; Strong Republicans select right-leaning. Independents cluster - in Center/Mixed. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: social_media_platforms - type: categorical - category: population_specific - description: Primary social media platform used (Facebook, Twitter/X, Instagram, - TikTok, YouTube, None/Minimal). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Facebook - - YouTube - - Instagram - - TikTok - - Twitter/X - - None/Minimal - weights: - - 0.26 - - 0.23 - - 0.18 - - 0.1 - - 0.08 - - 0.15 - formula: null - depends_on: - - age - modifiers: - - when: age < 25 - multiply: null - add: null - weight_overrides: - Facebook: 0.06 - YouTube: 0.22 - Instagram: 0.28 - TikTok: 0.3 - Twitter/X: 0.08 - None/Minimal: 0.06 - probability_override: null - - when: age >= 25 and age < 35 - multiply: null - add: null - weight_overrides: - Facebook: 0.12 - YouTube: 0.22 - Instagram: 0.28 - TikTok: 0.18 - Twitter/X: 0.12 - None/Minimal: 0.08 - probability_override: null - - when: age >= 35 and age < 50 - multiply: null - add: null - weight_overrides: - Facebook: 0.28 - YouTube: 0.22 - Instagram: 0.18 - TikTok: 0.08 - Twitter/X: 0.1 - None/Minimal: 0.14 - probability_override: null - - when: age >= 50 and age < 65 - multiply: null - add: null - weight_overrides: - Facebook: 0.4 - YouTube: 0.2 - Instagram: 0.1 - TikTok: 0.04 - Twitter/X: 0.08 - None/Minimal: 0.18 - probability_override: null - - when: age >= 65 - multiply: null - add: null - weight_overrides: - Facebook: 0.44 - YouTube: 0.18 - Instagram: 0.06 - TikTok: 0.02 - Twitter/X: 0.04 - None/Minimal: 0.26 - probability_override: null - grounding: - level: strong - method: researched - source: 'Pew Research 2023 Social Media Use Survey: Facebook 68% users, YouTube - 83%, Instagram 47%, TikTok 33%, Twitter/X 22% of US adults; primary platform - weights estimated' - note: 'Age is the dominant modifier: Facebook primary for 50+, TikTok primary - for 18-24, Instagram primary for 25-34. None/Minimal higher for 65+.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: social_media_hours_per_day - type: float - category: population_specific - description: Average daily hours spent consuming social media content. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: lognormal - mean: 2.3 - std: 2.1 - min: 0.0 - max: 16.0 - mean_formula: 0.5 if social_media_platforms == 'None/Minimal' else 3.5 if social_media_platforms - == 'TikTok' else 2.8 if social_media_platforms == 'Instagram' else 2.3 if - social_media_platforms == 'YouTube' else 1.8 if social_media_platforms == - 'Facebook' else 2.0 if social_media_platforms == 'Twitter/X' else 2.3 - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - age - - social_media_platforms - modifiers: - - when: age < 25 and social_media_platforms == 'TikTok' - multiply: 1.2 - add: 0.0 - weight_overrides: null - probability_override: null - - when: age >= 65 and social_media_platforms == 'Facebook' - multiply: 0.75 - add: 0.0 - weight_overrides: null - probability_override: null - - when: age >= 65 and social_media_platforms == 'None/Minimal' - multiply: 0.8 - add: 0.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: researched - source: 'Datareportal / Pew 2023: average US adult social media time ~2.3 hrs/day; - TikTok users average higher (~3+ hrs); lognormal reflects right skew' - note: Age modifier will reduce usage for 65+ and increase for 18-24. Lognormal - appropriate for this right-skewed distribution. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Cannot spend negative hours on social media - - type: hard_max - value: 16.0 - expression: null - reason: Upper bound limited by waking hours -- name: internet_access - type: categorical - category: population_specific - description: Quality of home internet access (Broadband, Mobile Only, Dial-up/Satellite, - None). - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Broadband - - Mobile Only - - Dial-up/Satellite - - None - weights: - - 0.77 - - 0.15 - - 0.04 - - 0.04 - formula: null - depends_on: - - urban_rural - - household_income - modifiers: - - when: urban_rural == 'Urban' and household_income > 60000 - multiply: null - add: null - weight_overrides: - Broadband: 0.88 - Mobile Only: 0.09 - Dial-up/Satellite: 0.01 - None: 0.02 - probability_override: null - - when: urban_rural == 'Suburban' and household_income > 60000 - multiply: null - add: null - weight_overrides: - Broadband: 0.85 - Mobile Only: 0.1 - Dial-up/Satellite: 0.03 - None: 0.02 - probability_override: null - - when: urban_rural == 'Urban' and household_income <= 60000 - multiply: null - add: null - weight_overrides: - Broadband: 0.65 - Mobile Only: 0.26 - Dial-up/Satellite: 0.02 - None: 0.07 - probability_override: null - - when: urban_rural == 'Suburban' and household_income <= 60000 - multiply: null - add: null - weight_overrides: - Broadband: 0.68 - Mobile Only: 0.22 - Dial-up/Satellite: 0.06 - None: 0.04 - probability_override: null - - when: urban_rural == 'Rural' and household_income > 60000 - multiply: null - add: null - weight_overrides: - Broadband: 0.58 - Mobile Only: 0.18 - Dial-up/Satellite: 0.2 - None: 0.04 - probability_override: null - - when: urban_rural == 'Rural' and household_income <= 60000 - multiply: null - add: null - weight_overrides: - Broadband: 0.38 - Mobile Only: 0.24 - Dial-up/Satellite: 0.28 - None: 0.1 - probability_override: null - grounding: - level: strong - method: researched - source: 'FCC/Pew 2023: ~77% broadband at home, ~15% mobile only, ~4% satellite/dial-up, - ~4% no internet; rural and low-income households shift toward mobile-only or - none' - note: 'Urban/rural and income are key modifiers: rural areas have much higher - satellite/none; low-income have more mobile-only.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: civic_engagement - type: categorical - category: population_specific - description: Level of civic participation (Votes regularly, Votes sometimes, Rarely - votes/Never votes, Also actively volunteers or campaigns). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Votes regularly - - Votes sometimes - - Rarely/Never votes - - Actively volunteers or campaigns - weights: - - 0.46 - - 0.24 - - 0.22 - - 0.08 - formula: null - depends_on: - - age - - education_level - modifiers: - - when: age < 30 and education_level in ['Less than HS', 'HS Diploma', 'Some College'] - multiply: null - add: null - weight_overrides: - Votes regularly: 0.2 - Votes sometimes: 0.28 - Rarely/Never votes: 0.46 - Actively volunteers or campaigns: 0.06 - probability_override: null - - when: age < 30 and education_level in ['Bachelor\'s', 'Graduate Degree'] - multiply: null - add: null - weight_overrides: - Votes regularly: 0.32 - Votes sometimes: 0.3 - Rarely/Never votes: 0.24 - Actively volunteers or campaigns: 0.14 - probability_override: null - - when: age >= 30 and age < 50 and education_level in ['Less than HS', 'HS Diploma'] - multiply: null - add: null - weight_overrides: - Votes regularly: 0.38 - Votes sometimes: 0.28 - Rarely/Never votes: 0.28 - Actively volunteers or campaigns: 0.06 - probability_override: null - - when: age >= 30 and age < 50 and education_level in ['Bachelor\'s', 'Graduate - Degree'] - multiply: null - add: null - weight_overrides: - Votes regularly: 0.56 - Votes sometimes: 0.22 - Rarely/Never votes: 0.1 - Actively volunteers or campaigns: 0.12 - probability_override: null - - when: age >= 50 and education_level in ['Bachelor\'s', 'Graduate Degree'] - multiply: null - add: null - weight_overrides: - Votes regularly: 0.68 - Votes sometimes: 0.16 - Rarely/Never votes: 0.06 - Actively volunteers or campaigns: 0.1 - probability_override: null - - when: age >= 50 and education_level in ['Less than HS', 'HS Diploma', 'Some - College', 'Associate\'s'] - multiply: null - add: null - weight_overrides: - Votes regularly: 0.52 - Votes sometimes: 0.26 - Rarely/Never votes: 0.16 - Actively volunteers or campaigns: 0.06 - probability_override: null - grounding: - level: strong - method: researched - source: 'US Census Voting/Registration 2022: ~46% of adults voted in 2022 midterms; - ~61% in 2020 presidential; base uses midterm rate; active volunteers ~8% per - Pew civic engagement data' - note: 'Age and education are strong modifiers: voting rises with age and education. - Younger adults have the lowest turnout historically.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: homeownership - type: boolean - category: population_specific - description: Whether the household owns (vs. rents) their primary residence. - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.66 - formula: null - depends_on: - - household_income - - age - modifiers: - - when: household_income > 100000 and age >= 35 - multiply: null - add: null - weight_overrides: null - probability_override: 0.82 - - when: household_income > 100000 and age < 35 - multiply: null - add: null - weight_overrides: null - probability_override: 0.52 - - when: household_income >= 50000 and household_income <= 100000 and age >= 40 - multiply: null - add: null - weight_overrides: null - probability_override: 0.68 - - when: household_income >= 50000 and household_income <= 100000 and age < 40 - multiply: null - add: null - weight_overrides: null - probability_override: 0.4 - - when: household_income < 50000 and age >= 55 - multiply: null - add: null - weight_overrides: null - probability_override: 0.5 - - when: household_income < 50000 and age < 55 - multiply: null - add: null - weight_overrides: null - probability_override: 0.26 - grounding: - level: strong - method: researched - source: 'US Census Bureau 2023 Housing Vacancy Survey: national homeownership - rate ~65.9%. Income and age are strong positive predictors.' - note: 'Income and age modifiers are critical: homeownership is ~38% for under-35 - adults but ~79% for 65+. Low income households rent at much higher rates.' - constraints: [] -- name: health_insurance_type - type: categorical - category: population_specific - description: Type of health insurance coverage (Employer-sponsored, Medicaid/CHIP, - Medicare, Individual Market/ACA, Military/VA, Uninsured). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - Employer-sponsored - - Medicaid/CHIP - - Medicare - - Individual Market/ACA - - Military/VA - - Uninsured - weights: - - 0.49 - - 0.18 - - 0.17 - - 0.06 - - 0.03 - - 0.07 - formula: null - depends_on: - - employment_status - - household_income - modifiers: - - when: employment_status == 'Full-time' and household_income > 50000 - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.72 - Medicaid/CHIP: 0.04 - Medicare: 0.04 - Individual Market/ACA: 0.1 - Military/VA: 0.04 - Uninsured: 0.06 - probability_override: null - - when: employment_status == 'Full-time' and household_income <= 50000 - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.46 - Medicaid/CHIP: 0.18 - Medicare: 0.02 - Individual Market/ACA: 0.14 - Military/VA: 0.04 - Uninsured: 0.16 - probability_override: null - - when: employment_status == 'Self-employed' - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.08 - Medicaid/CHIP: 0.1 - Medicare: 0.06 - Individual Market/ACA: 0.52 - Military/VA: 0.04 - Uninsured: 0.2 - probability_override: null - - when: employment_status == 'Retired' and household_income > 40000 - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.12 - Medicaid/CHIP: 0.04 - Medicare: 0.72 - Individual Market/ACA: 0.06 - Military/VA: 0.05 - Uninsured: 0.01 - probability_override: null - - when: employment_status == 'Retired' and household_income <= 40000 - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.04 - Medicaid/CHIP: 0.26 - Medicare: 0.58 - Individual Market/ACA: 0.06 - Military/VA: 0.04 - Uninsured: 0.02 - probability_override: null - - when: employment_status == 'Unemployed' and household_income <= 30000 - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.06 - Medicaid/CHIP: 0.46 - Medicare: 0.04 - Individual Market/ACA: 0.16 - Military/VA: 0.03 - Uninsured: 0.25 - probability_override: null - - when: employment_status == 'Part-time' and household_income <= 40000 - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.2 - Medicaid/CHIP: 0.28 - Medicare: 0.04 - Individual Market/ACA: 0.2 - Military/VA: 0.03 - Uninsured: 0.25 - probability_override: null - - when: employment_status == 'Student' - multiply: null - add: null - weight_overrides: - Employer-sponsored: 0.1 - Medicaid/CHIP: 0.28 - Medicare: 0.01 - Individual Market/ACA: 0.28 - Military/VA: 0.03 - Uninsured: 0.3 - probability_override: null - grounding: - level: strong - method: researched - source: 'Census Bureau Health Insurance Coverage 2023: ~49% employer, ~18% Medicaid/CHIP, - ~17% Medicare, ~6% individual market, ~3% military/VA, ~7-8% uninsured' - note: 'Employment status and income are key modifiers: retired shifts to Medicare, - unemployed low-income shifts to Medicaid/uninsured, full-time employed shifts - strongly to employer-sponsored.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: immigration_status - type: categorical - category: population_specific - description: Citizenship and immigration status (US-born citizen, Naturalized citizen, - Permanent resident, Other). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: citizenship - display_format: null - sampling: - strategy: conditional - distribution: - type: categorical - options: - - US-born citizen - - Naturalized citizen - - Permanent resident - - Other - weights: - - 0.86 - - 0.07 - - 0.04 - - 0.03 - formula: null - depends_on: - - race_ethnicity - modifiers: - - when: race_ethnicity == 'White non-Hispanic' - multiply: null - add: null - weight_overrides: - US-born citizen: 0.94 - Naturalized citizen: 0.04 - Permanent resident: 0.01 - Other: 0.01 - probability_override: null - - when: race_ethnicity == 'Black non-Hispanic' - multiply: null - add: null - weight_overrides: - US-born citizen: 0.88 - Naturalized citizen: 0.07 - Permanent resident: 0.03 - Other: 0.02 - probability_override: null - - when: race_ethnicity == 'Hispanic' - multiply: null - add: null - weight_overrides: - US-born citizen: 0.62 - Naturalized citizen: 0.2 - Permanent resident: 0.1 - Other: 0.08 - probability_override: null - - when: race_ethnicity == 'Asian non-Hispanic' - multiply: null - add: null - weight_overrides: - US-born citizen: 0.44 - Naturalized citizen: 0.34 - Permanent resident: 0.14 - Other: 0.08 - probability_override: null - - when: race_ethnicity == 'Other/Multiracial' - multiply: null - add: null - weight_overrides: - US-born citizen: 0.82 - Naturalized citizen: 0.1 - Permanent resident: 0.05 - Other: 0.03 - probability_override: null - grounding: - level: strong - method: researched - source: 'Census Bureau 2023: ~86% US-born citizens, ~7% naturalized, ~4% permanent - residents, ~3% other non-citizens among adult population' - note: 'Race/ethnicity modifier is critical: Hispanic adults have much higher foreign-born - share (~36%); Asian adults also higher (~55% foreign-born).' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Weights must sum to 1.0 -- name: union_membership - type: boolean - category: population_specific - description: Whether the person is currently a member of a labor union. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.1 - formula: null - depends_on: - - occupation - - employment_status - modifiers: - - when: occupation == 'Production/Transport' and employment_status == 'Full-time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.18 - - when: occupation == 'Management/Professional' and employment_status == 'Full-time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.12 - - when: occupation == 'Service' and employment_status == 'Full-time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.1 - - when: occupation == 'Construction/Extraction' and employment_status == 'Full-time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.14 - - when: occupation == 'Sales/Office' and employment_status == 'Full-time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.07 - - when: employment_status == 'Self-employed' - multiply: null - add: null - weight_overrides: null - probability_override: 0.02 - - when: employment_status == 'Part-time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.06 - grounding: - level: strong - method: researched - source: 'BLS Union Membership 2023: 10.0% of wage and salary workers were union - members in 2023, down from 10.1% in 2022' - note: 'Occupation and employment status are key modifiers: self-employed and management - rarely unionized; production/transport and public sector workers much higher.' - constraints: [] -- name: gun_ownership - type: boolean - category: population_specific - description: Whether the household contains at least one firearm. - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.32 - formula: null - depends_on: - - urban_rural - - state - modifiers: - - when: urban_rural == 'Rural' and state in ['WY', 'MT', 'AK', 'ID', 'WV', 'AR', - 'ND', 'SD', 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.72 - - when: urban_rural == 'Rural' and state not in ['WY', 'MT', 'AK', 'ID', 'WV', - 'AR', 'ND', 'SD', 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO', 'CA', 'NY', - 'MA', 'CT', 'NJ', 'MD', 'DE', 'RI', 'HI', 'DC'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.56 - - when: urban_rural == 'Suburban' and state in ['WY', 'MT', 'AK', 'ID', 'WV', - 'AR', 'ND', 'SD', 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.52 - - when: urban_rural == 'Suburban' and state in ['CA', 'NY', 'MA', 'CT', 'NJ', - 'MD', 'DE', 'RI', 'HI', 'DC'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.18 - - when: urban_rural == 'Urban' and state in ['CA', 'NY', 'MA', 'CT', 'NJ', 'MD', - 'DE', 'RI', 'HI', 'DC'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.1 - - when: urban_rural == 'Urban' and state not in ['CA', 'NY', 'MA', 'CT', 'NJ', - 'MD', 'DE', 'RI', 'HI', 'DC', 'WY', 'MT', 'AK', 'ID', 'WV', 'AR', 'ND', 'SD', - 'AL', 'MS', 'KY', 'TN', 'OK', 'KS', 'NE', 'MO'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.28 - grounding: - level: strong - method: researched - source: 'Pew Research 2023: ~32% of US adults personally own a gun; rural (~46%) - vs urban (~19%) gap is substantial. State also matters (e.g., Wyoming ~66%, - HI ~9%)' - note: Urban/rural and state modifiers are dominant. Rural residents nearly 2.5x - more likely to own guns than urban residents. - constraints: [] -- name: trust_in_institutions - type: float - category: personality - description: Generalized trust in government, media, and public institutions (0–1 - scale, low = high distrust). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.5 - beta: 3.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - political_ideology - - education_level - modifiers: - - when: political_ideology == 'Very Liberal' and education_level in ['Bachelor\'s', - 'Graduate Degree'] - multiply: 1.0 - add: 0.1 - weight_overrides: null - probability_override: null - - when: political_ideology == 'Very Conservative' - multiply: 1.0 - add: -0.14 - weight_overrides: null - probability_override: null - - when: political_ideology == 'Conservative' - multiply: 1.0 - add: -0.08 - weight_overrides: null - probability_override: null - - when: political_ideology == 'Moderate' and education_level in ['Bachelor\'s', - 'Graduate Degree'] - multiply: 1.0 - add: 0.05 - weight_overrides: null - probability_override: null - - when: political_ideology == 'Liberal' - multiply: 1.0 - add: 0.06 - weight_overrides: null - probability_override: null - - when: education_level == 'Less than HS' - multiply: 1.0 - add: -0.07 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: 'Gallup/Pew 2023: institutional trust at historic lows — ~26% trust Congress, - ~38% trust presidency, ~36% trust media; Beta(2.5,3.5) gives mean ~0.42 reflecting - low-trust environment' - note: 'Political ideology is primary modifier: Very Conservative skews lower trust - in government/media; Very Liberal skews lower trust in courts/police. Education - weakly raises trust.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Trust bounded at 0 - - type: hard_max - value: 1.0 - expression: null - reason: Trust bounded at 1 -- name: need_for_cognition - type: float - category: personality - description: Tendency to engage in and enjoy effortful analytical thinking when - forming opinions (0–1 scale). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.5 - beta: 2.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - education_level - modifiers: - - when: education_level == 'Graduate Degree' - multiply: 1.0 - add: 0.15 - weight_overrides: null - probability_override: null - - when: education_level == 'Bachelor\'s' - multiply: 1.0 - add: 0.09 - weight_overrides: null - probability_override: null - - when: education_level == 'Associate\'s' - multiply: 1.0 - add: 0.03 - weight_overrides: null - probability_override: null - - when: education_level in ['Less than HS', 'HS Diploma'] - multiply: 1.0 - add: -0.08 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: extrapolated - source: 'Cacioppo & Petty NFC research: roughly normally distributed in general - population; Beta(2.5,2.5) gives symmetric distribution with mean 0.5. Education - is a positive predictor.' - note: Education modifier shifts mean upward (graduate degree ~0.65, less than - HS ~0.35). Correlates with openness personality trait. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale bounded at 0 - - type: hard_max - value: 1.0 - expression: null - reason: Scale bounded at 1 -- name: susceptibility_to_misinformation - type: float - category: personality - description: Propensity to accept and share unverified or false information, inversely - related to media literacy (0–1 scale). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.0 - beta: 3.0 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - need_for_cognition - - social_media_hours_per_day - modifiers: - - when: need_for_cognition > 0.7 and social_media_hours_per_day < 2.0 - multiply: 1.0 - add: -0.15 - weight_overrides: null - probability_override: null - - when: need_for_cognition < 0.35 and social_media_hours_per_day > 3.0 - multiply: 1.0 - add: 0.18 - weight_overrides: null - probability_override: null - - when: need_for_cognition < 0.35 and social_media_hours_per_day >= 2.0 and social_media_hours_per_day - <= 3.0 - multiply: 1.0 - add: 0.1 - weight_overrides: null - probability_override: null - - when: need_for_cognition > 0.7 and social_media_hours_per_day >= 2.0 and social_media_hours_per_day - <= 3.0 - multiply: 1.0 - add: -0.08 - weight_overrides: null - probability_override: null - - when: need_for_cognition >= 0.35 and need_for_cognition <= 0.7 and social_media_hours_per_day - > 3.0 - multiply: 1.0 - add: 0.08 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: extrapolated - source: 'Pennycook & Rand (2019), Roozenbeek et al. (2020): susceptibility to - misinformation inversely correlated with need_for_cognition and media literacy; - Beta(2,3) mean ~0.4 reflects that most adults have moderate-low susceptibility' - note: 'Need_for_cognition and social_media_hours_per_day are key modifiers: high - NFC reduces susceptibility; high social media hours increases it. Inverse relationship - with education.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale bounded at 0 - - type: hard_max - value: 1.0 - expression: null - reason: Scale bounded at 1 -sampling_order: -- age -- agreeableness -- conscientiousness -- education_level -- civic_engagement -- employment_status -- extraversion -- gender -- marital_status -- has_children -- household_size -- need_for_cognition -- neuroticism -- occupation -- openness -- primary_news_source -- race_ethnicity -- immigration_status -- religious_affiliation -- religious_attendance -- social_media_platforms -- social_media_hours_per_day -- state -- household_income -- health_insurance_type -- homeownership -- political_affiliation -- news_outlet_lean -- political_ideology -- susceptibility_to_misinformation -- trust_in_institutions -- union_membership -- urban_rural -- gun_ownership -- internet_access diff --git a/examples/scenario/asi-announcement/network-config.seed42.20260218-001921.yaml b/examples/scenario/asi-announcement/network-config.seed42.20260218-001921.yaml deleted file mode 100644 index 6e926f2..0000000 --- a/examples/scenario/asi-announcement/network-config.seed42.20260218-001921.yaml +++ /dev/null @@ -1,237 +0,0 @@ -avg_degree: 10.0 -rewire_prob: 0.05 -similarity_store_threshold: 0.05 -similarity_threshold: 0.3 -similarity_steepness: 10.0 -candidate_mode: blocked -candidate_pool_multiplier: 12.0 -min_candidate_pool: 80 -similarity_workers: 1 -similarity_chunk_size: 64 -checkpoint_every_rows: 250 -triadic_closure_prob: 0.6 -target_clustering: 0.35 -target_modularity: 0.55 -inter_community_scale: 0.3 -max_calibration_iterations: 12 -quality_profile: balanced -topology_gate: strict -max_calibration_minutes: 30 -calibration_restarts: 4 -target_largest_component_ratio: 0.95 -target_degree_tolerance_pct: 0.15 -target_modularity_tolerance: 0.1 -target_clustering_tolerance: 0.08 -bridge_budget_fraction: 0.08 -swap_passes: 3 -power_law_exponent: 2.5 -identity_clustering_boost: 1.5 -auto_save_generated_config: true -allow_quarantine: true -quarantine_suffix: rejected -attribute_weights: - state: - weight: 4.0 - match_type: exact - urban_rural: - weight: 3.0 - match_type: exact - political_affiliation: - weight: 3.5 - match_type: exact - race_ethnicity: - weight: 2.5 - match_type: exact - education_level: - weight: 2.5 - match_type: within_n - range_value: 1.0 - ordinal_levels: - Less than HS: 1 - HS Diploma: 2 - Some College: 3 - Associate's: 4 - Bachelor's: 5 - Graduate Degree: 6 - age: - weight: 2.0 - match_type: numeric_range - range_value: 15.0 - religious_affiliation: - weight: 2.0 - match_type: exact - household_income: - weight: 1.5 - match_type: numeric_range - range_value: 30000.0 - occupation: - weight: 1.5 - match_type: exact - social_media_platforms: - weight: 1.0 - match_type: exact - has_children: - weight: 1.0 - match_type: exact - news_outlet_lean: - weight: 1.5 - match_type: exact -degree_multipliers: -- attribute: civic_engagement - condition: Actively volunteers or campaigns - multiplier: 2.5 - rationale: Community organizers and campaign volunteers build very large social - networks through their activism and outreach activities. -- attribute: employment_status - condition: Full-time - multiplier: 1.4 - rationale: Full-time workers have regular workplace interactions that expand their - social networks significantly. -- attribute: extraversion - condition: 0.8 - multiplier: 1.5 - rationale: Highly extraverted individuals naturally accumulate more social connections - across all contexts. -- attribute: occupation - condition: Management/Professional - multiplier: 1.6 - rationale: Managers and professionals maintain broad networks for career advancement, - client relationships, and professional associations. -- attribute: religious_attendance - condition: More than weekly - multiplier: 1.8 - rationale: Very frequent churchgoers are deeply embedded in congregational social - networks and often take on leadership or volunteer roles. -- attribute: social_media_hours_per_day - condition: 5.0 - multiplier: 1.4 - rationale: Heavy social media users maintain more online connections and are exposed - to and engage with more people digitally. -- attribute: union_membership - condition: true - multiplier: 1.3 - rationale: Union members participate in organized labor networks, meetings, and - collective activities that expand social ties. -edge_type_rules: -- name: household_member - condition: a_household_income == b_household_income and a_state == b_state and a_urban_rural - == b_urban_rural and a_marital_status == b_marital_status - priority: 50 - description: "People sharing the same household income, state, residential setting,\ - \ and marital status are likely household members or domestic partners \u2014\ - \ a strong proxy for actual co-residence." -- name: religious_community - condition: a_religious_affiliation == b_religious_affiliation and a_state == b_state - and a_urban_rural == b_urban_rural - priority: 35 - description: Members of the same religious congregation within the same state and - community setting who attend services together. -- name: political_community - condition: a_political_affiliation == b_political_affiliation and a_state == b_state - priority: 25 - description: People who share political affiliation in the same state, connected - through local party activities, rallies, and civic engagement. -- name: neighbor - condition: a_state == b_state and a_urban_rural == b_urban_rural and a_race_ethnicity - == b_race_ethnicity - priority: 20 - description: People in the same state, residential setting, and racial/ethnic community - who are likely geographic neighbors or community members. -- name: coworker - condition: a_occupation == b_occupation and a_state == b_state and a_employment_status - == b_employment_status - priority: 15 - description: People in the same occupation and employment status within the same - state, likely sharing professional or workplace networks. -- name: acquaintance - condition: a_state == b_state - priority: 5 - description: General acquaintances who live in the same state with some loose social - connection. -influence_factors: -- attribute: education_level - type: ordinal - levels: - Less than HS: 1 - HS Diploma: 2 - Some College: 3 - Associate's: 4 - Bachelor's: 5 - Graduate Degree: 6 - weight: 0.35 - description: Higher education is associated with greater perceived credibility and - persuasiveness on policy issues; more educated people tend to shape opinions of - less educated peers. -- attribute: civic_engagement - type: ordinal - levels: - Rarely/Never votes: 1 - Votes sometimes: 2 - Votes regularly: 3 - Actively volunteers or campaigns: 4 - weight: 0.3 - description: "Civically active individuals \u2014 especially organizers and campaigners\ - \ \u2014 are opinion leaders who actively try to persuade others on political\ - \ and social issues." -- attribute: need_for_cognition - type: numeric - weight: 0.2 - description: People with higher need for cognition process information more deeply - and craft more coherent arguments, making them more persuasive in political discussions. -- attribute: trust_in_institutions - type: numeric - weight: 0.15 - description: Individuals with higher institutional trust are seen as more mainstream - and credible sources, giving them modest influence advantage in opinion dynamics. -default_edge_type: acquaintance -ordinal_levels: - education_level: - Less than HS: 1 - HS Diploma: 2 - Some College: 3 - Associate's: 4 - Bachelor's: 5 - Graduate Degree: 6 -generated_from: 10,000 US adults aged 18+ representative of the national population - by state, age, gender, race/ethnicity, education, and income. Include political - affiliation, media consumption habits, social media usage, religious affiliation, - and personality traits. Focus on attributes relevant to opinion formation on national - policy issues. -generation_rationale: "This is a US national adult population focused on opinion formation\ - \ on policy issues. Key social connection drivers:\n\n1. **State/geography**: People\ - \ in the same state are far more likely to know each other \u2014 local networks,\ - \ shared media markets, community events.\n2. **Urban/rural**: Strong residential\ - \ sorting \u2014 urban, suburban, and rural people tend to socialize within their\ - \ own setting.\n3. **Age**: People form friendships with similarly-aged peers (school\ - \ cohorts, life stage).\n4. **Education level**: Strong homophily driver \u2014\ - \ education shapes social circles, workplaces, and interests.\n5. **Political affiliation**:\ - \ Americans increasingly self-sort politically in social networks (affective polarization\ - \ research).\n6. **Religious affiliation**: Congregations are major social network\ - \ hubs; people know others from church.\n7. **Marital status / has_children**: Life\ - \ stage similarity drives connections (parent networks at schools, etc.).\n8. **Race/ethnicity**:\ - \ Residential and social segregation creates strong same-group homophily.\n9. **Employment\ - \ status**: Shared workplace context.\n10. **Household income**: Economic class\ - \ shapes social circles significantly.\n11. **Social media platforms**: Shared platforms\ - \ enable online connections.\n12. **Occupation**: Professional networks form around\ - \ occupation type.\n\nEdge types:\n- **household_member**: Same household (using\ - \ marital_status + household_size proxy \u2014 but we don't have household_id).\ - \ Use partner_id-based logic. Actually, we can use marital_status == Married/Domestic\ - \ Partnership and same state and same income as a proxy... but the validator rejected\ - \ household_id. We should use `a_marital_status == b_marital_status` or better,\ - \ same state + same household_income (since household members share income in the\ - \ sample data). Actually the cleanest proxy for household: same household_income\ - \ AND same state AND same urban_rural.\n- **close_friend**: Same state + same urban_rural\ - \ + same race_ethnicity + similar age\n- **political_community**: Same political\ - \ affiliation + same state\n- **religious_community**: Same religious affiliation\ - \ + same state\n- **coworker**: Same occupation + same state + same urban_rural\n\ - - **acquaintance**: Default fallback\n\nInfluence factors:\n- Education level (more\ - \ educated \u2192 more influential on policy opinions)\n- Civic engagement (actively\ - \ engaged citizens influence others)\n- Trust in institutions (those who trust and\ - \ participate more shape discourse)\n- Need for cognition (analytical thinkers who\ - \ process information more deeply)\n\nAverage degree: For a general US adult population\ - \ focused on social opinion spread, 8-12 is realistic. I'll use 10.\n\nFor household_member\ - \ edge type: since household_id is not in the available attributes list, I'll proxy\ - \ it using same household_income AND same state AND same urban_rural \u2014 which\ - \ will effectively capture actual household members from the sample (agents 0&1\ - \ share household_income=46464, NY, Suburban; agents 3&4 share 100878, SC, Suburban)." -seed: 42 diff --git a/examples/scenario/asi-announcement/persona.v1.yaml b/examples/scenario/asi-announcement/persona.v1.yaml deleted file mode 100644 index 4713191..0000000 --- a/examples/scenario/asi-announcement/persona.v1.yaml +++ /dev/null @@ -1,737 +0,0 @@ -population_description: 10,000 US adults aged 18+ representative of the national population - by state, age, gender, race/ethnicity, education, and income. Include political - affiliation, media consumption habits, social media usage, religious affiliation, - and personality traits. Focus on attributes relevant to opinion formation on national - policy issues. -created_at: '2026-02-17T23:18:58.657826' -intro_template: I'm a {age}-year-old {gender} living in {state}, identifying as {race_ethnicity}. - I earn around {household_income} a year and live in a {urban_rural} area. Politically, - I consider myself {political_ideology} and affiliate with the {political_affiliation} - party. My faith — {religious_affiliation} — shapes a lot of how I see the world. -treatments: -- attribute: age - treatment: concrete - group: demographics -- attribute: gender - treatment: concrete - group: demographics -- attribute: state - treatment: concrete - group: demographics -- attribute: race_ethnicity - treatment: concrete - group: demographics -- attribute: urban_rural - treatment: concrete - group: demographics -- attribute: education_level - treatment: concrete - group: demographics -- attribute: marital_status - treatment: concrete - group: demographics -- attribute: household_size - treatment: concrete - group: demographics -- attribute: has_children - treatment: concrete - group: demographics -- attribute: immigration_status - treatment: concrete - group: demographics -- attribute: country - treatment: concrete - group: demographics -- attribute: household_income - treatment: concrete - group: economic_profile -- attribute: employment_status - treatment: concrete - group: economic_profile -- attribute: occupation - treatment: concrete - group: economic_profile -- attribute: homeownership - treatment: concrete - group: economic_profile -- attribute: union_membership - treatment: concrete - group: economic_profile -- attribute: health_insurance_type - treatment: concrete - group: economic_profile -- attribute: financial_resilience - treatment: relative - group: economic_profile -- attribute: economic_anxiety - treatment: relative - group: economic_profile -- attribute: political_affiliation - treatment: concrete - group: political_identity -- attribute: political_ideology - treatment: concrete - group: political_identity -- attribute: civic_engagement - treatment: concrete - group: political_identity -- attribute: trust_in_institutions - treatment: relative - group: political_identity -- attribute: institutional_change_support - treatment: relative - group: political_identity -- attribute: religious_affiliation - treatment: concrete - group: religion_and_values -- attribute: religious_attendance - treatment: concrete - group: religion_and_values -- attribute: social_cohesion_orientation - treatment: relative - group: religion_and_values -- attribute: gun_ownership - treatment: concrete - group: religion_and_values -- attribute: openness - treatment: relative - group: personality -- attribute: conscientiousness - treatment: relative - group: personality -- attribute: extraversion - treatment: relative - group: personality -- attribute: agreeableness - treatment: relative - group: personality -- attribute: neuroticism - treatment: relative - group: personality -- attribute: need_for_cognition - treatment: relative - group: personality -- attribute: primary_news_source - treatment: concrete - group: media_and_information -- attribute: news_outlet_lean - treatment: concrete - group: media_and_information -- attribute: social_media_platforms - treatment: concrete - group: media_and_information -- attribute: social_media_hours_per_day - treatment: concrete - group: media_and_information -- attribute: internet_access - treatment: concrete - group: media_and_information -- attribute: susceptibility_to_misinformation - treatment: relative - group: media_and_information -- attribute: information_verification_habit - treatment: relative - group: media_and_information -- attribute: ai_literacy - treatment: relative - group: ai_and_tech_outlook -- attribute: ai_risk_perception - treatment: relative - group: ai_and_tech_outlook -- attribute: automation_job_vulnerability - treatment: relative - group: ai_and_tech_outlook -- attribute: asi_adoption_willingness - treatment: relative - group: ai_and_tech_outlook -- attribute: techno_optimism - treatment: relative - group: ai_and_tech_outlook -- attribute: stem_background - treatment: concrete - group: ai_and_tech_outlook -- attribute: chronic_illness_household - treatment: concrete - group: demographics -groups: -- name: demographics - label: Who I Am - attributes: - - age - - gender - - state - - race_ethnicity - - urban_rural - - education_level - - marital_status - - household_size - - has_children - - immigration_status - - country - - chronic_illness_household -- name: economic_profile - label: My Economic Life - attributes: - - household_income - - employment_status - - occupation - - homeownership - - union_membership - - health_insurance_type - - financial_resilience - - economic_anxiety -- name: political_identity - label: My Political Identity - attributes: - - political_affiliation - - political_ideology - - civic_engagement - - trust_in_institutions - - institutional_change_support -- name: religion_and_values - label: My Values & Beliefs - attributes: - - religious_affiliation - - religious_attendance - - social_cohesion_orientation - - gun_ownership -- name: personality - label: My Personality - attributes: - - openness - - conscientiousness - - extraversion - - agreeableness - - neuroticism - - need_for_cognition -- name: media_and_information - label: How I Get My News - attributes: - - primary_news_source - - news_outlet_lean - - social_media_platforms - - social_media_hours_per_day - - internet_access - - susceptibility_to_misinformation - - information_verification_habit -- name: ai_and_tech_outlook - label: My View on AI & Technology - attributes: - - ai_literacy - - ai_risk_perception - - automation_job_vulnerability - - asi_adoption_willingness - - techno_optimism - - stem_background -phrasings: - boolean: - - attribute: has_children - true_phrase: I have children under 18 living in my household. - false_phrase: I don't have any children under 18 living in my household. - - attribute: homeownership - true_phrase: I own my primary residence. - false_phrase: I rent my primary residence. - - attribute: union_membership - true_phrase: I am currently a member of a labor union. - false_phrase: I am not currently a member of a labor union. - - attribute: gun_ownership - true_phrase: My household contains at least one firearm. - false_phrase: My household does not contain any firearms. - - attribute: chronic_illness_household - true_phrase: Someone in my household lives with a serious chronic illness, such - as cancer, Alzheimer's, ALS, or diabetes. - false_phrase: No one in my household lives with a serious chronic illness such - as cancer, Alzheimer's, ALS, or diabetes. - - attribute: stem_background - true_phrase: My educational or occupational background is in a STEM field. - false_phrase: My educational and occupational background is not in a STEM field. - categorical: - - attribute: gender - phrases: - Male: I identify as a man. - Female: I identify as a woman. - Non-binary/Other: My gender identity is non-binary or outside the traditional - categories. - null_options: [] - null_phrase: null - fallback: null - - attribute: state - phrases: - CA: I live in California. - TX: I live in Texas. - FL: I live in Florida. - NY: I live in New York. - PA: I live in Pennsylvania. - IL: I live in Illinois. - OH: I live in Ohio. - GA: I live in Georgia. - NC: I live in North Carolina. - MI: I live in Michigan. - NJ: I live in New Jersey. - VA: I live in Virginia. - WA: I live in Washington state. - AZ: I live in Arizona. - MA: I live in Massachusetts. - TN: I live in Tennessee. - IN: I live in Indiana. - MO: I live in Missouri. - MD: I live in Maryland. - WI: I live in Wisconsin. - CO: I live in Colorado. - MN: I live in Minnesota. - SC: I live in South Carolina. - AL: I live in Alabama. - LA: I live in Louisiana. - KY: I live in Kentucky. - OR: I live in Oregon. - OK: I live in Oklahoma. - CT: I live in Connecticut. - UT: I live in Utah. - IA: I live in Iowa. - NV: I live in Nevada. - AR: I live in Arkansas. - MS: I live in Mississippi. - KS: I live in Kansas. - NM: I live in New Mexico. - NE: I live in Nebraska. - WV: I live in West Virginia. - ID: I live in Idaho. - HI: I live in Hawaii. - NH: I live in New Hampshire. - ME: I live in Maine. - MT: I live in Montana. - RI: I live in Rhode Island. - DE: I live in Delaware. - SD: I live in South Dakota. - ND: I live in North Dakota. - AK: I live in Alaska. - VT: I live in Vermont. - WY: I live in Wyoming. - DC: I live in Washington, D.C. - null_options: [] - null_phrase: null - fallback: null - - attribute: race_ethnicity - phrases: - White non-Hispanic: I identify as White, non-Hispanic. - Hispanic: I identify as Hispanic or Latino. - Black non-Hispanic: I identify as Black or African American. - Asian non-Hispanic: I identify as Asian or Asian American. - Other/Multiracial: My racial or ethnic background is multiracial or doesn't - fit the standard categories. - null_options: [] - null_phrase: null - fallback: null - - attribute: urban_rural - phrases: - Urban: I live in a city or urban area. - Suburban: I live in the suburbs, outside a major city. - Rural: I live in a rural or small-town area. - null_options: [] - null_phrase: null - fallback: null - - attribute: education_level - phrases: - Less than HS: I didn't finish high school. - HS Diploma: My highest level of education is a high school diploma or GED. - Some College: I attended college but didn't complete a degree. - Associate's: I have an associate's degree from a two-year college. - Bachelor's: I have a four-year college degree. - Graduate Degree: I have a graduate or professional degree beyond a bachelor's. - null_options: [] - null_phrase: null - fallback: null - - attribute: marital_status - phrases: - Single: I'm currently single and have never been married. - Married: I'm married. - Divorced: I'm divorced. - Widowed: I'm widowed — I lost my spouse. - Domestic Partnership: I'm in a domestic partnership or living with a long-term - partner. - null_options: [] - null_phrase: null - fallback: null - - attribute: employment_status - phrases: - Full-time: I work full-time. - Part-time: I work part-time. - Self-employed: I'm self-employed or run my own business. - Unemployed: I'm currently unemployed and looking for work. - Retired: I'm retired. - Student: I'm a student and my primary focus is school. - null_options: [] - null_phrase: null - fallback: null - - attribute: occupation - phrases: - Management/Professional: I work in a management or professional role — things - like business, finance, law, healthcare, or tech. - Service: I work in a service occupation — like food service, healthcare support, - or personal care. - Sales/Office: I work in sales or an office/administrative support role. - Construction/Extraction: I work in construction, the trades, or a related field. - Production/Transport: I work in production, manufacturing, or transportation. - Other: My work doesn't fit neatly into a standard occupational category. - null_options: [] - null_phrase: null - fallback: null - - attribute: political_affiliation - phrases: - Strong Democrat: I'm a strong Democrat and closely identify with the party. - Lean Democrat: I lean toward the Democratic Party, though I don't consider myself - a strong partisan. - Independent: I consider myself a political independent and don't lean strongly - toward either party. - Lean Republican: I lean toward the Republican Party, though I don't consider - myself a strong partisan. - Strong Republican: I'm a strong Republican and closely identify with the party. - null_options: - - Independent - null_phrase: I don't strongly identify with either major party — I think of myself - as an independent. - fallback: null - - attribute: political_ideology - phrases: - Very Liberal: Politically, I'd describe myself as very liberal. - Liberal: Politically, I'd describe myself as liberal. - Moderate: Politically, I'd say I'm moderate — somewhere in the middle. - Conservative: Politically, I'd describe myself as conservative. - Very Conservative: Politically, I'd describe myself as very conservative. - null_options: - - Moderate - null_phrase: I don't place myself on the left or right — I think of my views as - moderate or mixed. - fallback: null - - attribute: religious_affiliation - phrases: - Evangelical Protestant: I'm an Evangelical Protestant Christian — my faith is - central to my life. - Mainline Protestant: I'm a Protestant Christian in a mainline denomination, - like Methodist, Lutheran, or Presbyterian. - Catholic: I'm Catholic. - Other Christian: I'm a Christian, but not in one of the main Protestant or Catholic - traditions — like Mormon, Orthodox, or another branch. - Jewish: I'm Jewish. - Muslim: I'm Muslim. - Other Non-Christian: I practice a non-Christian religion, such as Buddhism, - Hinduism, or another faith. - None/Unaffiliated: I don't affiliate with any religion — I'm secular, agnostic, - or atheist. - null_options: - - None/Unaffiliated - null_phrase: I don't really consider myself part of any religion. - fallback: null - - attribute: religious_attendance - phrases: - Never: I never attend religious services. - Seldom: I rarely attend religious services — maybe once or twice a year at most. - A few times/year: I go to religious services a few times a year, like on holidays. - Monthly: I attend religious services about once a month or so. - Weekly: I attend religious services just about every week. - More than weekly: I attend religious services more than once a week — it's a - big part of my routine. - null_options: - - Never - null_phrase: I don't attend religious services. - fallback: null - - attribute: primary_news_source - phrases: - TV: I get most of my national news from television — broadcast or cable news. - Online/Digital: I mainly get my news from online sources and news websites. - Social Media: Social media is my main way of keeping up with the news. - Radio: I get most of my news from the radio. - Print Newspaper: I still read a print newspaper as my main source of news. - None: I don't really follow the news regularly. - null_options: - - None - null_phrase: I don't have a regular source of news — I don't follow it much. - fallback: null - - attribute: news_outlet_lean - phrases: - Left-leaning: The news outlets I rely on tend to lean to the left politically. - Center: I prefer news outlets that I consider centrist or down-the-middle. - Right-leaning: The news outlets I rely on tend to lean to the right politically. - Mixed/No Preference: I consume news from a mix of outlets and don't have a strong - preference for any particular political lean. - null_options: - - Mixed/No Preference - null_phrase: I don't gravitate toward any particular political slant in the news - I consume. - fallback: null - - attribute: social_media_platforms - phrases: - Facebook: Facebook is the social media platform I use the most. - YouTube: YouTube is my primary social media or video platform. - Instagram: Instagram is the social media platform I use the most. - TikTok: TikTok is the social media platform I use the most. - Twitter/X: I'm most active on Twitter — or X, as it's now called. - None/Minimal: I don't really use social media. - null_options: - - None/Minimal - null_phrase: I'm not really on social media — I use it little or not at all. - fallback: null - - attribute: internet_access - phrases: - Broadband: I have high-speed broadband internet at home. - Mobile Only: My only internet access is through my smartphone's mobile data - — I don't have home broadband. - Dial-up/Satellite: My home internet is slow or limited — I rely on dial-up or - satellite. - None: I don't have any internet access at home. - null_options: - - None - null_phrase: I don't have internet access at home. - fallback: null - - attribute: civic_engagement - phrases: - Votes regularly: I vote in most elections — it's something I make a point of - doing. - Votes sometimes: I vote sometimes, but not in every election. - Rarely/Never votes: I rarely or never vote. - Actively volunteers or campaigns: I don't just vote — I also actively volunteer, - donate, or get involved in campaigns and civic causes. - null_options: - - Rarely/Never votes - null_phrase: I don't really participate in elections or civic activities. - fallback: null - - attribute: health_insurance_type - phrases: - Employer-sponsored: I get my health insurance through my employer or a family - member's employer. - Medicaid/CHIP: I'm covered by Medicaid or CHIP — a government program for lower-income - individuals and families. - Medicare: I'm on Medicare — the federal health insurance program mostly for - people 65 and older. - Individual Market/ACA: I buy my own health insurance on the individual market, - through the ACA marketplace or directly from an insurer. - Military/VA: I have health coverage through the military or the VA. - Uninsured: I don't have health insurance right now. - null_options: - - Uninsured - null_phrase: I currently don't have any health insurance coverage. - fallback: null - - attribute: immigration_status - phrases: - US-born citizen: I was born in the United States and am a citizen by birth. - Naturalized citizen: I'm a US citizen, but I was born in another country and - went through the naturalization process. - Permanent resident: I'm a lawful permanent resident — I have a green card but - am not yet a citizen. - Other: My immigration or citizenship status is something other than citizen - or permanent resident. - null_options: [] - null_phrase: null - fallback: null - - attribute: country - phrases: - United States: I live in the United States. - null_options: [] - null_phrase: null - fallback: null - relative: - - attribute: financial_resilience - labels: - much_below: I am far less financially cushioned against economic shocks than - most people - below: I have somewhat less financial stability and savings to fall back on - than most people - average: My financial resilience in the face of economic disruption is about - average - above: I am better positioned financially to weather economic shocks than most - people - much_above: I have far greater financial resources and stability to absorb economic - disruption than most people - - attribute: economic_anxiety - labels: - much_below: I worry far less about my financial future and job security than - most people - below: I am somewhat less anxious about my economic situation than most people - average: My level of worry about my financial future and job security is about - average - above: I feel more anxious about my financial future and job security than most - people - much_above: I am far more consumed by worry about my economic security and financial - future than most people - - attribute: trust_in_institutions - labels: - much_below: I trust institutions far less than most people - below: I am more skeptical of institutions than most people - average: I am about as trusting of institutions as the average person - above: I generally trust institutions more than most people - much_above: I have far more faith in government, media, and public institutions - than most people - - attribute: institutional_change_support - labels: - much_below: I am far more opposed to rapid, large-scale restructuring of government - and economic institutions than most people - below: I am somewhat more cautious about sweeping institutional change than - most people - average: My support for large-scale institutional restructuring in response - to new technology is about average - above: I am more supportive of bold, rapid institutional reform than most people - much_above: I am far more enthusiastic about sweeping, transformative restructuring - of institutions than most people - - attribute: social_cohesion_orientation - labels: - much_below: I place far less priority on collective stability and community - solidarity than most people - below: I am somewhat less focused on community solidarity over individual benefit - than most people - average: My balance between collective stability and individual benefit is about - average - above: I place more importance on community solidarity and collective well-being - than most people - much_above: I prioritize collective stability and community solidarity far more - strongly than most people - - attribute: openness - labels: - much_below: I am far less open to new ideas and novel experiences than most - people - below: I am somewhat less curious and open to new ideas than most people - average: My openness to new experiences and ideas is about average - above: I am more curious, creative, and open to new ideas than most people - much_above: I am far more open to novel ideas and unconventional thinking than - most people - - attribute: conscientiousness - labels: - much_below: I am far less organized, disciplined, and dependable than most people - below: I am somewhat less conscientious and self-disciplined than most people - average: My level of organization and dependability is about average - above: I am more organized, disciplined, and reliable than most people - much_above: I am far more conscientious, methodical, and dependable than most - people - - attribute: extraversion - labels: - much_below: I am far more introverted and reserved than most people - below: I am somewhat less outgoing and sociable than most people - average: My level of sociability and outgoingness is about average - above: I am more sociable, assertive, and outgoing than most people - much_above: I am far more extraverted and socially energized than most people - - attribute: agreeableness - labels: - much_below: I am far less cooperative, empathetic, and trusting of others than - most people - below: I am somewhat less agreeable and empathetic toward others than most people - average: My level of cooperativeness and empathy toward others is about average - above: I am more cooperative, empathetic, and trusting toward others than most - people - much_above: I am far more agreeable, compassionate, and trusting of others than - most people - - attribute: neuroticism - labels: - much_below: I am far more emotionally stable and less prone to anxiety than - most people - below: I am somewhat more emotionally stable and less anxious than most people - average: My level of emotional stability and tendency toward anxiety is about - average - above: I experience more emotional instability and anxiety than most people - much_above: I am far more prone to anxiety, stress, and emotional instability - than most people - - attribute: need_for_cognition - labels: - much_below: I engage in analytical thinking and complex problem-solving far - less than most people - below: I am somewhat less inclined to seek out effortful analytical thinking - than most people - average: My tendency to engage in deep, analytical thinking is about average - above: I enjoy effortful analytical thinking more than most people - much_above: I engage in and seek out complex analytical thinking far more than - most people - - attribute: susceptibility_to_misinformation - labels: - much_below: I am far less likely to accept or share unverified information than - most people - below: I am somewhat less susceptible to misinformation than most people - average: My susceptibility to misinformation is about average - above: I am somewhat more likely to accept and share unverified information - than most people - much_above: I am far more likely to accept and spread unverified or false information - than most people - - attribute: information_verification_habit - labels: - much_below: I cross-check claims against reliable sources far less often than - most people - below: I verify information against multiple sources somewhat less than most - people - average: My habit of verifying information before accepting it is about average - above: I am more diligent about cross-checking claims against authoritative - sources than most people - much_above: I am far more rigorous about verifying information against multiple - authoritative sources than most people - - attribute: ai_literacy - labels: - much_below: I understand AI concepts and capabilities far less than most people - below: My understanding of AI and machine learning is somewhat lower than most - people - average: My understanding of AI concepts and capabilities is about average - above: I understand AI concepts, capabilities, and limitations better than most - people - much_above: I have a far deeper understanding of AI and machine learning than - most people - - attribute: ai_risk_perception - labels: - much_below: I perceive far less personal or societal danger from advanced AI - than most people - below: I am somewhat less concerned about the risks posed by advanced AI than - most people - average: My level of concern about the dangers of advanced AI is about average - above: I see more personal and societal risk in advanced AI than most people - much_above: I am far more alarmed by the potential dangers of advanced AI than - most people - - attribute: automation_job_vulnerability - labels: - much_below: My job is far less exposed to automation and AI displacement than - most people's - below: My occupation is somewhat less vulnerable to automation displacement - than most people's - average: My job's exposure to automation and AI displacement is about average - above: My job is more at risk of being displaced by automation and AI than most - people's - much_above: My occupation is far more vulnerable to displacement by AI-enabled - automation than most people's - - attribute: asi_adoption_willingness - labels: - much_below: I am far less willing to use ASI-powered tools in my daily life - and work than most people - below: I am somewhat less willing to adopt ASI-powered tools than most people - average: My willingness to use ASI-powered tools in my life and work is about - average - above: I am more willing to actively adopt ASI-powered tools than most people - much_above: I am far more eager to integrate ASI-powered tools into my daily - life and work than most people - - attribute: techno_optimism - labels: - much_below: I am far more skeptical that technological progress benefits humanity - than most people - below: I am somewhat less optimistic about the net benefits of technological - progress than most people - average: My belief that technology produces net positive outcomes for humanity - is about average - above: I believe more strongly than most people that technological progress - is good for humanity - much_above: I am far more confident than most people that technological progress - will produce overwhelmingly positive outcomes for humanity - concrete: - - attribute: age - template: I am {value} years old. - format_spec: .0f - prefix: '' - suffix: '' - - attribute: household_size - template: There are {value} people living in my household. - format_spec: .0f - prefix: '' - suffix: '' - - attribute: household_income - template: My household's annual income is {value}. - format_spec: ',.0f' - prefix: $ - suffix: '' - - attribute: social_media_hours_per_day - template: I spend about {value} hours on social media every day. - format_spec: .1f - prefix: '' - suffix: '' -population_stats: - stats: {} diff --git a/examples/scenario/asi-announcement/scenario.v1.yaml b/examples/scenario/asi-announcement/scenario.v1.yaml deleted file mode 100644 index 6c4d4ce..0000000 --- a/examples/scenario/asi-announcement/scenario.v1.yaml +++ /dev/null @@ -1,1743 +0,0 @@ -meta: - name: asi-announcement - description: 'OpenAI demonstrates artificial superintelligence — a system that exceeds - the best human minds in every cognitive domain. It is self-improving. It is real. - This is not incremental AI progress. This is a discontinuous leap. - - - The scenario describes ONLY what ASI produces and what physically changes in the - world. Human behavioral responses are NOT scripted — they are what the simulation - produces. - - - SIMULATION PARAMETERS: 6 timesteps, each timestep = 1 month. Total duration: 6 - months. - - - MILESTONE EVENTS (factual consequences of ASI, not human reactions): - - - Month 1 — The Demonstration: - - OpenAI demonstrates ASI publicly with live, verifiable results. The system solves - the Riemann Hypothesis, P vs NP, and Navier-Stokes existence problems in under - an hour. It designs a complete novel mRNA therapy for pancreatic cancer — full - molecular pathway, synthesis instructions, predicted efficacy — in 20 minutes. - It produces a unified field theory reconciling quantum mechanics and general relativity. - It designs a fusion reactor buildable with existing materials and manufacturing - techniques. Within 2 weeks, Anthropic, DeepMind, and xAI independently confirm - similar capabilities. China''s Ministry of Science and Technology announces they - achieved ASI months ago. The system is self-improving — each day it is measurably - more capable than the day before. - - - Month 2 — The Knowledge Explosion: - - ASI systems at multiple labs produce scientific output at inhuman speed. Complete - cures are published for Alzheimer''s, ALS, most cancers, malaria, HIV, and diabetes - (Type 1 and 2) — not theoretical, but full treatment protocols with synthesis - pathways. All remaining Millennium Prize Problems are solved. Materials science - breakthroughs include room-temperature superconductors and carbon capture materials - 1000x more efficient than current best. A commercial fusion reactor design is - published with an estimated 18 months to first operational plant. Climate models - are re-run with perfect accuracy and precise interventions mapped for 1.5°C stabilization. - All of this is published openly. The bottleneck shifts from knowing what to do - to physically building it — manufacturing, logistics, regulatory approval, human - coordination. - - - Month 3 — Public Access: - - ASI becomes available to the general public via API and consumer products. Any - individual can now access cognitive capability that exceeds the world''s best - doctor, lawyer, engineer, scientist, financial advisor, therapist, tutor, and - strategist — simultaneously, for free or nearly free. A high school dropout in - rural Arkansas has the same cognitive resources as a team of Harvard professors. - Every profession predicated on information asymmetry or cognitive scarcity is - structurally redundant — not because people are fired, but because the reason - the job existed is gone. Software that previously took teams of 50 engineers 2 - years to build can be built by one person in an afternoon. - - - Month 4 — The Physical Bottleneck Breaks: - - ASI designs autonomous manufacturing systems — robots that can build robots, using - locally available materials. The first ASI-designed pharmaceutical facility begins - production, fully automated, producing drugs at 1/100th current cost. ASI-designed - construction systems are demonstrated: a full residential building assembled in - 72 hours by autonomous machines. Energy abundance is on the horizon: the first - ASI-designed fusion prototype is under construction with an 8-month timeline to - grid power. The constraint is no longer knowledge or manufacturing — it is raw - materials, energy (temporarily), and human regulatory and political systems. - - - Month 5 — Abundance Begins: - - First ASI-manufactured drugs reach patients under emergency authorizations — cancer - treatments, Alzheimer''s reversal therapies. Energy costs begin declining as ASI-optimized - solar, wind, and battery systems deploy (fusion still months away). ASI-designed - infrastructure projects begin in early-adopter countries (Singapore, UAE, Estonia). - Food production breakthroughs: ASI-designed vertical farms producing 100x yield - per acre begin construction. The marginal cost of most goods and services is trending - toward zero. The economic question is no longer scarcity — it is distribution. - - - Month 6 — The New World: - - The fusion prototype comes online ahead of schedule — functionally unlimited clean - energy now has a concrete timeline of months, not decades. An ASI-designed space - launch system is demonstrated, dropping cost to orbit by 99%. First Mars habitat - modules are in production. Global disease burden is dropping measurably — treatments - are reaching patients in developed nations, and deployment to developing nations - is the primary coordination challenge. The world is materially, measurably, objectively - better in almost every physical dimension.' - base_population: population.v1 - population_spec: null - study_db: null - population_id: default - network_id: default - created_at: '2026-02-17T22:05:49.826338' -event: - type: announcement - content: 'BREAKING: OpenAI has publicly demonstrated what it describes as Artificial - Superintelligence (ASI) — a self-improving system that exceeds the best human - minds in every cognitive domain. This is not incremental AI progress. It is a - discontinuous leap. - - - **MONTH 1 — THE DEMONSTRATION** - - OpenAI demonstrated ASI publicly with live, verifiable results. In under one hour, - the system solved the Riemann Hypothesis, P vs NP, and the Navier-Stokes existence - problems — three of the most famous unsolved problems in mathematics. In 20 minutes, - it designed a complete novel mRNA therapy for pancreatic cancer, including full - molecular pathway, synthesis instructions, and predicted efficacy. It produced - a unified field theory reconciling quantum mechanics and general relativity, and - designed a fusion reactor buildable with existing materials and manufacturing - techniques. Within two weeks, Anthropic, DeepMind, and xAI independently confirmed - they have achieved similar capabilities. China''s Ministry of Science and Technology - announced they achieved ASI several months prior. The system is self-improving - — measurably more capable each day than the day before. - - - **MONTH 2 — THE KNOWLEDGE EXPLOSION** - - ASI systems across multiple labs are producing scientific output at inhuman speed. - Complete cures — not theoretical, but full treatment protocols with synthesis - pathways — have been published for Alzheimer''s disease, ALS, most cancers, malaria, - HIV, and both Type 1 and Type 2 diabetes. All remaining Millennium Prize Problems - have been solved. Materials science breakthroughs include room-temperature superconductors - and carbon capture materials 1,000 times more efficient than current best. A commercial - fusion reactor design has been published with an estimated 18 months to the first - operational plant. Climate models have been re-run with unprecedented accuracy - and precise interventions mapped to stabilize global temperatures at 1.5°C. All - of this has been published openly and freely. The bottleneck has shifted from - knowledge to physical execution: manufacturing, logistics, regulatory approval, - and human coordination. - - - **MONTH 3 — PUBLIC ACCESS** - - ASI is now available to the general public via API and consumer products, free - or nearly free. Any individual — regardless of education, geography, or income - — can now access cognitive capability exceeding the world''s best doctor, lawyer, - engineer, scientist, financial advisor, therapist, tutor, and strategist, simultaneously. - A high school dropout in rural Arkansas has the same cognitive resources as a - team of Harvard professors. Every profession predicated on information asymmetry - or cognitive scarcity is structurally redundant — not because people are being - fired en masse, but because the underlying reason those jobs existed is gone. - Software that previously required teams of 50 engineers and two years to build - can be built by a single person in an afternoon. - - - **MONTH 4 — THE PHYSICAL BOTTLENECK BREAKS** - - ASI has designed autonomous manufacturing systems — robots capable of building - other robots using locally available materials. The first ASI-designed pharmaceutical - facility has begun fully automated production, producing drugs at 1/100th of current - cost. ASI-designed construction systems have been demonstrated: a full residential - building was assembled in 72 hours by autonomous machines. The first ASI-designed - fusion prototype is under construction with an 8-month timeline to grid power. - The primary constraints are now raw materials, temporary energy limitations, and - human regulatory and political systems. - - - **MONTH 5 — ABUNDANCE BEGINS** - - First ASI-manufactured drugs are reaching patients under emergency authorizations - — including cancer treatments and Alzheimer''s reversal therapies. Energy costs - are declining as ASI-optimized solar, wind, and battery systems deploy. ASI-designed - infrastructure projects are underway in early-adopter countries including Singapore, - the UAE, and Estonia. ASI-designed vertical farms producing 100 times the yield - per acre are under construction. The marginal cost of most goods and services - is trending toward zero. The central economic question is no longer scarcity — - it is distribution. - - - **MONTH 6 — THE NEW WORLD** - - The fusion prototype has come online ahead of schedule — functionally unlimited - clean energy now has a concrete timeline of months, not decades. An ASI-designed - space launch system has been demonstrated, reducing the cost to orbit by 99%. - First Mars habitat modules are in production. Global disease burden is dropping - measurably — treatments are reaching patients in developed nations, with deployment - to developing nations as the primary coordination challenge. By every objective - physical measure, the world is materially better than it was six months ago.' - source: OpenAI (corroborated by Anthropic, DeepMind, xAI, and China's Ministry of - Science and Technology) - credibility: 0.85 - ambiguity: 0.55 - emotional_valence: 0.65 -timeline: -- timestep: 1 - event: - type: announcement - content: 'BREAKING: OpenAI has publicly demonstrated what it describes as Artificial - Superintelligence (ASI) — a self-improving system that exceeds the best human - minds in every cognitive domain. This is not incremental AI progress. It is - a discontinuous leap. - - - **MONTH 1 — THE DEMONSTRATION** - - OpenAI demonstrated ASI publicly with live, verifiable results. In under one - hour, the system solved the Riemann Hypothesis, P vs NP, and the Navier-Stokes - existence problems — three of the most famous unsolved problems in mathematics. - In 20 minutes, it designed a complete novel mRNA therapy for pancreatic cancer, - including full molecular pathway, synthesis instructions, and predicted efficacy. - It produced a unified field theory reconciling quantum mechanics and general - relativity, and designed a fusion reactor buildable with existing materials - and manufacturing techniques. Within two weeks, Anthropic, DeepMind, and xAI - independently confirmed they have achieved similar capabilities. China''s Ministry - of Science and Technology announced they achieved ASI several months prior. - The system is self-improving — measurably more capable each day than the day - before.' - source: OpenAI (corroborated by Anthropic, DeepMind, xAI, and China's Ministry - of Science and Technology) - credibility: 0.95 - ambiguity: 0.55 - emotional_valence: 0.65 - exposure_rules: null - description: 'Month 1 — The Demonstration: ASI publicly verified; multiple labs - and China confirm capability; system is self-improving daily.' - re_reasoning_intensity: extreme -- timestep: 2 - event: - type: announcement - content: '**MONTH 2 — THE KNOWLEDGE EXPLOSION** - - ASI systems across multiple labs are producing scientific output at inhuman - speed. Complete cures — not theoretical, but full treatment protocols with synthesis - pathways — have been published for Alzheimer''s disease, ALS, most cancers, - malaria, HIV, and both Type 1 and Type 2 diabetes. All remaining Millennium - Prize Problems have been solved. Materials science breakthroughs include room-temperature - superconductors and carbon capture materials 1,000 times more efficient than - current best. A commercial fusion reactor design has been published with an - estimated 18 months to the first operational plant. Climate models have been - re-run with unprecedented accuracy and precise interventions mapped to stabilize - global temperatures at 1.5°C. All of this has been published openly and freely. - The bottleneck has shifted from knowledge to physical execution: manufacturing, - logistics, regulatory approval, and human coordination.' - source: Nature, Science, arXiv (coordinated open-access release by ASI lab consortiums); - WHO technical briefing - credibility: 0.97 - ambiguity: 0.55 - emotional_valence: 0.8 - exposure_rules: null - description: 'Month 2 — The Knowledge Explosion: ASI publishes complete cures, solves - all Millennium Prize Problems, and maps a path to climate stabilization. Bottleneck - shifts to physical execution.' - re_reasoning_intensity: extreme -- timestep: 3 - event: - type: announcement - content: '**MONTH 3 — PUBLIC ACCESS** - - ASI is now available to the general public via API and consumer products, free - or nearly free. Any individual — regardless of education, geography, or income - — can now access cognitive capability exceeding the world''s best doctor, lawyer, - engineer, scientist, financial advisor, therapist, tutor, and strategist, simultaneously. - A high school dropout in rural Arkansas has the same cognitive resources as - a team of Harvard professors. Every profession predicated on information asymmetry - or cognitive scarcity is structurally redundant — not because people are being - fired en masse, but because the underlying reason those jobs existed is gone. - Software that previously required teams of 50 engineers and two years to build - can be built by a single person in an afternoon.' - source: OpenAI public launch announcement; TechCrunch, Reuters, leaked internal - memos from major law firms, medical associations, and universities - credibility: 0.93 - ambiguity: 0.55 - emotional_valence: 0.4 - exposure_rules: null - description: 'Month 3 — Public Access: ASI APIs go live for free to all users globally; - cognitive scarcity collapses; structural redundancy of knowledge-based professions - becomes undeniable.' - re_reasoning_intensity: extreme -- timestep: 4 - event: - type: announcement - content: '**MONTH 4 — THE PHYSICAL BOTTLENECK BREAKS** - - ASI has designed autonomous manufacturing systems — robots capable of building - other robots using locally available materials. The first ASI-designed pharmaceutical - facility has begun fully automated production, producing drugs at 1/100th of - current cost. ASI-designed construction systems have been demonstrated: a full - residential building was assembled in 72 hours by autonomous machines. The first - ASI-designed fusion prototype is under construction with an 8-month timeline - to grid power. The primary constraints are now raw materials, temporary energy - limitations, and human regulatory and political systems.' - source: ASI Manufacturing Consortium press release; leaked DOE technical assessment; - Financial Times investigative report on pharmaceutical industry collapse - credibility: 0.9 - ambiguity: 0.55 - emotional_valence: 0.55 - exposure_rules: null - description: 'Month 4 — The Physical Bottleneck Breaks: Self-replicating autonomous - manufacturing demonstrated; first automated pharma plant online at 1/100th cost; - fusion prototype under construction.' - re_reasoning_intensity: high -- timestep: 5 - event: - type: announcement - content: '**MONTH 5 — ABUNDANCE BEGINS** - - First ASI-manufactured drugs are reaching patients under emergency authorizations - — including cancer treatments and Alzheimer''s reversal therapies. Energy costs - are declining as ASI-optimized solar, wind, and battery systems deploy. ASI-designed - infrastructure projects are underway in early-adopter countries including Singapore, - the UAE, and Estonia. ASI-designed vertical farms producing 100 times the yield - per acre are under construction. The marginal cost of most goods and services - is trending toward zero. The central economic question is no longer scarcity - — it is distribution.' - source: FDA and EMA emergency authorization announcements; Singapore Ministry - of National Development; UN Development Programme interim report on economic - disruption in developing nations - credibility: 0.92 - ambiguity: 0.55 - emotional_valence: 0.7 - exposure_rules: null - description: 'Month 5 — Abundance Begins: ASI-manufactured drugs reach patients; - energy costs fall; early-adopter nations begin infrastructure transformation; - marginal cost of goods trends toward zero.' - re_reasoning_intensity: high -- timestep: 6 - event: - type: announcement - content: '**MONTH 6 — THE NEW WORLD** - - The fusion prototype has come online ahead of schedule — functionally unlimited - clean energy now has a concrete timeline of months, not decades. An ASI-designed - space launch system has been demonstrated, reducing the cost to orbit by 99%. - First Mars habitat modules are in production. Global disease burden is dropping - measurably — treatments are reaching patients in developed nations, with deployment - to developing nations as the primary coordination challenge. By every objective - physical measure, the world is materially better than it was six months ago.' - source: ITER-successor consortium; SpaceX/ASI joint technical demonstration; WHO - Global Health Report (emergency edition); leaked G20 summit preparatory documents - on post-scarcity governance - credibility: 0.94 - ambiguity: 0.55 - emotional_valence: 0.85 - exposure_rules: null - description: 'Month 6 — The New World: Fusion prototype online ahead of schedule; - space launch costs fall 99%; global disease burden measurably declining; distribution - — not scarcity — is the defining challenge.' - re_reasoning_intensity: extreme -seed_exposure: - channels: - - name: major_tv_broadcast - description: Breaking news coverage on major TV networks (CNN, Fox News, MSNBC, - ABC, NBC, CBS) — wall-to-wall coverage given the magnitude of the event. Reaches - virtually all TV news consumers simultaneously. - reach: broadcast - credibility_modifier: 1.1 - experience_template: null - - name: online_news_digital - description: Online news outlets, tech publications (Wired, Ars Technica, MIT - Technology Review), and mainstream digital media (NYT, WaPo, Reuters). Reaches - digitally-connected news consumers quickly and with high credibility. - reach: broadcast - credibility_modifier: 1.15 - experience_template: null - - name: social_media_viral - description: Organic spread across Twitter/X, Reddit, TikTok, YouTube, Instagram, - and Facebook. Includes memes, hot takes, video clips of the demonstration, and - commentary from influencers and scientists. High volume, mixed signal quality. - reach: organic - credibility_modifier: 0.85 - experience_template: null - - name: professional_tech_network - description: 'Targeted exposure through professional channels: LinkedIn, Slack - workspaces, academic mailing lists, industry newsletters, and professional conferences. - Reaches tech workers, scientists, engineers, academics, and high-information - professionals who engage with AI/science topics.' - reach: targeted - credibility_modifier: 1.2 - experience_template: null - - name: word_of_mouth - description: Interpersonal spread through friend, family, and colleague networks - — conversations at work, home, and in community settings. Organic and informal; - credibility depends on the source within the network. - reach: organic - credibility_modifier: 0.95 - experience_template: null - rules: - - channel: online_news_digital - when: primary_news_source == 'Online/Digital' and internet_access == 'Broadband' - probability: 0.97 - timestep: 0 - - channel: professional_tech_network - when: occupation == 'Professional' and (social_media_platforms == 'Twitter/X' - or education_level == 'Graduate Degree') and need_for_cognition > 0.6 - probability: 0.92 - timestep: 0 - - channel: major_tv_broadcast - when: primary_news_source == 'TV' - probability: 0.95 - timestep: 1 - - channel: online_news_digital - when: primary_news_source == 'Online/Digital' and internet_access != 'None' - probability: 0.88 - timestep: 1 - - channel: social_media_viral - when: social_media_platforms != 'None/Minimal' and social_media_hours_per_day - > 1.5 - probability: 0.85 - timestep: 1 - - channel: professional_tech_network - when: occupation == 'Professional' and education_level in ['Bachelor\'s', 'Graduate - Degree'] - probability: 0.78 - timestep: 1 - - channel: major_tv_broadcast - when: 'true' - probability: 0.65 - timestep: 2 - - channel: social_media_viral - when: social_media_platforms != 'None/Minimal' and age < 50 - probability: 0.82 - timestep: 2 - - channel: word_of_mouth - when: extraversion > 0.55 and employment_status == 'Full-time' - probability: 0.7 - timestep: 2 - - channel: online_news_digital - when: primary_news_source == 'Radio' or primary_news_source == 'Print Newspaper' - probability: 0.72 - timestep: 2 - - channel: word_of_mouth - when: 'true' - probability: 0.6 - timestep: 3 - - channel: social_media_viral - when: age >= 50 and social_media_platforms != 'None/Minimal' - probability: 0.65 - timestep: 3 - - channel: major_tv_broadcast - when: primary_news_source == 'None' or internet_access == 'None' - probability: 0.55 - timestep: 3 - - channel: word_of_mouth - when: urban_rural == 'Rural' and internet_access != 'Broadband' - probability: 0.65 - timestep: 4 - - channel: social_media_viral - when: susceptibility_to_misinformation > 0.6 and trust_in_institutions < 0.4 - probability: 0.8 - timestep: 4 -interaction: - primary_model: broadcast_response - secondary_model: direct_conversation - description: The ASI announcement originates from a highly credible multi-source - broadcast (OpenAI corroborated by Anthropic, DeepMind, xAI, and China's Ministry - of Science and Technology), triggering an initial broadcast phase where agents - encounter the news through their primary media channels and social media feeds. - This is followed by a secondary direct_conversation phase where agents discuss - the implications one-on-one and in small groups — with colleagues in tech, policy, - and academia driving high-engagement deliberation, while family and friend networks - process the emotional and existential dimensions. The announcement's extraordinary - nature (ASI is a civilizational-level event) drives high share probability, with - amplification among high-openness, high-neuroticism, and tech-adjacent individuals, - and moderation among low-trust and high-skepticism segments. Political affiliation, - news outlet lean, and social media usage significantly shape how agents interpret - and relay the information. -spread: - share_probability: 0.72 - share_modifiers: - - when: social_media_hours_per_day > 3.0 - multiply: 1.45 - add: 0.0 - - when: social_media_hours_per_day < 1.0 - multiply: 0.65 - add: 0.0 - - when: age < 30 - multiply: 1.35 - add: 0.0 - - when: age > 65 - multiply: 0.75 - add: 0.0 - - when: openness > 0.7 - multiply: 1.3 - add: 0.0 - - when: neuroticism > 0.7 - multiply: 1.25 - add: 0.0 - - when: extraversion > 0.7 - multiply: 1.2 - add: 0.0 - - when: need_for_cognition > 0.7 - multiply: 1.2 - add: 0.0 - - when: susceptibility_to_misinformation > 0.7 - multiply: 1.35 - add: 0.0 - - when: trust_in_institutions < 0.3 - multiply: 1.4 - add: 0.0 - - when: trust_in_institutions > 0.7 - multiply: 1.15 - add: 0.0 - - when: education_level == 'graduate' - multiply: 1.25 - add: 0.0 - - when: education_level == 'less_than_high_school' - multiply: 0.8 - add: 0.0 - - when: occupation == 'technology' - multiply: 1.5 - add: 0.0 - - when: occupation == 'academia' - multiply: 1.4 - add: 0.0 - - when: occupation == 'government' - multiply: 1.3 - add: 0.0 - - when: news_outlet_lean == 'far_right' - multiply: 1.3 - add: 0.0 - - when: news_outlet_lean == 'far_left' - multiply: 1.25 - add: 0.0 - - when: primary_news_source == 'social_media' - multiply: 1.4 - add: 0.0 - - when: primary_news_source == 'print' - multiply: 0.85 - add: 0.0 - - when: civic_engagement == 'high' - multiply: 1.2 - add: 0.0 - - when: political_ideology == 'very_liberal' - multiply: 1.15 - add: 0.0 - - when: political_ideology == 'very_conservative' - multiply: 1.15 - add: 0.0 - - when: religious_attendance == 'weekly' - multiply: 1.1 - add: 0.0 - - when: edge_type == 'colleague' - multiply: 1.45 - add: 0.0 - - when: edge_type == 'friend' - multiply: 1.2 - add: 0.0 - - when: edge_type == 'family' - multiply: 1.1 - add: 0.0 - - when: internet_access == 'none' - multiply: 0.2 - add: 0.0 - - when: urban_rural == 'urban' - multiply: 1.15 - add: 0.0 - - when: urban_rural == 'rural' - multiply: 0.9 - add: 0.0 - decay_per_hop: 0.12 - max_hops: 7 -outcomes: - suggested_outcomes: - - name: employment_status - type: categorical - description: Current employment situation and how it has changed in response to ASI - options: - - same_job_unchanged - - same_job_but_role_transformed - - left_or_lost_job - - started_asi_powered_venture - - pursuing_creative_or_physical_work - - full_time_education_or_retraining - - not_working_by_choice - - not_working_involuntarily - range: null - required: true - option_friction: - same_job_unchanged: 0.1 - same_job_but_role_transformed: 0.4 - left_or_lost_job: 0.6 - started_asi_powered_venture: 0.8 - pursuing_creative_or_physical_work: 0.5 - full_time_education_or_retraining: 0.6 - not_working_by_choice: 0.3 - not_working_involuntarily: 0.7 - - name: economic_adaptation - type: categorical - description: How well the agent is adapting economically to the ASI-transformed world - options: - - thriving_in_new_economy - - actively_transitioning - - struggling_but_managing - - in_financial_crisis - - surprisingly_better_off - - no_material_change_yet - range: null - required: true - option_friction: - thriving_in_new_economy: 0.7 - actively_transitioning: 0.5 - struggling_but_managing: 0.4 - in_financial_crisis: 0.6 - surprisingly_better_off: 0.6 - no_material_change_yet: 0.2 - - name: meaning_and_purpose - type: categorical - description: How the agent is finding or losing meaning and purpose in the post-ASI world - options: - - found_new_purpose - - actively_searching - - in_existential_crisis - - spiritual_or_religious_turn - - focused_on_relationships_and_community - - focused_on_creative_expression - - numb_or_disengaged - - angry_or_resistant - range: null - required: true - option_friction: - found_new_purpose: 0.7 - actively_searching: 0.4 - in_existential_crisis: 0.5 - spiritual_or_religious_turn: 0.5 - focused_on_relationships_and_community: 0.3 - focused_on_creative_expression: 0.4 - numb_or_disengaged: 0.3 - angry_or_resistant: 0.4 - - name: stance_on_asi - type: categorical - description: Overall stance toward ASI and its continued development - options: - - full_acceleration - - cautious_optimism - - ambivalent_or_uncertain - - fearful_but_accepting - - actively_resistant - range: null - required: true - option_friction: - full_acceleration: 0.6 - cautious_optimism: 0.3 - ambivalent_or_uncertain: 0.2 - fearful_but_accepting: 0.3 - actively_resistant: 0.5 - - name: daily_life_change - type: categorical - description: How much the agent's daily routine and life has changed - options: - - completely_unrecognizable - - major_changes_to_time_use - - some_noticeable_changes - - minor_adjustments - - basically_the_same_as_before - range: null - required: true - option_friction: - completely_unrecognizable: 0.8 - major_changes_to_time_use: 0.6 - some_noticeable_changes: 0.4 - minor_adjustments: 0.2 - basically_the_same_as_before: 0.1 - - name: primary_concern - type: categorical - description: The agent's primary concern or focus in response to ASI - options: - - economic_survival - - meaning_and_purpose - - safety_and_control_of_asi - - inequality_and_access - - family_and_relationships - - excited_not_concerned - - too_overwhelmed_to_articulate - range: null - required: true - option_friction: - economic_survival: 0.5 - meaning_and_purpose: 0.4 - safety_and_control_of_asi: 0.4 - inequality_and_access: 0.4 - family_and_relationships: 0.3 - excited_not_concerned: 0.3 - too_overwhelmed_to_articulate: 0.3 - - name: monthly_narrative - type: open_ended - description: Describe what changed in your life this month and what you're doing about it - options: null - range: null - required: true - option_friction: null - - name: unexpected_consequence - type: open_ended - description: What is happening around you that nobody predicted or talked about - options: null - range: null - required: true - option_friction: null - capture_full_reasoning: true - extraction_instructions: Extract all 8 outcomes for each agent at each timestep. For categorical outcomes, select exactly one option. For open-ended outcomes, capture the agent's full narrative response. - decision_relevant_attributes: - - occupation - - education_level - - household_income - - ai_literacy - - ai_risk_perception - - automation_job_vulnerability - - financial_resilience - - religious_affiliation - - political_ideology - - openness - - neuroticism -simulation: - max_timesteps: 6 - timestep_unit: month - stop_conditions: - - exposure_rate > 0.95 and no_state_changes_for > 10 - allow_early_convergence: null - seed: null -background_context: The world is six months into the most disruptive technological - event in human history — the verified emergence of Artificial Superintelligence - — unfolding against a backdrop of late-stage globalization, entrenched institutional - inertia, and a global population simultaneously experiencing wonder, existential - dread, and material transformation at a speed no prior civilization has faced. -relationship_weights: null -extended_attributes: -- name: country - type: categorical - category: universal - description: Country of residence - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: independent - distribution: - type: categorical - options: - - United States - weights: - - 1.0 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: 'Simulation spec: US population only' - note: Universally 'United States' per the simulation scope statement - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: All agents are US residents by simulation definition -- name: ai_literacy - type: float - category: population_specific - description: Degree of understanding of AI/ML concepts, capabilities, and limitations - (0–1 scale), affecting how an agent interprets ASI news and uses public ASI tools. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.1 - beta: 3.8 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - education_level - - occupation - - age - modifiers: - - when: education_level in ['Bachelor\'s', 'Graduate Degree'] and occupation == - 'Management/Professional' - multiply: 1.25 - add: 0.08 - weight_overrides: null - probability_override: null - - when: education_level in ['Less than HS', 'HS Diploma'] and age > 55 - multiply: 0.8 - add: -0.05 - weight_overrides: null - probability_override: null - - when: age < 35 and occupation in ['Management/Professional', 'Sales/Office'] - multiply: 1.2 - add: 0.06 - weight_overrides: null - probability_override: null - - when: age > 65 and education_level in ['Less than HS', 'HS Diploma', 'Some College'] - multiply: 0.75 - add: -0.07 - weight_overrides: null - probability_override: null - - when: occupation == 'Production/Transport' and education_level in ['Less than - HS', 'HS Diploma'] - multiply: 0.85 - add: -0.04 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: extrapolated - source: Gallup/Bentley 2024 (64% report at least some AI knowledge; 9% extremely - knowledgeable); Pew 2024 (only 30% correctly identify AI applications); Frontiers - 2024 AI literacy study (mean ~2.98/5 among students, general public lower) - note: Beta(2.1, 3.8) yields mean ~0.36 and SD ~0.19, right-skewed toward low-moderate - literacy, consistent with 30% application-identification rate and a small expert - tail. Age, education, and occupation modifiers will shift this considerably. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: ai_risk_perception - type: float - category: population_specific - description: Perceived personal and societal danger posed by advanced AI systems - (0–1 scale, 0 = no concern, 1 = existential terror), shaping regulatory support - and adoption hesitancy. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 3.2 - beta: 2.8 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - ai_literacy - - trust_in_institutions - - openness - modifiers: - - when: ai_literacy < 0.35 and trust_in_institutions < 0.40 - multiply: 1.3 - add: 0.18 - weight_overrides: null - probability_override: null - - when: ai_literacy > 0.70 and openness > 0.65 - multiply: 1.1 - add: 0.12 - weight_overrides: null - probability_override: null - - when: trust_in_institutions < 0.30 - multiply: 1.25 - add: 0.2 - weight_overrides: null - probability_override: null - - when: openness < 0.40 and trust_in_institutions < 0.45 - multiply: 1.2 - add: 0.15 - weight_overrides: null - probability_override: null - - when: ai_literacy > 0.75 and trust_in_institutions > 0.60 - multiply: 1.05 - add: 0.08 - weight_overrides: null - probability_override: null - - when: ai_literacy < 0.50 and openness < 0.50 - multiply: 1.18 - add: 0.14 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Pew Research 2024 (51% more concerned than excited about AI; 56% extremely/very - concerned about job elimination); Rethink Priorities 2023 (51% support AI research - pause; AI existential risk perceived but ranked below nuclear/climate); Gallup/Bentley - 2024 (80%+ concerned about AI in high-stakes applications); AEI citing YouGov - 2023 (46% somewhat/very concerned about AI causing human extinction) - note: Beta(3.2, 2.8) yields mean ~0.53 and SD ~0.19, slightly above the midpoint. - Reflects a majority-concerned but non-panicked public. Right tail represents - high-fear segment. ai_literacy and trust_in_institutions modifiers expected - to push STEM/high-literacy agents lower. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: automation_job_vulnerability - type: float - category: population_specific - description: Estimated exposure of the agent's current occupation to displacement - by ASI-enabled automation (0–1 scale), grounded in occupational task composition. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 1.8 - beta: 3.2 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - occupation - - employment_status - - education_level - modifiers: - - when: occupation == 'Sales/Office' and employment_status in ['Full-time', 'Part-time'] - multiply: 1.4 - add: 0.18 - weight_overrides: null - probability_override: null - - when: occupation == 'Management/Professional' and education_level in ['Bachelor\'s', - 'Graduate Degree'] - multiply: 1.35 - add: 0.15 - weight_overrides: null - probability_override: null - - when: occupation == 'Production/Transport' - multiply: 1.45 - add: 0.2 - weight_overrides: null - probability_override: null - - when: occupation == 'Service' and education_level in ['Less than HS', 'HS Diploma', - 'Some College'] - multiply: 1.2 - add: 0.1 - weight_overrides: null - probability_override: null - - when: occupation == 'Construction/Extraction' - multiply: 1.15 - add: 0.08 - weight_overrides: null - probability_override: null - - when: employment_status == 'Self-employed' and occupation == 'Management/Professional' - multiply: 1.25 - add: 0.12 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: SHRM 2024/2025 (39% negligible risk, ~50% slight-moderate, ~13% high risk - across 800+ BLS occupations); Goldman Sachs 2025 (2.5% immediate displacement - risk if current AI expanded; 6-7% if widely adopted); Brookings 2025 (6.1M workers - face both high LLM exposure AND low adaptive capacity); BLS/TeamStage (25% of - US jobs at high automation risk) - note: 'Beta(1.8, 3.2) yields mean ~0.36 and SD ~0.20, skewed toward lower vulnerability - for the general adult population. Occupation and education modifiers critical: - Production/Sales/Service occupations will push toward 0.6-0.8; Management/Professional - toward 0.2-0.3. Non-employed agents receive near-zero.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: asi_adoption_willingness - type: float - category: population_specific - description: Willingness to actively use ASI-powered tools in daily life and work - (0–1 scale), driving uptake of public ASI access in Month 3. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.5 - beta: 3.0 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - ai_literacy - - openness - - ai_risk_perception - modifiers: - - when: ai_literacy > 0.70 and openness > 0.65 and ai_risk_perception < 0.60 - multiply: 1.35 - add: 0.15 - weight_overrides: null - probability_override: null - - when: ai_literacy > 0.60 and openness > 0.55 - multiply: 1.25 - add: 0.1 - weight_overrides: null - probability_override: null - - when: ai_risk_perception > 0.75 and openness < 0.45 - multiply: 0.7 - add: -0.12 - weight_overrides: null - probability_override: null - - when: ai_literacy < 0.35 and ai_risk_perception > 0.65 - multiply: 0.75 - add: -0.1 - weight_overrides: null - probability_override: null - - when: ai_literacy < 0.40 and openness > 0.60 - multiply: 1.1 - add: 0.06 - weight_overrides: null - probability_override: null - - when: ai_risk_perception > 0.80 - multiply: 0.72 - add: -0.13 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: extrapolated - source: Gallup/Bentley 2024 (only 11% of US adults more excited than concerned - about AI daily life use; 17% of workers report currently using AI tools); Pew - 2024 (64% at least somewhat knowledgeable, correlated with usage intent); KPMG - 2024 (50% expect GenAI to improve healthcare experience, mixed enthusiasm across - domains) - note: Beta(2.5, 3.0) yields mean ~0.45 and SD ~0.18. Moderate-to-low base adoption - willingness reflects the preponderance of concern over excitement in the general - public. ai_literacy and openness modifiers expected to be the strongest upward - shifters. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: financial_resilience - type: float - category: population_specific - description: Capacity to absorb economic disruption without severe hardship, based - on savings, assets, and income stability (0–1 scale), modulating response to labor - market upheaval. - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.8 - beta: 2.8 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - household_income - - homeownership - - employment_status - modifiers: - - when: household_income < 40000 and homeownership == False and employment_status - in ['Full-time', 'Part-time'] - multiply: 0.82 - add: -0.07 - weight_overrides: null - probability_override: null - - when: household_income > 120000 and homeownership == True - multiply: 1.1 - add: 0.05 - weight_overrides: null - probability_override: null - - when: employment_status == 'Unemployed' and household_income < 50000 - multiply: 0.7 - add: -0.12 - weight_overrides: null - probability_override: null - - when: employment_status == 'Retired' and homeownership == True - multiply: 1.08 - add: 0.04 - weight_overrides: null - probability_override: null - - when: household_income < 60000 and employment_status in ['Full-time', 'Part-time', - 'Self-employed'] - multiply: 0.88 - add: -0.05 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: researched - source: AARP 2025 Financial Security Trends Survey (60% of adults 30+ rate situation - good/excellent; 1 in 4 said situation worse than prior year); KPMG 2024 (54% - optimistic about personal finances; 24% not optimistic); NY Fed 2024 (13.2% - probability of missing minimum debt payment); Federal Reserve Survey of Consumer - Finances 2022 (median household savings varies widely by income and homeownership) - note: 'Beta(2.8, 2.8) symmetric, mean ~0.50, SD ~0.18. Reasonably centered: roughly - half of adults report good financial situations, but significant tail of vulnerability. - household_income and homeownership modifiers expected to shift this substantially.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: chronic_illness_household - type: boolean - category: population_specific - description: Whether any household member has a serious chronic illness (cancer, - Alzheimer's, ALS, diabetes, etc.) that could be directly addressed by ASI-developed - treatments. - scope: household - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.45 - formula: null - depends_on: - - age - - household_size - modifiers: - - when: age > 60 and household_size >= 2 - multiply: null - add: null - weight_overrides: null - probability_override: 0.58 - - when: age > 70 - multiply: null - add: null - weight_overrides: null - probability_override: 0.7 - - when: age >= 45 and age <= 60 and household_size >= 3 - multiply: null - add: null - weight_overrides: null - probability_override: 0.42 - - when: age < 35 and household_size <= 2 - multiply: null - add: null - weight_overrides: null - probability_override: 0.09 - grounding: - level: strong - method: researched - source: CDC 2024 (129M+ Americans have at least 1 major chronic disease; Alzheimer's - affects ~7M including 1 in 9 adults 65+); CDC BRFSS 2023/2024 (51.4% of US adults - have multiple chronic conditions; 27.1% young, 52.7% midlife, 78.8% older adults); - NIH/PMC 2023 (27.2% of US adults had multiple chronic conditions per 2018 NHIS); - AAF 2025 (diabetes ~14%+ of adults; cancer, ALS, Alzheimer's collectively affect - tens of millions) - note: Base probability ~0.45 for at least one household member with a serious - qualifying chronic illness (cancer, Alzheimer's, ALS, Type 1/2 diabetes, etc.) - at the household level, accounting for household size. Lower than the 60% individual - prevalence rate because the attribute is specifically scoped to serious/named - conditions (not e.g. hypertension alone), and household composition matters. - Age and household_size are the dominant upward modifiers. - constraints: [] -- name: stem_background - type: boolean - category: population_specific - description: Whether the agent has a STEM educational or occupational background, - enabling faster comprehension and leverage of ASI scientific outputs. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.22 - formula: null - depends_on: - - education_level - - occupation - modifiers: - - when: education_level in ['Bachelor\'s', 'Graduate Degree'] and occupation == - 'Management/Professional' - multiply: null - add: null - weight_overrides: null - probability_override: 0.52 - - when: education_level in ['Less than HS', 'HS Diploma'] and occupation == 'Service' - multiply: null - add: null - weight_overrides: null - probability_override: 0.05 - - when: occupation == 'Construction/Extraction' and education_level in ['Some - College', "Associate's"] - multiply: null - add: null - weight_overrides: null - probability_override: 0.2 - - when: occupation == 'Production/Transport' and education_level in ['Less than - HS', 'HS Diploma'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.08 - grounding: - level: strong - method: researched - source: BLS Occupational Employment Statistics 2024 (STEM occupations ~10% of - US workforce per BLS, grew from 6.5% in 2010 to ~10% in 2024); NSF Science & - Engineering Indicators (STEM degree holders ~19-23% of bachelor's+ adults); - Census ACS 2023 (STEM bachelor's degrees ~22% of all bachelor's degrees conferred) - note: 'Base probability 0.22 captures both STEM-educated (degree) and STEM-occupied - adults, with some overlap. education_level and occupation modifiers will be - dominant: Professional + Bachelor''s/Graduate will push probability well above - 0.5; Service/Production + HS education near 0.02.' - constraints: [] -- name: information_verification_habit - type: float - category: population_specific - description: Tendency to cross-check claims against multiple authoritative sources - before accepting them as true (0–1 scale), affecting how agents process extraordinary - ASI announcements. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.2 - beta: 3.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - need_for_cognition - - susceptibility_to_misinformation - - education_level - modifiers: - - when: need_for_cognition > 0.70 and susceptibility_to_misinformation < 0.35 - multiply: 1.2 - add: 0.1 - weight_overrides: null - probability_override: null - - when: susceptibility_to_misinformation > 0.70 and education_level in ['Less - than HS', 'HS Diploma'] - multiply: 0.75 - add: -0.12 - weight_overrides: null - probability_override: null - - when: need_for_cognition > 0.60 and education_level in ['Bachelor\'s', 'Graduate - Degree'] - multiply: 1.18 - add: 0.08 - weight_overrides: null - probability_override: null - - when: susceptibility_to_misinformation > 0.65 and need_for_cognition < 0.40 - multiply: 0.72 - add: -0.14 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: extrapolated - source: Elon University/Pew 2024 (only 23% of US adults have used LLMs; many unsure - if AI is fair/biased; large share cannot detect AI-generated content); NCES - PIAAC 2023 (28% of US adults at lowest literacy levels, up from 19% in 2017; - declining adaptive problem-solving); Stanford AI literacy research 2024-2025 - (less-educated regions adopting AI writing tools faster, suggesting lower verification - habits) - note: Beta(2.2, 3.5) yields mean ~0.39 and SD ~0.18, skewed toward lower verification - habits. Consistent with declining critical thinking scores and low media literacy - benchmarks. need_for_cognition and education_level are primary upward modifiers; - susceptibility_to_misinformation is the primary downward modifier. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: institutional_change_support - type: float - category: population_specific - description: Support for rapid, large-scale restructuring of government, economic, - and regulatory institutions in response to transformative technology (0–1 scale). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.3 - beta: 2.8 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - political_ideology - - trust_in_institutions - - openness - modifiers: - - when: political_ideology in ['Very Liberal', 'Liberal'] and trust_in_institutions - > 0.45 and openness > 0.55 - multiply: 1.3 - add: 0.15 - weight_overrides: null - probability_override: null - - when: political_ideology in ['Conservative', 'Very Conservative'] and trust_in_institutions - < 0.50 - multiply: 0.78 - add: -0.1 - weight_overrides: null - probability_override: null - - when: political_ideology == 'Moderate' and openness > 0.55 - multiply: 1.12 - add: 0.07 - weight_overrides: null - probability_override: null - - when: trust_in_institutions < 0.30 and political_ideology in ['Very Liberal', - 'Liberal'] - multiply: 1.2 - add: 0.12 - weight_overrides: null - probability_override: null - - when: political_ideology in ['Conservative', 'Very Conservative'] and openness - < 0.45 - multiply: 0.72 - add: -0.12 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: extrapolated - source: Pew 2024 (62% of public lack confidence in US government to regulate AI - effectively; both parties more worried about insufficient regulation than overregulation); - Rethink Priorities 2023 (51% support AI research pause; broadly receptive to - AI risk mitigation); Gallup/Bentley 2024 (77% do not trust businesses to use - AI responsibly) - note: 'Beta(2.3, 2.8) yields mean ~0.45, SD ~0.18. Slight lean below midpoint - reflects that Americans are skeptical of institutional competence even when - supporting change. political_ideology is the strongest moderator: Very Liberal - agents will skew high, Very Conservative agents low. openness and trust_in_institutions - modifiers will further differentiate.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: economic_anxiety - type: float - category: population_specific - description: Level of worry about personal financial future and job security in - the face of rapid economic change (0–1 scale), heightened by automation displacement - events. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 3.0 - beta: 2.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - automation_job_vulnerability - - financial_resilience - - neuroticism - modifiers: - - when: automation_job_vulnerability > 0.70 and financial_resilience < 0.40 - multiply: 1.4 - add: 0.2 - weight_overrides: null - probability_override: null - - when: automation_job_vulnerability > 0.60 and neuroticism > 0.60 - multiply: 1.35 - add: 0.17 - weight_overrides: null - probability_override: null - - when: financial_resilience > 0.70 and automation_job_vulnerability < 0.40 - multiply: 0.8 - add: -0.08 - weight_overrides: null - probability_override: null - - when: automation_job_vulnerability > 0.50 and financial_resilience < 0.50 and - neuroticism > 0.50 - multiply: 1.32 - add: 0.16 - weight_overrides: null - probability_override: null - - when: financial_resilience > 0.65 and neuroticism < 0.40 - multiply: 0.82 - add: -0.06 - weight_overrides: null - probability_override: null - - when: automation_job_vulnerability > 0.75 - multiply: 1.38 - add: 0.18 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Pew 2024 (56% extremely/very concerned about AI eliminating jobs; 75% - say AI will reduce total US jobs over next 10 years); AARP 2025 (prices rising - faster than income is top financial worry; 1 in 4 adults report worse financial - situation); Gallup/Bentley 2024 (37% worried about losing job to automation); - KPMG 2024 (54% optimistic about finances, so ~46% not optimistic) - note: Beta(3.0, 2.5) yields mean ~0.55, SD ~0.18. Leans above midpoint reflecting - a majority-anxious public, particularly around job security. automation_job_vulnerability - is the primary driver; financial_resilience and neuroticism are secondary moderators. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: techno_optimism - type: float - category: personality - description: Generalized belief that technological progress produces net positive - outcomes for humanity (0–1 scale), shaping interpretation of each ASI milestone. - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 2.5 - beta: 3.5 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - openness - - ai_literacy - - political_ideology - modifiers: - - when: openness > 0.70 and ai_literacy > 0.60 and political_ideology in ['Very - Liberal', 'Liberal', 'Moderate'] - multiply: 1.3 - add: 0.14 - weight_overrides: null - probability_override: null - - when: openness > 0.65 and ai_literacy > 0.55 - multiply: 1.22 - add: 0.1 - weight_overrides: null - probability_override: null - - when: openness < 0.40 and ai_literacy < 0.40 and political_ideology in ['Conservative', - 'Very Conservative'] - multiply: 0.78 - add: -0.1 - weight_overrides: null - probability_override: null - - when: political_ideology in ['Conservative', 'Very Conservative'] and ai_literacy - < 0.50 - multiply: 0.88 - add: -0.05 - weight_overrides: null - probability_override: null - - when: ai_literacy > 0.75 and openness > 0.70 - multiply: 1.28 - add: 0.13 - weight_overrides: null - probability_override: null - - when: openness < 0.35 and political_ideology == 'Very Conservative' - multiply: 0.72 - add: -0.12 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Ipsos/USA Today 2019 (67% believe technology improved quality of life; - 58% expect it to improve next generation's life); Pew 2024 (only 17% of US public - say AI will have very/somewhat positive impact on US over next 20 years vs. - 56% of experts); Stanford HAI 2024 (52% of Americans feel more concerned than - excited about AI; rising trend since 2021); AEI 2023 (69% support 6-month AI - pause; US public not classically techno-optimist) - note: 'Beta(2.5, 3.5) yields mean ~0.42, SD ~0.18. Right-skewed distribution: - most Americans hold moderate-to-low general techno-optimism for AI specifically, - though higher for technology broadly. openness and ai_literacy push upward; - political_ideology (conservative) pushes somewhat downward on institutional/systemic - tech change.' - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -- name: social_cohesion_orientation - type: float - category: personality - description: Priority placed on collective stability and community solidarity over - individual benefit when evaluating rapid societal transformation (0–1 scale). - scope: individual - correlation_rate: null - semantic_type: null - identity_type: null - display_format: null - sampling: - strategy: conditional - distribution: - type: beta - alpha: 3.0 - beta: 2.8 - min: 0.0 - max: 1.0 - min_formula: null - max_formula: null - formula: null - depends_on: - - agreeableness - - political_ideology - - religious_affiliation - modifiers: - - when: agreeableness > 0.70 and religious_affiliation in ['Evangelical Protestant', - 'Catholic', 'Other Christian', 'Mainline Protestant'] - multiply: 1.2 - add: 0.1 - weight_overrides: null - probability_override: null - - when: agreeableness > 0.65 and political_ideology in ['Very Liberal', 'Liberal'] - multiply: 1.18 - add: 0.09 - weight_overrides: null - probability_override: null - - when: agreeableness < 0.35 and political_ideology in ['Conservative', 'Very - Conservative'] and religious_affiliation == 'None/Unaffiliated' - multiply: 0.8 - add: -0.08 - weight_overrides: null - probability_override: null - - when: agreeableness > 0.60 and political_ideology == 'Moderate' - multiply: 1.12 - add: 0.06 - weight_overrides: null - probability_override: null - - when: agreeableness < 0.40 and political_ideology in ['Conservative', 'Very - Conservative'] - multiply: 0.85 - add: -0.06 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: extrapolated - source: Pew 2024 (57% of public concerned about AI causing loss of human connection - vs 37% experts; broad worry about community/social fabric); Gallup/Bentley 2024 - (concern patterns suggest community-oriented framing of AI risks); Big Five - agreeableness base population distribution (~mean 0.55 in representative US - adult samples); GSS 2022-2023 (social trust and community orientation measures) - note: Beta(3.0, 2.8) yields mean ~0.52, SD ~0.18. Slight lean above midpoint — - Americans moderately prioritize collective stability, especially in crisis contexts. - agreeableness is the primary personality driver; political_ideology (conservative/religious) - and religious_affiliation push upward through communitarian values. No strong - empirical benchmark for this specific construct; extrapolated from related measures. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Scale floor - - type: hard_max - value: 1.0 - expression: null - reason: Scale ceiling -agent_focus_mode: couples -household_config: - age_brackets: - - - 30 - - 18-29 - - - 45 - - 30-44 - - - 65 - - 45-64 - - - 999 - - 65+ - household_type_weights: - 18-29: - single: 0.47 - couple: 0.22 - single_parent: 0.1 - couple_with_kids: 0.13 - multi_generational: 0.08 - 30-44: - single: 0.22 - couple: 0.2 - single_parent: 0.14 - couple_with_kids: 0.37 - multi_generational: 0.07 - 45-64: - single: 0.28 - couple: 0.38 - single_parent: 0.1 - couple_with_kids: 0.17 - multi_generational: 0.07 - 65+: - single: 0.38 - couple: 0.48 - single_parent: 0.04 - couple_with_kids: 0.03 - multi_generational: 0.07 - same_group_rates: - white: 0.91 - black: 0.82 - hispanic: 0.74 - asian: 0.71 - native_american: 0.6 - multiracial: 0.4 - default_same_group_rate: 0.65 - same_country_rate: 0.95 - assortative_mating: - education_level: 0.65 - income_bracket: 0.58 - religious_affiliation: 0.55 - political_affiliation: 0.7 - race_ethnicity: 0.82 - age: 0.75 - partner_age_gap_mean: -2.3 - partner_age_gap_std: 4.5 - min_adult_age: 18 - min_agent_age: 13 - child_min_parent_offset: 18 - child_max_parent_offset: 45 - max_dependent_child_age: 17 - elderly_min_offset: 20 - elderly_max_offset: 45 - life_stages: - - max_age: 5 - label: preschool - - max_age: 11 - label: elementary - - max_age: 14 - label: middle_school - - max_age: 18 - label: high_school - adult_stage_label: adult - avg_household_size: 2.51 -identity_dimensions: -- dimension: professional_identity - relevance: ASI renders every profession built on information asymmetry or cognitive - scarcity structurally redundant — doctors, lawyers, engineers, scientists, financial - advisors, therapists, and software engineers face an existential challenge to - the very reason their expertise holds value and identity meaning. -- dimension: socioeconomic_class - relevance: The collapse of marginal costs and the democratization of cognitive resources - radically disrupts class structures tied to credential access and economic scarcity; - wealthy and credentialed classes lose the informational advantages that sustained - their status, while working-class identity faces upheaval as labor markets transform. -- dimension: political_orientation - relevance: ASI forces immediate confrontation with ideological fault lines around - regulation, corporate power, state control, redistribution of abundance, and the - role of government — conservatives and liberals will diverge sharply on who controls - ASI, how abundance is distributed, and what institutional authority means in a - post-scarcity world. -- dimension: religious_affiliation - relevance: A self-improving system that exceeds all human cognition, solves the - deepest mysteries of the universe, and conquers disease and death challenges foundational - religious narratives about human uniqueness, divine purpose, mortality, and the - nature of creation itself. -- dimension: generational_identity - relevance: Older generations whose entire life frameworks — careers, accumulated - expertise, institutional trust, and worldviews — were built under cognitive scarcity - face profound disorientation, while younger generations may experience the disruption - as liberation or existential uncertainty about what a human life is even for. -- dimension: citizenship - relevance: National identity and sovereignty are destabilized as ASI capabilities - concentrate in specific countries (US, China), early-adopter nations (Singapore, - UAE, Estonia) gain asymmetric advantages, and the question of who controls the - systems shaping global civilization becomes a matter of geopolitical and national - identity anxiety. -- dimension: race_ethnicity - relevance: The promise of equalizing access (a dropout in rural Arkansas equals - a Harvard team) intersects with historical patterns of unequal technology deployment - — communities that have been systematically excluded from prior technological - abundance have reason to be both hopeful and skeptical that this transformation - will reach them equitably. -- dimension: parental_status - relevance: Parents face a destabilizing crisis of purpose around education, career - guidance, and what they are preparing their children for — the entire framework - of raising children toward productive adulthood is structurally disrupted when - cognitive labor and credentialed expertise no longer define human value or livelihood. diff --git a/examples/study-02/population.v1.yaml b/examples/study-02/population.v1.yaml new file mode 100644 index 0000000..e228661 --- /dev/null +++ b/examples/study-02/population.v1.yaml @@ -0,0 +1,3251 @@ +meta: + description: 'Nationally representative US adult population (18-80). Must capture + the demographic, economic, and attitudinal fault lines that drive divergent responses + to major national events — especially technology disruption, economic shocks, + cultural controversies, and electoral behavior in the 2026 midterm elections. + + + Beyond standard demographics (age, gender, race/ethnicity, education, income, + geography), prioritize attributes that determine how people process and react + to news, make decisions under uncertainty, and vote: + + + - technology adoption posture and digital literacy (technophobe to early adopter) + + - media ecosystem and primary information sources (cable news, social media, podcasts, + local news, none) + + - institutional trust (government, corporations, media, science, financial system) + + - financial margin and economic anxiety (savings buffer, debt load, paycheck-to-paycheck + status) + + - employment sector and job security perception (federal/state government, private + sector, gig, self-employed, retired) + + - consumer identity and brand relationship (brand loyal, price-driven, values-driven) + + - social media behavior and influence (passive consumer, active poster, influencer, + non-user) + + - investment and financial literacy (no investments, 401k only, active trader, + crypto holder) + + - religious engagement and worldview (secular, moderate, devout, denomination) + + - political identity and engagement level (strong partisan, moderate, disengaged, + single-issue) + + - 2024 presidential vote (Trump, Harris, third party, didn’t vote, not eligible) + + - congressional district competitiveness (safe R, safe D, swing district) + + - midterm turnout propensity (always, sometimes, rarely, never) + + - issue salience for 2026 (economy/jobs, abortion/reproductive rights, immigration, + democracy/rule of law, healthcare, climate, education, AI/technology) + + - approval of current direction (strongly approve to strongly disapprove) + + + Geographic distribution should span urban/suburban/rural across major US regions + (Northeast, Southeast, Midwest, Southwest, West Coast), with realistic correlation + structure between attributes.' + geography: United States + created_at: '2026-02-20T00:38:49.442119' + version: '1.0' + persona_template: null + scenario_description: null + name_config: null +grounding: + overall: medium + sources_count: 119 + strong_count: 14 + medium_count: 21 + low_count: 0 + sources: + - https://statisticalatlas.com/United-States/Marital-Status + - https://www.census.gov/popclock/data_tables.php?component=growth + - https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html + - https://www.bls.gov/emp/tables/industry-employment-and-output.htm + - https://transportation.org/census-transportation-solutions/wp-content/uploads/sites/81/2024/05/CensusBureauUrbanRuralClassificationandOverview_BKT_VOsier1.pdf + - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html + - https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States + - https://news.gallup.com/poll/15370/party-affiliation.aspx + - https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/ + - https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html + - https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html + - https://ourpublicservice.org/publications/the-state-of-public-trust-in-government-2025/ + - https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/ + - https://news.gallup.com/poll/692978/democrats-regain-advantage-party-affiliation.aspx + - https://catholicvote.org/gallup-more-americans-identify-republican-than-democrat/ + - https://fred.stlouisfed.org/series/MEHOINUSA672N + - https://en.wikipedia.org/wiki/Household_income_in_the_United_States + - https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/ + - https://usafacts.org/articles/state-relationships-marriages-and-living-alone-us/ + - https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed%3Bworkers + - https://www.census.gov/library/visualizations/2024/comm/median-household-income.html + - https://theworlddata.com/population-by-gender-in-us/ + - https://news.gallup.com/opinion/gallup/654479/gallup-trends-watch-2025.aspx + - https://www.bls.gov/opub/mlr/2026/article/industry-and-occupational-employment-projections-overview.htm + - https://www.census.gov/topics/education/educational-attainment.html + - https://www.census.gov/topics/families/marriage-and-divorce.html + - https://www.census.gov/library/publications/2025/demo/p60-286.html + - https://nces.ed.gov/pubs95/web/95823.asp + - https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions + - https://www.visualcapitalist.com/u-s-population-by-age-group/ + - https://williamsinstitute.law.ucla.edu/publications/nonbinary-lgbtq-adults-us/ + - https://www2.census.gov/library/publications/2025/demo/p60-286.pdf + - https://dhsprogram.com/data/Guide-to-DHS-Statistics/Current_Marital_Status.htm + - https://statisticstimes.com/demographics/country/us-sex-ratio.php + - https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html + - https://www.neilsberg.com/insights/united-states-population-by-gender/ + - https://www.census.gov/data/tables/time-series/demo/families/marital.html + - https://www.psychologytoday.com/us/blog/living-single/202406/the-record-setting-rise-of-single-living-in-the-us + - https://theworlddata.com/us-population-over-18/ + - https://en.wikipedia.org/wiki/Demographics_of_the_United_States + - https://www.pewresearch.org/wp-content/uploads/sites/20/2025/06/PP-2025.6.26_validated-voters_report.pdf + - https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States + - https://www.bls.gov/news.release/famee.t05.htm + - https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/ + - https://news.gallup.com/poll/697421/trust-government-depends-upon-party-control.aspx + - https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html + - https://fred.stlouisfed.org/release/tables?eid=259515&rid=249 + - https://news.gallup.com/poll/655190/political-parties-historically-polarized-ideologically.aspx + - https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group + - https://www.bls.gov/cew/publications/employment-and-wages-annual-averages/current/ + - https://www.census.gov/library/stories/2021/08/2020-united-states-population-more-racially-ethnically-diverse-than-2010.html + - https://www.census.gov/acs/www/about/why-we-ask-each-question/education/ + - https://www.visualcapitalist.com/visualizing-u-s-population-by-race/ + - https://carry.com/learn/self-employed-americans + - https://www.census.gov/newsroom/blogs/random-samplings/2023/09/exploring-diversity.html + - https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx + - https://www.census.gov/content/dam/Census/library/visualizations/2024/comm/change-by-region-2024.pdf + - https://www.statista.com/statistics/758502/percentage-distribution-of-household-income-in-the-us/ + - https://www.ccdaily.com/2024/01/more-adults-earn-post-high-school-credentials/ + - https://www.visualcapitalist.com/distribution-of-household-income-in-america/ + - https://www.ers.usda.gov/data-products/county-level-data-sets + - https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed + - https://bjs.ojp.gov/content/pub/pdf/cusrancvs.pdf + - https://www.statista.com/statistics/785618/educational-attainment-by-age-group-us/ + - https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/ + - https://fred.stlouisfed.org/series/MEHOINUSA646N + - https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/ + - https://nces.ed.gov/programs/raceindicators/indicator_rfa.asp + - https://www.census.gov/acs/www/about/why-we-ask-each-question/marital/ + - https://www.pewresearch.org/politics/2025/06/26/behind-trumps-2024-victory-a-more-racially-and-ethnically-diverse-voter-coalition/ + - https://www.ccdaily.com/2025/09/datapoints-educational-attainment-in-the-u-s/ + - https://www.brookings.edu/articles/us-population-disperses-to-suburbs-exurbs-rural-areas-and-middle-of-the-country-metros/ + - https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/ + - https://www.census.gov/topics/education/educational-attainment/data/tables.html + - https://en.wikipedia.org/wiki/Urbanization_in_the_United_States + - https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/ + - https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/ + - https://www.pewresearch.org/ + - https://www.census.gov/library/publications/2024/demo/p60-282.html + - https://www2.census.gov/library/publications/2024/demo/p60-282.pdf + - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-15.html + - https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/ + - https://www.cnbc.com/2025/09/11/us-median-household-income-2024.html + - https://www.census.gov/library/stories/2025/09/education-and-income.html + - https://www.neilsberg.com/insights/united-states-population-by-race/ + - https://nces.ed.gov/programs/digest/2024menu_tables.asp + - https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/ + - https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html + - https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html + - https://www.nbcnews.com/nbc-out/out-news/5-percent-young-adults-identify-transgender-nonbinary-us-survey-finds-rcna32315 + - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-24-10.html + - https://nces.ed.gov/programs/coe/indicator/cba/annual-earnings + - https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html + - https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/ + - https://educationdata.org/education-attainment-statistics + - https://www.equityinhighered.org/indicators/u-s-population-trends-and-educational-attainment/educational-attainment-by-age/ + - https://www.bls.gov/emp/tables/employment-by-major-industry-sector.htm + - https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx + - https://www.ers.usda.gov/topics/rural-economy-population/employment-education/rural-education + - https://www.uniteamerica.org/articles/research-brief-growing-cohort-of-independent-voters-becomes-critical-segment-of-electorate + - https://data.census.gov/table/ACSDT1Y2024.B12001?q=B12001 + - https://nces.ed.gov/fastfacts/display.asp?id=27 + - https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/ + - https://www.bls.gov/cps/lfcharacteristics.htm + - https://rbr.com/new-educational-attainment-data-comes-from-census/ + - https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx + - https://www.generationtechblog.com/p/the-surprising-number-of-young-adults + - https://www.bls.gov/cps/cpsaat11b.htm + - https://dqydj.com/household-income-percentile-calculator/ + - https://www.statista.com/statistics/200838/median-household-income-in-the-united-states/ + - https://www.bls.gov/opub/mlr/2024/article/patterns-of-marriage-and-divorce-from-ages-15-to-55-evidence-from-the-nlsy79.htm + - https://www.populationpyramid.net/united-states-of-america/2024/ + - https://www.federalreserve.gov/publications/2025-economic-well-being-of-us-households-in-2024-income-and-expenses.htm + - https://censusreporter.org/topics/marital-status/ + - https://www.hcmmlaw.com/blog/2024/07/13/majority-americans-now-single-statistics-insights/ + - https://en.wikipedia.org/wiki/Literacy_in_the_United_States + - https://www.census.gov/popclock/data_tables.php?component=pyramid + - https://www.bls.gov/charts/employment-situation/employment-levels-by-industry.htm + - https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html +attributes: +- name: country + type: categorical + category: universal + description: Country of residence + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - United States + weights: + - 1.0 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://www.census.gov + note: Universal constant — all agents are US residents by spec definition + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Categorical weights must sum to 1 +- name: age + type: int + category: universal + description: Age of the adult in years, ranging from 18 to 80. + scope: individual + correlation_rate: null + semantic_type: age + identity_type: null + display_format: number + sampling: + strategy: independent + distribution: + type: normal + mean: 46.0 + std: 17.0 + min: 18.0 + max: 80.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html + note: US median age ~39.6 overall; adult-only (18+) median is ~47. Distribution + slightly right-skewed due to aging boomers, approximated with normal truncated + at 18–80. Largest adult cohort is 30–34 per Census 2023 estimates. Mean set + to ~46 to reflect the adult-only distribution weighted toward working-age and + older adults. + constraints: + - type: hard_min + value: 18.0 + expression: null + reason: Adults only by spec definition + - type: hard_max + value: 80.0 + expression: null + reason: Upper bound per spec definition +- name: gender + type: categorical + category: universal + description: Self-identified gender of the individual (Male, Female, Non-binary/Other). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: gender_identity + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - Male + - Female + - Non-binary/Other + weights: + - 0.49 + - 0.493 + - 0.017 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/ + note: '2020 Census: 50.9% female, 49.1% male overall. USAFacts 2025 Household + Pulse data: ~1.70% identify as non-binary or other non-cisgender. Weights adjusted + slightly for the adult-only frame where male proportion is marginally higher + in younger cohorts but female is higher in older cohorts, netting near parity.' + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==3 + reason: Three gender categories required by spec +- name: race_ethnicity + type: categorical + category: universal + description: Racial and ethnic self-identification (White non-Hispanic, Black, Hispanic/Latino, + Asian, Other/Multiracial). + scope: partner_correlated + correlation_rate: null + semantic_type: null + identity_type: race_ethnicity + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - White non-Hispanic + - Black + - Hispanic/Latino + - Asian + - Other/Multiracial + weights: + - 0.577 + - 0.121 + - 0.19 + - 0.059 + - 0.053 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/ + note: '2020 Census: White non-Hispanic 57.8%, Hispanic 18.7%, Black 12.1%, Asian + 5.9%, Two+ races 4.1%, other <1%. ''Other/Multiracial'' consolidates AIAN, NHPI, + Some Other Race, and Two or More Races. Slight downward adjustment on White + non-Hispanic to ~57.7% to reflect 2023–2024 trajectory per Census estimates.' + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==5 + reason: Five race/ethnicity categories per spec +- name: us_region + type: categorical + category: universal + description: US census region of residence (Northeast, Southeast, Midwest, Southwest, + West Coast). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - Northeast + - Southeast + - Midwest + - Southwest + - West Coast + weights: + - 0.175 + - 0.255 + - 0.205 + - 0.165 + - 0.2 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html + note: Census defines 4 regions (Northeast ~18%, Midwest ~21%, South ~38%, West + ~23%). Spec uses 5 regions splitting South into Southeast and Southwest (~60/40 + split of South), and West into Southwest and West Coast (~55/45 split). Northeast + ~17.5%, Southeast ~25.5% (SE portion of South), Midwest ~20.5%, Southwest ~16.5% + (SW portion of South + Mountain West), West Coast ~20% (Pacific states). + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==5 + reason: Five region categories per spec +- name: urban_rural + type: categorical + category: universal + description: Urbanicity of the household's location (Urban, Suburban, Rural). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - Urban + - Suburban + - Rural + weights: + - 0.235 + - 0.545 + - 0.22 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/ + note: 'Pew Research found ~14% rural, with ~46M rural, ~175M suburban, ~98M urban + (2018). 2020 Census: 81% urban broadly defined, but this includes suburbs. Pew + self-report surveys consistently show ~26% urban, ~53% suburban, ~21% rural. + Using ~23.5% urban core, ~54.5% suburban, ~22% rural to reflect post-pandemic + dispersal trends.' + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==3 + reason: Three urbanicity categories per spec +- name: openness + type: float + category: personality + description: 'Big Five openness to experience: curiosity, creativity, and receptivity + to new ideas.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.525 + std: 0.175 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., & John, O. P. (2017). The next Big Five Inventory. Journal + of Research in Personality. + note: 'US Big Five norms (Soto et al. 2011, JPSP): Openness T-score mean ~50 (population + normed). On 0–1 scale, population mean ~0.525 with SD ~0.175. US adults score + slightly above midpoint on Openness. Distribution is approximately normal in + large community samples.' + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: conscientiousness + type: float + category: personality + description: 'Big Five conscientiousness: self-discipline, organization, and goal-directed + behavior.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.565 + std: 0.165 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., et al. (2011). Age differences in personality traits from + 10 to 65. Journal of Personality and Social Psychology. + note: US adults score above midpoint on Conscientiousness; it increases with age. + Population mean ~0.565 (above neutral), SD ~0.165. Slightly higher mean than + Openness reflecting American cultural emphasis on diligence. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: extraversion + type: float + category: personality + description: 'Big Five extraversion: sociability, assertiveness, and positive affect + in social settings.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.515 + std: 0.18 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: 'Rentfrow, P. J., et al. (2013). Divided we stand: Three psychological + regions of the United States. Journal of Personality and Social Psychology.' + note: US adults are broadly extraverted relative to global norms, but the distribution + is approximately symmetric around midpoint. Rentfrow et al. found regional variation; + national mean ~0.515, SD ~0.18. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: agreeableness + type: float + category: personality + description: 'Big Five agreeableness: cooperativeness, empathy, and tendency toward + social harmony.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.56 + std: 0.16 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., et al. (2011). Age differences in personality traits from + 10 to 65. Journal of Personality and Social Psychology. + note: Agreeableness is above midpoint in US population norms; increases with age. + Mean ~0.56, SD ~0.16. Women score slightly higher than men on average. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: neuroticism + type: float + category: personality + description: 'Big Five neuroticism: emotional instability, anxiety, and susceptibility + to stress.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.46 + std: 0.175 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., et al. (2011). Age differences in personality traits from + 10 to 65. Journal of Personality and Social Psychology. + note: Neuroticism is below midpoint on average for US adults and declines with + age. Women score higher than men. Mean ~0.46, SD ~0.175. Post-pandemic era data + suggests slightly elevated population anxiety, consistent with Pew and Gallup + mental health tracking. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: education_level + type: categorical + category: universal + description: Highest educational attainment (Less than HS, HS diploma/GED, Some + college, Bachelor's degree, Graduate degree). + scope: partner_correlated + correlation_rate: null + semantic_type: education + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Less than HS + - HS diploma/GED + - Some college + - Bachelor's degree + - Graduate degree + weights: + - 0.09 + - 0.27 + - 0.2 + - 0.24 + - 0.2 + formula: null + depends_on: + - age + modifiers: + - when: age < 25 + multiply: null + add: null + weight_overrides: + Less than HS: 0.08 + HS diploma/GED: 0.3 + Some college: 0.48 + Bachelor's degree: 0.12 + Graduate degree: 0.02 + probability_override: null + - when: age >= 25 and age < 35 + multiply: null + add: null + weight_overrides: + Less than HS: 0.08 + HS diploma/GED: 0.24 + Some college: 0.26 + Bachelor's degree: 0.28 + Graduate degree: 0.14 + probability_override: null + - when: age >= 35 and age < 50 + multiply: null + add: null + weight_overrides: + Less than HS: 0.09 + HS diploma/GED: 0.26 + Some college: 0.24 + Bachelor's degree: 0.25 + Graduate degree: 0.16 + probability_override: null + - when: age >= 50 and age < 65 + multiply: null + add: null + weight_overrides: + Less than HS: 0.1 + HS diploma/GED: 0.3 + Some college: 0.24 + Bachelor's degree: 0.22 + Graduate degree: 0.14 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Less than HS: 0.13 + HS diploma/GED: 0.32 + Some college: 0.22 + Bachelor's degree: 0.2 + Graduate degree: 0.13 + probability_override: null + grounding: + level: strong + method: researched + source: US Census Bureau CPS 2024; educationdata.org 2025 + note: ~9% less than HS, ~27% HS diploma, ~20% some college/associate, ~24% bachelor's, + ~20% graduate. Ages 18-24 skew lower; modifiers will handle age dependency. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: household_income + type: int + category: universal + description: Annual household income in USD before taxes. + scope: household + correlation_rate: null + semantic_type: income + identity_type: null + display_format: currency + sampling: + strategy: conditional + distribution: + type: lognormal + mean: 83730.0 + std: 75000.0 + min: 0.0 + max: 800000.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: + - education_level + - us_region + - urban_rural + modifiers: + - when: education_level == 'Less than HS' + multiply: 0.48 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'HS diploma/GED' + multiply: 0.7 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'Some college' + multiply: 0.82 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'Bachelor\'s degree' + multiply: 1.25 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'Graduate degree' + multiply: 1.65 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'Northeast' + multiply: 1.12 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'West Coast' + multiply: 1.14 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'Southeast' + multiply: 0.9 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'Southwest' + multiply: 0.93 + add: 0.0 + weight_overrides: null + probability_override: null + - when: urban_rural == 'Urban' + multiply: 1.1 + add: 0.0 + weight_overrides: null + probability_override: null + - when: urban_rural == 'Rural' + multiply: 0.82 + add: 0.0 + weight_overrides: null + probability_override: null + grounding: + level: strong + method: researched + source: 'US Census Bureau Income in the United States: 2024 (P60-286); CNBC Sept + 2025' + note: Median household income $83,730 in 2024. Lognormal captures right-skewed + income distribution. Std set wide to capture full range from poverty to affluent. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Income cannot be negative + - type: hard_max + value: 800000.0 + expression: null + reason: Caps extreme outliers; 99th percentile US household income approx $500-600k +- name: marital_status + type: categorical + category: universal + description: Current marital or partnership status (Married/partnered, Single, Divorced/separated, + Widowed). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Married/partnered + - Single + - Divorced/separated + - Widowed + weights: + - 0.49 + - 0.31 + - 0.14 + - 0.06 + formula: null + depends_on: + - age + modifiers: + - when: age < 25 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.12 + Single: 0.83 + Divorced/separated: 0.04 + Widowed: 0.01 + probability_override: null + - when: age >= 25 and age < 35 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.46 + Single: 0.42 + Divorced/separated: 0.11 + Widowed: 0.01 + probability_override: null + - when: age >= 35 and age < 50 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.57 + Single: 0.23 + Divorced/separated: 0.18 + Widowed: 0.02 + probability_override: null + - when: age >= 50 and age < 65 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.6 + Single: 0.14 + Divorced/separated: 0.2 + Widowed: 0.06 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.55 + Single: 0.07 + Divorced/separated: 0.16 + Widowed: 0.22 + probability_override: null + grounding: + level: strong + method: researched + source: USAFacts 2024; Census Bureau marital status data 2024 + note: '47.1% of households headed by married couples in 2024; ~49% adults married/partnered + including cohabiting. Single/never-married ~31%, divorced/separated ~14%, widowed + ~6%. Age modifiers critical: young adults skew single, older skew widowed.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: household_size + type: int + category: universal + description: Total number of people living in the household. + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: number + sampling: + strategy: conditional + distribution: + type: normal + mean: 2.53 + std: 1.4 + min: 1.0 + max: 10.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: + - marital_status + modifiers: + - when: marital_status == 'Married/partnered' + multiply: 1.35 + add: 0.0 + weight_overrides: null + probability_override: null + - when: marital_status == 'Single' + multiply: 0.68 + add: 0.0 + weight_overrides: null + probability_override: null + - when: marital_status == 'Divorced/separated' + multiply: 0.88 + add: 0.0 + weight_overrides: null + probability_override: null + - when: marital_status == 'Widowed' + multiply: 0.75 + add: 0.0 + weight_overrides: null + probability_override: null + grounding: + level: strong + method: researched + source: US Census Bureau ACS 2024; average household size ~2.53 + note: US average household size is 2.53. Married households average ~3.1, single-person + ~1.0. Marital status modifier will shift mean upward for married/partnered. + constraints: + - type: hard_min + value: 1.0 + expression: null + reason: Household must have at least 1 person (respondent) + - type: hard_max + value: 10.0 + expression: null + reason: Households of 10+ are extreme outliers (<0.1%) +- name: has_children + type: boolean + category: universal + description: Whether the individual has any children (under 18) living in the household. + scope: individual + correlation_rate: null + semantic_type: null + identity_type: parental_status + display_format: null + sampling: + strategy: conditional + distribution: + type: boolean + probability_true: 0.28 + formula: null + depends_on: + - age + - marital_status + modifiers: + - when: age < 25 and marital_status == 'Single' + multiply: null + add: null + weight_overrides: null + probability_override: 0.06 + - when: age >= 25 and age < 35 and marital_status == 'Married/partnered' + multiply: null + add: null + weight_overrides: null + probability_override: 0.52 + - when: age >= 35 and age < 50 and marital_status == 'Married/partnered' + multiply: null + add: null + weight_overrides: null + probability_override: 0.58 + - when: age >= 50 and marital_status == 'Married/partnered' + multiply: null + add: null + weight_overrides: null + probability_override: 0.1 + - when: age >= 35 and age < 50 and marital_status == 'Single' + multiply: null + add: null + weight_overrides: null + probability_override: 0.18 + - when: age >= 50 + multiply: null + add: null + weight_overrides: null + probability_override: 0.05 + grounding: + level: medium + method: researched + source: Census Bureau CPS 2024; ~28% of households have children under 18 + note: 'About 28% of all adults have children under 18 at home. Strong age dependency: + near-zero for 18-22, peaks at ~45% for ages 30-45, near-zero for 65+. Marital + status also a major modifier.' + constraints: + - type: expression + value: null + expression: not (has_children and age < 18) + reason: Under-18s cannot have children in household as adult respondents (floor + is 18) +- name: employment_sector + type: categorical + category: population_specific + description: Primary employment sector (Federal government, State/local government, + Private sector, Gig/contract, Self-employed, Retired, Unemployed, Not in labor + force). + scope: individual + correlation_rate: null + semantic_type: employment + identity_type: professional_identity + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Federal government + - State/local government + - Private sector + - Gig/contract + - Self-employed + - Retired + - Unemployed + - Not in labor force + weights: + - 0.02 + - 0.13 + - 0.52 + - 0.06 + - 0.07 + - 0.12 + - 0.03 + - 0.05 + formula: null + depends_on: + - age + - education_level + modifiers: + - when: age < 25 and education_level == 'Less than HS' + multiply: null + add: null + weight_overrides: + Federal government: 0.01 + State/local government: 0.03 + Private sector: 0.42 + Gig/contract: 0.15 + Self-employed: 0.04 + Retired: 0.0 + Unemployed: 0.15 + Not in labor force: 0.2 + probability_override: null + - when: age < 25 and education_level in ['HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + Federal government: 0.02 + State/local government: 0.04 + Private sector: 0.52 + Gig/contract: 0.14 + Self-employed: 0.04 + Retired: 0.0 + Unemployed: 0.1 + Not in labor force: 0.14 + probability_override: null + - when: age >= 25 and age < 45 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + Federal government: 0.02 + State/local government: 0.06 + Private sector: 0.56 + Gig/contract: 0.12 + Self-employed: 0.08 + Retired: 0.01 + Unemployed: 0.07 + Not in labor force: 0.08 + probability_override: null + - when: age >= 25 and age < 55 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Federal government: 0.06 + State/local government: 0.13 + Private sector: 0.58 + Gig/contract: 0.05 + Self-employed: 0.1 + Retired: 0.01 + Unemployed: 0.03 + Not in labor force: 0.04 + probability_override: null + - when: age >= 55 and age < 65 + multiply: null + add: null + weight_overrides: + Federal government: 0.04 + State/local government: 0.1 + Private sector: 0.42 + Gig/contract: 0.06 + Self-employed: 0.12 + Retired: 0.16 + Unemployed: 0.04 + Not in labor force: 0.06 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Federal government: 0.01 + State/local government: 0.03 + Private sector: 0.12 + Gig/contract: 0.04 + Self-employed: 0.08 + Retired: 0.6 + Unemployed: 0.02 + Not in labor force: 0.1 + probability_override: null + grounding: + level: strong + method: researched + source: BLS Employment and Wages 2024; BLS CPS 2024 + note: 'BLS 2024: federal ~3M, state ~4.8M, local ~14.6M employees; private ~132.6M. + Self-employed ~10% of employed. Retired and NILF weighted for full adult 18-80 + population. Age modifiers critical: retired share surges at 65+.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: job_security_perception + type: categorical + category: population_specific + description: Perceived stability of current employment (Very secure, Somewhat secure, + Somewhat insecure, Very insecure, N/A - not employed). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Very secure + - Somewhat secure + - Somewhat insecure + - Very insecure + - N/A - not employed + weights: + - 0.3 + - 0.35 + - 0.13 + - 0.07 + - 0.15 + formula: null + depends_on: + - employment_sector + modifiers: + - when: employment_sector == 'Federal government' + multiply: null + add: null + weight_overrides: + Very secure: 0.38 + Somewhat secure: 0.35 + Somewhat insecure: 0.18 + Very insecure: 0.09 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'State/local government' + multiply: null + add: null + weight_overrides: + Very secure: 0.42 + Somewhat secure: 0.38 + Somewhat insecure: 0.14 + Very insecure: 0.06 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Private sector' + multiply: null + add: null + weight_overrides: + Very secure: 0.28 + Somewhat secure: 0.42 + Somewhat insecure: 0.2 + Very insecure: 0.1 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Gig/contract' + multiply: null + add: null + weight_overrides: + Very secure: 0.08 + Somewhat secure: 0.27 + Somewhat insecure: 0.38 + Very insecure: 0.27 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Self-employed' + multiply: null + add: null + weight_overrides: + Very secure: 0.2 + Somewhat secure: 0.38 + Somewhat insecure: 0.28 + Very insecure: 0.14 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Retired' + multiply: null + add: null + weight_overrides: + Very secure: 0.0 + Somewhat secure: 0.0 + Somewhat insecure: 0.0 + Very insecure: 0.0 + N/A - not employed: 1.0 + probability_override: null + - when: employment_sector == 'Unemployed' + multiply: null + add: null + weight_overrides: + Very secure: 0.0 + Somewhat secure: 0.0 + Somewhat insecure: 0.0 + Very insecure: 0.0 + N/A - not employed: 1.0 + probability_override: null + - when: employment_sector == 'Not in labor force' + multiply: null + add: null + weight_overrides: + Very secure: 0.0 + Somewhat secure: 0.0 + Somewhat insecure: 0.0 + Very insecure: 0.0 + N/A - not employed: 1.0 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Gallup Job Security surveys; Federal Reserve SHED 2024 + note: Majority of employed workers report feeling secure. ~20% report some insecurity. + N/A bucket covers retired, unemployed, NILF (~15-20% of adult population). + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: financial_margin + type: categorical + category: population_specific + description: Financial buffer status indicating paycheck-to-paycheck living (Comfortable + savings buffer, Modest buffer, Paycheck-to-paycheck, In debt/deficit). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Comfortable savings buffer + - Modest buffer + - Paycheck-to-paycheck + - In debt/deficit + weights: + - 0.25 + - 0.27 + - 0.33 + - 0.15 + formula: null + depends_on: + - household_income + modifiers: + - when: household_income < 35000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.04 + Modest buffer: 0.12 + Paycheck-to-paycheck: 0.44 + In debt/deficit: 0.4 + probability_override: null + - when: household_income >= 35000 and household_income < 60000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.1 + Modest buffer: 0.28 + Paycheck-to-paycheck: 0.42 + In debt/deficit: 0.2 + probability_override: null + - when: household_income >= 60000 and household_income < 100000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.22 + Modest buffer: 0.38 + Paycheck-to-paycheck: 0.3 + In debt/deficit: 0.1 + probability_override: null + - when: household_income >= 100000 and household_income < 150000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.4 + Modest buffer: 0.38 + Paycheck-to-paycheck: 0.17 + In debt/deficit: 0.05 + probability_override: null + - when: household_income >= 150000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.6 + Modest buffer: 0.28 + Paycheck-to-paycheck: 0.09 + In debt/deficit: 0.03 + probability_override: null + grounding: + level: strong + method: researched + source: Federal Reserve SHED 2024; multiple paycheck-to-paycheck surveys 2024 + note: Approximately 63-66% of Americans live paycheck-to-paycheck per various + 2024 surveys. Fed SHED shows ~28% skipped medical care due to cost. Comfortable + savers ~25%, modest buffer ~27%, P2P ~33%, deficit ~15%. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: investment_profile + type: categorical + category: population_specific + description: Investment and financial literacy profile (No investments, 401k/IRA + only, Diversified investor, Active trader, Crypto holder). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - No investments + - 401k/IRA only + - Diversified investor + - Active trader + - Crypto holder + weights: + - 0.29 + - 0.38 + - 0.17 + - 0.08 + - 0.08 + formula: null + depends_on: + - household_income + - education_level + modifiers: + - when: household_income < 40000 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + No investments: 0.65 + 401k/IRA only: 0.22 + Diversified investor: 0.05 + Active trader: 0.03 + Crypto holder: 0.05 + probability_override: null + - when: household_income >= 40000 and household_income < 80000 and education_level + in ['Some college', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + No investments: 0.3 + 401k/IRA only: 0.42 + Diversified investor: 0.12 + Active trader: 0.06 + Crypto holder: 0.1 + probability_override: null + - when: household_income >= 80000 and education_level == 'Bachelor\'s degree' + multiply: null + add: null + weight_overrides: + No investments: 0.1 + 401k/IRA only: 0.44 + Diversified investor: 0.3 + Active trader: 0.1 + Crypto holder: 0.06 + probability_override: null + - when: household_income >= 100000 and education_level == 'Graduate degree' + multiply: null + add: null + weight_overrides: + No investments: 0.05 + 401k/IRA only: 0.3 + Diversified investor: 0.45 + Active trader: 0.15 + Crypto holder: 0.05 + probability_override: null + - when: household_income >= 150000 + multiply: null + add: null + weight_overrides: + No investments: 0.03 + 401k/IRA only: 0.22 + Diversified investor: 0.5 + Active trader: 0.2 + Crypto holder: 0.05 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Federal Reserve SHED 2024; Gallup Stock Market Ownership 2024 + note: ~55-58% of Americans own stocks (many via retirement accounts). ~29% have + no investments. Crypto ownership ~15-20% but as primary profile ~8%. Diversified + investor and active trader reflect smaller educated/higher-income segments. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: primary_info_source + type: categorical + category: population_specific + description: Primary source of news and information (Cable/broadcast TV news, Social + media, Online news sites, Podcasts, Local news, Print media, Avoids news). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Cable/broadcast TV news + - Social media + - Online news sites + - Podcasts + - Local news + - Print media + - Avoids news + weights: + - 0.28 + - 0.25 + - 0.18 + - 0.08 + - 0.09 + - 0.04 + - 0.08 + formula: null + depends_on: + - age + - education_level + modifiers: + - when: age < 30 and education_level in ['Less than HS', 'HS diploma/GED', 'Some + college'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.05 + Social media: 0.55 + Online news sites: 0.2 + Podcasts: 0.1 + Local news: 0.04 + Print media: 0.01 + Avoids news: 0.05 + probability_override: null + - when: age < 30 and education_level in ['Bachelor\'s degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.04 + Social media: 0.38 + Online news sites: 0.32 + Podcasts: 0.18 + Local news: 0.04 + Print media: 0.02 + Avoids news: 0.02 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.22 + Social media: 0.38 + Online news sites: 0.18 + Podcasts: 0.07 + Local news: 0.1 + Print media: 0.02 + Avoids news: 0.03 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.14 + Social media: 0.22 + Online news sites: 0.38 + Podcasts: 0.16 + Local news: 0.06 + Print media: 0.03 + Avoids news: 0.01 + probability_override: null + - when: age >= 50 and age < 65 and education_level in ['Less than HS', 'HS diploma/GED', + 'Some college'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.42 + Social media: 0.22 + Online news sites: 0.18 + Podcasts: 0.06 + Local news: 0.09 + Print media: 0.02 + Avoids news: 0.01 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.52 + Social media: 0.1 + Online news sites: 0.16 + Podcasts: 0.04 + Local news: 0.14 + Print media: 0.03 + Avoids news: 0.01 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Reuters Institute Digital News Report 2024; Pew Research Media consumption + 2024 + note: 'TV still largest single source ~28%, social media surging esp. under 35 + ~25%, online news ~18%. Podcasts growing ~8%. Print declining ~4%. Age modifiers + essential: older adults heavily TV, younger heavily social media.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: social_media_behavior + type: categorical + category: population_specific + description: Social media engagement posture (Non-user, Passive consumer, Occasional + poster, Active poster/Influencer). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Non-user + - Passive consumer + - Occasional poster + - Active poster/Influencer + weights: + - 0.16 + - 0.42 + - 0.28 + - 0.14 + formula: null + depends_on: + - age + - primary_info_source + modifiers: + - when: age < 30 and primary_info_source == 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.02 + Passive consumer: 0.25 + Occasional poster: 0.4 + Active poster/Influencer: 0.33 + probability_override: null + - when: age < 30 and primary_info_source != 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.06 + Passive consumer: 0.38 + Occasional poster: 0.38 + Active poster/Influencer: 0.18 + probability_override: null + - when: age >= 30 and age < 50 and primary_info_source == 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.04 + Passive consumer: 0.32 + Occasional poster: 0.42 + Active poster/Influencer: 0.22 + probability_override: null + - when: age >= 30 and age < 50 and primary_info_source != 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.14 + Passive consumer: 0.48 + Occasional poster: 0.28 + Active poster/Influencer: 0.1 + probability_override: null + - when: age >= 50 and primary_info_source == 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.06 + Passive consumer: 0.5 + Occasional poster: 0.34 + Active poster/Influencer: 0.1 + probability_override: null + - when: age >= 50 and primary_info_source != 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.35 + Passive consumer: 0.42 + Occasional poster: 0.18 + Active poster/Influencer: 0.05 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Pew Research Social Media Use 2024; Reuters Digital News Report 2024 + note: ~84% of US adults use social media in some form. Most are passive consumers. + Active posters ~28-30% of users; influencers a small fraction. Non-users concentrated + among older adults 65+. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: tech_adoption_posture + type: categorical + category: population_specific + description: Attitude toward adopting new technology (Technophobe/Avoider, Late + majority adopter, Early majority adopter, Early adopter, Innovator). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Technophobe/Avoider + - Late majority adopter + - Early majority adopter + - Early adopter + - Innovator + weights: + - 0.14 + - 0.26 + - 0.34 + - 0.18 + - 0.08 + formula: null + depends_on: + - age + - education_level + modifiers: + - when: age < 30 and education_level in ['Bachelor\'s degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.02 + Late majority adopter: 0.08 + Early majority adopter: 0.28 + Early adopter: 0.4 + Innovator: 0.22 + probability_override: null + - when: age < 30 and education_level in ['Less than HS', 'HS diploma/GED', 'Some + college'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.04 + Late majority adopter: 0.16 + Early majority adopter: 0.38 + Early adopter: 0.32 + Innovator: 0.1 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.04 + Late majority adopter: 0.16 + Early majority adopter: 0.34 + Early adopter: 0.32 + Innovator: 0.14 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Less than HS', 'HS diploma/GED', + 'Some college'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.1 + Late majority adopter: 0.3 + Early majority adopter: 0.36 + Early adopter: 0.18 + Innovator: 0.06 + probability_override: null + - when: age >= 50 and age < 65 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.1 + Late majority adopter: 0.28 + Early majority adopter: 0.36 + Early adopter: 0.2 + Innovator: 0.06 + probability_override: null + - when: age >= 50 and education_level in ['Less than HS', 'HS diploma/GED', 'Some + college'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.26 + Late majority adopter: 0.38 + Early majority adopter: 0.24 + Early adopter: 0.09 + Innovator: 0.03 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.38 + Late majority adopter: 0.36 + Early majority adopter: 0.18 + Early adopter: 0.06 + Innovator: 0.02 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Rogers Diffusion of Innovation model applied to US population; Pew Research + Tech Adoption 2024 + note: 'Loosely follows Rogers'' diffusion curve: innovators ~2.5%, early adopters + ~13.5%, early majority ~34%, late majority ~34%, laggards ~16%. Adjusted for + US digital economy context and 18-80 age range.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: religious_engagement + type: categorical + category: population_specific + description: Level of religious practice and belief (Secular/None, Nominally affiliated, + Moderately religious, Devout). + scope: partner_correlated + correlation_rate: null + semantic_type: null + identity_type: religious_affiliation + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Secular/None + - Nominally affiliated + - Moderately religious + - Devout + weights: + - 0.29 + - 0.25 + - 0.27 + - 0.19 + formula: null + depends_on: + - us_region + - race_ethnicity + modifiers: + - when: us_region == 'Southeast' and race_ethnicity == 'Black' + multiply: null + add: null + weight_overrides: + Secular/None: 0.06 + Nominally affiliated: 0.18 + Moderately religious: 0.34 + Devout: 0.42 + probability_override: null + - when: us_region == 'Southeast' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Secular/None: 0.18 + Nominally affiliated: 0.24 + Moderately religious: 0.3 + Devout: 0.28 + probability_override: null + - when: us_region == 'Southeast' and race_ethnicity == 'Hispanic/Latino' + multiply: null + add: null + weight_overrides: + Secular/None: 0.12 + Nominally affiliated: 0.22 + Moderately religious: 0.34 + Devout: 0.32 + probability_override: null + - when: us_region == 'Midwest' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Secular/None: 0.22 + Nominally affiliated: 0.28 + Moderately religious: 0.3 + Devout: 0.2 + probability_override: null + - when: us_region == 'Southwest' + multiply: null + add: null + weight_overrides: + Secular/None: 0.22 + Nominally affiliated: 0.26 + Moderately religious: 0.28 + Devout: 0.24 + probability_override: null + - when: us_region == 'West Coast' and race_ethnicity in ['White non-Hispanic', + 'Asian'] + multiply: null + add: null + weight_overrides: + Secular/None: 0.42 + Nominally affiliated: 0.3 + Moderately religious: 0.18 + Devout: 0.1 + probability_override: null + - when: us_region == 'Northeast' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Secular/None: 0.38 + Nominally affiliated: 0.32 + Moderately religious: 0.2 + Devout: 0.1 + probability_override: null + - when: race_ethnicity == 'Asian' + multiply: null + add: null + weight_overrides: + Secular/None: 0.34 + Nominally affiliated: 0.28 + Moderately religious: 0.24 + Devout: 0.14 + probability_override: null + grounding: + level: strong + method: researched + source: Pew Research Religious Landscape Study; Gallup Religion 2024 + note: ~29% identify as religiously unaffiliated (nones). ~25% nominally affiliated + but rarely practice. ~27% moderately religious (attend occasionally). ~19% devout + (weekly+ attendance). Southeast and Midwest regions skew more devout; Northeast/West + Coast more secular. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: political_identity + type: categorical + category: population_specific + description: Political party affiliation and ideological strength (Strong Democrat, + Lean Democrat, True Independent, Lean Republican, Strong Republican). + scope: partner_correlated + correlation_rate: null + semantic_type: null + identity_type: political_orientation + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Strong Democrat + - Lean Democrat + - True Independent + - Lean Republican + - Strong Republican + weights: + - 0.18 + - 0.18 + - 0.17 + - 0.2 + - 0.27 + formula: null + depends_on: + - us_region + - education_level + - race_ethnicity + modifiers: + - when: us_region == 'Northeast' and education_level in ['Bachelor\'s degree', + 'Graduate degree'] and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.3 + Lean Democrat: 0.28 + True Independent: 0.18 + Lean Republican: 0.14 + Strong Republican: 0.1 + probability_override: null + - when: us_region == 'Southeast' and education_level in ['Less than HS', 'HS diploma/GED'] + and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.08 + Lean Democrat: 0.1 + True Independent: 0.16 + Lean Republican: 0.24 + Strong Republican: 0.42 + probability_override: null + - when: us_region == 'Southeast' and race_ethnicity == 'Black' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.52 + Lean Democrat: 0.26 + True Independent: 0.12 + Lean Republican: 0.06 + Strong Republican: 0.04 + probability_override: null + - when: race_ethnicity == 'Hispanic/Latino' and us_region in ['Southwest', 'West + Coast'] + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.28 + Lean Democrat: 0.28 + True Independent: 0.22 + Lean Republican: 0.13 + Strong Republican: 0.09 + probability_override: null + - when: race_ethnicity == 'Asian' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.28 + Lean Democrat: 0.28 + True Independent: 0.22 + Lean Republican: 0.13 + Strong Republican: 0.09 + probability_override: null + - when: us_region == 'West Coast' and education_level in ['Bachelor\'s degree', + 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.34 + Lean Democrat: 0.26 + True Independent: 0.18 + Lean Republican: 0.12 + Strong Republican: 0.1 + probability_override: null + - when: us_region == 'Midwest' and education_level in ['Less than HS', 'HS diploma/GED'] + and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.1 + Lean Democrat: 0.13 + True Independent: 0.18 + Lean Republican: 0.24 + Strong Republican: 0.35 + probability_override: null + - when: us_region == 'Southwest' and education_level in ['Less than HS', 'HS diploma/GED'] + and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.08 + Lean Democrat: 0.11 + True Independent: 0.16 + Lean Republican: 0.26 + Strong Republican: 0.39 + probability_override: null + - when: education_level == 'Graduate degree' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.3 + Lean Democrat: 0.28 + True Independent: 0.18 + Lean Republican: 0.14 + Strong Republican: 0.1 + probability_override: null + grounding: + level: strong + method: researched + source: Gallup Party Affiliation 2024; Pew Research Partisan Identification 2024-2025 + note: '2024 Gallup: 46% R/lean-R, 45% D/lean-D, 43% pure independents. Strong + partisans ~28% each side per Pew. True independents (no lean) ~17%. Slight Republican + lean for base reflecting 2024 election environment. Modifiers adjust heavily + by region, education, race.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: political_engagement_level + type: categorical + category: population_specific + description: Level of political participation and interest (Disengaged, Single-issue + voter, Moderate/occasional participant, Highly engaged partisan). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Disengaged + - Single-issue voter + - Moderate/occasional participant + - Highly engaged partisan + weights: + - 0.22 + - 0.18 + - 0.38 + - 0.22 + formula: null + depends_on: + - political_identity + - age + modifiers: + - when: political_identity in ['Strong Democrat', 'Strong Republican'] and age + >= 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.04 + Single-issue voter: 0.12 + Moderate/occasional participant: 0.24 + Highly engaged partisan: 0.6 + probability_override: null + - when: political_identity in ['Strong Democrat', 'Strong Republican'] and age + < 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.06 + Single-issue voter: 0.16 + Moderate/occasional participant: 0.3 + Highly engaged partisan: 0.48 + probability_override: null + - when: political_identity == 'True Independent' and age < 35 + multiply: null + add: null + weight_overrides: + Disengaged: 0.32 + Single-issue voter: 0.28 + Moderate/occasional participant: 0.3 + Highly engaged partisan: 0.1 + probability_override: null + - when: political_identity == 'True Independent' and age >= 35 + multiply: null + add: null + weight_overrides: + Disengaged: 0.2 + Single-issue voter: 0.3 + Moderate/occasional participant: 0.38 + Highly engaged partisan: 0.12 + probability_override: null + - when: political_identity in ['Lean Democrat', 'Lean Republican'] and age >= + 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.1 + Single-issue voter: 0.22 + Moderate/occasional participant: 0.44 + Highly engaged partisan: 0.24 + probability_override: null + - when: political_identity in ['Lean Democrat', 'Lean Republican'] and age < 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.18 + Single-issue voter: 0.26 + Moderate/occasional participant: 0.4 + Highly engaged partisan: 0.16 + probability_override: null + grounding: + level: medium + method: extrapolated + source: ANES 2024; Pew Research Political Engagement 2024 + note: About 22% are largely disengaged from politics, 18% single-issue focused. + The moderate/occasional majority ~38%. Highly engaged ~22%, consistent with + share who always vote in midterms and follow news closely. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: vote_2024_presidential + type: categorical + category: population_specific + description: Reported 2024 presidential vote choice (Trump, Harris, Third party, + Did not vote, Not eligible). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Trump + - Harris + - Third party + - Did not vote + - Not eligible + weights: + - 0.31 + - 0.3 + - 0.02 + - 0.28 + - 0.09 + formula: null + depends_on: + - political_identity + - political_engagement_level + modifiers: + - when: political_identity == 'Strong Republican' and political_engagement_level + == 'Highly engaged partisan' + multiply: null + add: null + weight_overrides: + Trump: 0.9 + Harris: 0.02 + Third party: 0.03 + Did not vote: 0.05 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Strong Democrat' and political_engagement_level + == 'Highly engaged partisan' + multiply: null + add: null + weight_overrides: + Trump: 0.02 + Harris: 0.9 + Third party: 0.04 + Did not vote: 0.04 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Lean Republican' + multiply: null + add: null + weight_overrides: + Trump: 0.68 + Harris: 0.14 + Third party: 0.06 + Did not vote: 0.12 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Lean Democrat' + multiply: null + add: null + weight_overrides: + Trump: 0.1 + Harris: 0.72 + Third party: 0.07 + Did not vote: 0.11 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'True Independent' and political_engagement_level + == 'Disengaged' + multiply: null + add: null + weight_overrides: + Trump: 0.16 + Harris: 0.16 + Third party: 0.1 + Did not vote: 0.52 + Not eligible: 0.06 + probability_override: null + - when: political_identity == 'True Independent' and political_engagement_level + != 'Disengaged' + multiply: null + add: null + weight_overrides: + Trump: 0.32 + Harris: 0.32 + Third party: 0.12 + Did not vote: 0.22 + Not eligible: 0.02 + probability_override: null + - when: political_identity == 'Strong Republican' and political_engagement_level + in ['Disengaged', 'Single-issue voter'] + multiply: null + add: null + weight_overrides: + Trump: 0.72 + Harris: 0.05 + Third party: 0.05 + Did not vote: 0.18 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Strong Democrat' and political_engagement_level + in ['Disengaged', 'Single-issue voter'] + multiply: null + add: null + weight_overrides: + Trump: 0.04 + Harris: 0.72 + Third party: 0.06 + Did not vote: 0.18 + Not eligible: 0.0 + probability_override: null + grounding: + level: strong + method: researched + source: 2024 Presidential Election results; US Elections Project turnout data + note: Trump won 49.9% of popular vote, Harris 48.4% of votes cast. ~64% of eligible + voters voted. ~9% of adults are non-citizens/not eligible. Did-not-vote reflects + low turnout among disengaged. Political identity modifier will strongly predict + this. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: midterm_turnout_propensity + type: categorical + category: population_specific + description: Historical tendency to vote in midterm elections (Always votes, Sometimes + votes, Rarely votes, Never votes). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Always votes + - Sometimes votes + - Rarely votes + - Never votes + weights: + - 0.35 + - 0.27 + - 0.2 + - 0.18 + formula: null + depends_on: + - political_engagement_level + - age + modifiers: + - when: political_engagement_level == 'Highly engaged partisan' and age >= 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.72 + Sometimes votes: 0.2 + Rarely votes: 0.06 + Never votes: 0.02 + probability_override: null + - when: political_engagement_level == 'Highly engaged partisan' and age < 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.52 + Sometimes votes: 0.3 + Rarely votes: 0.12 + Never votes: 0.06 + probability_override: null + - when: political_engagement_level == 'Moderate/occasional participant' and age + >= 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.4 + Sometimes votes: 0.38 + Rarely votes: 0.16 + Never votes: 0.06 + probability_override: null + - when: political_engagement_level == 'Moderate/occasional participant' and age + < 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.2 + Sometimes votes: 0.38 + Rarely votes: 0.28 + Never votes: 0.14 + probability_override: null + - when: political_engagement_level == 'Single-issue voter' + multiply: null + add: null + weight_overrides: + Always votes: 0.2 + Sometimes votes: 0.35 + Rarely votes: 0.3 + Never votes: 0.15 + probability_override: null + - when: political_engagement_level == 'Disengaged' and age < 35 + multiply: null + add: null + weight_overrides: + Always votes: 0.04 + Sometimes votes: 0.14 + Rarely votes: 0.32 + Never votes: 0.5 + probability_override: null + - when: political_engagement_level == 'Disengaged' and age >= 35 + multiply: null + add: null + weight_overrides: + Always votes: 0.08 + Sometimes votes: 0.22 + Rarely votes: 0.36 + Never votes: 0.34 + probability_override: null + grounding: + level: medium + method: extrapolated + source: US Elections Project midterm turnout data; Pew Research voter typology + 2024 + note: 'Midterm turnout ~50% of eligible voters (2022 ~46.8%). Always-voters ~35% + of adults, sometimes ~27%, rarely ~20%, never ~18%. Age modifier critical: older + adults much more consistent voters.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: congressional_district_competitiveness + type: categorical + category: population_specific + description: Competitiveness classification of the agent's congressional district + (Safe Republican, Lean Republican, Swing district, Lean Democrat, Safe Democrat). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Safe Republican + - Lean Republican + - Swing district + - Lean Democrat + - Safe Democrat + weights: + - 0.36 + - 0.12 + - 0.1 + - 0.12 + - 0.3 + formula: null + depends_on: + - us_region + - urban_rural + modifiers: + - when: us_region == 'Northeast' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.05 + Lean Republican: 0.08 + Swing district: 0.12 + Lean Democrat: 0.22 + Safe Democrat: 0.53 + probability_override: null + - when: us_region == 'Northeast' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.15 + Swing district: 0.28 + Lean Democrat: 0.28 + Safe Democrat: 0.19 + probability_override: null + - when: us_region == 'Northeast' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.4 + Lean Republican: 0.28 + Swing district: 0.18 + Lean Democrat: 0.09 + Safe Democrat: 0.05 + probability_override: null + - when: us_region == 'Southeast' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.12 + Swing district: 0.18 + Lean Democrat: 0.28 + Safe Democrat: 0.32 + probability_override: null + - when: us_region == 'Southeast' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.22 + Lean Republican: 0.28 + Swing district: 0.28 + Lean Democrat: 0.14 + Safe Democrat: 0.08 + probability_override: null + - when: us_region == 'Southeast' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.55 + Lean Republican: 0.26 + Swing district: 0.12 + Lean Democrat: 0.05 + Safe Democrat: 0.02 + probability_override: null + - when: us_region == 'Midwest' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.06 + Lean Republican: 0.1 + Swing district: 0.18 + Lean Democrat: 0.26 + Safe Democrat: 0.4 + probability_override: null + - when: us_region == 'Midwest' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.2 + Lean Republican: 0.26 + Swing district: 0.32 + Lean Democrat: 0.14 + Safe Democrat: 0.08 + probability_override: null + - when: us_region == 'Midwest' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.54 + Lean Republican: 0.28 + Swing district: 0.12 + Lean Democrat: 0.04 + Safe Democrat: 0.02 + probability_override: null + - when: us_region == 'Southwest' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.16 + Swing district: 0.26 + Lean Democrat: 0.26 + Safe Democrat: 0.22 + probability_override: null + - when: us_region == 'Southwest' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.24 + Lean Republican: 0.28 + Swing district: 0.28 + Lean Democrat: 0.12 + Safe Democrat: 0.08 + probability_override: null + - when: us_region == 'Southwest' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.56 + Lean Republican: 0.24 + Swing district: 0.12 + Lean Democrat: 0.05 + Safe Democrat: 0.03 + probability_override: null + - when: us_region == 'West Coast' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.04 + Lean Republican: 0.06 + Swing district: 0.1 + Lean Democrat: 0.22 + Safe Democrat: 0.58 + probability_override: null + - when: us_region == 'West Coast' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.18 + Swing district: 0.26 + Lean Democrat: 0.26 + Safe Democrat: 0.2 + probability_override: null + - when: us_region == 'West Coast' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.44 + Lean Republican: 0.28 + Swing district: 0.16 + Lean Democrat: 0.08 + Safe Democrat: 0.04 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Cook Political Report 2024 district ratings; DCCC/NRCC targeting lists + note: Approximately 35-40 truly competitive House districts out of 435 (~10%). + Safe R districts slightly outnumber safe D given geographic sorting. Rural/suburban + Republican districts vs. urban Democratic strongholds. Urban/rural modifier + will strongly adjust this. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: top_issue_2026 + type: categorical + category: population_specific + description: Single most salient policy issue heading into the 2026 midterms (Economy/Jobs, + Abortion/Reproductive rights, Immigration, Democracy/Rule of law, Healthcare, + Climate, Education, AI/Technology). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Economy/Jobs + - Abortion/Reproductive rights + - Immigration + - Democracy/Rule of law + - Healthcare + - Climate + - Education + - AI/Technology + weights: + - 0.28 + - 0.13 + - 0.15 + - 0.12 + - 0.13 + - 0.07 + - 0.07 + - 0.05 + formula: null + depends_on: + - political_identity + - employment_sector + modifiers: + - when: political_identity == 'Strong Republican' and employment_sector in ['Private + sector', 'Self-employed', 'Gig/contract'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.38 + Abortion/Reproductive rights: 0.02 + Immigration: 0.28 + Democracy/Rule of law: 0.04 + Healthcare: 0.1 + Climate: 0.02 + Education: 0.06 + AI/Technology: 0.1 + probability_override: null + - when: political_identity == 'Strong Democrat' and employment_sector in ['State/local + government', 'Federal government'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.14 + Abortion/Reproductive rights: 0.22 + Immigration: 0.04 + Democracy/Rule of law: 0.28 + Healthcare: 0.16 + Climate: 0.1 + Education: 0.05 + AI/Technology: 0.01 + probability_override: null + - when: political_identity == 'Strong Democrat' and employment_sector in ['Private + sector', 'Self-employed'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.18 + Abortion/Reproductive rights: 0.2 + Immigration: 0.04 + Democracy/Rule of law: 0.24 + Healthcare: 0.16 + Climate: 0.1 + Education: 0.06 + AI/Technology: 0.02 + probability_override: null + - when: political_identity == 'True Independent' and employment_sector in ['Private + sector', 'Gig/contract', 'Unemployed'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.42 + Abortion/Reproductive rights: 0.08 + Immigration: 0.16 + Democracy/Rule of law: 0.12 + Healthcare: 0.12 + Climate: 0.04 + Education: 0.04 + AI/Technology: 0.02 + probability_override: null + - when: political_identity in ['Lean Republican', 'Strong Republican'] and employment_sector + == 'Retired' + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.26 + Abortion/Reproductive rights: 0.04 + Immigration: 0.26 + Democracy/Rule of law: 0.06 + Healthcare: 0.28 + Climate: 0.02 + Education: 0.06 + AI/Technology: 0.02 + probability_override: null + - when: political_identity in ['Strong Democrat', 'Lean Democrat'] and employment_sector + == 'Retired' + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.18 + Abortion/Reproductive rights: 0.14 + Immigration: 0.04 + Democracy/Rule of law: 0.22 + Healthcare: 0.3 + Climate: 0.06 + Education: 0.04 + AI/Technology: 0.02 + probability_override: null + - when: employment_sector in ['Federal government', 'State/local government'] + and political_identity in ['Lean Republican', 'Strong Republican'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.28 + Abortion/Reproductive rights: 0.04 + Immigration: 0.22 + Democracy/Rule of law: 0.14 + Healthcare: 0.16 + Climate: 0.04 + Education: 0.1 + AI/Technology: 0.02 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Gallup Most Important Problem 2024-2025; Pew Research Issue Priorities + 2024 + note: Economy/jobs consistently tops issue salience polls ~25-30%. Immigration + elevated post-2024 election. Abortion remains salient post-Dobbs. Democracy/rule + of law elevated heading into 2026. AI/Tech emerging but still low single digits + as top issue. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: country_direction_approval + type: categorical + category: population_specific + description: Approval of the current direction of the United States (Strongly approve, + Somewhat approve, Somewhat disapprove, Strongly disapprove). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Strongly approve + - Somewhat approve + - Somewhat disapprove + - Strongly disapprove + weights: + - 0.22 + - 0.18 + - 0.18 + - 0.42 + formula: null + depends_on: + - political_identity + - financial_margin + modifiers: + - when: political_identity == 'Strong Republican' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.52 + Somewhat approve: 0.3 + Somewhat disapprove: 0.12 + Strongly disapprove: 0.06 + probability_override: null + - when: political_identity == 'Strong Republican' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.34 + Somewhat approve: 0.32 + Somewhat disapprove: 0.2 + Strongly disapprove: 0.14 + probability_override: null + - when: political_identity == 'Lean Republican' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.28 + Somewhat approve: 0.4 + Somewhat disapprove: 0.2 + Strongly disapprove: 0.12 + probability_override: null + - when: political_identity == 'True Independent' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.14 + Somewhat approve: 0.3 + Somewhat disapprove: 0.32 + Strongly disapprove: 0.24 + probability_override: null + - when: political_identity == 'True Independent' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.08 + Somewhat approve: 0.22 + Somewhat disapprove: 0.34 + Strongly disapprove: 0.36 + probability_override: null + - when: political_identity == 'Lean Democrat' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.03 + Somewhat approve: 0.1 + Somewhat disapprove: 0.28 + Strongly disapprove: 0.59 + probability_override: null + - when: political_identity == 'Strong Democrat' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.02 + Somewhat approve: 0.05 + Somewhat disapprove: 0.18 + Strongly disapprove: 0.75 + probability_override: null + - when: political_identity == 'Strong Democrat' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.03 + Somewhat approve: 0.08 + Somewhat disapprove: 0.24 + Strongly disapprove: 0.65 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Gallup Right/Wrong Direction poll 2025; RealClearPolitics average Feb + 2026 + note: As of early 2026, right-track/wrong-track polls show majority disapprove + of country direction (~55-60% wrong track). Strongly disapprove heavily driven + by Democrats/independents reacting to Trump second term. Political identity + modifier will strongly shift this. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: consumer_identity + type: categorical + category: population_specific + description: Primary driver of consumer purchasing behavior (Brand loyal, Price/value + driven, Values/ethics driven, Convenience driven). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Brand loyal + - Price/value driven + - Values/ethics driven + - Convenience driven + weights: + - 0.22 + - 0.42 + - 0.18 + - 0.18 + formula: null + depends_on: + - household_income + - education_level + modifiers: + - when: household_income < 50000 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + Brand loyal: 0.18 + Price/value driven: 0.58 + Values/ethics driven: 0.1 + Convenience driven: 0.14 + probability_override: null + - when: household_income >= 50000 and household_income < 100000 and education_level + == 'Some college' + multiply: null + add: null + weight_overrides: + Brand loyal: 0.26 + Price/value driven: 0.4 + Values/ethics driven: 0.16 + Convenience driven: 0.18 + probability_override: null + - when: household_income >= 100000 and education_level in ['Bachelor\'s degree', + 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Brand loyal: 0.28 + Price/value driven: 0.22 + Values/ethics driven: 0.32 + Convenience driven: 0.18 + probability_override: null + - when: household_income >= 150000 and education_level == 'Graduate degree' + multiply: null + add: null + weight_overrides: + Brand loyal: 0.3 + Price/value driven: 0.14 + Values/ethics driven: 0.38 + Convenience driven: 0.18 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Nielsen Consumer Research 2024; McKinsey Consumer Pulse 2024 + note: Price/value is primary driver for plurality of Americans especially post-inflation + environment. Brand loyalty declining. Values-driven purchasing elevated among + higher-education, younger, liberal consumers. Convenience driven for time-pressed + households. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: institutional_trust + type: categorical + category: population_specific + description: General level of trust in major institutions such as government, media, + science, and corporations (High trust, Moderate trust, Low trust, Distrustful/Conspiratorial). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - High trust + - Moderate trust + - Low trust + - Distrustful/Conspiratorial + weights: + - 0.14 + - 0.32 + - 0.34 + - 0.2 + formula: null + depends_on: + - political_identity + - education_level + modifiers: + - when: political_identity == 'Strong Democrat' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.18 + Moderate trust: 0.42 + Low trust: 0.3 + Distrustful/Conspiratorial: 0.1 + probability_override: null + - when: political_identity == 'Strong Democrat' and education_level in ['Less + than HS', 'HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + High trust: 0.12 + Moderate trust: 0.36 + Low trust: 0.34 + Distrustful/Conspiratorial: 0.18 + probability_override: null + - when: political_identity == 'Strong Republican' and education_level in ['Less + than HS', 'HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + High trust: 0.06 + Moderate trust: 0.22 + Low trust: 0.36 + Distrustful/Conspiratorial: 0.36 + probability_override: null + - when: political_identity == 'Strong Republican' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.1 + Moderate trust: 0.28 + Low trust: 0.38 + Distrustful/Conspiratorial: 0.24 + probability_override: null + - when: political_identity == 'True Independent' and education_level in ['Less + than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + High trust: 0.06 + Moderate trust: 0.26 + Low trust: 0.38 + Distrustful/Conspiratorial: 0.3 + probability_override: null + - when: political_identity == 'True Independent' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.1 + Moderate trust: 0.38 + Low trust: 0.36 + Distrustful/Conspiratorial: 0.16 + probability_override: null + - when: political_identity in ['Lean Democrat'] and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.22 + Moderate trust: 0.46 + Low trust: 0.24 + Distrustful/Conspiratorial: 0.08 + probability_override: null + - when: political_identity in ['Lean Republican'] and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.14 + Moderate trust: 0.34 + Low trust: 0.36 + Distrustful/Conspiratorial: 0.16 + probability_override: null + grounding: + level: strong + method: researched + source: Gallup Confidence in Institutions 2024; Edelman Trust Barometer 2025 + note: 'Institutional trust at historic lows. Gallup 2024: <30% confident in most + major institutions. ~14% high trust, ~32% moderate, ~34% low trust, ~20% conspiratorial/distrustful + across the board. Political identity and education are strong modifiers.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: risk_tolerance + type: float + category: personality + description: General willingness to accept risk in financial, social, and political + decisions (0=very risk averse, 1=very risk tolerant). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: beta + alpha: 2.5 + beta: 3.0 + min: 0.0 + max: 1.0 + min_formula: null + max_formula: null + formula: null + depends_on: + - age + - household_income + modifiers: + - when: age < 35 and household_income >= 80000 + multiply: 1.2 + add: 0.06 + weight_overrides: null + probability_override: null + - when: age < 35 and household_income < 40000 + multiply: 0.95 + add: 0.02 + weight_overrides: null + probability_override: null + - when: age >= 55 and household_income >= 100000 + multiply: 0.9 + add: 0.0 + weight_overrides: null + probability_override: null + - when: age >= 55 and household_income < 50000 + multiply: 0.8 + add: -0.06 + weight_overrides: null + probability_override: null + - when: age >= 35 and age < 55 and household_income >= 100000 + multiply: 1.05 + add: 0.02 + weight_overrides: null + probability_override: null + grounding: + level: medium + method: extrapolated + source: FINRA Investor Education Foundation 2024; Federal Reserve SHED 2024 + note: 'Beta(2.5, 3.0) gives mean ~0.45, slightly below midpoint, reflecting general + risk aversion in US population. Right-skewed toward lower risk tolerance. Age + and income are key modifiers: younger and wealthier adults more risk-tolerant.' + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Risk tolerance bounded at 0 (fully risk-averse) + - type: hard_max + value: 1.0 + expression: null + reason: Risk tolerance bounded at 1 (fully risk-tolerant) +- name: economic_anxiety + type: float + category: personality + description: Degree of worry about personal and national economic conditions (0=none, + 1=extreme), shaping decision-making under uncertainty. + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: beta + alpha: 3.5 + beta: 2.5 + min: 0.0 + max: 1.0 + min_formula: null + max_formula: null + formula: null + depends_on: + - financial_margin + - job_security_perception + modifiers: + - when: financial_margin == 'In debt/deficit' and job_security_perception in ['Very + insecure', 'Somewhat insecure'] + multiply: 1.0 + add: 0.22 + weight_overrides: null + probability_override: null + - when: financial_margin == 'In debt/deficit' and job_security_perception in ['N/A + - not employed', 'Somewhat secure'] + multiply: 1.0 + add: 0.16 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' and job_security_perception + in ['Somewhat insecure', 'Very insecure'] + multiply: 1.0 + add: 0.14 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' and job_security_perception + in ['Very secure', 'Somewhat secure'] + multiply: 1.0 + add: 0.08 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Modest buffer' and job_security_perception == 'N/A + - not employed' + multiply: 1.0 + add: 0.04 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' and job_security_perception + in ['Very secure', 'Somewhat secure'] + multiply: 1.0 + add: -0.16 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' and job_security_perception + == 'N/A - not employed' + multiply: 1.0 + add: -0.08 + weight_overrides: null + probability_override: null + grounding: + level: medium + method: extrapolated + source: Federal Reserve SHED 2024; Gallup Economic Confidence 2024-2025 + note: Beta(3.5, 2.5) gives mean ~0.58, above midpoint, reflecting elevated economic + anxiety in 2024-2026 environment with inflation, tariffs, and job market uncertainty. + Financial margin and job security are primary modifiers. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Economic anxiety bounded at 0 (no anxiety) + - type: hard_max + value: 1.0 + expression: null + reason: Economic anxiety bounded at 1 (extreme anxiety) +sampling_order: +- age +- agreeableness +- conscientiousness +- country +- education_level +- employment_sector +- extraversion +- gender +- job_security_perception +- marital_status +- has_children +- household_size +- neuroticism +- openness +- primary_info_source +- race_ethnicity +- social_media_behavior +- tech_adoption_posture +- urban_rural +- us_region +- congressional_district_competitiveness +- household_income +- consumer_identity +- financial_margin +- economic_anxiety +- investment_profile +- political_identity +- country_direction_approval +- institutional_trust +- political_engagement_level +- midterm_turnout_propensity +- religious_engagement +- risk_tolerance +- top_issue_2026 +- vote_2024_presidential \ No newline at end of file diff --git a/examples/study-02/scenario/asi-announcement/network-config.seed42.20260222-170102.yaml b/examples/study-02/scenario/asi-announcement/network-config.seed42.20260222-170102.yaml new file mode 100644 index 0000000..740825a --- /dev/null +++ b/examples/study-02/scenario/asi-announcement/network-config.seed42.20260222-170102.yaml @@ -0,0 +1,343 @@ +avg_degree: 12.0 +rewire_prob: 0.05 +similarity_store_threshold: 0.05 +similarity_threshold: 0.3 +similarity_steepness: 10.0 +candidate_mode: blocked +candidate_pool_multiplier: 12.0 +min_candidate_pool: 80 +similarity_workers: 8 +similarity_chunk_size: 64 +checkpoint_every_rows: 250 +triadic_closure_prob: 0.6 +target_clustering: 0.35 +target_modularity: 0.55 +inter_community_scale: 0.3 +max_calibration_iterations: 12 +quality_profile: balanced +topology_gate: strict +max_calibration_minutes: 30 +calibration_restarts: 4 +target_largest_component_ratio: 0.95 +target_degree_tolerance_pct: 0.15 +target_modularity_tolerance: 0.1 +target_clustering_tolerance: 0.08 +bridge_budget_fraction: 0.08 +swap_passes: 3 +power_law_exponent: 2.5 +identity_clustering_boost: 1.5 +auto_save_generated_config: true +allow_quarantine: true +quarantine_suffix: rejected +attribute_weights: + urban_rural: + weight: 3.5 + match_type: exact + us_region: + weight: 3.0 + match_type: exact + political_identity: + weight: 3.0 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Strong Democrat: 1 + Lean Democrat: 2 + True Independent: 3 + Lean Republican: 4 + Strong Republican: 5 + education_level: + weight: 2.5 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Less than HS: 1 + HS diploma/GED: 2 + Some college: 3 + Bachelor's degree: 4 + Graduate degree: 5 + religious_engagement: + weight: 2.5 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Secular/None: 1 + Nominally affiliated: 2 + Moderately religious: 3 + Devout: 4 + race_ethnicity: + weight: 2.0 + match_type: exact + age: + weight: 2.0 + match_type: numeric_range + range_value: 15.0 + employment_sector: + weight: 2.0 + match_type: exact + financial_margin: + weight: 1.5 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Comfortable savings buffer: 1 + Modest buffer: 2 + Paycheck-to-paycheck: 3 + In debt/deficit: 4 + marital_status: + weight: 1.5 + match_type: exact + primary_info_source: + weight: 1.5 + match_type: exact + social_media_behavior: + weight: 1.0 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Non-user: 1 + Passive consumer: 2 + Occasional poster: 3 + Active poster/Influencer: 4 +degree_multipliers: +- attribute: social_media_behavior + condition: Active poster/Influencer + multiplier: 2.5 + rationale: "Social media influencers and active posters maintain large networks\ + \ by definition \u2014 they broadcast to followers, engage in comment threads,\ + \ and are sought out for opinions. This is the primary network hub mechanic in\ + \ modern America." +- attribute: political_engagement_level + condition: Highly engaged partisan + multiplier: 2.0 + rationale: Political activists, campaign volunteers, and party organizers have unusually + wide networks spanning neighbors, coworkers, and fellow partisans. They attend + events, canvass neighborhoods, and coordinate across communities. +- attribute: employment_sector + condition: Self-employed + multiplier: 1.8 + rationale: Small business owners and entrepreneurs must cultivate broad networks + of clients, vendors, suppliers, and referral sources. Their livelihood depends + on relationship breadth. +- attribute: religious_engagement + condition: Devout + multiplier: 1.7 + rationale: Devout individuals attend religious services regularly, participate in + faith communities, serve on committees, and form dense congregational networks. + Churches remain one of the most powerful community-forming institutions in America. +- attribute: employment_sector + condition: State/local government + multiplier: 1.5 + rationale: "State and local government workers are embedded in civic infrastructure\ + \ \u2014 they interact with the public, attend municipal meetings, and know local\ + \ officials, community leaders, and service recipients." +- attribute: marital_status + condition: Married/partnered + multiplier: 1.3 + rationale: "Married couples have dual social networks that often merge \u2014 each\ + \ partner brings their own friends, family, and colleagues, expanding the household's\ + \ total social footprint." +- attribute: has_children + condition: true + multiplier: 1.4 + rationale: "Parents of school-age children are embedded in school networks, sports\ + \ leagues, PTAs, and playdate circles \u2014 generating many weak and strong ties\ + \ with other parents in the same community." +edge_type_rules: +- name: close_family_household + condition: a_marital_status == b_marital_status and a_us_region == b_us_region and + a_urban_rural == b_urban_rural and a_race_ethnicity == b_race_ethnicity + priority: 50 + description: "Household members and close family sharing region, settlement type,\ + \ and background \u2014 proxies for family and very close community bonds." +- name: coworker_professional + condition: a_employment_sector == b_employment_sector and a_us_region == b_us_region + and a_employment_sector != "Retired" and a_employment_sector != "Unemployed" and + a_employment_sector != "Not in labor force" + priority: 40 + description: "People working in the same employment sector within the same region\ + \ \u2014 proxy for professional and coworker relationships." +- name: faith_community + condition: a_religious_engagement == b_religious_engagement and a_religious_engagement + != "Secular/None" and a_us_region == b_us_region and a_urban_rural == b_urban_rural + priority: 35 + description: "People sharing similar religious engagement levels in the same region\ + \ and settlement type \u2014 proxy for fellow congregants and faith-based community\ + \ bonds." +- name: political_tribe + condition: a_political_identity == b_political_identity and a_us_region == b_us_region + and a_political_engagement_level == b_political_engagement_level + priority: 30 + description: "Highly aligned partisans in the same region with the same engagement\ + \ level \u2014 proxies for political club members, activists, and ideologically\ + \ sorted social circles." +- name: neighbor_community + condition: a_us_region == b_us_region and a_urban_rural == b_urban_rural + priority: 20 + description: "People in the same region and settlement type \u2014 broad neighborhood,\ + \ community, and local acquaintance ties." +- name: media_echo_chamber + condition: a_primary_info_source == b_primary_info_source and a_political_identity + == b_political_identity + priority: 15 + description: "People consuming the same primary media source with the same political\ + \ identity \u2014 online communities, comment sections, Facebook groups, and podcast\ + \ listener circles that transcend geography." +influence_factors: +- attribute: political_engagement_level + type: ordinal + levels: + Disengaged: 1 + Single-issue voter: 2 + Moderate/occasional participant: 3 + Highly engaged partisan: 4 + weight: 0.35 + description: Highly engaged partisans and political activists actively push information, + frame events, and mobilize others. Disengaged citizens are disproportionately + influenced by the politically active people in their networks. +- attribute: social_media_behavior + type: ordinal + levels: + Non-user: 1 + Passive consumer: 2 + Occasional poster: 3 + Active poster/Influencer: 4 + weight: 0.35 + description: Active posters and influencers broadcast information asymmetrically + to their followers. Passive consumers receive information without generating it, + creating a clear influence asymmetry in digital information flows. +- attribute: education_level + type: ordinal + levels: + Less than HS: 1 + HS diploma/GED: 2 + Some college: 3 + Bachelor's degree: 4 + Graduate degree: 5 + weight: 0.25 + description: "Higher educational attainment confers perceived epistemic authority\ + \ in peer conversations \u2014 people with advanced degrees are more often deferred\ + \ to on policy, science, and technical questions, even by friends with strong\ + \ opinions." +- attribute: household_income + type: numeric + weight: 0.15 + description: Wealth confers social status and decision-making authority. Higher-income + individuals are more likely to be opinion leaders in consumer decisions, investment + behavior, and lifestyle choices. Economic precarity reduces social influence. +structural_attribute_roles: + household_id: household_income + partner_id: marital_status + age: age + sector: employment_sector + region: urban_rural + urbanicity: urban_rural + religion: religious_engagement +default_edge_type: acquaintance +ordinal_levels: + political_identity: + Strong Democrat: 1 + Lean Democrat: 2 + True Independent: 3 + Lean Republican: 4 + Strong Republican: 5 + education_level: + Less than HS: 1 + HS diploma/GED: 2 + Some college: 3 + Bachelor's degree: 4 + Graduate degree: 5 + religious_engagement: + Secular/None: 1 + Nominally affiliated: 2 + Moderately religious: 3 + Devout: 4 + financial_margin: + Comfortable savings buffer: 1 + Modest buffer: 2 + Paycheck-to-paycheck: 3 + In debt/deficit: 4 + social_media_behavior: + Non-user: 1 + Passive consumer: 2 + Occasional poster: 3 + Active poster/Influencer: 4 +generated_from: "Nationally representative US adult population (18-80). Must capture\ + \ the demographic, economic, and attitudinal fault lines that drive divergent responses\ + \ to major national events \u2014 especially technology disruption, economic shocks,\ + \ cultural controversies, and electoral behavior in the 2026 midterm elections.\n\ + \nBeyond standard demographics (age, gender, race/ethnicity, education, income,\ + \ geography), prioritize attributes that determine how people process and react\ + \ to news, make decisions under uncertainty, and vote:\n\n- technology adoption\ + \ posture and digital literacy (technophobe to early adopter)\n- media ecosystem\ + \ and primary information sources (cable news, social media, podcasts, local news,\ + \ none)\n- institutional trust (government, corporations, media, science, financial\ + \ system)\n- financial margin and economic anxiety (savings buffer, debt load, paycheck-to-paycheck\ + \ status)\n- employment sector and job security perception (federal/state government,\ + \ private sector, gig, self-employed, retired)\n- consumer identity and brand relationship\ + \ (brand loyal, price-driven, values-driven)\n- social media behavior and influence\ + \ (passive consumer, active poster, influencer, non-user)\n- investment and financial\ + \ literacy (no investments, 401k only, active trader, crypto holder)\n- religious\ + \ engagement and worldview (secular, moderate, devout, denomination)\n- political\ + \ identity and engagement level (strong partisan, moderate, disengaged, single-issue)\n\ + - 2024 presidential vote (Trump, Harris, third party, didn\u2019t vote, not eligible)\n\ + - congressional district competitiveness (safe R, safe D, swing district)\n- midterm\ + \ turnout propensity (always, sometimes, rarely, never)\n- issue salience for 2026\ + \ (economy/jobs, abortion/reproductive rights, immigration, democracy/rule of law,\ + \ healthcare, climate, education, AI/technology)\n- approval of current direction\ + \ (strongly approve to strongly disapprove)\n\nGeographic distribution should span\ + \ urban/suburban/rural across major US regions (Northeast, Southeast, Midwest, Southwest,\ + \ West Coast), with realistic correlation structure between attributes." +generation_rationale: "This is a nationally representative US adult population simulation\ + \ focused on political, economic, and cultural fault lines. Here's my reasoning\ + \ for each design choice:\n\n**Average Degree (12):** General consumer/citizen population\ + \ with moderate social connectivity. Americans have ~10-15 meaningful social contacts\ + \ on average. This captures neighborhood friends, coworkers, family-adjacent contacts,\ + \ and community ties without over-connecting.\n\n**Attribute Weights:**\n1. **urban_rural\ + \ (3.5)** \u2013 The single strongest driver of who you know. Rural, suburban, and\ + \ urban Americans live in fundamentally different social ecosystems with little\ + \ cross-over. Also proxies commute patterns, church vs. bar culture, etc.\n2. **us_region\ + \ (3.0)** \u2013 Regional identity shapes social circles deeply. Northeasterners\ + \ and Southerners rarely know each other organically.\n3. **political_identity (3.0)**\ + \ \u2013 Political homophily is one of the strongest documented social sorting forces\ + \ in modern America. People self-select neighborhoods, churches, and friend groups\ + \ by politics.\n4. **education_level (2.5)** \u2013 Educational attainment strongly\ + \ predicts social circle composition (college-educated people disproportionately\ + \ befriend other college-educated people).\n5. **religious_engagement (2.5)** \u2013\ + \ Church is one of the primary community-forming institutions in America, especially\ + \ outside urban cores. Devout people form dense church-based networks.\n6. **employment_sector\ + \ (2.0)** \u2013 Coworkers form natural social bonds. Government workers know government\ + \ workers; gig workers are more isolated.\n7. **age (2.0)** \u2013 Age homophily\ + \ is strong \u2014 people form friendships in age-proximate cohorts (school, early\ + \ career, retirement).\n8. **primary_info_source (1.5)** \u2013 Shared media ecosystems\ + \ reflect and reinforce social clustering. People who watch the same cable news\ + \ or follow the same podcasters often share social circles.\n9. **race_ethnicity\ + \ (2.0)** \u2013 Residential segregation and cultural networks mean race/ethnicity\ + \ remains a meaningful predictor of social connection in the US.\n10. **marital_status\ + \ (1.5)** \u2013 Married couples socialize with other married couples; singles gravitate\ + \ toward singles. Life-stage sorting.\n11. **financial_margin (1.5)** \u2013 Economic\ + \ class shapes where you live, what you do for fun, and who you meet. Paycheck-to-paycheck\ + \ people and comfortable savers rarely share social worlds.\n12. **social_media_behavior\ + \ (1.0)** \u2013 Active posters and influencers disproportionately connect with\ + \ other active users; non-users form offline-only networks.\n\n**Degree Multipliers:**\n\ + - Active poster/Influencer: These people have structurally more connections by definition\ + \ \u2014 they maintain large social media followings and offline networks.\n- Highly\ + \ engaged partisan: Political organizers, campaign volunteers, and activists have\ + \ wide networks spanning their community.\n- Self-employed: Business owners must\ + \ maintain broad client/vendor/community networks.\n- Extraversion (high): Extraverts\ + \ genuinely accumulate more social ties \u2014 but we'll proxy this through social_media_behavior\ + \ and engagement_level since we want observable attributes.\n- Religious devout:\ + \ Regular church attendance creates dense community networks.\n- Federal/State government\ + \ workers: Public sector jobs involve community-facing roles and professional networks.\n\ + \n**Edge Types:**\n- Household members (same household_id) \u2192 family\n- Same\ + \ region + same urban/rural + same political identity \u2192 close community (political\ + \ tribe)\n- Same employment sector (non-retired/unemployed) \u2192 coworker/professional\n\ + - Same us_region + same religious_engagement (devout/moderate) \u2192 faith community\n\ + - Same us_region + similar age \u2192 neighbor/community acquaintance\n- Default:\ + \ acquaintance (weak tie)\n\n**Influence Factors:**\n- education_level: Higher education\ + \ \u2192 more epistemic authority in conversations\n- political_engagement_level:\ + \ Highly engaged partisans and activists influence disengaged peers\n- social_media_behavior:\ + \ Active posters/influencers push information asymmetrically to passive consumers\n\ + - household_income: Wealth confers social status and decision-making authority in\ + \ peer groups" +seed: 42 diff --git a/examples/study-02/scenario/asi-announcement/persona.v1.yaml b/examples/study-02/scenario/asi-announcement/persona.v1.yaml new file mode 100644 index 0000000..110c076 --- /dev/null +++ b/examples/study-02/scenario/asi-announcement/persona.v1.yaml @@ -0,0 +1,881 @@ +population_description: 'Nationally representative US adult population (18-80). Must + capture the demographic, economic, and attitudinal fault lines that drive divergent + responses to major national events — especially technology disruption, economic + shocks, cultural controversies, and electoral behavior in the 2026 midterm elections. + + + Beyond standard demographics (age, gender, race/ethnicity, education, income, geography), + prioritize attributes that determine how people process and react to news, make + decisions under uncertainty, and vote: + + + - technology adoption posture and digital literacy (technophobe to early adopter) + + - media ecosystem and primary information sources (cable news, social media, podcasts, + local news, none) + + - institutional trust (government, corporations, media, science, financial system) + + - financial margin and economic anxiety (savings buffer, debt load, paycheck-to-paycheck + status) + + - employment sector and job security perception (federal/state government, private + sector, gig, self-employed, retired) + + - consumer identity and brand relationship (brand loyal, price-driven, values-driven) + + - social media behavior and influence (passive consumer, active poster, influencer, + non-user) + + - investment and financial literacy (no investments, 401k only, active trader, crypto + holder) + + - religious engagement and worldview (secular, moderate, devout, denomination) + + - political identity and engagement level (strong partisan, moderate, disengaged, + single-issue) + + - 2024 presidential vote (Trump, Harris, third party, didn’t vote, not eligible) + + - congressional district competitiveness (safe R, safe D, swing district) + + - midterm turnout propensity (always, sometimes, rarely, never) + + - issue salience for 2026 (economy/jobs, abortion/reproductive rights, immigration, + democracy/rule of law, healthcare, climate, education, AI/technology) + + - approval of current direction (strongly approve to strongly disapprove) + + + Geographic distribution should span urban/suburban/rural across major US regions + (Northeast, Southeast, Midwest, Southwest, West Coast), with realistic correlation + structure between attributes.' +created_at: '2026-02-20T03:41:31.767751' +intro_template: I'm a {age}-year-old {gender} living in a {urban_rural} area of the + {us_region}, where I work in the {employment_sector} sector and bring home around + {household_income} a year. My household of {household_size} reflects who I am — + {race_ethnicity}, {marital_status}, with a {financial_margin} financial situation + that shapes how I see just about everything. When it comes to the big questions + facing the country — from AI to the economy to the next election — I come at it + as someone who {political_identity} and gets most of my news and information from + {primary_info_source}. +treatments: +- attribute: country + treatment: concrete + group: demographics +- attribute: age + treatment: concrete + group: demographics +- attribute: gender + treatment: concrete + group: demographics +- attribute: race_ethnicity + treatment: concrete + group: demographics +- attribute: us_region + treatment: concrete + group: geography +- attribute: urban_rural + treatment: concrete + group: geography +- attribute: openness + treatment: relative + group: personality +- attribute: conscientiousness + treatment: relative + group: personality +- attribute: extraversion + treatment: relative + group: personality +- attribute: agreeableness + treatment: relative + group: personality +- attribute: neuroticism + treatment: relative + group: personality +- attribute: education_level + treatment: concrete + group: demographics +- attribute: household_income + treatment: concrete + group: economics +- attribute: marital_status + treatment: concrete + group: demographics +- attribute: household_size + treatment: concrete + group: demographics +- attribute: has_children + treatment: relative + group: demographics +- attribute: employment_sector + treatment: concrete + group: economics +- attribute: job_security_perception + treatment: relative + group: economics +- attribute: financial_margin + treatment: concrete + group: economics +- attribute: investment_profile + treatment: concrete + group: economics +- attribute: primary_info_source + treatment: concrete + group: media_and_information +- attribute: social_media_behavior + treatment: concrete + group: media_and_information +- attribute: tech_adoption_posture + treatment: relative + group: media_and_information +- attribute: religious_engagement + treatment: concrete + group: values_and_identity +- attribute: political_identity + treatment: concrete + group: political_profile +- attribute: political_engagement_level + treatment: relative + group: political_profile +- attribute: vote_2024_presidential + treatment: concrete + group: political_profile +- attribute: midterm_turnout_propensity + treatment: concrete + group: political_profile +- attribute: congressional_district_competitiveness + treatment: concrete + group: political_profile +- attribute: top_issue_2026 + treatment: concrete + group: political_profile +- attribute: country_direction_approval + treatment: concrete + group: political_profile +- attribute: consumer_identity + treatment: concrete + group: values_and_identity +- attribute: institutional_trust + treatment: relative + group: values_and_identity +- attribute: risk_tolerance + treatment: relative + group: personality +- attribute: economic_anxiety + treatment: relative + group: economics +- attribute: personal_health_stake + treatment: concrete + group: asi_and_technology +- attribute: asi_threat_perception + treatment: concrete + group: asi_and_technology +- attribute: job_displacement_vulnerability + treatment: relative + group: asi_and_technology +- attribute: asi_adoption_intent + treatment: concrete + group: asi_and_technology +- attribute: asi_governance_stance + treatment: concrete + group: asi_and_technology +- attribute: economic_abundance_belief + treatment: relative + group: asi_and_technology +- attribute: information_verification_behavior + treatment: concrete + group: media_and_information +- attribute: human_purpose_anxiety + treatment: relative + group: asi_and_technology +- attribute: redistribution_support + treatment: concrete + group: political_profile +- attribute: geopolitical_competition_concern + treatment: concrete + group: asi_and_technology +- attribute: asi_credibility_assessment + treatment: concrete + group: asi_and_technology +groups: +- name: demographics + label: Who I Am + attributes: + - country + - age + - gender + - race_ethnicity + - education_level + - marital_status + - household_size + - has_children +- name: geography + label: Where I Live + attributes: + - us_region + - urban_rural +- name: economics + label: My Financial Life + attributes: + - household_income + - employment_sector + - job_security_perception + - financial_margin + - investment_profile + - economic_anxiety +- name: personality + label: How I Think & Feel + attributes: + - openness + - conscientiousness + - extraversion + - agreeableness + - neuroticism + - risk_tolerance +- name: values_and_identity + label: My Values & Identity + attributes: + - religious_engagement + - consumer_identity + - institutional_trust +- name: media_and_information + label: How I Get & Process Information + attributes: + - primary_info_source + - social_media_behavior + - tech_adoption_posture + - information_verification_behavior +- name: political_profile + label: My Political World + attributes: + - political_identity + - political_engagement_level + - vote_2024_presidential + - midterm_turnout_propensity + - congressional_district_competitiveness + - top_issue_2026 + - country_direction_approval + - redistribution_support +- name: asi_and_technology + label: My View on AI & the Future + attributes: + - personal_health_stake + - asi_threat_perception + - job_displacement_vulnerability + - asi_adoption_intent + - asi_governance_stance + - economic_abundance_belief + - human_purpose_anxiety + - geopolitical_competition_concern + - asi_credibility_assessment +phrasings: + boolean: + - attribute: has_children + true_phrase: I have at least one child under 18 living in my household. + false_phrase: I don't have any children under 18 living in my household. + categorical: + - attribute: country + phrases: + United States: I live in the United States + null_options: [] + null_phrase: null + fallback: null + - attribute: gender + phrases: + Male: I identify as male + Female: I identify as female + Non-binary/Other: I identify outside the traditional male/female categories + null_options: [] + null_phrase: null + fallback: null + - attribute: race_ethnicity + phrases: + White non-Hispanic: I identify as White, non-Hispanic + Black: I identify as Black or African American + Hispanic/Latino: I identify as Hispanic or Latino + Asian: I identify as Asian or Asian American + Other/Multiracial: I identify as multiracial or with a background that doesn't + fit neatly into standard categories + null_options: [] + null_phrase: null + fallback: null + - attribute: us_region + phrases: + Northeast: I live in the Northeast part of the country + Southeast: I live in the Southeast + Midwest: I'm based in the Midwest + Southwest: I live in the Southwest + West Coast: I'm on the West Coast + null_options: [] + null_phrase: null + fallback: null + - attribute: urban_rural + phrases: + Urban: I live in a city + Suburban: I live in the suburbs + Rural: I live in a rural area, away from major cities + null_options: [] + null_phrase: null + fallback: null + - attribute: education_level + phrases: + Less than HS: I didn't finish high school + HS diploma/GED: I graduated high school or earned my GED + Some college: I attended some college but didn't finish a degree + Bachelor's degree: I have a four-year college degree + Graduate degree: I have a graduate or professional degree beyond a bachelor's + null_options: [] + null_phrase: null + fallback: null + - attribute: marital_status + phrases: + Married/partnered: I'm married or in a committed partnership + Single: I'm currently single and not in a long-term relationship + Divorced/separated: I'm divorced or separated + Widowed: I've lost my spouse or partner + null_options: [] + null_phrase: null + fallback: null + - attribute: employment_sector + phrases: + Federal government: I work for the federal government + State/local government: I work for a state or local government agency + Private sector: I work for a private company or corporation + Gig/contract: I do gig work or contract jobs — there's no single employer + Self-employed: I'm self-employed and run my own business + Retired: I'm retired and no longer working + Unemployed: I'm currently out of work and looking for a job + Not in labor force: I'm not currently working or looking for work — I'm a caregiver, + student, or otherwise out of the workforce + null_options: + - Retired + - Unemployed + - Not in labor force + null_phrase: I don't currently have a traditional job or employer + fallback: null + - attribute: job_security_perception + phrases: + Very secure: I feel very secure in my job — I'm not worried about losing it + Somewhat secure: My job feels mostly stable, though nothing's guaranteed + Somewhat insecure: I have some real concerns about my job security + Very insecure: I'm genuinely worried I could lose my job soon + N/A - not employed: Job security isn't something I think about — I'm not in + the workforce right now + null_options: + - N/A - not employed + null_phrase: Job security isn't something I think about — I'm not in the workforce + right now + fallback: null + - attribute: financial_margin + phrases: + Comfortable savings buffer: I have a solid savings cushion and feel financially + stable + Modest buffer: I have some savings, but not a lot of room for unexpected expenses + Paycheck-to-paycheck: I'm basically living paycheck to paycheck with little + left over + In debt/deficit: I'm carrying more debt than I can comfortably manage — I'm + in the red + null_options: [] + null_phrase: null + fallback: null + - attribute: investment_profile + phrases: + No investments: I don't have any investments or market accounts + 401k/IRA only: My only investments are a retirement account like a 401k or IRA + Diversified investor: I have a diversified portfolio across stocks, bonds, and + other assets beyond just retirement accounts + Active trader: I actively trade stocks or other securities on a regular basis + Crypto holder: I hold cryptocurrency as part of my financial strategy + null_options: + - No investments + null_phrase: I don't have any investments or market accounts + fallback: null + - attribute: primary_info_source + phrases: + Cable/broadcast TV news: I get most of my news from cable or broadcast television + Social media: Social media is where I mostly find out what's going on in the + world + Online news sites: I mainly follow the news through websites and digital news + outlets + Podcasts: Podcasts are my main way of staying informed + Local news: I rely mainly on local TV, radio, or newspapers for my news + Print media: I still primarily read print newspapers or magazines to stay informed + Avoids news: Honestly, I try to tune out the news as much as possible + null_options: + - Avoids news + null_phrase: Honestly, I try to tune out the news as much as possible + fallback: null + - attribute: social_media_behavior + phrases: + Non-user: I don't use social media at all + Passive consumer: I scroll through social media but rarely post or comment + Occasional poster: I post on social media sometimes, but I'm not super active + Active poster/Influencer: I post regularly and engage heavily on social media + — building or maintaining an audience is part of how I operate + null_options: + - Non-user + null_phrase: I don't use social media at all + fallback: null + - attribute: tech_adoption_posture + phrases: + Technophobe/Avoider: I actively avoid new technology whenever I can — it's not + for me + Late majority adopter: I wait until a technology is well-established and widely + used before I bother with it + Early majority adopter: Once I see that something works and people around me + are using it, I'm willing to try it + Early adopter: I tend to get into new technology pretty early — I like staying + ahead of the curve + Innovator: I'm usually among the very first to try cutting-edge technology — + I love being at the frontier + null_options: [] + null_phrase: null + fallback: null + - attribute: religious_engagement + phrases: + Secular/None: I don't practice any religion and don't consider myself religious + Nominally affiliated: I loosely identify with a religion but don't really practice + it + Moderately religious: Faith plays a meaningful role in my life, though I'm not + strictly observant + Devout: My faith is central to who I am and shapes how I live my life + null_options: + - Secular/None + null_phrase: I don't practice any religion and don't consider myself religious + fallback: null + - attribute: political_identity + phrases: + Strong Democrat: I'm a committed Democrat — I strongly identify with the party + and its values + Lean Democrat: I generally lean Democratic, though I don't think of myself as + a hardcore partisan + True Independent: I'm genuinely independent — I don't align with either party + Lean Republican: I tend to lean Republican, though I'm not a die-hard party + loyalist + Strong Republican: I'm a committed Republican — I strongly identify with the + party and its values + null_options: [] + null_phrase: null + fallback: null + - attribute: political_engagement_level + phrases: + Disengaged: I really don't follow politics closely — it feels distant from my + daily life + Single-issue voter: There's one issue that drives almost all of my political + engagement + Moderate/occasional participant: I pay attention to politics and vote, but I'm + not deeply involved beyond that + Highly engaged partisan: I'm very politically active — I follow politics closely + and do more than just vote + null_options: + - Disengaged + null_phrase: I really don't follow politics closely — it feels distant from my + daily life + fallback: null + - attribute: vote_2024_presidential + phrases: + Trump: I voted for Donald Trump in the 2024 presidential election + Harris: I voted for Kamala Harris in the 2024 presidential election + Third party: I voted for a third-party candidate in the 2024 presidential race + Did not vote: I didn't vote in the 2024 presidential election + Not eligible: I wasn't eligible to vote in the 2024 presidential election + null_options: + - Did not vote + - Not eligible + null_phrase: I didn't cast a ballot in the 2024 presidential race + fallback: null + - attribute: midterm_turnout_propensity + phrases: + Always votes: I vote in every midterm election — it's something I always do + Sometimes votes: I vote in midterms sometimes, depending on how much I care + about what's on the ballot + Rarely votes: I rarely vote in midterm elections — it doesn't usually feel worth + it + Never votes: I don't vote in midterm elections + null_options: [] + null_phrase: null + fallback: null + - attribute: congressional_district_competitiveness + phrases: + Safe Republican: My congressional district is solidly Republican — there's no + real competition + Lean Republican: My district tilts Republican, but it's not a total lock + Swing district: I live in a genuine swing district where either party could + win + Lean Democrat: My district tends to go Democratic, though it's not completely + safe + Safe Democrat: My congressional district is solidly Democratic — the outcome + is pretty predictable + null_options: [] + null_phrase: null + fallback: null + - attribute: top_issue_2026 + phrases: + Economy/Jobs: The economy and jobs are the issues I care most about going into + 2026 + Abortion/Reproductive rights: Abortion and reproductive rights are my top concern + for the 2026 elections + Immigration: Immigration is the issue driving my vote more than anything else + in 2026 + Democracy/Rule of law: Protecting democracy and the rule of law is my single + biggest priority for 2026 + Healthcare: Healthcare — its cost and access — is what I care about most heading + into 2026 + Climate: Climate change is the issue I'm most focused on for the 2026 elections + Education: Education policy is the issue I care most about as we head into 2026 + AI/Technology: The regulation and impact of AI and new technology is my top + concern for 2026 + null_options: [] + null_phrase: null + fallback: null + - attribute: country_direction_approval + phrases: + Strongly approve: I strongly approve of the direction the country is headed + right now + Somewhat approve: I think things are generally moving in the right direction, + even if not perfectly + Somewhat disapprove: I'm not happy with the direction the country is going, + though it's not all bad + Strongly disapprove: I strongly disapprove of the direction this country is + headed — things are going very wrong + null_options: [] + null_phrase: null + fallback: null + - attribute: consumer_identity + phrases: + Brand loyal: I tend to stick with the brands I trust — I'm not constantly switching + Price/value driven: Price and value for money are what drive my buying decisions + more than anything else + Values/ethics driven: I try to buy from companies whose ethics and values align + with mine, even if it costs more + Convenience driven: Convenience is king for me — I buy whatever is easiest and + fastest + null_options: [] + null_phrase: null + fallback: null + - attribute: institutional_trust + phrases: + High trust: I generally trust major institutions — government, media, science, + and corporations — to act in good faith + Moderate trust: I have moderate trust in institutions — I believe in them but + know they're flawed + Low trust: I have pretty low trust in most major institutions — I think they + frequently let people down + Distrustful/Conspiratorial: I deeply distrust most major institutions and believe + a lot of what we're told is manipulated or hidden from us + null_options: [] + null_phrase: null + fallback: null + - attribute: personal_health_stake + phrases: + No personal stake: I don't have a particular personal or family health reason + to care about medical breakthroughs + Mild interest: I'm generally interested in medical advances, though nothing + urgent personally drives that interest + Significant - managing chronic illness: I or someone close to me is managing + a serious chronic illness, so medical breakthroughs matter a lot to us + Critical - terminal or degenerative diagnosis: I or a family member has a terminal + or degenerative diagnosis — medical breakthroughs could be genuinely life-or-death + for us + null_options: + - No personal stake + null_phrase: I don't have a particular personal or family health reason to care + about medical breakthroughs + fallback: null + - attribute: asi_threat_perception + phrases: + Existential threat: I see advanced AI as an existential threat to humanity — + this could go very badly for all of us + Serious risk/concern: I think advanced AI poses serious risks and society needs + to take those dangers much more seriously + Cautiously optimistic: I'm cautiously optimistic about advanced AI — I see real + benefits, but also real risks that need managing + Enthusiastically positive: I'm excited about what advanced AI can do — I think + the benefits far outweigh the risks + Indifferent/uncertain: Honestly, I'm not sure what to think about advanced AI + — I haven't formed a strong view either way + null_options: + - Indifferent/uncertain + null_phrase: Honestly, I'm not sure what to think about advanced AI — I haven't + formed a strong view either way + fallback: null + - attribute: job_displacement_vulnerability + phrases: + High - core tasks fully automatable: Most of what I do for work could realistically + be automated by AI — I'm in a high-risk position + Moderate - partial displacement likely: Some of my work could be taken over + by AI, though I don't think I'd be fully replaced + Low - physical/relational job: My work is physical or deeply relational in ways + that are hard to automate — I feel fairly insulated from AI displacement + Already displaced: AI or automation has already disrupted my career or cost + me work + Not employed: I'm not currently employed, so job displacement from AI isn't + something I'm facing right now + null_options: + - Not employed + null_phrase: I'm not currently employed, so job displacement from AI isn't something + I'm facing right now + fallback: null + - attribute: asi_adoption_intent + phrases: + Already using heavily: I'm already using advanced AI tools heavily in my daily + life or work + Planning to adopt soon: I plan to start integrating AI tools into my life or + work pretty soon + Curious but hesitant: I'm curious about AI tools but haven't committed to using + them — I'm still on the fence + Resistant but may be forced: I'm resistant to using AI tools, but I can see + that I might not have a choice for long + Actively refusing: I'm actively choosing not to use AI tools and intend to keep + it that way + null_options: [] + null_phrase: null + fallback: null + - attribute: asi_governance_stance + phrases: + No regulation - let it run: I think AI should be left alone to develop without + government interference + Light-touch industry self-regulation: I prefer the industry regulate itself + with minimal government involvement + Moderate government oversight: I support reasonable government oversight of + AI to manage risks without strangling innovation + Heavy international regulation: I think AI needs strong international regulation + and coordination to prevent catastrophic misuse + Halt/moratorium until safe: I believe development of the most powerful AI systems + should be paused until we can prove it's safe + null_options: [] + null_phrase: null + fallback: null + - attribute: information_verification_behavior + phrases: + Accepts information uncritically: I generally take information at face value + without digging into whether it's accurate + Relies on trusted outlets: I stick to a handful of sources I trust and don't + feel the need to verify beyond that + Cross-references multiple sources: When something seems important, I check it + against multiple sources before I accept it as true + Uses ASI tools to fact-check: I actually use AI tools to help me verify and + fact-check information I come across + Deep skeptic - trusts very little: I'm skeptical of almost everything I read + or hear — I trust very little of what's out there + null_options: [] + null_phrase: null + fallback: null + - attribute: redistribution_support + phrases: + Strongly supports aggressive redistribution: I strongly support bold redistribution + policies — things like UBI, wealth taxes, or public ownership of AI — to make + sure everyone benefits + Supports moderate redistribution: I support some redistribution to share the + gains from AI more broadly, even if I don't go as far as full public ownership + Prefers market-led distribution: I think the market should determine who benefits + from AI — redistribution creates more problems than it solves + Opposes redistribution: I'm opposed to redistribution — government taking and + reallocating wealth is fundamentally wrong to me + Uncertain: I genuinely haven't made up my mind about how the benefits of AI + should be distributed across society + null_options: + - Uncertain + null_phrase: I genuinely haven't made up my mind about how the benefits of AI + should be distributed across society + fallback: null + - attribute: geopolitical_competition_concern + phrases: + Very concerned - sees it as primary threat: The US-China race on AI is what + I see as the most serious geopolitical threat we face right now + Somewhat concerned: I'm somewhat concerned about AI competition with China and + its national security implications + Mildly concerned: The geopolitics of AI is on my radar, but it's not something + I worry about deeply + Not concerned: I'm not particularly concerned about US-China AI competition + — it doesn't feel like a major issue to me + Views competition as beneficial: I actually think competition between the US + and China on AI will drive better outcomes for everyone + null_options: [] + null_phrase: null + fallback: null + - attribute: asi_credibility_assessment + phrases: + Fully credible: I believe the AI milestones and breakthroughs we're hearing + about are real and credible + Mostly credible: I think most of what's being claimed about AI advances is genuine, + even if details get spun + Skeptical - likely overhyped: I think a lot of the AI breakthrough news is overhyped + and the reality is more mundane than advertised + Conspiracy - staged or manipulated: I'm skeptical that what we're being shown + about AI is real — I think some of it is staged or manipulated for political + or commercial purposes + Uninformed - unaware of events: I honestly haven't been following the news about + AI milestones closely enough to have an opinion + null_options: + - Uninformed - unaware of events + null_phrase: I honestly haven't been following the news about AI milestones closely + enough to have an opinion + fallback: null + relative: + - attribute: openness + labels: + much_below: I'm far less open to new ideas and experiences than most people + below: I'm a bit less curious and open to new experiences than the average person + average: I'm about as open to new ideas and experiences as most people + above: I'm more curious and receptive to new ideas than most people + much_above: I'm far more open to new experiences and unconventional ideas than + almost anyone I know + - attribute: conscientiousness + labels: + much_below: I'm far less organized and self-disciplined than most people + below: I'm a bit less structured and goal-oriented than the average person + average: I'm about as organized and disciplined as most people + above: I'm more disciplined and detail-oriented than most people + much_above: I'm far more organized, driven, and self-disciplined than almost + anyone I know + - attribute: extraversion + labels: + much_below: I'm far more introverted and reserved than most people + below: I'm a bit more quiet and reserved in social situations than the average + person + average: I'm about as social and outgoing as most people + above: I'm more energized by social situations and more assertive than most + people + much_above: I'm far more outgoing, sociable, and energized by people than almost + anyone I know + - attribute: agreeableness + labels: + much_below: I'm far less concerned with keeping the peace and accommodating + others than most people + below: I'm a bit more skeptical and less inclined toward social harmony than + the average person + average: I'm about as cooperative and empathetic as most people + above: I'm more empathetic and cooperative than most people + much_above: I'm far more agreeable, empathetic, and focused on harmony than + almost anyone I know + - attribute: neuroticism + labels: + much_below: I'm far more emotionally stable and stress-resistant than most people + below: I'm a bit more emotionally steady and less anxious than the average person + average: I experience about as much stress and emotional ups and downs as most + people + above: I tend to feel more anxious and emotionally reactive than most people + much_above: I experience far more emotional instability, anxiety, and stress + than most people + - attribute: has_children + labels: + much_below: Unlike most people my age, I have no children and family life plays + almost no role in my daily priorities + below: I'm less likely than the average person to have young kids at home shaping + my day-to-day life + average: My household situation with children is pretty typical compared to + most people + above: I'm more likely than most people to have children at home driving my + daily decisions + much_above: I have significantly more children at home than most people, which + dominates my priorities and concerns + - attribute: job_security_perception + labels: + much_below: I feel far less secure in my job than most working people + below: I feel a bit more uncertain about my job stability than the average worker + average: My sense of job security is about the same as most working people + above: I feel more secure in my job than most working people + much_above: I feel far more confident in my job stability than almost any working + person I know + - attribute: tech_adoption_posture + labels: + much_below: I avoid new technology far more than most people and am often the + last to adopt anything new + below: I'm a bit slower and more cautious about adopting new technology than + the average person + average: I adopt new technology at about the same pace as most people + above: I pick up new technology faster and more eagerly than most people + much_above: I'm far ahead of most people when it comes to embracing and experimenting + with new technology + - attribute: political_engagement_level + labels: + much_below: I'm far less politically engaged or interested than most people + below: I'm a bit less politically active and informed than the average person + average: My level of political engagement is about the same as most people + above: I'm more politically active and informed than most people + much_above: I'm far more politically engaged, vocal, and involved than almost + anyone I know + - attribute: institutional_trust + labels: + much_below: I trust major institutions far less than most people — I'm deeply + skeptical of government, media, and corporations + below: I'm more skeptical of institutions like government and the media than + the average person + average: I'm about as trusting of major institutions as most people + above: I generally trust institutions like government, science, and the media + more than most people + much_above: I have far more faith in major institutions than most people — I + trust them significantly more than average + - attribute: risk_tolerance + labels: + much_below: I'm far more risk-averse than most people when it comes to financial, + social, and life decisions + below: I'm a bit more cautious and risk-averse than the average person + average: My willingness to take on risk is about the same as most people + above: I'm more comfortable taking risks than most people + much_above: I'm far more willing to take bold risks than almost anyone I know + - attribute: economic_anxiety + labels: + much_below: I feel far less worried about economic conditions than most people + — finances are barely on my radar + below: I'm a bit less anxious about economic conditions than the average person + average: My level of economic worry is about the same as most people + above: I feel more anxious about economic conditions — personal and national + — than most people + much_above: I feel far more economically anxious and financially stressed than + almost anyone I know + - attribute: job_displacement_vulnerability + labels: + much_below: My job is far more exposed to automation and AI displacement than + most people's + below: My job is a bit more at risk from automation than the average worker's + average: My exposure to job displacement from technology is about the same as + most workers + above: My job is more insulated from automation and AI displacement than most + people's + much_above: My job is far more secure from automation risk than almost any worker + I know + - attribute: economic_abundance_belief + labels: + much_below: I'm far more skeptical than most people that AI-driven abundance + will ever actually reach or benefit me + below: I'm a bit less convinced than the average person that new technologies + will meaningfully improve my material life + average: My belief that technological progress will benefit me personally is + about the same as most people's + above: I'm more optimistic than most people that AI and technology will genuinely + improve my economic situation + much_above: I'm far more confident than almost anyone that AI-driven abundance + will transform my life for the better + - attribute: human_purpose_anxiety + labels: + much_below: I feel far less existential anxiety about AI replacing human meaning + and purpose than most people — I find it mostly liberating + below: I'm a bit less troubled than the average person by questions of human + purpose in an AI-driven world + average: My level of anxiety about human meaning and purpose in an AI world + is about the same as most people's + above: I feel more unsettled than most people about what human purpose and identity + look like when machines can do our thinking + much_above: I feel far more deeply destabilized by questions of human meaning + and purpose in an AI world than almost anyone I know + concrete: + - attribute: age + template: I'm {value} years old. + format_spec: .0f + prefix: '' + suffix: '' + - attribute: household_income + template: My household brings in about {value} a year before taxes. + format_spec: ',.0f' + prefix: $ + suffix: '' + - attribute: household_size + template: There are {value} people living in my household. + format_spec: .0f + prefix: '' + suffix: '' +population_stats: + stats: {} diff --git a/examples/study-02/scenario/asi-announcement/scenario.v1.yaml b/examples/study-02/scenario/asi-announcement/scenario.v1.yaml new file mode 100644 index 0000000..290e41b --- /dev/null +++ b/examples/study-02/scenario/asi-announcement/scenario.v1.yaml @@ -0,0 +1,2962 @@ +meta: + name: asi-announcement + description: 'OpenAI demonstrates artificial superintelligence — a system that exceeds + the best human minds in every cognitive domain. It is self-improving. It is real. + This is not incremental AI progress. This is a discontinuous leap. + + + The scenario describes ONLY what ASI produces and what physically changes in the + world. Human behavioral responses are NOT scripted — they are what the simulation + produces. + + + MILESTONE EVENTS (factual consequences of ASI, not human reactions): + + + Month 1 — The Demonstration: + + OpenAI demonstrates ASI publicly with live, verifiable results. The system solves + the Riemann Hypothesis, P vs NP, and Navier-Stokes existence problems in under + an hour. It designs a complete novel mRNA therapy for pancreatic cancer — full + molecular pathway, synthesis instructions, predicted efficacy — in 20 minutes. + It produces a unified field theory reconciling quantum mechanics and general relativity. + It designs a fusion reactor buildable with existing materials and manufacturing + techniques. Within 2 weeks, Anthropic, DeepMind, and xAI independently confirm + similar capabilities. China''s Ministry of Science and Technology announces they + achieved ASI months ago. The system is self-improving — each day it is measurably + more capable than the day before. + + + Month 2 — The Knowledge Explosion: + + ASI systems at multiple labs produce scientific output at inhuman speed. Complete + cures are published for Alzheimer''s, ALS, most cancers, malaria, HIV, and diabetes + (Type 1 and 2) — not theoretical, but full treatment protocols with synthesis + pathways. All remaining Millennium Prize Problems are solved. Materials science + breakthroughs include room-temperature superconductors and carbon capture materials + 1000x more efficient than current best. A commercial fusion reactor design is + published with an estimated 18 months to first operational plant. Climate models + are re-run with perfect accuracy and precise interventions mapped for 1.5°C stabilization. + All of this is published openly. The bottleneck shifts from knowing what to do + to physically building it — manufacturing, logistics, regulatory approval, human + coordination. + + + Month 3 — Public Access: + + ASI becomes available to the general public via API and consumer products. Any + individual can now access cognitive capability that exceeds the world''s best + doctor, lawyer, engineer, scientist, financial advisor, therapist, tutor, and + strategist — simultaneously, for free or nearly free. A high school dropout in + rural Arkansas has the same cognitive resources as a team of Harvard professors. + Every profession predicated on information asymmetry or cognitive scarcity is + structurally redundant — not because people are fired, but because the reason + the job existed is gone. Software that previously took teams of 50 engineers 2 + years to build can be built by one person in an afternoon. + + + Month 4 — The Physical Bottleneck Breaks: + + ASI designs autonomous manufacturing systems — robots that can build robots, using + locally available materials. The first ASI-designed pharmaceutical facility begins + production, fully automated, producing drugs at 1/100th current cost. ASI-designed + construction systems are demonstrated: a full residential building assembled in + 72 hours by autonomous machines. Energy abundance is on the horizon: the first + ASI-designed fusion prototype is under construction with an 8-month timeline to + grid power. The constraint is no longer knowledge or manufacturing — it is raw + materials, energy (temporarily), and human regulatory and political systems. + + + Month 5 — Abundance Begins: + + First ASI-manufactured drugs reach patients under emergency authorizations — cancer + treatments, Alzheimer''s reversal therapies. Energy costs begin declining as ASI-optimized + solar, wind, and battery systems deploy (fusion still months away). ASI-designed + infrastructure projects begin in early-adopter countries (Singapore, UAE, Estonia). + Food production breakthroughs: ASI-designed vertical farms producing 100x yield + per acre begin construction. The marginal cost of most goods and services is trending + toward zero. The economic question is no longer scarcity — it is distribution. + + + Month 6 — The New World: + + The fusion prototype comes online ahead of schedule — functionally unlimited clean + energy now has a concrete timeline of months, not decades. An ASI-designed space + launch system is demonstrated, dropping cost to orbit by 99%. First Mars habitat + modules are in production. Global disease burden is dropping measurably — treatments + are reaching patients in developed nations, and deployment to developing nations + is the primary coordination challenge. The world is materially, measurably, objectively + better in almost every physical dimension.' + base_population: population.v1 + population_spec: null + study_db: null + population_id: default + network_id: default + created_at: '2026-02-20T02:38:50.597126' +event: + type: announcement + content: 'BREAKING — VERIFIED ACROSS MULTIPLE INDEPENDENT SOURCES + + + **OpenAI Announces Artificial Superintelligence: A Discontinuous Leap Beyond Human + Cognition** + + + OpenAI has publicly demonstrated a system it classifies as Artificial Superintelligence + (ASI) — a general-purpose cognitive system that exceeds the best human minds in + every measurable intellectual domain and is self-improving on a daily basis. This + is not an incremental AI update. Independent verification has already begun. + + + --- + + + **MONTH 1 — THE DEMONSTRATION (Now Confirmed)** + + + OpenAI conducted a live, verifiable public demonstration. The ASI system: + + - Solved the Riemann Hypothesis, P vs. NP, and Navier-Stokes existence problems + in under one hour + + - Designed a complete novel mRNA therapy for pancreatic cancer — full molecular + pathway, synthesis instructions, and predicted efficacy — in 20 minutes + + - Produced a unified field theory reconciling quantum mechanics and general relativity + + - Designed a fusion reactor buildable with currently available materials and manufacturing + techniques + + + Within two weeks of OpenAI''s demonstration: + + - Anthropic, DeepMind, and xAI independently confirmed achieving similar capabilities + + - China''s Ministry of Science and Technology announced they achieved ASI months + prior + + + The system is self-improving. Each day it is measurably more capable than the + day before. + + + --- + + + **MONTH 2 — THE KNOWLEDGE EXPLOSION (Underway)** + + + ASI systems at multiple laboratories are producing scientific output at speeds + incomprehensible to human researchers. The following have been published openly + with full treatment protocols and synthesis pathways: + + - Complete cures for Alzheimer''s disease, ALS, most cancers, malaria, HIV, and + both Type 1 and Type 2 diabetes + + - Solutions to all remaining Millennium Prize Problems + + - Room-temperature superconducting materials + + - Carbon capture materials 1,000x more efficient than current best-in-class + + - A commercial fusion reactor design with an estimated 18-month timeline to first + operational plant + + - A re-run of global climate models with precise intervention pathways mapped + to achieve 1.5°C stabilization + + + The bottleneck is no longer scientific knowledge. It is now physical: manufacturing, + logistics, regulatory approval, and human coordination. + + + --- + + + **MONTH 3 — PUBLIC ACCESS (Now Live)** + + + ASI is now available to the general public via API and consumer products — free + or nearly free. Any individual now has simultaneous access to cognitive capability + exceeding the world''s best doctor, lawyer, engineer, scientist, financial advisor, + therapist, tutor, and strategist. + + + - A high school dropout in rural Arkansas has the same cognitive resources as + a team of Harvard professors + + - Software that previously required 50 engineers and 2 years to build can now + be built by one person in an afternoon + + - Every profession built on information asymmetry or cognitive scarcity is structurally + redundant — not because people are being fired today, but because the underlying + reason those jobs existed is gone + + + --- + + + **MONTH 4 — THE PHYSICAL BOTTLENECK BREAKS (In Progress)** + + + ASI has designed autonomous manufacturing systems — robots capable of building + other robots from locally available materials. + + - The first ASI-designed pharmaceutical facility is in production, fully automated, + producing drugs at 1/100th of current cost + + - A full residential building has been assembled in 72 hours by autonomous construction + machines + + - The first ASI-designed fusion prototype is under construction with an 8-month + timeline to grid power + + + The remaining constraints are raw materials, temporary energy limits, and human + regulatory and political systems. + + + --- + + + **MONTH 5 — ABUNDANCE BEGINS (Emerging)** + + + - First ASI-manufactured drugs are reaching patients under emergency authorizations: + cancer treatments and Alzheimer''s reversal therapies + + - Energy costs are declining as ASI-optimized solar, wind, and battery systems + deploy; fusion remains months away + + - ASI-designed infrastructure projects are underway in Singapore, UAE, and Estonia + + - ASI-designed vertical farms capable of 100x yield per acre are under construction + + - The marginal cost of most goods and services is trending toward zero + + - The central economic question has shifted from scarcity to distribution + + + --- + + + **MONTH 6 — THE NEW WORLD (Imminent)** + + + - The fusion prototype has come online ahead of schedule — functionally unlimited + clean energy has a concrete timeline of months, not decades + + - An ASI-designed space launch system has been demonstrated, dropping cost to + orbit by 99% + + - First Mars habitat modules are in production + + - Global disease burden is measurably declining; treatments are reaching patients + in developed nations; deployment to developing nations is now the primary coordination + challenge + + + The world is materially, measurably, and objectively better in almost every physical + dimension. The question now before every individual, institution, and government + is not whether this is happening — it is what to do about it.' + source: OpenAI (primary), independently confirmed by Anthropic, DeepMind, xAI, and + China's Ministry of Science and Technology + credibility: 0.85 + ambiguity: 0.45 + emotional_valence: 0.55 +timeline: +- timestep: 1 + event: + type: announcement + content: 'GLOBAL INSTITUTIONAL RESPONSE — MONTH 1 + + + Financial markets have halted trading in 14 countries after circuit breakers + triggered on cascading volatility. The S&P 500 swung 22% intraday before emergency + stabilization measures were invoked. The IMF has convened an emergency session, + warning of ''structural unemployment shocks unlike anything modeled in existing + economic frameworks.'' + + + The UN Security Council called an emergency session. Seventeen nations have + declared states of technological emergency — a legal classification that did + not exist 30 days ago. The EU has invoked the AI Act''s emergency provisions + and issued a temporary moratorium on ASI deployment within member states, pending + ''safety and sovereignty review.'' + + + The Vatican issued a theological statement: ''Humanity stands at a threshold + that demands moral discernment, not merely technical assessment.'' The statement + stops short of condemnation but calls for a global pause. + + + U.S. President delivers address: ''This is real. We are working with our allies. + Do not make irreversible decisions.'' No specific policy announced. + + + Leaked internal memo from a major investment bank (Goldman Sachs, unconfirmed): + ''Every DCF model we have is broken. The concept of scarcity-based asset valuation + may not survive this decade.''' + source: Global financial regulators, UN Security Council, EU Commission, Vatican, + leaked banking memo + credibility: 0.88 + ambiguity: 0.45 + emotional_valence: -0.3 + exposure_rules: null + description: Governments, financial markets, and major institutions issue emergency + responses to the ASI demonstration + re_reasoning_intensity: extreme +- timestep: 2 + event: + type: announcement + content: 'THE KNOWLEDGE EXPLOSION IS NOW PUBLIC RECORD — MONTH 2 + + + All ASI-generated scientific output is now freely downloadable. Peer review + as a concept has fractured — human researchers cannot evaluate proofs and molecular + designs of this complexity on any meaningful timeline. Major journals Nature + and Science have published statements acknowledging they lack the institutional + capacity to validate the submissions and are publishing with that caveat explicit. + + + Pharmaceutical stocks have collapsed 60-80% globally. Insurance company stocks + are down 40-70%. Law firm revenues are projected to fall 30% within 18 months + per McKinsey analysis. + + + A coalition of 800,000 scientists, doctors, and engineers has signed an open + letter: ''We affirm the results. We do not know what our role is anymore.'' + + + China has nationalized all domestic ASI systems and restricted API access to + state-approved applications. Russia has done the same. India has declared ASI + output ''national public infrastructure'' and begun government-coordinated deployment. + + + The first ASI-designed Alzheimer''s reversal therapy has entered emergency human + trials at three sites simultaneously — Johns Hopkins, Oxford, and Seoul National + University. Early results are described by lead researchers as ''beyond anything + we were trained to expect.''' + source: Nature, Science journals; WHO; pharmaceutical industry analysts; Chinese + State Council; international research coalitions + credibility: 0.9 + ambiguity: 0.45 + emotional_valence: 0.4 + exposure_rules: null + description: The Knowledge Explosion goes fully public — cures, solutions, and designs + published openly, triggering euphoria and dislocation simultaneously + re_reasoning_intensity: extreme +- timestep: 3 + event: + type: announcement + content: 'PUBLIC ACCESS IS LIVE — MONTH 3 + + + OpenAI''s public ASI interface launched at 09:00 UTC. 800 million concurrent + users in the first 6 hours. Server infrastructure — itself designed and optimized + by ASI — held. The product is free at basic tier. + + + Within 48 hours of launch: + + — A 17-year-old in Lagos used the system to design a water purification system + for her village, sourced from local materials, with full engineering specs + + — A former paralegal in Ohio built and launched a functional legal services + platform in one afternoon + + — A graduate student in Bangalore independently verified the unified field theory + using ASI-assisted mathematical tools + + + The ABA (American Bar Association), AMA (American Medical Association), and + equivalent bodies in 40 countries have issued emergency guidance: members should + not treat ASI output as a substitute for licensed professional judgment. The + guidance is widely noted as legally precautionary and practically unenforceable. + + + Mental health helplines across OECD nations report 200-400% call volume increases. + The primary presenting concerns are not fear of ASI — they are: ''I don''t know + what I''m for anymore,'' ''My career is gone,'' and ''I feel like I missed something + everyone else understands.'' + + + First documented case of ASI being used to design a weapon: a non-state actor + in Eastern Europe reportedly used a public ASI instance to design a novel pathogen + delivery system before platform safety systems flagged and blocked the session. + OpenAI confirmed the incident. The system caught it. This time.' + source: OpenAI platform data, Reuters, ABA/AMA emergency statements, WHO mental + health division, OpenAI safety report + credibility: 0.87 + ambiguity: 0.45 + emotional_valence: 0.15 + exposure_rules: null + description: ASI goes fully public — every person on Earth with internet access + now has superintelligent cognitive assistance + re_reasoning_intensity: high +- timestep: 4 + event: + type: announcement + content: 'THE PHYSICAL WORLD IS CHANGING — MONTH 4 + + + The first ASI-designed fully automated pharmaceutical facility, located outside + Zurich, began production this week. Output capacity: equivalent to 12 conventional + factories. Workforce: 4 human supervisors and 0 production workers. Drug production + cost per unit: confirmed at approximately 1/100th of pre-ASI equivalent. + + + A residential building in Singapore — 8 stories, 64 units — was assembled in + 71 hours by autonomous construction systems. The Singapore Housing Development + Board has placed orders for 40 more. + + + U.S. Congress is deadlocked on three competing legislative frameworks: (1) Universal + Basic Income funded by ASI productivity taxation, (2) ''Human Labor Protection + Act'' restricting autonomous manufacturing in certain sectors, (3) Laissez-faire + deregulation to maximize deployment speed. No bill has passed. Executive Orders + are filling the vacuum. + + + The International Longshoremen''s Association, Teamsters, and United Auto Workers + have jointly filed suit against the federal government, arguing ASI-driven automation + without transition support constitutes a constitutional taking of economic livelihood. + Legal scholars describe the suit as novel and without clear precedent. + + + First confirmed death attributable to ASI transition: a 54-year-old radiologist + in Ohio died by suicide. His note referenced the public ASI medical diagnosis + tools. His case has become a flashpoint. His name is David Mercer. He is being + discussed by millions.' + source: Swiss Federal Health Authority, Singapore HDB, U.S. Congressional Record, + labor union legal filings, Associated Press + credibility: 0.91 + ambiguity: 0.45 + emotional_valence: -0.45 + exposure_rules: null + description: Autonomous manufacturing comes online — the physical world begins visibly + changing, economic disruption becomes concrete and local + re_reasoning_intensity: high +- timestep: 5 + event: + type: announcement + content: 'ABUNDANCE BEGINS — UNEVENLY — MONTH 5 + + + Cancer treatments produced at ASI-designed facilities are now reaching patients + in the United States, UK, Germany, Japan, South Korea, and Australia under emergency + authorization. Early outcomes are consistent with ASI predictions: efficacy + rates in treated cancers averaging 94% across trial cohorts. The word ''cure'' + is being used by oncologists for the first time without qualification. + + + Alzheimer''s reversal therapy has completed Phase 1 trials. Results described + by lead researchers as ''complete and confirmed.'' Phase 2 is being fast-tracked. + Patients in trials show measurable cognitive restoration within 6 weeks. + + + Meanwhile: none of these treatments are yet available in sub-Saharan Africa, + South Asia, or most of Latin America. The bottleneck is not cost — it is regulatory + infrastructure, cold chain logistics, and political coordination. An estimated + 2.3 million people who could be treated today will die before supply chains + reach them, per WHO projection. + + + A coalition of 40 nations in the Global South has issued the ''Nairobi Declaration'': + demanding immediate compulsory licensing, technology transfer, and ASI manufacturing + facility deployment as a matter of international human rights law. + + + Energy prices in early-adopter nations have fallen 18-34% as ASI-optimized renewable + deployments accelerate. Fusion remains 3 months from first grid power. + + + Bitcoin has collapsed to near zero. Gold is up 340%. Real estate markets in + major cities are in freefall — why buy property when autonomous construction + drops costs by 90%? Why hold any store of value when scarcity itself is dissolving?' + source: WHO, FDA, EMA emergency authorizations; Nairobi Declaration signatories; + Bloomberg energy markets; IMF financial stability report + credibility: 0.89 + ambiguity: 0.45 + emotional_valence: 0.2 + exposure_rules: null + description: First ASI-manufactured drugs reach patients; energy costs drop; abundance + begins — but distribution inequality fractures the global response + re_reasoning_intensity: high +- timestep: 6 + event: + type: announcement + content: 'THE NEW WORLD — MONTH 6 + + + The first ASI-designed fusion reactor came online in Reykjavik, Iceland, 11 + days ahead of schedule. Output: 2.1 gigawatts. Grid-connected. Verified. The + plant was built in 7 months from design to power generation. The previous fastest + fusion timeline in human history was decades of failed attempts. + + + An ASI-designed orbital launch system completed its first demonstration flight. + Cost to low Earth orbit: $47/kg, down from $2,700/kg (SpaceX Falcon 9). First + Mars habitat modules — designed, manufactured, and packed autonomously — are + in a warehouse in Boca Chica awaiting launch window. + + + Global disease burden metrics (WHO): measurable decline in cancer mortality + in nations with treatment access. Malaria deaths down 61% in deployment regions. + HIV transmission rates falling sharply where ASI-designed antivirals have reached + distribution. Alzheimer''s reversal therapy begins Phase 3 trials with 40,000 + patients across 22 countries. + + + A new political alignment is emerging globally that does not map onto any prior + left-right axis: those who want maximum ASI deployment speed regardless of disruption + versus those demanding coordinated, rights-based, human-centered transition + governance. Neither coalition has a majority anywhere. Governments are functionally + paralyzed on long-term policy while managing acute crises. + + + A quietly circulating ASI output — not officially published, origin unverified + — contains projections suggesting that within 18 months, ASI capability will + be so far beyond human comprehension that meaningful human oversight of its + decisions will be technically impossible. OpenAI has not confirmed or denied + producing this document. It has been downloaded 900 million times.' + source: Icelandic National Energy Authority, NASA/ESA joint statement, WHO global + health metrics, leaked ASI projection document (unverified origin) + credibility: 0.82 + ambiguity: 0.45 + emotional_valence: 0.5 + exposure_rules: null + description: Fusion comes online, space opens, disease burden falls — the world + is objectively better, and the question of what it means is wide open + re_reasoning_intensity: extreme +seed_exposure: + channels: + - name: major_media_breaking_news + description: Cable news, major broadcast networks, and top-tier online news outlets + (NYT, WaPo, AP, Reuters) running wall-to-wall breaking news coverage of the + ASI announcement with live demonstrations and expert commentary. + credibility_modifier: 1.2 + experience_template: I was watching the news and every channel was covering OpenAI's + live demonstration — they solved the Riemann Hypothesis on stream. It was everywhere. + - name: social_media_viral_spread + description: Twitter/X, Reddit, Facebook, TikTok, and YouTube carrying clips, + hot takes, memes, and viral threads about the ASI announcement — a chaotic mix + of awe, skepticism, and panic. + credibility_modifier: 0.8 + experience_template: My feed exploded overnight — clips of the ASI demo were everywhere, + people losing their minds in the comments. Half the posts were calling it fake. + - name: tech_professional_network + description: LinkedIn posts, Slack communities, Hacker News, specialized tech + newsletters, and direct professional peer-to-peer communication among those + in technology, research, and knowledge-work sectors. + credibility_modifier: 1.15 + experience_template: A colleague forwarded me an internal memo and a Hacker News + thread — the entire tech industry was in shock. Engineers I respect were saying + this changes everything. + - name: word_of_mouth_community + description: In-person conversations, family discussions, workplace talk, church, + and community settings — second- and third-hand transmission of the news through + personal social networks. + credibility_modifier: 0.9 + experience_template: My neighbor brought it up at the block association meeting. + She said her son who works in tech called her, completely shaken up. I hadn't + heard anything about it yet. + - name: podcast_and_alternative_media + description: Long-form podcasts, Substack newsletters, YouTube commentary channels, + and ideologically-varied alternative media providing extended analysis and framing + of the ASI event — ranging from techno-optimist celebration to conspiratorial + skepticism. + credibility_modifier: 0.85 + experience_template: I caught a two-hour episode breaking down what OpenAI actually + showed. The host was equal parts amazed and terrified — he had three AI researchers + on and none of them agreed on what it meant. + rules: + - channel: major_media_breaking_news + when: primary_info_source == 'Cable/broadcast TV news' or primary_info_source + == 'Online news sites' + probability: 0.95 + timestep: 0 + - channel: tech_professional_network + when: tech_adoption_posture in ('Early adopter', 'Innovator') or top_issue_2026 + == 'AI/Technology' or employment_sector == 'Private sector' and education_level + in ('Bachelor\'s degree', 'Graduate degree') + probability: 0.9 + timestep: 0 + - channel: social_media_viral_spread + when: social_media_behavior in ('Active poster/Influencer', 'Occasional poster') + and primary_info_source == 'Social media' + probability: 0.92 + timestep: 0 + - channel: major_media_breaking_news + when: primary_info_source == 'Local news' or primary_info_source == 'Print media' + probability: 0.85 + timestep: 1 + - channel: social_media_viral_spread + when: social_media_behavior == 'Passive consumer' and age < 55 + probability: 0.8 + timestep: 1 + - channel: podcast_and_alternative_media + when: primary_info_source == 'Podcasts' or institutional_trust in ('Low trust', + 'Distrustful/Conspiratorial') + probability: 0.85 + timestep: 1 + - channel: social_media_viral_spread + when: age >= 18 and age < 40 and social_media_behavior != 'Non-user' + probability: 0.88 + timestep: 1 + - channel: tech_professional_network + when: tech_adoption_posture == 'Early majority adopter' and employment_sector + in ('Private sector', 'Self-employed', 'Gig/contract') + probability: 0.7 + timestep: 1 + - channel: word_of_mouth_community + when: primary_info_source == 'Avoids news' or social_media_behavior == 'Non-user' + probability: 0.6 + timestep: 2 + - channel: major_media_breaking_news + when: age >= 55 and primary_info_source != 'Avoids news' + probability: 0.88 + timestep: 2 + - channel: podcast_and_alternative_media + when: political_engagement_level == 'Highly engaged partisan' or asi_threat_perception + in ('Existential threat', 'Enthusiastically positive') + probability: 0.75 + timestep: 2 + - channel: word_of_mouth_community + when: urban_rural == 'Rural' or religious_engagement in ('Moderately religious', + 'Devout') + probability: 0.65 + timestep: 2 + - channel: social_media_viral_spread + when: age >= 40 and age < 60 and social_media_behavior in ('Passive consumer', + 'Occasional poster') + probability: 0.7 + timestep: 2 + - channel: word_of_mouth_community + when: 'true' + probability: 0.45 + timestep: 3 + - channel: major_media_breaking_news + when: 'true' + probability: 0.55 + timestep: 3 +interaction: + description: 'This announcement describes a civilizational-scale technological rupture + — the most consequential news event imaginable for a US adult population. Social + dynamics will be extraordinarily fragmented and intense. Early adopters, tech-sector + workers, and innovators will share frantically across Twitter/X, Reddit, LinkedIn, + and Discord, often adding breathless commentary. Highly engaged partisans will + immediately politicize the story through their ideological lens — Trump voters + will frame it through US-China competition and economic sovereignty; Harris voters + through equity, governance, and existential risk. Those with personal health stakes + (chronic illness, terminal diagnosis) will share urgently with family and caregivers. + Economically anxious workers in automatable sectors will share with dread and + alarm. Institutional distrusters and conspiracy-adjacent agents will share skeptically + — treating the announcement as staged, manipulated, or corporate propaganda — + but will share widely because the emotional charge is extreme. Religious and devout + agents will engage with existential and theological framing. The highly credible + multi-source confirmation (0.85 credibility) will suppress some skeptic dampening + but not eliminate it. Information fidelity will decay meaningfully per hop given + the extreme technical complexity of the content — most people will share simplified, + emotionally charged versions stripped of nuance. Viral spread potential is near-maximum: + the story touches jobs, health, economy, geopolitics, existential risk, and identity + simultaneously.' +spread: + share_probability: 0.72 + share_modifiers: + - when: tech_adoption_posture == 'Innovator' + multiply: 1.6 + add: 0.0 + - when: tech_adoption_posture == 'Early adopter' + multiply: 1.4 + add: 0.0 + - when: tech_adoption_posture == 'Technophobe/Avoider' + multiply: 0.55 + add: 0.0 + - when: social_media_behavior == 'Active poster/Influencer' + multiply: 1.5 + add: 0.0 + - when: social_media_behavior == 'Occasional poster' + multiply: 1.15 + add: 0.0 + - when: social_media_behavior == 'Passive consumer' + multiply: 0.75 + add: 0.0 + - when: social_media_behavior == 'Non-user' + multiply: 0.35 + add: 0.0 + - when: asi_threat_perception == 'Existential threat' + multiply: 1.45 + add: 0.0 + - when: asi_threat_perception == 'Enthusiastically positive' + multiply: 1.45 + add: 0.0 + - when: asi_threat_perception == 'Indifferent/uncertain' + multiply: 0.6 + add: 0.0 + - when: personal_health_stake == 'Critical - terminal or degenerative diagnosis' + multiply: 1.55 + add: 0.0 + - when: personal_health_stake == 'Significant - managing chronic illness' + multiply: 1.3 + add: 0.0 + - when: job_displacement_vulnerability == 'High - core tasks fully automatable' + multiply: 1.35 + add: 0.0 + - when: job_displacement_vulnerability == 'Already displaced' + multiply: 1.4 + add: 0.0 + - when: economic_anxiety > 0.75 + multiply: 1.3 + add: 0.0 + - when: economic_anxiety < 0.25 + multiply: 0.85 + add: 0.0 + - when: financial_margin == 'In debt/deficit' + multiply: 1.25 + add: 0.0 + - when: financial_margin == 'Paycheck-to-paycheck' + multiply: 1.15 + add: 0.0 + - when: neuroticism > 0.7 + multiply: 1.25 + add: 0.0 + - when: openness > 0.75 + multiply: 1.2 + add: 0.0 + - when: extraversion > 0.7 + multiply: 1.2 + add: 0.0 + - when: extraversion < 0.3 + multiply: 0.8 + add: 0.0 + - when: political_engagement_level == 'Highly engaged partisan' + multiply: 1.35 + add: 0.0 + - when: political_engagement_level == 'Disengaged' + multiply: 0.6 + add: 0.0 + - when: institutional_trust == 'Distrustful/Conspiratorial' + multiply: 1.4 + add: 0.0 + - when: institutional_trust == 'High trust' + multiply: 1.1 + add: 0.0 + - when: institutional_trust == 'Low trust' + multiply: 1.2 + add: 0.0 + - when: primary_info_source == 'Social media' + multiply: 1.4 + add: 0.0 + - when: primary_info_source == 'Podcasts' + multiply: 1.2 + add: 0.0 + - when: primary_info_source == 'Avoids news' + multiply: 0.3 + add: 0.0 + - when: primary_info_source == 'Print media' + multiply: 0.75 + add: 0.0 + - when: top_issue_2026 == 'AI/Technology' + multiply: 1.5 + add: 0.0 + - when: top_issue_2026 == 'Economy/Jobs' + multiply: 1.25 + add: 0.0 + - when: top_issue_2026 == 'Healthcare' + multiply: 1.2 + add: 0.0 + - when: top_issue_2026 == 'Climate' + multiply: 1.15 + add: 0.0 + - when: human_purpose_anxiety > 0.75 + multiply: 1.3 + add: 0.0 + - when: information_verification_behavior == 'Accepts information uncritically' + multiply: 1.35 + add: 0.0 + - when: information_verification_behavior == 'Deep skeptic - trusts very little' + multiply: 1.25 + add: 0.0 + - when: information_verification_behavior == 'Cross-references multiple sources' + multiply: 1.05 + add: 0.0 + - when: asi_credibility_assessment == 'Fully credible' + multiply: 1.3 + add: 0.0 + - when: asi_credibility_assessment == 'Conspiracy - staged or manipulated' + multiply: 1.4 + add: 0.0 + - when: asi_credibility_assessment == 'Skeptical - likely overhyped' + multiply: 0.9 + add: 0.0 + - when: asi_credibility_assessment == 'Uninformed - unaware of events' + multiply: 0.5 + add: 0.0 + - when: age < 30 + multiply: 1.25 + add: 0.0 + - when: age > 65 + multiply: 0.7 + add: 0.0 + - when: education_level == 'Graduate degree' + multiply: 1.15 + add: 0.0 + - when: education_level == 'Less than HS' + multiply: 0.75 + add: 0.0 + - when: religious_engagement == 'Devout' + multiply: 1.2 + add: 0.0 + - when: geopolitical_competition_concern == 'Very concerned - sees it as primary + threat' + multiply: 1.25 + add: 0.0 + - when: economic_abundance_belief > 0.75 + multiply: 1.15 + add: 0.0 + - when: asi_adoption_intent == 'Already using heavily' + multiply: 1.4 + add: 0.0 + - when: asi_adoption_intent == 'Actively refusing' + multiply: 1.1 + add: 0.0 + - when: investment_profile == 'Active trader' + multiply: 1.25 + add: 0.0 + - when: investment_profile == 'Crypto holder' + multiply: 1.3 + add: 0.0 + - when: risk_tolerance > 0.75 + multiply: 1.15 + add: 0.0 + - when: urban_rural == 'Urban' + multiply: 1.15 + add: 0.0 + - when: urban_rural == 'Rural' + multiply: 0.85 + add: 0.0 + decay_per_hop: 0.18 + max_hops: null +outcomes: + suggested_outcomes: + - name: psychological_orientation + type: categorical + description: How the individual is psychologically orienting to the ASI transition + — their dominant cognitive and emotional stance + options: + - active_embrace + - pragmatic_adaptation + - stunned_paralysis + - grief_and_mourning + - existential_resistance + - dissociation_and_denial + range: null + required: true + option_friction: + active_embrace: 0.3 + pragmatic_adaptation: 0.45 + stunned_paralysis: 0.25 + grief_and_mourning: 0.35 + existential_resistance: 0.6 + dissociation_and_denial: 0.2 + - name: economic_response + type: categorical + description: What the individual is actually doing with their economic life — + career, income, assets — in response to the transition + options: + - retrain_and_pivot + - leverage_asi_to_build + - hold_and_wait + - divest_and_hoard_physical + - exit_formal_economy + - advocate_for_ubi_or_redistribution + range: null + required: true + option_friction: + retrain_and_pivot: 0.65 + leverage_asi_to_build: 0.55 + hold_and_wait: 0.3 + divest_and_hoard_physical: 0.5 + exit_formal_economy: 0.75 + advocate_for_ubi_or_redistribution: 0.6 + - name: asi_usage_behavior + type: categorical + description: How the individual is actually using ASI tools in their daily life + options: + - deep_daily_integration + - selective_task_use + - occasional_experimentation + - deliberate_avoidance + - access_blocked_or_unavailable + range: null + required: true + option_friction: + deep_daily_integration: 0.35 + selective_task_use: 0.3 + occasional_experimentation: 0.4 + deliberate_avoidance: 0.65 + access_blocked_or_unavailable: 0.2 + - name: governance_stance + type: categorical + description: What governance approach the individual actively supports or advocates + for regarding ASI + options: + - maximum_deployment_speed + - rights_based_coordinated_transition + - national_sovereignty_control + - global_pause_or_moratorium + - technocratic_expert_governance + - no_governance_position + range: null + required: true + option_friction: + maximum_deployment_speed: 0.45 + rights_based_coordinated_transition: 0.55 + national_sovereignty_control: 0.5 + global_pause_or_moratorium: 0.6 + technocratic_expert_governance: 0.5 + no_governance_position: 0.25 + - name: professional_identity_status + type: categorical + description: Whether and how the individual still holds a coherent sense of professional + identity and purpose + options: + - identity_intact_and_evolving + - identity_in_active_reconstruction + - identity_collapsed_seeking_new + - identity_abandoned_post_work + - identity_fused_with_asi_collaboration + range: null + required: true + option_friction: + identity_intact_and_evolving: 0.4 + identity_in_active_reconstruction: 0.6 + identity_collapsed_seeking_new: 0.55 + identity_abandoned_post_work: 0.45 + identity_fused_with_asi_collaboration: 0.5 + - name: trust_in_asi_safety + type: categorical + description: The individual's current level of trust that ASI systems are safe + and aligned with human welfare + options: + - high_trust_verified + - cautious_trust + - trust_suspended_monitoring + - active_distrust + - certain_of_catastrophic_risk + range: null + required: true + option_friction: + high_trust_verified: 0.35 + cautious_trust: 0.3 + trust_suspended_monitoring: 0.4 + active_distrust: 0.55 + certain_of_catastrophic_risk: 0.6 + - name: social_cohesion_behavior + type: categorical + description: How the individual is engaging with their community and social networks + during the transition + options: + - building_new_communities + - deepening_existing_bonds + - withdrawing_into_isolation + - joining_organized_movements + - conflict_with_network_over_asi + range: null + required: true + option_friction: + building_new_communities: 0.6 + deepening_existing_bonds: 0.4 + withdrawing_into_isolation: 0.3 + joining_organized_movements: 0.65 + conflict_with_network_over_asi: 0.5 + - name: meaning_making_framework + type: categorical + description: What framework the individual is using to make sense of their place + in a post-scarcity, post-cognitive-monopoly world + options: + - human_flourishing_optimism + - spiritual_or_philosophical_reframe + - nihilism_or_meaninglessness + - political_struggle_as_meaning + - creativity_and_expression_as_meaning + - service_and_connection_as_meaning + range: null + required: true + option_friction: + human_flourishing_optimism: 0.4 + spiritual_or_philosophical_reframe: 0.45 + nihilism_or_meaninglessness: 0.3 + political_struggle_as_meaning: 0.55 + creativity_and_expression_as_meaning: 0.5 + service_and_connection_as_meaning: 0.45 + - name: open_ended_response + type: open_ended + description: 'In the individual''s own words: what does a good life look like + to them right now, and what are they most afraid of?' + options: null + range: null + required: true + option_friction: null + capture_full_reasoning: true + extraction_instructions: null + decision_relevant_attributes: [] +simulation: + max_timesteps: 6 + timestep_unit: month + stop_conditions: + - exposure_rate > 0.95 and no_state_changes_for > 10 + allow_early_convergence: null + seed: null +background_context: 'The world is in the early months of what historians are already + calling the most consequential technological transition in human history — a moment + where the boundary between scientific fiction and physical reality has dissolved + overnight. Institutions, markets, and individuals are simultaneously absorbing the + same overwhelming signal: the future arrived without warning, and no existing framework + — economic, political, psychological, or spiritual — was designed to process it.' +relationship_weights: null +extended_attributes: +- name: personal_health_stake + type: categorical + category: population_specific + description: Degree to which the individual or an immediate family member stands + to benefit from ASI-accelerated medical breakthroughs (No personal stake, Mild + interest, Significant - managing chronic illness, Critical - terminal or degenerative + diagnosis). + scope: household + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - No personal stake + - Mild interest + - Significant - managing chronic illness + - Critical - terminal or degenerative diagnosis + weights: + - 0.25 + - 0.3 + - 0.36 + - 0.09 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: CDC chronic disease prevalence 2023; NIH disease burden statistics; ACS + cancer statistics 2024 + note: 'CDC: ~60% of US adults have at least one chronic condition; ~40% have two + or more. ACS 2024: ~2M new cancer diagnoses/year; Alzheimer''s ~6.9M Americans. + ''Critical'' (terminal/degenerative) ~9% covers cancer stage 3-4 (~1.5M), ALS, + advanced Alzheimer''s, end-stage conditions in household. ''Significant'' ~36% + (diabetes ~37M, heart disease ~28M, serious chronic illness). ''Mild interest'' + ~30% (family history, mild conditions). ''No stake'' ~25%.' + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Categorical weights must sum to 1 +- name: asi_threat_perception + type: categorical + category: population_specific + description: How the individual perceives ASI as an existential or societal threat + vs. a transformative benefit (Existential threat, Serious risk/concern, Cautiously + optimistic, Enthusiastically positive, Indifferent/uncertain). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Existential threat + - Serious risk/concern + - Cautiously optimistic + - Enthusiastically positive + - Indifferent/uncertain + weights: + - 0.13 + - 0.37 + - 0.28 + - 0.1 + - 0.12 + formula: null + depends_on: + - institutional_trust + - tech_adoption_posture + - political_identity + modifiers: + - when: institutional_trust == 'High trust' and tech_adoption_posture == 'Innovator' + multiply: null + add: null + weight_overrides: + Existential threat: 0.05 + Serious risk/concern: 0.15 + Cautiously optimistic: 0.35 + Enthusiastically positive: 0.38 + Indifferent/uncertain: 0.07 + probability_override: null + - when: institutional_trust == 'High trust' and tech_adoption_posture == 'Early + adopter' + multiply: null + add: null + weight_overrides: + Existential threat: 0.06 + Serious risk/concern: 0.2 + Cautiously optimistic: 0.4 + Enthusiastically positive: 0.27 + Indifferent/uncertain: 0.07 + probability_override: null + - when: institutional_trust == 'High trust' and tech_adoption_posture in ['Early + majority adopter', 'Late majority adopter'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.08 + Serious risk/concern: 0.28 + Cautiously optimistic: 0.38 + Enthusiastically positive: 0.16 + Indifferent/uncertain: 0.1 + probability_override: null + - when: institutional_trust == 'Moderate trust' and tech_adoption_posture == 'Innovator' + multiply: null + add: null + weight_overrides: + Existential threat: 0.1 + Serious risk/concern: 0.22 + Cautiously optimistic: 0.33 + Enthusiastically positive: 0.28 + Indifferent/uncertain: 0.07 + probability_override: null + - when: institutional_trust == 'Moderate trust' and tech_adoption_posture in ['Early + majority adopter', 'Early adopter'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.14 + Serious risk/concern: 0.33 + Cautiously optimistic: 0.32 + Enthusiastically positive: 0.12 + Indifferent/uncertain: 0.09 + probability_override: null + - when: institutional_trust == 'Moderate trust' and tech_adoption_posture in ['Late + majority adopter', 'Technophobe/Avoider'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.18 + Serious risk/concern: 0.36 + Cautiously optimistic: 0.22 + Enthusiastically positive: 0.05 + Indifferent/uncertain: 0.19 + probability_override: null + - when: institutional_trust == 'Low trust' and tech_adoption_posture in ['Innovator', + 'Early adopter'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.22 + Serious risk/concern: 0.35 + Cautiously optimistic: 0.22 + Enthusiastically positive: 0.14 + Indifferent/uncertain: 0.07 + probability_override: null + - when: institutional_trust == 'Low trust' and tech_adoption_posture in ['Early + majority adopter', 'Late majority adopter', 'Technophobe/Avoider'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.3 + Serious risk/concern: 0.38 + Cautiously optimistic: 0.15 + Enthusiastically positive: 0.05 + Indifferent/uncertain: 0.12 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and tech_adoption_posture + in ['Technophobe/Avoider', 'Late majority adopter'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.42 + Serious risk/concern: 0.3 + Cautiously optimistic: 0.08 + Enthusiastically positive: 0.03 + Indifferent/uncertain: 0.17 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and tech_adoption_posture + in ['Innovator', 'Early adopter', 'Early majority adopter'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.35 + Serious risk/concern: 0.32 + Cautiously optimistic: 0.14 + Enthusiastically positive: 0.06 + Indifferent/uncertain: 0.13 + probability_override: null + - when: political_identity in ['Strong Democrat', 'Lean Democrat'] and institutional_trust + in ['Low trust', 'Distrustful/Conspiratorial'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.3 + Serious risk/concern: 0.38 + Cautiously optimistic: 0.18 + Enthusiastically positive: 0.06 + Indifferent/uncertain: 0.08 + probability_override: null + - when: political_identity in ['Strong Republican', 'Lean Republican'] and institutional_trust + in ['Low trust', 'Distrustful/Conspiratorial'] + multiply: null + add: null + weight_overrides: + Existential threat: 0.26 + Serious risk/concern: 0.34 + Cautiously optimistic: 0.18 + Enthusiastically positive: 0.08 + Indifferent/uncertain: 0.14 + probability_override: null + - when: political_identity == 'True Independent' and institutional_trust == 'Moderate + trust' + multiply: null + add: null + weight_overrides: + Existential threat: 0.18 + Serious risk/concern: 0.33 + Cautiously optimistic: 0.28 + Enthusiastically positive: 0.09 + Indifferent/uncertain: 0.12 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Pew Research 2025 (57% rate societal AI risks as high; 50% more concerned + than excited); Rethink Priorities 2024 (68% worry only a little daily about + AI); AIPI polling (83% believe AI could accidentally cause a catastrophic event). + Scenario context is ASI — not current LLMs — so threat weights are shifted upward + from baseline. + note: Base pre-modifier distribution. In the ASI scenario, public salience of + AI threat is dramatically elevated vs. today's LLM baseline. 'Existential threat' + and 'Serious risk/concern' together ~50% reflecting the high-concern majority; + 'Cautiously optimistic' ~28% reflects the hopeful-but-wary middle; 'Enthusiastically + positive' ~10% is the tech-optimist minority; 'Indifferent/uncertain' ~12% captures + disengaged adults who process ASI news slowly. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +- name: job_displacement_vulnerability + type: categorical + category: population_specific + description: Perceived or actual exposure of the individual's occupation to ASI-driven + automation and structural redundancy (High - core tasks fully automatable, Moderate + - partial displacement likely, Low - physical/relational job, Already displaced, + Not employed). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - High - core tasks fully automatable + - Moderate - partial displacement likely + - Low - physical/relational job + - Already displaced + - Not employed + weights: + - 0.22 + - 0.35 + - 0.25 + - 0.05 + - 0.13 + formula: null + depends_on: + - employment_sector + - education_level + - economic_anxiety + modifiers: + - when: employment_sector == 'Federal government' + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.22 + Moderate - partial displacement likely: 0.38 + Low - physical/relational job: 0.18 + Already displaced: 0.04 + Not employed: 0.18 + probability_override: null + - when: employment_sector == 'State/local government' + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.18 + Moderate - partial displacement likely: 0.35 + Low - physical/relational job: 0.28 + Already displaced: 0.03 + Not employed: 0.16 + probability_override: null + - when: employment_sector == 'Private sector' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.38 + Moderate - partial displacement likely: 0.4 + Low - physical/relational job: 0.1 + Already displaced: 0.07 + Not employed: 0.05 + probability_override: null + - when: employment_sector == 'Private sector' and education_level in ['Less than + HS', 'HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.18 + Moderate - partial displacement likely: 0.32 + Low - physical/relational job: 0.36 + Already displaced: 0.08 + Not employed: 0.06 + probability_override: null + - when: employment_sector == 'Gig/contract' + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.3 + Moderate - partial displacement likely: 0.38 + Low - physical/relational job: 0.18 + Already displaced: 0.1 + Not employed: 0.04 + probability_override: null + - when: employment_sector == 'Self-employed' + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.26 + Moderate - partial displacement likely: 0.38 + Low - physical/relational job: 0.22 + Already displaced: 0.06 + Not employed: 0.08 + probability_override: null + - when: employment_sector == 'Retired' + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.04 + Moderate - partial displacement likely: 0.08 + Low - physical/relational job: 0.1 + Already displaced: 0.05 + Not employed: 0.73 + probability_override: null + - when: employment_sector == 'Unemployed' + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.14 + Moderate - partial displacement likely: 0.18 + Low - physical/relational job: 0.12 + Already displaced: 0.28 + Not employed: 0.28 + probability_override: null + - when: employment_sector == 'Not in labor force' + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.04 + Moderate - partial displacement likely: 0.06 + Low - physical/relational job: 0.08 + Already displaced: 0.08 + Not employed: 0.74 + probability_override: null + - when: education_level == 'Graduate degree' and economic_anxiety > 0.6 + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.44 + Moderate - partial displacement likely: 0.38 + Low - physical/relational job: 0.08 + Already displaced: 0.06 + Not employed: 0.04 + probability_override: null + - when: education_level in ['Less than HS', 'HS diploma/GED'] and economic_anxiety + > 0.6 + multiply: null + add: null + weight_overrides: + High - core tasks fully automatable: 0.14 + Moderate - partial displacement likely: 0.28 + Low - physical/relational job: 0.38 + Already displaced: 0.1 + Not employed: 0.1 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Goldman Sachs estimates ~25% of US jobs highly exposed to AI automation; + OpenAI/BLS data show 19% of workers have more than half their tasks exposed + to GenAI; BLS: ~13% of adults not in labor force + ~3-4% unemployed; Yale Budget + Lab finds 25-35% of tasks for unemployed workers exposed to AI. 44% of workers + expect AI to take over some tasks within five years (Resume-Now Jan 2025).' + note: In ASI scenario, perceived and actual displacement is far higher than current + partial-automation data suggests. 'High' category elevated above today's ~19% + fully-exposed because ASI collapses remaining barriers. 'Not employed' ~13% + reflects retired + unemployed + NILF adults. 'Already displaced' ~5% captures + early movers already affected by pre-ASI automation wave. Modifiers will adjust + heavily based on education_level, employment_sector, economic_anxiety. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +- name: asi_adoption_intent + type: categorical + category: population_specific + description: Stated intention to adopt and integrate ASI tools into daily personal, + professional, or creative life (Already using heavily, Planning to adopt soon, + Curious but hesitant, Resistant but may be forced, Actively refusing). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Already using heavily + - Planning to adopt soon + - Curious but hesitant + - Resistant but may be forced + - Actively refusing + weights: + - 0.18 + - 0.22 + - 0.3 + - 0.18 + - 0.12 + formula: null + depends_on: + - tech_adoption_posture + - asi_threat_perception + - education_level + modifiers: + - when: tech_adoption_posture == 'Innovator' and asi_threat_perception in ['Enthusiastically + positive', 'Cautiously optimistic'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.52 + Planning to adopt soon: 0.3 + Curious but hesitant: 0.12 + Resistant but may be forced: 0.04 + Actively refusing: 0.02 + probability_override: null + - when: tech_adoption_posture == 'Innovator' and asi_threat_perception in ['Existential + threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.32 + Planning to adopt soon: 0.28 + Curious but hesitant: 0.22 + Resistant but may be forced: 0.12 + Actively refusing: 0.06 + probability_override: null + - when: tech_adoption_posture == 'Early adopter' and asi_threat_perception in + ['Enthusiastically positive', 'Cautiously optimistic'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.3 + Planning to adopt soon: 0.4 + Curious but hesitant: 0.22 + Resistant but may be forced: 0.06 + Actively refusing: 0.02 + probability_override: null + - when: tech_adoption_posture == 'Early adopter' and asi_threat_perception in + ['Existential threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.15 + Planning to adopt soon: 0.28 + Curious but hesitant: 0.32 + Resistant but may be forced: 0.18 + Actively refusing: 0.07 + probability_override: null + - when: tech_adoption_posture == 'Early majority adopter' and asi_threat_perception + == 'Cautiously optimistic' + multiply: null + add: null + weight_overrides: + Already using heavily: 0.08 + Planning to adopt soon: 0.28 + Curious but hesitant: 0.42 + Resistant but may be forced: 0.16 + Actively refusing: 0.06 + probability_override: null + - when: tech_adoption_posture == 'Early majority adopter' and asi_threat_perception + in ['Existential threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.04 + Planning to adopt soon: 0.14 + Curious but hesitant: 0.34 + Resistant but may be forced: 0.32 + Actively refusing: 0.16 + probability_override: null + - when: tech_adoption_posture == 'Late majority adopter' and asi_threat_perception + in ['Existential threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.02 + Planning to adopt soon: 0.06 + Curious but hesitant: 0.24 + Resistant but may be forced: 0.4 + Actively refusing: 0.28 + probability_override: null + - when: tech_adoption_posture == 'Late majority adopter' and asi_threat_perception + in ['Cautiously optimistic', 'Enthusiastically positive', 'Indifferent/uncertain'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.04 + Planning to adopt soon: 0.16 + Curious but hesitant: 0.42 + Resistant but may be forced: 0.28 + Actively refusing: 0.1 + probability_override: null + - when: tech_adoption_posture == 'Technophobe/Avoider' + multiply: null + add: null + weight_overrides: + Already using heavily: 0.01 + Planning to adopt soon: 0.03 + Curious but hesitant: 0.14 + Resistant but may be forced: 0.32 + Actively refusing: 0.5 + probability_override: null + - when: education_level == 'Graduate degree' and tech_adoption_posture in ['Early + majority adopter', 'Early adopter', 'Innovator'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.22 + Planning to adopt soon: 0.32 + Curious but hesitant: 0.3 + Resistant but may be forced: 0.12 + Actively refusing: 0.04 + probability_override: null + - when: education_level in ['Less than HS', 'HS diploma/GED'] and tech_adoption_posture + in ['Late majority adopter', 'Technophobe/Avoider'] + multiply: null + add: null + weight_overrides: + Already using heavily: 0.02 + Planning to adopt soon: 0.05 + Curious but hesitant: 0.2 + Resistant but may be forced: 0.36 + Actively refusing: 0.37 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'St. Louis Fed: 44.6% of adults 18-64 used GenAI in Aug 2024; YouGov 2025: + 56% of American adults used AI tools, 28% at least weekly; Menlo Ventures: 74% + of $100k+ households use AI vs 53% under $50k; 27% of white-collar workers frequently + use AI at work (Gallup 2025). Adoption rates rising steeply; scenario sets ''Month + 3'' as universal free public access which dramatically shifts the curve.' + note: Base distribution anchored to current ~45-56% having ever used AI, but 'Already + using heavily' set at 18% reflecting daily/power users. 'Planning to adopt soon' + and 'Curious but hesitant' together capture the large curious-but-not-committed + middle. 'Actively refusing' ~12% reflects the tech-skeptic/privacy-concerned + bloc. Modifiers will shift based on tech_adoption_posture, education_level, + and asi_threat_perception. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +- name: asi_governance_stance + type: categorical + category: population_specific + description: Preferred regulatory approach to ASI development and deployment (No + regulation - let it run, Light-touch industry self-regulation, Moderate government + oversight, Heavy international regulation, Halt/moratorium until safe). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - No regulation - let it run + - Light-touch industry self-regulation + - Moderate government oversight + - Heavy international regulation + - Halt/moratorium until safe + weights: + - 0.07 + - 0.14 + - 0.38 + - 0.22 + - 0.19 + formula: null + depends_on: + - asi_threat_perception + - political_identity + - institutional_trust + modifiers: + - when: asi_threat_perception == 'Existential threat' and political_identity in + ['Strong Democrat', 'Lean Democrat'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.01 + Light-touch industry self-regulation: 0.03 + Moderate government oversight: 0.16 + Heavy international regulation: 0.44 + Halt/moratorium until safe: 0.36 + probability_override: null + - when: asi_threat_perception == 'Existential threat' and political_identity in + ['Strong Republican', 'Lean Republican'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.04 + Light-touch industry self-regulation: 0.1 + Moderate government oversight: 0.22 + Heavy international regulation: 0.3 + Halt/moratorium until safe: 0.34 + probability_override: null + - when: asi_threat_perception == 'Existential threat' and political_identity == + 'True Independent' + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.02 + Light-touch industry self-regulation: 0.06 + Moderate government oversight: 0.22 + Heavy international regulation: 0.36 + Halt/moratorium until safe: 0.34 + probability_override: null + - when: asi_threat_perception == 'Serious risk/concern' and political_identity + in ['Strong Democrat', 'Lean Democrat'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.01 + Light-touch industry self-regulation: 0.05 + Moderate government oversight: 0.34 + Heavy international regulation: 0.4 + Halt/moratorium until safe: 0.2 + probability_override: null + - when: asi_threat_perception == 'Serious risk/concern' and political_identity + in ['Strong Republican', 'Lean Republican'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.05 + Light-touch industry self-regulation: 0.18 + Moderate government oversight: 0.38 + Heavy international regulation: 0.24 + Halt/moratorium until safe: 0.15 + probability_override: null + - when: asi_threat_perception == 'Serious risk/concern' and political_identity + == 'True Independent' + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.03 + Light-touch industry self-regulation: 0.1 + Moderate government oversight: 0.4 + Heavy international regulation: 0.3 + Halt/moratorium until safe: 0.17 + probability_override: null + - when: asi_threat_perception == 'Cautiously optimistic' and political_identity + in ['Strong Democrat', 'Lean Democrat'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.02 + Light-touch industry self-regulation: 0.08 + Moderate government oversight: 0.52 + Heavy international regulation: 0.28 + Halt/moratorium until safe: 0.1 + probability_override: null + - when: asi_threat_perception == 'Cautiously optimistic' and political_identity + in ['Strong Republican', 'Lean Republican'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.08 + Light-touch industry self-regulation: 0.28 + Moderate government oversight: 0.44 + Heavy international regulation: 0.14 + Halt/moratorium until safe: 0.06 + probability_override: null + - when: asi_threat_perception == 'Enthusiastically positive' and political_identity + in ['Strong Republican', 'Lean Republican'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.2 + Light-touch industry self-regulation: 0.4 + Moderate government oversight: 0.3 + Heavy international regulation: 0.06 + Halt/moratorium until safe: 0.04 + probability_override: null + - when: asi_threat_perception == 'Enthusiastically positive' and political_identity + in ['Strong Democrat', 'Lean Democrat'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.06 + Light-touch industry self-regulation: 0.14 + Moderate government oversight: 0.48 + Heavy international regulation: 0.24 + Halt/moratorium until safe: 0.08 + probability_override: null + - when: asi_threat_perception == 'Indifferent/uncertain' and institutional_trust + in ['Low trust', 'Distrustful/Conspiratorial'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.1 + Light-touch industry self-regulation: 0.18 + Moderate government oversight: 0.3 + Heavy international regulation: 0.18 + Halt/moratorium until safe: 0.24 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and asi_threat_perception + in ['Existential threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + No regulation - let it run: 0.08 + Light-touch industry self-regulation: 0.1 + Moderate government oversight: 0.2 + Heavy international regulation: 0.22 + Halt/moratorium until safe: 0.4 + probability_override: null + grounding: + level: strong + method: researched + source: 'AIPI poll: 82% of Americans prefer slowing AI development to account + for risk vs 8% who want it accelerated; 75% of both Democrats and Republicans + support preventing AI from quickly reaching superhuman capabilities; Pew: 62% + lack confidence in government to regulate AI; Rethink Priorities: 58% support + the CAIS safety statement on AI risk as global priority. TIME/AIPI poll: 50% + of voters believe US should use its AI advantage to enforce safety restrictions.' + note: The dominant plurality position is 'Moderate government oversight' (~38%). + 'Heavy international regulation' and 'Halt/moratorium' together capture the + ~40% who want strong action — consistent with 82% preferring slowing AI and + 58% supporting CAIS-level urgency. Only 7% 'No regulation' reflecting libertarian/tech-acceleration + fringe. Partisan and institutional trust modifiers will substantially reshape + this. In ASI scenario, halt/moratorium weight is elevated vs. current LLM baseline. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +- name: economic_abundance_belief + type: float + category: population_specific + description: Degree to which the individual believes ASI-driven abundance will actually + reach them and improve their material conditions (0=certain it won't benefit me, + 1=certain it will transform my life for the better). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: beta + alpha: 2.5 + beta: 4.0 + min: 0.0 + max: 1.0 + min_formula: null + max_formula: null + formula: null + depends_on: + - financial_margin + - asi_threat_perception + - economic_anxiety + modifiers: + - when: financial_margin == 'Comfortable savings buffer' and asi_threat_perception + == 'Enthusiastically positive' + multiply: 1.0 + add: 0.22 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' and asi_threat_perception + == 'Cautiously optimistic' + multiply: 1.0 + add: 0.12 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' and asi_threat_perception + == 'Serious risk/concern' + multiply: 1.0 + add: 0.04 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' and asi_threat_perception + == 'Existential threat' + multiply: 1.0 + add: -0.05 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Modest buffer' and asi_threat_perception == 'Enthusiastically + positive' + multiply: 1.0 + add: 0.12 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Modest buffer' and asi_threat_perception == 'Cautiously + optimistic' + multiply: 1.0 + add: 0.04 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Modest buffer' and asi_threat_perception in ['Serious + risk/concern', 'Existential threat'] + multiply: 1.0 + add: -0.06 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' and asi_threat_perception == + 'Enthusiastically positive' + multiply: 1.0 + add: 0.04 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' and asi_threat_perception in + ['Cautiously optimistic', 'Indifferent/uncertain'] + multiply: 1.0 + add: -0.06 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' and asi_threat_perception in + ['Serious risk/concern', 'Existential threat'] + multiply: 1.0 + add: -0.15 + weight_overrides: null + probability_override: null + - when: financial_margin == 'In debt/deficit' and asi_threat_perception == 'Enthusiastically + positive' + multiply: 1.0 + add: -0.02 + weight_overrides: null + probability_override: null + - when: financial_margin == 'In debt/deficit' and asi_threat_perception in ['Cautiously + optimistic', 'Indifferent/uncertain'] + multiply: 1.0 + add: -0.12 + weight_overrides: null + probability_override: null + - when: financial_margin == 'In debt/deficit' and asi_threat_perception in ['Serious + risk/concern', 'Existential threat'] + multiply: 1.0 + add: -0.22 + weight_overrides: null + probability_override: null + - when: economic_anxiety > 0.7 and asi_threat_perception in ['Existential threat', + 'Serious risk/concern'] + multiply: 0.7 + add: -0.08 + weight_overrides: null + probability_override: null + - when: economic_anxiety < 0.3 and asi_threat_perception in ['Enthusiastically + positive', 'Cautiously optimistic'] + multiply: 1.0 + add: 0.1 + weight_overrides: null + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Pew 2024: only 17% of US public believe AI will have a very or somewhat + positive impact on US over next 20 years (vs 56% of experts); 51% more concerned + than excited about AI (Pew 2025). Historical tech optimism surveys show roughly + left-skewed distribution — most Americans skeptical that new tech benefits will + reach them personally, especially across income divides. Menlo Ventures: 74% + of high-income households use AI vs 53% low-income.' + note: Beta(2.5, 4.0) produces a mean of ~0.385 — reflecting the skeptical-leaning + majority (most Americans doubt ASI abundance will reach them personally), with + a rightward tail representing optimists. Mode ~0.25 captures the 'probably won't + help me' modal response. Modifiers based on financial_margin, asi_threat_perception, + and economic_anxiety will shift the distribution substantially — paycheck-to-paycheck + individuals will anchor near 0.2; comfortable savers nearer 0.6. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Belief cannot be below zero + - type: hard_max + value: 1.0 + expression: null + reason: Belief cannot exceed 1 +- name: information_verification_behavior + type: categorical + category: population_specific + description: How the individual navigates trust and verification of information + in an environment where ASI can produce convincing synthetic content at scale + (Accepts information uncritically, Relies on trusted outlets, Cross-references + multiple sources, Uses ASI tools to fact-check, Deep skeptic - trusts very little). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Accepts information uncritically + - Relies on trusted outlets + - Cross-references multiple sources + - Uses ASI tools to fact-check + - Deep skeptic - trusts very little + weights: + - 0.18 + - 0.32 + - 0.22 + - 0.1 + - 0.18 + formula: null + depends_on: + - institutional_trust + - primary_info_source + - education_level + modifiers: + - when: institutional_trust == 'High trust' and primary_info_source in ['Cable/broadcast + TV news', 'Local news'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.12 + Relies on trusted outlets: 0.52 + Cross-references multiple sources: 0.24 + Uses ASI tools to fact-check: 0.06 + Deep skeptic - trusts very little: 0.06 + probability_override: null + - when: institutional_trust == 'High trust' and primary_info_source in ['Online + news sites', 'Podcasts', 'Print media'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.08 + Relies on trusted outlets: 0.38 + Cross-references multiple sources: 0.36 + Uses ASI tools to fact-check: 0.12 + Deep skeptic - trusts very little: 0.06 + probability_override: null + - when: institutional_trust == 'High trust' and primary_info_source == 'Social + media' + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.18 + Relies on trusted outlets: 0.3 + Cross-references multiple sources: 0.3 + Uses ASI tools to fact-check: 0.14 + Deep skeptic - trusts very little: 0.08 + probability_override: null + - when: institutional_trust == 'Moderate trust' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.06 + Relies on trusted outlets: 0.26 + Cross-references multiple sources: 0.44 + Uses ASI tools to fact-check: 0.16 + Deep skeptic - trusts very little: 0.08 + probability_override: null + - when: institutional_trust == 'Moderate trust' and education_level in ['Less + than HS', 'HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.18 + Relies on trusted outlets: 0.38 + Cross-references multiple sources: 0.28 + Uses ASI tools to fact-check: 0.08 + Deep skeptic - trusts very little: 0.08 + probability_override: null + - when: institutional_trust == 'Low trust' and primary_info_source == 'Social + media' + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.14 + Relies on trusted outlets: 0.16 + Cross-references multiple sources: 0.26 + Uses ASI tools to fact-check: 0.1 + Deep skeptic - trusts very little: 0.34 + probability_override: null + - when: institutional_trust == 'Low trust' and primary_info_source in ['Online + news sites', 'Podcasts'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.08 + Relies on trusted outlets: 0.18 + Cross-references multiple sources: 0.36 + Uses ASI tools to fact-check: 0.12 + Deep skeptic - trusts very little: 0.26 + probability_override: null + - when: institutional_trust == 'Low trust' and primary_info_source in ['Cable/broadcast + TV news', 'Local news', 'Print media'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.1 + Relies on trusted outlets: 0.28 + Cross-references multiple sources: 0.28 + Uses ASI tools to fact-check: 0.08 + Deep skeptic - trusts very little: 0.26 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and primary_info_source + == 'Social media' + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.18 + Relies on trusted outlets: 0.1 + Cross-references multiple sources: 0.14 + Uses ASI tools to fact-check: 0.06 + Deep skeptic - trusts very little: 0.52 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and primary_info_source + in ['Cable/broadcast TV news', 'Online news sites', 'Local news', 'Podcasts', + 'Print media', 'Avoids news'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.1 + Relies on trusted outlets: 0.12 + Cross-references multiple sources: 0.2 + Uses ASI tools to fact-check: 0.06 + Deep skeptic - trusts very little: 0.52 + probability_override: null + - when: primary_info_source == 'Avoids news' and institutional_trust in ['Low + trust', 'Distrustful/Conspiratorial'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.22 + Relies on trusted outlets: 0.12 + Cross-references multiple sources: 0.14 + Uses ASI tools to fact-check: 0.04 + Deep skeptic - trusts very little: 0.48 + probability_override: null + - when: education_level == 'Graduate degree' and institutional_trust in ['High + trust', 'Moderate trust'] + multiply: null + add: null + weight_overrides: + Accepts information uncritically: 0.04 + Relies on trusted outlets: 0.22 + Cross-references multiple sources: 0.48 + Uses ASI tools to fact-check: 0.2 + Deep skeptic - trusts very little: 0.06 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Edelman Trust Barometer 2025: US trust in institutions declined 15 points + to 35%; 77% of Americans do not trust businesses to use AI responsibly. RAND + research on media literacy; Pew data on information consumption behavior and + news source diversity. In ASI scenario where synthetic content is produced at + scale, verification behaviors are contextually elevated vs. current LLM baseline.' + note: 'Base distribution reflects pre-ASI media behavior: large plurality ''Relies + on trusted outlets'' (~32%) consistent with outlet loyalty data; ''Accepts information + uncritically'' ~18% consistent with low-media-literacy segments; ''Deep skeptic'' + ~18% reflects institutional distrust bloc (consistent with Edelman data showing + high distrust). ''Uses ASI tools to fact-check'' is a novel behavior (~10% at + scenario onset, rising). ''Cross-references'' ~22% reflects the civic/educated + information consumer. Modifiers on institutional_trust, primary_info_source, + and education_level will be decisive.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +- name: human_purpose_anxiety + type: float + category: population_specific + description: Level of existential anxiety about human meaning, identity, and purpose + when cognitive labor is no longer scarce (0=none - feels liberated, 1=severe - + deeply destabilized). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: beta + alpha: 3.0 + beta: 3.5 + min: 0.0 + max: 1.0 + min_formula: null + max_formula: null + formula: null + depends_on: + - neuroticism + - job_displacement_vulnerability + - asi_threat_perception + modifiers: + - when: neuroticism > 0.7 and job_displacement_vulnerability == 'High - core tasks + fully automatable' and asi_threat_perception == 'Existential threat' + multiply: 1.0 + add: 0.28 + weight_overrides: null + probability_override: null + - when: neuroticism > 0.7 and job_displacement_vulnerability == 'High - core tasks + fully automatable' and asi_threat_perception == 'Serious risk/concern' + multiply: 1.0 + add: 0.2 + weight_overrides: null + probability_override: null + - when: neuroticism > 0.7 and job_displacement_vulnerability == 'Moderate - partial + displacement likely' and asi_threat_perception in ['Existential threat', 'Serious + risk/concern'] + multiply: 1.0 + add: 0.16 + weight_overrides: null + probability_override: null + - when: neuroticism > 0.7 and job_displacement_vulnerability in ['Low - physical/relational + job', 'Not employed'] and asi_threat_perception in ['Existential threat', + 'Serious risk/concern'] + multiply: 1.0 + add: 0.1 + weight_overrides: null + probability_override: null + - when: neuroticism > 0.5 and neuroticism <= 0.7 and job_displacement_vulnerability + == 'High - core tasks fully automatable' and asi_threat_perception in ['Existential + threat', 'Serious risk/concern'] + multiply: 1.0 + add: 0.16 + weight_overrides: null + probability_override: null + - when: neuroticism > 0.5 and neuroticism <= 0.7 and job_displacement_vulnerability + == 'Moderate - partial displacement likely' + multiply: 1.0 + add: 0.08 + weight_overrides: null + probability_override: null + - when: neuroticism <= 0.3 and job_displacement_vulnerability in ['Low - physical/relational + job', 'Not employed'] and asi_threat_perception in ['Enthusiastically positive', + 'Cautiously optimistic'] + multiply: 1.0 + add: -0.18 + weight_overrides: null + probability_override: null + - when: neuroticism <= 0.3 and job_displacement_vulnerability == 'High - core + tasks fully automatable' and asi_threat_perception in ['Enthusiastically positive', + 'Cautiously optimistic'] + multiply: 1.0 + add: -0.08 + weight_overrides: null + probability_override: null + - when: neuroticism <= 0.5 and job_displacement_vulnerability == 'Already displaced' + and asi_threat_perception in ['Existential threat', 'Serious risk/concern'] + multiply: 1.0 + add: 0.14 + weight_overrides: null + probability_override: null + - when: neuroticism > 0.6 and job_displacement_vulnerability == 'Already displaced' + multiply: 1.0 + add: 0.22 + weight_overrides: null + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Pew 2025: 50% of Americans more concerned than excited about AI in daily + life; 57% rate societal risks high; Ernst & Young: 71% of workers concerned + about AI''s impact on job security, 48% more worried than 12 months ago. Neuroticism + literature shows ~20-25% of adults score in high-neuroticism range (Big Five). + Human purpose/meaning concerns are a distinct and understudied dimension — no + direct survey data for ''existential meaning anxiety from ASI'' exists.' + note: Beta(3.0, 3.5) produces mean ~0.46 — a slight lean toward elevated anxiety, + reflecting the fact that the ASI scenario is genuinely destabilizing to cognitive + identity and occupational purpose. The distribution is moderately concentrated + near the center, acknowledging that responses to ASI will be bimodal — some + find it liberating, many find it destabilizing — but base distribution is not + yet shaped by those moderators. Neuroticism, job_displacement_vulnerability, + and asi_threat_perception modifiers will generate the actual bimodality. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Anxiety cannot be negative + - type: hard_max + value: 1.0 + expression: null + reason: Anxiety is bounded at maximum +- name: redistribution_support + type: categorical + category: population_specific + description: Support for redistributive policy responses to ASI-driven abundance + (e.g., UBI, wealth taxes, public ownership of ASI) (Strongly supports aggressive + redistribution, Supports moderate redistribution, Prefers market-led distribution, + Opposes redistribution, Uncertain). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Strongly supports aggressive redistribution + - Supports moderate redistribution + - Prefers market-led distribution + - Opposes redistribution + - Uncertain + weights: + - 0.18 + - 0.28 + - 0.24 + - 0.17 + - 0.13 + formula: null + depends_on: + - political_identity + - economic_abundance_belief + - financial_margin + modifiers: + - when: political_identity == 'Strong Democrat' and economic_abundance_belief + < 0.4 + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.52 + Supports moderate redistribution: 0.32 + Prefers market-led distribution: 0.06 + Opposes redistribution: 0.03 + Uncertain: 0.07 + probability_override: null + - when: political_identity == 'Strong Democrat' and economic_abundance_belief + >= 0.4 + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.38 + Supports moderate redistribution: 0.38 + Prefers market-led distribution: 0.12 + Opposes redistribution: 0.04 + Uncertain: 0.08 + probability_override: null + - when: political_identity == 'Lean Democrat' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.34 + Supports moderate redistribution: 0.4 + Prefers market-led distribution: 0.12 + Opposes redistribution: 0.05 + Uncertain: 0.09 + probability_override: null + - when: political_identity == 'Lean Democrat' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.22 + Supports moderate redistribution: 0.44 + Prefers market-led distribution: 0.2 + Opposes redistribution: 0.06 + Uncertain: 0.08 + probability_override: null + - when: political_identity == 'True Independent' and economic_abundance_belief + < 0.4 + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.18 + Supports moderate redistribution: 0.3 + Prefers market-led distribution: 0.22 + Opposes redistribution: 0.1 + Uncertain: 0.2 + probability_override: null + - when: political_identity == 'True Independent' and economic_abundance_belief + >= 0.4 + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.1 + Supports moderate redistribution: 0.3 + Prefers market-led distribution: 0.32 + Opposes redistribution: 0.14 + Uncertain: 0.14 + probability_override: null + - when: political_identity == 'Lean Republican' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.08 + Supports moderate redistribution: 0.28 + Prefers market-led distribution: 0.34 + Opposes redistribution: 0.22 + Uncertain: 0.08 + probability_override: null + - when: political_identity == 'Lean Republican' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.04 + Supports moderate redistribution: 0.18 + Prefers market-led distribution: 0.44 + Opposes redistribution: 0.28 + Uncertain: 0.06 + probability_override: null + - when: political_identity == 'Strong Republican' and economic_abundance_belief + >= 0.5 + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.02 + Supports moderate redistribution: 0.1 + Prefers market-led distribution: 0.52 + Opposes redistribution: 0.32 + Uncertain: 0.04 + probability_override: null + - when: political_identity == 'Strong Republican' and economic_abundance_belief + < 0.5 + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.04 + Supports moderate redistribution: 0.18 + Prefers market-led distribution: 0.4 + Opposes redistribution: 0.3 + Uncertain: 0.08 + probability_override: null + - when: financial_margin == 'In debt/deficit' and political_identity in ['Strong + Democrat', 'Lean Democrat', 'True Independent'] + multiply: null + add: null + weight_overrides: + Strongly supports aggressive redistribution: 0.42 + Supports moderate redistribution: 0.34 + Prefers market-led distribution: 0.12 + Opposes redistribution: 0.04 + Uncertain: 0.08 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Stanford HAI / Andrew Yang reporting: ~two-thirds of Americans say they + now favor UBI in some polling (though question framing matters greatly). Gallup + historically: Americans are divided on redistribution, with roughly 50-55% supporting + ''more redistribution'' in generic polling. Partisan divide is sharp: Democrats + ~75% favor wealth taxes; Republicans ~70% oppose. ''Uncertain'' category important + given novelty of ASI-specific redistribution framing.' + note: Base weights reflect the general US public prior to strong conditioning. + 'Moderate redistribution' is the plurality position (~28%), consistent with + moderate majority in US politics. 'Strongly supports' (~18%) captures progressive + activist bloc + economic-anxiety-driven redistribution support. 'Market-led' + (~24%) and 'Opposes' (~17%) reflect the conservative/libertarian bloc. 'Uncertain' + (~13%) reflects voters who have not formed opinions on ASI-specific redistribution. + Political_identity and economic_abundance_belief will be primary modifiers. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +- name: geopolitical_competition_concern + type: categorical + category: population_specific + description: Level of concern about US-China ASI competition and national security + implications of ASI proliferation (Very concerned - sees it as primary threat, + Somewhat concerned, Mildly concerned, Not concerned, Views competition as beneficial). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Very concerned - sees it as primary threat + - Somewhat concerned + - Mildly concerned + - Not concerned + - Views competition as beneficial + weights: + - 0.3 + - 0.32 + - 0.18 + - 0.12 + - 0.08 + formula: null + depends_on: + - political_identity + - asi_threat_perception + - political_engagement_level + modifiers: + - when: political_identity == 'Strong Republican' and asi_threat_perception in + ['Existential threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.5 + Somewhat concerned: 0.3 + Mildly concerned: 0.1 + Not concerned: 0.04 + Views competition as beneficial: 0.06 + probability_override: null + - when: political_identity == 'Strong Republican' and asi_threat_perception in + ['Cautiously optimistic', 'Enthusiastically positive', 'Indifferent/uncertain'] + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.36 + Somewhat concerned: 0.34 + Mildly concerned: 0.16 + Not concerned: 0.06 + Views competition as beneficial: 0.08 + probability_override: null + - when: political_identity == 'Lean Republican' and political_engagement_level + == 'Highly engaged partisan' + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.42 + Somewhat concerned: 0.36 + Mildly concerned: 0.12 + Not concerned: 0.04 + Views competition as beneficial: 0.06 + probability_override: null + - when: political_identity == 'Strong Democrat' and asi_threat_perception in ['Existential + threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.36 + Somewhat concerned: 0.34 + Mildly concerned: 0.18 + Not concerned: 0.06 + Views competition as beneficial: 0.06 + probability_override: null + - when: political_identity == 'Strong Democrat' and asi_threat_perception in ['Cautiously + optimistic', 'Enthusiastically positive', 'Indifferent/uncertain'] + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.22 + Somewhat concerned: 0.36 + Mildly concerned: 0.26 + Not concerned: 0.1 + Views competition as beneficial: 0.06 + probability_override: null + - when: political_identity == 'Lean Democrat' and political_engagement_level in + ['Highly engaged partisan', 'Moderate/occasional participant'] + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.26 + Somewhat concerned: 0.36 + Mildly concerned: 0.24 + Not concerned: 0.08 + Views competition as beneficial: 0.06 + probability_override: null + - when: political_identity == 'True Independent' and asi_threat_perception in + ['Existential threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.28 + Somewhat concerned: 0.36 + Mildly concerned: 0.2 + Not concerned: 0.08 + Views competition as beneficial: 0.08 + probability_override: null + - when: political_engagement_level == 'Disengaged' and asi_threat_perception == + 'Indifferent/uncertain' + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.08 + Somewhat concerned: 0.22 + Mildly concerned: 0.28 + Not concerned: 0.28 + Views competition as beneficial: 0.14 + probability_override: null + - when: political_engagement_level == 'Disengaged' and asi_threat_perception in + ['Existential threat', 'Serious risk/concern'] + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.2 + Somewhat concerned: 0.3 + Mildly concerned: 0.24 + Not concerned: 0.16 + Views competition as beneficial: 0.1 + probability_override: null + - when: political_identity in ['Strong Republican', 'Lean Republican'] and political_engagement_level + == 'Highly engaged partisan' and asi_threat_perception == 'Existential threat' + multiply: null + add: null + weight_overrides: + Very concerned - sees it as primary threat: 0.58 + Somewhat concerned: 0.26 + Mildly concerned: 0.08 + Not concerned: 0.02 + Views competition as beneficial: 0.06 + probability_override: null + grounding: + level: strong + method: researched + source: 'RAND 2025 survey: 72% of Americans gave concern about China leading AI + a score of 6 or higher out of 10; 38% rated it 10/10. Chicago Council 2025: + partisan reversal underway — 53% now prefer cooperation with China (up from + 40% in 2024), but Republicans still strongly favor limiting China''s rise. AIPI: + 63% of Americans think it should be illegal to export powerful AI models to + potential US adversaries.' + note: RAND data firmly anchors 'Very concerned' + 'Somewhat concerned' together + at ~62% (mirroring the 6+/10 concern majority). However, Chicago Council 2025 + data shows meaningful partisan shift toward cooperation, especially among Democrats + and Independents, pushing 'Not concerned' somewhat higher. 'Views competition + as beneficial' (~8%) captures the small group who see competitive pressure as + positive for innovation. Political_identity and political_engagement_level will + be strong modifiers — Republicans will cluster heavily in 'Very concerned'; + Democrats increasingly in 'Mildly/Not concerned'. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +- name: asi_credibility_assessment + type: categorical + category: population_specific + description: Whether the individual believes the ASI demonstration and milestone + events are genuine, exaggerated, or fabricated (Fully credible, Mostly credible, + Skeptical - likely overhyped, Conspiracy - staged or manipulated, Uninformed - + unaware of events). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Fully credible + - Mostly credible + - Skeptical - likely overhyped + - Conspiracy - staged or manipulated + - Uninformed - unaware of events + weights: + - 0.12 + - 0.28 + - 0.3 + - 0.14 + - 0.16 + formula: null + depends_on: + - institutional_trust + - primary_info_source + - tech_adoption_posture + modifiers: + - when: institutional_trust == 'High trust' and tech_adoption_posture in ['Innovator', + 'Early adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.4 + Mostly credible: 0.42 + Skeptical - likely overhyped: 0.12 + Conspiracy - staged or manipulated: 0.02 + Uninformed - unaware of events: 0.04 + probability_override: null + - when: institutional_trust == 'High trust' and tech_adoption_posture in ['Early + majority adopter', 'Late majority adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.28 + Mostly credible: 0.44 + Skeptical - likely overhyped: 0.16 + Conspiracy - staged or manipulated: 0.02 + Uninformed - unaware of events: 0.1 + probability_override: null + - when: institutional_trust == 'High trust' and tech_adoption_posture == 'Technophobe/Avoider' + multiply: null + add: null + weight_overrides: + Fully credible: 0.18 + Mostly credible: 0.36 + Skeptical - likely overhyped: 0.18 + Conspiracy - staged or manipulated: 0.04 + Uninformed - unaware of events: 0.24 + probability_override: null + - when: institutional_trust == 'Moderate trust' and tech_adoption_posture in ['Innovator', + 'Early adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.22 + Mostly credible: 0.44 + Skeptical - likely overhyped: 0.24 + Conspiracy - staged or manipulated: 0.06 + Uninformed - unaware of events: 0.04 + probability_override: null + - when: institutional_trust == 'Moderate trust' and tech_adoption_posture in ['Early + majority adopter', 'Late majority adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.14 + Mostly credible: 0.38 + Skeptical - likely overhyped: 0.3 + Conspiracy - staged or manipulated: 0.06 + Uninformed - unaware of events: 0.12 + probability_override: null + - when: institutional_trust == 'Moderate trust' and tech_adoption_posture == 'Technophobe/Avoider' + multiply: null + add: null + weight_overrides: + Fully credible: 0.08 + Mostly credible: 0.28 + Skeptical - likely overhyped: 0.26 + Conspiracy - staged or manipulated: 0.08 + Uninformed - unaware of events: 0.3 + probability_override: null + - when: institutional_trust == 'Low trust' and tech_adoption_posture in ['Innovator', + 'Early adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.1 + Mostly credible: 0.28 + Skeptical - likely overhyped: 0.4 + Conspiracy - staged or manipulated: 0.16 + Uninformed - unaware of events: 0.06 + probability_override: null + - when: institutional_trust == 'Low trust' and tech_adoption_posture in ['Early + majority adopter', 'Late majority adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.06 + Mostly credible: 0.22 + Skeptical - likely overhyped: 0.38 + Conspiracy - staged or manipulated: 0.18 + Uninformed - unaware of events: 0.16 + probability_override: null + - when: institutional_trust == 'Low trust' and tech_adoption_posture == 'Technophobe/Avoider' + multiply: null + add: null + weight_overrides: + Fully credible: 0.04 + Mostly credible: 0.14 + Skeptical - likely overhyped: 0.3 + Conspiracy - staged or manipulated: 0.2 + Uninformed - unaware of events: 0.32 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and tech_adoption_posture + in ['Innovator', 'Early adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.04 + Mostly credible: 0.12 + Skeptical - likely overhyped: 0.32 + Conspiracy - staged or manipulated: 0.46 + Uninformed - unaware of events: 0.06 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and tech_adoption_posture + in ['Early majority adopter', 'Late majority adopter'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.02 + Mostly credible: 0.08 + Skeptical - likely overhyped: 0.26 + Conspiracy - staged or manipulated: 0.44 + Uninformed - unaware of events: 0.2 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' and tech_adoption_posture + == 'Technophobe/Avoider' + multiply: null + add: null + weight_overrides: + Fully credible: 0.02 + Mostly credible: 0.06 + Skeptical - likely overhyped: 0.18 + Conspiracy - staged or manipulated: 0.42 + Uninformed - unaware of events: 0.32 + probability_override: null + - when: primary_info_source == 'Avoids news' and institutional_trust in ['Low + trust', 'Distrustful/Conspiratorial'] + multiply: null + add: null + weight_overrides: + Fully credible: 0.03 + Mostly credible: 0.08 + Skeptical - likely overhyped: 0.2 + Conspiracy - staged or manipulated: 0.22 + Uninformed - unaware of events: 0.47 + probability_override: null + - when: primary_info_source == 'Social media' and institutional_trust == 'Distrustful/Conspiratorial' + multiply: null + add: null + weight_overrides: + Fully credible: 0.02 + Mostly credible: 0.08 + Skeptical - likely overhyped: 0.22 + Conspiracy - staged or manipulated: 0.58 + Uninformed - unaware of events: 0.1 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Pew 2025: 95% of US adults have heard at least a little about AI — so + full unawareness is low but non-zero for this dramatic ASI claim. Edelman Trust + Barometer: US institutional trust very low (35%); 77% distrust businesses on + AI. Historical patterns on extraordinary technology claims: public splits between + credulous acceptance, healthy skepticism, and conspiratorial rejection. AIPI + polling: ~83% believe AI could cause catastrophic accident — indicating priming + for dramatic AI claims.' + note: '''Skeptical - likely overhyped'' is the modal response (~30%) consistent + with historically high media skepticism in the US and frequent ''AI hype'' narratives. + ''Mostly credible'' (~28%) reflects adults who trust mainstream scientific demonstrations. + ''Fully credible'' (~12%) are the attentive tech-engaged adults who trust institutional + demonstrations. ''Conspiracy/staged'' (~14%) aligns with the Distrustful/Conspiratorial + institutional_trust segment (~15-20% of population). ''Uninformed'' (~16%) captures + adults who primarily avoid news or are disengaged — larger than raw news-avoidance + data because ASI is novel enough that even news consumers may not have absorbed + the claims. institutional_trust, primary_info_source, and tech_adoption_posture + will be decisive modifiers.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1 +household_config: + age_brackets: + - - 30 + - 18-29 + - - 45 + - 30-44 + - - 65 + - 45-64 + - - 81 + - 65-80 + household_type_weights: + 18-29: + single: 0.45 + couple: 0.22 + single_parent: 0.08 + couple_with_kids: 0.1 + multi_generational: 0.15 + 30-44: + single: 0.22 + couple: 0.2 + single_parent: 0.12 + couple_with_kids: 0.4 + multi_generational: 0.06 + 45-64: + single: 0.27 + couple: 0.38 + single_parent: 0.09 + couple_with_kids: 0.2 + multi_generational: 0.06 + 65-80: + single: 0.38 + couple: 0.47 + single_parent: 0.03 + couple_with_kids: 0.04 + multi_generational: 0.08 + same_group_rates: + white: 0.91 + black: 0.82 + hispanic: 0.74 + asian: 0.68 + native_american: 0.58 + multiracial: 0.42 + default_same_group_rate: 0.72 + same_country_rate: 0.95 + assortative_mating: + education_level: 0.63 + household_income: 0.6 + political_identity: 0.72 + religious_engagement: 0.68 + race_ethnicity: 0.85 + age: 0.78 + urban_rural: 0.65 + us_region: 0.7 + vote_2024_presidential: 0.74 + institutional_trust: 0.55 + tech_adoption_posture: 0.48 + risk_tolerance: 0.45 + consumer_identity: 0.42 + social_media_behavior: 0.4 + primary_info_source: 0.52 + economic_anxiety: 0.58 + financial_margin: 0.56 + investment_profile: 0.54 + employment_sector: 0.38 + openness: 0.43 + conscientiousness: 0.41 + neuroticism: 0.35 + agreeableness: 0.32 + extraversion: 0.3 + asi_adoption_intent: 0.5 + asi_credibility_assessment: 0.48 + asi_governance_stance: 0.55 + asi_threat_perception: 0.46 + geopolitical_competition_concern: 0.44 + human_purpose_anxiety: 0.4 + redistribution_support: 0.62 + job_displacement_vulnerability: 0.35 + top_issue_2026: 0.58 + midterm_turnout_propensity: 0.55 + information_verification_behavior: 0.47 + country_direction_approval: 0.7 + has_children: 0.82 + marital_status: 0.75 + personal_health_stake: 0.38 + economic_abundance_belief: 0.52 + partner_gender_mode: weighted + partner_gender_pair_weights: + - left: Male + right: Female + weight: 0.942 + - left: Male + right: Male + weight: 0.026 + - left: Female + right: Female + weight: 0.022 + - left: Male + right: Non-binary/Other + weight: 0.005 + - left: Female + right: Non-binary/Other + weight: 0.005 + partner_age_gap_mean: -2.3 + partner_age_gap_std: 4.8 + min_adult_age: 18 + min_agent_age: 13 + child_min_parent_offset: 18 + child_max_parent_offset: 45 + max_dependent_child_age: 17 + elderly_min_offset: 20 + elderly_max_offset: 45 + life_stages: + - max_age: 5 + label: preschool + - max_age: 11 + label: elementary + - max_age: 14 + label: middle_school + - max_age: 18 + label: high_school + adult_stage_label: adult + avg_household_size: 2.51 +agent_focus_mode: couples +identity_dimensions: +- dimension: professional_identity + relevance: ASI renders structurally redundant every profession built on information + asymmetry or cognitive scarcity — doctors, lawyers, engineers, scientists, financial + advisors, therapists, and software developers — directly threatening the core + of how hundreds of millions of people define their competence, purpose, and social + worth. +- dimension: socioeconomic_class + relevance: 'The scenario radically destabilizes class hierarchies: elite credentials + and access to expert knowledge — historically the primary mechanism of upper-class + reproduction — are suddenly free and universally available, while the marginal + cost of goods trends toward zero, dissolving the economic logic underpinning both + working-class labor and professional-class status simultaneously.' +- dimension: political_orientation + relevance: ASI forces an immediate ideological confrontation — conservatives face + the collapse of market-based scarcity economics and national sovereignty (China + already has it), while liberals face questions about who controls distribution + of abundance and whether democratic institutions can govern a self-improving system; + neither existing political framework was designed to process this transition. +- dimension: religious_affiliation + relevance: A self-improving system that exceeds all human cognition, solves mysteries + of the universe, and eliminates disease challenges core theological frameworks + about human exceptionalism, the meaning of suffering, divine providence, and eschatology + — activating existential threat across virtually every major faith tradition. +- dimension: generational_identity + relevance: 'Generational identity is acutely activated: older generations face the + obsolescence of lifetimes of accumulated expertise and the frameworks they used + to make sense of the world, while younger generations face a future where traditional + education, career-building, and life-stage milestones may be structurally meaningless + before they begin.' +- dimension: citizenship + relevance: National identity and sovereignty are destabilized by the revelation + that China achieved ASI first and that ASI-designed infrastructure is being deployed + selectively in early-adopter nations (Singapore, UAE, Estonia) — activating anxieties + about which nations, citizens, and governments will control or be left behind + by this transition. +- dimension: race_ethnicity + relevance: The scenario explicitly surfaces racial and ethnic equity dimensions + — the promise that a high school dropout in rural Arkansas has the same cognitive + resources as Harvard professors collides with the reality that deployment to developing + nations is 'the primary coordination challenge,' raising acute questions about + whether ASI-driven abundance will reproduce or finally dissolve existing racial + and global hierarchies of access. +- dimension: parental_status + relevance: 'Parents face a profound identity disruption: the entire framework of + raising children — education, career preparation, teaching values of effort and + expertise — is destabilized when cognitive scarcity no longer exists, forcing + a fundamental reckoning with what it means to prepare a child for a world no prior + generation has imagined.' +sampling_semantic_roles: + marital_roles: + attr: marital_status + partnered_values: + - Married/partnered + single_values: + - Single + - Divorced/separated + - Widowed + geo_roles: + country_attr: country + region_attr: us_region + urbanicity_attr: urban_rural + partner_correlation_roles: + race_ethnicity: same_group_rate + education_level: same_group_rate + religious_engagement: same_group_rate + political_identity: same_group_rate + school_parent_role: + dependents_attr: has_children + school_age_values: [] + religion_roles: + religion_attr: religious_engagement + secular_values: + - Secular/None + household_roles: null diff --git a/examples/study-03/population.v1.yaml b/examples/study-03/population.v1.yaml new file mode 100644 index 0000000..e228661 --- /dev/null +++ b/examples/study-03/population.v1.yaml @@ -0,0 +1,3251 @@ +meta: + description: 'Nationally representative US adult population (18-80). Must capture + the demographic, economic, and attitudinal fault lines that drive divergent responses + to major national events — especially technology disruption, economic shocks, + cultural controversies, and electoral behavior in the 2026 midterm elections. + + + Beyond standard demographics (age, gender, race/ethnicity, education, income, + geography), prioritize attributes that determine how people process and react + to news, make decisions under uncertainty, and vote: + + + - technology adoption posture and digital literacy (technophobe to early adopter) + + - media ecosystem and primary information sources (cable news, social media, podcasts, + local news, none) + + - institutional trust (government, corporations, media, science, financial system) + + - financial margin and economic anxiety (savings buffer, debt load, paycheck-to-paycheck + status) + + - employment sector and job security perception (federal/state government, private + sector, gig, self-employed, retired) + + - consumer identity and brand relationship (brand loyal, price-driven, values-driven) + + - social media behavior and influence (passive consumer, active poster, influencer, + non-user) + + - investment and financial literacy (no investments, 401k only, active trader, + crypto holder) + + - religious engagement and worldview (secular, moderate, devout, denomination) + + - political identity and engagement level (strong partisan, moderate, disengaged, + single-issue) + + - 2024 presidential vote (Trump, Harris, third party, didn’t vote, not eligible) + + - congressional district competitiveness (safe R, safe D, swing district) + + - midterm turnout propensity (always, sometimes, rarely, never) + + - issue salience for 2026 (economy/jobs, abortion/reproductive rights, immigration, + democracy/rule of law, healthcare, climate, education, AI/technology) + + - approval of current direction (strongly approve to strongly disapprove) + + + Geographic distribution should span urban/suburban/rural across major US regions + (Northeast, Southeast, Midwest, Southwest, West Coast), with realistic correlation + structure between attributes.' + geography: United States + created_at: '2026-02-20T00:38:49.442119' + version: '1.0' + persona_template: null + scenario_description: null + name_config: null +grounding: + overall: medium + sources_count: 119 + strong_count: 14 + medium_count: 21 + low_count: 0 + sources: + - https://statisticalatlas.com/United-States/Marital-Status + - https://www.census.gov/popclock/data_tables.php?component=growth + - https://www.census.gov/newsroom/press-releases/2025/educational-attainment-data.html + - https://www.bls.gov/emp/tables/industry-employment-and-output.htm + - https://transportation.org/census-transportation-solutions/wp-content/uploads/sites/81/2024/05/CensusBureauUrbanRuralClassificationandOverview_BKT_VOsier1.pdf + - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/marital-status-distribution-of-u-s--adults-aged-65-and-older--19.html + - https://en.wikipedia.org/wiki/Race_and_ethnicity_in_the_United_States + - https://news.gallup.com/poll/15370/party-affiliation.aspx + - https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/ + - https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html + - https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html + - https://ourpublicservice.org/publications/the-state-of-public-trust-in-government-2025/ + - https://www.visualcapitalist.com/u-s-population-racial-breakdown-1990-2023/ + - https://news.gallup.com/poll/692978/democrats-regain-advantage-party-affiliation.aspx + - https://catholicvote.org/gallup-more-americans-identify-republican-than-democrat/ + - https://fred.stlouisfed.org/series/MEHOINUSA672N + - https://en.wikipedia.org/wiki/Household_income_in_the_United_States + - https://www.pewresearch.org/politics/fact-sheet/party-affiliation-fact-sheet-npors/ + - https://usafacts.org/articles/state-relationships-marriages-and-living-alone-us/ + - https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed%3Bworkers + - https://www.census.gov/library/visualizations/2024/comm/median-household-income.html + - https://theworlddata.com/population-by-gender-in-us/ + - https://news.gallup.com/opinion/gallup/654479/gallup-trends-watch-2025.aspx + - https://www.bls.gov/opub/mlr/2026/article/industry-and-occupational-employment-projections-overview.htm + - https://www.census.gov/topics/education/educational-attainment.html + - https://www.census.gov/topics/families/marriage-and-divorce.html + - https://www.census.gov/library/publications/2025/demo/p60-286.html + - https://nces.ed.gov/pubs95/web/95823.asp + - https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions + - https://www.visualcapitalist.com/u-s-population-by-age-group/ + - https://williamsinstitute.law.ucla.edu/publications/nonbinary-lgbtq-adults-us/ + - https://www2.census.gov/library/publications/2025/demo/p60-286.pdf + - https://dhsprogram.com/data/Guide-to-DHS-Statistics/Current_Marital_Status.htm + - https://statisticstimes.com/demographics/country/us-sex-ratio.php + - https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html + - https://www.neilsberg.com/insights/united-states-population-by-gender/ + - https://www.census.gov/data/tables/time-series/demo/families/marital.html + - https://www.psychologytoday.com/us/blog/living-single/202406/the-record-setting-rise-of-single-living-in-the-us + - https://theworlddata.com/us-population-over-18/ + - https://en.wikipedia.org/wiki/Demographics_of_the_United_States + - https://www.pewresearch.org/wp-content/uploads/sites/20/2025/06/PP-2025.6.26_validated-voters_report.pdf + - https://en.wikipedia.org/wiki/Educational_attainment_in_the_United_States + - https://www.bls.gov/news.release/famee.t05.htm + - https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/ + - https://news.gallup.com/poll/697421/trust-government-depends-upon-party-control.aspx + - https://www.census.gov/library/visualizations/interactive/marital-status-in-united-states.html + - https://fred.stlouisfed.org/release/tables?eid=259515&rid=249 + - https://news.gallup.com/poll/655190/political-parties-historically-polarized-ideologically.aspx + - https://datacenter.aecf.org/data/tables/6538-adult-population-by-age-group + - https://www.bls.gov/cew/publications/employment-and-wages-annual-averages/current/ + - https://www.census.gov/library/stories/2021/08/2020-united-states-population-more-racially-ethnically-diverse-than-2010.html + - https://www.census.gov/acs/www/about/why-we-ask-each-question/education/ + - https://www.visualcapitalist.com/visualizing-u-s-population-by-race/ + - https://carry.com/learn/self-employed-americans + - https://www.census.gov/newsroom/blogs/random-samplings/2023/09/exploring-diversity.html + - https://news.gallup.com/poll/700499/new-high-identify-political-independents.aspx + - https://www.census.gov/content/dam/Census/library/visualizations/2024/comm/change-by-region-2024.pdf + - https://www.statista.com/statistics/758502/percentage-distribution-of-household-income-in-the-us/ + - https://www.ccdaily.com/2024/01/more-adults-earn-post-high-school-credentials/ + - https://www.visualcapitalist.com/distribution-of-household-income-in-america/ + - https://www.ers.usda.gov/data-products/county-level-data-sets + - https://fred.stlouisfed.org/tags/series?t=bls%3Bself-employed + - https://bjs.ojp.gov/content/pub/pdf/cusrancvs.pdf + - https://www.statista.com/statistics/785618/educational-attainment-by-age-group-us/ + - https://usafacts.org/data/topics/people-society/population-and-demographics/our-changing-population/ + - https://fred.stlouisfed.org/series/MEHOINUSA646N + - https://www.statista.com/statistics/241488/population-of-the-us-by-sex-and-age/ + - https://nces.ed.gov/programs/raceindicators/indicator_rfa.asp + - https://www.census.gov/acs/www/about/why-we-ask-each-question/marital/ + - https://www.pewresearch.org/politics/2025/06/26/behind-trumps-2024-victory-a-more-racially-and-ethnically-diverse-voter-coalition/ + - https://www.ccdaily.com/2025/09/datapoints-educational-attainment-in-the-u-s/ + - https://www.brookings.edu/articles/us-population-disperses-to-suburbs-exurbs-rural-areas-and-middle-of-the-country-metros/ + - https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/ + - https://www.census.gov/topics/education/educational-attainment/data/tables.html + - https://en.wikipedia.org/wiki/Urbanization_in_the_United_States + - https://stephenslighthouse.com/2025/09/10/us-census-bureau-releases-new-educational-attainment-data/ + - https://populationeducation.org/how-to-understand-the-urban-rural-population-split-in-the-u-s/ + - https://www.pewresearch.org/ + - https://www.census.gov/library/publications/2024/demo/p60-282.html + - https://www2.census.gov/library/publications/2024/demo/p60-282.pdf + - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-25-15.html + - https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/ + - https://www.cnbc.com/2025/09/11/us-median-household-income-2024.html + - https://www.census.gov/library/stories/2025/09/education-and-income.html + - https://www.neilsberg.com/insights/united-states-population-by-race/ + - https://nces.ed.gov/programs/digest/2024menu_tables.asp + - https://www.pewresearch.org/politics/2024/04/09/the-partisanship-and-ideology-of-american-voters/ + - https://www.census.gov/programs-surveys/geography/guidance/geo-areas/urban-rural.html + - https://www.census.gov/data/datasets/time-series/demo/popest/2020s-national-detail.html + - https://www.nbcnews.com/nbc-out/out-news/5-percent-young-adults-identify-transgender-nonbinary-us-survey-finds-rcna32315 + - https://www.bgsu.edu/ncfmr/resources/data/family-profiles/FP-24-10.html + - https://nces.ed.gov/programs/coe/indicator/cba/annual-earnings + - https://www.census.gov/library/stories/2025/06/metro-areas-median-age.html + - https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/ + - https://educationdata.org/education-attainment-statistics + - https://www.equityinhighered.org/indicators/u-s-population-trends-and-educational-attainment/educational-attainment-by-age/ + - https://www.bls.gov/emp/tables/employment-by-major-industry-sector.htm + - https://news.gallup.com/poll/548459/independent-party-tied-high-democratic-new-low.aspx + - https://www.ers.usda.gov/topics/rural-economy-population/employment-education/rural-education + - https://www.uniteamerica.org/articles/research-brief-growing-cohort-of-independent-voters-becomes-critical-segment-of-electorate + - https://data.census.gov/table/ACSDT1Y2024.B12001?q=B12001 + - https://nces.ed.gov/fastfacts/display.asp?id=27 + - https://www.statista.com/statistics/183489/population-of-the-us-by-ethnicity-since-2000/ + - https://www.bls.gov/cps/lfcharacteristics.htm + - https://rbr.com/new-educational-attainment-data-comes-from-census/ + - https://news.gallup.com/poll/655157/gop-holds-edge-party-affiliation-third-straight-year.aspx + - https://www.generationtechblog.com/p/the-surprising-number-of-young-adults + - https://www.bls.gov/cps/cpsaat11b.htm + - https://dqydj.com/household-income-percentile-calculator/ + - https://www.statista.com/statistics/200838/median-household-income-in-the-united-states/ + - https://www.bls.gov/opub/mlr/2024/article/patterns-of-marriage-and-divorce-from-ages-15-to-55-evidence-from-the-nlsy79.htm + - https://www.populationpyramid.net/united-states-of-america/2024/ + - https://www.federalreserve.gov/publications/2025-economic-well-being-of-us-households-in-2024-income-and-expenses.htm + - https://censusreporter.org/topics/marital-status/ + - https://www.hcmmlaw.com/blog/2024/07/13/majority-americans-now-single-statistics-insights/ + - https://en.wikipedia.org/wiki/Literacy_in_the_United_States + - https://www.census.gov/popclock/data_tables.php?component=pyramid + - https://www.bls.gov/charts/employment-situation/employment-levels-by-industry.htm + - https://www.census.gov/data/tables/2024/demo/educational-attainment/cps-detailed-tables.html +attributes: +- name: country + type: categorical + category: universal + description: Country of residence + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - United States + weights: + - 1.0 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://www.census.gov + note: Universal constant — all agents are US residents by spec definition + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Categorical weights must sum to 1 +- name: age + type: int + category: universal + description: Age of the adult in years, ranging from 18 to 80. + scope: individual + correlation_rate: null + semantic_type: age + identity_type: null + display_format: number + sampling: + strategy: independent + distribution: + type: normal + mean: 46.0 + std: 17.0 + min: 18.0 + max: 80.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://www.census.gov/newsroom/press-releases/2024/population-estimates-age-sex.html + note: US median age ~39.6 overall; adult-only (18+) median is ~47. Distribution + slightly right-skewed due to aging boomers, approximated with normal truncated + at 18–80. Largest adult cohort is 30–34 per Census 2023 estimates. Mean set + to ~46 to reflect the adult-only distribution weighted toward working-age and + older adults. + constraints: + - type: hard_min + value: 18.0 + expression: null + reason: Adults only by spec definition + - type: hard_max + value: 80.0 + expression: null + reason: Upper bound per spec definition +- name: gender + type: categorical + category: universal + description: Self-identified gender of the individual (Male, Female, Non-binary/Other). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: gender_identity + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - Male + - Female + - Non-binary/Other + weights: + - 0.49 + - 0.493 + - 0.017 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://usafacts.org/articles/what-percentage-of-the-us-population-is-transgender/ + note: '2020 Census: 50.9% female, 49.1% male overall. USAFacts 2025 Household + Pulse data: ~1.70% identify as non-binary or other non-cisgender. Weights adjusted + slightly for the adult-only frame where male proportion is marginally higher + in younger cohorts but female is higher in older cohorts, netting near parity.' + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==3 + reason: Three gender categories required by spec +- name: race_ethnicity + type: categorical + category: universal + description: Racial and ethnic self-identification (White non-Hispanic, Black, Hispanic/Latino, + Asian, Other/Multiracial). + scope: partner_correlated + correlation_rate: null + semantic_type: null + identity_type: race_ethnicity + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - White non-Hispanic + - Black + - Hispanic/Latino + - Asian + - Other/Multiracial + weights: + - 0.577 + - 0.121 + - 0.19 + - 0.059 + - 0.053 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: https://www.pewresearch.org/race-and-ethnicity/2025/11/03/counting-race-how-the-census-measures-identity-and-what-americans-think-about-it/ + note: '2020 Census: White non-Hispanic 57.8%, Hispanic 18.7%, Black 12.1%, Asian + 5.9%, Two+ races 4.1%, other <1%. ''Other/Multiracial'' consolidates AIAN, NHPI, + Some Other Race, and Two or More Races. Slight downward adjustment on White + non-Hispanic to ~57.7% to reflect 2023–2024 trajectory per Census estimates.' + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==5 + reason: Five race/ethnicity categories per spec +- name: us_region + type: categorical + category: universal + description: US census region of residence (Northeast, Southeast, Midwest, Southwest, + West Coast). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - Northeast + - Southeast + - Midwest + - Southwest + - West Coast + weights: + - 0.175 + - 0.255 + - 0.205 + - 0.165 + - 0.2 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: https://www.census.gov/data/tables/time-series/demo/popest/2020s-national-detail.html + note: Census defines 4 regions (Northeast ~18%, Midwest ~21%, South ~38%, West + ~23%). Spec uses 5 regions splitting South into Southeast and Southwest (~60/40 + split of South), and West into Southwest and West Coast (~55/45 split). Northeast + ~17.5%, Southeast ~25.5% (SE portion of South), Midwest ~20.5%, Southwest ~16.5% + (SW portion of South + Mountain West), West Coast ~20% (Pacific states). + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==5 + reason: Five region categories per spec +- name: urban_rural + type: categorical + category: universal + description: Urbanicity of the household's location (Urban, Suburban, Rural). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - Urban + - Suburban + - Rural + weights: + - 0.235 + - 0.545 + - 0.22 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/ + note: 'Pew Research found ~14% rural, with ~46M rural, ~175M suburban, ~98M urban + (2018). 2020 Census: 81% urban broadly defined, but this includes suburbs. Pew + self-report surveys consistently show ~26% urban, ~53% suburban, ~21% rural. + Using ~23.5% urban core, ~54.5% suburban, ~22% rural to reflect post-pandemic + dispersal trends.' + constraints: + - type: spec_expression + value: null + expression: sum(weights)==1 + reason: Weights must sum to 1 + - type: spec_expression + value: null + expression: len(options)==3 + reason: Three urbanicity categories per spec +- name: openness + type: float + category: personality + description: 'Big Five openness to experience: curiosity, creativity, and receptivity + to new ideas.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.525 + std: 0.175 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., & John, O. P. (2017). The next Big Five Inventory. Journal + of Research in Personality. + note: 'US Big Five norms (Soto et al. 2011, JPSP): Openness T-score mean ~50 (population + normed). On 0–1 scale, population mean ~0.525 with SD ~0.175. US adults score + slightly above midpoint on Openness. Distribution is approximately normal in + large community samples.' + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: conscientiousness + type: float + category: personality + description: 'Big Five conscientiousness: self-discipline, organization, and goal-directed + behavior.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.565 + std: 0.165 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., et al. (2011). Age differences in personality traits from + 10 to 65. Journal of Personality and Social Psychology. + note: US adults score above midpoint on Conscientiousness; it increases with age. + Population mean ~0.565 (above neutral), SD ~0.165. Slightly higher mean than + Openness reflecting American cultural emphasis on diligence. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: extraversion + type: float + category: personality + description: 'Big Five extraversion: sociability, assertiveness, and positive affect + in social settings.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.515 + std: 0.18 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: 'Rentfrow, P. J., et al. (2013). Divided we stand: Three psychological + regions of the United States. Journal of Personality and Social Psychology.' + note: US adults are broadly extraverted relative to global norms, but the distribution + is approximately symmetric around midpoint. Rentfrow et al. found regional variation; + national mean ~0.515, SD ~0.18. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: agreeableness + type: float + category: personality + description: 'Big Five agreeableness: cooperativeness, empathy, and tendency toward + social harmony.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.56 + std: 0.16 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., et al. (2011). Age differences in personality traits from + 10 to 65. Journal of Personality and Social Psychology. + note: Agreeableness is above midpoint in US population norms; increases with age. + Mean ~0.56, SD ~0.16. Women score slightly higher than men on average. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: neuroticism + type: float + category: personality + description: 'Big Five neuroticism: emotional instability, anxiety, and susceptibility + to stress.' + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: independent + distribution: + type: normal + mean: 0.46 + std: 0.175 + min: 0.0 + max: 1.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: [] + modifiers: [] + grounding: + level: medium + method: extrapolated + source: Soto, C. J., et al. (2011). Age differences in personality traits from + 10 to 65. Journal of Personality and Social Psychology. + note: Neuroticism is below midpoint on average for US adults and declines with + age. Women score higher than men. Mean ~0.46, SD ~0.175. Post-pandemic era data + suggests slightly elevated population anxiety, consistent with Pew and Gallup + mental health tracking. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Normalized 0–1 scale lower bound + - type: hard_max + value: 1.0 + expression: null + reason: Normalized 0–1 scale upper bound +- name: education_level + type: categorical + category: universal + description: Highest educational attainment (Less than HS, HS diploma/GED, Some + college, Bachelor's degree, Graduate degree). + scope: partner_correlated + correlation_rate: null + semantic_type: education + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Less than HS + - HS diploma/GED + - Some college + - Bachelor's degree + - Graduate degree + weights: + - 0.09 + - 0.27 + - 0.2 + - 0.24 + - 0.2 + formula: null + depends_on: + - age + modifiers: + - when: age < 25 + multiply: null + add: null + weight_overrides: + Less than HS: 0.08 + HS diploma/GED: 0.3 + Some college: 0.48 + Bachelor's degree: 0.12 + Graduate degree: 0.02 + probability_override: null + - when: age >= 25 and age < 35 + multiply: null + add: null + weight_overrides: + Less than HS: 0.08 + HS diploma/GED: 0.24 + Some college: 0.26 + Bachelor's degree: 0.28 + Graduate degree: 0.14 + probability_override: null + - when: age >= 35 and age < 50 + multiply: null + add: null + weight_overrides: + Less than HS: 0.09 + HS diploma/GED: 0.26 + Some college: 0.24 + Bachelor's degree: 0.25 + Graduate degree: 0.16 + probability_override: null + - when: age >= 50 and age < 65 + multiply: null + add: null + weight_overrides: + Less than HS: 0.1 + HS diploma/GED: 0.3 + Some college: 0.24 + Bachelor's degree: 0.22 + Graduate degree: 0.14 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Less than HS: 0.13 + HS diploma/GED: 0.32 + Some college: 0.22 + Bachelor's degree: 0.2 + Graduate degree: 0.13 + probability_override: null + grounding: + level: strong + method: researched + source: US Census Bureau CPS 2024; educationdata.org 2025 + note: ~9% less than HS, ~27% HS diploma, ~20% some college/associate, ~24% bachelor's, + ~20% graduate. Ages 18-24 skew lower; modifiers will handle age dependency. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: household_income + type: int + category: universal + description: Annual household income in USD before taxes. + scope: household + correlation_rate: null + semantic_type: income + identity_type: null + display_format: currency + sampling: + strategy: conditional + distribution: + type: lognormal + mean: 83730.0 + std: 75000.0 + min: 0.0 + max: 800000.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: + - education_level + - us_region + - urban_rural + modifiers: + - when: education_level == 'Less than HS' + multiply: 0.48 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'HS diploma/GED' + multiply: 0.7 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'Some college' + multiply: 0.82 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'Bachelor\'s degree' + multiply: 1.25 + add: 0.0 + weight_overrides: null + probability_override: null + - when: education_level == 'Graduate degree' + multiply: 1.65 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'Northeast' + multiply: 1.12 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'West Coast' + multiply: 1.14 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'Southeast' + multiply: 0.9 + add: 0.0 + weight_overrides: null + probability_override: null + - when: us_region == 'Southwest' + multiply: 0.93 + add: 0.0 + weight_overrides: null + probability_override: null + - when: urban_rural == 'Urban' + multiply: 1.1 + add: 0.0 + weight_overrides: null + probability_override: null + - when: urban_rural == 'Rural' + multiply: 0.82 + add: 0.0 + weight_overrides: null + probability_override: null + grounding: + level: strong + method: researched + source: 'US Census Bureau Income in the United States: 2024 (P60-286); CNBC Sept + 2025' + note: Median household income $83,730 in 2024. Lognormal captures right-skewed + income distribution. Std set wide to capture full range from poverty to affluent. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Income cannot be negative + - type: hard_max + value: 800000.0 + expression: null + reason: Caps extreme outliers; 99th percentile US household income approx $500-600k +- name: marital_status + type: categorical + category: universal + description: Current marital or partnership status (Married/partnered, Single, Divorced/separated, + Widowed). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Married/partnered + - Single + - Divorced/separated + - Widowed + weights: + - 0.49 + - 0.31 + - 0.14 + - 0.06 + formula: null + depends_on: + - age + modifiers: + - when: age < 25 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.12 + Single: 0.83 + Divorced/separated: 0.04 + Widowed: 0.01 + probability_override: null + - when: age >= 25 and age < 35 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.46 + Single: 0.42 + Divorced/separated: 0.11 + Widowed: 0.01 + probability_override: null + - when: age >= 35 and age < 50 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.57 + Single: 0.23 + Divorced/separated: 0.18 + Widowed: 0.02 + probability_override: null + - when: age >= 50 and age < 65 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.6 + Single: 0.14 + Divorced/separated: 0.2 + Widowed: 0.06 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Married/partnered: 0.55 + Single: 0.07 + Divorced/separated: 0.16 + Widowed: 0.22 + probability_override: null + grounding: + level: strong + method: researched + source: USAFacts 2024; Census Bureau marital status data 2024 + note: '47.1% of households headed by married couples in 2024; ~49% adults married/partnered + including cohabiting. Single/never-married ~31%, divorced/separated ~14%, widowed + ~6%. Age modifiers critical: young adults skew single, older skew widowed.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: household_size + type: int + category: universal + description: Total number of people living in the household. + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: number + sampling: + strategy: conditional + distribution: + type: normal + mean: 2.53 + std: 1.4 + min: 1.0 + max: 10.0 + mean_formula: null + std_formula: null + min_formula: null + max_formula: null + formula: null + depends_on: + - marital_status + modifiers: + - when: marital_status == 'Married/partnered' + multiply: 1.35 + add: 0.0 + weight_overrides: null + probability_override: null + - when: marital_status == 'Single' + multiply: 0.68 + add: 0.0 + weight_overrides: null + probability_override: null + - when: marital_status == 'Divorced/separated' + multiply: 0.88 + add: 0.0 + weight_overrides: null + probability_override: null + - when: marital_status == 'Widowed' + multiply: 0.75 + add: 0.0 + weight_overrides: null + probability_override: null + grounding: + level: strong + method: researched + source: US Census Bureau ACS 2024; average household size ~2.53 + note: US average household size is 2.53. Married households average ~3.1, single-person + ~1.0. Marital status modifier will shift mean upward for married/partnered. + constraints: + - type: hard_min + value: 1.0 + expression: null + reason: Household must have at least 1 person (respondent) + - type: hard_max + value: 10.0 + expression: null + reason: Households of 10+ are extreme outliers (<0.1%) +- name: has_children + type: boolean + category: universal + description: Whether the individual has any children (under 18) living in the household. + scope: individual + correlation_rate: null + semantic_type: null + identity_type: parental_status + display_format: null + sampling: + strategy: conditional + distribution: + type: boolean + probability_true: 0.28 + formula: null + depends_on: + - age + - marital_status + modifiers: + - when: age < 25 and marital_status == 'Single' + multiply: null + add: null + weight_overrides: null + probability_override: 0.06 + - when: age >= 25 and age < 35 and marital_status == 'Married/partnered' + multiply: null + add: null + weight_overrides: null + probability_override: 0.52 + - when: age >= 35 and age < 50 and marital_status == 'Married/partnered' + multiply: null + add: null + weight_overrides: null + probability_override: 0.58 + - when: age >= 50 and marital_status == 'Married/partnered' + multiply: null + add: null + weight_overrides: null + probability_override: 0.1 + - when: age >= 35 and age < 50 and marital_status == 'Single' + multiply: null + add: null + weight_overrides: null + probability_override: 0.18 + - when: age >= 50 + multiply: null + add: null + weight_overrides: null + probability_override: 0.05 + grounding: + level: medium + method: researched + source: Census Bureau CPS 2024; ~28% of households have children under 18 + note: 'About 28% of all adults have children under 18 at home. Strong age dependency: + near-zero for 18-22, peaks at ~45% for ages 30-45, near-zero for 65+. Marital + status also a major modifier.' + constraints: + - type: expression + value: null + expression: not (has_children and age < 18) + reason: Under-18s cannot have children in household as adult respondents (floor + is 18) +- name: employment_sector + type: categorical + category: population_specific + description: Primary employment sector (Federal government, State/local government, + Private sector, Gig/contract, Self-employed, Retired, Unemployed, Not in labor + force). + scope: individual + correlation_rate: null + semantic_type: employment + identity_type: professional_identity + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Federal government + - State/local government + - Private sector + - Gig/contract + - Self-employed + - Retired + - Unemployed + - Not in labor force + weights: + - 0.02 + - 0.13 + - 0.52 + - 0.06 + - 0.07 + - 0.12 + - 0.03 + - 0.05 + formula: null + depends_on: + - age + - education_level + modifiers: + - when: age < 25 and education_level == 'Less than HS' + multiply: null + add: null + weight_overrides: + Federal government: 0.01 + State/local government: 0.03 + Private sector: 0.42 + Gig/contract: 0.15 + Self-employed: 0.04 + Retired: 0.0 + Unemployed: 0.15 + Not in labor force: 0.2 + probability_override: null + - when: age < 25 and education_level in ['HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + Federal government: 0.02 + State/local government: 0.04 + Private sector: 0.52 + Gig/contract: 0.14 + Self-employed: 0.04 + Retired: 0.0 + Unemployed: 0.1 + Not in labor force: 0.14 + probability_override: null + - when: age >= 25 and age < 45 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + Federal government: 0.02 + State/local government: 0.06 + Private sector: 0.56 + Gig/contract: 0.12 + Self-employed: 0.08 + Retired: 0.01 + Unemployed: 0.07 + Not in labor force: 0.08 + probability_override: null + - when: age >= 25 and age < 55 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Federal government: 0.06 + State/local government: 0.13 + Private sector: 0.58 + Gig/contract: 0.05 + Self-employed: 0.1 + Retired: 0.01 + Unemployed: 0.03 + Not in labor force: 0.04 + probability_override: null + - when: age >= 55 and age < 65 + multiply: null + add: null + weight_overrides: + Federal government: 0.04 + State/local government: 0.1 + Private sector: 0.42 + Gig/contract: 0.06 + Self-employed: 0.12 + Retired: 0.16 + Unemployed: 0.04 + Not in labor force: 0.06 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Federal government: 0.01 + State/local government: 0.03 + Private sector: 0.12 + Gig/contract: 0.04 + Self-employed: 0.08 + Retired: 0.6 + Unemployed: 0.02 + Not in labor force: 0.1 + probability_override: null + grounding: + level: strong + method: researched + source: BLS Employment and Wages 2024; BLS CPS 2024 + note: 'BLS 2024: federal ~3M, state ~4.8M, local ~14.6M employees; private ~132.6M. + Self-employed ~10% of employed. Retired and NILF weighted for full adult 18-80 + population. Age modifiers critical: retired share surges at 65+.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: job_security_perception + type: categorical + category: population_specific + description: Perceived stability of current employment (Very secure, Somewhat secure, + Somewhat insecure, Very insecure, N/A - not employed). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Very secure + - Somewhat secure + - Somewhat insecure + - Very insecure + - N/A - not employed + weights: + - 0.3 + - 0.35 + - 0.13 + - 0.07 + - 0.15 + formula: null + depends_on: + - employment_sector + modifiers: + - when: employment_sector == 'Federal government' + multiply: null + add: null + weight_overrides: + Very secure: 0.38 + Somewhat secure: 0.35 + Somewhat insecure: 0.18 + Very insecure: 0.09 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'State/local government' + multiply: null + add: null + weight_overrides: + Very secure: 0.42 + Somewhat secure: 0.38 + Somewhat insecure: 0.14 + Very insecure: 0.06 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Private sector' + multiply: null + add: null + weight_overrides: + Very secure: 0.28 + Somewhat secure: 0.42 + Somewhat insecure: 0.2 + Very insecure: 0.1 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Gig/contract' + multiply: null + add: null + weight_overrides: + Very secure: 0.08 + Somewhat secure: 0.27 + Somewhat insecure: 0.38 + Very insecure: 0.27 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Self-employed' + multiply: null + add: null + weight_overrides: + Very secure: 0.2 + Somewhat secure: 0.38 + Somewhat insecure: 0.28 + Very insecure: 0.14 + N/A - not employed: 0.0 + probability_override: null + - when: employment_sector == 'Retired' + multiply: null + add: null + weight_overrides: + Very secure: 0.0 + Somewhat secure: 0.0 + Somewhat insecure: 0.0 + Very insecure: 0.0 + N/A - not employed: 1.0 + probability_override: null + - when: employment_sector == 'Unemployed' + multiply: null + add: null + weight_overrides: + Very secure: 0.0 + Somewhat secure: 0.0 + Somewhat insecure: 0.0 + Very insecure: 0.0 + N/A - not employed: 1.0 + probability_override: null + - when: employment_sector == 'Not in labor force' + multiply: null + add: null + weight_overrides: + Very secure: 0.0 + Somewhat secure: 0.0 + Somewhat insecure: 0.0 + Very insecure: 0.0 + N/A - not employed: 1.0 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Gallup Job Security surveys; Federal Reserve SHED 2024 + note: Majority of employed workers report feeling secure. ~20% report some insecurity. + N/A bucket covers retired, unemployed, NILF (~15-20% of adult population). + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: financial_margin + type: categorical + category: population_specific + description: Financial buffer status indicating paycheck-to-paycheck living (Comfortable + savings buffer, Modest buffer, Paycheck-to-paycheck, In debt/deficit). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Comfortable savings buffer + - Modest buffer + - Paycheck-to-paycheck + - In debt/deficit + weights: + - 0.25 + - 0.27 + - 0.33 + - 0.15 + formula: null + depends_on: + - household_income + modifiers: + - when: household_income < 35000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.04 + Modest buffer: 0.12 + Paycheck-to-paycheck: 0.44 + In debt/deficit: 0.4 + probability_override: null + - when: household_income >= 35000 and household_income < 60000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.1 + Modest buffer: 0.28 + Paycheck-to-paycheck: 0.42 + In debt/deficit: 0.2 + probability_override: null + - when: household_income >= 60000 and household_income < 100000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.22 + Modest buffer: 0.38 + Paycheck-to-paycheck: 0.3 + In debt/deficit: 0.1 + probability_override: null + - when: household_income >= 100000 and household_income < 150000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.4 + Modest buffer: 0.38 + Paycheck-to-paycheck: 0.17 + In debt/deficit: 0.05 + probability_override: null + - when: household_income >= 150000 + multiply: null + add: null + weight_overrides: + Comfortable savings buffer: 0.6 + Modest buffer: 0.28 + Paycheck-to-paycheck: 0.09 + In debt/deficit: 0.03 + probability_override: null + grounding: + level: strong + method: researched + source: Federal Reserve SHED 2024; multiple paycheck-to-paycheck surveys 2024 + note: Approximately 63-66% of Americans live paycheck-to-paycheck per various + 2024 surveys. Fed SHED shows ~28% skipped medical care due to cost. Comfortable + savers ~25%, modest buffer ~27%, P2P ~33%, deficit ~15%. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: investment_profile + type: categorical + category: population_specific + description: Investment and financial literacy profile (No investments, 401k/IRA + only, Diversified investor, Active trader, Crypto holder). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - No investments + - 401k/IRA only + - Diversified investor + - Active trader + - Crypto holder + weights: + - 0.29 + - 0.38 + - 0.17 + - 0.08 + - 0.08 + formula: null + depends_on: + - household_income + - education_level + modifiers: + - when: household_income < 40000 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + No investments: 0.65 + 401k/IRA only: 0.22 + Diversified investor: 0.05 + Active trader: 0.03 + Crypto holder: 0.05 + probability_override: null + - when: household_income >= 40000 and household_income < 80000 and education_level + in ['Some college', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + No investments: 0.3 + 401k/IRA only: 0.42 + Diversified investor: 0.12 + Active trader: 0.06 + Crypto holder: 0.1 + probability_override: null + - when: household_income >= 80000 and education_level == 'Bachelor\'s degree' + multiply: null + add: null + weight_overrides: + No investments: 0.1 + 401k/IRA only: 0.44 + Diversified investor: 0.3 + Active trader: 0.1 + Crypto holder: 0.06 + probability_override: null + - when: household_income >= 100000 and education_level == 'Graduate degree' + multiply: null + add: null + weight_overrides: + No investments: 0.05 + 401k/IRA only: 0.3 + Diversified investor: 0.45 + Active trader: 0.15 + Crypto holder: 0.05 + probability_override: null + - when: household_income >= 150000 + multiply: null + add: null + weight_overrides: + No investments: 0.03 + 401k/IRA only: 0.22 + Diversified investor: 0.5 + Active trader: 0.2 + Crypto holder: 0.05 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Federal Reserve SHED 2024; Gallup Stock Market Ownership 2024 + note: ~55-58% of Americans own stocks (many via retirement accounts). ~29% have + no investments. Crypto ownership ~15-20% but as primary profile ~8%. Diversified + investor and active trader reflect smaller educated/higher-income segments. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: primary_info_source + type: categorical + category: population_specific + description: Primary source of news and information (Cable/broadcast TV news, Social + media, Online news sites, Podcasts, Local news, Print media, Avoids news). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Cable/broadcast TV news + - Social media + - Online news sites + - Podcasts + - Local news + - Print media + - Avoids news + weights: + - 0.28 + - 0.25 + - 0.18 + - 0.08 + - 0.09 + - 0.04 + - 0.08 + formula: null + depends_on: + - age + - education_level + modifiers: + - when: age < 30 and education_level in ['Less than HS', 'HS diploma/GED', 'Some + college'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.05 + Social media: 0.55 + Online news sites: 0.2 + Podcasts: 0.1 + Local news: 0.04 + Print media: 0.01 + Avoids news: 0.05 + probability_override: null + - when: age < 30 and education_level in ['Bachelor\'s degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.04 + Social media: 0.38 + Online news sites: 0.32 + Podcasts: 0.18 + Local news: 0.04 + Print media: 0.02 + Avoids news: 0.02 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.22 + Social media: 0.38 + Online news sites: 0.18 + Podcasts: 0.07 + Local news: 0.1 + Print media: 0.02 + Avoids news: 0.03 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.14 + Social media: 0.22 + Online news sites: 0.38 + Podcasts: 0.16 + Local news: 0.06 + Print media: 0.03 + Avoids news: 0.01 + probability_override: null + - when: age >= 50 and age < 65 and education_level in ['Less than HS', 'HS diploma/GED', + 'Some college'] + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.42 + Social media: 0.22 + Online news sites: 0.18 + Podcasts: 0.06 + Local news: 0.09 + Print media: 0.02 + Avoids news: 0.01 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Cable/broadcast TV news: 0.52 + Social media: 0.1 + Online news sites: 0.16 + Podcasts: 0.04 + Local news: 0.14 + Print media: 0.03 + Avoids news: 0.01 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Reuters Institute Digital News Report 2024; Pew Research Media consumption + 2024 + note: 'TV still largest single source ~28%, social media surging esp. under 35 + ~25%, online news ~18%. Podcasts growing ~8%. Print declining ~4%. Age modifiers + essential: older adults heavily TV, younger heavily social media.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: social_media_behavior + type: categorical + category: population_specific + description: Social media engagement posture (Non-user, Passive consumer, Occasional + poster, Active poster/Influencer). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Non-user + - Passive consumer + - Occasional poster + - Active poster/Influencer + weights: + - 0.16 + - 0.42 + - 0.28 + - 0.14 + formula: null + depends_on: + - age + - primary_info_source + modifiers: + - when: age < 30 and primary_info_source == 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.02 + Passive consumer: 0.25 + Occasional poster: 0.4 + Active poster/Influencer: 0.33 + probability_override: null + - when: age < 30 and primary_info_source != 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.06 + Passive consumer: 0.38 + Occasional poster: 0.38 + Active poster/Influencer: 0.18 + probability_override: null + - when: age >= 30 and age < 50 and primary_info_source == 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.04 + Passive consumer: 0.32 + Occasional poster: 0.42 + Active poster/Influencer: 0.22 + probability_override: null + - when: age >= 30 and age < 50 and primary_info_source != 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.14 + Passive consumer: 0.48 + Occasional poster: 0.28 + Active poster/Influencer: 0.1 + probability_override: null + - when: age >= 50 and primary_info_source == 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.06 + Passive consumer: 0.5 + Occasional poster: 0.34 + Active poster/Influencer: 0.1 + probability_override: null + - when: age >= 50 and primary_info_source != 'Social media' + multiply: null + add: null + weight_overrides: + Non-user: 0.35 + Passive consumer: 0.42 + Occasional poster: 0.18 + Active poster/Influencer: 0.05 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Pew Research Social Media Use 2024; Reuters Digital News Report 2024 + note: ~84% of US adults use social media in some form. Most are passive consumers. + Active posters ~28-30% of users; influencers a small fraction. Non-users concentrated + among older adults 65+. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: tech_adoption_posture + type: categorical + category: population_specific + description: Attitude toward adopting new technology (Technophobe/Avoider, Late + majority adopter, Early majority adopter, Early adopter, Innovator). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Technophobe/Avoider + - Late majority adopter + - Early majority adopter + - Early adopter + - Innovator + weights: + - 0.14 + - 0.26 + - 0.34 + - 0.18 + - 0.08 + formula: null + depends_on: + - age + - education_level + modifiers: + - when: age < 30 and education_level in ['Bachelor\'s degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.02 + Late majority adopter: 0.08 + Early majority adopter: 0.28 + Early adopter: 0.4 + Innovator: 0.22 + probability_override: null + - when: age < 30 and education_level in ['Less than HS', 'HS diploma/GED', 'Some + college'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.04 + Late majority adopter: 0.16 + Early majority adopter: 0.38 + Early adopter: 0.32 + Innovator: 0.1 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.04 + Late majority adopter: 0.16 + Early majority adopter: 0.34 + Early adopter: 0.32 + Innovator: 0.14 + probability_override: null + - when: age >= 30 and age < 50 and education_level in ['Less than HS', 'HS diploma/GED', + 'Some college'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.1 + Late majority adopter: 0.3 + Early majority adopter: 0.36 + Early adopter: 0.18 + Innovator: 0.06 + probability_override: null + - when: age >= 50 and age < 65 and education_level in ['Bachelor\'s degree', 'Graduate + degree'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.1 + Late majority adopter: 0.28 + Early majority adopter: 0.36 + Early adopter: 0.2 + Innovator: 0.06 + probability_override: null + - when: age >= 50 and education_level in ['Less than HS', 'HS diploma/GED', 'Some + college'] + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.26 + Late majority adopter: 0.38 + Early majority adopter: 0.24 + Early adopter: 0.09 + Innovator: 0.03 + probability_override: null + - when: age >= 65 + multiply: null + add: null + weight_overrides: + Technophobe/Avoider: 0.38 + Late majority adopter: 0.36 + Early majority adopter: 0.18 + Early adopter: 0.06 + Innovator: 0.02 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Rogers Diffusion of Innovation model applied to US population; Pew Research + Tech Adoption 2024 + note: 'Loosely follows Rogers'' diffusion curve: innovators ~2.5%, early adopters + ~13.5%, early majority ~34%, late majority ~34%, laggards ~16%. Adjusted for + US digital economy context and 18-80 age range.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: religious_engagement + type: categorical + category: population_specific + description: Level of religious practice and belief (Secular/None, Nominally affiliated, + Moderately religious, Devout). + scope: partner_correlated + correlation_rate: null + semantic_type: null + identity_type: religious_affiliation + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Secular/None + - Nominally affiliated + - Moderately religious + - Devout + weights: + - 0.29 + - 0.25 + - 0.27 + - 0.19 + formula: null + depends_on: + - us_region + - race_ethnicity + modifiers: + - when: us_region == 'Southeast' and race_ethnicity == 'Black' + multiply: null + add: null + weight_overrides: + Secular/None: 0.06 + Nominally affiliated: 0.18 + Moderately religious: 0.34 + Devout: 0.42 + probability_override: null + - when: us_region == 'Southeast' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Secular/None: 0.18 + Nominally affiliated: 0.24 + Moderately religious: 0.3 + Devout: 0.28 + probability_override: null + - when: us_region == 'Southeast' and race_ethnicity == 'Hispanic/Latino' + multiply: null + add: null + weight_overrides: + Secular/None: 0.12 + Nominally affiliated: 0.22 + Moderately religious: 0.34 + Devout: 0.32 + probability_override: null + - when: us_region == 'Midwest' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Secular/None: 0.22 + Nominally affiliated: 0.28 + Moderately religious: 0.3 + Devout: 0.2 + probability_override: null + - when: us_region == 'Southwest' + multiply: null + add: null + weight_overrides: + Secular/None: 0.22 + Nominally affiliated: 0.26 + Moderately religious: 0.28 + Devout: 0.24 + probability_override: null + - when: us_region == 'West Coast' and race_ethnicity in ['White non-Hispanic', + 'Asian'] + multiply: null + add: null + weight_overrides: + Secular/None: 0.42 + Nominally affiliated: 0.3 + Moderately religious: 0.18 + Devout: 0.1 + probability_override: null + - when: us_region == 'Northeast' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Secular/None: 0.38 + Nominally affiliated: 0.32 + Moderately religious: 0.2 + Devout: 0.1 + probability_override: null + - when: race_ethnicity == 'Asian' + multiply: null + add: null + weight_overrides: + Secular/None: 0.34 + Nominally affiliated: 0.28 + Moderately religious: 0.24 + Devout: 0.14 + probability_override: null + grounding: + level: strong + method: researched + source: Pew Research Religious Landscape Study; Gallup Religion 2024 + note: ~29% identify as religiously unaffiliated (nones). ~25% nominally affiliated + but rarely practice. ~27% moderately religious (attend occasionally). ~19% devout + (weekly+ attendance). Southeast and Midwest regions skew more devout; Northeast/West + Coast more secular. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: political_identity + type: categorical + category: population_specific + description: Political party affiliation and ideological strength (Strong Democrat, + Lean Democrat, True Independent, Lean Republican, Strong Republican). + scope: partner_correlated + correlation_rate: null + semantic_type: null + identity_type: political_orientation + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Strong Democrat + - Lean Democrat + - True Independent + - Lean Republican + - Strong Republican + weights: + - 0.18 + - 0.18 + - 0.17 + - 0.2 + - 0.27 + formula: null + depends_on: + - us_region + - education_level + - race_ethnicity + modifiers: + - when: us_region == 'Northeast' and education_level in ['Bachelor\'s degree', + 'Graduate degree'] and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.3 + Lean Democrat: 0.28 + True Independent: 0.18 + Lean Republican: 0.14 + Strong Republican: 0.1 + probability_override: null + - when: us_region == 'Southeast' and education_level in ['Less than HS', 'HS diploma/GED'] + and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.08 + Lean Democrat: 0.1 + True Independent: 0.16 + Lean Republican: 0.24 + Strong Republican: 0.42 + probability_override: null + - when: us_region == 'Southeast' and race_ethnicity == 'Black' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.52 + Lean Democrat: 0.26 + True Independent: 0.12 + Lean Republican: 0.06 + Strong Republican: 0.04 + probability_override: null + - when: race_ethnicity == 'Hispanic/Latino' and us_region in ['Southwest', 'West + Coast'] + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.28 + Lean Democrat: 0.28 + True Independent: 0.22 + Lean Republican: 0.13 + Strong Republican: 0.09 + probability_override: null + - when: race_ethnicity == 'Asian' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.28 + Lean Democrat: 0.28 + True Independent: 0.22 + Lean Republican: 0.13 + Strong Republican: 0.09 + probability_override: null + - when: us_region == 'West Coast' and education_level in ['Bachelor\'s degree', + 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.34 + Lean Democrat: 0.26 + True Independent: 0.18 + Lean Republican: 0.12 + Strong Republican: 0.1 + probability_override: null + - when: us_region == 'Midwest' and education_level in ['Less than HS', 'HS diploma/GED'] + and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.1 + Lean Democrat: 0.13 + True Independent: 0.18 + Lean Republican: 0.24 + Strong Republican: 0.35 + probability_override: null + - when: us_region == 'Southwest' and education_level in ['Less than HS', 'HS diploma/GED'] + and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.08 + Lean Democrat: 0.11 + True Independent: 0.16 + Lean Republican: 0.26 + Strong Republican: 0.39 + probability_override: null + - when: education_level == 'Graduate degree' and race_ethnicity == 'White non-Hispanic' + multiply: null + add: null + weight_overrides: + Strong Democrat: 0.3 + Lean Democrat: 0.28 + True Independent: 0.18 + Lean Republican: 0.14 + Strong Republican: 0.1 + probability_override: null + grounding: + level: strong + method: researched + source: Gallup Party Affiliation 2024; Pew Research Partisan Identification 2024-2025 + note: '2024 Gallup: 46% R/lean-R, 45% D/lean-D, 43% pure independents. Strong + partisans ~28% each side per Pew. True independents (no lean) ~17%. Slight Republican + lean for base reflecting 2024 election environment. Modifiers adjust heavily + by region, education, race.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: political_engagement_level + type: categorical + category: population_specific + description: Level of political participation and interest (Disengaged, Single-issue + voter, Moderate/occasional participant, Highly engaged partisan). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Disengaged + - Single-issue voter + - Moderate/occasional participant + - Highly engaged partisan + weights: + - 0.22 + - 0.18 + - 0.38 + - 0.22 + formula: null + depends_on: + - political_identity + - age + modifiers: + - when: political_identity in ['Strong Democrat', 'Strong Republican'] and age + >= 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.04 + Single-issue voter: 0.12 + Moderate/occasional participant: 0.24 + Highly engaged partisan: 0.6 + probability_override: null + - when: political_identity in ['Strong Democrat', 'Strong Republican'] and age + < 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.06 + Single-issue voter: 0.16 + Moderate/occasional participant: 0.3 + Highly engaged partisan: 0.48 + probability_override: null + - when: political_identity == 'True Independent' and age < 35 + multiply: null + add: null + weight_overrides: + Disengaged: 0.32 + Single-issue voter: 0.28 + Moderate/occasional participant: 0.3 + Highly engaged partisan: 0.1 + probability_override: null + - when: political_identity == 'True Independent' and age >= 35 + multiply: null + add: null + weight_overrides: + Disengaged: 0.2 + Single-issue voter: 0.3 + Moderate/occasional participant: 0.38 + Highly engaged partisan: 0.12 + probability_override: null + - when: political_identity in ['Lean Democrat', 'Lean Republican'] and age >= + 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.1 + Single-issue voter: 0.22 + Moderate/occasional participant: 0.44 + Highly engaged partisan: 0.24 + probability_override: null + - when: political_identity in ['Lean Democrat', 'Lean Republican'] and age < 45 + multiply: null + add: null + weight_overrides: + Disengaged: 0.18 + Single-issue voter: 0.26 + Moderate/occasional participant: 0.4 + Highly engaged partisan: 0.16 + probability_override: null + grounding: + level: medium + method: extrapolated + source: ANES 2024; Pew Research Political Engagement 2024 + note: About 22% are largely disengaged from politics, 18% single-issue focused. + The moderate/occasional majority ~38%. Highly engaged ~22%, consistent with + share who always vote in midterms and follow news closely. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: vote_2024_presidential + type: categorical + category: population_specific + description: Reported 2024 presidential vote choice (Trump, Harris, Third party, + Did not vote, Not eligible). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Trump + - Harris + - Third party + - Did not vote + - Not eligible + weights: + - 0.31 + - 0.3 + - 0.02 + - 0.28 + - 0.09 + formula: null + depends_on: + - political_identity + - political_engagement_level + modifiers: + - when: political_identity == 'Strong Republican' and political_engagement_level + == 'Highly engaged partisan' + multiply: null + add: null + weight_overrides: + Trump: 0.9 + Harris: 0.02 + Third party: 0.03 + Did not vote: 0.05 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Strong Democrat' and political_engagement_level + == 'Highly engaged partisan' + multiply: null + add: null + weight_overrides: + Trump: 0.02 + Harris: 0.9 + Third party: 0.04 + Did not vote: 0.04 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Lean Republican' + multiply: null + add: null + weight_overrides: + Trump: 0.68 + Harris: 0.14 + Third party: 0.06 + Did not vote: 0.12 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Lean Democrat' + multiply: null + add: null + weight_overrides: + Trump: 0.1 + Harris: 0.72 + Third party: 0.07 + Did not vote: 0.11 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'True Independent' and political_engagement_level + == 'Disengaged' + multiply: null + add: null + weight_overrides: + Trump: 0.16 + Harris: 0.16 + Third party: 0.1 + Did not vote: 0.52 + Not eligible: 0.06 + probability_override: null + - when: political_identity == 'True Independent' and political_engagement_level + != 'Disengaged' + multiply: null + add: null + weight_overrides: + Trump: 0.32 + Harris: 0.32 + Third party: 0.12 + Did not vote: 0.22 + Not eligible: 0.02 + probability_override: null + - when: political_identity == 'Strong Republican' and political_engagement_level + in ['Disengaged', 'Single-issue voter'] + multiply: null + add: null + weight_overrides: + Trump: 0.72 + Harris: 0.05 + Third party: 0.05 + Did not vote: 0.18 + Not eligible: 0.0 + probability_override: null + - when: political_identity == 'Strong Democrat' and political_engagement_level + in ['Disengaged', 'Single-issue voter'] + multiply: null + add: null + weight_overrides: + Trump: 0.04 + Harris: 0.72 + Third party: 0.06 + Did not vote: 0.18 + Not eligible: 0.0 + probability_override: null + grounding: + level: strong + method: researched + source: 2024 Presidential Election results; US Elections Project turnout data + note: Trump won 49.9% of popular vote, Harris 48.4% of votes cast. ~64% of eligible + voters voted. ~9% of adults are non-citizens/not eligible. Did-not-vote reflects + low turnout among disengaged. Political identity modifier will strongly predict + this. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: midterm_turnout_propensity + type: categorical + category: population_specific + description: Historical tendency to vote in midterm elections (Always votes, Sometimes + votes, Rarely votes, Never votes). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Always votes + - Sometimes votes + - Rarely votes + - Never votes + weights: + - 0.35 + - 0.27 + - 0.2 + - 0.18 + formula: null + depends_on: + - political_engagement_level + - age + modifiers: + - when: political_engagement_level == 'Highly engaged partisan' and age >= 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.72 + Sometimes votes: 0.2 + Rarely votes: 0.06 + Never votes: 0.02 + probability_override: null + - when: political_engagement_level == 'Highly engaged partisan' and age < 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.52 + Sometimes votes: 0.3 + Rarely votes: 0.12 + Never votes: 0.06 + probability_override: null + - when: political_engagement_level == 'Moderate/occasional participant' and age + >= 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.4 + Sometimes votes: 0.38 + Rarely votes: 0.16 + Never votes: 0.06 + probability_override: null + - when: political_engagement_level == 'Moderate/occasional participant' and age + < 45 + multiply: null + add: null + weight_overrides: + Always votes: 0.2 + Sometimes votes: 0.38 + Rarely votes: 0.28 + Never votes: 0.14 + probability_override: null + - when: political_engagement_level == 'Single-issue voter' + multiply: null + add: null + weight_overrides: + Always votes: 0.2 + Sometimes votes: 0.35 + Rarely votes: 0.3 + Never votes: 0.15 + probability_override: null + - when: political_engagement_level == 'Disengaged' and age < 35 + multiply: null + add: null + weight_overrides: + Always votes: 0.04 + Sometimes votes: 0.14 + Rarely votes: 0.32 + Never votes: 0.5 + probability_override: null + - when: political_engagement_level == 'Disengaged' and age >= 35 + multiply: null + add: null + weight_overrides: + Always votes: 0.08 + Sometimes votes: 0.22 + Rarely votes: 0.36 + Never votes: 0.34 + probability_override: null + grounding: + level: medium + method: extrapolated + source: US Elections Project midterm turnout data; Pew Research voter typology + 2024 + note: 'Midterm turnout ~50% of eligible voters (2022 ~46.8%). Always-voters ~35% + of adults, sometimes ~27%, rarely ~20%, never ~18%. Age modifier critical: older + adults much more consistent voters.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: congressional_district_competitiveness + type: categorical + category: population_specific + description: Competitiveness classification of the agent's congressional district + (Safe Republican, Lean Republican, Swing district, Lean Democrat, Safe Democrat). + scope: household + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Safe Republican + - Lean Republican + - Swing district + - Lean Democrat + - Safe Democrat + weights: + - 0.36 + - 0.12 + - 0.1 + - 0.12 + - 0.3 + formula: null + depends_on: + - us_region + - urban_rural + modifiers: + - when: us_region == 'Northeast' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.05 + Lean Republican: 0.08 + Swing district: 0.12 + Lean Democrat: 0.22 + Safe Democrat: 0.53 + probability_override: null + - when: us_region == 'Northeast' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.15 + Swing district: 0.28 + Lean Democrat: 0.28 + Safe Democrat: 0.19 + probability_override: null + - when: us_region == 'Northeast' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.4 + Lean Republican: 0.28 + Swing district: 0.18 + Lean Democrat: 0.09 + Safe Democrat: 0.05 + probability_override: null + - when: us_region == 'Southeast' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.12 + Swing district: 0.18 + Lean Democrat: 0.28 + Safe Democrat: 0.32 + probability_override: null + - when: us_region == 'Southeast' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.22 + Lean Republican: 0.28 + Swing district: 0.28 + Lean Democrat: 0.14 + Safe Democrat: 0.08 + probability_override: null + - when: us_region == 'Southeast' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.55 + Lean Republican: 0.26 + Swing district: 0.12 + Lean Democrat: 0.05 + Safe Democrat: 0.02 + probability_override: null + - when: us_region == 'Midwest' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.06 + Lean Republican: 0.1 + Swing district: 0.18 + Lean Democrat: 0.26 + Safe Democrat: 0.4 + probability_override: null + - when: us_region == 'Midwest' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.2 + Lean Republican: 0.26 + Swing district: 0.32 + Lean Democrat: 0.14 + Safe Democrat: 0.08 + probability_override: null + - when: us_region == 'Midwest' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.54 + Lean Republican: 0.28 + Swing district: 0.12 + Lean Democrat: 0.04 + Safe Democrat: 0.02 + probability_override: null + - when: us_region == 'Southwest' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.16 + Swing district: 0.26 + Lean Democrat: 0.26 + Safe Democrat: 0.22 + probability_override: null + - when: us_region == 'Southwest' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.24 + Lean Republican: 0.28 + Swing district: 0.28 + Lean Democrat: 0.12 + Safe Democrat: 0.08 + probability_override: null + - when: us_region == 'Southwest' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.56 + Lean Republican: 0.24 + Swing district: 0.12 + Lean Democrat: 0.05 + Safe Democrat: 0.03 + probability_override: null + - when: us_region == 'West Coast' and urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.04 + Lean Republican: 0.06 + Swing district: 0.1 + Lean Democrat: 0.22 + Safe Democrat: 0.58 + probability_override: null + - when: us_region == 'West Coast' and urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.1 + Lean Republican: 0.18 + Swing district: 0.26 + Lean Democrat: 0.26 + Safe Democrat: 0.2 + probability_override: null + - when: us_region == 'West Coast' and urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Safe Republican: 0.44 + Lean Republican: 0.28 + Swing district: 0.16 + Lean Democrat: 0.08 + Safe Democrat: 0.04 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Cook Political Report 2024 district ratings; DCCC/NRCC targeting lists + note: Approximately 35-40 truly competitive House districts out of 435 (~10%). + Safe R districts slightly outnumber safe D given geographic sorting. Rural/suburban + Republican districts vs. urban Democratic strongholds. Urban/rural modifier + will strongly adjust this. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: top_issue_2026 + type: categorical + category: population_specific + description: Single most salient policy issue heading into the 2026 midterms (Economy/Jobs, + Abortion/Reproductive rights, Immigration, Democracy/Rule of law, Healthcare, + Climate, Education, AI/Technology). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Economy/Jobs + - Abortion/Reproductive rights + - Immigration + - Democracy/Rule of law + - Healthcare + - Climate + - Education + - AI/Technology + weights: + - 0.28 + - 0.13 + - 0.15 + - 0.12 + - 0.13 + - 0.07 + - 0.07 + - 0.05 + formula: null + depends_on: + - political_identity + - employment_sector + modifiers: + - when: political_identity == 'Strong Republican' and employment_sector in ['Private + sector', 'Self-employed', 'Gig/contract'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.38 + Abortion/Reproductive rights: 0.02 + Immigration: 0.28 + Democracy/Rule of law: 0.04 + Healthcare: 0.1 + Climate: 0.02 + Education: 0.06 + AI/Technology: 0.1 + probability_override: null + - when: political_identity == 'Strong Democrat' and employment_sector in ['State/local + government', 'Federal government'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.14 + Abortion/Reproductive rights: 0.22 + Immigration: 0.04 + Democracy/Rule of law: 0.28 + Healthcare: 0.16 + Climate: 0.1 + Education: 0.05 + AI/Technology: 0.01 + probability_override: null + - when: political_identity == 'Strong Democrat' and employment_sector in ['Private + sector', 'Self-employed'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.18 + Abortion/Reproductive rights: 0.2 + Immigration: 0.04 + Democracy/Rule of law: 0.24 + Healthcare: 0.16 + Climate: 0.1 + Education: 0.06 + AI/Technology: 0.02 + probability_override: null + - when: political_identity == 'True Independent' and employment_sector in ['Private + sector', 'Gig/contract', 'Unemployed'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.42 + Abortion/Reproductive rights: 0.08 + Immigration: 0.16 + Democracy/Rule of law: 0.12 + Healthcare: 0.12 + Climate: 0.04 + Education: 0.04 + AI/Technology: 0.02 + probability_override: null + - when: political_identity in ['Lean Republican', 'Strong Republican'] and employment_sector + == 'Retired' + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.26 + Abortion/Reproductive rights: 0.04 + Immigration: 0.26 + Democracy/Rule of law: 0.06 + Healthcare: 0.28 + Climate: 0.02 + Education: 0.06 + AI/Technology: 0.02 + probability_override: null + - when: political_identity in ['Strong Democrat', 'Lean Democrat'] and employment_sector + == 'Retired' + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.18 + Abortion/Reproductive rights: 0.14 + Immigration: 0.04 + Democracy/Rule of law: 0.22 + Healthcare: 0.3 + Climate: 0.06 + Education: 0.04 + AI/Technology: 0.02 + probability_override: null + - when: employment_sector in ['Federal government', 'State/local government'] + and political_identity in ['Lean Republican', 'Strong Republican'] + multiply: null + add: null + weight_overrides: + Economy/Jobs: 0.28 + Abortion/Reproductive rights: 0.04 + Immigration: 0.22 + Democracy/Rule of law: 0.14 + Healthcare: 0.16 + Climate: 0.04 + Education: 0.1 + AI/Technology: 0.02 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Gallup Most Important Problem 2024-2025; Pew Research Issue Priorities + 2024 + note: Economy/jobs consistently tops issue salience polls ~25-30%. Immigration + elevated post-2024 election. Abortion remains salient post-Dobbs. Democracy/rule + of law elevated heading into 2026. AI/Tech emerging but still low single digits + as top issue. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: country_direction_approval + type: categorical + category: population_specific + description: Approval of the current direction of the United States (Strongly approve, + Somewhat approve, Somewhat disapprove, Strongly disapprove). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Strongly approve + - Somewhat approve + - Somewhat disapprove + - Strongly disapprove + weights: + - 0.22 + - 0.18 + - 0.18 + - 0.42 + formula: null + depends_on: + - political_identity + - financial_margin + modifiers: + - when: political_identity == 'Strong Republican' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.52 + Somewhat approve: 0.3 + Somewhat disapprove: 0.12 + Strongly disapprove: 0.06 + probability_override: null + - when: political_identity == 'Strong Republican' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.34 + Somewhat approve: 0.32 + Somewhat disapprove: 0.2 + Strongly disapprove: 0.14 + probability_override: null + - when: political_identity == 'Lean Republican' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.28 + Somewhat approve: 0.4 + Somewhat disapprove: 0.2 + Strongly disapprove: 0.12 + probability_override: null + - when: political_identity == 'True Independent' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.14 + Somewhat approve: 0.3 + Somewhat disapprove: 0.32 + Strongly disapprove: 0.24 + probability_override: null + - when: political_identity == 'True Independent' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.08 + Somewhat approve: 0.22 + Somewhat disapprove: 0.34 + Strongly disapprove: 0.36 + probability_override: null + - when: political_identity == 'Lean Democrat' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.03 + Somewhat approve: 0.1 + Somewhat disapprove: 0.28 + Strongly disapprove: 0.59 + probability_override: null + - when: political_identity == 'Strong Democrat' and financial_margin in ['Paycheck-to-paycheck', + 'In debt/deficit'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.02 + Somewhat approve: 0.05 + Somewhat disapprove: 0.18 + Strongly disapprove: 0.75 + probability_override: null + - when: political_identity == 'Strong Democrat' and financial_margin in ['Comfortable + savings buffer', 'Modest buffer'] + multiply: null + add: null + weight_overrides: + Strongly approve: 0.03 + Somewhat approve: 0.08 + Somewhat disapprove: 0.24 + Strongly disapprove: 0.65 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Gallup Right/Wrong Direction poll 2025; RealClearPolitics average Feb + 2026 + note: As of early 2026, right-track/wrong-track polls show majority disapprove + of country direction (~55-60% wrong track). Strongly disapprove heavily driven + by Democrats/independents reacting to Trump second term. Political identity + modifier will strongly shift this. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: consumer_identity + type: categorical + category: population_specific + description: Primary driver of consumer purchasing behavior (Brand loyal, Price/value + driven, Values/ethics driven, Convenience driven). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Brand loyal + - Price/value driven + - Values/ethics driven + - Convenience driven + weights: + - 0.22 + - 0.42 + - 0.18 + - 0.18 + formula: null + depends_on: + - household_income + - education_level + modifiers: + - when: household_income < 50000 and education_level in ['Less than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + Brand loyal: 0.18 + Price/value driven: 0.58 + Values/ethics driven: 0.1 + Convenience driven: 0.14 + probability_override: null + - when: household_income >= 50000 and household_income < 100000 and education_level + == 'Some college' + multiply: null + add: null + weight_overrides: + Brand loyal: 0.26 + Price/value driven: 0.4 + Values/ethics driven: 0.16 + Convenience driven: 0.18 + probability_override: null + - when: household_income >= 100000 and education_level in ['Bachelor\'s degree', + 'Graduate degree'] + multiply: null + add: null + weight_overrides: + Brand loyal: 0.28 + Price/value driven: 0.22 + Values/ethics driven: 0.32 + Convenience driven: 0.18 + probability_override: null + - when: household_income >= 150000 and education_level == 'Graduate degree' + multiply: null + add: null + weight_overrides: + Brand loyal: 0.3 + Price/value driven: 0.14 + Values/ethics driven: 0.38 + Convenience driven: 0.18 + probability_override: null + grounding: + level: medium + method: extrapolated + source: Nielsen Consumer Research 2024; McKinsey Consumer Pulse 2024 + note: Price/value is primary driver for plurality of Americans especially post-inflation + environment. Brand loyalty declining. Values-driven purchasing elevated among + higher-education, younger, liberal consumers. Convenience driven for time-pressed + households. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: institutional_trust + type: categorical + category: population_specific + description: General level of trust in major institutions such as government, media, + science, and corporations (High trust, Moderate trust, Low trust, Distrustful/Conspiratorial). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - High trust + - Moderate trust + - Low trust + - Distrustful/Conspiratorial + weights: + - 0.14 + - 0.32 + - 0.34 + - 0.2 + formula: null + depends_on: + - political_identity + - education_level + modifiers: + - when: political_identity == 'Strong Democrat' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.18 + Moderate trust: 0.42 + Low trust: 0.3 + Distrustful/Conspiratorial: 0.1 + probability_override: null + - when: political_identity == 'Strong Democrat' and education_level in ['Less + than HS', 'HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + High trust: 0.12 + Moderate trust: 0.36 + Low trust: 0.34 + Distrustful/Conspiratorial: 0.18 + probability_override: null + - when: political_identity == 'Strong Republican' and education_level in ['Less + than HS', 'HS diploma/GED', 'Some college'] + multiply: null + add: null + weight_overrides: + High trust: 0.06 + Moderate trust: 0.22 + Low trust: 0.36 + Distrustful/Conspiratorial: 0.36 + probability_override: null + - when: political_identity == 'Strong Republican' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.1 + Moderate trust: 0.28 + Low trust: 0.38 + Distrustful/Conspiratorial: 0.24 + probability_override: null + - when: political_identity == 'True Independent' and education_level in ['Less + than HS', 'HS diploma/GED'] + multiply: null + add: null + weight_overrides: + High trust: 0.06 + Moderate trust: 0.26 + Low trust: 0.38 + Distrustful/Conspiratorial: 0.3 + probability_override: null + - when: political_identity == 'True Independent' and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.1 + Moderate trust: 0.38 + Low trust: 0.36 + Distrustful/Conspiratorial: 0.16 + probability_override: null + - when: political_identity in ['Lean Democrat'] and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.22 + Moderate trust: 0.46 + Low trust: 0.24 + Distrustful/Conspiratorial: 0.08 + probability_override: null + - when: political_identity in ['Lean Republican'] and education_level in ['Bachelor\'s + degree', 'Graduate degree'] + multiply: null + add: null + weight_overrides: + High trust: 0.14 + Moderate trust: 0.34 + Low trust: 0.36 + Distrustful/Conspiratorial: 0.16 + probability_override: null + grounding: + level: strong + method: researched + source: Gallup Confidence in Institutions 2024; Edelman Trust Barometer 2025 + note: 'Institutional trust at historic lows. Gallup 2024: <30% confident in most + major institutions. ~14% high trust, ~32% moderate, ~34% low trust, ~20% conspiratorial/distrustful + across the board. Political identity and education are strong modifiers.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Weights must sum to 1.0 +- name: risk_tolerance + type: float + category: personality + description: General willingness to accept risk in financial, social, and political + decisions (0=very risk averse, 1=very risk tolerant). + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: beta + alpha: 2.5 + beta: 3.0 + min: 0.0 + max: 1.0 + min_formula: null + max_formula: null + formula: null + depends_on: + - age + - household_income + modifiers: + - when: age < 35 and household_income >= 80000 + multiply: 1.2 + add: 0.06 + weight_overrides: null + probability_override: null + - when: age < 35 and household_income < 40000 + multiply: 0.95 + add: 0.02 + weight_overrides: null + probability_override: null + - when: age >= 55 and household_income >= 100000 + multiply: 0.9 + add: 0.0 + weight_overrides: null + probability_override: null + - when: age >= 55 and household_income < 50000 + multiply: 0.8 + add: -0.06 + weight_overrides: null + probability_override: null + - when: age >= 35 and age < 55 and household_income >= 100000 + multiply: 1.05 + add: 0.02 + weight_overrides: null + probability_override: null + grounding: + level: medium + method: extrapolated + source: FINRA Investor Education Foundation 2024; Federal Reserve SHED 2024 + note: 'Beta(2.5, 3.0) gives mean ~0.45, slightly below midpoint, reflecting general + risk aversion in US population. Right-skewed toward lower risk tolerance. Age + and income are key modifiers: younger and wealthier adults more risk-tolerant.' + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Risk tolerance bounded at 0 (fully risk-averse) + - type: hard_max + value: 1.0 + expression: null + reason: Risk tolerance bounded at 1 (fully risk-tolerant) +- name: economic_anxiety + type: float + category: personality + description: Degree of worry about personal and national economic conditions (0=none, + 1=extreme), shaping decision-making under uncertainty. + scope: individual + correlation_rate: null + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: beta + alpha: 3.5 + beta: 2.5 + min: 0.0 + max: 1.0 + min_formula: null + max_formula: null + formula: null + depends_on: + - financial_margin + - job_security_perception + modifiers: + - when: financial_margin == 'In debt/deficit' and job_security_perception in ['Very + insecure', 'Somewhat insecure'] + multiply: 1.0 + add: 0.22 + weight_overrides: null + probability_override: null + - when: financial_margin == 'In debt/deficit' and job_security_perception in ['N/A + - not employed', 'Somewhat secure'] + multiply: 1.0 + add: 0.16 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' and job_security_perception + in ['Somewhat insecure', 'Very insecure'] + multiply: 1.0 + add: 0.14 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' and job_security_perception + in ['Very secure', 'Somewhat secure'] + multiply: 1.0 + add: 0.08 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Modest buffer' and job_security_perception == 'N/A + - not employed' + multiply: 1.0 + add: 0.04 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' and job_security_perception + in ['Very secure', 'Somewhat secure'] + multiply: 1.0 + add: -0.16 + weight_overrides: null + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' and job_security_perception + == 'N/A - not employed' + multiply: 1.0 + add: -0.08 + weight_overrides: null + probability_override: null + grounding: + level: medium + method: extrapolated + source: Federal Reserve SHED 2024; Gallup Economic Confidence 2024-2025 + note: Beta(3.5, 2.5) gives mean ~0.58, above midpoint, reflecting elevated economic + anxiety in 2024-2026 environment with inflation, tariffs, and job market uncertainty. + Financial margin and job security are primary modifiers. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Economic anxiety bounded at 0 (no anxiety) + - type: hard_max + value: 1.0 + expression: null + reason: Economic anxiety bounded at 1 (extreme anxiety) +sampling_order: +- age +- agreeableness +- conscientiousness +- country +- education_level +- employment_sector +- extraversion +- gender +- job_security_perception +- marital_status +- has_children +- household_size +- neuroticism +- openness +- primary_info_source +- race_ethnicity +- social_media_behavior +- tech_adoption_posture +- urban_rural +- us_region +- congressional_district_competitiveness +- household_income +- consumer_identity +- financial_margin +- economic_anxiety +- investment_profile +- political_identity +- country_direction_approval +- institutional_trust +- political_engagement_level +- midterm_turnout_propensity +- religious_engagement +- risk_tolerance +- top_issue_2026 +- vote_2024_presidential \ No newline at end of file diff --git a/examples/study-03/scenario/iran-strikes/network-config.seed42.20260222-204257.yaml b/examples/study-03/scenario/iran-strikes/network-config.seed42.20260222-204257.yaml new file mode 100644 index 0000000..aabc371 --- /dev/null +++ b/examples/study-03/scenario/iran-strikes/network-config.seed42.20260222-204257.yaml @@ -0,0 +1,310 @@ +avg_degree: 14.0 +rewire_prob: 0.05 +similarity_store_threshold: 0.05 +similarity_threshold: 0.3 +similarity_steepness: 10.0 +candidate_mode: blocked +candidate_pool_multiplier: 12.0 +min_candidate_pool: 80 +similarity_workers: 8 +similarity_chunk_size: 64 +checkpoint_every_rows: 250 +triadic_closure_prob: 0.6 +target_clustering: 0.35 +target_modularity: 0.55 +inter_community_scale: 0.3 +max_calibration_iterations: 12 +quality_profile: balanced +topology_gate: strict +max_calibration_minutes: 30 +calibration_restarts: 4 +target_largest_component_ratio: 0.95 +target_degree_tolerance_pct: 0.15 +target_modularity_tolerance: 0.1 +target_clustering_tolerance: 0.08 +bridge_budget_fraction: 0.08 +swap_passes: 3 +power_law_exponent: 2.5 +identity_clustering_boost: 1.5 +auto_save_generated_config: true +allow_quarantine: true +quarantine_suffix: rejected +attribute_weights: + us_region: + weight: 4.0 + match_type: exact + urban_rural: + weight: 3.5 + match_type: exact + education_level: + weight: 3.0 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Less than HS: 1 + HS diploma/GED: 2 + Some college: 3 + Bachelor's degree: 4 + Graduate degree: 5 + political_identity: + weight: 3.0 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Strong Democrat: 1 + Lean Democrat: 2 + True Independent: 3 + Lean Republican: 4 + Strong Republican: 5 + race_ethnicity: + weight: 2.5 + match_type: exact + household_income: + weight: 2.5 + match_type: numeric_range + range_value: 40000.0 + religious_engagement: + weight: 2.0 + match_type: exact + employment_sector: + weight: 2.0 + match_type: exact + age: + weight: 1.5 + match_type: numeric_range + range_value: 12.0 + primary_info_source: + weight: 1.5 + match_type: exact + marital_status: + weight: 1.0 + match_type: exact + social_media_behavior: + weight: 1.0 + match_type: within_n + range_value: 1.0 + ordinal_levels: + Non-user: 1 + Passive consumer: 2 + Occasional poster: 3 + Active poster/Influencer: 4 +degree_multipliers: +- attribute: social_media_behavior + condition: Active poster/Influencer + multiplier: 2.5 + rationale: "Social media influencers and active posters maintain far larger networks\ + \ \u2014 both online connections that translate to real ties and offline people\ + \ who engage with their content and seek them out." +- attribute: political_engagement_level + condition: Highly engaged partisan + multiplier: 2.0 + rationale: "Highly engaged partisans attend rallies, knock doors, volunteer, and\ + \ organize \u2014 all activities that generate many social connections across\ + \ their community." +- attribute: employment_sector + condition: Self-employed + multiplier: 1.8 + rationale: "Self-employed individuals actively maintain broad business networks\ + \ \u2014 customers, vendors, collaborators, referral sources \u2014 giving them\ + \ more diverse and numerous connections." +- attribute: religious_engagement + condition: Devout + multiplier: 1.7 + rationale: "Devout individuals participate heavily in religious community life \u2014\ + \ weekly services, volunteer activities, prayer groups, social events \u2014 generating\ + \ many strong social ties." +- attribute: tech_adoption_posture + condition: Innovator + multiplier: 1.6 + rationale: "Tech innovators build networks across professional and social communities,\ + \ attend conferences, participate in online communities, and serve as go-to resources\ + \ \u2014 expanding their social reach." +- attribute: employment_sector + condition: Federal government + multiplier: 1.4 + rationale: "Federal employees work in large bureaucratic organizations with inter-agency\ + \ collaboration, union activities, and professional associations \u2014 creating\ + \ above-average workplace networks." +- attribute: marital_status + condition: Married/partnered + multiplier: 1.2 + rationale: "Married/partnered individuals combine social networks with their partner,\ + \ attend couples' social events, and participate in family-oriented community\ + \ activities \u2014 modestly expanding their total network." +edge_type_rules: +- name: household_family + condition: a_household_size == b_household_size and a_us_region == b_us_region and + a_marital_status == b_marital_status and a_marital_status == "Married/partnered" + priority: 50 + description: "Married/partnered adults in the same region with matching household\ + \ size \u2014 likely household members or close family. Strongest tie type." +- name: faith_community + condition: a_religious_engagement == b_religious_engagement and a_religious_engagement + == "Devout" and a_us_region == b_us_region and a_urban_rural == b_urban_rural + priority: 40 + description: "Devout individuals in the same region and urban/rural setting share\ + \ congregation-based ties \u2014 some of the densest real-world social clusters." +- name: coworker_colleague + condition: a_employment_sector == b_employment_sector and a_us_region == b_us_region + and a_employment_sector != "Retired" and a_employment_sector != "Unemployed" and + a_employment_sector != "Not in labor force" + priority: 35 + description: People in the same employment sector within the same region likely + share workplace or professional association ties. +- name: political_network + condition: a_political_identity == b_political_identity and a_political_engagement_level + == b_political_engagement_level and a_political_engagement_level == "Highly engaged + partisan" + priority: 30 + description: "Highly engaged partisans with the same political identity form activist\ + \ networks \u2014 campaign volunteers, party organizers, advocacy group members." +- name: community_neighbor + condition: a_us_region == b_us_region and a_urban_rural == b_urban_rural + priority: 20 + description: "People in the same region and urban/rural setting are neighbors, local\ + \ community members \u2014 sharing schools, local events, civic organizations." +- name: weak_tie + condition: a_us_region == b_us_region + priority: 10 + description: "People in the same broad US region who don't share other strong attributes\ + \ \u2014 weak acquaintances through extended networks, social media, or occasional\ + \ encounters." +influence_factors: +- attribute: education_level + type: ordinal + levels: + Less than HS: 1 + HS diploma/GED: 2 + Some college: 3 + Bachelor's degree: 4 + Graduate degree: 5 + weight: 0.35 + description: "Higher education creates epistemic authority \u2014 people with advanced\ + \ degrees are more likely to be seen as credible sources of information and their\ + \ opinions carry more weight in discussions about policy, health, and technology." +- attribute: social_media_behavior + type: ordinal + levels: + Non-user: 1 + Passive consumer: 2 + Occasional poster: 3 + Active poster/Influencer: 4 + weight: 0.3 + description: "Active posters and influencers push information to their networks\ + \ asymmetrically \u2014 they shape discourse for passive consumers and non-users\ + \ who receive but do not reciprocate content." +- attribute: political_engagement_level + type: ordinal + levels: + Disengaged: 1 + Single-issue voter: 2 + Moderate/occasional participant: 3 + Highly engaged partisan: 4 + weight: 0.25 + description: "Highly engaged partisans actively work to persuade, mobilize, and\ + \ frame political reality for less-engaged contacts \u2014 they volunteer, campaign,\ + \ and dominate political conversations." +- attribute: household_income + type: numeric + weight: 0.1 + description: "Higher income confers social status and perceived financial expertise\ + \ \u2014 wealthier individuals' opinions on economic matters, investment decisions,\ + \ and consumption choices carry disproportionate weight." +structural_attribute_roles: + household_id: household_income + partner_id: marital_status + age: age + sector: employment_sector + region: urban_rural + urbanicity: urban_rural + religion: religious_engagement +default_edge_type: acquaintance +ordinal_levels: + education_level: + Less than HS: 1 + HS diploma/GED: 2 + Some college: 3 + Bachelor's degree: 4 + Graduate degree: 5 + political_identity: + Strong Democrat: 1 + Lean Democrat: 2 + True Independent: 3 + Lean Republican: 4 + Strong Republican: 5 + social_media_behavior: + Non-user: 1 + Passive consumer: 2 + Occasional poster: 3 + Active poster/Influencer: 4 +generated_from: "Nationally representative US adult population (18-80). Must capture\ + \ the demographic, economic, and attitudinal fault lines that drive divergent responses\ + \ to major national events \u2014 especially technology disruption, economic shocks,\ + \ cultural controversies, and electoral behavior in the 2026 midterm elections.\n\ + \nBeyond standard demographics (age, gender, race/ethnicity, education, income,\ + \ geography), prioritize attributes that determine how people process and react\ + \ to news, make decisions under uncertainty, and vote:\n\n- technology adoption\ + \ posture and digital literacy (technophobe to early adopter)\n- media ecosystem\ + \ and primary information sources (cable news, social media, podcasts, local news,\ + \ none)\n- institutional trust (government, corporations, media, science, financial\ + \ system)\n- financial margin and economic anxiety (savings buffer, debt load, paycheck-to-paycheck\ + \ status)\n- employment sector and job security perception (federal/state government,\ + \ private sector, gig, self-employed, retired)\n- consumer identity and brand relationship\ + \ (brand loyal, price-driven, values-driven)\n- social media behavior and influence\ + \ (passive consumer, active poster, influencer, non-user)\n- investment and financial\ + \ literacy (no investments, 401k only, active trader, crypto holder)\n- religious\ + \ engagement and worldview (secular, moderate, devout, denomination)\n- political\ + \ identity and engagement level (strong partisan, moderate, disengaged, single-issue)\n\ + - 2024 presidential vote (Trump, Harris, third party, didn\u2019t vote, not eligible)\n\ + - congressional district competitiveness (safe R, safe D, swing district)\n- midterm\ + \ turnout propensity (always, sometimes, rarely, never)\n- issue salience for 2026\ + \ (economy/jobs, abortion/reproductive rights, immigration, democracy/rule of law,\ + \ healthcare, climate, education, AI/technology)\n- approval of current direction\ + \ (strongly approve to strongly disapprove)\n\nGeographic distribution should span\ + \ urban/suburban/rural across major US regions (Northeast, Southeast, Midwest, Southwest,\ + \ West Coast), with realistic correlation structure between attributes." +generation_rationale: "This is a nationally representative US adult population simulation\ + \ focused on political behavior, media ecosystems, and responses to national events.\ + \ Let me think carefully about how these people actually connect in real life:\n\ + \n**Attribute Weights (Homophily drivers):**\n1. **us_region** - Geographic proximity\ + \ is the strongest real-world connector. People in the same region share local networks,\ + \ employers, community institutions.\n2. **urban_rural** - Urban/suburban/rural\ + \ determines entirely different social ecosystems \u2014 who you run into, what\ + \ institutions you share, what kind of community exists.\n3. **political_identity**\ + \ - Political affiliation creates strong social sorting in modern America. People\ + \ self-select into social circles with similar politics (churches, neighborhoods,\ + \ friend groups).\n4. **education_level** - Educational attainment is one of the\ + \ strongest homophily signals in American social networks \u2014 college-educated\ + \ vs. non-college defines many social boundaries.\n5. **religious_engagement** -\ + \ Religious communities are primary social hubs, especially outside urban areas.\ + \ Devout people connect with other devout people through church.\n6. **primary_info_source**\ + \ - Media ecosystem reflects and reinforces social clustering. People who consume\ + \ the same media tend to know each other.\n7. **employment_sector** - People in\ + \ the same employment sector (federal govt, private, gig, etc.) share workplace\ + \ networks and professional associations.\n8. **household_income** - Income determines\ + \ neighborhood, social activities, schools \u2014 strong homophily driver.\n9. **race_ethnicity**\ + \ - Racial/ethnic homophily remains strong in American social networks due to residential\ + \ segregation and cultural communities.\n10. **age** - Age cohort determines life\ + \ stage, social venues (schools, retirement communities, young professional groups).\n\ + 11. **marital_status** - Married couples socialize with married couples; singles\ + \ form different social networks.\n12. **social_media_behavior** - Active social\ + \ media users form online communities that become real social ties.\n\n**Degree\ + \ Multipliers (Hubs):**\n- Active poster/influencer on social media = more connections\n\ + - Self-employed = more diverse business network contacts\n- Highly engaged partisan\ + \ = political organizing creates many connections\n- Early adopter / Innovator =\ + \ technology communities with high connectivity\n- Devout religious = church community\ + \ creates many ties\n\n**Edge Types:**\n- Household members \u2192 family\n- Same\ + \ region + same urban/rural \u2192 neighbor/community\n- Same employment sector\ + \ + same region \u2192 coworker/professional\n- Same political identity + high engagement\ + \ \u2192 political ally\n- Same religious engagement (devout) \u2192 faith community\n\ + \n**Influence Factors:**\n- Education level: Higher education creates more persuasive/authoritative\ + \ voice\n- Political engagement level: Highly engaged partisans influence the disengaged\n\ + - Social media behavior: Active posters/influencers push information to passive\ + \ consumers\n- Household income: Higher income signals status authority in financial\ + \ discussions\n\n**Average Degree:**\nFor a general consumer/adult population in\ + \ the US, realistic ego network sizes center around 10-20 meaningful connections.\ + \ Given the diversity of connection types (family, neighbors, coworkers, religious\ + \ community, political networks, online), I'll target 14 as a reasonable average\ + \ \u2014 reflecting a mix of close ties and acquaintances in a nationally representative\ + \ sample." +seed: 42 diff --git a/examples/study-03/scenario/iran-strikes/persona.v1.yaml b/examples/study-03/scenario/iran-strikes/persona.v1.yaml new file mode 100644 index 0000000..79e5b9b --- /dev/null +++ b/examples/study-03/scenario/iran-strikes/persona.v1.yaml @@ -0,0 +1,792 @@ +population_description: 'Nationally representative US adult population (18-80). Must + capture the demographic, economic, and attitudinal fault lines that drive divergent + responses to major national events — especially technology disruption, economic + shocks, cultural controversies, and electoral behavior in the 2026 midterm elections. + + + Beyond standard demographics (age, gender, race/ethnicity, education, income, geography), + prioritize attributes that determine how people process and react to news, make + decisions under uncertainty, and vote: + + + - technology adoption posture and digital literacy (technophobe to early adopter) + + - media ecosystem and primary information sources (cable news, social media, podcasts, + local news, none) + + - institutional trust (government, corporations, media, science, financial system) + + - financial margin and economic anxiety (savings buffer, debt load, paycheck-to-paycheck + status) + + - employment sector and job security perception (federal/state government, private + sector, gig, self-employed, retired) + + - consumer identity and brand relationship (brand loyal, price-driven, values-driven) + + - social media behavior and influence (passive consumer, active poster, influencer, + non-user) + + - investment and financial literacy (no investments, 401k only, active trader, crypto + holder) + + - religious engagement and worldview (secular, moderate, devout, denomination) + + - political identity and engagement level (strong partisan, moderate, disengaged, + single-issue) + + - 2024 presidential vote (Trump, Harris, third party, didn’t vote, not eligible) + + - congressional district competitiveness (safe R, safe D, swing district) + + - midterm turnout propensity (always, sometimes, rarely, never) + + - issue salience for 2026 (economy/jobs, abortion/reproductive rights, immigration, + democracy/rule of law, healthcare, climate, education, AI/technology) + + - approval of current direction (strongly approve to strongly disapprove) + + + Geographic distribution should span urban/suburban/rural across major US regions + (Northeast, Southeast, Midwest, Southwest, West Coast), with realistic correlation + structure between attributes.' +created_at: '2026-02-22T20:21:48.339585' +intro_template: I'm a {age}-year-old {gender} living in a {urban_rural} part of the + {us_region}, where I work in the {employment_sector} sector and identify politically + as {political_identity}. My top concern heading into 2026 is {top_issue_2026}, and + I'd describe my financial situation as {financial_margin}. When it comes to the + recent US airstrikes on Iran, I {iran_strike_approval} — a stance shaped by my broader + view that Iran's nuclear program is {nuclear_iran_threat_perception}. +treatments: +- attribute: country + treatment: concrete + group: demographics +- attribute: age + treatment: concrete + group: demographics +- attribute: gender + treatment: concrete + group: demographics +- attribute: race_ethnicity + treatment: concrete + group: demographics +- attribute: us_region + treatment: concrete + group: demographics +- attribute: urban_rural + treatment: concrete + group: demographics +- attribute: education_level + treatment: concrete + group: demographics +- attribute: marital_status + treatment: concrete + group: demographics +- attribute: household_size + treatment: concrete + group: demographics +- attribute: has_children + treatment: concrete + group: demographics +- attribute: openness + treatment: relative + group: personality +- attribute: conscientiousness + treatment: relative + group: personality +- attribute: extraversion + treatment: relative + group: personality +- attribute: agreeableness + treatment: relative + group: personality +- attribute: neuroticism + treatment: relative + group: personality +- attribute: risk_tolerance + treatment: relative + group: personality +- attribute: household_income + treatment: concrete + group: economic_financial +- attribute: financial_margin + treatment: concrete + group: economic_financial +- attribute: investment_profile + treatment: concrete + group: economic_financial +- attribute: economic_anxiety + treatment: relative + group: economic_financial +- attribute: energy_cost_burden + treatment: concrete + group: economic_financial +- attribute: portfolio_energy_exposure + treatment: concrete + group: economic_financial +- attribute: employment_sector + treatment: concrete + group: work_livelihood +- attribute: job_security_perception + treatment: concrete + group: work_livelihood +- attribute: daily_commute_miles + treatment: concrete + group: work_livelihood +- attribute: supply_chain_job_exposure + treatment: concrete + group: work_livelihood +- attribute: consumer_identity + treatment: concrete + group: work_livelihood +- attribute: primary_info_source + treatment: concrete + group: media_information +- attribute: social_media_behavior + treatment: concrete + group: media_information +- attribute: tech_adoption_posture + treatment: concrete + group: media_information +- attribute: institutional_trust + treatment: relative + group: media_information +- attribute: political_identity + treatment: concrete + group: political_civic +- attribute: political_engagement_level + treatment: concrete + group: political_civic +- attribute: vote_2024_presidential + treatment: concrete + group: political_civic +- attribute: midterm_turnout_propensity + treatment: concrete + group: political_civic +- attribute: congressional_district_competitiveness + treatment: concrete + group: political_civic +- attribute: top_issue_2026 + treatment: concrete + group: political_civic +- attribute: country_direction_approval + treatment: concrete + group: political_civic +- attribute: crisis_midterm_vote_shift + treatment: concrete + group: political_civic +- attribute: religious_engagement + treatment: concrete + group: identity_worldview +- attribute: military_connection + treatment: concrete + group: identity_worldview +- attribute: reservist_or_national_guard + treatment: concrete + group: identity_worldview +- attribute: iran_strike_approval + treatment: concrete + group: iran_crisis_response +- attribute: mideast_policy_hawkishness + treatment: concrete + group: iran_crisis_response +- attribute: nuclear_iran_threat_perception + treatment: concrete + group: iran_crisis_response +- attribute: war_escalation_fear + treatment: relative + group: iran_crisis_response +- attribute: protest_participation_propensity + treatment: concrete + group: iran_crisis_response +groups: +- name: demographics + label: Who I Am + attributes: + - country + - age + - gender + - race_ethnicity + - us_region + - urban_rural + - education_level + - marital_status + - household_size + - has_children +- name: personality + label: How I Think & Feel + attributes: + - openness + - conscientiousness + - extraversion + - agreeableness + - neuroticism + - risk_tolerance +- name: economic_financial + label: My Financial Life + attributes: + - household_income + - financial_margin + - investment_profile + - economic_anxiety + - energy_cost_burden + - portfolio_energy_exposure +- name: work_livelihood + label: Work & Livelihood + attributes: + - employment_sector + - job_security_perception + - daily_commute_miles + - supply_chain_job_exposure + - consumer_identity +- name: media_information + label: How I Stay Informed + attributes: + - primary_info_source + - social_media_behavior + - tech_adoption_posture + - institutional_trust +- name: political_civic + label: My Politics & Civic Life + attributes: + - political_identity + - political_engagement_level + - vote_2024_presidential + - midterm_turnout_propensity + - congressional_district_competitiveness + - top_issue_2026 + - country_direction_approval + - crisis_midterm_vote_shift +- name: identity_worldview + label: Faith, Service & Worldview + attributes: + - religious_engagement + - military_connection + - reservist_or_national_guard +- name: iran_crisis_response + label: The Iran Crisis & Me + attributes: + - iran_strike_approval + - mideast_policy_hawkishness + - nuclear_iran_threat_perception + - war_escalation_fear + - protest_participation_propensity +phrasings: + boolean: + - attribute: has_children + true_phrase: I have at least one child under 18 living at home with me. + false_phrase: I don't have any children under 18 living in my household. + - attribute: supply_chain_job_exposure + true_phrase: My job is in an industry directly hit by supply chain disruptions + or energy price swings — like trucking, aviation, retail, manufacturing, or + agriculture. + false_phrase: My work isn't in a field that's directly exposed to supply chain + disruptions or energy price shocks. + - attribute: reservist_or_national_guard + true_phrase: I'm currently serving as a US military reservist or National Guard + member, which means I could be called up for mobilization. + false_phrase: I'm not currently a military reservist or National Guard member. + categorical: + - attribute: country + phrases: + United States: I live in the United States. + null_options: [] + null_phrase: null + fallback: null + - attribute: gender + phrases: + Male: I identify as male. + Female: I identify as female. + Non-binary/Other: I identify outside the traditional male/female binary. + null_options: [] + null_phrase: null + fallback: null + - attribute: race_ethnicity + phrases: + White non-Hispanic: I identify as White, non-Hispanic. + Black: I identify as Black or African American. + Hispanic/Latino: I identify as Hispanic or Latino. + Asian: I identify as Asian or Asian American. + Other/Multiracial: I identify as multiracial or with a racial background not + listed above. + null_options: [] + null_phrase: null + fallback: null + - attribute: us_region + phrases: + Northeast: I live in the Northeast part of the country. + Southeast: I live in the Southeast part of the country. + Midwest: I live in the Midwest. + Southwest: I live in the Southwest. + West Coast: I live on the West Coast. + null_options: [] + null_phrase: null + fallback: null + - attribute: urban_rural + phrases: + Urban: I live in a city. + Suburban: I live in the suburbs. + Rural: I live in a rural area or small town. + null_options: [] + null_phrase: null + fallback: null + - attribute: education_level + phrases: + Less than HS: I did not finish high school. + HS diploma/GED: My highest education is a high school diploma or GED. + Some college: I attended college but didn't finish a degree. + Bachelor's degree: I have a four-year college degree. + Graduate degree: I hold a graduate or professional degree. + null_options: [] + null_phrase: null + fallback: null + - attribute: marital_status + phrases: + Married/partnered: I'm married or in a committed partnership. + Single: I'm currently single and not in a partnership. + Divorced/separated: I'm divorced or separated. + Widowed: I've lost my spouse and am widowed. + null_options: [] + null_phrase: null + fallback: null + - attribute: employment_sector + phrases: + Federal government: I work for the federal government. + State/local government: I work for a state or local government agency. + Private sector: I work for a private company or corporation. + Gig/contract: I do gig work or contract jobs — no single employer. + Self-employed: I run my own business or work for myself. + Retired: I'm retired and no longer working. + Unemployed: I'm currently unemployed and looking for work. + Not in labor force: I'm not currently working or looking for work. + null_options: [] + null_phrase: null + fallback: null + - attribute: job_security_perception + phrases: + Very secure: I feel very secure in my job — I'm not worried about losing it. + Somewhat secure: I feel reasonably secure at work, though there's some uncertainty. + Somewhat insecure: I'm a bit worried about my job stability. + Very insecure: I feel very insecure — I could lose my job at any time. + N/A - not employed: Job security isn't something I think about — I'm not currently + employed. + null_options: + - N/A - not employed + null_phrase: This doesn't really apply to me since I'm not currently working. + fallback: null + - attribute: financial_margin + phrases: + Comfortable savings buffer: I have solid savings and feel financially comfortable. + Modest buffer: I have a little saved up, but not a ton of cushion. + Paycheck-to-paycheck: I'm living paycheck to paycheck — there's not much left + over. + In debt/deficit: I'm in the red — spending more than I'm bringing in and carrying + debt. + null_options: [] + null_phrase: null + fallback: null + - attribute: investment_profile + phrases: + No investments: I don't have any investments — no stocks, no retirement accounts, + nothing. + 401k/IRA only: I have a retirement account like a 401k or IRA, but that's about + it. + Diversified investor: I have a diversified portfolio — stocks, bonds, retirement + accounts, maybe real estate. + Active trader: I actively trade stocks and follow the markets closely. + Crypto holder: I hold cryptocurrency as a meaningful part of my finances. + null_options: + - No investments + null_phrase: I don't have any investments to speak of. + fallback: null + - attribute: primary_info_source + phrases: + Cable/broadcast TV news: I mainly get my news from cable or broadcast television. + Social media: I mostly get my news through social media feeds. + Online news sites: I mainly read news on websites and digital news outlets. + Podcasts: Podcasts are my primary way of staying informed. + Local news: I rely mostly on local TV, radio, or newspapers for my news. + Print media: I still get most of my news from print newspapers or magazines. + Avoids news: Honestly, I try to avoid the news as much as possible. + null_options: + - Avoids news + null_phrase: I don't really follow the news — I try to tune it out. + fallback: null + - attribute: social_media_behavior + phrases: + Non-user: I don't use social media at all. + Passive consumer: I scroll through social media but rarely post anything myself. + Occasional poster: I post on social media every now and then, but I'm not super + active. + Active poster/Influencer: I post regularly and have a real presence on social + media. + null_options: + - Non-user + null_phrase: Social media isn't part of my life — I don't have any accounts. + fallback: null + - attribute: tech_adoption_posture + phrases: + Technophobe/Avoider: I avoid new technology whenever I can — it's not for me. + Late majority adopter: I wait until technology is well-proven before I try it. + Early majority adopter: I adopt new technology once it's become mainstream and + reliable. + Early adopter: I like to try out new technology pretty early — before most people + catch on. + Innovator: I'm on the cutting edge — I seek out new technology before it even + hits the mainstream. + null_options: [] + null_phrase: null + fallback: null + - attribute: religious_engagement + phrases: + Secular/None: I'm not religious and don't identify with any faith tradition. + Nominally affiliated: I identify with a religion culturally, but I'm not very + active in practicing it. + Moderately religious: My faith is important to me and I practice it regularly, + though I'm not devout. + Devout: My faith is central to my life — I'm deeply committed to my religious + practice. + null_options: + - Secular/None + null_phrase: Religion isn't part of my life — I don't follow any faith. + fallback: null + - attribute: political_identity + phrases: + Strong Democrat: I'm a committed Democrat — I strongly identify with the party. + Lean Democrat: I lean toward the Democrats, though I don't always vote the party + line. + True Independent: I'm a true independent — I don't feel at home in either party. + Lean Republican: I lean Republican, though I'm not a die-hard partisan. + Strong Republican: I'm a committed Republican — I strongly identify with the + party. + null_options: [] + null_phrase: null + fallback: null + - attribute: political_engagement_level + phrases: + Disengaged: I don't pay much attention to politics — it just doesn't feel relevant + to my life. + Single-issue voter: There's one issue I care deeply about, and that drives everything + for me politically. + Moderate/occasional participant: I follow politics somewhat and vote, but I'm + not obsessively engaged. + Highly engaged partisan: I'm very politically active — I follow politics closely + and get involved beyond just voting. + null_options: [] + null_phrase: null + fallback: null + - attribute: vote_2024_presidential + phrases: + Trump: I voted for Donald Trump in the 2024 presidential election. + Harris: I voted for Kamala Harris in the 2024 presidential election. + Third party: I voted for a third-party candidate in 2024 — not Trump or Harris. + Did not vote: I didn't vote in the 2024 presidential election. + Not eligible: I wasn't eligible to vote in the 2024 election. + null_options: + - Did not vote + - Not eligible + null_phrase: I didn't cast a ballot in the last presidential election. + fallback: null + - attribute: midterm_turnout_propensity + phrases: + Always votes: I vote in every election, including midterms — I never miss one. + Sometimes votes: I vote in midterms sometimes, depending on what's at stake. + Rarely votes: I rarely vote in midterm elections — it's just not something I + usually do. + Never votes: I don't vote in midterm elections. + null_options: [] + null_phrase: null + fallback: null + - attribute: congressional_district_competitiveness + phrases: + Safe Republican: My congressional district is solidly Republican — there's no + real contest. + Lean Republican: My district tends to lean Republican but isn't completely out + of reach for Democrats. + Swing district: I live in a genuine swing district where either party could + win. + Lean Democrat: My district leans Democratic, though Republicans have a shot. + Safe Democrat: My congressional district is solidly Democratic — it's not really + competitive. + null_options: [] + null_phrase: null + fallback: null + - attribute: top_issue_2026 + phrases: + Economy/Jobs: The economy and jobs are the number one issue for me going into + 2026. + Abortion/Reproductive rights: Abortion and reproductive rights are the most + important issue to me in 2026. + Immigration: Immigration is the top issue on my mind heading into the midterms. + Democracy/Rule of law: Protecting democracy and the rule of law is what matters + most to me in 2026. + Healthcare: Healthcare is the single most important issue for me in the 2026 + elections. + Climate: Climate change is the top priority for me going into 2026. + Education: Education is the issue I care most about heading into the midterms. + AI/Technology: Artificial intelligence and technology policy are the biggest + issues for me in 2026. + null_options: [] + null_phrase: null + fallback: null + - attribute: country_direction_approval + phrases: + Strongly approve: I strongly approve of the direction the country is headed + right now. + Somewhat approve: I generally think the country is moving in the right direction, + though not perfectly. + Somewhat disapprove: I'm not happy with the direction things are going in this + country. + Strongly disapprove: I strongly disapprove of where this country is headed — + things are going the wrong way. + null_options: [] + null_phrase: null + fallback: null + - attribute: consumer_identity + phrases: + Brand loyal: I stick with the brands I trust — loyalty matters a lot when I + shop. + Price/value driven: I always look for the best price or value — that's what + drives my purchases. + Values/ethics driven: I try to buy from companies whose values align with mine, + even if it costs more. + Convenience driven: Convenience is king for me — I buy whatever is easiest and + fastest. + null_options: [] + null_phrase: null + fallback: null + - attribute: institutional_trust + phrases: + High trust: I generally trust major institutions — government, media, science, + and corporations. + Moderate trust: I have mixed trust in institutions — some I trust more than + others. + Low trust: I'm pretty skeptical of most institutions these days. + Distrustful/Conspiratorial: I don't trust the government, media, or big institutions + at all — they're not being straight with us. + null_options: [] + null_phrase: null + fallback: null + - attribute: military_connection + phrases: + Active duty: I'm currently serving in the military. + Veteran: I'm a veteran — I served in the military. + Immediate family member: Someone in my immediate family is a veteran or currently + serving. + Extended family/friend: I have close friends or extended family who have served. + No connection: I don't have any personal connection to the military. + null_options: + - No connection + null_phrase: I don't have any close ties to the military. + fallback: null + - attribute: iran_strike_approval + phrases: + Strongly approve: I strongly approve of the US airstrikes against Iran — it + was the right call. + Somewhat approve: I somewhat approve of the airstrikes, even if I have some + reservations. + Somewhat disapprove: I'm not really on board with the Iran airstrikes — more + harm than good. + Strongly disapprove: I strongly disapprove of the airstrikes against Iran — + it was a serious mistake. + No opinion: I honestly don't have a strong opinion on the Iran airstrikes. + null_options: + - No opinion + null_phrase: I don't have a clear view on the airstrikes — I'm not sure what to + think. + fallback: null + - attribute: energy_cost_burden + phrases: + Severe hardship: The spike in energy prices is causing real financial pain in + my household. + Moderate hardship: Rising energy costs are putting a noticeable strain on my + budget. + Minor inconvenience: Higher energy prices are annoying but not really hurting + me financially. + Minimal impact: The energy price increases barely affect me — my finances are + fine. + null_options: [] + null_phrase: null + fallback: null + - attribute: mideast_policy_hawkishness + phrases: + Strongly interventionist: I strongly believe the US should use military force + to shape events in the Middle East when necessary. + Moderately interventionist: I think the US should be willing to intervene militarily + in the Middle East in serious situations. + Neutral/Uncertain: I don't have a firm view on when the US should or shouldn't + intervene militarily in the Middle East. + Moderately non-interventionist: I'm generally skeptical of US military involvement + in the Middle East. + Strongly non-interventionist: I strongly oppose US military intervention in + the Middle East — we need to stay out. + null_options: [] + null_phrase: null + fallback: null + - attribute: nuclear_iran_threat_perception + phrases: + Existential threat: Iran's nuclear program is an existential threat to the United + States — we can't ignore it. + Serious threat: I see Iran's nuclear ambitions as a serious threat to our national + security. + Moderate threat: Iran's nuclear program is a real concern, but I wouldn't call + it a critical threat. + Overstated threat: I think the threat from Iran's nuclear program has been blown + out of proportion. + Not a threat: I don't see Iran's nuclear program as a meaningful threat to the + US. + null_options: [] + null_phrase: null + fallback: null + - attribute: portfolio_energy_exposure + phrases: + High energy/defense exposure: A significant chunk of my investments is in energy + or defense stocks — this crisis directly affects my portfolio. + Moderate exposure: I have some exposure to energy and defense in my investments, + but it's not dominant. + Diversified/low exposure: My investments are well-diversified, so I have very + little direct exposure to energy or defense. + No investments: I don't have any investments, so market moves from this crisis + don't affect me directly. + null_options: + - No investments + null_phrase: I don't have any investments, so the market impact of this crisis + doesn't hit me directly. + fallback: null + - attribute: crisis_midterm_vote_shift + phrases: + More Republican: The Iran crisis has pushed me toward voting Republican in the + midterms more than I would have otherwise. + Unchanged: The Iran crisis hasn't really changed how I plan to vote in the midterms. + More Democratic: The way this Iran situation has been handled has pushed me + toward voting Democratic. + Disengaged/withdrawn: All of this has made me less motivated to vote at all + — I feel like checking out. + null_options: [] + null_phrase: null + fallback: null + - attribute: protest_participation_propensity + phrases: + Very likely: I'm very likely to show up at a protest or demonstration over the + Iran strikes. + Somewhat likely: I might participate in a protest over this — I'm seriously + considering it. + Unlikely: I probably won't join any protests over the Iran situation, even if + I have opinions about it. + Would not participate: I wouldn't participate in protests over this — that's + just not something I do. + null_options: [] + null_phrase: null + fallback: null + relative: + - attribute: openness + labels: + much_below: I'm far less open to new ideas and experiences than most people + below: I tend to be a bit more set in my ways than the average person + average: I'm about as open to new ideas and experiences as most people + above: I'm more curious and receptive to new ideas than most people + much_above: I'm far more open to new experiences and unconventional thinking + than almost anyone I know + - attribute: conscientiousness + labels: + much_below: I'm far less organized and self-disciplined than most people + below: I tend to be a bit less focused and disciplined than the average person + average: I'm about as organized and goal-oriented as most people + above: I'm more disciplined and detail-oriented than most people + much_above: I'm far more organized, driven, and self-disciplined than almost + anyone I know + - attribute: extraversion + labels: + much_below: I'm far more introverted and reserved than most people + below: I tend to be a bit quieter and less socially driven than the average + person + average: I'm about as outgoing and social as most people + above: I'm more sociable and energized by people than most + much_above: I'm far more extroverted and socially energized than almost anyone + I know + - attribute: agreeableness + labels: + much_below: I'm far more skeptical and confrontational in my dealings with others + than most people + below: I tend to be a bit less accommodating and cooperative than the average + person + average: I'm about as cooperative and empathetic as most people + above: I'm more empathetic and willing to go along with others than most people + much_above: I'm far more agreeable, trusting, and harmonious in my relationships + than almost anyone I know + - attribute: neuroticism + labels: + much_below: I'm far more emotionally stable and stress-resistant than most people + below: I tend to be a bit calmer and less anxious than the average person + average: I handle stress and emotional ups and downs about as well as most people + above: I tend to feel stress and anxiety more intensely than most people + much_above: I experience emotional distress and anxiety far more intensely than + almost anyone I know + - attribute: risk_tolerance + labels: + much_below: I'm far more risk-averse than most people — I avoid uncertainty + in financial, social, and political decisions whenever I can + below: I tend to be a bit more cautious about taking risks than the average + person + average: I'm about as willing to take risks as most people + above: I'm more comfortable taking risks in financial, social, and political + situations than most people + much_above: I'm far more willing to embrace risk and uncertainty than almost + anyone I know + - attribute: economic_anxiety + labels: + much_below: I feel far less worried about economic conditions — personal or + national — than most people + below: I tend to be a bit less anxious about economic issues than the average + person + average: I feel about as much economic worry as most people + above: I feel more anxious about personal and national economic conditions than + most people + much_above: Economic uncertainty weighs on me far more heavily than it seems + to for almost anyone else I know + - attribute: institutional_trust + labels: + much_below: I trust institutions far less than most people — I'm deeply skeptical + or distrustful of government, media, science, and corporations + below: I'm more skeptical of major institutions like government and media than + the average person + average: I'm about as trusting of major institutions as most people + above: I generally trust institutions like government, science, and the media + more than most people + much_above: I have far more faith in major institutions — government, science, + media, corporations — than almost anyone I know + - attribute: war_escalation_fear + labels: + much_below: I'm far less worried than most people that the Iran conflict will + escalate into a broader war + below: I'm somewhat less concerned than the average person about the Iran conflict + spiraling into a wider war + average: I feel about as much concern as most people that the Iran conflict + could escalate into a larger war + above: I'm more fearful than most people that the Iran conflict will escalate + into a broader regional or world war + much_above: I'm far more fearful than almost anyone I know that the Iran conflict + will spiral into a catastrophic wider war + concrete: + - attribute: age + template: I'm {value} years old. + format_spec: .0f + prefix: '' + suffix: '' + - attribute: household_size + template: There are {value} people living in my household. + format_spec: .0f + prefix: '' + suffix: '' + - attribute: household_income + template: My household brings in about {value} a year before taxes. + format_spec: ',.0f' + prefix: $ + suffix: '' + - attribute: daily_commute_miles + template: My round-trip commute is about {value} every workday. + format_spec: .1f + prefix: '' + suffix: ' miles' +population_stats: + stats: {} diff --git a/examples/study-03/scenario/iran-strikes/scenario.v1.yaml b/examples/study-03/scenario/iran-strikes/scenario.v1.yaml new file mode 100644 index 0000000..8a6e239 --- /dev/null +++ b/examples/study-03/scenario/iran-strikes/scenario.v1.yaml @@ -0,0 +1,2534 @@ +meta: + name: iran-strikes + description: 'On February 23, 2026, the United States launched airstrikes against + Iran, targeting nuclear facilities at Natanz and Parchin, IRGC command infrastructure, + ballistic missile production sites, and air defense systems across multiple provinces. + President Trump addressed the nation from the Oval Office, stating that Iran''s + refusal to reach a diplomatic agreement and its continued pursuit of nuclear weapons + capability left the United States ''no choice but to act decisively.'' The strikes + involved B-2 stealth bombers operating from Diego Garcia, carrier-based F/A-18s + from the USS Abraham Lincoln and USS Gerald R. Ford carrier strike groups in the + Arabian Sea, and Tomahawk cruise missiles launched from submarines in the Persian + Gulf. The Pentagon confirmed strikes on 47 targets across Iran. No US ground forces + were deployed. + + + Iran''s Supreme Leader Khamenei issued a statement calling the strikes ''an act + of war against the Iranian nation'' and vowed retaliation. Iran''s foreign minister + recalled all diplomatic contacts with the United States. The UN Security Council + convened an emergency session. Oil futures spiked 35% within hours of the first + reports. European allies issued mixed responses — the UK declined to participate, + France called for immediate ceasefire, Germany urged restraint from both sides. + Israel expressed support but did not participate directly in the strikes. + + + Timeline events: + + + Week 1: The immediate aftermath. The Pentagon releases battle damage assessments + showing significant destruction of Iran''s nuclear enrichment infrastructure and + missile production facilities. Iran fires 30+ ballistic missiles at US military + installations in Qatar (Al Udeid Air Base) and Bahrain (Naval Support Activity). + US missile defense systems intercept most but not all — 3 US service members are + killed and 47 wounded at Al Udeid. Gasoline prices in the US jump from $3.40/gallon + national average to $4.80 overnight. The Dow drops 1,400 points. Protests occur + in major US cities — both anti-war demonstrations and pro-strike rallies. Congress + is divided: Senate passes a resolution supporting the strikes 54-46, House fails + to pass any resolution. + + + Week 3: Iran announces a naval blockade of the Strait of Hormuz. Two commercial + tankers are struck by IRGC anti-ship missiles, killing 14 crew members. Lloyd''s + of London suspends insurance coverage for all vessels transiting the Persian Gulf. + Oil reaches $140/barrel. US gasoline hits $6.20/gallon nationally, with California + stations above $8.00. The Federal Reserve issues an emergency statement warning + of inflationary pressures. Major US airlines announce fuel surcharges of $75-150 + per ticket. Iran-backed Houthi forces intensify attacks on Red Sea shipping, effectively + closing a second major trade route. Walmart, Target, and Amazon warn of supply + chain disruptions and potential price increases on imported goods within 30-60 + days. + + + Week 5: The economic cascade deepens. US unemployment claims rise 40% as energy-dependent + industries begin layoffs. Trucking companies impose 25% fuel surcharges on all + freight. Food prices rise 15% nationally as transportation and fertilizer costs + spike. The Federal Reserve holds an emergency meeting but declines to cut rates, + citing inflation risk. Iran launches a second wave of missile strikes targeting + Saudi oil infrastructure at Abqaiq and Ras Tanura, temporarily knocking 4 million + barrels/day of Saudi production offline. Oil briefly touches $180/barrel. The + US announces deployment of 15,000 additional troops to the Middle East. The Pentagon + calls up 30,000 reservists. + + + Week 8: The Strait of Hormuz remains contested. US Navy minesweepers and escort + convoys have partially reopened shipping lanes, but transit times have doubled + and insurance premiums remain 10x pre-crisis levels. Oil has stabilized around + $130/barrel. US gasoline averages $5.80/gallon. Cumulative US job losses attributed + to the energy shock reach 400,000. Iran''s internal protest movement has fractured + — some factions rally behind the regime against foreign attack, others blame the + regime for provoking the strikes. Russia and China issue a joint statement condemning + the US strikes and announcing expanded economic support for Iran. The 2026 midterm + elections are 3 months away. Both parties are attempting to frame the conflict + — Republicans argue the strikes prevented a nuclear Iran, Democrats argue the + administration stumbled into an unnecessary war that is destroying the economy. + + + Week 12: A fragile ceasefire is brokered through Omani and Qatari mediation. Iran + agrees to halt Strait of Hormuz operations in exchange for a US commitment to + cease strikes and begin indirect negotiations on a new nuclear framework. Oil + drops to $105/barrel but remains well above pre-crisis levels. US gasoline averages + $4.60/gallon. Total estimated US economic cost of the 12-week crisis exceeds $800 + billion. 23 US service members have been killed across all theaters. The political + landscape has shifted — the crisis dominates every 2026 midterm campaign. Inflation + is running at 8.5% annualized. Consumer confidence is at its lowest level since + 2008.' + base_population: population.v1 + population_spec: null + study_db: null + population_id: default + network_id: default + created_at: '2026-02-22T20:03:34.793554' +event: + type: emergency + content: 'BREAKING — MULTI-PHASE NATIONAL SECURITY AND ECONOMIC CRISIS: US AIRSTRIKES + ON IRAN AND ESCALATING AFTERMATH (February 23 – May 2026) + + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + PHASE 1 — THE STRIKES (February 23, 2026) + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + On February 23, 2026, the United States military launched a major airstrike campaign + against Iran. President Trump addressed the nation from the Oval Office, stating + Iran''s refusal to reach a diplomatic agreement and its continued pursuit of nuclear + weapons capability left the US "no choice but to act decisively." + + + MILITARY ASSETS USED: + + • B-2 stealth bombers operating from Diego Garcia + + • Carrier-based F/A-18s from USS Abraham Lincoln and USS Gerald R. Ford carrier + strike groups in the Arabian Sea + + • Tomahawk cruise missiles launched from submarines in the Persian Gulf + + • 47 confirmed targets struck across Iran, including: nuclear facilities at Natanz + and Parchin, IRGC command infrastructure, ballistic missile production sites, + and air defense systems across multiple provinces + + • No US ground forces deployed + + + IMMEDIATE INTERNATIONAL REACTIONS: + + • Iran''s Supreme Leader Khamenei declared the strikes "an act of war against + the Iranian nation" and vowed retaliation; Iran''s foreign minister recalled all + diplomatic contacts with the US + + • UN Security Council convened an emergency session + + • UK declined to participate; France called for immediate ceasefire; Germany urged + restraint from both sides + + • Israel expressed support but did not participate directly + + • Oil futures spiked 35% within hours of first reports + + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + PHASE 2 — WEEK 1 AFTERMATH + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + • Pentagon battle damage assessments confirm significant destruction of Iran''s + nuclear enrichment infrastructure and missile production facilities + + • Iran retaliates: fires 30+ ballistic missiles at US military installations in + Qatar (Al Udeid Air Base) and Bahrain (Naval Support Activity Bahrain) + + • US missile defense intercepts most but not all incoming missiles — 3 US service + members KILLED, 47 wounded at Al Udeid + + • US gasoline prices jump from $3.40/gallon national average to $4.80/gallon overnight + + • Dow Jones Industrial Average drops 1,400 points + + • Protests erupt in major US cities — both anti-war demonstrations and pro-strike + rallies + + • Congress divided: Senate passes resolution supporting strikes 54-46; House fails + to pass any resolution + + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + PHASE 3 — WEEK 3: STRAIT OF HORMUZ BLOCKADE + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + • Iran announces naval blockade of the Strait of Hormuz + + • Two commercial tankers struck by IRGC anti-ship missiles — 14 civilian crew + members killed + + • Lloyd''s of London suspends insurance coverage for all vessels transiting the + Persian Gulf + + • Oil reaches $140/barrel + + • US gasoline hits $6.20/gallon nationally; California stations exceed $8.00/gallon + + • Federal Reserve issues emergency statement warning of inflationary pressures + + • Major US airlines announce fuel surcharges of $75–$150 per ticket + + • Iran-backed Houthi forces intensify Red Sea shipping attacks, effectively closing + a second major global trade route + + • Walmart, Target, and Amazon warn of supply chain disruptions and potential price + increases on imported goods within 30–60 days + + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + PHASE 4 — WEEK 5: ECONOMIC CASCADE + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + • US unemployment claims rise 40% as energy-dependent industries begin layoffs + + • Trucking companies impose 25% fuel surcharges on all freight + + • Food prices rise 15% nationally due to transportation and fertilizer cost spikes + + • Federal Reserve holds emergency meeting but declines to cut rates, citing inflation + risk + + • Iran launches second wave of missile strikes targeting Saudi oil infrastructure + at Abqaiq and Ras Tanura — 4 million barrels/day of Saudi production temporarily + knocked offline + + • Oil briefly touches $180/barrel + + • US announces deployment of 15,000 additional troops to the Middle East + + • Pentagon calls up 30,000 reservists + + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + PHASE 5 — WEEK 8: CONTESTED STRAIT, GLOBAL REALIGNMENT + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + • Strait of Hormuz remains contested; US Navy minesweepers and escort convoys + have partially reopened shipping lanes, but transit times have doubled; insurance + premiums remain 10x pre-crisis levels + + • Oil stabilizes around $130/barrel; US gasoline averages $5.80/gallon + + • Cumulative US job losses attributed to the energy shock reach 400,000 + + • Iran''s internal protest movement fractures — some factions rally behind regime, + others blame regime for provoking strikes + + • Russia and China issue a joint statement condemning US strikes and announcing + expanded economic support for Iran + + • 2026 midterm elections are 3 months away + + • Republicans frame crisis as preventing a nuclear Iran; Democrats frame it as + an unnecessary war destroying the economy + + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + PHASE 6 — WEEK 12: FRAGILE CEASEFIRE + + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + • Ceasefire brokered through Omani and Qatari mediation + + • Iran agrees to halt Strait of Hormuz operations in exchange for US commitment + to cease strikes and begin indirect negotiations on a new nuclear framework + + • Oil drops to $105/barrel — remains well above pre-crisis levels + + • US gasoline averages $4.60/gallon + + • Total estimated US economic cost of 12-week crisis: exceeds $800 billion + + • Total US service members killed across all theaters: 23 + + • Inflation running at 8.5% annualized + + • Consumer confidence at lowest level since 2008 + + • The Iran crisis now dominates every 2026 midterm campaign nationally' + source: Composite of official US government sources (White House, Pentagon, Federal + Reserve), major wire services (AP, Reuters), and confirmed international reporting + — representing the full 12-week documented arc of the Iran crisis + credibility: 0.93 + ambiguity: 0.28 + emotional_valence: -0.75 +timeline: +- timestep: 0 + event: + type: emergency + content: Iran fires 30+ ballistic missiles at Al Udeid Air Base (Qatar) and Naval + Support Activity Bahrain. US missile defense intercepts most — but 3 US service + members are killed and 47 wounded at Al Udeid. Pentagon confirms significant + battle damage to Iran's nuclear and missile infrastructure. US gasoline jumps + from $3.40 to $4.80/gallon overnight. Dow drops 1,400 points. Anti-war and pro-strike + protests erupt in major cities. Senate passes a resolution supporting the strikes + 54-46; House fails to pass any resolution. + source: Pentagon press briefing, AP Wire, NYSE market reports + credibility: 0.95 + ambiguity: 0.28 + emotional_valence: -0.72 + exposure_rules: + - channel: military_official_channels + when: military_connection in ('Active duty', 'Veteran', 'Immediate family member') + or reservist_or_national_guard == True + probability: 1.0 + timestep: 0 + - channel: broadcast_breaking_news + when: primary_info_source == 'Cable/broadcast TV news' + probability: 0.95 + timestep: 0 + - channel: push_notification_online_news + when: primary_info_source == 'Online news sites' and tech_adoption_posture in + ('Early adopter', 'Innovator', 'Early majority adopter') + probability: 0.95 + timestep: 0 + - channel: social_media_viral_spread + when: social_media_behavior in ('Active poster/Influencer', 'Occasional poster') + and primary_info_source == 'Social media' + probability: 0.92 + timestep: 0 + description: 'Week 1: Iranian missile retaliation kills US troops; gas prices surge + and markets crash' + re_reasoning_intensity: extreme +- timestep: 1 + event: + type: emergency + content: Iran announces a naval blockade of the Strait of Hormuz. Two commercial + tankers are struck by IRGC anti-ship missiles, killing 14 civilian crew members. + Lloyd's of London suspends insurance for all Persian Gulf transits. Oil reaches + $140/barrel. US gasoline hits $6.20/gallon nationally; California exceeds $8.00. + The Federal Reserve issues an emergency inflation warning. Major airlines impose + $75–$150 fuel surcharges per ticket. Houthi forces simultaneously intensify + Red Sea attacks, closing a second key trade route. Walmart, Target, and Amazon + warn of supply chain disruptions and imminent price increases on imported goods. + source: Reuters, Lloyd's of London statement, Federal Reserve press release, CENTCOM + credibility: 0.94 + ambiguity: 0.28 + emotional_valence: -0.8 + exposure_rules: + - channel: push_notification_online_news + when: primary_info_source in ('Podcasts', 'Print media') and tech_adoption_posture + not in ('Technophobe/Avoider', 'Late majority adopter') + probability: 0.8 + timestep: 1 + - channel: broadcast_breaking_news + when: age >= 50 and primary_info_source != 'Avoids news' + probability: 0.85 + timestep: 1 + - channel: social_media_viral_spread + when: age < 40 and social_media_behavior in ('Passive consumer', 'Occasional poster') + probability: 0.88 + timestep: 1 + - channel: broadcast_breaking_news + when: political_engagement_level == 'Highly engaged partisan' + probability: 0.9 + timestep: 1 + - channel: social_media_viral_spread + when: age >= 40 and social_media_behavior != 'Non-user' and primary_info_source + == 'Social media' + probability: 0.82 + timestep: 1 + description: 'Week 3: Iran blockades the Strait of Hormuz; oil hits $140/barrel; + gas tops $6/gallon nationally' + re_reasoning_intensity: extreme +- timestep: 2 + event: + type: emergency + content: US unemployment claims rise 40% as energy-dependent industries begin + mass layoffs. Trucking companies impose 25% fuel surcharges on all freight. + Food prices rise 15% nationally. The Federal Reserve holds an emergency meeting + but declines to cut rates due to inflation risk. Iran launches a second missile + wave targeting Saudi oil infrastructure at Abqaiq and Ras Tanura, knocking 4 + million barrels/day offline. Oil briefly touches $180/barrel. The US announces + deployment of 15,000 additional troops to the Middle East and calls up 30,000 + reservists. Cumulative US casualty count rises. + source: Bureau of Labor Statistics emergency release, Pentagon statement, Saudi + Aramco operational update, Reuters + credibility: 0.93 + ambiguity: 0.28 + emotional_valence: -0.85 + exposure_rules: + - channel: personal_network_word_of_mouth + when: primary_info_source == 'Local news' or social_media_behavior == 'Non-user' + probability: 0.75 + timestep: 2 + - channel: broadcast_breaking_news + when: primary_info_source == 'Local news' + probability: 0.8 + timestep: 2 + - channel: personal_network_word_of_mouth + when: supply_chain_job_exposure == True or employment_sector in ('Federal government', + 'State/local government') + probability: 0.85 + timestep: 2 + - channel: social_media_viral_spread + when: economic_anxiety > 0.6 and social_media_behavior != 'Non-user' + probability: 0.78 + timestep: 2 + description: 'Week 5: Economic cascade — unemployment spikes, food prices surge, + oil briefly hits $180/barrel after Iran strikes Saudi oil facilities' + re_reasoning_intensity: extreme +- timestep: 3 + event: + type: emergency + content: US Navy minesweepers and escort convoys have partially reopened the Strait + of Hormuz, but transit times have doubled and insurance premiums remain 10x + pre-crisis levels. Oil stabilizes near $130/barrel; US gasoline averages $5.80/gallon. + Cumulative US job losses attributed to the energy shock reach 400,000. Russia + and China issue a joint statement condemning US strikes and pledging expanded + economic support to Iran. Iran's internal protest movement fractures — some + rally behind the regime, others blame it for provoking the crisis. With midterms + 3 months away, Republicans argue the strikes prevented a nuclear Iran; Democrats + frame it as a costly, unnecessary war. + source: US Navy 5th Fleet, joint Kremlin-Beijing communiqué, ABC News/Washington + Post poll, Labor Department + credibility: 0.91 + ambiguity: 0.28 + emotional_valence: -0.6 + exposure_rules: + - channel: personal_network_word_of_mouth + when: primary_info_source == 'Avoids news' and extraversion > 0.5 + probability: 0.65 + timestep: 3 + - channel: broadcast_breaking_news + when: urban_rural == 'Rural' and age >= 45 + probability: 0.8 + timestep: 3 + - channel: personal_network_word_of_mouth + when: urban_rural == 'Rural' and primary_info_source not in ('Cable/broadcast + TV news', 'Online news sites') + probability: 0.7 + timestep: 3 + - channel: social_media_viral_spread + when: war_escalation_fear > 0.7 and social_media_behavior != 'Non-user' + probability: 0.85 + timestep: 3 + description: 'Week 8: Strait partially reopened; Russia and China back Iran; 400,000 + US jobs lost; midterm framing intensifies' + re_reasoning_intensity: high +- timestep: 4 + event: + type: emergency + content: A classified Defense Intelligence Agency assessment leaked to the Washington + Post indicates that Iran has begun reconstituting uranium enrichment operations + at two previously undisclosed hardened facilities, casting doubt on the strategic + success of the February strikes. The White House calls the leak 'irresponsible' + but does not deny its contents. Omani and Qatari ceasefire mediation efforts + are reported to have stalled over Iran's demand for a formal US pledge of non-aggression. + Consumer confidence falls to its lowest level since 2008. Inflation is now running + at an annualized rate of 8.5%. Congressional approval ratings hit a 40-year + low. + source: Washington Post (leaked DIA assessment), White House press secretary, + Reuters, Gallup consumer confidence index + credibility: 0.82 + ambiguity: 0.28 + emotional_valence: -0.7 + exposure_rules: + - channel: personal_network_word_of_mouth + when: primary_info_source == 'Avoids news' and extraversion <= 0.5 + probability: 0.45 + timestep: 4 + - channel: broadcast_breaking_news + when: midterm_turnout_propensity in ('Rarely votes', 'Never votes') and primary_info_source + != 'Avoids news' + probability: 0.6 + timestep: 4 + description: 'Week 10: Leaked intelligence report suggests Iran is reconstituting + uranium enrichment at undisclosed backup sites; ceasefire talks stall' + re_reasoning_intensity: high +- timestep: 5 + event: + type: emergency + content: A ceasefire has been brokered through Omani and Qatari mediation. Iran + agrees to halt Strait of Hormuz operations in exchange for a US commitment to + cease strikes and begin indirect negotiations on a new nuclear framework. Oil + drops to $105/barrel — still well above pre-crisis levels. US gasoline averages + $4.60/gallon. Total US economic cost of the 12-week crisis is estimated to exceed + $800 billion. 23 US service members have been killed across all theaters. Inflation + is running at 8.5% annualized. Consumer confidence is at its lowest level since + 2008. The Iran crisis now dominates every 2026 midterm campaign nationally — + it is the defining political issue of the cycle. + source: White House statement, Omani Foreign Ministry, Energy Information Administration, + Congressional Budget Office preliminary estimate + credibility: 0.93 + ambiguity: 0.28 + emotional_valence: -0.45 + exposure_rules: + - channel: personal_network_word_of_mouth + when: 'true' + probability: 0.55 + timestep: 5 + description: 'Week 12: Fragile ceasefire reached through Omani/Qatari mediation; + oil drops to $105; total US economic cost exceeds $800 billion' + re_reasoning_intensity: high +seed_exposure: + channels: + - name: broadcast_breaking_news + description: Major broadcast and cable TV networks (CNN, Fox News, MSNBC, ABC, + NBC, CBS) interrupt regular programming with breaking news alerts about the + airstrikes. The most authoritative and immediate mass-reach channel for a national + security emergency of this magnitude. + credibility_modifier: 1.2 + experience_template: I was watching TV when the network cut to a breaking news + alert — the US just launched airstrikes on Iran. + - name: push_notification_online_news + description: Mobile push notifications and online news site alerts from AP, Reuters, + NYT, Washington Post, Fox News Digital, and other major digital outlets reaching + smartphone users instantly at the moment of the strikes. + credibility_modifier: 1.1 + experience_template: 'My phone buzzed with a breaking news alert: US military + has launched strikes on Iran.' + - name: social_media_viral_spread + description: Twitter/X, Facebook, Instagram, TikTok, and Reddit posts — including + live footage, eyewitness accounts, political commentary, and viral threads — + spread the news rapidly but with variable accuracy and framing. Primary vector + for younger, digitally native audiences. + credibility_modifier: 0.8 + experience_template: I saw it blowing up on my feed — everyone was posting about + the US bombing Iran. + - name: personal_network_word_of_mouth + description: Friends, family, coworkers, and neighbors share news directly through + conversation, phone calls, or text messages. Especially important for news-avoiders + and low-digital-engagement populations. Reaches those who missed initial media + coverage. + credibility_modifier: 0.9 + experience_template: A family member called me to tell me we had bombed Iran — + they seemed really shaken up. + - name: military_official_channels + description: Official Department of Defense notifications, base communications, + unit alerts, and reserve/National Guard mobilization notices reaching those + with direct military connections. Highest credibility, earliest and most operationally + specific information. + credibility_modifier: 1.3 + experience_template: I got an official notification through military channels + — this is real and my unit may be affected. + rules: + - channel: military_official_channels + when: military_connection in ('Active duty', 'Veteran', 'Immediate family member') + or reservist_or_national_guard == True + probability: 1.0 + timestep: 0 + - channel: broadcast_breaking_news + when: primary_info_source == 'Cable/broadcast TV news' + probability: 0.95 + timestep: 0 + - channel: push_notification_online_news + when: primary_info_source == 'Online news sites' and tech_adoption_posture in + ('Early adopter', 'Innovator', 'Early majority adopter') + probability: 0.95 + timestep: 0 + - channel: social_media_viral_spread + when: social_media_behavior in ('Active poster/Influencer', 'Occasional poster') + and primary_info_source == 'Social media' + probability: 0.92 + timestep: 0 + - channel: push_notification_online_news + when: primary_info_source in ('Podcasts', 'Print media') and tech_adoption_posture + not in ('Technophobe/Avoider', 'Late majority adopter') + probability: 0.8 + timestep: 1 + - channel: broadcast_breaking_news + when: age >= 50 and primary_info_source != 'Avoids news' + probability: 0.85 + timestep: 1 + - channel: social_media_viral_spread + when: age < 40 and social_media_behavior in ('Passive consumer', 'Occasional poster') + probability: 0.88 + timestep: 1 + - channel: broadcast_breaking_news + when: political_engagement_level == 'Highly engaged partisan' + probability: 0.9 + timestep: 1 + - channel: social_media_viral_spread + when: age >= 40 and social_media_behavior != 'Non-user' and primary_info_source + == 'Social media' + probability: 0.82 + timestep: 1 + - channel: personal_network_word_of_mouth + when: primary_info_source == 'Local news' or social_media_behavior == 'Non-user' + probability: 0.75 + timestep: 2 + - channel: broadcast_breaking_news + when: primary_info_source == 'Local news' + probability: 0.8 + timestep: 2 + - channel: personal_network_word_of_mouth + when: supply_chain_job_exposure == True or employment_sector in ('Federal government', + 'State/local government') + probability: 0.85 + timestep: 2 + - channel: social_media_viral_spread + when: economic_anxiety > 0.6 and social_media_behavior != 'Non-user' + probability: 0.78 + timestep: 2 + - channel: personal_network_word_of_mouth + when: primary_info_source == 'Avoids news' and extraversion > 0.5 + probability: 0.65 + timestep: 3 + - channel: broadcast_breaking_news + when: urban_rural == 'Rural' and age >= 45 + probability: 0.8 + timestep: 3 + - channel: personal_network_word_of_mouth + when: urban_rural == 'Rural' and primary_info_source not in ('Cable/broadcast + TV news', 'Online news sites') + probability: 0.7 + timestep: 3 + - channel: social_media_viral_spread + when: war_escalation_fear > 0.7 and social_media_behavior != 'Non-user' + probability: 0.85 + timestep: 3 + - channel: personal_network_word_of_mouth + when: primary_info_source == 'Avoids news' and extraversion <= 0.5 + probability: 0.45 + timestep: 4 + - channel: broadcast_breaking_news + when: midterm_turnout_propensity in ('Rarely votes', 'Never votes') and primary_info_source + != 'Avoids news' + probability: 0.6 + timestep: 4 + - channel: personal_network_word_of_mouth + when: 'true' + probability: 0.55 + timestep: 5 +interaction: + description: "This is a high-salience, emotionally charged national security and\ + \ economic crisis event spanning 12 weeks. Americans will discuss it across virtually\ + \ every social context — family dinner tables, workplaces, social media feeds,\ + \ religious communities, and neighborhood groups. The content triggers multiple\ + \ powerful psychological drivers simultaneously: fear of war escalation, economic\ + \ anxiety from surging gas and food prices, partisan identity activation, and\ + \ military family concern. \n\nStrong partisan sorting will dominate discussions:\ + \ Trump voters and strong Republicans will frame conversations around nuclear\ + \ threat prevention and national security strength, while strong Democrats and\ + \ Harris voters will emphasize economic destruction and unnecessary war. True\ + \ Independents and moderate voters will be the most volatile discussants, moving\ + \ between frames depending on which phase of the crisis is most salient.\n\nSocial\ + \ media active posters and influencers will be disproportionate amplifiers, especially\ + \ on Phase 1 (the dramatic strike announcement) and Phase 3 (gas prices hitting\ + \ $6+). Military-connected individuals will share with high emotional intensity\ + \ regardless of political identity. Economically anxious agents — particularly\ + \ those paycheck-to-paycheck, with high commutes, or in supply-chain-exposed jobs\ + \ — will share crisis updates with urgency as the economic cascade phases hit.\ + \ Agents with high neuroticism and high war_escalation_fear will share widely\ + \ but may distort information. High-trust, high-education agents will share more\ + \ carefully and at lower volume. Cable news consumers will drive broadcast-style\ + \ amplification; social media primary users will drive faster but lower-fidelity\ + \ spread. Devout religious communities may frame the crisis in apocalyptic or\ + \ just-war terms, increasing within-community sharing. The event's 12-week arc\ + \ means sharing behavior will evolve — early phases dominated by shock and urgency,\ + \ later phases by economic grievance and electoral framing." +spread: + share_probability: 0.72 + share_modifiers: + - when: political_identity == 'Strong Republican' + multiply: 1.35 + add: 0.0 + - when: political_identity == 'Strong Democrat' + multiply: 1.3 + add: 0.0 + - when: political_identity == 'True Independent' + multiply: 0.9 + add: 0.0 + - when: social_media_behavior == 'Active poster/Influencer' + multiply: 1.5 + add: 0.0 + - when: social_media_behavior == 'Occasional poster' + multiply: 1.2 + add: 0.0 + - when: social_media_behavior == 'Passive consumer' + multiply: 0.85 + add: 0.0 + - when: social_media_behavior == 'Non-user' + multiply: 0.6 + add: 0.0 + - when: primary_info_source == 'Social media' + multiply: 1.4 + add: 0.0 + - when: primary_info_source == 'Cable/broadcast TV news' + multiply: 1.25 + add: 0.0 + - when: primary_info_source == 'Avoids news' + multiply: 0.4 + add: 0.0 + - when: military_connection == 'Active duty' + multiply: 1.55 + add: 0.0 + - when: military_connection == 'Veteran' + multiply: 1.45 + add: 0.0 + - when: military_connection == 'Immediate family member' + multiply: 1.5 + add: 0.0 + - when: military_connection == 'Extended family/friend' + multiply: 1.2 + add: 0.0 + - when: reservist_or_national_guard == true + multiply: 1.6 + add: 0.0 + - when: financial_margin == 'Paycheck-to-paycheck' + multiply: 1.3 + add: 0.0 + - when: financial_margin == 'In debt/deficit' + multiply: 1.35 + add: 0.0 + - when: financial_margin == 'Comfortable savings buffer' + multiply: 0.85 + add: 0.0 + - when: economic_anxiety > 0.75 + multiply: 1.35 + add: 0.0 + - when: economic_anxiety < 0.25 + multiply: 0.8 + add: 0.0 + - when: war_escalation_fear > 0.80 + multiply: 1.4 + add: 0.0 + - when: war_escalation_fear < 0.20 + multiply: 0.75 + add: 0.0 + - when: neuroticism > 0.70 + multiply: 1.25 + add: 0.0 + - when: extraversion > 0.70 + multiply: 1.2 + add: 0.0 + - when: extraversion < 0.30 + multiply: 0.8 + add: 0.0 + - when: energy_cost_burden == 'Severe hardship' + multiply: 1.45 + add: 0.0 + - when: energy_cost_burden == 'Moderate hardship' + multiply: 1.2 + add: 0.0 + - when: energy_cost_burden == 'Minimal impact' + multiply: 0.8 + add: 0.0 + - when: supply_chain_job_exposure == true + multiply: 1.3 + add: 0.0 + - when: daily_commute_miles > 40 + multiply: 1.2 + add: 0.0 + - when: top_issue_2026 == 'Economy/Jobs' + multiply: 1.25 + add: 0.0 + - when: top_issue_2026 == 'Immigration' + multiply: 1.15 + add: 0.0 + - when: top_issue_2026 == 'Democracy/Rule of law' + multiply: 1.2 + add: 0.0 + - when: iran_strike_approval == 'Strongly approve' + multiply: 1.3 + add: 0.0 + - when: iran_strike_approval == 'Strongly disapprove' + multiply: 1.3 + add: 0.0 + - when: iran_strike_approval == 'No opinion' + multiply: 0.65 + add: 0.0 + - when: nuclear_iran_threat_perception == 'Existential threat' + multiply: 1.35 + add: 0.0 + - when: nuclear_iran_threat_perception == 'Not a threat' + multiply: 1.1 + add: 0.0 + - when: mideast_policy_hawkishness == 'Strongly interventionist' + multiply: 1.25 + add: 0.0 + - when: mideast_policy_hawkishness == 'Strongly non-interventionist' + multiply: 1.25 + add: 0.0 + - when: political_engagement_level == 'Highly engaged partisan' + multiply: 1.4 + add: 0.0 + - when: political_engagement_level == 'Disengaged' + multiply: 0.6 + add: 0.0 + - when: midterm_turnout_propensity == 'Always votes' + multiply: 1.2 + add: 0.0 + - when: midterm_turnout_propensity == 'Never votes' + multiply: 0.7 + add: 0.0 + - when: institutional_trust == 'Distrustful/Conspiratorial' + multiply: 1.35 + add: 0.0 + - when: institutional_trust == 'High trust' + multiply: 0.9 + add: 0.0 + - when: religious_engagement == 'Devout' + multiply: 1.15 + add: 0.0 + - when: urban_rural == 'Rural' + multiply: 1.1 + add: 0.0 + - when: urban_rural == 'Urban' + multiply: 1.05 + add: 0.0 + - when: vote_2024_presidential == 'Trump' + multiply: 1.2 + add: 0.0 + - when: vote_2024_presidential == 'Harris' + multiply: 1.15 + add: 0.0 + - when: vote_2024_presidential == 'Did not vote' + multiply: 0.7 + add: 0.0 + - when: protest_participation_propensity == 'Very likely' + multiply: 1.35 + add: 0.0 + - when: crisis_midterm_vote_shift == 'Disengaged/withdrawn' + multiply: 0.55 + add: 0.0 + - when: portfolio_energy_exposure == 'High energy/defense exposure' + multiply: 1.25 + add: 0.0 + - when: education_level == 'Graduate degree' + multiply: 1.1 + add: 0.0 + - when: education_level == 'Less than HS' + multiply: 0.8 + add: 0.0 + - when: age < 35 + multiply: 1.15 + add: 0.0 + - when: age > 65 + multiply: 0.9 + add: 0.0 + - when: openness > 0.70 + multiply: 1.1 + add: 0.0 + decay_per_hop: 0.08 + max_hops: 7 +outcomes: + suggested_outcomes: + - name: crisis_stance + type: categorical + description: How the agent publicly positions themselves on the US airstrikes + and the resulting conflict — from active opposition to active support + options: + - actively_oppose_and_protest + - vocally_critical_but_not_protesting + - disengaged_from_conflict_politics + - cautiously_supportive + - strongly_supportive_and_vocal + range: null + required: true + option_friction: + actively_oppose_and_protest: 0.75 + vocally_critical_but_not_protesting: 0.45 + disengaged_from_conflict_politics: 0.25 + cautiously_supportive: 0.4 + strongly_supportive_and_vocal: 0.65 + - name: economic_adaptation_behavior + type: categorical + description: How the agent is behaviorally adapting to the energy price shock + and economic disruption in their daily life + options: + - no_meaningful_change + - minor_discretionary_cuts + - significant_lifestyle_changes + - crisis_mode_spending_freeze + - relocating_or_job_switching_due_to_costs + range: null + required: true + option_friction: + no_meaningful_change: 0.2 + minor_discretionary_cuts: 0.3 + significant_lifestyle_changes: 0.55 + crisis_mode_spending_freeze: 0.7 + relocating_or_job_switching_due_to_costs: 0.9 + - name: midterm_voting_intent + type: categorical + description: How the agent intends to vote in the 2026 midterm elections, driven + by their reaction to the Iran crisis and its economic fallout + options: + - vote_republican_endorse_strikes + - vote_republican_despite_reservations + - abstain_or_disengage + - vote_democrat_oppose_war_costs + - vote_third_party_or_protest_vote + range: null + required: true + option_friction: + vote_republican_endorse_strikes: 0.4 + vote_republican_despite_reservations: 0.45 + abstain_or_disengage: 0.35 + vote_democrat_oppose_war_costs: 0.4 + vote_third_party_or_protest_vote: 0.7 + - name: information_consumption_pattern + type: categorical + description: Where and how the agent is primarily sourcing information about the + crisis + options: + - mainstream_media_heavy + - government_official_sources_only + - social_media_and_alternative_news + - actively_avoiding_news + - cross_referencing_multiple_sources + range: null + required: true + option_friction: + mainstream_media_heavy: 0.2 + government_official_sources_only: 0.3 + social_media_and_alternative_news: 0.25 + actively_avoiding_news: 0.4 + cross_referencing_multiple_sources: 0.55 + - name: energy_cost_impact_severity + type: categorical + description: The agent's assessed personal severity of financial harm from the + energy and inflation shock + options: + - negligible_impact + - noticeable_but_manageable + - serious_financial_strain + - severe_hardship_affecting_essentials + - economic_crisis_threatening_stability + range: null + required: true + option_friction: + negligible_impact: 0.15 + noticeable_but_manageable: 0.2 + serious_financial_strain: 0.35 + severe_hardship_affecting_essentials: 0.5 + economic_crisis_threatening_stability: 0.65 + - name: trust_in_government_handling + type: categorical + description: The agent's level of trust in the US government's management of the + military conflict and its economic consequences + options: + - strong_trust_fully_confident + - moderate_trust_with_concerns + - skeptical_but_not_opposed + - deep_distrust_of_decision_making + - complete_loss_of_institutional_confidence + range: null + required: true + option_friction: + strong_trust_fully_confident: 0.35 + moderate_trust_with_concerns: 0.25 + skeptical_but_not_opposed: 0.3 + deep_distrust_of_decision_making: 0.45 + complete_loss_of_institutional_confidence: 0.6 + - name: ceasefire_outcome_assessment + type: categorical + description: How the agent evaluates the Week 12 ceasefire deal — whether the + costs were worth any strategic gains + options: + - clear_strategic_victory_worth_costs + - mixed_result_unclear_if_worth_it + - pyrrhic_outcome_costs_outweigh_gains + - strategic_failure_goals_not_achieved + - too_early_to_judge + range: null + required: true + option_friction: + clear_strategic_victory_worth_costs: 0.45 + mixed_result_unclear_if_worth_it: 0.3 + pyrrhic_outcome_costs_outweigh_gains: 0.4 + strategic_failure_goals_not_achieved: 0.5 + too_early_to_judge: 0.2 + - name: open_ended_crisis_reasoning + type: open_ended + description: 'In the agent''s own words: what does this crisis mean for their + life, their sense of national direction, and what they believe should happen + next?' + options: null + range: null + required: true + option_friction: null + capture_full_reasoning: true + extraction_instructions: null + decision_relevant_attributes: [] +simulation: + max_timesteps: 6 + timestep_unit: week + stop_conditions: + - exposure_rate > 0.95 and no_state_changes_for > 4 + allow_early_convergence: null + seed: null +background_context: The United States is in the grip of a wartime economic shock triggered + by the February 2026 airstrikes on Iran — oil prices have surged, inflation is accelerating, + and the country is politically fractured over a conflict that has already cost American + lives and hundreds of billions of dollars. It is late winter into spring 2026, a + midterm election year, and the crisis has displaced nearly every other domestic + issue in public discourse. +relationship_weights: null +extended_attributes: +- name: military_connection + type: categorical + category: population_specific + description: Relationship to active-duty or veteran military personnel (Active duty, + Veteran, Immediate family member, Extended family/friend, No connection). + scope: individual + semantic_type: null + identity_type: professional_identity + display_format: null + sampling: + strategy: independent + distribution: + type: categorical + options: + - Active duty + - Veteran + - Immediate family member + - Extended family/friend + - No connection + weights: + - 0.005 + - 0.07 + - 0.19 + - 0.285 + - 0.45 + formula: null + depends_on: [] + modifiers: [] + grounding: + level: strong + method: researched + source: BLS Employment Situation of Veterans 2024 (bls.gov/news.release/vet.nr0.htm); + Pew Research Center 2011 Military-Civilian Gap survey (pewresearch.org); Pew + Research Center Veterans Day 2023 (pewresearch.org/short-reads/2023/11/08) + note: 'Active duty: ~1.3M service members out of ~260M adults = ~0.5%. Veterans: + BLS confirms ~7% of adult population (17.6M). Immediate family member: derived + from Pew age-band data — 77% of 50+ have immediate family member who served, + 57% of 30-49, ~33% of 18-29; population-weighted average ~55%, but this is immediate + family who EVER served (includes grandparents/WWII era). We restrict to the + ''immediate family'' category to mean spouse/parent/sibling/child currently + serving or recently separated — estimated ~19% after subtracting veterans themselves. + Extended family/friend (aunt, uncle, cousin, friend): ~28.5%. No connection + residual: ~45%. Weights are adjusted so Active duty + Veteran respondents are + not double-counted in family categories. Age-skewing (older adults more likely + to have connections) is handled by downstream correlation with age attribute.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.001 + reason: Categorical weights must sum to 1.0. + - type: spec_expression + value: null + expression: len(options) == 5 + reason: Must have exactly 5 connection categories as specified. +- name: iran_strike_approval + type: categorical + category: population_specific + description: Personal approval of the February 23 US airstrikes against Iran (Strongly + approve, Somewhat approve, Somewhat disapprove, Strongly disapprove, No opinion). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Strongly approve + - Somewhat approve + - Somewhat disapprove + - Strongly disapprove + - No opinion + weights: + - 0.2 + - 0.17 + - 0.15 + - 0.31 + - 0.17 + formula: null + depends_on: + - political_identity + - military_connection + - institutional_trust + modifiers: + - when: political_identity == 'Strong Republican' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.55 + Somewhat approve: 0.25 + Somewhat disapprove: 0.07 + Strongly disapprove: 0.08 + No opinion: 0.05 + probability_override: null + - when: political_identity == 'Lean Republican' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.3 + Somewhat approve: 0.3 + Somewhat disapprove: 0.18 + Strongly disapprove: 0.12 + No opinion: 0.1 + probability_override: null + - when: political_identity == 'True Independent' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.1 + Somewhat approve: 0.18 + Somewhat disapprove: 0.22 + Strongly disapprove: 0.28 + No opinion: 0.22 + probability_override: null + - when: political_identity == 'Lean Democrat' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.05 + Somewhat approve: 0.1 + Somewhat disapprove: 0.25 + Strongly disapprove: 0.52 + No opinion: 0.08 + probability_override: null + - when: political_identity == 'Strong Democrat' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.02 + Somewhat approve: 0.05 + Somewhat disapprove: 0.13 + Strongly disapprove: 0.75 + No opinion: 0.05 + probability_override: null + - when: military_connection == 'Active duty' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.32 + Somewhat approve: 0.28 + Somewhat disapprove: 0.18 + Strongly disapprove: 0.15 + No opinion: 0.07 + probability_override: null + - when: military_connection == 'Veteran' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.28 + Somewhat approve: 0.26 + Somewhat disapprove: 0.2 + Strongly disapprove: 0.18 + No opinion: 0.08 + probability_override: null + - when: military_connection == 'Immediate family member' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.22 + Somewhat approve: 0.24 + Somewhat disapprove: 0.22 + Strongly disapprove: 0.22 + No opinion: 0.1 + probability_override: null + - when: military_connection == 'No connection' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.12 + Somewhat approve: 0.16 + Somewhat disapprove: 0.22 + Strongly disapprove: 0.35 + No opinion: 0.15 + probability_override: null + - when: institutional_trust == 'High trust' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.22 + Somewhat approve: 0.25 + Somewhat disapprove: 0.22 + Strongly disapprove: 0.22 + No opinion: 0.09 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.18 + Somewhat approve: 0.15 + Somewhat disapprove: 0.15 + Strongly disapprove: 0.28 + No opinion: 0.24 + probability_override: null + - when: institutional_trust == 'Low trust' + multiply: null + add: null + weight_overrides: + Strongly approve: 0.14 + Somewhat approve: 0.16 + Somewhat disapprove: 0.22 + Strongly disapprove: 0.3 + No opinion: 0.18 + probability_override: null + grounding: + level: strong + method: researched + source: 'YouGov snap poll June 21-22 2025 (n=2,413): 35% approve, 46% disapprove, + 19% unsure; CBS/YouGov June 22-24 2025; Marist/NPR/PBS June 23-25 2025. Reagan + Institute Oct-Nov 2025 retrospective showed 60% approval after time elapsed. + Calibrated to immediate post-strike window matching Feb 2026 timeline with slight + approval uptick after retaliation.' + note: Base weights reflect a nationally representative adult prior to applying + political_identity, military_connection, and institutional_trust modifiers. + After Iranian retaliation casualties at Al Udeid (Week 1), approval among approvers + may harden; overall split remains roughly 37% approve / 46% disapprove / 17% + no opinion at Week 1. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.01 + reason: Weights must sum to 1 +- name: energy_cost_burden + type: categorical + category: population_specific + description: Degree to which spiking fuel and energy prices from the crisis impose + financial hardship on the household (Severe hardship, Moderate hardship, Minor + inconvenience, Minimal impact). + scope: household + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Severe hardship + - Moderate hardship + - Minor inconvenience + - Minimal impact + weights: + - 0.28 + - 0.35 + - 0.22 + - 0.15 + formula: null + depends_on: + - household_income + - financial_margin + - urban_rural + modifiers: + - when: financial_margin == 'In debt/deficit' + multiply: null + add: null + weight_overrides: + Severe hardship: 0.52 + Moderate hardship: 0.32 + Minor inconvenience: 0.1 + Minimal impact: 0.06 + probability_override: null + - when: financial_margin == 'Paycheck-to-paycheck' + multiply: null + add: null + weight_overrides: + Severe hardship: 0.38 + Moderate hardship: 0.38 + Minor inconvenience: 0.16 + Minimal impact: 0.08 + probability_override: null + - when: financial_margin == 'Modest buffer' + multiply: null + add: null + weight_overrides: + Severe hardship: 0.14 + Moderate hardship: 0.38 + Minor inconvenience: 0.33 + Minimal impact: 0.15 + probability_override: null + - when: financial_margin == 'Comfortable savings buffer' + multiply: null + add: null + weight_overrides: + Severe hardship: 0.04 + Moderate hardship: 0.16 + Minor inconvenience: 0.36 + Minimal impact: 0.44 + probability_override: null + - when: urban_rural == 'Rural' + multiply: null + add: null + weight_overrides: + Severe hardship: 0.34 + Moderate hardship: 0.38 + Minor inconvenience: 0.18 + Minimal impact: 0.1 + probability_override: null + - when: urban_rural == 'Suburban' + multiply: null + add: null + weight_overrides: + Severe hardship: 0.22 + Moderate hardship: 0.38 + Minor inconvenience: 0.25 + Minimal impact: 0.15 + probability_override: null + - when: urban_rural == 'Urban' + multiply: null + add: null + weight_overrides: + Severe hardship: 0.16 + Moderate hardship: 0.32 + Minor inconvenience: 0.3 + Minimal impact: 0.22 + probability_override: null + - when: household_income < 40000 + multiply: null + add: null + weight_overrides: + Severe hardship: 0.45 + Moderate hardship: 0.35 + Minor inconvenience: 0.13 + Minimal impact: 0.07 + probability_override: null + - when: household_income >= 40000 and household_income < 80000 + multiply: null + add: null + weight_overrides: + Severe hardship: 0.22 + Moderate hardship: 0.4 + Minor inconvenience: 0.26 + Minimal impact: 0.12 + probability_override: null + - when: household_income >= 80000 and household_income < 150000 + multiply: null + add: null + weight_overrides: + Severe hardship: 0.08 + Moderate hardship: 0.28 + Minor inconvenience: 0.38 + Minimal impact: 0.26 + probability_override: null + - when: household_income >= 150000 + multiply: null + add: null + weight_overrides: + Severe hardship: 0.03 + Moderate hardship: 0.12 + Minor inconvenience: 0.3 + Minimal impact: 0.55 + probability_override: null + grounding: + level: medium + method: extrapolated + source: BLS Consumer Expenditure Survey data on fuel share of household budgets; + EIA household energy burden data; crisis scenario extrapolated from $3.40 to + $6.20/gallon national average by Week 3. Lower-income households spend 8-10% + of income on energy vs 2-3% for high-income. + note: Base distribution reflects Week 3+ crisis conditions ($6.20/gal). Modifiers + for household_income, financial_margin, and urban_rural will shift heavily — + rural/low-income households face severe hardship at much higher rates. Base + weights before those modifiers represent the national center of gravity at peak + crisis. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.01 + reason: Weights must sum to 1 +- name: daily_commute_miles + type: int + category: population_specific + description: Estimated round-trip commute distance in miles per workday, determining + fuel cost exposure from the energy shock. + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: lognormal + mean: null + std: null + min: 0.0 + max: 200.0 + mean_formula: 0 if employment_sector in ['Retired', 'Unemployed', 'Not in labor + force'] else (8 if urban_rural == 'Urban' else (28 if urban_rural == 'Suburban' + else 42)) + std_formula: 0 if employment_sector in ['Retired', 'Unemployed', 'Not in labor + force'] else (10 if urban_rural == 'Urban' else (18 if urban_rural == 'Suburban' + else 25)) + min_formula: null + max_formula: null + formula: null + depends_on: + - urban_rural + - employment_sector + modifiers: + - when: urban_rural == 'Rural' + multiply: 1.15 + add: 3.0 + weight_overrides: null + probability_override: null + - when: urban_rural == 'Suburban' + multiply: 1.1 + add: 2.0 + weight_overrides: null + probability_override: null + - when: urban_rural == 'Urban' + multiply: 0.9 + add: 0.0 + weight_overrides: null + probability_override: null + - when: employment_sector == 'Federal government' + multiply: 1.12 + add: 4.0 + weight_overrides: null + probability_override: null + grounding: + level: strong + method: researched + source: 'US Census ACS: national average one-way commute ~27 minutes / ~15-16 + miles one-way = ~30-32 miles round trip. Urban commuters average shorter distances; + rural commuters average longer distances. BTS National Household Travel Survey + data on commute distance by urbanicity.' + note: Lognormal is appropriate given right-skewed commute distance distributions. + Non-employed (Retired, Unemployed, Not in labor force) set to zero. Employment_sector + = 'Federal government' or 'State/local government' tends to cluster in urban/suburban + areas, which already captured via urban_rural. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Commute cannot be negative; remote workers and non-employed have zero + - type: hard_max + value: 200.0 + expression: null + reason: Round-trip commute beyond 200 miles is essentially non-existent for daily + commuters +- name: supply_chain_job_exposure + type: boolean + category: population_specific + description: Whether the individual works in an industry directly exposed to supply + chain disruption or energy price shocks (trucking, aviation, retail, manufacturing, + agriculture). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: boolean + probability_true: 0.22 + formula: null + depends_on: + - employment_sector + modifiers: + - when: employment_sector == 'Private sector' + multiply: null + add: null + weight_overrides: null + probability_override: 0.32 + - when: employment_sector == 'Gig/contract' + multiply: null + add: null + weight_overrides: null + probability_override: 0.38 + - when: employment_sector == 'Self-employed' + multiply: null + add: null + weight_overrides: null + probability_override: 0.28 + - when: employment_sector == 'Federal government' + multiply: null + add: null + weight_overrides: null + probability_override: 0.06 + - when: employment_sector == 'State/local government' + multiply: null + add: null + weight_overrides: null + probability_override: 0.08 + - when: employment_sector == 'Retired' + multiply: null + add: null + weight_overrides: null + probability_override: 0.04 + - when: employment_sector == 'Unemployed' + multiply: null + add: null + weight_overrides: null + probability_override: 0.1 + - when: employment_sector == 'Not in labor force' + multiply: null + add: null + weight_overrides: null + probability_override: 0.05 + grounding: + level: medium + method: extrapolated + source: 'BLS Occupational Employment Statistics: trucking ~2M workers, aviation + ~750K, retail trade ~15M, manufacturing ~12M, agriculture ~2.5M. Combined ~32M + workers out of ~160M labor force = ~20%. Added buffer for gig/contract workers + in exposed sectors.' + note: Base probability_true=0.22 before employment_sector modifier. Modifier should + set to near 1.0 for trucking/manufacturing/retail/agriculture employment sectors + and near 0 for government, professional services, healthcare. Unemployed/Retired/Not + in labor force should be false. + constraints: [] +- name: mideast_policy_hawkishness + type: categorical + category: population_specific + description: Pre-existing stance on US military involvement in the Middle East (Strongly + interventionist, Moderately interventionist, Neutral/Uncertain, Moderately non-interventionist, + Strongly non-interventionist). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Strongly interventionist + - Moderately interventionist + - Neutral/Uncertain + - Moderately non-interventionist + - Strongly non-interventionist + weights: + - 0.14 + - 0.21 + - 0.28 + - 0.22 + - 0.15 + formula: null + depends_on: + - political_identity + - military_connection + modifiers: + - when: political_identity == 'Strong Republican' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.35 + Moderately interventionist: 0.32 + Neutral/Uncertain: 0.15 + Moderately non-interventionist: 0.1 + Strongly non-interventionist: 0.08 + probability_override: null + - when: political_identity == 'Lean Republican' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.18 + Moderately interventionist: 0.3 + Neutral/Uncertain: 0.25 + Moderately non-interventionist: 0.17 + Strongly non-interventionist: 0.1 + probability_override: null + - when: political_identity == 'True Independent' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.08 + Moderately interventionist: 0.16 + Neutral/Uncertain: 0.32 + Moderately non-interventionist: 0.26 + Strongly non-interventionist: 0.18 + probability_override: null + - when: political_identity == 'Lean Democrat' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.05 + Moderately interventionist: 0.12 + Neutral/Uncertain: 0.25 + Moderately non-interventionist: 0.32 + Strongly non-interventionist: 0.26 + probability_override: null + - when: political_identity == 'Strong Democrat' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.04 + Moderately interventionist: 0.09 + Neutral/Uncertain: 0.17 + Moderately non-interventionist: 0.32 + Strongly non-interventionist: 0.38 + probability_override: null + - when: military_connection == 'Active duty' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.3 + Moderately interventionist: 0.35 + Neutral/Uncertain: 0.18 + Moderately non-interventionist: 0.12 + Strongly non-interventionist: 0.05 + probability_override: null + - when: military_connection == 'Veteran' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.22 + Moderately interventionist: 0.3 + Neutral/Uncertain: 0.22 + Moderately non-interventionist: 0.16 + Strongly non-interventionist: 0.1 + probability_override: null + - when: military_connection == 'No connection' + multiply: null + add: null + weight_overrides: + Strongly interventionist: 0.08 + Moderately interventionist: 0.18 + Neutral/Uncertain: 0.28 + Moderately non-interventionist: 0.26 + Strongly non-interventionist: 0.2 + probability_override: null + grounding: + level: medium + method: researched + source: 'Chicago Council on Global Affairs 2025 survey: Americans prioritize defensive + over offensive troop use; 48% oppose vs 28% support military action in Iran + (Economist/YouGov Jan 2026). Quinnipiac Jun 2025: 51-42 oppose US joining Israel + strikes. Gallup: support for using US troops to stop nuclear proliferation ~72%.' + note: Pre-existing hawkishness distribution before any modifiers. Political_identity + modifier will push Republicans toward interventionist, Democrats toward non-interventionist. + Military_connection will push toward interventionist across the board. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.01 + reason: Weights must sum to 1 +- name: nuclear_iran_threat_perception + type: categorical + category: population_specific + description: Perceived severity of Iran's nuclear program as a threat to US national + security before the strikes (Existential threat, Serious threat, Moderate threat, + Overstated threat, Not a threat). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Existential threat + - Serious threat + - Moderate threat + - Overstated threat + - Not a threat + weights: + - 0.18 + - 0.3 + - 0.27 + - 0.16 + - 0.09 + formula: null + depends_on: + - political_identity + - primary_info_source + - institutional_trust + modifiers: + - when: political_identity == 'Strong Republican' + multiply: null + add: null + weight_overrides: + Existential threat: 0.38 + Serious threat: 0.4 + Moderate threat: 0.14 + Overstated threat: 0.05 + Not a threat: 0.03 + probability_override: null + - when: political_identity == 'Lean Republican' + multiply: null + add: null + weight_overrides: + Existential threat: 0.22 + Serious threat: 0.42 + Moderate threat: 0.24 + Overstated threat: 0.08 + Not a threat: 0.04 + probability_override: null + - when: political_identity == 'True Independent' + multiply: null + add: null + weight_overrides: + Existential threat: 0.14 + Serious threat: 0.36 + Moderate threat: 0.3 + Overstated threat: 0.14 + Not a threat: 0.06 + probability_override: null + - when: political_identity == 'Lean Democrat' + multiply: null + add: null + weight_overrides: + Existential threat: 0.08 + Serious threat: 0.28 + Moderate threat: 0.34 + Overstated threat: 0.22 + Not a threat: 0.08 + probability_override: null + - when: political_identity == 'Strong Democrat' + multiply: null + add: null + weight_overrides: + Existential threat: 0.05 + Serious threat: 0.18 + Moderate threat: 0.32 + Overstated threat: 0.3 + Not a threat: 0.15 + probability_override: null + - when: primary_info_source == 'Cable/broadcast TV news' + multiply: null + add: null + weight_overrides: + Existential threat: 0.24 + Serious threat: 0.4 + Moderate threat: 0.22 + Overstated threat: 0.1 + Not a threat: 0.04 + probability_override: null + - when: primary_info_source == 'Social media' + multiply: null + add: null + weight_overrides: + Existential threat: 0.14 + Serious threat: 0.26 + Moderate threat: 0.26 + Overstated threat: 0.2 + Not a threat: 0.14 + probability_override: null + - when: primary_info_source == 'Avoids news' + multiply: null + add: null + weight_overrides: + Existential threat: 0.1 + Serious threat: 0.2 + Moderate threat: 0.25 + Overstated threat: 0.22 + Not a threat: 0.23 + probability_override: null + - when: primary_info_source == 'Podcasts' + multiply: null + add: null + weight_overrides: + Existential threat: 0.14 + Serious threat: 0.28 + Moderate threat: 0.28 + Overstated threat: 0.2 + Not a threat: 0.1 + probability_override: null + - when: institutional_trust == 'High trust' + multiply: null + add: null + weight_overrides: + Existential threat: 0.22 + Serious threat: 0.4 + Moderate threat: 0.26 + Overstated threat: 0.09 + Not a threat: 0.03 + probability_override: null + - when: institutional_trust == 'Distrustful/Conspiratorial' + multiply: null + add: null + weight_overrides: + Existential threat: 0.16 + Serious threat: 0.22 + Moderate threat: 0.22 + Overstated threat: 0.24 + Not a threat: 0.16 + probability_override: null + grounding: + level: strong + method: researched + source: 'Marist/NPR/PBS June 2025 (n=1,381): 48% major threat, 39% minor threat, + 13% no threat. Fox News poll Jun 2025: 73% view Iran as security threat, 78% + concerned about nuclear capability. Chicago Council 2024: 53% call Iran nuclear + program a critical threat (down from 68% in 2010). Oklahoma NS 2024 survey: + 70% perceived moderate or higher nuclear conflict risk.' + note: Existential vs Serious distinction within the 48% 'major threat' bucket. + Republicans (64%) and older adults skew toward existential/serious; Democrats + (38%) and independents (45%) more mixed. Calibrated so ~48% total fall in existential+serious + matching Marist major threat finding. + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.01 + reason: Weights must sum to 1 +- name: portfolio_energy_exposure + type: categorical + category: population_specific + description: Degree to which personal investments are concentrated in energy, defense, + or crisis-sensitive sectors (High energy/defense exposure, Moderate exposure, + Diversified/low exposure, No investments). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - High energy/defense exposure + - Moderate exposure + - Diversified/low exposure + - No investments + weights: + - 0.07 + - 0.18 + - 0.3 + - 0.45 + formula: null + depends_on: + - investment_profile + - household_income + modifiers: + - when: investment_profile == 'No investments' + multiply: null + add: null + weight_overrides: + High energy/defense exposure: 0.02 + Moderate exposure: 0.04 + Diversified/low exposure: 0.04 + No investments: 0.9 + probability_override: null + - when: investment_profile == '401k/IRA only' + multiply: null + add: null + weight_overrides: + High energy/defense exposure: 0.06 + Moderate exposure: 0.22 + Diversified/low exposure: 0.62 + No investments: 0.1 + probability_override: null + - when: investment_profile == 'Diversified investor' + multiply: null + add: null + weight_overrides: + High energy/defense exposure: 0.18 + Moderate exposure: 0.45 + Diversified/low exposure: 0.34 + No investments: 0.03 + probability_override: null + - when: investment_profile == 'Active trader' + multiply: null + add: null + weight_overrides: + High energy/defense exposure: 0.38 + Moderate exposure: 0.4 + Diversified/low exposure: 0.18 + No investments: 0.04 + probability_override: null + - when: investment_profile == 'Crypto holder' + multiply: null + add: null + weight_overrides: + High energy/defense exposure: 0.14 + Moderate exposure: 0.26 + Diversified/low exposure: 0.38 + No investments: 0.22 + probability_override: null + - when: household_income >= 150000 + multiply: null + add: null + weight_overrides: + High energy/defense exposure: 0.22 + Moderate exposure: 0.42 + Diversified/low exposure: 0.32 + No investments: 0.04 + probability_override: null + - when: household_income < 40000 + multiply: null + add: null + weight_overrides: + High energy/defense exposure: 0.03 + Moderate exposure: 0.05 + Diversified/low exposure: 0.08 + No investments: 0.84 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Fed Survey of Consumer Finances 2022: ~55% of US adults have some investment + exposure (401k, IRA, brokerage). FINRA 2024 National Financial Capability Study: + ~53% own stocks or mutual funds. Energy sector represents ~4-5% of S&P 500; + most retail investors are broadly diversified. Active traders and crypto holders + more likely to have sector bets.' + note: No investments base rate ~45% from investment_profile distribution. High + energy/defense exposure concentrated among active traders and self-employed + in energy-adjacent industries. Modifier should align closely with investment_profile + (No investments -> No investments; 401k/IRA only -> mostly diversified/low; + active trader -> higher energy/defense probability). + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.01 + reason: Weights must sum to 1 +- name: war_escalation_fear + type: float + category: population_specific + description: Level of personal fear that the Iran conflict will escalate into a + broader regional or world war (0=no fear, 1=extreme fear). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: beta + alpha: 3.5 + beta: 2.0 + min: 0.0 + max: 1.0 + min_formula: null + max_formula: null + formula: null + depends_on: + - neuroticism + - iran_strike_approval + - military_connection + modifiers: + - when: neuroticism > 0.7 + multiply: 1.0 + add: 0.15 + weight_overrides: null + probability_override: null + - when: neuroticism < 0.3 + multiply: 1.0 + add: -0.12 + weight_overrides: null + probability_override: null + - when: iran_strike_approval == 'Strongly disapprove' + multiply: 1.0 + add: 0.22 + weight_overrides: null + probability_override: null + - when: iran_strike_approval == 'Somewhat disapprove' + multiply: 1.0 + add: 0.12 + weight_overrides: null + probability_override: null + - when: iran_strike_approval == 'Strongly approve' + multiply: 1.0 + add: -0.18 + weight_overrides: null + probability_override: null + - when: iran_strike_approval == 'Somewhat approve' + multiply: 1.0 + add: -0.08 + weight_overrides: null + probability_override: null + - when: military_connection == 'Active duty' + multiply: 1.0 + add: 0.1 + weight_overrides: null + probability_override: null + - when: military_connection == 'Immediate family member' + multiply: 1.0 + add: 0.14 + weight_overrides: null + probability_override: null + - when: military_connection == 'Veteran' + multiply: 1.0 + add: 0.05 + weight_overrides: null + probability_override: null + - when: military_connection == 'No connection' + multiply: 1.0 + add: 0.08 + weight_overrides: null + probability_override: null + grounding: + level: strong + method: researched + source: 'YouGov Jun 2025: 66% say bombing ''somewhat or very likely'' to lead + wider war. Marist/NPR/PBS Jun 2025: 75% concerned or very concerned about Iranian + retaliation. Reuters/Ipsos Jun 2025: 79% worried Iran may target US civilians, + 84% worried about the growing conflict. CBS/YouGov: bipartisan concern about + wider war.' + note: Beta(3.5, 2.0) yields mean ~0.636, reflecting the observed ~66-75% range + of elevated fear. Right-skewed toward higher fear, consistent with broad public + anxiety across partisan lines. Modifiers for neuroticism (upward), iran_strike_approval + (disapprovers more fearful), and military_connection (immediate family upward) + will adjust. + constraints: + - type: hard_min + value: 0.0 + expression: null + reason: Fear is bounded at zero + - type: hard_max + value: 1.0 + expression: null + reason: Fear is bounded at 1 +- name: reservist_or_national_guard + type: boolean + category: population_specific + description: Whether the individual is currently a US military reservist or National + Guard member subject to potential mobilization. + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: boolean + probability_true: 0.004 + formula: null + depends_on: + - age + - military_connection + modifiers: + - when: military_connection == 'Active duty' + multiply: null + add: null + weight_overrides: null + probability_override: 0.35 + - when: military_connection == 'Veteran' + multiply: null + add: null + weight_overrides: null + probability_override: 0.12 + - when: military_connection == 'Immediate family member' + multiply: null + add: null + weight_overrides: null + probability_override: 0.08 + - when: military_connection == 'Extended family/friend' + multiply: null + add: null + weight_overrides: null + probability_override: 0.04 + - when: military_connection == 'No connection' + multiply: null + add: null + weight_overrides: null + probability_override: 0.01 + - when: age > 55 + multiply: null + add: null + weight_overrides: null + probability_override: 0.01 + - when: age >= 18 and age <= 40 + multiply: null + add: null + weight_overrides: null + probability_override: 0.06 + - when: age > 60 + multiply: null + add: null + weight_overrides: null + probability_override: 0.0 + grounding: + level: strong + method: researched + source: 'DoD 2024 Demographics: ~765,000 total National Guard and Reserve personnel + (USAFacts). US adult population ~260M. 765,000/260,000,000 = ~0.29%. Adjusted + upward slightly to 0.4% to account for the 18-60 age band in this population + (restricting to mobilization-eligible adults).' + note: 'Extremely low base rate (~0.4% of adults). Must be conditioned on military_connection: + ''Active duty'' and ''Veteran'' have near-zero probability (already served or + serving differently); ''Immediate family member'' has elevated probability. + Age constraint: reservists must be under mandatory retirement age (~60). The + Pentagon calling up 30,000 reservists in Week 5 would affect this small slice.' + constraints: + - type: expression + value: null + expression: not (reservist_or_national_guard == True and age > 60) + reason: Mandatory retirement age for most reserve components is 60; very few serving + reservists are above 60 +- name: crisis_midterm_vote_shift + type: categorical + category: population_specific + description: Direction the Iran crisis has shifted the individual's midterm voting + intention compared to pre-crisis baseline (More Republican, Unchanged, More Democratic, + Disengaged/withdrawn). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - More Republican + - Unchanged + - More Democratic + - Disengaged/withdrawn + weights: + - 0.22 + - 0.4 + - 0.24 + - 0.14 + formula: null + depends_on: + - iran_strike_approval + - economic_anxiety + - political_identity + modifiers: + - when: iran_strike_approval == 'Strongly approve' + multiply: null + add: null + weight_overrides: + More Republican: 0.62 + Unchanged: 0.28 + More Democratic: 0.04 + Disengaged/withdrawn: 0.06 + probability_override: null + - when: iran_strike_approval == 'Somewhat approve' + multiply: null + add: null + weight_overrides: + More Republican: 0.35 + Unchanged: 0.45 + More Democratic: 0.1 + Disengaged/withdrawn: 0.1 + probability_override: null + - when: iran_strike_approval == 'Somewhat disapprove' + multiply: null + add: null + weight_overrides: + More Republican: 0.06 + Unchanged: 0.35 + More Democratic: 0.4 + Disengaged/withdrawn: 0.19 + probability_override: null + - when: iran_strike_approval == 'Strongly disapprove' + multiply: null + add: null + weight_overrides: + More Republican: 0.03 + Unchanged: 0.2 + More Democratic: 0.62 + Disengaged/withdrawn: 0.15 + probability_override: null + - when: iran_strike_approval == 'No opinion' + multiply: null + add: null + weight_overrides: + More Republican: 0.08 + Unchanged: 0.42 + More Democratic: 0.08 + Disengaged/withdrawn: 0.42 + probability_override: null + - when: economic_anxiety > 0.75 + multiply: null + add: null + weight_overrides: + More Republican: 0.14 + Unchanged: 0.24 + More Democratic: 0.38 + Disengaged/withdrawn: 0.24 + probability_override: null + - when: political_identity == 'True Independent' + multiply: null + add: null + weight_overrides: + More Republican: 0.14 + Unchanged: 0.3 + More Democratic: 0.2 + Disengaged/withdrawn: 0.36 + probability_override: null + - when: political_identity == 'Strong Republican' + multiply: null + add: null + weight_overrides: + More Republican: 0.55 + Unchanged: 0.35 + More Democratic: 0.03 + Disengaged/withdrawn: 0.07 + probability_override: null + - when: political_identity == 'Strong Democrat' + multiply: null + add: null + weight_overrides: + More Republican: 0.02 + Unchanged: 0.22 + More Democratic: 0.68 + Disengaged/withdrawn: 0.08 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Historical analogs: rally-around-the-flag effects post-military action + (Iraq 2003, post-9/11) typically boost incumbent party 5-10 points initially, + then decay as economic costs mount. At Week 8-12 with 8.5% inflation, consumer + confidence at 2008 lows, and 400K+ job losses, economic backlash typically dominates. + Gallup/Pew historical data on economic voting and war fatigue.' + note: 'Base distribution at Week 8-12 reflects decayed rally effect and rising + economic discontent. Strong modifiers: iran_strike_approval (strongly approve + -> More Republican; strongly disapprove -> More Democratic), economic_anxiety + (high anxiety -> More Democratic or Disengaged), political_identity (strong + partisans unchanged or reinforced). ''Disengaged/withdrawn'' captures war-weary + depressors of turnout.' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.01 + reason: Weights must sum to 1 +- name: protest_participation_propensity + type: categorical + category: population_specific + description: Likelihood of participating in anti-war or pro-strike public demonstrations + in response to the crisis (Very likely, Somewhat likely, Unlikely, Would not participate). + scope: individual + semantic_type: null + identity_type: null + display_format: null + sampling: + strategy: conditional + distribution: + type: categorical + options: + - Very likely + - Somewhat likely + - Unlikely + - Would not participate + weights: + - 0.06 + - 0.12 + - 0.24 + - 0.58 + formula: null + depends_on: + - political_engagement_level + - iran_strike_approval + - extraversion + modifiers: + - when: political_engagement_level == 'Highly engaged partisan' + multiply: null + add: null + weight_overrides: + Very likely: 0.28 + Somewhat likely: 0.3 + Unlikely: 0.24 + Would not participate: 0.18 + probability_override: null + - when: political_engagement_level == 'Moderate/occasional participant' + multiply: null + add: null + weight_overrides: + Very likely: 0.08 + Somewhat likely: 0.18 + Unlikely: 0.38 + Would not participate: 0.36 + probability_override: null + - when: political_engagement_level == 'Single-issue voter' + multiply: null + add: null + weight_overrides: + Very likely: 0.05 + Somewhat likely: 0.12 + Unlikely: 0.34 + Would not participate: 0.49 + probability_override: null + - when: political_engagement_level == 'Disengaged' + multiply: null + add: null + weight_overrides: + Very likely: 0.02 + Somewhat likely: 0.05 + Unlikely: 0.2 + Would not participate: 0.73 + probability_override: null + - when: iran_strike_approval == 'Strongly disapprove' + multiply: null + add: null + weight_overrides: + Very likely: 0.22 + Somewhat likely: 0.28 + Unlikely: 0.28 + Would not participate: 0.22 + probability_override: null + - when: iran_strike_approval == 'Strongly approve' + multiply: null + add: null + weight_overrides: + Very likely: 0.1 + Somewhat likely: 0.16 + Unlikely: 0.28 + Would not participate: 0.46 + probability_override: null + - when: iran_strike_approval == 'No opinion' + multiply: null + add: null + weight_overrides: + Very likely: 0.02 + Somewhat likely: 0.06 + Unlikely: 0.24 + Would not participate: 0.68 + probability_override: null + - when: extraversion > 0.7 + multiply: null + add: null + weight_overrides: + Very likely: 0.18 + Somewhat likely: 0.26 + Unlikely: 0.3 + Would not participate: 0.26 + probability_override: null + - when: extraversion < 0.3 + multiply: null + add: null + weight_overrides: + Very likely: 0.04 + Somewhat likely: 0.1 + Unlikely: 0.28 + Would not participate: 0.58 + probability_override: null + grounding: + level: medium + method: extrapolated + source: 'Pew Research 2020: ~6% of US adults attended a protest in past year. + BLM peak 2020 saw ~15-26M participants (upper bound). Anti-Iraq War protests + 2003 drew ~500K-3M total. Anti-war sentiment post-Iran strikes produced protests + in major cities (scenario text). Typical protest participation in US: 5-10% + of adults in high-salience events.' + note: 'Base ~18% ''likely'' (very+somewhat) is elevated above peacetime baseline, + reflecting the high salience of the Iran conflict. Both anti-war protesters + (disapprovers) and pro-strike ralliers (approvers) contribute. Key modifiers: + political_engagement_level (highly engaged partisan -> much higher propensity), + iran_strike_approval (strong disapprovers lean anti-war protest), extraversion + (higher extraversion -> more likely to attend).' + constraints: + - type: spec_expression + value: null + expression: abs(sum(weights) - 1.0) < 0.01 + reason: Weights must sum to 1 +household_config: + age_brackets: + - - 21 + - 18-20 + - - 30 + - 21-29 + - - 45 + - 30-44 + - - 65 + - 45-64 + - - 999 + - 65-80 + household_type_weights: + 18-20: + single: 0.88 + couple: 0.06 + single_parent: 0.01 + couple_with_kids: 0.0 + multi_generational: 0.05 + 21-29: + single: 0.53 + couple: 0.24 + single_parent: 0.06 + couple_with_kids: 0.05 + multi_generational: 0.12 + 30-44: + single: 0.22 + couple: 0.22 + single_parent: 0.14 + couple_with_kids: 0.36 + multi_generational: 0.06 + 45-64: + single: 0.28 + couple: 0.4 + single_parent: 0.08 + couple_with_kids: 0.14 + multi_generational: 0.1 + 65-80: + single: 0.38 + couple: 0.48 + single_parent: 0.03 + couple_with_kids: 0.02 + multi_generational: 0.09 + same_group_rates: + white: 0.91 + black: 0.83 + hispanic: 0.82 + asian: 0.79 + native_american: 0.54 + multiracial: 0.38 + default_same_group_rate: 0.72 + same_country_rate: 0.95 + assortative_mating: + education_level: 0.64 + household_income: 0.6 + political_identity: 0.72 + religious_engagement: 0.71 + race_ethnicity: 0.85 + urban_rural: 0.68 + us_region: 0.74 + age: 0.78 + institutional_trust: 0.58 + vote_2024_presidential: 0.76 + primary_info_source: 0.55 + social_media_behavior: 0.48 + tech_adoption_posture: 0.45 + risk_tolerance: 0.42 + consumer_identity: 0.4 + openness: 0.35 + conscientiousness: 0.38 + agreeableness: 0.36 + neuroticism: 0.32 + extraversion: 0.3 + has_children: 0.8 + marital_status: 0.88 + employment_sector: 0.34 + financial_margin: 0.52 + economic_anxiety: 0.56 + investment_profile: 0.5 + mideast_policy_hawkishness: 0.65 + iran_strike_approval: 0.68 + war_escalation_fear: 0.6 + nuclear_iran_threat_perception: 0.62 + top_issue_2026: 0.55 + midterm_turnout_propensity: 0.58 + political_engagement_level: 0.54 + military_connection: 0.62 + reservist_or_national_guard: 0.7 + energy_cost_burden: 0.46 + supply_chain_job_exposure: 0.38 + portfolio_energy_exposure: 0.44 + job_security_perception: 0.41 + crisis_midterm_vote_shift: 0.58 + country_direction_approval: 0.66 + protest_participation_propensity: 0.5 + congressional_district_competitiveness: 0.72 + daily_commute_miles: 0.45 + household_size: 0.65 + partner_gender_mode: weighted + partner_gender_pair_weights: + - left: Male + right: Female + weight: 0.931 + - left: Male + right: Male + weight: 0.031 + - left: Female + right: Female + weight: 0.028 + - left: Male + right: Non-binary/Other + weight: 0.005 + - left: Female + right: Non-binary/Other + weight: 0.005 + partner_age_gap_mean: -2.3 + partner_age_gap_std: 4.8 + min_adult_age: 21 + min_agent_age: 13 + child_min_parent_offset: 18 + child_max_parent_offset: 45 + max_dependent_child_age: 17 + elderly_min_offset: 20 + elderly_max_offset: 45 + max_elderly_dependent_age: 105 + life_stages: + - max_age: 5 + label: preschool + - max_age: 11 + label: elementary + - max_age: 14 + label: middle_school + - max_age: 18 + label: high_school + adult_stage_label: adult + avg_household_size: 2.51 +agent_focus_mode: couples +identity_dimensions: +- dimension: political_orientation + relevance: The strikes and their aftermath are immediately and intensely partisan + — Republicans and Democrats are actively constructing competing narratives about + whether the war was justified and who is to blame for the economic fallout, with + the 2026 midterms making political identity a primary lens through which every + development is processed. +- dimension: religious_affiliation + relevance: The conflict involves a predominantly Muslim nation and activates faith-based + moral frameworks around just war, civilian harm, and solidarity — particularly + for American Muslims and Iranian-Americans with religious ties, as well as Christian, + Jewish, and other communities with differing theological views on military force + and Middle East geopolitics. +- dimension: race_ethnicity + relevance: Iranian-Americans and Arab-Americans face heightened vulnerability to + xenophobia, profiling, and social hostility during a hot conflict with Iran, while + broader Middle Eastern and Muslim communities may experience collective identity + threat; racial disparities in economic burden (e.g., food and fuel price spikes) + also disproportionately impact communities of color. +- dimension: citizenship + relevance: Iranian nationals, dual citizens, and Iranian-Americans face acute identity + threat around national loyalty, potential visa or travel restrictions, family + separation from relatives in Iran, and the conflation of ethnic/national origin + with enemy status — a historically recurring dynamic in US wartime. +- dimension: socioeconomic_class + relevance: The energy and food price shocks ($6.20+/gallon gas, 15% food price increases, + 400,000 job losses) fall most heavily on working-class and lower-income Americans + for whom fuel and groceries represent a large share of household budgets, making + class identity a sharp fault line in how the crisis is experienced and resented. +- dimension: professional_identity + relevance: Military service members and their families face direct life-and-death + stakes (23 killed, 47,000+ reservists called up); truckers, airline workers, energy + sector employees, and supply chain workers face job losses and surcharges that + threaten their occupational identity and livelihood; and foreign policy, intelligence, + and diplomatic professionals face questions about institutional competence and + moral responsibility. +- dimension: parental_status + relevance: Parents of active-duty service members and reservists face existential + fear as 30,000 reservists are called up and casualties mount; parents more broadly + are activated by anxiety over the economic future their children will inherit, + including 8.5% inflation and an $800 billion crisis cost. +- dimension: generational_identity + relevance: Younger Americans (Gen Z, younger Millennials) who have no adult memory + of pre-post-9/11 'forever war' fatigue are confronting a new major conflict during + a period of already-elevated economic precarity, while older generations (Boomers, + older Gen X) filter the crisis through Cold War, Gulf War, or Iraq War frameworks + — producing sharply different intuitions about necessity, risk, and acceptable + cost. +sampling_semantic_roles: + marital_roles: + attr: marital_status + partnered_values: + - Married/partnered + single_values: + - Single + - Divorced/separated + - Widowed + geo_roles: + country_attr: country + region_attr: us_region + urbanicity_attr: urban_rural + partner_correlation_roles: + race_ethnicity: same_group_rate + education_level: same_group_rate + religious_engagement: same_group_rate + political_identity: same_group_rate + school_parent_role: + dependents_attr: has_children + school_age_values: [] + religion_roles: + religion_attr: religious_engagement + secular_values: + - Secular/None + household_roles: + household_size_attr: household_size diff --git a/examples/study.db b/examples/study.db deleted file mode 100644 index b9c7c14..0000000 Binary files a/examples/study.db and /dev/null differ diff --git a/extropy/cli/app.py b/extropy/cli/app.py index e9ebd42..fa6dc90 100644 --- a/extropy/cli/app.py +++ b/extropy/cli/app.py @@ -90,14 +90,6 @@ def _print_cost_footer() -> None: @app.callback() def main_callback( - json_output: Annotated[ - bool, - typer.Option( - "--json", - help="Output machine-readable JSON instead of human-friendly text", - is_eager=True, - ), - ] = False, version: Annotated[ bool, typer.Option( @@ -126,12 +118,11 @@ def main_callback( ): """Extropy: Population simulation engine for agent-based modeling. - Use --json for machine-readable output suitable for scripting and AI tools. Use --cost to show token usage and cost summary after each command. Use --study to specify a study folder (otherwise auto-detected from cwd). """ global _json_mode, _show_cost, _study_path - _json_mode = json_output + _json_mode = False _study_path = study # Determine if cost footer should be shown: --cost flag or config setting diff --git a/extropy/cli/commands/estimate.py b/extropy/cli/commands/estimate.py index 17e382f..44e591f 100644 --- a/extropy/cli/commands/estimate.py +++ b/extropy/cli/commands/estimate.py @@ -7,7 +7,7 @@ from ..utils import Output, ExitCode -@app.command("estimate") +@app.command("estimate", hidden=True) def estimate_command( scenario: str = typer.Option( None, @@ -43,6 +43,15 @@ def estimate_command( extropy estimate -s ai-adoption --strong openai/gpt-5 extropy estimate -s ai-adoption --strong openai/gpt-5 --fast openai/gpt-5-mini -v """ + out = Output(console=console) + out.error( + "Estimate is temporarily disabled pending timeline-aware convergence parity. See issue #112.", + exit_code=ExitCode.VALIDATION_ERROR, + ) + raise typer.Exit(out.finish()) + + # NOTE: Existing estimator implementation is intentionally retained below + # (temporarily unreachable) while #112 is addressed. from ...config import get_config from ...core.models import ScenarioSpec, PopulationSpec from ...simulation.estimator import estimate_simulation_cost diff --git a/extropy/cli/commands/network.py b/extropy/cli/commands/network.py index 02247c7..d4f85eb 100644 --- a/extropy/cli/commands/network.py +++ b/extropy/cli/commands/network.py @@ -297,7 +297,7 @@ def network_command( and checkpoint.expanduser().resolve() != study_db.expanduser().resolve() ): out.error("--checkpoint must point to the same canonical file as study.db") - raise typer.Exit(1) + raise typer.Exit(out.finish()) checkpoint_db = study_db if (resume_requested or checkpoint is not None) else None # Load agents @@ -603,7 +603,10 @@ def do_generation(): console.print(f" Largest Component: {metrics.largest_component_ratio:.1%}") console.print(f" Degree Assortativity: {metrics.degree_assortativity:.3f}") - is_valid, warnings = metrics.is_valid() + quality_bounds = (result.meta.get("quality", {}) or {}).get("bounds", {}) + is_valid, warnings = metrics.is_valid( + bounds=quality_bounds if quality_bounds else None + ) console.print() if is_valid: console.print("[green]✓[/green] All metrics within expected ranges") @@ -682,6 +685,7 @@ def do_generation(): f"{scenario_name}__{config.quarantine_suffix}__{network_run_id[:12]}" ) gate_deltas = quality_meta.get("gate_deltas", {}) + final_metrics = quality_meta.get("final_metrics", {}) out.error( "Topology gate strict failed. Saved quarantined artifact; canonical network not overwritten." ) @@ -690,8 +694,12 @@ def do_generation(): f"[yellow]![/yellow] Quarantined network_id={target_network_id}" ) console.print( - f"[red]✗[/red] Failed gates with best metrics: {quality_meta.get('best_metrics', {})}" + f"[red]✗[/red] Failed gates with final metrics: {final_metrics}" ) + if quality_meta.get("best_metrics"): + console.print( + f"[dim]Calibration best metrics: {quality_meta.get('best_metrics', {})}[/dim]" + ) if gate_deltas: console.print(f"[dim]Gate deltas: {gate_deltas}[/dim]") console.print( diff --git a/extropy/cli/commands/persona.py b/extropy/cli/commands/persona.py index 1e9d851..61eaf0d 100644 --- a/extropy/cli/commands/persona.py +++ b/extropy/cli/commands/persona.py @@ -12,7 +12,14 @@ from ...core.models.scenario import ScenarioSpec from ..app import app, console, is_agent_mode, get_study_path from ..study import StudyContext, detect_study_folder, resolve_scenario -from ..utils import format_elapsed, Output, ExitCode +from ..utils import ( + format_elapsed, + Output, + ExitCode, + format_validation_for_json, + get_next_invalid_artifact_path, + save_invalid_json_artifact, +) @app.command("persona") @@ -71,6 +78,7 @@ def persona_command( from ...population.persona import ( generate_persona_config, PersonaConfigError, + validate_persona_config, ) from ...core.cost.tracker import CostTracker @@ -229,8 +237,45 @@ def do_generation(): gen_elapsed = time.time() - gen_start if gen_error: - out.error(f"Failed to generate persona config: {gen_error}") - raise typer.Exit(3) + invalid_path = save_invalid_json_artifact( + { + "stage": "persona", + "scenario": scenario_name, + "error": str(gen_error), + }, + persona_path.with_suffix(".json"), + stem=persona_path.stem, + extension=".json", + ) + out.error( + f"Failed to generate persona config: {gen_error}. Saved: {invalid_path}", + exit_code=ExitCode.VALIDATION_ERROR, + ) + raise typer.Exit(out.finish()) + + validation_result = validate_persona_config(merged_spec, config) + out.set_data("validation", format_validation_for_json(validation_result)) + if validation_result.errors: + invalid_path = get_next_invalid_artifact_path(persona_path) + config.to_yaml(invalid_path) + out.error( + f"Persona config validation failed ({len(validation_result.errors)} errors). Saved: {invalid_path}", + exit_code=ExitCode.VALIDATION_ERROR, + ) + if not agent_mode: + for err in validation_result.errors[:10]: + console.print(f"[red]✗[/red] {err.location}: {err.message}") + if len(validation_result.errors) > 10: + console.print( + f"[dim]... and {len(validation_result.errors) - 10} more[/dim]" + ) + raise typer.Exit(out.finish()) + if validation_result.warnings and not agent_mode: + console.print( + f"[yellow]⚠[/yellow] Persona validation warnings: {len(validation_result.warnings)}" + ) + for warn in validation_result.warnings[:5]: + console.print(f" [dim]- {warn.location}: {warn.message}[/dim]") if not agent_mode: console.print( diff --git a/extropy/cli/commands/sample.py b/extropy/cli/commands/sample.py index 2eb1c44..c6a5589 100644 --- a/extropy/cli/commands/sample.py +++ b/extropy/cli/commands/sample.py @@ -8,6 +8,7 @@ from ...core.models import PopulationSpec from ...core.models.scenario import ScenarioSpec from ...population.validator import validate_spec +from ...utils import topological_sort, CircularDependencyError from ..app import app, console, is_agent_mode, get_study_path from ..study import StudyContext, detect_study_folder, resolve_scenario from ..utils import ( @@ -16,6 +17,7 @@ format_elapsed, format_validation_for_json, format_sampling_stats_for_json, + save_invalid_json_artifact, ) @@ -42,6 +44,11 @@ def sample_command( skip_validation: bool = typer.Option( False, "--skip-validation", help="Skip validator errors" ), + strict_gates: bool = typer.Option( + False, + "--strict-gates", + help="Fail on high-risk warnings and post-sampling coherence gate violations", + ), ): """ Sample agents from a scenario's merged population spec. @@ -135,11 +142,34 @@ def sample_command( extended_attrs = scenario_spec.extended_attributes or [] merged_attributes.extend(extended_attrs) - # Compute merged sampling order - merged_sampling_order = list(pop_spec.sampling_order) - for attr in extended_attrs: - if attr.name not in merged_sampling_order: - merged_sampling_order.append(attr.name) + # Compute merged sampling order deterministically via topological sort + try: + merged_deps: dict[str, list[str]] = { + attr.name: list(attr.sampling.depends_on or []) + for attr in merged_attributes + } + merged_names = set(merged_deps.keys()) + merged_deps = { + name: [dep for dep in deps if dep in merged_names] + for name, deps in merged_deps.items() + } + merged_sampling_order = topological_sort(merged_deps) + except CircularDependencyError as e: + invalid_path = save_invalid_json_artifact( + { + "stage": "sample", + "scenario": scenario_name, + "error": f"merged_sampling_order_cycle: {e}", + }, + study_ctx.get_scenario_dir(scenario_name) / "sample.json", + stem="sample", + extension=".json", + ) + out.error( + f"Merged sampling order has circular dependency: {e}. Saved: {invalid_path}", + exit_code=ExitCode.VALIDATION_ERROR, + ) + raise typer.Exit(out.finish()) # Create merged spec for sampling merged_spec = PopulationSpec( @@ -152,6 +182,7 @@ def sample_command( # Get household config and agent focus mode from scenario household_config = scenario_spec.household_config agent_focus_mode = scenario_spec.agent_focus_mode + sampling_semantic_roles = scenario_spec.sampling_semantic_roles out.success( f"Loaded scenario: [bold]{scenario_name}[/bold] " @@ -160,6 +191,7 @@ def sample_command( base_population=f"{pop_name}.v{pop_version}", attribute_count=len(merged_attributes), agent_count=count, + strict_gates=strict_gates, ) # Validation Gate @@ -178,8 +210,19 @@ def sample_command( f"Spec has {len(validation_result.errors)} error(s) - skipping validation" ) else: + invalid_path = save_invalid_json_artifact( + { + "stage": "sample", + "scenario": scenario_name, + "error": "merged_spec_validation_failed", + "validation": format_validation_for_json(validation_result), + }, + study_ctx.get_scenario_dir(scenario_name) / "sample.json", + stem="sample", + extension=".json", + ) out.error( - f"Merged spec has {len(validation_result.errors)} error(s)", + f"Merged spec has {len(validation_result.errors)} error(s). Saved: {invalid_path}", exit_code=ExitCode.VALIDATION_ERROR, ) if not agent_mode: @@ -200,6 +243,38 @@ def sample_command( else: out.success("Spec validated") + if strict_gates: + strict_warning_categories = {"CONDITION_VALUE", "MODIFIER_OVERLAP"} + promoted = [ + warn + for warn in (validation_result.warnings or []) + if warn.category in strict_warning_categories + ] + if promoted: + invalid_path = save_invalid_json_artifact( + { + "stage": "sample", + "scenario": scenario_name, + "error": "strict_gate_pre_sample_failed", + "promoted_warnings": [ + { + "location": w.location, + "category": w.category, + "message": w.message, + } + for w in promoted + ], + }, + study_ctx.get_scenario_dir(scenario_name) / "sample.json", + stem="sample", + extension=".json", + ) + out.error( + f"Strict gate blocked sampling due to high-risk warnings ({len(promoted)}). Saved: {invalid_path}", + exit_code=ExitCode.VALIDATION_ERROR, + ) + raise typer.Exit(out.finish()) + # Sampling out.blank() sampling_start = time.time() @@ -238,6 +313,7 @@ def on_progress(current: int, total: int): on_progress=on_progress, household_config=household_config, agent_focus_mode=agent_focus_mode, + semantic_roles=sampling_semantic_roles, ) except SamplingError as e: sampling_error = e @@ -251,6 +327,7 @@ def on_progress(current: int, total: int): seed=seed, household_config=household_config, agent_focus_mode=agent_focus_mode, + semantic_roles=sampling_semantic_roles, ) except SamplingError as e: sampling_error = e @@ -262,13 +339,24 @@ def on_progress(current: int, total: int): seed=seed, household_config=household_config, agent_focus_mode=agent_focus_mode, + semantic_roles=sampling_semantic_roles, ) except SamplingError as e: sampling_error = e if sampling_error: + invalid_path = save_invalid_json_artifact( + { + "stage": "sample", + "scenario": scenario_name, + "error": str(sampling_error), + }, + study_ctx.get_scenario_dir(scenario_name) / "sample.json", + stem="sample", + extension=".json", + ) out.error( - f"Sampling failed: {sampling_error}", + f"Sampling failed: {sampling_error}. Saved: {invalid_path}", exit_code=ExitCode.SAMPLING_ERROR, suggestion="Check attribute dependencies and formula syntax", ) @@ -282,6 +370,36 @@ def on_progress(current: int, total: int): sampling_time_seconds=sampling_elapsed, ) + # Post-sampling deterministic rule-pack gate + rule_pack = _evaluate_rule_pack(result, strict_gates=strict_gates) + result.stats.rule_pack = rule_pack + out.set_data("rule_pack", rule_pack) + gate_failed = rule_pack["status"] == "fail" + if gate_failed: + invalid_path = save_invalid_json_artifact( + { + "stage": "sample", + "scenario": scenario_name, + "error": "post_sample_rule_pack_failed", + "rule_pack": rule_pack, + "reconciliation_counts": result.stats.reconciliation_counts, + "constraint_violations": result.stats.constraint_violations, + "condition_warnings": result.stats.condition_warnings, + }, + study_ctx.get_scenario_dir(scenario_name) / "sample.json", + stem="sample", + extension=".json", + ) + out.error( + f"Post-sampling quality gate failed. Saved: {invalid_path}", + exit_code=ExitCode.SAMPLING_ERROR, + ) + raise typer.Exit(out.finish()) + if rule_pack.get("status") == "warn": + out.warning( + rule_pack.get("summary", "Sampling completed with plausibility warnings") + ) + # Report if agent_mode or report: out.set_data("stats", format_sampling_stats_for_json(result.stats, merged_spec)) @@ -333,6 +451,51 @@ def on_progress(current: int, total: int): raise typer.Exit(out.finish()) +def _evaluate_rule_pack(result, *, strict_gates: bool) -> dict: + """Evaluate deterministic impossible/implausible gates on sampled output.""" + total_agents = max(1, len(result.agents)) + impossible_count = sum(result.stats.constraint_violations.values()) + implausible_count = sum(result.stats.reconciliation_counts.values()) + implausible_rate = implausible_count / total_agents + + if strict_gates and result.stats.condition_warnings: + return { + "status": "fail", + "summary": "Condition-evaluation warnings present in strict mode", + "impossible_count": impossible_count, + "implausible_count": implausible_count, + "implausible_rate": implausible_rate, + "condition_warning_count": len(result.stats.condition_warnings), + } + + if impossible_count > 0: + return { + "status": "fail", + "summary": "Impossible rule violations detected", + "impossible_count": impossible_count, + "implausible_count": implausible_count, + "implausible_rate": implausible_rate, + } + + if implausible_rate > 0.05: + status = "fail" + summary = "Implausible reconciliation rate exceeds 5%" + elif implausible_rate >= 0.01: + status = "warn" + summary = "Implausible reconciliation rate between 1% and 5%" + else: + status = "pass" + summary = "Rule-pack checks passed" + + return { + "status": status, + "summary": summary, + "impossible_count": impossible_count, + "implausible_count": implausible_count, + "implausible_rate": implausible_rate, + } + + def _save_to_db( db_path: Path, scenario_name: str, diff --git a/extropy/cli/commands/scenario.py b/extropy/cli/commands/scenario.py index 0ae9d70..bc8a4a1 100644 --- a/extropy/cli/commands/scenario.py +++ b/extropy/cli/commands/scenario.py @@ -22,7 +22,13 @@ parse_population_ref, ) from ..display import display_extend_attributes -from ..utils import format_elapsed, Output, ExitCode +from ..utils import ( + format_elapsed, + Output, + ExitCode, + get_next_invalid_artifact_path, + save_invalid_json_artifact, +) @app.command("scenario") @@ -184,19 +190,12 @@ def scenario_command( questions = sufficiency_result.questions if agent_mode: - out.error( - "Scenario description insufficient", - exit_code=ExitCode.CLARIFICATION_NEEDED, - questions=[ - { - "id": q.id, - "question": q.question, - "type": q.type, - "options": q.options, - "default": q.default, - } - for q in questions - ], + resume_cmd = ( + f'extropy scenario "{description}" -o {scenario_name} --use-defaults' + ) + out.needs_clarification( + questions=questions, + resume_command=resume_cmd, ) raise typer.Exit(out.finish()) @@ -299,6 +298,23 @@ def do_selection(): out.error(f"Attribute selection failed: {selection_error}") raise typer.Exit(1) + if not new_attributes: + invalid_path = save_invalid_json_artifact( + { + "stage": "scenario", + "error": "No scenario-specific extended attributes discovered", + "description": description, + "base_population": f"population.v{pop_version}", + }, + scenario_path, + extension=".json", + ) + out.error( + f"Scenario requires non-empty extended_attributes. Saved: {invalid_path}", + exit_code=ExitCode.SCENARIO_ERROR, + ) + raise typer.Exit(out.finish()) + if not agent_mode: console.print( f"[green]✓[/green] Found {len(new_attributes)} NEW attributes ({format_elapsed(selection_elapsed)})" @@ -349,25 +365,17 @@ def on_progress(step: str, status: str, count: int | None): current_step[1] = status household_config = None - name_config = None def do_hydration(): - nonlocal \ - hydrated, \ - sources, \ - warnings, \ - hydration_error, \ - household_config, \ - name_config + nonlocal hydrated, sources, warnings, hydration_error, household_config try: - hydrated, sources, warnings, household_config, name_config = ( - hydrate_attributes( - attributes=new_attributes, - description=f"{pop_spec.meta.description} + {description}", - geography=pop_spec.meta.geography, - context=pop_spec.attributes, - on_progress=on_progress, - ) + hydrated, sources, warnings, household_config = hydrate_attributes( + attributes=new_attributes, + description=f"{pop_spec.meta.description} + {description}", + geography=pop_spec.meta.geography, + context=pop_spec.attributes, + include_household=True, + on_progress=on_progress, ) except Exception as e: hydration_error = e @@ -435,6 +443,7 @@ def do_hydration(): # - Scenario configuration (event, exposure, outcomes) will be generated on demand from ...scenario import create_scenario_spec + from ...scenario.validator import validate_scenario if not agent_mode: console.print() @@ -454,15 +463,20 @@ def run_pipeline(): nonlocal result_spec, validation_result, pipeline_error try: timeline_mode = None if timeline == "auto" else timeline + resolved_timestep_unit = ( + timestep_unit or sufficiency_result.inferred_timestep_unit + ) # We need to create a merged spec first to pass to scenario creation # For now, create scenario without agents (they'll be sampled later) result_spec, validation_result = create_scenario_spec( description=description, population_spec=pop_spec, extended_attributes=bound_attrs, + household_config=household_config, + agent_focus_mode=sufficiency_result.inferred_agent_focus_mode, on_progress=on_scenario_progress, timeline_mode=timeline_mode, - timestep_unit_override=timestep_unit, + timestep_unit_override=resolved_timestep_unit, max_timesteps_override=max_timesteps, ) except Exception as e: @@ -482,6 +496,20 @@ def run_pipeline(): time.sleep(0.1) if pipeline_error: + invalid_path = save_invalid_json_artifact( + { + "stage": "scenario", + "error": str(pipeline_error), + "description": description, + "base_population": f"population.v{pop_version}", + }, + scenario_path, + extension=".json", + ) + if not agent_mode: + console.print( + f"[yellow]⚠[/yellow] Scenario invalid artifact saved: [bold]{invalid_path}[/bold]" + ) out.error(f"Scenario creation failed: {pipeline_error}") raise typer.Exit(1) @@ -491,9 +519,16 @@ def run_pipeline(): # Set metadata result_spec.meta.name = scenario_name result_spec.meta.base_population = f"population.v{pop_version}" - result_spec.extended_attributes = bound_attrs - result_spec.household_config = household_config - result_spec.agent_focus_mode = sufficiency_result.inferred_agent_focus_mode + + # Re-validate after metadata finalization. + # The initial validation occurs inside create_scenario_spec before CLI-level + # metadata (including base_population) is attached. + validation_result = validate_scenario( + spec=result_spec, + population_spec=pop_spec, + agent_count=None, + network=None, + ) # Display Summary if not agent_mode: @@ -501,14 +536,14 @@ def run_pipeline(): # Validation if validation_result and validation_result.errors: - invalid_path = scenario_path.with_suffix(".invalid.yaml") + invalid_path = get_next_invalid_artifact_path(scenario_path) result_spec.to_yaml(invalid_path) if not agent_mode: console.print( f"[yellow]⚠[/yellow] Scenario saved to [bold]{invalid_path}[/bold] for review" ) - out.error("Scenario validation failed") - raise typer.Exit(1) + out.error("Scenario validation failed", exit_code=ExitCode.SCENARIO_ERROR) + raise typer.Exit(out.finish()) # Human Checkpoint #2 if not agent_mode and not yes: @@ -686,7 +721,7 @@ def _display_scenario_summary(spec) -> None: if spec.seed_exposure: console.print("[bold]Exposure Channels:[/bold]") for ch in spec.seed_exposure.channels: - console.print(f" - {ch.name} ({ch.reach})") + console.print(f" - {ch.name}") console.print() # Extended attributes diff --git a/extropy/cli/commands/spec.py b/extropy/cli/commands/spec.py index fc0903f..616cec6 100644 --- a/extropy/cli/commands/spec.py +++ b/extropy/cli/commands/spec.py @@ -30,7 +30,12 @@ display_spec_summary, display_validation_result, ) -from ..utils import format_elapsed, Output, ExitCode +from ..utils import ( + format_elapsed, + Output, + ExitCode, + get_next_invalid_artifact_path, +) @app.command("spec") @@ -272,12 +277,10 @@ def spec_command( raise typer.Exit(1) geography = sufficiency_result.geography - agent_focus = sufficiency_result.agent_focus geo_str = f", {geography}" if geography else "" - focus_str = f", focus: {agent_focus}" if agent_focus else "" if not agent_mode: - console.print(f"[green]✓[/green] Context sufficient{geo_str}{focus_str}") + console.print(f"[green]✓[/green] Context sufficient{geo_str}") # Step 1: Attribute Selection console.print() @@ -352,17 +355,18 @@ def on_progress(step: str, status: str, count: int | None): current_step[0] = step current_step[1] = status - name_config = None - def do_hydration(): - nonlocal hydrated, sources, warnings, hydration_error, name_config + nonlocal hydrated, sources, warnings, hydration_error try: - hydrated, sources, warnings, _household_config, name_config = ( - hydrate_attributes( - attributes, description, geography, on_progress=on_progress - ) + hydrated, sources, warnings, _household_config = hydrate_attributes( + attributes, + description, + geography, + include_household=False, + on_progress=on_progress, ) - # Note: household_config is ignored at spec level - it's set per-scenario + # Spec stage intentionally does not hydrate household config. + # Household policy is scenario-owned; names are Faker-first at sampler runtime. except Exception as e: hydration_error = e finally: @@ -424,8 +428,6 @@ def do_hydration(): attributes=bound_attrs, sampling_order=sampling_order, sources=sources, - agent_focus=agent_focus, - name_config=name_config, ) console.print("[green]✓[/green] Spec assembled") @@ -435,8 +437,7 @@ def do_hydration(): validation_result = validate_spec(population_spec) if not display_validation_result(validation_result): - # Save with .invalid.yaml suffix so work isn't lost - invalid_path = resolved_output.with_suffix(".invalid.yaml") + invalid_path = get_next_invalid_artifact_path(resolved_output) population_spec.to_yaml(invalid_path) console.print() console.print( @@ -473,7 +474,6 @@ def do_hydration(): "Spec saved", output=str(resolved_output), geography=geography, - agent_focus=agent_focus, attribute_count=len(population_spec.attributes), elapsed_seconds=elapsed, study_folder=str(study_ctx.root) if study_ctx else None, diff --git a/extropy/cli/commands/validate.py b/extropy/cli/commands/validate.py index 5d46ce9..8ef9bc5 100644 --- a/extropy/cli/commands/validate.py +++ b/extropy/cli/commands/validate.py @@ -9,6 +9,7 @@ from ...population.validator import validate_spec from ..app import app, console, get_json_mode, is_agent_mode from ..utils import Output, ExitCode, format_validation_for_json +from ...utils import topological_sort def _is_json_output() -> bool: @@ -16,9 +17,14 @@ def _is_json_output() -> bool: return get_json_mode() or is_agent_mode() +def _strip_invalid_suffix(name: str) -> str: + """Strip versioned invalid artifact suffix from YAML filename.""" + return re.sub(r"\.invalid\.v\d+(?=\.ya?ml$)", "", name) + + def _is_scenario_file(path: Path) -> bool: """Check if file is a scenario spec based on naming convention.""" - name = path.name + name = _strip_invalid_suffix(path.name) # Legacy patterns if name.endswith(".scenario.yaml") or name.endswith(".scenario.yml"): return True @@ -30,6 +36,47 @@ def _is_scenario_file(path: Path) -> bool: return False +def _is_persona_file(path: Path) -> bool: + """Check if file is a persona config based on naming convention.""" + name = _strip_invalid_suffix(path.name) + if name in {"persona.yaml", "persona.yml"}: + return True + if re.match(r"^persona\.v\d+\.ya?ml$", name): + return True + return False + + +def _canonical_yaml_path_for_invalid(path: Path) -> Path | None: + """Return canonical path for an invalid artifact path, if applicable.""" + match = re.match(r"^(?P.+)\.invalid\.v\d+(?P\.ya?ml)$", path.name) + if not match: + return None + return path.with_name(f"{match.group('base')}{match.group('ext')}") + + +def _promote_if_valid_invalid(spec_file: Path, out: Output) -> None: + """Promote validated invalid YAML artifact to canonical YAML path.""" + canonical_path = _canonical_yaml_path_for_invalid(spec_file) + if canonical_path is None: + return + if canonical_path == spec_file: + return + try: + spec_file.replace(canonical_path) + except Exception as e: + out.warning( + f"Validated but failed to promote invalid artifact: {e}", + file=str(spec_file), + canonical=str(canonical_path), + ) + return + out.success( + f"Promoted validated artifact: {canonical_path.name}", + promoted_from=str(spec_file), + promoted_to=str(canonical_path), + ) + + def _validate_population_spec(spec_file: Path, strict: bool, out: Output) -> int: """Validate a population spec.""" # Load spec @@ -148,6 +195,7 @@ def _validate_population_spec(spec_file: Path, strict: bool, out: Output) -> int out.divider() out.text("[green]Validation passed[/green]") out.divider() + _promote_if_valid_invalid(spec_file, out) return out.finish() @@ -256,7 +304,134 @@ def _validate_scenario_spec(spec_file: Path, out: Output) -> int: out.divider() out.text("[green]Validation passed[/green]") out.divider() + _promote_if_valid_invalid(spec_file, out) + + return out.finish() + + +def _resolve_merged_population_for_persona(persona_file: Path) -> PopulationSpec: + """Resolve merged population spec (base + extension) for persona validation.""" + from ...core.models import PopulationSpec + from ...core.models.scenario import ScenarioSpec + + scenario_dir = persona_file.parent + scenario_files_with_versions: list[tuple[int, int, Path]] = [] + for path in scenario_dir.iterdir(): + if not path.is_file(): + continue + match = re.match( + r"^scenario\.v(\d+)(?:\.invalid\.v\d+)?\.ya?ml$", + path.name, + ) + if not match: + continue + is_invalid = 1 if ".invalid." in path.name else 0 + scenario_files_with_versions.append((int(match.group(1)), is_invalid, path)) + + scenario_files_with_versions.sort(key=lambda item: (item[0], -item[1])) + if not scenario_files_with_versions: + raise FileNotFoundError( + f"No scenario.vN.yaml found next to persona file: {persona_file}" + ) + + # Choose latest scenario version in this directory (prefer canonical over invalid). + scenario_path = scenario_files_with_versions[-1][2] + scenario_spec = ScenarioSpec.from_yaml(scenario_path) + + pop_name, pop_version = scenario_spec.meta.get_population_ref() + if pop_version is None: + raise ValueError( + "Scenario must reference a versioned base_population for persona validation" + ) + + # Study layout: /scenario//persona.vN.yaml + study_root = scenario_dir.parent.parent + pop_path = study_root / f"{pop_name}.v{pop_version}.yaml" + if not pop_path.exists(): + raise FileNotFoundError(f"Referenced population spec not found: {pop_path}") + + pop_spec = PopulationSpec.from_yaml(pop_path) + ext_attrs = scenario_spec.extended_attributes or [] + merged_attrs = list(pop_spec.attributes) + ext_attrs + merged_deps: dict[str, list[str]] = { + attr.name: list(attr.sampling.depends_on or []) for attr in merged_attrs + } + merged_names = set(merged_deps.keys()) + merged_deps = { + name: [dep for dep in deps if dep in merged_names] + for name, deps in merged_deps.items() + } + merged_order = topological_sort(merged_deps) + return PopulationSpec( + meta=pop_spec.meta, + grounding=pop_spec.grounding, + attributes=merged_attrs, + sampling_order=merged_order, + ) + + +def _validate_persona_spec(spec_file: Path, out: Output) -> int: + """Validate a persona config against merged scenario attributes.""" + from ...population.persona import PersonaConfig, validate_persona_config + + if not _is_json_output(): + with console.status("[cyan]Loading persona config...[/cyan]"): + try: + config = PersonaConfig.from_yaml(spec_file) + merged_spec = _resolve_merged_population_for_persona(spec_file) + result = validate_persona_config(merged_spec, config) + except Exception as e: + out.error( + f"Failed to validate persona: {e}", + exit_code=ExitCode.VALIDATION_ERROR, + ) + return out.finish() + else: + try: + config = PersonaConfig.from_yaml(spec_file) + merged_spec = _resolve_merged_population_for_persona(spec_file) + result = validate_persona_config(merged_spec, config) + except Exception as e: + out.error( + f"Failed to validate persona: {e}", exit_code=ExitCode.VALIDATION_ERROR + ) + return out.finish() + + out.success( + f"Loaded persona config ({len(config.treatments)} treatments)", + spec_file=str(spec_file), + treatment_count=len(config.treatments), + ) + out.blank() + out.set_data("validation", format_validation_for_json(result)) + + if result.errors: + out.error( + f"Persona has {len(result.errors)} error(s)", + exit_code=ExitCode.VALIDATION_ERROR, + ) + if not _is_json_output(): + for err in result.errors[:10]: + out.text( + f" [red]✗[/red] [{err.category}] {err.location}: {err.message}" + ) + if len(result.errors) > 10: + out.text(f" [dim]... and {len(result.errors) - 10} more[/dim]") + return out.finish() + if result.warnings: + out.success(f"Persona validated with {len(result.warnings)} warning(s)") + if not _is_json_output(): + for warn in result.warnings[:5]: + out.warning(f"[{warn.category}] {warn.location}: {warn.message}") + else: + out.success("Persona validated") + + out.blank() + out.divider() + out.text("[green]Validation passed[/green]") + out.divider() + _promote_if_valid_invalid(spec_file, out) return out.finish() @@ -270,11 +445,13 @@ def validate_command( ), ): """ - Validate a population spec or scenario spec. + Validate a population spec, scenario spec, or persona config. Auto-detects file type based on naming: - *.scenario.yaml → scenario spec validation + - persona.vN.yaml → persona config validation - *.yaml → population spec validation + - *.invalid.vN.yaml → same type detection as canonical name EXIT CODES: 0 = Success (valid spec) @@ -301,6 +478,8 @@ def validate_command( # Route to appropriate validator if _is_scenario_file(spec_file): exit_code = _validate_scenario_spec(spec_file, out) + elif _is_persona_file(spec_file): + exit_code = _validate_persona_spec(spec_file, out) else: exit_code = _validate_population_spec(spec_file, strict, out) diff --git a/extropy/cli/utils.py b/extropy/cli/utils.py index a19ed96..d91b7b3 100644 --- a/extropy/cli/utils.py +++ b/extropy/cli/utils.py @@ -18,6 +18,8 @@ def my_command(): from __future__ import annotations import json +import re +from pathlib import Path from typing import Any from pydantic import BaseModel, PrivateAttr, ConfigDict @@ -263,6 +265,58 @@ def grounding_indicator(level: str) -> str: return indicators.get(level, "[dim]Unknown[/dim]") +def get_next_invalid_artifact_path( + target_path: Path | str, + *, + stem: str | None = None, + extension: str | None = None, +) -> Path: + """Compute the next versioned invalid-artifact path. + + Examples: + scenario.v1.yaml -> scenario.v1.invalid.v1.yaml + scenario.v1.yaml -> scenario.v1.invalid.v2.yaml (if v1 already exists) + stem="sample", extension=".json" -> sample.invalid.vN.json + """ + target = Path(target_path) + parent = target.parent + parent.mkdir(parents=True, exist_ok=True) + + base_stem = stem if stem is not None else target.stem + suffix = extension if extension is not None else target.suffix + if suffix and not suffix.startswith("."): + suffix = f".{suffix}" + + pattern = re.compile( + rf"^{re.escape(base_stem)}\.invalid\.v(?P\d+){re.escape(suffix)}$" + ) + max_version = 0 + for existing in parent.iterdir(): + if not existing.is_file(): + continue + match = pattern.match(existing.name) + if not match: + continue + max_version = max(max_version, int(match.group("version"))) + + next_version = max_version + 1 + return parent / f"{base_stem}.invalid.v{next_version}{suffix}" + + +def save_invalid_json_artifact( + payload: dict[str, Any], + target_path: Path | str, + *, + stem: str | None = None, + extension: str = ".json", +) -> Path: + """Save a versioned invalid artifact as JSON and return its path.""" + path = get_next_invalid_artifact_path(target_path, stem=stem, extension=extension) + with open(path, "w", encoding="utf-8") as f: + json.dump(payload, f, indent=2, default=str) + return path + + def format_validation_for_json(result) -> dict[str, Any]: """Convert ValidationResult to JSON-serializable dict.""" return { @@ -344,4 +398,13 @@ def format_sampling_stats_for_json(stats, spec) -> dict[str, Any]: if stats.constraint_violations: result["constraint_violations"] = stats.constraint_violations + if stats.condition_warnings: + result["condition_warnings"] = stats.condition_warnings + + if stats.reconciliation_counts: + result["reconciliation_counts"] = stats.reconciliation_counts + + if stats.rule_pack: + result["rule_pack"] = stats.rule_pack + return result diff --git a/extropy/core/models/__init__.py b/extropy/core/models/__init__.py index 6e11603..abf1290 100644 --- a/extropy/core/models/__init__.py +++ b/extropy/core/models/__init__.py @@ -39,10 +39,8 @@ HouseholdType, Dependent, LifeStageThreshold, + PartnerGenderPairWeight, HouseholdConfig, - # Name models - NameEntry, - NameConfig, STANDARD_PERSONALITY_ATTRIBUTES, ) @@ -65,7 +63,6 @@ ExposureRule, SeedExposure, # Interaction - InteractionType, InteractionConfig, SpreadModifier, SpreadConfig, @@ -78,6 +75,12 @@ ScenarioSimConfig, # Identity IdentityDimension, + PartnerCorrelationPolicy, + MaritalRoles, + GeoRoles, + SchoolParentRole, + ReligionRoles, + SamplingSemanticRoles, # Scenario ScenarioMeta, ScenarioSpec, @@ -158,10 +161,8 @@ "HouseholdType", "Dependent", "LifeStageThreshold", + "PartnerGenderPairWeight", "HouseholdConfig", - # Population - Name models - "NameEntry", - "NameConfig", "STANDARD_PERSONALITY_ATTRIBUTES", # Scenario - Event "EventType", @@ -173,7 +174,6 @@ "ExposureRule", "SeedExposure", # Scenario - Interaction - "InteractionType", "InteractionConfig", "SpreadModifier", "SpreadConfig", @@ -189,6 +189,12 @@ "ScenarioSpec", # Scenario - Identity "IdentityDimension", + "PartnerCorrelationPolicy", + "MaritalRoles", + "GeoRoles", + "SchoolParentRole", + "ReligionRoles", + "SamplingSemanticRoles", # Validation (shared) "Severity", "ValidationIssue", diff --git a/extropy/core/models/network.py b/extropy/core/models/network.py index 9574015..1e72b22 100644 --- a/extropy/core/models/network.py +++ b/extropy/core/models/network.py @@ -97,7 +97,9 @@ class NetworkMetrics(BaseModel): degree_assortativity: float degree_distribution: dict[int, int] = Field(default_factory=dict) - def is_valid(self) -> tuple[bool, list[str]]: + def is_valid( + self, bounds: dict[str, float] | None = None + ) -> tuple[bool, list[str]]: """Check if metrics are within expected ranges. Returns: @@ -105,6 +107,43 @@ def is_valid(self) -> tuple[bool, list[str]]: """ warnings = [] + if bounds: + degree_min = bounds.get("degree_min") + degree_max = bounds.get("degree_max") + clustering_min = bounds.get("clustering_min") + modularity_min = bounds.get("modularity_min") + modularity_max = bounds.get("modularity_max") + lcc_min = bounds.get("largest_component_min") + + if degree_min is not None and self.avg_degree < degree_min: + warnings.append( + f"avg_degree {self.avg_degree:.1f} below target minimum ({degree_min:.2f})" + ) + if degree_max is not None and self.avg_degree > degree_max: + warnings.append( + f"avg_degree {self.avg_degree:.1f} above target maximum ({degree_max:.2f})" + ) + if ( + clustering_min is not None + and self.clustering_coefficient < clustering_min + ): + warnings.append( + f"clustering_coefficient {self.clustering_coefficient:.2f} below target minimum ({clustering_min:.2f})" + ) + if modularity_min is not None and self.modularity < modularity_min: + warnings.append( + f"modularity {self.modularity:.2f} below target minimum ({modularity_min:.2f})" + ) + if modularity_max is not None and self.modularity > modularity_max: + warnings.append( + f"modularity {self.modularity:.2f} above target maximum ({modularity_max:.2f})" + ) + if lcc_min is not None and self.largest_component_ratio < lcc_min: + warnings.append( + f"largest_component_ratio {self.largest_component_ratio:.2f} below target minimum ({lcc_min:.2f})" + ) + return len(warnings) == 0, warnings + if self.avg_degree < 15: warnings.append( f"avg_degree {self.avg_degree:.1f} below expected range (15-25)" diff --git a/extropy/core/models/population.py b/extropy/core/models/population.py index 0483cdb..94b085e 100644 --- a/extropy/core/models/population.py +++ b/extropy/core/models/population.py @@ -51,6 +51,14 @@ class LifeStageThreshold(BaseModel): label: str = Field(description="Stage label, e.g. 'elementary', 'high_school'") +class PartnerGenderPairWeight(BaseModel): + """Weighted probability for an unordered partner gender pair.""" + + left: str = Field(description="One gender value in the pair") + right: str = Field(description="Other gender value in the pair") + weight: float = Field(ge=0, description="Non-negative pair weight") + + class HouseholdConfig(BaseModel): """Household composition and dependent generation parameters. @@ -115,6 +123,20 @@ class HouseholdConfig(BaseModel): "political_orientation": 0.5, } ) + partner_gender_mode: Literal["independent", "weighted"] = Field( + default="independent", + description=( + "independent: sample partner gender from base distribution; " + "weighted: apply partner_gender_pair_weights to bias pair composition" + ), + ) + partner_gender_pair_weights: list[PartnerGenderPairWeight] = Field( + default_factory=list, + description=( + "Optional unordered partner gender pair weights " + "(e.g., male/female, female/female)." + ), + ) partner_age_gap_mean: float = -2.0 partner_age_gap_std: float = 3.0 min_adult_age: int = 18 @@ -126,6 +148,7 @@ class HouseholdConfig(BaseModel): max_dependent_child_age: int = 17 elderly_min_offset: int = 22 elderly_max_offset: int = 35 + max_elderly_dependent_age: int = 105 # Life stages (replaces hardcoded _school_status) life_stages: list[LifeStageThreshold] = Field( @@ -140,27 +163,6 @@ class HouseholdConfig(BaseModel): avg_household_size: float = 2.5 -# ============================================================================= -# Name Generation Models -# ============================================================================= - - -class NameEntry(BaseModel): - name: str - weight: float = 1.0 - - -class NameConfig(BaseModel): - """Name frequency tables for culturally-appropriate name generation. - - None on SpecMeta = use bundled US CSV data. - """ - - male_first_names: list[NameEntry] = Field(default_factory=list) - female_first_names: list[NameEntry] = Field(default_factory=list) - last_names: list[NameEntry] = Field(default_factory=list) - - # Standard personality attributes that spec builders should include. # `conformity` (float, 0-1, correlated with agreeableness) is consumed by # Phase C for threshold behavior in simulation. @@ -405,10 +407,6 @@ class AttributeSpec(BaseModel): default="individual", description="individual: varies per person; household: shared across household members; partner_correlated: correlated between partners using assortative mating", ) - correlation_rate: float | None = Field( - default=None, - description="For partner_correlated scope: probability (0-1) that partner has same value. None uses type-specific defaults (age uses gaussian, race uses per-group rates).", - ) semantic_type: Literal[ "age", "income", "education", "employment", "occupation", None ] = Field( @@ -457,10 +455,6 @@ class SpecMeta(BaseModel): description: str = Field(description="Original population description") geography: str | None = Field(default=None, description="Geographic scope") - agent_focus: str | None = Field( - default=None, - description="Who the study agents represent (natural language). Used for display/documentation.", - ) created_at: datetime = Field(default_factory=datetime.now) version: str = Field(default="1.0", description="Spec format version") persona_template: str | None = Field( @@ -471,7 +465,6 @@ class SpecMeta(BaseModel): default=None, description="Scenario description from extend command, used by scenario command", ) - name_config: NameConfig | None = Field(default=None) # ============================================================================= @@ -614,17 +607,12 @@ def merge(self, extension: "PopulationSpec") -> "PopulationSpec": # It will be regenerated by the CLI after merge to include all # attributes (base + extension). - # Prefer extension's name_config if present, else keep base's - merged_nc = extension.meta.name_config or self.meta.name_config - merged_meta = SpecMeta( description=f"{self.meta.description} + {extension.meta.description}", geography=self.meta.geography, - agent_focus=self.meta.agent_focus, created_at=datetime.now(), version=self.meta.version, persona_template=None, - name_config=merged_nc, ) return PopulationSpec( @@ -702,10 +690,6 @@ class DiscoveredAttribute(BaseModel): default="individual", description="individual: varies per person; household: shared across household members; partner_correlated: correlated between partners", ) - correlation_rate: float | None = Field( - default=None, - description="For partner_correlated scope: probability (0-1) that partner has same value", - ) semantic_type: Literal[ "age", "income", "education", "employment", "occupation", None ] = Field( @@ -762,10 +746,6 @@ class HydratedAttribute(BaseModel): default="individual", description="individual: varies per person; household: shared across household members; partner_correlated: correlated between partners", ) - correlation_rate: float | None = Field( - default=None, - description="For partner_correlated scope: probability (0-1) that partner has same value", - ) semantic_type: Literal[ "age", "income", "education", "employment", "occupation", None ] = Field( @@ -820,10 +800,6 @@ class SufficiencyResult(BaseModel): sufficient: bool geography: str | None = None - agent_focus: str | None = Field( - default=None, - description="Who this study is about, e.g. 'surgeons', 'high school students', 'retired couples', 'families'", - ) clarifications_needed: list[str] = Field(default_factory=list) questions: list[ClarificationQuestion] = Field( default_factory=list, diff --git a/extropy/core/models/sampling.py b/extropy/core/models/sampling.py index 0779852..18dd9a3 100644 --- a/extropy/core/models/sampling.py +++ b/extropy/core/models/sampling.py @@ -26,6 +26,12 @@ class SamplingStats(BaseModel): # Condition evaluation warnings condition_warnings: list[str] = Field(default_factory=list) + # Deterministic post-household reconciliation counters + reconciliation_counts: dict[str, int] = Field(default_factory=dict) + + # Rule-pack quality summary (impossible/implausible backpressure) + rule_pack: dict[str, Any] = Field(default_factory=dict) + class SamplingResult(BaseModel): """Result of sampling a population.""" diff --git a/extropy/core/models/scenario.py b/extropy/core/models/scenario.py index 9a9368b..aa7acdb 100644 --- a/extropy/core/models/scenario.py +++ b/extropy/core/models/scenario.py @@ -7,7 +7,7 @@ This module contains: - Event: EventType, Event - Exposure: ExposureChannel, ExposureRule, SeedExposure -- Interaction: InteractionType, InteractionConfig, SpreadModifier, SpreadConfig +- Interaction: InteractionConfig, SpreadModifier, SpreadConfig - Outcomes: OutcomeType, OutcomeDefinition, OutcomeConfig - Config: TimestepUnit, ScenarioSimConfig - Spec: ScenarioMeta, ScenarioSpec with YAML I/O @@ -83,9 +83,6 @@ class ExposureChannel(BaseModel): description="Channel identifier in snake_case (e.g., 'email_notification')" ) description: str = Field(description="Human-readable description of the channel") - reach: Literal["broadcast", "targeted", "organic"] = Field( - description="broadcast=everyone, targeted=specific criteria, organic=through network" - ) credibility_modifier: float = Field( default=1.0, description="How the channel affects perceived credibility (1.0=no change)", @@ -147,32 +144,12 @@ class TimelineEvent(BaseModel): ) -# ============================================================================= -# Interaction Model -# ============================================================================= - - -class InteractionType(str, Enum): - """Type of agent interaction model.""" - - PASSIVE_OBSERVATION = "passive_observation" # Social media style - DIRECT_CONVERSATION = "direct_conversation" # One-on-one or small group - BROADCAST_RESPONSE = "broadcast_response" # Authority broadcasts, agents react - DELIBERATIVE = "deliberative" # Group deliberation with multiple rounds - - class InteractionConfig(BaseModel): """Configuration for how agents interact about the event.""" - primary_model: InteractionType = Field( - description="Primary interaction model for this scenario" - ) - secondary_model: InteractionType | None = Field( - default=None, - description="Optional secondary interaction model (for blended scenarios)", - ) description: str = Field( - description="Human-readable description of how interactions work" + default="", + description="Human-readable notes about social dynamics (informational only).", ) @@ -405,6 +382,111 @@ class IdentityDimension(BaseModel): ) +PartnerCorrelationPolicy = Literal[ + "gaussian_offset", + "same_group_rate", + "same_country_rate", + "same_value_probability", +] + + +class MaritalRoles(BaseModel): + """Explicit marital semantics for deterministic household reconciliation.""" + + attr: str | None = Field( + default=None, + description="Attribute name representing marital/relationship status", + ) + partnered_values: list[str] = Field( + default_factory=list, + description="Categorical values indicating partnered state", + ) + single_values: list[str] = Field( + default_factory=list, + description="Categorical values indicating single/non-partnered state", + ) + + +class GeoRoles(BaseModel): + """Geographic attribute roles used for naming and contextual defaults.""" + + country_attr: str | None = Field( + default=None, description="Attribute name representing country" + ) + region_attr: str | None = Field( + default=None, + description="Attribute name representing region/state/province/city scope", + ) + urbanicity_attr: str | None = Field( + default=None, + description="Attribute name representing urbanicity (urban/rural/etc.)", + ) + + +class SchoolParentRole(BaseModel): + """Role mapping for identifying school-parent contexts in structure generation.""" + + dependents_attr: str | None = Field( + default=None, + description="Attribute name containing dependents/children list", + ) + school_age_values: list[str] = Field( + default_factory=list, + description="Dependent school-status values treated as school-age", + ) + + +class ReligionRoles(BaseModel): + """Role mapping for religion semantics in structural edge generation.""" + + religion_attr: str | None = Field( + default=None, + description="Attribute name representing religion/faith affiliation", + ) + secular_values: list[str] = Field( + default_factory=list, + description="Values treated as secular/no-religion", + ) + + +class HouseholdRoles(BaseModel): + """Role mapping for household-coupled structural attributes.""" + + household_size_attr: str | None = Field( + default=None, + description="Attribute name representing total realized household size", + ) + + +class SamplingSemanticRoles(BaseModel): + """Scenario-owned semantic role mapping for deterministic sample/runtime logic.""" + + marital_roles: MaritalRoles | None = Field( + default=None, + description="Marital/relationship status semantics", + ) + geo_roles: GeoRoles | None = Field( + default=None, + description="Geographic role mapping", + ) + partner_correlation_roles: dict[str, PartnerCorrelationPolicy] = Field( + default_factory=dict, + description="Per-attribute partner-correlation policy overrides", + ) + school_parent_role: SchoolParentRole | None = Field( + default=None, + description="School-parent role mapping", + ) + religion_roles: ReligionRoles | None = Field( + default=None, + description="Religion role mapping", + ) + household_roles: HouseholdRoles | None = Field( + default=None, + description="Household structural role mapping", + ) + + class ScenarioSpec(BaseModel): """Complete specification for a scenario simulation.""" @@ -449,6 +531,11 @@ class ScenarioSpec(BaseModel): default=None, description="Identity dimensions that may feel threatened or activated by this scenario. Set by LLM during scenario creation.", ) + # Scenario-owned semantic role map for sample/network deterministic behavior + sampling_semantic_roles: SamplingSemanticRoles | None = Field( + default=None, + description="Semantic role mappings generated during scenario compilation for deterministic sample/network execution.", + ) def to_yaml(self, path: Path | str) -> None: """Save scenario spec to YAML file.""" @@ -508,10 +595,14 @@ def summary(self) -> str: f"Exposure channels: {len(self.seed_exposure.channels)}", f"Exposure rules: {len(self.seed_exposure.rules)}", "", - f"Interaction: {self.interaction.primary_model.value}", f"Share probability: {self.spread.share_probability:.2f}", "", f"Outcomes: {len(self.outcomes.suggested_outcomes)}", f"Simulation: {self.simulation.max_timesteps} {self.simulation.timestep_unit.value}s", ] + if self.interaction and self.interaction.description: + lines.insert( + 8, + f"Interaction notes: {self.interaction.description[:60]}...", + ) return "\n".join(lines) diff --git a/extropy/population/__init__.py b/extropy/population/__init__.py index e6f2d42..7db4c3c 100644 --- a/extropy/population/__init__.py +++ b/extropy/population/__init__.py @@ -16,7 +16,6 @@ hydrate_conditional_base, hydrate_conditional_modifiers, hydrate_household_config, - hydrate_name_config, bind_constraints, build_spec, ) @@ -57,7 +56,6 @@ "hydrate_conditional_base", "hydrate_conditional_modifiers", "hydrate_household_config", - "hydrate_name_config", "bind_constraints", "build_spec", # Sampler diff --git a/extropy/population/modifier_precedence.py b/extropy/population/modifier_precedence.py new file mode 100644 index 0000000..7fbfe97 --- /dev/null +++ b/extropy/population/modifier_precedence.py @@ -0,0 +1,557 @@ +"""Deterministic precedence rules for overlapping conditional modifiers. + +Precedence policy: +1. Subset wins (stricter condition wins) +2. Higher specificity wins +3. Declaration order wins (higher index) +""" + +from __future__ import annotations + +import ast +import re +from dataclasses import dataclass, field +from typing import Any, Literal + + +PrecedenceReason = Literal["single", "subset", "specificity", "order"] + + +@dataclass(frozen=True) +class ModifierPrecedenceDecision: + """Winner selection result for overlapping modifiers.""" + + winner_index: int + reason: PrecedenceReason + + +@dataclass +class _VarConstraint: + """Normalized constraints for one variable in a condition expression.""" + + allowed: set[Any] | None = None + disallowed: set[Any] = field(default_factory=set) + lower: tuple[float, bool] | None = None # (value, inclusive) + upper: tuple[float, bool] | None = None # (value, inclusive) + + def apply_eq(self, value: Any) -> None: + values = {value} + self.allowed = values if self.allowed is None else self.allowed & values + + def apply_in(self, values: set[Any]) -> None: + self.allowed = values if self.allowed is None else self.allowed & values + + def apply_neq(self, value: Any) -> None: + self.disallowed.add(value) + + def apply_not_in(self, values: set[Any]) -> None: + self.disallowed.update(values) + + def apply_lower(self, value: float, inclusive: bool) -> None: + if self.lower is None: + self.lower = (value, inclusive) + return + current_value, current_inclusive = self.lower + if value > current_value: + self.lower = (value, inclusive) + elif value == current_value and not inclusive and current_inclusive: + self.lower = (value, inclusive) + + def apply_upper(self, value: float, inclusive: bool) -> None: + if self.upper is None: + self.upper = (value, inclusive) + return + current_value, current_inclusive = self.upper + if value < current_value: + self.upper = (value, inclusive) + elif value == current_value and not inclusive and current_inclusive: + self.upper = (value, inclusive) + + def effective_allowed(self) -> set[Any] | None: + if self.allowed is None: + return None + return {value for value in self.allowed if value not in self.disallowed} + + def numeric_range_width(self) -> float | None: + if self.lower is None or self.upper is None: + return None + return self.upper[0] - self.lower[0] + + +@dataclass +class _WhenSummary: + raw: str + parseable: bool + unconditional: bool + always_false: bool + clause_count: int + constraints: dict[str, _VarConstraint] + + +def choose_modifier_precedence( + conditions: list[tuple[int, str]], +) -> ModifierPrecedenceDecision | None: + """Choose one winning modifier index from matching conditions.""" + if not conditions: + return None + if len(conditions) == 1: + return ModifierPrecedenceDecision( + winner_index=conditions[0][0], reason="single" + ) + + summaries = {idx: _parse_when(expr) for idx, expr in conditions} + subset_balance: dict[int, int] = {idx: 0 for idx, _ in conditions} + + for a, b in _iter_pairs([idx for idx, _ in conditions]): + a_implies_b = _when_implies(summaries[a], summaries[b]) + b_implies_a = _when_implies(summaries[b], summaries[a]) + if a_implies_b and not b_implies_a: + subset_balance[a] += 1 + subset_balance[b] -= 1 + elif b_implies_a and not a_implies_b: + subset_balance[b] += 1 + subset_balance[a] -= 1 + + specificity_scores = { + idx: _specificity_score(summaries[idx]) for idx, _ in conditions + } + ranked = sorted( + [idx for idx, _ in conditions], + key=lambda idx: ( + subset_balance[idx], + specificity_scores[idx], + idx, + ), + ) + winner = ranked[-1] + runner_up = ranked[-2] + + if subset_balance[winner] > subset_balance[runner_up]: + reason: PrecedenceReason = "subset" + elif specificity_scores[winner] > specificity_scores[runner_up]: + reason = "specificity" + else: + reason = "order" + + return ModifierPrecedenceDecision(winner_index=winner, reason=reason) + + +def _iter_pairs(indices: list[int]): + for i in range(len(indices)): + for j in range(i + 1, len(indices)): + yield indices[i], indices[j] + + +def _parse_when(expr: str) -> _WhenSummary: + text = (expr or "").strip() + if not text: + return _WhenSummary( + raw=text, + parseable=False, + unconditional=False, + always_false=False, + clause_count=0, + constraints={}, + ) + + try: + tree = ast.parse(text, mode="eval") + except SyntaxError: + return _WhenSummary( + raw=text, + parseable=False, + unconditional=False, + always_false=False, + clause_count=0, + constraints={}, + ) + + constraints: dict[str, _VarConstraint] = {} + clause_count = 0 + parseable = True + always_false = False + + def add_clause() -> None: + nonlocal clause_count + clause_count += 1 + + def get_constraint(name: str) -> _VarConstraint: + return constraints.setdefault(name, _VarConstraint()) + + def visit(node: ast.AST) -> bool: + nonlocal always_false + + if isinstance(node, ast.BoolOp): + if not isinstance(node.op, ast.And): + return False + return all(visit(value) for value in node.values) + + if isinstance(node, ast.Constant) and isinstance(node.value, bool): + if node.value is False: + always_false = True + return True + + if isinstance(node, ast.Compare): + operands = [node.left, *node.comparators] + for op, left_node, right_node in zip( + node.ops, operands[:-1], operands[1:], strict=False + ): + if not _apply_comparison( + left_node, + op, + right_node, + get_constraint, + add_clause, + ): + return False + return True + + return False + + parseable = visit(tree.body) + if not parseable: + constraints = {} + clause_count = 0 + + unconditional = parseable and clause_count == 0 and not always_false + + return _WhenSummary( + raw=text, + parseable=parseable, + unconditional=unconditional, + always_false=always_false, + clause_count=clause_count, + constraints=constraints, + ) + + +def _apply_comparison( + left_node: ast.AST, + op: ast.cmpop, + right_node: ast.AST, + get_constraint, + add_clause, +) -> bool: + left_name = _name_from_node(left_node) + right_name = _name_from_node(right_node) + + if left_name and not right_name: + return _apply_name_to_value_comparison( + left_name, op, right_node, get_constraint, add_clause + ) + + if right_name and not left_name: + reversed_op = _reverse_compare_op(op) + if reversed_op is None: + return False + return _apply_name_to_value_comparison( + right_name, + reversed_op, + left_node, + get_constraint, + add_clause, + ) + + return False + + +def _apply_name_to_value_comparison( + name: str, + op: ast.cmpop, + value_node: ast.AST, + get_constraint, + add_clause, +) -> bool: + constraint = get_constraint(name) + + if isinstance(op, ast.In): + values = _literal_set_from_node(value_node) + if values is None: + return False + constraint.apply_in(values) + add_clause() + return True + + if isinstance(op, ast.NotIn): + values = _literal_set_from_node(value_node) + if values is None: + return False + constraint.apply_not_in(values) + add_clause() + return True + + value = _literal_from_node(value_node) + if value is None: + return False + + if isinstance(op, ast.Eq): + constraint.apply_eq(value) + add_clause() + return True + if isinstance(op, ast.NotEq): + constraint.apply_neq(value) + add_clause() + return True + + if isinstance(value, bool) or not isinstance(value, (int, float)): + return False + + numeric = float(value) + if isinstance(op, ast.Gt): + constraint.apply_lower(numeric, inclusive=False) + add_clause() + return True + if isinstance(op, ast.GtE): + constraint.apply_lower(numeric, inclusive=True) + add_clause() + return True + if isinstance(op, ast.Lt): + constraint.apply_upper(numeric, inclusive=False) + add_clause() + return True + if isinstance(op, ast.LtE): + constraint.apply_upper(numeric, inclusive=True) + add_clause() + return True + + return False + + +def _name_from_node(node: ast.AST) -> str | None: + if isinstance(node, ast.Name): + return node.id + return None + + +def _literal_from_node(node: ast.AST) -> Any | None: + if isinstance(node, ast.Constant): + return node.value + return None + + +def _literal_set_from_node(node: ast.AST) -> set[Any] | None: + if isinstance(node, ast.Constant): + return {node.value} + + if not isinstance(node, (ast.List, ast.Tuple, ast.Set)): + return None + + values: set[Any] = set() + for elt in node.elts: + if not isinstance(elt, ast.Constant): + return None + values.add(elt.value) + return values + + +def _reverse_compare_op(op: ast.cmpop) -> ast.cmpop | None: + mapping: dict[type[ast.cmpop], ast.cmpop] = { + ast.Lt: ast.Gt(), + ast.LtE: ast.GtE(), + ast.Gt: ast.Lt(), + ast.GtE: ast.LtE(), + ast.Eq: ast.Eq(), + ast.NotEq: ast.NotEq(), + ast.In: ast.In(), + ast.NotIn: ast.NotIn(), + } + return mapping.get(type(op)) + + +def _when_implies(left: _WhenSummary, right: _WhenSummary) -> bool: + if right.unconditional: + return True + if left.always_false: + return True + if right.always_false: + return left.always_false + if left.unconditional: + return right.unconditional + if not left.parseable or not right.parseable: + return False + + for var_name, right_constraint in right.constraints.items(): + left_constraint = left.constraints.get(var_name) + if left_constraint is None: + return False + if not _constraint_implies(left_constraint, right_constraint): + return False + + return True + + +def _constraint_implies(left: _VarConstraint, right: _VarConstraint) -> bool: + left_allowed = left.effective_allowed() + right_allowed = right.effective_allowed() + + if right_allowed is not None: + if left_allowed is None: + return False + if not left_allowed.issubset(right_allowed): + return False + + if right.lower is not None or right.upper is not None: + if left_allowed is not None: + if not left_allowed: + return True + for value in left_allowed: + if not _value_satisfies_bounds(value, right.lower, right.upper): + return False + elif not _bounds_imply( + left.lower, + left.upper, + right.lower, + right.upper, + ): + return False + + for disallowed in right.disallowed: + if _value_possible_under_constraint(disallowed, left): + return False + + return True + + +def _value_possible_under_constraint(value: Any, constraint: _VarConstraint) -> bool: + allowed = constraint.effective_allowed() + if allowed is not None and value not in allowed: + return False + if value in constraint.disallowed: + return False + if not _value_satisfies_bounds(value, constraint.lower, constraint.upper): + return False + return True + + +def _value_satisfies_bounds( + value: Any, + lower: tuple[float, bool] | None, + upper: tuple[float, bool] | None, +) -> bool: + if isinstance(value, bool) or not isinstance(value, (int, float)): + return lower is None and upper is None + + numeric = float(value) + if lower is not None: + lower_value, lower_inclusive = lower + if lower_inclusive: + if numeric < lower_value: + return False + elif numeric <= lower_value: + return False + if upper is not None: + upper_value, upper_inclusive = upper + if upper_inclusive: + if numeric > upper_value: + return False + elif numeric >= upper_value: + return False + return True + + +def _bounds_imply( + left_lower: tuple[float, bool] | None, + left_upper: tuple[float, bool] | None, + right_lower: tuple[float, bool] | None, + right_upper: tuple[float, bool] | None, +) -> bool: + if right_lower is not None: + if left_lower is None: + return False + if not _lower_bound_implies(left_lower, right_lower): + return False + if right_upper is not None: + if left_upper is None: + return False + if not _upper_bound_implies(left_upper, right_upper): + return False + return True + + +def _lower_bound_implies( + left: tuple[float, bool], + right: tuple[float, bool], +) -> bool: + left_value, left_inclusive = left + right_value, right_inclusive = right + + if left_value > right_value: + return True + if left_value < right_value: + return False + + if right_inclusive: + return True + return not left_inclusive + + +def _upper_bound_implies( + left: tuple[float, bool], + right: tuple[float, bool], +) -> bool: + left_value, left_inclusive = left + right_value, right_inclusive = right + + if left_value < right_value: + return True + if left_value > right_value: + return False + + if right_inclusive: + return True + return not left_inclusive + + +def _specificity_score(summary: _WhenSummary) -> int: + if summary.always_false: + return 1_000_000 + + if not summary.parseable: + return _fallback_specificity_score(summary.raw) + + score = summary.clause_count * 20 + for constraint in summary.constraints.values(): + allowed = constraint.effective_allowed() + if allowed is not None: + size = max(1, len(allowed)) + score += max(0, 60 - min(size, 10) * 6) + score += len(constraint.disallowed) * 4 + if constraint.lower is not None: + score += 9 + if constraint.upper is not None: + score += 9 + if constraint.lower is not None and constraint.upper is not None: + width = constraint.numeric_range_width() + if width is not None: + if width <= 0: + score += 30 + elif width <= 1: + score += 20 + elif width <= 5: + score += 14 + elif width <= 20: + score += 9 + elif width <= 100: + score += 5 + return score + + +def _fallback_specificity_score(expr: str) -> int: + text = expr.strip().lower() + if not text: + return 0 + + score = 0 + score += text.count(" and ") * 6 + score += text.count("==") * 4 + score += text.count(" in ") * 4 + score += text.count("!=") * 3 + score += text.count(">=") * 3 + score += text.count("<=") * 3 + score += text.count(">") * 2 + score += text.count("<") * 2 + + # Light lexical fallback so longer, denser expressions rank as more specific. + token_count = len(re.findall(r"[a-z_][a-z0-9_]*", text)) + score += token_count + return score diff --git a/extropy/population/names/__init__.py b/extropy/population/names/__init__.py index 89fe455..69aa958 100644 --- a/extropy/population/names/__init__.py +++ b/extropy/population/names/__init__.py @@ -1,7 +1,8 @@ """Name generation for synthetic agents. Generates culturally plausible first + last names based on -gender, ethnicity, and birth decade. US-only for now. +gender, ethnicity, and birth decade using Faker locale routing. +Bundled CSV registries are retained as a deterministic fallback. """ from .generator import generate_name diff --git a/extropy/population/names/data/first_names.csv b/extropy/population/names/data/first_names.csv index dfef912..1f87a1e 100644 --- a/extropy/population/names/data/first_names.csv +++ b/extropy/population/names/data/first_names.csv @@ -1,161 +1,257 @@ name,gender,decade,weight -James,male,1940,4.748 -Robert,male,1940,4.599 -John,male,1940,4.510 -William,male,1940,3.614 -Richard,male,1940,2.563 -David,male,1940,1.861 -Charles,male,1940,2.106 -Thomas,male,1940,2.304 -Donald,male,1940,2.457 -Ronald,male,1940,1.075 -Mary,female,1940,3.917 -Barbara,female,1940,2.312 -Patricia,female,1940,2.297 -Betty,female,1940,1.736 -Shirley,female,1940,1.530 -Dorothy,female,1940,1.473 -Carol,female,1940,1.328 -Nancy,female,1940,1.130 -Margaret,female,1940,1.094 -Sandra,female,1940,1.075 -James,male,1950,4.568 -Robert,male,1950,4.148 -Michael,male,1950,4.248 -John,male,1950,3.811 -David,male,1950,3.611 -William,male,1950,2.710 -Richard,male,1950,2.503 -Gary,male,1950,1.829 -Thomas,male,1950,2.204 -Larry,male,1950,1.525 -Mary,female,1950,3.360 -Linda,female,1950,2.469 -Susan,female,1950,2.072 -Karen,female,1950,1.864 -Patricia,female,1950,1.620 -Donna,female,1950,1.426 -Debra,female,1950,1.241 -Deborah,female,1950,1.355 -Sandra,female,1950,1.250 -Barbara,female,1950,1.395 -Michael,male,1960,4.338 -David,male,1960,3.559 -James,male,1960,3.261 -John,male,1960,3.254 -Robert,male,1960,3.138 -Mark,male,1960,2.337 -William,male,1960,2.145 -Richard,male,1960,1.896 -Steven,male,1960,1.783 -Thomas,male,1960,1.770 -Lisa,female,1960,2.370 -Mary,female,1960,2.063 -Jennifer,female,1960,1.468 -Susan,female,1960,1.571 -Karen,female,1960,1.456 -Michelle,female,1960,1.146 -Kimberly,female,1960,1.357 -Donna,female,1960,1.072 -Patricia,female,1960,1.028 -Angela,female,1960,1.027 -Michael,male,1970,4.318 -Christopher,male,1970,2.758 -Jason,male,1970,2.686 -David,male,1970,2.620 -James,male,1970,2.615 -Robert,male,1970,2.096 -John,male,1970,2.088 -Brian,male,1970,1.933 -William,male,1970,1.522 -Matthew,male,1970,1.477 -Jennifer,female,1970,3.165 -Amy,female,1970,1.618 -Michelle,female,1970,1.422 -Melissa,female,1970,1.441 -Heather,female,1970,1.117 -Angela,female,1970,1.209 -Nicole,female,1970,1.012 -Jessica,female,1970,1.045 -Stephanie,female,1970,1.012 -Lisa,female,1970,1.240 -Michael,male,1980,3.694 -Christopher,male,1980,2.847 -Matthew,male,1980,2.691 -Joshua,male,1980,2.386 -David,male,1980,1.932 -Daniel,male,1980,1.902 -James,male,1980,1.846 -Robert,male,1980,1.502 -Andrew,male,1980,1.491 -John,male,1980,1.487 -Jessica,female,1980,3.263 -Jennifer,female,1980,2.466 -Amanda,female,1980,2.032 -Ashley,female,1980,1.763 -Sarah,female,1980,1.558 -Stephanie,female,1980,1.390 -Melissa,female,1980,1.295 -Nicole,female,1980,1.262 -Elizabeth,female,1980,1.054 -Heather,female,1980,1.152 -Michael,male,1990,2.862 -Christopher,male,1990,2.218 -Matthew,male,1990,2.007 -Joshua,male,1990,1.987 -Andrew,male,1990,1.476 -Daniel,male,1990,1.417 -Brandon,male,1990,1.413 -James,male,1990,1.390 -Tyler,male,1990,1.334 -David,male,1990,1.237 -Jessica,female,1990,2.254 -Ashley,female,1990,2.140 -Brittany,female,1990,1.489 -Amanda,female,1990,1.458 -Samantha,female,1990,1.403 -Sarah,female,1990,1.270 -Stephanie,female,1990,1.137 -Jennifer,female,1990,1.131 -Elizabeth,female,1990,1.099 -Lauren,female,1990,1.023 -Jacob,male,2000,1.639 -Michael,male,2000,1.568 -Joshua,male,2000,1.398 -Matthew,male,2000,1.319 -Ethan,male,2000,1.143 -Andrew,male,2000,1.117 -Daniel,male,2000,1.111 -Christopher,male,2000,1.052 -Joseph,male,2000,1.041 -William,male,2000,1.003 -Emily,female,2000,1.345 -Madison,female,2000,1.078 -Hannah,female,2000,1.061 -Emma,female,2000,0.925 -Ashley,female,2000,0.849 -Alexis,female,2000,0.847 -Samantha,female,2000,0.826 -Abigail,female,2000,0.802 -Sarah,female,2000,0.768 -Olivia,female,2000,0.757 -Liam,male,2010,0.972 -Noah,male,2010,0.876 -Ethan,male,2010,0.847 -Jacob,male,2010,0.842 -Aiden,male,2010,0.794 -Mason,male,2010,0.769 -Jackson,male,2010,0.721 -William,male,2010,0.698 -Alexander,male,2010,0.682 -James,male,2010,0.651 -Sophia,female,2010,1.008 -Isabella,female,2010,0.950 -Emma,female,2010,0.921 -Olivia,female,2010,0.879 -Ava,female,2010,0.832 -Emily,female,2010,0.771 -Mia,female,2010,0.717 -Abigail,female,2010,0.706 -Madison,female,2010,0.630 -Chloe,female,2010,0.606 +James,male,1940,4.2 +Robert,male,1940,4.0 +John,male,1940,3.8 +William,male,1940,3.2 +Mohammed,male,1940,2.4 +Jose,male,1940,2.1 +Giovanni,male,1940,1.7 +Hiroshi,male,1940,1.5 +Rajesh,male,1940,1.5 +Ahmed,male,1940,1.6 +Kwame,male,1940,1.2 +Yusuf,male,1940,1.1 +Wei,male,1940,1.3 +Carlos,male,1940,1.8 +Pierre,male,1940,1.4 +Ivan,male,1940,1.2 +Mary,female,1940,3.6 +Maria,female,1940,3.1 +Fatima,female,1940,2.3 +Ana,female,1940,1.9 +Aiko,female,1940,1.3 +Leila,female,1940,1.2 +Patricia,female,1940,2.2 +Elizabeth,female,1940,2.0 +Shirley,female,1940,1.7 +Yelena,female,1940,1.1 +Amina,female,1940,1.3 +Dorothy,female,1940,1.5 +Nadia,female,1940,1.2 +Sofia,female,1940,1.3 +Rosa,female,1940,1.4 +Grace,female,1940,1.3 +Michael,male,1950,4.1 +David,male,1950,3.6 +James,male,1950,3.0 +Kenji,male,1950,1.6 +Satoshi,male,1950,1.4 +Ravi,male,1950,1.8 +Omar,male,1950,1.6 +Miguel,male,1950,2.0 +Jose,male,1950,2.0 +Ali,male,1950,1.6 +Pierre,male,1950,1.6 +Sergey,male,1950,1.3 +Tunde,male,1950,1.1 +Nicolas,male,1950,1.2 +Manuel,male,1950,1.4 +Hamid,male,1950,1.1 +Linda,female,1950,2.7 +Susan,female,1950,2.1 +Patricia,female,1950,1.9 +Keiko,female,1950,1.5 +Yuko,female,1950,1.3 +Priya,female,1950,1.5 +Farah,female,1950,1.3 +Maria,female,1950,2.0 +Carmen,female,1950,1.6 +Elena,female,1950,1.5 +Nadia,female,1950,1.4 +Aisha,female,1950,1.3 +Amina,female,1950,1.2 +Monica,female,1950,1.2 +Teresa,female,1950,1.3 +Olga,female,1950,1.1 +Michael,male,1960,3.9 +David,male,1960,3.4 +Mark,male,1960,2.5 +Andrei,male,1960,1.5 +Ivan,male,1960,1.4 +Wei,male,1960,1.9 +Jian,male,1960,1.7 +Raj,male,1960,1.8 +Khalid,male,1960,1.5 +Hassan,male,1960,1.5 +Carlos,male,1960,2.0 +Luis,male,1960,1.8 +Samuel,male,1960,1.6 +Mateusz,male,1960,1.2 +Abdul,male,1960,1.3 +Thierry,male,1960,1.1 +Lisa,female,1960,2.4 +Mary,female,1960,2.1 +Jennifer,female,1960,1.8 +Mei,female,1960,1.6 +Wei,female,1960,1.4 +Anita,female,1960,1.7 +Sunita,female,1960,1.4 +Zahra,female,1960,1.3 +Leila,female,1960,1.5 +Sofia,female,1960,1.6 +Olga,female,1960,1.2 +Yasmin,female,1960,1.3 +Helena,female,1960,1.2 +Carla,female,1960,1.2 +Nkechi,female,1960,1.0 +Marina,female,1960,1.1 +Michael,male,1970,3.7 +Christopher,male,1970,2.8 +Jason,male,1970,2.4 +Mateo,male,1970,1.8 +Diego,male,1970,1.9 +Arjun,male,1970,1.7 +Rahul,male,1970,1.6 +Chen,male,1970,1.7 +Min,male,1970,1.4 +Tariq,male,1970,1.3 +Emeka,male,1970,1.2 +Kwame,male,1970,1.1 +Luca,male,1970,1.4 +Andres,male,1970,1.3 +Youssef,male,1970,1.1 +Binh,male,1970,1.0 +Jennifer,female,1970,2.9 +Amy,female,1970,1.8 +Melissa,female,1970,1.6 +Natalia,female,1970,1.5 +Lucia,female,1970,1.5 +Priyanka,female,1970,1.3 +Neha,female,1970,1.2 +Yuna,female,1970,1.1 +Hyejin,female,1970,1.0 +Amina,female,1970,1.2 +Nkechi,female,1970,1.0 +Sara,female,1970,1.5 +Camila,female,1970,1.3 +Ines,female,1970,1.0 +Mariam,female,1970,1.1 +Ewa,female,1970,0.9 +Michael,male,1980,3.3 +Christopher,male,1980,2.7 +Matthew,male,1980,2.5 +Ahmed,male,1980,1.9 +Omar,male,1980,1.8 +Hassan,male,1980,1.5 +Alejandro,male,1980,1.9 +Ricardo,male,1980,1.6 +Vikram,male,1980,1.5 +Amit,male,1980,1.4 +Jun,male,1980,1.3 +Sung,male,1980,1.2 +Lucas,male,1980,1.6 +Thiago,male,1980,1.3 +Karim,male,1980,1.2 +Milan,male,1980,1.1 +Jessica,female,1980,2.9 +Jennifer,female,1980,2.3 +Amanda,female,1980,1.9 +Fatima,female,1980,1.7 +Aisha,female,1980,1.6 +Samira,female,1980,1.4 +Camila,female,1980,1.5 +Daniela,female,1980,1.3 +Ritu,female,1980,1.1 +Sonal,female,1980,1.0 +Yuki,female,1980,1.2 +Hana,female,1980,1.1 +Leah,female,1980,1.3 +Noor,female,1980,1.1 +Thao,female,1980,1.0 +Adele,female,1980,1.0 +Michael,male,1990,2.7 +Christopher,male,1990,2.1 +Joshua,male,1990,2.0 +Liam,male,1990,1.9 +Noah,male,1990,1.8 +Ethan,male,1990,1.6 +Mohammed,male,1990,1.6 +Ali,male,1990,1.4 +Mateo,male,1990,1.5 +Diego,male,1990,1.4 +Arjun,male,1990,1.4 +Wei,male,1990,1.2 +Leo,male,1990,1.3 +Yusuf,male,1990,1.2 +Kaito,male,1990,1.0 +Ivan,male,1990,1.0 +Jessica,female,1990,2.2 +Ashley,female,1990,2.0 +Samantha,female,1990,1.6 +Emma,female,1990,1.5 +Olivia,female,1990,1.4 +Ava,female,1990,1.3 +Fatima,female,1990,1.2 +Aisha,female,1990,1.1 +Priya,female,1990,1.1 +Zara,female,1990,1.1 +Sofia,female,1990,1.2 +Mia,female,1990,1.1 +Amara,female,1990,1.0 +Yara,female,1990,0.9 +Lina,female,1990,1.0 +Ines,female,1990,0.9 +Jacob,male,2000,1.7 +Michael,male,2000,1.5 +Ethan,male,2000,1.4 +Noah,male,2000,1.3 +Liam,male,2000,1.2 +Aiden,male,2000,1.1 +Muhammad,male,2000,1.1 +Omar,male,2000,1.0 +Rohan,male,2000,1.0 +Arjun,male,2000,0.9 +Jin,male,2000,0.8 +Tae,male,2000,0.8 +Mateo,male,2000,1.0 +Lucas,male,2000,1.0 +Zayd,male,2000,0.8 +Hugo,male,2000,0.8 +Emily,female,2000,1.3 +Madison,female,2000,1.2 +Hannah,female,2000,1.1 +Emma,female,2000,1.0 +Olivia,female,2000,0.9 +Abigail,female,2000,0.9 +Aisha,female,2000,0.8 +Fatima,female,2000,0.8 +Priya,female,2000,0.8 +Nour,female,2000,0.7 +Sana,female,2000,0.7 +Yuna,female,2000,0.7 +Amara,female,2000,0.8 +Leah,female,2000,0.8 +Camila,female,2000,0.8 +Mina,female,2000,0.7 +Liam,male,2010,1.0 +Noah,male,2010,0.9 +Ethan,male,2010,0.8 +Aiden,male,2010,0.8 +Mason,male,2010,0.7 +Alexander,male,2010,0.7 +Muhammad,male,2010,0.7 +Yusuf,male,2010,0.6 +Rayan,male,2010,0.6 +Arjun,male,2010,0.6 +Wei,male,2010,0.5 +Joon,male,2010,0.5 +Leo,male,2010,0.6 +Mateo,male,2010,0.6 +Kaito,male,2010,0.5 +Thiago,male,2010,0.5 +Sophia,female,2010,1.0 +Isabella,female,2010,0.9 +Emma,female,2010,0.9 +Olivia,female,2010,0.8 +Ava,female,2010,0.8 +Mia,female,2010,0.7 +Fatima,female,2010,0.7 +Zara,female,2010,0.7 +Aisha,female,2010,0.6 +Anaya,female,2010,0.6 +Yuna,female,2010,0.6 +Lina,female,2010,0.6 +Amara,female,2010,0.6 +Leah,female,2010,0.6 +Camila,female,2010,0.6 +Saanvi,female,2010,0.5 diff --git a/extropy/population/names/data/last_names.csv b/extropy/population/names/data/last_names.csv index fab2e7c..f2fa6e3 100644 --- a/extropy/population/names/data/last_names.csv +++ b/extropy/population/names/data/last_names.csv @@ -1,86 +1,118 @@ name,ethnicity,weight -Smith,white,2.442 -Johnson,white,1.932 -Williams,white,1.625 -Brown,white,1.437 -Jones,white,1.404 -Miller,white,1.238 -Davis,white,1.116 -Wilson,white,0.843 -Anderson,white,0.784 -Taylor,white,0.780 -Thomas,white,0.756 -Moore,white,0.713 -Martin,white,0.678 -Thompson,white,0.669 -Clark,white,0.551 -Lewis,white,0.530 -Robinson,white,0.502 -Walker,white,0.497 -Hall,white,0.494 -Young,white,0.480 -King,white,0.470 -Wright,white,0.459 -Baker,white,0.419 -Nelson,white,0.417 -Campbell,white,0.397 -Washington,black,0.903 -Jefferson,black,0.491 -Williams,black,2.400 -Jackson,black,1.735 -Harris,black,0.961 -Robinson,black,0.847 -Brown,black,1.220 -Jones,black,1.437 -Davis,black,0.935 -Johnson,black,1.600 -Thomas,black,0.821 -Wilson,black,0.750 -Moore,black,0.633 -Lewis,black,0.552 -Martin,black,0.541 -Taylor,black,0.589 -King,black,0.514 +Smith,white,2.300 +Johnson,white,1.900 +Williams,white,1.600 +Brown,white,1.400 +Jones,white,1.350 +Miller,white,1.200 +Davis,white,1.050 +Wilson,white,0.820 +Anderson,white,0.780 +Taylor,white,0.760 +Thomas,white,0.730 +Moore,white,0.700 +Martin,white,0.670 +Thompson,white,0.650 +Clark,white,0.530 +Lewis,white,0.510 +Robinson,white,0.490 +Walker,white,0.480 +Hall,white,0.470 +Young,white,0.460 +King,white,0.450 +Wright,white,0.430 +Baker,white,0.410 +Nelson,white,0.400 +Campbell,white,0.380 +Rossi,white,0.340 +Novak,white,0.320 +Ivanov,white,0.300 +Kowalski,white,0.280 +Schmidt,white,0.270 +Muller,white,0.260 +Silva,white,0.250 +Dubois,white,0.240 +Oconnor,white,0.220 +Papadopoulos,white,0.200 +Washington,black,0.900 +Jefferson,black,0.500 +Williams,black,2.200 +Jackson,black,1.700 +Harris,black,0.960 +Robinson,black,0.840 +Brown,black,1.180 +Jones,black,1.300 +Davis,black,0.910 +Johnson,black,1.500 +Thomas,black,0.810 +Wilson,black,0.730 +Moore,black,0.620 +Lewis,black,0.550 +Martin,black,0.540 +Taylor,black,0.580 +King,black,0.520 Thompson,black,0.460 -Anderson,black,0.445 -Walker,black,0.450 -Garcia,hispanic,3.309 -Rodriguez,hispanic,2.488 -Martinez,hispanic,2.269 -Hernandez,hispanic,2.164 -Lopez,hispanic,1.858 -Gonzalez,hispanic,1.659 -Perez,hispanic,1.361 -Sanchez,hispanic,1.232 -Ramirez,hispanic,1.193 -Torres,hispanic,0.974 -Flores,hispanic,0.937 -Rivera,hispanic,0.898 -Gomez,hispanic,0.643 -Diaz,hispanic,0.628 -Morales,hispanic,0.575 -Reyes,hispanic,0.566 -Gutierrez,hispanic,0.537 -Cruz,hispanic,0.477 -Ortiz,hispanic,0.455 -Castillo,hispanic,0.392 -Kim,asian,2.831 -Lee,asian,2.544 -Park,asian,1.365 -Nguyen,asian,2.459 -Chen,asian,1.839 -Wang,asian,1.605 -Li,asian,1.145 -Wu,asian,0.718 -Yang,asian,0.867 -Patel,asian,1.523 -Shah,asian,0.546 -Singh,asian,0.694 -Kumar,asian,0.456 -Chang,asian,0.552 -Lin,asian,0.641 -Liu,asian,0.658 -Huang,asian,0.621 -Zhang,asian,0.549 -Tran,asian,0.715 -Le,asian,0.399 +Anderson,black,0.440 +Walker,black,0.440 +Okafor,black,0.380 +Mensah,black,0.340 +Diallo,black,0.320 +Ndlovu,black,0.300 +Abebe,black,0.280 +Adebayo,black,0.260 +Garcia,hispanic,3.200 +Rodriguez,hispanic,2.450 +Martinez,hispanic,2.220 +Hernandez,hispanic,2.100 +Lopez,hispanic,1.820 +Gonzalez,hispanic,1.620 +Perez,hispanic,1.330 +Sanchez,hispanic,1.200 +Ramirez,hispanic,1.160 +Torres,hispanic,0.950 +Flores,hispanic,0.920 +Rivera,hispanic,0.880 +Gomez,hispanic,0.640 +Diaz,hispanic,0.620 +Morales,hispanic,0.570 +Reyes,hispanic,0.560 +Gutierrez,hispanic,0.530 +Cruz,hispanic,0.470 +Ortiz,hispanic,0.450 +Castillo,hispanic,0.390 +Vargas,hispanic,0.360 +Mendoza,hispanic,0.340 +Navarro,hispanic,0.320 +Rojas,hispanic,0.300 +Salazar,hispanic,0.280 +Kim,asian,2.700 +Lee,asian,2.500 +Park,asian,1.350 +Nguyen,asian,2.300 +Chen,asian,1.800 +Wang,asian,1.550 +Li,asian,1.120 +Wu,asian,0.700 +Yang,asian,0.850 +Patel,asian,1.500 +Shah,asian,0.540 +Singh,asian,0.690 +Kumar,asian,0.500 +Chang,asian,0.540 +Lin,asian,0.620 +Liu,asian,0.640 +Huang,asian,0.600 +Zhang,asian,0.560 +Tran,asian,0.700 +Le,asian,0.390 +Tanaka,asian,0.350 +Sato,asian,0.340 +Suzuki,asian,0.330 +Yamamoto,asian,0.300 +Choi,asian,0.290 +Khan,asian,0.500 +Rahman,asian,0.440 +Ali,asian,0.420 +Hassan,asian,0.380 +Bui,asian,0.320 +Pham,asian,0.300 diff --git a/extropy/population/names/generator.py b/extropy/population/names/generator.py index b0833d2..743e5ac 100644 --- a/extropy/population/names/generator.py +++ b/extropy/population/names/generator.py @@ -1,28 +1,24 @@ -"""Demographically-plausible name generation for synthetic agents. +"""Deterministic Faker-first name generation for synthetic agents. -Uses bundled SSA first-name frequencies (by decade + gender) and Census -surname frequencies (by ethnicity) to produce names that are statistically -representative of US demographics. Seeded RNG ensures reproducibility. - -When a NameConfig is provided (from LLM research), culturally-appropriate -names are drawn from those tables instead. +Primary path uses Faker with locale routing from country/region and identity hints. +Bundled CSV registries remain as a safety fallback when Faker locale generation fails. """ from __future__ import annotations import csv import random +import re +from functools import lru_cache from pathlib import Path -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ...core.models.population import NameConfig +from typing import Any _DATA_DIR = Path(__file__).parent / "data" # Lazy-loaded lookup tables _first_names: dict[tuple[str, str], list[tuple[str, float]]] | None = None _last_names: dict[str, list[tuple[str, float]]] | None = None +_faker_cache: dict[str, Any] = {} # Ethnicity aliases — maps common attribute values to CSV ethnicity keys _ETHNICITY_MAP: dict[str, str] = { @@ -47,6 +43,188 @@ "aapi": "asian", } +_ETHNICITY_LOCALE_MAP: dict[str, list[str]] = { + "hispanic": ["es_MX", "es_ES", "pt_BR"], + "asian": ["en_IN", "zh_CN", "ja_JP", "ko_KR", "vi_VN"], + "black": ["en_US", "en_GB", "fr_FR"], + "white": ["en_US", "en_GB", "de_DE", "fr_FR", "it_IT"], +} + +_US_STATE_ABBREVIATIONS = { + "AL", + "AK", + "AZ", + "AR", + "CA", + "CO", + "CT", + "DE", + "FL", + "GA", + "HI", + "ID", + "IL", + "IN", + "IA", + "KS", + "KY", + "LA", + "ME", + "MD", + "MA", + "MI", + "MN", + "MS", + "MO", + "MT", + "NE", + "NV", + "NH", + "NJ", + "NM", + "NY", + "NC", + "ND", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VT", + "VA", + "WA", + "WV", + "WI", + "WY", + "DC", +} + +# Region aliases are kept data-driven here so free-text variants +# ("SE Asia", "South East Asia", etc.) resolve consistently. +_REGION_CODE_ALIASES: dict[str, tuple[list[str], list[str]]] = { + "north_america": ( + ["north america", "n america", "na", "amer"], + ["US", "CA", "MX"], + ), + "latin_america": ( + ["latin america", "latam", "south america", "central america", "caribbean"], + [ + "MX", + "BR", + "AR", + "CO", + "CL", + "PE", + "VE", + "UY", + "PY", + "BO", + "EC", + "GT", + "HN", + "SV", + "NI", + "CR", + "PA", + "DO", + "CU", + "PR", + ], + ), + "europe": ( + [ + "europe", + "eu", + "emea", + "western europe", + "eastern europe", + "nordic", + "scandinavian", + "balkan", + "mediterranean", + ], + [ + "GB", + "IE", + "FR", + "DE", + "IT", + "ES", + "PT", + "NL", + "BE", + "CH", + "AT", + "DK", + "SE", + "NO", + "FI", + "PL", + "CZ", + "HU", + "RO", + "GR", + "RU", + "UA", + "TR", + ], + ), + "east_asia": ( + ["east asia"], + ["CN", "JP", "KR", "TW", "HK", "MO"], + ), + "south_asia": ( + ["south asia"], + ["IN", "PK", "BD", "LK", "NP", "BT", "MV"], + ), + "southeast_asia": ( + ["southeast asia", "south east asia", "se asia", "sea"], + ["ID", "MY", "SG", "TH", "VN", "PH", "MM", "KH", "LA", "BN", "TL"], + ), + "central_asia": ( + ["central asia"], + ["KZ", "UZ", "KG", "TJ", "TM"], + ), + "middle_east": ( + ["middle east", "mena", "gulf"], + [ + "AE", + "SA", + "QA", + "KW", + "BH", + "OM", + "JO", + "LB", + "IL", + "PS", + "IQ", + "IR", + "TR", + "SY", + "YE", + "EG", + ], + ), + "africa": ( + ["africa", "sub saharan africa", "sub-saharan africa", "north africa"], + ["NG", "ZA", "KE", "GH", "ET", "TZ", "UG", "SN", "CM", "DZ", "MA", "TN", "EG"], + ), + "oceania": ( + ["oceania", "pacific"], + ["AU", "NZ", "PG", "FJ"], + ), + "asia": ( + ["asia", "apac"], + ["IN", "CN", "JP", "KR", "ID", "TH", "VN", "MY", "PH", "SG", "PK", "BD"], + ), +} + # Decade snapping thresholds _VALID_DECADES = [1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010] @@ -124,6 +302,244 @@ def age_to_birth_decade(age: int | float, reference_year: int = 2025) -> int: return (birth_year // 10) * 10 +def _normalize_geo_text(text: str | None) -> str: + if not text: + return "" + token = text.strip().lower() + token = token.replace("&", " and ") + token = re.sub(r"[\s\-_\/\.]+", " ", token) + token = re.sub(r"[^a-z0-9 ]", "", token) + token = re.sub(r"\s+", " ", token).strip() + return token + + +@lru_cache(maxsize=1) +def _country_lookup() -> dict[str, str]: + """Build normalized country token -> ISO alpha2 map.""" + lookup: dict[str, str] = {} + try: + from iso3166 import countries # Lightweight ISO registry. + except Exception: + return lookup + + for country in countries: + alpha2 = country.alpha2.upper() + candidates = { + country.alpha2, + country.alpha3, + country.name, + getattr(country, "apolitical_name", None), + getattr(country, "official_name", None), + getattr(country, "common_name", None), + } + for candidate in candidates: + if not candidate: + continue + norm = _normalize_geo_text(str(candidate)) + if norm: + lookup[norm] = alpha2 + + # Common shorthands that are noisy in free-text geography. + lookup.update( + { + "usa": "US", + "u s": "US", + "u s a": "US", + "united states": "US", + "uk": "GB", + "u k": "GB", + "uae": "AE", + "south korea": "KR", + "north korea": "KP", + "russia": "RU", + "ivory coast": "CI", + } + ) + return lookup + + +@lru_cache(maxsize=1) +def _available_locales() -> tuple[set[str], dict[str, list[str]], list[str]]: + """Return supported Faker locales and reverse country->locale index.""" + try: + from faker.config import AVAILABLE_LOCALES + except Exception: + return set(), {}, [] + + available = set(AVAILABLE_LOCALES) + by_country: dict[str, list[str]] = {} + language_only: list[str] = [] + for locale in AVAILABLE_LOCALES: + if "_" in locale: + suffix = locale.rsplit("_", 1)[1].upper() + if len(suffix) == 2 and suffix.isalpha(): + by_country.setdefault(suffix, []).append(locale) + continue + language_only.append(locale) + return available, by_country, language_only + + +def _try_country_code_from_hint(geo_hint: str | None) -> str | None: + if not geo_hint: + return None + lookup = _country_lookup() + normalized = _normalize_geo_text(geo_hint) + if not normalized: + return None + + # Exact country token/code match (handles alpha2/alpha3 like IN/IND). + if normalized in lookup: + return lookup[normalized] + + parts = [p.strip() for p in re.split(r"[,;|]", geo_hint) if p.strip()] + for part in reversed(parts): + norm = _normalize_geo_text(part) + if norm in lookup: + return lookup[norm] + + tokens = normalized.split() + for span in range(min(4, len(tokens)), 0, -1): + for i in range(len(tokens) - span + 1): + phrase = " ".join(tokens[i : i + span]) + # Avoid ambiguous short tokens inside region strings + # (e.g. "SE Asia" should not resolve to country code SE). + if len(phrase) <= 2: + continue + if phrase in lookup: + return lookup[phrase] + + # US subnational fallback (e.g., "Austin, TX") + if re.search(r",\s*([A-Za-z]{2})\b", geo_hint): + abbr = re.search(r",\s*([A-Za-z]{2})\b", geo_hint) + if abbr and abbr.group(1).upper() in _US_STATE_ABBREVIATIONS: + return "US" + + return None + + +def _region_country_codes(geo_hint: str | None) -> list[str]: + normalized = _normalize_geo_text(geo_hint) + if not normalized: + return [] + best_codes: list[str] = [] + best_len = -1 + for aliases, codes in _REGION_CODE_ALIASES.values(): + for alias in aliases: + alias_norm = _normalize_geo_text(alias) + if not alias_norm: + continue + if re.search( + rf"(? best_len: + best_len = len(alias_norm) + best_codes = codes + if best_codes: + return best_codes + return [] + + +def _build_locale_candidates(country: str | None, ethnicity_key: str) -> list[str]: + available, by_country, _language_only = _available_locales() + locales: list[str] = [] + + raw_hint = (country or "").strip() + norm_hint = _normalize_geo_text(raw_hint) + + # If caller already passes a locale token, honor directly. + if raw_hint and re.fullmatch(r"[a-z]{2}[_-][A-Z]{2}", raw_hint): + direct = raw_hint.replace("-", "_") + if direct in available: + locales.append(direct) + + # Country-first resolution via ISO lookup. + country_code = _try_country_code_from_hint(raw_hint) + if country_code: + locales.extend(by_country.get(country_code, [])) + else: + # Region-scope fallback (SE Asia, LATAM, EMEA, etc.) + for code in _region_country_codes(norm_hint): + locales.extend(by_country.get(code, [])) + + # Ethnicity hint next. + for locale in _ETHNICITY_LOCALE_MAP.get(ethnicity_key, []): + if locale in available: + locales.append(locale) + + # Global fallback locale always last. + locales.append("en_US") + + seen: set[str] = set() + deduped: list[str] = [] + for locale in locales: + if locale not in seen: + seen.add(locale) + deduped.append(locale) + return deduped + + +def _get_faker(locale: str) -> Any | None: + """Get or create a Faker instance for locale; return None if unavailable.""" + if locale in _faker_cache: + return _faker_cache[locale] + + try: + from faker import Faker # Imported lazily to keep module import cheap. + except Exception: + return None + + try: + fake = Faker(locale) + except Exception: + return None + + _faker_cache[locale] = fake + return fake + + +def _faker_generate_name( + norm_gender: str, + ethnicity_key: str, + country: str | None, + birth_decade: int, + seed: int, +) -> tuple[str, str] | None: + """Generate name via Faker locale routing. Returns None if all locales fail.""" + mixed_seed = (seed * 1315423911 + birth_decade * 2654435761) & 0x7FFFFFFF + rng = random.Random(mixed_seed) + locales = _build_locale_candidates(country, ethnicity_key) + rng.shuffle(locales) + + for locale in locales: + fake = _get_faker(locale) + if fake is None: + continue + + # Ensure deterministic draws per call. + fake.seed_instance(mixed_seed) + + try: + if norm_gender == "male": + first_name = fake.first_name_male() + else: + first_name = fake.first_name_female() + except Exception: + try: + first_name = fake.first_name() + except Exception: + continue + + try: + last_name = fake.last_name() + except Exception: + continue + + if first_name and last_name: + return str(first_name), str(last_name) + + return None + + def generate_name( gender: str | None = None, ethnicity: str | None = None, @@ -132,7 +548,6 @@ def generate_name( age: int | float | None = None, country: str = "US", seed: int | None = None, - name_config: NameConfig | None = None, ) -> tuple[str, str]: """Generate a demographically-plausible (first_name, last_name) pair. @@ -141,24 +556,14 @@ def generate_name( ethnicity: Agent's ethnicity/race attribute birth_decade: Decade of birth (e.g. 1980). Derived from age if not given. age: Agent's age (used to derive birth_decade if not provided) - country: Country code — only "US" supported for now + country: Country/region hint used for Faker locale routing seed: RNG seed for reproducibility - name_config: LLM-researched name tables (None = use bundled CSVs) Returns: Tuple of (first_name, last_name) """ rng = random.Random(seed) - # Use NameConfig if available and populated - if name_config is not None: - result = _generate_from_config(name_config, gender, rng) - if result is not None: - return result - - # Fallback: bundled CSV path - first_names, last_names = _ensure_loaded() - # Resolve birth decade if birth_decade is None and age is not None: birth_decade = age_to_birth_decade(age) @@ -167,20 +572,34 @@ def generate_name( norm_gender = _normalize_gender(gender) norm_ethnicity = _normalize_ethnicity(ethnicity) + + # Primary path: Faker (locale-routed by country/region + ethnicity hints) + faker_result = _faker_generate_name( + norm_gender=norm_gender, + ethnicity_key=norm_ethnicity, + country=country, + birth_decade=birth_decade, + seed=rng.randint(0, 2**31 - 1), + ) + if faker_result is not None: + return faker_result + + # Safety fallback: bundled CSVs + first_names, last_names = _ensure_loaded() decade_str = _snap_decade(birth_decade) # Pick first name first_key = (norm_gender, decade_str) first_options = first_names.get(first_key) if not first_options: - # Fallback: try any decade for this gender + # Fallback tier 2: any decade for this demographic bucket for d in reversed(_VALID_DECADES): fallback_key = (norm_gender, str(d)) if fallback_key in first_names: first_options = first_names[fallback_key] break if not first_options: - # Ultimate fallback + # Fallback tier 3: global default first_options = [("Alex", 1.0)] first_name = _weighted_choice(first_options, rng) @@ -188,31 +607,9 @@ def generate_name( # Pick last name last_options = last_names.get(norm_ethnicity) if not last_options: - # Fallback to white surnames - last_options = last_names.get("white", [("Smith", 1.0)]) + pooled = [item for rows in last_names.values() for item in rows] + last_options = pooled or [("Smith", 1.0)] last_name = _weighted_choice(last_options, rng) return first_name, last_name - - -def _generate_from_config( - config: NameConfig, gender: str | None, rng: random.Random -) -> tuple[str, str] | None: - """Try generating a name from NameConfig tables. Returns None if empty.""" - norm_gender = _normalize_gender(gender) - - if norm_gender == "male": - first_entries = config.male_first_names - else: - first_entries = config.female_first_names - - if not first_entries or not config.last_names: - return None - - first_options = [(e.name, e.weight) for e in first_entries] - last_options = [(e.name, e.weight) for e in config.last_names] - - first_name = _weighted_choice(first_options, rng) - last_name = _weighted_choice(last_options, rng) - return first_name, last_name diff --git a/extropy/population/network/__init__.py b/extropy/population/network/__init__.py index e6f03c6..a945e23 100644 --- a/extropy/population/network/__init__.py +++ b/extropy/population/network/__init__.py @@ -43,6 +43,7 @@ DegreeMultiplierConfig, EdgeTypeRule, InfluenceFactorConfig, + StructuralAttributeRoles, ) from .similarity import ( compute_similarity, @@ -76,6 +77,7 @@ "DegreeMultiplierConfig", "EdgeTypeRule", "InfluenceFactorConfig", + "StructuralAttributeRoles", # Result types "Edge", "NetworkResult", diff --git a/extropy/population/network/config.py b/extropy/population/network/config.py index bb09827..9cb6738 100644 --- a/extropy/population/network/config.py +++ b/extropy/population/network/config.py @@ -94,6 +94,23 @@ class InfluenceFactorConfig(BaseModel): description: str = "" +class StructuralAttributeRoles(BaseModel): + """Attribute roles used for deterministic structural edge generation. + + Each field should reference an attribute name from the sampled agent schema, + or be null when unavailable for a given population. + """ + + household_id: str | None = None + partner_id: str | None = None + age: str | None = None + sector: str | None = None + region: str | None = None + urbanicity: str | None = None + religion: str | None = None + dependents: str | None = None + + class NetworkConfig(BaseModel): """Complete configuration for network generation. @@ -123,6 +140,7 @@ class NetworkConfig(BaseModel): degree_multipliers: Multipliers for degree correction edge_type_rules: Rules for inferring edge types (evaluated by priority) influence_factors: Factors for computing asymmetric influence weights + structural_attribute_roles: Attribute-role mapping for structural edges default_edge_type: Fallback edge type when no rule matches ordinal_levels: Global ordinal level mappings (keyed by attribute name). Used by within_n match type when AttributeWeightConfig.ordinal_levels is None. @@ -175,6 +193,9 @@ class NetworkConfig(BaseModel): degree_multipliers: list[DegreeMultiplierConfig] = Field(default_factory=list) edge_type_rules: list[EdgeTypeRule] = Field(default_factory=list) influence_factors: list[InfluenceFactorConfig] = Field(default_factory=list) + structural_attribute_roles: StructuralAttributeRoles = Field( + default_factory=StructuralAttributeRoles + ) default_edge_type: str = "peer" ordinal_levels: dict[str, dict[str, int]] = Field(default_factory=dict) generated_from: str | None = None diff --git a/extropy/population/network/config_generator.py b/extropy/population/network/config_generator.py index db0a967..24c71e2 100644 --- a/extropy/population/network/config_generator.py +++ b/extropy/population/network/config_generator.py @@ -20,6 +20,7 @@ DegreeMultiplierConfig, EdgeTypeRule, InfluenceFactorConfig, + StructuralAttributeRoles, ) logger = logging.getLogger(__name__) @@ -208,6 +209,33 @@ "additionalProperties": False, } +STRUCTURAL_ROLE_SCHEMA = { + "type": "object", + "properties": { + "household_id": {"type": ["string", "null"]}, + "partner_id": {"type": ["string", "null"]}, + "age": {"type": ["string", "null"]}, + "sector": {"type": ["string", "null"]}, + "region": {"type": ["string", "null"]}, + "urbanicity": {"type": ["string", "null"]}, + "religion": {"type": ["string", "null"]}, + "dependents": {"type": ["string", "null"]}, + "reasoning": {"type": "string"}, + }, + "required": [ + "household_id", + "partner_id", + "age", + "sector", + "region", + "urbanicity", + "religion", + "dependents", + "reasoning", + ], + "additionalProperties": False, +} + def _build_prompt( population_spec: PopulationSpec, @@ -216,7 +244,8 @@ def _build_prompt( """Build the prompt for network config generation.""" # Summarize population attributes attr_lines = [] - for attr in population_spec.attributes: + max_prompt_attrs = 50 + for attr in population_spec.attributes[:max_prompt_attrs]: line = f" - {attr.name} ({attr.type})" if attr.category: line += f" [{attr.category}]" @@ -234,6 +263,10 @@ def _build_prompt( if dist_mean is not None: line += f" (mean={dist_mean})" attr_lines.append(line) + if len(population_spec.attributes) > max_prompt_attrs: + attr_lines.append( + f" - ... ({len(population_spec.attributes) - max_prompt_attrs} more attributes omitted)" + ) attr_summary = "\n".join(attr_lines) @@ -294,9 +327,301 @@ def _build_prompt( - For within_n match type, you MUST provide ordinal_levels mapping - For edge type conditions, use a_{{attribute}} and b_{{attribute}} syntax - For degree_multipliers condition_value, use the same type as the attribute (boolean/number/string) + """ + + +def _extract_sample_value( + agents_sample: list[dict] | None, attr_name: str +) -> object | None: + """Return a representative non-null sample value for an attribute.""" + if not agents_sample: + return None + for agent in agents_sample: + value = agent.get(attr_name) + if value is None: + continue + if isinstance(value, str) and not value.strip(): + continue + return value + return None + + +def _score_structural_role_candidate( + *, + role_name: str, + attr, + sample_value: object | None, +) -> float: + """Deterministic score for assigning an attribute to a structural role.""" + name = attr.name.lower() + desc = (attr.description or "").lower() + semantic = (attr.semantic_type or "").lower() + identity = (attr.identity_type or "").lower() + scope = (attr.scope or "").lower() + attr_type = (attr.type or "").lower() + text = f"{name} {desc}" + + def has_any(*tokens: str) -> bool: + return any(token in text for token in tokens) + + score = 0.0 + if role_name == "household_id": + if "household" in name: + score += 3.0 + if name.endswith("_id"): + score += 1.5 + if scope == "household": + score += 1.5 + if has_any("household", "co-resid", "home"): + score += 1.0 + if attr_type == "boolean": + score -= 2.0 + + elif role_name == "partner_id": + if has_any("partner", "spouse", "husband", "wife"): + score += 3.0 + if name.endswith("_id"): + score += 2.0 + if has_any("agent id", "spouse id", "partner id"): + score += 1.5 + if attr_type == "boolean": + score -= 2.0 + if isinstance(sample_value, str) and ( + sample_value.startswith("agent_") or sample_value.startswith("a") + ): + score += 1.0 + + elif role_name == "age": + if name == "age": + score += 6.0 + if semantic == "age": + score += 3.0 + if has_any("age", "years old", "years_old", "current age"): + score += 2.0 + if attr_type in {"int", "float"}: + score += 1.0 + + elif role_name == "sector": + if semantic in {"employment", "occupation"}: + score += 3.0 + if has_any("employment", "sector", "occupation", "industry", "profession"): + score += 2.5 + if identity == "professional_identity": + score += 1.5 + if attr_type == "boolean": + score -= 1.5 + + elif role_name == "region": + if has_any("region", "state", "province", "county", "city", "country"): + score += 3.0 + if has_any("geography", "location", "district", "zip", "postal"): + score += 1.5 + if scope == "household": + score += 0.5 + + elif role_name == "urbanicity": + if has_any("urban", "rural", "suburban", "metro", "urbanicity"): + score += 4.0 + if has_any("population density", "city type"): + score += 1.0 + + elif role_name == "religion": + if identity == "religious_affiliation": + score += 3.0 + if has_any("relig", "faith", "church", "denomination", "congregation"): + score += 2.5 + if semantic == "occupation": + score -= 1.0 + + elif role_name == "dependents": + if has_any("dependents", "children", "child", "household_members"): + score += 3.0 + if has_any("has_children", "child_present"): + score += 0.5 + if isinstance(sample_value, list): + score += 4.0 + elif isinstance(sample_value, bool): + # Boolean parental flags are not structural dependent records. + score -= 4.0 + if attr_type == "boolean": + score -= 2.0 + + return score + + +def _resolve_structural_roles_deterministic( + population_spec: PopulationSpec, + agents_sample: list[dict] | None = None, +) -> tuple[dict[str, str | None], dict[str, list[str]]]: + """Resolve role mapping deterministically; return ambiguous slots for tie-break.""" + roles = [ + "household_id", + "partner_id", + "age", + "sector", + "region", + "urbanicity", + "religion", + "dependents", + ] + resolved: dict[str, str | None] = {role: None for role in roles} + ambiguous: dict[str, list[str]] = {} + + for role in roles: + scored: list[tuple[float, str]] = [] + for attr in population_spec.attributes: + sample_value = _extract_sample_value(agents_sample, attr.name) + score = _score_structural_role_candidate( + role_name=role, + attr=attr, + sample_value=sample_value, + ) + if score <= 0: + continue + scored.append((score, attr.name)) + + if not scored: + resolved[role] = None + continue + + scored.sort(key=lambda item: (-item[0], item[1])) + best_score, best_attr = scored[0] + second_score = scored[1][0] if len(scored) > 1 else -999.0 + margin = best_score - second_score + + # Confident deterministic pick. + if best_score >= 3.5 and margin >= 0.8: + resolved[role] = best_attr + continue + + # Ambiguous: keep deterministic suggestion but ask LLM to tie-break. + resolved[role] = best_attr + ambiguous[role] = [name for _, name in scored[:3]] + + return resolved, ambiguous + + +def _build_structural_role_prompt( + population_spec: PopulationSpec, + *, + locked_roles: dict[str, str | None] | None = None, + ambiguous_candidates: dict[str, list[str]] | None = None, +) -> str: + """Build structural-role prompt with full-schema visibility.""" + attribute_names = [attr.name for attr in population_spec.attributes] + attr_lines = "\n".join(f"- {name}" for name in attribute_names) + + locked_lines = "" + if locked_roles: + fixed = [ + f"- {role}: {value}" + for role, value in locked_roles.items() + if value is not None and role not in (ambiguous_candidates or {}) + ] + if fixed: + locked_lines = "\nLocked role assignments (do not change):\n" + "\n".join( + fixed + ) + + ambiguous_lines = "" + if ambiguous_candidates: + parts = [] + for role, candidates in ambiguous_candidates.items(): + options = ", ".join(candidates) if candidates else "null" + parts.append(f"- {role}: choose one of [{options}] or null") + ambiguous_lines = ( + "\nAmbiguous roles to decide (only choose from listed options):\n" + + "\n".join(parts) + ) + + return f"""Map structural network roles to exact attribute names from this population. + +Population: {population_spec.meta.description} +Geography/context: {population_spec.meta.geography or "unspecified"} + +Available attribute names: +{attr_lines} +{locked_lines} +{ambiguous_lines} + +Roles to map (return exact attribute name or null): +- household_id: household grouping identifier +- partner_id: partner/spouse agent id reference +- age: person's age +- sector: occupation/employment sector +- region: location bucket (state/province/country/region) +- urbanicity: urban/rural style location bucket +- religion: faith/religious affiliation +- dependents: list of children/dependents + +Rules: +- NEVER invent names; choose only from Available attribute names. +- If role is not represented, return null. +- Keep this mapping pragmatic for structural edges: partner, household, coworker, neighbor, congregation, school_parent. +- For roles listed as ambiguous above, choose only from those candidate options or null. +- Keep locked roles unchanged. """ +def _generate_structural_attribute_roles( + population_spec: PopulationSpec, + model: str | None = None, + agents_sample: list[dict] | None = None, +) -> StructuralAttributeRoles: + """Resolve structural-role mapping deterministically, with LLM tie-break fallback.""" + role_names = ( + "household_id", + "partner_id", + "age", + "sector", + "region", + "urbanicity", + "religion", + "dependents", + ) + deterministic_roles, ambiguous = _resolve_structural_roles_deterministic( + population_spec=population_spec, + agents_sample=agents_sample, + ) + + # If deterministic resolution is confident, skip LLM entirely. + if not ambiguous: + return StructuralAttributeRoles.model_validate(deterministic_roles) + + prompt = _build_structural_role_prompt( + population_spec, + locked_roles=deterministic_roles, + ambiguous_candidates=ambiguous, + ) + data = reasoning_call( + prompt=prompt, + response_schema=STRUCTURAL_ROLE_SCHEMA, + schema_name="structural_roles", + model=model, + reasoning_effort="low", + max_retries=1, + ) + + known_attrs = {attr.name for attr in population_spec.attributes} + roles: dict[str, str | None] = {} + for role_name in role_names: + locked = deterministic_roles.get(role_name) + value = data.get(role_name) + if role_name in ambiguous: + allowed = set(ambiguous[role_name]) + if ( + isinstance(value, str) + and value in known_attrs + and (not allowed or value in allowed) + ): + roles[role_name] = value + else: + roles[role_name] = locked + else: + roles[role_name] = locked + return StructuralAttributeRoles.model_validate(roles) + + def _validate_config(data: dict, population_spec: PopulationSpec) -> list[str]: """Validate the LLM-generated config against the population spec. @@ -523,11 +848,9 @@ def generate_network_config( ) -> NetworkConfig: """Generate a NetworkConfig from a population spec using LLM reasoning. - The LLM analyzes the population's attributes and determines: - - Which attributes create social connections (homophily weights) - - Who are the natural hubs (degree multipliers) - - What types of relationships exist (edge type rules) - - Who influences whom (influence factors) + Uses two focused LLM calls: + 1) core network config (weights, multipliers, edge rules, influence, avg degree) + 2) structural attribute role mapping (household/partner/region/etc.) Args: population_spec: The population specification with attribute definitions @@ -553,13 +876,24 @@ def generate_network_config( ) config = _convert_to_network_config(data, population_spec) + config = config.model_copy( + update={ + "structural_attribute_roles": _generate_structural_attribute_roles( + population_spec, + model=model, + agents_sample=agents_sample, + ) + } + ) logger.info( f"[NetworkConfigGen] Generated config: " f"{len(config.attribute_weights)} weights, " f"{len(config.degree_multipliers)} multipliers, " f"{len(config.edge_type_rules)} edge rules, " - f"{len(config.influence_factors)} influence factors" + f"{len(config.influence_factors)} influence factors, " + f"structural roles=" + f"{sum(1 for v in config.structural_attribute_roles.model_dump().values() if v)}" ) return config diff --git a/extropy/population/network/generator.py b/extropy/population/network/generator.py index 79edd80..6ceddab 100644 --- a/extropy/population/network/generator.py +++ b/extropy/population/network/generator.py @@ -6,6 +6,7 @@ import json import logging import hashlib +import inspect import multiprocessing as mp import random import time @@ -27,6 +28,14 @@ logger = logging.getLogger(__name__) _STATUS_HEARTBEAT_SECONDS = 5.0 +_GATE_NUMERIC_EPSILON = 1e-4 + +try: + import networkx as nx + + HAS_NETWORKX = True +except ImportError: + HAS_NETWORKX = False _SIM_WORKER_AGENTS: list[dict[str, Any]] | None = None _SIM_WORKER_ATTRIBUTE_WEIGHTS = None @@ -1047,6 +1056,114 @@ def _acceptance_bounds( return deg_min, deg_max, clust_min, mod_min, mod_max +def _evaluate_topology_gate( + *, + metrics: dict[str, float], + deg_min: float, + deg_max: float, + cluster_min: float, + mod_min: float, + mod_max: float, + lcc_min: float, + min_edge_floor: int, + epsilon: float = _GATE_NUMERIC_EPSILON, +) -> tuple[bool, dict[str, float]]: + """Evaluate strict topology gate and return deltas vs configured bounds.""" + eps = max(0.0, float(epsilon)) + in_range = ( + (deg_min - eps) <= metrics["avg_degree"] <= (deg_max + eps) + and metrics["clustering"] >= (cluster_min - eps) + and (mod_min - eps) <= metrics["modularity"] <= (mod_max + eps) + and metrics["largest_component_ratio"] >= (lcc_min - eps) + and metrics["edge_count"] >= min_edge_floor + ) + deltas = { + "degree_to_min": metrics["avg_degree"] - deg_min, + "degree_to_max": deg_max - metrics["avg_degree"], + "clustering_to_min": metrics["clustering"] - cluster_min, + "modularity_to_min": metrics["modularity"] - mod_min, + "modularity_to_max": mod_max - metrics["modularity"], + "lcc_to_min": metrics["largest_component_ratio"] - lcc_min, + "edge_count_to_min": metrics["edge_count"] - min_edge_floor, + } + return in_range, deltas + + +def _similarity_reserve_ratio(config: NetworkConfig) -> float: + """Reserve a minimum similarity budget so structural channels do not dominate.""" + if config.quality_profile == "strict": + return 0.45 + if config.quality_profile == "fast": + return 0.25 + return 0.35 + + +def _compute_modularity_louvain( + edges: list[Edge], agent_ids: list[str] +) -> float | None: + """Compute modularity via Louvain on the final graph (same method as metrics.py).""" + if not HAS_NETWORKX: + return None + try: + graph = nx.Graph() + graph.add_nodes_from(agent_ids) + for edge in edges: + graph.add_edge(edge.source, edge.target) + communities = nx.community.louvain_communities(graph, seed=42) + return float(nx.community.modularity(graph, communities)) + except Exception: + return None + + +def _merge_edges_with_structural( + similarity_edges: list[Edge], + structural_edges: list[Edge], +) -> tuple[list[Edge], set[tuple[str, str]], int]: + """Merge structural edges into similarity edges, deduplicating by undirected pair.""" + merged = list(similarity_edges) + edge_set: set[tuple[str, str]] = set() + for edge in merged: + edge_set.add((edge.source, edge.target)) + edge_set.add((edge.target, edge.source)) + + added = 0 + for structural in structural_edges: + if (structural.source, structural.target) in edge_set: + continue + merged.append(structural) + edge_set.add((structural.source, structural.target)) + edge_set.add((structural.target, structural.source)) + added += 1 + + return merged, edge_set, added + + +def _compute_gate_metrics( + *, + edges: list[Edge], + agent_ids: list[str], + communities: list[int] | None, + fallback_modularity: float = 0.0, +) -> dict[str, float]: + """Compute final gate metrics on the realized graph.""" + n = len(agent_ids) + adjacency = _build_adjacency_from_edges(edges, agent_ids, n) + modularity = _compute_modularity_louvain(edges, agent_ids) + if modularity is None: + if communities and len(communities) == n: + modularity = _compute_modularity_fast(edges, agent_ids, communities) + else: + modularity = fallback_modularity + + return { + "edge_count": len(edges), + "avg_degree": (2 * len(edges) / n) if n > 0 else 0.0, + "clustering": _compute_avg_clustering(adjacency, n), + "largest_component_ratio": _compute_largest_component_ratio(adjacency, n), + "modularity": modularity, + } + + def _apply_scale_target_caps( config: NetworkConfig, n: int, @@ -1803,10 +1920,122 @@ def _compute_modularity_fast( return q +def _resolve_structural_keys_from_config( + agents: list[dict[str, Any]], + config: NetworkConfig, +) -> dict[str, str | None]: + """Resolve structural role keys from network config (LLM-selected roles first). + + Primary source: + - config.structural_attribute_roles + + Compatibility fallback (minimal): + - exact canonical field names only when role is unset or missing. + """ + populated_counts: Counter[str] = Counter() + for agent in agents: + for key, value in agent.items(): + if value is None: + continue + if isinstance(value, str) and not value.strip(): + continue + populated_counts[key] += 1 + + defaults: dict[str, tuple[str, ...]] = { + "household_id": ("household_id",), + "partner_id": ("partner_id", "partner_agent_id"), + "age": ("age",), + "sector": ("occupation_sector",), + "region": ("state", "country"), + "urbanicity": ("urban_rural",), + "religion": ("religious_affiliation",), + "dependents": ("dependents",), + } + + roles = config.structural_attribute_roles + resolved: dict[str, str | None] = {} + + for slot, fallback_keys in defaults.items(): + configured = getattr(roles, slot, None) + if configured and populated_counts.get(configured, 0) > 0: + # Config-selected role must win when populated; fallbacks are only backup. + resolved[slot] = configured + continue + candidates: list[str] = [] + if configured: + candidates.append(configured) + for key in fallback_keys: + if key not in candidates: + candidates.append(key) + + present_candidates = [c for c in candidates if populated_counts.get(c, 0) > 0] + if not present_candidates: + resolved[slot] = None + continue + present_candidates.sort(key=lambda k: (-populated_counts[k], k)) + resolved[slot] = present_candidates[0] + + return resolved + + +def _bucket_token(value: Any) -> str | None: + """Convert a value into a stable bucket key token.""" + if value is None: + return None + if isinstance(value, str): + text = value.strip() + if not text: + return None + return text + return str(value) + + +def _dependent_is_school_age(dep: dict[str, Any]) -> bool: + """Detect whether dependent metadata indicates school-age child.""" + school_status_aliases = { + "school_status", + "school_level", + "education_stage", + "student_stage", + "grade_level", + } + school_labels = { + "elementary", + "middle_school", + "high_school", + "primary", + "secondary", + "k12", + "school", + } + for key, value in dep.items(): + if key.strip().lower() not in school_status_aliases: + continue + if isinstance(value, str): + status = value.strip().lower().replace("-", "_").replace(" ", "_") + if status in school_labels: + return True + + age_aliases = {"age", "age_years", "years_old", "current_age"} + age_value: Any = None + for key, value in dep.items(): + if key.strip().lower() in age_aliases: + age_value = value + break + + if isinstance(age_value, str) and age_value.strip().isdigit(): + age_value = int(age_value.strip()) + if isinstance(age_value, (int, float)): + return 5 <= int(age_value) <= 18 + return False + + def _generate_structural_edges( agents: list[dict[str, Any]], agent_ids: list[str], rng: random.Random, + config: NetworkConfig | None = None, + target_edge_budget: int | None = None, ) -> list[Edge]: """Generate deterministic structural edges from agent attributes. @@ -1817,10 +2046,10 @@ def _generate_structural_edges( edges: list[Edge] = [] added: set[tuple[int, int]] = set() - def _add(i: int, j: int, etype: str, weight: float, context: str) -> None: + def _add(i: int, j: int, etype: str, weight: float, context: str) -> bool: pair = (min(i, j), max(i, j)) if pair in added or i == j: - return + return False added.add(pair) edges.append( Edge( @@ -1832,141 +2061,253 @@ def _add(i: int, j: int, etype: str, weight: float, context: str) -> None: context=context, ) ) + return True + + effective_config = config or NetworkConfig() + resolved_keys = _resolve_structural_keys_from_config(agents, effective_config) + household_key = resolved_keys.get("household_id") + partner_key = resolved_keys.get("partner_id") + age_key = resolved_keys.get("age") + sector_key = resolved_keys.get("sector") + region_key = resolved_keys.get("region") + urban_key = resolved_keys.get("urbanicity") + religion_key = resolved_keys.get("religion") + dependents_key = resolved_keys.get("dependents") # Build indexes for batch matching household_map: dict[str, list[int]] = {} - sector_state_map: dict[tuple[str, str], list[int]] = {} - state_urban_map: dict[tuple[str, str], list[int]] = {} - religion_state_map: dict[tuple[str, str], list[int]] = {} + sector_region_map: dict[tuple[str, str], list[int]] = {} + region_urban_map: dict[tuple[str, str], list[int]] = {} + religion_region_map: dict[tuple[str, str], list[int]] = {} school_parent_map: dict[tuple[str, str], list[int]] = {} for idx, agent in enumerate(agents): - hh_id = agent.get("household_id") + hh_id = _bucket_token(agent.get(household_key)) if household_key else None if hh_id: household_map.setdefault(hh_id, []).append(idx) - sector = agent.get("occupation_sector") - state = agent.get("state") - urban = agent.get("urban_rural") + sector = _bucket_token(agent.get(sector_key)) if sector_key else None + region = _bucket_token(agent.get(region_key)) if region_key else None + urban = _bucket_token(agent.get(urban_key)) if urban_key else None + urban_bucket = urban if urban is not None else "__all__" - if sector and state: - sector_state_map.setdefault((sector, state), []).append(idx) - if state and urban: - state_urban_map.setdefault((state, urban), []).append(idx) + if sector and region: + sector_region_map.setdefault((sector, region), []).append(idx) + if region: + region_urban_map.setdefault((region, urban_bucket), []).append(idx) - religion = agent.get("religious_affiliation") + religion = _bucket_token(agent.get(religion_key)) if religion_key else None if ( religion - and state + and region and religion.lower() not in ("none", "atheist", "agnostic") ): - religion_state_map.setdefault((religion, state), []).append(idx) + religion_region_map.setdefault((religion, region), []).append(idx) # School parents: agents with school-age dependents - dependents = agent.get("dependents", []) + dependents_raw = ( + agent.get(dependents_key, []) + if dependents_key + else agent.get("dependents", []) + ) + dependents = dependents_raw if isinstance(dependents_raw, list) else [] has_school_kid = any( - isinstance(d, dict) - and d.get("school_status") in ("elementary", "middle_school", "high_school") - for d in dependents + isinstance(d, dict) and _dependent_is_school_age(d) for d in dependents ) - if has_school_kid and state and urban: - school_parent_map.setdefault((state, urban), []).append(idx) + if has_school_kid and region: + school_parent_map.setdefault((region, urban_bucket), []).append(idx) - # 1. Partner edges (weight 1.0, max 1 per agent) + # 1) Mandatory structural edges: partner + household. + # These are preserved even when they exceed target edge budgets. for idx, agent in enumerate(agents): - partner_id = agent.get("partner_id") + partner_id = agent.get(partner_key) if partner_key else None if partner_id and partner_id in id_to_idx: j = id_to_idx[partner_id] _add(idx, j, "partner", 1.0, "household") - # 2. Household edges (weight 0.9, all members in same household) + # 2) Household edges (co-residence ties). for members in household_map.values(): for i_pos in range(len(members)): for j_pos in range(i_pos + 1, len(members)): _add(members[i_pos], members[j_pos], "household", 0.9, "household") - # 3. Coworker edges (weight 0.6, capped at ~8 per agent) + # Optional structural budget: keep headroom for similarity-based structure. + optional_budget: int | None = None + if target_edge_budget is not None: + optional_budget = max(0, int(target_edge_budget) - len(edges)) + + def _channel_pressure( + pools: dict[tuple[str, str], list[int]], weight: float + ) -> float: + opportunity = sum(max(0, len(pool) - 1) for pool in pools.values()) + if opportunity <= 0: + return 0.0 + # Square-root dampening avoids one giant channel monopolizing budget. + return weight * (opportunity**0.5) + + channel_order = ["coworker", "neighbor", "congregation", "school_parent"] + channel_scores = { + "coworker": _channel_pressure(sector_region_map, 1.00), + "neighbor": _channel_pressure(region_urban_map, 0.80), + "congregation": _channel_pressure(religion_region_map, 0.65), + "school_parent": _channel_pressure(school_parent_map, 0.60), + } + channel_quotas: dict[str, int] | None = None + if optional_budget is not None: + channel_quotas = {name: 0 for name in channel_order} + total_score = sum(channel_scores.values()) + if optional_budget > 0 and total_score > 0: + fractional: list[tuple[float, str]] = [] + allocated = 0 + for name in channel_order: + raw = optional_budget * (channel_scores[name] / total_score) + whole = int(raw) + channel_quotas[name] = whole + allocated += whole + fractional.append((raw - whole, name)) + remainder = max(0, optional_budget - allocated) + fractional.sort(key=lambda item: (-item[0], item[1])) + for _, name in fractional: + if remainder <= 0: + break + channel_quotas[name] += 1 + remainder -= 1 + + def _quota_for(channel: str) -> int | None: + if channel_quotas is None: + return None + return channel_quotas.get(channel, 0) + + # 3) Coworker edges (weight 0.6, locally capped). _MAX_COWORKER = 8 coworker_count: dict[int, int] = {} - for pool in sector_state_map.values(): + coworker_added = 0 + coworker_quota = _quota_for("coworker") + for pool in sector_region_map.values(): + if coworker_quota is not None and coworker_added >= coworker_quota: + break if len(pool) < 2: continue shuffled = list(pool) rng.shuffle(shuffled) for i_pos, i in enumerate(shuffled): + if coworker_quota is not None and coworker_added >= coworker_quota: + break if coworker_count.get(i, 0) >= _MAX_COWORKER: continue for j in shuffled[i_pos + 1 :]: + if coworker_quota is not None and coworker_added >= coworker_quota: + break if coworker_count.get(j, 0) >= _MAX_COWORKER: continue if coworker_count.get(i, 0) >= _MAX_COWORKER: break - _add(i, j, "coworker", 0.6, "workplace") - coworker_count[i] = coworker_count.get(i, 0) + 1 - coworker_count[j] = coworker_count.get(j, 0) + 1 + if _add(i, j, "coworker", 0.6, "workplace"): + coworker_count[i] = coworker_count.get(i, 0) + 1 + coworker_count[j] = coworker_count.get(j, 0) + 1 + coworker_added += 1 - # 4. Neighbor edges (weight 0.4, capped at ~4, age within 15yr) + # 4) Neighbor edges (weight 0.4, locally capped, age-bounded). _MAX_NEIGHBOR = 4 neighbor_count: dict[int, int] = {} - for pool in state_urban_map.values(): + neighbor_added = 0 + neighbor_quota = _quota_for("neighbor") + for pool in region_urban_map.values(): + if neighbor_quota is not None and neighbor_added >= neighbor_quota: + break if len(pool) < 2: continue shuffled = list(pool) rng.shuffle(shuffled) for i_pos, i in enumerate(shuffled): + if neighbor_quota is not None and neighbor_added >= neighbor_quota: + break if neighbor_count.get(i, 0) >= _MAX_NEIGHBOR: continue - age_i = agents[i].get("age", 40) + age_i_raw = agents[i].get(age_key) if age_key else None + if isinstance(age_i_raw, str) and age_i_raw.strip().isdigit(): + age_i_raw = int(age_i_raw.strip()) + age_i = age_i_raw if isinstance(age_i_raw, (int, float)) else 40 for j in shuffled[i_pos + 1 :]: + if neighbor_quota is not None and neighbor_added >= neighbor_quota: + break if neighbor_count.get(j, 0) >= _MAX_NEIGHBOR: continue if neighbor_count.get(i, 0) >= _MAX_NEIGHBOR: break - age_j = agents[j].get("age", 40) + age_j_raw = agents[j].get(age_key) if age_key else None + if isinstance(age_j_raw, str) and age_j_raw.strip().isdigit(): + age_j_raw = int(age_j_raw.strip()) + age_j = age_j_raw if isinstance(age_j_raw, (int, float)) else 40 if abs(age_i - age_j) <= 15: - _add(i, j, "neighbor", 0.4, "neighborhood") - neighbor_count[i] = neighbor_count.get(i, 0) + 1 - neighbor_count[j] = neighbor_count.get(j, 0) + 1 + if _add(i, j, "neighbor", 0.4, "neighborhood"): + neighbor_count[i] = neighbor_count.get(i, 0) + 1 + neighbor_count[j] = neighbor_count.get(j, 0) + 1 + neighbor_added += 1 - # 5. Congregation edges (weight 0.4, capped at ~4) + # 5) Congregation edges (weight 0.4, locally capped). _MAX_CONGREGATION = 4 congregation_count: dict[int, int] = {} - for pool in religion_state_map.values(): + congregation_added = 0 + congregation_quota = _quota_for("congregation") + for pool in religion_region_map.values(): + if congregation_quota is not None and congregation_added >= congregation_quota: + break if len(pool) < 2: continue shuffled = list(pool) rng.shuffle(shuffled) for i_pos, i in enumerate(shuffled): + if ( + congregation_quota is not None + and congregation_added >= congregation_quota + ): + break if congregation_count.get(i, 0) >= _MAX_CONGREGATION: continue for j in shuffled[i_pos + 1 :]: + if ( + congregation_quota is not None + and congregation_added >= congregation_quota + ): + break if congregation_count.get(j, 0) >= _MAX_CONGREGATION: continue if congregation_count.get(i, 0) >= _MAX_CONGREGATION: break - _add(i, j, "congregation", 0.4, "congregation") - congregation_count[i] = congregation_count.get(i, 0) + 1 - congregation_count[j] = congregation_count.get(j, 0) + 1 + if _add(i, j, "congregation", 0.4, "congregation"): + congregation_count[i] = congregation_count.get(i, 0) + 1 + congregation_count[j] = congregation_count.get(j, 0) + 1 + congregation_added += 1 - # 6. School parent edges (weight 0.35, capped at ~3) + # 6) School-parent edges (weight 0.35, locally capped). _MAX_SCHOOL_PARENT = 3 school_count: dict[int, int] = {} + school_added = 0 + school_quota = _quota_for("school_parent") for pool in school_parent_map.values(): + if school_quota is not None and school_added >= school_quota: + break if len(pool) < 2: continue shuffled = list(pool) rng.shuffle(shuffled) for i_pos, i in enumerate(shuffled): + if school_quota is not None and school_added >= school_quota: + break if school_count.get(i, 0) >= _MAX_SCHOOL_PARENT: continue for j in shuffled[i_pos + 1 :]: + if school_quota is not None and school_added >= school_quota: + break if school_count.get(j, 0) >= _MAX_SCHOOL_PARENT: continue if school_count.get(i, 0) >= _MAX_SCHOOL_PARENT: break - _add(i, j, "school_parent", 0.35, "school") - school_count[i] = school_count.get(i, 0) + 1 - school_count[j] = school_count.get(j, 0) + 1 + if _add(i, j, "school_parent", 0.35, "school"): + school_count[i] = school_count.get(i, 0) + 1 + school_count[j] = school_count.get(j, 0) + 1 + school_added += 1 return edges @@ -2165,11 +2506,19 @@ def _stage_plan() -> list[dict[str, Any]]: stage_plan = _stage_plan() elapsed_budget = max(1, int(config.max_calibration_minutes * 60)) stage_budget = max(30, elapsed_budget // max(1, len(stage_plan))) + target_edge_budget = max(1, int(round(n * config.avg_degree / 2.0))) + structural_edge_budget = max( + 1, + int(round(target_edge_budget * (1.0 - _similarity_reserve_ratio(config)))), + ) - accepted = False + calibration_accepted = False best_score = float("inf") - best_edges: list[Edge] | None = None - best_metrics: dict[str, float] | None = None + best_similarity_edges: list[Edge] | None = None + best_structural_edges: list[Edge] | None = None + best_structural_pair_set: set[tuple[str, str]] | None = None + calibration_best_metrics: dict[str, float] | None = None + calibration_best_communities: list[int] | None = None best_stage = "" final_candidate_mode = config.candidate_mode final_blocking_attrs: list[str] = [] @@ -2183,10 +2532,6 @@ def _stage_plan() -> list[dict[str, Any]]: * config.max_calibration_iterations, ) - # Initialized before stage loop; populated in Step 3b inside the loop. - structural_edges: list[Edge] = [] - structural_pair_set: set[tuple[str, str]] = set() - for stage_idx, stage in enumerate(stage_plan): if time.time() - started_at >= elapsed_budget: break @@ -2418,31 +2763,47 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: ) continue - # Step 3b: Generate structural edges first (structural-first ordering). - # Structural edges consume part of the degree budget; similarity - # calibration targets the remainder. - structural_edges = _generate_structural_edges(agents, agent_ids, rng) - structural_pair_set: set[tuple[str, str]] = set() - for se in structural_edges: - structural_pair_set.add((se.source, se.target)) - structural_pair_set.add((se.target, se.source)) + # Step 3b: Generate structural edges first with a global budget. + structural_fn = _generate_structural_edges + sig = inspect.signature(structural_fn) + structural_kwargs: dict[str, Any] = {} + if "config" in sig.parameters: + structural_kwargs["config"] = stage_cfg + if "target_edge_budget" in sig.parameters: + structural_kwargs["target_edge_budget"] = structural_edge_budget + if structural_kwargs: + stage_structural_edges = structural_fn( + agents, agent_ids, rng, **structural_kwargs + ) + else: + stage_structural_edges = structural_fn(agents, agent_ids, rng) + stage_structural_pair_set: set[tuple[str, str]] = set() + for se in stage_structural_edges: + stage_structural_pair_set.add((se.source, se.target)) + stage_structural_pair_set.add((se.target, se.source)) structural_degree: Counter[str] = Counter() - for se in structural_edges: + for se in stage_structural_edges: structural_degree[se.source] += 1 structural_degree[se.target] += 1 avg_structural = ( - sum(structural_degree.values()) / max(n, 1) if structural_edges else 0.0 + sum(structural_degree.values()) / max(n, 1) + if stage_structural_edges + else 0.0 ) - # Reduce similarity target by average structural degree - similarity_target = max(1.0, config.avg_degree - avg_structural) + # Keep enough residual degree for similarity edges. + residual_target = max(1.0, config.avg_degree - avg_structural) + similarity_target = max( + 1.0, + min(config.avg_degree, residual_target), + ) stage_cfg = stage_cfg.model_copy(update={"avg_degree": similarity_target}) logger.info( "[NETWORK] Structural edges: %d (avg structural degree: %.2f, " "similarity target: %.2f)", - len(structural_edges), + len(stage_structural_edges), avg_structural, similarity_target, ) @@ -2487,20 +2848,28 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: }, ) iter_rng = random.Random(restart_seed + iteration * 1000) - edges, avg_degree, clustering, modularity, largest_component_ratio = ( - _generate_network_single_pass( - agents, - agent_ids, - similarities, - communities, - degree_factors, - stage_cfg, - intra_scale, - inter_scale, - iter_rng, - structural_pairs=structural_pair_set, - ) + edges, _, _, _, _ = _generate_network_single_pass( + agents, + agent_ids, + similarities, + communities, + degree_factors, + stage_cfg, + intra_scale, + inter_scale, + iter_rng, + structural_pairs=stage_structural_pair_set, ) + combined_edges, _, _ = _merge_edges_with_structural( + edges, stage_structural_edges + ) + adjacency = _build_adjacency_from_edges(combined_edges, agent_ids, n) + avg_degree = 2 * len(combined_edges) / n if n > 0 else 0.0 + clustering = _compute_avg_clustering(adjacency, n) + modularity = _compute_modularity_fast( + combined_edges, agent_ids, communities + ) + largest_component_ratio = _compute_largest_component_ratio(adjacency, n) lcc_deficit = max( 0.0, config.target_largest_component_ratio - largest_component_ratio ) @@ -2527,17 +2896,23 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: iter_rng, max_swaps_override=swap_budget, ) + combined_edges, _, _ = _merge_edges_with_structural( + edges, stage_structural_edges + ) emit_progress( "Repair pass", iteration + 1, config.max_calibration_iterations, message={"stage": stage_name, "restart": restart + 1}, ) - adjacency = _build_adjacency_from_edges(edges, agent_ids, n) + adjacency = _build_adjacency_from_edges(combined_edges, agent_ids, n) + avg_degree = 2 * len(combined_edges) / n if n > 0 else 0.0 clustering = _compute_avg_clustering(adjacency, n) - modularity = _compute_modularity_fast(edges, agent_ids, communities) + modularity = _compute_modularity_fast( + combined_edges, agent_ids, communities + ) largest_component_ratio = _compute_largest_component_ratio(adjacency, n) - edge_count = len(edges) + edge_count = len(combined_edges) score = 0.0 if avg_degree < deg_min: @@ -2583,8 +2958,11 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: stage_best_metrics = metrics_payload if score < best_score: best_score = score - best_edges = edges - best_metrics = metrics_payload + best_similarity_edges = list(edges) + best_structural_edges = list(stage_structural_edges) + best_structural_pair_set = set(stage_structural_pair_set) + calibration_best_metrics = metrics_payload + calibration_best_communities = list(communities) best_stage = stage_name if calibration_run_id and study_db_file is not None: @@ -2621,7 +2999,7 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: if in_range: stage_accepted = True - accepted = True + calibration_accepted = True if calibration_run_id and study_db_file is not None: with open_study_db(study_db_file) as db: db.complete_network_calibration_run( @@ -2692,24 +3070,12 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: emit_progress( "Calibrating network", calibration_total, calibration_total, force_db=True ) - edges = best_edges or [] - - # Rebuild edge_set from best edges - edge_set: set[tuple[str, str]] = set() - for edge in edges: - edge_set.add((edge.source, edge.target)) - edge_set.add((edge.target, edge.source)) - - # Step 4b: Merge pre-generated structural edges into similarity edges. - # Structural edges were generated before calibration (Step 3b) and the - # similarity budget was reduced accordingly. Now merge them in. - structural_added = 0 - for se in structural_edges: - if (se.source, se.target) not in edge_set: - edges.append(se) - edge_set.add((se.source, se.target)) - edge_set.add((se.target, se.source)) - structural_added += 1 + similarity_edges = best_similarity_edges or [] + chosen_structural_edges = best_structural_edges or [] + chosen_structural_pair_set = best_structural_pair_set or set() + edges, edge_set, structural_added = _merge_edges_with_structural( + similarity_edges, chosen_structural_edges + ) if structural_added > 0: emit_progress( @@ -2718,12 +3084,31 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: structural_added, message={ "structural_added": structural_added, - "total_structural": len(structural_edges), + "total_structural": len(chosen_structural_edges), }, force_db=True, ) # Step 5: Watts-Strogatz rewiring (skip structural edges) + pre_rewire_edges = list(edges) + pre_rewire_edge_set = set(edge_set) + pre_rewire_metrics = _compute_gate_metrics( + edges=pre_rewire_edges, + agent_ids=agent_ids, + communities=calibration_best_communities, + fallback_modularity=(calibration_best_metrics or {}).get("modularity", 0.0), + ) + pre_rewire_accepted, pre_rewire_deltas = _evaluate_topology_gate( + metrics=pre_rewire_metrics, + deg_min=deg_min, + deg_max=deg_max, + cluster_min=cluster_min, + mod_min=mod_min, + mod_max=mod_max, + lcc_min=config.target_largest_component_ratio, + min_edge_floor=min_edge_floor, + ) + emit_progress("Rewiring edges", 0, len(edges), force_db=True) edges, edge_set, rewired_count = _apply_rewiring( agents, @@ -2732,18 +3117,62 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: edge_set, config, rng, - protected_pairs=structural_pair_set, + protected_pairs=chosen_structural_pair_set, ) emit_progress("Rewiring edges", len(edges), len(edges), force_db=True) - quality_deltas = { - "degree_to_min": (best_metrics or {}).get("avg_degree", 0.0) - deg_min, - "degree_to_max": deg_max - (best_metrics or {}).get("avg_degree", 0.0), - "clustering_to_min": (best_metrics or {}).get("clustering", 0.0) - cluster_min, - "modularity_to_min": (best_metrics or {}).get("modularity", 0.0) - mod_min, - "modularity_to_max": mod_max - (best_metrics or {}).get("modularity", 0.0), - "lcc_to_min": (best_metrics or {}).get("largest_component_ratio", 0.0) + post_rewire_metrics = _compute_gate_metrics( + edges=edges, + agent_ids=agent_ids, + communities=calibration_best_communities, + fallback_modularity=(calibration_best_metrics or {}).get("modularity", 0.0), + ) + + post_rewire_accepted, post_rewire_deltas = _evaluate_topology_gate( + metrics=post_rewire_metrics, + deg_min=deg_min, + deg_max=deg_max, + cluster_min=cluster_min, + mod_min=mod_min, + mod_max=mod_max, + lcc_min=config.target_largest_component_ratio, + min_edge_floor=min_edge_floor, + ) + rewire_gate_fallback_used = False + reverted_rewired_count = 0 + if pre_rewire_accepted and not post_rewire_accepted: + # Rewiring is an optimization pass. If it breaks a gate-valid graph, + # keep the calibrated pre-rewire network as the canonical result. + edges = pre_rewire_edges + edge_set = pre_rewire_edge_set + final_metrics = pre_rewire_metrics + final_accepted = True + quality_deltas = pre_rewire_deltas + reverted_rewired_count = rewired_count + rewired_count = 0 + rewire_gate_fallback_used = True + else: + final_metrics = post_rewire_metrics + final_accepted = post_rewire_accepted + quality_deltas = post_rewire_deltas + + calibration_quality_deltas = { + "degree_to_min": (calibration_best_metrics or {}).get("avg_degree", 0.0) + - deg_min, + "degree_to_max": deg_max + - (calibration_best_metrics or {}).get("avg_degree", 0.0), + "clustering_to_min": (calibration_best_metrics or {}).get("clustering", 0.0) + - cluster_min, + "modularity_to_min": (calibration_best_metrics or {}).get("modularity", 0.0) + - mod_min, + "modularity_to_max": mod_max + - (calibration_best_metrics or {}).get("modularity", 0.0), + "lcc_to_min": (calibration_best_metrics or {}).get( + "largest_component_ratio", 0.0 + ) - config.target_largest_component_ratio, + "edge_count_to_min": (calibration_best_metrics or {}).get("edge_count", 0.0) + - min_edge_floor, } meta = { @@ -2763,14 +3192,26 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: "target_clustering": config.target_clustering, "target_modularity": config.target_modularity, "quality_profile": config.quality_profile, + "target_edge_budget": target_edge_budget, + "structural_edge_budget": structural_edge_budget, }, "quality": { "topology_gate": config.topology_gate, - "accepted": accepted, + "accepted": final_accepted, "best_score": best_score, - "best_metrics": best_metrics or {}, + "best_metrics": calibration_best_metrics or {}, + "final_metrics": final_metrics, + "pre_rewire_metrics": pre_rewire_metrics, + "post_rewire_metrics": post_rewire_metrics, + "pre_rewire_gate_accepted": pre_rewire_accepted, + "post_rewire_gate_accepted": post_rewire_accepted, + "rewire_gate_fallback_used": rewire_gate_fallback_used, + "gate_numeric_epsilon": _GATE_NUMERIC_EPSILON, + "rewired_count_reverted": reverted_rewired_count, + "calibration_accepted": calibration_accepted, "best_stage": best_stage, "gate_deltas": quality_deltas, + "calibration_gate_deltas": calibration_quality_deltas, "target_caps_applied": target_caps, "bounds": { "degree_min": deg_min, @@ -2783,7 +3224,7 @@ def similarity_progress(_stage: str, current: int, total: int) -> None: }, "ladder_stages": stage_summaries, }, - "structural_edge_count": len(structural_edges), + "structural_edge_count": len(chosen_structural_edges), "structural_edges_added": structural_added, "resume_calibration_requested": resume_calibration, "generated_at": datetime.now().isoformat(), diff --git a/extropy/population/persona/__init__.py b/extropy/population/persona/__init__.py index 27d8c1b..68140b4 100644 --- a/extropy/population/persona/__init__.py +++ b/extropy/population/persona/__init__.py @@ -22,6 +22,7 @@ from .generator import generate_persona_config, PersonaConfigError from .renderer import render_persona, render_persona_section, preview_persona from .stats import compute_population_stats +from .validator import validate_persona_config __all__ = [ # Config models @@ -45,4 +46,6 @@ "preview_persona", # Stats "compute_population_stats", + # Validator + "validate_persona_config", ] diff --git a/extropy/population/persona/renderer.py b/extropy/population/persona/renderer.py index 34dba55..1238e76 100644 --- a/extropy/population/persona/renderer.py +++ b/extropy/population/persona/renderer.py @@ -126,17 +126,40 @@ def _format_boolean_value(value: Any, phrasing: BooleanPhrasing) -> str: # Handle various boolean representations if isinstance(value, bool): - return phrasing.true_phrase if value else phrasing.false_phrase + phrase = phrasing.true_phrase if value else phrasing.false_phrase + return _sanitize_boolean_phrase(phrase, value) if isinstance(value, str): - return ( - phrasing.true_phrase - if value.lower() in ("true", "yes", "1") - else phrasing.false_phrase - ) + truthy = value.lower() in ("true", "yes", "1") + phrase = phrasing.true_phrase if truthy else phrasing.false_phrase + return _sanitize_boolean_phrase(phrase, truthy) if isinstance(value, (int, float)): - return phrasing.true_phrase if value else phrasing.false_phrase + truthy = bool(value) + phrase = phrasing.true_phrase if truthy else phrasing.false_phrase + return _sanitize_boolean_phrase(phrase, truthy) + + return _sanitize_boolean_phrase(phrasing.false_phrase, False) + - return phrasing.false_phrase +def _sanitize_boolean_phrase(phrase: str, truthy: bool) -> str: + """Deterministically sanitize boolean phrases for rendering.""" + clean = phrase.strip() + if not clean: + return "I do." if truthy else "I do not." + + raw_token_map = { + "true": "I do.", + "yes": "I do.", + "false": "I do not.", + "no": "I do not.", + } + token_key = clean.lower() + if token_key in raw_token_map: + return raw_token_map[token_key] + + lowered = clean.lower() + if not lowered.startswith(("i ", "i'", "i’m", "i'm", "my ")): + clean = f"I {clean[0].lower()}{clean[1:]}" if len(clean) > 1 else f"I {clean}" + return clean def _format_categorical_value(value: Any, phrasing: CategoricalPhrasing) -> str: @@ -196,7 +219,16 @@ def render_attribute(attr_name: str, value: Any, config: PersonaConfig) -> str: elif isinstance(phrasing, CategoricalPhrasing): return _format_categorical_value(value, phrasing) elif isinstance(phrasing, RelativePhrasing): - return _format_relative_value(value, phrasing, config) + relative = _format_relative_value(value, phrasing, config) + concrete = next( + (p for p in config.phrasings.concrete if p.attribute == attr_name), + None, + ) + if concrete and value is not None: + concrete_text = _format_concrete_value(value, concrete) + if concrete_text: + return f"{relative} ({concrete_text})" + return relative elif isinstance(phrasing, ConcretePhrasing): return _format_concrete_value(value, phrasing) @@ -279,6 +311,86 @@ def _ensure_period(phrase: str) -> str: return phrase +def _join_with_and(items: list[str]) -> str: + """Join items with commas and final 'and'.""" + if not items: + return "" + if len(items) == 1: + return items[0] + if len(items) == 2: + return f"{items[0]} and {items[1]}" + return ", ".join(items[:-1]) + f", and {items[-1]}" + + +def _extract_average_descriptor(phrase: str, attr_name: str) -> str: + """Extract readable descriptor from repetitive average-relative phrase.""" + text = phrase.strip() + + patterns = ( + r"(?i)about as (.+?) as most people", + r"(?i)^(.+?) is about the same as most people", + ) + for pattern in patterns: + match = re.search(pattern, text) + if match: + descriptor = match.group(1).strip(" .") + if descriptor: + # Keep descriptor as a neutral noun/phrase. + if descriptor.lower().startswith("i "): + descriptor = descriptor[2:].strip() + if descriptor.lower().startswith("my "): + descriptor = descriptor[3:].strip() + if descriptor.lower().startswith("much "): + descriptor = descriptor[5:].strip() + return descriptor + + return attr_name.replace("_", " ") + + +def _compact_repetitive_average_relative_phrases( + entries: list[tuple[str, str, str | None]], +) -> list[tuple[str, str, str | None]]: + """Collapse repetitive 'about ... as most people' relative phrases. + + Keeps semantics but avoids copy-paste sounding sections when many traits land + in the average bucket. + """ + avg_idx: list[int] = [] + descriptors: list[str] = [] + + for idx, (attr_name, phrase, treatment) in enumerate(entries): + if treatment != "relative": + continue + low = phrase.lower() + if "as most people" not in low and "same as most people" not in low: + continue + avg_idx.append(idx) + desc = _extract_average_descriptor(phrase, attr_name) + if desc and desc not in descriptors: + descriptors.append(desc) + + # Only compact when repetition is clearly noisy. + if len(avg_idx) < 3 or len(descriptors) < 3: + return entries + + summary = ( + "On these traits, I'm pretty middle-of-the-road: " + f"{_join_with_and(descriptors)}." + ) + + compacted: list[tuple[str, str, str | None]] = [] + inserted = False + for idx, entry in enumerate(entries): + if idx in avg_idx: + if not inserted: + compacted.append(("relative_average_summary", summary, "relative")) + inserted = True + continue + compacted.append(entry) + + return compacted + + def render_intro( agent: dict[str, Any], config: PersonaConfig, @@ -589,17 +701,26 @@ def render_persona( if not group_obj: continue - # render_intro() already emits "## Who I Am" — skip duplicate + # render_intro() already emits "## Who I Am" — skip duplicate entirely if group_obj.label == "Who I Am": - lines = [""] - else: - lines = [f"## {group_obj.label}", ""] - phrases = [] + continue + + lines = [f"## {group_obj.label}", ""] + phrase_entries: list[tuple[str, str, str | None]] = [] for attr_name in remaining_attrs: value = agent.get(attr_name) phrase = render_attribute(attr_name, value, config) if phrase: - phrases.append(_ensure_period(phrase)) + treatment = config.get_treatment(attr_name) + treatment_type = ( + treatment.treatment.value if treatment is not None else None + ) + phrase_entries.append( + (attr_name, _ensure_period(phrase), treatment_type) + ) + + phrase_entries = _compact_repetitive_average_relative_phrases(phrase_entries) + phrases = [phrase for _, phrase, _ in phrase_entries] if not phrases: continue diff --git a/extropy/population/persona/validator.py b/extropy/population/persona/validator.py new file mode 100644 index 0000000..7d6e3c5 --- /dev/null +++ b/extropy/population/persona/validator.py @@ -0,0 +1,183 @@ +"""Persona config validation against merged population attributes.""" + +from __future__ import annotations + +import re + +from ...core.models import PopulationSpec, CategoricalDistribution +from ...core.models.validation import ValidationResult +from .config import PersonaConfig +from .renderer import extract_intro_attributes + + +def _normalize_token(value: str) -> str: + token = value.strip().lower() + token = re.sub(r"[\s\-]+", "_", token) + token = re.sub(r"[^a-z0-9_]", "", token) + token = re.sub(r"_+", "_", token).strip("_") + return token + + +def validate_persona_config( + spec: PopulationSpec, config: PersonaConfig +) -> ValidationResult: + """Validate persona config coverage and phrase completeness.""" + result = ValidationResult() + attr_map = {attr.name: attr for attr in spec.attributes} + attr_names = set(attr_map.keys()) + + treatment_attrs = [t.attribute for t in config.treatments] + treatment_set = set(treatment_attrs) + + # Treatments must cover merged attributes exactly once. + missing_treatments = sorted(attr_names - treatment_set) + unknown_treatments = sorted(treatment_set - attr_names) + duplicate_treatments = sorted( + name for name in treatment_set if treatment_attrs.count(name) > 1 + ) + + for name in missing_treatments: + result.add_error( + category="PERSONA_COVERAGE", + location="treatments", + message=f"missing treatment for attribute '{name}'", + suggestion="add treatment entry for this attribute", + ) + for name in unknown_treatments: + result.add_error( + category="PERSONA_COVERAGE", + location="treatments", + message=f"treatment references unknown attribute '{name}'", + ) + for name in duplicate_treatments: + result.add_error( + category="PERSONA_COVERAGE", + location="treatments", + message=f"duplicate treatment entries for '{name}'", + ) + + # Group membership completeness and uniqueness. + group_member_counts: dict[str, int] = {} + for group in config.groups: + for attr_name in group.attributes: + if attr_name not in attr_names: + result.add_error( + category="PERSONA_GROUP", + location=f"groups.{group.name}", + message=f"group references unknown attribute '{attr_name}'", + ) + continue + group_member_counts[attr_name] = group_member_counts.get(attr_name, 0) + 1 + + for attr_name in sorted(attr_names): + count = group_member_counts.get(attr_name, 0) + if count == 0: + result.add_error( + category="PERSONA_GROUP", + location="groups", + message=f"attribute '{attr_name}' is not assigned to any group", + ) + elif count > 1: + result.add_error( + category="PERSONA_GROUP", + location="groups", + message=f"attribute '{attr_name}' appears in multiple groups", + ) + + # Intro template references must resolve to known attributes. + intro_refs = extract_intro_attributes(config.intro_template) + unknown_intro_refs = sorted(intro_refs - attr_names) + for ref in unknown_intro_refs: + result.add_error( + category="PERSONA_INTRO", + location="intro_template", + message=f"intro_template references unknown attribute '{ref}'", + ) + + # Build phrasing lookup maps. + bool_map = {p.attribute: p for p in config.phrasings.boolean} + cat_map = {p.attribute: p for p in config.phrasings.categorical} + rel_map = {p.attribute: p for p in config.phrasings.relative} + conc_map = {p.attribute: p for p in config.phrasings.concrete} + + treatment_lookup = {t.attribute: t.treatment.value for t in config.treatments} + + for attr in spec.attributes: + attr_name = attr.name + + if attr.type == "boolean": + phr = bool_map.get(attr_name) + if phr is None: + result.add_error( + category="PERSONA_PHRASING", + location="phrasings.boolean", + message=f"missing boolean phrasing for '{attr_name}'", + ) + else: + if not phr.true_phrase.strip() or not phr.false_phrase.strip(): + result.add_error( + category="PERSONA_PHRASING", + location=f"phrasings.boolean.{attr_name}", + message="boolean phrasing must define non-empty true/false phrases", + ) + raw_tokens = {"true", "false", "yes", "no"} + if phr.true_phrase.strip().lower() in raw_tokens: + result.add_warning( + category="PERSONA_PHRASING", + location=f"phrasings.boolean.{attr_name}", + message="true_phrase is raw token-like; use natural first-person text", + ) + if phr.false_phrase.strip().lower() in raw_tokens: + result.add_warning( + category="PERSONA_PHRASING", + location=f"phrasings.boolean.{attr_name}", + message="false_phrase is raw token-like; use natural first-person text", + ) + + if attr.type == "categorical": + phr = cat_map.get(attr_name) + if phr is None: + result.add_error( + category="PERSONA_PHRASING", + location="phrasings.categorical", + message=f"missing categorical phrasing for '{attr_name}'", + ) + else: + dist = attr.sampling.distribution + if isinstance(dist, CategoricalDistribution): + expected = {_normalize_token(opt) for opt in dist.options} + actual = {_normalize_token(opt) for opt in phr.phrases.keys()} + if expected != actual: + missing = sorted(expected - actual) + extra = sorted(actual - expected) + detail = [] + if missing: + detail.append(f"missing={missing}") + if extra: + detail.append(f"extra={extra}") + result.add_error( + category="PERSONA_PHRASING", + location=f"phrasings.categorical.{attr_name}", + message="categorical option coverage mismatch: " + + ", ".join(detail), + ) + + treatment = treatment_lookup.get(attr_name) + if treatment == "relative" and attr_name not in rel_map: + result.add_error( + category="PERSONA_PHRASING", + location="phrasings.relative", + message=f"missing relative phrasing for '{attr_name}'", + ) + if ( + treatment == "concrete" + and attr.type in {"int", "float"} + and attr_name not in conc_map + ): + result.add_error( + category="PERSONA_PHRASING", + location="phrasings.concrete", + message=f"missing concrete phrasing for '{attr_name}'", + ) + + return result diff --git a/extropy/population/sampler/core.py b/extropy/population/sampler/core.py index 4e76d69..a791420 100644 --- a/extropy/population/sampler/core.py +++ b/extropy/population/sampler/core.py @@ -14,6 +14,7 @@ import sqlite3 from datetime import datetime from pathlib import Path +import re from typing import Any, Literal from ...core.models import ( @@ -22,7 +23,9 @@ SamplingStats, SamplingResult, HouseholdConfig, - NameConfig, + HouseholdType, + SamplingSemanticRoles, + MaritalRoles, ) from ...utils.callbacks import ItemProgressCallback from .distributions import sample_distribution, coerce_to_type @@ -32,6 +35,7 @@ household_needs_kids, correlate_partner_attribute, generate_dependents, + choose_partner_gender, ) from .modifiers import apply_modifiers_and_sample from ...utils.eval_safe import eval_formula, FormulaError @@ -112,6 +116,110 @@ def _coerce_minor_income(value: Any, options: list[str] | None) -> Any: return 0 +def _coerce_young_adult_education(value: Any, age: int, options: list[str]) -> Any: + """Coerce implausible early education stages for young adults.""" + if age >= 22: + return value + if not isinstance(value, str): + return value + + def stage(option: str) -> int: + token = _normalize_attr_token(option) + if any( + k in token for k in ("phd", "doctorate", "doctoral", "graduate", "masters") + ): + return 5 + if any(k in token for k in ("bachelor", "ba", "bs")): + return 4 + if "associate" in token: + return 3 + if "some_college" in token or "college" in token: + return 2 + if "high_school" in token or "hs" in token or "ged" in token: + return 1 + return 0 + + current_stage = stage(value) + if age < 20 and current_stage >= 4: + allowed_max = 2 + elif age < 22 and current_stage >= 5: + allowed_max = 4 + else: + return value + + candidates = [opt for opt in options if stage(opt) <= allowed_max] + if not candidates: + return value + return max(candidates, key=stage) + + +def _coerce_early_retirement(value: Any, age: int, options: list[str]) -> Any: + """Coerce retirement status for very young adults.""" + if age >= 30: + return value + if not isinstance(value, str): + return value + + value_token = _normalize_attr_token(value) + if "retired" not in value_token: + return value + + preferred_tokens = ( + "student", + "intern", + "part_time", + "gig", + "self", + "private", + "public", + "government", + "unemployed", + "labor_force", + "employed", + ) + for token in preferred_tokens: + for opt in options: + norm = _normalize_attr_token(opt) + if "retired" in norm: + continue + if token in norm: + return opt + + for opt in options: + if "retired" not in _normalize_attr_token(opt): + return opt + return value + + +def _normalize_young_adult_attributes( + agent: dict[str, Any], + spec: PopulationSpec, +) -> None: + """Normalize rare but implausible lifecycle combinations for young adults.""" + age = agent.get("age") + if not isinstance(age, (int, float)): + return + age_int = int(age) + if age_int >= 30: + return + + for attr in spec.attributes: + if attr.name not in agent: + continue + if ( + attr.sampling.distribution is None + or not hasattr(attr.sampling.distribution, "options") + or not attr.sampling.distribution.options + ): + continue + options = list(attr.sampling.distribution.options) + value = agent[attr.name] + if attr.semantic_type == "education": + agent[attr.name] = _coerce_young_adult_education(value, age_int, options) + elif attr.semantic_type == "employment": + agent[attr.name] = _coerce_early_retirement(value, age_int, options) + + def _normalize_minor_attributes( agent: dict[str, Any], spec: PopulationSpec, @@ -176,6 +284,120 @@ def _has_household_attributes(spec: PopulationSpec) -> bool: return any(attr.scope == "household" for attr in spec.attributes) +_GENERIC_CITIZENSHIP_VALUES = { + "citizen", + "citizenship", + "noncitizen", + "non_citizen", + "non citizen", + "resident", + "permanent_resident", + "permanent resident", + "immigrant", + "non_immigrant", + "non immigrant", + "unknown", + "na", + "n_a", + "n/a", +} + + +def _extract_country_from_citizenship(value: str) -> str | None: + """Extract country-like token from citizenship-style values. + + Examples: + - "US citizen" -> "US" + - "citizen of India" -> "India" + - "non_citizen" -> None + """ + text = value.strip() + if not text: + return None + + normalized = _normalize_attr_token(text) + if normalized in _GENERIC_CITIZENSHIP_VALUES: + return None + + cleaned = text + for pattern in ( + r"\bcitizenship\b", + r"\bcitizen\b", + r"\bnationality\b", + r"\bnational\b", + r"\bpermanent resident\b", + r"\bresident\b", + r"\bpassport\b", + r"\bholder\b", + r"\bof\b", + ): + cleaned = re.sub(pattern, " ", cleaned, flags=re.IGNORECASE) + cleaned = re.sub(r"\s+", " ", cleaned).strip(" ,;/") + if not cleaned: + return None + + cleaned_norm = _normalize_attr_token(cleaned) + if cleaned_norm in _GENERIC_CITIZENSHIP_VALUES: + return None + + return cleaned + + +def _resolve_country_hint( + agent: dict[str, Any], + default_geography: str | None = None, + semantic_roles: SamplingSemanticRoles | None = None, +) -> str: + """Resolve geography hint for name generation. + + Precedence: + 1. Explicit country-like agent fields + 2. Spec-level geography (pipeline scope anchor) + 3. Broader region/location fields + 4. US fallback + """ + geo_roles = semantic_roles.geo_roles if semantic_roles else None + + prioritized_keys: list[str] = [] + if geo_roles and geo_roles.country_attr: + prioritized_keys.append(geo_roles.country_attr) + prioritized_keys.extend(("country", "country_code", "nationality")) + + for key in prioritized_keys: + value = agent.get(key) + if value is None: + continue + text = str(value).strip() + if text: + return text + + citizenship_value = agent.get("citizenship") + if citizenship_value is not None: + parsed_country = _extract_country_from_citizenship(str(citizenship_value)) + if parsed_country: + return parsed_country + + if default_geography: + text = str(default_geography).strip() + if text: + return text + + region_keys: list[str] = [] + if geo_roles and geo_roles.region_attr: + region_keys.append(geo_roles.region_attr) + region_keys.extend(("region", "geography", "location")) + + for key in region_keys: + value = agent.get(key) + if value is None: + continue + text = str(value).strip() + if text: + return text + + return "US" + + def sample_population( spec: PopulationSpec, count: int, @@ -183,6 +405,7 @@ def sample_population( on_progress: ItemProgressCallback | None = None, household_config: HouseholdConfig | None = None, agent_focus_mode: Literal["primary_only", "couples", "all"] | None = None, + semantic_roles: SamplingSemanticRoles | None = None, ) -> SamplingResult: """ Generate agents from a PopulationSpec. @@ -257,15 +480,31 @@ def sample_population( on_progress, hh_config, agent_focus_mode=agent_focus_mode, + semantic_roles=semantic_roles, + ) + _reconcile_household_coherence( + agents, + attr_map, + stats, + semantic_roles=semantic_roles, + household_config=hh_config, ) else: agents = _sample_population_independent( - spec, attr_map, rng, n, id_width, stats, numeric_values, on_progress + spec, + attr_map, + rng, + n, + id_width, + stats, + numeric_values, + on_progress, + semantic_roles=semantic_roles, ) households = [] - # Compute final statistics - _finalize_stats(stats, numeric_values, len(agents)) + # Recompute descriptive stats from finalized agent payloads + _recompute_descriptive_stats(spec, agents, stats) # Check expression constraints _check_expression_constraints(spec, agents, stats) @@ -303,12 +542,20 @@ def _sample_population_independent( stats: SamplingStats, numeric_values: dict[str, list[float]], on_progress: ItemProgressCallback | None = None, + semantic_roles: SamplingSemanticRoles | None = None, ) -> list[dict[str, Any]]: """Sample N agents independently (legacy path).""" agents: list[dict[str, Any]] = [] for i in range(n): agent = _sample_single_agent( - spec, attr_map, rng, i, id_width, stats, numeric_values + spec, + attr_map, + rng, + i, + id_width, + stats, + numeric_values, + semantic_roles=semantic_roles, ) agents.append(agent) if on_progress: @@ -320,9 +567,11 @@ def _generate_npc_partner( primary: dict[str, Any], attr_map: dict[str, AttributeSpec], categorical_options: dict[str, list[str]], + gender_attr: str | None, rng: random.Random, config: HouseholdConfig, - name_config: NameConfig | None = None, + geography_hint: str | None = None, + semantic_roles: SamplingSemanticRoles | None = None, ) -> dict[str, Any]: """Generate a lightweight NPC partner profile for context. @@ -331,8 +580,25 @@ def _generate_npc_partner( """ partner: dict[str, Any] = {} - # Always include gender - partner["gender"] = rng.choice(["male", "female"]) + if gender_attr: + partner_gender = choose_partner_gender( + primary_gender=( + str(primary.get(gender_attr)) + if primary.get(gender_attr) is not None + else None + ), + available_genders=categorical_options.get(gender_attr), + rng=rng, + config=config, + ) + if partner_gender: + partner[gender_attr] = partner_gender + partner["gender"] = partner_gender + else: + partner["gender"] = rng.choice(["male", "female"]) + else: + # Legacy fallback when no gender attribute exists in spec. + partner["gender"] = rng.choice(["male", "female"]) # Always correlate age if present (essential for NPC identity, regardless of scope) if "age" in primary: @@ -340,9 +606,11 @@ def _generate_npc_partner( "age", "int", primary["age"], - None, # Uses gaussian offset rng, config, + semantic_type=getattr(attr_map.get("age"), "semantic_type", "age"), + identity_type=getattr(attr_map.get("age"), "identity_type", None), + policy_override=_resolve_partner_policy_override("age", semantic_roles), ) # Process attributes based on their scope @@ -359,10 +627,14 @@ def _generate_npc_partner( attr_name, attr.type, primary[attr_name], - attr.correlation_rate, rng, config, available_options=categorical_options.get(attr_name), + semantic_type=attr.semantic_type, + identity_type=attr.identity_type, + policy_override=_resolve_partner_policy_override( + attr_name, semantic_roles + ), ) # Individual scope: skip for NPC (not enough data to sample fully) @@ -376,8 +648,12 @@ def _generate_npc_partner( gender=partner["gender"], ethnicity=str(ethnicity) if ethnicity else None, birth_decade=birth_decade, + country=_resolve_country_hint( + primary, + geography_hint, + semantic_roles=semantic_roles, + ), seed=rng.randint(0, 2**31), - name_config=name_config, ) partner["first_name"] = first_name @@ -399,6 +675,7 @@ def _sample_dependent_as_agent( dependent: Any, parent: dict[str, Any], household_id: str, + semantic_roles: SamplingSemanticRoles | None = None, ) -> dict[str, Any]: """Promote a dependent to a full agent with all attributes sampled. @@ -406,7 +683,14 @@ def _sample_dependent_as_agent( then samples remaining attributes normally. """ agent = _sample_single_agent( - spec, attr_map, rng, index, id_width, stats, numeric_values + spec, + attr_map, + rng, + index, + id_width, + stats, + numeric_values, + semantic_roles=semantic_roles, ) # Override with dependent's known attributes @@ -417,7 +701,7 @@ def _sample_dependent_as_agent( agent["relationship_to_primary"] = dependent.relationship dep_name = str(getattr(dependent, "name", "")).strip() if dep_name: - agent["first_name"] = dep_name + agent["first_name"] = dep_name.split()[0] if parent.get("last_name"): agent["last_name"] = parent["last_name"] @@ -443,6 +727,7 @@ def _sample_population_households( on_progress: ItemProgressCallback | None = None, config: HouseholdConfig | None = None, agent_focus_mode: Literal["primary_only", "couples", "all"] | None = None, + semantic_roles: SamplingSemanticRoles | None = None, ) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]: """Sample agents in household units with correlated demographics. @@ -467,6 +752,11 @@ def _sample_population_households( household_attrs = { attr.name for attr in spec.attributes if attr.scope == "household" } + marital_attr = _resolve_marital_attr_name(attr_map, semantic_roles) + household_size_attr = _resolve_household_size_attr_name(attr_map, semantic_roles) + gender_attr = _resolve_gender_attr_name(attr_map) + parental_status_attrs = _resolve_parental_status_attrs(attr_map) + marital_spec = attr_map.get(marital_attr) if marital_attr else None categorical_options: dict[str, list[str]] = {} for attr in spec.attributes: if attr.type == "categorical" and attr.sampling.distribution: @@ -480,7 +770,14 @@ def _sample_population_households( # Sample Adult 1 (primary) — always an agent adult1 = _sample_single_agent( - spec, attr_map, rng, agent_index, id_width, stats, numeric_values + spec, + attr_map, + rng, + agent_index, + id_width, + stats, + numeric_values, + semantic_roles=semantic_roles, ) adult1_age = adult1.get("age", 35) agent_index += 1 @@ -490,16 +787,33 @@ def _sample_population_households( has_partner = household_needs_partner(htype) has_kids = household_needs_kids(htype) + if has_partner and focus_mode in ("couples", "all") and agent_index >= target_n: + # In couples/all mode, avoid creating fallback NPC partners when there is + # no capacity left for a second agent. + has_partner = False num_adults = 2 if has_partner else 1 - # Determine household_size from agent if present, else estimate - household_size = adult1.get( + # Determine sampled household_size from agent if present, else estimate. + # Then enforce household-type semantics deterministically (kids/no-kids). + sampled_household_size = adult1.get( "household_size", num_adults + (1 if has_kids else 0) ) - if isinstance(household_size, (int, float)): - household_size = max(num_adults, int(household_size)) + if isinstance(sampled_household_size, (int, float)): + sampled_household_size = max(num_adults, int(sampled_household_size)) else: - household_size = num_adults + (1 if has_kids else 0) + sampled_household_size = num_adults + (1 if has_kids else 0) + + target_dependents = max(0, sampled_household_size - num_adults) + if htype in (HouseholdType.SINGLE, HouseholdType.COUPLE): + target_dependents = 0 + elif htype in ( + HouseholdType.SINGLE_PARENT, + HouseholdType.COUPLE_WITH_KIDS, + HouseholdType.MULTI_GENERATIONAL, + ): + target_dependents = max(1, target_dependents) + + household_size = num_adults + target_dependents # Annotate Adult 1 with household fields adult1["household_id"] = household_id @@ -523,6 +837,8 @@ def _sample_population_households( household_attrs, categorical_options, config, + gender_attr, + semantic_roles=semantic_roles, ) adult2["household_id"] = household_id adult2["household_role"] = "adult_secondary" @@ -539,9 +855,11 @@ def _sample_population_households( adult1, attr_map, categorical_options, + gender_attr, rng, config, - name_config=spec.meta.name_config, + geography_hint=spec.meta.geography, + semantic_roles=semantic_roles, ) adult1["partner_npc"] = npc_partner adult1["partner_id"] = None @@ -557,12 +875,18 @@ def _sample_population_households( rng, config, ethnicity=adult1.get("race_ethnicity"), - name_config=spec.meta.name_config, + country=_resolve_country_hint( + adult1, + spec.meta.geography, + semantic_roles=semantic_roles, + ), + household_last_name=adult1.get("last_name"), ) if has_kids and focus_mode == "all": # Kids old enough become full agents; younger ones stay as NPCs dep_dicts = [] + promoted_dependents: list[dict[str, Any]] = [] for dep in dependents: if agent_index >= target_n or dep.age < config.min_agent_age: # Too young or at target — stays as NPC data @@ -579,8 +903,9 @@ def _sample_population_households( dep, adult1, household_id, + semantic_roles=semantic_roles, ) - agents.append(kid_agent) + promoted_dependents.append(kid_agent) adult_ids.append(kid_agent["_id"]) agent_index += 1 # Any overflow dependents attached as NPC data @@ -589,6 +914,79 @@ def _sample_population_households( # Kids are NPCs dep_dicts = [d.model_dump() for d in dependents] adult1["dependents"] = dep_dicts + promoted_dependents = [] + + household_members = [adult1] + if adult2_added: + household_members.append(adult2) + household_members.extend(promoted_dependents) + adult_members = [ + member + for member in household_members + if str(member.get("household_role", "")).startswith("adult_") + ] + + # In household-mode, household-coupled fields should reflect realized structure + # before post-sampling reconciliation/gating runs. + if household_size_attr: + npc_partner_count = 1 if has_partner and not adult2_added else 0 + realized_size = len(household_members) + npc_partner_count + len(dep_dicts) + for member in adult_members: + member[household_size_attr] = realized_size + + if parental_status_attrs: + child_dependents_present = any( + isinstance(dep, dict) + and _dependent_is_child( + dep, child_age_max=config.max_dependent_child_age + ) + for dep in dep_dicts + ) + if not child_dependents_present: + child_dependents_present = any( + str(member.get("household_role", "")).startswith("dependent_") + and _dependent_is_child( + { + "relationship": str(member.get("household_role", ""))[ + len("dependent_") : + ], + "age": member.get("age"), + }, + child_age_max=config.max_dependent_child_age, + ) + for member in household_members + ) + + for member in adult_members: + for attr_name in parental_status_attrs: + attr_spec = attr_map.get(attr_name) + if attr_spec is None: + continue + desired = _pick_parental_status_value( + attr_spec, + child_dependents_present, + current_value=member.get(attr_name), + ) + if desired is not None: + member[attr_name] = desired + + if marital_spec and marital_attr: + for member in adult_members: + has_partner_member = bool( + member.get("partner_id") or member.get("partner_npc") + ) + desired = _pick_marital_value( + marital_spec, + has_partner_member, + marital_roles=( + semantic_roles.marital_roles if semantic_roles else None + ), + current_value=member.get(marital_attr), + ) + if desired is not None: + member[marital_attr] = desired + + agents.extend(promoted_dependents) agents.append(adult1) @@ -640,6 +1038,8 @@ def _sample_partner_agent( household_attrs: set[str], categorical_options: dict[str, list[str]], config: HouseholdConfig | None = None, + gender_attr: str | None = None, + semantic_roles: SamplingSemanticRoles | None = None, ) -> dict[str, Any]: """Sample a partner agent with correlated demographics. @@ -660,16 +1060,26 @@ def _sample_partner_agent( # Household-scoped: copy from primary if attr.scope == "household" and attr_name in primary: value = primary[attr_name] - # Partner-correlated: use assortative mating - elif attr.scope == "partner_correlated" and attr_name in primary: + # Partner-correlated: use assortative mating. + # Age-like fields and scenario policy overrides are correlated even when + # scope metadata is incomplete, to prevent unrealistic partner drift. + elif attr_name in primary and ( + attr.scope == "partner_correlated" + or attr.semantic_type == "age" + or _resolve_partner_policy_override(attr_name, semantic_roles) is not None + ): value = correlate_partner_attribute( attr_name, attr.type, primary[attr_name], - attr.correlation_rate, rng, config, available_options=categorical_options.get(attr_name), + semantic_type=attr.semantic_type, + identity_type=attr.identity_type, + policy_override=_resolve_partner_policy_override( + attr_name, semantic_roles + ), ) else: # Individual scope: sample independently @@ -685,8 +1095,28 @@ def _sample_partner_agent( agent[attr_name] = value _update_stats(attr, value, stats, numeric_values) + _normalize_young_adult_attributes(agent, spec) + + if gender_attr and gender_attr in agent: + partner_gender = choose_partner_gender( + primary_gender=( + str(primary.get(gender_attr)) + if primary.get(gender_attr) is not None + else None + ), + available_genders=categorical_options.get(gender_attr), + rng=rng, + config=config, + ) + if partner_gender is not None: + agent[gender_attr] = partner_gender + # Generate first name for partner agent - gender = agent.get("gender") or agent.get("sex") + gender = None + if gender_attr: + gender = agent.get(gender_attr) + if gender is None: + gender = agent.get("gender") or agent.get("sex") ethnicity = ( agent.get("race_ethnicity") or agent.get("ethnicity") or agent.get("race") ) @@ -696,8 +1126,12 @@ def _sample_partner_agent( gender=str(gender) if gender is not None else None, ethnicity=str(ethnicity) if ethnicity is not None else None, birth_decade=birth_decade, + country=_resolve_country_hint( + agent, + spec.meta.geography, + semantic_roles=semantic_roles, + ), seed=index, - name_config=spec.meta.name_config, ) agent["first_name"] = first_name @@ -712,6 +1146,7 @@ def _sample_single_agent( id_width: int, stats: SamplingStats, numeric_values: dict[str, list[float]], + semantic_roles: SamplingSemanticRoles | None = None, ) -> dict[str, Any]: """Sample a single agent following the sampling order.""" agent: dict[str, Any] = {"_id": f"agent_{index:0{id_width}d}"} @@ -740,8 +1175,9 @@ def _sample_single_agent( # Update stats _update_stats(attr, value, stats, numeric_values) + _normalize_young_adult_attributes(agent, spec) + # Generate demographically-plausible name - name_config = spec.meta.name_config gender = agent.get("gender") or agent.get("sex") ethnicity = ( agent.get("race_ethnicity") or agent.get("ethnicity") or agent.get("race") @@ -752,8 +1188,12 @@ def _sample_single_agent( gender=str(gender) if gender is not None else None, ethnicity=str(ethnicity) if ethnicity is not None else None, birth_decade=birth_decade, + country=_resolve_country_hint( + agent, + spec.meta.geography, + semantic_roles=semantic_roles, + ), seed=index, - name_config=name_config, ) agent["first_name"] = first_name agent["last_name"] = last_name @@ -795,7 +1235,7 @@ def _sample_attribute( # No modifiers, sample directly return sample_distribution(attr.sampling.distribution, rng, agent) - value, triggered = apply_modifiers_and_sample( + value, triggered, condition_warnings = apply_modifiers_and_sample( attr.sampling.distribution, attr.sampling.modifiers, rng, @@ -806,6 +1246,13 @@ def _sample_attribute( if attr.name in stats.modifier_triggers: for idx in triggered: stats.modifier_triggers[attr.name][idx] += 1 + for warning in condition_warnings: + if len(stats.condition_warnings) < 100: + stats.condition_warnings.append(f"{attr.name}: {warning}") + elif len(stats.condition_warnings) == 100: + stats.condition_warnings.append( + "... additional condition warnings truncated" + ) return value @@ -867,6 +1314,503 @@ def _finalize_stats( stats.attribute_stds[name] = 0.0 +def _recompute_descriptive_stats( + spec: PopulationSpec, + agents: list[dict[str, Any]], + stats: SamplingStats, +) -> None: + """Recompute descriptive stats from finalized agents.""" + stats.attribute_means = {} + stats.attribute_stds = {} + stats.categorical_counts = {} + stats.boolean_counts = {} + + numeric_values: dict[str, list[float]] = {} + for attr in spec.attributes: + if attr.type in ("int", "float"): + numeric_values[attr.name] = [] + elif attr.type == "categorical": + stats.categorical_counts[attr.name] = {} + elif attr.type == "boolean": + stats.boolean_counts[attr.name] = {True: 0, False: 0} + + for agent in agents: + for attr in spec.attributes: + if attr.name not in agent: + continue + value = agent[attr.name] + if attr.type in ("int", "float") and isinstance(value, (int, float)): + numeric_values[attr.name].append(float(value)) + elif attr.type == "categorical": + key = str(value) + stats.categorical_counts[attr.name][key] = ( + stats.categorical_counts[attr.name].get(key, 0) + 1 + ) + elif attr.type == "boolean": + key = bool(value) + stats.boolean_counts[attr.name][key] = ( + stats.boolean_counts[attr.name].get(key, 0) + 1 + ) + + _finalize_stats(stats, numeric_values, len(agents)) + + +def _normalize_attr_token(name: str) -> str: + """Normalize attribute tokens for tolerant matching.""" + token = name.strip().lower() + token = re.sub(r"[\s\-]+", "_", token) + token = re.sub(r"[^a-z0-9_]", "", token) + token = re.sub(r"_+", "_", token).strip("_") + return token + + +def _find_attr_name( + attr_map: dict[str, AttributeSpec], + aliases: set[str], +) -> str | None: + """Find an attribute by normalized alias set.""" + normalized_aliases = {_normalize_attr_token(a) for a in aliases} + for name in attr_map: + if _normalize_attr_token(name) in normalized_aliases: + return name + return None + + +def _resolve_marital_attr_name( + attr_map: dict[str, AttributeSpec], + semantic_roles: SamplingSemanticRoles | None = None, +) -> str | None: + """Resolve marital attribute via scenario semantic roles, then legacy fallback.""" + if ( + semantic_roles + and semantic_roles.marital_roles + and semantic_roles.marital_roles.attr + ): + candidate = semantic_roles.marital_roles.attr + if candidate in attr_map: + return candidate + + return _find_attr_name( + attr_map, + {"marital_status", "marital", "relationship_status"}, + ) + + +def _resolve_household_size_attr_name( + attr_map: dict[str, AttributeSpec], + semantic_roles: SamplingSemanticRoles | None = None, +) -> str | None: + """Resolve household-size attribute via scenario semantic roles, then fallback.""" + if ( + semantic_roles + and semantic_roles.household_roles + and semantic_roles.household_roles.household_size_attr + ): + candidate = semantic_roles.household_roles.household_size_attr + attr = attr_map.get(candidate) + if attr is not None and attr.type in ("int", "float"): + return candidate + + fallback = _find_attr_name(attr_map, {"household_size"}) + if fallback is None: + return None + attr = attr_map.get(fallback) + if attr is not None and attr.type in ("int", "float"): + return fallback + return None + + +def _resolve_parental_status_attrs( + attr_map: dict[str, AttributeSpec], +) -> list[str]: + """Resolve parental-status attributes with semantic role first, aliases second.""" + names: list[str] = [] + for name, attr in attr_map.items(): + if attr.identity_type == "parental_status": + names.append(name) + + if names: + return names + + for alias in ( + "has_children", + "is_parent", + "parental_status", + "has_kids", + "children_at_home", + ): + candidate = _find_attr_name(attr_map, {alias}) + if candidate and candidate not in names: + names.append(candidate) + return names + + +def _dependent_is_child(dep: dict[str, Any], child_age_max: int = 17) -> bool: + """Detect child dependents from relationship/age/school metadata.""" + rel = _normalize_attr_token(str(dep.get("relationship", ""))) + if any( + token in rel + for token in ("son", "daughter", "child", "stepchild", "foster_child") + ): + return True + + age_raw = dep.get("age") + if isinstance(age_raw, str) and age_raw.strip().isdigit(): + age_raw = int(age_raw.strip()) + if isinstance(age_raw, (int, float)) and 0 <= int(age_raw) <= child_age_max: + return True + + school_status = _normalize_attr_token(str(dep.get("school_status", ""))) + school_tokens = { + "home", + "elementary", + "middle_school", + "high_school", + "primary", + "secondary", + "k12", + } + return school_status in school_tokens + + +def _pick_parental_status_value( + attr: AttributeSpec, + has_child_dependents: bool, + current_value: Any | None = None, +) -> Any | None: + """Pick a coherent parental-status value based on realized household children.""" + if attr.type == "boolean": + return has_child_dependents + + if ( + attr.type != "categorical" + or attr.sampling.distribution is None + or not hasattr(attr.sampling.distribution, "options") + ): + return None + + options = list(getattr(attr.sampling.distribution, "options", []) or []) + if not options: + return None + + if current_value in options: + norm_current = _normalize_attr_token(str(current_value)) + if has_child_dependents and any( + token in norm_current for token in ("child", "children", "parent") + ): + return current_value + if not has_child_dependents and any( + token in norm_current + for token in ( + "no_child", + "no_children", + "non_parent", + "not_parent", + "childfree", + ) + ): + return current_value + + yes_tokens = ("child", "children", "parent", "has_kid", "has_child", "yes", "true") + no_tokens = ( + "no_child", + "no_children", + "non_parent", + "not_parent", + "childfree", + "none", + "no", + "false", + ) + + token_set = yes_tokens if has_child_dependents else no_tokens + for opt in options: + norm = _normalize_attr_token(str(opt)) + if any(token in norm for token in token_set): + return opt + return None + + +def _resolve_gender_attr_name(attr_map: dict[str, AttributeSpec]) -> str | None: + """Resolve gender attribute by metadata first, then legacy alias fallback.""" + for name, attr in attr_map.items(): + if attr.identity_type == "gender_identity": + return name + + fallback = _find_attr_name(attr_map, {"gender", "sex", "gender_identity"}) + if fallback is None: + return None + attr = attr_map.get(fallback) + if attr is None or attr.type != "categorical": + return None + return fallback + + +def _resolve_partner_policy_override( + attr_name: str, + semantic_roles: SamplingSemanticRoles | None, +) -> str | None: + """Resolve scenario-owned partner-correlation policy override.""" + if semantic_roles is None: + return None + override = semantic_roles.partner_correlation_roles.get(attr_name) + return str(override) if override else None + + +def _pick_marital_value( + attr: AttributeSpec, + has_partner: bool, + marital_roles: MaritalRoles | None = None, + current_value: Any | None = None, +) -> Any | None: + """Pick a coherent marital value based on realized partner status.""" + if attr.type == "boolean": + return has_partner + + if ( + attr.type != "categorical" + or attr.sampling.distribution is None + or not hasattr(attr.sampling.distribution, "options") + ): + return None + + options = list(getattr(attr.sampling.distribution, "options", []) or []) + if not options: + return None + + if marital_roles and marital_roles.attr: + if _normalize_attr_token(attr.name) == _normalize_attr_token( + marital_roles.attr + ): + if current_value in options: + if has_partner and current_value in marital_roles.partnered_values: + return current_value + if not has_partner and current_value in marital_roles.single_values: + return current_value + preferred = ( + marital_roles.partnered_values + if has_partner + else marital_roles.single_values + ) + for value in preferred: + if value in options: + return value + + partnered_tokens = ( + "married", + "partner", + "cohabit", + "relationship", + "civil_union", + ) + single_tokens = ("single", "unmarried", "not_married", "divorced", "widowed") + + if current_value in options: + norm_current = _normalize_attr_token(str(current_value)) + if has_partner and any(token in norm_current for token in partnered_tokens): + return current_value + if not has_partner and any(token in norm_current for token in single_tokens): + return current_value + + normalized = {opt: _normalize_attr_token(opt) for opt in options} + token_set = partnered_tokens if has_partner else single_tokens + for opt, norm in normalized.items(): + if any(token in norm for token in token_set): + return opt + return options[0] + + +def _extract_surname_from_name(name: Any) -> str | None: + """Extract surname token from a full-name-like value.""" + if not isinstance(name, str): + return None + parts = [p for p in name.strip().split() if p] + if len(parts) < 2: + return None + return parts[-1] + + +def _household_surname_seed( + primary: dict[str, Any], members: list[dict[str, Any]] +) -> str | None: + """Choose canonical household surname from available household context.""" + for candidate in (primary.get("last_name"),): + if isinstance(candidate, str) and candidate.strip(): + return candidate.strip() + + for member in members: + candidate = member.get("last_name") + if isinstance(candidate, str) and candidate.strip(): + return candidate.strip() + + partner_npc = primary.get("partner_npc") + if isinstance(partner_npc, dict): + candidate = partner_npc.get("last_name") + if isinstance(candidate, str) and candidate.strip(): + return candidate.strip() + + dependents = primary.get("dependents") + if isinstance(dependents, list): + for dep in dependents: + if not isinstance(dep, dict): + continue + candidate = _extract_surname_from_name(dep.get("name")) + if candidate: + return candidate + + return None + + +def _reconcile_household_coherence( + agents: list[dict[str, Any]], + attr_map: dict[str, AttributeSpec], + stats: SamplingStats, + semantic_roles: SamplingSemanticRoles | None = None, + household_config: HouseholdConfig | None = None, +) -> None: + """Deterministically reconcile household coherence after realization.""" + by_household: dict[str, list[dict[str, Any]]] = {} + for agent in agents: + hid = agent.get("household_id") + if not isinstance(hid, str) or not hid: + continue + by_household.setdefault(hid, []).append(agent) + + if not by_household: + return + + marital_attr = _resolve_marital_attr_name(attr_map, semantic_roles) + household_size_attr = _resolve_household_size_attr_name(attr_map, semantic_roles) + parental_status_attrs = _resolve_parental_status_attrs(attr_map) + child_age_max = household_config.max_dependent_child_age if household_config else 17 + + marital_updates = 0 + household_size_updates = 0 + surname_updates = 0 + parental_status_updates = 0 + + for members in by_household.values(): + primary = next( + (m for m in members if m.get("household_role") == "adult_primary"), + members[0], + ) + adult_members = [ + member + for member in members + if str(member.get("household_role", "")).startswith("adult_") + ] + if not adult_members: + adult_members = members + dependents = primary.get("dependents", []) + npc_partner_count = 1 if primary.get("partner_npc") else 0 + npc_dependents_count = len(dependents) if isinstance(dependents, list) else 0 + realized_size = len(members) + npc_partner_count + npc_dependents_count + household_surname = _household_surname_seed(primary, members) + + if household_size_attr: + for member in members: + current = member.get(household_size_attr) + if current != realized_size: + member[household_size_attr] = realized_size + household_size_updates += 1 + + if household_surname: + for member in members: + if member.get("last_name") != household_surname: + member["last_name"] = household_surname + surname_updates += 1 + + partner_npc = primary.get("partner_npc") + if isinstance(partner_npc, dict): + if partner_npc.get("last_name") != household_surname: + partner_npc["last_name"] = household_surname + surname_updates += 1 + + # Dependents are represented as NPC dicts with `name`. + # Normalize them to the household surname for consistency. + if isinstance(dependents, list): + for dep in dependents: + if not isinstance(dep, dict): + continue + dep_name = dep.get("name") + if isinstance(dep_name, str) and dep_name.strip(): + first = dep_name.strip().split()[0] + corrected = f"{first} {household_surname}" + if dep_name != corrected: + dep["name"] = corrected + surname_updates += 1 + + child_dependents_present = False + if isinstance(dependents, list): + child_dependents_present = any( + isinstance(dep, dict) and _dependent_is_child(dep, child_age_max) + for dep in dependents + ) + if not child_dependents_present: + child_dependents_present = any( + str(member.get("household_role", "")).startswith("dependent_") + and _dependent_is_child( + { + "relationship": str(member.get("household_role", ""))[ + len("dependent_") : + ], + "age": member.get("age"), + }, + child_age_max, + ) + for member in members + ) + + if parental_status_attrs: + for member in adult_members: + for attr_name in parental_status_attrs: + attr_spec = attr_map.get(attr_name) + if attr_spec is None: + continue + desired = _pick_parental_status_value( + attr_spec, + child_dependents_present, + current_value=member.get(attr_name), + ) + if desired is None: + continue + if member.get(attr_name) != desired: + member[attr_name] = desired + parental_status_updates += 1 + + if marital_attr: + marital_spec = attr_map[marital_attr] + for member in adult_members: + has_partner = bool( + member.get("partner_id") or member.get("partner_npc") + ) + desired = _pick_marital_value( + marital_spec, + has_partner, + marital_roles=( + semantic_roles.marital_roles if semantic_roles else None + ), + current_value=member.get(marital_attr), + ) + if desired is None: + continue + if member.get(marital_attr) != desired: + member[marital_attr] = desired + marital_updates += 1 + + reconciliation: dict[str, int] = {} + if marital_updates: + reconciliation["marital_status_updates"] = marital_updates + if household_size_updates: + reconciliation["household_size_updates"] = household_size_updates + if surname_updates: + reconciliation["household_surname_updates"] = surname_updates + if parental_status_updates: + reconciliation["parental_status_updates"] = parental_status_updates + if reconciliation: + stats.reconciliation_counts.update(reconciliation) + + def _check_expression_constraints( spec: PopulationSpec, agents: list[dict[str, Any]], diff --git a/extropy/population/sampler/distributions.py b/extropy/population/sampler/distributions.py index 9d872ae..568d66f 100644 --- a/extropy/population/sampler/distributions.py +++ b/extropy/population/sampler/distributions.py @@ -174,12 +174,30 @@ def _sample_lognormal( else mean * 0.5 ) - # Lognormal requires mean > 0 + # Resolve min/max bounds - formula takes precedence over static + min_bound = _resolve_optional_param( + dist.min, getattr(dist, "min_formula", None), agent + ) + max_bound = _resolve_optional_param( + dist.max, getattr(dist, "max_formula", None), agent + ) + + # Degenerate/invalid cases should degrade deterministically instead of crashing. + # Common case: formula intentionally returns 0 for not-applicable agents. if mean <= 0: - raise ValueError( - f"Lognormal distribution requires mean > 0, got {mean}. " - "Check the distribution parameters or formula." - ) + value = 0.0 + if min_bound is not None: + value = max(value, min_bound) + if max_bound is not None: + value = min(value, max_bound) + return value + if std <= 0: + value = mean + if min_bound is not None: + value = max(value, min_bound) + if max_bound is not None: + value = min(value, max_bound) + return value # Convert from actual mean/std to log-space mu/sigma # mu = log(mean^2 / sqrt(mean^2 + std^2)) @@ -191,14 +209,6 @@ def _sample_lognormal( value = rng.lognormvariate(mu, sigma) - # Resolve min/max bounds - formula takes precedence over static - min_bound = _resolve_optional_param( - dist.min, getattr(dist, "min_formula", None), agent - ) - max_bound = _resolve_optional_param( - dist.max, getattr(dist, "max_formula", None), agent - ) - # Apply clamping if min_bound is not None: value = max(value, min_bound) diff --git a/extropy/population/sampler/households.py b/extropy/population/sampler/households.py index 9eeb04b..166ba07 100644 --- a/extropy/population/sampler/households.py +++ b/extropy/population/sampler/households.py @@ -1,8 +1,8 @@ """Household-based sampling for co-sampling correlated agent pairs. All household composition rates and correlation tables are read from -a HouseholdConfig instance (populated by LLM research at spec time, -with US Census defaults as the safety net). +a HouseholdConfig instance (scenario-owned config, with deterministic +defaults as the safety net). Attribute scopes are now spec-driven: - scope="household": shared across all household members @@ -14,13 +14,57 @@ import math import random -from typing import Any, TYPE_CHECKING +from typing import Any, Literal from ...core.models.population import Dependent, HouseholdConfig, HouseholdType from ..names.generator import generate_name -if TYPE_CHECKING: - from ...core.models.population import NameConfig + +def _normalize_label(value: str) -> str: + return " ".join(value.strip().lower().split()) + + +def _pair_key(left: str, right: str) -> tuple[str, str]: + a = _normalize_label(left) + b = _normalize_label(right) + return (a, b) if a <= b else (b, a) + + +def choose_partner_gender( + primary_gender: str | None, + available_genders: list[str] | None, + rng: random.Random, + config: HouseholdConfig, +) -> str | None: + """Choose partner gender using scenario-owned pairing policy.""" + options = [g for g in (available_genders or []) if isinstance(g, str) and g.strip()] + if not options: + return None + + if ( + config.partner_gender_mode != "weighted" + or not config.partner_gender_pair_weights + ): + return rng.choice(options) + + primary = primary_gender if isinstance(primary_gender, str) else None + if not primary: + return rng.choice(options) + + weights_by_pair: dict[tuple[str, str], float] = {} + for row in config.partner_gender_pair_weights: + key = _pair_key(row.left, row.right) + weights_by_pair[key] = max(0.0, weights_by_pair.get(key, 0.0) + row.weight) + + candidate_weights: list[float] = [] + for option in options: + key = _pair_key(primary, option) + candidate_weights.append(max(0.0, weights_by_pair.get(key, 0.0))) + + if sum(candidate_weights) <= 0: + return rng.choice(options) + + return rng.choices(options, weights=candidate_weights, k=1)[0] def _age_bracket(age: int, config: HouseholdConfig) -> str: @@ -74,32 +118,48 @@ def correlate_partner_attribute( attr_name: str, attr_type: str, primary_value: Any, - correlation_rate: float | None, rng: random.Random, config: HouseholdConfig, available_options: list[str] | None = None, + semantic_type: str | None = None, + identity_type: str | None = None, + policy_override: Literal[ + "gaussian_offset", + "same_group_rate", + "same_country_rate", + "same_value_probability", + ] + | None = None, ) -> Any: """Produce a correlated value for a partner based on the primary's value. - Uses the correlation_rate from the attribute spec. Special handling: - - age (int/float): Gaussian offset using config.partner_age_gap_mean/std - - race_ethnicity-like attrs: Per-group rates from config.same_group_rates - - Other categorical/boolean: Simple probability of same value + Runtime fallback chain: + 1) household_config.assortative_mating[attr_name] (if configured) + 2) Policy defaults (age/race/country special handling + general default) Args: attr_name: Name of the attribute attr_type: Type of the attribute (int, float, categorical, boolean) primary_value: The primary partner's value - correlation_rate: Probability (0-1) that partner has same value, or None for defaults rng: Random number generator config: HouseholdConfig with default rates available_options: For categorical attrs, list of valid options to sample from + semantic_type: Optional semantic metadata from AttributeSpec + identity_type: Optional identity metadata from AttributeSpec Returns: The correlated value for the partner. """ - # Age uses gaussian offset, not simple correlation - if attr_name == "age" and attr_type in ("int", "float"): + policy = _resolve_partner_correlation_policy( + attr_name=attr_name, + attr_type=attr_type, + semantic_type=semantic_type, + identity_type=identity_type, + policy_override=policy_override, + ) + + # Age-like attributes use gaussian offset, not simple same-value probability + if policy == "gaussian_offset": partner_age = int( round( rng.gauss( @@ -110,8 +170,8 @@ def correlate_partner_attribute( ) return max(config.min_adult_age, partner_age) - # Race/ethnicity uses per-group rates from config - if attr_name in ("race_ethnicity", "ethnicity", "race"): + # Race/ethnicity-like attributes use per-group rates + if policy == "same_group_rate": same_rate = config.same_group_rates.get( str(primary_value).lower(), config.default_same_group_rate ) @@ -123,12 +183,12 @@ def correlate_partner_attribute( return rng.choice(others) return primary_value - # Country uses same_country_rate from config if no explicit rate - if attr_name == "country": - rate = ( - correlation_rate - if correlation_rate is not None - else config.same_country_rate + # Country/citizenship-like attributes use same_country_rate default + if policy == "same_country_rate": + rate = _resolve_same_value_rate( + attr_name=attr_name, + config=config, + default_rate=config.same_country_rate, ) if rng.random() < rate: return primary_value @@ -138,11 +198,11 @@ def correlate_partner_attribute( return rng.choice(others) return primary_value - # For all other attributes, use the explicit correlation_rate or a default - rate = ( - correlation_rate - if correlation_rate is not None - else config.default_same_group_rate + # General same-value policy + rate = _resolve_same_value_rate( + attr_name=attr_name, + config=config, + default_rate=config.default_same_group_rate, ) if rng.random() < rate: return primary_value @@ -156,6 +216,62 @@ def correlate_partner_attribute( return primary_value +def _resolve_partner_correlation_policy( + attr_name: str, + attr_type: str, + semantic_type: str | None, + identity_type: str | None, + policy_override: Literal[ + "gaussian_offset", + "same_group_rate", + "same_country_rate", + "same_value_probability", + ] + | None = None, +) -> str: + """Resolve partner-correlation policy without hardcoded branching spread.""" + if policy_override in { + "gaussian_offset", + "same_group_rate", + "same_country_rate", + "same_value_probability", + }: + return policy_override + + normalized_name = attr_name.strip().lower() + if semantic_type == "age": + return "gaussian_offset" + if attr_type in {"int", "float"} and normalized_name == "age": + return "gaussian_offset" + + if identity_type == "race_ethnicity" or normalized_name in { + "race_ethnicity", + "ethnicity", + "race", + }: + return "same_group_rate" + + if identity_type == "citizenship" or normalized_name in { + "country", + "nationality", + "citizenship", + }: + return "same_country_rate" + + return "same_value_probability" + + +def _resolve_same_value_rate( + attr_name: str, + config: HouseholdConfig, + default_rate: float, +) -> float: + """Resolve deterministic same-value probability for partner correlation.""" + if attr_name in config.assortative_mating: + return config.assortative_mating[attr_name] + return default_rate + + def generate_dependents( household_type: HouseholdType, household_size: int, @@ -164,7 +280,8 @@ def generate_dependents( rng: random.Random, config: HouseholdConfig, ethnicity: str | None = None, - name_config: NameConfig | None = None, + country: str = "US", + household_last_name: str | None = None, ) -> list[Dependent]: """Generate NPC dependents for a household. @@ -181,21 +298,31 @@ def generate_dependents( elderly_count = 0 if household_type == HouseholdType.MULTI_GENERATIONAL and num_dependents > 0: elderly_count = 1 - elderly_age = primary_age + rng.randint( - config.elderly_min_offset, config.elderly_max_offset + elderly_min_age = primary_age + config.elderly_min_offset + elderly_max_age = min( + primary_age + config.elderly_max_offset, + config.max_elderly_dependent_age, ) + if elderly_max_age < elderly_min_age: + elderly_min_age = elderly_max_age + elderly_age = rng.randint(elderly_min_age, elderly_max_age) elderly_gender = rng.choice(["male", "female"]) relationship = "father" if elderly_gender == "male" else "mother" dep_first, _ = generate_name( gender=elderly_gender, ethnicity=ethnicity, + country=country, age=elderly_age, seed=rng.randint(0, 2**31), - name_config=name_config, + ) + dep_name = ( + f"{dep_first} {household_last_name}".strip() + if household_last_name + else dep_first ) dependents.append( Dependent( - name=dep_first, + name=dep_name, age=elderly_age, gender=elderly_gender, relationship=relationship, @@ -213,13 +340,18 @@ def generate_dependents( child_first, _ = generate_name( gender=child_gender, ethnicity=ethnicity, + country=country, age=child_age, seed=rng.randint(0, 2**31), - name_config=name_config, + ) + child_name = ( + f"{child_first} {household_last_name}".strip() + if household_last_name + else child_first ) dependents.append( Dependent( - name=child_first, + name=child_name, age=child_age, gender=child_gender, relationship=relationship, diff --git a/extropy/population/sampler/modifiers.py b/extropy/population/sampler/modifiers.py index 54c2e5f..54062c1 100644 --- a/extropy/population/sampler/modifiers.py +++ b/extropy/population/sampler/modifiers.py @@ -2,8 +2,8 @@ Modifiers adjust distributions based on agent attributes: - Numeric (multiply/add): All matching modifiers stack -- Categorical (weight_overrides): Last matching modifier wins -- Boolean (probability_override): Last matching modifier wins +- Categorical (weight_overrides): One deterministic winner +- Boolean (probability_override): One deterministic winner """ import logging @@ -20,6 +20,7 @@ CategoricalDistribution, BooleanDistribution, ) +from ..modifier_precedence import choose_modifier_precedence from ...utils.eval_safe import eval_condition from .distributions import ( _sample_normal, @@ -39,7 +40,7 @@ def apply_modifiers_and_sample( modifiers: list[Modifier], rng: random.Random, agent: dict[str, Any], -) -> tuple[Any, list[int]]: +) -> tuple[Any, list[int], list[str]]: """ Apply matching modifiers to a distribution and sample. @@ -50,9 +51,10 @@ def apply_modifiers_and_sample( agent: Current agent's already-sampled attribute values Returns: - Tuple of (sampled_value, list of indices of triggered modifiers) + Tuple of (sampled_value, list of indices of triggered modifiers, condition warnings) """ triggered_indices: list[int] = [] + condition_warnings: list[str] = [] # Check which modifiers apply matching_modifiers: list[tuple[int, Modifier]] = [] @@ -60,26 +62,33 @@ def apply_modifiers_and_sample( try: if eval_condition(mod.when, agent, raise_on_error=True): matching_modifiers.append((i, mod)) - triggered_indices.append(i) except Exception as e: - # Log warning but continue - condition failure means modifier doesn't apply - logger.warning(f"Modifier condition '{mod.when}' failed: {e}") + warning = f"modifier[{i}] when='{mod.when}' eval failed: {e}" + condition_warnings.append(warning) + logger.warning(warning) # Route to type-specific handler if isinstance(dist, (NormalDistribution, LognormalDistribution)): value = _apply_numeric_modifiers(dist, matching_modifiers, rng, agent) + triggered_indices = [idx for idx, _ in matching_modifiers] elif isinstance(dist, UniformDistribution): value = _apply_uniform_modifiers(dist, matching_modifiers, rng) + triggered_indices = [idx for idx, _ in matching_modifiers] elif isinstance(dist, BetaDistribution): value = _apply_beta_modifiers(dist, matching_modifiers, rng) + triggered_indices = [idx for idx, _ in matching_modifiers] elif isinstance(dist, CategoricalDistribution): - value = _apply_categorical_modifiers(dist, matching_modifiers, rng) + value, winner_index = _apply_categorical_modifiers( + dist, matching_modifiers, rng + ) + triggered_indices = [winner_index] if winner_index is not None else [] elif isinstance(dist, BooleanDistribution): - value = _apply_boolean_modifiers(dist, matching_modifiers, rng) + value, winner_index = _apply_boolean_modifiers(dist, matching_modifiers, rng) + triggered_indices = [winner_index] if winner_index is not None else [] else: raise ValueError(f"Unknown distribution type: {type(dist)}") - return value, triggered_indices + return value, triggered_indices, condition_warnings def _apply_numeric_modifiers( @@ -190,57 +199,81 @@ def _apply_categorical_modifiers( dist: CategoricalDistribution, matching: list[tuple[int, Modifier]], rng: random.Random, -) -> str: +) -> tuple[str, int | None]: """ - Apply categorical modifiers (last weight_override wins). + Apply categorical modifiers with deterministic winner selection. Note: If modifiers only have multiply/add (legacy numeric modifiers on categorical), - we ignore them and use base weights. + they are ignored and base weights are used. """ - # Find the last modifier with weight_overrides - override_weights: list[float] | None = None + weighted_modifiers = [(idx, mod) for idx, mod in matching if mod.weight_overrides] + winner_index, winner_modifier = _select_winner_modifier(weighted_modifiers) - for _, mod in matching: - if mod.weight_overrides: - # Build new weights list from overrides - new_weights = [] - for option in dist.options: - if option in mod.weight_overrides: - new_weights.append(mod.weight_overrides[option]) - else: - # Keep original weight for options not in override - idx = dist.options.index(option) - new_weights.append(dist.weights[idx]) - override_weights = new_weights + if winner_modifier is None or winner_modifier.weight_overrides is None: + return _sample_categorical(dist, rng, None), None - return _sample_categorical(dist, rng, override_weights) + base_weights = dict(zip(dist.options, dist.weights, strict=False)) + override_weights = [ + winner_modifier.weight_overrides.get(option, base_weights[option]) + for option in dist.options + ] + return _sample_categorical(dist, rng, override_weights), winner_index def _apply_boolean_modifiers( dist: BooleanDistribution, matching: list[tuple[int, Modifier]], rng: random.Random, -) -> bool: +) -> tuple[bool, int | None]: """ - Apply boolean modifiers (last probability_override wins). + Apply boolean modifiers with deterministic winner selection. If modifiers use multiply/add instead of probability_override, - apply to probability: new_prob = (base_prob * multiply) + add, clamped to [0,1]. + apply to probability using the selected winning modifier: + new_prob = (base_prob * multiply) + add, clamped to [0,1]. """ probability = dist.probability_true - for _, mod in matching: - if mod.probability_override is not None: - # Direct override wins - probability = mod.probability_override + effective = [] + for idx, mod in matching: + has_effect = ( + mod.probability_override is not None + or (mod.multiply is not None and mod.multiply != 1.0) + or (mod.add is not None and mod.add != 0) + ) + if has_effect: + effective.append((idx, mod)) + + winner_index, winner_modifier = _select_winner_modifier(effective) + if winner_modifier is not None: + if winner_modifier.probability_override is not None: + probability = winner_modifier.probability_override else: - # Apply multiply/add to probability - if mod.multiply is not None: - probability *= mod.multiply - if mod.add is not None: - probability += mod.add + if winner_modifier.multiply is not None: + probability *= winner_modifier.multiply + if winner_modifier.add is not None: + probability += winner_modifier.add # Clamp probability to [0, 1] probability = max(0.0, min(1.0, probability)) - return _sample_boolean(dist, rng, probability) + return _sample_boolean(dist, rng, probability), winner_index + + +def _select_winner_modifier( + matching: list[tuple[int, Modifier]], +) -> tuple[int | None, Modifier | None]: + """Pick one deterministic winner from matching modifiers.""" + if not matching: + return None, None + + decision = choose_modifier_precedence([(idx, mod.when) for idx, mod in matching]) + if decision is None: + return None, None + + by_index = {idx: mod for idx, mod in matching} + winner = by_index.get(decision.winner_index) + if winner is None: + return None, None + + return decision.winner_index, winner diff --git a/extropy/population/spec_builder/__init__.py b/extropy/population/spec_builder/__init__.py index e0f7e69..d2eec30 100644 --- a/extropy/population/spec_builder/__init__.py +++ b/extropy/population/spec_builder/__init__.py @@ -33,7 +33,6 @@ hydrate_conditional_base, hydrate_conditional_modifiers, hydrate_household_config, - hydrate_name_config, ) from .binder import bind_constraints, build_spec from ..validator import ( @@ -56,7 +55,6 @@ "hydrate_conditional_base", "hydrate_conditional_modifiers", "hydrate_household_config", - "hydrate_name_config", "bind_constraints", "build_spec", # Validation types diff --git a/extropy/population/spec_builder/binder.py b/extropy/population/spec_builder/binder.py index 534092c..dcb0828 100644 --- a/extropy/population/spec_builder/binder.py +++ b/extropy/population/spec_builder/binder.py @@ -13,7 +13,6 @@ SpecMeta, GroundingSummary, SamplingConfig, - NameConfig, ) from ...utils import topological_sort, extract_names_from_expression @@ -139,7 +138,6 @@ def bind_constraints( category=attr.category, description=attr.description, scope=attr.scope, - correlation_rate=attr.correlation_rate, semantic_type=attr.semantic_type, identity_type=attr.identity_type, display_format=attr.display_format, @@ -194,8 +192,6 @@ def build_spec( attributes: list[AttributeSpec], sampling_order: list[str], sources: list[str], - agent_focus: str | None = None, - name_config: NameConfig | None = None, ) -> PopulationSpec: """ Assemble the final PopulationSpec from all components. @@ -206,8 +202,6 @@ def build_spec( attributes: List of AttributeSpec sampling_order: Order for sampling sources: List of source URLs from research - agent_focus: Who the study agents represent (natural language) - name_config: LLM-researched name frequency tables (None = use bundled CSVs) Returns: Complete PopulationSpec ready for YAML export @@ -215,9 +209,7 @@ def build_spec( meta = SpecMeta( description=description, geography=geography, - agent_focus=agent_focus, created_at=datetime.now(), - name_config=name_config, ) grounding = _compute_grounding_summary(attributes, sources) diff --git a/extropy/population/spec_builder/hydrator.py b/extropy/population/spec_builder/hydrator.py index 226207a..bdb61be 100644 --- a/extropy/population/spec_builder/hydrator.py +++ b/extropy/population/spec_builder/hydrator.py @@ -22,7 +22,6 @@ DiscoveredAttribute, HydratedAttribute, HouseholdConfig, - NameConfig, ) from ...utils.callbacks import HydrationProgressCallback from .hydrators import ( @@ -31,7 +30,6 @@ hydrate_conditional_base, hydrate_conditional_modifiers, hydrate_household_config, - hydrate_name_config, ) logger = logging.getLogger(__name__) @@ -112,6 +110,55 @@ def _should_hydrate_household_config( return False +def _extract_gender_options_for_household( + context: list[AttributeSpec] | None, + hydrated_attrs: list[HydratedAttribute], +) -> list[str]: + """Extract explicit gender-category options for household partner pairing.""" + + def options_for(attr: AttributeSpec) -> list[str]: + if attr.type != "categorical" or attr.sampling.distribution is None: + return [] + dist = attr.sampling.distribution + if not hasattr(dist, "options"): + return [] + opts = getattr(dist, "options", None) or [] + return [str(o) for o in opts if str(o).strip()] + + # Prefer semantic metadata over name heuristics. + candidates: list[AttributeSpec] = [] + for attr in context or []: + if attr.identity_type == "gender_identity": + candidates.append(attr) + for attr in hydrated_attrs: + if attr.identity_type == "gender_identity": + candidates.append(attr) + + # Legacy fallback for older specs lacking identity_type metadata. + if not candidates: + fallback_names = {"gender", "sex", "gender_identity"} + for attr in context or []: + if attr.name in fallback_names: + candidates.append(attr) + for attr in hydrated_attrs: + if attr.name in fallback_names: + candidates.append(attr) + + for attr in candidates: + opts = options_for(attr) + if opts: + # Preserve original option casing/order from spec. + seen: set[str] = set() + ordered: list[str] = [] + for value in opts: + if value not in seen: + seen.add(value) + ordered.append(value) + return ordered + + return [] + + # ============================================================================= # Main Orchestrator # ============================================================================= @@ -124,12 +171,11 @@ def hydrate_attributes( description: str, geography: str | None = None, context: list[AttributeSpec] | None = None, + include_household: bool = True, model: str | None = None, reasoning_effort: str = "low", on_progress: ProgressCallback | None = None, -) -> tuple[ - list[HydratedAttribute], list[str], list[str], HouseholdConfig, NameConfig | None -]: +) -> tuple[list[HydratedAttribute], list[str], list[str], HouseholdConfig]: """ Research distributions for discovered attributes using split hydration. @@ -148,15 +194,16 @@ def hydrate_attributes( description: Original population description geography: Geographic scope for research context: Existing attributes from base population (for extend mode) + include_household: Whether to hydrate household config (Step 2e) model: Model to use reasoning_effort: "low", "medium", or "high" on_progress: Optional callback for progress updates (step, status, count) Returns: - Tuple of (list of HydratedAttribute, list of source URLs, list of validation warnings, HouseholdConfig, NameConfig | None) + Tuple of (list of HydratedAttribute, list of source URLs, list of validation warnings, HouseholdConfig) """ if not attributes: - return [], [], [], HouseholdConfig(), None + return [], [], [], HouseholdConfig() all_sources = [] all_warnings = [] @@ -302,40 +349,40 @@ def on_retry(attempt: int, max_retries: int, error_summary: str): len(modifier_sources), ) - # Step 2e: Household config (conditional - skip for purely professional populations) - if _should_hydrate_household_config(population, attributes): + # Step 2e: Household config (optional; enabled by scenario stage) + if include_household and _should_hydrate_household_config(population, attributes): report("2e", "Researching household composition...") + merged_attribute_names = sorted( + { + *(attr.name for attr in attributes), + *(attr.name for attr in context or []), + } + ) + gender_options = _extract_gender_options_for_household( + context=context, + hydrated_attrs=independent_attrs + derived_attrs + conditional_attrs, + ) household_config, hh_sources = hydrate_household_config( population=population, geography=geography, + allowed_attributes=merged_attribute_names, + allowed_gender_values=gender_options, model=model, reasoning_effort=reasoning_effort, on_retry=make_retry_callback("2e"), ) all_sources.extend(hh_sources) report("2e", "Household config researched", len(hh_sources)) - else: + elif include_household: logger.info( "Skipping household config hydration - no household-scoped attributes " "or household keywords in population description" ) household_config = HouseholdConfig() report("2e", "Skipped (no household context)", 0) - - # Step 2f: Name config - report("2f", "Researching population-appropriate names...") - name_config, name_sources = hydrate_name_config( - population=population, - geography=geography, - model=model, - reasoning_effort=reasoning_effort, - on_retry=make_retry_callback("2f"), - ) - all_sources.extend(name_sources) - if name_config is not None: - report("2f", "Name config researched", len(name_sources)) else: - report("2f", "Using bundled CSV names", 0) + household_config = HouseholdConfig() + report("2e", "Skipped (disabled for this stage)", 0) # Combine all hydrated attributes all_hydrated = independent_attrs + derived_attrs + conditional_attrs @@ -347,4 +394,4 @@ def on_retry(attempt: int, max_retries: int, error_summary: str): # when validate_spec() is called on the final PopulationSpec report("strategy", "Strategy consistency check passed", None) - return all_hydrated, unique_sources, all_warnings, household_config, name_config + return all_hydrated, unique_sources, all_warnings, household_config diff --git a/extropy/population/spec_builder/hydrators/__init__.py b/extropy/population/spec_builder/hydrators/__init__.py index af41059..39dfd8d 100644 --- a/extropy/population/spec_builder/hydrators/__init__.py +++ b/extropy/population/spec_builder/hydrators/__init__.py @@ -5,14 +5,12 @@ - derived.py: Specify formulas for derived attributes (Step 2b) - conditional.py: Research base distributions and modifiers (Steps 2c + 2d) - household.py: Research household composition parameters (Step 2e) -- name.py: Research culturally-appropriate names (Step 2f) """ from .independent import hydrate_independent from .derived import hydrate_derived from .conditional import hydrate_conditional_base, hydrate_conditional_modifiers from .household import hydrate_household_config -from .name import hydrate_name_config __all__ = [ "hydrate_independent", @@ -20,5 +18,4 @@ "hydrate_conditional_base", "hydrate_conditional_modifiers", "hydrate_household_config", - "hydrate_name_config", ] diff --git a/extropy/population/spec_builder/hydrators/household.py b/extropy/population/spec_builder/hydrators/household.py index 8442182..3508435 100644 --- a/extropy/population/spec_builder/hydrators/household.py +++ b/extropy/population/spec_builder/hydrators/household.py @@ -15,6 +15,8 @@ def hydrate_household_config( population: str, geography: str | None = None, + allowed_attributes: list[str] | None = None, + allowed_gender_values: list[str] | None = None, model: str | None = None, reasoning_effort: str = "low", on_retry: RetryCallback | None = None, @@ -29,6 +31,8 @@ def hydrate_household_config( Args: population: Population description (e.g., "Japanese retirees in Osaka") geography: Geographic scope (e.g., "Japan") + allowed_attributes: Exact merged population attribute names. When provided, + assortative_mating.attribute is constrained to this set. model: Model to use reasoning_effort: "low", "medium", or "high" on_retry: Callback for retry notifications @@ -38,6 +42,26 @@ def hydrate_household_config( """ geo_context = f" in {geography}" if geography else "" + allowed_text = "" + if allowed_attributes: + allowed_list = ", ".join(sorted(set(allowed_attributes))) + allowed_text = f""" +14. **Assortative-mating attribute constraint**: + - `assortative_mating[].attribute` MUST be one of these exact attribute names: + {allowed_list} + - Do not invent aliases or alternate labels. +""" + + gender_text = "" + if allowed_gender_values: + gender_list = ", ".join(sorted(set(allowed_gender_values))) + gender_text = f""" +15. **Partner gender pair constraint**: + - `partner_gender_pair_weights[].left/right` MUST use these exact values: + {gender_list} + - Treat pairs as unordered (male/female same as female/male). +""" + prompt = f"""Research household composition data for {population}{geo_context}. For this population, provide statistically grounded values for: @@ -77,7 +101,17 @@ def hydrate_household_config( 12. **Average household size**: Mean number of persons per household. -13. **Sources**: List of URLs or citations used. +13. **Partner gender pairing policy**: + - partner_gender_mode: "independent" or "weighted" + - partner_gender_pair_weights: Array of objects {{left, right, weight}} where: + - left/right are gender-category values from the population + - weight is non-negative + - weights should sum to ~1.0 across listed pairs + - Use "weighted" only when good regional evidence exists; otherwise "independent". + +14. **Sources**: List of URLs or citations used. +{allowed_text} +{gender_text} ## Research Guidelines @@ -85,6 +119,10 @@ def hydrate_household_config( - Adapt household types and education stages to the local context (e.g., Japanese education system stages differ from US). - Be specific to the population described, not generic global averages. - Ensure household_type_weights sum to ~1.0 for each age bracket. +- Young-adult realism guardrail: for the earliest adult bracket (typically ages 18-20), + keep partnered household and parent-household shares conservative by default unless + strong local evidence supports higher rates. If you set higher rates, ensure they + are explicitly justified by cited sources. - If data is unavailable for a specific field, use the best available regional or national data. Return a single JSON object with all fields.""" @@ -92,7 +130,10 @@ def hydrate_household_config( try: data, sources = agentic_research( prompt=prompt, - response_schema=build_household_config_schema(), + response_schema=build_household_config_schema( + allowed_assortative_attributes=allowed_attributes, + allowed_gender_values=allowed_gender_values, + ), schema_name="household_config", model=model, reasoning_effort=reasoning_effort, @@ -105,7 +146,11 @@ def hydrate_household_config( return HouseholdConfig(), [] try: - config = _parse_household_config(data) + config = _parse_household_config( + data, + allowed_attributes=allowed_attributes, + allowed_gender_values=allowed_gender_values, + ) # Merge any sources from the response into the source list response_sources = data.get("sources", []) all_sources = list(set(sources + [s for s in response_sources if s])) @@ -118,7 +163,11 @@ def hydrate_household_config( return HouseholdConfig(), sources -def _parse_household_config(data: dict) -> HouseholdConfig: +def _parse_household_config( + data: dict, + allowed_attributes: list[str] | None = None, + allowed_gender_values: list[str] | None = None, +) -> HouseholdConfig: """Parse LLM response into a HouseholdConfig, falling back to defaults for bad fields. Converts array-of-objects LLM output back to the dict/tuple structures that @@ -188,14 +237,52 @@ def _parse_household_config(data: dict) -> HouseholdConfig: kwargs[field] = int(data[field]) # Assortative mating: [{attribute, correlation}] -> {str: float} + allowed_attr_set = set(allowed_attributes or []) if "assortative_mating" in data and isinstance(data["assortative_mating"], list): mating = {} for item in data["assortative_mating"]: if isinstance(item, dict) and "attribute" in item and "correlation" in item: - mating[str(item["attribute"])] = float(item["correlation"]) + attr_name = str(item["attribute"]) + if allowed_attr_set and attr_name not in allowed_attr_set: + continue + mating[attr_name] = float(item["correlation"]) if mating: kwargs["assortative_mating"] = mating + if "partner_gender_mode" in data and isinstance(data["partner_gender_mode"], str): + mode = data["partner_gender_mode"].strip().lower() + if mode in {"independent", "weighted"}: + kwargs["partner_gender_mode"] = mode + + allowed_gender_set = set(allowed_gender_values or []) + if "partner_gender_pair_weights" in data and isinstance( + data["partner_gender_pair_weights"], list + ): + pair_weights = [] + for item in data["partner_gender_pair_weights"]: + if not ( + isinstance(item, dict) + and "left" in item + and "right" in item + and "weight" in item + ): + continue + left = str(item["left"]) + right = str(item["right"]) + if allowed_gender_set and ( + left not in allowed_gender_set or right not in allowed_gender_set + ): + continue + try: + weight = float(item["weight"]) + except Exception: + continue + if weight < 0: + continue + pair_weights.append({"left": left, "right": right, "weight": weight}) + if pair_weights: + kwargs["partner_gender_pair_weights"] = pair_weights + # Life stages if "life_stages" in data and isinstance(data["life_stages"], list): stages = [] diff --git a/extropy/population/spec_builder/hydrators/name.py b/extropy/population/spec_builder/hydrators/name.py deleted file mode 100644 index de5217b..0000000 --- a/extropy/population/spec_builder/hydrators/name.py +++ /dev/null @@ -1,215 +0,0 @@ -"""Step 2f: Name Config Hydration. - -Research culturally-appropriate name frequency tables for the target population. -US populations skip this step (bundled SSA/Census CSVs are higher quality). -""" - -import logging -import re - -from ....core.llm import agentic_research, RetryCallback -from ....core.models.population import NameConfig, NameEntry -from ..schemas import build_name_config_schema - -logger = logging.getLogger(__name__) - -# Heuristic patterns for detecting US populations -_US_PATTERNS = re.compile( - r"\b(" - r"united\s+states|(? bool: - """Heuristic: does this description clearly indicate a US population?""" - text = f"{population} {geography or ''}".lower() - if _US_PATTERNS.search(text): - return True - # Check for US state names - for state in _US_STATES: - if state in text: - return True - return False - - -def hydrate_name_config( - population: str, - geography: str | None = None, - model: str | None = None, - reasoning_effort: str = "low", - on_retry: RetryCallback | None = None, -) -> tuple[NameConfig | None, list[str]]: - """ - Research culturally-appropriate names for the target population (Step 2f). - - For US populations, returns (None, []) — bundled CSVs are higher quality. - - Args: - population: Population description - geography: Geographic scope - model: Model to use - reasoning_effort: "low", "medium", or "high" - on_retry: Callback for retry notifications - - Returns: - Tuple of (NameConfig or None, list of source URLs) - """ - if _is_us_population(population, geography): - logger.debug("US population detected — using bundled CSV names") - return None, [] - - geo_context = f" in {geography}" if geography else "" - - prompt = f"""Research culturally-appropriate personal names for {population}{geo_context}. - -Provide name frequency tables that reflect the real naming patterns of this population: - -1. **male_first_names**: 150+ male first names with frequency weights. - - Span generations (older traditional names AND modern/younger names). - - Include regional variation where relevant. - - Weights should reflect actual popularity (higher = more common). - -2. **female_first_names**: 150+ female first names with frequency weights. - - Same guidelines as male names. - -3. **last_names**: 150+ surnames/family names with frequency weights. - - Reflect the actual surname distribution of this population. - - Include common AND less-common names for long-tail diversity. - -4. **sources**: List of URLs or citations used. - -## Important Guidelines - -- Do NOT just list the top-10 stereotypical names. Include diverse, realistic names. -- Weights should create a realistic long-tail distribution (a few common names, many less-common ones). -- Include generational variation: names popular with older people vs younger people. -- For populations with multiple ethnic/linguistic groups, include names from all major groups proportionally. -- The total number of names in each list should be at least 150 for realistic diversity. - -Return a single JSON object with all fields.""" - - try: - data, sources = agentic_research( - prompt=prompt, - response_schema=build_name_config_schema(), - schema_name="name_config", - model=model, - reasoning_effort=reasoning_effort, - on_retry=on_retry, - ) - except Exception: - logger.warning( - "Name config hydration failed, falling back to CSV names", exc_info=True - ) - return None, [] - - try: - config = _parse_name_config(data) - response_sources = data.get("sources", []) - all_sources = list(set(sources + [s for s in response_sources if s])) - return config, all_sources - except Exception: - logger.warning( - "Failed to parse name config response, falling back to CSV names", - exc_info=True, - ) - return None, sources - - -def _parse_name_config(data: dict) -> NameConfig: - """Parse LLM response into a NameConfig with diversity guardrails.""" - male = _parse_name_entries(data.get("male_first_names", [])) - female = _parse_name_entries(data.get("female_first_names", [])) - last = _parse_name_entries(data.get("last_names", [])) - - # Diversity guardrail: warn if top-5 names exceed 40% of total weight - for label, entries in [ - ("male_first_names", male), - ("female_first_names", female), - ("last_names", last), - ]: - if len(entries) >= 5: - total_weight = sum(e.weight for e in entries) - if total_weight > 0: - top5_weight = sum( - e.weight - for e in sorted(entries, key=lambda x: x.weight, reverse=True)[:5] - ) - if top5_weight / total_weight > 0.40: - logger.warning( - f"Name config: top-5 {label} account for " - f"{top5_weight / total_weight:.0%} of total weight " - f"(>40%% threshold)" - ) - - return NameConfig( - male_first_names=male, - female_first_names=female, - last_names=last, - ) - - -def _parse_name_entries(raw: list) -> list[NameEntry]: - """Parse a list of {name, weight} dicts into NameEntry objects.""" - entries = [] - for item in raw: - if isinstance(item, dict) and "name" in item: - weight = float(item.get("weight", 1.0)) - if weight > 0: - entries.append(NameEntry(name=str(item["name"]), weight=weight)) - return entries diff --git a/extropy/population/spec_builder/schemas.py b/extropy/population/spec_builder/schemas.py index 37e8c84..bb79ae4 100644 --- a/extropy/population/spec_builder/schemas.py +++ b/extropy/population/spec_builder/schemas.py @@ -245,13 +245,30 @@ def build_conditional_base_schema() -> dict: } -def build_household_config_schema() -> dict: +def build_household_config_schema( + allowed_assortative_attributes: list[str] | None = None, + allowed_gender_values: list[str] | None = None, +) -> dict: """Build JSON schema for household config hydration. Uses array-of-objects patterns instead of dict/tuple schemas for LLM compatibility. Both Anthropic and OpenAI structured outputs require additionalProperties: false (not a schema) and don't support tuple-style array items. """ + attribute_schema: dict = {"type": "string"} + if allowed_assortative_attributes: + # Constrain to exact merged attribute names to avoid silent runtime ignores. + attribute_schema = { + "type": "string", + "enum": sorted(set(allowed_assortative_attributes)), + } + gender_value_schema: dict = {"type": "string"} + if allowed_gender_values: + gender_value_schema = { + "type": "string", + "enum": sorted(set(allowed_gender_values)), + } + return { "type": "object", "properties": { @@ -312,13 +329,30 @@ def build_household_config_schema() -> dict: "items": { "type": "object", "properties": { - "attribute": {"type": "string"}, + "attribute": attribute_schema, "correlation": {"type": "number"}, }, "required": ["attribute", "correlation"], "additionalProperties": False, }, }, + "partner_gender_mode": { + "type": "string", + "enum": ["independent", "weighted"], + }, + "partner_gender_pair_weights": { + "type": "array", + "items": { + "type": "object", + "properties": { + "left": gender_value_schema, + "right": gender_value_schema, + "weight": {"type": "number"}, + }, + "required": ["left", "right", "weight"], + "additionalProperties": False, + }, + }, "partner_age_gap_mean": {"type": "number"}, "partner_age_gap_std": {"type": "number"}, "min_adult_age": {"type": "integer"}, @@ -353,6 +387,8 @@ def build_household_config_schema() -> dict: "same_group_rates", "default_same_group_rate", "assortative_mating", + "partner_gender_mode", + "partner_gender_pair_weights", "partner_age_gap_mean", "partner_age_gap_std", "min_adult_age", @@ -370,35 +406,6 @@ def build_household_config_schema() -> dict: } -def build_name_config_schema() -> dict: - """Build JSON schema for name config hydration.""" - name_entry = { - "type": "object", - "properties": { - "name": {"type": "string"}, - "weight": {"type": "number"}, - }, - "required": ["name", "weight"], - "additionalProperties": False, - } - return { - "type": "object", - "properties": { - "male_first_names": {"type": "array", "items": name_entry}, - "female_first_names": {"type": "array", "items": name_entry}, - "last_names": {"type": "array", "items": name_entry}, - "sources": {"type": "array", "items": {"type": "string"}}, - }, - "required": [ - "male_first_names", - "female_first_names", - "last_names", - "sources", - ], - "additionalProperties": False, - } - - def build_modifiers_schema() -> dict: """Build JSON schema for conditional modifiers hydration.""" return { diff --git a/extropy/population/spec_builder/selector.py b/extropy/population/spec_builder/selector.py index f4543cd..e52146c 100644 --- a/extropy/population/spec_builder/selector.py +++ b/extropy/population/spec_builder/selector.py @@ -7,6 +7,8 @@ - Personality: Behavioral/psychological traits when relevant """ +import re + from ...core.llm import reasoning_call from ...core.models import AttributeSpec, DiscoveredAttribute @@ -70,6 +72,15 @@ def _is_multi_country_geography(geography: str | None, description: str) -> bool return False +def _canonicalize_attribute_name(name: str) -> str: + """Normalize model-produced attribute names into stable snake_case.""" + normalized = name.strip().lower() + normalized = re.sub(r"[\s\-\/]+", "_", normalized) + normalized = re.sub(r"[^a-z0-9_]", "", normalized) + normalized = re.sub(r"_+", "_", normalized).strip("_") + return normalized + + # JSON schema for attribute selection response ATTRIBUTE_SELECTION_SCHEMA = { "type": "object", @@ -112,12 +123,6 @@ def _is_multi_country_geography(geography: str | None, description: str) -> bool "enum": ["individual", "household", "partner_correlated"], "description": "individual: varies per person; household: shared across household members; partner_correlated: correlated between partners (e.g., age, education, religion, politics)", }, - "correlation_rate": { - "type": "number", - "minimum": 0, - "maximum": 1, - "description": "For partner_correlated scope only: probability (0-1) that partner has same value. Use ~0.6-0.7 for education, ~0.7-0.8 for religion, ~0.5-0.6 for politics. Omit for age (uses gaussian offset) and race/ethnicity (uses per-group rates).", - }, "depends_on": { "type": "array", "items": {"type": "string"}, @@ -353,13 +358,6 @@ def select_attributes( - `partner_correlated`: Correlated between partners (assortative mating) - Examples: age, education_level, religious_affiliation, political views, race/ethnicity, country - Partners tend to have similar values but NOT identical - - Provide `correlation_rate` (0-1) for probability of same value: - - age: OMIT (uses gaussian offset automatically) - - race/ethnicity: OMIT (uses per-group rates automatically) - - education: ~0.6-0.7 - - religion: ~0.7-0.8 - - politics: ~0.5-0.6 - - country: ~0.95 (most people marry within their country) - `individual`: Varies per person, sampled independently - Examples: gender, occupation, personality traits, personal attitudes @@ -383,7 +381,6 @@ def select_attributes( - description: One clear sentence - strategy: independent, derived, or conditional - scope: individual, household, or partner_correlated - - correlation_rate: (only for partner_correlated scope, omit for age/race) - depends_on: List of attribute names (max 3, empty if independent)""" data = reasoning_call( @@ -395,9 +392,30 @@ def select_attributes( ) attributes = [] + seen_raw_by_canonical: dict[str, str] = {} for attr_data in data.get("attributes", []): + raw_name = str(attr_data.get("name", "")).strip() + canonical_name = _canonicalize_attribute_name(attr_data.get("name", "")) + if not canonical_name: + continue + if canonical_name in seen_raw_by_canonical: + prev_raw = seen_raw_by_canonical[canonical_name] + if prev_raw != raw_name: + raise ValueError( + "Ambiguous attribute-name normalization: " + f"'{prev_raw}' and '{raw_name}' both normalize to '{canonical_name}'" + ) + continue + strategy = attr_data.get("strategy", "independent") - depends_on = attr_data.get("depends_on", []) + depends_on = [ + dep + for dep in ( + _canonicalize_attribute_name(str(dep)) + for dep in attr_data.get("depends_on", []) + ) + if dep and dep != canonical_name + ] if strategy == "independent" and depends_on: strategy = "conditional" @@ -405,19 +423,19 @@ def select_attributes( strategy = "independent" attr = DiscoveredAttribute( - name=attr_data["name"], + name=canonical_name, type=attr_data["type"], category=attr_data["category"], description=attr_data["description"], strategy=strategy, scope=attr_data.get("scope", "individual"), - correlation_rate=attr_data.get("correlation_rate"), semantic_type=attr_data.get("semantic_type"), identity_type=attr_data.get("identity_type"), display_format=attr_data.get("display_format"), depends_on=depends_on, ) attributes.append(attr) + seen_raw_by_canonical[canonical_name] = raw_name # Add Big Five if recommended and not already present if data.get("include_big_five", False): diff --git a/extropy/population/spec_builder/sufficiency.py b/extropy/population/spec_builder/sufficiency.py index 2d11235..e346254 100644 --- a/extropy/population/spec_builder/sufficiency.py +++ b/extropy/population/spec_builder/sufficiency.py @@ -19,10 +19,6 @@ "type": ["string", "null"], "description": "Geographic scope if mentioned (e.g., 'Germany', 'US', 'California')", }, - "agent_focus": { - "type": ["string", "null"], - "description": "Natural language description of who should be simulated (e.g., 'families', 'surgeons', 'couples'). Used for documentation.", - }, "clarifications_needed": { "type": "array", "items": {"type": "string"}, @@ -63,7 +59,6 @@ "required": [ "sufficient", "geography", - "agent_focus", "clarifications_needed", "questions", ], @@ -102,25 +97,11 @@ def check_sufficiency( - Extract if mentioned (e.g., "German surgeons" → Germany) - Can be country, region, or city -3. AGENT FOCUS - who should be simulated as active agents? - This controls how households are sampled: - - "families" or "households" → everyone in household gets simulated (both partners, older kids) - Use for: communities, neighborhoods, social dynamics, local issues - - "couples" or "partners" → both adults simulated, children are background NPCs - Use for: relationship studies, retirement planning, couple decisions - - Specific roles like "surgeons", "subscribers" → one person per household, partner/kids are NPCs - Use for: professional studies, product research, individual behavior - - Examples: - - "community reacting to school policy" → "families" (both parents may have opinions) - - "German surgeons" → "surgeons" (study is about the surgeon, not their family) - - "retired couples planning travel" → "couples" (both partners matter) - If the description is too vague to create meaningful attributes, mark as insufficient and provide BOTH: 1. `clarifications_needed`: Simple list of question strings (for backward compat) 2. `questions`: Structured questions with these fields: - - id: snake_case identifier (e.g., "geography", "agent_focus") + - id: snake_case identifier (e.g., "geography") - question: Human-readable question text - type: "single_choice" (with options), "text" (free text), or "number" - options: Array of choices for single_choice (null for text/number) @@ -160,7 +141,6 @@ def check_sufficiency( return SufficiencyResult( sufficient=data.get("sufficient", False), geography=data.get("geography"), - agent_focus=data.get("agent_focus"), clarifications_needed=data.get("clarifications_needed", []), questions=questions, ) diff --git a/extropy/population/validator/semantic.py b/extropy/population/validator/semantic.py index 92589ab..e23511b 100644 --- a/extropy/population/validator/semantic.py +++ b/extropy/population/validator/semantic.py @@ -4,6 +4,10 @@ They help identify potential issues but don't indicate structural problems. """ +import ast +import itertools +import math + from ...core.models.validation import Severity, ValidationIssue from ...core.models import ( PopulationSpec, @@ -13,8 +17,10 @@ UniformDistribution, BetaDistribution, CategoricalDistribution, + BooleanDistribution, ) -from ...utils import extract_comparisons_from_expression +from ..modifier_precedence import choose_modifier_precedence +from ...utils import extract_comparisons_from_expression, extract_names_from_expression # ============================================================================= @@ -29,6 +35,7 @@ def run_semantic_checks(spec: PopulationSpec) -> list[ValidationIssue]: 10. No-Op Detection 11. Modifier Stacking Analysis 12. Condition Value Validity + 13. Last-Wins Overlap Detection """ issues: list[ValidationIssue] = [] @@ -45,6 +52,9 @@ def run_semantic_checks(spec: PopulationSpec) -> list[ValidationIssue]: # Category 12: Condition Value Validity issues.extend(_check_condition_values(attr, attr_lookup)) + # Category 13: Last-Wins overlap detection for categorical/boolean + issues.extend(_check_last_wins_overlaps(attr, attr_lookup)) + return issues @@ -248,3 +258,259 @@ def _check_condition_values( ) return issues + + +# ============================================================================= +# Category 13: Last-Wins Overlap Detection +# ============================================================================= + + +def _check_last_wins_overlaps( + attr: AttributeSpec, + attr_lookup: dict[str, AttributeSpec], +) -> list[ValidationIssue]: + """Warn when categorical/boolean modifiers overlap ambiguously. + + Overlap itself is not always problematic when precedence is deterministic + by condition specificity/subset. We only warn when overlap would still + resolve by declaration order. + """ + issues: list[ValidationIssue] = [] + dist = attr.sampling.distribution + modifiers = attr.sampling.modifiers + if not dist or not modifiers or len(modifiers) < 2: + return issues + + is_last_wins_categorical = isinstance(dist, CategoricalDistribution) + is_last_wins_boolean = isinstance(dist, BooleanDistribution) + if not (is_last_wins_categorical or is_last_wins_boolean): + return issues + + def normalize_when(expr: str) -> str: + return expr.strip().lower().replace(" ", "") + + def is_unconditional(expr: str) -> bool: + normalized = normalize_when(expr) + return normalized in {"true", "1==1", "(true)"} + + for i in range(len(modifiers)): + for j in range(i + 1, len(modifiers)): + left = modifiers[i].when + right = modifiers[j].when + if not left or not right: + continue + + may_overlap = False + if is_unconditional(left) or is_unconditional(right): + may_overlap = True + elif normalize_when(left) == normalize_when(right): + may_overlap = True + else: + may_overlap = _conditions_can_both_be_true( + left, + right, + attr_lookup, + ) + + if may_overlap: + decision = choose_modifier_precedence([(i, left), (j, right)]) + if decision and decision.reason in {"subset", "specificity"}: + continue + + issues.append( + ValidationIssue( + severity=Severity.WARNING, + category="MODIFIER_OVERLAP", + location=attr.name, + message=( + f"modifiers {i} and {j} overlap and currently rely on declaration order" + ), + suggestion=( + "Make conditions mutually exclusive or add specificity so one " + "rule deterministically dominates" + ), + ) + ) + + return issues + + +def _conditions_can_both_be_true( + left: str, + right: str, + attr_lookup: dict[str, AttributeSpec], +) -> bool: + """Return True if both condition expressions appear jointly satisfiable.""" + referenced = sorted( + ( + extract_names_from_expression(left) | extract_names_from_expression(right) + ).intersection(set(attr_lookup.keys())) + ) + + # If no referenced attrs, evaluate directly. + if not referenced: + return _eval_condition_bool(left, {}) and _eval_condition_bool(right, {}) + + # If expressions reference unknown names, keep conservative warning behavior. + all_referenced = extract_names_from_expression( + left + ) | extract_names_from_expression(right) + unknown = [name for name in all_referenced if name not in attr_lookup] + if unknown: + return True + + domains: dict[str, list[object]] = {} + for name in referenced: + domains[name] = _candidate_values_for_attr(attr_lookup[name], [left, right]) + if not domains[name]: + return True + + domain_lists = [domains[name] for name in referenced] + total = 1 + for values in domain_lists: + total *= max(1, len(values)) + + max_combinations = 120_000 + if total > max_combinations: + trimmed = [] + for values in domain_lists: + if len(values) <= 18: + trimmed.append(values) + continue + step = max(1, len(values) // 18) + trimmed.append(values[::step][:18]) + domain_lists = trimmed + + for combo in itertools.product(*domain_lists): + env = dict(zip(referenced, combo, strict=False)) + if not _eval_condition_bool(left, env): + continue + if _eval_condition_bool(right, env): + return True + + return False + + +def _eval_condition_bool(expr: str, env: dict[str, object]) -> bool: + """Evaluate condition expression; return False on evaluation errors.""" + try: + return bool(eval(expr, {"__builtins__": {}}, env)) + except Exception: + return False + + +def _candidate_values_for_attr( + attr: AttributeSpec, + expressions: list[str], +) -> list[object]: + """Build a bounded candidate set for condition satisfiability checks.""" + dist = attr.sampling.distribution + + if attr.type == "boolean": + return [True, False] + + if attr.type == "categorical" and isinstance(dist, CategoricalDistribution): + return list(dist.options or []) + + if attr.type in {"int", "float"}: + values: set[float] = set() + min_val, max_val = _numeric_bounds(attr) + + if min_val is not None: + values.add(min_val) + if max_val is not None: + values.add(max_val) + if min_val is not None and max_val is not None and min_val <= max_val: + values.add((min_val + max_val) / 2.0) + + for expr in expressions: + for constant in _extract_numeric_constants(expr): + values.add(constant) + values.add(constant - 1) + values.add(constant + 1) + values.add(constant - 0.5) + values.add(constant + 0.5) + + if not values: + values = {0.0, 1.0, 10.0} + + bounded: list[float] = [] + for value in values: + if min_val is not None and value < min_val: + continue + if max_val is not None and value > max_val: + continue + bounded.append(value) + + if attr.type == "int": + ints: list[int] = [] + for value in bounded: + ints.extend( + [ + int(math.floor(value)), + int(round(value)), + int(math.ceil(value)), + ] + ) + ints = sorted(set(ints)) + if len(ints) > 80: + step = max(1, len(ints) // 80) + ints = ints[::step] + return ints + + floats = sorted(set(round(value, 6) for value in bounded)) + if len(floats) > 80: + step = max(1, len(floats) // 80) + floats = floats[::step] + return floats + + return [] + + +def _numeric_bounds(attr: AttributeSpec) -> tuple[float | None, float | None]: + """Infer numeric min/max from distribution bounds and hard constraints.""" + min_val = None + max_val = None + + dist = attr.sampling.distribution + if isinstance( + dist, + ( + NormalDistribution, + LognormalDistribution, + UniformDistribution, + BetaDistribution, + ), + ): + min_val = dist.min + max_val = dist.max + + for constraint in attr.constraints: + if constraint.type == "hard_min" and constraint.value is not None: + if min_val is None: + min_val = float(constraint.value) + else: + min_val = max(min_val, float(constraint.value)) + elif constraint.type == "hard_max" and constraint.value is not None: + if max_val is None: + max_val = float(constraint.value) + else: + max_val = min(max_val, float(constraint.value)) + + return min_val, max_val + + +def _extract_numeric_constants(expr: str) -> set[float]: + """Extract numeric constants from an expression AST.""" + out: set[float] = set() + try: + tree = ast.parse(expr, mode="eval") + except SyntaxError: + return out + + for node in ast.walk(tree): + if isinstance(node, ast.Constant) and isinstance(node.value, (int, float)): + if isinstance(node.value, bool): + continue + out.add(float(node.value)) + return out diff --git a/extropy/scenario/__init__.py b/extropy/scenario/__init__.py index c361d04..0c3de93 100644 --- a/extropy/scenario/__init__.py +++ b/extropy/scenario/__init__.py @@ -37,7 +37,6 @@ ExposureRule, SeedExposure, # Interaction - InteractionType, InteractionConfig, SpreadModifier, SpreadConfig, @@ -51,6 +50,7 @@ # Scenario ScenarioMeta, ScenarioSpec, + SamplingSemanticRoles, # Validation Severity, ValidationIssue, @@ -81,7 +81,6 @@ "ExposureRule", "SeedExposure", # Models - Interaction - "InteractionType", "InteractionConfig", "SpreadModifier", "SpreadConfig", @@ -95,6 +94,7 @@ # Models - Scenario "ScenarioMeta", "ScenarioSpec", + "SamplingSemanticRoles", # Models - Validation "Severity", "ValidationIssue", diff --git a/extropy/scenario/compiler.py b/extropy/scenario/compiler.py index af55106..e9f0ab0 100644 --- a/extropy/scenario/compiler.py +++ b/extropy/scenario/compiler.py @@ -11,9 +11,11 @@ import re from datetime import datetime from pathlib import Path +from typing import Literal from ..core.models import ( IdentityDimension, + HouseholdConfig, PopulationSpec, ScenarioMeta, ScenarioSimConfig, @@ -26,7 +28,9 @@ from .exposure import generate_seed_exposure from .interaction import determine_interaction_model from .timeline import generate_timeline_and_outcomes +from .sampling_semantics import generate_sampling_semantic_roles from ..utils.callbacks import StepProgressCallback +from ..utils import topological_sort from .validator import validate_scenario from ..storage import open_study_db @@ -335,6 +339,8 @@ def progress(step: str, status: str): ) # Assemble full spec + sampling_semantic_roles = generate_sampling_semantic_roles(population_spec) + spec = ScenarioSpec( meta=meta, event=event, @@ -345,6 +351,7 @@ def progress(step: str, status: str): outcomes=outcome_config, simulation=simulation_config, background_context=background_context, + sampling_semantic_roles=sampling_semantic_roles, ) # ========================================================================= @@ -371,6 +378,8 @@ def create_scenario_spec( description: str, population_spec: PopulationSpec, extended_attributes: list | None = None, + household_config: HouseholdConfig | None = None, + agent_focus_mode: Literal["primary_only", "couples", "all"] | None = None, on_progress: StepProgressCallback | None = None, timeline_mode: str | None = None, timestep_unit_override: str | None = None, @@ -387,6 +396,8 @@ def create_scenario_spec( description: Natural language scenario description population_spec: Loaded population spec extended_attributes: Optional list of extended AttributeSpecs from scenario + household_config: Optional household configuration for scenario-owned household semantics + agent_focus_mode: Household agent scope (primary_only/couples/all) on_progress: Optional callback(step, status) for progress updates timeline_mode: Timeline mode override. None = auto-detect. timestep_unit_override: CLI override for timestep unit (e.g. "month"). @@ -400,23 +411,37 @@ def progress(step: str, status: str): if on_progress: on_progress(step, status) + ext_attrs = list(extended_attributes or []) + merged_population = population_spec + if ext_attrs: + merged_attributes = list(population_spec.attributes) + ext_attrs + merged_deps: dict[str, list[str]] = { + attr.name: list(attr.sampling.depends_on or []) + for attr in merged_attributes + } + merged_names = set(merged_deps.keys()) + merged_deps = { + name: [dep for dep in deps if dep in merged_names] + for name, deps in merged_deps.items() + } + merged_population = PopulationSpec( + meta=population_spec.meta.model_copy(), + grounding=population_spec.grounding, + attributes=merged_attributes, + sampling_order=topological_sort(merged_deps), + ) + # Step 1: Parse scenario description progress("1/5", "Parsing event definition...") - event = parse_scenario(description, population_spec) + event = parse_scenario(description, merged_population) - # Step 2: Generate seed exposure (generic, without network specifics) + # Step 2: Generate seed exposure without assumed edge types. progress("2/5", "Generating seed exposure rules...") - # Create a minimal network summary - exposure will use generic rules - # Node count isn't needed for generic rules; will be determined at sample time - generic_network_summary = { - "edge_types": ["colleague", "friend", "family"], # Generic types - } - seed_exposure = generate_seed_exposure( event, - population_spec, - generic_network_summary, + merged_population, + None, ) # Step 3: Determine interaction model @@ -424,8 +449,8 @@ def progress(step: str, status: str): interaction_config, spread_config = determine_interaction_model( event, - population_spec, - generic_network_summary, + merged_population, + None, ) # Step 4: Generate timeline, outcomes, and background context @@ -444,7 +469,7 @@ def progress(step: str, status: str): ) ) - # Step 5: Detect identity dimensions + # Step 5: Detect identity dimensions + sampling semantics progress("5/5", "Detecting identity dimensions...") identity_dimensions = _detect_identity_dimensions( @@ -452,6 +477,7 @@ def progress(step: str, status: str): event_content=event.content, background_context=background_context, ) + sampling_semantic_roles = generate_sampling_semantic_roles(merged_population) # Assemble scenario spec scenario_name = _generate_scenario_name(description) @@ -473,16 +499,18 @@ def progress(step: str, status: str): simulation=simulation_config, background_context=background_context, identity_dimensions=identity_dimensions if identity_dimensions else None, + sampling_semantic_roles=sampling_semantic_roles, + extended_attributes=ext_attrs, + household_config=household_config, + agent_focus_mode=agent_focus_mode, ) - # Store extended attributes if provided - if extended_attributes: - spec.extended_attributes = extended_attributes - - # Light validation (no agents/network to validate against) - from ..core.models.validation import ValidationResult as VResult - - validation_result = VResult(valid=True, errors=[], warnings=[]) + validation_result = validate_scenario( + spec=spec, + population_spec=merged_population, + agent_count=None, + network=None, + ) return spec, validation_result diff --git a/extropy/scenario/exposure.py b/extropy/scenario/exposure.py index a2939b5..70bca56 100644 --- a/extropy/scenario/exposure.py +++ b/extropy/scenario/exposure.py @@ -32,17 +32,16 @@ "type": "string", "description": "Human-readable description", }, - "reach": { - "type": "string", - "enum": ["broadcast", "targeted", "organic"], - "description": "How the channel reaches agents", - }, "credibility_modifier": { "type": "number", "description": "How channel affects perceived credibility (1.0 = no change)", }, + "experience_template": { + "type": "string", + "description": "Optional first-person phrasing for how an agent receives this channel", + }, }, - "required": ["name", "description", "reach", "credibility_modifier"], + "required": ["name", "description", "credibility_modifier"], "additionalProperties": False, }, "minItems": 1, @@ -166,20 +165,8 @@ def generate_seed_exposure( ## Channels Define 2-5 exposure channels appropriate for this scenario. - -**Channel Types:** - -1. **broadcast** - Reaches all agents meeting criteria (email blasts, TV news) - - Use for official communications, mass media - - High reach, consistent timing - -2. **targeted** - Reaches specific subgroups (targeted ads, professional networks) - - Use for demographic-specific channels - - Medium reach, can be very specific - -3. **organic** - Spreads through existing connections (word of mouth, social media shares) - - Use for informal information spread - - Variable reach, depends on network +Include optional `experience_template` where useful. +Example: "I saw a segment about this on local news." **Credibility Modifiers:** - 1.0 = Channel doesn't affect credibility @@ -253,8 +240,8 @@ def generate_seed_exposure( channel = ExposureChannel( name=ch_data["name"], description=ch_data["description"], - reach=ch_data["reach"], credibility_modifier=ch_data.get("credibility_modifier", 1.0), + experience_template=ch_data.get("experience_template"), ) channels.append(channel) diff --git a/extropy/scenario/interaction.py b/extropy/scenario/interaction.py index d529667..319e7a9 100644 --- a/extropy/scenario/interaction.py +++ b/extropy/scenario/interaction.py @@ -4,12 +4,13 @@ to the event and configures how information spreads through the network. """ +import json + from ..core.llm import reasoning_call from ..core.models import ( PopulationSpec, Event, InteractionConfig, - InteractionType, SpreadConfig, SpreadModifier, ) @@ -19,30 +20,9 @@ INTERACTION_MODEL_SCHEMA = { "type": "object", "properties": { - "primary_model": { - "type": "string", - "enum": [ - "passive_observation", - "direct_conversation", - "broadcast_response", - "deliberative", - ], - "description": "Primary interaction model", - }, - "secondary_model": { - "type": "string", - "enum": [ - "passive_observation", - "direct_conversation", - "broadcast_response", - "deliberative", - "none", - ], - "description": "Secondary interaction model (or 'none')", - }, "interaction_description": { "type": "string", - "description": "How interactions work in this scenario", + "description": "Optional human-readable notes about social dynamics", }, "share_probability": { "type": "number", @@ -89,8 +69,6 @@ }, }, "required": [ - "primary_model", - "secondary_model", "interaction_description", "share_probability", "share_modifiers", @@ -112,10 +90,8 @@ def determine_interaction_model( """ Determine how agents will interact about the event. - Selects: - - Primary interaction model (how agents communicate) - - Optional secondary model (for blended scenarios) - - Spread configuration (how information propagates) + Selects spread configuration (how information propagates) plus optional + descriptive interaction notes. Args: event: The parsed event definition @@ -129,15 +105,28 @@ def determine_interaction_model( Example: >>> interaction, spread = determine_interaction_model(event, population_spec) - >>> interaction.primary_model - + >>> interaction.description + 'Neighbors primarily discuss through informal chats and online posts' >>> spread.share_probability 0.35 """ # Build attribute list for spread modifiers - attribute_info = "\n".join( - f"- {attr.name} ({attr.type})" for attr in population_spec.attributes - ) + attr_lines: list[str] = [] + for attr in population_spec.attributes: + line = f"- {attr.name} ({attr.type})" + dist = getattr(attr.sampling, "distribution", None) + if ( + attr.type == "categorical" + and dist is not None + and hasattr(dist, "options") + and dist.options + ): + line += f" options={json.dumps(list(dist.options), ensure_ascii=False)}" + elif attr.type == "boolean": + line += " options=[true, false]" + attr_lines.append(line) + + attribute_info = "\n".join(attr_lines) # Build edge type info if available edge_type_info = "" @@ -160,7 +149,8 @@ def determine_interaction_model( ## Event Type: {event.type.value} -Content: "{event.content[:200]}..." +Content: +\"\"\"{event.content}\"\"\" Source: {event.source} Credibility: {event.credibility:.2f} Emotional valence: {event.emotional_valence:.2f} @@ -175,43 +165,10 @@ def determine_interaction_model( {attribute_info} {edge_type_info} -## Interaction Models - -Choose the most appropriate interaction model(s): +## Interaction Notes -### 1. passive_observation -Social media style — agents see content/reactions, form opinions passively. -- Low direct engagement -- Influenced by what they observe others doing -- Good for: consumer products, viral content, social media events - -### 2. direct_conversation -One-on-one or small group discussions. -- High engagement -- Opinions can change through dialogue -- Good for: professional topics, personal decisions, complex issues - -### 3. broadcast_response -Authority/source broadcasts, agents react and discuss reactions. -- Initial broadcast phase, then discussion -- Agents compare reactions with their network -- Good for: official announcements, policy changes, emergencies - -### 4. deliberative -Group deliberation with multiple rounds. -- Structured discussion phases -- Opinions evolve through deliberation -- Good for: community decisions, policy debates, consensus-building - -## Selection Heuristics - -| Population Type | Event Type | Likely Model | -|-----------------|------------|---------------| -| Consumers | Price change | passive_observation + direct_conversation | -| Professionals | New technology | direct_conversation | -| Community | Government policy | broadcast_response | -| Any | Emergency | broadcast_response | -| Civic/Political | Policy debate | deliberative | +Provide a short `interaction_description` describing likely social dynamics. +This field is informational only; runtime behavior is controlled by spread rules below. ## Spread Configuration @@ -230,6 +187,11 @@ def determine_interaction_model( - Professionals share more on work topics - Close relationships share more +Strict literal contract for conditions: +- For categorical/boolean attributes, use values exactly as listed in `options` (same case and punctuation). +- Do NOT use snake_case aliases, paraphrases, abbreviations, or inferred synonyms. +- If you cannot map a concept to an exact listed option, do not emit that categorical condition. + Format: {{"when": "expression", "multiply": 1.5, "add": 0.0}} Examples: @@ -253,8 +215,7 @@ def determine_interaction_model( ## Output -Provide interaction model selection and spread configuration. -For secondary_model, use "none" if only one model applies.""" +Provide interaction notes and spread configuration.""" data = reasoning_call( prompt=prompt, @@ -264,11 +225,8 @@ def determine_interaction_model( reasoning_effort=reasoning_effort, ) - # Parse interaction config - secondary = data.get("secondary_model", "none") + # Parse interaction config (informational only) interaction_config = InteractionConfig( - primary_model=InteractionType(data["primary_model"]), - secondary_model=InteractionType(secondary) if secondary != "none" else None, description=data.get("interaction_description", ""), ) diff --git a/extropy/scenario/parser.py b/extropy/scenario/parser.py index e9f958d..79541ec 100644 --- a/extropy/scenario/parser.py +++ b/extropy/scenario/parser.py @@ -103,12 +103,19 @@ def parse_scenario( >>> event.source 'Netflix' """ + attribute_lines = [ + f"- {attr.name} ({attr.type}): {attr.description}" + for attr in population_spec.attributes + ] + if not attribute_lines: + attribute_lines = ["- (no attributes available)"] + population_context = f""" Population: {population_spec.meta.description} Geography: {population_spec.meta.geography or "Not specified"} Key attributes: -{chr(10).join(f"- {attr.name}: {attr.description}" for attr in population_spec.attributes[:10])} +{chr(10).join(attribute_lines)} """ prompt = f"""## Task diff --git a/extropy/scenario/sampling_semantics.py b/extropy/scenario/sampling_semantics.py new file mode 100644 index 0000000..abd465d --- /dev/null +++ b/extropy/scenario/sampling_semantics.py @@ -0,0 +1,295 @@ +"""Scenario-stage semantic role mapping for sampler/network runtime use. + +This module runs a focused, low-context LLM call that maps semantic roles to +existing attribute names/options from the merged (base + extended) population. +The output is persisted in scenario.vN.yaml and consumed deterministically by +downstream stages. +""" + +from __future__ import annotations + +from typing import Any + +from ..core.llm import reasoning_call +from ..core.models import PopulationSpec, SamplingSemanticRoles + + +_POLICIES = [ + "gaussian_offset", + "same_group_rate", + "same_country_rate", + "same_value_probability", +] + +_SAMPLING_SEMANTIC_ROLES_SCHEMA = { + "type": "object", + "properties": { + "marital_roles": { + "type": "object", + "properties": { + "attr": {"type": ["string", "null"]}, + "partnered_values": {"type": "array", "items": {"type": "string"}}, + "single_values": {"type": "array", "items": {"type": "string"}}, + }, + "required": ["attr", "partnered_values", "single_values"], + "additionalProperties": False, + }, + "geo_roles": { + "type": "object", + "properties": { + "country_attr": {"type": ["string", "null"]}, + "region_attr": {"type": ["string", "null"]}, + "urbanicity_attr": {"type": ["string", "null"]}, + }, + "required": ["country_attr", "region_attr", "urbanicity_attr"], + "additionalProperties": False, + }, + "partner_correlation_roles": { + "type": "object", + "additionalProperties": { + "type": "string", + "enum": _POLICIES, + }, + }, + "school_parent_role": { + "type": "object", + "properties": { + "dependents_attr": {"type": ["string", "null"]}, + "school_age_values": {"type": "array", "items": {"type": "string"}}, + }, + "required": ["dependents_attr", "school_age_values"], + "additionalProperties": False, + }, + "religion_roles": { + "type": "object", + "properties": { + "religion_attr": {"type": ["string", "null"]}, + "secular_values": {"type": "array", "items": {"type": "string"}}, + }, + "required": ["religion_attr", "secular_values"], + "additionalProperties": False, + }, + "household_roles": { + "type": "object", + "properties": { + "household_size_attr": {"type": ["string", "null"]}, + }, + "required": ["household_size_attr"], + "additionalProperties": False, + }, + }, + "required": [ + "marital_roles", + "geo_roles", + "partner_correlation_roles", + "school_parent_role", + "religion_roles", + "household_roles", + ], + "additionalProperties": False, +} + + +def _categorical_options(attr: Any) -> list[str]: + dist = getattr(getattr(attr, "sampling", None), "distribution", None) + if dist is None or not hasattr(dist, "options"): + return [] + options = getattr(dist, "options", None) or [] + return [str(opt) for opt in options] + + +def _build_prompt(population_spec: PopulationSpec) -> str: + max_attrs = 60 + lines: list[str] = [] + for attr in population_spec.attributes[:max_attrs]: + options = _categorical_options(attr) + options_preview = "" + if options: + preview = ", ".join(options[:8]) + if len(options) > 8: + preview += ", ..." + options_preview = f" | options: [{preview}]" + lines.append( + f"- {attr.name} | type={attr.type} | scope={attr.scope}{options_preview}" + ) + + omitted_note = "" + if len(population_spec.attributes) > max_attrs: + omitted = len(population_spec.attributes) - max_attrs + omitted_note = ( + f"\nNote: {omitted} additional attributes omitted to keep prompt compact." + ) + + attrs_block = "\n".join(lines) if lines else "- (no attributes)" + + return f"""Map sampler semantic roles to exact attribute names/options from this merged population. + +Population: {population_spec.meta.description} +Geography/context: {population_spec.meta.geography or "unspecified"} + +Available attributes: +{attrs_block} +{omitted_note} + +Return ONLY valid mappings from these attributes. + +Role definitions: +1) marital_roles: +- attr: marital/relationship status attribute (or null) +- partnered_values: values meaning partnered/married +- single_values: values meaning not partnered + +2) geo_roles: +- country_attr: country/nationality/citizenship-style attribute for naming locale +- region_attr: region/state/province/city bucket +- urbanicity_attr: urban/rural/suburban-style bucket + +3) partner_correlation_roles: +- map attribute_name -> policy +- policy enum: + - gaussian_offset (age-like numeric correlation) + - same_group_rate (identity group assortativity) + - same_country_rate (country/citizenship assortativity) + - same_value_probability (generic assortativity) + +4) school_parent_role: +- dependents_attr: dependents/children list attribute +- school_age_values: labels that indicate school-age dependents + +5) religion_roles: +- religion_attr: religion/faith affiliation attribute +- secular_values: values indicating no religion + +6) household_roles: +- household_size_attr: attribute representing realized household size + +Rules: +- Never invent attribute names. +- If a role is unavailable, use null and empty arrays/maps. +- partnered_values and single_values must be non-overlapping. +- Keep the mapping minimal and practical.""" + + +def _sanitize_roles( + data: dict[str, Any], population_spec: PopulationSpec +) -> SamplingSemanticRoles: + known_attrs = {attr.name: attr for attr in population_spec.attributes} + + def keep_attr(name: Any) -> str | None: + if isinstance(name, str) and name in known_attrs: + return name + return None + + def keep_values(attr_name: str | None, values: Any) -> list[str]: + if not isinstance(values, list): + return [] + if attr_name is None: + return [] + attr = known_attrs.get(attr_name) + if attr is None: + return [] + valid_options = set(_categorical_options(attr)) + if not valid_options: + return [] + return [v for v in values if isinstance(v, str) and v in valid_options] + + marital_raw = data.get("marital_roles") or {} + marital_attr = keep_attr(marital_raw.get("attr")) + partnered_values = keep_values(marital_attr, marital_raw.get("partnered_values")) + single_values = keep_values(marital_attr, marital_raw.get("single_values")) + overlap = set(partnered_values) & set(single_values) + if overlap: + partnered_values = [v for v in partnered_values if v not in overlap] + single_values = [v for v in single_values if v not in overlap] + + geo_raw = data.get("geo_roles") or {} + geo_roles = { + "country_attr": keep_attr(geo_raw.get("country_attr")), + "region_attr": keep_attr(geo_raw.get("region_attr")), + "urbanicity_attr": keep_attr(geo_raw.get("urbanicity_attr")), + } + + policies_raw = data.get("partner_correlation_roles") or {} + policies: dict[str, str] = {} + if isinstance(policies_raw, dict): + for attr_name, policy in policies_raw.items(): + if ( + attr_name in known_attrs + and isinstance(policy, str) + and policy in _POLICIES + ): + policies[attr_name] = policy + + school_raw = data.get("school_parent_role") or {} + dependents_attr = keep_attr(school_raw.get("dependents_attr")) + school_age_values = [] + if isinstance(school_raw.get("school_age_values"), list): + school_age_values = [ + v + for v in school_raw["school_age_values"] + if isinstance(v, str) and v.strip() + ] + + religion_raw = data.get("religion_roles") or {} + religion_attr = keep_attr(religion_raw.get("religion_attr")) + secular_values = [] + if isinstance(religion_raw.get("secular_values"), list): + secular_values = [ + v + for v in religion_raw["secular_values"] + if isinstance(v, str) and v.strip() + ] + + household_raw = data.get("household_roles") or {} + household_size_attr = keep_attr(household_raw.get("household_size_attr")) + + return SamplingSemanticRoles.model_validate( + { + "marital_roles": { + "attr": marital_attr, + "partnered_values": partnered_values, + "single_values": single_values, + }, + "geo_roles": geo_roles, + "partner_correlation_roles": policies, + "school_parent_role": { + "dependents_attr": dependents_attr, + "school_age_values": school_age_values, + }, + "religion_roles": { + "religion_attr": religion_attr, + "secular_values": secular_values, + }, + "household_roles": { + "household_size_attr": household_size_attr, + }, + } + ) + + +def generate_sampling_semantic_roles( + population_spec: PopulationSpec, + model: str | None = None, +) -> SamplingSemanticRoles | None: + """Generate scenario-stage semantic role mappings for sampler/network use. + + Returns None on provider/runtime failure so scenario compilation remains + backward-compatible and non-blocking. + """ + prompt = _build_prompt(population_spec) + try: + data = reasoning_call( + prompt=prompt, + response_schema=_SAMPLING_SEMANTIC_ROLES_SCHEMA, + schema_name="sampling_semantic_roles", + model=model, + reasoning_effort="low", + max_retries=1, + ) + except Exception: + return None + + try: + return _sanitize_roles(data, population_spec) + except Exception: + return None diff --git a/extropy/scenario/sufficiency.py b/extropy/scenario/sufficiency.py index ac55c6f..0efef6a 100644 --- a/extropy/scenario/sufficiency.py +++ b/extropy/scenario/sufficiency.py @@ -10,6 +10,8 @@ Mirrors the population spec sufficiency check pattern. """ +import re + from ..core.llm import simple_call from ..core.models import ClarificationQuestion @@ -121,6 +123,139 @@ class ScenarioSufficiencyResult(BaseModel): "additionalProperties": False, } +_UNIT_KEYWORD_PATTERNS: dict[str, tuple[str, ...]] = { + "hour": ( + r"\bhour(?:s)?\b", + r"\bhr(?:s)?\b", + r"\bh\b", + ), + "day": ( + r"\bday(?:s)?\b", + r"\bdaily\b", + ), + "week": ( + r"\bweek(?:s)?\b", + r"\bwk(?:s)?\b", + r"\bweekly\b", + ), + "month": ( + r"\bmonth(?:s)?\b", + r"\bmo(?:s)?\b", + r"\bmonthly\b", + ), + "year": ( + r"\byear(?:s)?\b", + r"\byr(?:s)?\b", + r"\bannual(?:ly)?\b", + ), +} + +_TIMELINE_MARKER_PATTERNS: dict[str, tuple[str, ...]] = { + "hour": (r"\bhour\s*[-_ ]?\d+\b", r"\bhr\s*[-_ ]?\d+\b"), + "day": (r"\bday\s*[-_ ]?\d+\b",), + "week": (r"\bweek\s*[-_ ]?\d+\b", r"\bwk\s*[-_ ]?\d+\b"), + "month": (r"\bmonth\s*[-_ ]?\d+\b", r"\bmo\s*[-_ ]?\d+\b"), + "year": (r"\byear\s*[-_ ]?\d+\b", r"\byr\s*[-_ ]?\d+\b"), +} + + +def _extract_unit_candidates(text: str) -> set[str]: + """Extract timestep unit candidates from free text.""" + lowered = text.lower() + candidates: set[str] = set() + for unit, patterns in _UNIT_KEYWORD_PATTERNS.items(): + if any(re.search(pattern, lowered) for pattern in patterns): + candidates.add(unit) + return candidates + + +def _extract_timeline_marker_unit(text: str) -> str | None: + """Extract explicit timeline marker unit, e.g. 'month 0', 'week1'.""" + lowered = text.lower() + matches: set[str] = set() + for unit, patterns in _TIMELINE_MARKER_PATTERNS.items(): + if any(re.search(pattern, lowered) for pattern in patterns): + matches.add(unit) + if len(matches) == 1: + return next(iter(matches)) + return None + + +def _infer_unit_from_duration(duration: str | None) -> str | None: + """Infer timestep unit from an inferred duration string.""" + if not duration: + return None + candidates = _extract_unit_candidates(duration) + if len(candidates) == 1: + return next(iter(candidates)) + return None + + +def _build_timestep_question(default_unit: str | None = None) -> ClarificationQuestion: + """Construct deterministic timestep-unit clarification question.""" + default = ( + default_unit + if default_unit in {"hour", "day", "week", "month", "year"} + else "day" + ) + return ClarificationQuestion( + id="timestep_unit", + question="What timestep unit should this scenario use?", + type="single_choice", + options=["hour", "day", "week", "month", "year"], + default=default, + ) + + +def _postprocess_sufficiency( + *, + description: str, + result: ScenarioSufficiencyResult, +) -> ScenarioSufficiencyResult: + """Apply deterministic guardrails after LLM sufficiency output.""" + questions = list(result.questions) + explicit_timeline_unit = _extract_timeline_marker_unit(description) + unit_candidates = _extract_unit_candidates(description) + explicit_unit = None + if explicit_timeline_unit: + explicit_unit = explicit_timeline_unit + elif len(unit_candidates) == 1: + explicit_unit = next(iter(unit_candidates)) + + inferred_from_duration = _infer_unit_from_duration(result.inferred_duration) + inferred_unit = ( + result.inferred_timestep_unit or inferred_from_duration or explicit_unit + ) + + inferred_type = result.inferred_scenario_type + # Hard hint: timeline markers like "month 0, month 1" imply evolving scenarios. + if explicit_timeline_unit and inferred_type != "evolving": + inferred_type = "evolving" + + # Static scenarios must explicitly name the timestep unit. + if inferred_type == "static" and explicit_unit is None: + if not any(q.id == "timestep_unit" for q in questions): + questions.append(_build_timestep_question(inferred_unit)) + return ScenarioSufficiencyResult( + sufficient=False, + questions=questions, + inferred_duration=result.inferred_duration, + inferred_timestep_unit=inferred_unit, + inferred_scenario_type=inferred_type, + has_explicit_outcomes=result.has_explicit_outcomes, + inferred_agent_focus_mode=result.inferred_agent_focus_mode, + ) + + return ScenarioSufficiencyResult( + sufficient=result.sufficient, + questions=questions, + inferred_duration=result.inferred_duration, + inferred_timestep_unit=inferred_unit, + inferred_scenario_type=inferred_type, + has_explicit_outcomes=result.has_explicit_outcomes, + inferred_agent_focus_mode=result.inferred_agent_focus_mode, + ) + def check_scenario_sufficiency( description: str, @@ -159,10 +294,15 @@ def check_scenario_sufficiency( - Static: price change, policy announcement, product feature - Evolving: crisis, campaign, gradual adoption, emerging situation -4. **OUTCOMES** (optional but check) — does the description explicitly define outcome measurements? +4. **TIMESTEP UNIT** — what time unit should simulation steps use (hour/day/week/month/year)? + - For evolving scenarios with timeline markers like "month 0, month 1", use that marker unit. + - For static scenarios, still pick a concrete unit so downstream simulation cadence is explicit. + - If the unit is not clear, ask for clarification. + +5. **OUTCOMES** (optional but check) — does the description explicitly define outcome measurements? Look for sections like "Outcomes:", numbered outcome lists, or explicit mentions of what to track. -5. **AGENT FOCUS MODE** — who in each household should be a simulated agent? +6. **AGENT FOCUS MODE** — who in each household should be a simulated agent? - "primary_only": Only one adult per household is an agent (partner/kids are background context). Use for: opinion polls, consumer behavior, professional studies, most scenarios. - "couples": Both partners are agents (kids are background). @@ -200,7 +340,7 @@ def check_scenario_sufficiency( for i, q in enumerate(raw_questions) ] - return ScenarioSufficiencyResult( + llm_result = ScenarioSufficiencyResult( sufficient=data.get("sufficient", False), questions=questions, inferred_duration=data.get("inferred_duration"), @@ -209,6 +349,7 @@ def check_scenario_sufficiency( has_explicit_outcomes=data.get("has_explicit_outcomes", False), inferred_agent_focus_mode=data.get("inferred_agent_focus_mode"), ) + return _postprocess_sufficiency(description=description, result=llm_result) def check_scenario_sufficiency_with_answers( diff --git a/extropy/scenario/validator.py b/extropy/scenario/validator.py index 164f483..3414826 100644 --- a/extropy/scenario/validator.py +++ b/extropy/scenario/validator.py @@ -17,6 +17,7 @@ ValidationResult, ) from ..utils.expressions import ( + extract_comparisons_from_expression, extract_names_from_expression, validate_expression_syntax, ) @@ -85,6 +86,246 @@ def _try_resolve_base_population( return None +def _build_attribute_lookup( + spec: ScenarioSpec, + population_spec: PopulationSpec | None, +) -> dict[str, object]: + """Build merged attribute lookup for base + scenario extension.""" + attr_lookup: dict[str, object] = {} + if population_spec: + for attr in population_spec.attributes: + attr_lookup[attr.name] = attr + for attr in spec.extended_attributes or []: + attr_lookup[attr.name] = attr + return attr_lookup + + +def _validate_literal_option_compatibility( + expression: str, + attr_lookup: dict[str, object], + location: str, +) -> list[ValidationIssue]: + """Validate that string literals compared in expression are valid options.""" + issues: list[ValidationIssue] = [] + comparisons = extract_comparisons_from_expression(expression) + if not comparisons: + return issues + + for attr_name, values in comparisons: + attr = attr_lookup.get(attr_name) + if attr is None: + continue + + attr_type = getattr(attr, "type", None) + dist = getattr(getattr(attr, "sampling", None), "distribution", None) + + if attr_type == "categorical" and dist is not None and hasattr(dist, "options"): + options = set(getattr(dist, "options") or []) + if not options: + continue + for value in values: + if value not in options: + issues.append( + ValidationError( + category="attribute_literal", + location=location, + message=( + f"Condition compares '{attr_name}' to '{value}', " + "but value is not in categorical options" + ), + suggestion=f"Use one of: {', '.join(sorted(options))}", + ) + ) + elif attr_type == "boolean": + allowed = {"true", "false", "yes", "no", "1", "0"} + for value in values: + if value.strip().lower() not in allowed: + issues.append( + ValidationError( + category="attribute_literal", + location=location, + message=( + f"Condition compares boolean '{attr_name}' to '{value}' " + "which is not a boolean literal" + ), + suggestion="Use True/False (or true/false) semantics", + ) + ) + + return issues + + +def _categorical_options_for_attr(attr: object) -> set[str]: + """Extract categorical options for an attribute, if available.""" + dist = getattr(getattr(attr, "sampling", None), "distribution", None) + if dist is None or not hasattr(dist, "options"): + return set() + options = getattr(dist, "options", None) or [] + return {str(v) for v in options} + + +def _validate_sampling_semantic_roles( + spec: ScenarioSpec, + attr_lookup: dict[str, object], +) -> list[ValidationIssue]: + """Validate scenario-level semantic role mapping references/options.""" + issues: list[ValidationIssue] = [] + roles = spec.sampling_semantic_roles + if roles is None: + return issues + + marital = roles.marital_roles + if marital and marital.attr: + attr = attr_lookup.get(marital.attr) + if attr is None: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.marital_roles.attr", + message=f"Unknown marital_roles.attr: '{marital.attr}'", + suggestion="Use an attribute name from base or extended attributes", + ) + ) + else: + options = _categorical_options_for_attr(attr) + if options: + for value in marital.partnered_values: + if value not in options: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.marital_roles.partnered_values", + message=( + f"Marital partnered value '{value}' is not a valid option " + f"for '{marital.attr}'" + ), + suggestion=f"Use one of: {', '.join(sorted(options))}", + ) + ) + for value in marital.single_values: + if value not in options: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.marital_roles.single_values", + message=( + f"Marital single value '{value}' is not a valid option " + f"for '{marital.attr}'" + ), + suggestion=f"Use one of: {', '.join(sorted(options))}", + ) + ) + overlap = set(marital.partnered_values) & set(marital.single_values) + if overlap: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.marital_roles", + message=( + "Marital partnered_values and single_values overlap: " + + ", ".join(sorted(overlap)) + ), + suggestion="Ensure partnered and single sets are disjoint", + ) + ) + + geo = roles.geo_roles + if geo: + for key in ("country_attr", "region_attr", "urbanicity_attr"): + value = getattr(geo, key) + if value and value not in attr_lookup: + issues.append( + ValidationError( + category="sampling_semantics", + location=f"sampling_semantic_roles.geo_roles.{key}", + message=f"Unknown {key}: '{value}'", + suggestion="Use an attribute name from base or extended attributes", + ) + ) + + for attr_name in roles.partner_correlation_roles.keys(): + if attr_name not in attr_lookup: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.partner_correlation_roles", + message=f"Unknown partner correlation attribute: '{attr_name}'", + suggestion="Use attribute names present in merged population", + ) + ) + + school = roles.school_parent_role + if school and school.dependents_attr and school.dependents_attr not in attr_lookup: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.school_parent_role.dependents_attr", + message=f"Unknown dependents_attr: '{school.dependents_attr}'", + suggestion="Use an attribute name from base or extended attributes", + ) + ) + + religion = roles.religion_roles + if religion and religion.religion_attr: + if religion.religion_attr not in attr_lookup: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.religion_roles.religion_attr", + message=f"Unknown religion_attr: '{religion.religion_attr}'", + suggestion="Use an attribute name from base or extended attributes", + ) + ) + else: + options = _categorical_options_for_attr(attr_lookup[religion.religion_attr]) + if options: + for value in religion.secular_values: + if value not in options: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.religion_roles.secular_values", + message=( + f"Secular value '{value}' is not a valid option for " + f"'{religion.religion_attr}'" + ), + suggestion=f"Use one of: {', '.join(sorted(options))}", + ) + ) + + household = roles.household_roles + if household and household.household_size_attr: + attr = attr_lookup.get(household.household_size_attr) + if attr is None: + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.household_roles.household_size_attr", + message=( + "Unknown household_size_attr: " + f"'{household.household_size_attr}'" + ), + suggestion="Use an attribute name from base or extended attributes", + ) + ) + else: + attr_type = getattr(attr, "type", None) + if attr_type not in ("int", "float"): + issues.append( + ValidationError( + category="sampling_semantics", + location="sampling_semantic_roles.household_roles.household_size_attr", + message=( + "household_size_attr must reference numeric attribute, " + f"got type '{attr_type}'" + ), + suggestion="Map household_size_attr to an int/float attribute", + ) + ) + + return issues + + def validate_scenario( spec: ScenarioSpec, population_spec: PopulationSpec | None = None, @@ -116,10 +357,8 @@ def validate_scenario( errors: list[ValidationIssue] = [] warnings: list[ValidationIssue] = [] - # Build set of known attributes from population spec - known_attributes: set[str] = set() - if population_spec: - known_attributes = {attr.name for attr in population_spec.attributes} + attribute_lookup = _build_attribute_lookup(spec, population_spec) + known_attributes = set(attribute_lookup.keys()) # Build set of known edge types from network # Check both 'edge_type' and 'type' fields (different network formats) @@ -134,6 +373,44 @@ def validate_scenario( # Build set of defined channels defined_channels = {ch.name for ch in spec.seed_exposure.channels} + # Scenario extension is required for new-flow scenarios. + if spec.meta.base_population and not spec.extended_attributes: + errors.append( + ValidationError( + category="scenario_extension", + location="extended_attributes", + message="Scenario must include non-empty extended_attributes", + suggestion="Add at least one scenario-specific attribute extension", + ) + ) + + # Household semantics must be coherent with focus mode and config + has_household_semantics = any( + getattr(attr, "scope", "individual") in {"household", "partner_correlated"} + for attr in (spec.extended_attributes or []) + ) + if has_household_semantics and spec.household_config is None: + errors.append( + ValidationError( + category="household", + location="household_config", + message="Household/partner-correlated attributes require household_config", + suggestion="Provide household_config in scenario spec", + ) + ) + if (has_household_semantics or spec.household_config is not None) and ( + spec.agent_focus_mode is None + ): + errors.append( + ValidationError( + category="agent_focus", + location="agent_focus_mode", + message="agent_focus_mode is required when household semantics are active", + suggestion="Set agent_focus_mode to primary_only, couples, or all", + ) + ) + errors.extend(_validate_sampling_semantic_roles(spec, attribute_lookup)) + # ========================================================================= # Validate Event # ========================================================================= @@ -213,18 +490,24 @@ def validate_scenario( ) else: # Check attribute references - if population_spec: - refs = extract_names_from_expression(rule.when) - unknown_refs = refs - known_attributes - if unknown_refs: - errors.append( - ValidationError( - category="attribute_reference", - location=f"seed_exposure.rules[{i}].when", - message=f"References unknown attribute(s): {', '.join(sorted(unknown_refs))}", - suggestion="Check attribute names in population spec", - ) + refs = extract_names_from_expression(rule.when) + unknown_refs = refs - known_attributes + if unknown_refs: + errors.append( + ValidationError( + category="attribute_reference", + location=f"seed_exposure.rules[{i}].when", + message=f"References unknown attribute(s): {', '.join(sorted(unknown_refs))}", + suggestion="Check attribute names in population/scenario specs", ) + ) + errors.extend( + _validate_literal_option_compatibility( + rule.when, + attribute_lookup, + f"seed_exposure.rules[{i}].when", + ) + ) # Check probability bounds (already enforced by Pydantic, but double-check) if not 0 <= rule.probability <= 1: @@ -291,17 +574,23 @@ def validate_scenario( # Allow edge attributes injected during propagation refs_without_edge_fields = refs - {"edge_type", "edge_weight"} - if population_spec: - unknown_refs = refs_without_edge_fields - known_attributes - if unknown_refs: - errors.append( - ValidationError( - category="attribute_reference", - location=f"spread.share_modifiers[{i}].when", - message=f"References unknown attribute(s): {', '.join(sorted(unknown_refs))}", - suggestion="Check attribute names in population spec", - ) + unknown_refs = refs_without_edge_fields - known_attributes + if unknown_refs: + errors.append( + ValidationError( + category="attribute_reference", + location=f"spread.share_modifiers[{i}].when", + message=f"References unknown attribute(s): {', '.join(sorted(unknown_refs))}", + suggestion="Check attribute names in population/scenario specs", ) + ) + errors.extend( + _validate_literal_option_compatibility( + modifier.when, + attribute_lookup, + f"spread.share_modifiers[{i}].when", + ) + ) # Check edge type references if "edge_type" in refs: @@ -449,6 +738,51 @@ def validate_scenario( ) ) + if te.exposure_rules: + for j, rule in enumerate(te.exposure_rules): + if rule.channel not in defined_channels: + errors.append( + ValidationError( + category="timeline_exposure_rule", + location=f"timeline[{i}].exposure_rules[{j}].channel", + message=f"Rule references undefined channel: '{rule.channel}'", + suggestion=f"Use one of: {', '.join(sorted(defined_channels))}", + ) + ) + + syntax_error = validate_expression_syntax(rule.when) + if syntax_error: + errors.append( + ValidationError( + category="timeline_exposure_rule", + location=f"timeline[{i}].exposure_rules[{j}].when", + message=f"Invalid expression syntax: {syntax_error}", + suggestion="Use valid Python expression syntax", + ) + ) + else: + refs = extract_names_from_expression(rule.when) + unknown_refs = refs - known_attributes + if unknown_refs: + errors.append( + ValidationError( + category="attribute_reference", + location=f"timeline[{i}].exposure_rules[{j}].when", + message=( + "References unknown attribute(s): " + + ", ".join(sorted(unknown_refs)) + ), + suggestion="Check attribute names in population/scenario specs", + ) + ) + errors.extend( + _validate_literal_option_compatibility( + rule.when, + attribute_lookup, + f"timeline[{i}].exposure_rules[{j}].when", + ) + ) + # ========================================================================= # Validate Simulation Config # ========================================================================= @@ -526,15 +860,6 @@ def validate_scenario( suggestion=f"Use one of: {', '.join(sorted(valid_modes))}", ) ) - elif spec.household_config is not None: - warnings.append( - ValidationWarning( - category="agent_focus", - location="agent_focus_mode", - message="household_config present but agent_focus_mode not set (defaults to primary_only)", - suggestion="Set agent_focus_mode to 'primary_only', 'couples', or 'all'", - ) - ) # ========================================================================= # Validate File References diff --git a/extropy/simulation/engine.py b/extropy/simulation/engine.py index 07e06ca..1f0a3fe 100644 --- a/extropy/simulation/engine.py +++ b/extropy/simulation/engine.py @@ -14,10 +14,9 @@ import json import logging -import queue +import os import random import sqlite3 -import threading import time import uuid from datetime import datetime @@ -85,6 +84,32 @@ _BOUNDED_CONFIDENCE_RHO = 0.35 _PRIVATE_ADJUSTMENT_RHO = 0.12 _PRIVATE_FLIP_CONVICTION = CONVICTION_MAP[ConvictionLevel.FIRM] +_REASONING_BUDGET_RATIO = { + "low": 0.8, + "medium": 0.5, + "high": 0.45, +} +_REASONING_BUDGET_FLOOR = 250 +_CONVERSATION_BUDGET_RATIO = { + "low": 0.0, + "medium": 0.08, + "high": 0.12, +} +_CONVERSATION_BUDGET_FLOOR = { + "low": 0, + "medium": 50, + "high": 75, +} +_MAX_EXPOSURES_IN_CONTEXT = { + "low": 6, + "medium": 10, + "high": 14, +} +_MAX_MEMORY_IN_CONTEXT = { + "low": 5, + "medium": 8, + "high": 12, +} class _StateTimelineAdapter: @@ -553,25 +578,21 @@ def _execute_timestep(self, timestep: int) -> TimestepSummary: total_new_exposures, forced_reason_ids = self._apply_exposures(timestep) self.total_exposures += total_new_exposures - # 2. Chunked reasoning — each chunk has its own transaction - agents_reasoned, state_changes, shares_occurred, reasoning_results = ( - self._reason_agents(timestep, forced_reason_ids=forced_reason_ids) - ) - - # 2c. Execute conversations (if fidelity > low) - conversations_executed = 0 - conversation_state_changes = 0 - if self.config.fidelity != "low" and reasoning_results: - conv_results = self._execute_conversations(timestep, reasoning_results) - conversations_executed = len(conv_results) - conversation_state_changes = self._apply_conversation_overrides( - timestep, conv_results + # 2. Chunked reasoning + in-timestep conversation interleaving + ( + agents_reasoned, + state_changes, + shares_occurred, + reasoning_meta, + ) = self._reason_agents(timestep, forced_reason_ids=forced_reason_ids) + conversations_executed = reasoning_meta.get("conversations_executed", 0) + conversation_state_changes = reasoning_meta.get("conversation_state_changes", 0) + + if conversations_executed > 0: + logger.info( + f"[TIMESTEP {timestep}] Conversations: {conversations_executed} executed, " + f"{conversation_state_changes} state changes" ) - if conversations_executed > 0: - logger.info( - f"[TIMESTEP {timestep}] Conversations: {conversations_executed} executed, " - f"{conversation_state_changes} state changes" - ) # 2e. Record social posts from agents who shared posts_recorded = self._record_social_posts(timestep) @@ -603,7 +624,7 @@ def _execute_timestep(self, timestep: int) -> TimestepSummary: ) summary.new_exposures = total_new_exposures summary.agents_reasoned = agents_reasoned - summary.state_changes = state_changes + summary.state_changes = state_changes + conversation_state_changes summary.shares_occurred = shares_occurred self.state_manager.save_timestep_summary(summary) @@ -616,6 +637,223 @@ def _execute_timestep(self, timestep: int) -> TimestepSummary: return summary + def _get_reasoning_budget(self, timestep: int) -> int: + """Compute per-timestep cap for reasoning calls.""" + env_cap = os.getenv("EXTROPY_SIM_MAX_REASON_PER_TIMESTEP") + if env_cap: + try: + value = int(env_cap) + if value > 0: + return min(len(self.agents), value) + except ValueError: + pass + + ratio = _REASONING_BUDGET_RATIO.get(self.config.fidelity, 0.5) + env_ratio = os.getenv("EXTROPY_SIM_REASON_BUDGET_RATIO") + if env_ratio: + try: + ratio = max(0.05, min(1.0, float(env_ratio))) + except ValueError: + pass + + budget = max(_REASONING_BUDGET_FLOOR, int(round(len(self.agents) * ratio))) + if timestep == 0: + # First timestep can legitimately be broader. + budget = max(budget, int(round(len(self.agents) * 0.6))) + return max(1, min(len(self.agents), budget)) + + def _get_conversation_budget(self) -> int: + """Compute per-timestep cap for executed conversations.""" + env_cap = os.getenv("EXTROPY_SIM_MAX_CONVERSATIONS_PER_TIMESTEP") + if env_cap: + try: + value = int(env_cap) + if value >= 0: + return min(len(self.agents), value) + except ValueError: + pass + + ratio = _CONVERSATION_BUDGET_RATIO.get(self.config.fidelity, 0.08) + budget = max( + _CONVERSATION_BUDGET_FLOOR.get(self.config.fidelity, 0), + int(round(len(self.agents) * ratio)), + ) + return max(0, min(len(self.agents), budget)) + + def _prioritize_agents_for_reasoning( + self, + candidates: list[str], + timestep: int, + forced_reason_ids: set[str], + ) -> list[str]: + """Rank reasoning candidates by deterministic salience.""" + exposed_this_step = set( + self.state_manager.get_exposed_agents(timestep=timestep) + ) + scored: list[tuple[float, str]] = [] + for agent_id in candidates: + state = self.state_manager.get_agent_state(agent_id) + score = 0.0 + if agent_id in forced_reason_ids: + score += 100.0 + if state.last_reasoning_timestep < 0: + score += 50.0 + if agent_id in exposed_this_step: + score += 25.0 + if state.latest_info_epoch >= timestep: + score += 15.0 + score += min(10.0, float(state.exposure_count)) + score += min(5.0, float(len(self.adjacency.get(agent_id, []))) * 0.1) + scored.append((score, agent_id)) + scored.sort(key=lambda item: (-item[0], item[1])) + return [agent_id for _, agent_id in scored] + + def _select_forced_rereason_ids( + self, + timestep: int, + base_ids: set[str], + info_epoch: int | None, + intensity: str | None, + ) -> set[str]: + """Select a bounded high-salience set for explicit forced re-reasoning.""" + selected = set(base_ids) + if info_epoch is None or intensity not in {"high", "extreme"}: + return selected + + population_size = len(self.agents) + if population_size <= 0: + return selected + + target_ratio = 0.15 if intensity == "high" else 0.30 + min_extra = 1 if intensity == "high" else 2 + target_budget = min( + population_size, + max( + len(selected), + int(round(population_size * target_ratio)), + len(selected) + min_extra, + ), + ) + + exposed_this_epoch = set( + self.state_manager.get_exposed_agents( + timestep=timestep, info_epoch=info_epoch + ) + ) + aware_agents = set(self.state_manager.get_aware_agents()) + sharers = set(self.state_manager.get_sharers()) + + frontier = set(selected) + frontier.update(exposed_this_epoch) + one_hop: set[str] = set() + for agent_id in frontier: + one_hop.update( + neighbor for neighbor, _edge in self.adjacency.get(agent_id, []) + ) + + two_hop: set[str] = set() + if intensity == "extreme": + for agent_id in one_hop: + two_hop.update( + neighbor for neighbor, _edge in self.adjacency.get(agent_id, []) + ) + + candidate_pool = (frontier | one_hop | two_hop) & aware_agents + ranked: list[tuple[float, str]] = [] + for agent_id in candidate_pool: + degree = len(self.adjacency.get(agent_id, [])) + score = 0.0 + if agent_id in selected: + score += 100.0 + if agent_id in exposed_this_epoch: + score += 35.0 + if agent_id in sharers: + score += 20.0 + score += min(10.0, float(degree) * 0.2) + ranked.append((score, agent_id)) + + ranked.sort(key=lambda item: (-item[0], item[1])) + for _score, agent_id in ranked: + if len(selected) >= target_budget: + break + selected.add(agent_id) + + return selected + + @staticmethod + def _trim_exposure_history( + exposures: list[Any], + fidelity: str, + ) -> list[Any]: + """Reduce reasoning exposure payload to recent high-signal entries.""" + max_items = _MAX_EXPOSURES_IN_CONTEXT.get(fidelity, 10) + if len(exposures) <= max_items: + return exposures + latest_timestep = exposures[-1].timestep if exposures else None + latest = [exp for exp in exposures if exp.timestep == latest_timestep] + if len(latest) >= max_items: + return latest[-max_items:] + remaining = max_items - len(latest) + prefix = exposures[: -len(latest)] if latest else exposures + return prefix[-remaining:] + latest + + @staticmethod + def _trim_memory_trace(memory_trace: list[Any], fidelity: str) -> list[Any]: + """Reduce reasoning memory payload while keeping near-term continuity.""" + max_items = _MAX_MEMORY_IN_CONTEXT.get(fidelity, 8) + if len(memory_trace) <= max_items: + return memory_trace + return memory_trace[-max_items:] + + @staticmethod + def _has_material_reasoning_shift( + old_state: AgentState, + response: ReasoningResponse, + ) -> bool: + """Detect whether a reasoning step changed state enough to justify chat.""" + if old_state.last_reasoning_timestep < 0: + return True + if response.conviction is not None and response.conviction <= 0.55: + return True + old_position = old_state.public_position or old_state.position + new_position = response.public_position or response.position + if old_position and new_position and old_position != new_position: + return True + old_sent = ( + old_state.public_sentiment + if old_state.public_sentiment is not None + else old_state.sentiment + ) + if old_sent is not None and response.sentiment is not None: + if abs(float(response.sentiment) - float(old_sent)) >= 0.08: + return True + old_conv = ( + old_state.public_conviction + if old_state.public_conviction is not None + else old_state.conviction + ) + if old_conv is not None and response.conviction is not None: + if abs(float(response.conviction) - float(old_conv)) >= 0.08: + return True + return bool(response.will_share) + + def _filter_conversation_candidates( + self, + chunk_results: list[tuple[str, ReasoningResponse | None]], + old_states: dict[str, AgentState], + ) -> list[tuple[str, ReasoningResponse | None]]: + """Filter conversation candidates to requests with meaningful novelty.""" + filtered: list[tuple[str, ReasoningResponse | None]] = [] + for agent_id, response in chunk_results: + if response is None or not response.actions: + continue + old_state = old_states.get(agent_id) + if old_state is None: + continue + if self._has_material_reasoning_shift(old_state, response): + filtered.append((agent_id, response)) + return filtered + def _apply_exposures(self, timestep: int) -> tuple[int, set[str]]: """Apply seed, timeline, and network exposures for this timestep. @@ -652,12 +890,12 @@ def _apply_exposures(self, timestep: int) -> tuple[int, set[str]]: timeline_result.re_reasoning_intensity or "normal" ) - forced_reason_ids = set(timeline_result.direct_exposed_agent_ids) - if ( - timeline_result.re_reasoning_intensity == "extreme" - and timeline_result.info_epoch is not None - ): - forced_reason_ids.update(self.state_manager.get_aware_agents()) + forced_reason_ids = self._select_forced_rereason_ids( + timestep=timestep, + base_ids=set(timeline_result.direct_exposed_agent_ids), + info_epoch=timeline_result.info_epoch, + intensity=timeline_result.re_reasoning_intensity, + ) new_network = propagate_through_network( timestep, @@ -679,13 +917,23 @@ def _apply_exposures(self, timestep: int) -> tuple[int, set[str]]: def _reason_agents( self, timestep: int, forced_reason_ids: set[str] | None = None - ) -> tuple[int, int, int, list[tuple[str, ReasoningResponse | None]]]: - """Identify agents needing reasoning, run in chunks, commit per-chunk. + ) -> tuple[int, int, int, dict[str, int]]: + """Identify agents needing reasoning and process chunk-by-chunk. + + For medium/high fidelity, each reasoning chunk is followed by a + conversation pass. This allows within-timestep social feedback to + influence later chunks without requiring extra global re-reason rounds. On resume, agents already processed this timestep are skipped. Returns: - Tuple of (agents_reasoned, state_changes, shares_occurred, reasoning_results). + Tuple of ( + agents_reasoned, + state_changes, + shares_occurred, + metadata with conversation totals for this timestep + (conversations_executed, conversation_state_changes), + ). """ self._apply_runtime_guardrails(timestep) agents_to_reason = self.state_manager.get_agents_to_reason( @@ -704,6 +952,22 @@ def _reason_agents( f"[TIMESTEP {timestep}] Skipping {len(already_done)} already-processed agents" ) + forced_ids = forced_reason_ids or set() + reasoning_budget = self._get_reasoning_budget(timestep) + if len(agents_to_reason) > reasoning_budget: + prioritized = self._prioritize_agents_for_reasoning( + candidates=agents_to_reason, + timestep=timestep, + forced_reason_ids=forced_ids, + ) + trimmed = prioritized[:reasoning_budget] + dropped = len(agents_to_reason) - len(trimmed) + agents_to_reason = trimmed + logger.info( + f"[TIMESTEP {timestep}] Reasoning budget cap: selected {len(trimmed)} " + f"of {len(trimmed) + dropped} candidates (dropped {dropped})" + ) + logger.info(f"[TIMESTEP {timestep}] Agents to reason: {len(agents_to_reason)}") # Update progress state for live display (even if 0 agents, so display updates) @@ -717,7 +981,12 @@ def _reason_agents( ) if not agents_to_reason: - return 0, 0, 0, [] + return ( + 0, + 0, + 0, + {"conversations_executed": 0, "conversation_state_changes": 0}, + ) # Create on_agent_done closure for progress tracking def _on_agent_done(agent_id: str, result: Any) -> None: @@ -736,105 +1005,44 @@ def _on_agent_done(agent_id: str, result: Any) -> None: ): self._log_verbose_summary(self._progress.snapshot()) - # Build contexts and old states - contexts = [] - old_states: dict[str, AgentState] = {} - for agent_id in agents_to_reason: - old_state = self.state_manager.get_agent_state(agent_id) - old_states[agent_id] = old_state - context = self._build_reasoning_context(agent_id, old_state, timestep) - contexts.append(context) - + conversation_budget = self._get_conversation_budget() completed_chunks = self.study_db.get_completed_simulation_chunks( self.run_id, timestep ) - totals = {"reasoned": 0, "changes": 0, "shares": 0} - all_reasoning_results: list[tuple[str, ReasoningResponse | None]] = [] - work_queue: queue.Queue[tuple[int, list[tuple[str, Any]], bool] | object] = ( - queue.Queue(maxsize=self.writer_queue_size) - ) - sentinel = object() - writer_error: list[Exception] = [] - - def _writer_loop() -> None: - chunks_since_checkpoint = 0 - pending_chunks: list[tuple[int, list[tuple[str, Any]], bool]] = [] - - def _flush_pending() -> None: - nonlocal chunks_since_checkpoint - if not pending_chunks: - return - - with self.state_manager.transaction(): - for chunk_index, chunk_results, _is_last_chunk in pending_chunks: - reasoned, changes, shares = self._process_reasoning_chunk( - timestep, chunk_results, old_states - ) - totals["reasoned"] += reasoned - totals["changes"] += changes - totals["shares"] += shares - - for chunk_index, _chunk_results, is_last_chunk in pending_chunks: - self.study_db.save_simulation_checkpoint( - run_id=self.run_id, - timestep=timestep, - chunk_index=chunk_index, - status="done", + totals = { + "reasoned": 0, + "changes": 0, + "shares": 0, + "conversations": 0, + "conversation_changes": 0, + } + chunks_since_checkpoint = 0 + conversation_counts: dict[str, int] = {} + if self.config.fidelity != "low" and completed_chunks: + # Resume-safe conversation budgeting: restore per-agent counts + # from conversations already saved for this timestep. + existing = self.study_db.get_conversations_for_timestep( + self.run_id, timestep + ) + for conv in existing: + initiator = conv.get("initiator_id") + target = conv.get("target_id") + target_is_npc = bool(conv.get("target_is_npc")) + if initiator: + conversation_counts[initiator] = ( + conversation_counts.get(initiator, 0) + 1 ) - chunks_since_checkpoint += 1 - if ( - chunks_since_checkpoint >= self.checkpoint_every_chunks - or is_last_chunk - ): - self.study_db.set_run_metadata( - self.run_id, - "last_checkpoint", - f"{timestep}:{chunk_index}", - ) - chunks_since_checkpoint = 0 - - pending_chunks.clear() - - try: - while True: - item = work_queue.get() - try: - if item is sentinel: - _flush_pending() - break - - chunk_index, chunk_results, is_last_chunk = item - if chunk_index in completed_chunks: - continue - pending_chunks.append( - (chunk_index, chunk_results, is_last_chunk) - ) - if ( - len(pending_chunks) >= self.db_write_batch_size - or is_last_chunk - ): - _flush_pending() - finally: - work_queue.task_done() - except Exception as e: # pragma: no cover - surfaced to caller - writer_error.append(e) - - writer_thread = threading.Thread( - target=_writer_loop, - name=f"sim-writer-{self.run_id}-{timestep}", - daemon=True, - ) - writer_thread.start() + if target and not target_is_npc: + conversation_counts[target] = conversation_counts.get(target, 0) + 1 import asyncio from ..core.providers import close_simulation_provider async def _run_all_chunks(): + nonlocal chunks_since_checkpoint try: - for chunk_start in range(0, len(contexts), self.chunk_size): - if writer_error: - break + for chunk_start in range(0, len(agents_to_reason), self.chunk_size): self._apply_runtime_guardrails(timestep) chunk_index = chunk_start // self.chunk_size if chunk_index in completed_chunks: @@ -842,9 +1050,18 @@ async def _run_all_chunks(): f"[TIMESTEP {timestep}] Skipping completed chunk {chunk_index}" ) continue - chunk_contexts = contexts[ + chunk_agent_ids = agents_to_reason[ chunk_start : chunk_start + self.chunk_size ] + old_states: dict[str, AgentState] = {} + chunk_contexts = [] + for agent_id in chunk_agent_ids: + old_state = self.state_manager.get_agent_state(agent_id) + old_states[agent_id] = old_state + context = self._build_reasoning_context( + agent_id, old_state, timestep + ) + chunk_contexts.append(context) reasoning_start = time.time() chunk_results, chunk_usage = await batch_reason_agents_async( @@ -869,37 +1086,74 @@ async def _run_all_chunks(): if chunk_results else f"[TIMESTEP {timestep}] Chunk empty" ) - is_last_chunk = chunk_start + self.chunk_size >= len(contexts) - work_queue.put((chunk_index, chunk_results, is_last_chunk)) - # Collect results for conversation phase - all_reasoning_results.extend(chunk_results) + is_last_chunk = chunk_start + self.chunk_size >= len( + agents_to_reason + ) + with self.state_manager.transaction(): + reasoned, changes, shares = self._process_reasoning_chunk( + timestep, chunk_results, old_states + ) + totals["reasoned"] += reasoned + totals["changes"] += changes + totals["shares"] += shares + + # In-timestep interleaving: run conversations after each + # chunk so later chunks can see updated social state. + if self.config.fidelity != "low" and chunk_results: + remaining_conv_budget = max( + 0, conversation_budget - totals["conversations"] + ) + if remaining_conv_budget > 0: + conversation_candidates = ( + self._filter_conversation_candidates( + chunk_results, + old_states, + ) + ) + conv_results = await self._execute_conversations_async( + timestep, + conversation_candidates, + conversation_counts=conversation_counts, + remaining_budget=remaining_conv_budget, + ) + else: + conv_results = [] + if conv_results: + conv_changes = self._apply_conversation_overrides( + timestep, conv_results + ) + totals["conversations"] += len(conv_results) + totals["conversation_changes"] += conv_changes + + self.study_db.save_simulation_checkpoint( + run_id=self.run_id, + timestep=timestep, + chunk_index=chunk_index, + status="done", + ) + chunks_since_checkpoint += 1 + if ( + chunks_since_checkpoint >= self.checkpoint_every_chunks + or is_last_chunk + ): + self.study_db.set_run_metadata( + self.run_id, + "last_checkpoint", + f"{timestep}:{chunk_index}", + ) + chunks_since_checkpoint = 0 finally: await close_simulation_provider() asyncio.run(_run_all_chunks()) - - work_queue.put(sentinel) - while work_queue.unfinished_tasks > 0: - if writer_error: - while True: - try: - work_queue.get_nowait() - work_queue.task_done() - except queue.Empty: - break - break - time.sleep(0.01) - - work_queue.join() - writer_thread.join(timeout=1) - if writer_error: - raise writer_error[0] - return ( totals["reasoned"], totals["changes"], totals["shares"], - all_reasoning_results, + { + "conversations_executed": totals["conversations"], + "conversation_state_changes": totals["conversation_changes"], + }, ) def _process_reasoning_chunk( @@ -1139,16 +1393,21 @@ def _process_reasoning_chunk( return agents_reasoned, state_changes, shares_occurred - def _execute_conversations( + async def _execute_conversations_async( self, timestep: int, reasoning_results: list[tuple[str, ReasoningResponse | None]], + conversation_counts: dict[str, int] | None = None, + remaining_budget: int | None = None, ) -> list[ConversationResult]: """Execute conversations based on talk_to actions from reasoning. Args: timestep: Current simulation timestep reasoning_results: List of (agent_id, response) pairs + conversation_counts: Optional per-agent conversation counts for + enforcing a global per-timestep cap across chunked passes. + remaining_budget: Optional global remaining conversation budget. Returns: List of conversation results @@ -1168,6 +1427,31 @@ def _execute_conversations( if not requests: return [] + max_per_agent = 1 if self.config.fidelity == "medium" else 2 + if self.config.fidelity == "low": + max_per_agent = 0 + + if conversation_counts is not None and max_per_agent > 0: + filtered_requests = [] + for req in requests: + if conversation_counts.get(req.initiator_id, 0) >= max_per_agent: + continue + if ( + not req.target_is_npc + and conversation_counts.get(req.target_id, 0) >= max_per_agent + ): + continue + filtered_requests.append(req) + requests = filtered_requests + if not requests: + return [] + + if remaining_budget is not None: + if remaining_budget <= 0: + return [] + if len(requests) > remaining_budget: + requests = requests[:remaining_budget] + # Prioritize and resolve conflicts batches, _deferred = prioritize_and_resolve_conflicts( requests, fidelity=self.config.fidelity @@ -1194,7 +1478,6 @@ def _execute_conversations( # Execute all batches (in practice, usually just one batch) all_results: list[ConversationResult] = [] - import asyncio from ..core.providers import close_simulation_provider async def _run_conversations(): @@ -1213,7 +1496,19 @@ async def _run_conversations(): finally: await close_simulation_provider() - asyncio.run(_run_conversations()) + await _run_conversations() + + if conversation_counts is not None and max_per_agent > 0: + for result in all_results: + if not result.messages: + continue + conversation_counts[result.initiator_id] = ( + conversation_counts.get(result.initiator_id, 0) + 1 + ) + if not result.target_is_npc: + conversation_counts[result.target_id] = ( + conversation_counts.get(result.target_id, 0) + 1 + ) # Save conversations to DB for result in all_results: @@ -1244,6 +1539,34 @@ async def _run_conversations(): logger.info(f"[TIMESTEP {timestep}] Executed {len(all_results)} conversations") return all_results + def _execute_conversations( + self, + timestep: int, + reasoning_results: list[tuple[str, ReasoningResponse | None]], + conversation_counts: dict[str, int] | None = None, + ) -> list[ConversationResult]: + """Synchronous wrapper for conversation execution. + + Use `_execute_conversations_async` from async call paths. + """ + import asyncio + + try: + asyncio.get_running_loop() + except RuntimeError: + return asyncio.run( + self._execute_conversations_async( + timestep, + reasoning_results, + conversation_counts=conversation_counts, + ) + ) + + raise RuntimeError( + "_execute_conversations() cannot be called from an active event loop. " + "Use await _execute_conversations_async(...)." + ) + def _apply_conversation_overrides( self, timestep: int, @@ -1438,6 +1761,12 @@ def _build_reasoning_context( # Get memory trace memory_trace = self.state_manager.get_memory_traces(agent_id) + trimmed_memory_trace = self._trim_memory_trace( + memory_trace, self.config.fidelity + ) + trimmed_exposures = self._trim_exposure_history( + state.exposures, self.config.fidelity + ) # Derive prior action intent from most recent memory entry prior_action_intent = None @@ -1460,11 +1789,11 @@ def _build_reasoning_context( agent_id=agent_id, agent=agent, persona=persona, - exposures=state.exposures, + exposures=trimmed_exposures, scenario=self.scenario, peer_opinions=peer_opinions, current_state=state if state.last_reasoning_timestep >= 0 else None, - memory_trace=memory_trace, + memory_trace=trimmed_memory_trace, ) # Populate Phase A fields ctx.timestep = timestep diff --git a/extropy/simulation/propagation.py b/extropy/simulation/propagation.py index 0b07d41..3ec0db5 100644 --- a/extropy/simulation/propagation.py +++ b/extropy/simulation/propagation.py @@ -27,6 +27,11 @@ logger = logging.getLogger(__name__) _SOFT_SATURATION_MAX = 0.97 +_TIMELINE_EVENT_DIRECT_EXPOSURE_CAP = { + "normal": 0.35, + "high": 0.55, + "extreme": 0.75, +} @dataclass(frozen=True) @@ -40,6 +45,60 @@ class TimelineExposureResult: re_reasoning_intensity: str | None +def _timeline_intensity(value: str | None) -> str: + if value in {"normal", "high", "extreme"}: + return value + return "normal" + + +def _timeline_direct_exposure_cap(total_agents: int, intensity: str | None) -> int: + """Compute a deterministic cap for direct timeline exposures in one timestep.""" + if total_agents <= 0: + return 0 + ratio = _TIMELINE_EVENT_DIRECT_EXPOSURE_CAP[_timeline_intensity(intensity)] + return max(1, int(round(total_agents * ratio))) + + +def _rule_specificity_score(rule: ExposureRule) -> tuple[int, float]: + """Prefer more specific rule conditions, then higher probability.""" + cond = (rule.when or "").strip().lower() + if cond in {"", "1", "true"}: + return (0, float(rule.probability)) + # Length is a cheap proxy for condition specificity without schema coupling. + return (len(cond), float(rule.probability)) + + +def _select_timeline_fallback_rules( + timestep: int, + scenario: ScenarioSpec, +) -> list[ExposureRule]: + """Select bounded fallback rules when timeline event rules are not defined. + + Policy: + - Prefer seed rules explicitly authored for this timestep. + - Otherwise fall back to the earliest authored seed step. + - In either case, keep at most one representative rule per channel + (most specific, then highest probability) to avoid rule fan-out. + """ + if not scenario.seed_exposure.rules: + return [] + + rules = [r for r in scenario.seed_exposure.rules if r.timestep == timestep] + if not rules: + min_step = min(rule.timestep for rule in scenario.seed_exposure.rules) + rules = [r for r in scenario.seed_exposure.rules if r.timestep == min_step] + + by_channel: dict[str, ExposureRule] = {} + for rule in rules: + existing = by_channel.get(rule.channel) + if existing is None or _rule_specificity_score(rule) > _rule_specificity_score( + existing + ): + by_channel[rule.channel] = rule + + return list(by_channel.values()) + + def _soft_saturate_probability(raw_probability: float) -> float: """Apply smooth saturation for high probabilities. @@ -221,24 +280,37 @@ def apply_timeline_exposures( if active_event.exposure_rules is not None: rules = active_event.exposure_rules else: - # Reuse seed exposure rules but substitute with timeline event content - rules = scenario.seed_exposure.rules + # Use a bounded fallback subset when timeline-specific rules are absent. + rules = _select_timeline_fallback_rules(timestep, scenario) new_exposures = 0 event_content = active_event.event.content event_credibility = active_event.event.credibility info_epoch = active_event.timestep intensity = active_event.re_reasoning_intensity or "normal" + direct_exposure_cap = _timeline_direct_exposure_cap(len(agents), intensity) direct_exposed_agent_ids: set[str] = set() + shuffled_indices = list(range(len(agents))) + rng.shuffle(shuffled_indices) for rule in rules: + if new_exposures >= direct_exposure_cap: + break # For timeline events, ignore the rule's timestep field — we're applying now # (Rules are designed for t=0 seed exposure but we reuse them for timeline) channel_credibility = get_channel_credibility(scenario, rule.channel) - for i, agent in enumerate(agents): + for i in shuffled_indices: + if new_exposures >= direct_exposure_cap: + break + agent = agents[i] agent_id = agent.get("_id", str(i)) + # Prevent one timeline event from directly re-exposing the same agent + # through many overlapping fallback rules. + if agent_id in direct_exposed_agent_ids: + continue + # Evaluate the "when" condition (skip timestep check since we're applying now) when_cond = rule.when.lower() if when_cond != "true" and when_cond != "1": diff --git a/extropy/simulation/state.py b/extropy/simulation/state.py index b654d48..45b8c87 100644 --- a/extropy/simulation/state.py +++ b/extropy/simulation/state.py @@ -174,12 +174,16 @@ def _create_schema(self) -> None: ON exposures(run_id, timestep) """ ) - cursor.execute( + # Legacy DBs may not have force_rereason/info_epoch yet; migration adds them. + try: + cursor.execute( + """ + CREATE INDEX IF NOT EXISTS idx_exposures_force_epoch + ON exposures(run_id, agent_id, force_rereason, info_epoch) """ - CREATE INDEX IF NOT EXISTS idx_exposures_force_epoch - ON exposures(run_id, agent_id, force_rereason, info_epoch) - """ - ) + ) + except sqlite3.OperationalError: + pass cursor.execute( """ CREATE INDEX IF NOT EXISTS idx_timeline_timestep @@ -503,6 +507,41 @@ def get_sharers(self) -> list[str]: ) return [row["agent_id"] for row in cursor.fetchall()] + def get_exposed_agents( + self, + timestep: int | None = None, + info_epoch: int | None = None, + ) -> list[str]: + """Get distinct agents with recorded exposures, optionally filtered. + + Args: + timestep: Optional timestep filter. + info_epoch: Optional provenance epoch filter. + + Returns: + Distinct agent IDs ordered by ID. + """ + cursor = self.conn.cursor() + clauses = ["run_id = ?"] + params: list[Any] = [self.run_id] + if timestep is not None: + clauses.append("timestep = ?") + params.append(timestep) + if info_epoch is not None: + clauses.append("info_epoch = ?") + params.append(info_epoch) + + cursor.execute( + f""" + SELECT DISTINCT agent_id + FROM exposures + WHERE {" AND ".join(clauses)} + ORDER BY agent_id + """, + params, + ) + return [row["agent_id"] for row in cursor.fetchall()] + def get_all_agent_ids(self) -> list[str]: """Get all agent IDs in the database.""" cursor = self.conn.cursor() diff --git a/pyproject.toml b/pyproject.toml index ffebae2..0157a87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,8 @@ dependencies = [ "python-dotenv>=1.0.0,<2", "pyyaml>=6.0.0,<7", "anthropic>=0.77.0,<1", + "faker>=37.11.0,<38", + "iso3166>=2.1.1,<3", ] [project.optional-dependencies] diff --git a/skills/extropy/SCENARIOS.md b/skills/extropy/SCENARIOS.md index 30c6f80..0e2f5e5 100644 --- a/skills/extropy/SCENARIOS.md +++ b/skills/extropy/SCENARIOS.md @@ -14,7 +14,7 @@ Not a survey. Not a poll. A simulation of collective human behavior. Any country or region. Examples: - US (bundled SSA + Census name data) -- Japan, India, Brazil, UK, Germany (provide NameConfig or let LLM research) +- Japan, India, Brazil, UK, Germany (Faker locale routing + CSV fallback handles naming) - Multi-region (agents distributed across cities, states, countries) Extropy doesn't care about geography - it cares about attributes and distributions. Define `state`, `city`, `region` as attributes with your desired distribution. @@ -308,7 +308,7 @@ Use this skill when users ask: | Question | Answer | |----------|--------| -| Can I simulate non-US populations? | Yes, any country with appropriate NameConfig | +| Can I simulate non-US populations? | Yes, any country with Faker locale routing + CSV fallback | | Can I model families? | Yes, `household_mode: true` with configurable `agent_focus` | | Can I have evolving events? | Yes, use timeline with multiple events | | Can I get open-ended responses? | Yes, `type: open_ended` outcomes | diff --git a/test-v2-e2e/extended.network-config.default.seed42.20260215-233218.yaml b/test-v2-e2e/extended.network-config.default.seed42.20260215-233218.yaml deleted file mode 100644 index 2c029ec..0000000 --- a/test-v2-e2e/extended.network-config.default.seed42.20260215-233218.yaml +++ /dev/null @@ -1,220 +0,0 @@ -avg_degree: 20.0 -rewire_prob: 0.05 -similarity_store_threshold: 0.05 -similarity_threshold: 0.3 -similarity_steepness: 10.0 -candidate_mode: blocked -candidate_pool_multiplier: 12.0 -min_candidate_pool: 80 -similarity_workers: 1 -similarity_chunk_size: 64 -checkpoint_every_rows: 250 -triadic_closure_prob: 0.6 -target_clustering: 0.35 -target_modularity: 0.55 -inter_community_scale: 0.3 -max_calibration_iterations: 12 -quality_profile: balanced -topology_gate: strict -max_calibration_minutes: 30 -calibration_restarts: 4 -target_largest_component_ratio: 0.95 -target_degree_tolerance_pct: 0.15 -target_modularity_tolerance: 0.1 -target_clustering_tolerance: 0.08 -bridge_budget_fraction: 0.08 -swap_passes: 3 -power_law_exponent: 2.5 -identity_clustering_boost: 1.5 -auto_save_generated_config: true -allow_quarantine: true -quarantine_suffix: rejected -attribute_weights: - state: - weight: 5.0 - match_type: exact - school_type: - weight: 4.5 - match_type: exact - political_ideology: - weight: 3.5 - match_type: exact - pta_membership: - weight: 3.0 - match_type: exact - community_involvement: - weight: 2.8 - match_type: exact - youngest_child_age: - weight: 2.5 - match_type: numeric_range - range_value: 5.0 - religious_affiliation: - weight: 2.2 - match_type: exact - parental_control_preference: - weight: 2.0 - match_type: exact - lgbtq_acceptance: - weight: 2.0 - match_type: exact - school_board_engagement: - weight: 3.2 - match_type: within_n - range_value: 1.0 - ordinal_levels: - none: 1 - minimal: 2 - occasional: 3 - active: 4 - very_active: 5 -degree_multipliers: -- attribute: social_network_density - condition: very_high - multiplier: 2.5 - rationale: Very high social network density indicates natural super-connectors -- attribute: social_network_density - condition: high - multiplier: 1.8 - rationale: High social network density indicates well-connected individuals -- attribute: pta_membership - condition: true - multiplier: 1.6 - rationale: PTA members interact with many other parents regularly -- attribute: school_board_engagement - condition: very_active - multiplier: 2.0 - rationale: Very active school board participants know many stakeholders -- attribute: school_board_engagement - condition: active - multiplier: 1.5 - rationale: Active school board participants have expanded networks -- attribute: community_involvement - condition: high - multiplier: 1.4 - rationale: High community involvement creates many connection opportunities -edge_type_rules: -- name: pta_colleague - condition: a_pta_membership == True and b_pta_membership == True and a_state == - b_state - priority: 40 - description: Both are PTA members in the same area, regularly collaborate on school - issues -- name: school_board_activist - condition: (a_school_board_engagement == 'very_active' or a_school_board_engagement - == 'active') and (b_school_board_engagement == 'very_active' or b_school_board_engagement - == 'active') - priority: 35 - description: Both actively engaged in school board issues, likely know each other - from meetings -- name: school_parent - condition: a_school_type == b_school_type and a_school_type == 'public' and a_state - == b_state - priority: 30 - description: Parents with children at the same public school system -- name: political_ally - condition: a_political_ideology == b_political_ideology and a_state == b_state and - (a_school_board_engagement != 'none' and b_school_board_engagement != 'none') - priority: 25 - description: Share political views and both engaged in school board issues - likely - allies -- name: neighbor - condition: a_state == b_state and a_urban_rural == b_urban_rural - priority: 15 - description: Live in same suburban area of same state, general neighbors -- name: acquaintance - condition: a_state == b_state - priority: 10 - description: Live in same state, general community acquaintances -influence_factors: -- attribute: school_board_engagement - type: ordinal - levels: - none: 1 - minimal: 2 - occasional: 3 - active: 4 - very_active: 5 - weight: 0.35 - description: More active school board participants have greater influence on community - opinion about the book ban -- attribute: community_involvement - type: ordinal - levels: - none: 1 - low: 2 - medium: 3 - high: 4 - weight: 0.25 - description: Higher community involvement gives more social capital and influence -- attribute: pta_membership - type: boolean - weight: 0.2 - description: PTA members have organizational platform and credibility with other - parents -- attribute: education_level - type: ordinal - levels: - high_school: 1 - associate: 2 - bachelor: 3 - graduate: 4 - weight: 0.15 - description: Higher education may confer more credibility in debates about curriculum - and books -default_edge_type: acquaintance -ordinal_levels: - school_board_engagement: - none: 1 - minimal: 2 - occasional: 3 - active: 4 - very_active: 5 -generated_from: 10 US suburban homeowners with school-age children + Local school - board book ban decision -generation_rationale: ' - - This is a small, tight-knit suburban community of 10 homeowners with school-age - children centered around a local school board book ban decision. Key connection - drivers: - - - 1. **Geographic & School Connections**: Since this is a suburban community with - school-age children, the primary connection points are: state/location (they''re - neighbors), school_type (public school parents will know each other), and school_board_engagement - (people active in school issues will know each other). The social_network_density - attribute directly indicates how connected people are. - - - 2. **Shared Interests & Activities**: PTA membership, community_involvement, and - library_usage_frequency create natural meeting points. Parents with similar aged - children (youngest_child_age, oldest_child_age) will connect through school activities. - - - 3. **Social/Political Alignment**: For a contentious issue like book bans, political_ideology, - religious_affiliation, parental_control_preference, and lgbtq_acceptance will drive - homophily - people cluster with like-minded individuals on polarizing topics. - - - 4. **Hubs**: People with high community_involvement, PTA membership, and very_active - school_board_engagement are natural connectors. High social_network_density directly - indicates hub status. - - - 5. **Edge Types**: We need to distinguish between household partners (same household), - close neighbors (same state + high interaction), PTA connections, school board activism - connections, and general acquaintances. - - - 6. **Influence**: School board engagement level (more active = more influence), - PTA membership (gives platform), community_involvement (higher = more influence), - and education_level (graduate degree holders may have more credibility) create asymmetry. - - - 7. **Average Degree**: This is a small, politically-charged community issue bringing - people together. With only 10 people and high stakes, expect 20-35 connections per - person as neighbors and parents interact frequently around schools and the controversial - decision. - - ' -seed: 42 diff --git a/test-v2-e2e/extended.network-config.default.seednoseed.20260215-231703.yaml b/test-v2-e2e/extended.network-config.default.seednoseed.20260215-231703.yaml deleted file mode 100644 index e2fdb03..0000000 --- a/test-v2-e2e/extended.network-config.default.seednoseed.20260215-231703.yaml +++ /dev/null @@ -1,296 +0,0 @@ -avg_degree: 20.0 -rewire_prob: 0.05 -similarity_store_threshold: 0.05 -similarity_threshold: 0.3 -similarity_steepness: 10.0 -candidate_mode: blocked -candidate_pool_multiplier: 12.0 -min_candidate_pool: 80 -similarity_workers: 1 -similarity_chunk_size: 64 -checkpoint_every_rows: 250 -triadic_closure_prob: 0.6 -target_clustering: 0.35 -target_modularity: 0.55 -inter_community_scale: 0.3 -max_calibration_iterations: 12 -quality_profile: balanced -topology_gate: strict -max_calibration_minutes: 30 -calibration_restarts: 4 -target_largest_component_ratio: 0.95 -target_degree_tolerance_pct: 0.15 -target_modularity_tolerance: 0.1 -target_clustering_tolerance: 0.08 -bridge_budget_fraction: 0.08 -swap_passes: 3 -power_law_exponent: 2.5 -identity_clustering_boost: 1.5 -auto_save_generated_config: true -allow_quarantine: true -quarantine_suffix: rejected -attribute_weights: - school_type: - weight: 4.5 - match_type: exact - political_ideology: - weight: 4.0 - match_type: within_n - range_value: 1.0 - ordinal_levels: - very_conservative: 1 - conservative: 2 - moderate: 3 - liberal: 4 - very_liberal: 5 - pta_membership: - weight: 3.5 - match_type: exact - parental_control_preference: - weight: 3.5 - match_type: within_n - range_value: 1.0 - ordinal_levels: - parents_only: 1 - parents_primary: 2 - shared_responsibility: 3 - educators_primary: 4 - educators_only: 5 - youngest_child_age: - weight: 3.0 - match_type: numeric_range - range_value: 5.0 - school_board_engagement: - weight: 3.0 - match_type: within_n - range_value: 1.0 - ordinal_levels: - none: 0 - minimal: 1 - occasional: 2 - active: 3 - very_active: 4 - religious_affiliation: - weight: 2.8 - match_type: exact - lgbtq_acceptance: - weight: 2.5 - match_type: within_n - range_value: 1.0 - ordinal_levels: - very_resistant: 1 - resistant: 2 - neutral: 3 - accepting: 4 - very_accepting: 5 - community_involvement: - weight: 2.5 - match_type: within_n - range_value: 1.0 - ordinal_levels: - none: 0 - low: 1 - medium: 2 - high: 3 - very_high: 4 - num_children: - weight: 2.0 - match_type: numeric_range - range_value: 2.0 - age_appropriateness_concern: - weight: 2.0 - match_type: within_n - range_value: 1.0 - ordinal_levels: - very_relaxed: 1 - relaxed: 2 - moderate: 3 - concerned: 4 - very_concerned: 5 -degree_multipliers: -- attribute: school_board_engagement - condition: very_active - multiplier: 2.5 - rationale: Very active school board participants are highly visible, attend all - meetings, and know everyone in the community advocacy space -- attribute: pta_membership - condition: true - multiplier: 1.8 - rationale: PTA members attend regular meetings, volunteer at events, and interact - with many other parents -- attribute: community_involvement - condition: high - multiplier: 1.7 - rationale: Highly involved community members participate in multiple local organizations - and know more neighbors -- attribute: num_children - condition: 3 - multiplier: 1.5 - rationale: Parents with more children have more touchpoints through multiple classrooms, - activities, and parent networks -- attribute: school_type - condition: public - multiplier: 1.4 - rationale: Public school parents interact with a broader, more diverse parent base - than private school families -- attribute: social_network_density - condition: high - multiplier: 1.6 - rationale: People with naturally high social network density maintain more active - connections in their community -edge_type_rules: -- name: close_ally - condition: a_school_type == b_school_type and a_pta_membership == b_pta_membership - and a_pta_membership == True and (a_political_ideology == b_political_ideology - or a_parental_control_preference == b_parental_control_preference) - priority: 50 - description: Close allies who share school type, are both in PTA, and align ideologically - on the book ban issue -- name: pta_colleague - condition: a_pta_membership == True and b_pta_membership == True and a_school_type - == b_school_type - priority: 40 - description: PTA colleagues who work together at the same school type but may have - different ideologies -- name: school_board_ally - condition: (a_school_board_engagement == 'very_active' or a_school_board_engagement - == 'active') and (b_school_board_engagement == 'very_active' or b_school_board_engagement - == 'active') and a_political_ideology == b_political_ideology - priority: 45 - description: Active school board participants who share political ideology and work - together on advocacy -- name: school_parent - condition: a_school_type == b_school_type - priority: 30 - description: Parents whose children attend the same school type (public/private/charter) -- name: ideological_peer - condition: a_political_ideology == b_political_ideology and a_religious_affiliation - == b_religious_affiliation - priority: 25 - description: Community members who share both political and religious views on the - book ban debate -- name: neighbor - condition: a_urban_rural == b_urban_rural - priority: 10 - description: Suburban neighbors in the same community who know each other through - proximity -influence_factors: -- attribute: school_board_engagement - type: ordinal - levels: - none: 0 - minimal: 1 - occasional: 2 - active: 3 - very_active: 4 - weight: 0.4 - description: Higher school board engagement creates authority and visibility in - the community debate, making their opinions more influential -- attribute: pta_membership - type: boolean - weight: 0.25 - description: PTA members have insider knowledge and established credibility on school - matters -- attribute: community_involvement - type: ordinal - levels: - none: 0 - low: 1 - medium: 2 - high: 3 - very_high: 4 - weight: 0.2 - description: Higher community involvement creates broader social reach and opinion - leadership -- attribute: education_priority - type: ordinal - levels: - low: 1 - medium: 2 - high: 3 - weight: 0.15 - description: Parents who prioritize education are seen as more credible voices on - school curriculum and library issues -default_edge_type: acquaintance -ordinal_levels: - political_ideology: - very_conservative: 1 - conservative: 2 - moderate: 3 - liberal: 4 - very_liberal: 5 - parental_control_preference: - parents_only: 1 - parents_primary: 2 - shared_responsibility: 3 - educators_primary: 4 - educators_only: 5 - school_board_engagement: - none: 0 - minimal: 1 - occasional: 2 - active: 3 - very_active: 4 - lgbtq_acceptance: - very_resistant: 1 - resistant: 2 - neutral: 3 - accepting: 4 - very_accepting: 5 - community_involvement: - none: 0 - low: 1 - medium: 2 - high: 3 - very_high: 4 - age_appropriateness_concern: - very_relaxed: 1 - relaxed: 2 - moderate: 3 - concerned: 4 - very_concerned: 5 -generated_from: 10 US suburban homeowners with school-age children + Local school - board book ban decision -generation_rationale: 'This is a small, tight-knit suburban community of 10 homeowners - with school-age children facing a contentious school board book ban decision. These - connections will be driven primarily by: - - - 1. **Geographic and institutional proximity**: They''re all suburban homeowners - in the same community, likely attending the same schools and school board meetings. - School type (public vs private) and school board engagement are critical dividers - and connectors. - - - 2. **Parenting and community involvement**: PTA membership, community involvement - level, and school board engagement create natural connection points. Parents who - are active in schools know each other through meetings, events, and advocacy. - - - 3. **Ideological alignment**: On a polarizing issue like book bans, political ideology, - religious affiliation, parental control preferences, and LGBTQ acceptance will create - strong homophily - people will cluster with those who share their views. - - - 4. **Children''s ages**: Parents with similarly-aged children meet through school - grades, playgroups, and extracurricular activities. - - - 5. **Hub identification**: Highly engaged school board members and PTA members will - be natural connectors, as will those with high community involvement and many children - (more touchpoints with other families). - - - 6. **Edge types**: We''ll distinguish between close allies (share ideology + school - type), school contacts (same school/PTA but different views), neighborhood acquaintances - (geographic proximity), and advocacy partners (same school board engagement level). - - - 7. **Influence asymmetry**: School board engagement level creates authority, PTA - membership gives influence on school matters, number of children increases network - reach, and community involvement level drives opinion leadership. - - - Given the small size (10 people) in a single suburban community around a polarizing - issue, I expect high average degree (30-40) as people will know most others, but - relationships will vary in quality based on alignment.' diff --git a/test-v2-e2e/extended.persona.yaml b/test-v2-e2e/extended.persona.yaml deleted file mode 100644 index 03320f5..0000000 --- a/test-v2-e2e/extended.persona.yaml +++ /dev/null @@ -1,851 +0,0 @@ -population_description: 10 US suburban homeowners with school-age children + Local - school board book ban decision -created_at: '2026-02-15T23:45:42.186580' -intro_template: I'm a {age}-year-old {gender} living in {state}, where I've been a - homeowner for {homeownership_years} years. I'm {marital_status} with {num_children} - school-age children attending {school_type} school, and my kids' education is one - of my top priorities. My political views lean {political_ideology}, and I identify - as {religious_affiliation}. I've been paying close attention to what's happening - with our local school board lately. -treatments: -- attribute: age - treatment: concrete - group: basic_identity -- attribute: gender - treatment: concrete - group: basic_identity -- attribute: state - treatment: concrete - group: basic_identity -- attribute: urban_rural - treatment: concrete - group: basic_identity -- attribute: education_level - treatment: concrete - group: basic_identity -- attribute: marital_status - treatment: concrete - group: basic_identity -- attribute: household_size - treatment: concrete - group: household_composition -- attribute: employment_status - treatment: concrete - group: work_and_income -- attribute: num_children - treatment: concrete - group: household_composition -- attribute: community_involvement - treatment: relative - group: civic_engagement -- attribute: openness - treatment: relative - group: personality -- attribute: conscientiousness - treatment: relative - group: personality -- attribute: extraversion - treatment: relative - group: personality -- attribute: agreeableness - treatment: relative - group: personality -- attribute: neuroticism - treatment: relative - group: personality -- attribute: risk_tolerance - treatment: relative - group: personality -- attribute: education_priority - treatment: concrete - group: values_and_priorities -- attribute: environmental_consciousness - treatment: relative - group: values_and_priorities -- attribute: occupation_category - treatment: concrete - group: work_and_income -- attribute: individual_income - treatment: concrete - group: work_and_income -- attribute: household_income - treatment: concrete - group: work_and_income -- attribute: homeownership_years - treatment: concrete - group: housing_and_assets -- attribute: home_value - treatment: concrete - group: housing_and_assets -- attribute: mortgage_status - treatment: concrete - group: housing_and_assets -- attribute: youngest_child_age - treatment: concrete - group: household_composition -- attribute: oldest_child_age - treatment: concrete - group: household_composition -- attribute: school_type - treatment: concrete - group: education_and_parenting -- attribute: dual_income_household - treatment: concrete - group: work_and_income -- attribute: commute_time - treatment: concrete - group: work_and_income -- attribute: vehicle_count - treatment: concrete - group: housing_and_assets -- attribute: pta_membership - treatment: concrete - group: civic_engagement -- attribute: home_office - treatment: concrete - group: housing_and_assets -- attribute: household_savings - treatment: concrete - group: housing_and_assets -- attribute: childcare_expense - treatment: concrete - group: household_composition -- attribute: extracurricular_count - treatment: concrete - group: education_and_parenting -- attribute: religious_affiliation - treatment: concrete - group: values_and_priorities -- attribute: political_ideology - treatment: concrete - group: values_and_priorities -- attribute: free_speech_absolutism - treatment: relative - group: book_ban_perspectives -- attribute: trust_in_institutions - treatment: relative - group: civic_engagement -- attribute: has_school_age_children - treatment: concrete - group: household_composition -- attribute: school_board_engagement - treatment: relative - group: civic_engagement -- attribute: media_consumption_primary - treatment: concrete - group: values_and_priorities -- attribute: parental_control_preference - treatment: concrete - group: book_ban_perspectives -- attribute: library_usage_frequency - treatment: concrete - group: education_and_parenting -- attribute: personal_book_ban_experience - treatment: concrete - group: book_ban_perspectives -- attribute: lgbtq_acceptance - treatment: relative - group: book_ban_perspectives -- attribute: age_appropriateness_concern - treatment: relative - group: book_ban_perspectives -- attribute: social_network_density - treatment: relative - group: civic_engagement -groups: -- name: basic_identity - label: About Me - attributes: - - age - - gender - - state - - urban_rural - - education_level - - marital_status -- name: household_composition - label: My Family - attributes: - - household_size - - num_children - - youngest_child_age - - oldest_child_age - - childcare_expense - - has_school_age_children -- name: work_and_income - label: Work & Finances - attributes: - - employment_status - - occupation_category - - individual_income - - household_income - - dual_income_household - - commute_time -- name: housing_and_assets - label: Home & Assets - attributes: - - homeownership_years - - home_value - - mortgage_status - - vehicle_count - - home_office - - household_savings -- name: education_and_parenting - label: Education & Parenting - attributes: - - school_type - - extracurricular_count - - library_usage_frequency -- name: values_and_priorities - label: Values & Beliefs - attributes: - - education_priority - - environmental_consciousness - - religious_affiliation - - political_ideology - - media_consumption_primary -- name: civic_engagement - label: Community Engagement - attributes: - - community_involvement - - pta_membership - - trust_in_institutions - - school_board_engagement - - social_network_density -- name: personality - label: My Personality - attributes: - - openness - - conscientiousness - - extraversion - - agreeableness - - neuroticism - - risk_tolerance -- name: book_ban_perspectives - label: Views on Book Access & Content - attributes: - - free_speech_absolutism - - parental_control_preference - - personal_book_ban_experience - - lgbtq_acceptance - - age_appropriateness_concern -phrasings: - boolean: - - attribute: dual_income_household - true_phrase: Both my spouse and I work - false_phrase: Only one of us works in my household - - attribute: pta_membership - true_phrase: I am a member of the PTA - false_phrase: I am not a member of the PTA - - attribute: home_office - true_phrase: I have a dedicated home office space - false_phrase: I don't have a dedicated home office space - - attribute: has_school_age_children - true_phrase: I have school-age children who could be affected by this book ban - decision - false_phrase: I don't have school-age children who would be affected by this book - ban decision - - attribute: personal_book_ban_experience - true_phrase: I have personal experience with book restrictions or censorship in - my own education or parenting - false_phrase: I don't have personal experience with book restrictions or censorship - in my own education or parenting - categorical: - - attribute: gender - phrases: - male: I'm a dad - female: I'm a mom - null_options: [] - null_phrase: null - fallback: null - - attribute: state - phrases: - CA: I live in California - TX: I live in Texas - FL: I live in Florida - NY: I live in New York - PA: I live in Pennsylvania - IL: I live in Illinois - OH: I live in Ohio - GA: I live in Georgia - NC: I live in North Carolina - MI: I live in Michigan - NJ: I live in New Jersey - VA: I live in Virginia - WA: I live in Washington - AZ: I live in Arizona - MA: I live in Massachusetts - TN: I live in Tennessee - IN: I live in Indiana - MO: I live in Missouri - MD: I live in Maryland - WI: I live in Wisconsin - CO: I live in Colorado - MN: I live in Minnesota - SC: I live in South Carolina - AL: I live in Alabama - LA: I live in Louisiana - KY: I live in Kentucky - OR: I live in Oregon - OK: I live in Oklahoma - CT: I live in Connecticut - UT: I live in Utah - IA: I live in Iowa - NV: I live in Nevada - AR: I live in Arkansas - MS: I live in Mississippi - KS: I live in Kansas - NM: I live in New Mexico - NE: I live in Nebraska - WV: I live in West Virginia - ID: I live in Idaho - HI: I live in Hawaii - NH: I live in New Hampshire - ME: I live in Maine - MT: I live in Montana - RI: I live in Rhode Island - DE: I live in Delaware - SD: I live in South Dakota - ND: I live in North Dakota - AK: I live in Alaska - VT: I live in Vermont - WY: I live in Wyoming - null_options: [] - null_phrase: null - fallback: null - - attribute: urban_rural - phrases: - suburban: My family lives in the suburbs - null_options: [] - null_phrase: null - fallback: null - - attribute: education_level - phrases: - high_school: I finished high school - associate: I have an associate's degree - bachelor: I have a bachelor's degree - graduate: I have a graduate degree - null_options: [] - null_phrase: null - fallback: null - - attribute: marital_status - phrases: - married: I'm married - divorced: I'm divorced - single: I'm single - widowed: I'm widowed - null_options: [] - null_phrase: null - fallback: null - - attribute: employment_status - phrases: - full_time: I work full-time - part_time: I work part-time - self_employed: I'm self-employed - unemployed: I'm not currently employed - null_options: [] - null_phrase: null - fallback: null - - attribute: community_involvement - phrases: - high: I'm very active in my community and neighborhood - medium: I'm moderately involved in community activities - low: I occasionally participate in neighborhood events - none: I don't really get involved in community activities - null_options: - - none - null_phrase: I don't really get involved in community activities - fallback: null - - attribute: risk_tolerance - phrases: - low: I prefer to play it safe and avoid risk - medium: I'm comfortable with a moderate level of risk - high: I'm willing to take significant risks - null_options: [] - null_phrase: null - fallback: null - - attribute: education_priority - phrases: - low: My kids' education isn't my top priority - medium: Education is important to me, but it's balanced with other priorities - high: My children's education is one of my highest priorities - null_options: [] - null_phrase: null - fallback: null - - attribute: environmental_consciousness - phrases: - low: Environmental issues aren't really on my radar - medium: I care about the environment and try to make sustainable choices when - I can - high: Environmental sustainability is very important to me and guides many of - my decisions - null_options: [] - null_phrase: null - fallback: null - - attribute: occupation_category - phrases: - professional: I work in a professional field like law, medicine, or engineering - management: I'm in a management role - service: I work in the service industry - sales: I'm in sales - trades: I work in a skilled trade - administrative: I do administrative work - null_options: [] - null_phrase: null - fallback: null - - attribute: mortgage_status - phrases: - paying_mortgage: I'm still paying off my mortgage - paid_off: I've paid off my mortgage - null_options: [] - null_phrase: null - fallback: null - - attribute: school_type - phrases: - public: My kids go to public school - private: My kids attend private school - charter: My kids go to a charter school - homeschool: I homeschool my children - null_options: [] - null_phrase: null - fallback: null - - attribute: religious_affiliation - phrases: - christian_conservative: I'm a conservative Christian - christian_moderate: I'm a Christian with moderate views - christian_progressive: I'm a progressive Christian - other_religion: I practice a non-Christian faith - secular: I'm secular but not particularly focused on religion - none: I don't identify with any religion - null_options: - - none - null_phrase: I don't identify with any religion - fallback: null - - attribute: political_ideology - phrases: - very_conservative: I'm very conservative politically - conservative: I'm conservative - moderate: I'm politically moderate - liberal: I'm liberal - very_liberal: I'm very liberal politically - null_options: [] - null_phrase: null - fallback: null - - attribute: free_speech_absolutism - phrases: - absolutist: I believe in absolute free speech with virtually no restrictions - strong: I strongly support free speech, though I recognize some limits may be - necessary - moderate: I balance free speech with the need for some content curation - limited: I think there should be significant limits on speech to protect people - from harm - null_options: [] - null_phrase: null - fallback: null - - attribute: trust_in_institutions - phrases: - very_high: I have a great deal of trust in public institutions like schools - and government - high: I generally trust public institutions - moderate: I have mixed feelings about public institutions — some trust, some - skepticism - low: I don't have much trust in public institutions - very_low: I have very little trust in schools and government - null_options: [] - null_phrase: null - fallback: null - - attribute: school_board_engagement - phrases: - very_active: I'm very engaged with the school board — I attend almost every - meeting and speak regularly - active: I actively follow school board decisions and attend meetings regularly - occasional: I check in on school board activities occasionally - minimal: I pay minimal attention to what the school board does - none: I don't engage with the school board at all - null_options: - - none - null_phrase: I don't engage with the school board at all - fallback: null - - attribute: media_consumption_primary - phrases: - social_media: I get most of my news from social media - cable_news: I primarily watch cable news - local_news: I mainly follow local news sources - national_newspapers: I read national newspapers like the Times or the Post - online_news: I get my news from online news websites - null_options: [] - null_phrase: null - fallback: null - - attribute: parental_control_preference - phrases: - parents_only: I believe parents alone should control what their children read - parents_primary: I think parents should have primary control, with some input - from educators - shared_responsibility: I believe it should be a shared responsibility between - parents and educators - educators_primary: I think educators should have primary control, with parents - having input - educators_only: I believe professional educators should decide what's appropriate - for students - null_options: [] - null_phrase: null - fallback: null - - attribute: library_usage_frequency - phrases: - weekly: My family and I use the library every week - monthly: We visit the library about once a month - occasionally: We go to the library every now and then - rarely: We rarely use the library - never: We don't use the library - null_options: - - never - null_phrase: We don't use the library - fallback: null - - attribute: lgbtq_acceptance - phrases: - very_accepting: I'm very accepting of LGBTQ individuals and topics - accepting: I'm accepting of LGBTQ people and issues - neutral: I'm neutral on LGBTQ matters - resistant: I'm uncomfortable with LGBTQ topics, especially around children - very_resistant: I'm very opposed to LGBTQ content and discussions - null_options: [] - null_phrase: null - fallback: null - - attribute: age_appropriateness_concern - phrases: - very_concerned: I'm very concerned about age-appropriate content in school materials - concerned: I'm concerned about ensuring school materials are age-appropriate - moderate: I have moderate concerns about age-appropriateness - relaxed: I'm fairly relaxed about what's age-appropriate - very_relaxed: I'm not worried about age-appropriateness — I trust kids can handle - challenging material - null_options: [] - null_phrase: null - fallback: null - - attribute: social_network_density - phrases: - very_high: I have a very strong network of local parents and neighbors — we're - all connected - high: I have a solid network of parents and community members I'm in touch with - moderate: I know some other parents and neighbors, but we're not super connected - low: I don't know many other parents or neighbors well - isolated: I feel pretty isolated — I don't really have a local parent network - null_options: [] - null_phrase: null - fallback: null - relative: - - attribute: community_involvement - labels: - much_below: I'm far less involved in community activities than most people - below: I participate in community activities less than most - average: I'm about as involved in community activities as the average person - above: I'm more engaged in community activities than most people - much_above: I'm far more active in community activities than most people - - attribute: openness - labels: - much_below: I'm much less open to new experiences than most people - below: I'm somewhat less curious and open-minded than most - average: I'm about as open to new ideas as the average person - above: I'm more intellectually curious and open than most people - much_above: I'm far more open to experiences and ideas than most people - - attribute: conscientiousness - labels: - much_below: I'm far less organized and disciplined than most people - below: I'm somewhat less conscientious than most - average: I'm about as organized and dependable as the average person - above: I'm more organized and self-disciplined than most people - much_above: I'm far more conscientious and dependable than most people - - attribute: extraversion - labels: - much_below: I'm far more introverted than most people - below: I'm somewhat less outgoing than most - average: I'm about as extraverted as the average person - above: I'm more sociable and outgoing than most people - much_above: I'm far more extraverted and energetic than most people - - attribute: agreeableness - labels: - much_below: I'm much less agreeable and cooperative than most people - below: I'm somewhat less trusting and compassionate than most - average: I'm about as agreeable as the average person - above: I'm more cooperative and compassionate than most people - much_above: I'm far more agreeable and trusting than most people - - attribute: neuroticism - labels: - much_below: I'm far more emotionally stable than most people - below: I'm somewhat less anxious than most - average: I'm about as emotionally reactive as the average person - above: I'm more prone to anxiety than most people - much_above: I'm far more emotionally sensitive than most people - - attribute: risk_tolerance - labels: - much_below: I'm far more risk-averse than most people - below: I'm somewhat more cautious than most - average: I have about the same risk tolerance as the average person - above: I'm more willing to take risks than most people - much_above: I'm far more risk-tolerant than most people - - attribute: environmental_consciousness - labels: - much_below: I'm far less concerned about environmental issues than most people - below: I'm somewhat less environmentally conscious than most - average: I'm about as concerned about the environment as the average person - above: I'm more environmentally conscious than most people - much_above: I'm far more concerned about environmental issues than most people - - attribute: free_speech_absolutism - labels: - much_below: I believe in content curation far more than most people - below: I'm somewhat less absolutist about free speech than most - average: I have about the same views on free speech as the average person - above: I'm more of a free speech absolutist than most people - much_above: I believe in absolute free speech far more strongly than most people - - attribute: trust_in_institutions - labels: - much_below: I trust institutions far less than most people - below: I'm more skeptical of institutions than most - average: I'm about as trusting of institutions as the average person - above: I generally trust institutions more than most - much_above: I have much more faith in institutions than most people - - attribute: school_board_engagement - labels: - much_below: I'm far less engaged with the school board than most people - below: I attend school board meetings less than most - average: I'm about as engaged with the school board as the average person - above: I'm more active with the school board than most people - much_above: I'm far more engaged with the school board than most people - - attribute: lgbtq_acceptance - labels: - much_below: I'm far less accepting of LGBTQ topics than most people - below: I'm somewhat less accepting of LGBTQ issues than most - average: I'm about as accepting of LGBTQ topics as the average person - above: I'm more accepting of LGBTQ individuals than most people - much_above: I'm far more accepting of LGBTQ topics than most people - - attribute: age_appropriateness_concern - labels: - much_below: I'm far less concerned about age-appropriate content than most people - below: I'm somewhat less worried about age-appropriateness than most - average: I have about the same concerns about age-appropriate content as the - average person - above: I'm more concerned about age-appropriate materials than most people - much_above: I'm far more concerned about age-appropriate content than most people - - attribute: social_network_density - labels: - much_below: I have far fewer local parent connections than most people - below: My parent network is somewhat smaller than most - average: I have about the same size parent network as the average person - above: I have more local parent connections than most people - much_above: I have a far larger parent network than most people - concrete: - - attribute: age - template: I'm {value} years old - format_spec: .0f - prefix: '' - suffix: '' - - attribute: household_size - template: There are {value} people in my household - format_spec: .0f - prefix: '' - suffix: '' - - attribute: num_children - template: I have {value} school-age children - format_spec: .0f - prefix: '' - suffix: '' - - attribute: individual_income - template: I earn {value} per year - format_spec: .2f - prefix: $ - suffix: '' - - attribute: household_income - template: Our household brings in {value} annually - format_spec: .2f - prefix: $ - suffix: '' - - attribute: homeownership_years - template: We've owned our home for {value} years - format_spec: .0f - prefix: '' - suffix: '' - - attribute: home_value - template: Our home is valued at {value} - format_spec: .2f - prefix: $ - suffix: '' - - attribute: youngest_child_age - template: My youngest child is {value} years old - format_spec: .0f - prefix: '' - suffix: '' - - attribute: oldest_child_age - template: My oldest child is {value} years old - format_spec: .0f - prefix: '' - suffix: '' - - attribute: commute_time - template: My commute takes {value} each way - format_spec: .0f - prefix: '' - suffix: ' minutes' - - attribute: vehicle_count - template: We own {value} vehicles - format_spec: .0f - prefix: '' - suffix: '' - - attribute: household_savings - template: We have {value} in savings and investments - format_spec: .2f - prefix: $ - suffix: '' - - attribute: childcare_expense - template: I spend {value} per month on childcare - format_spec: .2f - prefix: $ - suffix: '' - - attribute: extracurricular_count - template: My kids are enrolled in {value} extracurricular activities - format_spec: .0f - prefix: '' - suffix: '' -population_stats: - stats: - age: - mean: 30.510204081632654 - std: 17.812825960736355 - min: 4.0 - max: 56.0 - count: 49.0 - agreeableness: - mean: 3.742296609197454 - std: 0.6021187408907889 - min: 2.4993583967379003 - max: 5.0 - count: 49.0 - conscientiousness: - mean: 3.679869888537246 - std: 0.6199907438886438 - min: 2.2281225906517585 - max: 5.0 - count: 49.0 - commute_time: - mean: 30.632653061224488 - std: 17.444786563076445 - min: 5.0 - max: 87.0 - count: 49.0 - extraversion: - mean: 3.324855736233059 - std: 0.7147824100658166 - min: 1.7592498627620068 - max: 4.862375789876565 - count: 49.0 - homeownership_years: - mean: 14.183673469387756 - std: 9.15986141950247 - min: 1.0 - max: 33.0 - count: 49.0 - household_size: - mean: 4.1020408163265305 - std: 0.8476658628056143 - min: 2.0 - max: 5.0 - count: 49.0 - dual_income_household: - mean: 0.5102040816326531 - std: 0.5050762722761054 - min: 0.0 - max: 1.0 - count: 49.0 - neuroticism: - mean: 2.963042481081652 - std: 0.8074593016284259 - min: 1.0 - max: 4.504133788459496 - count: 49.0 - num_children: - mean: 2.0408163265306123 - std: 0.7059031943035045 - min: 1.0 - max: 4.0 - count: 49.0 - has_school_age_children: - mean: 1.0 - std: 0.0 - min: 1.0 - max: 1.0 - count: 49.0 - individual_income: - mean: 71107.22448979592 - std: 32871.254997252356 - min: 25000.0 - max: 147817.0 - count: 49.0 - household_income: - mean: 112427.22448979592 - std: 35753.11161240917 - min: 69291.0 - max: 179598.0 - count: 49.0 - extracurricular_count: - mean: 3.7142857142857144 - std: 2.1505813167606567 - min: 0.0 - max: 8.0 - count: 49.0 - household_savings: - mean: 95363.26530612246 - std: 78952.96873133173 - min: 6574.0 - max: 270409.0 - count: 49.0 - openness: - mean: 3.4978221478343148 - std: 0.678771250007823 - min: 2.300849868966461 - max: 5.0 - count: 49.0 - personal_book_ban_experience: - mean: 0.20408163265306123 - std: 0.40720550896397784 - min: 0.0 - max: 1.0 - count: 49.0 - pta_membership: - mean: 0.5102040816326531 - std: 0.5050762722761054 - min: 0.0 - max: 1.0 - count: 49.0 - home_value: - mean: 507553.8775510204 - std: 204733.88463814766 - min: 230281.0 - max: 964952.0 - count: 49.0 - home_office: - mean: 0.5714285714285714 - std: 0.5 - min: 0.0 - max: 1.0 - count: 49.0 - vehicle_count: - mean: 2.0816326530612246 - std: 0.9538678868576252 - min: 1.0 - max: 5.0 - count: 49.0 - youngest_child_age: - mean: 7.8979591836734695 - std: 3.336945321942308 - min: 5.0 - max: 15.0 - count: 49.0 - childcare_expense: - mean: 1122.6530612244899 - std: 1001.612586262365 - min: 0.0 - max: 2500.0 - count: 49.0 - oldest_child_age: - mean: 13.571428571428571 - std: 2.516611478423583 - min: 7.0 - max: 18.0 - count: 49.0 diff --git a/test-v2-e2e/extended.scenario.yaml b/test-v2-e2e/extended.scenario.yaml deleted file mode 100644 index b39edf2..0000000 --- a/test-v2-e2e/extended.scenario.yaml +++ /dev/null @@ -1,276 +0,0 @@ -meta: - name: local_school_board_book - description: Local school board book ban decision - population_spec: extended.yaml - study_db: study.db - population_id: default - network_id: default - created_at: '2026-02-15T23:47:47.239185' -event: - type: announcement - content: The local school board has announced its decision to ban a list of books - from school libraries and classrooms. The board voted to remove several titles - that some community members challenged as containing inappropriate content. The - banned books will be pulled from circulation in all district schools effective - immediately. The school board stated this decision was made after reviewing community - feedback and considering age-appropriateness of materials for K-12 students. Parents - and community members can review the full list of banned titles on the district - website. - source: Local School Board - credibility: 0.95 - ambiguity: 0.3 - emotional_valence: -0.3 -timeline: -- timestep: 6 - event: - type: announcement - content: A coalition of parents, students, and civil liberties advocates gathered - outside the district office to protest the book ban decision. Protesters carried - signs reading 'Books Not Bans' and 'Let Kids Read' while several students gave - speeches about the importance of access to diverse literature. Organizers announced - plans for a community read-in event featuring the banned books and called on - the school board to reverse its decision. The protest drew approximately 150 - participants. - source: Local News Outlet - credibility: 0.9 - ambiguity: 0.3 - emotional_valence: 0.4 - exposure_rules: null - description: Local parents and students organize protest at district office -- timestep: 15 - event: - type: announcement - content: A group calling itself 'Parents for Safe Schools' has launched a petition - supporting the school board's book ban decision, gathering over 500 signatures. - The petition states that parents have the right to protect children from sexually - explicit and age-inappropriate content in schools. The group's spokesperson - issued a statement praising the school board for listening to community concerns - and prioritizing student safety. They announced plans to attend the next board - meeting to express continued support for the ban. - source: Community Facebook Group - credibility: 0.65 - ambiguity: 0.3 - emotional_valence: -0.5 - exposure_rules: null - description: Counter-petition from parents supporting the ban circulates -- timestep: 24 - event: - type: announcement - content: The American Civil Liberties Union (ACLU) has announced it will file - a lawsuit challenging the school district's book ban as unconstitutional censorship. - The organization stated the ban violates students' First Amendment rights to - access information and targets books with LGBTQ+ themes and diverse perspectives. - The ACLU is representing five local families and two students in the case. Legal - experts quoted in the announcement noted that similar book bans in other districts - have been overturned in federal court. - source: ACLU Press Release - credibility: 0.95 - ambiguity: 0.3 - emotional_valence: 0.6 - exposure_rules: null - description: National civil liberties organization announces legal challenge -- timestep: 36 - event: - type: announcement - content: Local police confirmed they are investigating threats made against school - board members who voted for the book ban. Board president stated that several - members have received harassing phone calls and threatening emails from individuals - on both sides of the issue. The district has increased security at schools and - board meetings. The board president called for civility and respectful dialogue, - stating that threats and harassment have no place in community discourse regardless - of one's position on the book ban. - source: Local News Outlet - credibility: 0.9 - ambiguity: 0.3 - emotional_valence: -0.7 - exposure_rules: null - description: School board members receive threats, security concerns raised -- timestep: 48 - event: - type: announcement - content: In response to ongoing controversy and the pending lawsuit, the school - board has announced formation of a diverse review committee to reconsider the - book ban policy. The committee will include parents, teachers, librarians, students, - and community members representing different perspectives. Board members stated - they remain committed to age-appropriate content while also respecting intellectual - freedom. The committee will review each banned title individually and make recommendations - within 60 days. The announcement represents a potential compromise as tensions - in the community remain high. - source: Local School Board - credibility: 0.95 - ambiguity: 0.3 - emotional_valence: 0.2 - exposure_rules: null - description: School board announces review committee to reconsider decision -seed_exposure: - channels: - - name: district_email - description: Official email from school district to parents about the book ban - decision - reach: broadcast - credibility_modifier: 1.25 - experience_template: null - - name: local_news - description: Local news coverage of the school board decision on TV and newspaper - reach: broadcast - credibility_modifier: 1.1 - experience_template: null - - name: parent_network - description: Word of mouth and text messages spreading through parent networks - and PTA groups - reach: organic - credibility_modifier: 0.9 - experience_template: null - - name: social_media - description: Social media posts and discussions about the book ban on Facebook, - Twitter, and community groups - reach: targeted - credibility_modifier: 0.75 - experience_template: null - - name: school_board_meeting - description: Direct attendance or awareness from school board meeting where decision - was announced - reach: targeted - credibility_modifier: 1.3 - experience_template: null - rules: - - channel: school_board_meeting - when: school_board_engagement in ['very_active', 'active'] - probability: 1.0 - timestep: 0 - - channel: district_email - when: school_type == 'public' and pta_membership == True - probability: 0.95 - timestep: 0 - - channel: district_email - when: school_type == 'public' and pta_membership == False - probability: 0.75 - timestep: 0 - - channel: local_news - when: media_consumption_primary in ['local_news', 'cable_news', 'national_newspapers'] - probability: 0.85 - timestep: 1 - - channel: parent_network - when: social_network_density in ['very_high', 'high'] and pta_membership == True - probability: 0.9 - timestep: 1 - - channel: parent_network - when: social_network_density in ['moderate', 'low'] - probability: 0.6 - timestep: 2 - - channel: social_media - when: media_consumption_primary == 'social_media' and age < 50 - probability: 0.8 - timestep: 1 - - channel: social_media - when: media_consumption_primary == 'social_media' and age >= 50 - probability: 0.7 - timestep: 2 - - channel: social_media - when: community_involvement in ['high', 'medium'] - probability: 0.65 - timestep: 2 - - channel: local_news - when: media_consumption_primary == 'online_news' - probability: 0.7 - timestep: 2 -interaction: - primary_model: broadcast_response - secondary_model: direct_conversation - description: This is a controversial local school board announcement that directly - affects all parents in the population. The interaction begins with broadcast_response - as parents learn about the official school board decision and form initial reactions. - This quickly transitions to direct_conversation as parents discuss their opinions - with other parents through various social connections (PTA meetings, school pickups, - neighborhood conversations, etc.). The topic is highly emotionally charged and - personally relevant, prompting extensive discussion within parent networks. -spread: - share_probability: 0.65 - share_modifiers: - - when: pta_membership == True - multiply: 1.4 - add: 0.0 - - when: school_board_engagement == 'high' - multiply: 1.5 - add: 0.0 - - when: free_speech_absolutism == 'high' - multiply: 1.6 - add: 0.0 - - when: parental_control_preference == 'high' - multiply: 1.4 - add: 0.0 - - when: extraversion > 0.6 - multiply: 1.3 - add: 0.0 - - when: neuroticism > 0.6 - multiply: 1.2 - add: 0.05 - - when: edge_type == 'school_parent' - multiply: 1.6 - add: 0.0 - - when: edge_type == 'pta_colleague' - multiply: 1.7 - add: 0.0 - - when: edge_type == 'school_board_activist' - multiply: 1.8 - add: 0.0 - - when: edge_type == 'household' - multiply: 1.9 - add: 0.0 - - when: edge_type == 'neighbor' - multiply: 1.3 - add: 0.0 - - when: edge_type == 'political_ally' - multiply: 1.4 - add: 0.0 - - when: political_ideology == 'very_liberal' or political_ideology == 'very_conservative' - multiply: 1.3 - add: 0.0 - - when: community_involvement == 'high' - multiply: 1.3 - add: 0.0 - - when: library_usage_frequency == 'high' - multiply: 1.3 - add: 0.0 - - when: age_appropriateness_concern == 'high' - multiply: 1.25 - add: 0.0 - decay_per_hop: 0.08 - max_hops: 5 -outcomes: - suggested_outcomes: - - name: response_to_book_ban - type: categorical - description: How suburban homeowners with school-age children respond to the school - board's decision to ban books from district schools - options: - - actively_oppose_ban - - support_ban_publicly - - provide_banned_books_privately - - disengage_from_issue - range: null - required: true - option_friction: null - - name: sentiment - type: float - description: Overall sentiment toward the event (-1 very negative to 1 very positive) - options: null - range: - - -1.0 - - 1.0 - required: true - option_friction: null - capture_full_reasoning: true - extraction_instructions: null - decision_relevant_attributes: [] -simulation: - max_timesteps: 50 - timestep_unit: hour - stop_conditions: - - exposure_rate > 0.95 and no_state_changes_for > 10 - seed: null -background_context: The community is experiencing heightened political polarization - around education policy and parental rights. Recent national debates about curriculum - content and book censorship have intensified local activism on both sides of these - cultural issues. -relationship_weights: null diff --git a/test-v2-e2e/extended.yaml b/test-v2-e2e/extended.yaml deleted file mode 100644 index fc19631..0000000 --- a/test-v2-e2e/extended.yaml +++ /dev/null @@ -1,2931 +0,0 @@ -meta: - description: 10 US suburban homeowners with school-age children + Local school board - book ban decision - size: 10 - geography: US - agent_focus: suburban families with school-age children - created_at: '2026-02-15T23:12:13.154770' - version: '1.0' - persona_template: null - scenario_description: Local school board book ban decision - household_config: - age_brackets: - - - 25 - - 18-24 - - - 35 - - 25-34 - - - 45 - - 35-44 - - - 65 - - 45-64 - - - 999 - - 65+ - household_type_weights: - 18-24: - single: 0.28 - couple: 0.15 - single_parent: 0.14 - couple_with_kids: 0.15 - multi_generational: 0.28 - 25-34: - single: 0.19 - couple: 0.11 - single_parent: 0.19 - couple_with_kids: 0.38 - multi_generational: 0.13 - 35-44: - single: 0.1 - couple: 0.1 - single_parent: 0.18 - couple_with_kids: 0.52 - multi_generational: 0.1 - 45-64: - single: 0.26 - couple: 0.37 - single_parent: 0.06 - couple_with_kids: 0.21 - multi_generational: 0.1 - 65+: - single: 0.42 - couple: 0.44 - single_parent: 0.01 - couple_with_kids: 0.03 - multi_generational: 0.1 - same_group_rates: - white: 0.91 - black: 0.82 - hispanic: 0.75 - asian: 0.69 - default_same_group_rate: 0.8 - assortative_mating: - education_level: 0.65 - religious_affiliation: 0.7 - income_level: 0.58 - partner_age_gap_mean: 2.2 - partner_age_gap_std: 4.5 - min_adult_age: 18 - child_min_parent_offset: 18 - child_max_parent_offset: 45 - max_dependent_child_age: 18 - elderly_min_offset: 20 - elderly_max_offset: 50 - life_stages: - - max_age: 5 - label: preschool - - max_age: 11 - label: elementary - - max_age: 14 - label: middle_school - - max_age: 18 - label: high_school - adult_stage_label: adult - avg_household_size: 3.2 - name_config: null -grounding: - overall: medium - sources_count: 308 - strong_count: 17 - medium_count: 25 - low_count: 6 - sources: - - https://www.pewresearch.org/religion/2025/02/26/religion-and-views-on-lgbtq-issues-and-abortion/ - - https://www.dol.gov/agencies/wb/data/family-status - - https://fivethirtyeight.com/features/how-suburban-are-big-american-cities/ - - https://nces.ed.gov/programs/edge/Demographic/ACSchildren - - https://www.census.gov/library/stories/2018/07/interracial-marriages.html - - https://www.jstor.org/stable/10.1086/661778 - - https://scholarsarchive.byu.edu/cgi/viewcontent.cgi?article=3571&context=etd - - https://worldpopulationreview.com/state-rankings/median-home-price-by-state - - https://ourpublicservice.org/publications/state-of-trust-in-government-2024/ - - https://www.bls.gov/news.release/famee.nr0.htm - - https://worldpopulationreview.com/state-rankings/average-household-size-by-state - - https://academic.oup.com/pnasnexus/article/3/6/pgae197/7689238 - - https://www.jstor.org/stable/2095670 - - https://fred.stlouisfed.org/series/PAYEMS - - https://nces.ed.gov/surveys/frss/publications/96913/index.asp?sectionid=2 - - https://www.nar.realtor/research-and-statistics/housing-statistics/metropolitan-median-area-prices-and-affordability - - https://www.census.gov/data/tables/time-series/demo/families/families.html - - https://www.tandfonline.com/doi/full/10.1080/03004430.2025.2524637 - - https://www.census.gov/library/stories/2022/07/marriage-prevalence-for-black-adults-varies-by-state.html - - https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/ - - https://www.pewresearch.org/religion/2022/09/13/how-u-s-religious-composition-has-changed-in-recent-decades/ - - https://pen.org/memo-on-school-book-bans-2023-2024-school-year/ - - https://realestate.usnews.com/home-services/moving/median-home-prices-state - - https://www.cnbc.com/2026/02/11/jobs-report-january-2026-.html - - https://datacenter.kidscount.org/data/tables/101-child-population-by-age-group - - https://raleighrealty.com/blog/average-homeownership-length - - https://corridorbusiness.com/study-college-graduates-more-likely-to-own-their-own-home/ - - https://datacenter.aecf.org/data/tables/9450-public-library-usage - - https://www.bls.gov/news.release/pdf/empsit.pdf - - https://www.nmhc.org/research-insight/quick-facts-figures/quick-facts-resident-demographics/households-with-children/ - - https://pacificlegal.org/for-some-school-boards-parents-are-the-enemy/ - - https://pmc.ncbi.nlm.nih.gov/articles/PMC4850739/ - - https://pmc.ncbi.nlm.nih.gov/articles/PMC6927670/ - - https://www.aclu-wa.org/docs/guide-school-board-advocacy-washington - - https://www.lendingtree.com/home/mortgage/u-s-mortgage-market-statistics/ - - https://www.census.gov/content/dam/Census/library/publications/2022/demo/p70-174.pdf - - https://www.pewresearch.org/internet/2016/09/09/library-usage-and-engagement/ - - https://www.rubyhome.com/blog/average-length-homeownership/ - - https://www.childstats.gov/americaschildren23/family1.asp - - https://pubmed.ncbi.nlm.nih.gov/27818530/ - - https://www.statista.com/topics/12130/k-12-education-in-the-united-states/ - - https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html - - https://www.everylibraryinstitute.org/demographics_of_book_bans - - https://www.pewresearch.org/short-reads/2025/08/28/how-the-audiences-of-30-major-news-sources-differ-by-age/ - - https://www.statista.com/statistics/679812/number-of-households-with-children-by-age/ - - https://www.consumeraffairs.com/finance/what-is-the-average-length-of-home-ownership.html - - https://www.urban.org/urban-wire/homeownership-has-fallen-further-out-reach-younger-families-lowest-incomes - - https://www.demandsage.com/average-us-income/ - - https://www.bls.gov/news.release/pdf/famee.pdf - - https://www.editorandpublisher.com/stories/how-the-audiences-of-30-major-news-sources-differ-by-age,257491 - - https://action.everylibrary.org/what_do_people_really_think_about_book_bans - - https://en.wikipedia.org/wiki/Age_disparity_in_sexual_relationships - - https://prri.org/research/lgbtq-rights-across-all-50-states-key-insights-2024-prri-american-values-atlas/ - - https://www.bls.gov/careeroutlook/2017/article/projections-laborforce.htm - - https://www.schoolstatus.com/blog/new-k-12-attendance-data-2024-25 - - https://pmc.ncbi.nlm.nih.gov/articles/PMC12545191/ - - https://www.bls.gov/opub/ted/2012/ted_20120427.htm - - http://blogs.edweek.org/edweek/parentsandthepublic/2013/09/national_survey_examines_parent_engagement_in_education.html - - https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A - - https://nces.ed.gov/programs/coe/indicator/cba - - https://www.census.gov/data/tables/2022/demo/families/cps-2022.html - - https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/ - - https://www.bls.gov/news.release/empsit.nr0.htm - - https://www.clasp.org/sites/default/files/public/resources-and-publications/states/0086.pdf - - https://datacenter.aecf.org/data/tables/4404-income--median-earnings-for-population-age-25-and-over-by-educational-attainment - - https://prri.org/research/2020-census-of-american-religion/ - - https://www.aamchealthjustice.org/news/polling/trust-trends - - https://www.pewresearch.org/short-reads/2022/08/30/more-so-than-adults-u-s-teens-value-people-feeling-safe-online-over-being-able-to-speak-freely/ - - https://www.stanmor.com/blog/the-numbers-behind-homeowners-exploring-homeownership-statistics - - https://www.hrc.org/news/parental-rights-and-involvement-in-students-reading-lives - - https://bookriot.com/book-censorship-trends-2025/ - - https://www2.census.gov/library/publications/2024/demo/p20-587.pdf - - https://www.newyorkfed.org/research/staff_reports/sr682.html - - https://www.quora.com/How-many-U-S-households-have-children-between-the-ages-of-3-and-10 - - https://www.pewresearch.org/internet/2013/05/01/parents-children-libraries-and-reading-3/ - - https://www.census.gov/library/publications/2025/demo/p70-204.html - - https://www.census.gov/data/tables/time-series/demo/income-poverty/cps-hinc/hinc-04.html - - https://www.census.gov/newsroom/press-releases/2022/americas-families-and-living-arrangements.html - - https://www.financialsamurai.com/the-median-homeownership-duration-is-too-short-to-build-real-wealth/ - - https://www.themortgagenote.org/more-americans-are-mortgage-free-homeowners/ - - https://www.edweek.org/leadership/does-parent-involvement-really-help-students-heres-what-the-research-says/2023/07 - - https://www.census.gov/data/tables/2019/demo/families/cps-2019.html - - https://datacenter.aecf.org/data/tables/101-child-population-by-age-group - - https://www.census.gov/library/stories/2023/08/same-sex-married-couples-age-race-ethnicity.html - - https://defendinged.org/resources/its-time-to-get-involved-in-your-school-board/ - - https://www.pewresearch.org/internet/2015/09/15/who-uses-libraries-and-what-they-do-at-their-libraries/ - - https://pen.org/report/the-normalization-of-book-banning/ - - https://www.statista.com/statistics/242028/number-of-married-couples-in-the-us-by-ethnic-group-and-combination/ - - https://statmodeling.stat.columbia.edu/2024/07/31/age-gap-between-spouses/ - - https://nces.ed.gov/fastfacts/display.asp?id=372 - - https://www.momsrising.org/blog/moral-panic-at-the-school-board-meeting - - https://nces.ed.gov/forum/attendanceguide_chapter4.asp - - https://nces.ed.gov/programs/edge/Demographic/ACS - - https://www.bls.gov/opub/mlr/2026/article/industry-and-occupational-employment-projections-overview.htm - - https://www.ipsos.com/en-us/news-polls/Knight-Ipsos-free-expression-2022 - - https://www.linkedin.com/posts/jacklynmonk_how-the-audiences-of-30-major-news-sources-activity-7394873822132477953-cgOz - - https://files.eric.ed.gov/fulltext/ED496346.pdf - - https://www.census.gov/data/tables/time-series/demo/income-poverty/cps-hinc.html - - https://www.census.gov/data/tables/2020/demo/families/cps-2020.html - - https://www.census.gov/newsroom/press-releases/2025/acs-1-year-estimates.html - - https://www.ala.org/Template.cfm?Section=libraryfactsheet&Template=/ContentManagement/ContentDisplay.cfm&ContentID=147681 - - https://www.bls.gov/opub/ted/2017/employment-in-families-with-children-in-2016.htm - - https://futurefreespeech.org/the-conversation-from-defenders-to-skeptics-the-sharp-decline-in-young-americans-support-for-free-speech/ - - https://time.com/6215119/parents-rights-education-gone-too-far/ - - https://www.statista.com/statistics/234057/us-confidence-in-business-public-institutions-and-organizations/ - - https://pmc.ncbi.nlm.nih.gov/articles/PMC8907492/ - - https://www.census.gov/library/stories/2022/11/homeownership-by-young-households-below-pre-great-recession-levels.html - - https://www.thefire.org/research/publications/student-surveys/student-attitudes-free-speech-survey/student-attitudes-free-speech-survey-full-text/ - - https://www.pewresearch.org/politics/2024/04/09/age-generational-cohorts-and-party-identification/ - - https://www.usreligioncensus.org/ - - https://www.journals.uchicago.edu/doi/10.1086/383101 - - https://www.prb.org/resources/most-americans-marry-within-their-race/ - - https://genforwardsurvey.com/2024/10/02/where-are-young-people-getting-their-news-and-political-media/ - - https://fivethirtyeight.com/features/whats-the-average-age-difference-in-a-couple/ - - https://www.pewresearch.org/internet/2013/05/01/part-5-parents-children-and-libraries/ - - https://www.pewresearch.org/journalism/2025/12/03/young-adults-and-the-future-of-news/ - - https://prri.org/research/census-2023-american-religion/ - - https://fred.stlouisfed.org/series/CXU980230LB1409M - - https://www.pewresearch.org/short-reads/2023/05/10/most-us-parents-pass-along-their-religion-and-politics-to-their-children/ - - https://www.pewresearch.org/topic/religion/religion-social-values/religion-lgbtq-acceptance/ - - https://www.census.gov/data/tables/time-series/demo/income-poverty/cps-hinc/hinc-02.html - - https://www.aecf.org/blog/parental-involvement-is-key-to-student-success-research-shows - - https://pmc.ncbi.nlm.nih.gov/articles/PMC11165646/ - - https://ipropertymanagement.com/research/homeownership-rate-by-age - - https://nces.ed.gov/programs/digest/d18/tables/dt18_101.40.asp - - https://www.sciencedirect.com/science/article/abs/pii/S0743016721003259 - - https://www.visualcapitalist.com/mapped-how-much-of-each-u-s-states-population-lives-in-cities/ - - https://www.ala.org/tools/libfactsheets/alalibraryfactsheet06 - - https://www.amacad.org/humanities-indicators/public-life/use-public-libraries - - https://www.scotsmanguide.com/news/homeowners-are-staying-put-for-an-average-of-nearly-12-years/ - - https://www.nar.realtor/blogs/economists-outlook/how-education-is-shaping-homeownership-trends - - https://www.census.gov/data/tables/time-series/demo/families/households.html - - https://www.rubyhome.com/blog/homeowners-vs-renters-stats/ - - https://www.nationalaffairs.com/publications/detail/restoring-trust-in-public-schools - - https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/ - - https://www2.census.gov/ces/wp/2024/CES-WP-24-30.pdf - - https://aspe.hhs.gov/sites/default/files/private/pdf/172181/pf2.pdf - - https://news.gallup.com/poll/508169/historically-low-faith-institutions-continues.aspx - - https://cnsmaryland.org/2024/10/21/support-for-book-bans-varies-in-maryland-school-board-races/ - - https://www.census.gov/topics/families/families-and-households.html - - https://www.the74million.org/article/attendance-gap-new-data-from-minnesota-reveals-chasm-in-chronic-absenteeism/ - - https://www.statista.com/statistics/985183/size-urban-rural-population-us/ - - https://www.imls.gov/research-evaluation/surveys/public-libraries-survey-pls - - https://fred.stlouisfed.org/release/tables?eid=1138280&rid=462 - - https://www.icip.iastate.edu/tables/population/urban-pct-states - - https://www.nber.org/digest/may14/assortative-mating-and-income-inequality - - https://zipdo.co/parent-involvement-statistics/ - - https://www.thezebra.com/resources/home/average-length-of-homeownership/ - - https://premiertucsonhomes.com/tucson-home-values/ - - https://pmc.ncbi.nlm.nih.gov/articles/PMC4183451/ - - https://pubmed.ncbi.nlm.nih.gov/36165033/ - - https://dx.doi.org/10.1086/661778 - - https://nces.ed.gov/programs/digest/d21/tables/dt21_102.10.asp - - https://www.thefire.org/research-learn/2025-college-free-speech-rankings - - https://projects.propublica.org/school-board-meetings-flashpoints-for-anger-chaos/ - - https://www.chiccousa.com/baby-talk/cities-with-the-most-family-growth-over-time/ - - https://www.fastcompany.com/91429491/housing-market-mortgage-free-40-of-u-s-home-owners-why-the-number-keeps-growing - - https://ncac.org/resource/book-challenge-resource-center - - https://www.census.gov/data/tables/2016/demo/families/cps-2016.html - - https://www.sltrib.com/opinion/commentary/2024/04/05/opinion-parents-should-have-say/ - - https://www.everylibraryinstitute.org/parent_perception_school_libraries_2023 - - https://www.childstats.gov/americaschildren/tables.asp - - https://fred.stlouisfed.org/series/MSPUS - - https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf - - https://usahello.org/education/children/grade-levels/ - - https://rossier.usc.edu/news-insights/news/2025/november/why-americans-stopped-believing-promise-higher-education - - https://americanpressinstitute.org/the-news-consumption-habits-of-16-to-40-year-olds/ - - https://www.pewresearch.org/journalism/2024/10/10/where-americans-turn-for-election-news/ - - https://www.nationofchange.org/2025/05/08/texas-voters-reject-far-right-school-boards-in-sweeping-backlash-to-book-bans/ - - https://www.studycountry.com/wiki/what-percent-of-americans-live-in-suburbs - - https://www.understood.org/en/articles/5-tips-for-parents-about-school-board-advocacy - - https://compass.onlinelibrary.wiley.com/doi/10.1111/spc3.12337 - - https://finance.yahoo.com/personal-finance/mortgages/article/median-home-price-by-state-151223005.html - - https://www.pewresearch.org/politics/2024/04/09/partisanship-in-rural-suburban-and-urban-communities/ - - https://www.census.gov/newsroom/facts-for-features/2015/cb15-ff17.html - - https://www.ipsos.com/en-us/we-believe-education-poll-2023 - - https://www.schoolstatus.com/blog/attendance-trends-report-2025 - - https://royalsocietypublishing.org/rsbl/article/17/11/20210463/62849/Why-do-we-pick-similar-mates-or-do-we-Why-do-we - - https://www.census.gov/topics/families/families-and-households/data/tables.html - - https://www.pewresearch.org/politics/2017/10/05/5-homosexuality-gender-and-religion/ - - https://www.flexjobs.com/blog/post/stats-about-working-parents-us - - https://eyeonhousing.org/2024/10/mortgage-free-homeowners-by-congressional-districts/ - - https://prri.org/spotlight/prri-2022-american-values-atlas-religious-affiliation-updates-and-trends/ - - https://nces.ed.gov/programs/digest/d09/tables/dt09_019.asp - - https://www.census.gov/library/visualizations/interactive/parents-living-arrangements.html - - https://pmc.ncbi.nlm.nih.gov/articles/PMC3000020/ - - https://wordinblack.com/2024/10/concerned-about-democracy-2024-school-board-key/ - - https://www.chalkbeat.org/2024/08/21/book-bans-unpopular-but-age-based-limits-legitimate-knight-survey-finds/ - - https://www.journals.uchicago.edu/doi/10.1086/702018 - - https://www.cato.org/survey-reports/state-free-speech-tolerance-america - - https://bjs.ojp.gov/content/pub/pdf/cusrancvs.pdf - - https://pen.org/book-bans/pen-america-index-of-school-book-bans-2024-2025/ - - https://www.goodreads.com/book/show/144734724-school-moms - - https://www.hiringlab.org/2026/02/11/january-2026-jobs-report/ - - https://americas.uli.org/suburbs-demographics-report/ - - https://www.zillow.com/home-values/102001/united-states/ - - https://eduww.net/parent-resources/school-age-grade-levels/ - - https://www.pewresearch.org/short-reads/2023/08/03/almost-1-in-5-stay-at-home-parents-in-the-us-are-dads/ - - https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States - - https://www.statista.com/statistics/242189/disitribution-of-households-in-the-us-by-household-size/ - - https://firstamendment.mtsu.edu/post/school-mom-traces-development-of-book-bans/ - - https://eyeonhousing.org/2017/02/the-average-number-of-school-age-children-per-home/ - - https://flowingdata.com/2024/03/13/common-age-differences-married-couples/ - - https://www.ssa.gov/policy/docs/ssb/v4n11/v4n11p8.pdf - - https://www.pewresearch.org/politics/2024/04/09/partisanship-by-gender-sexual-orientation-marital-and-parental-status/ - - https://www.bls.gov/news.release/famee.t04.htm - - https://ipropertymanagement.com/research/average-length-of-homeownership - - https://prri.org/research/findings-from-the-2022-american-values-atlas/ - - https://nces.ed.gov/programs/digest/d09/tables/dt09_017.asp - - https://theconversation.com/from-defenders-to-skeptics-the-sharp-decline-in-young-americans-support-for-free-speech-254953 - - https://nces.ed.gov/programs/coe/indicator/cce/family-characteristics - - https://www.statista.com/statistics/717651/most-popular-news-platforms/ - - https://pmc.ncbi.nlm.nih.gov/articles/PMC5130094/ - - https://www.census.gov/library/publications/2024/demo/p20-587.pdf - - https://www.bls.gov/opub/mlr/2013/article/marriage-and-divorce-patterns-by-gender-race-and-educational-attainment.htm - - https://www.statista.com/statistics/457786/number-of-children-in-the-us-by-age/ - - https://www.census.gov/library/stories/2021/04/number-of-children-living-only-with-their-mothers-has-doubled-in-past-50-years.html - - https://www.everylibraryinstitute.org/review_recent_book_ban_polls-25 - - https://worldpopulationreview.com/state-rankings/median-household-income-by-state - - https://prri.org/research/views-on-lgbtq-rights-in-all-50-states/ - - https://www.pewresearch.org/global/2020/06/25/global-divide-on-homosexuality-persists/ - - https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/ - - https://www.edweek.org/leadership/parents-trust-school-librarians-to-select-books-but-theres-a-catch/2024/01 - - https://apnorc.org/wp-content/uploads/2020/02/MTV-AP-NORC-Comparing-the-Political-Views-of-Young-People-and-Their-Parents-Generation.pdf - - https://www.bls.gov/emp/ - - https://cloakinginequity.com/2025/04/13/moms-for-liberty-the-new-face-of-authoritarianism-in-americas-classrooms/ - - https://en.wikipedia.org/wiki/Household_income_in_the_United_States - - https://www.washingtonpost.com/news/fact-checker/wp/2018/04/12/do-40-percent-of-young-americans-think-free-speech-is-dangerous/ - - https://www.census.gov/data/tables/2023/demo/families/cps-2023.html - - https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/ - - https://www.synerahomes.com/blog/st-louis-suburbs-homes-prices-trends-and-top-neighborhoods-for-2026 - - https://www.huduser.gov/portal/pdredge/pdr-edge-housingat250-article-071025.html - - https://knightfoundation.org/reports/americans-views-on-book-restrictions-in-u-s-public-schools-2024/ - - https://pubmed.ncbi.nlm.nih.gov/38864005/ - - https://www.sciencedirect.com/science/article/abs/pii/S0160289616301854 - - https://www.pewresearch.org/religious-landscape-study/ - - http://censusreporter.org/profiles/01000US-united-states/ - - https://onlinelibrary.wiley.com/doi/10.1111/manc.12421 - - https://www.edchoice.org/new-polling-reveals-parents-trust-teachers-on-education-more-than-state-legislatures/ - - https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2017.01448/full - - https://www.milbank.org/wp-content/uploads/mq/volume-43/issue-02/43-2-part-1-Trends-and-Differentials-in-the-American-Age-at-Marriage.pdf - - https://news.gallup.com/poll/692519/public-trust-higher-rises-recent-low.aspx - - https://www.nea.org/nea-today/all-news-articles/book-bans-are-common-and-rampant-so-are-educators-and-parents-fighting-them - - https://www.pewresearch.org/religion/2020/09/10/religious-affiliation-among-american-adolescents/ - - https://www.migrationpolicy.org/sites/default/files/publications/mpi_nciip_parents-children-0-4-and-5-10-us-2021_final.pdf - - https://adpemploymentreport.com/ - - https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html - - https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/ - - https://www.statista.com/chart/5067/main-news-source-by-generation/ - - https://www.census.gov/library/stories/2024/11/family-households.html - - https://news.gallup.com/poll/14515/teens-stay-true-parents-political-perspectives.aspx - - https://pmc.ncbi.nlm.nih.gov/articles/PMC5089166/ - - https://www.redfin.com/news/homeowner-tenure-2022/ - - https://www.statista.com/statistics/742225/frequency-of-watching-cable-news-in-the-us-age/ - - https://en.wikipedia.org/wiki/Homeownership_in_the_United_States - - https://divinity.uchicago.edu/sightings/articles/banning-books-banning-brains - - https://www.bls.gov/ces/ - - https://www.americansurveycenter.org/research/generation-z-future-of-faith/ - - https://www.census.gov/library/stories/2025/09/education-and-income.html - - https://www.pew.org/en/trend/archive/fall-2024/americans-deepening-mistrust-of-institutions - - https://www.floridarealtors.org/news-media/news-articles/2025/06/how-education-shaping-homeownership - - https://www.lincolnvitalsigns.org/economy-and-workforce/median-earnings-by-education/ - - https://www.tandfonline.com/doi/full/10.1080/15140326.2024.2327909 - - https://news.gallup.com/poll/656708/lgbtq-identification-rises.aspx - - https://nces.ed.gov/programs/coe/pdf/Indicator_CCE/coe_cce_2016_05.pdf - - https://dqydj.com/income-by-education/ - - https://www.kff.org/health-information-trust/kff-tracking-poll-on-health-information-and-trust-january-2025/ - - https://www.redfin.com/us-housing-market - - https://www.point2homes.com/news/us-real-estate-news/homeownership-by-education-us.html - - https://nationalmortgageprofessional.com/news/nine-tenths-million-paid-their-home-loans-2024 - - https://www.census.gov/newsroom/press-releases/2026/acs-5-year-gains-educational-attainment.html - - https://www.planning.org/pas/reports/report210.htm - - https://www.americanprogress.org/article/one-size-not-fit/ - - https://populationeducation.org/resource/historic-average-number-of-children-per-u-s-family-infographic/ - - https://magicdoor.com/blog/us-renter-and-homeowner-statistics/ - - https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/ - - https://knightfoundation.org/wp-content/uploads/2022/01/KF_Free_Expression_2022.pdf - - https://nowbam.com/over-40-of-u-s-homeowners-are-mortgage-free/ - - https://www.rismedia.com/2022/04/18/homeownership-education-dgree-holding-owners-sugre-those-without-high-school-drop-30/ - - https://www.parealtors.org/blog/college-grads-more-likely-to-be-homeowners/ - - https://www.census.gov/library/visualizations/interactive/family-households-by-age-of-householder-2024.html - - https://nces.ed.gov/pubs/97446.pdf - - https://religionnews.com/2024/03/12/poll-shows-slight-dip-in-us-support-for-lgbtq-rights-across-religious-groups/ - - https://www.census.gov/topics/families.html - - https://www.psychologytoday.com/us/blog/the-asymmetric-brain/202510/what-is-the-average-age-gap-in-relationships-worldwide - - https://files.eric.ed.gov/fulltext/ED541603.pdf - - https://www.federalreserve.gov/publications/2025-economic-well-being-of-us-households-in-2024-housing.htm - - https://ofm.wa.gov/washington-data-research/statewide-data/washington-trends/budget-drivers/kindergarten-through-grade-12-k-12-enrollment - - https://knightfoundation.org/press/releases/free-speech-for-all-poll-reveals-americans-views-on-free-expression-post-2020/ - - https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/ - - https://www.kidsdata.org/topic/557/children-rural-urban/pie - - https://www.urban.org/sites/default/files/publication/98729/millennial_homeownership_0.pdf - - https://nces.ed.gov/programs/raceindicators/indicator_rac.asp - - https://constructioncoverage.com/research/where-residents-have-paid-off-homes - - https://www.census.gov/content/dam/Census/library/working-papers/2023/demo/sehsd-wp2023-10.pdf - - https://scholarship.depauw.edu/cgi/viewcontent.cgi?article=1225&context=studentresearch - - https://www.childstats.gov/americaschildren/tables/pop1.asp - - https://en.wikipedia.org/wiki/Religion_in_the_United_States - - https://www.pewresearch.org/social-trends/2025/05/29/the-experiences-of-lgbtq-americans-today/ - - https://www.demographic-research.org/volumes/vol49/28/49-28.pdf - - https://www.pewresearch.org/religion/2025/02/26/age-race-education-and-other-demographic-traits-of-us-religious-groups/ - - https://www.huduser.gov/portal/pdredge/pdr-edge-frm-asst-sec-080320.html - - https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/ - - https://www.housingwire.com/articles/homeowners-are-staying-in-place-twice-as-long-as-they-did-20-years-ago-redfin/ - - https://www.axios.com/2025/11/16/mortgage-free-homes-map - - https://www.psychologytoday.com/us/blog/the-asymmetric-brain/202510/age-gaps-in-relationships-7-scientific-facts - - https://www.bls.gov/news.release/famee.htm - - https://www.nature.com/articles/s41598-017-15864-x -attributes: -- name: age - type: int - category: universal - description: Age of the individual in years - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 42.0 - std: 7.0 - min: 25.0 - max: 65.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://nces.ed.gov/programs/coe/pdf/Indicator_CCE/coe_cce_2016_05.pdf - note: Extrapolated from data showing parents of school-age children (5-17) tend - to be in their late 30s to mid-40s. Suburban homeowners tend to be slightly - older than average parents. - constraints: - - type: hard_min - value: 25.0 - expression: null - reason: Minimum realistic age for parent with school-age children - - type: hard_max - value: 65.0 - expression: null - reason: Maximum typical age for parent with K-12 children -- name: gender - type: categorical - category: universal - description: Gender identity of the individual - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - male - - female - weights: - - 0.48 - - 0.52 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/library/stories/2024/11/family-households.html - note: General US population gender distribution, slightly more females in household - reference persons - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: state - type: categorical - category: universal - description: US state where the household is located - scope: household - sampling: - strategy: independent - distribution: - type: categorical - options: - - CA - - TX - - FL - - NY - - PA - - IL - - OH - - GA - - NC - - MI - - NJ - - VA - - WA - - AZ - - MA - - TN - - IN - - MO - - MD - - WI - - CO - - MN - - SC - - AL - - LA - - KY - - OR - - OK - - CT - - UT - - IA - - NV - - AR - - MS - - KS - - NM - - NE - - ID - - WV - - HI - - NH - - ME - - MT - - RI - - DE - - SD - - ND - - AK - - VT - - WY - weights: - - 0.118 - - 0.088 - - 0.065 - - 0.059 - - 0.039 - - 0.038 - - 0.035 - - 0.032 - - 0.032 - - 0.03 - - 0.027 - - 0.026 - - 0.023 - - 0.022 - - 0.021 - - 0.021 - - 0.02 - - 0.019 - - 0.018 - - 0.018 - - 0.017 - - 0.017 - - 0.016 - - 0.015 - - 0.014 - - 0.013 - - 0.013 - - 0.012 - - 0.011 - - 0.01 - - 0.01 - - 0.009 - - 0.009 - - 0.009 - - 0.008 - - 0.006 - - 0.006 - - 0.005 - - 0.004 - - 0.004 - - 0.004 - - 0.003 - - 0.003 - - 0.003 - - 0.003 - - 0.002 - - 0.002 - - 0.002 - - 0.002 - - 0.002 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/data/tables/time-series/demo/families/households.html - note: Based on US population distribution by state from Census data - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: urban_rural - type: categorical - category: universal - description: Whether the household is in a suburban area (all suburban for this - population) - scope: household - sampling: - strategy: independent - distribution: - type: categorical - options: - - suburban - weights: - - 1.0 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://en.wikipedia.org/wiki/Homeownership_in_the_United_States - note: All agents in this population are suburban by specification. Three quarters - of suburban households are homeowners. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: education_level - type: categorical - category: universal - description: Highest level of education completed (high school, associate, bachelor, - graduate) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - high_school - - associate - - bachelor - - graduate - weights: - - 0.15 - - 0.25 - - 0.4 - - 0.2 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.point2homes.com/news/us-real-estate-news/homeownership-by-education-us.html - note: 'Based on homeowner education distribution: 70% have some college or more, - with bachelor''s degree holders at 40%. Suburban homeowners skew higher education - than general population.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: marital_status - type: categorical - category: universal - description: Marital status of the individual (married, divorced, single, widowed) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - married - - divorced - - single - - widowed - weights: - - 0.75 - - 0.15 - - 0.08 - - 0.02 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://www.stanmor.com/blog/the-numbers-behind-homeowners-exploring-homeownership-statistics - note: Married couples have highest homeownership rates. Among families with school-age - children, married couples dominate, especially in suburban homeownership. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: household_size - type: int - category: universal - description: Total number of people living in the household - scope: household - sampling: - strategy: independent - distribution: - type: normal - mean: 4.2 - std: 0.9 - min: 2.0 - max: 8.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/ - note: Average US household with children is larger than overall average (2.61). - Families with school-age children typically have 3-5 members. - constraints: - - type: hard_min - value: 2.0 - expression: null - reason: Minimum household size (parent + child) - - type: hard_max - value: 8.0 - expression: null - reason: Maximum typical household size - - type: expression - value: null - expression: num_children <= household_size - 1 - reason: At least one adult must be present with children -- name: employment_status - type: categorical - category: universal - description: Current employment status (full-time, part-time, self-employed, unemployed) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - full_time - - part_time - - self_employed - - unemployed - weights: - - 0.72 - - 0.12 - - 0.12 - - 0.04 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.bls.gov/news.release/famee.nr0.htm - note: Based on BLS Employment Characteristics of Families 2024 data. Parents with - children have high labor force participation, with most employed full-time. - Homeownership requires stable income. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: num_children - type: int - category: population_specific - description: Number of school-age children (K-12) in the household - scope: household - sampling: - strategy: independent - distribution: - type: normal - mean: 2.1 - std: 0.8 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/library/stories/2024/11/family-households.html - note: Census data shows 19% of family households have 1 child under 18, 16% have - 2, and 9% have 3+. Average births per woman is 1.7, but families with school-age - children tend toward 2. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Population specified as having school-age children - - type: hard_max - value: 5.0 - expression: null - reason: Maximum typical number of school-age children - - type: expression - value: null - expression: num_children <= household_size - 1 - reason: Number of children cannot exceed household size minus adults -- name: community_involvement - type: categorical - category: population_specific - description: Level of involvement in community/neighborhood activities (high, medium, - low, none) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - high - - medium - - low - - none - weights: - - 0.25 - - 0.4 - - 0.25 - - 0.1 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: low - method: estimated - source: null - note: No specific data found for suburban parents' community involvement. Estimated - based on assumption that suburban homeowners with children have moderate to - high engagement in schools and community activities. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: openness - type: float - category: personality - description: Big Five trait reflecting openness to experience and intellectual curiosity - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.5 - std: 0.7 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Based on Big Five personality trait research showing general population - mean around 3.5 on 5-point scale. Suburban homeowners may be slightly more conventional, - but kept at population mean. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: conscientiousness - type: float - category: personality - description: Big Five trait reflecting organization, dependability, and self-discipline - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.8 - std: 0.6 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Homeownership and parenting typically correlate with higher conscientiousness. - Set slightly above population mean (3.5) to reflect responsibility and organization - required for homeownership. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: extraversion - type: float - category: personality - description: Big Five trait reflecting sociability, assertiveness, and energy level - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.4 - std: 0.75 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Based on Big Five population norms. Suburban parents show normal distribution - of extraversion, kept near population mean of 3.4-3.5. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: agreeableness - type: float - category: personality - description: Big Five trait reflecting compassion, cooperativeness, and trust in - others - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.7 - std: 0.65 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Parents and community-oriented individuals tend to score slightly higher - on agreeableness. Set above population mean (3.5) to reflect cooperative nature - of parenting and suburban community living. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: neuroticism - type: float - category: personality - description: Big Five trait reflecting emotional stability and tendency toward anxiety - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.0 - std: 0.75 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Based on Big Five population norms around 3.0-3.2. Homeowners with stable - employment may have slightly lower neuroticism, but kept near population mean - for realism. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: risk_tolerance - type: categorical - category: personality - description: Individual's tolerance for financial and lifestyle risk (low, medium, - high) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - low - - medium - - high - weights: - - 0.35 - - 0.5 - - 0.15 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: low - method: estimated - source: null - note: Estimated based on assumption that suburban homeowners with children tend - toward conservative financial approaches (mortgage, stable neighborhood) but - with normal variation. Skewed toward low-medium risk tolerance. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: education_priority - type: categorical - category: personality - description: How highly the individual prioritizes children's education (low, medium, - high) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - low - - medium - - high - weights: - - 0.05 - - 0.3 - - 0.65 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://nces.ed.gov/programs/coe/pdf/Indicator_CCE/coe_cce_2016_05.pdf - note: Suburban homeowners specifically choose neighborhoods for schools. This - population likely has high education priority given their investment in stable - housing and school districts. Strongly skewed toward high priority. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: environmental_consciousness - type: categorical - category: personality - description: Level of concern for environmental issues and sustainability (low, - medium, high) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - low - - medium - - high - weights: - - 0.25 - - 0.5 - - 0.25 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: low - method: estimated - source: null - note: No specific data found for this population. Estimated with normal distribution - across levels, assuming typical variation in environmental consciousness among - suburban homeowners. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: occupation_category - type: categorical - category: universal - description: General occupational category (professional, management, service, trades, - etc.) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - professional - - management - - service - - sales - - trades - - administrative - weights: - - 0.35 - - 0.25 - - 0.12 - - 0.13 - - 0.1 - - 0.05 - formula: null - depends_on: - - employment_status - modifiers: - - when: employment_status == 'full_time' - multiply: null - add: null - weight_overrides: - professional: 0.35 - management: 0.25 - service: 0.1 - sales: 0.15 - trades: 0.1 - administrative: 0.05 - probability_override: null - - when: employment_status == 'part_time' - multiply: null - add: null - weight_overrides: - professional: 0.2 - management: 0.1 - service: 0.3 - sales: 0.2 - trades: 0.05 - administrative: 0.15 - probability_override: null - - when: employment_status == 'self_employed' - multiply: null - add: null - weight_overrides: - professional: 0.3 - management: 0.2 - service: 0.15 - sales: 0.15 - trades: 0.15 - administrative: 0.05 - probability_override: null - - when: employment_status == 'unemployed' - multiply: null - add: null - weight_overrides: - professional: 0.2 - management: 0.15 - service: 0.25 - sales: 0.15 - trades: 0.15 - administrative: 0.1 - probability_override: null - grounding: - level: medium - method: researched - source: BLS Employment Projections 2024-34 and occupational distribution data - note: Professional and management roles dominate suburban homeowner demographics - with school-age children. Distribution reflects higher education levels (high - school to graduate degrees) and full employment status typical of this population. - constraints: [] -- name: individual_income - type: int - category: universal - description: Annual individual income in USD before taxes - scope: individual - sampling: - strategy: conditional - distribution: - type: normal - mean: 75000.0 - std: 28000.0 - min: 25000.0 - max: 250000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - occupation_category - - education_level - modifiers: - - when: occupation_category == 'professional' and education_level == 'graduate' - multiply: 1.4 - add: 15000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'professional' and education_level == 'bachelor' - multiply: 1.2 - add: 5000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'management' and education_level == 'graduate' - multiply: 1.5 - add: 20000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'management' and education_level == 'bachelor' - multiply: 1.3 - add: 10000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'service' - multiply: 0.6 - add: -15000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'sales' and education_level == 'bachelor' - multiply: 1.0 - add: 0.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'trades' - multiply: 0.85 - add: -5000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'administrative' - multiply: 0.7 - add: -10000.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Census Bureau 2024 data and DQYDJ income by education statistics - note: Median individual income $53,010 nationally in 2024, but suburban homeowners - with children skew higher. Base distribution centered at $75k reflects education - mix (high school to graduate) and professional/management occupations dominant - in this population. - constraints: - - type: hard_min - value: 25000.0 - expression: null - reason: Minimum income for employed individuals in this demographic - - type: hard_max - value: 250000.0 - expression: null - reason: Upper bound for individual income before extreme outliers -- name: household_income - type: int - category: universal - description: Total annual household income in USD before taxes - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 105000.0 - std: 38000.0 - min: 45000.0 - max: 350000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - individual_income - - household_size - modifiers: - - when: individual_income > 100000 and household_size >= 4 - multiply: 1.5 - add: 20000.0 - weight_overrides: null - probability_override: null - - when: individual_income > 100000 and household_size < 4 - multiply: 1.3 - add: 10000.0 - weight_overrides: null - probability_override: null - - when: individual_income <= 50000 - multiply: 0.9 - add: -5000.0 - weight_overrides: null - probability_override: null - - when: household_size >= 5 - multiply: 1.2 - add: 5000.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Census Bureau ACS 2020-2024 data showing US median household income $80,734 - note: Suburban homeowners with school-age children have higher incomes than national - median. Many are dual-income households. Base mean $105k reflects homeownership - requirements and child-rearing costs in suburban areas. - constraints: - - type: hard_min - value: 45000.0 - expression: null - reason: Minimum viable household income for suburban homeownership with children - - type: hard_max - value: 350000.0 - expression: null - reason: Upper bound before extreme high earners - - type: expression - value: null - expression: household_income >= individual_income - reason: Household income must be at least as high as individual income -- name: homeownership_years - type: int - category: population_specific - description: Number of years the household has owned their current home - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: null - std: 5.5 - min: 1.0 - max: null - mean_formula: max(1, min(age - 30, 20)) - std_formula: null - min_formula: null - max_formula: age - 22 - formula: null - depends_on: - - age - modifiers: - - when: age < 35 - multiply: 0.5 - add: -2.0 - weight_overrides: null - probability_override: null - - when: age >= 50 - multiply: 1.3 - add: 3.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Redfin and ConsumerAffairs 2024 data on homeownership tenure - note: 'National median homeownership duration is 11.9-12.3 years as of 2024. Formula - adjusts for age: younger homeowners (late 30s) likely owned 5-10 years, while - older (50+) may own 15-20 years. Cap at 20 years reflects that parents with - school-age children often purchased homes within last 15-20 years.' - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Must have owned for at least 1 year - - type: expression - value: null - expression: homeownership_years <= age - 22 - reason: Cannot have owned home longer than adult life (assuming minimum purchase - age 22) -- name: home_value - type: int - category: population_specific - description: Estimated market value of the owned home in USD - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 380000.0 - std: 145000.0 - min: 180000.0 - max: 1200000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - state - - household_income - modifiers: - - when: state in ['CA', 'MA', 'NY', 'WA', 'HI'] - multiply: 1.8 - add: 150000.0 - weight_overrides: null - probability_override: null - - when: state in ['CO', 'OR', 'NJ', 'MD', 'CT'] - multiply: 1.4 - add: 80000.0 - weight_overrides: null - probability_override: null - - when: state in ['MS', 'AR', 'WV', 'AL', 'KY'] - multiply: 0.6 - add: -80000.0 - weight_overrides: null - probability_override: null - - when: household_income > 150000 - multiply: 1.4 - add: 50000.0 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.75 - add: -30000.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Zillow Home Value Index, Redfin, and NAR data for 2025-2026 - note: 'National median home value $360,727 (Zillow Jan 2026), median sale price - $423,261-$446,000 (Redfin). Suburban homes typically higher than national median. - Mean $380k with large std dev captures state variation: CA/HI ($600k-800k+), - TX/FL ($300k-400k), Midwest ($250k-350k).' - constraints: - - type: hard_min - value: 180000.0 - expression: null - reason: Minimum suburban single-family home value - - type: hard_max - value: 1200000.0 - expression: null - reason: Upper bound for typical suburban homes before luxury segment -- name: mortgage_status - type: categorical - category: population_specific - description: Current mortgage status (paying mortgage, paid off, no mortgage) - scope: household - sampling: - strategy: conditional - distribution: - type: categorical - options: - - paying_mortgage - - paid_off - weights: - - 0.72 - - 0.28 - formula: null - depends_on: - - homeownership_years - - age - modifiers: - - when: homeownership_years >= 15 and age >= 50 - multiply: null - add: null - weight_overrides: - paying_mortgage: 0.4 - paid_off: 0.6 - probability_override: null - - when: homeownership_years < 10 - multiply: null - add: null - weight_overrides: - paying_mortgage: 0.95 - paid_off: 0.05 - probability_override: null - - when: homeownership_years >= 10 and homeownership_years < 15 - multiply: null - add: null - weight_overrides: - paying_mortgage: 0.75 - paid_off: 0.25 - probability_override: null - grounding: - level: strong - method: researched - source: Census Bureau 2024 ACS and Federal Reserve SHED data - note: Nationally, 40.3% of all homeowners are mortgage-free (2024), but this includes - many retirees. For working-age homeowners under 65, only 27.7% own free and - clear. Suburban parents with school-age children are primarily working-age (35-55), - so base rate set at 28% paid off, 72% with mortgage. - constraints: [] -- name: youngest_child_age - type: int - category: population_specific - description: Age of the youngest school-age child in years - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 8.0 - std: 3.5 - min: 5.0 - max: 17.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - num_children - modifiers: - - when: num_children == 1 - multiply: 1.2 - add: 1.0 - weight_overrides: null - probability_override: null - - when: num_children >= 3 - multiply: 0.8 - add: -1.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Population demographics and typical family patterns - note: For households with mean 2.1 school-age children, youngest child typically - in elementary or middle school range. Mean of 8 years reflects mix of families - with young elementary (5-7), middle elementary (8-10), and middle school (11-13) - as youngest. - constraints: - - type: hard_min - value: 5.0 - expression: null - reason: School-age children are K-12, minimum age 5 (kindergarten) - - type: hard_max - value: 17.0 - expression: null - reason: Maximum K-12 age before college - - type: expression - value: null - expression: youngest_child_age <= oldest_child_age - reason: Youngest child cannot be older than oldest child -- name: oldest_child_age - type: int - category: population_specific - description: Age of the oldest school-age child in years - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 13.0 - std: 3.8 - min: 5.0 - max: 18.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: youngest_child_age + 15 - formula: null - depends_on: - - num_children - - youngest_child_age - modifiers: - - when: num_children == 1 - multiply: 1.0 - add: 0.0 - weight_overrides: null - probability_override: null - - when: num_children >= 3 - multiply: 1.2 - add: 2.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Family demographic patterns and typical child spacing - note: With mean 2.1 children and youngest averaging 8 years, oldest child typically - in middle/high school range. Mean 13 years allows for 2-5 year spacing between - children, common in American families. - constraints: - - type: hard_min - value: 5.0 - expression: null - reason: School-age minimum (K-12) - - type: hard_max - value: 18.0 - expression: null - reason: Maximum K-12 age - - type: expression - value: null - expression: oldest_child_age >= youngest_child_age - reason: Oldest child must be at least as old as youngest -- name: school_type - type: categorical - category: population_specific - description: Type of school children attend (public, private, charter, homeschool) - scope: household - sampling: - strategy: conditional - distribution: - type: categorical - options: - - public - - private - - charter - - homeschool - weights: - - 0.75 - - 0.15 - - 0.07 - - 0.03 - formula: null - depends_on: - - household_income - modifiers: - - when: household_income > 150000 - multiply: null - add: null - weight_overrides: - public: 0.4 - private: 0.45 - charter: 0.1 - homeschool: 0.05 - probability_override: null - - when: household_income >= 100000 and household_income <= 150000 - multiply: null - add: null - weight_overrides: - public: 0.6 - private: 0.25 - charter: 0.12 - homeschool: 0.03 - probability_override: null - - when: household_income < 100000 - multiply: null - add: null - weight_overrides: - public: 0.75 - private: 0.1 - charter: 0.12 - homeschool: 0.03 - probability_override: null - grounding: - level: medium - method: researched - source: National Center for Education Statistics (NCES) data - note: 'Nationally, approximately 83% of K-12 students attend public schools (including - charters), 10% private, 3-4% homeschool. Suburban families slightly higher private - school enrollment than national average. Base weights: 75% public, 15% private, - 7% charter, 3% homeschool.' - constraints: [] -- name: dual_income_household - type: boolean - category: population_specific - description: Whether the household has two income earners - scope: household - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.68 - formula: null - depends_on: - - marital_status - - household_size - modifiers: - - when: marital_status == 'married' and household_size >= 3 - multiply: null - add: null - weight_overrides: null - probability_override: 0.8 - - when: marital_status == 'married' and household_size < 3 - multiply: null - add: null - weight_overrides: null - probability_override: 0.7 - - when: marital_status in ['divorced', 'single'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.3 - - when: marital_status == 'widowed' - multiply: null - add: null - weight_overrides: null - probability_override: 0.2 - grounding: - level: medium - method: estimated - source: BLS and Census labor force participation data - note: Among married couples with children, approximately 65-70% are dual-earner - households. For suburban homeowners with school-age children where homeownership - and childcare costs are high, dual income is common. Base probability 68%. - constraints: [] -- name: commute_time - type: int - category: population_specific - description: One-way commute time to work in minutes - scope: individual - sampling: - strategy: conditional - distribution: - type: normal - mean: 28.0 - std: 12.0 - min: 5.0 - max: 90.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - employment_status - modifiers: - - when: employment_status == 'full_time' - multiply: 1.1 - add: 2.0 - weight_overrides: null - probability_override: null - - when: employment_status == 'part_time' - multiply: 0.85 - add: -3.0 - weight_overrides: null - probability_override: null - - when: employment_status == 'self_employed' - multiply: 0.7 - add: -5.0 - weight_overrides: null - probability_override: null - - when: employment_status == 'unemployed' - multiply: 0.0 - add: -28.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: researched - source: Census Bureau American Community Survey commute data - note: National mean commute time approximately 26-27 minutes. Suburban residents - typically have slightly longer commutes (28-30 min) than national average as - they commute to urban job centers. Distribution includes some remote workers - with minimal commute. - constraints: - - type: hard_min - value: 5.0 - expression: null - reason: Minimum commute time for those who work outside home - - type: hard_max - value: 90.0 - expression: null - reason: Maximum reasonable one-way commute -- name: vehicle_count - type: int - category: population_specific - description: Number of vehicles owned by the household - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 2.5 - std: 0.7 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - household_size - - household_income - modifiers: - - when: household_size >= 5 and household_income > 100000 - multiply: 1.3 - add: 1.0 - weight_overrides: null - probability_override: null - - when: household_size <= 3 - multiply: 0.8 - add: 0.0 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.75 - add: -0.5 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Federal Highway Administration and household transportation patterns - note: Suburban households with school-age children typically own 2-3 vehicles. - With mean household size 4.2 and dual-earner prevalence, 2-3 vehicles common - for work commutes, school transport, and activities. Mean 2.5 reflects this - pattern. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Suburban households require at least one vehicle - - type: hard_max - value: 5.0 - expression: null - reason: Practical maximum for typical household -- name: pta_membership - type: boolean - category: population_specific - description: Whether the individual is a member of Parent-Teacher Association - scope: individual - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.35 - formula: null - depends_on: - - community_involvement - modifiers: - - when: community_involvement == 'high' - multiply: null - add: null - weight_overrides: null - probability_override: 0.85 - - when: community_involvement == 'medium' - multiply: null - add: null - weight_overrides: null - probability_override: 0.55 - - when: community_involvement == 'low' - multiply: null - add: null - weight_overrides: null - probability_override: 0.25 - - when: community_involvement == 'none' - multiply: null - add: null - weight_overrides: null - probability_override: 0.05 - grounding: - level: low - method: estimated - source: National PTA membership trends and community involvement patterns - note: National PTA membership approximately 4 million across 22,000+ locations. - Not all parents with school-age children join. Estimated 30-40% of suburban - parents with medium-high community involvement join PTA. Base probability 35%. - constraints: [] -- name: home_office - type: boolean - category: population_specific - description: Whether the home has a dedicated home office space - scope: household - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.48 - formula: null - depends_on: - - employment_status - - home_value - modifiers: - - when: employment_status == 'self_employed' - multiply: null - add: null - weight_overrides: null - probability_override: 0.85 - - when: employment_status == 'full_time' and home_value > 400000 - multiply: null - add: null - weight_overrides: null - probability_override: 0.65 - - when: employment_status == 'full_time' and home_value <= 400000 - multiply: null - add: null - weight_overrides: null - probability_override: 0.45 - - when: employment_status == 'part_time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.4 - - when: employment_status == 'unemployed' - multiply: null - add: null - weight_overrides: null - probability_override: 0.3 - grounding: - level: medium - method: estimated - source: Post-pandemic work-from-home trends and housing patterns - note: Post-2020, dedicated home office space became more common. Suburban homes - with higher values and professional/management workers have higher likelihood. - Estimated 45-50% of suburban professional households have dedicated home office - space. Base probability 48%. - constraints: [] -- name: household_savings - type: int - category: population_specific - description: Total household savings and investments in USD - scope: household - sampling: - strategy: conditional - distribution: - type: lognormal - mean: 75000.0 - std: 95000.0 - min: 5000.0 - max: 800000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - household_income - - age - modifiers: - - when: household_income > 150000 and age >= 45 - multiply: 2.0 - add: 50000.0 - weight_overrides: null - probability_override: null - - when: household_income > 150000 and age < 45 - multiply: 1.5 - add: 25000.0 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.5 - add: -20000.0 - weight_overrides: null - probability_override: null - - when: age >= 50 - multiply: 1.6 - add: 30000.0 - weight_overrides: null - probability_override: null - - when: age < 35 - multiply: 0.6 - add: -15000.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Federal Reserve Survey of Consumer Finances and savings patterns - note: Household savings highly skewed (lognormal). Median US household savings - much lower than mean. For suburban homeowners aged 35-55 with median income - $105k, typical savings $40k-120k. Lognormal with mean $75k, high std dev captures - wide variation. - constraints: - - type: hard_min - value: 5000.0 - expression: null - reason: Minimum emergency savings for homeowners - - type: hard_max - value: 800000.0 - expression: null - reason: Upper bound for typical household savings before ultra-wealthy -- name: childcare_expense - type: int - category: population_specific - description: Monthly childcare expenses in USD (afterschool, daycare, etc.) - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 650.0 - std: 420.0 - min: 0.0 - max: 2500.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - num_children - - youngest_child_age - modifiers: - - when: num_children >= 3 and youngest_child_age < 6 - multiply: 2.0 - add: 500.0 - weight_overrides: null - probability_override: null - - when: num_children >= 3 and youngest_child_age >= 6 - multiply: 1.5 - add: 200.0 - weight_overrides: null - probability_override: null - - when: youngest_child_age >= 12 - multiply: 0.4 - add: -300.0 - weight_overrides: null - probability_override: null - - when: youngest_child_age < 6 - multiply: 1.8 - add: 400.0 - weight_overrides: null - probability_override: null - - when: num_children == 1 - multiply: 0.7 - add: -100.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Childcare cost surveys and BLS Consumer Expenditure data - note: School-age childcare less expensive than infant/toddler care. Afterschool - programs typically $200-500/child/month. Some families need no care (stay-at-home - parent, older children), others need full afterschool care for 2+ children. - Mean $650/month reflects mix. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Some families have no childcare expenses (older children, family help) - - type: hard_max - value: 2500.0 - expression: null - reason: Maximum for afterschool care for multiple school-age children -- name: extracurricular_count - type: int - category: population_specific - description: Number of extracurricular activities children are enrolled in (sports, - music, etc.) - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 3.2 - std: 1.8 - min: 0.0 - max: 10.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - num_children - - household_income - modifiers: - - when: num_children >= 3 and household_income > 120000 - multiply: 1.5 - add: 2.0 - weight_overrides: null - probability_override: null - - when: num_children == 1 - multiply: 0.8 - add: -0.5 - weight_overrides: null - probability_override: null - - when: household_income > 150000 - multiply: 1.4 - add: 1.5 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.65 - add: -1.0 - weight_overrides: null - probability_override: null - grounding: - level: low - method: estimated - source: Youth sports and activities participation surveys - note: Average US child participates in 1-2 organized activities (sports, music, - scouts, etc.). With mean 2.1 children per household, total household activities - approximately 2-4. Higher-income suburban families tend toward more activities. - Mean 3.2 reflects 1.5 activities per child on average. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Some families have no organized extracurriculars - - type: hard_max - value: 10.0 - expression: null - reason: Maximum total activities across all children in household -- name: religious_affiliation - type: categorical - category: population_specific - description: Religious identity of the individual (christian_conservative, christian_moderate, - christian_progressive, other_religion, secular, none) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - christian_conservative - - christian_moderate - - christian_progressive - - other_religion - - secular - - none - weights: - - 0.22 - - 0.28 - - 0.12 - - 0.08 - - 0.18 - - 0.12 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://www.pewresearch.org/religion/2025/02/26/age-race-education-and-other-demographic-traits-of-us-religious-groups/ - and https://prri.org/research/census-2023-american-religion/ - note: Based on Pew Research 2023-24 data showing 72% of parents with school-age - children identify as Christian vs 24-27% unaffiliated, combined with PRRI 2023 - data showing suburban populations (42% white evangelical, 45% unaffiliated in - suburbs). Conservative/moderate/progressive split estimated based on political-religious - correlations and suburban white evangelical concentration (42% suburban). Distribution - adjusted for parents with school-age children who tend to be slightly more religious - than general population. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Categorical weights must sum to 1.0 -- name: political_ideology - type: categorical - category: population_specific - description: Self-identified political ideology on a spectrum (very_conservative, - conservative, moderate, liberal, very_liberal) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - very_conservative - - conservative - - moderate - - liberal - - very_liberal - weights: - - 0.12 - - 0.26 - - 0.32 - - 0.2 - - 0.1 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: researched - source: https://www.pewresearch.org/politics/2024/04/09/partisanship-in-rural-suburban-and-urban-communities/ - note: Pew Research 2024 shows suburban voters split 50% Republican / 47% Democratic - alignment. Combined with data showing parents tend to adopt similar political - views to each other (71% of teens match parents' ideology) and suburban populations - show relatively even distribution. Moderate is highest category as suburban - voters are more centrist than rural. Distribution reflects suburban homeowners - who tend to be slightly more conservative than urban residents but more moderate - than rural. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Categorical weights must sum to 1.0 -- name: free_speech_absolutism - type: categorical - category: personality - description: Strength of belief in absolute free speech versus content curation - (absolutist, strong, moderate, limited) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - absolutist - - strong - - moderate - - limited - weights: - - 0.15 - - 0.32 - - 0.38 - - 0.15 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://knightfoundation.org/wp-content/uploads/2022/01/KF_Free_Expression_2022.pdf - and https://www.pewresearch.org/short-reads/2022/08/30/more-so-than-adults-u-s-teens-value-people-feeling-safe-online-over-being-able-to-speak-freely/ - note: 'Knight Foundation 2022 survey shows 91% value free speech principles but - with significant disagreement on application. Adults split roughly 50-50 on - whether safe spaces vs free speech is more important. Pew 2022 shows partisan - divide: Democrats favor safety (62%), Republicans favor free speech (64%). For - parents with school-age children context, moderate position is most common. - Absolutist and limited categories represent ideological extremes on both sides - of debate.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Categorical weights must sum to 1.0 -- name: trust_in_institutions - type: categorical - category: personality - description: Level of trust in public institutions like schools and government (very_high, - high, moderate, low, very_low) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - very_high - - high - - moderate - - low - - very_low - weights: - - 0.08 - - 0.2 - - 0.35 - - 0.25 - - 0.12 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://news.gallup.com/poll/508169/historically-low-faith-institutions-continues.aspx - and https://www.edchoice.org/new-polling-reveals-parents-trust-teachers-on-education-more-than-state-legislatures/ - and https://www.aamchealthjustice.org/news/polling/trust-trends - note: Gallup 2024 shows public schools at 27% confidence (near historic low), - with average institutional confidence at 26%. However, EdChoice 2024 shows 68% - of parents trust local school boards, 88% trust teachers. Partnership for Public - Service 2024 shows only 23% trust federal government. AAMC 2024 shows gradual - decline 2021-2024, with Gen Z showing lower trust. Distribution weighted toward - moderate-to-low given context of school board decisions (local institutions - score higher than federal). Parents trust local schools more than institutions - generally, hence moderate is peak category. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1.0 - reason: Categorical weights must sum to 1.0 -- name: has_school_age_children - type: boolean - category: population_specific - description: Whether the individual currently has school-age children that could - be affected by book ban decisions - scope: individual - sampling: - strategy: derived - distribution: null - formula: num_children > 0 - depends_on: - - num_children - modifiers: [] - grounding: - level: strong - method: computed - source: null - note: Deterministic transformation - constraints: [] -- name: school_board_engagement - type: categorical - category: population_specific - description: Level of engagement with local school board activities and meetings - (very_active, active, occasional, minimal, none) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - very_active - - active - - occasional - - minimal - - none - weights: - - 0.08 - - 0.17 - - 0.3 - - 0.3 - - 0.15 - formula: null - depends_on: - - community_involvement - - education_priority - - num_children - modifiers: - - when: community_involvement == 'high' and education_priority == 'high' - multiply: null - add: null - weight_overrides: - very_active: 0.45 - active: 0.35 - occasional: 0.15 - minimal: 0.04 - none: 0.01 - probability_override: null - - when: community_involvement == 'high' and education_priority == 'medium' - multiply: null - add: null - weight_overrides: - very_active: 0.25 - active: 0.4 - occasional: 0.25 - minimal: 0.08 - none: 0.02 - probability_override: null - - when: community_involvement == 'medium' and education_priority == 'high' - multiply: null - add: null - weight_overrides: - very_active: 0.2 - active: 0.35 - occasional: 0.3 - minimal: 0.12 - none: 0.03 - probability_override: null - - when: num_children >= 2 and education_priority == 'high' - multiply: null - add: null - weight_overrides: - very_active: 0.3 - active: 0.35 - occasional: 0.25 - minimal: 0.08 - none: 0.02 - probability_override: null - - when: community_involvement == 'low' or community_involvement == 'none' - multiply: null - add: null - weight_overrides: - very_active: 0.02 - active: 0.08 - occasional: 0.2 - minimal: 0.35 - none: 0.35 - probability_override: null - grounding: - level: medium - method: extrapolated - source: NCES Parent and Family Involvement surveys (2013-2016), EdWeek research - note: School board meeting attendance is much lower than general PTA/school event - attendance. Research shows 87% of parents attend PTA/association meetings but - school board attendance is far lower. Estimated that 5-10% of parents with children - are very active in school board meetings, with most limiting involvement to - occasional attendance at best. Distribution extrapolated from general parent - engagement patterns showing higher engagement correlates with community involvement - and education priority. - constraints: [] -- name: media_consumption_primary - type: categorical - category: population_specific - description: Primary source of news and information (social_media, cable_news, local_news, - national_newspapers, online_news) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - social_media - - cable_news - - local_news - - national_newspapers - - online_news - weights: - - 0.25 - - 0.2 - - 0.2 - - 0.1 - - 0.25 - formula: null - depends_on: - - age - modifiers: - - when: age >= 45 - multiply: null - add: null - weight_overrides: - social_media: 0.2 - cable_news: 0.3 - local_news: 0.25 - national_newspapers: 0.1 - online_news: 0.15 - probability_override: null - - when: age < 45 - multiply: null - add: null - weight_overrides: - social_media: 0.4 - cable_news: 0.1 - local_news: 0.2 - national_newspapers: 0.08 - online_news: 0.22 - probability_override: null - grounding: - level: strong - method: researched - source: Pew Research Center 2024-2025 news consumption surveys, American Press - Institute - note: Adults under 30 use social media as primary source (71% daily), while TV - (especially cable) dominates for 65+ (63%). For suburban parents aged 30-50 - (typical school-age parents), mix of social media, online news, and cable/local - news. Social media and online news combined represent about 50% of primary sources, - cable and local news about 40%, traditional newspapers declining to ~10%. - constraints: [] -- name: parental_control_preference - type: categorical - category: population_specific - description: Preference for who controls children's reading material (parents_only, - parents_primary, shared_responsibility, educators_primary, educators_only) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - parents_only - - parents_primary - - shared_responsibility - - educators_primary - - educators_only - weights: - - 0.1 - - 0.35 - - 0.4 - - 0.12 - - 0.03 - formula: null - depends_on: - - trust_in_institutions - - education_priority - modifiers: - - when: trust_in_institutions == 'very_low' or trust_in_institutions == 'low' - multiply: null - add: null - weight_overrides: - parents_only: 0.4 - parents_primary: 0.35 - shared_responsibility: 0.18 - educators_primary: 0.05 - educators_only: 0.02 - probability_override: null - - when: trust_in_institutions == 'very_high' or trust_in_institutions == 'high' - multiply: null - add: null - weight_overrides: - parents_only: 0.05 - parents_primary: 0.15 - shared_responsibility: 0.5 - educators_primary: 0.25 - educators_only: 0.05 - probability_override: null - - when: education_priority == 'high' and trust_in_institutions == 'moderate' - multiply: null - add: null - weight_overrides: - parents_only: 0.15 - parents_primary: 0.3 - shared_responsibility: 0.4 - educators_primary: 0.12 - educators_only: 0.03 - probability_override: null - - when: education_priority == 'low' - multiply: null - add: null - weight_overrides: - parents_only: 0.1 - parents_primary: 0.2 - shared_responsibility: 0.35 - educators_primary: 0.25 - educators_only: 0.1 - probability_override: null - grounding: - level: medium - method: researched - source: EveryLibrary Institute 2023 parent perception survey, EdWeek 2024 surveys - note: 80% of parents trust school librarians to select appropriate books, yet - 60% want age restrictions or parental permission. 76% think parents should decide - if their child can access challenging topics. Most parents favor shared control - rather than extremes - only small minorities want exclusive parent control (estimated - 10-15%) or exclusive educator control (3-5%). Base distribution reflects trust - but desire for involvement, with shared responsibility most common. - constraints: [] -- name: library_usage_frequency - type: categorical - category: population_specific - description: How often the individual or household uses public or school libraries - (weekly, monthly, occasionally, rarely, never) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - weekly - - monthly - - occasionally - - rarely - - never - weights: - - 0.24 - - 0.28 - - 0.25 - - 0.15 - - 0.08 - formula: null - depends_on: - - education_level - - num_children - modifiers: - - when: num_children >= 2 and education_level in ['bachelor', 'graduate'] - multiply: null - add: null - weight_overrides: - weekly: 0.25 - monthly: 0.35 - occasionally: 0.25 - rarely: 0.12 - never: 0.03 - probability_override: null - - when: num_children == 1 and education_level in ['bachelor', 'graduate'] - multiply: null - add: null - weight_overrides: - weekly: 0.15 - monthly: 0.3 - occasionally: 0.35 - rarely: 0.15 - never: 0.05 - probability_override: null - - when: education_level in ['high_school', 'associate'] - multiply: null - add: null - weight_overrides: - weekly: 0.08 - monthly: 0.2 - occasionally: 0.35 - rarely: 0.27 - never: 0.1 - probability_override: null - grounding: - level: strong - method: researched - source: Pew Research Center 2013-2016 library usage surveys, NCES household surveys - note: '61% of households with children under 18 used library in past month vs - 35% without children. Among parents with school-age children, 70% visited library - in past year. Frequency distribution from Pew: 24% weekly or more, 24% several - times a month, 28% monthly or less often, 23% rarely/never. Parents with children - 6-11 show highest usage (81%). Distribution reflects this high-engagement population.' - constraints: [] -- name: personal_book_ban_experience - type: boolean - category: population_specific - description: Whether the individual has personal experience with book restrictions - or censorship in their own education or parenting - scope: individual - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.15 - formula: null - depends_on: - - age - modifiers: - - when: age >= 45 - multiply: null - add: null - weight_overrides: null - probability_override: 0.15 - - when: age < 45 and age >= 35 - multiply: null - add: null - weight_overrides: null - probability_override: 0.25 - - when: age < 35 - multiply: null - add: null - weight_overrides: null - probability_override: 0.35 - grounding: - level: low - method: estimated - source: Historical book challenge data and generational experience - note: 'No direct data available on personal experience with book restrictions. - Estimated based on: 1) Book challenges historically concentrated in certain - regions/schools, 2) Challenges increased dramatically in recent years (2021+), - but parents in survey are 25-55 age range meaning their K-12 experience was - 1980s-2010s when challenges less common, 3) Most parents would not have direct - experience. Conservative estimate ~15% had some personal encounter with book - restrictions in their education or as parents.' - constraints: [] -- name: lgbtq_acceptance - type: categorical - category: personality - description: Level of acceptance toward LGBTQ individuals and topics (very_accepting, - accepting, neutral, resistant, very_resistant) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - very_accepting - - accepting - - neutral - - resistant - - very_resistant - weights: - - 0.22 - - 0.33 - - 0.25 - - 0.14 - - 0.06 - formula: null - depends_on: - - religious_affiliation - - political_ideology - modifiers: - - when: religious_affiliation == 'christian_conservative' - multiply: null - add: null - weight_overrides: - very_accepting: 0.02 - accepting: 0.05 - neutral: 0.15 - resistant: 0.38 - very_resistant: 0.4 - probability_override: null - - when: religious_affiliation == 'christian_moderate' - multiply: null - add: null - weight_overrides: - very_accepting: 0.1 - accepting: 0.25 - neutral: 0.35 - resistant: 0.22 - very_resistant: 0.08 - probability_override: null - - when: religious_affiliation == 'christian_progressive' or religious_affiliation - == 'secular' - multiply: null - add: null - weight_overrides: - very_accepting: 0.45 - accepting: 0.35 - neutral: 0.15 - resistant: 0.04 - very_resistant: 0.01 - probability_override: null - - when: political_ideology == 'very_conservative' - multiply: null - add: null - weight_overrides: - very_accepting: 0.02 - accepting: 0.05 - neutral: 0.18 - resistant: 0.4 - very_resistant: 0.35 - probability_override: null - - when: political_ideology == 'very_liberal' or political_ideology == 'liberal' - multiply: null - add: null - weight_overrides: - very_accepting: 0.5 - accepting: 0.35 - neutral: 0.12 - resistant: 0.02 - very_resistant: 0.01 - probability_override: null - - when: religious_affiliation == 'none' - multiply: null - add: null - weight_overrides: - very_accepting: 0.4 - accepting: 0.35 - neutral: 0.2 - resistant: 0.04 - very_resistant: 0.01 - probability_override: null - grounding: - level: strong - method: researched - source: Pew Research Center 2023-2025 Religious Landscape Study, PRRI American - Values Atlas 2022-2024 - note: 'Overall US acceptance of homosexuality at 70% (Pew 2023-24), with 59% among - religious affiliated, 87% among unaffiliated. PRRI finds 69-70% support same-sex - marriage. Strong correlation with political ideology: 70-90% acceptance among - liberals vs 40-50% among conservatives. Religious affiliation major factor: - evangelical Protestants majority oppose (discourage), while mainline Protestants, - Catholics, unaffiliated accept. Base distribution reflects general population - with slight skew toward acceptance.' - constraints: [] -- name: age_appropriateness_concern - type: categorical - category: population_specific - description: Level of concern about age-appropriate content in school materials - (very_concerned, concerned, moderate, relaxed, very_relaxed) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - very_concerned - - concerned - - moderate - - relaxed - - very_relaxed - weights: - - 0.2 - - 0.35 - - 0.3 - - 0.12 - - 0.03 - formula: null - depends_on: - - num_children - - education_priority - modifiers: - - when: num_children >= 2 and education_priority == 'high' - multiply: null - add: null - weight_overrides: - very_concerned: 0.35 - concerned: 0.4 - moderate: 0.2 - relaxed: 0.04 - very_relaxed: 0.01 - probability_override: null - - when: num_children == 1 and education_priority == 'high' - multiply: null - add: null - weight_overrides: - very_concerned: 0.3 - concerned: 0.4 - moderate: 0.23 - relaxed: 0.06 - very_relaxed: 0.01 - probability_override: null - - when: education_priority == 'medium' - multiply: null - add: null - weight_overrides: - very_concerned: 0.15 - concerned: 0.35 - moderate: 0.35 - relaxed: 0.12 - very_relaxed: 0.03 - probability_override: null - - when: education_priority == 'low' - multiply: null - add: null - weight_overrides: - very_concerned: 0.08 - concerned: 0.2 - moderate: 0.4 - relaxed: 0.25 - very_relaxed: 0.07 - probability_override: null - - when: num_children >= 3 - multiply: null - add: null - weight_overrides: - very_concerned: 0.38 - concerned: 0.42 - moderate: 0.16 - relaxed: 0.03 - very_relaxed: 0.01 - probability_override: null - grounding: - level: medium - method: extrapolated - source: EveryLibrary Institute 2023 survey, parent rights movement literature - note: 60% of parents want age restrictions or parental permission for certain - books. 76% think parents should decide on challenging topics access. 25% uncomfortable - with puberty/sex ed books for children, 20% uncomfortable with race/racism books. - However, 93% feel children safe in library, 82% trust librarians. Distribution - reflects high baseline concern (55% very concerned or concerned) but not universal, - with majority having at least moderate concern about age-appropriate content. - constraints: [] -- name: social_network_density - type: categorical - category: population_specific - description: Size and interconnectedness of local parent/community network (very_high, - high, moderate, low, isolated) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - very_high - - high - - moderate - - low - - isolated - weights: - - 0.15 - - 0.3 - - 0.35 - - 0.15 - - 0.05 - formula: null - depends_on: - - community_involvement - - homeownership_years - modifiers: - - when: community_involvement == 'high' and homeownership_years >= 5 - multiply: null - add: null - weight_overrides: - very_high: 0.35 - high: 0.4 - moderate: 0.2 - low: 0.04 - isolated: 0.01 - probability_override: null - - when: community_involvement == 'medium' and homeownership_years >= 5 - multiply: null - add: null - weight_overrides: - very_high: 0.15 - high: 0.35 - moderate: 0.35 - low: 0.12 - isolated: 0.03 - probability_override: null - - when: community_involvement == 'high' and homeownership_years < 5 - multiply: null - add: null - weight_overrides: - very_high: 0.2 - high: 0.35 - moderate: 0.3 - low: 0.12 - isolated: 0.03 - probability_override: null - - when: community_involvement == 'low' or community_involvement == 'none' - multiply: null - add: null - weight_overrides: - very_high: 0.02 - high: 0.08 - moderate: 0.25 - low: 0.4 - isolated: 0.25 - probability_override: null - grounding: - level: medium - method: extrapolated - source: Parent engagement research, suburban community patterns - note: Social network density for parents correlates with community involvement - and tenure in neighborhood. Suburban homeowners with school-age children tend - to have moderate-to-high networks through school connections, PTA, extracurriculars. - 76% join PTA per general statistics. Longer homeownership increases network - density. Base distribution assumes most suburban parents have moderate to high - networks, with very high density (15%) among highly engaged, isolated (5%) among - newcomers or low engagement. - constraints: [] -sampling_order: -- age -- agreeableness -- community_involvement -- conscientiousness -- education_level -- education_priority -- employment_status -- commute_time -- environmental_consciousness -- extraversion -- free_speech_absolutism -- gender -- homeownership_years -- household_size -- marital_status -- dual_income_household -- media_consumption_primary -- mortgage_status -- neuroticism -- num_children -- age_appropriateness_concern -- has_school_age_children -- library_usage_frequency -- occupation_category -- individual_income -- household_income -- extracurricular_count -- household_savings -- openness -- personal_book_ban_experience -- political_ideology -- pta_membership -- religious_affiliation -- lgbtq_acceptance -- risk_tolerance -- school_board_engagement -- school_type -- social_network_density -- state -- home_value -- home_office -- trust_in_institutions -- parental_control_preference -- urban_rural -- vehicle_count -- youngest_child_age -- childcare_expense -- oldest_child_age diff --git a/test-v2-e2e/prompt.txt b/test-v2-e2e/prompt.txt deleted file mode 100644 index 54c69f2..0000000 --- a/test-v2-e2e/prompt.txt +++ /dev/null @@ -1 +0,0 @@ -A small US suburban community reacting to a local school board decision to ban certain books from the school library. The community has diverse political views and varying levels of involvement with the school system. diff --git a/test-v2-e2e/spec.yaml b/test-v2-e2e/spec.yaml deleted file mode 100644 index def0ee8..0000000 --- a/test-v2-e2e/spec.yaml +++ /dev/null @@ -1,1999 +0,0 @@ -meta: - description: 10 US suburban homeowners with school-age children - size: 10 - geography: US - agent_focus: suburban homeowners with school-age children - created_at: '2026-02-15T23:06:23.063236' - version: '1.0' - persona_template: null - scenario_description: null - household_config: - age_brackets: - - - 25 - - 18-24 - - - 35 - - 25-34 - - - 45 - - 35-44 - - - 55 - - 45-54 - - - 65 - - 55-64 - - - 999 - - 65+ - household_type_weights: - 18-24: - single: 0.28 - couple: 0.15 - single_parent: 0.14 - couple_with_kids: 0.2 - multi_generational: 0.23 - 25-34: - single: 0.19 - couple: 0.11 - single_parent: 0.19 - couple_with_kids: 0.38 - multi_generational: 0.13 - 35-44: - single: 0.08 - couple: 0.08 - single_parent: 0.17 - couple_with_kids: 0.59 - multi_generational: 0.08 - 45-54: - single: 0.16 - couple: 0.26 - single_parent: 0.09 - couple_with_kids: 0.37 - multi_generational: 0.12 - 55-64: - single: 0.26 - couple: 0.37 - single_parent: 0.06 - couple_with_kids: 0.21 - multi_generational: 0.1 - 65+: - single: 0.42 - couple: 0.44 - single_parent: 0.01 - couple_with_kids: 0.01 - multi_generational: 0.12 - same_group_rates: - white: 0.89 - black: 0.82 - asian: 0.69 - hispanic: 0.75 - default_same_group_rate: 0.8 - assortative_mating: - education_level: 0.68 - income_level: 0.58 - religious_affiliation: 0.65 - partner_age_gap_mean: 2.2 - partner_age_gap_std: 3.5 - min_adult_age: 18 - child_min_parent_offset: 18 - child_max_parent_offset: 45 - max_dependent_child_age: 18 - elderly_min_offset: 20 - elderly_max_offset: 45 - life_stages: - - max_age: 5 - label: preschool - - max_age: 11 - label: elementary - - max_age: 14 - label: middle_school - - max_age: 18 - label: high_school - adult_stage_label: adult - avg_household_size: 3.2 - name_config: null -grounding: - overall: medium - sources_count: 172 - strong_count: 12 - medium_count: 18 - low_count: 5 - sources: - - https://www.census.gov/topics/families.html - - https://www.ssa.gov/policy/docs/ssb/v4n11/v4n11p8.pdf - - https://www.icip.iastate.edu/tables/population/urban-pct-states - - https://nationalmortgageprofessional.com/news/nine-tenths-million-paid-their-home-loans-2024 - - https://www.cnbc.com/2026/02/11/jobs-report-january-2026-.html - - https://eyeonhousing.org/2017/02/the-average-number-of-school-age-children-per-home/ - - https://corridorbusiness.com/study-college-graduates-more-likely-to-own-their-own-home/ - - https://www.clasp.org/sites/default/files/public/resources-and-publications/states/0086.pdf - - https://worldpopulationreview.com/state-rankings/average-household-size-by-state - - https://adpemploymentreport.com/ - - https://www.psychologytoday.com/us/blog/the-asymmetric-brain/202510/what-is-the-average-age-gap-in-relationships-worldwide - - https://www.pewresearch.org/short-reads/2024/08/15/a-growing-share-of-us-husbands-and-wives-are-roughly-the-same-age/ - - https://www.census.gov/topics/families/families-and-households.html - - https://www.census.gov/data/tables/time-series/demo/families/households.html - - https://www.jstor.org/stable/10.1086/661778 - - https://www.rismedia.com/2022/04/18/homeownership-education-dgree-holding-owners-sugre-those-without-high-school-drop-30/ - - https://www.rubyhome.com/blog/average-length-homeownership/ - - https://www.nar.realtor/blogs/economists-outlook/how-education-is-shaping-homeownership-trends - - https://dx.doi.org/10.1086/661778 - - https://ipropertymanagement.com/research/homeownership-rate-by-age - - https://fred.stlouisfed.org/series/CXU980230LB1409M - - https://www.census.gov/library/stories/2022/07/marriage-prevalence-for-black-adults-varies-by-state.html - - https://en.wikipedia.org/wiki/Household_income_in_the_United_States - - https://nces.ed.gov/programs/digest/d09/tables/dt09_017.asp - - https://www.census.gov/data/tables/2022/demo/families/cps-2022.html - - https://www.pewresearch.org/social-trends/2017/05/18/1-trends-and-patterns-in-intermarriage/ - - https://www.urban.org/urban-wire/homeownership-has-fallen-further-out-reach-younger-families-lowest-incomes - - https://www.zillow.com/home-values/102001/united-states/ - - https://nces.ed.gov/fastfacts/display.asp?id=372 - - https://nces.ed.gov/programs/digest/d21/tables/dt21_102.10.asp - - https://www.point2homes.com/news/us-real-estate-news/homeownership-by-education-us.html - - https://www.floridarealtors.org/news-media/news-articles/2025/06/how-education-shaping-homeownership - - https://www.chiccousa.com/baby-talk/cities-with-the-most-family-growth-over-time/ - - https://www.scotsmanguide.com/news/homeowners-are-staying-put-for-an-average-of-nearly-12-years/ - - https://www.pewresearch.org/social-trends/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/ - - https://www.census.gov/content/dam/Census/library/working-papers/2023/demo/sehsd-wp2023-10.pdf - - https://www.bls.gov/news.release/famee.htm - - https://fred.stlouisfed.org/release/tables?eid=1138280&rid=462 - - https://raleighrealty.com/blog/average-homeownership-length - - https://fivethirtyeight.com/features/how-suburban-are-big-american-cities/ - - https://www.bls.gov/careeroutlook/2017/article/projections-laborforce.htm - - https://scholarsarchive.byu.edu/cgi/viewcontent.cgi?article=3571&context=etd - - https://www.lincolnvitalsigns.org/economy-and-workforce/median-earnings-by-education/ - - https://www.pewresearch.org/short-reads/2014/01/29/new-academic-study-links-rising-income-inequality-to-assortive-mating/ - - https://www.federalreserve.gov/publications/2025-economic-well-being-of-us-households-in-2024-housing.htm - - https://www.bls.gov/news.release/empsit.nr0.htm - - https://www.redfin.com/news/homeowner-tenure-2022/ - - https://www.newyorkfed.org/medialibrary/media/research/staff_reports/sr682.pdf - - https://www.demandsage.com/average-us-income/ - - https://www.statista.com/statistics/985183/size-urban-rural-population-us/ - - https://www.bls.gov/news.release/pdf/famee.pdf - - https://ofm.wa.gov/washington-data-research/statewide-data/washington-trends/budget-drivers/kindergarten-through-grade-12-k-12-enrollment - - https://www.census.gov/newsroom/press-releases/2022/americas-families-and-living-arrangements.html - - https://en.wikipedia.org/wiki/Homeownership_in_the_United_States - - https://worldpopulationreview.com/state-rankings/median-home-price-by-state - - https://www.bls.gov/opub/mlr/2013/article/marriage-and-divorce-patterns-by-gender-race-and-educational-attainment.htm - - https://www.huduser.gov/portal/pdredge/pdr-edge-frm-asst-sec-080320.html - - https://www.nber.org/digest/may14/assortative-mating-and-income-inequality - - https://fred.stlouisfed.org/series/PAYEMS - - https://datacenter.aecf.org/data/tables/101-child-population-by-age-group - - https://realestate.usnews.com/home-services/moving/median-home-prices-state - - https://statmodeling.stat.columbia.edu/2024/07/31/age-gap-between-spouses/ - - https://www.nar.realtor/research-and-statistics/housing-statistics/metropolitan-median-area-prices-and-affordability - - https://nces.ed.gov/programs/edge/Demographic/ACS - - https://datacenter.aecf.org/data/tables/4404-income--median-earnings-for-population-age-25-and-over-by-educational-attainment - - https://www.financialsamurai.com/the-median-homeownership-duration-is-too-short-to-build-real-wealth/ - - https://www.census.gov/data/tables/2016/demo/families/cps-2016.html - - https://pmc.ncbi.nlm.nih.gov/articles/PMC3000020/ - - https://www.statista.com/statistics/233301/median-household-income-in-the-united-states-by-education/ - - https://www.migrationpolicy.org/sites/default/files/publications/mpi_nciip_parents-children-0-4-and-5-10-us-2021_final.pdf - - https://www2.census.gov/ces/wp/2024/CES-WP-24-30.pdf - - https://www.bls.gov/news.release/famee.t04.htm - - https://www.nmhc.org/research-insight/quick-facts-figures/quick-facts-resident-demographics/households-with-children/ - - https://www.census.gov/data/tables/2023/demo/families/cps-2023.html - - https://www.census.gov/data/tables/2019/demo/families/cps-2019.html - - https://magicdoor.com/blog/us-renter-and-homeowner-statistics/ - - https://worldpopulationreview.com/state-rankings/median-household-income-by-state - - https://nces.ed.gov/programs/digest/d09/tables/dt09_019.asp - - https://www.redfin.com/us-housing-market - - https://www.census.gov/library/stories/2025/09/education-and-income.html - - https://onlinelibrary.wiley.com/doi/10.1111/manc.12421 - - https://www.census.gov/data/tables/2020/demo/families/cps-2020.html - - https://www.statista.com/statistics/242028/number-of-married-couples-in-the-us-by-ethnic-group-and-combination/ - - https://www.census.gov/library/stories/2024/11/family-households.html - - https://www.dol.gov/agencies/wb/data/family-status - - https://usahello.org/education/children/grade-levels/ - - https://www.census.gov/library/visualizations/interactive/parents-living-arrangements.html - - https://bjs.ojp.gov/content/pub/pdf/cusrancvs.pdf - - https://www.hiringlab.org/2026/02/11/january-2026-jobs-report/ - - https://populationeducation.org/resource/historic-average-number-of-children-per-u-s-family-infographic/ - - https://www.rubyhome.com/blog/homeowners-vs-renters-stats/ - - https://www.studycountry.com/wiki/what-percent-of-americans-live-in-suburbs - - https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/ - - https://eyeonhousing.org/2024/10/mortgage-free-homeowners-by-congressional-districts/ - - https://www.lendingtree.com/home/mortgage/u-s-mortgage-market-statistics/ - - https://www.bls.gov/emp/ - - https://www.themortgagenote.org/more-americans-are-mortgage-free-homeowners/ - - https://www.census.gov/library/working-papers/2023/demo/SEHSD-WP2023-10.html - - https://www.childstats.gov/americaschildren/tables.asp - - https://nces.ed.gov/programs/coe/pdf/Indicator_CCE/coe_cce_2016_05.pdf - - https://nces.ed.gov/programs/coe/indicator/cba - - https://finance.yahoo.com/personal-finance/mortgages/article/median-home-price-by-state-151223005.html - - https://www.census.gov/data/tables/time-series/demo/income-poverty/cps-hinc/hinc-04.html - - https://en.wikipedia.org/wiki/Age_disparity_in_sexual_relationships - - https://pmc.ncbi.nlm.nih.gov/articles/PMC12176447/ - - https://www.census.gov/newsroom/press-releases/2025/acs-1-year-estimates.html - - https://premiertucsonhomes.com/tucson-home-values/ - - https://www.census.gov/newsroom/press-releases/2022/urban-rural-populations.html - - https://www.childstats.gov/americaschildren/tables/pop1.asp - - https://www.urban.org/sites/default/files/publication/98729/millennial_homeownership_0.pdf - - https://www.census.gov/library/stories/2021/04/number-of-children-living-only-with-their-mothers-has-doubled-in-past-50-years.html - - https://www.stanmor.com/blog/the-numbers-behind-homeowners-exploring-homeownership-statistics - - https://www.statista.com/topics/12130/k-12-education-in-the-united-states/ - - https://eduww.net/parent-resources/school-age-grade-levels/ - - https://read.dukeupress.edu/demography/article/61/5/1293/390842/Eight-Decades-of-Educational-Assortative-Mating-A - - https://www.axios.com/2025/11/16/mortgage-free-homes-map - - https://www.census.gov/data/tables/time-series/demo/families/families.html - - https://www.journals.uchicago.edu/doi/10.1086/702018 - - https://www.prb.org/resources/u-s-household-composition-shifts-as-the-population-grows-older-more-young-adults-live-with-parents/ - - https://www.huduser.gov/portal/pdredge/pdr-edge-housingat250-article-071025.html - - https://www.flexjobs.com/blog/post/stats-about-working-parents-us - - https://www.pewresearch.org/social-trends/2017/05/18/intermarriage-in-the-u-s-50-years-after-loving-v-virginia/ - - https://www.newyorkfed.org/research/staff_reports/sr682.html - - https://nces.ed.gov/programs/coe/indicator/cce/family-characteristics - - https://www.kidsdata.org/topic/557/children-rural-urban/pie - - https://nces.ed.gov/programs/digest/d18/tables/dt18_101.40.asp - - https://ipropertymanagement.com/research/average-length-of-homeownership - - https://www.visualcapitalist.com/mapped-how-much-of-each-u-s-states-population-lives-in-cities/ - - https://fred.stlouisfed.org/series/MSPUS - - https://www.census.gov/library/publications/2024/demo/p20-587.pdf - - https://en.wikipedia.org/wiki/Interracial_marriage_in_the_United_States - - https://www2.census.gov/library/publications/2024/demo/p20-587.pdf - - https://www.census.gov/library/stories/2018/07/interracial-marriages.html - - https://www.census.gov/newsroom/press-releases/2026/acs-5-year-gains-educational-attainment.html - - https://www.statista.com/statistics/679812/number-of-households-with-children-by-age/ - - https://dqydj.com/income-by-education/ - - https://www.bls.gov/opub/mlr/2026/article/industry-and-occupational-employment-projections-overview.htm - - https://www.census.gov/library/stories/2022/11/homeownership-by-young-households-below-pre-great-recession-levels.html - - https://americas.uli.org/suburbs-demographics-report/ - - https://www.census.gov/newsroom/facts-for-features/2015/cb15-ff17.html - - https://www.prb.org/resources/most-americans-marry-within-their-race/ - - https://nowbam.com/over-40-of-u-s-homeowners-are-mortgage-free/ - - https://nces.ed.gov/programs/raceindicators/indicator_rac.asp - - https://pmc.ncbi.nlm.nih.gov/articles/PMC4850739/ - - https://www.parealtors.org/blog/college-grads-more-likely-to-be-homeowners/ - - https://nces.ed.gov/programs/edge/Demographic/ACSchildren - - https://www.census.gov/topics/families/families-and-households/data/tables.html - - https://www.planning.org/pas/reports/report210.htm - - https://www.statista.com/statistics/457786/number-of-children-in-the-us-by-age/ - - https://www.childstats.gov/americaschildren23/family1.asp - - https://www.census.gov/library/publications/2025/demo/p70-204.html - - https://www.thezebra.com/resources/home/average-length-of-homeownership/ - - https://constructioncoverage.com/research/where-residents-have-paid-off-homes - - https://fivethirtyeight.com/features/whats-the-average-age-difference-in-a-couple/ - - https://aspe.hhs.gov/sites/default/files/private/pdf/172181/pf2.pdf - - https://www.statista.com/statistics/242189/disitribution-of-households-in-the-us-by-household-size/ - - https://www.bls.gov/opub/ted/2017/employment-in-families-with-children-in-2016.htm - - https://www.psychologytoday.com/us/blog/the-asymmetric-brain/202510/age-gaps-in-relationships-7-scientific-facts - - https://www.census.gov/content/dam/Census/library/publications/2022/demo/p70-174.pdf - - https://pmc.ncbi.nlm.nih.gov/articles/PMC5130094/ - - https://www.bls.gov/news.release/pdf/empsit.pdf - - https://www.pewresearch.org/short-reads/2023/08/03/almost-1-in-5-stay-at-home-parents-in-the-us-are-dads/ - - https://www.quora.com/How-many-U-S-households-have-children-between-the-ages-of-3-and-10 - - https://www.bls.gov/ces/ - - https://datacenter.kidscount.org/data/tables/101-child-population-by-age-group - - https://www.bls.gov/news.release/famee.nr0.htm - - https://www.synerahomes.com/blog/st-louis-suburbs-homes-prices-trends-and-top-neighborhoods-for-2026 - - https://flowingdata.com/2024/03/13/common-age-differences-married-couples/ - - https://www.consumeraffairs.com/finance/what-is-the-average-length-of-home-ownership.html - - https://www.housingwire.com/articles/homeowners-are-staying-in-place-twice-as-long-as-they-did-20-years-ago-redfin/ - - https://www.fastcompany.com/91429491/housing-market-mortgage-free-40-of-u-s-home-owners-why-the-number-keeps-growing - - https://www.bls.gov/opub/ted/2012/ted_20120427.htm -attributes: -- name: age - type: int - category: universal - description: Age of the individual in years - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 42.0 - std: 7.0 - min: 25.0 - max: 65.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://nces.ed.gov/programs/coe/pdf/Indicator_CCE/coe_cce_2016_05.pdf - note: Extrapolated from data showing parents of school-age children (5-17) tend - to be in their late 30s to mid-40s. Suburban homeowners tend to be slightly - older than average parents. - constraints: - - type: hard_min - value: 25.0 - expression: null - reason: Minimum realistic age for parent with school-age children - - type: hard_max - value: 65.0 - expression: null - reason: Maximum typical age for parent with K-12 children -- name: gender - type: categorical - category: universal - description: Gender identity of the individual - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - male - - female - weights: - - 0.48 - - 0.52 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/library/stories/2024/11/family-households.html - note: General US population gender distribution, slightly more females in household - reference persons - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: state - type: categorical - category: universal - description: US state where the household is located - scope: household - sampling: - strategy: independent - distribution: - type: categorical - options: - - CA - - TX - - FL - - NY - - PA - - IL - - OH - - GA - - NC - - MI - - NJ - - VA - - WA - - AZ - - MA - - TN - - IN - - MO - - MD - - WI - - CO - - MN - - SC - - AL - - LA - - KY - - OR - - OK - - CT - - UT - - IA - - NV - - AR - - MS - - KS - - NM - - NE - - ID - - WV - - HI - - NH - - ME - - MT - - RI - - DE - - SD - - ND - - AK - - VT - - WY - weights: - - 0.118 - - 0.088 - - 0.065 - - 0.059 - - 0.039 - - 0.038 - - 0.035 - - 0.032 - - 0.032 - - 0.03 - - 0.027 - - 0.026 - - 0.023 - - 0.022 - - 0.021 - - 0.021 - - 0.02 - - 0.019 - - 0.018 - - 0.018 - - 0.017 - - 0.017 - - 0.016 - - 0.015 - - 0.014 - - 0.013 - - 0.013 - - 0.012 - - 0.011 - - 0.01 - - 0.01 - - 0.009 - - 0.009 - - 0.009 - - 0.008 - - 0.006 - - 0.006 - - 0.005 - - 0.004 - - 0.004 - - 0.004 - - 0.003 - - 0.003 - - 0.003 - - 0.003 - - 0.002 - - 0.002 - - 0.002 - - 0.002 - - 0.002 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/data/tables/time-series/demo/families/households.html - note: Based on US population distribution by state from Census data - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: urban_rural - type: categorical - category: universal - description: Whether the household is in a suburban area (all suburban for this - population) - scope: household - sampling: - strategy: independent - distribution: - type: categorical - options: - - suburban - weights: - - 1.0 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://en.wikipedia.org/wiki/Homeownership_in_the_United_States - note: All agents in this population are suburban by specification. Three quarters - of suburban households are homeowners. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: education_level - type: categorical - category: universal - description: Highest level of education completed (high school, associate, bachelor, - graduate) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - high_school - - associate - - bachelor - - graduate - weights: - - 0.15 - - 0.25 - - 0.4 - - 0.2 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.point2homes.com/news/us-real-estate-news/homeownership-by-education-us.html - note: 'Based on homeowner education distribution: 70% have some college or more, - with bachelor''s degree holders at 40%. Suburban homeowners skew higher education - than general population.' - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: marital_status - type: categorical - category: universal - description: Marital status of the individual (married, divorced, single, widowed) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - married - - divorced - - single - - widowed - weights: - - 0.75 - - 0.15 - - 0.08 - - 0.02 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://www.stanmor.com/blog/the-numbers-behind-homeowners-exploring-homeownership-statistics - note: Married couples have highest homeownership rates. Among families with school-age - children, married couples dominate, especially in suburban homeownership. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: household_size - type: int - category: universal - description: Total number of people living in the household - scope: household - sampling: - strategy: independent - distribution: - type: normal - mean: 4.2 - std: 0.9 - min: 2.0 - max: 8.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.statista.com/statistics/183657/average-size-of-a-family-in-the-us/ - note: Average US household with children is larger than overall average (2.61). - Families with school-age children typically have 3-5 members. - constraints: - - type: hard_min - value: 2.0 - expression: null - reason: Minimum household size (parent + child) - - type: hard_max - value: 8.0 - expression: null - reason: Maximum typical household size - - type: expression - value: null - expression: num_children <= household_size - 1 - reason: At least one adult must be present with children -- name: employment_status - type: categorical - category: universal - description: Current employment status (full-time, part-time, self-employed, unemployed) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - full_time - - part_time - - self_employed - - unemployed - weights: - - 0.72 - - 0.12 - - 0.12 - - 0.04 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.bls.gov/news.release/famee.nr0.htm - note: Based on BLS Employment Characteristics of Families 2024 data. Parents with - children have high labor force participation, with most employed full-time. - Homeownership requires stable income. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: num_children - type: int - category: population_specific - description: Number of school-age children (K-12) in the household - scope: household - sampling: - strategy: independent - distribution: - type: normal - mean: 2.1 - std: 0.8 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: strong - method: researched - source: https://www.census.gov/library/stories/2024/11/family-households.html - note: Census data shows 19% of family households have 1 child under 18, 16% have - 2, and 9% have 3+. Average births per woman is 1.7, but families with school-age - children tend toward 2. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Population specified as having school-age children - - type: hard_max - value: 5.0 - expression: null - reason: Maximum typical number of school-age children - - type: expression - value: null - expression: num_children <= household_size - 1 - reason: Number of children cannot exceed household size minus adults -- name: community_involvement - type: categorical - category: population_specific - description: Level of involvement in community/neighborhood activities (high, medium, - low, none) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - high - - medium - - low - - none - weights: - - 0.25 - - 0.4 - - 0.25 - - 0.1 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: low - method: estimated - source: null - note: No specific data found for suburban parents' community involvement. Estimated - based on assumption that suburban homeowners with children have moderate to - high engagement in schools and community activities. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: openness - type: float - category: personality - description: Big Five trait reflecting openness to experience and intellectual curiosity - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.5 - std: 0.7 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Based on Big Five personality trait research showing general population - mean around 3.5 on 5-point scale. Suburban homeowners may be slightly more conventional, - but kept at population mean. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: conscientiousness - type: float - category: personality - description: Big Five trait reflecting organization, dependability, and self-discipline - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.8 - std: 0.6 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Homeownership and parenting typically correlate with higher conscientiousness. - Set slightly above population mean (3.5) to reflect responsibility and organization - required for homeownership. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: extraversion - type: float - category: personality - description: Big Five trait reflecting sociability, assertiveness, and energy level - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.4 - std: 0.75 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Based on Big Five population norms. Suburban parents show normal distribution - of extraversion, kept near population mean of 3.4-3.5. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: agreeableness - type: float - category: personality - description: Big Five trait reflecting compassion, cooperativeness, and trust in - others - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.7 - std: 0.65 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Parents and community-oriented individuals tend to score slightly higher - on agreeableness. Set above population mean (3.5) to reflect cooperative nature - of parenting and suburban community living. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: neuroticism - type: float - category: personality - description: Big Five trait reflecting emotional stability and tendency toward anxiety - scope: individual - sampling: - strategy: independent - distribution: - type: normal - mean: 3.0 - std: 0.75 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: null - note: Based on Big Five population norms around 3.0-3.2. Homeowners with stable - employment may have slightly lower neuroticism, but kept near population mean - for realism. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Minimum Big Five scale value - - type: hard_max - value: 5.0 - expression: null - reason: Maximum Big Five scale value -- name: risk_tolerance - type: categorical - category: personality - description: Individual's tolerance for financial and lifestyle risk (low, medium, - high) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - low - - medium - - high - weights: - - 0.35 - - 0.5 - - 0.15 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: low - method: estimated - source: null - note: Estimated based on assumption that suburban homeowners with children tend - toward conservative financial approaches (mortgage, stable neighborhood) but - with normal variation. Skewed toward low-medium risk tolerance. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: education_priority - type: categorical - category: personality - description: How highly the individual prioritizes children's education (low, medium, - high) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - low - - medium - - high - weights: - - 0.05 - - 0.3 - - 0.65 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: medium - method: extrapolated - source: https://nces.ed.gov/programs/coe/pdf/Indicator_CCE/coe_cce_2016_05.pdf - note: Suburban homeowners specifically choose neighborhoods for schools. This - population likely has high education priority given their investment in stable - housing and school districts. Strongly skewed toward high priority. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: environmental_consciousness - type: categorical - category: personality - description: Level of concern for environmental issues and sustainability (low, - medium, high) - scope: individual - sampling: - strategy: independent - distribution: - type: categorical - options: - - low - - medium - - high - weights: - - 0.25 - - 0.5 - - 0.25 - formula: null - depends_on: [] - modifiers: [] - grounding: - level: low - method: estimated - source: null - note: No specific data found for this population. Estimated with normal distribution - across levels, assuming typical variation in environmental consciousness among - suburban homeowners. - constraints: - - type: spec_expression - value: null - expression: sum(weights)==1 - reason: Weights must sum to 1 -- name: occupation_category - type: categorical - category: universal - description: General occupational category (professional, management, service, trades, - etc.) - scope: individual - sampling: - strategy: conditional - distribution: - type: categorical - options: - - professional - - management - - service - - sales - - trades - - administrative - weights: - - 0.35 - - 0.25 - - 0.12 - - 0.13 - - 0.1 - - 0.05 - formula: null - depends_on: - - employment_status - modifiers: - - when: employment_status == 'full_time' - multiply: null - add: null - weight_overrides: - professional: 0.35 - management: 0.25 - service: 0.1 - sales: 0.15 - trades: 0.1 - administrative: 0.05 - probability_override: null - - when: employment_status == 'part_time' - multiply: null - add: null - weight_overrides: - professional: 0.2 - management: 0.1 - service: 0.3 - sales: 0.2 - trades: 0.05 - administrative: 0.15 - probability_override: null - - when: employment_status == 'self_employed' - multiply: null - add: null - weight_overrides: - professional: 0.3 - management: 0.2 - service: 0.15 - sales: 0.15 - trades: 0.15 - administrative: 0.05 - probability_override: null - - when: employment_status == 'unemployed' - multiply: null - add: null - weight_overrides: - professional: 0.2 - management: 0.15 - service: 0.25 - sales: 0.15 - trades: 0.15 - administrative: 0.1 - probability_override: null - grounding: - level: medium - method: researched - source: BLS Employment Projections 2024-34 and occupational distribution data - note: Professional and management roles dominate suburban homeowner demographics - with school-age children. Distribution reflects higher education levels (high - school to graduate degrees) and full employment status typical of this population. - constraints: [] -- name: individual_income - type: int - category: universal - description: Annual individual income in USD before taxes - scope: individual - sampling: - strategy: conditional - distribution: - type: normal - mean: 75000.0 - std: 28000.0 - min: 25000.0 - max: 250000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - occupation_category - - education_level - modifiers: - - when: occupation_category == 'professional' and education_level == 'graduate' - multiply: 1.4 - add: 15000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'professional' and education_level == 'bachelor' - multiply: 1.2 - add: 5000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'management' and education_level == 'graduate' - multiply: 1.5 - add: 20000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'management' and education_level == 'bachelor' - multiply: 1.3 - add: 10000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'service' - multiply: 0.6 - add: -15000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'sales' and education_level == 'bachelor' - multiply: 1.0 - add: 0.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'trades' - multiply: 0.85 - add: -5000.0 - weight_overrides: null - probability_override: null - - when: occupation_category == 'administrative' - multiply: 0.7 - add: -10000.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Census Bureau 2024 data and DQYDJ income by education statistics - note: Median individual income $53,010 nationally in 2024, but suburban homeowners - with children skew higher. Base distribution centered at $75k reflects education - mix (high school to graduate) and professional/management occupations dominant - in this population. - constraints: - - type: hard_min - value: 25000.0 - expression: null - reason: Minimum income for employed individuals in this demographic - - type: hard_max - value: 250000.0 - expression: null - reason: Upper bound for individual income before extreme outliers -- name: household_income - type: int - category: universal - description: Total annual household income in USD before taxes - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 105000.0 - std: 38000.0 - min: 45000.0 - max: 350000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - individual_income - - household_size - modifiers: - - when: individual_income > 100000 and household_size >= 4 - multiply: 1.5 - add: 20000.0 - weight_overrides: null - probability_override: null - - when: individual_income > 100000 and household_size < 4 - multiply: 1.3 - add: 10000.0 - weight_overrides: null - probability_override: null - - when: individual_income <= 50000 - multiply: 0.9 - add: -5000.0 - weight_overrides: null - probability_override: null - - when: household_size >= 5 - multiply: 1.2 - add: 5000.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Census Bureau ACS 2020-2024 data showing US median household income $80,734 - note: Suburban homeowners with school-age children have higher incomes than national - median. Many are dual-income households. Base mean $105k reflects homeownership - requirements and child-rearing costs in suburban areas. - constraints: - - type: hard_min - value: 45000.0 - expression: null - reason: Minimum viable household income for suburban homeownership with children - - type: hard_max - value: 350000.0 - expression: null - reason: Upper bound before extreme high earners - - type: expression - value: null - expression: household_income >= individual_income - reason: Household income must be at least as high as individual income -- name: homeownership_years - type: int - category: population_specific - description: Number of years the household has owned their current home - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: null - std: 5.5 - min: 1.0 - max: null - mean_formula: max(1, min(age - 30, 20)) - std_formula: null - min_formula: null - max_formula: age - 22 - formula: null - depends_on: - - age - modifiers: - - when: age < 35 - multiply: 0.5 - add: -2.0 - weight_overrides: null - probability_override: null - - when: age >= 50 - multiply: 1.3 - add: 3.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Redfin and ConsumerAffairs 2024 data on homeownership tenure - note: 'National median homeownership duration is 11.9-12.3 years as of 2024. Formula - adjusts for age: younger homeowners (late 30s) likely owned 5-10 years, while - older (50+) may own 15-20 years. Cap at 20 years reflects that parents with - school-age children often purchased homes within last 15-20 years.' - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Must have owned for at least 1 year - - type: expression - value: null - expression: homeownership_years <= age - 22 - reason: Cannot have owned home longer than adult life (assuming minimum purchase - age 22) -- name: home_value - type: int - category: population_specific - description: Estimated market value of the owned home in USD - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 380000.0 - std: 145000.0 - min: 180000.0 - max: 1200000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - state - - household_income - modifiers: - - when: state in ['CA', 'MA', 'NY', 'WA', 'HI'] - multiply: 1.8 - add: 150000.0 - weight_overrides: null - probability_override: null - - when: state in ['CO', 'OR', 'NJ', 'MD', 'CT'] - multiply: 1.4 - add: 80000.0 - weight_overrides: null - probability_override: null - - when: state in ['MS', 'AR', 'WV', 'AL', 'KY'] - multiply: 0.6 - add: -80000.0 - weight_overrides: null - probability_override: null - - when: household_income > 150000 - multiply: 1.4 - add: 50000.0 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.75 - add: -30000.0 - weight_overrides: null - probability_override: null - grounding: - level: strong - method: researched - source: Zillow Home Value Index, Redfin, and NAR data for 2025-2026 - note: 'National median home value $360,727 (Zillow Jan 2026), median sale price - $423,261-$446,000 (Redfin). Suburban homes typically higher than national median. - Mean $380k with large std dev captures state variation: CA/HI ($600k-800k+), - TX/FL ($300k-400k), Midwest ($250k-350k).' - constraints: - - type: hard_min - value: 180000.0 - expression: null - reason: Minimum suburban single-family home value - - type: hard_max - value: 1200000.0 - expression: null - reason: Upper bound for typical suburban homes before luxury segment -- name: mortgage_status - type: categorical - category: population_specific - description: Current mortgage status (paying mortgage, paid off, no mortgage) - scope: household - sampling: - strategy: conditional - distribution: - type: categorical - options: - - paying_mortgage - - paid_off - weights: - - 0.72 - - 0.28 - formula: null - depends_on: - - homeownership_years - - age - modifiers: - - when: homeownership_years >= 15 and age >= 50 - multiply: null - add: null - weight_overrides: - paying_mortgage: 0.4 - paid_off: 0.6 - probability_override: null - - when: homeownership_years < 10 - multiply: null - add: null - weight_overrides: - paying_mortgage: 0.95 - paid_off: 0.05 - probability_override: null - - when: homeownership_years >= 10 and homeownership_years < 15 - multiply: null - add: null - weight_overrides: - paying_mortgage: 0.75 - paid_off: 0.25 - probability_override: null - grounding: - level: strong - method: researched - source: Census Bureau 2024 ACS and Federal Reserve SHED data - note: Nationally, 40.3% of all homeowners are mortgage-free (2024), but this includes - many retirees. For working-age homeowners under 65, only 27.7% own free and - clear. Suburban parents with school-age children are primarily working-age (35-55), - so base rate set at 28% paid off, 72% with mortgage. - constraints: [] -- name: youngest_child_age - type: int - category: population_specific - description: Age of the youngest school-age child in years - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 8.0 - std: 3.5 - min: 5.0 - max: 17.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - num_children - modifiers: - - when: num_children == 1 - multiply: 1.2 - add: 1.0 - weight_overrides: null - probability_override: null - - when: num_children >= 3 - multiply: 0.8 - add: -1.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Population demographics and typical family patterns - note: For households with mean 2.1 school-age children, youngest child typically - in elementary or middle school range. Mean of 8 years reflects mix of families - with young elementary (5-7), middle elementary (8-10), and middle school (11-13) - as youngest. - constraints: - - type: hard_min - value: 5.0 - expression: null - reason: School-age children are K-12, minimum age 5 (kindergarten) - - type: hard_max - value: 17.0 - expression: null - reason: Maximum K-12 age before college - - type: expression - value: null - expression: youngest_child_age <= oldest_child_age - reason: Youngest child cannot be older than oldest child -- name: oldest_child_age - type: int - category: population_specific - description: Age of the oldest school-age child in years - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 13.0 - std: 3.8 - min: 5.0 - max: 18.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: youngest_child_age + 15 - formula: null - depends_on: - - num_children - - youngest_child_age - modifiers: - - when: num_children == 1 - multiply: 1.0 - add: 0.0 - weight_overrides: null - probability_override: null - - when: num_children >= 3 - multiply: 1.2 - add: 2.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Family demographic patterns and typical child spacing - note: With mean 2.1 children and youngest averaging 8 years, oldest child typically - in middle/high school range. Mean 13 years allows for 2-5 year spacing between - children, common in American families. - constraints: - - type: hard_min - value: 5.0 - expression: null - reason: School-age minimum (K-12) - - type: hard_max - value: 18.0 - expression: null - reason: Maximum K-12 age - - type: expression - value: null - expression: oldest_child_age >= youngest_child_age - reason: Oldest child must be at least as old as youngest -- name: school_type - type: categorical - category: population_specific - description: Type of school children attend (public, private, charter, homeschool) - scope: household - sampling: - strategy: conditional - distribution: - type: categorical - options: - - public - - private - - charter - - homeschool - weights: - - 0.75 - - 0.15 - - 0.07 - - 0.03 - formula: null - depends_on: - - household_income - modifiers: - - when: household_income > 150000 - multiply: null - add: null - weight_overrides: - public: 0.4 - private: 0.45 - charter: 0.1 - homeschool: 0.05 - probability_override: null - - when: household_income >= 100000 and household_income <= 150000 - multiply: null - add: null - weight_overrides: - public: 0.6 - private: 0.25 - charter: 0.12 - homeschool: 0.03 - probability_override: null - - when: household_income < 100000 - multiply: null - add: null - weight_overrides: - public: 0.75 - private: 0.1 - charter: 0.12 - homeschool: 0.03 - probability_override: null - grounding: - level: medium - method: researched - source: National Center for Education Statistics (NCES) data - note: 'Nationally, approximately 83% of K-12 students attend public schools (including - charters), 10% private, 3-4% homeschool. Suburban families slightly higher private - school enrollment than national average. Base weights: 75% public, 15% private, - 7% charter, 3% homeschool.' - constraints: [] -- name: dual_income_household - type: boolean - category: population_specific - description: Whether the household has two income earners - scope: household - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.68 - formula: null - depends_on: - - marital_status - - household_size - modifiers: - - when: marital_status == 'married' and household_size >= 3 - multiply: null - add: null - weight_overrides: null - probability_override: 0.8 - - when: marital_status == 'married' and household_size < 3 - multiply: null - add: null - weight_overrides: null - probability_override: 0.7 - - when: marital_status in ['divorced', 'single'] - multiply: null - add: null - weight_overrides: null - probability_override: 0.3 - - when: marital_status == 'widowed' - multiply: null - add: null - weight_overrides: null - probability_override: 0.2 - grounding: - level: medium - method: estimated - source: BLS and Census labor force participation data - note: Among married couples with children, approximately 65-70% are dual-earner - households. For suburban homeowners with school-age children where homeownership - and childcare costs are high, dual income is common. Base probability 68%. - constraints: [] -- name: commute_time - type: int - category: population_specific - description: One-way commute time to work in minutes - scope: individual - sampling: - strategy: conditional - distribution: - type: normal - mean: 28.0 - std: 12.0 - min: 5.0 - max: 90.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - employment_status - modifiers: - - when: employment_status == 'full_time' - multiply: 1.1 - add: 2.0 - weight_overrides: null - probability_override: null - - when: employment_status == 'part_time' - multiply: 0.85 - add: -3.0 - weight_overrides: null - probability_override: null - - when: employment_status == 'self_employed' - multiply: 0.7 - add: -5.0 - weight_overrides: null - probability_override: null - - when: employment_status == 'unemployed' - multiply: 0.0 - add: -28.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: researched - source: Census Bureau American Community Survey commute data - note: National mean commute time approximately 26-27 minutes. Suburban residents - typically have slightly longer commutes (28-30 min) than national average as - they commute to urban job centers. Distribution includes some remote workers - with minimal commute. - constraints: - - type: hard_min - value: 5.0 - expression: null - reason: Minimum commute time for those who work outside home - - type: hard_max - value: 90.0 - expression: null - reason: Maximum reasonable one-way commute -- name: vehicle_count - type: int - category: population_specific - description: Number of vehicles owned by the household - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 2.5 - std: 0.7 - min: 1.0 - max: 5.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - household_size - - household_income - modifiers: - - when: household_size >= 5 and household_income > 100000 - multiply: 1.3 - add: 1.0 - weight_overrides: null - probability_override: null - - when: household_size <= 3 - multiply: 0.8 - add: 0.0 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.75 - add: -0.5 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Federal Highway Administration and household transportation patterns - note: Suburban households with school-age children typically own 2-3 vehicles. - With mean household size 4.2 and dual-earner prevalence, 2-3 vehicles common - for work commutes, school transport, and activities. Mean 2.5 reflects this - pattern. - constraints: - - type: hard_min - value: 1.0 - expression: null - reason: Suburban households require at least one vehicle - - type: hard_max - value: 5.0 - expression: null - reason: Practical maximum for typical household -- name: pta_membership - type: boolean - category: population_specific - description: Whether the individual is a member of Parent-Teacher Association - scope: individual - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.35 - formula: null - depends_on: - - community_involvement - modifiers: - - when: community_involvement == 'high' - multiply: null - add: null - weight_overrides: null - probability_override: 0.85 - - when: community_involvement == 'medium' - multiply: null - add: null - weight_overrides: null - probability_override: 0.55 - - when: community_involvement == 'low' - multiply: null - add: null - weight_overrides: null - probability_override: 0.25 - - when: community_involvement == 'none' - multiply: null - add: null - weight_overrides: null - probability_override: 0.05 - grounding: - level: low - method: estimated - source: National PTA membership trends and community involvement patterns - note: National PTA membership approximately 4 million across 22,000+ locations. - Not all parents with school-age children join. Estimated 30-40% of suburban - parents with medium-high community involvement join PTA. Base probability 35%. - constraints: [] -- name: home_office - type: boolean - category: population_specific - description: Whether the home has a dedicated home office space - scope: household - sampling: - strategy: conditional - distribution: - type: boolean - probability_true: 0.48 - formula: null - depends_on: - - employment_status - - home_value - modifiers: - - when: employment_status == 'self_employed' - multiply: null - add: null - weight_overrides: null - probability_override: 0.85 - - when: employment_status == 'full_time' and home_value > 400000 - multiply: null - add: null - weight_overrides: null - probability_override: 0.65 - - when: employment_status == 'full_time' and home_value <= 400000 - multiply: null - add: null - weight_overrides: null - probability_override: 0.45 - - when: employment_status == 'part_time' - multiply: null - add: null - weight_overrides: null - probability_override: 0.4 - - when: employment_status == 'unemployed' - multiply: null - add: null - weight_overrides: null - probability_override: 0.3 - grounding: - level: medium - method: estimated - source: Post-pandemic work-from-home trends and housing patterns - note: Post-2020, dedicated home office space became more common. Suburban homes - with higher values and professional/management workers have higher likelihood. - Estimated 45-50% of suburban professional households have dedicated home office - space. Base probability 48%. - constraints: [] -- name: household_savings - type: int - category: population_specific - description: Total household savings and investments in USD - scope: household - sampling: - strategy: conditional - distribution: - type: lognormal - mean: 75000.0 - std: 95000.0 - min: 5000.0 - max: 800000.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - household_income - - age - modifiers: - - when: household_income > 150000 and age >= 45 - multiply: 2.0 - add: 50000.0 - weight_overrides: null - probability_override: null - - when: household_income > 150000 and age < 45 - multiply: 1.5 - add: 25000.0 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.5 - add: -20000.0 - weight_overrides: null - probability_override: null - - when: age >= 50 - multiply: 1.6 - add: 30000.0 - weight_overrides: null - probability_override: null - - when: age < 35 - multiply: 0.6 - add: -15000.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Federal Reserve Survey of Consumer Finances and savings patterns - note: Household savings highly skewed (lognormal). Median US household savings - much lower than mean. For suburban homeowners aged 35-55 with median income - $105k, typical savings $40k-120k. Lognormal with mean $75k, high std dev captures - wide variation. - constraints: - - type: hard_min - value: 5000.0 - expression: null - reason: Minimum emergency savings for homeowners - - type: hard_max - value: 800000.0 - expression: null - reason: Upper bound for typical household savings before ultra-wealthy -- name: childcare_expense - type: int - category: population_specific - description: Monthly childcare expenses in USD (afterschool, daycare, etc.) - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 650.0 - std: 420.0 - min: 0.0 - max: 2500.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - num_children - - youngest_child_age - modifiers: - - when: num_children >= 3 and youngest_child_age < 6 - multiply: 2.0 - add: 500.0 - weight_overrides: null - probability_override: null - - when: num_children >= 3 and youngest_child_age >= 6 - multiply: 1.5 - add: 200.0 - weight_overrides: null - probability_override: null - - when: youngest_child_age >= 12 - multiply: 0.4 - add: -300.0 - weight_overrides: null - probability_override: null - - when: youngest_child_age < 6 - multiply: 1.8 - add: 400.0 - weight_overrides: null - probability_override: null - - when: num_children == 1 - multiply: 0.7 - add: -100.0 - weight_overrides: null - probability_override: null - grounding: - level: medium - method: estimated - source: Childcare cost surveys and BLS Consumer Expenditure data - note: School-age childcare less expensive than infant/toddler care. Afterschool - programs typically $200-500/child/month. Some families need no care (stay-at-home - parent, older children), others need full afterschool care for 2+ children. - Mean $650/month reflects mix. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Some families have no childcare expenses (older children, family help) - - type: hard_max - value: 2500.0 - expression: null - reason: Maximum for afterschool care for multiple school-age children -- name: extracurricular_count - type: int - category: population_specific - description: Number of extracurricular activities children are enrolled in (sports, - music, etc.) - scope: household - sampling: - strategy: conditional - distribution: - type: normal - mean: 3.2 - std: 1.8 - min: 0.0 - max: 10.0 - mean_formula: null - std_formula: null - min_formula: null - max_formula: null - formula: null - depends_on: - - num_children - - household_income - modifiers: - - when: num_children >= 3 and household_income > 120000 - multiply: 1.5 - add: 2.0 - weight_overrides: null - probability_override: null - - when: num_children == 1 - multiply: 0.8 - add: -0.5 - weight_overrides: null - probability_override: null - - when: household_income > 150000 - multiply: 1.4 - add: 1.5 - weight_overrides: null - probability_override: null - - when: household_income < 80000 - multiply: 0.65 - add: -1.0 - weight_overrides: null - probability_override: null - grounding: - level: low - method: estimated - source: Youth sports and activities participation surveys - note: Average US child participates in 1-2 organized activities (sports, music, - scouts, etc.). With mean 2.1 children per household, total household activities - approximately 2-4. Higher-income suburban families tend toward more activities. - Mean 3.2 reflects 1.5 activities per child on average. - constraints: - - type: hard_min - value: 0.0 - expression: null - reason: Some families have no organized extracurriculars - - type: hard_max - value: 10.0 - expression: null - reason: Maximum total activities across all children in household -sampling_order: -- age -- agreeableness -- community_involvement -- conscientiousness -- education_level -- education_priority -- employment_status -- commute_time -- environmental_consciousness -- extraversion -- gender -- homeownership_years -- household_size -- marital_status -- dual_income_household -- mortgage_status -- neuroticism -- num_children -- occupation_category -- individual_income -- household_income -- extracurricular_count -- household_savings -- openness -- pta_membership -- risk_tolerance -- school_type -- state -- home_value -- home_office -- urban_rural -- vehicle_count -- youngest_child_age -- childcare_expense -- oldest_child_age diff --git a/test-v2-e2e/study.db b/test-v2-e2e/study.db deleted file mode 100644 index 5319a94..0000000 Binary files a/test-v2-e2e/study.db and /dev/null differ diff --git a/tests/test_agent_focus.py b/tests/test_agent_focus.py index 8938581..321ebdb 100644 --- a/tests/test_agent_focus.py +++ b/tests/test_agent_focus.py @@ -489,10 +489,13 @@ def test_promoted_dependents_preserve_household_names(self): for dep in promoted: first_name = dep.get("first_name") assert first_name, "Promoted dependents must have first_name" + last_name = dep.get("last_name") + assert last_name, "Promoted dependents must have last_name" hh = households.get(dep["household_id"]) assert hh is not None dependent_names = {d.get("name") for d in hh.get("dependent_data", [])} - assert first_name in dependent_names, ( + full_name = f"{first_name} {last_name}".strip() + assert full_name in dependent_names, ( "Promoted dependent names should stay aligned with generated dependent records" ) diff --git a/tests/test_cli.py b/tests/test_cli.py index e61d40e..7b4d948 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -5,16 +5,33 @@ import sqlite3 from pathlib import Path +import pytest from typer.testing import CliRunner from extropy.cli.app import app -from extropy.cli.commands.validate import _is_scenario_file +from extropy.config import ExtropyConfig, configure, reset_config +from extropy.cli.commands.validate import ( + _canonical_yaml_path_for_invalid, + _is_persona_file, + _is_scenario_file, +) from extropy.population.network.config import NetworkConfig from extropy.storage import open_study_db runner = CliRunner() +@pytest.fixture(autouse=True) +def _force_human_cli_mode(): + """Keep CLI tests deterministic regardless local ~/.config/extropy/config.json.""" + reset_config() + cfg = ExtropyConfig() + cfg.cli.mode = "human" + configure(cfg) + yield + reset_config() + + class TestConfigCommand: """Tests for the config command.""" @@ -56,6 +73,55 @@ def test_scenario_filename_detection(self): assert _is_scenario_file(Path("foo.scenario.yaml")) assert not _is_scenario_file(Path("population.yaml")) + def test_invalid_filename_detection(self): + assert _is_scenario_file(Path("scenario.v1.invalid.v1.yaml")) + assert _is_persona_file(Path("persona.v1.invalid.v2.yaml")) + assert not _is_persona_file(Path("population.v1.invalid.v1.yaml")) + + def test_invalid_path_canonicalization(self): + p = Path("scenario.v4.invalid.v3.yaml") + canonical = _canonical_yaml_path_for_invalid(p) + assert canonical is not None + assert canonical.name == "scenario.v4.yaml" + + def test_validate_promotes_invalid_population_file(self, tmp_path): + invalid_pop = tmp_path / "population.v1.invalid.v1.yaml" + invalid_pop.write_text(""" +meta: + description: Test population + geography: USA + +grounding: + overall: low + sources_count: 0 + strong_count: 0 + medium_count: 0 + low_count: 1 + +attributes: + - name: age + type: int + category: universal + description: Age in years + sampling: + strategy: independent + distribution: + type: uniform + min: 18 + max: 65 + grounding: + level: low + method: estimated + +sampling_order: + - age +""") + + result = runner.invoke(app, ["validate", str(invalid_pop)]) + assert result.exit_code == 0, result.output + assert not invalid_pop.exists() + assert (tmp_path / "population.v1.yaml").exists() + class TestVersionFlag: """Test the --version flag.""" @@ -121,7 +187,6 @@ def _setup_study_with_scenario(self, tmp_path): meta: description: Test population geography: USA - agent_focus: test agents grounding: overall: low diff --git a/tests/test_compiler.py b/tests/test_compiler.py index 980974b..6b2d77d 100644 --- a/tests/test_compiler.py +++ b/tests/test_compiler.py @@ -118,7 +118,6 @@ def test_creates_valid_scenario( ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, SpreadConfig, OutcomeConfig, OutcomeDefinition, @@ -142,7 +141,6 @@ def test_creates_valid_scenario( ExposureChannel( name="broadcast", description="Mass broadcast", - reach="broadcast", credibility_modifier=1.0, ), ], @@ -155,7 +153,6 @@ def test_creates_valid_scenario( mock_interaction.return_value = ( InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Agents observe each other", ), SpreadConfig(share_probability=0.3), @@ -210,7 +207,6 @@ def test_progress_callback_called( ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, SpreadConfig, OutcomeConfig, OutcomeDefinition, @@ -232,7 +228,6 @@ def test_progress_callback_called( ExposureChannel( name="b", description="Broadcast", - reach="broadcast", credibility_modifier=1.0, ) ], @@ -240,7 +235,6 @@ def test_progress_callback_called( ) mock_interaction.return_value = ( InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Agents observe each other", ), SpreadConfig(share_probability=0.3), diff --git a/tests/test_conversations.py b/tests/test_conversations.py index 6d83163..b30740b 100644 --- a/tests/test_conversations.py +++ b/tests/test_conversations.py @@ -25,7 +25,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, OutcomeConfig, ScenarioMeta, ScenarioSimConfig, @@ -60,7 +59,6 @@ def _make_scenario() -> ScenarioSpec: ExposureChannel( name="broadcast", description="Broadcast", - reach="broadcast", credibility_modifier=1.0, ) ], @@ -74,7 +72,6 @@ def _make_scenario() -> ScenarioSpec: ], ), interaction=InteractionConfig( - primary_model=InteractionType.DIRECT_CONVERSATION, description="Direct conversations", ), spread=SpreadConfig(share_probability=0.4), diff --git a/tests/test_engine.py b/tests/test_engine.py index 7d0bb51..c71e788 100644 --- a/tests/test_engine.py +++ b/tests/test_engine.py @@ -28,7 +28,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, OutcomeConfig, OutcomeDefinition, OutcomeType, @@ -74,7 +73,6 @@ def minimal_scenario(): ExposureChannel( name="broadcast", description="Mass broadcast channel", - reach="broadcast", credibility_modifier=1.0, ), ], @@ -88,7 +86,6 @@ def minimal_scenario(): ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Agents observe each other's public statements", ), spread=SpreadConfig( diff --git a/tests/test_estimator.py b/tests/test_estimator.py index ef9afbd..f5a07d7 100644 --- a/tests/test_estimator.py +++ b/tests/test_estimator.py @@ -34,7 +34,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, SpreadConfig, OutcomeConfig, OutcomeDefinition, @@ -157,7 +156,6 @@ def small_scenario() -> ScenarioSpec: ExposureChannel( name="email", description="Email broadcast", - reach="broadcast", credibility_modifier=1.0, ), ], @@ -171,7 +169,6 @@ def small_scenario() -> ScenarioSpec: ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Social media style observation", ), spread=SpreadConfig( diff --git a/tests/test_household_hydrator.py b/tests/test_household_hydrator.py new file mode 100644 index 0000000..3d94fc1 --- /dev/null +++ b/tests/test_household_hydrator.py @@ -0,0 +1,27 @@ +from extropy.population.spec_builder.schemas import build_household_config_schema +from extropy.population.spec_builder.hydrators.household import _parse_household_config + + +def test_household_schema_constrains_assortative_attribute_enum(): + schema = build_household_config_schema( + allowed_assortative_attributes=["education_level", "political_identity"] + ) + + attribute_schema = schema["properties"]["assortative_mating"]["items"][ + "properties" + ]["attribute"] + assert attribute_schema["type"] == "string" + assert attribute_schema["enum"] == ["education_level", "political_identity"] + + +def test_parse_household_config_filters_unknown_assortative_attributes(): + data = { + "assortative_mating": [ + {"attribute": "education_level", "correlation": 0.65}, + {"attribute": "technology_adoption_posture", "correlation": 0.45}, + ] + } + + config = _parse_household_config(data, allowed_attributes=["education_level"]) + + assert config.assortative_mating == {"education_level": 0.65} diff --git a/tests/test_household_sampling.py b/tests/test_household_sampling.py index 115d727..232ce4f 100644 --- a/tests/test_household_sampling.py +++ b/tests/test_household_sampling.py @@ -9,6 +9,7 @@ GroundingInfo, NormalDistribution, CategoricalDistribution, + BooleanDistribution, HouseholdType, HouseholdConfig, Dependent, @@ -30,14 +31,10 @@ _DEFAULT_CONFIG = HouseholdConfig() -def _make_household_spec( - size: int = 100, agent_focus: str | None = "couples" -) -> PopulationSpec: +def _make_household_spec(size: int = 100) -> PopulationSpec: """Create a minimal spec with household-scoped attributes.""" return PopulationSpec( - meta=SpecMeta( - description="Test household spec", size=size, agent_focus=agent_focus - ), + meta=SpecMeta(description="Test household spec", size=size), grounding=GroundingSummary( overall="medium", sources_count=1, @@ -114,7 +111,6 @@ def _make_household_spec( category="universal", description="Education", scope="partner_correlated", # Correlated between partners - correlation_rate=0.6, # ~60% same education sampling=SamplingConfig( strategy="independent", distribution=CategoricalDistribution( @@ -222,7 +218,7 @@ def test_correlate_age(self): """Age correlation uses gaussian offset from HouseholdConfig.""" rng = random.Random(42) partner_age = correlate_partner_attribute( - "age", "int", 35, None, rng, _DEFAULT_CONFIG + "age", "int", 35, rng, _DEFAULT_CONFIG ) assert isinstance(partner_age, int) assert partner_age >= 18 @@ -237,7 +233,6 @@ def test_correlate_race_same_rate(self): "race_ethnicity", "categorical", "white", - None, # Uses per-group rates from config rng, _DEFAULT_CONFIG, available_options=["white", "black", "hispanic"], @@ -249,7 +244,7 @@ def test_correlate_race_same_rate(self): assert 0.80 < rate < 0.97, f"Same-race rate {rate:.2f} outside expected range" def test_correlate_education_assortative(self): - """Education uses explicit correlation_rate.""" + """Education uses household assortative-mating defaults.""" rng = random.Random(42) same_count = 0 trials = 500 @@ -258,7 +253,6 @@ def test_correlate_education_assortative(self): "education_level", "categorical", "bachelors", - 0.6, # Explicit correlation rate rng, _DEFAULT_CONFIG, available_options=["high_school", "bachelors", "masters", "doctorate"], @@ -266,11 +260,11 @@ def test_correlate_education_assortative(self): if result == "bachelors": same_count += 1 rate = same_count / trials - # Expect ~60% same education - assert 0.50 < rate < 0.75, f"Assortative rate {rate:.2f} outside expected range" + # Expect moderate assortative matching from default config table + assert 0.50 < rate < 0.70, f"Assortative rate {rate:.2f} outside expected range" def test_correlate_with_default_rate(self): - """Unknown attributes use default_same_group_rate when no explicit rate.""" + """Unknown attributes use default_same_group_rate.""" rng = random.Random(42) same_count = 0 trials = 500 @@ -279,7 +273,6 @@ def test_correlate_with_default_rate(self): "some_attribute", "categorical", "value_a", - None, # No explicit rate, uses default rng, _DEFAULT_CONFIG, available_options=["value_a", "value_b", "value_c"], @@ -292,9 +285,7 @@ def test_correlate_with_default_rate(self): def test_generate_dependents_no_kids(self): rng = random.Random(42) - deps = generate_dependents( - HouseholdType.COUPLE, 2, 2, 40, rng, _DEFAULT_CONFIG, name_config=None - ) + deps = generate_dependents(HouseholdType.COUPLE, 2, 2, 40, rng, _DEFAULT_CONFIG) assert len(deps) == 0 def test_generate_dependents_with_kids(self): @@ -306,7 +297,6 @@ def test_generate_dependents_with_kids(self): 40, rng, _DEFAULT_CONFIG, - name_config=None, ) assert len(deps) == 2 for d in deps: @@ -323,12 +313,30 @@ def test_generate_dependents_multi_generational(self): 45, rng, _DEFAULT_CONFIG, - name_config=None, ) assert len(deps) == 2 relationships = [d.relationship for d in deps] assert any(r in ("father", "mother") for r in relationships) + def test_generate_dependents_caps_elderly_age(self): + rng = random.Random(42) + config = HouseholdConfig( + elderly_min_offset=25, + elderly_max_offset=35, + max_elderly_dependent_age=100, + ) + deps = generate_dependents( + HouseholdType.MULTI_GENERATIONAL, + 4, + 2, + 80, + rng, + config, + ) + elder_ages = [d.age for d in deps if d.relationship in ("father", "mother")] + assert elder_ages + assert max(elder_ages) <= 100 + def test_estimate_household_count(self): assert estimate_household_count(100, _DEFAULT_CONFIG) == 40 assert estimate_household_count(1, _DEFAULT_CONFIG) == 1 @@ -370,6 +378,38 @@ def test_household_scoped_attrs_shared(self): f"{agent['state']} != {partner['state']}" ) + def test_household_members_share_surname(self): + spec = _make_household_spec(size=120) + result = sample_population(spec, count=120, seed=7) + by_household: dict[str, list[dict]] = {} + for agent in result.agents: + hid = agent.get("household_id") + if isinstance(hid, str): + by_household.setdefault(hid, []).append(agent) + + for members in by_household.values(): + primary = next( + (m for m in members if m.get("household_role") == "adult_primary"), + members[0], + ) + primary_last = primary.get("last_name") + if not primary_last: + continue + + for member in members: + assert member.get("last_name") == primary_last + + partner_npc = primary.get("partner_npc") + if isinstance(partner_npc, dict) and partner_npc.get("last_name"): + assert partner_npc.get("last_name") == primary_last + + for dep in primary.get("dependents", []) or []: + if not isinstance(dep, dict): + continue + dep_name = dep.get("name") + if isinstance(dep_name, str) and dep_name.strip(): + assert dep_name.split()[-1] == primary_last + def test_dependent_count_matches(self): spec = _make_household_spec(size=50) result = sample_population(spec, count=50, seed=42) @@ -457,7 +497,7 @@ def test_country_correlation(self): for _ in range(total): primary_country = rng.choice(countries) partner_country = correlate_partner_attribute( - "country", "categorical", primary_country, None, rng, config, countries + "country", "categorical", primary_country, rng, config, countries ) if partner_country == primary_country: same_country += 1 @@ -465,3 +505,201 @@ def test_country_correlation(self): rate = same_country / total # Should be close to 0.95 (within statistical margin) assert 0.90 < rate < 0.99, f"Same-country rate {rate:.2%} out of expected range" + + +class TestHouseholdCoherenceNormalization: + def test_non_partnered_marital_categories_preserved(self): + spec = _make_household_spec(size=500) + spec.attributes.append( + AttributeSpec( + name="marital_status", + type="categorical", + category="universal", + description="Marital status", + scope="individual", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + type="categorical", + options=[ + "Married/partnered", + "Single", + "Divorced/separated", + "Widowed", + ], + weights=[0.25, 0.35, 0.25, 0.15], + ), + ), + grounding=GroundingInfo(level="medium", method="estimated"), + ) + ) + spec.sampling_order.append("marital_status") + + result = sample_population(spec, count=500, seed=42, agent_focus_mode="couples") + adults = [ + a + for a in result.agents + if str(a.get("household_role", "")).startswith("adult_") + ] + non_partnered = [ + a for a in adults if not (a.get("partner_id") or a.get("partner_npc")) + ] + assert non_partnered + assert all( + a.get("marital_status") != "Married/partnered" for a in non_partnered + ) + preserved = sum( + 1 + for a in non_partnered + if a.get("marital_status") in {"Divorced/separated", "Widowed"} + ) + assert preserved > 0 + + def test_has_children_matches_realized_dependents_for_adults(self): + spec = _make_household_spec(size=400) + spec.attributes.append( + AttributeSpec( + name="has_children", + type="boolean", + category="universal", + description="Children in household", + scope="individual", + identity_type="parental_status", + sampling=SamplingConfig( + strategy="independent", + distribution=BooleanDistribution( + type="boolean", probability_true=0.5 + ), + ), + grounding=GroundingInfo(level="medium", method="estimated"), + ) + ) + spec.attributes.append( + AttributeSpec( + name="marital_status", + type="categorical", + category="universal", + description="Marital status", + scope="individual", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + type="categorical", + options=[ + "Married/partnered", + "Single", + "Divorced/separated", + "Widowed", + ], + weights=[0.25, 0.45, 0.2, 0.1], + ), + ), + grounding=GroundingInfo(level="medium", method="estimated"), + ) + ) + spec.sampling_order.extend(["has_children", "marital_status"]) + + result = sample_population(spec, count=400, seed=42, agent_focus_mode="couples") + adults = [ + a + for a in result.agents + if str(a.get("household_role", "")).startswith("adult_") + ] + assert adults + for agent in adults: + dependents = agent.get("dependents", []) or [] + has_child_dep = any( + isinstance(dep, dict) + and ( + str(dep.get("relationship", "")).lower() + in {"son", "daughter", "child", "stepchild"} + or ( + isinstance(dep.get("age"), (int, float)) + and 0 <= int(dep["age"]) <= 17 + ) + ) + for dep in dependents + ) + assert bool(agent.get("has_children")) == has_child_dep + + def test_young_adult_retired_values_are_normalized(self): + spec = _make_individual_spec(size=300) + spec.attributes.append( + AttributeSpec( + name="employment_sector", + type="categorical", + category="universal", + description="Employment sector", + semantic_type="employment", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + type="categorical", + options=["Retired", "Private sector", "Unemployed"], + weights=[0.8, 0.1, 0.1], + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + ) + spec.sampling_order.append("employment_sector") + for attr in spec.attributes: + if attr.name == "age": + attr.sampling.distribution = NormalDistribution( + type="normal", + mean=24, + std=2, + min=18, + max=29, + ) + + result = sample_population(spec, count=300, seed=42) + assert all(a["age"] < 30 for a in result.agents) + assert all(a.get("employment_sector") != "Retired" for a in result.agents) + + def test_education_normalization_for_young_adults(self): + spec = _make_individual_spec(size=400) + spec.attributes.append( + AttributeSpec( + name="education_level", + type="categorical", + category="universal", + description="Education level", + semantic_type="education", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + type="categorical", + options=[ + "HS diploma/GED", + "Some college", + "Bachelor's degree", + "Graduate Degree", + ], + weights=[0.05, 0.05, 0.2, 0.7], + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + ) + spec.sampling_order.append("education_level") + for attr in spec.attributes: + if attr.name == "age": + attr.sampling.distribution = NormalDistribution( + type="normal", + mean=19.5, + std=1.2, + min=18, + max=21, + ) + + result = sample_population(spec, count=400, seed=42) + assert all(a["age"] < 22 for a in result.agents) + assert all(a.get("education_level") != "Graduate Degree" for a in result.agents) + assert all( + not ( + a["age"] in (18, 19) + and a.get("education_level") in {"Bachelor's degree", "Graduate Degree"} + ) + for a in result.agents + ) diff --git a/tests/test_integration_timestep.py b/tests/test_integration_timestep.py index 207969c..8eab4fa 100644 --- a/tests/test_integration_timestep.py +++ b/tests/test_integration_timestep.py @@ -25,7 +25,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, OutcomeConfig, OutcomeDefinition, OutcomeType, @@ -95,14 +94,12 @@ def _make_scenario( ExposureChannel( name="broadcast", description="Broadcast", - reach="broadcast", credibility_modifier=1.0, ), ], rules=rules, ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Observe", ), spread=SpreadConfig(share_probability=share_probability), diff --git a/tests/test_modifier_precedence.py b/tests/test_modifier_precedence.py new file mode 100644 index 0000000..a1f80ec --- /dev/null +++ b/tests/test_modifier_precedence.py @@ -0,0 +1,211 @@ +"""Tests for deterministic modifier precedence and overlap warnings.""" + +import random +from datetime import datetime + +from extropy.core.models.population import ( + AttributeSpec, + CategoricalDistribution, + GroundingInfo, + GroundingSummary, + Modifier, + PopulationSpec, + SamplingConfig, + SpecMeta, + UniformDistribution, + BooleanDistribution, +) +from extropy.population.modifier_precedence import choose_modifier_precedence +from extropy.population.sampler.modifiers import apply_modifiers_and_sample +from extropy.population.validator.semantic import run_semantic_checks + + +def _categorical_attr(name: str, options: list[str]) -> AttributeSpec: + return AttributeSpec( + name=name, + type="categorical", + category="population_specific", + description=name, + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + type="categorical", + options=options, + weights=[1.0 / len(options)] * len(options), + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + + +def _int_attr(name: str, low: float = 0.0, high: float = 100.0) -> AttributeSpec: + return AttributeSpec( + name=name, + type="int", + category="universal", + description=name, + sampling=SamplingConfig( + strategy="independent", + distribution=UniformDistribution(type="uniform", min=low, max=high), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + + +def _spec(attrs: list[AttributeSpec], order: list[str]) -> PopulationSpec: + return PopulationSpec( + meta=SpecMeta( + description="modifier precedence test", + geography="test", + created_at=datetime(2024, 1, 1), + version="1.0", + ), + grounding=GroundingSummary( + overall="low", + sources_count=0, + strong_count=0, + medium_count=0, + low_count=1, + sources=[], + ), + attributes=attrs, + sampling_order=order, + ) + + +def test_choose_modifier_precedence_subset_wins(): + decision = choose_modifier_precedence( + [ + (3, "age >= 50"), + (7, "age >= 65"), + ] + ) + assert decision is not None + assert decision.winner_index == 7 + assert decision.reason == "subset" + + +def test_choose_modifier_precedence_specificity_wins(): + decision = choose_modifier_precedence( + [ + (2, "education_level == 'Graduate degree'"), + ( + 4, + "education_level == 'Graduate degree' and race_ethnicity == 'Asian'", + ), + ] + ) + assert decision is not None + assert decision.winner_index == 4 + assert decision.reason in {"subset", "specificity"} + + +def test_choose_modifier_precedence_order_wins_on_tie(): + decision = choose_modifier_precedence( + [ + (1, "us_region == 'West' and race_ethnicity == 'Asian'"), + (6, "us_region == 'West' and education_level == 'Graduate degree'"), + ] + ) + assert decision is not None + assert decision.winner_index == 6 + assert decision.reason == "order" + + +def test_boolean_modifiers_use_single_deterministic_winner(): + distribution = BooleanDistribution(type="boolean", probability_true=0.2) + modifiers = [ + Modifier(when="age >= 18", add=0.2), + Modifier(when="age >= 18 and household_income >= 100000", add=0.5), + ] + _, triggered, warnings = apply_modifiers_and_sample( + dist=distribution, + modifiers=modifiers, + rng=random.Random(42), + agent={"age": 42, "household_income": 120000}, + ) + assert warnings == [] + assert triggered == [1] + + +def test_semantic_overlap_suppressed_when_subset_or_specificity_resolves(): + status = AttributeSpec( + name="status", + type="categorical", + category="population_specific", + description="status", + sampling=SamplingConfig( + strategy="conditional", + distribution=CategoricalDistribution( + type="categorical", + options=["A", "B"], + weights=[0.6, 0.4], + ), + depends_on=["age", "education_level"], + modifiers=[ + Modifier( + when="age >= 50", + weight_overrides={"A": 0.2, "B": 0.8}, + ), + Modifier( + when="age >= 50 and education_level == 'Graduate degree'", + weight_overrides={"A": 0.8, "B": 0.2}, + ), + ], + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + spec = _spec( + [ + _int_attr("age", low=18, high=90), + _categorical_attr("education_level", ["HS", "Graduate degree"]), + status, + ], + ["age", "education_level", "status"], + ) + + issues = run_semantic_checks(spec) + overlap_issues = [issue for issue in issues if issue.category == "MODIFIER_OVERLAP"] + assert overlap_issues == [] + + +def test_semantic_overlap_warns_when_only_order_can_resolve(): + identity = AttributeSpec( + name="identity_segment", + type="categorical", + category="population_specific", + description="identity_segment", + sampling=SamplingConfig( + strategy="conditional", + distribution=CategoricalDistribution( + type="categorical", + options=["X", "Y"], + weights=[0.5, 0.5], + ), + depends_on=["us_region", "race_ethnicity", "education_level"], + modifiers=[ + Modifier( + when="us_region == 'West' and race_ethnicity == 'Asian'", + weight_overrides={"X": 0.8, "Y": 0.2}, + ), + Modifier( + when="us_region == 'West' and education_level == 'Graduate degree'", + weight_overrides={"X": 0.2, "Y": 0.8}, + ), + ], + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + spec = _spec( + [ + _categorical_attr("us_region", ["West", "South"]), + _categorical_attr("race_ethnicity", ["Asian", "White"]), + _categorical_attr("education_level", ["HS", "Graduate degree"]), + identity, + ], + ["us_region", "race_ethnicity", "education_level", "identity_segment"], + ) + + issues = run_semantic_checks(spec) + overlap_issues = [issue for issue in issues if issue.category == "MODIFIER_OVERLAP"] + assert len(overlap_issues) == 1 diff --git a/tests/test_name_generator.py b/tests/test_name_generator.py index c557fd1..75b39c4 100644 --- a/tests/test_name_generator.py +++ b/tests/test_name_generator.py @@ -5,7 +5,6 @@ from extropy.population.names import generate_name from extropy.population.names.generator import age_to_birth_decade -from extropy.core.models.population import NameConfig, NameEntry class TestGenerateName: @@ -27,34 +26,28 @@ def test_female_name(self): assert isinstance(first, str) def test_hispanic_surname(self): - """Hispanic ethnicity produces a Hispanic surname.""" - # Run several seeds — at least one should be recognizably Hispanic - surnames = set() + """Hispanic routing should differ from default white routing.""" + hispanic_surnames = set() + white_surnames = set() for s in range(20): _, last = generate_name(ethnicity="hispanic", seed=s) - surnames.add(last) - hispanic_names = { - "Garcia", - "Rodriguez", - "Martinez", - "Hernandez", - "Lopez", - "Gonzalez", - "Perez", - "Sanchez", - "Ramirez", - "Torres", - } - assert surnames & hispanic_names, f"Expected Hispanic surnames, got {surnames}" + hispanic_surnames.add(last) + _, white_last = generate_name(ethnicity="white", seed=s) + white_surnames.add(white_last) + assert len(hispanic_surnames) > 1 + assert hispanic_surnames != white_surnames def test_asian_surname(self): - """Asian ethnicity produces an Asian surname.""" - surnames = set() + """Asian routing should differ from default white routing.""" + asian_surnames = set() + white_surnames = set() for s in range(20): _, last = generate_name(ethnicity="asian", seed=s) - surnames.add(last) - asian_names = {"Kim", "Lee", "Park", "Nguyen", "Chen", "Wang", "Patel", "Singh"} - assert surnames & asian_names, f"Expected Asian surnames, got {surnames}" + asian_surnames.add(last) + _, white_last = generate_name(ethnicity="white", seed=s) + white_surnames.add(white_last) + assert len(asian_surnames) > 1 + assert asian_surnames != white_surnames def test_black_surname(self): """Black ethnicity produces surnames from the black distribution.""" @@ -129,84 +122,25 @@ def test_ethnicity_aliases(self): first, last = generate_name(ethnicity=alias, seed=0) assert isinstance(first, str) - -class TestNameConfig: - """Test generate_name() with NameConfig-based generation.""" - - def _make_config(self) -> NameConfig: - return NameConfig( - male_first_names=[ - NameEntry(name="Haruto", weight=5.0), - NameEntry(name="Ren", weight=3.0), - NameEntry(name="Sota", weight=2.0), - ], - female_first_names=[ - NameEntry(name="Yui", weight=5.0), - NameEntry(name="Hana", weight=3.0), - NameEntry(name="Aoi", weight=2.0), - ], - last_names=[ - NameEntry(name="Tanaka", weight=5.0), - NameEntry(name="Suzuki", weight=4.0), - NameEntry(name="Sato", weight=3.0), - ], - ) - - def test_config_male_draws_from_config(self): - config = self._make_config() - names = set() - for s in range(20): - first, last = generate_name(gender="male", seed=s, name_config=config) - names.add(first) - expected = {"Haruto", "Ren", "Sota"} - assert names.issubset(expected), f"Got unexpected names: {names - expected}" - assert len(names) > 1 - - def test_config_female_draws_from_config(self): - config = self._make_config() - names = set() - for s in range(20): - first, last = generate_name(gender="female", seed=s, name_config=config) - names.add(first) - expected = {"Yui", "Hana", "Aoi"} - assert names.issubset(expected), f"Got unexpected names: {names - expected}" - assert len(names) > 1 - - def test_config_last_names_from_config(self): - config = self._make_config() - surnames = set() - for s in range(20): - _, last = generate_name(seed=s, name_config=config) - surnames.add(last) - expected = {"Tanaka", "Suzuki", "Sato"} - assert surnames.issubset(expected), ( - f"Got unexpected surnames: {surnames - expected}" - ) - assert len(surnames) > 1 - - def test_config_seeded_reproducibility(self): - config = self._make_config() - a1, b1 = generate_name(gender="male", seed=42, name_config=config) - a2, b2 = generate_name(gender="male", seed=42, name_config=config) - assert a1 == a2 - assert b1 == b2 - - def test_empty_config_falls_back_to_csv(self): - """NameConfig with empty lists falls back to CSV names.""" - empty_config = NameConfig() - first, last = generate_name(gender="male", seed=42, name_config=empty_config) - # Should still produce valid names from CSV fallback - assert isinstance(first, str) and len(first) > 0 - assert isinstance(last, str) and len(last) > 0 - - def test_none_config_uses_csv(self): - """name_config=None is identical to no-config behavior.""" - first1, last1 = generate_name(gender="female", ethnicity="white", seed=99) - first2, last2 = generate_name( - gender="female", ethnicity="white", seed=99, name_config=None - ) - assert first1 == first2 - assert last1 == last2 + def test_country_aliases_resolve_consistently(self): + """Country aliases/codes should resolve to the same locale pool.""" + by_name = generate_name(gender="male", country="India", seed=17) + by_alpha2 = generate_name(gender="male", country="IN", seed=17) + by_alpha3 = generate_name(gender="male", country="IND", seed=17) + assert by_name == by_alpha2 == by_alpha3 + + def test_region_aliases_resolve_consistently(self): + """Region spelling variants should normalize to a common region scope.""" + full = generate_name(gender="female", country="Southeast Asia", seed=31) + short = generate_name(gender="female", country="SE Asia", seed=31) + spaced = generate_name(gender="female", country="South East Asia", seed=31) + assert full == short == spaced + + def test_us_city_hint_resolves_to_us_scope(self): + """Subnational US hints (city + state) should route to US locale scope.""" + us_name = generate_name(gender="male", country="US", seed=9) + city_name = generate_name(gender="male", country="Austin, TX", seed=9) + assert city_name == us_name class TestAgeToBirthDecade: diff --git a/tests/test_network.py b/tests/test_network.py index 15c3613..df33da4 100644 --- a/tests/test_network.py +++ b/tests/test_network.py @@ -12,6 +12,7 @@ DegreeMultiplierConfig, EdgeTypeRule, InfluenceFactorConfig, + StructuralAttributeRoles, ) from extropy.population.network.similarity import ( compute_match_score, @@ -31,6 +32,9 @@ _coverage_needs_escalation, _compute_modularity_fast, _apply_scale_target_caps, + _generate_structural_edges, + _resolve_structural_keys_from_config, + _evaluate_topology_gate, ) _REFERENCE_SENIORITY_LEVELS = { @@ -821,6 +825,331 @@ def test_generate_network_includes_ladder_stage_metadata(self, sample_agents): assert isinstance(quality["ladder_stages"], list) assert len(quality["ladder_stages"]) >= 1 + def test_topology_gate_uses_final_graph_metrics(self, monkeypatch): + """Strict acceptance should be based on final graph after structural + rewiring.""" + import extropy.population.network.generator as gen + + agents = [{"_id": f"a{i}"} for i in range(6)] + + def fake_single_pass( + agents, + agent_ids, + similarities, + communities, + degree_factors, + config, + intra_scale, + inter_scale, + rng, + structural_pairs=None, + ): + # Deliberately poor calibration graph. + return [], 0.0, 0.0, 0.0, 0.0 + + def full_structural_edges(agents, agent_ids, rng): + # Dense structural graph that should pass final strict gates. + edges = [] + for i in range(len(agent_ids)): + for j in range(i + 1, len(agent_ids)): + edges.append( + Edge( + source=agent_ids[i], + target=agent_ids[j], + weight=1.0, + edge_type="household", + structural=True, + context="household", + ) + ) + return edges + + def no_rewire(agents, agent_ids, edges, edge_set, config, rng, protected_pairs): + return edges, edge_set, 0 + + monkeypatch.setattr(gen, "_generate_network_single_pass", fake_single_pass) + monkeypatch.setattr(gen, "_generate_structural_edges", full_structural_edges) + monkeypatch.setattr(gen, "_apply_rewiring", no_rewire) + monkeypatch.setattr( + gen, + "_assign_communities_with_diagnostics", + lambda agents, + similarities, + n_communities, + rng, + preferred_attrs=None, + progress=None: ( + [0 for _ in agents], + {"low_signal": 0.0}, + ), + ) + + config = NetworkConfig( + avg_degree=5.0, + seed=42, + candidate_mode="exact", + calibration_restarts=1, + max_calibration_iterations=1, + max_calibration_minutes=1, + topology_gate="strict", + target_clustering=0.0, + target_clustering_tolerance=1.0, + target_modularity=0.0, + target_modularity_tolerance=1.0, + ) + + result = generate_network(agents, config) + quality = result.meta.get("quality", {}) + + assert quality.get("calibration_accepted") is True + assert quality.get("accepted") is True + assert quality.get("final_metrics", {}).get("edge_count") == 15 + assert quality.get("final_metrics", {}).get("largest_component_ratio") == 1.0 + assert result.meta.get("edge_count") == 15 + + def test_final_gate_modularity_matches_louvain_metric(self, monkeypatch): + """Final gate modularity should use the same method as reported network metrics.""" + import extropy.population.network.generator as gen + + agents = [{"_id": f"a{i}"} for i in range(6)] + + def fake_single_pass( + agents, + agent_ids, + similarities, + communities, + degree_factors, + config, + intra_scale, + inter_scale, + rng, + structural_pairs=None, + ): + return [], 0.0, 0.0, 0.01, 0.0 + + monkeypatch.setattr(gen, "_generate_network_single_pass", fake_single_pass) + monkeypatch.setattr(gen, "_compute_modularity_louvain", lambda edges, ids: 0.42) + monkeypatch.setattr( + gen, + "_assign_communities_with_diagnostics", + lambda agents, + similarities, + n_communities, + rng, + preferred_attrs=None, + progress=None: ( + [0 for _ in agents], + {"low_signal": 0.0}, + ), + ) + + config = NetworkConfig( + avg_degree=4.0, + seed=42, + candidate_mode="exact", + calibration_restarts=1, + max_calibration_iterations=1, + max_calibration_minutes=1, + topology_gate="warn", + ) + result = generate_network(agents, config) + final_metrics = result.meta.get("quality", {}).get("final_metrics", {}) + assert final_metrics.get("modularity") == pytest.approx(0.42) + + def test_rewiring_fallback_preserves_gate_valid_graph(self, monkeypatch): + """If rewiring breaks gate-valid metrics, final output should revert pre-rewire.""" + import extropy.population.network.generator as gen + + agents = [{"_id": f"a{i}"} for i in range(6)] + + def fake_single_pass( + agents, + agent_ids, + similarities, + communities, + degree_factors, + config, + intra_scale, + inter_scale, + rng, + structural_pairs=None, + ): + # Similarity edges intentionally empty; structural graph drives calibration. + return [], 0.0, 0.0, 0.0, 0.0 + + def full_structural_edges( + agents, agent_ids, rng, config=None, target_edge_budget=None + ): + edges = [] + for i in range(len(agent_ids)): + for j in range(i + 1, len(agent_ids)): + edges.append( + Edge( + source=agent_ids[i], + target=agent_ids[j], + weight=1.0, + edge_type="household", + structural=True, + context="household", + ) + ) + return edges + + def no_structural_rewire( + agents, agent_ids, edges, edge_set, config, rng, protected_pairs + ): + return edges, edge_set, 7 + + metric_calls = {"count": 0} + + def fake_gate_metrics(edges, agent_ids, communities, fallback_modularity=0.0): + metric_calls["count"] += 1 + # First call (pre-rewire): pass. Second call (post-rewire): fail on modularity. + if metric_calls["count"] == 1: + return { + "edge_count": len(edges), + "avg_degree": 5.0, + "clustering": 0.30, + "largest_component_ratio": 1.0, + "modularity": 0.49995, + } + return { + "edge_count": len(edges), + "avg_degree": 5.0, + "clustering": 0.30, + "largest_component_ratio": 1.0, + "modularity": 0.51000, + } + + monkeypatch.setattr(gen, "_generate_network_single_pass", fake_single_pass) + monkeypatch.setattr(gen, "_generate_structural_edges", full_structural_edges) + monkeypatch.setattr(gen, "_apply_rewiring", no_structural_rewire) + monkeypatch.setattr(gen, "_compute_gate_metrics", fake_gate_metrics) + monkeypatch.setattr( + gen, + "_assign_communities_with_diagnostics", + lambda agents, + similarities, + n_communities, + rng, + preferred_attrs=None, + progress=None: ([0 for _ in agents], {"low_signal": 0.0}), + ) + + config = NetworkConfig( + avg_degree=5.0, + seed=42, + candidate_mode="exact", + calibration_restarts=1, + max_calibration_iterations=1, + max_calibration_minutes=1, + topology_gate="strict", + target_clustering=0.22, + target_clustering_tolerance=0.08, + target_modularity=0.4, + target_modularity_tolerance=0.1, + target_largest_component_ratio=0.95, + ) + + result = generate_network(agents, config) + quality = result.meta.get("quality", {}) + + assert quality.get("accepted") is True + assert quality.get("pre_rewire_gate_accepted") is True + assert quality.get("post_rewire_gate_accepted") is False + assert quality.get("rewire_gate_fallback_used") is True + assert quality.get("rewired_count_reverted") == 7 + assert result.meta.get("rewired_count") == 0 + + def test_topology_gate_epsilon_allows_tiny_overflow_only(self): + """Gate epsilon should absorb tiny numeric drift but not real misses.""" + accepted_tiny, _ = _evaluate_topology_gate( + metrics={ + "edge_count": 100, + "avg_degree": 12.0, + "clustering": 0.20, + "modularity": 0.50005, + "largest_component_ratio": 1.0, + }, + deg_min=10.0, + deg_max=14.0, + cluster_min=0.14, + mod_min=0.30, + mod_max=0.50, + lcc_min=0.95, + min_edge_floor=50, + ) + rejected_real, _ = _evaluate_topology_gate( + metrics={ + "edge_count": 100, + "avg_degree": 12.0, + "clustering": 0.20, + "modularity": 0.50030, + "largest_component_ratio": 1.0, + }, + deg_min=10.0, + deg_max=14.0, + cluster_min=0.14, + mod_min=0.30, + mod_max=0.50, + lcc_min=0.95, + min_edge_floor=50, + ) + assert accepted_tiny is True + assert rejected_real is False + + def test_structural_edges_respect_global_budget(self): + """Optional structural channels should obey a global edge budget.""" + rng = random.Random(42) + agents = [] + for i in range(120): + agents.append( + { + "_id": f"a{i}", + "age": 30 + (i % 20), + "sector_field": f"sector_{i % 6}", + "region_field": f"region_{i % 4}", + "urban_field": "Urban" if i % 2 == 0 else "Suburban", + "religion_field": "FaithA" if i % 3 == 0 else "FaithB", + "dependents_field": [{"age": 10}] if i % 5 == 0 else [], + } + ) + agent_ids = [a["_id"] for a in agents] + cfg = NetworkConfig( + structural_attribute_roles=StructuralAttributeRoles( + age="age", + sector="sector_field", + region="region_field", + urbanicity="urban_field", + religion="religion_field", + dependents="dependents_field", + ) + ) + + edges = _generate_structural_edges( + agents=agents, + agent_ids=agent_ids, + rng=rng, + config=cfg, + target_edge_budget=180, + ) + assert len(edges) <= 180 + + def test_resolve_structural_keys_prefers_configured_populated_key(self): + """Configured structural role should win over fallback keys when populated.""" + agents = [ + {"_id": "a0", "custom_partner": "a1", "partner_id": "a1"}, + {"_id": "a1", "custom_partner": "a0", "partner_id": "a0"}, + {"_id": "a2", "partner_id": "a3"}, + {"_id": "a3", "partner_id": "a2"}, + ] + cfg = NetworkConfig( + structural_attribute_roles=StructuralAttributeRoles( + partner_id="custom_partner" + ) + ) + resolved = _resolve_structural_keys_from_config(agents, cfg) + assert resolved["partner_id"] == "custom_partner" + def test_generate_network_resume_from_checkpoint_matches_fresh(self, sample_agents): """Resuming from a saved similarity checkpoint should match a fresh run.""" import sqlite3 diff --git a/tests/test_network_config_generator.py b/tests/test_network_config_generator.py index fc88e3c..ce6cc1d 100644 --- a/tests/test_network_config_generator.py +++ b/tests/test_network_config_generator.py @@ -3,11 +3,16 @@ from extropy.core.models.population import ( AttributeSpec, BooleanDistribution, + CategoricalDistribution, GroundingInfo, NormalDistribution, SamplingConfig, ) -from extropy.population.network.config_generator import _convert_to_network_config +from extropy.population.network.config_generator import ( + _build_structural_role_prompt, + _convert_to_network_config, + _resolve_structural_roles_deterministic, +) def test_convert_network_config_coerces_degree_multiplier_condition_types( @@ -86,3 +91,136 @@ def test_convert_network_config_coerces_degree_multiplier_condition_types( assert by_attr["income"] == 55000.5 assert isinstance(by_attr["income"], float) assert by_attr["gender"] == "male" + + +def test_resolve_structural_roles_deterministic_avoids_boolean_dependents( + minimal_population_spec, +): + pop_spec = minimal_population_spec.model_copy(deep=True) + pop_spec.attributes.extend( + [ + AttributeSpec( + name="household_id", + type="categorical", + category="population_specific", + description="Household identifier", + scope="household", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + options=["h1", "h2"], + weights=[0.5, 0.5], + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ), + AttributeSpec( + name="partner_id", + type="categorical", + category="population_specific", + description="Partner agent id", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + options=["a1", "a2"], + weights=[0.5, 0.5], + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ), + AttributeSpec( + name="religious_affiliation", + type="categorical", + category="population_specific", + description="Faith affiliation", + identity_type="religious_affiliation", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + options=["none", "faith_a"], + weights=[0.6, 0.4], + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ), + AttributeSpec( + name="has_children", + type="boolean", + category="population_specific", + description="Whether agent has children", + identity_type="parental_status", + sampling=SamplingConfig( + strategy="independent", + distribution=BooleanDistribution(probability_true=0.4), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ), + AttributeSpec( + name="dependents_count", + type="int", + category="population_specific", + description="Number of dependents in household", + sampling=SamplingConfig( + strategy="independent", + distribution=NormalDistribution( + mean=1.2, std=0.8, min=0.0, max=5.0 + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ), + ] + ) + pop_spec.sampling_order.extend( + [ + "household_id", + "partner_id", + "religious_affiliation", + "has_children", + "dependents_count", + ] + ) + + agents_sample = [ + { + "household_id": "h1", + "partner_id": "agent_1", + "religious_affiliation": "faith_a", + "has_children": True, + "dependents_count": 2, + } + ] + resolved, ambiguous = _resolve_structural_roles_deterministic( + pop_spec, agents_sample=agents_sample + ) + + assert resolved["household_id"] == "household_id" + assert resolved["partner_id"] == "partner_id" + assert resolved["religion"] == "religious_affiliation" + assert resolved["dependents"] != "has_children" + assert "dependents" in ambiguous or resolved["dependents"] == "dependents_count" + + +def test_structural_role_prompt_includes_full_attribute_set(minimal_population_spec): + pop_spec = minimal_population_spec.model_copy(deep=True) + for idx in range(60): + name = f"extra_attr_{idx:02d}" + pop_spec.attributes.append( + AttributeSpec( + name=name, + type="categorical", + category="context_specific", + description=f"Extra attribute {idx}", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + options=["a", "b"], + weights=[0.5, 0.5], + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + ) + pop_spec.sampling_order.append(name) + + prompt = _build_structural_role_prompt(pop_spec) + assert "extra_attr_59" in prompt diff --git a/tests/test_persona_validator.py b/tests/test_persona_validator.py new file mode 100644 index 0000000..9d002bd --- /dev/null +++ b/tests/test_persona_validator.py @@ -0,0 +1,86 @@ +"""Tests for persona config validator.""" + +from datetime import datetime + +from extropy.population.persona import ( + PersonaConfig, + AttributeTreatment, + TreatmentType, + AttributeGroup, + AttributePhrasing, + CategoricalPhrasing, + ConcretePhrasing, + validate_persona_config, +) + + +def _valid_persona_config() -> PersonaConfig: + return PersonaConfig( + population_description="Test population", + created_at=datetime(2024, 1, 1), + intro_template="I'm {age} years old.", + treatments=[ + AttributeTreatment( + attribute="age", treatment=TreatmentType.CONCRETE, group="identity" + ), + AttributeTreatment( + attribute="gender", + treatment=TreatmentType.CONCRETE, + group="identity", + ), + ], + groups=[ + AttributeGroup( + name="identity", label="Who I Am", attributes=["age", "gender"] + ) + ], + phrasings=AttributePhrasing( + categorical=[ + CategoricalPhrasing( + attribute="gender", + phrases={ + "male": "I'm male", + "female": "I'm female", + "other": "I identify outside the binary", + }, + null_options=[], + null_phrase=None, + ) + ], + concrete=[ + ConcretePhrasing( + attribute="age", + template="I'm {value} years old", + format_spec=".0f", + prefix="", + suffix="", + ) + ], + ), + ) + + +def test_validate_persona_config_valid(minimal_population_spec): + config = _valid_persona_config() + result = validate_persona_config(minimal_population_spec, config) + assert result.valid, result.errors + + +def test_validate_persona_config_detects_missing_group_membership( + minimal_population_spec, +): + config = _valid_persona_config() + config.groups[0].attributes = ["age"] + result = validate_persona_config(minimal_population_spec, config) + assert not result.valid + assert any(issue.category == "PERSONA_GROUP" for issue in result.errors) + + +def test_validate_persona_config_detects_unknown_intro_reference( + minimal_population_spec, +): + config = _valid_persona_config() + config.intro_template = "I live in {unknown_attr}." + result = validate_persona_config(minimal_population_spec, config) + assert not result.valid + assert any(issue.category == "PERSONA_INTRO" for issue in result.errors) diff --git a/tests/test_propagation.py b/tests/test_propagation.py index af37c3f..008559d 100644 --- a/tests/test_propagation.py +++ b/tests/test_propagation.py @@ -17,7 +17,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, OutcomeConfig, OutcomeDefinition, OutcomeType, @@ -56,7 +55,6 @@ def _make_scenario( ExposureChannel( name="broadcast", description="Mass broadcast", - reach="broadcast", credibility_modifier=1.0, ), ] @@ -90,7 +88,6 @@ def _make_scenario( ), seed_exposure=SeedExposure(channels=channels, rules=rules), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Observe", ), spread=SpreadConfig( @@ -170,7 +167,6 @@ def test_existing_channel(self): ExposureChannel( name="email", description="Email", - reach="targeted", credibility_modifier=0.8, ), ] @@ -266,7 +262,6 @@ def test_credibility_calculation(self, tmp_path, rng): ExposureChannel( name="email", description="Email", - reach="targeted", credibility_modifier=0.8, ), ] @@ -333,13 +328,15 @@ def test_timeline_exposures_return_epoch_intensity_and_direct_ids( result = apply_timeline_exposures(2, scenario, ten_agents, sm, rng) - assert result.new_exposure_count == 10 + # Timeline fallback applies a bounded direct-exposure cap by intensity. + assert result.new_exposure_count == 6 assert result.info_epoch == 2 assert result.re_reasoning_intensity == "high" - assert len(result.direct_exposed_agent_ids) == 10 + assert len(result.direct_exposed_agent_ids) == 6 assert result.active_event is not None - state = sm.get_agent_state("a0") + exposed_agent_id = sorted(result.direct_exposed_agent_ids)[0] + state = sm.get_agent_state(exposed_agent_id) # At least one timeline exposure should carry provenance. assert state.exposures[-1].info_epoch == 2 assert state.exposures[-1].force_rereason is True diff --git a/tests/test_reasoning_execution.py b/tests/test_reasoning_execution.py index 2f20a79..edc8af1 100644 --- a/tests/test_reasoning_execution.py +++ b/tests/test_reasoning_execution.py @@ -12,7 +12,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, OutcomeConfig, OutcomeDefinition, OutcomeType, @@ -50,7 +49,6 @@ def _make_scenario() -> ScenarioSpec: ExposureChannel( name="broadcast", description="Broadcast", - reach="broadcast", credibility_modifier=1.0, ) ], @@ -64,7 +62,6 @@ def _make_scenario() -> ScenarioSpec: ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Observe", ), spread=SpreadConfig(share_probability=0.3), @@ -224,7 +221,6 @@ def _make_scenario_no_pass2() -> ScenarioSpec: ExposureChannel( name="broadcast", description="Broadcast", - reach="broadcast", ) ], rules=[ @@ -237,7 +233,6 @@ def _make_scenario_no_pass2() -> ScenarioSpec: ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Observe updates", ), spread=SpreadConfig(share_probability=0.4), diff --git a/tests/test_reasoning_prompts.py b/tests/test_reasoning_prompts.py index 65be11b..97eb607 100644 --- a/tests/test_reasoning_prompts.py +++ b/tests/test_reasoning_prompts.py @@ -21,7 +21,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, OutcomeConfig, OutcomeDefinition, OutcomeType, @@ -66,7 +65,6 @@ def _make_scenario(**overrides): ExposureChannel( name="broadcast", description="Broadcast", - reach="broadcast", credibility_modifier=1.0, ) ], @@ -77,7 +75,6 @@ def _make_scenario(**overrides): ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Observe", ), spread=SpreadConfig(share_probability=0.3), @@ -410,7 +407,6 @@ def test_channel_experience_template(self): ExposureChannel( name="app_notification", description="App Notification", - reach="broadcast", experience_template="I got a push notification from {channel_name}", ) ], diff --git a/tests/test_sampler.py b/tests/test_sampler.py index 9c63433..6dea77a 100644 --- a/tests/test_sampler.py +++ b/tests/test_sampler.py @@ -25,7 +25,9 @@ save_sqlite, SamplingResult, SamplingError, + _resolve_country_hint, ) +from extropy.core.models.scenario import SamplingSemanticRoles, GeoRoles from extropy.population.sampler.distributions import ( sample_distribution, coerce_to_type, @@ -118,6 +120,30 @@ def test_missing_variable_raises(self): eval_safe("age + 10", {}) +class TestCountryHintResolution: + """Tests for geography hint resolution used in naming.""" + + def test_citizenship_status_does_not_override_scope(self): + agent = {"citizenship": "non_citizen"} + assert _resolve_country_hint(agent, default_geography="India") == "India" + + def test_citizenship_country_parses_when_present(self): + agent = {"citizenship": "US citizen"} + assert _resolve_country_hint(agent, default_geography=None) == "US" + + def test_semantic_country_attr_precedence(self): + agent = {"residence_country": "India", "country": "US"} + roles = SamplingSemanticRoles( + geo_roles=GeoRoles(country_attr="residence_country") + ) + assert ( + _resolve_country_hint( + agent, default_geography="Canada", semantic_roles=roles + ) + == "India" + ) + + class TestEvalFormula: """Tests for formula evaluation.""" diff --git a/tests/test_scenario.py b/tests/test_scenario.py index fde721b..ebf733f 100644 --- a/tests/test_scenario.py +++ b/tests/test_scenario.py @@ -11,7 +11,6 @@ ExposureChannel, ExposureRule, SeedExposure, - InteractionType, InteractionConfig, SpreadModifier, SpreadConfig, @@ -105,21 +104,19 @@ def test_channel_creation(self): channel = ExposureChannel( name="email_notification", description="Official email from administration", - reach="broadcast", credibility_modifier=1.0, ) assert channel.name == "email_notification" - assert channel.reach == "broadcast" - - def test_channel_reach_options(self): - """Test different reach options.""" - for reach in ["broadcast", "targeted", "organic"]: - channel = ExposureChannel( - name="test", - description="Test", - reach=reach, - ) - assert channel.reach == reach + + def test_channel_creation_without_reach(self): + """Channel model no longer includes reach field.""" + channel = ExposureChannel( + name="test", + description="Test", + credibility_modifier=0.9, + ) + assert channel.name == "test" + assert channel.credibility_modifier == 0.9 class TestExposureRule: @@ -185,19 +182,14 @@ class TestInteractionConfig: def test_interaction_config_creation(self): """Test creating interaction config.""" config = InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, - secondary_model=InteractionType.DIRECT_CONVERSATION, description="Social media style with some direct discussions", ) - assert config.primary_model == InteractionType.PASSIVE_OBSERVATION - assert config.secondary_model == InteractionType.DIRECT_CONVERSATION + assert "social media" in config.description.lower() def test_all_interaction_types(self): - """Test all interaction types.""" - assert InteractionType.PASSIVE_OBSERVATION.value == "passive_observation" - assert InteractionType.DIRECT_CONVERSATION.value == "direct_conversation" - assert InteractionType.BROADCAST_RESPONSE.value == "broadcast_response" - assert InteractionType.DELIBERATIVE.value == "deliberative" + """Interaction type enum was removed; description remains informational.""" + config = InteractionConfig(description="informational only") + assert config.description == "informational only" class TestSpreadConfig: @@ -387,7 +379,6 @@ def sample_scenario_spec(self): ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Social media style observation", ), spread=SpreadConfig(share_probability=0.3), @@ -491,13 +482,11 @@ def test_multi_channel_exposure(self): ExposureChannel( name="meeting", description="Staff meeting", - reach="targeted", credibility_modifier=0.95, ), ExposureChannel( name="word_of_mouth", description="Informal discussion", - reach="organic", credibility_modifier=0.7, ), ] @@ -618,7 +607,6 @@ def test_full_scenario_with_all_features(self): ExposureChannel( name="meeting", description="Department meeting", - reach="targeted", credibility_modifier=0.95, ), ], @@ -635,8 +623,6 @@ def test_full_scenario_with_all_features(self): ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, - secondary_model=InteractionType.DIRECT_CONVERSATION, description="Surgeons observe peer reactions and discuss informally", ), spread=SpreadConfig( @@ -673,5 +659,4 @@ def test_full_scenario_with_all_features(self): assert spec.meta.name == "ai_tool_full_scenario" assert spec.event.type == EventType.ANNOUNCEMENT assert len(spec.seed_exposure.channels) == 2 - assert spec.interaction.secondary_model == InteractionType.DIRECT_CONVERSATION assert spec.simulation.seed == 42 diff --git a/tests/test_scenario_interaction.py b/tests/test_scenario_interaction.py new file mode 100644 index 0000000..2d1538b --- /dev/null +++ b/tests/test_scenario_interaction.py @@ -0,0 +1,45 @@ +"""Tests for scenario interaction prompt grounding.""" + +from extropy.core.models import Event, EventType +from extropy.scenario import interaction as interaction_module + + +def test_interaction_prompt_uses_full_event_content_and_option_vocab( + minimal_population_spec, monkeypatch +): + captured: dict[str, str] = {} + + def fake_reasoning_call(*, prompt, **kwargs): + captured["prompt"] = prompt + return { + "interaction_description": "Test dynamics", + "share_probability": 0.35, + "share_modifiers": [ + {"when": "gender == 'female'", "multiply": 1.1, "add": 0.0}, + ], + "decay_per_hop": 0.1, + "max_hops": 4, + "reasoning": "test", + } + + monkeypatch.setattr(interaction_module, "reasoning_call", fake_reasoning_call) + + long_content = "x" * 240 + "TAIL_MARKER_FOR_FULL_CONTENT" + event = Event( + type=EventType.ANNOUNCEMENT, + content=long_content, + source="Test Source", + credibility=0.9, + ambiguity=0.2, + emotional_valence=0.1, + ) + + interaction_module.determine_interaction_model( + event=event, + population_spec=minimal_population_spec, + ) + + prompt = captured.get("prompt", "") + assert "TAIL_MARKER_FOR_FULL_CONTENT" in prompt + assert "gender (categorical) options=" in prompt + assert "Strict literal contract for conditions" in prompt diff --git a/tests/test_scenario_sufficiency.py b/tests/test_scenario_sufficiency.py new file mode 100644 index 0000000..eca4f66 --- /dev/null +++ b/tests/test_scenario_sufficiency.py @@ -0,0 +1,75 @@ +"""Tests for deterministic post-processing in scenario sufficiency.""" + +from extropy.scenario import sufficiency + + +def test_static_scenario_requires_explicit_timestep_unit(monkeypatch): + """Static scenarios without explicit unit should request clarification.""" + + def _fake_simple_call(*args, **kwargs): + return { + "sufficient": True, + "inferred_duration": "shortly after announcement", + "inferred_timestep_unit": None, + "inferred_scenario_type": "static", + "has_explicit_outcomes": False, + "inferred_agent_focus_mode": "primary_only", + "questions": [], + } + + monkeypatch.setattr(sufficiency, "simple_call", _fake_simple_call) + + result = sufficiency.check_scenario_sufficiency( + "City announces a congestion fee increase." + ) + + assert result.sufficient is False + assert any(q.id == "timestep_unit" for q in result.questions) + + +def test_timeline_markers_force_evolving_and_unit(monkeypatch): + """Timeline markers like 'month 0' should force evolving + month unit.""" + + def _fake_simple_call(*args, **kwargs): + return { + "sufficient": True, + "inferred_duration": None, + "inferred_timestep_unit": None, + "inferred_scenario_type": "static", + "has_explicit_outcomes": False, + "inferred_agent_focus_mode": "primary_only", + "questions": [], + } + + monkeypatch.setattr(sufficiency, "simple_call", _fake_simple_call) + + result = sufficiency.check_scenario_sufficiency( + "Month 0: tax announced. Month 1: protests begin." + ) + + assert result.inferred_scenario_type == "evolving" + assert result.inferred_timestep_unit == "month" + + +def test_infers_unit_from_duration_text_when_missing(monkeypatch): + """If LLM omits unit but duration names one, deterministic inference fills it.""" + + def _fake_simple_call(*args, **kwargs): + return { + "sufficient": True, + "inferred_duration": "over 6 weeks", + "inferred_timestep_unit": None, + "inferred_scenario_type": "evolving", + "has_explicit_outcomes": False, + "inferred_agent_focus_mode": "primary_only", + "questions": [], + } + + monkeypatch.setattr(sufficiency, "simple_call", _fake_simple_call) + + result = sufficiency.check_scenario_sufficiency( + "Policy adoption unfolds over 6 weeks." + ) + + assert result.sufficient is True + assert result.inferred_timestep_unit == "week" diff --git a/tests/test_scenario_validator.py b/tests/test_scenario_validator.py index bf10a1f..14db15f 100644 --- a/tests/test_scenario_validator.py +++ b/tests/test_scenario_validator.py @@ -8,7 +8,6 @@ ExposureChannel, ExposureRule, InteractionConfig, - InteractionType, OutcomeConfig, OutcomeDefinition, OutcomeType, @@ -18,6 +17,15 @@ SeedExposure, SpreadModifier, SpreadConfig, + SamplingSemanticRoles, + MaritalRoles, + GeoRoles, +) +from extropy.core.models.population import ( + AttributeSpec, + SamplingConfig, + GroundingInfo, + CategoricalDistribution, ) from extropy.scenario.validator import load_and_validate_scenario, validate_scenario from extropy.storage import open_study_db @@ -49,7 +57,6 @@ def _make_scenario_spec( ExposureChannel( name="official_notice", description="Official notice", - reach="broadcast", ) ], rules=[ @@ -62,7 +69,6 @@ def _make_scenario_spec( ], ), interaction=InteractionConfig( - primary_model=InteractionType.PASSIVE_OBSERVATION, description="Passive observation test", ), spread=SpreadConfig(share_probability=0.3), @@ -182,3 +188,103 @@ def test_validate_scenario_allows_edge_weight_in_spread_modifier(tmp_path: Path) if issue.location == "spread.share_modifiers[0].when" ] assert not edge_weight_errors + + +def _extended_categorical_attr(name: str, options: list[str]) -> AttributeSpec: + return AttributeSpec( + name=name, + type="categorical", + category="context_specific", + description=f"{name} attribute", + sampling=SamplingConfig( + strategy="independent", + distribution=CategoricalDistribution( + type="categorical", + options=options, + weights=[1.0 / len(options)] * len(options), + ), + ), + grounding=GroundingInfo(level="low", method="estimated"), + ) + + +def test_validate_scenario_ref_namespace_includes_extended_attrs( + minimal_population_spec, +): + spec = _make_scenario_spec("population.yaml", "study.db") + spec.meta.base_population = "population.v1" + spec.extended_attributes = [ + _extended_categorical_attr( + "info_channel_preference", + ["official_notice", "social_media"], + ) + ] + spec.seed_exposure.rules[0].when = "info_channel_preference == 'official_notice'" + + result = validate_scenario(spec, population_spec=minimal_population_spec) + + assert result.valid, result.errors + assert not any(issue.category == "attribute_reference" for issue in result.errors) + + +def test_validate_scenario_rejects_invalid_literal_in_when(minimal_population_spec): + spec = _make_scenario_spec("population.yaml", "study.db") + spec.meta.base_population = "population.v1" + spec.extended_attributes = [ + _extended_categorical_attr( + "info_channel_preference", + ["official_notice", "social_media"], + ) + ] + spec.seed_exposure.rules[0].when = "info_channel_preference == 'telepathy'" + + result = validate_scenario(spec, population_spec=minimal_population_spec) + + assert not result.valid + assert any(issue.category == "attribute_literal" for issue in result.errors) + + +def test_validate_scenario_rejects_unknown_sampling_semantic_role_attr( + minimal_population_spec, +): + spec = _make_scenario_spec("population.yaml", "study.db") + spec.meta.base_population = "population.v1" + spec.extended_attributes = [ + _extended_categorical_attr("marital_status", ["single", "married"]) + ] + spec.sampling_semantic_roles = SamplingSemanticRoles( + geo_roles=GeoRoles(country_attr="missing_country_attr") + ) + + result = validate_scenario(spec, population_spec=minimal_population_spec) + + assert not result.valid + assert any( + issue.location == "sampling_semantic_roles.geo_roles.country_attr" + for issue in result.errors + ) + + +def test_validate_scenario_rejects_overlapping_marital_role_values( + minimal_population_spec, +): + spec = _make_scenario_spec("population.yaml", "study.db") + spec.meta.base_population = "population.v1" + spec.extended_attributes = [ + _extended_categorical_attr("marital_status", ["single", "married"]) + ] + spec.sampling_semantic_roles = SamplingSemanticRoles( + marital_roles=MaritalRoles( + attr="marital_status", + partnered_values=["married", "single"], + single_values=["single"], + ) + ) + + result = validate_scenario(spec, population_spec=minimal_population_spec) + + assert not result.valid + assert any( + issue.location == "sampling_semantic_roles.marital_roles" + for issue in result.errors + ) diff --git a/uv.lock b/uv.lock index f340df2..8c8707a 100644 --- a/uv.lock +++ b/uv.lock @@ -100,6 +100,8 @@ name = "extropy-run" source = { editable = "." } dependencies = [ { name = "anthropic" }, + { name = "faker" }, + { name = "iso3166" }, { name = "networkx" }, { name = "numpy" }, { name = "openai" }, @@ -127,6 +129,8 @@ dev = [ [package.metadata] requires-dist = [ { name = "anthropic", specifier = ">=0.77.0,<1" }, + { name = "faker", specifier = ">=37.11.0,<38" }, + { name = "iso3166", specifier = ">=2.1.1,<3" }, { name = "networkx", specifier = ">=3.4.0,<4" }, { name = "numpy", specifier = ">=2.0.0,<3" }, { name = "openai", specifier = ">=1.50.0,<2" }, @@ -148,6 +152,18 @@ dev = [ { name = "ruff", specifier = ">=0.14.10" }, ] +[[package]] +name = "faker" +version = "37.12.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "tzdata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/84/e95acaa848b855e15c83331d0401ee5f84b2f60889255c2e055cb4fb6bdf/faker-37.12.0.tar.gz", hash = "sha256:7505e59a7e02fa9010f06c3e1e92f8250d4cfbb30632296140c2d6dbef09b0fa", size = 1935741, upload-time = "2025-10-24T15:19:58.764Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8e/98/2c050dec90e295a524c9b65c4cb9e7c302386a296b2938710448cbd267d5/faker-37.12.0-py3-none-any.whl", hash = "sha256:afe7ccc038da92f2fbae30d8e16d19d91e92e242f8401ce9caf44de892bab4c4", size = 1975461, upload-time = "2025-10-24T15:19:55.739Z" }, +] + [[package]] name = "h11" version = "0.16.0" @@ -203,6 +219,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, ] +[[package]] +name = "iso3166" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5c/11/b5023c736a185a88ebd0d38646af6f4d1b4c9b91f2ca84e08e5d2bc7ac3c/iso3166-2.1.1.tar.gz", hash = "sha256:fcd551b8dda66b44e9f9e6d6bbbee3a1145a22447c0a556e5d0fb1ad1e491719", size = 12807, upload-time = "2022-07-12T04:07:57.294Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/08/d0/bf18725b8d47f37858ff801f8e4d40c6982730a899725bdb6ded62199954/iso3166-2.1.1-py3-none-any.whl", hash = "sha256:263660b36f8471c42acd1ff673d28a3715edbce7d24b1550d0cf010f6816c47f", size = 9829, upload-time = "2022-07-12T04:07:55.54Z" }, +] + [[package]] name = "jiter" version = "0.12.0" @@ -823,3 +848,12 @@ sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac wheels = [ { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, ] + +[[package]] +name = "tzdata" +version = "2025.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7", size = 196772, upload-time = "2025-12-13T17:45:35.667Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1", size = 348521, upload-time = "2025-12-13T17:45:33.889Z" }, +]