fix: replace hardcoded keyword matching with LLM-driven classification#107
Merged
DeveshParagiri merged 1 commit intomainfrom Feb 17, 2026
Merged
fix: replace hardcoded keyword matching with LLM-driven classification#107DeveshParagiri merged 1 commit intomainfrom
DeveshParagiri merged 1 commit intomainfrom
Conversation
Fixes #99, #100, #101 - agent_focus_mode: LLM sets enum during sufficiency check instead of runtime keyword parsing (#100) - display_format: LLM classifies time/currency/percentage during attribute selection, used in persona rendering (#101) - option_friction: LLM generates friction scores for outcome options during scenario creation (#99) All three changes move classification to spec/scenario creation time, eliminating runtime keyword heuristics.
This was referenced Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces hardcoded keyword matching with LLM-driven classification at spec/scenario creation time.
primary_only,couples,all) during sufficiency check instead of runtime keyword parsingAll three changes move classification to spec/scenario creation time, eliminating runtime keyword heuristics.
Files Changed
extropy/core/models/population.py- Addedagent_focus_modeto SpecMeta/SufficiencyResult,display_formatto AttributeSpecextropy/population/sampler/core.py- Simplified_get_agent_focus_modeto read enum directlyextropy/population/spec_builder/sufficiency.py- Addedagent_focus_modeto LLM schemaextropy/population/spec_builder/selector.py- Addeddisplay_formatto LLM schemaextropy/population/spec_builder/hydrators/*.py- Pass throughdisplay_formatextropy/population/spec_builder/binder.py- Acceptagent_focus_mode, includedisplay_formatextropy/simulation/persona.py- Usedisplay_formatfor time/currency/percentage renderingextropy/population/persona/renderer.py- Acceptdisplay_format_mapparameterextropy/scenario/outcomes.py- Addedoption_frictionto LLM schemaTest Plan
test_agent_focus.pyupdated for new approachFixes #99, #100, #101