Skip to content

UK chatbot beta launch: blog post, homepage CTA, featured tools - #1073

Open
vahid-ahmadi wants to merge 33 commits into
mainfrom
feat/uk-chatbot-beta-launch
Open

UK chatbot beta launch: blog post, homepage CTA, featured tools#1073
vahid-ahmadi wants to merge 33 commits into
mainfrom
feat/uk-chatbot-beta-launch

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

One PR consolidating the UK AI chatbot launch work (supersedes #1070 and #1072).

Blog post — "AI chatbot for policymaking" (beta)

  • New post at app/src/data/posts/articles/uk-chat-cant-make-up-numbers.md + cover image, dated 2026-06-27.
  • Framed as a beta launch; short noun-phrase section/subsection headings; six-tools figure (centred, grouped) and architecture diagram; numbered architecture/loop steps; key phrases bolded.
  • Citations deep-linked to exact sentences (AI Playbook, Wikipedia, POST, NAO).
  • posts.json: title "AI chatbot for policymaking", beta subtitle, date 27 Jun.

Homepage

  • HeroCTA: second button "Try the AI chatbot" (navy, distinct from teal "Enter PolicyEngine") → PolicyEngine UK Chat.
  • FeaturedResearchBanner: four cards refreshed to the latest UK tools, led by UK CliffWatch tool.
  • HomeBlogPreview: excludes the chatbot launch post from "Expert policy analysis" (it's a product announcement, not policy analysis).

Apps

Fixes

  • MarkdownFormatter: restore ordered/unordered list markers that Tailwind preflight reset (numbered steps now show their numbers).

Note: the POST citation deep-link is best-effort — that page blocks automated fetching, so the exact-sentence highlight is unverified (falls back to page top if it doesn't match).

🤖 Generated with Claude Code

vahid-ahmadi and others added 14 commits June 25, 2026 12:11
Add "Bringing AI to policymaking: a chat interface to PolicyEngine UK"
with Vahid Ahmadi and Anthony Volk as co-authors. Reuses the
multi-agent workflows cover image for now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add high-level technical content adapted from the engineering draft:
an inline-SVG architecture diagram of the tool-use loop, the bounded
loop with its iteration cap and repeated-call breaker, the
deterministic vs non-deterministic contract, structural plan mode,
the six typed tools, and the version-stamped engine reference.

Claims verified against the policyengine-uk-chat runtime; engine
attributed to policyengine-uk-compiled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…p code block

- Rework the opening to lead with AI's growing role in policymaking
- Set subtitle to a plain description of the chat interface
- Remove the related-work sentence and the tool-loop code block

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the borrowed placeholder with a dark-mode screenshot of the
UK Chat interface ("What's on your mind today?").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…label

- Shorten three section headings
- Soften strong/informal phrasings toward neutral language
- Reposition the "result → back into model" diagram label so the
  dashed return arrow no longer crosses it

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… UK-gov sources

- Lead with the guess-vs-compute contrast; add H1 title
- Drop unsupported "version-stamped" engine-reference claim
- Attribute calculations to the compiled engine (policyengine-uk-compiled)
- Surface the audit-vs-trust contract early; name the failure mode
- Describe input-token routing, single-tool error path, and eval checks
- Add "For technical readers" divider; add free/citable/checkable trust line
- British English (artefact) and trimmed repetition
- Add three UK public-sector sources (GOV.UK AI Playbook, POST, NAO)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ep-link citations

- Remove the H1 title (title comes from posts.json) and the "For technical
  readers" and "Constraints" sections
- Group the technical deep-dive under "How it works" with H3 subsections;
  make The architecture and The tool-use loop numbered lists
- Replace the duplicated six-tools prose/table with a single SVG graphic
- Generalise "A Claude model" to "AI tools like Claude or ChatGPT"; drop the
  compiled-build aside and the eval-cross-check sentence
- Deep-link the AI Playbook and add a Wikipedia citation for next-token
  generation, both via #:~:text= fragments
- Move the loop-diagram caption to a lead-in above the diagram; trim repetition
- Update the cover image

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ix, cover

- Shorten section/subsection titles to short noun phrases (no interrogatives)
- Replace the six-tools figure with a centred, grouped (Calculate/Support) SVG;
  add a figure lead-in and drop the trailing synthetic-illustration note
- Generalise "Anyone comparing two reforms"; unlink Claude/ChatGPT mention
- Deep-link the POST and NAO citations to their exact sentences (#:~:text=)
- Fix ordered/unordered list rendering: restore list markers that Tailwind
  preflight had reset, so numbered steps show their numbers
- Update the cover image

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Hero: add a second CTA button "Try the AI chatbot" (navy, distinct from the
  teal "Enter PolicyEngine") linking to the PolicyEngine UK Chat
- FeaturedResearchBanner: refresh the four UK cards to the latest featured
  tools, led by UK CliffWatch (then fuel duty, UC rebalancing, energy shock)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nalysis preview

- Open the post with a beta announcement; subtitle reads 'Launching the beta
  version of PolicyEngine UK Chat'; drop the redundant re-introduction
- Set the post date to 2026-06-27
- Exclude the chatbot launch post from the home 'Expert policy analysis'
  preview (it is a product announcement, not policy analysis)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e banner

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

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
policyengine-app-v2 Ready Ready Preview Aug 12, 2026 2:35pm
policyengine-calculator Ready Ready Preview Aug 12, 2026 2:35pm
policyengine-calculator-next Ready Ready Preview Aug 12, 2026 2:35pm
policyengine-website Ready Ready Preview Aug 12, 2026 2:35pm

Request Review

…ation guard

The app/ home components are ported to website/ and blocked by the PR guard.
Apply the same changes in the active website/ tree instead:
- HeroCTA: add 'Try the AI chatbot' button
- FeaturedResearchBanner: feature latest UK tools, led by UK CliffWatch tool
- HomeBlogPreview: exclude the chatbot launch post from policy-analysis preview
- MarkdownFormatter: restore ordered/unordered list markers

Data (posts.json, articles, apps.json) is symlinked, so those changes already
apply to website/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces the hand-authored scrollytelling page with the built output of
PolicyEngine/policyengine-uk-chat-interactive-article, which is now the
maintained source for this article: real React source, CI, and a review
history, rather than a single 120 kB HTML file edited by hand here.

Built with `bun run build --base=/assets/posts/introducing-policyengine-uk-chat/`
so asset URLs resolve under the static path. The encode article next door
needs a <base> tag because its source was lost; this one can be rebuilt, so
the base is baked in and there is no post-processing step to remember.

The route, slug, and deepDestination are unchanged, so /uk/introducing-
policyengine-uk-chat now serves the maintained article at the same URL. The
apps.json title and description follow the article's own title. The unrouted
markdown post is removed; it was left behind when the scrollytelling page
replaced it and nothing referenced it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vahid-ahmadi and others added 2 commits August 12, 2026 11:05
Points the post at the interactive article's Vercel deployment rather than a
copy of its build committed here, matching how the live interactives are wired
— WATCA, the Spring Statement dashboard, CliffWatch, /uk/chat. The in-repo
static path stays reserved for the encode article, whose source was lost and
which therefore cannot be rebuilt.

The article now lives in PolicyEngine/policyengine-uk-chat-interactive-article
with its own source, CI, and review history, so a copy here would go stale the
moment that repo moves.

The deployment serves at the article's public path, so the zone proxy forwards
path for path and asset URLs resolve the same either way.

Removes the hand-authored page and the unrouted markdown post it replaced.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The project's assigned domain is policyengine-uk-chat-article.vercel.app; the
repo-name default I wired earlier was never a real host.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Matches the subtitle shown in the article itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator

Vahid, two requested changes in the “What you can ask” section:

  • Please reword the introductory text to: “The Child Benefit reform above is one of four kinds of questions supported today, and users can stack these questions together within one conversation without starting a new chat.”
  • In the dropdown from the “Kinds of Questions” visual, please add the label “Possible tool usage” before the boxes containing the tool names.

policyengine-uk-chat-article.vercel.app was an alias pinned to one deployment,
so it froze on the build current when it was created and served a stale article
after the next merge. Vercel re-aliases only the project's own domain on each
production deploy, which is the host used here. Readers see
policyengine.org/uk/introducing-policyengine-uk-chat either way; this host is
only ever a proxy target.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vahid-ahmadi added a commit to PolicyEngine/policyengine-uk-chat-interactive-article that referenced this pull request Aug 12, 2026
Requested in PolicyEngine/policyengine-app-v2#1073:

- Reword the introduction to his wording, which also drops the earlier claim
  that a thread moves between question kinds "without switching tools" — that
  contradicted the section above it.
- Label the tool names in the panel "Possible tool usage", so they read as an
  illustration of what a question might call rather than a fixed list.

The Markdown copy is updated in step.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

Vahid, two requested changes in the “What you can ask” section:

  • Please reword the introductory text to: “The Child Benefit reform above is one of four kinds of questions supported today, and users can stack these questions together within one conversation without starting a new chat.”
  • In the dropdown from the “Kinds of Questions” visual, please add the label “Possible tool usage” before the boxes containing the tool names.

done

A capture of the chat's opening screen — composer, suggested questions, and
the charts toggle — rather than an illustration. The source is 3416x1480, so
it is fitted to width and padded to the 1920x1080 the previous cover used;
padding is white, which matches the screenshot's own background, so nothing is
cropped and the letterboxing does not read as a border.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@DTrim99 DTrim99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editorial review — grammar, clarity, house style

Reviewed against the beta-launch post ("AI chatbot for policymaking" / introducing-policyengine-uk-chat.md). No content questioned on substance — it's clean, well-structured, and appropriately neutral, and the PolicyBench framing ("the benchmark covers US policy, but the lesson carries directly to the UK") nicely pre-empts the obvious objection. Everything below is polish.

Corrections (grammar / house style)

  1. "PolicyEngine is excited to announce…" (opening) — house style avoids "excited to announce" boilerplate. The branch already has a plainer variant ("PolicyEngine has launched PolicyEngine UK Chat"); prefer that, or "PolicyEngine UK Chat is now in beta." Dropping the enthusiasm also reads as more credible for a tool whose pitch is rigour.

  2. The word "model" carries two meanings and collides. Throughout, "model" means both the language model (LLM) and the microsimulation model (PolicyEngine). Sharpest in the opening: "accuracy that models do not yet offer on their own: the figure has to come from a model whose assumptions can be inspected" — LLMs and PolicyEngine, one clause apart. Recommend a global convention: "language model" / "AI" for the LLM, "the engine" / "microsimulation" for PolicyEngine, and never bare "model" where either could be meant. Highest-value edit for comprehension.

  3. "pairs the language strengths of large language models" — "language…language" redundancy plus a missing parallel "of." Suggest "pairs the linguistic strengths of large language models with the accuracy and testability of PolicyEngine UK."

  4. UK spelling is consistent (modelled, programmes) — good; just confirm nothing slips to US spelling in later edits.

Clarity suggestions

  1. "That scoped tool surface is the boundary…" — "tool surface" is engineering jargon a policy audience won't parse. Suggest "That limited, explicit set of tools is the boundary…"

  2. "a reference generated from the installed engine — its capabilities and parameter schema" — strong and concrete but dense on first read. Consider "a machine-readable description of what the deployed engine can compute (its capabilities and parameter schema)". Keep the load-bearing point that it's tied to the deployed version rather than a drifting prompt — the best sentence in the section.

  3. Link consistency — the final copy links the chat as [policyengine.org/uk/chat](/uk/chat), but an earlier draft in this branch points to policyengine-uk-chat.vercel.app. Pick one canonical URL and use it in the post, the HeroCTA button, and posts.json.

  4. "matched PolicyEngine exactly on 80.3% of its scored outputs" — good that the final copy dropped the editorializing "only" an earlier draft had. Worth confirming the 80.3% figure and the GPT-5.5 model name are still current against the live PolicyBench post before publishing — it's the post's one hard number and model names/scores age fast.

Query

  1. Title alignment. posts.json uses "AI chatbot for policymaking"; the article opens "…announce PolicyEngine UK Chat"; the PR description references "Bringing AI to policymaking." Settle on one title and make the H1/subtitle/description echo it.

Question on the post setup

While reviewing I couldn't fetch a single clean version of the post, because the branch/diff looks unsettled — flagging in case it's unintentional:

  • There appear to be two competing article filesintroducing-policyengine-uk-chat.md ("AI chatbot for policymaking") and uk-chat-cant-make-up-numbers.md ("Bringing AI to policymaking…") — with different headings and framing. Is one meant to be deleted?
  • On the PR head I don't see either article file in app/src/data/posts/articles/, and posts.json at head has no entry for the new post — so as it stands, would merging actually publish it? The diff also carries built Vite artifacts (a large index.html, hashed JS/CSS/SVG under app/public/assets/posts/…) and some duplicated paragraph fragments, which reads like a stale base / needs-a-cleanup branch.

Could you confirm the intended final state — one canonical .md, a matching posts.json entry, and no build artifacts in the diff? Happy to re-review the prose once it's pinned to the version that'll actually ship; items 1–3 are the must-dos on the text itself.

🤖 Generated with Claude Code

vahid-ahmadi added a commit to PolicyEngine/policyengine-uk-chat-interactive-article that referenced this pull request Aug 13, 2026
"Model" carried two meanings and collided — the language model and the
PolicyEngine microsimulation, sometimes a clause apart. "The tools UK Chat
exposes to the model" sat near "run through the model to produce taxes,
benefits, and net income" and "reports what the model calculates". Adopted the
convention he proposed: "language model" for the LLM, "the engine" or
"PolicyEngine UK model" for the microsimulation, and no bare "model" where
either could be meant. All 27 uses are now qualified, including the boundary
diagram's accessible description and the section heading.

Also his point on the engine reference, which was accurate but dense: it now
reads "a machine-readable description of what the deployed engine can compute:
its capabilities and parameter schema", keeping the load-bearing point that it
is tied to the deployed version rather than a drifting prompt.

The call to action now points at policyengine.org/uk/chat rather than the
vercel.app host, which is the canonical URL both David and Max asked for. Note
that route ships with PolicyEngine/policyengine-app-v2#1073 and 404s until then.

The Markdown copy is regenerated to match.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

@DTrim99 thanks — and your last section is the right question to have asked. The branch genuinely was confusing to review, so let me pin down the intended final state first, then what I've changed.

What actually ships

There is no markdown article any more, and that is deliberate. The post is now a scrollytelling page, following the pattern of the encode multi-agent post. Its source lives in PolicyEngine/policyengine-uk-chat-interactive-article with its own CI and review history, and it is served from its own Vercel deployment; this PR only carries the route and the registry entry. So:

  • introducing-policyengine-uk-chat.md and uk-chat-cant-make-up-numbers.md are both gone — the second was superseded long ago, the first when the scrollytelling page replaced it. Nothing in posts.json: the entry is in apps.json with displayWithResearch: true, which is how the encode post and the other interactives are listed.
  • No build artifacts in the final diff. You saw them because I briefly committed the built page here and then reverted it in favour of proxying to the deployment, and I chose not to force-push a branch that already had review comments on it. The commit list shows the churn; the file diff nets out clean. The post's files in this PR are now just apps.json, appZoneRoutes.ts, the cover image, and the changelog.

Your edits, applied

#2, the "model" collision — your highest-value point, and you were right. The word carried both meanings, sometimes a clause apart: "the tools UK Chat exposes to the model" (the LLM) near "run through the model to produce taxes, benefits, and net income" and "reports what the model calculates" (both PolicyEngine). I adopted your convention throughout — "language model" for the LLM, "the engine" or "PolicyEngine UK model" for the microsimulation, and no bare "model" where either could be meant. All 27 uses are now qualified, including the boundary diagram's accessible description and the section heading, now "The language model proposes a plan".

#6, the engine reference. Now "a machine-readable description of what the deployed engine can compute: its capabilities and parameter schema", keeping the point you singled out — that it is tied to the deployed version rather than a drifting prompt.

#7, one canonical URL. The article's call to action now points at policyengine.org/uk/chat rather than the vercel.app host. HeroCTA already resolves NEXT_PUBLIC_CHAT_URL || "/uk/chat", so the two agree. Worth being explicit, since it is also @MaxGhenis's first point: that route does not exist on production yet — it ships with this PR. Until this merges, the article's CTA 404s.

Already resolved on the page you'll re-review: "tool surface" jargon (#5) is gone; "excited to announce" (#1) and "pairs the language strengths" (#3) are not in it; the GPT-5.5 name is dropped and the 80.3% figure was re-verified against the PolicyBench post (#8); UK spelling is clean (#4); and the title now matches across the page, index.html and apps.json (#9).

One I have not changed, so you can object to it knowingly: the subtitle reads "Introducing PolicyEngine's newest AI-powered tool to help users understand UK tax and benefit policy". That is the closest thing left to the promotional register you flagged in #1, and it is the author's deliberate wording for a launch.

Where to re-review

The live article — the exact build that will serve at /uk/introducing-policyengine-uk-chat — is at https://policyengine-uk-chat-interactive-ar.vercel.app/uk/introducing-policyengine-uk-chat. Prose changes go in that repo rather than here.

🤖 Generated with Claude Code

@vahid-ahmadi
vahid-ahmadi requested a review from DTrim99 August 13, 2026 10:50
@DTrim99

DTrim99 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Went through it again — thanks for the clear breakdown, that fully answers the setup question.

Branch integrity — resolved ✅

The net diff now lands exactly where you said: 9 files (routes, the apps.json registry entry with displayWithResearch: true, the HeroCTA two-button refactor, cover image, changelog) — no orphan .md, no build artifacts. The commit churn is just the built-page-then-reverted history, which nets out clean; not force-pushing a branch already under review was the right call. The scrollytelling-in-a-separate-repo structure (mirroring the encode post) makes sense.

Editorial items — 8/9 landed, and I verified them against the live article source

Re-checked each against src/App.jsx in the article repo (the live page is a client-rendered shell, so the source is authoritative):

Also confirmed anth-volk's "one of four kinds of questions supported today" reword is present in the "What you can ask" section.

Fresh pass on the new scrollytelling prose — no blockers, a few optional nits

Since the prose now lives in policyengine-uk-chat-interactive-article, these are for that repo, not this PR — all optional tightening:

  1. Segment label: "AI model" vs "language model". The flow segments are tagged "AI model" while the body everywhere calls the LLM "language model" — two names for one thing. Unifying on "language model" would keep it airtight (it's not ambiguous, just inconsistent).
  2. "stack these questions together" — drop "together" (redundant with "stack").
  3. Two long/loose sentences worth a light split: the "…which is why the system has three parts rather than two…" gateway sentence, and the verbless Households caption "One household containing one benefit unit per call; more complex arrangements need separate calls."
  4. Minor cohesion: "…because models can read loosely worded questions" → "because these models…"; and "the deterministic PolicyEngine engine" in the alt-text reads slightly doubled ("the deterministic engine" is cleaner).

The accessible descriptions on both diagrams are genuinely good (they describe the meaning and trace the flow, not just "a diagram of…"), the tool math is consistent (9+2+2+7+1 = 21), and punctuation/dashes are clean.

Net

The one substantive blocker from last time — that merging might not actually publish the post — is gone, and the prose is clean and publication-ready. Only open dependency I'd restate is the one you and @MaxGhenis already flagged: /uk/chat and /uk/introducing-policyengine-uk-chat don't exist on production until this merges, so the CTA 404s until then — expected for a launch PR, just worth a merge-day sanity check. Nothing here blocks from my side.

🤖 Generated with Claude Code

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.

4 participants