Claude 中文文档Cookbook输出控制:JSON、Citations 与缓存内容审核过滤器(Moderation filter)内容审核过滤器(Moderation filter)构建内容审核过滤器,并讨论如何通过自定义/示例等方式提升效果。实操时先把输出格式与停止条件写清楚,再考虑缓存/吞吐等性能优化。对应 notebook:misc/building_moderation_filter.ipynb读的时候重点看 策略类别与阈值定义“判定”与“执行”分离(避免直接自动处置)用真实数据评估误报/漏报怎么在本地跑 make test-notebooks NOTEBOOK=misc/building_moderation_filter.ipynb批处理(Message Batches API)超过 max tokens 的长输出(Sampling past max tokens)