Skip to content

chore: drop stale API/workflow/dataset blocks from system prompt#37

Closed
vahid-ahmadi wants to merge 1 commit into
mainfrom
chore/trim-system-prompt
Closed

chore: drop stale API/workflow/dataset blocks from system prompt#37
vahid-ahmadi wants to merge 1 commit into
mainfrom
chore/trim-system-prompt

Conversation

@vahid-ahmadi
Copy link
Copy Markdown
Contributor

Summary

  • Deletes the COMMON WORKFLOWS, MODELLING SCOPE, and DATASETS sections from SYSTEM_PROMPT.
  • Replaces them with a short API AND DATASETS paragraph pointing the agent at the live reference doc introduced in feat: ground chat agent in a cached, auto-generated PolicyEngine API reference #36 (docstrings, capabilities() snapshot, full Parameters JSON schema).
  • Keeps every behavioral guardrail (always compute with Python, reproducibility, analytical notes, user-facing style).

Why

The deleted blocks were hardcoded examples (Simulation(year=2025, dataset="frs"), Parameters.model_validate({"income_tax": {"personal_allowance": 15000}}), per-dataset descriptions). They drift every time policyengine-uk-compiled ships a release. With the cached reference from #36 in place, they duplicate the authoritative source — and without it, the agent already fetches the same content via capabilities().

Pairs well with #36: together, the unchanging behavioral rules stay in SYSTEM_PROMPT and the version-sensitive facts live in the auto-generated reference.

Test plan

  • docker-compose up → ask "What datasets are available?" → response should list FRS, EFRS, LCFS, SPI, WAS (from capabilities() or the cached reference, not from the deleted prompt block)
  • Ask "Run a reform that raises the personal allowance to £15k" → agent should construct Parameters.model_validate({...}) correctly without the hardcoded example
  • Regression check: existing behavioral rules still apply (answers compute via Python, not memory)

🤖 Generated with Claude Code

Those sections were hardcoded examples that drift every time
policyengine-uk-compiled ships a release. The cached reference added in
#36 — docstrings, capabilities() snapshot, full Parameters JSON schema —
is already the authoritative source, and the agent reaches the same
answers by calling capabilities() dynamically. Keep only the behavioral
guardrails and point the model at the reference.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-uk-chat Ready Ready Preview, Comment Apr 21, 2026 9:35am

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

Beta preview has been cleaned up because this PR was closed.

@vahid-ahmadi
Copy link
Copy Markdown
Contributor Author

Folded into #36 — keeping everything in a single PR.

@vahid-ahmadi vahid-ahmadi deleted the chore/trim-system-prompt branch April 21, 2026 09:36
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.

1 participant