Skip to content

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

Open
vahid-ahmadi wants to merge 22 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 22 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 Jul 30, 2026 12:39pm
policyengine-calculator Ready Ready Preview Jul 30, 2026 12:39pm
policyengine-calculator-next Ready Ready Preview Jul 30, 2026 12:39pm
policyengine-website Ready Ready Preview Jul 30, 2026 12:39pm

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>
@anth-volk

Copy link
Copy Markdown
Collaborator

@vahid-ahmadi a couple minor follow-ups:

  • I'd add a brief segment on the PolicyBench description indicating that it was for the US
  • Change "When an answer looks wrong..." to "If an answer..."

Address review follow-ups: clarify that PolicyBench evaluates the US tax
and benefit system (the lesson carries to the UK), and change "When an
answer looks wrong" to "If an answer looks wrong".

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

Copy link
Copy Markdown
Contributor Author

@anth-volk both done in 38ab5b1:

  • PolicyBench is US-based — the "Why this needs more than a language model" section now opens by describing PolicyBench as "an evaluation built on the US tax and benefit system," and closes with a bridge sentence so the US figures don't read as out of place in a UK launch post: "The benchmark covers US policy, but the lesson carries directly to the UK: the harder the computation, the less a language model can be trusted to do it unaided."
  • "When" → "If" — the feedback CTA now reads "If an answer looks wrong, incomplete, or confusing, use the Report issue button…"

Title: 'PolicyEngine UK Chat: AI tax and benefit answers grounded in
the PolicyEngine model' (drops 'microsimulation'). Date moved to
2026-06-30.

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

@MaxGhenis MaxGhenis 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.

CI is green and I don't see code-correctness blockers (agent-assisted review). The post renders (website posts.json/authors.json/articles are symlinks to the app-side files this PR edits), both bylines resolve, all four banner links return 200 on prod, and the PolicyBench figures match the live post (GPT-5.5 first at 80.3% exact, US-based, income-tax-before-credits hardest). HeroCTA uses design tokens, is UK-gated, and opens in a new tab safely.

Main thing: this PR is the launch, not a staged setup. On merge + deploy, three things go live immediately with no flag or date gate — the "Try the AI chatbot" button on the UK homepage, the refreshed featured banner, and the post at /uk/research/introducing-policyengine-uk-chat (also in the /uk/research list and sitemap). So we shouldn't merge until we want it public.

Decisions to make first:

  1. The CTA and the post both point at https://policyengine-uk-chat.vercel.app/. policyengine.org/uk/chat is a 404 — no productionized route yet. The alias works, but linking the public homepage and a launch post to a bare *.vercel.app is off-brand, skips our analytics/SEO, and cuts against our multizone convention. I'd rather stand up /uk/chat as a multizone (appZoneRoutes.ts) or a custom domain first; if we ship the vercel.app link for beta, let's do it knowingly. Either way, make CHAT_URL an env var or internal path like CALCULATOR_URL so moving it isn't a code change.
  2. The cover image is a dark-mode screenshot; the earlier ask was light-mode and the inline diagram is light. Real product screenshot is the right call — just recapture it light to fit the research surface.
  3. Post date is 2026-06-30, already a week old. No future-date gate, so it publishes on merge but sorts below anything dated later. Set it to the actual launch day at merge.

Copy: drop "only" in "matched PolicyEngine exactly on only 80.3%" — the 47.1%/53.3% hardest-case numbers already make the point. "PolicyEngine is excited to announce" is the one line leaning promotional against our neutral tone; fine for a launch, but "PolicyEngine has launched" is tighter.

Non-blocking: HomeBlogPreview excludes the post via a hardcoded slug (could key off a tag); branch is 16 behind main, worth updating before merge. Also the title and date changed after the last review round, so the current head hasn't had a sign-off from that reviewer.

@vahid-ahmadi

Copy link
Copy Markdown
Contributor Author

@MaxGhenis thanks for the review — addressed in cc4e9dff and bf691b8d:

  • Production URL: the homepage CTA now defaults to the internal /uk/chat path, with an optional NEXT_PUBLIC_CHAT_URL override. Added /uk/chat to appZoneRoutes.ts, proxying to the chat deployment at its matching base path.
  • Route auditing: registered UK Chat as a narrowly scoped shell-brand exemption because it is an immersive app with its own PolicyEngine-branded sidebar. It remains covered by the liveness audit, and the destination-fallback shell audit passes.
  • Cover image: replaced the dark-mode cover with a real light-mode browser capture of the product.
  • Launch date: updated the post date to 30 July 2026.
  • Copy: changed the opening to “PolicyEngine has launched” and removed “only” before the 80.3% PolicyBench result.
  • Homepage filtering: replaced the hardcoded post-slug exclusion with a semantic product tag and added its required display label.
  • Branch freshness: merged current main into the PR branch.
  • Changelog: added the /uk/chat beta launch entry.

Local validation included website tests (115/115), lint, typecheck, Markdown drift checks, route-audit unit tests, live destination-fallback shell auditing, tracking audit, and a production website build.

The remaining non-code item is launch approval/reviewer sign-off, since merging publishes the homepage CTA, refreshed banner, and launch article immediately.

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.

3 participants