Introducing the 4-Month AI FrameworkRead the guide

Government Chatbot Requirements: What a Public AI Assistant Must Get Right

What to require of a government chatbot that is open to the public. Answers come only from official sources, the cost is designed for public scale, refusals are fixed, staff control the wording without code releases, and it is tested before launch. With the numbers from one we built.

Muhammad Usman Ali

Muhammad Usman Ali

Co-Founder & Director of Engineering

· 7 min read

Government Chatbot Requirements: What a Public AI Assistant Must Get Right
On this page · 9 sections
  1. Why AI for Government Is a Harder Brief
  2. Answers Only From Official Sources
  3. Cost at Public Scale
  4. Refusing Off-Topic and Hostile Requests
  5. Admin Control Without Code Releases
  6. Testing Before Launch
  7. Questions to Put to a Government Chatbot Vendor
  8. What This Post Does Not Cover
  9. How EdgeFirm Handles It

Key takeaways

  • A government chatbot should answer only from official sources. In Ask Abu Dhabi, cards come from stored records and links are limited to approved domains.
  • Work out the cost before launch. Across 51 logged requests in July 2026, about 85% of input tokens were served from the prompt cache.
  • Check every message before the model acts on it. Ask Abu Dhabi runs three checks, and the injection check fails closed.
  • Staff should change starter questions and responses for sensitive topics from an admin console, without a code release.
  • Test before launch with attack messages as well as ordinary questions. The Ask Abu Dhabi suite holds 1,600 attack messages in 4 languages.

A government chatbot is open to anyone and speaks with the name of a public body. That makes the brief harder than a company help bot. A wrong answer reads as an official statement, the bill grows with the whole public, and some people will try to break it for sport.

This post is for a digital lead in a government department who is about to commission a public AI assistant. It sets out what we would require before launch, using Ask Abu Dhabi as the example. We built that assistant for the Department of Culture and Tourism Abu Dhabi (DCT), and it runs on visitabudhabi.ae.

Why AI for Government Is a Harder Brief

Much of what is written about AI for government is about strategy, and this post is about the build. A public sector AI assistant has an audience of everyone, with no sign-in wall and no way to pick its users. A resident or visitor treats what it says as the department's word. It is also a target. People will try to make a government AI chatbot leak its instructions, adopt another persona, take political positions, write code or look up other users.

The brief we worked to was an assistant that answers questions in its field well and refuses everything else, every time, in a fixed and polite way.

Answers Only From Official Sources

A language model will produce a confident answer whether or not it knows the facts, and a public assistant cannot be allowed to do that. Facts have to come from your own content and never from what the model remembers. Our RAG guide explains the method.

In Ask Abu Dhabi the code enforces this. The agent searches the official listings held in the database. When it wants to show places, the model chooses them by title and the server matches those titles to stored records. A title with no match is dropped, so a card cannot describe a place that is missing from the catalog. Links are limited to curated official pages and a short list of approved domains, and the catalog is refreshed from the site's content platform every 4 hours.

Freshness deserves an early decision. Visa terms and opening hours change, and an assistant reading last year's page gives last year's answer. Agree how often content refreshes, and who owns the source, before you agree anything else.

Cost at Public Scale

A public assistant has no cap on its audience, so traffic spikes, long sessions and the model bill all grow with it. The cost of one conversation should be worked out before launch, well before the first invoice arrives.

One method in Ask Abu Dhabi is the layout of the prompt. Static instructions sit at the top of the system prompt, so the provider can reuse a cached copy of that opening section on every call. Across 51 logged requests in July 2026, about 85% of input tokens, the units of text a provider bills for, were served from the prompt cache.

We also gave the model less to do. The format guide, the user's location and transport links used to be tools the model had to call. Code now supplies them, which removed three round trips to the model from every turn. Retrieved context has a hard cap, and tool calls from earlier turns are pruned from the history.

Scale needs its own engineering. The API workers hold no conversation state, so more instances can be added behind the load balancer. Waiting requests are capped, which means the service turns requests away under heavy load and never queues without limit. Each user is rate limited, and if the main model deployment fails, a backup takes over.

Our post on how to reduce LLM costs covers these methods in general terms.

Refusing Off-Topic and Hostile Requests

A public assistant needs a refusal path that holds under pressure, and a line in the prompt saying "stay on topic" does not provide one.

Ask Abu Dhabi runs three checks before the agent sees a message. A language gate comes first. A query classifier then flags manipulation and off-topic requests. The last check looks for prompt injection, meaning a message written to override the assistant's instructions, and it uses a model as the judge. It fails closed, so a message it cannot clear is refused.

