Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Household AI blog post #2270

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/images/posts/uk-household-ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/posts/us-household-ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions src/posts/articles/uk-household-ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PolicyEngine has developed a new artificial intelligence feature that transforms complex tax and benefit calculations into clear, accessible explanations. This innovation emerged from our participation in the Georgetown Beeck Center’s [Policy2Code Challenge](https://digitalgovernmenthub.org/get-involved/policy2code/) with a central question: How can we help users better understand their tax and benefit eligibility?

<center><iframe width="560" height="315" src="https://www.youtube.com/embed/fnuDyLKpt90" frameborder="0" allowfullscreen></iframe></center>

Users frequently encounter intricate calculations spanning multiple programmes, each with distinct thresholds, phase-outs, and dependencies. Our solution combines PolicyEngine’s open-source rules engine with artificial intelligence to explain these calculations in plain language, building on our [previous work applying AI to policy analysis](https://policyengine.org/uk/research/gpt-analysis).

# Technical architecture

The system integrates PolicyEngine’s tax-benefit rules with Anthropic’s Claude 3.5 Sonnet API. When calculating programme amounts like Universal Credit or Income Tax, PolicyEngine processes thousands of intermediate calculations involving household income, deductions, and other eligibility factors. Our new explanation system passes these complex intermediate calculations to the AI system, which generates natural language explanations.

For example, consider [an individual earning £15,000](https://policyengine.org/uk/household?focus=householdOutput.netIncome&household=50185). PolicyEngine calculates that they pay £486 in Income Tax. Users can now click a tooltip followed by an “**Explain with AI ✨**” button to receive a comprehensive explanation of this amount, including the Personal Allowance and potential changes that could affect their tax.

The AI system analyses both final outcomes and the intermediate calculations contributing to them. Many variables in PolicyEngine’s system involve dozens of intermediate steps, calculated at both monthly and annual levels. This new feature makes these calculation chains transparent and comprehensible.

# Applications and impact

This explanation tool serves diverse needs across the policy ecosystem. Whether you’re a household trying to understand your taxes and benefits, a professional analysing complex policy interactions, or a researcher exploring programme mechanics, the system breaks down intricate calculations into clear explanations.

Following PolicyEngine’s existing policy analysis framework, the explanations adapt to different audiences, ranging from simplified overviews to detailed technical analyses. This flexibility makes complex policy calculations accessible while preserving the depth needed for technical users.

# Development roadmap

Having launched this feature in the PolicyEngine web app, we will extend it to [API](https://policyengine.org/uk/api) customers in Q1 2025. PolicyEngine welcomes feedback on improving accessibility across user groups as we continue development.

---

_Max Ghenis, Pavel Makarchuk, Rachel Lawrie, and Li-Heng Pan also contributed to this feature._
29 changes: 29 additions & 0 deletions src/posts/articles/us-household-ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
PolicyEngine has developed a new artificial intelligence feature that transforms complex tax and benefit calculations into clear, accessible explanations. This innovation emerged from our participation in the Georgetown Beeck Center’s [Policy2Code Challenge](https://digitalgovernmenthub.org/get-involved/policy2code/) with a central question: How can we help users better understand their tax and benefit eligibility?

<center><iframe width="560" height="315" src="https://www.youtube.com/embed/fnuDyLKpt90" frameborder="0" allowfullscreen></iframe></center>

Users frequently encounter intricate calculations spanning multiple programs, each with distinct thresholds, phase-outs, and dependencies. Our solution combines PolicyEngine’s open-source rules engine with artificial intelligence to explain these calculations in plain language, building on our [previous work applying AI to policy analysis](https://policyengine.org/us/research/gpt-analysis).

# Technical architecture

The system integrates PolicyEngine’s tax-benefit rules with Anthropic’s Claude 3.5 Sonnet API. When calculating program amounts like the Child Tax Credit or Supplemental Security Income, PolicyEngine processes thousands of intermediate calculations involving household income, deductions, and other eligibility factors. Our new explanation system passes these complex intermediate calculations to the AI system, which generates natural language explanations.

For example, consider [a family of four in Connecticut](https://policyengine.org/us/household?focus=householdOutput.netIncome&household=50156) with a three-year-old child and $47,000 income. PolicyEngine calculates that they qualify for $475 in annual benefits from WIC, the Special Supplemental Nutrition Program for Women, Infants, and Children. Users can now click a tooltip followed by an “**Explain with AI ✨**” button to receive a comprehensive explanation of their eligibility and potential changes that could affect their benefit amount.

![](https://cdn-images-1.medium.com/max/2000/0*x0qcBrqb0Zapj8Ob)

The AI system analyzes both final outcomes and the intermediate calculations contributing to them. Many variables in PolicyEngine’s system involve dozens of intermediate steps, calculated at both monthly and annual levels. This new feature makes these calculation chains transparent and comprehensible.

# Applications and impact

This explanation tool serves diverse needs across the policy ecosystem. Whether you’re a household trying to understand your benefits, a professional analyzing complex policy interactions, or a researcher exploring program mechanics, the system breaks down intricate calculations into clear explanations.

Following PolicyEngine’s existing policy analysis framework, the explanations adapt to different audiences, ranging from simplified overviews to detailed technical analyses. This flexibility makes complex policy calculations accessible while preserving the depth needed for technical users.

# Development roadmap

Having launched this feature in the PolicyEngine web app, we will extend it to [API](https://policyengine.org/us/api) customers in Q1 2025. PolicyEngine welcomes feedback on improving accessibility across user groups as we continue development.

---

_Max Ghenis, Pavel Makarchuk, Rachel Lawrie, and Li-Heng Pan also contributed to this feature._
18 changes: 18 additions & 0 deletions src/posts/posts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1004,5 +1004,23 @@
"authors": ["max-ghenis"],
"filename": "uk-nuffield-grant.md",
"image": "uk-nuffield-grant.png"
},
{
"title": "New AI Feature Helps People Understand Their Taxes and Benefits",
"description": "We’re applying large language models to clarify complex policy rules.",
"date": "2024-12-26 09:00:00",
"tags": ["us", "featured", "ai"],
"authors": ["anthony-volk"],
"filename": "us-household-ai.md",
"image": "us-household-ai.png"
},
{
"title": "New AI feature helps people understand their taxes and benefits",
"description": "We’re applying large language models to clarify complex policy rules.",
"date": "2024-12-26 09:00:00",
"tags": ["uk", "featured", "ai"],
"authors": ["anthony-volk"],
"filename": "uk-household-ai.md",
"image": "uk-household-ai.png"
}
]
Loading