Skip to content

Filter simulation personas to agent-eligible entities - #760

Closed
samrusani wants to merge 1 commit into
666ghj:mainfrom
samrusani:agent/fix-persona-entity-filter
Closed

Filter simulation personas to agent-eligible entities#760
samrusani wants to merge 1 commit into
666ghj:mainfrom
samrusani:agent/fix-persona-entity-filter

Conversation

@samrusani

Copy link
Copy Markdown

Summary

Fixes #759 by filtering graph entities before they are promoted into simulation personas.

The simulation prepare flow now builds its roster from agent-eligible person entities only, so non-person graph nodes such as project names, companies, topics, or sentence fragments do not become interviewable agents. The same filtered roster is passed to both profile generation and simulation config generation.

The standalone profile generation endpoint also applies the persona filter by default, with an explicit allow_group_accounts opt-in for callers that intentionally want institution/group accounts.

Root Cause

ZepEntityReader.filter_defined_entities() only removed default-only graph nodes. Any node with a custom label could then flow into generate_profiles_from_entities() and SimulationConfigGenerator.generate_config(), where it was treated as an agent candidate.

That allowed entities like MiroFish or market event to become simulated participants even when the simulation requirement expected individual people.

Validation

cd backend
uv run pytest tests

Result: 133 passed.

@samrusani

Copy link
Copy Markdown
Author

Closing this to reduce my stale contributor backlog. This draft never developed a maintainer review path and would need a fresh scope check against current main before it could be advanced safely. If a maintainer wants this continued, I’m happy for the PR to be reopened.

@samrusani samrusani closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entity extraction is nondeterministic at temperature 0 — same input, same container, different entity sets

1 participant