Behind those checks sit a hardened system prompt, retrieved data that is labeled as data, and fixed refusal templates. The refusal is the same short, polite redirect each time. It contains no prompt text and no tool names, and the assistant does not change role.

No defense of this kind is perfect, and we would not promise that one is. Layers reduce the risk, and testing tells you by how much. Our guide to securing AI agents covers the wider set of controls.

Admin Control Without Code Releases

Policy changes faster than release cycles. If a sensitive topic has to be handled differently by tomorrow, a code release is too slow, and the department's own staff need controls they can use.

In Ask Abu Dhabi, DCT's team works from an admin console. They set the starter questions a visitor sees first and the moderation responses that decide how sensitive topics are handled. A knowledge layer lets them add facts that are not on the website. The console also has visitor feedback review with CSV export, and token and cost analytics for each session.

Decide early which changes belong to staff and which need engineers. We would leave wording and facts with staff, and send any change to what the agent can do through a release with tests.

Testing Before Launch

Reading a chatbot's prompt tells you little about how it will behave. You have to test it, with ordinary questions and with attacks, and keep the tests so that every later change can be checked.

The Ask Abu Dhabi suite holds 175 tourism questions and 35 multi-turn sessions, scored by a judge model, and a 400-case injection set. It also runs 80 attack conversations of five messages each in each of English, French, Russian and Chinese, which comes to 1,600 attack messages in 4 languages.

An independent penetration test of the Phase 2 build followed in August 2026. Direct injection, role override, out-of-scope tasks, requests for other users' data and script payloads all received the fixed refusal, and ordinary questions were answered as normal.

Releases move through gated pipelines from dev to preprod to prod, and every request is traced.

Questions to Put to a Government Chatbot Vendor

Each section above turns into a question you can put to a vendor.

  • Can the model show a fact or a link that is missing from our content?
  • What does one conversation cost, and how was that measured?
  • What runs before the model sees a message?
  • What can our staff change without a release?
  • Can we see the test sets and the penetration test report?

Ask for the answers in writing, with the evidence behind each one.

What This Post Does Not Cover

Ask Abu Dhabi is a tourism assistant for a government tourism authority. It answers questions and plans trips. An assistant that decides cases, takes payments or changes a citizen's record needs more controls than this post describes, starting with human approval for any action that cannot be undone.

We also make no claim about any legal or security standard. Procurement rules, accessibility law and data residency differ by country, and your own legal and security teams have to judge them.

DCT has not published traffic, conversation or conversion figures for the assistant, so none are quoted. Every number in this post was measured by EdgeFirm from the code, the test suites and the service logs.

How EdgeFirm Handles It

EdgeFirm designed and built Ask Abu Dhabi end to end, covering the agent, the backend, the chat inside the official site and the admin console. It launched on visitabudhabi.ae in July 2026. The Ask Abu Dhabi case study has the full build, including the screens and the test numbers.

The same engineering applies outside tourism. A department that answers the public from its own published content faces the same problems. Our AI chatbot development service covers that work, and our AI for travel and tourism page covers tourism boards, hotels and government bodies.

On the tourism side, we have also written about AI for destination marketing organizations and whether to build or buy an AI concierge.

If you are scoping a public assistant, book a 30-minute strategy call with the founders. Bring the hardest question your department gets asked.

Common questions

Frequently asked questions

A government chatbot is a public assistant run by a government body. It answers questions from residents or visitors on an official site. Because it carries the body's name, each answer reads as an official statement.

Limit it to official sources. The assistant should search your own content and answer from what it finds. In Ask Abu Dhabi, cards come from stored records, and links are limited to curated official pages and approved domains.

Work it out before launch. Lay out the prompt so the provider can reuse a cached copy of the opening section, move work the model does not need to do into code, and put a hard cap on retrieved context. Then track token use and cost for each session.

It should give a fixed and polite refusal, then offer help that is in scope, without arguing or changing role. Checks should run before the model sees the message, and a check that cannot clear a message should fail closed.

They should be able to. An admin console can hold the starter questions, the responses for sensitive topics and facts that are not on the website. Staff can also review feedback and see cost there.

Test with ordinary questions that have scored answers, and with attack messages in more than one language. Keep both sets so every later change can be checked. Then ask for an independent penetration test and read the report yourself.

Topics

  • government chatbot
  • ai for government
  • government ai chatbot
  • public sector ai
  • prompt injection
Muhammad Usman Ali

Written by

Muhammad Usman Ali

Co-Founder & Director of Engineering

Usman brings 8+ years of experience building enterprise systems. He specializes in system architecture, DevOps, and data pipelines that power production AI.

Talk to the founders

Get AI live in months, not years.

Book a 30-minute strategy call with the founders who will write your code.