百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

smart-answers

> 编程语言
开源

在 GOV.UK 上提供智能答案

179 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

在 GOV.UK 上提供智能答案

Smart Answers

A tool for content designers to present complex information as a flow of questions, leading to an outcome. While the app is mostly self-contained, some Smart Answers use Whitehall to get data on countries and worldwide organisations.

Live examples

  • Look up Meursing code
  • Maternity and paternity calculator for employers
  • Towing: licence and age requirements

Nomenclature

  • Smart Answer: The flow, questions and outcomes.

  • Flow: Defines the questions, outcomes and the rules for navigating between them.

  • Landing page: Contains a description of the Smart Answer and the "Start now" button that leads to the first question.

  • Question page: Contains an individual question that's asked in order to help arrive at an outcome.

  • Outcome page: Contains the result of the Smart Answer based on responses to individual questions.

Technical documentation

This is a Ruby on Rails app, and should follow our Rails app conventions.

You can use the GOV.UK Docker environment or run ./startup.sh --live script to run the app. Read the guidance on local frontend development to find out more about each approach, before you get started.

If working on a smart answer that makes use of an API, locally run ./startup.sh --live script to run the app instead of docker.

If you are using GOV.UK Docker, remember to combine it with the commands that follow. See the GOV.UK Docker usage instructions for examples.

Running the test suite

bundle exec rake

Troubleshooting

  • When running integration tests, if you get SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version error, then:
    • run brew install chromedriver or if you already have the cask, brew upgrade chromedriver
    • if that doesn't work, install the correct Chrome driver into usr/local/bin
  • When running bundle exec rake, if you get rake aborted! LoadError: linked to incompatible , run gem pristine --all

Smart Answer design

  • File structure
  • Flow definition
  • Question types
  • Next node rules
  • Storing data
  • ERB templates
    • Landing page template
    • Question templates
    • Outcome templates

Smart Answer tasks

  • Development principles
  • Deploying changes for fact-check
  • Creating a new Smart Answer
  • Publishing a Smart Answer
  • Updating a Smart Answer
  • Retiring a Smart Answer
  • Adding time-based text to outcomes

Further guidance is available in docs/tasks.

Further documentation

  • Debugging Smart Answers
  • Historical background: blog post on Smart Answers.

Licence

MIT License

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubygovuk

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言