AI Skills AI技能 4h ago Updated 1h ago 更新于 1小时前 46

I Built an AI Agent for NHS Cancer Waits. Its Best Feature Is the Question It Won’t Answer. 我为英国国民保健署癌症等待名单构建了AI代理。它最好的功能是它不回答的问题。

The author built an AI agent to address the lack of transparency in NHS cancer waiting times, inspired by the real-time tracking available in consumer services. The system explicitly refuses to provide individual patient forecasts, citing ethical concerns and the absence of predictive data in historical NHS records. Instead of prediction, the agent provides statistical probabilities based on historical performance, presenting data as "odds" (e.g., "two in three") rather than raw percentages to r 构建了一个针对NHS癌症等待时间的AI代理,核心创新在于明确拒绝提供个人化的预测,转而展示历史统计数据。 采用“代码计算数据,AI仅负责自然语言表述”的架构,使用Claude Haiku模型,严禁模型自行生成或修改数字。 通过Bronze/Silver/Gold三层数据管道清洗百万级NHS原始数据,确保最终呈现给用户的统计结果准确无误。 引入自动化评估系统检查输出的一致性、风格规则及逻辑错误,初期发现并修复了代码逻辑与模型幻觉问题。 强调以患者视角设计体验,优先使用通俗分数(如“约三分之二”)而非冷冰冰的百分比,并提供数据来源链接。

65
Hot 热度
70
Quality 质量
60
Impact 影响力

Analysis 深度分析

TL;DR

  • The author built an AI agent to address the lack of transparency in NHS cancer waiting times, inspired by the real-time tracking available in consumer services.
  • The system explicitly refuses to provide individual patient forecasts, citing ethical concerns and the absence of predictive data in historical NHS records.
  • Instead of prediction, the agent provides statistical probabilities based on historical performance, presenting data as "odds" (e.g., "two in three") rather than raw percentages to reduce anxiety.
  • The architecture strictly separates computation from generation: Python handles all data processing and logic, while a lightweight LLM (Claude Haiku) is used solely for natural language formatting.
  • An automated evaluation framework ensures factual accuracy and adherence to style guidelines, catching both model hallucinations and underlying code bugs.

Why It Matters

This case study demonstrates a responsible approach to deploying AI in high-stakes healthcare contexts, prioritizing honesty and clarity over speculative predictions. It highlights a robust engineering pattern where deterministic code manages data integrity and LLMs serve only as presentation layers, minimizing the risk of hallucination. This model offers a blueprint for building trustworthy AI agents in regulated industries where accuracy and ethical considerations are paramount.

Technical Details

  • Data Pipeline: Raw NHS England data (over 1 million rows) is processed through a Bronze, Silver, and Gold refinement stage using pandas, resulting in a clean table with one row per trust per month.
  • Architecture: A strict separation of concerns where Python computes all metrics (percentages, trends, comparisons) and generates plain-English phrases. The LLM receives pre-computed facts and is instructed not to introduce any new numbers.
  • Model Selection: Uses Claude Haiku, selected for its cost-efficiency and speed, functioning purely as a text formatter rather than a reasoning engine.
  • Evaluation Framework: An automated testing suite validates outputs against source data and style rules, flagging contradictions, unauthorized editorializing, or incorrect advice.

Industry Insight

  • Trust Through Transparency: In sensitive domains, AI systems should clearly state their limitations (e.g., inability to predict individual outcomes) rather than attempting to guess, which builds user trust.
  • Deterministic Pre-processing: Offloading complex logic and calculations to traditional code reduces the burden on LLMs, ensuring factual consistency and reducing token costs.
  • Automated Quality Assurance: Implementing rigorous automated checks for both model output and backend logic is essential for maintaining reliability in production environments, especially when dealing with large volumes of generated content.

TL;DR

  • 构建了一个针对NHS癌症等待时间的AI代理,核心创新在于明确拒绝提供个人化的预测,转而展示历史统计数据。
  • 采用“代码计算数据,AI仅负责自然语言表述”的架构,使用Claude Haiku模型,严禁模型自行生成或修改数字。
  • 通过Bronze/Silver/Gold三层数据管道清洗百万级NHS原始数据,确保最终呈现给用户的统计结果准确无误。
  • 引入自动化评估系统检查输出的一致性、风格规则及逻辑错误,初期发现并修复了代码逻辑与模型幻觉问题。
  • 强调以患者视角设计体验,优先使用通俗分数(如“约三分之二”)而非冷冰冰的百分比,并提供数据来源链接。

为什么值得看

这篇文章展示了在高风险医疗领域应用AI时,如何通过严格的工程约束(Code over Model)来消除幻觉并建立用户信任。它提供了一个将传统数据处理管道与大语言模型结合的最佳实践案例,强调了透明度、可解释性以及在无法提供确定性答案时诚实沟通的重要性。

技术解析

  • 架构理念:核心原则是“我的代码计算每个数字,AI只写句子”。LLM(Claude Haiku)被限制为仅作为文本生成器,接收预计算好的事实,禁止其引入任何新数字或进行统计推断。
  • 数据处理管道:使用Pandas处理NHS England超过一百万行的原始数据,经过Bronze(原始)、Silver(清洗/转换)、Gold(聚合/标准化)三个阶段,最终生成每信托机构每月的单一可信表格。
  • 前端逻辑与渲染:纯Python脚本预先计算所有比较逻辑(如是否低于85%标准、趋势升降、合适的通俗分数表达),并将这些结构化事实传递给LLM。
  • 自动化评估(Eval):开发了自动化测试脚本,在发布前将生成的回答反向验证数据一致性和风格指南(如禁止编辑性语言、禁止提供具体医疗建议)。该过程不仅捕获了模型的矛盾输出,还暴露了后端代码中的逻辑Bug(如0%情况的表述错误)。

行业启示

  • 医疗AI的信任基石在于“拒绝预测”:在涉及生命健康的场景下,AI不应试图伪装全知全能。明确告知用户能力的边界(如无法预测个体等待时间)比提供看似精确但可能错误的预测更能建立长期信任。
  • 混合架构优于端到端LLM:对于需要高准确性且容错率低的任务,将确定性逻辑(代码/数据库)与生成式能力(LLM)解耦是更稳健的工程选择。让LLM处理非结构化表达,而让传统代码处理结构化数据,能有效控制风险。
  • 用户体验需适配受众心理:技术实现应服务于最终用户的情感状态。在用户焦虑时,使用通俗易懂的语言(如“约两成”而非“20.3%”)和透明的数据来源链接,能显著提升信息的可接受度和实用性。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent Healthcare AI 医疗AI