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>

Copy link
Copy Markdown
Collaborator

@vahid-ahmadi I've put together a standalone interactive draft of the UK Chat article here:

https://github.com/PolicyEngine/policyengine-uk-chat-interactive-article

It updates the copy and visuals to reflect the current UK Chat gateway and tool flow, including the end-to-end reform example. Could you review the article and flag anything you would change, particularly in the technical description and tool summaries?

vahid-ahmadi added a commit to PolicyEngine/policyengine-uk-chat-interactive-article that referenced this pull request Aug 12, 2026
…es from the app-v2 draft (#2)

* Port boundary diagram, PolicyBench, principles, and capabilities

The app-v2 draft of this article (PolicyEngine/policyengine-app-v2#1073)
carries material this version does not, all of it about why the calculation
boundary holds rather than what the stages are. Bring the substantive parts
across.

- The boundary diagram, ported as-is: predictive language model on one side,
  deterministic PolicyEngine on the other, with the typed tool boundary between
  them and tool call / typed result crossing it.
- PolicyBench as first-party evidence for the article's premise. The piece
  previously asserted that models cannot compute reliably and cited only
  external commentary.
- Five design principles, plus the handle rule that makes the privacy boundary
  structural: a simulation returns an opaque identifier and metadata, never
  household rows, survey weights, or a serialisable object.
- "What you can ask": five kinds of question with a worked prompt and the tool
  chain each one fires.
- The stack, and GET /version reporting the engine versions behind any answer.

Almost all of the CSS this needs was already in the legacy stylesheet and
unused: .principles-grid, .principle-card, .iteration-num, .insight-box, and
.agent-flow-container all come from the original article. Only the boundary
diagram's label rules and the question-card layout are new.

Note that the typed-surface principle states there is no model-authored Python
execution tool, which is at odds with the "reviewed Python" fallback mentioned
under What's next. Both cannot be right.

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

* Drop the PolicyBench finding callout

The paragraph above it already makes the point; the callout restated it.

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

* Drop principles and stack, rework the card pickers

Removed at review: the five design principles section, the stack table, and
the Rules entry under What you can ask, which leaves four kinds of question.

Replaced both "Select a … to …" hints with a labelled toolbar naming the cards
and their count. The hint described an interaction the cards never exposed to
the keyboard, so the pickers are now a real tablist: roving tabindex, arrow,
Home and End keys, and a tablist/tabpanel pairing. Both pickers share one
component instead of repeating the markup.

The boundary diagram's connectors get rounded caps and a concave arrowhead,
which reads as an arrow rather than a blunt triangle at this scale.

The worked example's headline figure now matches the table's units.

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

* Smooth the Simulate connector, drop the redundant diagram title

The arrow into Weighted outputs turned a hard corner and entered the right
edge with a 6px stub. It now sweeps out of Simulate's base into the top edge.

"Verified, tool-backed answer" restated what the panel header and the diagram
beneath it already say.

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

* Lay the four question kinds out in one row

Left at .tool-cards' three columns they wrapped 3 + 1. The breakpoint rules
below still collapse them to two columns and then one.

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

* Remove evaluative language from the prose

The subtitle read as an announcement rather than a description, and several
claims leaned on adjectives the piece does not need: work the model "excels
at", parts models are "genuinely good at", tools "narrow by design", inputs
the user "actually" supplied. The PolicyBench line now reports what was
measured, that computed amounts scored lowest, rather than calling them the
hardest cases.

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

* Straighten the Simulate connector and bridge the boundary to the segments

Rendered the diagram and looked at it: the curve between the two box centres
put the arrowhead in at an angle, floating short of the box. Simulate and
Weighted outputs overlap horizontally between x=700 and x=765, so they are now
joined by a plain vertical drop through the middle of that overlap.

The boundary section split the system two ways and the next section split it
three ways, with nothing connecting them. Name the gateway as the thing sitting
on the boundary, deciding whether a proposed plan may cross, which makes the
two- and three-part descriptions the same picture.

What you can ask now opens by referring back to the worked example, so it reads
as widening the scope rather than starting over.

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

* Describe the wider integrations generically, not as Claude only

The plugin ecosystem is not tied to one vendor.

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

* Title the piece an AI interface rather than a conversational one

Applied across the h1, subtitle, opening paragraph, page title, social
metadata, and the Markdown reference copy.

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

* Restore Anthony's hero subtitle

Reverts the subtitle rewrite from the neutral-language pass; the h1 keeps the
AI wording.

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

---------

Co-authored-by: Claude Opus 5 (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

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