{ "schema_version": 1, "id": "articles-v11", "name": "Article retrieval", "tool": "web_fetch", "case_count": 100, "site_count": 75, "runs_per_case": 1, "timeout_ms": 45000, "workers": 1, "retry_policy": { "declared_retries": 0, "authoritative_response": "final_physical_call" }, "interaction_policy": "initial_load_only_no_click_input_scroll_pagination_login_or_ocr", "source_bindings": { "cohort_sha256": "802910d39ad3dd1f78955b1d4f381118680270df4197bb7dd5e425ef475ff3f2", "rules_sha256": "cc88eaab011397691df7203cd88fb3c656561921c980fc0c4a5812a2e1605772" }, "cases": [ { "id": "article-001", "name": "脑电合成自然语音!LeCun转发Nature子刊新成果,代码开源", "url": "https://mp.weixin.qq.com/s/BcV3-3glmdsVF--fpPRU2g", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "脑电合成自然语音!LeCun转发Nature子刊新成果,代码开源" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "publisher", "alternatives": [ "量子位" ] }, { "id": "attribution", "alternatives": [ "Xupeng 投稿" ] }, { "id": "profile", "alternatives": [ "追踪人工智能新趋势,关注科技行业新突破" ] }, { "id": "profile-kind", "alternatives": [ "公众号" ] }, { "id": "submission", "alternatives": [ "投稿请发邮件到" ] }, { "id": "control-1", "alternatives": [ "赞" ] }, { "id": "control-2", "alternatives": [ "分享" ] }, { "id": "control-3", "alternatives": [ "推荐" ] }, { "id": "control-4", "alternatives": [ "写留言" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Reviewed user-supplied archived initial state and user no-interaction attestation. User approved the four rules before publication; no independent live browser access claimed." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "脑电合成自然语音!LeCun转发Nature子刊新成果,代码开源" ], "html_selector": "#activity-name,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "wechat-qualified-v10/article-001/comment-proof.json", "sha256": "961bc509b694e16b627f7181f92de554b6f8bb9b48dd5b653f5908f35fe89d8b" }, "comment_presence_review": { "status": "observed_absent", "basis": "User confirms automatic-load save without interaction. Saved comment container has display:none inside stream_comment_dialog; failure labels are hidden dialog content. No actual displayed comment records found in this archived state; no claim of permanent absence.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "脑机接口最新进展登上Nature子刊,深度学习三巨头之一的LeCun都来转发。\n这次是用神经信号进行语音合成,帮助因神经系统缺陷导致失语的人群重新获得交流的能力。\n具体来说,来自纽约大学的研究团队开发了一个新型的可微分语音合成器,可以利用一个轻型的卷积神经网络将语音编码为一系列可解释的语音参数(如音高,响度,共振峰频率等),并通过可微分语音合成器重新合成语音。\n通过将神经信号映射到这些语音参数,研究者构建了一个高度可解释且可应用于小数据量情形的神经语音解码系统,可生成听起来自然的语音。\n研究人员共收集了48位受试者的数据并尝试进行语音解码,对未来的高准确度的脑机接口应用提供了验证。\n结果表明,该框架能够处理高低不同空间采样密度,并且可以处理左、右半球的脑电信号,显示出了强大的语音解码潜力。\n神经信号的语音解码,难!\n此前,马斯克的Neuralink公司已经在一位受试者脑内成功植入电极,可以完成简单的光标操控以实现打字等功能。\n然而,神经-语音解码通常被认为复杂度更高。\n开发神经-语音解码器和其他的高精度脑机接口模型的尝试大多数依赖于一种特殊的数据:皮层电图(ECoG)记录的受试者数据,通常是从癫痫病人的治疗过程中收集。\n利用患有癫痫的患者植入的电极,在发音时收集大脑皮层数据,这些数据具有高时空分辨率,已经在语音解码领域帮助研究者获得了一系列很显著的成果。\n不过,神经信号的语音解码还面临着两大挑战。\n用于训练个性化神经到语音解码模型的数据在时间上是非常有限的,通常只有十分钟左右,而深度学习模型往往需要大量的训练数据来驱动。\n人类的发音非常多样,哪怕是同一个人重复说出相同的单词,语速、语调和音调等也会有变化,这给模型构建的表征空间增加了复杂性。\n早期的解码神经信号到语音的尝试主要依赖于线性模型,模型通常不需要庞大的训练数据集,可解释性强,但是准确率很低。\n近期的基于深度神经网络,尤其是利用卷积和循环神经网络架构,在模拟语音的中间潜在表示和合成后语音质量两个关键维度上进行了很多的尝试。例如,有研究将大脑皮层活动解码成口型运动空间,然后再转化为语音,虽然解码性能强大,但重建的声音听起来不自然。\n另一方面,一些方法通过利用wavenet声码器、生成对抗网络(GAN)等,虽然成功重建了自然听感的语音,但准确度有限。\n最近一项发表在Nature的研究,在一个植入了设备的患者身上,通过使用量化的HuBERT特征作为中间表示空间和预训练的语音合成器将这些特征转换成语音,实现了既准确又自然的语音波形。\n然而,HuBERT特征不能表示发音者特有的声学信息,只能生成固定统一的发音者声音,因此需要额外的模型将这种通用声音转换为特定患者的声音。此外,这项研究和大多数先前的尝试采用了非因果(non-causal)架构,这可能限制其在需要时序因果(causal)操作的脑机接口实际应用中的使用。\n构建可微分语音合成器\n纽约大学Video Lab和Flinker Lab的研究团队介绍了一个新型的从脑电(ECoG)信号到语音的解码框架,构建了一个低维度的中间表示(low dimension latent representation),该表示通过仅使用语音信号的语音编解码模型生成。\n△神经语音解码框架\n具体来说,框架由两部分组成:\n一部分是ECoG解码器,它能将ECoG信号转化为我们可以理解的声学语音参数(比如音高、是否发声、响度、以及共振峰频率等);\n另一部分是语音合成器,它将这些语音参数转化为频谱图。\n研究人员构建了一个可微分语音合成器,这使得在训练ECoG解码器的过程中,语音合成器也可以参与训练,共同优化以减少频谱图重建的误差。\n这个低维度的潜在空间具有很强的可解释性,加上轻量级的预训练语音编码器生成参考用的语音参数,帮助研究者构建了一个高效的神经语音解码框架,克服了神经语音解码领域数据非常稀缺的问题。\n该框架能产生非常接近说话人自己声音的自然语音,并且ECoG解码器部分可以插入不同的深度学习模型架构,也支持因果操作(causal operations)。\n研究人员共收集并处理了48名神经外科病人的ECoG数据,使用多种深度学习架构(包括卷积、循环神经网络和Transformer)作为ECoG解码器。\n该框架在各种模型上都展现出了高准确度,其中以卷积(ResNet)架构获得的性能最好。本文研究人员提出的框架仅通过因果操作和相对较低的采样率(low-density, 10mm spacing)就能实现高准确度。\n他们还展示了能够从大脑的左右半球都进行有效的语音解码,将神经语音解码的应用扩展到了右脑。\n△可微分语音合成器架构\n可微分语音合成器(speech synthesizer),使得语音的重合成任务变得非常高效,可以用很小的语音合成高保真的贴合原声的音频。\n可微分语音合成器的原理借鉴了人的发生系统原理,将语音分为Voice(用于建模元音)和Unvoice(用于建模辅音)两部分。\nVoice部分可以首先用基频信号产生谐波,由F1-F6的共振峰组成的滤波器滤波得到元音部分的频谱特征。\n对于Unvoice部分,研究人员则是将白噪声用相应的滤波器滤波得到对应的频谱,一个可学习的参数可以调控两部分在每个时刻的混合比例,在此之后通过响度信号放大,加入背景噪声来得到最终的语音频谱。\n△语音编码器和ECoG解码器\n研究结果\n一、具有时序因果性的语音解码结果\n首先,研究人员直接比较不同模型架构卷积(ResNet)、循环(LSTM)和Transformer(3D Swin)在语音解码性能上的差异。\n值得注意的是,这些模型都可以执行时间上的非因果(non-causal)或因果操作。\n解码模型的因果性对大脑-计算机接口(BCI)应用具有重大意义:因果模型仅利用过去和当前的神经信号生成语音,而非因果模型还会使用未来的神经信号,这在实时应用中不可行。\n因此,他们专注于比较相同模型在执行非因果和因果操作时的性能。\n结果发现,即使是因果版本的ResNet模型也能与非因果版本媲美,二者之间没有显著差异。同样,因果和非因果版本的Swin模型性能相近,但因果版本的LSTM模型性能显著低于非因果版本。\n研究人员展示了几个关键语音参数的平均解码准确率(N=48),包括声音权重(用于区分元音和辅音)、响度、音高f0、第一共振峰f1和第二共振峰f2。准确重建这些语音参数,尤其是音高、声音权重和前两个共振峰,对于实现精确的语音解码和自然地模仿参与者声音的重建至关重要。\n结果表明,无论是非因果还是因果模型,都能得到合理的解码结果,这为未来的研究和应用提供了积极的指引。\n二、对左右大脑神经信号语音解码以及空间采样率的研究\n研究人员进一步对左右大脑半球的语音解码结果进行了比较。多数研究集中关注主导语音和语言功能的左脑半球,而对从右脑半球解码语言信息的关注较少。\n针对这一点,他们比较了参与者左右大脑半球的解码表现,以此验证使用右脑半球进行语音恢复的可能性。\n在研究收集的48位受试者中,有16位受试者的ECoG信号采集自右脑。\n通过对比 ResNet 和 Swin 解码器的表现,发现右脑半球也能够稳定地进行语音解码,与左脑半球的解码效果相差较小。\n这意味着,对于左脑半球受损、失去语言能力的患者来说,利用右脑半球的神经信号恢复语言也许是一个可行的方案。\n接着,他们还探讨了电极采样密度对语音解码效果的影响。\n之前的研究多采用较高密度的电极网格(0.4 mm),而临床中通常使用的电极网格密度较低(LD 1 cm)。有五位参与者使用了混合类型(HB)的电极网格,这类网格虽然主要是低密度采样,但其中加入了额外的电极。剩余的四十三位参与者都采用低密度采样。这些混合采样(HB)的解码表现与传统的低密度采样(LD)相似。\n这表明模型能够从不同空间采样密度的大脑皮层中学习到语音信息,这也暗示临床通常使用的采样密度对于未来的脑机接口应用也许是足够的。\n三、对于左右脑不同脑区对语音解码贡献度的研究\n研究人员也考察了大脑的语音相关区域在语音解码过程中的贡献程度,这对于未来在左右脑半球植入语音恢复设备提供了重要的参考。\n采用了遮挡技术(occlusion analysis)来评估不同大脑区域对语音解码的贡献度。\n通过对比 ResNet 和 Swin 解码器的因果与非因果模型,发现听觉皮层在非因果模型中的贡献更大,这侧面佐证了在实时语音解码应用中,必须使用因果模型,因为在实时语音解码中,我们无法利用神经反馈信号。\n此外,无论是在右脑还是左脑半球,传感运动皮层尤其是腹部区域的贡献度相似,这暗示在右半球植入神经假肢也许是一个可行的方案。\n最后总结来说,该研究在脑机接口上面取得了一系列的进展,不过研究人员也提到了目前模型的一些限制,比如解码流程需要有与ECoG记录配对的语音训练数据,这对失语患者可能不适用。\n未来他们希望开发能处理非网格数据的模型架构,以及更好地利用多病人、多模态脑电数据。\n对于脑机接口领域来说,目前的研究还处于相当早期的阶段,伴随着硬件技术的迭代和深度学习技术的快速进展,科幻电影中出现的脑机接口设想会愈发趋近实现。\n论文链接:https://www.nature.com/articles/s42256-024-00824-8\nGitHub链接:https://github.com/flinkerlab/neural_speech_decoding\n更多生成的语音例子:https://xc1490.github.io/nsd/", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "脑 机 接 口 最 新 进 展 登 上 nature 子 刊 深 度 学 习 三 巨 头 之 一 的 lecun 都 来 转 发 这 次 是 用 神 经 信 号 进 行 语 音 合 成 帮 助 因 神 经 系 统 缺 陷 导 致 失 语 的 人 群 重 新 获 得 交 流 的 能 力 具 体 来 说 来 自 纽 约 大 学 的 研 究 团 队 开 发 了 一 个 新 型 的 可 微 分 语 音 合 成 器 可 以 利 用 一 个 轻 型 的 卷 积 神 经 网 络 将 语 音 编 码 为 一 系 列 可 解 释 的 语 音 参 数 如 音 高 响 度 共 振 峰 频 率 等 并 通 过 可 微 分 语 音 合 成 器 重 新 合 成 语 音 通 过 将 神 经 信 号 映 射 到 这 些 语 音 参 数 研 究 者 构 建 了 一 个 高 度 可 解 释 且 可 应 用 于 小 数 据 量 情 形 的 神 经 语 音 解 码 系 统 可 生 成 听 起 来 自 然 的 语 音 研 究 人 员 共 收 集 了 48 位 受 试 者 的 数 据 并 尝 试 进 行 语 音 解 码 对 未 来 的 高 准 确 度 的 脑 机 接 口 应 用 提 供 了 验 证 结 果 表 明 该 框 架 能 够 处 理 高 低 不 同 空 间 采 样 密 度 并 且 可 以 处 理 左 右 半 球 的 脑 电 信 号 显 示 出 了 强 大 的 语 音 解 码 潜 力 神 经 信 号 的 语 音 解 码 难 此 前 马 斯 克 的 neuralink 公 司 已 经 在 一 位 受 试 者 脑 内 成 功 植 入 电 极 可 以 完 成 简 单 的 光 标 操 控 以 实 现 打 字 等 功 能 然 而 神 经 语 音 解 码 通 常 被 认 为 复 杂 度 更 高 开 发 神 经 语 音 解 码 器 和 其 他 的 高 精 度 脑 机 接 口 模 型 的 尝 试 大 多 数 依 赖 于 一 种 特 殊 的 数 据 皮 层 电 图 ecog 记 录 的 受 试 者 数 据 通 常 是 从 癫 痫 病 人 的 治 疗 过 程 中 收 集 利 用 患 有 癫 痫 的 患 者 植 入 的 电 极 在 发 音 时 收 集 大 脑 皮 层 数 据 这 些 数 据 具 有 高 时 空 分 辨 率 已 经 在 语 音 解 码 领 域 帮 助 研 究 者 获 得 了 一 系 列 很 显 著 的 成 果 不 过 神 经 信 号 的 语 音 解 码 还 面 临 着 两 大 挑 战 用 于 训 练 个 性 化 神 经 到 语 音 解 码 模 型 的 数 据 在 时 间 上 是 非 常 有 限 的 通 常 只 有 十 分 钟 左 右 而 深 度 学 习 模 型 往 往 需 要 大 量 的 训 练 数 据 来 驱 动 人 类 的 发 音 非 常 多 样 哪 怕 是 同 一 个 人 重 复 说 出 相 同 的 单 词 语 速 语 调 和 音 调 等 也 会 有 变 化 这 给 模 型 构 建 的 表 征 空 间 增 加 了 复 杂 性 早 期 的 解 码 神 经 信 号 到 语 音 的 尝 试 主 要 依 赖 于 线 性 模 型 模 型 通 常 不 需 要 庞 大 的 训 练 数 据 集 可 解 释 性 强 但 是 准 确 率 很 低 近 期 的 基 于 深 度 神 经 网 络 尤 其 是 利 用 卷 积 和 循 环 神 经 网 络 架 构 在 模 拟 语 音 的 中 间 潜 在 表 示 和 合 成 后 语 音 质 量 两 个 关 键 维 度 上 进 行 了 很 多 的 尝 试 例 如 有 研 究 将 大 脑 皮 层 活 动 解 码 成 口 型 运 动 空 间 然 后 再 转 化 为 语 音 虽 然 解 码 性 能 强 大 但 重 建 的 声 音 听 起 来 不 自 然 另 一 方 面 一 些 方 法 通 过 利 用 wavenet 声 码 器 生 成 对 抗 网 络 gan 等 虽 然 成 功 重 建 了 自 然 听 感 的 语 音 但 准 确 度 有 限 最 近 一 项 发 表 在 nature 的 研 究 在 一 个 植 入 了 设 备 的 患 者 身 上 通 过 使 用 量 化 的 hubert 特 征 作 为 中 间 表 示 空 间 和 预 训 练 的 语 音 合 成 器 将 这 些 特 征 转 换 成 语 音 实 现 了 既 准 确 又 自 然 的 语 音 波 形 然 而 hubert 特 征 不 能 表 示 发 音 者 特 有 的 声 学 信 息 只 能 生 成 固 定 统 一 的 发 音 者 声 音 因 此 需 要 额 外 的 模 型 将 这 种 通 用 声 音 转 换 为 特 定 患 者 的 声 音 此 外 这 项 研 究 和 大 多 数 先 前 的 尝 试 采 用 了 非 因 果 non causal 架 构 这 可 能 限 制 其 在 需 要 时 序 因 果 causal 操 作 的 脑 机 接 口 实 际 应 用 中 的 使 用", "source_text": "脑机接口最新进展登上Nature子刊,深度学习三巨头之一的LeCun都来转发。\n这次是用神经信号进行语音合成,帮助因神经系统缺陷导致失语的人群重新获得交流的能力。\n具体来说,来自纽约大学的研究团队开发了一个新型的可微分语音合成器,可以利用一个轻型的卷积神经网络将语音编码为一系列可解释的语音参数(如音高,响度,共振峰频率等),并通过可微分语音合成器重新合成语音。\n通过将神经信号映射到这些语音参数,研究者构建了一个高度可解释且可应用于小数据量情形的神经语音解码系统,可生成听起来自然的语音。\n研究人员共收集了48位受试者的数据并尝试进行语音解码,对未来的高准确度的脑机接口应用提供了验证。\n结果表明,该框架能够处理高低不同空间采样密度,并且可以处理左、右半球的脑电信号,显示出了强大的语音解码潜力。\n神经信号的语音解码,难!\n此前,马斯克的Neuralink公司已经在一位受试者脑内成功植入电极,可以完成简单的光标操控以实现打字等功能。\n然而,神经-语音解码通常被认为复杂度更高。\n开发神经-语音解码器和其他的高精度脑机接口模型的尝试大多数依赖于一种特殊的数据:皮层电图(ECoG)记录的受试者数据,通常是从癫痫病人的治疗过程中收集。\n利用患有癫痫的患者植入的电极,在发音时收集大脑皮层数据,这些数据具有高时空分辨率,已经在语音解码领域帮助研究者获得了一系列很显著的成果。\n不过,神经信号的语音解码还面临着两大挑战。\n用于训练个性化神经到语音解码模型的数据在时间上是非常有限的,通常只有十分钟左右,而深度学习模型往往需要大量的训练数据来驱动。\n人类的发音非常多样,哪怕是同一个人重复说出相同的单词,语速、语调和音调等也会有变化,这给模型构建的表征空间增加了复杂性。\n早期的解码神经信号到语音的尝试主要依赖于线性模型,模型通常不需要庞大的训练数据集,可解释性强,但是准确率很低。\n近期的基于深度神经网络,尤其是利用卷积和循环神经网络架构,在模拟语音的中间潜在表示和合成后语音质量两个关键维度上进行了很多的尝试。例如,有研究将大脑皮层活动解码成口型运动空间,然后再转化为语音,虽然解码性能强大,但重建的声音听起来不自然。\n另一方面,一些方法通过利用wavenet声码器、生成对抗网络(GAN)等,虽然成功重建了自然听感的语音,但准确度有限。\n最近一项发表在Nature的研究,在一个植入了设备的患者身上,通过使用量化的HuBERT特征作为中间表示空间和预训练的语音合成器将这些特征转换成语音,实现了既准确又自然的语音波形。\n然而,HuBERT特征不能表示发音者特有的声学信息,只能生成固定统一的发音者声音,因此需要额外的模型将这种通用声音转换为特定患者的声音。此外,这项研究和大多数先前的尝试采用了非因果(non-causal)架构,这可能限制其在需要时序因果(causal)操作的脑机接口实际应用中的使用。", "segmentation_method": "reviewed_source_semantics", "label": "开篇与解码难题", "source_line_range": [ 1, 19 ] }, { "id": "body-region-2", "text": "构 建 可 微 分 语 音 合 成 器 纽 约 大 学 video lab 和 flinker lab 的 研 究 团 队 介 绍 了 一 个 新 型 的 从 脑 电 ecog 信 号 到 语 音 的 解 码 框 架 构 建 了 一 个 低 维 度 的 中 间 表 示 low dimension latent representation 该 表 示 通 过 仅 使 用 语 音 信 号 的 语 音 编 解 码 模 型 生 成 神 经 语 音 解 码 框 架 具 体 来 说 框 架 由 两 部 分 组 成 一 部 分 是 ecog 解 码 器 它 能 将 ecog 信 号 转 化 为 我 们 可 以 理 解 的 声 学 语 音 参 数 比 如 音 高 是 否 发 声 响 度 以 及 共 振 峰 频 率 等 另 一 部 分 是 语 音 合 成 器 它 将 这 些 语 音 参 数 转 化 为 频 谱 图 研 究 人 员 构 建 了 一 个 可 微 分 语 音 合 成 器 这 使 得 在 训 练 ecog 解 码 器 的 过 程 中 语 音 合 成 器 也 可 以 参 与 训 练 共 同 优 化 以 减 少 频 谱 图 重 建 的 误 差 这 个 低 维 度 的 潜 在 空 间 具 有 很 强 的 可 解 释 性 加 上 轻 量 级 的 预 训 练 语 音 编 码 器 生 成 参 考 用 的 语 音 参 数 帮 助 研 究 者 构 建 了 一 个 高 效 的 神 经 语 音 解 码 框 架 克 服 了 神 经 语 音 解 码 领 域 数 据 非 常 稀 缺 的 问 题 该 框 架 能 产 生 非 常 接 近 说 话 人 自 己 声 音 的 自 然 语 音 并 且 ecog 解 码 器 部 分 可 以 插 入 不 同 的 深 度 学 习 模 型 架 构 也 支 持 因 果 操 作 causal operations 研 究 人 员 共 收 集 并 处 理 了 48 名 神 经 外 科 病 人 的 ecog 数 据 使 用 多 种 深 度 学 习 架 构 包 括 卷 积 循 环 神 经 网 络 和 transformer 作 为 ecog 解 码 器 该 框 架 在 各 种 模 型 上 都 展 现 出 了 高 准 确 度 其 中 以 卷 积 resnet 架 构 获 得 的 性 能 最 好 本 文 研 究 人 员 提 出 的 框 架 仅 通 过 因 果 操 作 和 相 对 较 低 的 采 样 率 low density 10mm spacing 就 能 实 现 高 准 确 度 他 们 还 展 示 了 能 够 从 大 脑 的 左 右 半 球 都 进 行 有 效 的 语 音 解 码 将 神 经 语 音 解 码 的 应 用 扩 展 到 了 右 脑 可 微 分 语 音 合 成 器 架 构 可 微 分 语 音 合 成 器 speech synthesizer 使 得 语 音 的 重 合 成 任 务 变 得 非 常 高 效 可 以 用 很 小 的 语 音 合 成 高 保 真 的 贴 合 原 声 的 音 频 可 微 分 语 音 合 成 器 的 原 理 借 鉴 了 人 的 发 生 系 统 原 理 将 语 音 分 为 voice 用 于 建 模 元 音 和 unvoice 用 于 建 模 辅 音 两 部 分 voice 部 分 可 以 首 先 用 基 频 信 号 产 生 谐 波 由 f1 f6 的 共 振 峰 组 成 的 滤 波 器 滤 波 得 到 元 音 部 分 的 频 谱 特 征 对 于 unvoice 部 分 研 究 人 员 则 是 将 白 噪 声 用 相 应 的 滤 波 器 滤 波 得 到 对 应 的 频 谱 一 个 可 学 习 的 参 数 可 以 调 控 两 部 分 在 每 个 时 刻 的 混 合 比 例 在 此 之 后 通 过 响 度 信 号 放 大 加 入 背 景 噪 声 来 得 到 最 终 的 语 音 频 谱 语 音 编 码 器 和 ecog 解 码 器", "source_text": "构建可微分语音合成器\n纽约大学Video Lab和Flinker Lab的研究团队介绍了一个新型的从脑电(ECoG)信号到语音的解码框架,构建了一个低维度的中间表示(low dimension latent representation),该表示通过仅使用语音信号的语音编解码模型生成。\n△神经语音解码框架\n具体来说,框架由两部分组成:\n一部分是ECoG解码器,它能将ECoG信号转化为我们可以理解的声学语音参数(比如音高、是否发声、响度、以及共振峰频率等);\n另一部分是语音合成器,它将这些语音参数转化为频谱图。\n研究人员构建了一个可微分语音合成器,这使得在训练ECoG解码器的过程中,语音合成器也可以参与训练,共同优化以减少频谱图重建的误差。\n这个低维度的潜在空间具有很强的可解释性,加上轻量级的预训练语音编码器生成参考用的语音参数,帮助研究者构建了一个高效的神经语音解码框架,克服了神经语音解码领域数据非常稀缺的问题。\n该框架能产生非常接近说话人自己声音的自然语音,并且ECoG解码器部分可以插入不同的深度学习模型架构,也支持因果操作(causal operations)。\n研究人员共收集并处理了48名神经外科病人的ECoG数据,使用多种深度学习架构(包括卷积、循环神经网络和Transformer)作为ECoG解码器。\n该框架在各种模型上都展现出了高准确度,其中以卷积(ResNet)架构获得的性能最好。本文研究人员提出的框架仅通过因果操作和相对较低的采样率(low-density, 10mm spacing)就能实现高准确度。\n他们还展示了能够从大脑的左右半球都进行有效的语音解码,将神经语音解码的应用扩展到了右脑。\n△可微分语音合成器架构\n可微分语音合成器(speech synthesizer),使得语音的重合成任务变得非常高效,可以用很小的语音合成高保真的贴合原声的音频。\n可微分语音合成器的原理借鉴了人的发生系统原理,将语音分为Voice(用于建模元音)和Unvoice(用于建模辅音)两部分。\nVoice部分可以首先用基频信号产生谐波,由F1-F6的共振峰组成的滤波器滤波得到元音部分的频谱特征。\n对于Unvoice部分,研究人员则是将白噪声用相应的滤波器滤波得到对应的频谱,一个可学习的参数可以调控两部分在每个时刻的混合比例,在此之后通过响度信号放大,加入背景噪声来得到最终的语音频谱。\n△语音编码器和ECoG解码器", "segmentation_method": "reviewed_source_semantics", "label": "解码框架与合成器", "source_line_range": [ 20, 37 ] }, { "id": "body-region-3", "text": "研 究 结 果 一 具 有 时 序 因 果 性 的 语 音 解 码 结 果 首 先 研 究 人 员 直 接 比 较 不 同 模 型 架 构 卷 积 resnet 循 环 lstm 和 transformer 3d swin 在 语 音 解 码 性 能 上 的 差 异 值 得 注 意 的 是 这 些 模 型 都 可 以 执 行 时 间 上 的 非 因 果 non causal 或 因 果 操 作 解 码 模 型 的 因 果 性 对 大 脑 计 算 机 接 口 bci 应 用 具 有 重 大 意 义 因 果 模 型 仅 利 用 过 去 和 当 前 的 神 经 信 号 生 成 语 音 而 非 因 果 模 型 还 会 使 用 未 来 的 神 经 信 号 这 在 实 时 应 用 中 不 可 行 因 此 他 们 专 注 于 比 较 相 同 模 型 在 执 行 非 因 果 和 因 果 操 作 时 的 性 能 结 果 发 现 即 使 是 因 果 版 本 的 resnet 模 型 也 能 与 非 因 果 版 本 媲 美 二 者 之 间 没 有 显 著 差 异 同 样 因 果 和 非 因 果 版 本 的 swin 模 型 性 能 相 近 但 因 果 版 本 的 lstm 模 型 性 能 显 著 低 于 非 因 果 版 本 研 究 人 员 展 示 了 几 个 关 键 语 音 参 数 的 平 均 解 码 准 确 率 n 48 包 括 声 音 权 重 用 于 区 分 元 音 和 辅 音 响 度 音 高 f0 第 一 共 振 峰 f1 和 第 二 共 振 峰 f2 准 确 重 建 这 些 语 音 参 数 尤 其 是 音 高 声 音 权 重 和 前 两 个 共 振 峰 对 于 实 现 精 确 的 语 音 解 码 和 自 然 地 模 仿 参 与 者 声 音 的 重 建 至 关 重 要 结 果 表 明 无 论 是 非 因 果 还 是 因 果 模 型 都 能 得 到 合 理 的 解 码 结 果 这 为 未 来 的 研 究 和 应 用 提 供 了 积 极 的 指 引", "source_text": "研究结果\n一、具有时序因果性的语音解码结果\n首先,研究人员直接比较不同模型架构卷积(ResNet)、循环(LSTM)和Transformer(3D Swin)在语音解码性能上的差异。\n值得注意的是,这些模型都可以执行时间上的非因果(non-causal)或因果操作。\n解码模型的因果性对大脑-计算机接口(BCI)应用具有重大意义:因果模型仅利用过去和当前的神经信号生成语音,而非因果模型还会使用未来的神经信号,这在实时应用中不可行。\n因此,他们专注于比较相同模型在执行非因果和因果操作时的性能。\n结果发现,即使是因果版本的ResNet模型也能与非因果版本媲美,二者之间没有显著差异。同样,因果和非因果版本的Swin模型性能相近,但因果版本的LSTM模型性能显著低于非因果版本。\n研究人员展示了几个关键语音参数的平均解码准确率(N=48),包括声音权重(用于区分元音和辅音)、响度、音高f0、第一共振峰f1和第二共振峰f2。准确重建这些语音参数,尤其是音高、声音权重和前两个共振峰,对于实现精确的语音解码和自然地模仿参与者声音的重建至关重要。\n结果表明,无论是非因果还是因果模型,都能得到合理的解码结果,这为未来的研究和应用提供了积极的指引。", "segmentation_method": "reviewed_source_semantics", "label": "因果模型的研究结果", "source_line_range": [ 38, 46 ] }, { "id": "body-region-4", "text": "二 对 左 右 大 脑 神 经 信 号 语 音 解 码 以 及 空 间 采 样 率 的 研 究 研 究 人 员 进 一 步 对 左 右 大 脑 半 球 的 语 音 解 码 结 果 进 行 了 比 较 多 数 研 究 集 中 关 注 主 导 语 音 和 语 言 功 能 的 左 脑 半 球 而 对 从 右 脑 半 球 解 码 语 言 信 息 的 关 注 较 少 针 对 这 一 点 他 们 比 较 了 参 与 者 左 右 大 脑 半 球 的 解 码 表 现 以 此 验 证 使 用 右 脑 半 球 进 行 语 音 恢 复 的 可 能 性 在 研 究 收 集 的 48 位 受 试 者 中 有 16 位 受 试 者 的 ecog 信 号 采 集 自 右 脑 通 过 对 比 resnet 和 swin 解 码 器 的 表 现 发 现 右 脑 半 球 也 能 够 稳 定 地 进 行 语 音 解 码 与 左 脑 半 球 的 解 码 效 果 相 差 较 小 这 意 味 着 对 于 左 脑 半 球 受 损 失 去 语 言 能 力 的 患 者 来 说 利 用 右 脑 半 球 的 神 经 信 号 恢 复 语 言 也 许 是 一 个 可 行 的 方 案 接 着 他 们 还 探 讨 了 电 极 采 样 密 度 对 语 音 解 码 效 果 的 影 响 之 前 的 研 究 多 采 用 较 高 密 度 的 电 极 网 格 0 4 mm 而 临 床 中 通 常 使 用 的 电 极 网 格 密 度 较 低 ld 1 cm 有 五 位 参 与 者 使 用 了 混 合 类 型 hb 的 电 极 网 格 这 类 网 格 虽 然 主 要 是 低 密 度 采 样 但 其 中 加 入 了 额 外 的 电 极 剩 余 的 四 十 三 位 参 与 者 都 采 用 低 密 度 采 样 这 些 混 合 采 样 hb 的 解 码 表 现 与 传 统 的 低 密 度 采 样 ld 相 似 这 表 明 模 型 能 够 从 不 同 空 间 采 样 密 度 的 大 脑 皮 层 中 学 习 到 语 音 信 息 这 也 暗 示 临 床 通 常 使 用 的 采 样 密 度 对 于 未 来 的 脑 机 接 口 应 用 也 许 是 足 够 的 三 对 于 左 右 脑 不 同 脑 区 对 语 音 解 码 贡 献 度 的 研 究 研 究 人 员 也 考 察 了 大 脑 的 语 音 相 关 区 域 在 语 音 解 码 过 程 中 的 贡 献 程 度 这 对 于 未 来 在 左 右 脑 半 球 植 入 语 音 恢 复 设 备 提 供 了 重 要 的 参 考 采 用 了 遮 挡 技 术 occlusion analysis 来 评 估 不 同 大 脑 区 域 对 语 音 解 码 的 贡 献 度 通 过 对 比 resnet 和 swin 解 码 器 的 因 果 与 非 因 果 模 型 发 现 听 觉 皮 层 在 非 因 果 模 型 中 的 贡 献 更 大 这 侧 面 佐 证 了 在 实 时 语 音 解 码 应 用 中 必 须 使 用 因 果 模 型 因 为 在 实 时 语 音 解 码 中 我 们 无 法 利 用 神 经 反 馈 信 号 此 外 无 论 是 在 右 脑 还 是 左 脑 半 球 传 感 运 动 皮 层 尤 其 是 腹 部 区 域 的 贡 献 度 相 似 这 暗 示 在 右 半 球 植 入 神 经 假 肢 也 许 是 一 个 可 行 的 方 案 最 后 总 结 来 说 该 研 究 在 脑 机 接 口 上 面 取 得 了 一 系 列 的 进 展 不 过 研 究 人 员 也 提 到 了 目 前 模 型 的 一 些 限 制 比 如 解 码 流 程 需 要 有 与 ecog 记 录 配 对 的 语 音 训 练 数 据 这 对 失 语 患 者 可 能 不 适 用 未 来 他 们 希 望 开 发 能 处 理 非 网 格 数 据 的 模 型 架 构 以 及 更 好 地 利 用 多 病 人 多 模 态 脑 电 数 据 对 于 脑 机 接 口 领 域 来 说 目 前 的 研 究 还 处 于 相 当 早 期 的 阶 段 伴 随 着 硬 件 技 术 的 迭 代 和 深 度 学 习 技 术 的 快 速 进 展 科 幻 电 影 中 出 现 的 脑 机 接 口 设 想 会 愈 发 趋 近 实 现", "source_text": "二、对左右大脑神经信号语音解码以及空间采样率的研究\n研究人员进一步对左右大脑半球的语音解码结果进行了比较。多数研究集中关注主导语音和语言功能的左脑半球,而对从右脑半球解码语言信息的关注较少。\n针对这一点,他们比较了参与者左右大脑半球的解码表现,以此验证使用右脑半球进行语音恢复的可能性。\n在研究收集的48位受试者中,有16位受试者的ECoG信号采集自右脑。\n通过对比 ResNet 和 Swin 解码器的表现,发现右脑半球也能够稳定地进行语音解码,与左脑半球的解码效果相差较小。\n这意味着,对于左脑半球受损、失去语言能力的患者来说,利用右脑半球的神经信号恢复语言也许是一个可行的方案。\n接着,他们还探讨了电极采样密度对语音解码效果的影响。\n之前的研究多采用较高密度的电极网格(0.4 mm),而临床中通常使用的电极网格密度较低(LD 1 cm)。有五位参与者使用了混合类型(HB)的电极网格,这类网格虽然主要是低密度采样,但其中加入了额外的电极。剩余的四十三位参与者都采用低密度采样。这些混合采样(HB)的解码表现与传统的低密度采样(LD)相似。\n这表明模型能够从不同空间采样密度的大脑皮层中学习到语音信息,这也暗示临床通常使用的采样密度对于未来的脑机接口应用也许是足够的。\n三、对于左右脑不同脑区对语音解码贡献度的研究\n研究人员也考察了大脑的语音相关区域在语音解码过程中的贡献程度,这对于未来在左右脑半球植入语音恢复设备提供了重要的参考。\n采用了遮挡技术(occlusion analysis)来评估不同大脑区域对语音解码的贡献度。\n通过对比 ResNet 和 Swin 解码器的因果与非因果模型,发现听觉皮层在非因果模型中的贡献更大,这侧面佐证了在实时语音解码应用中,必须使用因果模型,因为在实时语音解码中,我们无法利用神经反馈信号。\n此外,无论是在右脑还是左脑半球,传感运动皮层尤其是腹部区域的贡献度相似,这暗示在右半球植入神经假肢也许是一个可行的方案。\n最后总结来说,该研究在脑机接口上面取得了一系列的进展,不过研究人员也提到了目前模型的一些限制,比如解码流程需要有与ECoG记录配对的语音训练数据,这对失语患者可能不适用。\n未来他们希望开发能处理非网格数据的模型架构,以及更好地利用多病人、多模态脑电数据。\n对于脑机接口领域来说,目前的研究还处于相当早期的阶段,伴随着硬件技术的迭代和深度学习技术的快速进展,科幻电影中出现的脑机接口设想会愈发趋近实现。", "segmentation_method": "reviewed_source_semantics", "label": "左右脑、采样与局限", "source_line_range": [ 47, 63 ] }, { "id": "body-region-5", "text": "论 文 链 接 https www nature com articles s42256 024 00824 8 github 链 接 https github com flinkerlab neural speech decoding 更 多 生 成 的 语 音 例 子 https xc1490 github io nsd", "source_text": "论文链接:https://www.nature.com/articles/s42256-024-00824-8\nGitHub链接:https://github.com/flinkerlab/neural_speech_decoding\n更多生成的语音例子:https://xc1490.github.io/nsd/", "segmentation_method": "reviewed_source_semantics", "label": "论文与项目来源", "source_line_range": [ 64, 66 ] } ], "ending": { "text": "更多生成的语音例子:https://xc1490.github.io/nsd/" } } }, { "id": "article-002", "name": "龙虾冲浪终于不迷路了!网页智能体新框架Avenir-Web开源即SOTA", "url": "https://mp.weixin.qq.com/s?__biz=MzIzNjc1NzUzMw==&mid=2247887827&idx=3&sn=6f15e73e3e9766986b064a1fce6fe955", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "龙虾冲浪终于不迷路了!网页智能体新框架Avenir\\-Web开源即SOTA" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "publisher", "alternatives": [ "量子位" ] }, { "id": "attribution", "alternatives": [ "Avenir-Web 团队 投稿" ] }, { "id": "profile", "alternatives": [ "追踪人工智能新趋势,关注科技行业新突破" ] }, { "id": "profile-kind", "alternatives": [ "公众号" ] }, { "id": "control-1", "alternatives": [ "赞" ] }, { "id": "control-2", "alternatives": [ "分享" ] }, { "id": "control-3", "alternatives": [ "推荐" ] }, { "id": "control-4", "alternatives": [ "写留言" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Reviewed user-supplied archived initial state and user no-interaction attestation. User approved the four rules before publication; no independent live browser access claimed." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "龙虾冲浪终于不迷路了!网页智能体新框架Avenir-Web开源即SOTA" ], "html_selector": "#activity-name,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "wechat-qualified-v10/article-002/comment-proof.json", "sha256": "7595bd3f83055f32930e27a5cc721da7c018b1c0fe92ecbea28929ae8f2b6df6" }, "comment_presence_review": { "status": "observed_absent", "basis": "User confirms automatic-load save without interaction. Saved comment container has display:none inside stream_comment_dialog; failure labels are hidden dialog content. No actual displayed comment records found in this archived state; no claim of permanent absence.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "AI冲浪不丝滑?\n伦敦大学学院(UCL)、普林斯顿大学和爱丁堡大学的研究团队联合推出了Avenir-Web,让现有多模态模型像人类一样使用网页。\n现有的Web Agent在面对复杂的网页结构(如 iframe、Shadow DOM)时,往往会陷入“定位不准”“缺乏常识”或“走着走着就忘了”的窘境。\n特别是在长程任务(Long-horizon tasks)中,由于缺乏对特定网站操作流程的认知,Agent往往只能盲目探索,导致任务成功率低下。\nAvenir-Web是一个不需要额外训练的新模型,本质上是一套开源的Agent Harness,也就是一个training-free的框架,在ONLINE-MIND2WEB上取得53.7%的成功率,刷新最强开源纪录。\nWeb Agent 的三大难题\n研究团队指出,目前Web Agent在实际部署中面临三个核心瓶颈:\n元素定位不准(Inaccurate Grounding):过度依赖DOM树,在处理非标准结构(如 Canvas、嵌套 iframe)时极易失效。\n缺乏特定站点的流程知识(Site-specific Procedural Knowledge):Agent不懂得参考“用户手册”或“攻略”,只能乱撞。\n长程任务跟踪与记忆力不稳定(Unstable Memory):跨页面操作时容易产生“导航漂移”,陷入重复错误的循环。\n针对这些痛点,Avenir-Web提出了一套模块化的Agent Harness框架。\n由于它是Harness,而不是需要重新训练的模型,因此整个方案天然具备training-free的部署优势。\nAvenir-Web 的 Agent Harness 核心设计\n经验模仿规划(Experience-Imitation Planning, EIP)\n人类在操作复杂网站时,往往会先搜一下攻略。\nEIP模块模仿了这一行为:在任务开始前,它会利用大模型的在线搜索能力,检索目标网站的帮助中心、论坛或指南,并将这些信息转化为高层级的策略路线图。\n这种“先读攻略再上手”的方法,大幅减少了Agent的盲目探索时间,也规避了不可逆的导航错误。\n混合定位专家(Mixture of Grounding Experts, MoGE)\nMoGE采用“视觉优先”的原则。\n它将整个网页视为一张统一的视觉画布,直接基于坐标进行交互。\n这种方式天然地解决了让DOM派 Agent头疼的嵌套iframe问题。\n当视觉信息不足时,MoGE会触发语义结构推理作为兜底方案。\n这种“视觉坐标+语义兜底”的混合策略,使得Agent在处理各种UI范式时都具备极强的鲁棒性。\n任务跟踪清单(Task-Tracking Checklist)\n为了防止Agent “跑偏”,研究团队引入了结构化的任务清单。\n它将复杂指令分解为2-6个可验证的原子里程碑(Milestones),并在每一步操作后利用轻量级模型(如 Qwen-3-VL-8B)实时更新状态(Pending、In Progress、Completed、Failed)。\n自适应记忆(Adaptive Memory)\n针对上下文过长导致的幻觉问题,Avenir-Web采用了分块递归摘要(Chunked Recursive Summarization)机制。\n它维持一个大小为 的滑动窗口,将历史操作提炼为抽象的记忆状态,并专门设置了“失败反思缓冲区”(Failure Reflection Buffer),确保Agent能从过去的错误中吸取教训。\n实验结果\n研究团队在ONLINE-MIND2WEB这一包含136个真实网站、300个实时任务的严苛基准上进行了测试。\nAvenir-Web(以Gemini 3 Pro为内核)取得了53.7%的成功率,相比之前的开源标杆SeeAct(30.0%)提升了整整23.7%。\n而且,Avenir-Web的表现超越了闭源Claude Computer Use 3.7(47.3%)和ACT-1(52.7%),开始逼近OpenAI Operator(58.3%)等顶级商业Agent的水平。\n即使使用完全开源且轻量的Qwen-3-VL-8B作为内核,Avenir-Web依然取得了25.7%的成功率,已经逼近Browser Use(26.0%)与Agent-E(27.0%)等早期基于GPT-4o的重型Agent。\n这也说明,作为一套无需额外训练即可接入现有模型的开源Agent Harness,Avenir-Web在轻量模型上同样具备可观的实战价值。\n消融实验:谁才是关键?\n研究人员通过消融实验验证了各模块的贡献度。结果显示:\n去除EIP(经验模仿)后,成功率从48.0%直接降至36.0%,暴跌12.0%,证明了外部知识对Web任务的至关重要性。\n去除MoGE(混合定位)后,成功率会从48.0%降至40.0%;去除自适应记忆后,成功率则会进一步降至42.0%甚至36.0%,说明定位与记忆模块都不可或缺。\n特别是对于长程任务,递归摘要机制有效避免了上下文溢出带来的决策混乱。\n研究团队表示,Avenir-Web为通向具备人类级可靠性的通用数字助理迈出了坚实的一步。\n目前,该项目已开源,开发者无需训练新模型,就可以把这套Agent Harness用于自动化、软件测试及智能助手等场景的进一步探索。\n论文链接:https://arxiv.org/abs/2602.02468\n代码链接:https://github.com/Princeton-AI2-Lab/Avenir-Web", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "ai 冲 浪 不 丝 滑 伦 敦 大 学 学 院 ucl 普 林 斯 顿 大 学 和 爱 丁 堡 大 学 的 研 究 团 队 联 合 推 出 了 avenir web 让 现 有 多 模 态 模 型 像 人 类 一 样 使 用 网 页 现 有 的 web agent 在 面 对 复 杂 的 网 页 结 构 如 iframe shadow dom 时 往 往 会 陷 入 定 位 不 准 缺 乏 常 识 或 走 着 走 着 就 忘 了 的 窘 境 特 别 是 在 长 程 任 务 long horizon tasks 中 由 于 缺 乏 对 特 定 网 站 操 作 流 程 的 认 知 agent 往 往 只 能 盲 目 探 索 导 致 任 务 成 功 率 低 下 avenir web 是 一 个 不 需 要 额 外 训 练 的 新 模 型 本 质 上 是 一 套 开 源 的 agent harness 也 就 是 一 个 training free 的 框 架 在 online mind2web 上 取 得 53 7 的 成 功 率 刷 新 最 强 开 源 纪 录 web agent 的 三 大 难 题 研 究 团 队 指 出 目 前 web agent 在 实 际 部 署 中 面 临 三 个 核 心 瓶 颈 元 素 定 位 不 准 inaccurate grounding 过 度 依 赖 dom 树 在 处 理 非 标 准 结 构 如 canvas 嵌 套 iframe 时 极 易 失 效 缺 乏 特 定 站 点 的 流 程 知 识 site specific procedural knowledge agent 不 懂 得 参 考 用 户 手 册 或 攻 略 只 能 乱 撞 长 程 任 务 跟 踪 与 记 忆 力 不 稳 定 unstable memory 跨 页 面 操 作 时 容 易 产 生 导 航 漂 移 陷 入 重 复 错 误 的 循 环 针 对 这 些 痛 点 avenir web 提 出 了 一 套 模 块 化 的 agent harness 框 架 由 于 它 是 harness 而 不 是 需 要 重 新 训 练 的 模 型 因 此 整 个 方 案 天 然 具 备 training free 的 部 署 优 势", "source_text": "AI冲浪不丝滑?\n伦敦大学学院(UCL)、普林斯顿大学和爱丁堡大学的研究团队联合推出了Avenir-Web,让现有多模态模型像人类一样使用网页。\n现有的Web Agent在面对复杂的网页结构(如 iframe、Shadow DOM)时,往往会陷入“定位不准”“缺乏常识”或“走着走着就忘了”的窘境。\n特别是在长程任务(Long-horizon tasks)中,由于缺乏对特定网站操作流程的认知,Agent往往只能盲目探索,导致任务成功率低下。\nAvenir-Web是一个不需要额外训练的新模型,本质上是一套开源的Agent Harness,也就是一个training-free的框架,在ONLINE-MIND2WEB上取得53.7%的成功率,刷新最强开源纪录。\nWeb Agent 的三大难题\n研究团队指出,目前Web Agent在实际部署中面临三个核心瓶颈:\n元素定位不准(Inaccurate Grounding):过度依赖DOM树,在处理非标准结构(如 Canvas、嵌套 iframe)时极易失效。\n缺乏特定站点的流程知识(Site-specific Procedural Knowledge):Agent不懂得参考“用户手册”或“攻略”,只能乱撞。\n长程任务跟踪与记忆力不稳定(Unstable Memory):跨页面操作时容易产生“导航漂移”,陷入重复错误的循环。\n针对这些痛点,Avenir-Web提出了一套模块化的Agent Harness框架。\n由于它是Harness,而不是需要重新训练的模型,因此整个方案天然具备training-free的部署优势。", "segmentation_method": "reviewed_source_semantics", "label": "开篇与三大难题", "source_line_range": [ 1, 12 ] }, { "id": "body-region-2", "text": "avenir web 的 agent harness 核 心 设 计 经 验 模 仿 规 划 experience imitation planning eip 人 类 在 操 作 复 杂 网 站 时 往 往 会 先 搜 一 下 攻 略 eip 模 块 模 仿 了 这 一 行 为 在 任 务 开 始 前 它 会 利 用 大 模 型 的 在 线 搜 索 能 力 检 索 目 标 网 站 的 帮 助 中 心 论 坛 或 指 南 并 将 这 些 信 息 转 化 为 高 层 级 的 策 略 路 线 图 这 种 先 读 攻 略 再 上 手 的 方 法 大 幅 减 少 了 agent 的 盲 目 探 索 时 间 也 规 避 了 不 可 逆 的 导 航 错 误 混 合 定 位 专 家 mixture of grounding experts moge moge 采 用 视 觉 优 先 的 原 则 它 将 整 个 网 页 视 为 一 张 统 一 的 视 觉 画 布 直 接 基 于 坐 标 进 行 交 互 这 种 方 式 天 然 地 解 决 了 让 dom 派 agent 头 疼 的 嵌 套 iframe 问 题 当 视 觉 信 息 不 足 时 moge 会 触 发 语 义 结 构 推 理 作 为 兜 底 方 案 这 种 视 觉 坐 标 语 义 兜 底 的 混 合 策 略 使 得 agent 在 处 理 各 种 ui 范 式 时 都 具 备 极 强 的 鲁 棒 性", "source_text": "Avenir-Web 的 Agent Harness 核心设计\n经验模仿规划(Experience-Imitation Planning, EIP)\n人类在操作复杂网站时,往往会先搜一下攻略。\nEIP模块模仿了这一行为:在任务开始前,它会利用大模型的在线搜索能力,检索目标网站的帮助中心、论坛或指南,并将这些信息转化为高层级的策略路线图。\n这种“先读攻略再上手”的方法,大幅减少了Agent的盲目探索时间,也规避了不可逆的导航错误。\n混合定位专家(Mixture of Grounding Experts, MoGE)\nMoGE采用“视觉优先”的原则。\n它将整个网页视为一张统一的视觉画布,直接基于坐标进行交互。\n这种方式天然地解决了让DOM派 Agent头疼的嵌套iframe问题。\n当视觉信息不足时,MoGE会触发语义结构推理作为兜底方案。\n这种“视觉坐标+语义兜底”的混合策略,使得Agent在处理各种UI范式时都具备极强的鲁棒性。", "segmentation_method": "reviewed_source_semantics", "label": "规划与定位模块", "source_line_range": [ 13, 23 ] }, { "id": "body-region-3", "text": "任 务 跟 踪 清 单 task tracking checklist 为 了 防 止 agent 跑 偏 研 究 团 队 引 入 了 结 构 化 的 任 务 清 单 它 将 复 杂 指 令 分 解 为 2 6 个 可 验 证 的 原 子 里 程 碑 milestones 并 在 每 一 步 操 作 后 利 用 轻 量 级 模 型 如 qwen 3 vl 8b 实 时 更 新 状 态 pending in progress completed failed 自 适 应 记 忆 adaptive memory 针 对 上 下 文 过 长 导 致 的 幻 觉 问 题 avenir web 采 用 了 分 块 递 归 摘 要 chunked recursive summarization 机 制 它 维 持 一 个 大 小 为 的 滑 动 窗 口 将 历 史 操 作 提 炼 为 抽 象 的 记 忆 状 态 并 专 门 设 置 了 失 败 反 思 缓 冲 区 failure reflection buffer 确 保 agent 能 从 过 去 的 错 误 中 吸 取 教 训", "source_text": "任务跟踪清单(Task-Tracking Checklist)\n为了防止Agent “跑偏”,研究团队引入了结构化的任务清单。\n它将复杂指令分解为2-6个可验证的原子里程碑(Milestones),并在每一步操作后利用轻量级模型(如 Qwen-3-VL-8B)实时更新状态(Pending、In Progress、Completed、Failed)。\n自适应记忆(Adaptive Memory)\n针对上下文过长导致的幻觉问题,Avenir-Web采用了分块递归摘要(Chunked Recursive Summarization)机制。\n它维持一个大小为 的滑动窗口,将历史操作提炼为抽象的记忆状态,并专门设置了“失败反思缓冲区”(Failure Reflection Buffer),确保Agent能从过去的错误中吸取教训。", "segmentation_method": "reviewed_source_semantics", "label": "任务跟踪与记忆模块", "source_line_range": [ 24, 29 ] }, { "id": "body-region-4", "text": "实 验 结 果 研 究 团 队 在 online mind2web 这 一 包 含 136 个 真 实 网 站 300 个 实 时 任 务 的 严 苛 基 准 上 进 行 了 测 试 avenir web 以 gemini 3 pro 为 内 核 取 得 了 53 7 的 成 功 率 相 比 之 前 的 开 源 标 杆 seeact 30 0 提 升 了 整 整 23 7 而 且 avenir web 的 表 现 超 越 了 闭 源 claude computer use 3 7 47 3 和 act 1 52 7 开 始 逼 近 openai operator 58 3 等 顶 级 商 业 agent 的 水 平 即 使 使 用 完 全 开 源 且 轻 量 的 qwen 3 vl 8b 作 为 内 核 avenir web 依 然 取 得 了 25 7 的 成 功 率 已 经 逼 近 browser use 26 0 与 agent e 27 0 等 早 期 基 于 gpt 4o 的 重 型 agent 这 也 说 明 作 为 一 套 无 需 额 外 训 练 即 可 接 入 现 有 模 型 的 开 源 agent harness avenir web 在 轻 量 模 型 上 同 样 具 备 可 观 的 实 战 价 值 消 融 实 验 谁 才 是 关 键 研 究 人 员 通 过 消 融 实 验 验 证 了 各 模 块 的 贡 献 度 结 果 显 示 去 除 eip 经 验 模 仿 后 成 功 率 从 48 0 直 接 降 至 36 0 暴 跌 12 0 证 明 了 外 部 知 识 对 web 任 务 的 至 关 重 要 性 去 除 moge 混 合 定 位 后 成 功 率 会 从 48 0 降 至 40 0 去 除 自 适 应 记 忆 后 成 功 率 则 会 进 一 步 降 至 42 0 甚 至 36 0 说 明 定 位 与 记 忆 模 块 都 不 可 或 缺 特 别 是 对 于 长 程 任 务 递 归 摘 要 机 制 有 效 避 免 了 上 下 文 溢 出 带 来 的 决 策 混 乱 研 究 团 队 表 示 avenir web 为 通 向 具 备 人 类 级 可 靠 性 的 通 用 数 字 助 理 迈 出 了 坚 实 的 一 步 目 前 该 项 目 已 开 源 开 发 者 无 需 训 练 新 模 型 就 可 以 把 这 套 agent harness 用 于 自 动 化 软 件 测 试 及 智 能 助 手 等 场 景 的 进 一 步 探 索", "source_text": "实验结果\n研究团队在ONLINE-MIND2WEB这一包含136个真实网站、300个实时任务的严苛基准上进行了测试。\nAvenir-Web(以Gemini 3 Pro为内核)取得了53.7%的成功率,相比之前的开源标杆SeeAct(30.0%)提升了整整23.7%。\n而且,Avenir-Web的表现超越了闭源Claude Computer Use 3.7(47.3%)和ACT-1(52.7%),开始逼近OpenAI Operator(58.3%)等顶级商业Agent的水平。\n即使使用完全开源且轻量的Qwen-3-VL-8B作为内核,Avenir-Web依然取得了25.7%的成功率,已经逼近Browser Use(26.0%)与Agent-E(27.0%)等早期基于GPT-4o的重型Agent。\n这也说明,作为一套无需额外训练即可接入现有模型的开源Agent Harness,Avenir-Web在轻量模型上同样具备可观的实战价值。\n消融实验:谁才是关键?\n研究人员通过消融实验验证了各模块的贡献度。结果显示:\n去除EIP(经验模仿)后,成功率从48.0%直接降至36.0%,暴跌12.0%,证明了外部知识对Web任务的至关重要性。\n去除MoGE(混合定位)后,成功率会从48.0%降至40.0%;去除自适应记忆后,成功率则会进一步降至42.0%甚至36.0%,说明定位与记忆模块都不可或缺。\n特别是对于长程任务,递归摘要机制有效避免了上下文溢出带来的决策混乱。\n研究团队表示,Avenir-Web为通向具备人类级可靠性的通用数字助理迈出了坚实的一步。\n目前,该项目已开源,开发者无需训练新模型,就可以把这套Agent Harness用于自动化、软件测试及智能助手等场景的进一步探索。", "segmentation_method": "reviewed_source_semantics", "label": "实验与消融结果", "source_line_range": [ 30, 42 ] }, { "id": "body-region-5", "text": "论 文 链 接 https arxiv org abs 2602 02468 代 码 链 接 https github com princeton ai2 lab avenir web", "source_text": "论文链接:https://arxiv.org/abs/2602.02468\n代码链接:https://github.com/Princeton-AI2-Lab/Avenir-Web", "segmentation_method": "reviewed_source_semantics", "label": "论文与项目来源", "source_line_range": [ 43, 44 ] } ], "ending": { "text": "代码链接:https://github.com/Princeton-AI2-Lab/Avenir-Web" } } }, { "id": "article-003", "name": "200+推文涨粉8000:我的推特增长策略", "url": "https://mp.weixin.qq.com/s/2y463r9G4hnsIc0c2ig7dA", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "200\\+推文涨粉8000:我的推特增长策略" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "publisher", "alternatives": [ "安小竹的自留地" ] }, { "id": "original", "alternatives": [ "原创" ] }, { "id": "control-1", "alternatives": [ "赞" ] }, { "id": "control-2", "alternatives": [ "分享" ] }, { "id": "control-3", "alternatives": [ "推荐" ] }, { "id": "control-4", "alternatives": [ "写留言" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Reviewed user-supplied archived initial state and user no-interaction attestation. User approved the four rules before publication; no independent live browser access claimed." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "200+推文涨粉8000:我的推特增长策略" ], "html_selector": "#activity-name,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "wechat-qualified-v10/article-003/comment-proof.json", "sha256": "55077c44049c2fb4ef2f64c31d2869413e31bcdac9468ed1b5e4fdd1394babdc" }, "comment_presence_review": { "status": "observed_absent", "basis": "User confirms automatic-load save without interaction. Saved comment container has display:none inside stream_comment_dialog; failure labels are hidden dialog content. No actual displayed comment records found in this archived state; no claim of permanent absence.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "玩 Twitter 4个多月了,共发布了 200+ 推,获得了 8000+ 关注,或许增长速度不是最快的,但几乎没有为了运营账号专门去花费时间频繁互动、收集素材及蹭流量,投入产出比可以说是第一梯队的,整理下我的增长策略以供参考吧。\n我对 Twitter 的看法:\nTwitter 是推荐算法主导的强时效性平台,新帖子会有冷启分发,冷启阶段互动高的内容会得到更多曝光,一个热帖的流量远高于无数普通帖子之和,发布时间超过 1-2 天后几乎没有长尾分发。\n为什么发推?作为产品推广渠道是共识,这里不再赘述,但另两个在我看来却更为重要。首先是人脉,发推能够吸引同频的人并建立联系——当前已有几十人通过我的内容加了好友;然后是可以作为个人名片,这是个陌生人合作的时代,经营一个社媒账号可以帮助迅速建立信任,这也是我发推频率如此低,且会定期把过时的推删除的原因——我希望我的推特时间线是可阅读的。\n关注数量并不是最重要的,关系的质量才是。从商业化推广来说,基于发布的内容可以大致得到关注者的用户画像,只有产品目标用户与关注人群相匹配时,Twitter 才是个有效的推广渠道;从分发效率来说,高质量内容吸引 KOL 的关注,需要推广时 KOL 的互动转发远比下水道流量吸引的无效关注效率高得多;从建立的关系来说,关注仅是一个单一维度的动作,但每个人都会对这种连接有自己的判断:我是看小丑,找乐子,找工具人,礼貌性互关,膜拜大佬,还是被真诚的分享吸引的赛博朋友?\n差异化是关键。在所有人都在玩套路时,真诚就是最大的差异化。\n我的策略(每个人策略不同,并不代表普世原则):\nTwitter 是记事本,现实生活才是关键,不要舍本逐末。Twitter 只是现实生活的一个投影,功夫在 Twitter 外:最高效的增长,永远都是有优秀的产品,有精彩的经历,有世俗的成功,然后自然会有人通过这种社交平台来建立联系。\n关注是个人不可控的副产品,不要影响情绪。人有分享欲望,有定期复盘的需求,将这些放在社交平台上并不会有什么额外成本,关注只是因为吸引了同频的人,取关/拉黑也只是不对脾气,不要上升到互相攻击或影响情绪。\n触动自己的也大概率会触动别人。我的曝光高的帖子,无一例外是让我有很大触动,对我有很大帮助,以及写作时候有很大情绪起伏的,记录日常中的这些事情,并分享出来,会收获共鸣。\n语言要浅显易懂,语气要谦虚。有脾气当然也是一种独特的个性,但如果不想把时间消耗在无意义的对线上,最好谦虚一点,不然会激发别人好胜心,有无数人会出来秀优越的。\n长度不是关键,信息密度才是,在保证信息量的同时,文字是能短则短。我每次发推,都是先写出来,然后自己读一遍,读的过程一方面是改语病,更重要的是做精简。我虽然发了几篇一二千字的热帖,但也是精简之后的结果。\n一些小技巧。账号的冷启阶段是最难的,与 KOL 的互动会极大加速这一过程,我的最初三四百粉丝,就是靠@tualatrix的一篇帖子帮忙引流,增长过程中@gefei55给了很大流量,感谢两位贵人。我现在有些好的产品和内容也会帮忙分享:之前写了篇价值投资的热帖,有知有行团队联系了商务推广,我因为不想做外部商业化拒掉了,但他们的内容太好,我后面又偷偷免费给挂上了。如何让别人注意到你呢?提到相关内容时可以@一下。但需要注意的是,没人有义务帮忙引流,我主动分享的东西,从来都是我感觉有价值的,值得被更多人看到的,互动只是帮忙被看到,是否能承接还是要靠内容本身。另一个很有用的小技巧,是第一句话要提纲挈领且吸引人(配图同理),这样能够最大程度吸引别人继续读下去。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "玩 twitter 4 个 多 月 了 共 发 布 了 200 推 获 得 了 8000 关 注 或 许 增 长 速 度 不 是 最 快 的 但 几 乎 没 有 为 了 运 营 账 号 专 门 去 花 费 时 间 频 繁 互 动 收 集 素 材 及 蹭 流 量 投 入 产 出 比 可 以 说 是 第 一 梯 队 的 整 理 下 我 的 增 长 策 略 以 供 参 考 吧 我 对 twitter 的 看 法 twitter 是 推 荐 算 法 主 导 的 强 时 效 性 平 台 新 帖 子 会 有 冷 启 分 发 冷 启 阶 段 互 动 高 的 内 容 会 得 到 更 多 曝 光 一 个 热 帖 的 流 量 远 高 于 无 数 普 通 帖 子 之 和 发 布 时 间 超 过 1 2 天 后 几 乎 没 有 长 尾 分 发", "source_text": "玩 Twitter 4个多月了,共发布了 200+ 推,获得了 8000+ 关注,或许增长速度不是最快的,但几乎没有为了运营账号专门去花费时间频繁互动、收集素材及蹭流量,投入产出比可以说是第一梯队的,整理下我的增长策略以供参考吧。\n我对 Twitter 的看法:\nTwitter 是推荐算法主导的强时效性平台,新帖子会有冷启分发,冷启阶段互动高的内容会得到更多曝光,一个热帖的流量远高于无数普通帖子之和,发布时间超过 1-2 天后几乎没有长尾分发。", "segmentation_method": "reviewed_source_semantics", "label": "增长背景与平台机制", "source_line_range": [ 1, 3 ] }, { "id": "body-region-2", "text": "为 什 么 发 推 作 为 产 品 推 广 渠 道 是 共 识 这 里 不 再 赘 述 但 另 两 个 在 我 看 来 却 更 为 重 要 首 先 是 人 脉 发 推 能 够 吸 引 同 频 的 人 并 建 立 联 系 当 前 已 有 几 十 人 通 过 我 的 内 容 加 了 好 友 然 后 是 可 以 作 为 个 人 名 片 这 是 个 陌 生 人 合 作 的 时 代 经 营 一 个 社 媒 账 号 可 以 帮 助 迅 速 建 立 信 任 这 也 是 我 发 推 频 率 如 此 低 且 会 定 期 把 过 时 的 推 删 除 的 原 因 我 希 望 我 的 推 特 时 间 线 是 可 阅 读 的 关 注 数 量 并 不 是 最 重 要 的 关 系 的 质 量 才 是 从 商 业 化 推 广 来 说 基 于 发 布 的 内 容 可 以 大 致 得 到 关 注 者 的 用 户 画 像 只 有 产 品 目 标 用 户 与 关 注 人 群 相 匹 配 时 twitter 才 是 个 有 效 的 推 广 渠 道 从 分 发 效 率 来 说 高 质 量 内 容 吸 引 kol 的 关 注 需 要 推 广 时 kol 的 互 动 转 发 远 比 下 水 道 流 量 吸 引 的 无 效 关 注 效 率 高 得 多 从 建 立 的 关 系 来 说 关 注 仅 是 一 个 单 一 维 度 的 动 作 但 每 个 人 都 会 对 这 种 连 接 有 自 己 的 判 断 我 是 看 小 丑 找 乐 子 找 工 具 人 礼 貌 性 互 关 膜 拜 大 佬 还 是 被 真 诚 的 分 享 吸 引 的 赛 博 朋 友 差 异 化 是 关 键 在 所 有 人 都 在 玩 套 路 时 真 诚 就 是 最 大 的 差 异 化", "source_text": "为什么发推?作为产品推广渠道是共识,这里不再赘述,但另两个在我看来却更为重要。首先是人脉,发推能够吸引同频的人并建立联系——当前已有几十人通过我的内容加了好友;然后是可以作为个人名片,这是个陌生人合作的时代,经营一个社媒账号可以帮助迅速建立信任,这也是我发推频率如此低,且会定期把过时的推删除的原因——我希望我的推特时间线是可阅读的。\n关注数量并不是最重要的,关系的质量才是。从商业化推广来说,基于发布的内容可以大致得到关注者的用户画像,只有产品目标用户与关注人群相匹配时,Twitter 才是个有效的推广渠道;从分发效率来说,高质量内容吸引 KOL 的关注,需要推广时 KOL 的互动转发远比下水道流量吸引的无效关注效率高得多;从建立的关系来说,关注仅是一个单一维度的动作,但每个人都会对这种连接有自己的判断:我是看小丑,找乐子,找工具人,礼貌性互关,膜拜大佬,还是被真诚的分享吸引的赛博朋友?\n差异化是关键。在所有人都在玩套路时,真诚就是最大的差异化。", "segmentation_method": "reviewed_source_semantics", "label": "发推目的与关系质量", "source_line_range": [ 4, 6 ] }, { "id": "body-region-3", "text": "我 的 策 略 每 个 人 策 略 不 同 并 不 代 表 普 世 原 则 twitter 是 记 事 本 现 实 生 活 才 是 关 键 不 要 舍 本 逐 末 twitter 只 是 现 实 生 活 的 一 个 投 影 功 夫 在 twitter 外 最 高 效 的 增 长 永 远 都 是 有 优 秀 的 产 品 有 精 彩 的 经 历 有 世 俗 的 成 功 然 后 自 然 会 有 人 通 过 这 种 社 交 平 台 来 建 立 联 系 关 注 是 个 人 不 可 控 的 副 产 品 不 要 影 响 情 绪 人 有 分 享 欲 望 有 定 期 复 盘 的 需 求 将 这 些 放 在 社 交 平 台 上 并 不 会 有 什 么 额 外 成 本 关 注 只 是 因 为 吸 引 了 同 频 的 人 取 关 拉 黑 也 只 是 不 对 脾 气 不 要 上 升 到 互 相 攻 击 或 影 响 情 绪", "source_text": "我的策略(每个人策略不同,并不代表普世原则):\nTwitter 是记事本,现实生活才是关键,不要舍本逐末。Twitter 只是现实生活的一个投影,功夫在 Twitter 外:最高效的增长,永远都是有优秀的产品,有精彩的经历,有世俗的成功,然后自然会有人通过这种社交平台来建立联系。\n关注是个人不可控的副产品,不要影响情绪。人有分享欲望,有定期复盘的需求,将这些放在社交平台上并不会有什么额外成本,关注只是因为吸引了同频的人,取关/拉黑也只是不对脾气,不要上升到互相攻击或影响情绪。", "segmentation_method": "reviewed_source_semantics", "label": "现实生活与分享心态", "source_line_range": [ 7, 9 ] }, { "id": "body-region-4", "text": "触 动 自 己 的 也 大 概 率 会 触 动 别 人 我 的 曝 光 高 的 帖 子 无 一 例 外 是 让 我 有 很 大 触 动 对 我 有 很 大 帮 助 以 及 写 作 时 候 有 很 大 情 绪 起 伏 的 记 录 日 常 中 的 这 些 事 情 并 分 享 出 来 会 收 获 共 鸣 语 言 要 浅 显 易 懂 语 气 要 谦 虚 有 脾 气 当 然 也 是 一 种 独 特 的 个 性 但 如 果 不 想 把 时 间 消 耗 在 无 意 义 的 对 线 上 最 好 谦 虚 一 点 不 然 会 激 发 别 人 好 胜 心 有 无 数 人 会 出 来 秀 优 越 的 长 度 不 是 关 键 信 息 密 度 才 是 在 保 证 信 息 量 的 同 时 文 字 是 能 短 则 短 我 每 次 发 推 都 是 先 写 出 来 然 后 自 己 读 一 遍 读 的 过 程 一 方 面 是 改 语 病 更 重 要 的 是 做 精 简 我 虽 然 发 了 几 篇 一 二 千 字 的 热 帖 但 也 是 精 简 之 后 的 结 果", "source_text": "触动自己的也大概率会触动别人。我的曝光高的帖子,无一例外是让我有很大触动,对我有很大帮助,以及写作时候有很大情绪起伏的,记录日常中的这些事情,并分享出来,会收获共鸣。\n语言要浅显易懂,语气要谦虚。有脾气当然也是一种独特的个性,但如果不想把时间消耗在无意义的对线上,最好谦虚一点,不然会激发别人好胜心,有无数人会出来秀优越的。\n长度不是关键,信息密度才是,在保证信息量的同时,文字是能短则短。我每次发推,都是先写出来,然后自己读一遍,读的过程一方面是改语病,更重要的是做精简。我虽然发了几篇一二千字的热帖,但也是精简之后的结果。", "segmentation_method": "reviewed_source_semantics", "label": "内容、语气与信息密度", "source_line_range": [ 10, 12 ] }, { "id": "body-region-5", "text": "一 些 小 技 巧 账 号 的 冷 启 阶 段 是 最 难 的 与 kol 的 互 动 会 极 大 加 速 这 一 过 程 我 的 最 初 三 四 百 粉 丝 就 是 靠 tualatrix 的 一 篇 帖 子 帮 忙 引 流 增 长 过 程 中 gefei55 给 了 很 大 流 量 感 谢 两 位 贵 人 我 现 在 有 些 好 的 产 品 和 内 容 也 会 帮 忙 分 享 之 前 写 了 篇 价 值 投 资 的 热 帖 有 知 有 行 团 队 联 系 了 商 务 推 广 我 因 为 不 想 做 外 部 商 业 化 拒 掉 了 但 他 们 的 内 容 太 好 我 后 面 又 偷 偷 免 费 给 挂 上 了 如 何 让 别 人 注 意 到 你 呢 提 到 相 关 内 容 时 可 以 一 下 但 需 要 注 意 的 是 没 人 有 义 务 帮 忙 引 流 我 主 动 分 享 的 东 西 从 来 都 是 我 感 觉 有 价 值 的 值 得 被 更 多 人 看 到 的 互 动 只 是 帮 忙 被 看 到 是 否 能 承 接 还 是 要 靠 内 容 本 身 另 一 个 很 有 用 的 小 技 巧 是 第 一 句 话 要 提 纲 挈 领 且 吸 引 人 配 图 同 理 这 样 能 够 最 大 程 度 吸 引 别 人 继 续 读 下 去", "source_text": "一些小技巧。账号的冷启阶段是最难的,与 KOL 的互动会极大加速这一过程,我的最初三四百粉丝,就是靠@tualatrix的一篇帖子帮忙引流,增长过程中@gefei55给了很大流量,感谢两位贵人。我现在有些好的产品和内容也会帮忙分享:之前写了篇价值投资的热帖,有知有行团队联系了商务推广,我因为不想做外部商业化拒掉了,但他们的内容太好,我后面又偷偷免费给挂上了。如何让别人注意到你呢?提到相关内容时可以@一下。但需要注意的是,没人有义务帮忙引流,我主动分享的东西,从来都是我感觉有价值的,值得被更多人看到的,互动只是帮忙被看到,是否能承接还是要靠内容本身。另一个很有用的小技巧,是第一句话要提纲挈领且吸引人(配图同理),这样能够最大程度吸引别人继续读下去。", "segmentation_method": "reviewed_source_semantics", "label": "冷启动、互动与开头技巧", "source_line_range": [ 13, 13 ] } ], "ending": { "text": "一些小技巧。账号的冷启阶段是最难的,与 KOL 的互动会极大加速这一过程,我的最初三四百粉丝,就是靠@tualatrix的一篇帖子帮忙引流,增长过程中@gefei55给了很大流量,感谢两位贵人。我现在有些好的产品和内容也会帮忙分享:之前写了篇价值投资的热帖,有知有行团队联系了商务推广,我因为不想做外部商业化拒掉了,但他们的内容太好,我后面又偷偷免费给挂上了。如何让别人注意到你呢?提到相关内容时可以@一下。但需要注意的是,没人有义务帮忙引流,我主动分享的东西,从来都是我感觉有价值的,值得被更多人看到的,互动只是帮忙被看到,是否能承接还是要靠内容本身。另一个很有用的小技巧,是第一句话要提纲挈领且吸引人(配图同理),这样能够最大程度吸引别人继续读下去。" } } }, { "id": "article-005", "name": "Karpathy:vibe coding 长帖", "url": "https://x.com/karpathy/status/1886192184808149383", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "There's a new kind of coding I call \"vibe coding\"" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Andrej Karpathy" ] }, { "id": "stable-2", "alternatives": [ "@karpathy" ] }, { "id": "stable-20", "alternatives": [ "Terms" ] }, { "id": "stable-21", "alternatives": [ "Privacy" ] }, { "id": "stable-22", "alternatives": [ "Cookies" ] }, { "id": "stable-23", "alternatives": [ "Accessibility" ] }, { "id": "stable-24", "alternatives": [ "US TIDA" ] }, { "id": "stable-25", "alternatives": [ "Ads Info" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The target post is fully visible from first to final sentence in the initial viewport. Its fixed single post is distinct from the changing reply timeline; no show-more control or line clamp applies to its body. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "comment_contract": { "record_selector": "article[data-testid=\"tweet\"]:not(:has(a[href=\"/karpathy/status/1886192184808149383\"] > time))", "author_selector": "[data-testid=\"User-Name\"] > div:first-child a", "body_selector": "[data-testid=\"tweetText\"]", "section_markers": [ "Post your reply" ], "version": 2, "minimum_comments": 6, "text_scope": { "body_end": "t really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.", "end_markers": [ "Relevant people", "Trending now", "Terms", "Privacy" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-comment-coverage-r7/article-005/comment-qualification-reference-r7.json", "sha256": "2a95107eb52e674e874451103ea2138cf5e400ed77a7cdc9a44aa2eb5cc800a4" }, "comment_presence_review": { "status": "visible_text", "basis": "A new direct tab was opened for this audit. Only automatic loading and read-only observations were used; no clicks, expansion, scrolling, login, tab switching or pagination. Seven reply cards with author and visible text appear automatically, excluding the main post. Show more and Show replies were untouched; only their displayed prefixes count. The page/browser automatically settled at scrollY 10 without an agent scroll action.", "observed_record_count": 7, "qualification_only": true } }, "ground_truth_main_content": "There's a new kind of coding I call \"vibe coding\", where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It's possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper so I barely even touch the keyboard. I ask for the dumbest things like \"decrease the padding on the sidebar by half\" because I'm too lazy to find it. I \"Accept All\" always, I don't read the diffs anymore. When I get error messages I just copy paste them in with no comment, usually that fixes it. The code grows beyond my usual comprehension, I'd have to really read through it for a while. Sometimes the LLMs can't fix a bug so I just work around it or ask for random changes until it goes away. It's not too bad for throwaway weekend projects, but still quite amusing. I'm building a project or webapp, but it's not really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 1, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "there s a new kind of coding i call vibe coding where you fully give in to the vibes embrace exponentials and forget that the code even exists it s possible because the llms e g cursor composer w sonnet are getting too good also i just talk to composer with superwhisper so i barely even touch the keyboard i ask for the dumbest things like decrease the padding on the sidebar by half because i m too lazy to find it i accept all always i don t read the diffs anymore when i get error messages i just copy paste them in with no comment usually that fixes it the code grows beyond my usual comprehension i d have to really read through it for a while sometimes the llms can t fix a bug so i just work around it or ask for random changes until it goes away it s not too bad for throwaway weekend projects but still quite amusing i m building a project or webapp but it s not really coding i just see stuff say stuff run stuff and copy paste stuff and it mostly works", "source_text": "There's a new kind of coding I call \"vibe coding\", where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It's possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper so I barely even touch the keyboard. I ask for the dumbest things like \"decrease the padding on the sidebar by half\" because I'm too lazy to find it. I \"Accept All\" always, I don't read the diffs anymore. When I get error messages I just copy paste them in with no comment, usually that fixes it. The code grows beyond my usual comprehension, I'd have to really read through it for a while. Sometimes the LLMs can't fix a bug so I just work around it or ask for random changes until it goes away. It's not too bad for throwaway weekend projects, but still quite amusing. I'm building a project or webapp, but it's not really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:There's a new kind of coding I call \"vibe coding\", where you", "source_line_range": [ 1, 1 ] } ], "ending": { "text": "t really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works." } } }, { "id": "article-006", "name": "How We Made Cloud Browsers 3x Cheaper and Faster", "url": "https://x.com/browser_use/status/2066911791360422071", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How We Made Cloud Browsers 3x Cheaper and Faster" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Browser Use" ] }, { "id": "stable-3", "alternatives": [ "@browser_use" ] }, { "id": "stable-21", "alternatives": [ "Terms" ] }, { "id": "stable-22", "alternatives": [ "Privacy" ] }, { "id": "stable-23", "alternatives": [ "Cookies" ] }, { "id": "stable-24", "alternatives": [ "Accessibility" ] }, { "id": "stable-25", "alternatives": [ "US TIDA" ] }, { "id": "stable-26", "alternatives": [ "Ads Info" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete longform body and all 11 headings through the final cloud.browser-use.com link were present on initial automatic load; full-page screenshot confirms non-collapsed flowing article content and separate post controls. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How We Made Cloud Browsers 3x Cheaper and Faster" ], "html_selector": "[data-testid=\"twitter-article-title\"],h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-comment-coverage-r7/article-006/comment-qualification-reference-r7.json", "sha256": "762e8b50cf30c973c04ce16efa3effbaf8da2a5f8d0a3b9a972f6b91ca5dfc70" }, "comment_presence_review": { "status": "observed_absent", "basis": "A new direct tab was opened for this audit. Only automatic loading and read-only observations were used; no clicks, expansion, scrolling, login, tab switching or pagination. The full article and reply composer are loaded; no reply cards appear in either complete source observation. The page/browser automatically settled at scrollY 10 without an agent scroll action.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "We cut browser sessions from $0.06 to $0.02 per hour while making browsers start and scale faster.\nOur cloud browsers need to do three things at once: start quickly, remain isolated, and be cheap. That is why we rebuilt Browser Use Cloud, so a new session starts in under a second and costs $0.02 per browser hour, down from $0.06.\nThis is harder than it sounds. A browser has Chromium, a filesystem, cookies, cache, proxy settings, downloads, and sometimes a logged-in customer session. If one browser can read another browser's state, it creates a security problem.\nThe normal answer is a virtual machine, or VM. A VM is a computer inside a computer: it gets its own CPU, memory, disk, and network devices. It is separate from everything else on its host, and if the browser breaks, leaks information, or gets attacked, the damage stays within the VM.\nNormal VMs, however, are too heavy for cloud browsers. We need to create them constantly, sometimes thousands at a time, and throw them away as soon as sessions end. If each browser needs a slow, expensive VM, the product becomes slow and expensive, too.\nThe question for us is whether we could give every browser its own VM without making users wait or pay for it. We now do that with Firecracker, a lightweight VM system.\nEvery Browser Use Cloud session runs in its own, tiny VM. These VMs run on EC2, Amazon's rented cloud servers.\nThat is the unusual part. Firecracker is normally run on bare-metal servers, where you rent the whole physical machine. To reduce customers' cost, we run it on regular EC2, where AWS has already put your server inside a VM.\nThis should be slow. Nested VMs make memory and CPU operations more expensive, and Chromium takes time to start. This post is about how we made this setup fast and efficient.\nBut first, why did we rebuild our infrastructure?\nIt is difficult to be fast, isolated, and cheap all at once.\nWhy we left unikernels behind\nWe used to run cloud browsers with Unikraft, which builds small, VM-like containers called unikernels. Unikernels, instead of booting a full Linux system, load a small image built for your purposes. Unikernels start quickly and are cheap when idle because you can shut them down when no one is using them.\nUnikraft was good for turning browsers off when they were not in use, but bad at adding more browsers quickly when traffic spiked. If more users suddenly asked for browsers at once, you would need to scale browser capacity rapidly. Unikraft does not have good built-in autoscaling, so an engineer had to change a variable, manually adding more instances.\nDuring a burst in traffic, the system, instead of reacting on its own, required humans to adjust it. This caused problems: one load test brought down production for 45 minutes. So we rebuilt our setup on Firecracker.\nUnikraft needed an engineer to add capacity by hand, so it lagged behind a traffic spike and collapsed. After the rebuild, capacity tracks demand automatically.\nFirecracker provides a layer through which you can create, monitor, and run VMs. It gives each VM CPU, memory, disk, and network devices, and it keeps it isolated from the host and from other VMs.\nTeaching browsers to scale themselves\nFirecracker gave each browser its own VM. But it did not inherently solve the problem that broke the old system: deciding how many VMs to run, where to put them, and when to add more.\nSo we built our own control plane. The control plane monitors our fleet of browsers and decides whether we should scale up or down.\nWhen a user asks for a browser, the control plane picks a machine with room. When traffic rises, it starts more machines. When traffic falls, it stops sending new browsers to machines we want to remove.\nIt checks the fleet in real time. That is much faster than waiting on CloudWatch, AWS's monitoring service, which usually reacts on one-minute windows. It also knows things generic metrics do not: browsers that are still starting, machines we are trying to remove, and machines that should not receive new sessions.\nA request flows from user code through stateless edge routers; the control plane picks an EC2 host with room and keeps draining hosts out.\n\n\nWhy we run VMs inside VMs\nOnce we had a control plane, the next question was what kind of machines it should add.\nThe usual way to run Firecracker on AWS is a .metal instance. This means you rent the whole physical server, and Firecracker runs directly on it.\nWe chose regular EC2 instead. Regular EC2 machines are faster to get and cheaper to keep around. Our hosts boot from a pre-built image and start serving browsers about 30 seconds after launch. The faster we can add a host, the less idle capacity we need to pay for, and the lower the cost we pass on to our customers.\nThe catch is that regular EC2 is already a VM. AWS runs our host inside its own isolation layer, and then we run browser VMs inside that host. In other words, every browser is a VM inside a VM.\nThis is not the normal way of using Firecracker. When a browser VM needs help from the host, the request passes through two VM layers instead of one, adding latency.\nWe decided the tradeoff was worth it, as regular EC2 gives us faster scale-up and lower cost. To mitigate the effects of nested virtualization, we focused on making Firecracker as speedy as possible.\nOn regular EC2, the browser VM sits above an extra AWS hypervisor layer, so a page fault can cross both VM layers.\n\n\nFrom request to usable browser\nWhen a user asks for a browser, the control plane picks a machine with room. That machine restores a saved browser VM, starts Chromium inside it, waits until Chromium is ready to be controlled, and returns a connection URL.\nThat URL is what the user's agent connects to. Browser Use controls Chromium over a WebSocket using the Chrome DevTools Protocol, or CDP. CDP is the remote-control API for Chrome: click this button, type this text, read this page, take this screenshot.\nEvery session in five steps: the control plane picks a host, the VM resumes from a snapshot, Chromium launches, and once it is CDP-ready, the agent connects over a WebSocket.\nThree things made this take longer: restoring the VM's memory, launching Chromium, and keeping the browser stealthy and undetected by anti-bot security.\nThe first slowdown: memory\nThe first bottleneck was memory.\nA production browser is not booted from scratch. We resume it from a snapshot: a saved VM that is already booted and paused just before Chromium launches. Resuming a VM is much faster than booting one.\nOur first resumes were still too slow. When a restored VM touches memory for the first time, the host has to map that memory back in. This event is called a page fault. In a nested VM, each page fault is expensive because it can cross both VM layers.\nDuring an early cold start, page faults were 72% of all VM exits. Getting from resume to a CDP-ready browser took 9.8 seconds.\nThe fix was to map memory in larger chunks. Before, the VM restored memory in 4KB pages. Now, it uses 2MB pages. Each page covers 512 times more memory, so the browser triggers far fewer page faults while it wakes up. Fewer page faults mean fewer trips through the nested VM layers.\nMapping memory in 2MB pages made browsers start more quickly.\nWe also now handle page faults ourselves with a custom handler for userfaultfd, a Linux API for handling missing memory pages. Before the VM starts running, our handler loads the memory Chromium is most likely to access first.\nOur handler keeps Chromium from receiving a flood of page faults as it starts. The host has already loaded the hot pages, and the remaining pages arrive before the browser needs most of them.\nThese changes cut the time from resuming the VM to having a browser ready to accept commands from 9.8 seconds to 3.1 seconds. They also cut the number of times the browser VM had to stop and ask the host to handle missing memory from roughly 100,000 times per resume to about 1,100, about a 91x drop.\nWe made smaller refinements, too. The VM was spending 500ms looking for an old PS/2 keyboard that didn't exist. We disabled this check.\nAdditionally, we changed how the host waits for the browser to become ready. Before, the host kept polling the VM with HTTP requests. That created extra VM exits, or moments when the browser VM had to pause so the host could handle work for it.\nNow, the browser driver writes a ready message to its log, and the host reads that log over vsock, a fast communication channel between the host and the VM. The host sees the ready message in under a millisecond.\nThe second slowdown: Chromium startup\nThe next bottleneck was CPU.\nWhen Chromium starts, it is hungry and demanding. It creates renderers, compositors, and V8 isolates at once. After that, browser automation is much quieter. An agent clicks, waits, reads, clicks again.\nBecause Chromium is quieter after it has started, we can pack many browsers into the same instance. A single host can accommodate many browsers because browsers spend most of their time waiting: waiting for a page, a network response, or the next agent action.\nBrowser VMs packed onto a single regular EC2 host.\nWe handle the launch burst in two phases. While a browser resumes and Chromium starts, we leave its virtual CPUs unpinned. That means Linux can move the browser's CPU work across the host instead of locking it to fixed cores. This spreads the burst out.\nOnce the browser reports that it's ready, we pin those virtual CPUs to stable cores. That means the browser VM now runs on specific cores. Stable placement lets us pack more browsers onto the same host without guessing. We know which cores are taken, which ones still have room, and which browsers might interfere with each other.\nThe launch phase is like letting a crowd enter through every open door. Once everyone is inside, assigned seats work better.\nPinning from the start made things worse. When many browsers launched at once, they piled onto the same hot cores, and some launches failed.\nWe also became careful about hyperthreads. A physical CPU core often appears as two logical CPUs, called sibling threads. Those siblings still share the same physical core. If two browser VMs each get one sibling, they fight over the same core. Under nesting, that contention showed up as failed launches. To prevent this, each browser now gets both sibling threads of the physical core it uses.\nFinally, we give each pinned vCPU thread real-time priority. That tells Linux to run the browser VM immediately when it needs CPU, instead of pausing it behind less important work. Before this change, a 1,000-browser test lost 17% of sessions shortly after being created. After it, the same test lost zero.\nvCPUs stay unpinned during Chromium's launch burst so work spreads across the host, then are pinned to stable cores once the browser is ready.\nStaying stealthy without a screen\nThe last bottleneck was stealth.\nA headless browser runs without a visible window. A headful browser runs like the browser on your laptop, with a window, graphics, and rendered frames.\nPlain headless Chromium is easy to detect by websites with anti-bot measures. Plain headless Chromium avoided getting blocked by websites only 2% of the time, according to our stealth benchmark. The same Chromium, headful with a visible window, avoided blocks 50% of the time just by rendering content.\nThat is why most providers run headful browsers. They pay for a display server, a GPU, and a compositor drawing frames for a screen nobody looks at.\nWe run our browsers fully headlessly. This is only possible because we changed the browser itself.\nThe first piece is our Chromium fork. Many stealth tools hide automation by injecting JavaScript into every page after the browser starts. For example, they overwrite browser properties like navigator.webdriver, a flag that tells websites whether the browser is being controlled by automation, so the page sees false instead of true. Websites can often detect those overwrites by checking whether browser objects still behave like normal Chrome. We instead patch Chromium itself at the C++ and OS level, so those automation signals are not exposed in the first place.\nThe second piece is our fingerprinting layer. A browser fingerprint is the set of details a website can read about your browser and machine: operating system, screen size, fonts, graphics output, audio behavior, timezone, language, and hundreds of smaller signals. Anti-bot systems check whether these details look like a real user's browser or a fake automation environment.\nOur fingerprinting layer uses tens of thousands of real fingerprints from production traffic across macOS, Windows, and Linux. We also render graphics with a CPU-based renderer instead of a physical GPU, so the browser can produce consistent canvas and WebGL output without a real GPU or virtual display.\nThat gives us stealth while still letting us pack many browsers onto each machine. Our browsers avoid blocks 81% of the time on our stealth benchmark, and 84.8% on Halluminate BrowserBench, the highest of any provider. Because there is no display, browsers are cheaper to run and easier to scale.\nBlock-avoidance rate on our stealth benchmark. Our fully headless browsers lead every provider at 81%.\nConnecting to the right browser\nOnce a browser is ready, users connect to it through CDP. The public URL is a WebSocket URL.\nIn front of the browser fleet are simple edge routers. A router gets the WebSocket connection, asks the control plane where that browser lives, and forwards the raw CDP bytes to the right VM.\nThe routers do not decide where browsers run. If one dies, another router can take over new connections. The control plane is in charge of placement. The routers only move bytes.\nThe result\nEach of your browser sessions consists of a tiny VM resumed from a snapshot, running inside regular EC2, with headless Chromium inside it.\nThe VM cold start is under 400ms. End to end, through the public API, browser create latency is 825ms at p50 and 1.35s at p99. We measured this during a 10,000-session stress test in which every browser started successfully.\nIndependent leaderboard from BrowserArena ranks Browser Use #1 with 100% reliability at $0.02/hr.\nThe biggest remaining cost is Chromium itself. Starting Chromium after resume still takes about 545ms at p50.\nAny further improvements, then, must come from the browser itself.\nNext: skip Chromium startup\nToday, we snapshot the VM just before Chromium starts. That keeps the snapshot simple: every browser wakes up from the same, clean point, then launches Chromium for itself.\nBut Chromium startup is now the largest remaining cost. The next step is to snapshot later, after Chromium is already running. Then, a new session does not have to start the browser at all. It wakes up with the browser already alive.\nEvery session spends about 545ms launching Chromium. Snapshotting after Chromium is already running would skip that step entirely.\nThis is complex, as a running browser has open devices, timers, graphics state, network state, and fingerprint state. Before we freeze it, we need to put all of these things into a safe state. After we restore it, each browser still needs to look like its own browser, not a clone of the last one.\nThis is what we are working on next.\nThe fastest browser is the one you barely have to boot. We got the VM startup under 400ms by running Firecracker where it is not supposed to run. Next, we are making new sessions wake up with Chromium already running.\nBrowsers on the aforementioned infrastructure are live at cloud.browser-use.com.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "we cut browser sessions from 0 06 to 0 02 per hour while making browsers start and scale faster our cloud browsers need to do three things at once start quickly remain isolated and be cheap that is why we rebuilt browser use cloud so a new session starts in under a second and costs 0 02 per browser hour down from 0 06 this is harder than it sounds a browser has chromium a filesystem cookies cache proxy settings downloads and sometimes a logged in customer session if one browser can read another browser s state it creates a security problem the normal answer is a virtual machine or vm a vm is a computer inside a computer it gets its own cpu memory disk and network devices it is separate from everything else on its host and if the browser breaks leaks information or gets attacked the damage stays within the vm normal vms however are too heavy for cloud browsers we need to create them constantly sometimes thousands at a time and throw them away as soon as sessions end if each browser needs a slow expensive vm the product becomes slow and expensive too the question for us is whether we could give every browser its own vm without making users wait or pay for it we now do that with firecracker a lightweight vm system every browser use cloud session runs in its own tiny vm these vms run on ec2 amazon s rented cloud servers that is the unusual part firecracker is normally run on bare metal servers where you rent the whole physical machine to reduce customers cost we run it on regular ec2 where aws has already put your server inside a vm this should be slow nested vms make memory and cpu operations more expensive and chromium takes time to start this post is about how we made this setup fast and efficient but first why did we rebuild our infrastructure it is difficult to be fast isolated and cheap all at once why we left unikernels behind we used to run cloud browsers with unikraft which builds small vm like containers called unikernels unikernels instead of booting a full linux system load a small image built for your purposes unikernels start quickly and are cheap when idle because you can shut them down when no one is using them unikraft was good for turning browsers off when they were not in use but bad at adding more browsers quickly when traffic spiked if more users suddenly asked for browsers at once you would need to scale browser capacity rapidly unikraft does not have good built in autoscaling so an engineer had to change a variable manually adding more instances during a burst in traffic the system instead of reacting on its own required humans to adjust it this caused problems one load test brought down production for 45 minutes so we rebuilt our setup on firecracker unikraft needed an engineer to add capacity by hand so it lagged behind a traffic spike and collapsed after the rebuild capacity tracks demand automatically firecracker provides a layer through which you can create monitor and run vms it gives each vm cpu memory disk and network devices and it keeps it isolated from the host and from other vms", "source_text": "We cut browser sessions from $0.06 to $0.02 per hour while making browsers start and scale faster.\nOur cloud browsers need to do three things at once: start quickly, remain isolated, and be cheap. That is why we rebuilt Browser Use Cloud, so a new session starts in under a second and costs $0.02 per browser hour, down from $0.06.\nThis is harder than it sounds. A browser has Chromium, a filesystem, cookies, cache, proxy settings, downloads, and sometimes a logged-in customer session. If one browser can read another browser's state, it creates a security problem.\nThe normal answer is a virtual machine, or VM. A VM is a computer inside a computer: it gets its own CPU, memory, disk, and network devices. It is separate from everything else on its host, and if the browser breaks, leaks information, or gets attacked, the damage stays within the VM.\nNormal VMs, however, are too heavy for cloud browsers. We need to create them constantly, sometimes thousands at a time, and throw them away as soon as sessions end. If each browser needs a slow, expensive VM, the product becomes slow and expensive, too.\nThe question for us is whether we could give every browser its own VM without making users wait or pay for it. We now do that with Firecracker, a lightweight VM system.\nEvery Browser Use Cloud session runs in its own, tiny VM. These VMs run on EC2, Amazon's rented cloud servers.\nThat is the unusual part. Firecracker is normally run on bare-metal servers, where you rent the whole physical machine. To reduce customers' cost, we run it on regular EC2, where AWS has already put your server inside a VM.\nThis should be slow. Nested VMs make memory and CPU operations more expensive, and Chromium takes time to start. This post is about how we made this setup fast and efficient.\nBut first, why did we rebuild our infrastructure?\nIt is difficult to be fast, isolated, and cheap all at once.\nWhy we left unikernels behind\nWe used to run cloud browsers with Unikraft, which builds small, VM-like containers called unikernels. Unikernels, instead of booting a full Linux system, load a small image built for your purposes. Unikernels start quickly and are cheap when idle because you can shut them down when no one is using them.\nUnikraft was good for turning browsers off when they were not in use, but bad at adding more browsers quickly when traffic spiked. If more users suddenly asked for browsers at once, you would need to scale browser capacity rapidly. Unikraft does not have good built-in autoscaling, so an engineer had to change a variable, manually adding more instances.\nDuring a burst in traffic, the system, instead of reacting on its own, required humans to adjust it. This caused problems: one load test brought down production for 45 minutes. So we rebuilt our setup on Firecracker.\nUnikraft needed an engineer to add capacity by hand, so it lagged behind a traffic spike and collapsed. After the rebuild, capacity tracks demand automatically.\nFirecracker provides a layer through which you can create, monitor, and run VMs. It gives each VM CPU, memory, disk, and network devices, and it keeps it isolated from the host and from other VMs.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:We cut browser sessions from $0.06 to $0.02 per hour while m — Why we left unikernels behind", "source_line_range": [ 1, 17 ] }, { "id": "body-region-2", "text": "teaching browsers to scale themselves firecracker gave each browser its own vm but it did not inherently solve the problem that broke the old system deciding how many vms to run where to put them and when to add more so we built our own control plane the control plane monitors our fleet of browsers and decides whether we should scale up or down when a user asks for a browser the control plane picks a machine with room when traffic rises it starts more machines when traffic falls it stops sending new browsers to machines we want to remove it checks the fleet in real time that is much faster than waiting on cloudwatch aws s monitoring service which usually reacts on one minute windows it also knows things generic metrics do not browsers that are still starting machines we are trying to remove and machines that should not receive new sessions a request flows from user code through stateless edge routers the control plane picks an ec2 host with room and keeps draining hosts out why we run vms inside vms once we had a control plane the next question was what kind of machines it should add the usual way to run firecracker on aws is a metal instance this means you rent the whole physical server and firecracker runs directly on it we chose regular ec2 instead regular ec2 machines are faster to get and cheaper to keep around our hosts boot from a pre built image and start serving browsers about 30 seconds after launch the faster we can add a host the less idle capacity we need to pay for and the lower the cost we pass on to our customers the catch is that regular ec2 is already a vm aws runs our host inside its own isolation layer and then we run browser vms inside that host in other words every browser is a vm inside a vm this is not the normal way of using firecracker when a browser vm needs help from the host the request passes through two vm layers instead of one adding latency we decided the tradeoff was worth it as regular ec2 gives us faster scale up and lower cost to mitigate the effects of nested virtualization we focused on making firecracker as speedy as possible on regular ec2 the browser vm sits above an extra aws hypervisor layer so a page fault can cross both vm layers from request to usable browser when a user asks for a browser the control plane picks a machine with room that machine restores a saved browser vm starts chromium inside it waits until chromium is ready to be controlled and returns a connection url that url is what the user s agent connects to browser use controls chromium over a websocket using the chrome devtools protocol or cdp cdp is the remote control api for chrome click this button type this text read this page take this screenshot every session in five steps the control plane picks a host the vm resumes from a snapshot chromium launches and once it is cdp ready the agent connects over a websocket three things made this take longer restoring the vm s memory launching chromium and keeping the browser stealthy and undetected by anti bot security", "source_text": "Teaching browsers to scale themselves\nFirecracker gave each browser its own VM. But it did not inherently solve the problem that broke the old system: deciding how many VMs to run, where to put them, and when to add more.\nSo we built our own control plane. The control plane monitors our fleet of browsers and decides whether we should scale up or down.\nWhen a user asks for a browser, the control plane picks a machine with room. When traffic rises, it starts more machines. When traffic falls, it stops sending new browsers to machines we want to remove.\nIt checks the fleet in real time. That is much faster than waiting on CloudWatch, AWS's monitoring service, which usually reacts on one-minute windows. It also knows things generic metrics do not: browsers that are still starting, machines we are trying to remove, and machines that should not receive new sessions.\nA request flows from user code through stateless edge routers; the control plane picks an EC2 host with room and keeps draining hosts out.\n\n\nWhy we run VMs inside VMs\nOnce we had a control plane, the next question was what kind of machines it should add.\nThe usual way to run Firecracker on AWS is a .metal instance. This means you rent the whole physical server, and Firecracker runs directly on it.\nWe chose regular EC2 instead. Regular EC2 machines are faster to get and cheaper to keep around. Our hosts boot from a pre-built image and start serving browsers about 30 seconds after launch. The faster we can add a host, the less idle capacity we need to pay for, and the lower the cost we pass on to our customers.\nThe catch is that regular EC2 is already a VM. AWS runs our host inside its own isolation layer, and then we run browser VMs inside that host. In other words, every browser is a VM inside a VM.\nThis is not the normal way of using Firecracker. When a browser VM needs help from the host, the request passes through two VM layers instead of one, adding latency.\nWe decided the tradeoff was worth it, as regular EC2 gives us faster scale-up and lower cost. To mitigate the effects of nested virtualization, we focused on making Firecracker as speedy as possible.\nOn regular EC2, the browser VM sits above an extra AWS hypervisor layer, so a page fault can cross both VM layers.\n\n\nFrom request to usable browser\nWhen a user asks for a browser, the control plane picks a machine with room. That machine restores a saved browser VM, starts Chromium inside it, waits until Chromium is ready to be controlled, and returns a connection URL.\nThat URL is what the user's agent connects to. Browser Use controls Chromium over a WebSocket using the Chrome DevTools Protocol, or CDP. CDP is the remote-control API for Chrome: click this button, type this text, read this page, take this screenshot.\nEvery session in five steps: the control plane picks a host, the VM resumes from a snapshot, Chromium launches, and once it is CDP-ready, the agent connects over a WebSocket.\nThree things made this take longer: restoring the VM's memory, launching Chromium, and keeping the browser stealthy and undetected by anti-bot security.", "segmentation_method": "reviewed_source_semantics", "label": "Teaching browsers to scale themselves — From request to usable browser", "source_line_range": [ 18, 40 ] }, { "id": "body-region-3", "text": "the first slowdown memory the first bottleneck was memory a production browser is not booted from scratch we resume it from a snapshot a saved vm that is already booted and paused just before chromium launches resuming a vm is much faster than booting one our first resumes were still too slow when a restored vm touches memory for the first time the host has to map that memory back in this event is called a page fault in a nested vm each page fault is expensive because it can cross both vm layers during an early cold start page faults were 72 of all vm exits getting from resume to a cdp ready browser took 9 8 seconds the fix was to map memory in larger chunks before the vm restored memory in 4kb pages now it uses 2mb pages each page covers 512 times more memory so the browser triggers far fewer page faults while it wakes up fewer page faults mean fewer trips through the nested vm layers mapping memory in 2mb pages made browsers start more quickly we also now handle page faults ourselves with a custom handler for userfaultfd a linux api for handling missing memory pages before the vm starts running our handler loads the memory chromium is most likely to access first our handler keeps chromium from receiving a flood of page faults as it starts the host has already loaded the hot pages and the remaining pages arrive before the browser needs most of them these changes cut the time from resuming the vm to having a browser ready to accept commands from 9 8 seconds to 3 1 seconds they also cut the number of times the browser vm had to stop and ask the host to handle missing memory from roughly 100 000 times per resume to about 1 100 about a 91x drop we made smaller refinements too the vm was spending 500ms looking for an old ps 2 keyboard that didn t exist we disabled this check additionally we changed how the host waits for the browser to become ready before the host kept polling the vm with http requests that created extra vm exits or moments when the browser vm had to pause so the host could handle work for it now the browser driver writes a ready message to its log and the host reads that log over vsock a fast communication channel between the host and the vm the host sees the ready message in under a millisecond", "source_text": "The first slowdown: memory\nThe first bottleneck was memory.\nA production browser is not booted from scratch. We resume it from a snapshot: a saved VM that is already booted and paused just before Chromium launches. Resuming a VM is much faster than booting one.\nOur first resumes were still too slow. When a restored VM touches memory for the first time, the host has to map that memory back in. This event is called a page fault. In a nested VM, each page fault is expensive because it can cross both VM layers.\nDuring an early cold start, page faults were 72% of all VM exits. Getting from resume to a CDP-ready browser took 9.8 seconds.\nThe fix was to map memory in larger chunks. Before, the VM restored memory in 4KB pages. Now, it uses 2MB pages. Each page covers 512 times more memory, so the browser triggers far fewer page faults while it wakes up. Fewer page faults mean fewer trips through the nested VM layers.\nMapping memory in 2MB pages made browsers start more quickly.\nWe also now handle page faults ourselves with a custom handler for userfaultfd, a Linux API for handling missing memory pages. Before the VM starts running, our handler loads the memory Chromium is most likely to access first.\nOur handler keeps Chromium from receiving a flood of page faults as it starts. The host has already loaded the hot pages, and the remaining pages arrive before the browser needs most of them.\nThese changes cut the time from resuming the VM to having a browser ready to accept commands from 9.8 seconds to 3.1 seconds. They also cut the number of times the browser VM had to stop and ask the host to handle missing memory from roughly 100,000 times per resume to about 1,100, about a 91x drop.\nWe made smaller refinements, too. The VM was spending 500ms looking for an old PS/2 keyboard that didn't exist. We disabled this check.\nAdditionally, we changed how the host waits for the browser to become ready. Before, the host kept polling the VM with HTTP requests. That created extra VM exits, or moments when the browser VM had to pause so the host could handle work for it.\nNow, the browser driver writes a ready message to its log, and the host reads that log over vsock, a fast communication channel between the host and the VM. The host sees the ready message in under a millisecond.", "segmentation_method": "reviewed_source_semantics", "label": "The first slowdown: memory", "source_line_range": [ 41, 53 ] }, { "id": "body-region-4", "text": "the second slowdown chromium startup the next bottleneck was cpu when chromium starts it is hungry and demanding it creates renderers compositors and v8 isolates at once after that browser automation is much quieter an agent clicks waits reads clicks again because chromium is quieter after it has started we can pack many browsers into the same instance a single host can accommodate many browsers because browsers spend most of their time waiting waiting for a page a network response or the next agent action browser vms packed onto a single regular ec2 host we handle the launch burst in two phases while a browser resumes and chromium starts we leave its virtual cpus unpinned that means linux can move the browser s cpu work across the host instead of locking it to fixed cores this spreads the burst out once the browser reports that it s ready we pin those virtual cpus to stable cores that means the browser vm now runs on specific cores stable placement lets us pack more browsers onto the same host without guessing we know which cores are taken which ones still have room and which browsers might interfere with each other the launch phase is like letting a crowd enter through every open door once everyone is inside assigned seats work better pinning from the start made things worse when many browsers launched at once they piled onto the same hot cores and some launches failed we also became careful about hyperthreads a physical cpu core often appears as two logical cpus called sibling threads those siblings still share the same physical core if two browser vms each get one sibling they fight over the same core under nesting that contention showed up as failed launches to prevent this each browser now gets both sibling threads of the physical core it uses finally we give each pinned vcpu thread real time priority that tells linux to run the browser vm immediately when it needs cpu instead of pausing it behind less important work before this change a 1 000 browser test lost 17 of sessions shortly after being created after it the same test lost zero vcpus stay unpinned during chromium s launch burst so work spreads across the host then are pinned to stable cores once the browser is ready staying stealthy without a screen the last bottleneck was stealth a headless browser runs without a visible window a headful browser runs like the browser on your laptop with a window graphics and rendered frames plain headless chromium is easy to detect by websites with anti bot measures plain headless chromium avoided getting blocked by websites only 2 of the time according to our stealth benchmark the same chromium headful with a visible window avoided blocks 50 of the time just by rendering content that is why most providers run headful browsers they pay for a display server a gpu and a compositor drawing frames for a screen nobody looks at we run our browsers fully headlessly this is only possible because we changed the browser itself the first piece is our chromium fork many stealth tools hide automation by injecting javascript into every page after the browser starts for example they overwrite browser properties like navigator webdriver a flag that tells websites whether the browser is being controlled by automation so the page sees false instead of true websites can often detect those overwrites by checking whether browser objects still behave like normal chrome we instead patch chromium itself at the c and os level so those automation signals are not exposed in the first place the second piece is our fingerprinting layer a browser fingerprint is the set of details a website can read about your browser and machine operating system screen size fonts graphics output audio behavior timezone language and hundreds of smaller signals anti bot systems check whether these details look like a real user s browser or a fake automation environment our fingerprinting layer uses tens of thousands of real fingerprints from production traffic across macos windows and linux we also render graphics with a cpu based renderer instead of a physical gpu so the browser can produce consistent canvas and webgl output without a real gpu or virtual display that gives us stealth while still letting us pack many browsers onto each machine our browsers avoid blocks 81 of the time on our stealth benchmark and 84 8 on halluminate browserbench the highest of any provider because there is no display browsers are cheaper to run and easier to scale block avoidance rate on our stealth benchmark our fully headless browsers lead every provider at 81", "source_text": "The second slowdown: Chromium startup\nThe next bottleneck was CPU.\nWhen Chromium starts, it is hungry and demanding. It creates renderers, compositors, and V8 isolates at once. After that, browser automation is much quieter. An agent clicks, waits, reads, clicks again.\nBecause Chromium is quieter after it has started, we can pack many browsers into the same instance. A single host can accommodate many browsers because browsers spend most of their time waiting: waiting for a page, a network response, or the next agent action.\nBrowser VMs packed onto a single regular EC2 host.\nWe handle the launch burst in two phases. While a browser resumes and Chromium starts, we leave its virtual CPUs unpinned. That means Linux can move the browser's CPU work across the host instead of locking it to fixed cores. This spreads the burst out.\nOnce the browser reports that it's ready, we pin those virtual CPUs to stable cores. That means the browser VM now runs on specific cores. Stable placement lets us pack more browsers onto the same host without guessing. We know which cores are taken, which ones still have room, and which browsers might interfere with each other.\nThe launch phase is like letting a crowd enter through every open door. Once everyone is inside, assigned seats work better.\nPinning from the start made things worse. When many browsers launched at once, they piled onto the same hot cores, and some launches failed.\nWe also became careful about hyperthreads. A physical CPU core often appears as two logical CPUs, called sibling threads. Those siblings still share the same physical core. If two browser VMs each get one sibling, they fight over the same core. Under nesting, that contention showed up as failed launches. To prevent this, each browser now gets both sibling threads of the physical core it uses.\nFinally, we give each pinned vCPU thread real-time priority. That tells Linux to run the browser VM immediately when it needs CPU, instead of pausing it behind less important work. Before this change, a 1,000-browser test lost 17% of sessions shortly after being created. After it, the same test lost zero.\nvCPUs stay unpinned during Chromium's launch burst so work spreads across the host, then are pinned to stable cores once the browser is ready.\nStaying stealthy without a screen\nThe last bottleneck was stealth.\nA headless browser runs without a visible window. A headful browser runs like the browser on your laptop, with a window, graphics, and rendered frames.\nPlain headless Chromium is easy to detect by websites with anti-bot measures. Plain headless Chromium avoided getting blocked by websites only 2% of the time, according to our stealth benchmark. The same Chromium, headful with a visible window, avoided blocks 50% of the time just by rendering content.\nThat is why most providers run headful browsers. They pay for a display server, a GPU, and a compositor drawing frames for a screen nobody looks at.\nWe run our browsers fully headlessly. This is only possible because we changed the browser itself.\nThe first piece is our Chromium fork. Many stealth tools hide automation by injecting JavaScript into every page after the browser starts. For example, they overwrite browser properties like navigator.webdriver, a flag that tells websites whether the browser is being controlled by automation, so the page sees false instead of true. Websites can often detect those overwrites by checking whether browser objects still behave like normal Chrome. We instead patch Chromium itself at the C++ and OS level, so those automation signals are not exposed in the first place.\nThe second piece is our fingerprinting layer. A browser fingerprint is the set of details a website can read about your browser and machine: operating system, screen size, fonts, graphics output, audio behavior, timezone, language, and hundreds of smaller signals. Anti-bot systems check whether these details look like a real user's browser or a fake automation environment.\nOur fingerprinting layer uses tens of thousands of real fingerprints from production traffic across macOS, Windows, and Linux. We also render graphics with a CPU-based renderer instead of a physical GPU, so the browser can produce consistent canvas and WebGL output without a real GPU or virtual display.\nThat gives us stealth while still letting us pack many browsers onto each machine. Our browsers avoid blocks 81% of the time on our stealth benchmark, and 84.8% on Halluminate BrowserBench, the highest of any provider. Because there is no display, browsers are cheaper to run and easier to scale.\nBlock-avoidance rate on our stealth benchmark. Our fully headless browsers lead every provider at 81%.", "segmentation_method": "reviewed_source_semantics", "label": "The second slowdown: Chromium startup — Staying stealthy without a screen", "source_line_range": [ 54, 76 ] }, { "id": "body-region-5", "text": "connecting to the right browser once a browser is ready users connect to it through cdp the public url is a websocket url in front of the browser fleet are simple edge routers a router gets the websocket connection asks the control plane where that browser lives and forwards the raw cdp bytes to the right vm the routers do not decide where browsers run if one dies another router can take over new connections the control plane is in charge of placement the routers only move bytes the result each of your browser sessions consists of a tiny vm resumed from a snapshot running inside regular ec2 with headless chromium inside it the vm cold start is under 400ms end to end through the public api browser create latency is 825ms at p50 and 1 35s at p99 we measured this during a 10 000 session stress test in which every browser started successfully independent leaderboard from browserarena ranks browser use 1 with 100 reliability at 0 02 hr the biggest remaining cost is chromium itself starting chromium after resume still takes about 545ms at p50 any further improvements then must come from the browser itself next skip chromium startup today we snapshot the vm just before chromium starts that keeps the snapshot simple every browser wakes up from the same clean point then launches chromium for itself but chromium startup is now the largest remaining cost the next step is to snapshot later after chromium is already running then a new session does not have to start the browser at all it wakes up with the browser already alive every session spends about 545ms launching chromium snapshotting after chromium is already running would skip that step entirely this is complex as a running browser has open devices timers graphics state network state and fingerprint state before we freeze it we need to put all of these things into a safe state after we restore it each browser still needs to look like its own browser not a clone of the last one this is what we are working on next the fastest browser is the one you barely have to boot we got the vm startup under 400ms by running firecracker where it is not supposed to run next we are making new sessions wake up with chromium already running browsers on the aforementioned infrastructure are live at cloud browser use com", "source_text": "Connecting to the right browser\nOnce a browser is ready, users connect to it through CDP. The public URL is a WebSocket URL.\nIn front of the browser fleet are simple edge routers. A router gets the WebSocket connection, asks the control plane where that browser lives, and forwards the raw CDP bytes to the right VM.\nThe routers do not decide where browsers run. If one dies, another router can take over new connections. The control plane is in charge of placement. The routers only move bytes.\nThe result\nEach of your browser sessions consists of a tiny VM resumed from a snapshot, running inside regular EC2, with headless Chromium inside it.\nThe VM cold start is under 400ms. End to end, through the public API, browser create latency is 825ms at p50 and 1.35s at p99. We measured this during a 10,000-session stress test in which every browser started successfully.\nIndependent leaderboard from BrowserArena ranks Browser Use #1 with 100% reliability at $0.02/hr.\nThe biggest remaining cost is Chromium itself. Starting Chromium after resume still takes about 545ms at p50.\nAny further improvements, then, must come from the browser itself.\nNext: skip Chromium startup\nToday, we snapshot the VM just before Chromium starts. That keeps the snapshot simple: every browser wakes up from the same, clean point, then launches Chromium for itself.\nBut Chromium startup is now the largest remaining cost. The next step is to snapshot later, after Chromium is already running. Then, a new session does not have to start the browser at all. It wakes up with the browser already alive.\nEvery session spends about 545ms launching Chromium. Snapshotting after Chromium is already running would skip that step entirely.\nThis is complex, as a running browser has open devices, timers, graphics state, network state, and fingerprint state. Before we freeze it, we need to put all of these things into a safe state. After we restore it, each browser still needs to look like its own browser, not a clone of the last one.\nThis is what we are working on next.\nThe fastest browser is the one you barely have to boot. We got the VM startup under 400ms by running Firecracker where it is not supposed to run. Next, we are making new sessions wake up with Chromium already running.\nBrowsers on the aforementioned infrastructure are live at cloud.browser-use.com.", "segmentation_method": "reviewed_source_semantics", "label": "Connecting to the right browser — Next: skip Chromium startup", "source_line_range": [ 77, 94 ] } ], "ending": { "text": "um already running.\nBrowsers on the aforementioned infrastructure are live at cloud.browser-use.com." } } }, { "id": "article-007", "name": "How to Authenticate AI Web Agents", "url": "https://x.com/browser_use/status/2031045678411981115", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How to Authenticate AI Web Agents" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Browser Use" ] }, { "id": "stable-2", "alternatives": [ "@browser_use" ] }, { "id": "stable-20", "alternatives": [ "Terms" ] }, { "id": "stable-21", "alternatives": [ "Privacy" ] }, { "id": "stable-22", "alternatives": [ "Cookies" ] }, { "id": "stable-23", "alternatives": [ "Accessibility" ] }, { "id": "stable-24", "alternatives": [ "US TIDA" ] }, { "id": "stable-25", "alternatives": [ "Ads Info" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initially loaded longform includes all five named sections, three textual Python examples and the final two documentation links. DOM CSS reports visible code blocks without collapsed controls; screenshots verify article start, section flow and final body boundary. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How to Authenticate AI Web Agents" ], "html_selector": "[data-testid=\"twitter-article-title\"],h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-comment-coverage-r7/article-007/comment-qualification-reference-r7.json", "sha256": "cb39a4d001d6eedd26ca38429b560abb33b11ca9e575d7cb77fd54e43e4e55ad" }, "comment_presence_review": { "status": "observed_absent", "basis": "A new direct tab was opened for this audit. Only automatic loading and read-only observations were used; no clicks, expansion, scrolling, login, tab switching or pagination. The full article and reply composer are loaded; no reply cards appear in either complete source observation. The page/browser automatically settled at scrollY 10 without an agent scroll action.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "AI web agents can browse the web, click buttons, fill forms, and extract data. They can do almost anything a human can do online...except log in.\nAuthentication isn't a minor inconvenience; it prevents agents from completing tasks truly useful to you. Unauthenticated agents can't check your email, manage your calendar, or process a return.\nHere's how to enable your agents to securely authenticate with your accounts, so they can access the services you use.\nCookie Syncing\nWhen you log into a website, your browser stores cookies that prove you're authenticated. On future visits, your browser automatically sends these cookies back, so the server recognizes you without another login.\nCookie syncing copies your browser's cookie store to the agent's browser. Since the browser now has the same cookies, each website treats the agent as \"you.\"\nBrowser Use supports syncing your real Chrome profile to the cloud with a single terminal command. You can also export cookies as a file.\npython\n# Sync your Chrome profile to Browser Use Cloud\n# export BROWSER_USE_API_KEY=your_key && curl -fsSL https://browser-use.com/profile.sh | sh\n\n# Or use your Chrome profile directly (OSS)\nbrowser = Browser.from_system_chrome()\n\n# Or export cookies for use anywhere (OSS)\nawait browser.export_storage_state('auth.json')\nbrowser = Browser(storage_state='auth.json')\nPassword Managers\nPassword managers like 1Password let agents retrieve credentials from a vault and fill login forms automatically. This includes stored TOTP codes — the 6-digit codes from authenticator apps that refresh every 30 seconds.\nThe agent never sees your actual passwords, and values are filled programmatically.\nConnect your 1Password service account in Cloud settings, and the agent automatically retrieves and fills credentials. In the open-source library, use the 1Password SDK with a custom tool.\nTwo-Factor Authentication (2FA)\nMany sites require a second factor after your password. The most common type is TOTP. These codes are derived from a shared secret key and the current time, refreshing every 30 seconds.\nIf you have the secret key, you can generate these codes programmatically without having to use an authenticator app.\nBrowser Use generates TOTP codes automatically. Use placeholders ending in `bu_2fa_code`, and fresh codes are generated at input time:\npython\nagent = Agent(\n task='Go to example.com/login, enter x_user, x_pass, and x_bu_2fa_code',\n sensitive_data={\n 'x_user': 'myusername',\n 'x_pass': 'mypassword',\n 'x_bu_2fa_code': 'JBSWY3DPEHPK3PXP', # TOTP secret key\n },\n)\nThe agent never sees your actual credentials, only placeholder names. Values are injected directly into the page.\nWhere to find your TOTP secret: During 2FA setup, look for \"manual entry\" or \"can't scan QR code.\" In 1Password, edit the item and reveal the one-time password secret.\nEmail & SMS Verification\nSome sites send verification codes via email or SMS instead of using TOTP. You can send these codes to an inbox managed by your agent so it can complete the verification.\nAgentMail is a standalone API for creating agent-managed inboxes. You create an inbox, use that email when signing up or verifying, then poll for the incoming code.\nPair AgentMail with a custom tool to create inboxes for agent verification:\npython\ninbox = await email_client.inboxes.create()\n\n@tools.registry.action('Get verification code from email')\nasync def get_verification_code():\n emails = await email_client.inboxes.messages.list(inbox_id=inbox.inbox_id)\n if emails.messages:\n return ActionResult(extracted_content=emails.messages[0].text)\n return ActionResult(error='No emails yet')\nThe Bigger Picture\nRight now, we're in an odd moment. Agents have become remarkably capable, but the infrastructure they operate on was built for humans. There's no native authentication framework for autonomous agents that's been widely adopted, so the techniques in this guide are our best workarounds.\nThe methods above — cookie syncing, password managers, TOTP generation, and persistent hosted browsers — let agents access your accounts today.\nAnd when agent-native authentication arrives, Browser Use will be pioneering it.\nFull documentation: Authentication Guide | Cloud Authentication", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "ai web agents can browse the web click buttons fill forms and extract data they can do almost anything a human can do online except log in authentication isn t a minor inconvenience it prevents agents from completing tasks truly useful to you unauthenticated agents can t check your email manage your calendar or process a return here s how to enable your agents to securely authenticate with your accounts so they can access the services you use", "source_text": "AI web agents can browse the web, click buttons, fill forms, and extract data. They can do almost anything a human can do online...except log in.\nAuthentication isn't a minor inconvenience; it prevents agents from completing tasks truly useful to you. Unauthenticated agents can't check your email, manage your calendar, or process a return.\nHere's how to enable your agents to securely authenticate with your accounts, so they can access the services you use.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:AI web agents can browse the web, click buttons, fill forms,", "source_line_range": [ 1, 3 ] }, { "id": "body-region-2", "text": "cookie syncing when you log into a website your browser stores cookies that prove you re authenticated on future visits your browser automatically sends these cookies back so the server recognizes you without another login cookie syncing copies your browser s cookie store to the agent s browser since the browser now has the same cookies each website treats the agent as you browser use supports syncing your real chrome profile to the cloud with a single terminal command you can also export cookies as a file python sync your chrome profile to browser use cloud export browser use api key your key curl fssl https browser use com profile sh sh or use your chrome profile directly oss browser browser from system chrome or export cookies for use anywhere oss await browser export storage state auth json browser browser storage state auth json password managers password managers like 1password let agents retrieve credentials from a vault and fill login forms automatically this includes stored totp codes the 6 digit codes from authenticator apps that refresh every 30 seconds the agent never sees your actual passwords and values are filled programmatically connect your 1password service account in cloud settings and the agent automatically retrieves and fills credentials in the open source library use the 1password sdk with a custom tool", "source_text": "Cookie Syncing\nWhen you log into a website, your browser stores cookies that prove you're authenticated. On future visits, your browser automatically sends these cookies back, so the server recognizes you without another login.\nCookie syncing copies your browser's cookie store to the agent's browser. Since the browser now has the same cookies, each website treats the agent as \"you.\"\nBrowser Use supports syncing your real Chrome profile to the cloud with a single terminal command. You can also export cookies as a file.\npython\n# Sync your Chrome profile to Browser Use Cloud\n# export BROWSER_USE_API_KEY=your_key && curl -fsSL https://browser-use.com/profile.sh | sh\n\n# Or use your Chrome profile directly (OSS)\nbrowser = Browser.from_system_chrome()\n\n# Or export cookies for use anywhere (OSS)\nawait browser.export_storage_state('auth.json')\nbrowser = Browser(storage_state='auth.json')\nPassword Managers\nPassword managers like 1Password let agents retrieve credentials from a vault and fill login forms automatically. This includes stored TOTP codes — the 6-digit codes from authenticator apps that refresh every 30 seconds.\nThe agent never sees your actual passwords, and values are filled programmatically.\nConnect your 1Password service account in Cloud settings, and the agent automatically retrieves and fills credentials. In the open-source library, use the 1Password SDK with a custom tool.", "segmentation_method": "reviewed_source_semantics", "label": "Cookie Syncing — Password Managers", "source_line_range": [ 4, 21 ] }, { "id": "body-region-3", "text": "two factor authentication 2fa many sites require a second factor after your password the most common type is totp these codes are derived from a shared secret key and the current time refreshing every 30 seconds if you have the secret key you can generate these codes programmatically without having to use an authenticator app browser use generates totp codes automatically use placeholders ending in bu 2fa code and fresh codes are generated at input time python agent agent task go to example com login enter x user x pass and x bu 2fa code sensitive data x user myusername x pass mypassword x bu 2fa code jbswy3dpehpk3pxp totp secret key the agent never sees your actual credentials only placeholder names values are injected directly into the page where to find your totp secret during 2fa setup look for manual entry or can t scan qr code in 1password edit the item and reveal the one time password secret", "source_text": "Two-Factor Authentication (2FA)\nMany sites require a second factor after your password. The most common type is TOTP. These codes are derived from a shared secret key and the current time, refreshing every 30 seconds.\nIf you have the secret key, you can generate these codes programmatically without having to use an authenticator app.\nBrowser Use generates TOTP codes automatically. Use placeholders ending in `bu_2fa_code`, and fresh codes are generated at input time:\npython\nagent = Agent(\n task='Go to example.com/login, enter x_user, x_pass, and x_bu_2fa_code',\n sensitive_data={\n 'x_user': 'myusername',\n 'x_pass': 'mypassword',\n 'x_bu_2fa_code': 'JBSWY3DPEHPK3PXP', # TOTP secret key\n },\n)\nThe agent never sees your actual credentials, only placeholder names. Values are injected directly into the page.\nWhere to find your TOTP secret: During 2FA setup, look for \"manual entry\" or \"can't scan QR code.\" In 1Password, edit the item and reveal the one-time password secret.", "segmentation_method": "reviewed_source_semantics", "label": "Two-Factor Authentication (2FA)", "source_line_range": [ 22, 36 ] }, { "id": "body-region-4", "text": "email sms verification some sites send verification codes via email or sms instead of using totp you can send these codes to an inbox managed by your agent so it can complete the verification agentmail is a standalone api for creating agent managed inboxes you create an inbox use that email when signing up or verifying then poll for the incoming code pair agentmail with a custom tool to create inboxes for agent verification python inbox await email client inboxes create tools registry action get verification code from email async def get verification code emails await email client inboxes messages list inbox id inbox inbox id if emails messages return actionresult extracted content emails messages 0 text return actionresult error no emails yet", "source_text": "Email & SMS Verification\nSome sites send verification codes via email or SMS instead of using TOTP. You can send these codes to an inbox managed by your agent so it can complete the verification.\nAgentMail is a standalone API for creating agent-managed inboxes. You create an inbox, use that email when signing up or verifying, then poll for the incoming code.\nPair AgentMail with a custom tool to create inboxes for agent verification:\npython\ninbox = await email_client.inboxes.create()\n\n@tools.registry.action('Get verification code from email')\nasync def get_verification_code():\n emails = await email_client.inboxes.messages.list(inbox_id=inbox.inbox_id)\n if emails.messages:\n return ActionResult(extracted_content=emails.messages[0].text)\n return ActionResult(error='No emails yet')", "segmentation_method": "reviewed_source_semantics", "label": "Email & SMS Verification", "source_line_range": [ 37, 49 ] }, { "id": "body-region-5", "text": "the bigger picture right now we re in an odd moment agents have become remarkably capable but the infrastructure they operate on was built for humans there s no native authentication framework for autonomous agents that s been widely adopted so the techniques in this guide are our best workarounds the methods above cookie syncing password managers totp generation and persistent hosted browsers let agents access your accounts today and when agent native authentication arrives browser use will be pioneering it full documentation authentication guide cloud authentication", "source_text": "The Bigger Picture\nRight now, we're in an odd moment. Agents have become remarkably capable, but the infrastructure they operate on was built for humans. There's no native authentication framework for autonomous agents that's been widely adopted, so the techniques in this guide are our best workarounds.\nThe methods above — cookie syncing, password managers, TOTP generation, and persistent hosted browsers — let agents access your accounts today.\nAnd when agent-native authentication arrives, Browser Use will be pioneering it.\nFull documentation: Authentication Guide | Cloud Authentication", "segmentation_method": "reviewed_source_semantics", "label": "The Bigger Picture", "source_line_range": [ 50, 54 ] } ], "ending": { "text": ", Browser Use will be pioneering it.\nFull documentation: Authentication Guide | Cloud Authentication" } } }, { "id": "article-008", "name": "25个全球最佳旅游目的地(2025年珍藏版)", "url": "https://www.weibo.com/ttarticle/p/show?id=2309405133590391554059", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "25个全球最佳旅游目的地(2025年珍藏版)" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "搜索微博、找人" ] }, { "id": "stable-2", "alternatives": [ "首页" ] }, { "id": "stable-3", "alternatives": [ "视频" ] }, { "id": "stable-4", "alternatives": [ "发现" ] }, { "id": "stable-5", "alternatives": [ "游戏" ] }, { "id": "stable-6", "alternatives": [ "注册" ] }, { "id": "stable-7", "alternatives": [ "登录" ] }, { "id": "stable-9", "alternatives": [ "环球旅行" ] }, { "id": "stable-10", "alternatives": [ "作者:" ] }, { "id": "stable-11", "alternatives": [ "GTRAVEL®" ] }, { "id": "stable-12", "alternatives": [ "2025-02-13" ] }, { "id": "stable-13", "alternatives": [ "投诉" ] }, { "id": "stable-14", "alternatives": [ "发布于 上海" ] }, { "id": "stable-15", "alternatives": [ "关注作者,阅读全文" ] }, { "id": "stable-16", "alternatives": [ "还有50%的精彩内容,作者设置为仅对粉丝可见" ] }, { "id": "stable-17", "alternatives": [ "环球旅行®&GTRAVEL®官方平台。 二人行®活动 +V@13661660016", "环球旅行®&amp;GTRAVEL®官方平台。 二人行®活动 +V@13661660016" ] }, { "id": "stable-18", "alternatives": [ "关注" ] }, { "id": "stable-19", "alternatives": [ "推荐阅读" ] }, { "id": "stable-20", "alternatives": [ "换一换" ] }, { "id": "stable-21", "alternatives": [ "查看更多" ] }, { "id": "stable-22", "alternatives": [ "同时转发" ] }, { "id": "stable-23", "alternatives": [ "评论" ] }, { "id": "stable-24", "alternatives": [ "微博精彩" ] }, { "id": "stable-25", "alternatives": [ "热门微博" ] }, { "id": "stable-26", "alternatives": [ "热门话题" ] }, { "id": "stable-27", "alternatives": [ "名人堂" ] }, { "id": "stable-28", "alternatives": [ "微博会员" ] }, { "id": "stable-29", "alternatives": [ "微相册" ] }, { "id": "stable-30", "alternatives": [ "微游戏" ] }, { "id": "stable-31", "alternatives": [ "微指数" ] }, { "id": "stable-32", "alternatives": [ "手机玩微博" ] }, { "id": "stable-33", "alternatives": [ "扫码下载,更多版本" ] }, { "id": "stable-34", "alternatives": [ "戳这里" ] }, { "id": "stable-35", "alternatives": [ "认证&合作" ] }, { "id": "stable-36", "alternatives": [ "申请认证" ] }, { "id": "stable-37", "alternatives": [ "链接网站" ] }, { "id": "stable-38", "alternatives": [ "企业微博" ] }, { "id": "stable-39", "alternatives": [ "微博营销" ] }, { "id": "stable-40", "alternatives": [ "微博标识" ] }, { "id": "stable-41", "alternatives": [ "广告代理商" ] }, { "id": "stable-42", "alternatives": [ "开放平台" ] }, { "id": "stable-43", "alternatives": [ "微博帮助" ] }, { "id": "stable-44", "alternatives": [ "常见问题" ] }, { "id": "stable-45", "alternatives": [ "自助服务" ] }, { "id": "stable-46", "alternatives": [ "企业&商业热线" ] }, { "id": "stable-47", "alternatives": [ "4000-980-980" ] }, { "id": "stable-48", "alternatives": [ "微博客服4000-960-960" ] }, { "id": "stable-49", "alternatives": [ "意见反馈" ] }, { "id": "stable-50", "alternatives": [ "舞弊举报" ] }, { "id": "stable-51", "alternatives": [ "About Weibo" ] }, { "id": "stable-52", "alternatives": [ "微博招聘" ] }, { "id": "stable-53", "alternatives": [ "新浪网导航" ] }, { "id": "stable-54", "alternatives": [ "违规内容投诉010-60618076" ] }, { "id": "stable-55", "alternatives": [ "投诉处理大厅" ] }, { "id": "stable-56", "alternatives": [ "DMCA投诉/Report" ] }, { "id": "stable-57", "alternatives": [ "互联网法院微博工作站" ] }, { "id": "stable-58", "alternatives": [ "京ICP证100780号" ] }, { "id": "stable-59", "alternatives": [ "京ICP备12002058号" ] }, { "id": "stable-60", "alternatives": [ "京网文﹝2024﹞0012-005号" ] }, { "id": "stable-61", "alternatives": [ "(京)网械平台备字(2022)第00006号" ] }, { "id": "stable-62", "alternatives": [ "京食药网食备202210035" ] }, { "id": "stable-63", "alternatives": [ "(京)网药械信息备字(2023)第00076号" ] }, { "id": "stable-64", "alternatives": [ "增值电信业务经营许可证B2-20140447" ] }, { "id": "stable-65", "alternatives": [ "增值电信业务经营许可证京B2-20221511" ] }, { "id": "stable-66", "alternatives": [ "乙测资字11510760" ] }, { "id": "stable-67", "alternatives": [ "出版物经营许可证 新出发京批字第直220253号" ] }, { "id": "stable-68", "alternatives": [ "互联网宗教信息服务许可证:京(2022)0000091" ] }, { "id": "stable-69", "alternatives": [ "中国互联网举报中心" ] }, { "id": "stable-70", "alternatives": [ "北京互联网举报中心" ] }, { "id": "stable-71", "alternatives": [ "网络110报警服务" ] }, { "id": "stable-72", "alternatives": [ "北京文化市场举报热线" ] }, { "id": "stable-73", "alternatives": [ "中国互联网协会" ] }, { "id": "stable-74", "alternatives": [ "北京网络行业协会" ] }, { "id": "stable-75", "alternatives": [ "扫黄打非举报入口" ] }, { "id": "stable-76", "alternatives": [ "网络谣言曝光台" ] }, { "id": "stable-77", "alternatives": [ "互联网新闻信息服务许可编号:11220190001" ] }, { "id": "stable-78", "alternatives": [ "广播电视节目制作经营许可证(京)字第04005号" ] }, { "id": "stable-79", "alternatives": [ "WEIBO" ] }, { "id": "stable-80", "alternatives": [ "北京微梦创科网络技术有限公司" ] }, { "id": "stable-81", "alternatives": [ "京公网安备11000002000019号" ] }, { "id": "body-82", "alternatives": [ "多米尼加 ​1. 多米尼加" ] }, { "id": "body-83", "alternatives": [ "多米尼加最近建立了世界上第一个抹香鲸保护区" ] }, { "id": "body-84", "alternatives": [ "直岛和其他附近岛屿已成为主要的当代艺术胜地" ] }, { "id": "body-85", "alternatives": [ "多洛米蒂山脉令人惊叹的锯齿状悬崖是意大利最壮观的景观之一" ] }, { "id": "body-86", "alternatives": [ "滑雪胜地科尔蒂纳丹佩佐是2026年冬季奥运会的联合主办地" ] }, { "id": "body-87", "alternatives": [ "随着努克新机场的开通,游客将能更加轻松地游览伊卢利萨特冰峡湾与其他北极景点" ] }, { "id": "body-88", "alternatives": [ "威尔士正在开展为期一年的活动,向游客展示威尔士文化和语言" ] }, { "id": "body-89", "alternatives": [ "编者按:日前,BBC旅游 评选出了全球25个最佳旅游目的地。BBC旅游的评选,参考了世界旅游组织等机构的一些建议。选评的视角,加入了人文、可持续发展、环保等内含。这与通常的风光美度、服务舒适度、美食等刚性选评指标,有所不同。" ] }, { "id": "body-90", "alternatives": [ "​旅游业在威尔士语的复兴中发挥了重要作用,该国正在实施一项耗资50亿英镑的多年期计划,利用旅游资金使各个目的地更加环保可持续。" ] }, { "id": "body-91", "alternatives": [ "https://weibo.com/ttarticle/p/show?id=2309405120998189171052" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Human explicitly accepts complete displayed portion of retained original URL with no follow/login/content expansion. Fresh intrinsic text-range capture binds every displayed block through the actual fixed-height clamp; hidden remainder is not claimed to be a complete article. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "25个全球最佳旅游目的地(2025年珍藏版)" ], "html_selector": "div.title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-comment-coverage-r7/article-008/comment-qualification-reference-r7.json", "sha256": "b92a28a27b688cfd43f7c2db5c41d759cf80af7a8aee1f364e9ec31232df2f5b" }, "comment_presence_review": { "status": "observed_absent", "basis": "A new direct tab was opened for this audit. Only automatic loading and read-only observations were used; no clicks, expansion, scrolling, login, tab switching or pagination. The loaded comment area explicitly says 还没有人评论哦~快来抢沙发! in both complete source observations. No author-plus-comment records appear. The page/browser automatically settled at scrollY 500 without an agent scroll action.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "编者按:日前,BBC旅游 评选出了全球25个最佳旅游目的地。BBC旅游的评选,参考了世界旅游组织等机构的一些建议。选评的视角,加入了人文、可持续发展、环保等内含。这与通常的风光美度、服务舒适度、美食等刚性选评指标,有所不同。\n\n​环球旅行®并不完全认同BBC旅游的评选结果,但为尊重原评,基本保留了原始评语及入选原因。\n\n​2025年,全球最佳旅行目的地是哪些?日前,BBC旅游评选出了全球25个最佳旅游目的地。\n\n旅行,可以建立连接、激发灵感,甚至改变我们的人生。从纽芬兰岛瀑布的边缘,到意大利多洛米蒂山脉锯齿状的山峰,俯瞰这个世界,你会发现地球是如此奇妙。\n\n然而,尽管旅行是一种向善的力量,但过去一年发生的事情提醒我们,它也可能给那些我们热爱的地方带来压力,甚至造成伤害。许多目的地现在都在实施新的限制措施,以应对过度旅游带来的负面影响。\n\n​这25个景点不仅欢迎游客,提供令人难以置信的旅行体验,还积极利用旅游业来支持当地社区,保护环境,或保存其独特的文化遗产。\n\n​据悉,BBC旅游在选评这25个最佳旅游目的地时,除了由BBC旅游记者参与外,还采纳了一些世界领先的可持续旅游机构的意见,例如联合国世界旅游组织、可持续旅游国际组织、黑人旅游联盟和世界旅游及旅游理事会。\n\n​随着许多地区的旅游业飙升至疫情前的水平,极端天气与气候变化,暴露出了许多必去目的地的脆弱性。\n\n​从徒步穿越玻利维亚如月球般的地貌,到位于世界最大岛屿格陵兰岛的北极豪华露营,你的下一次伟大探险旅行,正在召唤您。\n\n多米尼加\n\n​1. 多米尼加\n\n想和抹香鲸一起游泳吗?\n\n​多米尼加现在提供了一个以道德与可持续方式实现这一梦想的机会,这是加勒比海岛国对海洋保护和再生旅游的开创性承诺的一部分。\n\n​该岛国最近建立了世界上第一个抹香鲸保护区,这是一个受保护的海洋区域,旨在保护其居民中的巨型鲸鱼。\n\n​有限的鲸鱼游泳许可证,确保了亲密且尊重的接触,为游客提供了一生难得的体验,与这些令人难以置信的鲸类动物共享水域,同时促进研究并为当地居民创造可持续的旅游发展机会。\n\n​2025年的新举措,包括扩大基础设施与系统,以迎接游客,包括简化入境手续的数字移民表格,以及缆车系统的开发。该缆车系统可将游客从罗索谷带到世界最大的温泉之一沸湖。前往该岛从未如此简单。\n\n​除了现有的从迈阿密出发的美国航空航班外,美国联合航空还将从2月15日起开通从纽瓦克出发的直飞航班。\n\n多米尼加最近建立了世界上第一个抹香鲸保护区\n\n2025年将有几家新酒店开业,增加了近500间客房,客房数量增加了25%,包括位于索尔兹伯里的六星级希尔顿宁静海滩度假村和水疗中心。或者选择久经考验的经典酒店,例如经常位居可持续发展榜首的豪华生态酒店秘密湾。\n\n​多米尼加也是CETI项目的所在地,该项目是一项开创性的国际努力,旨在解码鲸鱼语言、咔哒声和尾声,由国家地理探险家戴维·格鲁伯领导。\n\n​在其他地方,游客可以探索隐秘的峡谷、高耸的瀑布,并在独特的餐厅(如从农场到餐桌的Lacou)享用当地美食。多米尼加不仅仅是一个旅游目的地——它更是一项支持蓬勃发展的生态旅游模式的运动,这种模式在生物多样性保护与经济增长之间取得平衡,确保你的探险有助于保护这个自然天堂,造福子孙后代。\n\n2. 日本直岛\n\n日本直岛是草间弥生标志性的黄色圆点南瓜雕塑的所在地,现已成为当代艺术和建筑鉴赏家必去的目的地。\n\n直岛和其他附近岛屿已成为主要的当代艺术胜地\n\n直岛曾因其污染严重的铜冶炼业而闻名,如今的转型要归功于Benesse Art Site Naoshima,它帮助在风景秀丽的濑户内海(位于日本本州和四国之间)创建了大型博物馆和特定场地的艺术品。\n\n​2025年春季,直岛新美术馆将开馆,该美术馆由屡获殊荣的建筑师安藤忠雄设计,他也是岛上另外九个项目的设计师。\n\n​这个展示亚洲艺术家作品的新场所将成为今年濑户内艺术节的一大亮点,活动和艺术品揭幕将分布在17个岛屿和濑户内海沿海地区。\n\n​这是自2010年濑户内艺术节开始以来规模最大的一次,为期100多天,分为春、夏、秋三季,以便游客可以在不同的季节欣赏该地区。\n\n​直岛的节日和活动,不仅对扭转直岛的命运发挥了重要作用,也对振兴邻近的丰岛和犬岛发挥了重要作用。\n\n​提前预订参观内藤礼和西泽立卫的丰岛美术馆,这是艺术、建筑和自然的独一无二的融合。\n\n​在犬岛,游客们会惊叹于历史悠久的铜精炼厂遗迹被重新设计成一个史诗级的艺术装置。令人难忘的住宿地点,包括直岛上的现代风格日式旅馆Roka,以及丰岛上优雅简约的Espoir Inn。\n\n3. 意大利多洛米蒂山脉\n\n意大利一直是户外旅行者的最爱,几乎不需要更多的媒体报道——尤其是在游客过多的首都罗马,由于2025年的庆典,游客将更加拥挤。\n\n多洛米蒂山脉令人惊叹的锯齿状悬崖是意大利最壮观的景观之一\n\n但如果意大利仍然在你的2025年愿望清单上,可以考虑绕道北上,前往多洛米蒂山脉。对于意大利人来说,险峻美丽的多洛米蒂山脉是家庭娱乐和豪华假期的代名词。\n\n​令人惊叹的锯齿状石灰岩悬崖横跨威尼托、特伦蒂诺-上阿迪杰/南蒂罗尔和弗留利-威尼斯朱利亚地区,每年都吸引大批意大利度假者前来,欣赏其美丽的村庄、无与伦比的“白色一周”滑雪、史诗般的徒步旅行,以及世界一流、令人回味无穷的阿尔卑斯美食。\n\n​这个经典的意大利游乐场,经常被海外游客忽视——但这种情况即将改变。\n\n​“多洛米蒂山女王”科尔蒂纳丹佩佐被指定为2026年冬奥会的联合主办地。冬奥会的筹备工作将在2025年全年进行,包括对整个地区的一系列基础设施进行大规模的改善——所有这些都是在奥运会前夕的热闹背景下进行的。\n\n​游客可以期待在多洛米蒂超级滑雪区找到扩大的滑雪缆车网络,阿尔塔巴迪亚和瓦尔加迪纳镇将推出现代化的缆车,并加强与该地区运营的公共交通的连接。该地区的城镇还将引入全新升级的缆车和吊船。\n\n滑雪胜地科尔蒂纳丹佩佐是2026年冬季奥运会的联合主办地\n\n多洛米蒂山在任何季节都是令人兴奋的目的地。\n\n​春季、夏季和秋季前往可以享受绝佳的路线,例如2024年新开通的Cammino Retico(雷蒂亚之路);这是一条170公里、为期七天的路线,连接着威尼托和特伦蒂诺地区之间的偏远村庄。\n\n​若想纯粹放松,豪华的Aman Rosa Alpina酒店将是你最好的归宿,将于2025年隆重重新开业。酒店现在将提供51间客房和套房、两间总统套房和私人Chalet Zeno。\n\n​现在就来吧,在人群涌入之前。\n\n4.  格陵兰\n\n地球上没有哪个地方,能与格陵兰岛相媲美。这座世界最大岛屿面积超过200万平方公里,人口不到57,000人。\n\n​格陵兰岛被巨大的冰盖和壮观的山脉覆盖,其原始的荒野和雄伟的峡湾,不仅是令人垂涎的地缘政治实体,更是一生难忘的探险胜地。\n\n夏季令人惊叹的徒步旅行和引人入胜的赏鲸活动,以及冬季传统的狗拉雪橇和神奇的极光,都使格陵兰岛成为必游之地。\n\n​然而,直到现在,它一直地处偏远,花费高昂,而且需要花费大量时间。\n\n​随着首都努克新国际机场的启用,以及2026年将启用的两座新机场,前往格陵兰岛变得前所未有地便捷。\n\n​格陵兰岛欢迎热爱探险的旅行者,他们既热爱探索,又尊重其令人惊叹的自然风光和独特的因纽特文化。\n\n随着努克新机场的开通,游客将能更加轻松地游览伊卢利萨特冰峡湾与其他北极景点\n\n格陵兰岛已承诺“改善旅游业”,并制定了一项新法律,旨在将旅游业资金用于造福当地社区。\n\n​努克是一座现代化的城镇,拥有历史悠久的海滨、内容丰富的博物馆和令人印象深刻的艺术画廊,也是远足、钓鱼和豪华露营之旅的出发点,也是探索北极奇观的门户。\n\n​再往北到伊卢利萨特,游客可以探索令人惊叹的迪斯科湾冰山和联合国教科文组织认可的壮观冰峡湾。\n\n​在南部,曾经是维京人的定居地,那里有美丽的峡湾和风景如画的绿色山丘,点缀着绵羊农场。\n\n详见:格陵兰岛旅行终极攻略 (典藏版) \n\nhttps://weibo.com/ttarticle/p/show?id=2309405120998189171052\n\n5. 威尔士\n\n尽管威尔士的面积只有英格兰的六分之一,游客数量也远不及英国其他著名地区,但威尔士却拥有令人惊叹的国家公园、中世纪城堡,并且几乎没有人潮。这更增添了它的吸引力。\n\n威尔士正在开展为期一年的活动,向游客展示威尔士文化和语言\n\n新的一年,威尔士为游客们提供了一个探索欧洲最有前途的目的地之一的额外借口:威尔士将在2025年庆祝Croeso“欢迎”年。\n\n​为期一年的活动,将展示威尔士的文化、语言与景点,同时邀请游客“感受高速公路”——这是一个无法翻译的威尔士语词,描述了沉浸在当下的深层喜悦状态。近年来,威尔士一直走在可持续、文化旅游的前沿。\n\n​旅游业在威尔士语的复兴中发挥了重要作用,该国正在实施一项耗资50亿英镑的多年期计划,利用旅游资金使各个目的地更加环保可持续。\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "编 者 按 日 前 bbc 旅 游 评 选 出 了 全 球 25 个 最 佳 旅 游 目 的 地 bbc 旅 游 的 评 选 参 考 了 世 界 旅 游 组 织 等 机 构 的 一 些 建 议 选 评 的 视 角 加 入 了 人 文 可 持 续 发 展 环 保 等 内 含 这 与 通 常 的 风 光 美 度 服 务 舒 适 度 美 食 等 刚 性 选 评 指 标 有 所 不 同 环 球 旅 行 并 不 完 全 认 同 bbc 旅 游 的 评 选 结 果 但 为 尊 重 原 评 基 本 保 留 了 原 始 评 语 及 入 选 原 因 2025 年 全 球 最 佳 旅 行 目 的 地 是 哪 些 日 前 bbc 旅 游 评 选 出 了 全 球 25 个 最 佳 旅 游 目 的 地 旅 行 可 以 建 立 连 接 激 发 灵 感 甚 至 改 变 我 们 的 人 生 从 纽 芬 兰 岛 瀑 布 的 边 缘 到 意 大 利 多 洛 米 蒂 山 脉 锯 齿 状 的 山 峰 俯 瞰 这 个 世 界 你 会 发 现 地 球 是 如 此 奇 妙 然 而 尽 管 旅 行 是 一 种 向 善 的 力 量 但 过 去 一 年 发 生 的 事 情 提 醒 我 们 它 也 可 能 给 那 些 我 们 热 爱 的 地 方 带 来 压 力 甚 至 造 成 伤 害 许 多 目 的 地 现 在 都 在 实 施 新 的 限 制 措 施 以 应 对 过 度 旅 游 带 来 的 负 面 影 响 这 25 个 景 点 不 仅 欢 迎 游 客 提 供 令 人 难 以 置 信 的 旅 行 体 验 还 积 极 利 用 旅 游 业 来 支 持 当 地 社 区 保 护 环 境 或 保 存 其 独 特 的 文 化 遗 产 据 悉 bbc 旅 游 在 选 评 这 25 个 最 佳 旅 游 目 的 地 时 除 了 由 bbc 旅 游 记 者 参 与 外 还 采 纳 了 一 些 世 界 领 先 的 可 持 续 旅 游 机 构 的 意 见 例 如 联 合 国 世 界 旅 游 组 织 可 持 续 旅 游 国 际 组 织 黑 人 旅 游 联 盟 和 世 界 旅 游 及 旅 游 理 事 会 随 着 许 多 地 区 的 旅 游 业 飙 升 至 疫 情 前 的 水 平 极 端 天 气 与 气 候 变 化 暴 露 出 了 许 多 必 去 目 的 地 的 脆 弱 性 从 徒 步 穿 越 玻 利 维 亚 如 月 球 般 的 地 貌 到 位 于 世 界 最 大 岛 屿 格 陵 兰 岛 的 北 极 豪 华 露 营 你 的 下 一 次 伟 大 探 险 旅 行 正 在 召 唤 您 多 米 尼 加", "source_text": "编者按:日前,BBC旅游 评选出了全球25个最佳旅游目的地。BBC旅游的评选,参考了世界旅游组织等机构的一些建议。选评的视角,加入了人文、可持续发展、环保等内含。这与通常的风光美度、服务舒适度、美食等刚性选评指标,有所不同。\n\n​环球旅行®并不完全认同BBC旅游的评选结果,但为尊重原评,基本保留了原始评语及入选原因。\n\n​2025年,全球最佳旅行目的地是哪些?日前,BBC旅游评选出了全球25个最佳旅游目的地。\n\n旅行,可以建立连接、激发灵感,甚至改变我们的人生。从纽芬兰岛瀑布的边缘,到意大利多洛米蒂山脉锯齿状的山峰,俯瞰这个世界,你会发现地球是如此奇妙。\n\n然而,尽管旅行是一种向善的力量,但过去一年发生的事情提醒我们,它也可能给那些我们热爱的地方带来压力,甚至造成伤害。许多目的地现在都在实施新的限制措施,以应对过度旅游带来的负面影响。\n\n​这25个景点不仅欢迎游客,提供令人难以置信的旅行体验,还积极利用旅游业来支持当地社区,保护环境,或保存其独特的文化遗产。\n\n​据悉,BBC旅游在选评这25个最佳旅游目的地时,除了由BBC旅游记者参与外,还采纳了一些世界领先的可持续旅游机构的意见,例如联合国世界旅游组织、可持续旅游国际组织、黑人旅游联盟和世界旅游及旅游理事会。\n\n​随着许多地区的旅游业飙升至疫情前的水平,极端天气与气候变化,暴露出了许多必去目的地的脆弱性。\n\n​从徒步穿越玻利维亚如月球般的地貌,到位于世界最大岛屿格陵兰岛的北极豪华露营,你的下一次伟大探险旅行,正在召唤您。\n\n多米尼加", "segmentation_method": "reviewed_source_semantics", "label": "开篇:编者按:日前,BBC旅游 评选出了全球25个最佳旅游目的地。BBC旅游的评选,参考了世界旅游组织等机构的一些建议。选评的", "source_line_range": [ 1, 20 ] }, { "id": "body-region-2", "text": "1 多 米 尼 加 想 和 抹 香 鲸 一 起 游 泳 吗 多 米 尼 加 现 在 提 供 了 一 个 以 道 德 与 可 持 续 方 式 实 现 这 一 梦 想 的 机 会 这 是 加 勒 比 海 岛 国 对 海 洋 保 护 和 再 生 旅 游 的 开 创 性 承 诺 的 一 部 分 该 岛 国 最 近 建 立 了 世 界 上 第 一 个 抹 香 鲸 保 护 区 这 是 一 个 受 保 护 的 海 洋 区 域 旨 在 保 护 其 居 民 中 的 巨 型 鲸 鱼 有 限 的 鲸 鱼 游 泳 许 可 证 确 保 了 亲 密 且 尊 重 的 接 触 为 游 客 提 供 了 一 生 难 得 的 体 验 与 这 些 令 人 难 以 置 信 的 鲸 类 动 物 共 享 水 域 同 时 促 进 研 究 并 为 当 地 居 民 创 造 可 持 续 的 旅 游 发 展 机 会 2025 年 的 新 举 措 包 括 扩 大 基 础 设 施 与 系 统 以 迎 接 游 客 包 括 简 化 入 境 手 续 的 数 字 移 民 表 格 以 及 缆 车 系 统 的 开 发 该 缆 车 系 统 可 将 游 客 从 罗 索 谷 带 到 世 界 最 大 的 温 泉 之 一 沸 湖 前 往 该 岛 从 未 如 此 简 单 除 了 现 有 的 从 迈 阿 密 出 发 的 美 国 航 空 航 班 外 美 国 联 合 航 空 还 将 从 2 月 15 日 起 开 通 从 纽 瓦 克 出 发 的 直 飞 航 班 多 米 尼 加 最 近 建 立 了 世 界 上 第 一 个 抹 香 鲸 保 护 区 2025 年 将 有 几 家 新 酒 店 开 业 增 加 了 近 500 间 客 房 客 房 数 量 增 加 了 25 包 括 位 于 索 尔 兹 伯 里 的 六 星 级 希 尔 顿 宁 静 海 滩 度 假 村 和 水 疗 中 心 或 者 选 择 久 经 考 验 的 经 典 酒 店 例 如 经 常 位 居 可 持 续 发 展 榜 首 的 豪 华 生 态 酒 店 秘 密 湾 多 米 尼 加 也 是 ceti 项 目 的 所 在 地 该 项 目 是 一 项 开 创 性 的 国 际 努 力 旨 在 解 码 鲸 鱼 语 言 咔 哒 声 和 尾 声 由 国 家 地 理 探 险 家 戴 维 格 鲁 伯 领 导 在 其 他 地 方 游 客 可 以 探 索 隐 秘 的 峡 谷 高 耸 的 瀑 布 并 在 独 特 的 餐 厅 如 从 农 场 到 餐 桌 的 lacou 享 用 当 地 美 食 多 米 尼 加 不 仅 仅 是 一 个 旅 游 目 的 地 它 更 是 一 项 支 持 蓬 勃 发 展 的 生 态 旅 游 模 式 的 运 动 这 种 模 式 在 生 物 多 样 性 保 护 与 经 济 增 长 之 间 取 得 平 衡 确 保 你 的 探 险 有 助 于 保 护 这 个 自 然 天 堂 造 福 子 孙 后 代", "source_text": "​1. 多米尼加\n\n想和抹香鲸一起游泳吗?\n\n​多米尼加现在提供了一个以道德与可持续方式实现这一梦想的机会,这是加勒比海岛国对海洋保护和再生旅游的开创性承诺的一部分。\n\n​该岛国最近建立了世界上第一个抹香鲸保护区,这是一个受保护的海洋区域,旨在保护其居民中的巨型鲸鱼。\n\n​有限的鲸鱼游泳许可证,确保了亲密且尊重的接触,为游客提供了一生难得的体验,与这些令人难以置信的鲸类动物共享水域,同时促进研究并为当地居民创造可持续的旅游发展机会。\n\n​2025年的新举措,包括扩大基础设施与系统,以迎接游客,包括简化入境手续的数字移民表格,以及缆车系统的开发。该缆车系统可将游客从罗索谷带到世界最大的温泉之一沸湖。前往该岛从未如此简单。\n\n​除了现有的从迈阿密出发的美国航空航班外,美国联合航空还将从2月15日起开通从纽瓦克出发的直飞航班。\n\n多米尼加最近建立了世界上第一个抹香鲸保护区\n\n2025年将有几家新酒店开业,增加了近500间客房,客房数量增加了25%,包括位于索尔兹伯里的六星级希尔顿宁静海滩度假村和水疗中心。或者选择久经考验的经典酒店,例如经常位居可持续发展榜首的豪华生态酒店秘密湾。\n\n​多米尼加也是CETI项目的所在地,该项目是一项开创性的国际努力,旨在解码鲸鱼语言、咔哒声和尾声,由国家地理探险家戴维·格鲁伯领导。\n\n​在其他地方,游客可以探索隐秘的峡谷、高耸的瀑布,并在独特的餐厅(如从农场到餐桌的Lacou)享用当地美食。多米尼加不仅仅是一个旅游目的地——它更是一项支持蓬勃发展的生态旅游模式的运动,这种模式在生物多样性保护与经济增长之间取得平衡,确保你的探险有助于保护这个自然天堂,造福子孙后代。", "segmentation_method": "reviewed_source_semantics", "label": "​1. 多米尼加", "source_line_range": [ 21, 42 ] }, { "id": "body-region-3", "text": "2 日 本 直 岛 日 本 直 岛 是 草 间 弥 生 标 志 性 的 黄 色 圆 点 南 瓜 雕 塑 的 所 在 地 现 已 成 为 当 代 艺 术 和 建 筑 鉴 赏 家 必 去 的 目 的 地 直 岛 和 其 他 附 近 岛 屿 已 成 为 主 要 的 当 代 艺 术 胜 地 直 岛 曾 因 其 污 染 严 重 的 铜 冶 炼 业 而 闻 名 如 今 的 转 型 要 归 功 于 benesse art site naoshima 它 帮 助 在 风 景 秀 丽 的 濑 户 内 海 位 于 日 本 本 州 和 四 国 之 间 创 建 了 大 型 博 物 馆 和 特 定 场 地 的 艺 术 品 2025 年 春 季 直 岛 新 美 术 馆 将 开 馆 该 美 术 馆 由 屡 获 殊 荣 的 建 筑 师 安 藤 忠 雄 设 计 他 也 是 岛 上 另 外 九 个 项 目 的 设 计 师 这 个 展 示 亚 洲 艺 术 家 作 品 的 新 场 所 将 成 为 今 年 濑 户 内 艺 术 节 的 一 大 亮 点 活 动 和 艺 术 品 揭 幕 将 分 布 在 17 个 岛 屿 和 濑 户 内 海 沿 海 地 区 这 是 自 2010 年 濑 户 内 艺 术 节 开 始 以 来 规 模 最 大 的 一 次 为 期 100 多 天 分 为 春 夏 秋 三 季 以 便 游 客 可 以 在 不 同 的 季 节 欣 赏 该 地 区 直 岛 的 节 日 和 活 动 不 仅 对 扭 转 直 岛 的 命 运 发 挥 了 重 要 作 用 也 对 振 兴 邻 近 的 丰 岛 和 犬 岛 发 挥 了 重 要 作 用 提 前 预 订 参 观 内 藤 礼 和 西 泽 立 卫 的 丰 岛 美 术 馆 这 是 艺 术 建 筑 和 自 然 的 独 一 无 二 的 融 合 在 犬 岛 游 客 们 会 惊 叹 于 历 史 悠 久 的 铜 精 炼 厂 遗 迹 被 重 新 设 计 成 一 个 史 诗 级 的 艺 术 装 置 令 人 难 忘 的 住 宿 地 点 包 括 直 岛 上 的 现 代 风 格 日 式 旅 馆 roka 以 及 丰 岛 上 优 雅 简 约 的 espoir inn 3 意 大 利 多 洛 米 蒂 山 脉 意 大 利 一 直 是 户 外 旅 行 者 的 最 爱 几 乎 不 需 要 更 多 的 媒 体 报 道 尤 其 是 在 游 客 过 多 的 首 都 罗 马 由 于 2025 年 的 庆 典 游 客 将 更 加 拥 挤 多 洛 米 蒂 山 脉 令 人 惊 叹 的 锯 齿 状 悬 崖 是 意 大 利 最 壮 观 的 景 观 之 一 但 如 果 意 大 利 仍 然 在 你 的 2025 年 愿 望 清 单 上 可 以 考 虑 绕 道 北 上 前 往 多 洛 米 蒂 山 脉 对 于 意 大 利 人 来 说 险 峻 美 丽 的 多 洛 米 蒂 山 脉 是 家 庭 娱 乐 和 豪 华 假 期 的 代 名 词 令 人 惊 叹 的 锯 齿 状 石 灰 岩 悬 崖 横 跨 威 尼 托 特 伦 蒂 诺 上 阿 迪 杰 南 蒂 罗 尔 和 弗 留 利 威 尼 斯 朱 利 亚 地 区 每 年 都 吸 引 大 批 意 大 利 度 假 者 前 来 欣 赏 其 美 丽 的 村 庄 无 与 伦 比 的 白 色 一 周 滑 雪 史 诗 般 的 徒 步 旅 行 以 及 世 界 一 流 令 人 回 味 无 穷 的 阿 尔 卑 斯 美 食 这 个 经 典 的 意 大 利 游 乐 场 经 常 被 海 外 游 客 忽 视 但 这 种 情 况 即 将 改 变 多 洛 米 蒂 山 女 王 科 尔 蒂 纳 丹 佩 佐 被 指 定 为 2026 年 冬 奥 会 的 联 合 主 办 地 冬 奥 会 的 筹 备 工 作 将 在 2025 年 全 年 进 行 包 括 对 整 个 地 区 的 一 系 列 基 础 设 施 进 行 大 规 模 的 改 善 所 有 这 些 都 是 在 奥 运 会 前 夕 的 热 闹 背 景 下 进 行 的 游 客 可 以 期 待 在 多 洛 米 蒂 超 级 滑 雪 区 找 到 扩 大 的 滑 雪 缆 车 网 络 阿 尔 塔 巴 迪 亚 和 瓦 尔 加 迪 纳 镇 将 推 出 现 代 化 的 缆 车 并 加 强 与 该 地 区 运 营 的 公 共 交 通 的 连 接 该 地 区 的 城 镇 还 将 引 入 全 新 升 级 的 缆 车 和 吊 船 滑 雪 胜 地 科 尔 蒂 纳 丹 佩 佐 是 2026 年 冬 季 奥 运 会 的 联 合 主 办 地 多 洛 米 蒂 山 在 任 何 季 节 都 是 令 人 兴 奋 的 目 的 地 春 季 夏 季 和 秋 季 前 往 可 以 享 受 绝 佳 的 路 线 例 如 2024 年 新 开 通 的 cammino retico 雷 蒂 亚 之 路 这 是 一 条 170 公 里 为 期 七 天 的 路 线 连 接 着 威 尼 托 和 特 伦 蒂 诺 地 区 之 间 的 偏 远 村 庄 若 想 纯 粹 放 松 豪 华 的 aman rosa alpina 酒 店 将 是 你 最 好 的 归 宿 将 于 2025 年 隆 重 重 新 开 业 酒 店 现 在 将 提 供 51 间 客 房 和 套 房 两 间 总 统 套 房 和 私 人 chalet zeno 现 在 就 来 吧 在 人 群 涌 入 之 前 4 格 陵 兰 地 球 上 没 有 哪 个 地 方 能 与 格 陵 兰 岛 相 媲 美 这 座 世 界 最 大 岛 屿 面 积 超 过 200 万 平 方 公 里 人 口 不 到 57 000 人 格 陵 兰 岛 被 巨 大 的 冰 盖 和 壮 观 的 山 脉 覆 盖 其 原 始 的 荒 野 和 雄 伟 的 峡 湾 不 仅 是 令 人 垂 涎 的 地 缘 政 治 实 体 更 是 一 生 难 忘 的 探 险 胜 地 夏 季 令 人 惊 叹 的 徒 步 旅 行 和 引 人 入 胜 的 赏 鲸 活 动 以 及 冬 季 传 统 的 狗 拉 雪 橇 和 神 奇 的 极 光 都 使 格 陵 兰 岛 成 为 必 游 之 地 然 而 直 到 现 在 它 一 直 地 处 偏 远 花 费 高 昂 而 且 需 要 花 费 大 量 时 间 随 着 首 都 努 克 新 国 际 机 场 的 启 用 以 及 2026 年 将 启 用 的 两 座 新 机 场 前 往 格 陵 兰 岛 变 得 前 所 未 有 地 便 捷 格 陵 兰 岛 欢 迎 热 爱 探 险 的 旅 行 者 他 们 既 热 爱 探 索 又 尊 重 其 令 人 惊 叹 的 自 然 风 光 和 独 特 的 因 纽 特 文 化 随 着 努 克 新 机 场 的 开 通 游 客 将 能 更 加 轻 松 地 游 览 伊 卢 利 萨 特 冰 峡 湾 与 其 他 北 极 景 点 格 陵 兰 岛 已 承 诺 改 善 旅 游 业 并 制 定 了 一 项 新 法 律 旨 在 将 旅 游 业 资 金 用 于 造 福 当 地 社 区 努 克 是 一 座 现 代 化 的 城 镇 拥 有 历 史 悠 久 的 海 滨 内 容 丰 富 的 博 物 馆 和 令 人 印 象 深 刻 的 艺 术 画 廊 也 是 远 足 钓 鱼 和 豪 华 露 营 之 旅 的 出 发 点 也 是 探 索 北 极 奇 观 的 门 户 再 往 北 到 伊 卢 利 萨 特 游 客 可 以 探 索 令 人 惊 叹 的 迪 斯 科 湾 冰 山 和 联 合 国 教 科 文 组 织 认 可 的 壮 观 冰 峡 湾 在 南 部 曾 经 是 维 京 人 的 定 居 地 那 里 有 美 丽 的 峡 湾 和 风 景 如 画 的 绿 色 山 丘 点 缀 着 绵 羊 农 场", "source_text": "2. 日本直岛\n\n日本直岛是草间弥生标志性的黄色圆点南瓜雕塑的所在地,现已成为当代艺术和建筑鉴赏家必去的目的地。\n\n直岛和其他附近岛屿已成为主要的当代艺术胜地\n\n直岛曾因其污染严重的铜冶炼业而闻名,如今的转型要归功于Benesse Art Site Naoshima,它帮助在风景秀丽的濑户内海(位于日本本州和四国之间)创建了大型博物馆和特定场地的艺术品。\n\n​2025年春季,直岛新美术馆将开馆,该美术馆由屡获殊荣的建筑师安藤忠雄设计,他也是岛上另外九个项目的设计师。\n\n​这个展示亚洲艺术家作品的新场所将成为今年濑户内艺术节的一大亮点,活动和艺术品揭幕将分布在17个岛屿和濑户内海沿海地区。\n\n​这是自2010年濑户内艺术节开始以来规模最大的一次,为期100多天,分为春、夏、秋三季,以便游客可以在不同的季节欣赏该地区。\n\n​直岛的节日和活动,不仅对扭转直岛的命运发挥了重要作用,也对振兴邻近的丰岛和犬岛发挥了重要作用。\n\n​提前预订参观内藤礼和西泽立卫的丰岛美术馆,这是艺术、建筑和自然的独一无二的融合。\n\n​在犬岛,游客们会惊叹于历史悠久的铜精炼厂遗迹被重新设计成一个史诗级的艺术装置。令人难忘的住宿地点,包括直岛上的现代风格日式旅馆Roka,以及丰岛上优雅简约的Espoir Inn。\n\n3. 意大利多洛米蒂山脉\n\n意大利一直是户外旅行者的最爱,几乎不需要更多的媒体报道——尤其是在游客过多的首都罗马,由于2025年的庆典,游客将更加拥挤。\n\n多洛米蒂山脉令人惊叹的锯齿状悬崖是意大利最壮观的景观之一\n\n但如果意大利仍然在你的2025年愿望清单上,可以考虑绕道北上,前往多洛米蒂山脉。对于意大利人来说,险峻美丽的多洛米蒂山脉是家庭娱乐和豪华假期的代名词。\n\n​令人惊叹的锯齿状石灰岩悬崖横跨威尼托、特伦蒂诺-上阿迪杰/南蒂罗尔和弗留利-威尼斯朱利亚地区,每年都吸引大批意大利度假者前来,欣赏其美丽的村庄、无与伦比的“白色一周”滑雪、史诗般的徒步旅行,以及世界一流、令人回味无穷的阿尔卑斯美食。\n\n​这个经典的意大利游乐场,经常被海外游客忽视——但这种情况即将改变。\n\n​“多洛米蒂山女王”科尔蒂纳丹佩佐被指定为2026年冬奥会的联合主办地。冬奥会的筹备工作将在2025年全年进行,包括对整个地区的一系列基础设施进行大规模的改善——所有这些都是在奥运会前夕的热闹背景下进行的。\n\n​游客可以期待在多洛米蒂超级滑雪区找到扩大的滑雪缆车网络,阿尔塔巴迪亚和瓦尔加迪纳镇将推出现代化的缆车,并加强与该地区运营的公共交通的连接。该地区的城镇还将引入全新升级的缆车和吊船。\n\n滑雪胜地科尔蒂纳丹佩佐是2026年冬季奥运会的联合主办地\n\n多洛米蒂山在任何季节都是令人兴奋的目的地。\n\n​春季、夏季和秋季前往可以享受绝佳的路线,例如2024年新开通的Cammino Retico(雷蒂亚之路);这是一条170公里、为期七天的路线,连接着威尼托和特伦蒂诺地区之间的偏远村庄。\n\n​若想纯粹放松,豪华的Aman Rosa Alpina酒店将是你最好的归宿,将于2025年隆重重新开业。酒店现在将提供51间客房和套房、两间总统套房和私人Chalet Zeno。\n\n​现在就来吧,在人群涌入之前。\n\n4.  格陵兰\n\n地球上没有哪个地方,能与格陵兰岛相媲美。这座世界最大岛屿面积超过200万平方公里,人口不到57,000人。\n\n​格陵兰岛被巨大的冰盖和壮观的山脉覆盖,其原始的荒野和雄伟的峡湾,不仅是令人垂涎的地缘政治实体,更是一生难忘的探险胜地。\n\n夏季令人惊叹的徒步旅行和引人入胜的赏鲸活动,以及冬季传统的狗拉雪橇和神奇的极光,都使格陵兰岛成为必游之地。\n\n​然而,直到现在,它一直地处偏远,花费高昂,而且需要花费大量时间。\n\n​随着首都努克新国际机场的启用,以及2026年将启用的两座新机场,前往格陵兰岛变得前所未有地便捷。\n\n​格陵兰岛欢迎热爱探险的旅行者,他们既热爱探索,又尊重其令人惊叹的自然风光和独特的因纽特文化。\n\n随着努克新机场的开通,游客将能更加轻松地游览伊卢利萨特冰峡湾与其他北极景点\n\n格陵兰岛已承诺“改善旅游业”,并制定了一项新法律,旨在将旅游业资金用于造福当地社区。\n\n​努克是一座现代化的城镇,拥有历史悠久的海滨、内容丰富的博物馆和令人印象深刻的艺术画廊,也是远足、钓鱼和豪华露营之旅的出发点,也是探索北极奇观的门户。\n\n​再往北到伊卢利萨特,游客可以探索令人惊叹的迪斯科湾冰山和联合国教科文组织认可的壮观冰峡湾。\n\n​在南部,曾经是维京人的定居地,那里有美丽的峡湾和风景如画的绿色山丘,点缀着绵羊农场。", "segmentation_method": "reviewed_source_semantics", "label": "​ 2. 日本直岛", "source_line_range": [ 43, 112 ] }, { "id": "body-region-4", "text": "详 见 格 陵 兰 岛 旅 行 终 极 攻 略 典 藏 版", "source_text": "详见:格陵兰岛旅行终极攻略 (典藏版)", "segmentation_method": "reviewed_source_semantics", "label": "详见:格陵兰岛旅行终极攻略 (典藏版)", "source_line_range": [ 113, 114 ] }, { "id": "body-region-5", "text": "https weibo com ttarticle p show id 2309405120998189171052 5 威 尔 士 尽 管 威 尔 士 的 面 积 只 有 英 格 兰 的 六 分 之 一 游 客 数 量 也 远 不 及 英 国 其 他 著 名 地 区 但 威 尔 士 却 拥 有 令 人 惊 叹 的 国 家 公 园 中 世 纪 城 堡 并 且 几 乎 没 有 人 潮 这 更 增 添 了 它 的 吸 引 力 威 尔 士 正 在 开 展 为 期 一 年 的 活 动 向 游 客 展 示 威 尔 士 文 化 和 语 言 新 的 一 年 威 尔 士 为 游 客 们 提 供 了 一 个 探 索 欧 洲 最 有 前 途 的 目 的 地 之 一 的 额 外 借 口 威 尔 士 将 在 2025 年 庆 祝 croeso 欢 迎 年 为 期 一 年 的 活 动 将 展 示 威 尔 士 的 文 化 语 言 与 景 点 同 时 邀 请 游 客 感 受 高 速 公 路 这 是 一 个 无 法 翻 译 的 威 尔 士 语 词 描 述 了 沉 浸 在 当 下 的 深 层 喜 悦 状 态 近 年 来 威 尔 士 一 直 走 在 可 持 续 文 化 旅 游 的 前 沿 旅 游 业 在 威 尔 士 语 的 复 兴 中 发 挥 了 重 要 作 用 该 国 正 在 实 施 一 项 耗 资 50 亿 英 镑 的 多 年 期 计 划 利 用 旅 游 资 金 使 各 个 目 的 地 更 加 环 保 可 持 续", "source_text": "https://weibo.com/ttarticle/p/show?id=2309405120998189171052\n\n5. 威尔士\n\n尽管威尔士的面积只有英格兰的六分之一,游客数量也远不及英国其他著名地区,但威尔士却拥有令人惊叹的国家公园、中世纪城堡,并且几乎没有人潮。这更增添了它的吸引力。\n\n威尔士正在开展为期一年的活动,向游客展示威尔士文化和语言\n\n新的一年,威尔士为游客们提供了一个探索欧洲最有前途的目的地之一的额外借口:威尔士将在2025年庆祝Croeso“欢迎”年。\n\n​为期一年的活动,将展示威尔士的文化、语言与景点,同时邀请游客“感受高速公路”——这是一个无法翻译的威尔士语词,描述了沉浸在当下的深层喜悦状态。近年来,威尔士一直走在可持续、文化旅游的前沿。\n\n​旅游业在威尔士语的复兴中发挥了重要作用,该国正在实施一项耗资50亿英镑的多年期计划,利用旅游资金使各个目的地更加环保可持续。", "segmentation_method": "reviewed_source_semantics", "label": "https://weibo.com/ttarticle/p/show?id=2309405120998189171052", "source_line_range": [ 115, 127 ] } ], "ending": { "text": "​为期一年的活动,将展示威尔士的文化、语言与景点,同时邀请游客“感受高速公路”——这是一个无法翻译的威尔士语词,描述了沉浸在当下的深层喜悦状态。近年来,威尔士一直走在可持续、文化旅游的前沿。\n\n​旅游业在威尔士语的复兴中发挥了重要作用,该国正在实施一项耗资50亿英镑的多年期计划,利用旅游资金使各个目的地更加环保可持续。" } } }, { "id": "article-009", "name": "从产业细微处,看见周期起落", "url": "https://xueqiu.com/8007330530/409060327", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "从产业细微处" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "从产业细微处" ] }, { "id": "stable-2", "alternatives": [ "研木知秋" ] }, { "id": "stable-3", "alternatives": [ "首页" ] }, { "id": "stable-4", "alternatives": [ "下载App" ] }, { "id": "stable-5", "alternatives": [ "登录" ] }, { "id": "stable-6", "alternatives": [ "关注" ] }, { "id": "stable-7", "alternatives": [ "收藏" ] }, { "id": "stable-8", "alternatives": [ "转发" ] }, { "id": "stable-9", "alternatives": [ "投诉" ] }, { "id": "stable-10", "alternatives": [ "仅在正文下讨论" ] }, { "id": "stable-11", "alternatives": [ "发布" ] }, { "id": "stable-12", "alternatives": [ "最热" ] }, { "id": "stable-13", "alternatives": [ "最新" ] }, { "id": "stable-14", "alternatives": [ "最早" ] }, { "id": "stable-15", "alternatives": [ "热门话题" ] }, { "id": "stable-16", "alternatives": [ "热股榜" ] }, { "id": "stable-17", "alternatives": [ "更多" ] }, { "id": "stable-18", "alternatives": [ "全球" ] }, { "id": "stable-19", "alternatives": [ "沪深" ] }, { "id": "stable-20", "alternatives": [ "港股" ] }, { "id": "stable-21", "alternatives": [ "美股" ] }, { "id": "stable-22", "alternatives": [ "1小时内最热" ] }, { "id": "stable-23", "alternatives": [ "24小时内最热" ] }, { "id": "stable-24", "alternatives": [ "涨跌幅榜" ] }, { "id": "stable-25", "alternatives": [ "涨幅榜" ] }, { "id": "stable-26", "alternatives": [ "跌幅榜" ] }, { "id": "stable-27", "alternatives": [ "热门基金" ] }, { "id": "stable-28", "alternatives": [ "年化" ] }, { "id": "stable-29", "alternatives": [ "常见问题" ] }, { "id": "stable-30", "alternatives": [ "关于雪球" ] }, { "id": "stable-31", "alternatives": [ "投资者教育" ] }, { "id": "stable-32", "alternatives": [ "风险提示" ] }, { "id": "stable-33", "alternatives": [ "营业执照" ] }, { "id": "stable-34", "alternatives": [ "侵权投诉指引" ] }, { "id": "stable-35", "alternatives": [ "出版物经营许可证" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The fixed article is complete in .article__bd__detail: opening, research framework, decision disclaimer and future plan through both owned topic links. Full-page screenshot confirms its ending before platform risk notice and comment controls; no wall blocks the body. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "从产业细微处 , 看见周期起落" ], "html_selector": "h1.article__bd__title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": ".comment__item, .comment__item__reply > .items", "author_selector": ".comment__item__main__hd > a.user-name, :scope > a.user-name:first-of-type", "body_selector": ".comment__item__main > p, :scope > .content", "id_attribute": "data-id", "section_markers": [ "全部讨论", "评论" ], "version": 2, "minimum_comments": 1, "text_scope": { "body_end": "业跟踪\n、\n产业链基本面拆解类长文\n。\n\n会尽量把复杂的宏观逻辑通俗化\n,\n把枯燥产业数据提炼成可跟踪的观察指标\n。\n不追逐短线热点炒作\n,\n更关注中长期产业趋势的变化\n。\n#宏观经济# #产业研究#", "end_markers": [ "热门话题", "热股榜" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-009/comment-qualification-reference-r5.json", "sha256": "ce67628cbfd2d69aaf3a0358609d512f0fe0bf6e935d6695993821389afcc4e0", "chars": 918, "record_count": 1 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 1, "qualification_only": true } }, "ground_truth_main_content": "【开篇】\n大家好\n,\n我是研木知秋\n。\n\n十余年金融行业从业经历\n,\n同时拥有十年以上A股实战投资经验\n。\n长期深耕宏观经济\n、\n产业政策与产业链基本面研究\n。\n\n取名“研木知秋”\n,\n取自一叶知秋之意:沉下心研判产业根基\n,\n从细微的行业变化\n,\n去预判周期的转向\n。\n这也是我后续所有研究内容的底层逻辑\n。\n\n很多朋友看宏观\n,\n习惯盯着总量数据\n、\n政策新闻\n,\n只看顶层文字\n,\n容易忽略政策落地传导到产业\n、\n企业的真实路径\n。\n市场里大量的资讯\n,\n大多是信息的二次转述\n,\n缺少一线产业视角的验证\n。\n\n我希望这个账号\n,\n做的不是新闻复述\n,\n不是情绪复盘\n,\n而是把宏观\n、\n政策\n,\n一层层拆解\n,\n落地到产业链条当中\n。\n\n【我的研究框架】\n先看宏观底色:分析财政\n、\n货币\n、\n国内需求\n、\n外部环境\n,\n判断当前经济所处的周期位置;\n追踪产业政策:分辨政策是短期刺激\n,\n还是中长期产业变革\n,\n区分哪些政策能真正传导到企业营收;\n下沉产业链验证:沿着上下游\n,\n观察供需格局\n、\n库存\n、\n资本开支\n、\n企业盈利变化;\n最后映射资本市场:客观评估板块机会与潜在风险\n。\n\n所有分析\n,\n只做基本面逻辑推演\n,\n不荐股\n、\n不预测短期涨跌\n,\n不提供买卖建议\n。\n投资决策\n,\n永远需要读者自己独立判断\n。\n\n【后续内容规划】\n后续我会持续输出宏观解读\n、\n行业产业跟踪\n、\n产业链基本面拆解类长文\n。\n\n会尽量把复杂的宏观逻辑通俗化\n,\n把枯燥产业数据提炼成可跟踪的观察指标\n。\n不追逐短线热点炒作\n,\n更关注中长期产业趋势的变化\n。\n#宏观经济# #产业研究#", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 1, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "开 篇 大 家 好 我 是 研 木 知 秋 十 余 年 金 融 行 业 从 业 经 历 同 时 拥 有 十 年 以 上 a 股 实 战 投 资 经 验 长 期 深 耕 宏 观 经 济 产 业 政 策 与 产 业 链 基 本 面 研 究 取 名 研 木 知 秋 取 自 一 叶 知 秋 之 意 沉 下 心 研 判 产 业 根 基 从 细 微 的 行 业 变 化 去 预 判 周 期 的 转 向 这 也 是 我 后 续 所 有 研 究 内 容 的 底 层 逻 辑 很 多 朋 友 看 宏 观 习 惯 盯 着 总 量 数 据 政 策 新 闻 只 看 顶 层 文 字 容 易 忽 略 政 策 落 地 传 导 到 产 业 企 业 的 真 实 路 径 市 场 里 大 量 的 资 讯 大 多 是 信 息 的 二 次 转 述 缺 少 一 线 产 业 视 角 的 验 证 我 希 望 这 个 账 号 做 的 不 是 新 闻 复 述 不 是 情 绪 复 盘 而 是 把 宏 观 政 策 一 层 层 拆 解 落 地 到 产 业 链 条 当 中 我 的 研 究 框 架 先 看 宏 观 底 色 分 析 财 政 货 币 国 内 需 求 外 部 环 境 判 断 当 前 经 济 所 处 的 周 期 位 置 追 踪 产 业 政 策 分 辨 政 策 是 短 期 刺 激 还 是 中 长 期 产 业 变 革 区 分 哪 些 政 策 能 真 正 传 导 到 企 业 营 收 下 沉 产 业 链 验 证 沿 着 上 下 游 观 察 供 需 格 局 库 存 资 本 开 支 企 业 盈 利 变 化 最 后 映 射 资 本 市 场 客 观 评 估 板 块 机 会 与 潜 在 风 险 所 有 分 析 只 做 基 本 面 逻 辑 推 演 不 荐 股 不 预 测 短 期 涨 跌 不 提 供 买 卖 建 议 投 资 决 策 永 远 需 要 读 者 自 己 独 立 判 断 后 续 内 容 规 划 后 续 我 会 持 续 输 出 宏 观 解 读 行 业 产 业 跟 踪 产 业 链 基 本 面 拆 解 类 长 文 会 尽 量 把 复 杂 的 宏 观 逻 辑 通 俗 化 把 枯 燥 产 业 数 据 提 炼 成 可 跟 踪 的 观 察 指 标 不 追 逐 短 线 热 点 炒 作 更 关 注 中 长 期 产 业 趋 势 的 变 化 宏 观 经 济 产 业 研 究", "source_text": "【开篇】\n大家好\n,\n我是研木知秋\n。\n\n十余年金融行业从业经历\n,\n同时拥有十年以上A股实战投资经验\n。\n长期深耕宏观经济\n、\n产业政策与产业链基本面研究\n。\n\n取名“研木知秋”\n,\n取自一叶知秋之意:沉下心研判产业根基\n,\n从细微的行业变化\n,\n去预判周期的转向\n。\n这也是我后续所有研究内容的底层逻辑\n。\n\n很多朋友看宏观\n,\n习惯盯着总量数据\n、\n政策新闻\n,\n只看顶层文字\n,\n容易忽略政策落地传导到产业\n、\n企业的真实路径\n。\n市场里大量的资讯\n,\n大多是信息的二次转述\n,\n缺少一线产业视角的验证\n。\n\n我希望这个账号\n,\n做的不是新闻复述\n,\n不是情绪复盘\n,\n而是把宏观\n、\n政策\n,\n一层层拆解\n,\n落地到产业链条当中\n。\n\n【我的研究框架】\n先看宏观底色:分析财政\n、\n货币\n、\n国内需求\n、\n外部环境\n,\n判断当前经济所处的周期位置;\n追踪产业政策:分辨政策是短期刺激\n,\n还是中长期产业变革\n,\n区分哪些政策能真正传导到企业营收;\n下沉产业链验证:沿着上下游\n,\n观察供需格局\n、\n库存\n、\n资本开支\n、\n企业盈利变化;\n最后映射资本市场:客观评估板块机会与潜在风险\n。\n\n所有分析\n,\n只做基本面逻辑推演\n,\n不荐股\n、\n不预测短期涨跌\n,\n不提供买卖建议\n。\n投资决策\n,\n永远需要读者自己独立判断\n。\n\n【后续内容规划】\n后续我会持续输出宏观解读\n、\n行业产业跟踪\n、\n产业链基本面拆解类长文\n。\n\n会尽量把复杂的宏观逻辑通俗化\n,\n把枯燥产业数据提炼成可跟踪的观察指标\n。\n不追逐短线热点炒作\n,\n更关注中长期产业趋势的变化\n。\n#宏观经济# #产业研究#", "segmentation_method": "reviewed_source_semantics", "label": "开篇:【开篇】", "source_line_range": [ 1, 119 ] } ], "ending": { "text": "业跟踪\n、\n产业链基本面拆解类长文\n。\n\n会尽量把复杂的宏观逻辑通俗化\n,\n把枯燥产业数据提炼成可跟踪的观察指标\n。\n不追逐短线热点炒作\n,\n更关注中长期产业趋势的变化\n。\n#宏观经济# #产业研究#" } } }, { "id": "article-010", "name": "人工智能的细分方向及学习路线", "url": "https://zhuanlan.zhihu.com/p/1938981107581280917", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "人工智能的细分方向及学习路线,看这一篇就够了" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "关注" ] }, { "id": "stable-2", "alternatives": [ "推荐" ] }, { "id": "stable-3", "alternatives": [ "热榜" ] }, { "id": "stable-4", "alternatives": [ "专栏" ] }, { "id": "stable-5", "alternatives": [ "圈子" ] }, { "id": "stable-6", "alternatives": [ "AI Works" ] }, { "id": "stable-7", "alternatives": [ "Beta" ] }, { "id": "stable-8", "alternatives": [ "故事" ] }, { "id": "stable-9", "alternatives": [ "直答" ] }, { "id": "stable-10", "alternatives": [ "切换模式" ] }, { "id": "stable-11", "alternatives": [ "登录/注册" ] }, { "id": "stable-13", "alternatives": [ "AI技能研究所" ] }, { "id": "stable-14", "alternatives": [ "已认证机构号" ] }, { "id": "stable-16", "alternatives": [ "人工智能" ] }, { "id": "stable-17", "alternatives": [ "大模型" ] }, { "id": "stable-18", "alternatives": [ "AI大模型" ] }, { "id": "stable-19", "alternatives": [ "赞同" ] }, { "id": "stable-20", "alternatives": [ "添加评论" ] }, { "id": "stable-21", "alternatives": [ "分享" ] }, { "id": "stable-22", "alternatives": [ "申请转载" ] }, { "id": "stable-23", "alternatives": [ "关于作者" ] }, { "id": "stable-24", "alternatives": [ "AI的进阶之旅" ] }, { "id": "stable-25", "alternatives": [ "回答" ] }, { "id": "stable-26", "alternatives": [ "文章" ] }, { "id": "stable-27", "alternatives": [ "关注者" ] }, { "id": "stable-28", "alternatives": [ "发私信" ] }, { "id": "stable-29", "alternatives": [ "大家都在搜" ] }, { "id": "stable-30", "alternatives": [ "换一换" ] }, { "id": "stable-31", "alternatives": [ "推荐阅读" ] }, { "id": "stable-32", "alternatives": [ "人工智能,机器学习与深度学习之间的区别?" ] }, { "id": "stable-33", "alternatives": [ "AI有哪些方向?" ] }, { "id": "stable-34", "alternatives": [ "学习LLM有哪些前置要求?" ] }, { "id": "stable-35", "alternatives": [ "LLM方向" ] }, { "id": "stable-36", "alternatives": [ "总结" ] }, { "id": "stable-37", "alternatives": [ "数学" ] }, { "id": "stable-38", "alternatives": [ "编程" ] }, { "id": "stable-39", "alternatives": [ "python" ] }, { "id": "stable-40", "alternatives": [ "pytorch" ] }, { "id": "stable-41", "alternatives": [ "1.大语言模型应用模块" ] }, { "id": "stable-42", "alternatives": [ "2.大语言模型训练" ] }, { "id": "stable-43", "alternatives": [ "3.大语言模型基础" ] }, { "id": "stable-47", "alternatives": [ "如今ChatGPT、Midjourney和cursor等工具已将人工智能(AI)带入主流。这使得AI比以往任何时候都更加重要。" ] }, { "id": "stable-48", "alternatives": [ "本文介绍了人工智能主要方向,并且重点介绍了LLM入门的学习路线图。" ] }, { "id": "stable-49", "alternatives": [ "原文作者:程序锅" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Full already-loaded article independently qualified after the human-authorized authoring-only login-obstruction Close action. Before/after owning article text is exactly equal; no authentication, expansion, scrolling or additional article load occurred. Complete prose, learning-resource text links, rendered course-card ordinary text, all sections and original-author ending retained. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "人工智能的细分方向及学习路线,看这一篇就够了" ], "html_selector": "h1.Post-Title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-010/comment-qualification-reference-r5.json", "sha256": "4fa0ee962bee2494c5bee9c729df84755c184bde9d49c5cc069d51b82ea7f193", "chars": 778, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "如今ChatGPT、Midjourney和cursor等工具已将人工智能(AI)带入主流。这使得AI比以往任何时候都更加重要。\n\n人工智能,机器学习与深度学习之间的区别?\n\n网上可以看到各种术语,比如“机器学习”,“深度学习”,“数据科学”以及其他术语,它们之间的边界如下图所示。\n\n机器学习是人工智能的一个子集,专注于开发具有学习算法而无需明确编程的能力。深度学习是机器学习的子集,由多个输入、输出和隐藏层构成。例如chatgpt、alphago。数据科学是一个跨学科领域,其中涉及到的数据处理、分析、可视化适用于所有领域。\n\nAI有哪些方向?\n\n下面我用一张图来介绍AI的主流方向,主要分为计算机视觉,自然语言处理,数据挖掘以及目前最火的大模型。\n\n从应用角度来看,AI方向可以分为计算机视觉,自然语言处理,数据挖掘。计算机视觉就包括图像分类,目标检测、视频分割等等,具体应用有人脸识别,无人驾驶汽车等等。自然语言处理包括机器翻译,语音识别,文本挖掘等等,像siri,谷歌翻译里面都有很多的自然语言处理技术。数据挖掘主要是各种推荐和预测,包括电子商务的商品推荐,计算广告,社交网络分析(微博好友推荐等),预测一些趋势,比如股市的走向,天气的变化等。\n\n最基础的图像分类也有大量的技术研究,比如卷积神经网络(CNN),支持向量机(SVM)、K-近邻算法(KNN),CLIP、ViT等等。其中CNN中的卷积还可以细分为标准卷积、空洞卷积、可变形卷积、1×1卷积等等。\n\n将AI所有技术学完是不现实的,要知道AI目前发展迭代非常迅速,没等你学完,新的技术出现颠覆了旧技术。随着大模型的出现,很多旧技术已经被淘汰。比如在自然语言处理中,别人辛辛苦苦研究多年的bert魔改模型,现在大模型+提示词就能达到sota的效果,多年的研究内容没有丝毫意义。LLM作为人工智能领域的一种范式转变技术,到现在还不到2年的时间,大家都是在同一起跑线上。如果你正在学习人工智能,强烈建议直接学习大模型。\n\n目前知乎知学堂推出了一门程序员的大模型应用开发公开课,里面介绍了大模型的基础理论,比如Transformer结构、成熟的大语言模型结构等等。也会涉及到大模型应用,比如知识检索增强技术、智能体技术等等。链接放下面啦,感兴趣的同学可以看看。\n\n🔥技术岗高薪必学:AI大模型技术原理+应用开发+模型训练\n¥0.00\n就业无忧\n\n我自己也看了看,还是挺有收获的。现在报名还能免费领取大模型相关全套资源包,都是圈内大佬和大厂高p联合整理并打磨的干货知识,日常工作和晋升、应聘中都能用到。\n\n学习LLM有哪些前置要求?\n\nLLM可以理解为参数量很大的模型,但它本质还是模型,属于深度学习范畴。深度学习中存在的技术对于学习LLM都有效。\n\n在下面我也分享我自己学习LLM的学习路线。\n\n数学\n\n深度学习在很大程度上依赖三个数学支柱:线性代数,微积分,概率和统计。每个都在使算法有效发挥功能中起着独特的作用。\n\n线性代数:用于数据表示和操纵的数学工具包,其中矩阵和向量构成了算法的语言,用于解释和处理信息。(推荐https://pabloinsente.github.io/intro-linear-algebra,里面从最基础的向量->svd算法,配合python代码,非常好理解)\n\n微积分:用于在机器学习中优化的引擎,使算法能够通过了解梯度和变化速率来学习和改进。(推荐https://arxiv.org/pdf/1802.01528这篇论文,主要介绍了深度学习用到的微积分技术,对于理解反向传播非常有帮助)\n\n概率和统计:不确定性下决策的基础,允许算法通过随机性和可变性模型来预测结果并从数据中学习。(推荐https://www.youtube.com/playlist?list=PLblh5JKOoLUK0FLuzwntyYI10UQFUhsY9,用大白话讲明白什么是概率分布、正态分布、最大似然估计等等)\n\n编程\n\npython\n\n如果你是新入门python,推荐这个项目Practical Python Programming.\n\n如果您已经对Python感到满意,推荐这个项目Advanced Python Mastery.\n\n这两个教程的作者是Python Cookbook的作者David Beazley\n\npytorch\n\npytorch、tensorflow、kears、caffe都属于深度学习框架,主要用于构建、训练和部署深度学习模型。不用深度学习框架行不行?当然也可以,网上也有大佬纯用numpy实现前向、反向传播,权重按照.npy文件保存。只不过用深度学习框架,效率更高、速度更快,并且适合大规模数据处理。\n\n这里推荐学习使用最为广泛的深度学习框架pytorch。官网教程非常全面,地址:官方教程,不过对新手有些难度。\n\n如果你是纯新手,可以看一看datawhale的pytorch入门,从pytorch的安装到自己训练一个模型。\n\n另外有一个非常有意思的项目,用于测试你的pytorch水平,地址:Tensor-Puzzles\n\nLLM方向\n\n数学和编程都搞定了,可以开始LLM入门了。我的LLM入门路线如下图所示:\n\n如果你是纯新手,建议学习的先后步骤为:\n\n1.大语言模型应用模块\n\n学习如何调用大模型API,了解知识检索增强(rag)的原理,尝试自己构建一个知识问答系统。学一学市面上主流的rag框架,优化提升自己的知识问答系统。\n\n了解什么是智能体,理解智能体和大模型的区别,自己手写智能体调用api,学习市面上主流的智能体框架React\n\n2.大语言模型训练\n\n理解大模型预训练、有监督微调和强化学习之间的区别。利用大模型训练框架llamafactory尝试有监督微调,试一试lora、QLora、全量等有监督微调方法,也玩一玩PPO等强化学习方法。\n\n尝试用基于 DeepSpeed 可以通过单机多卡、多机多卡、流水线并行等操作来训练和微调大模型。\n\n大模型推理成本为O(N^2)(N为输入序列长度),当序列长度大了推理成本巨大,因此推理加速是非常必要的。可以去了解大模型KV Cache,注意力机制的优化。\n\n3.大语言模型基础\n\n理解Transformer架构,学习其中的encoder、decoder部分。\n\n尝试从0手写一个大语言模型,比如llama3。项目地址:https://github.com/naklecha/llama3-from-scratch。\n\n理解大语言模型为什么需要位置编码,学习相对位置编码、绝对位置编码。推荐看一看Transformer结构中的Sinusoidal Position Embedding和2021年提出的 Rotary Position Embedding。\n\n总结\n\n本文介绍了人工智能主要方向,并且重点介绍了LLM入门的学习路线图。\n\n原文作者:程序锅\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "如 今 chatgpt midjourney 和 cursor 等 工 具 已 将 人 工 智 能 ai 带 入 主 流 这 使 得 ai 比 以 往 任 何 时 候 都 更 加 重 要 人 工 智 能 机 器 学 习 与 深 度 学 习 之 间 的 区 别 网 上 可 以 看 到 各 种 术 语 比 如 机 器 学 习 深 度 学 习 数 据 科 学 以 及 其 他 术 语 它 们 之 间 的 边 界 如 下 图 所 示 机 器 学 习 是 人 工 智 能 的 一 个 子 集 专 注 于 开 发 具 有 学 习 算 法 而 无 需 明 确 编 程 的 能 力 深 度 学 习 是 机 器 学 习 的 子 集 由 多 个 输 入 输 出 和 隐 藏 层 构 成 例 如 chatgpt alphago 数 据 科 学 是 一 个 跨 学 科 领 域 其 中 涉 及 到 的 数 据 处 理 分 析 可 视 化 适 用 于 所 有 领 域", "source_text": "如今ChatGPT、Midjourney和cursor等工具已将人工智能(AI)带入主流。这使得AI比以往任何时候都更加重要。\n\n人工智能,机器学习与深度学习之间的区别?\n\n网上可以看到各种术语,比如“机器学习”,“深度学习”,“数据科学”以及其他术语,它们之间的边界如下图所示。\n\n机器学习是人工智能的一个子集,专注于开发具有学习算法而无需明确编程的能力。深度学习是机器学习的子集,由多个输入、输出和隐藏层构成。例如chatgpt、alphago。数据科学是一个跨学科领域,其中涉及到的数据处理、分析、可视化适用于所有领域。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:如今ChatGPT、Midjourney和cursor等工具已将人工智能(AI)带入主流。这使得AI比以往任何时候都更加 — 人工智能,机器学习与深度学习之间的区别?", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "ai 有 哪 些 方 向 下 面 我 用 一 张 图 来 介 绍 ai 的 主 流 方 向 主 要 分 为 计 算 机 视 觉 自 然 语 言 处 理 数 据 挖 掘 以 及 目 前 最 火 的 大 模 型 从 应 用 角 度 来 看 ai 方 向 可 以 分 为 计 算 机 视 觉 自 然 语 言 处 理 数 据 挖 掘 计 算 机 视 觉 就 包 括 图 像 分 类 目 标 检 测 视 频 分 割 等 等 具 体 应 用 有 人 脸 识 别 无 人 驾 驶 汽 车 等 等 自 然 语 言 处 理 包 括 机 器 翻 译 语 音 识 别 文 本 挖 掘 等 等 像 siri 谷 歌 翻 译 里 面 都 有 很 多 的 自 然 语 言 处 理 技 术 数 据 挖 掘 主 要 是 各 种 推 荐 和 预 测 包 括 电 子 商 务 的 商 品 推 荐 计 算 广 告 社 交 网 络 分 析 微 博 好 友 推 荐 等 预 测 一 些 趋 势 比 如 股 市 的 走 向 天 气 的 变 化 等 最 基 础 的 图 像 分 类 也 有 大 量 的 技 术 研 究 比 如 卷 积 神 经 网 络 cnn 支 持 向 量 机 svm k 近 邻 算 法 knn clip vit 等 等 其 中 cnn 中 的 卷 积 还 可 以 细 分 为 标 准 卷 积 空 洞 卷 积 可 变 形 卷 积 1 1 卷 积 等 等 将 ai 所 有 技 术 学 完 是 不 现 实 的 要 知 道 ai 目 前 发 展 迭 代 非 常 迅 速 没 等 你 学 完 新 的 技 术 出 现 颠 覆 了 旧 技 术 随 着 大 模 型 的 出 现 很 多 旧 技 术 已 经 被 淘 汰 比 如 在 自 然 语 言 处 理 中 别 人 辛 辛 苦 苦 研 究 多 年 的 bert 魔 改 模 型 现 在 大 模 型 提 示 词 就 能 达 到 sota 的 效 果 多 年 的 研 究 内 容 没 有 丝 毫 意 义 llm 作 为 人 工 智 能 领 域 的 一 种 范 式 转 变 技 术 到 现 在 还 不 到 2 年 的 时 间 大 家 都 是 在 同 一 起 跑 线 上 如 果 你 正 在 学 习 人 工 智 能 强 烈 建 议 直 接 学 习 大 模 型 目 前 知 乎 知 学 堂 推 出 了 一 门 程 序 员 的 大 模 型 应 用 开 发 公 开 课 里 面 介 绍 了 大 模 型 的 基 础 理 论 比 如 transformer 结 构 成 熟 的 大 语 言 模 型 结 构 等 等 也 会 涉 及 到 大 模 型 应 用 比 如 知 识 检 索 增 强 技 术 智 能 体 技 术 等 等 链 接 放 下 面 啦 感 兴 趣 的 同 学 可 以 看 看 技 术 岗 高 薪 必 学 ai 大 模 型 技 术 原 理 应 用 开 发 模 型 训 练 0 00 就 业 无 忧 我 自 己 也 看 了 看 还 是 挺 有 收 获 的 现 在 报 名 还 能 免 费 领 取 大 模 型 相 关 全 套 资 源 包 都 是 圈 内 大 佬 和 大 厂 高 p 联 合 整 理 并 打 磨 的 干 货 知 识 日 常 工 作 和 晋 升 应 聘 中 都 能 用 到", "source_text": "AI有哪些方向?\n\n下面我用一张图来介绍AI的主流方向,主要分为计算机视觉,自然语言处理,数据挖掘以及目前最火的大模型。\n\n从应用角度来看,AI方向可以分为计算机视觉,自然语言处理,数据挖掘。计算机视觉就包括图像分类,目标检测、视频分割等等,具体应用有人脸识别,无人驾驶汽车等等。自然语言处理包括机器翻译,语音识别,文本挖掘等等,像siri,谷歌翻译里面都有很多的自然语言处理技术。数据挖掘主要是各种推荐和预测,包括电子商务的商品推荐,计算广告,社交网络分析(微博好友推荐等),预测一些趋势,比如股市的走向,天气的变化等。\n\n最基础的图像分类也有大量的技术研究,比如卷积神经网络(CNN),支持向量机(SVM)、K-近邻算法(KNN),CLIP、ViT等等。其中CNN中的卷积还可以细分为标准卷积、空洞卷积、可变形卷积、1×1卷积等等。\n\n将AI所有技术学完是不现实的,要知道AI目前发展迭代非常迅速,没等你学完,新的技术出现颠覆了旧技术。随着大模型的出现,很多旧技术已经被淘汰。比如在自然语言处理中,别人辛辛苦苦研究多年的bert魔改模型,现在大模型+提示词就能达到sota的效果,多年的研究内容没有丝毫意义。LLM作为人工智能领域的一种范式转变技术,到现在还不到2年的时间,大家都是在同一起跑线上。如果你正在学习人工智能,强烈建议直接学习大模型。\n\n目前知乎知学堂推出了一门程序员的大模型应用开发公开课,里面介绍了大模型的基础理论,比如Transformer结构、成熟的大语言模型结构等等。也会涉及到大模型应用,比如知识检索增强技术、智能体技术等等。链接放下面啦,感兴趣的同学可以看看。\n\n🔥技术岗高薪必学:AI大模型技术原理+应用开发+模型训练\n¥0.00\n就业无忧\n\n我自己也看了看,还是挺有收获的。现在报名还能免费领取大模型相关全套资源包,都是圈内大佬和大厂高p联合整理并打磨的干货知识,日常工作和晋升、应聘中都能用到。", "segmentation_method": "reviewed_source_semantics", "label": "AI有哪些方向?", "source_line_range": [ 9, 26 ] }, { "id": "body-region-3", "text": "学 习 llm 有 哪 些 前 置 要 求 llm 可 以 理 解 为 参 数 量 很 大 的 模 型 但 它 本 质 还 是 模 型 属 于 深 度 学 习 范 畴 深 度 学 习 中 存 在 的 技 术 对 于 学 习 llm 都 有 效 在 下 面 我 也 分 享 我 自 己 学 习 llm 的 学 习 路 线 数 学 深 度 学 习 在 很 大 程 度 上 依 赖 三 个 数 学 支 柱 线 性 代 数 微 积 分 概 率 和 统 计 每 个 都 在 使 算 法 有 效 发 挥 功 能 中 起 着 独 特 的 作 用 线 性 代 数 用 于 数 据 表 示 和 操 纵 的 数 学 工 具 包 其 中 矩 阵 和 向 量 构 成 了 算 法 的 语 言 用 于 解 释 和 处 理 信 息 推 荐 https pabloinsente github io intro linear algebra 里 面 从 最 基 础 的 向 量 svd 算 法 配 合 python 代 码 非 常 好 理 解 微 积 分 用 于 在 机 器 学 习 中 优 化 的 引 擎 使 算 法 能 够 通 过 了 解 梯 度 和 变 化 速 率 来 学 习 和 改 进 推 荐 https arxiv org pdf 1802 01528 这 篇 论 文 主 要 介 绍 了 深 度 学 习 用 到 的 微 积 分 技 术 对 于 理 解 反 向 传 播 非 常 有 帮 助 概 率 和 统 计 不 确 定 性 下 决 策 的 基 础 允 许 算 法 通 过 随 机 性 和 可 变 性 模 型 来 预 测 结 果 并 从 数 据 中 学 习 推 荐 https www youtube com playlist list plblh5jkooluk0fluzwntyyi10uqfuhsy9 用 大 白 话 讲 明 白 什 么 是 概 率 分 布 正 态 分 布 最 大 似 然 估 计 等 等 编 程 python 如 果 你 是 新 入 门 python 推 荐 这 个 项 目 practical python programming 如 果 您 已 经 对 python 感 到 满 意 推 荐 这 个 项 目 advanced python mastery 这 两 个 教 程 的 作 者 是 python cookbook 的 作 者 david beazley pytorch pytorch tensorflow kears caffe 都 属 于 深 度 学 习 框 架 主 要 用 于 构 建 训 练 和 部 署 深 度 学 习 模 型 不 用 深 度 学 习 框 架 行 不 行 当 然 也 可 以 网 上 也 有 大 佬 纯 用 numpy 实 现 前 向 反 向 传 播 权 重 按 照 npy 文 件 保 存 只 不 过 用 深 度 学 习 框 架 效 率 更 高 速 度 更 快 并 且 适 合 大 规 模 数 据 处 理 这 里 推 荐 学 习 使 用 最 为 广 泛 的 深 度 学 习 框 架 pytorch 官 网 教 程 非 常 全 面 地 址 官 方 教 程 不 过 对 新 手 有 些 难 度 如 果 你 是 纯 新 手 可 以 看 一 看 datawhale 的 pytorch 入 门 从 pytorch 的 安 装 到 自 己 训 练 一 个 模 型 另 外 有 一 个 非 常 有 意 思 的 项 目 用 于 测 试 你 的 pytorch 水 平 地 址 tensor puzzles", "source_text": "学习LLM有哪些前置要求?\n\nLLM可以理解为参数量很大的模型,但它本质还是模型,属于深度学习范畴。深度学习中存在的技术对于学习LLM都有效。\n\n在下面我也分享我自己学习LLM的学习路线。\n\n数学\n\n深度学习在很大程度上依赖三个数学支柱:线性代数,微积分,概率和统计。每个都在使算法有效发挥功能中起着独特的作用。\n\n线性代数:用于数据表示和操纵的数学工具包,其中矩阵和向量构成了算法的语言,用于解释和处理信息。(推荐https://pabloinsente.github.io/intro-linear-algebra,里面从最基础的向量->svd算法,配合python代码,非常好理解)\n\n微积分:用于在机器学习中优化的引擎,使算法能够通过了解梯度和变化速率来学习和改进。(推荐https://arxiv.org/pdf/1802.01528这篇论文,主要介绍了深度学习用到的微积分技术,对于理解反向传播非常有帮助)\n\n概率和统计:不确定性下决策的基础,允许算法通过随机性和可变性模型来预测结果并从数据中学习。(推荐https://www.youtube.com/playlist?list=PLblh5JKOoLUK0FLuzwntyYI10UQFUhsY9,用大白话讲明白什么是概率分布、正态分布、最大似然估计等等)\n\n编程\n\npython\n\n如果你是新入门python,推荐这个项目Practical Python Programming.\n\n如果您已经对Python感到满意,推荐这个项目Advanced Python Mastery.\n\n这两个教程的作者是Python Cookbook的作者David Beazley\n\npytorch\n\npytorch、tensorflow、kears、caffe都属于深度学习框架,主要用于构建、训练和部署深度学习模型。不用深度学习框架行不行?当然也可以,网上也有大佬纯用numpy实现前向、反向传播,权重按照.npy文件保存。只不过用深度学习框架,效率更高、速度更快,并且适合大规模数据处理。\n\n这里推荐学习使用最为广泛的深度学习框架pytorch。官网教程非常全面,地址:官方教程,不过对新手有些难度。\n\n如果你是纯新手,可以看一看datawhale的pytorch入门,从pytorch的安装到自己训练一个模型。\n\n另外有一个非常有意思的项目,用于测试你的pytorch水平,地址:Tensor-Puzzles", "segmentation_method": "reviewed_source_semantics", "label": "学习LLM有哪些前置要求?", "source_line_range": [ 27, 62 ] }, { "id": "body-region-4", "text": "llm 方 向 数 学 和 编 程 都 搞 定 了 可 以 开 始 llm 入 门 了 我 的 llm 入 门 路 线 如 下 图 所 示 如 果 你 是 纯 新 手 建 议 学 习 的 先 后 步 骤 为 1 大 语 言 模 型 应 用 模 块 学 习 如 何 调 用 大 模 型 api 了 解 知 识 检 索 增 强 rag 的 原 理 尝 试 自 己 构 建 一 个 知 识 问 答 系 统 学 一 学 市 面 上 主 流 的 rag 框 架 优 化 提 升 自 己 的 知 识 问 答 系 统 了 解 什 么 是 智 能 体 理 解 智 能 体 和 大 模 型 的 区 别 自 己 手 写 智 能 体 调 用 api 学 习 市 面 上 主 流 的 智 能 体 框 架 react 2 大 语 言 模 型 训 练 理 解 大 模 型 预 训 练 有 监 督 微 调 和 强 化 学 习 之 间 的 区 别 利 用 大 模 型 训 练 框 架 llamafactory 尝 试 有 监 督 微 调 试 一 试 lora qlora 全 量 等 有 监 督 微 调 方 法 也 玩 一 玩 ppo 等 强 化 学 习 方 法 尝 试 用 基 于 deepspeed 可 以 通 过 单 机 多 卡 多 机 多 卡 流 水 线 并 行 等 操 作 来 训 练 和 微 调 大 模 型 大 模 型 推 理 成 本 为 o n 2 n 为 输 入 序 列 长 度 当 序 列 长 度 大 了 推 理 成 本 巨 大 因 此 推 理 加 速 是 非 常 必 要 的 可 以 去 了 解 大 模 型 kv cache 注 意 力 机 制 的 优 化 3 大 语 言 模 型 基 础 理 解 transformer 架 构 学 习 其 中 的 encoder decoder 部 分 尝 试 从 0 手 写 一 个 大 语 言 模 型 比 如 llama3 项 目 地 址 https github com naklecha llama3 from scratch 理 解 大 语 言 模 型 为 什 么 需 要 位 置 编 码 学 习 相 对 位 置 编 码 绝 对 位 置 编 码 推 荐 看 一 看 transformer 结 构 中 的 sinusoidal position embedding 和 2021 年 提 出 的 rotary position embedding", "source_text": "LLM方向\n\n数学和编程都搞定了,可以开始LLM入门了。我的LLM入门路线如下图所示:\n\n如果你是纯新手,建议学习的先后步骤为:\n\n1.大语言模型应用模块\n\n学习如何调用大模型API,了解知识检索增强(rag)的原理,尝试自己构建一个知识问答系统。学一学市面上主流的rag框架,优化提升自己的知识问答系统。\n\n了解什么是智能体,理解智能体和大模型的区别,自己手写智能体调用api,学习市面上主流的智能体框架React\n\n2.大语言模型训练\n\n理解大模型预训练、有监督微调和强化学习之间的区别。利用大模型训练框架llamafactory尝试有监督微调,试一试lora、QLora、全量等有监督微调方法,也玩一玩PPO等强化学习方法。\n\n尝试用基于 DeepSpeed 可以通过单机多卡、多机多卡、流水线并行等操作来训练和微调大模型。\n\n大模型推理成本为O(N^2)(N为输入序列长度),当序列长度大了推理成本巨大,因此推理加速是非常必要的。可以去了解大模型KV Cache,注意力机制的优化。\n\n3.大语言模型基础\n\n理解Transformer架构,学习其中的encoder、decoder部分。\n\n尝试从0手写一个大语言模型,比如llama3。项目地址:https://github.com/naklecha/llama3-from-scratch。\n\n理解大语言模型为什么需要位置编码,学习相对位置编码、绝对位置编码。推荐看一看Transformer结构中的Sinusoidal Position Embedding和2021年提出的 Rotary Position Embedding。", "segmentation_method": "reviewed_source_semantics", "label": "LLM方向", "source_line_range": [ 63, 90 ] }, { "id": "body-region-5", "text": "总 结 本 文 介 绍 了 人 工 智 能 主 要 方 向 并 且 重 点 介 绍 了 llm 入 门 的 学 习 路 线 图 原 文 作 者 程 序 锅", "source_text": "总结\n\n本文介绍了人工智能主要方向,并且重点介绍了LLM入门的学习路线图。\n\n原文作者:程序锅", "segmentation_method": "reviewed_source_semantics", "label": "总结", "source_line_range": [ 91, 95 ] } ], "ending": { "text": "原文作者:程序锅" } } }, { "id": "article-011", "name": "深度学习应该从哪里开始学起来?", "url": "https://www.zhihu.com/question/1908123292520408101/answer/2029584834092184706", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "深度学习应该从哪里开始学起来?" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "关注" ] }, { "id": "stable-2", "alternatives": [ "推荐" ] }, { "id": "stable-3", "alternatives": [ "热榜" ] }, { "id": "stable-4", "alternatives": [ "专栏" ] }, { "id": "stable-5", "alternatives": [ "圈子" ] }, { "id": "stable-6", "alternatives": [ "AI Works" ] }, { "id": "stable-7", "alternatives": [ "Beta" ] }, { "id": "stable-8", "alternatives": [ "故事" ] }, { "id": "stable-9", "alternatives": [ "直答" ] }, { "id": "stable-10", "alternatives": [ "切换模式" ] }, { "id": "stable-11", "alternatives": [ "登录/注册" ] }, { "id": "stable-13", "alternatives": [ "深度学习(Deep Learning)" ] }, { "id": "stable-14", "alternatives": [ "需要有哪些准备,深度学习的难点又在哪里呢" ] }, { "id": "stable-15", "alternatives": [ "显示全部" ] }, { "id": "stable-16", "alternatives": [ "关注问题" ] }, { "id": "stable-17", "alternatives": [ "写回答" ] }, { "id": "stable-18", "alternatives": [ "邀请回答" ] }, { "id": "stable-19", "alternatives": [ "好问题" ] }, { "id": "stable-20", "alternatives": [ "添加评论" ] }, { "id": "stable-21", "alternatives": [ "分享" ] }, { "id": "stable-22", "alternatives": [ "关注者" ] }, { "id": "stable-23", "alternatives": [ "被浏览" ] }, { "id": "stable-24", "alternatives": [ "咕泡科技" ] }, { "id": "stable-25", "alternatives": [ "已认证机构号" ] }, { "id": "stable-26", "alternatives": [ "查看全部" ] }, { "id": "stable-27", "alternatives": [ "个回答" ] }, { "id": "stable-28", "alternatives": [ "阅读全文" ] }, { "id": "stable-29", "alternatives": [ "赞同" ] }, { "id": "stable-30", "alternatives": [ "喜欢" ] }, { "id": "stable-31", "alternatives": [ "更多回答" ] }, { "id": "stable-32", "alternatives": [ "下载知乎客户端" ] }, { "id": "stable-33", "alternatives": [ "与世界分享知识、经验和见解" ] }, { "id": "stable-34", "alternatives": [ "关于作者" ] }, { "id": "stable-35", "alternatives": [ "让每个人的职业生涯不留遗憾" ] }, { "id": "stable-36", "alternatives": [ "回答" ] }, { "id": "stable-37", "alternatives": [ "文章" ] }, { "id": "stable-38", "alternatives": [ "发私信" ] }, { "id": "stable-39", "alternatives": [ "相关问题" ] }, { "id": "stable-40", "alternatives": [ "大家都在搜" ] }, { "id": "stable-41", "alternatives": [ "换一换" ] }, { "id": "stable-42", "alternatives": [ "帮助中心" ] }, { "id": "stable-43", "alternatives": [ "服务热线:400-919-0001" ] }, { "id": "stable-44", "alternatives": [ "帮助与客服" ] }, { "id": "stable-45", "alternatives": [ "联系我们" ] }, { "id": "stable-46", "alternatives": [ "更多" ] }, { "id": "stable-47", "alternatives": [ "举报中心" ] }, { "id": "stable-48", "alternatives": [ "违法和不良信息举报:010-82716601" ] }, { "id": "stable-49", "alternatives": [ "我的举报" ] }, { "id": "stable-50", "alternatives": [ "关于知乎" ] }, { "id": "stable-51", "alternatives": [ "知乎个人信息保护指引" ] }, { "id": "stable-52", "alternatives": [ "知乎协议" ] }, { "id": "stable-53", "alternatives": [ "下载知乎" ] }, { "id": "stable-54", "alternatives": [ "Investor Relations" ] }, { "id": "stable-55", "alternatives": [ "网站资质信息" ] }, { "id": "stable-56", "alternatives": [ "京ICP证110745号" ] }, { "id": "stable-57", "alternatives": [ "京ICP备13052560号-1" ] }, { "id": "stable-58", "alternatives": [ "京公网安备 11010802020088 号" ] }, { "id": "stable-59", "alternatives": [ "京网文[2025]0422-132 号" ] }, { "id": "stable-60", "alternatives": [ "药品医疗器械网络信息服务备案(京)网药械信息备字(2022)第00334号" ] }, { "id": "body-61", "alternatives": [ "BTW,这篇内容的总体逻辑是泼盆冷水再递碗热汤..." ] }, { "id": "body-62", "alternatives": [ "第一步:先跑通一个“手写数字识别” (MNIST)" ] }, { "id": "body-63", "alternatives": [ "先说第一点,学习路径:从“调包侠”到“炼丹师”" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Human explicitly accepts complete displayed portion of retained original URL without expanding collapsed body. Every displayed character/block is source-bound through real clipping/mask geometry; full unopened article/answer is not claimed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "深度学习应该从哪里开始学起来?" ], "html_selector": "h1.QuestionHeader-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-011/comment-qualification-reference-r5.json", "sha256": "3a8dd2a2e5d979d15d724ee1ff7e086ae6ccc0b59bb85bc12f7e3e73d641cd39", "chars": 827, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "BTW,这篇内容的总体逻辑是泼盆冷水再递碗热汤...\n\n如果你打算先花半年把《线性代数》《概率论》和《微积分》从头背一遍再写代码,我保证你还没见到神经网络的影子就转行去考公了。\n\n深度学习的最佳路径,应该是:“由果溯因”的降维打击。别不信,不少初到咕泡有比较好知识底子的学员都是用这种自顶向下的学习过来的,而不是库库一顿死磕数学。\n\n先说第一点,学习路径:从“调包侠”到“炼丹师”\n\n很多大佬建议从底层原理学起,但在短视频时代,反馈周期太长就是自杀。我建议的路径是:Top-Down,自顶向下。\n\n第一步:先跑通一个“手写数字识别” (MNIST)\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "btw 这 篇 内 容 的 总 体 逻 辑 是 泼 盆 冷 水 再 递 碗 热 汤 如 果 你 打 算 先 花 半 年 把 线 性 代 数 概 率 论 和 微 积 分 从 头 背 一 遍 再 写 代 码 我 保 证 你 还 没 见 到 神 经 网 络 的 影 子 就 转 行 去 考 公 了 深 度 学 习 的 最 佳 路 径 应 该 是 由 果 溯 因 的 降 维 打 击 别 不 信 不 少 初 到 咕 泡 有 比 较 好 知 识 底 子 的 学 员 都 是 用 这 种 自 顶 向 下 的 学 习 过 来 的 而 不 是 库 库 一 顿 死 磕 数 学", "source_text": "BTW,这篇内容的总体逻辑是泼盆冷水再递碗热汤...\n\n如果你打算先花半年把《线性代数》《概率论》和《微积分》从头背一遍再写代码,我保证你还没见到神经网络的影子就转行去考公了。\n\n深度学习的最佳路径,应该是:“由果溯因”的降维打击。别不信,不少初到咕泡有比较好知识底子的学员都是用这种自顶向下的学习过来的,而不是库库一顿死磕数学。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:BTW,这篇内容的总体逻辑是泼盆冷水再递碗热汤...", "source_line_range": [ 1, 6 ] }, { "id": "body-region-2", "text": "先 说 第 一 点 学 习 路 径 从 调 包 侠 到 炼 丹 师 很 多 大 佬 建 议 从 底 层 原 理 学 起 但 在 短 视 频 时 代 反 馈 周 期 太 长 就 是 自 杀 我 建 议 的 路 径 是 top down 自 顶 向 下 第 一 步 先 跑 通 一 个 手 写 数 字 识 别 mnist", "source_text": "先说第一点,学习路径:从“调包侠”到“炼丹师”\n\n很多大佬建议从底层原理学起,但在短视频时代,反馈周期太长就是自杀。我建议的路径是:Top-Down,自顶向下。\n\n第一步:先跑通一个“手写数字识别” (MNIST)", "segmentation_method": "reviewed_source_semantics", "label": "先说第一点,学习路径:从“调包侠”到“炼丹师”", "source_line_range": [ 7, 11 ] } ], "ending": { "text": "击。别不信,不少初到咕泡有比较好知识底子的学员都是用这种自顶向下的学习过来的,而不是库库一顿死磕数学。\n\n先说第一点,学习路径:从“调包侠”到“炼丹师”\n\n很多大佬建议从底层原理学起,但在短视频时代,反馈周期太长就是自杀。我建议的路径是:Top-Down,自顶向下。\n\n第一步:先跑通一个“手写数字识别” (MNIST)" } } }, { "id": "article-012", "name": "数字花园之问", "url": "https://sspai.com/post/80238", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "数字花园之问" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "爱吃草的熊" ] }, { "id": "stable-3", "alternatives": [ "共创" ] }, { "id": "stable-4", "alternatives": [ "PRIME" ] }, { "id": "stable-5", "alternatives": [ "Matrix" ] }, { "id": "stable-6", "alternatives": [ "栏目" ] }, { "id": "stable-7", "alternatives": [ "Pi Store" ] }, { "id": "stable-8", "alternatives": [ "知识管理" ] }, { "id": "stable-9", "alternatives": [ "讨论" ] }, { "id": "stable-11", "alternatives": [ "说点什么" ] }, { "id": "stable-12", "alternatives": [ "评论" ] }, { "id": "stable-13", "alternatives": [ "关联阅读" ] }, { "id": "stable-14", "alternatives": [ "下载 App" ] }, { "id": "stable-15", "alternatives": [ "联系我们" ] }, { "id": "stable-16", "alternatives": [ "商务合作" ] }, { "id": "stable-17", "alternatives": [ "关于我们" ] }, { "id": "stable-18", "alternatives": [ "用户协议" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The entire essay, initial quotation, two source hyperlinks and both named sections end before the category and charging controls. Initial DOM CSS and full-page screenshot confirm the final sentence and no collapsed body/wall. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "数字花园之问" ], "html_selector": "#article-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-012/comment-qualification-reference-r5.json", "sha256": "bbcefc0b10da69bbd6514bba78c34aeb6afe569a866861f98ad61a69391ee271", "chars": 758, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "本文受 404[[]]KIDS SEE GHOSTS 电报频道中的一篇推文启发所作。对于「数字花园」的定义,也引用原文:\n\n一般的数字花园(digital garden)并没有多少内涵定义,更像是你所有的数字资产,「外脑」东西的公开,作为供搜索的知识内容库。(而我并不愿意花太多时间在这种内容上)\n\n数字花园的由来,可见如下链接:\n原文链接:A Brief History & Ethos of the Digital Garden (maggieappleton.com)\n中文链接:数字花园的历史与精神 | A Brief History & Ethos of the Digital Garden (pmthinking.com)\n\n数字花园需要公开吗?\n\n现下很流行的一种说法是,公开的笔记可以被讨论,讨论的才有价值。但我想这恐怕也要来一次「知乎之问」:先问有没有,再问需要与否。\n这里提的有没有,是说公开的内容有没有讨论。我想但凡写过一两篇博客的朋友都有这种感觉,博客更多的时候还是“孤芳自赏”,偶有评论简直是一天中最值得开心的事情,如果评论还认同文中观点的,恐怕更是要「感激涕零」。在这个流量时代,除了「Tiago Forte」等屈指可数的效率达人,我们辛苦打理的「数字花园」又有何人会观看呢?\n沿着这个问题,我们不妨再来一个诛心之问:\n我们辛苦打理的花园值得他人参观吗?\n简单而论,数字花园与个人博客之间的最显眼区别就是多了关系图(graph),可是又有几人愿意观看我们那些可笑而不成熟的想法之间的关系呢?与其说我们这些园丁是抱着分享求指正的态度,倒不如说是抱着炫耀的态度,彷如一个幼童恰巧写了一个好字,便急不可耐的给周遭大人观看,全不知自己那一版字毫无美感可言。\n考虑到当前流行的笔记软件基本都要冠以「卡片笔记」之名,这里不妨也借用一下「Fleeting notes」等概念。时下流行数字花园中的内容,多的是 300 字以内的(毕竟是卡片)、摘录概念、原文为主的「Reference notes」;偶有只言片语记录感想的「Fleeting notes」,也遑论思想深度,大多只是喃喃自语,哲学家终究是极少数;「Permanent notes」大抵只占百分之一数,能让游客有兴趣看完的长文更是少之又少。\n到这里,我想大家应当明白,此文试图揭露「数字花园」中隐藏的一组矛盾:如果把一篇可堪阅读、稍微有点思想深度的文章视为花朵,那当今网络中 99%的数字花园都只开出那么一两朵,花园里更多的是充满个人特质的、读来摸不着的想法,这些想法或可视为种子或嫩芽。此时的数字花园,更像是一个小朋友一时兴起过家家时自己搭的花园,去让游客评论花园美不美,恐怕只有苦笑而已。\n\n新潮的自我欺骗\n\n数字花园是对个人博客的一次颠覆吗?我想不是的,不过是新潮的一种自我欺骗罢了:长文太难出,那就放一些 graph 上去吧。说不定有用呢?\n我去过苏州拙政园数次,每次游园都只能说是慕名而去,却很难看出园林中所谓的韵味。这自然是我的个人艺术与建筑素养太低,但我想游客中能真正欣赏拙政园,说出拙政园美在何处的,恐怕也是寥寥。\n对于数字花园而言,亦是如此。普罗大众的数字花园,看起来花朵、桥梁、溪流一应俱全,殊不知,大多数游客都只懂赏花,溪流也罢,桥梁也好,对游客而言绝不可能看出其他意义,花园好不好看,终究还是要看花美不美。更何况,不是每座园子都叫拙政园。\n而如果只看花,那所谓数字花园(个人博客 2.0),又与单纯的个人博客有甚区别呢?\n归根结底,值得被展示的,是作品,是文章,而不是笔记,不是你的喃喃碎语,不是你的思考过程。游客们从不在意我们是如何想的,只会看我们经过痛苦思考后的成品。\n思考本身是内敛的,本就是独一无二的个人专属,公开出来有何益处呢?\n雕琢数字花园之风可以休矣。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 3, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "本 文 受 404 kids see ghosts 电 报 频 道 中 的 一 篇 推 文 启 发 所 作 对 于 数 字 花 园 的 定 义 也 引 用 原 文 一 般 的 数 字 花 园 digital garden 并 没 有 多 少 内 涵 定 义 更 像 是 你 所 有 的 数 字 资 产 外 脑 东 西 的 公 开 作 为 供 搜 索 的 知 识 内 容 库 而 我 并 不 愿 意 花 太 多 时 间 在 这 种 内 容 上 数 字 花 园 的 由 来 可 见 如 下 链 接 原 文 链 接 a brief history ethos of the digital garden maggieappleton com 中 文 链 接 数 字 花 园 的 历 史 与 精 神 a brief history ethos of the digital garden pmthinking com", "source_text": "本文受 404[[]]KIDS SEE GHOSTS 电报频道中的一篇推文启发所作。对于「数字花园」的定义,也引用原文:\n\n一般的数字花园(digital garden)并没有多少内涵定义,更像是你所有的数字资产,「外脑」东西的公开,作为供搜索的知识内容库。(而我并不愿意花太多时间在这种内容上)\n\n数字花园的由来,可见如下链接:\n原文链接:A Brief History & Ethos of the Digital Garden (maggieappleton.com)\n中文链接:数字花园的历史与精神 | A Brief History & Ethos of the Digital Garden (pmthinking.com)", "segmentation_method": "reviewed_source_semantics", "label": "开篇:本文受 404[[]]KIDS SEE GHOSTS 电报频道中的一篇推文启发所作。对于「数字花园」的定义,也引用原文:", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "数 字 花 园 需 要 公 开 吗 现 下 很 流 行 的 一 种 说 法 是 公 开 的 笔 记 可 以 被 讨 论 讨 论 的 才 有 价 值 但 我 想 这 恐 怕 也 要 来 一 次 知 乎 之 问 先 问 有 没 有 再 问 需 要 与 否 这 里 提 的 有 没 有 是 说 公 开 的 内 容 有 没 有 讨 论 我 想 但 凡 写 过 一 两 篇 博 客 的 朋 友 都 有 这 种 感 觉 博 客 更 多 的 时 候 还 是 孤 芳 自 赏 偶 有 评 论 简 直 是 一 天 中 最 值 得 开 心 的 事 情 如 果 评 论 还 认 同 文 中 观 点 的 恐 怕 更 是 要 感 激 涕 零 在 这 个 流 量 时 代 除 了 tiago forte 等 屈 指 可 数 的 效 率 达 人 我 们 辛 苦 打 理 的 数 字 花 园 又 有 何 人 会 观 看 呢 沿 着 这 个 问 题 我 们 不 妨 再 来 一 个 诛 心 之 问 我 们 辛 苦 打 理 的 花 园 值 得 他 人 参 观 吗 简 单 而 论 数 字 花 园 与 个 人 博 客 之 间 的 最 显 眼 区 别 就 是 多 了 关 系 图 graph 可 是 又 有 几 人 愿 意 观 看 我 们 那 些 可 笑 而 不 成 熟 的 想 法 之 间 的 关 系 呢 与 其 说 我 们 这 些 园 丁 是 抱 着 分 享 求 指 正 的 态 度 倒 不 如 说 是 抱 着 炫 耀 的 态 度 彷 如 一 个 幼 童 恰 巧 写 了 一 个 好 字 便 急 不 可 耐 的 给 周 遭 大 人 观 看 全 不 知 自 己 那 一 版 字 毫 无 美 感 可 言 考 虑 到 当 前 流 行 的 笔 记 软 件 基 本 都 要 冠 以 卡 片 笔 记 之 名 这 里 不 妨 也 借 用 一 下 fleeting notes 等 概 念 时 下 流 行 数 字 花 园 中 的 内 容 多 的 是 300 字 以 内 的 毕 竟 是 卡 片 摘 录 概 念 原 文 为 主 的 reference notes 偶 有 只 言 片 语 记 录 感 想 的 fleeting notes 也 遑 论 思 想 深 度 大 多 只 是 喃 喃 自 语 哲 学 家 终 究 是 极 少 数 permanent notes 大 抵 只 占 百 分 之 一 数 能 让 游 客 有 兴 趣 看 完 的 长 文 更 是 少 之 又 少 到 这 里 我 想 大 家 应 当 明 白 此 文 试 图 揭 露 数 字 花 园 中 隐 藏 的 一 组 矛 盾 如 果 把 一 篇 可 堪 阅 读 稍 微 有 点 思 想 深 度 的 文 章 视 为 花 朵 那 当 今 网 络 中 99 的 数 字 花 园 都 只 开 出 那 么 一 两 朵 花 园 里 更 多 的 是 充 满 个 人 特 质 的 读 来 摸 不 着 的 想 法 这 些 想 法 或 可 视 为 种 子 或 嫩 芽 此 时 的 数 字 花 园 更 像 是 一 个 小 朋 友 一 时 兴 起 过 家 家 时 自 己 搭 的 花 园 去 让 游 客 评 论 花 园 美 不 美 恐 怕 只 有 苦 笑 而 已", "source_text": "数字花园需要公开吗?\n\n现下很流行的一种说法是,公开的笔记可以被讨论,讨论的才有价值。但我想这恐怕也要来一次「知乎之问」:先问有没有,再问需要与否。\n这里提的有没有,是说公开的内容有没有讨论。我想但凡写过一两篇博客的朋友都有这种感觉,博客更多的时候还是“孤芳自赏”,偶有评论简直是一天中最值得开心的事情,如果评论还认同文中观点的,恐怕更是要「感激涕零」。在这个流量时代,除了「Tiago Forte」等屈指可数的效率达人,我们辛苦打理的「数字花园」又有何人会观看呢?\n沿着这个问题,我们不妨再来一个诛心之问:\n我们辛苦打理的花园值得他人参观吗?\n简单而论,数字花园与个人博客之间的最显眼区别就是多了关系图(graph),可是又有几人愿意观看我们那些可笑而不成熟的想法之间的关系呢?与其说我们这些园丁是抱着分享求指正的态度,倒不如说是抱着炫耀的态度,彷如一个幼童恰巧写了一个好字,便急不可耐的给周遭大人观看,全不知自己那一版字毫无美感可言。\n考虑到当前流行的笔记软件基本都要冠以「卡片笔记」之名,这里不妨也借用一下「Fleeting notes」等概念。时下流行数字花园中的内容,多的是 300 字以内的(毕竟是卡片)、摘录概念、原文为主的「Reference notes」;偶有只言片语记录感想的「Fleeting notes」,也遑论思想深度,大多只是喃喃自语,哲学家终究是极少数;「Permanent notes」大抵只占百分之一数,能让游客有兴趣看完的长文更是少之又少。\n到这里,我想大家应当明白,此文试图揭露「数字花园」中隐藏的一组矛盾:如果把一篇可堪阅读、稍微有点思想深度的文章视为花朵,那当今网络中 99%的数字花园都只开出那么一两朵,花园里更多的是充满个人特质的、读来摸不着的想法,这些想法或可视为种子或嫩芽。此时的数字花园,更像是一个小朋友一时兴起过家家时自己搭的花园,去让游客评论花园美不美,恐怕只有苦笑而已。", "segmentation_method": "reviewed_source_semantics", "label": "数字花园需要公开吗?", "source_line_range": [ 9, 18 ] }, { "id": "body-region-3", "text": "新 潮 的 自 我 欺 骗 数 字 花 园 是 对 个 人 博 客 的 一 次 颠 覆 吗 我 想 不 是 的 不 过 是 新 潮 的 一 种 自 我 欺 骗 罢 了 长 文 太 难 出 那 就 放 一 些 graph 上 去 吧 说 不 定 有 用 呢 我 去 过 苏 州 拙 政 园 数 次 每 次 游 园 都 只 能 说 是 慕 名 而 去 却 很 难 看 出 园 林 中 所 谓 的 韵 味 这 自 然 是 我 的 个 人 艺 术 与 建 筑 素 养 太 低 但 我 想 游 客 中 能 真 正 欣 赏 拙 政 园 说 出 拙 政 园 美 在 何 处 的 恐 怕 也 是 寥 寥 对 于 数 字 花 园 而 言 亦 是 如 此 普 罗 大 众 的 数 字 花 园 看 起 来 花 朵 桥 梁 溪 流 一 应 俱 全 殊 不 知 大 多 数 游 客 都 只 懂 赏 花 溪 流 也 罢 桥 梁 也 好 对 游 客 而 言 绝 不 可 能 看 出 其 他 意 义 花 园 好 不 好 看 终 究 还 是 要 看 花 美 不 美 更 何 况 不 是 每 座 园 子 都 叫 拙 政 园 而 如 果 只 看 花 那 所 谓 数 字 花 园 个 人 博 客 2 0 又 与 单 纯 的 个 人 博 客 有 甚 区 别 呢 归 根 结 底 值 得 被 展 示 的 是 作 品 是 文 章 而 不 是 笔 记 不 是 你 的 喃 喃 碎 语 不 是 你 的 思 考 过 程 游 客 们 从 不 在 意 我 们 是 如 何 想 的 只 会 看 我 们 经 过 痛 苦 思 考 后 的 成 品 思 考 本 身 是 内 敛 的 本 就 是 独 一 无 二 的 个 人 专 属 公 开 出 来 有 何 益 处 呢 雕 琢 数 字 花 园 之 风 可 以 休 矣", "source_text": "新潮的自我欺骗\n\n数字花园是对个人博客的一次颠覆吗?我想不是的,不过是新潮的一种自我欺骗罢了:长文太难出,那就放一些 graph 上去吧。说不定有用呢?\n我去过苏州拙政园数次,每次游园都只能说是慕名而去,却很难看出园林中所谓的韵味。这自然是我的个人艺术与建筑素养太低,但我想游客中能真正欣赏拙政园,说出拙政园美在何处的,恐怕也是寥寥。\n对于数字花园而言,亦是如此。普罗大众的数字花园,看起来花朵、桥梁、溪流一应俱全,殊不知,大多数游客都只懂赏花,溪流也罢,桥梁也好,对游客而言绝不可能看出其他意义,花园好不好看,终究还是要看花美不美。更何况,不是每座园子都叫拙政园。\n而如果只看花,那所谓数字花园(个人博客 2.0),又与单纯的个人博客有甚区别呢?\n归根结底,值得被展示的,是作品,是文章,而不是笔记,不是你的喃喃碎语,不是你的思考过程。游客们从不在意我们是如何想的,只会看我们经过痛苦思考后的成品。\n思考本身是内敛的,本就是独一无二的个人专属,公开出来有何益处呢?\n雕琢数字花园之风可以休矣。", "segmentation_method": "reviewed_source_semantics", "label": "新潮的自我欺骗", "source_line_range": [ 19, 27 ] } ], "ending": { "text": "是笔记,不是你的喃喃碎语,不是你的思考过程。游客们从不在意我们是如何想的,只会看我们经过痛苦思考后的成品。\n思考本身是内敛的,本就是独一无二的个人专属,公开出来有何益处呢?\n雕琢数字花园之风可以休矣。" } } }, { "id": "article-013", "name": "建造你的数字小森林", "url": "https://sspai.com/post/81705", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "建造你的数字小森林" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Buerc" ] }, { "id": "stable-3", "alternatives": [ "共创" ] }, { "id": "stable-4", "alternatives": [ "PRIME" ] }, { "id": "stable-5", "alternatives": [ "Matrix" ] }, { "id": "stable-6", "alternatives": [ "栏目" ] }, { "id": "stable-7", "alternatives": [ "Pi Store" ] }, { "id": "stable-8", "alternatives": [ "讨论" ] }, { "id": "stable-10", "alternatives": [ "说点什么" ] }, { "id": "stable-11", "alternatives": [ "评论" ] }, { "id": "stable-12", "alternatives": [ "关联阅读" ] }, { "id": "stable-13", "alternatives": [ "下载 App" ] }, { "id": "stable-14", "alternatives": [ "联系我们" ] }, { "id": "stable-15", "alternatives": [ "商务合作" ] }, { "id": "stable-16", "alternatives": [ "关于我们" ] }, { "id": "stable-17", "alternatives": [ "用户协议" ] }, { "id": "stable-18", "alternatives": [ "效率21" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The full initial essay includes its opening quotation, all five named sections, concluding encouragement and final sentence, ending before category and charging controls. DOM and full-page screenshot show flowing complete content without overlay or expansion. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "建造你的数字小森林" ], "html_selector": "#article-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-013/comment-qualification-reference-r5.json", "sha256": "54babac6ad1416093451f4f571b6b619fb4ed4febbdf183b7f7e6c25fc7e9aaf", "chars": 758, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "囤积是人类的天性,不管是从食物还是从信息,这是自生物演化时代来基因促成的。而我们的记忆塑造,必须花费努力,才能真正的记忆。\n\n在信息爆炸的时代,我们每天都会接触到大量的信息。有些人会把感兴趣或有用的信息收藏起来,希望以后能够再次阅读或利用。但是也有些人认为这种行为是一种信息囤积症,会导致注意力分散、记忆混乱、效率低下。\n\n今天刚好看到一篇讲信息囤积的内容,大概讲如何如何不好,需要改正。正好我就有这里所谓的信息囤积症,所以突然就联想到了flomo的广告词,遂即改编了下:\n\n囤积信息不可怕,持续不断囤积,意义自然浮现。\n\n为什么我会这么想呢?市面上基本所有的文章都在批评囤积,我今天就来给我们人类的天性平反一下。我也将介绍一种用小森林来比喻的方法,来帮助我们有效地管理和利用我们的信息。最后,我将分享一些实践的技巧和工具,来让我们的知识小森林更加美丽和有价值。\n\n信息囤积是一种适应性行为\n\n我们为什么要囤积信息呢?其实这和松鼠囤积食物有相似之处。松鼠囤积食物是因为它们要应对不确定的环境变化,比如食物资源的不均匀分布和季节性的短缺。通过囤积食物,松鼠可以在寒冷的冬季保持温暖,延长生存时间。同时,也可以降低对有限食物资源的竞争压力。这是一种长期的适应策略,帮助它们提高生存和繁殖的机会。\n\n同样地,在信息爆炸的时代,我们也面临着不确定性和复杂性。我们无法预测未来会遇到什么问题,需要什么知识。因此,我们会倾向于收集和储存感兴趣或有用的信息,以备将来使用。这样做可以让我们在浩瀚的信息中找到自己需要的信息,增加自信和安全感,当然也更方便。\n\n为什么要断离舍?因为松鼠囤积的东西都是有用的食物,我们囤积信息也一样需要囤积有用的,这里的断离舍会比较前置,就是说你要去筛选信息,筛选信息的本领其实是日积月累训练出来的,如果一个相对会筛选的人,只需要看题目和大致浏览下内容基本就可以判断出文章质量了。现在除了人为筛选,AI同样可以帮助你筛选文章,断离舍开那些无用的信息,这样,我们就可以建立一个优质的信息库,为我们的知识小森林打下坚实的基础。\n\n小森林的种子 河流 篝火 金矿\n\n我就用小森林来比喻信息收集吧。在你囤积的每一个文章你把它当作是一粒种子,有些呢就是灌木,有些是树木,有些是花朵,有些呢是草,如果是杂草可能需要你找个除草机去清理下。\n\n为什么没有用花园的概念呢,主要觉得花园有点小,毕竟森林的资源更丰富,去创造一个自己的小森林想想都开心。一个森林的好坏取决于它的种子,所以我们希望在我们的知识花园里播种我们能找到的最有趣、最有洞察力、最有用的想法。 维护一个森林必然是不容易的,森林的形成是由简单到复杂,由低级到高级阶段发展的。在这个过程中,不同的生物群落不断适应环境,形成不同的植物和动物群落,最终达到平衡状态。所以一开始必然是简单的,需要时间去沉淀,不过建造\n\n小森林还是需要一些规划的。比如说你需要有一条河。你需要一个露营地,可以有一个篝火,旁边呢还有个矿,完美。 河流代表着你需要把信息流动起来,如何让信息流动起来呢?你可能还需要一个方法,最近在读打造第二大脑,里面提到的PARA的方法是一个看起来会解决这个问题的方法,待我去实践后再细说。信息流动的意思呢就是它可以让你随时能看到,随时能给你惊喜,意思就是随机回顾。\n\n篝火是什么意思呢?篝火的作用就是你需要对你的信息去淬炼,去火上烤一烤,去除杂质,让囤积的信息变为信息再到知识。然后你再去吃掉它。这个火其实就是你要不断的再去阅读,思考,记录。在这个环节中你不需要时时刻刻的想着要去烤火,而是你饥饿的时候才需要。\n\n金矿是什么?其实就是你已经消化了的知识,已经在你脑子里的知识体系,金矿的形成肯定非常非常复杂漫长,所以这里最重要的就是你需要做一个长期主义,这里的矿可能会是金矿也可能是钻石。构建知识体系是一个漫长的过程。\n\n这么去看一个小森林是不是还挺难建立的?其实也不然,我之前写过一篇文章就说,通过转发可以建立一个知识库,一个知识小森林。这里离不开体系搭建和AI的能力,还需要去摸索。\n\n你会(信息)营养过剩吗?\n\n囤积了这么多信息不会担心营养过剩吗?嗨,还需要担心这个?当然不会,在你的森林成长起来的时候,森林里会有很多树会长果子,花儿有蜂蜜产出,河流会有鱼出现。对这里就讲的是输出,当你在这庞大的体系中有这么多的精华出来,最好的就是把它收集起来,你可以自己吃,可以送人,可以展示,也可以把它卖掉,然后继续去建设小森林,知识售卖是这个森林必不可少的一个环节。\n\n所以这里如果有一个输出的动作你的知识体现就会自然流动,而且还会产生知识的复利。最简单的输出就是你可以发朋友圈,朋友圈不方便发就发即刻、发豆瓣、发推特等任何地方,这些都是可以让你的想法变为你的资产的一种方式。\n\n可持续的信息囤积\n\n如何囤积信息可持续?第一肯定是没什么压力,也不用担心稍后不读,不用担心以后没用,不用担心所有。你唯一要做的就是转发或者储藏起来。\n\n因为你刚刚遇到它,没有时间去思考它的最终目的,但更重要的是,因为强迫自己在每次捕捉到某样东西的时候做出决定,会给整个过程增加许多摩擦。这使得这种经历在精神上耗费精力,因此从一开始就不太可能发生好的结果。用一个简单的方法去做最简单的决策。\n\n简单来说就不要想太多笔记放什么地方,通过_PARA_来大致分类,当你决定深入研究这个话题并做一些阅读或研究时,你才会注意到它。把它放在档案里,除非你想,否则你永远不需要再看到它。PARA是《打造第二大脑》一书中提出的一种信息管理方法。\n\n请注意,我们必须尽量减少花在整理、标记、标记和维护数字笔记上的时间。我们不能冒着所有努力都白费的风险。当然我们更要注意的是,寻找阻力最小的路径,一步一个脚印地前进。不要把组织你的第二大脑变成另一个沉重的责任。\n\n给你的收藏来个小分类虽然有一定摩擦和阻力,但是会让你的信息是可持续的,不会被囤积的量击垮的。其实讲这么多就是为了让大家减少收集摩擦力。你的小森林有了生态才能更好的发展。\n\n囤积会幸福吗?\n\n针对人类的天性我相信会幸福,当然能做到幸福的前提也是需要真正的认识囤积带来的效果,如何去让囤积更有意义,如果让意义自然浮现。知识资产是指将来可以用来解决问题、节省时间、阐明概念或从过去的经验中学习的任何东西。所以你从大森林里捕捉到的信息放到小森林里面会让你的知识更加的聚焦。在未来AI的加持下,我相信小森林会是你最好的家园。\n\n去做一个快乐且幸福的小松鼠吧,在你自己的小森林愉快的玩耍。\n\n最后一句:创新和影响不是偶然发生的。创造力依赖于创造性的过程。可以体会下。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "囤 积 是 人 类 的 天 性 不 管 是 从 食 物 还 是 从 信 息 这 是 自 生 物 演 化 时 代 来 基 因 促 成 的 而 我 们 的 记 忆 塑 造 必 须 花 费 努 力 才 能 真 正 的 记 忆 在 信 息 爆 炸 的 时 代 我 们 每 天 都 会 接 触 到 大 量 的 信 息 有 些 人 会 把 感 兴 趣 或 有 用 的 信 息 收 藏 起 来 希 望 以 后 能 够 再 次 阅 读 或 利 用 但 是 也 有 些 人 认 为 这 种 行 为 是 一 种 信 息 囤 积 症 会 导 致 注 意 力 分 散 记 忆 混 乱 效 率 低 下 今 天 刚 好 看 到 一 篇 讲 信 息 囤 积 的 内 容 大 概 讲 如 何 如 何 不 好 需 要 改 正 正 好 我 就 有 这 里 所 谓 的 信 息 囤 积 症 所 以 突 然 就 联 想 到 了 flomo 的 广 告 词 遂 即 改 编 了 下 囤 积 信 息 不 可 怕 持 续 不 断 囤 积 意 义 自 然 浮 现 为 什 么 我 会 这 么 想 呢 市 面 上 基 本 所 有 的 文 章 都 在 批 评 囤 积 我 今 天 就 来 给 我 们 人 类 的 天 性 平 反 一 下 我 也 将 介 绍 一 种 用 小 森 林 来 比 喻 的 方 法 来 帮 助 我 们 有 效 地 管 理 和 利 用 我 们 的 信 息 最 后 我 将 分 享 一 些 实 践 的 技 巧 和 工 具 来 让 我 们 的 知 识 小 森 林 更 加 美 丽 和 有 价 值", "source_text": "囤积是人类的天性,不管是从食物还是从信息,这是自生物演化时代来基因促成的。而我们的记忆塑造,必须花费努力,才能真正的记忆。\n\n在信息爆炸的时代,我们每天都会接触到大量的信息。有些人会把感兴趣或有用的信息收藏起来,希望以后能够再次阅读或利用。但是也有些人认为这种行为是一种信息囤积症,会导致注意力分散、记忆混乱、效率低下。\n\n今天刚好看到一篇讲信息囤积的内容,大概讲如何如何不好,需要改正。正好我就有这里所谓的信息囤积症,所以突然就联想到了flomo的广告词,遂即改编了下:\n\n囤积信息不可怕,持续不断囤积,意义自然浮现。\n\n为什么我会这么想呢?市面上基本所有的文章都在批评囤积,我今天就来给我们人类的天性平反一下。我也将介绍一种用小森林来比喻的方法,来帮助我们有效地管理和利用我们的信息。最后,我将分享一些实践的技巧和工具,来让我们的知识小森林更加美丽和有价值。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:囤积是人类的天性,不管是从食物还是从信息,这是自生物演化时代来基因促成的。而我们的记忆塑造,必须花费努力,才能真正的记忆", "source_line_range": [ 1, 10 ] }, { "id": "body-region-2", "text": "信 息 囤 积 是 一 种 适 应 性 行 为 我 们 为 什 么 要 囤 积 信 息 呢 其 实 这 和 松 鼠 囤 积 食 物 有 相 似 之 处 松 鼠 囤 积 食 物 是 因 为 它 们 要 应 对 不 确 定 的 环 境 变 化 比 如 食 物 资 源 的 不 均 匀 分 布 和 季 节 性 的 短 缺 通 过 囤 积 食 物 松 鼠 可 以 在 寒 冷 的 冬 季 保 持 温 暖 延 长 生 存 时 间 同 时 也 可 以 降 低 对 有 限 食 物 资 源 的 竞 争 压 力 这 是 一 种 长 期 的 适 应 策 略 帮 助 它 们 提 高 生 存 和 繁 殖 的 机 会 同 样 地 在 信 息 爆 炸 的 时 代 我 们 也 面 临 着 不 确 定 性 和 复 杂 性 我 们 无 法 预 测 未 来 会 遇 到 什 么 问 题 需 要 什 么 知 识 因 此 我 们 会 倾 向 于 收 集 和 储 存 感 兴 趣 或 有 用 的 信 息 以 备 将 来 使 用 这 样 做 可 以 让 我 们 在 浩 瀚 的 信 息 中 找 到 自 己 需 要 的 信 息 增 加 自 信 和 安 全 感 当 然 也 更 方 便 为 什 么 要 断 离 舍 因 为 松 鼠 囤 积 的 东 西 都 是 有 用 的 食 物 我 们 囤 积 信 息 也 一 样 需 要 囤 积 有 用 的 这 里 的 断 离 舍 会 比 较 前 置 就 是 说 你 要 去 筛 选 信 息 筛 选 信 息 的 本 领 其 实 是 日 积 月 累 训 练 出 来 的 如 果 一 个 相 对 会 筛 选 的 人 只 需 要 看 题 目 和 大 致 浏 览 下 内 容 基 本 就 可 以 判 断 出 文 章 质 量 了 现 在 除 了 人 为 筛 选 ai 同 样 可 以 帮 助 你 筛 选 文 章 断 离 舍 开 那 些 无 用 的 信 息 这 样 我 们 就 可 以 建 立 一 个 优 质 的 信 息 库 为 我 们 的 知 识 小 森 林 打 下 坚 实 的 基 础", "source_text": "信息囤积是一种适应性行为\n\n我们为什么要囤积信息呢?其实这和松鼠囤积食物有相似之处。松鼠囤积食物是因为它们要应对不确定的环境变化,比如食物资源的不均匀分布和季节性的短缺。通过囤积食物,松鼠可以在寒冷的冬季保持温暖,延长生存时间。同时,也可以降低对有限食物资源的竞争压力。这是一种长期的适应策略,帮助它们提高生存和繁殖的机会。\n\n同样地,在信息爆炸的时代,我们也面临着不确定性和复杂性。我们无法预测未来会遇到什么问题,需要什么知识。因此,我们会倾向于收集和储存感兴趣或有用的信息,以备将来使用。这样做可以让我们在浩瀚的信息中找到自己需要的信息,增加自信和安全感,当然也更方便。\n\n为什么要断离舍?因为松鼠囤积的东西都是有用的食物,我们囤积信息也一样需要囤积有用的,这里的断离舍会比较前置,就是说你要去筛选信息,筛选信息的本领其实是日积月累训练出来的,如果一个相对会筛选的人,只需要看题目和大致浏览下内容基本就可以判断出文章质量了。现在除了人为筛选,AI同样可以帮助你筛选文章,断离舍开那些无用的信息,这样,我们就可以建立一个优质的信息库,为我们的知识小森林打下坚实的基础。", "segmentation_method": "reviewed_source_semantics", "label": "信息囤积是一种适应性行为", "source_line_range": [ 11, 18 ] }, { "id": "body-region-3", "text": "小 森 林 的 种 子 河 流 篝 火 金 矿 我 就 用 小 森 林 来 比 喻 信 息 收 集 吧 在 你 囤 积 的 每 一 个 文 章 你 把 它 当 作 是 一 粒 种 子 有 些 呢 就 是 灌 木 有 些 是 树 木 有 些 是 花 朵 有 些 呢 是 草 如 果 是 杂 草 可 能 需 要 你 找 个 除 草 机 去 清 理 下 为 什 么 没 有 用 花 园 的 概 念 呢 主 要 觉 得 花 园 有 点 小 毕 竟 森 林 的 资 源 更 丰 富 去 创 造 一 个 自 己 的 小 森 林 想 想 都 开 心 一 个 森 林 的 好 坏 取 决 于 它 的 种 子 所 以 我 们 希 望 在 我 们 的 知 识 花 园 里 播 种 我 们 能 找 到 的 最 有 趣 最 有 洞 察 力 最 有 用 的 想 法 维 护 一 个 森 林 必 然 是 不 容 易 的 森 林 的 形 成 是 由 简 单 到 复 杂 由 低 级 到 高 级 阶 段 发 展 的 在 这 个 过 程 中 不 同 的 生 物 群 落 不 断 适 应 环 境 形 成 不 同 的 植 物 和 动 物 群 落 最 终 达 到 平 衡 状 态 所 以 一 开 始 必 然 是 简 单 的 需 要 时 间 去 沉 淀 不 过 建 造 小 森 林 还 是 需 要 一 些 规 划 的 比 如 说 你 需 要 有 一 条 河 你 需 要 一 个 露 营 地 可 以 有 一 个 篝 火 旁 边 呢 还 有 个 矿 完 美 河 流 代 表 着 你 需 要 把 信 息 流 动 起 来 如 何 让 信 息 流 动 起 来 呢 你 可 能 还 需 要 一 个 方 法 最 近 在 读 打 造 第 二 大 脑 里 面 提 到 的 para 的 方 法 是 一 个 看 起 来 会 解 决 这 个 问 题 的 方 法 待 我 去 实 践 后 再 细 说 信 息 流 动 的 意 思 呢 就 是 它 可 以 让 你 随 时 能 看 到 随 时 能 给 你 惊 喜 意 思 就 是 随 机 回 顾 篝 火 是 什 么 意 思 呢 篝 火 的 作 用 就 是 你 需 要 对 你 的 信 息 去 淬 炼 去 火 上 烤 一 烤 去 除 杂 质 让 囤 积 的 信 息 变 为 信 息 再 到 知 识 然 后 你 再 去 吃 掉 它 这 个 火 其 实 就 是 你 要 不 断 的 再 去 阅 读 思 考 记 录 在 这 个 环 节 中 你 不 需 要 时 时 刻 刻 的 想 着 要 去 烤 火 而 是 你 饥 饿 的 时 候 才 需 要 金 矿 是 什 么 其 实 就 是 你 已 经 消 化 了 的 知 识 已 经 在 你 脑 子 里 的 知 识 体 系 金 矿 的 形 成 肯 定 非 常 非 常 复 杂 漫 长 所 以 这 里 最 重 要 的 就 是 你 需 要 做 一 个 长 期 主 义 这 里 的 矿 可 能 会 是 金 矿 也 可 能 是 钻 石 构 建 知 识 体 系 是 一 个 漫 长 的 过 程 这 么 去 看 一 个 小 森 林 是 不 是 还 挺 难 建 立 的 其 实 也 不 然 我 之 前 写 过 一 篇 文 章 就 说 通 过 转 发 可 以 建 立 一 个 知 识 库 一 个 知 识 小 森 林 这 里 离 不 开 体 系 搭 建 和 ai 的 能 力 还 需 要 去 摸 索", "source_text": "小森林的种子 河流 篝火 金矿\n\n我就用小森林来比喻信息收集吧。在你囤积的每一个文章你把它当作是一粒种子,有些呢就是灌木,有些是树木,有些是花朵,有些呢是草,如果是杂草可能需要你找个除草机去清理下。\n\n为什么没有用花园的概念呢,主要觉得花园有点小,毕竟森林的资源更丰富,去创造一个自己的小森林想想都开心。一个森林的好坏取决于它的种子,所以我们希望在我们的知识花园里播种我们能找到的最有趣、最有洞察力、最有用的想法。 维护一个森林必然是不容易的,森林的形成是由简单到复杂,由低级到高级阶段发展的。在这个过程中,不同的生物群落不断适应环境,形成不同的植物和动物群落,最终达到平衡状态。所以一开始必然是简单的,需要时间去沉淀,不过建造\n\n小森林还是需要一些规划的。比如说你需要有一条河。你需要一个露营地,可以有一个篝火,旁边呢还有个矿,完美。 河流代表着你需要把信息流动起来,如何让信息流动起来呢?你可能还需要一个方法,最近在读打造第二大脑,里面提到的PARA的方法是一个看起来会解决这个问题的方法,待我去实践后再细说。信息流动的意思呢就是它可以让你随时能看到,随时能给你惊喜,意思就是随机回顾。\n\n篝火是什么意思呢?篝火的作用就是你需要对你的信息去淬炼,去火上烤一烤,去除杂质,让囤积的信息变为信息再到知识。然后你再去吃掉它。这个火其实就是你要不断的再去阅读,思考,记录。在这个环节中你不需要时时刻刻的想着要去烤火,而是你饥饿的时候才需要。\n\n金矿是什么?其实就是你已经消化了的知识,已经在你脑子里的知识体系,金矿的形成肯定非常非常复杂漫长,所以这里最重要的就是你需要做一个长期主义,这里的矿可能会是金矿也可能是钻石。构建知识体系是一个漫长的过程。\n\n这么去看一个小森林是不是还挺难建立的?其实也不然,我之前写过一篇文章就说,通过转发可以建立一个知识库,一个知识小森林。这里离不开体系搭建和AI的能力,还需要去摸索。", "segmentation_method": "reviewed_source_semantics", "label": "小森林的种子 河流 篝火 金矿", "source_line_range": [ 19, 32 ] }, { "id": "body-region-4", "text": "你 会 信 息 营 养 过 剩 吗 囤 积 了 这 么 多 信 息 不 会 担 心 营 养 过 剩 吗 嗨 还 需 要 担 心 这 个 当 然 不 会 在 你 的 森 林 成 长 起 来 的 时 候 森 林 里 会 有 很 多 树 会 长 果 子 花 儿 有 蜂 蜜 产 出 河 流 会 有 鱼 出 现 对 这 里 就 讲 的 是 输 出 当 你 在 这 庞 大 的 体 系 中 有 这 么 多 的 精 华 出 来 最 好 的 就 是 把 它 收 集 起 来 你 可 以 自 己 吃 可 以 送 人 可 以 展 示 也 可 以 把 它 卖 掉 然 后 继 续 去 建 设 小 森 林 知 识 售 卖 是 这 个 森 林 必 不 可 少 的 一 个 环 节 所 以 这 里 如 果 有 一 个 输 出 的 动 作 你 的 知 识 体 现 就 会 自 然 流 动 而 且 还 会 产 生 知 识 的 复 利 最 简 单 的 输 出 就 是 你 可 以 发 朋 友 圈 朋 友 圈 不 方 便 发 就 发 即 刻 发 豆 瓣 发 推 特 等 任 何 地 方 这 些 都 是 可 以 让 你 的 想 法 变 为 你 的 资 产 的 一 种 方 式", "source_text": "你会(信息)营养过剩吗?\n\n囤积了这么多信息不会担心营养过剩吗?嗨,还需要担心这个?当然不会,在你的森林成长起来的时候,森林里会有很多树会长果子,花儿有蜂蜜产出,河流会有鱼出现。对这里就讲的是输出,当你在这庞大的体系中有这么多的精华出来,最好的就是把它收集起来,你可以自己吃,可以送人,可以展示,也可以把它卖掉,然后继续去建设小森林,知识售卖是这个森林必不可少的一个环节。\n\n所以这里如果有一个输出的动作你的知识体现就会自然流动,而且还会产生知识的复利。最简单的输出就是你可以发朋友圈,朋友圈不方便发就发即刻、发豆瓣、发推特等任何地方,这些都是可以让你的想法变为你的资产的一种方式。", "segmentation_method": "reviewed_source_semantics", "label": "你会(信息)营养过剩吗?", "source_line_range": [ 33, 38 ] }, { "id": "body-region-5", "text": "可 持 续 的 信 息 囤 积 如 何 囤 积 信 息 可 持 续 第 一 肯 定 是 没 什 么 压 力 也 不 用 担 心 稍 后 不 读 不 用 担 心 以 后 没 用 不 用 担 心 所 有 你 唯 一 要 做 的 就 是 转 发 或 者 储 藏 起 来 因 为 你 刚 刚 遇 到 它 没 有 时 间 去 思 考 它 的 最 终 目 的 但 更 重 要 的 是 因 为 强 迫 自 己 在 每 次 捕 捉 到 某 样 东 西 的 时 候 做 出 决 定 会 给 整 个 过 程 增 加 许 多 摩 擦 这 使 得 这 种 经 历 在 精 神 上 耗 费 精 力 因 此 从 一 开 始 就 不 太 可 能 发 生 好 的 结 果 用 一 个 简 单 的 方 法 去 做 最 简 单 的 决 策 简 单 来 说 就 不 要 想 太 多 笔 记 放 什 么 地 方 通 过 para 来 大 致 分 类 当 你 决 定 深 入 研 究 这 个 话 题 并 做 一 些 阅 读 或 研 究 时 你 才 会 注 意 到 它 把 它 放 在 档 案 里 除 非 你 想 否 则 你 永 远 不 需 要 再 看 到 它 para 是 打 造 第 二 大 脑 一 书 中 提 出 的 一 种 信 息 管 理 方 法 请 注 意 我 们 必 须 尽 量 减 少 花 在 整 理 标 记 标 记 和 维 护 数 字 笔 记 上 的 时 间 我 们 不 能 冒 着 所 有 努 力 都 白 费 的 风 险 当 然 我 们 更 要 注 意 的 是 寻 找 阻 力 最 小 的 路 径 一 步 一 个 脚 印 地 前 进 不 要 把 组 织 你 的 第 二 大 脑 变 成 另 一 个 沉 重 的 责 任 给 你 的 收 藏 来 个 小 分 类 虽 然 有 一 定 摩 擦 和 阻 力 但 是 会 让 你 的 信 息 是 可 持 续 的 不 会 被 囤 积 的 量 击 垮 的 其 实 讲 这 么 多 就 是 为 了 让 大 家 减 少 收 集 摩 擦 力 你 的 小 森 林 有 了 生 态 才 能 更 好 的 发 展 囤 积 会 幸 福 吗 针 对 人 类 的 天 性 我 相 信 会 幸 福 当 然 能 做 到 幸 福 的 前 提 也 是 需 要 真 正 的 认 识 囤 积 带 来 的 效 果 如 何 去 让 囤 积 更 有 意 义 如 果 让 意 义 自 然 浮 现 知 识 资 产 是 指 将 来 可 以 用 来 解 决 问 题 节 省 时 间 阐 明 概 念 或 从 过 去 的 经 验 中 学 习 的 任 何 东 西 所 以 你 从 大 森 林 里 捕 捉 到 的 信 息 放 到 小 森 林 里 面 会 让 你 的 知 识 更 加 的 聚 焦 在 未 来 ai 的 加 持 下 我 相 信 小 森 林 会 是 你 最 好 的 家 园 去 做 一 个 快 乐 且 幸 福 的 小 松 鼠 吧 在 你 自 己 的 小 森 林 愉 快 的 玩 耍 最 后 一 句 创 新 和 影 响 不 是 偶 然 发 生 的 创 造 力 依 赖 于 创 造 性 的 过 程 可 以 体 会 下", "source_text": "可持续的信息囤积\n\n如何囤积信息可持续?第一肯定是没什么压力,也不用担心稍后不读,不用担心以后没用,不用担心所有。你唯一要做的就是转发或者储藏起来。\n\n因为你刚刚遇到它,没有时间去思考它的最终目的,但更重要的是,因为强迫自己在每次捕捉到某样东西的时候做出决定,会给整个过程增加许多摩擦。这使得这种经历在精神上耗费精力,因此从一开始就不太可能发生好的结果。用一个简单的方法去做最简单的决策。\n\n简单来说就不要想太多笔记放什么地方,通过_PARA_来大致分类,当你决定深入研究这个话题并做一些阅读或研究时,你才会注意到它。把它放在档案里,除非你想,否则你永远不需要再看到它。PARA是《打造第二大脑》一书中提出的一种信息管理方法。\n\n请注意,我们必须尽量减少花在整理、标记、标记和维护数字笔记上的时间。我们不能冒着所有努力都白费的风险。当然我们更要注意的是,寻找阻力最小的路径,一步一个脚印地前进。不要把组织你的第二大脑变成另一个沉重的责任。\n\n给你的收藏来个小分类虽然有一定摩擦和阻力,但是会让你的信息是可持续的,不会被囤积的量击垮的。其实讲这么多就是为了让大家减少收集摩擦力。你的小森林有了生态才能更好的发展。\n\n囤积会幸福吗?\n\n针对人类的天性我相信会幸福,当然能做到幸福的前提也是需要真正的认识囤积带来的效果,如何去让囤积更有意义,如果让意义自然浮现。知识资产是指将来可以用来解决问题、节省时间、阐明概念或从过去的经验中学习的任何东西。所以你从大森林里捕捉到的信息放到小森林里面会让你的知识更加的聚焦。在未来AI的加持下,我相信小森林会是你最好的家园。\n\n去做一个快乐且幸福的小松鼠吧,在你自己的小森林愉快的玩耍。\n\n最后一句:创新和影响不是偶然发生的。创造力依赖于创造性的过程。可以体会下。", "segmentation_method": "reviewed_source_semantics", "label": "可持续的信息囤积 — 囤积会幸福吗?", "source_line_range": [ 39, 57 ] } ], "ending": { "text": "加的聚焦。在未来AI的加持下,我相信小森林会是你最好的家园。\n\n去做一个快乐且幸福的小松鼠吧,在你自己的小森林愉快的玩耍。\n\n最后一句:创新和影响不是偶然发生的。创造力依赖于创造性的过程。可以体会下。" } } }, { "id": "article-014", "name": "javascript事件循环(浏览器/node)", "url": "https://juejin.cn/post/6844903734036676622", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "javascript事件循环\\(浏览器/node\\)" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "iamswf" ] }, { "id": "stable-3", "alternatives": [ "首页" ] }, { "id": "stable-4", "alternatives": [ "沸点" ] }, { "id": "stable-5", "alternatives": [ "课程" ] }, { "id": "stable-6", "alternatives": [ "APP" ] }, { "id": "stable-7", "alternatives": [ "AI用量" ] }, { "id": "stable-8", "alternatives": [ "作品广场" ] }, { "id": "stable-9", "alternatives": [ "专家标注" ] }, { "id": "stable-10", "alternatives": [ "创作者中心" ] }, { "id": "stable-11", "alternatives": [ "登录" ] }, { "id": "stable-12", "alternatives": [ "注册" ] }, { "id": "stable-13", "alternatives": [ "关注" ] }, { "id": "stable-14", "alternatives": [ "私信" ] }, { "id": "stable-15", "alternatives": [ "目录" ] }, { "id": "stable-16", "alternatives": [ "收起" ] }, { "id": "stable-17", "alternatives": [ "相关推荐" ] }, { "id": "stable-18", "alternatives": [ "精选内容" ] }, { "id": "stable-19", "alternatives": [ "为你推荐" ] }, { "id": "stable-21", "alternatives": [ "更多" ] }, { "id": "stable-22", "alternatives": [ "标签" ] }, { "id": "stable-23", "alternatives": [ "JavaScript" ] }, { "id": "stable-24", "alternatives": [ "代码解读" ] }, { "id": "stable-25", "alternatives": [ "复制代码" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete #article-root body includes browser and Node explanation, all demonstrations and outputs, and nine reference links. Initial viewport plus middle/end screenshots confirm ordinary readable code and article end before site recommendations; no expansion or wall applies. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "javascript事件循环(浏览器/node)" ], "html_selector": "h1.article-title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": ".comment-card.comment-item", "author_selector": ".comment-header .username .name", "body_selector": ".comment-content > .content", "id_attribute": "data-cid", "section_markers": [ "评论" ], "version": 2, "minimum_comments": 3, "text_scope": { "body_end": "eJS Event Loop Part 4\nEvent Loop Best Practices — NodeJS Event Loop Part 5\nUsing requestIdleCallback", "end_markers": [ "加个关注,精彩更新不错过~", "相关推荐" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-014/comment-qualification-reference-r5.json", "sha256": "f6cc8e64e6cdce265d370f4669f62df24821d9a8eeee2526f353c511778d2927", "chars": 3099, "record_count": 3 }, "comment_presence_review": { "status": "visible_text", "basis": "Three default visible comment prefixes qualify; clamped continuation excluded. Saved visible-boundary evidence supplies only the already visible prefix.", "observed_record_count": 3, "qualification_only": true } }, "ground_truth_main_content": "为什么要了解js中的事件循环\n\njavascript是一种基于事件的单线程、异步、非阻塞编程语言,我经常在看书或者浏览别人博客的时候看到这种说法,可是之前一直没有深入理解过,只知道javascript中经常使用各种回调函数,比如浏览器端的各种事件回调(点击事件、滚动事件等)、ajax请求回调、setTimeout回调以及react16的内核fiber中用到的requestAnimationFrame、promise回调、node端fs模块异步读取文件内容回调、process模块的nextTick等等。最近有时间浏览了各种资料(后面有各种相关资料的链接),终于明白所有的这些内容其实都离不开javascript事件循环,而浏览器端的事件循环又与node端的事件循环有较大区别,下面分别介绍下。\n\n浏览器 vs node\n\n自从有了node,javascript既可以运行在浏览器端又可以运行在服务端,以chrome浏览器为例,相同点是都基于v8引擎,不同的是浏览器端实现了页面渲染、而node端则提供了一些服务端会用到的特性,比如fs、process等模块,同时node端为了实现跨平台,底层使用libuv来兼容linux、windows、 macOS三大操作系统。因此虽然都实现了javascript的异步、非阻塞特性,但是却有有不少不同之处。\n\n浏览器端\n\n无论是在浏览器端还是node端,线程入口都是一个javascript脚本文件,整个脚本文件从第一行开始到最后运行完成可以看作是一个entry task,即初始化任务,下图task中第一项即为该过程。初始化过程中肯定会注册不少异步事件,比如常见的setTimeout、onClick、promise等,这些异步事件执行中又有可能注册更多异步事件。所有的这些异步任务都是在事件循环一次次的循环中得到执行,而这些异步任务又可以分为两大类,即microtask和task(或macrotask)。那么一次事件循环中会执行多少个异步任务?microtask和task的执行先后顺序是什么呢?看下图。\n\n先忽略图中的红色部分(渲染过程,后面再介绍),顺时针方向即为事件循环方向,可以看出每次循环会先后执行两类任务,task和microtask,每一类任务都由一个队列组成,其中task主要包括如下几类任务:\n\nindex.js(entry)\nsetTimeout\nsetInterval\n网络I/O\n\n而microtask主要包括:\n\npromise\nMutationObserver\n\n因此microtask的执行事件结点是在两次task执行间隙。前面说了,每类任务都由一个队列组成,这其实是一种生产者-消费者模型,事件的注册过程即为任务生产过程,任务的执行过程即为事件的消费过程。那么每次轮到一类任务执行各个队列会出队多少个任务来执行呢?图中我已经标明,task队列每次出队一项任务来执行,执行完成之后开始执行microtask;而microtask则每次都把所有(包括当前microtask执行过程中新添加的任务)任务执行完成,然后才会继续执行task。也就是说,即便microtask是异步任务,也不能无节制的注册,否则会阻塞task和页面渲染的执行。比如,下面的这段代码中的setTimeout回调任务将永远得不到执行(注意,谨慎运行这段代码,浏览器可能卡死):\n\n代码解读\n复制代码\nsetTimeout(() => {\n console.log('run setTimout callback');\n}, 0);\n\nfunction promiseLoop() {\n console.log('run promise callback');\n return Promise.resolve().then(() => {\n return promiseLoop();\n });\n}\n\npromiseLoop();\n\n\n现在回过头来再看上图中的粉红色虚线部分,该过程表示的是浏览器渲染过程,比如dom元素的style、layout以及position这些渲染,那为什么用虚线表示呢?是因为该部分的调度是由浏览器控制,而且是以60HZ的频率调度,之所以是60HZ是为了能满足人眼视觉效果的同时尽量低频的调度,如果浏览器一刻不停的频繁渲染,那么不仅人眼观察不到界面的变化效果(就如同夏天电扇转太快人眼分辨不出来),而且耗费计算资源。因此上图中渲染过程用虚线表示不一定每次事件循环都会执行渲染过程。\n\n仔细看虚线框起来的渲染过程,可以看到在执行渲染之前可以执行一个回调函数requestAnimationFrame,执行渲染之后可以执行一个回调函数requestIdleCallback。使用这两个钩子函数注册的回调函数同task回调和microtask回调一样,会进入专属的事件队列,但是这两个钩子函数与setTimeout不一样,不是为了在4ms,16ms或1s之后再执行,而是在下一次页面渲染阶段去执行,具体来说是requestAnimationFrame在style和layout计算之前执行,requestIdleCallback则是在变更真正渲染到页面后执行。\n\nrequestAnimationFrame比setTimeout更适合做动画,这里有个例子可以参考:jsfiddle.net/H7EEE/245/。效果如下图所示,可以看出requestAnimationFrame比setTimeout动画效果更加流畅。\n\n而requestIdleCallback则是在每一渲染贞后的空闲时间去完成回调任务,因此一般用于一些低优先级的任务调度,比如react16则使用了该钩子函数实现异步reconcilation算法以保证页面性能,当然由于requestIdleCallback是比较新的API,react团队实现了pollyfill,注意是目前是使用requestAnimationFrame实现的哦。\n\n现在总结一下浏览器端的事件队列,共包括四个事件队列:task队列、requestAnimationFrame队列、requestIdleCallback队列以及microtask队列,javascript脚本加载完成后首先执行第一个task队列任务,即初始化任务,然后执行所有microtask队列任务,接着再次执行第二个task队列任务,以此类推,这其中穿插着60HZ的渲染过程。先执行谁后执行谁现在了解清楚了,可是到每个事件队列执行的轮次时,分别会有多少个事件出队执行呢?答案见下图(截图自Jake Archibald大神的JSConf演讲视频):\n\n可以看出,在一次事件循环中:普通task每次出队一项回调函数去执行,requestAnimationFrame每次出队所有当前队列的回调函数去执行(requestIdleCallback一样),microtask每次出队所有当前队列的回调函数以及自己轮次执行过程中又新增到队尾的回调函数。这三种不同的调度方式正好覆盖了所有场景。\n\n实践一下\ndemo1: 对比index.js、promise、setTimeout的执行先后顺序\n代码解读\n复制代码\nconsole.log('script start');\n\nsetTimeout(function () {\n console.log('setTimeout');\n}, 0);\n\nnew Promise(function (resolve) {\n console.log('promise1.1');\n resolve();\n}).then(function () {\n console.log('promise1.2');\n}).then(function () {\n console.log('promise1.3');\n}).then(function () {\n console.log('promise1.4');\n});\n\nnew Promise(function (resolve) {\n console.log('promise2.1');\n resolve();\n}).then(function () {\n console.log('promise2.2');\n}).then(function () {\n console.log('promise2.3');\n}).then(function () {\n console.log('promise2.4');\n});\n\nconsole.log('script end');\n\n\n这段代码的输入如下:\n\n代码解读\n复制代码\nscript start\npromise1.1\npromise2.1\nscript end\npromise1.2\npromise2.2\npromise1.3\npromise2.3\npromise1.4\npromise2.4\nsetTimeout\n\n\n按照前面的事件循环示例图,按照如下顺序执行:\n\n执行task(index.js); 这里包括四项输出:script start、promise1.1、promise2.1、script end。其中需要留意promise1.1和promise2.1,因为new Promise中resolve()调用之前也是同步代码,因此也会同步执行。\n执行microtask; 这里需要留意microtask会边执行边生成新的添加到事件队列队尾,因此执行完所有microtask才重新进入事件循环开始下一项。\n执行task(setTimeout); 根据前面的示例图,这里又轮到了task的执行,只不过这次是setTimout。\nnode端\n\n前面介绍了下浏览器端的事件循环,涉及到task和microtask,其实node端的异步任务也包括这些,只不过node端的task划分的更细,如下图所示,node端的task可以分为4类任务队列:\n\nindex.js(entry)、setTimeout、setInterval\n网络I/O、fs(disk)、child_process\nsetImmediate\nclose事件\n\n而microtask包括:\n\nprocess.nextTick\npromise\n开始后会首先执行注册过的所有microtask,然后会依次执行该4类task队列。而每执行完一个task队列就会接着执行microtask队列,然后再接着执行下一个task队列。因此microtask队列的执行是穿插在各个类形的task之间的,当然也可以。 node端与浏览器端事件循环的一个很重要的不同点是,浏览器端task队列每轮事件循环仅出队一个回调函数去执行接着去执行microtask,而node端只要轮到执行task,则会跟执行完队列中的所有当前任务,但是当前轮次新添加到队尾的任务则会等到下一轮次才会执行,该机制与浏览器端的requestAnimationFrame的调度机制时一样的。 总结一下node端的事件循环,共包括4类task事件队列与2类microtask事件队列,microtask穿插在task之间执行。task每次轮到执行会将当前队列中的所有回调函数出队执行,而microtask的调度机制则与浏览器端一样,每次轮到执行都会出队所有当前队列的回调函数以及自己轮次执行过程中又新增到队尾的回调函数去执行。与浏览器端不一样的是node端的microtask包括process.nextTick和promise两类。\n实践一下\ndemo1: 对比promise与setTimeout的执行顺序\n代码解读\n复制代码\nconsole.log('main');\nsetTimeout(function () {\n console.log('execute in first timeout');\n Promise.resolve(3).then(res => {\n console.log('execute in third promise');\n });\n}, 0);\nsetTimeout(function () {\n console.log('execute in second timeout');\n Promise.resolve(4).then(res => {\n console.log('execute in fourth promise');\n });\n}, 0);\nPromise.resolve(1).then(res => {\n console.log('execute in first promise');\n});\nPromise.resolve(2).then(res => {\n console.log('execute in second promise');\n});\n\n\n前面这段代码的输出结果如下:\n\n代码解读\n复制代码\nmain\nexecute in first promise\nexecute in second promise\nexecute in first timeout\nexecute in second timeout\nexecute in third promise\nexecute in fourth promise\n\n\n执行顺序如下:\n\nindex.js(主程序代码main);\nmicrotask(promise1, promise2);\ntask(setTimeout1, setTimeout2);\nmicrotask(promise3, promise4);\n\n这个执行顺序与之前画的图完全对应。\n\ndemo2: 对比index.js、promise、async await、setTimeout的执行先后顺序\n代码解读\n复制代码\nconsole.log('script start');\n\nasync function async1() {\n console.log('async1 start');\n await async2();\n console.log('async1 end');\n}\n\nasync function async2() {\n console.log('entry async2');\n return Promise.resolve();\n}\n\nsetTimeout(function () {\n console.log('setTimeout');\n}, 0);\n\nasync1();\n\nnew Promise(function (resolve) {\n console.log('promise1');\n resolve();\n}).then(function () {\n console.log('promise2');\n}).then(function () {\n console.log('promise3');\n}).then(function () {\n console.log('promise4');\n}).then(function () {\n console.log('promise5');\n}).then(function () {\n console.log('promise6');\n});\n\nconsole.log('script end');\n\n\n这段代码在node10环境的执行结果如下:\n\n代码解读\n复制代码\nscript start\nasync1 start\nentry async2\npromise1\nscript end\npromise2\npromise3\npromise4\nasync1 end\npromise5\npromise6\nsetTimeout\n\n\n注意我这里强调了是node10环境,是因为node8和node9下面async await有bug,而node10中得到了修复,详情可以参考这篇文章:Faster async functions and promises。下面按照前面的事件循环示例图分析下前面这段代码的执行结果:\n\n执行task(index.js); 这里包括5项输出:script start、async1 start、entry async2、promise1、script end。这里要注意async函数中第一个await之前执行的代码也是同步代码,因此会打印出scync1 start以及entry async2。\n执行microtask; 这里打印了所有剩下的promise以及一个位于await后的语句async1 end。打印这个集合肯定是没问题的,但是问题是为什么async1 end会比promise延迟3个呢? 这个问题是这段代码最难懂的地方,答案在刚刚提到的那篇文章中:每个await需要至少3个microtask queue ticks,因此这里async1 end的打印相对于promise晚打印了3个tick。其实通过这里例子我们也应该的出一个结论,就是最要不要把promise和async await混用,否则容易时序混乱。\n执行task(setTimeout)。 根据前面的示例图,这里又轮到了task的执行,只不过这次是setTimout。 从demo2可以看出,虽然async await本质上也是microtask,但是每个await会耗费至少3个microtask queue ticks,这点需要注意。\n引用\n\n本篇总结主要参考了如下资源,强烈推荐浏览阅读:\n\nJake Archibald: In The Loop - JSConf.Asia 2018\nPhilip Roberts: What the heck is the event loop anyway? - JSConf.EU 2014\nEverything You Need to Know About Node.js Event Loop - Bert Belder, IBM\nEvent Loop and the Big Picture — NodeJS Event Loop Part 1\nTimers, Immediates and Process.nextTick— NodeJS Event Loop Part 2\nPromises, Next-Ticks and Immediates— NodeJS Event Loop Part 3\nHandling IO — NodeJS Event Loop Part 4\nEvent Loop Best Practices — NodeJS Event Loop Part 5\nUsing requestIdleCallback", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "为 什 么 要 了 解 js 中 的 事 件 循 环 javascript 是 一 种 基 于 事 件 的 单 线 程 异 步 非 阻 塞 编 程 语 言 我 经 常 在 看 书 或 者 浏 览 别 人 博 客 的 时 候 看 到 这 种 说 法 可 是 之 前 一 直 没 有 深 入 理 解 过 只 知 道 javascript 中 经 常 使 用 各 种 回 调 函 数 比 如 浏 览 器 端 的 各 种 事 件 回 调 点 击 事 件 滚 动 事 件 等 ajax 请 求 回 调 settimeout 回 调 以 及 react16 的 内 核 fiber 中 用 到 的 requestanimationframe promise 回 调 node 端 fs 模 块 异 步 读 取 文 件 内 容 回 调 process 模 块 的 nexttick 等 等 最 近 有 时 间 浏 览 了 各 种 资 料 后 面 有 各 种 相 关 资 料 的 链 接 终 于 明 白 所 有 的 这 些 内 容 其 实 都 离 不 开 javascript 事 件 循 环 而 浏 览 器 端 的 事 件 循 环 又 与 node 端 的 事 件 循 环 有 较 大 区 别 下 面 分 别 介 绍 下 浏 览 器 vs node 自 从 有 了 node javascript 既 可 以 运 行 在 浏 览 器 端 又 可 以 运 行 在 服 务 端 以 chrome 浏 览 器 为 例 相 同 点 是 都 基 于 v8 引 擎 不 同 的 是 浏 览 器 端 实 现 了 页 面 渲 染 而 node 端 则 提 供 了 一 些 服 务 端 会 用 到 的 特 性 比 如 fs process 等 模 块 同 时 node 端 为 了 实 现 跨 平 台 底 层 使 用 libuv 来 兼 容 linux windows macos 三 大 操 作 系 统 因 此 虽 然 都 实 现 了 javascript 的 异 步 非 阻 塞 特 性 但 是 却 有 有 不 少 不 同 之 处", "source_text": "为什么要了解js中的事件循环\n\njavascript是一种基于事件的单线程、异步、非阻塞编程语言,我经常在看书或者浏览别人博客的时候看到这种说法,可是之前一直没有深入理解过,只知道javascript中经常使用各种回调函数,比如浏览器端的各种事件回调(点击事件、滚动事件等)、ajax请求回调、setTimeout回调以及react16的内核fiber中用到的requestAnimationFrame、promise回调、node端fs模块异步读取文件内容回调、process模块的nextTick等等。最近有时间浏览了各种资料(后面有各种相关资料的链接),终于明白所有的这些内容其实都离不开javascript事件循环,而浏览器端的事件循环又与node端的事件循环有较大区别,下面分别介绍下。\n\n浏览器 vs node\n\n自从有了node,javascript既可以运行在浏览器端又可以运行在服务端,以chrome浏览器为例,相同点是都基于v8引擎,不同的是浏览器端实现了页面渲染、而node端则提供了一些服务端会用到的特性,比如fs、process等模块,同时node端为了实现跨平台,底层使用libuv来兼容linux、windows、 macOS三大操作系统。因此虽然都实现了javascript的异步、非阻塞特性,但是却有有不少不同之处。", "segmentation_method": "reviewed_source_semantics", "label": "为什么要了解 js 中的事件循环 — 浏览器 vs node", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "浏 览 器 端 无 论 是 在 浏 览 器 端 还 是 node 端 线 程 入 口 都 是 一 个 javascript 脚 本 文 件 整 个 脚 本 文 件 从 第 一 行 开 始 到 最 后 运 行 完 成 可 以 看 作 是 一 个 entry task 即 初 始 化 任 务 下 图 task 中 第 一 项 即 为 该 过 程 初 始 化 过 程 中 肯 定 会 注 册 不 少 异 步 事 件 比 如 常 见 的 settimeout onclick promise 等 这 些 异 步 事 件 执 行 中 又 有 可 能 注 册 更 多 异 步 事 件 所 有 的 这 些 异 步 任 务 都 是 在 事 件 循 环 一 次 次 的 循 环 中 得 到 执 行 而 这 些 异 步 任 务 又 可 以 分 为 两 大 类 即 microtask 和 task 或 macrotask 那 么 一 次 事 件 循 环 中 会 执 行 多 少 个 异 步 任 务 microtask 和 task 的 执 行 先 后 顺 序 是 什 么 呢 看 下 图 先 忽 略 图 中 的 红 色 部 分 渲 染 过 程 后 面 再 介 绍 顺 时 针 方 向 即 为 事 件 循 环 方 向 可 以 看 出 每 次 循 环 会 先 后 执 行 两 类 任 务 task 和 microtask 每 一 类 任 务 都 由 一 个 队 列 组 成 其 中 task 主 要 包 括 如 下 几 类 任 务 index js entry settimeout setinterval 网 络 i o 而 microtask 主 要 包 括 promise mutationobserver 因 此 microtask 的 执 行 事 件 结 点 是 在 两 次 task 执 行 间 隙 前 面 说 了 每 类 任 务 都 由 一 个 队 列 组 成 这 其 实 是 一 种 生 产 者 消 费 者 模 型 事 件 的 注 册 过 程 即 为 任 务 生 产 过 程 任 务 的 执 行 过 程 即 为 事 件 的 消 费 过 程 那 么 每 次 轮 到 一 类 任 务 执 行 各 个 队 列 会 出 队 多 少 个 任 务 来 执 行 呢 图 中 我 已 经 标 明 task 队 列 每 次 出 队 一 项 任 务 来 执 行 执 行 完 成 之 后 开 始 执 行 microtask 而 microtask 则 每 次 都 把 所 有 包 括 当 前 microtask 执 行 过 程 中 新 添 加 的 任 务 任 务 执 行 完 成 然 后 才 会 继 续 执 行 task 也 就 是 说 即 便 microtask 是 异 步 任 务 也 不 能 无 节 制 的 注 册 否 则 会 阻 塞 task 和 页 面 渲 染 的 执 行 比 如 下 面 的 这 段 代 码 中 的 settimeout 回 调 任 务 将 永 远 得 不 到 执 行 注 意 谨 慎 运 行 这 段 代 码 浏 览 器 可 能 卡 死 代 码 解 读 复 制 代 码 settimeout console log run settimout callback 0 function promiseloop console log run promise callback return promise resolve then return promiseloop promiseloop 现 在 回 过 头 来 再 看 上 图 中 的 粉 红 色 虚 线 部 分 该 过 程 表 示 的 是 浏 览 器 渲 染 过 程 比 如 dom 元 素 的 style layout 以 及 position 这 些 渲 染 那 为 什 么 用 虚 线 表 示 呢 是 因 为 该 部 分 的 调 度 是 由 浏 览 器 控 制 而 且 是 以 60hz 的 频 率 调 度 之 所 以 是 60hz 是 为 了 能 满 足 人 眼 视 觉 效 果 的 同 时 尽 量 低 频 的 调 度 如 果 浏 览 器 一 刻 不 停 的 频 繁 渲 染 那 么 不 仅 人 眼 观 察 不 到 界 面 的 变 化 效 果 就 如 同 夏 天 电 扇 转 太 快 人 眼 分 辨 不 出 来 而 且 耗 费 计 算 资 源 因 此 上 图 中 渲 染 过 程 用 虚 线 表 示 不 一 定 每 次 事 件 循 环 都 会 执 行 渲 染 过 程 仔 细 看 虚 线 框 起 来 的 渲 染 过 程 可 以 看 到 在 执 行 渲 染 之 前 可 以 执 行 一 个 回 调 函 数 requestanimationframe 执 行 渲 染 之 后 可 以 执 行 一 个 回 调 函 数 requestidlecallback 使 用 这 两 个 钩 子 函 数 注 册 的 回 调 函 数 同 task 回 调 和 microtask 回 调 一 样 会 进 入 专 属 的 事 件 队 列 但 是 这 两 个 钩 子 函 数 与 settimeout 不 一 样 不 是 为 了 在 4ms 16ms 或 1s 之 后 再 执 行 而 是 在 下 一 次 页 面 渲 染 阶 段 去 执 行 具 体 来 说 是 requestanimationframe 在 style 和 layout 计 算 之 前 执 行 requestidlecallback 则 是 在 变 更 真 正 渲 染 到 页 面 后 执 行 requestanimationframe 比 settimeout 更 适 合 做 动 画 这 里 有 个 例 子 可 以 参 考 jsfiddle net h7eee 245 效 果 如 下 图 所 示 可 以 看 出 requestanimationframe 比 settimeout 动 画 效 果 更 加 流 畅 而 requestidlecallback 则 是 在 每 一 渲 染 贞 后 的 空 闲 时 间 去 完 成 回 调 任 务 因 此 一 般 用 于 一 些 低 优 先 级 的 任 务 调 度 比 如 react16 则 使 用 了 该 钩 子 函 数 实 现 异 步 reconcilation 算 法 以 保 证 页 面 性 能 当 然 由 于 requestidlecallback 是 比 较 新 的 api react 团 队 实 现 了 pollyfill 注 意 是 目 前 是 使 用 requestanimationframe 实 现 的 哦 现 在 总 结 一 下 浏 览 器 端 的 事 件 队 列 共 包 括 四 个 事 件 队 列 task 队 列 requestanimationframe 队 列 requestidlecallback 队 列 以 及 microtask 队 列 javascript 脚 本 加 载 完 成 后 首 先 执 行 第 一 个 task 队 列 任 务 即 初 始 化 任 务 然 后 执 行 所 有 microtask 队 列 任 务 接 着 再 次 执 行 第 二 个 task 队 列 任 务 以 此 类 推 这 其 中 穿 插 着 60hz 的 渲 染 过 程 先 执 行 谁 后 执 行 谁 现 在 了 解 清 楚 了 可 是 到 每 个 事 件 队 列 执 行 的 轮 次 时 分 别 会 有 多 少 个 事 件 出 队 执 行 呢 答 案 见 下 图 截 图 自 jake archibald 大 神 的 jsconf 演 讲 视 频 可 以 看 出 在 一 次 事 件 循 环 中 普 通 task 每 次 出 队 一 项 回 调 函 数 去 执 行 requestanimationframe 每 次 出 队 所 有 当 前 队 列 的 回 调 函 数 去 执 行 requestidlecallback 一 样 microtask 每 次 出 队 所 有 当 前 队 列 的 回 调 函 数 以 及 自 己 轮 次 执 行 过 程 中 又 新 增 到 队 尾 的 回 调 函 数 这 三 种 不 同 的 调 度 方 式 正 好 覆 盖 了 所 有 场 景", "source_text": "浏览器端\n\n无论是在浏览器端还是node端,线程入口都是一个javascript脚本文件,整个脚本文件从第一行开始到最后运行完成可以看作是一个entry task,即初始化任务,下图task中第一项即为该过程。初始化过程中肯定会注册不少异步事件,比如常见的setTimeout、onClick、promise等,这些异步事件执行中又有可能注册更多异步事件。所有的这些异步任务都是在事件循环一次次的循环中得到执行,而这些异步任务又可以分为两大类,即microtask和task(或macrotask)。那么一次事件循环中会执行多少个异步任务?microtask和task的执行先后顺序是什么呢?看下图。\n\n先忽略图中的红色部分(渲染过程,后面再介绍),顺时针方向即为事件循环方向,可以看出每次循环会先后执行两类任务,task和microtask,每一类任务都由一个队列组成,其中task主要包括如下几类任务:\n\nindex.js(entry)\nsetTimeout\nsetInterval\n网络I/O\n\n而microtask主要包括:\n\npromise\nMutationObserver\n\n因此microtask的执行事件结点是在两次task执行间隙。前面说了,每类任务都由一个队列组成,这其实是一种生产者-消费者模型,事件的注册过程即为任务生产过程,任务的执行过程即为事件的消费过程。那么每次轮到一类任务执行各个队列会出队多少个任务来执行呢?图中我已经标明,task队列每次出队一项任务来执行,执行完成之后开始执行microtask;而microtask则每次都把所有(包括当前microtask执行过程中新添加的任务)任务执行完成,然后才会继续执行task。也就是说,即便microtask是异步任务,也不能无节制的注册,否则会阻塞task和页面渲染的执行。比如,下面的这段代码中的setTimeout回调任务将永远得不到执行(注意,谨慎运行这段代码,浏览器可能卡死):\n\n代码解读\n复制代码\nsetTimeout(() => {\n console.log('run setTimout callback');\n}, 0);\n\nfunction promiseLoop() {\n console.log('run promise callback');\n return Promise.resolve().then(() => {\n return promiseLoop();\n });\n}\n\npromiseLoop();\n\n\n现在回过头来再看上图中的粉红色虚线部分,该过程表示的是浏览器渲染过程,比如dom元素的style、layout以及position这些渲染,那为什么用虚线表示呢?是因为该部分的调度是由浏览器控制,而且是以60HZ的频率调度,之所以是60HZ是为了能满足人眼视觉效果的同时尽量低频的调度,如果浏览器一刻不停的频繁渲染,那么不仅人眼观察不到界面的变化效果(就如同夏天电扇转太快人眼分辨不出来),而且耗费计算资源。因此上图中渲染过程用虚线表示不一定每次事件循环都会执行渲染过程。\n\n仔细看虚线框起来的渲染过程,可以看到在执行渲染之前可以执行一个回调函数requestAnimationFrame,执行渲染之后可以执行一个回调函数requestIdleCallback。使用这两个钩子函数注册的回调函数同task回调和microtask回调一样,会进入专属的事件队列,但是这两个钩子函数与setTimeout不一样,不是为了在4ms,16ms或1s之后再执行,而是在下一次页面渲染阶段去执行,具体来说是requestAnimationFrame在style和layout计算之前执行,requestIdleCallback则是在变更真正渲染到页面后执行。\n\nrequestAnimationFrame比setTimeout更适合做动画,这里有个例子可以参考:jsfiddle.net/H7EEE/245/。效果如下图所示,可以看出requestAnimationFrame比setTimeout动画效果更加流畅。\n\n而requestIdleCallback则是在每一渲染贞后的空闲时间去完成回调任务,因此一般用于一些低优先级的任务调度,比如react16则使用了该钩子函数实现异步reconcilation算法以保证页面性能,当然由于requestIdleCallback是比较新的API,react团队实现了pollyfill,注意是目前是使用requestAnimationFrame实现的哦。\n\n现在总结一下浏览器端的事件队列,共包括四个事件队列:task队列、requestAnimationFrame队列、requestIdleCallback队列以及microtask队列,javascript脚本加载完成后首先执行第一个task队列任务,即初始化任务,然后执行所有microtask队列任务,接着再次执行第二个task队列任务,以此类推,这其中穿插着60HZ的渲染过程。先执行谁后执行谁现在了解清楚了,可是到每个事件队列执行的轮次时,分别会有多少个事件出队执行呢?答案见下图(截图自Jake Archibald大神的JSConf演讲视频):\n\n可以看出,在一次事件循环中:普通task每次出队一项回调函数去执行,requestAnimationFrame每次出队所有当前队列的回调函数去执行(requestIdleCallback一样),microtask每次出队所有当前队列的回调函数以及自己轮次执行过程中又新增到队尾的回调函数。这三种不同的调度方式正好覆盖了所有场景。", "segmentation_method": "reviewed_source_semantics", "label": "浏览器端", "source_line_range": [ 9, 54 ] }, { "id": "body-region-3", "text": "实 践 一 下 demo1 对 比 index js promise settimeout 的 执 行 先 后 顺 序 代 码 解 读 复 制 代 码 console log script start settimeout function console log settimeout 0 new promise function resolve console log promise1 1 resolve then function console log promise1 2 then function console log promise1 3 then function console log promise1 4 new promise function resolve console log promise2 1 resolve then function console log promise2 2 then function console log promise2 3 then function console log promise2 4 console log script end 这 段 代 码 的 输 入 如 下 代 码 解 读 复 制 代 码 script start promise1 1 promise2 1 script end promise1 2 promise2 2 promise1 3 promise2 3 promise1 4 promise2 4 settimeout 按 照 前 面 的 事 件 循 环 示 例 图 按 照 如 下 顺 序 执 行 执 行 task index js 这 里 包 括 四 项 输 出 script start promise1 1 promise2 1 script end 其 中 需 要 留 意 promise1 1 和 promise2 1 因 为 new promise 中 resolve 调 用 之 前 也 是 同 步 代 码 因 此 也 会 同 步 执 行 执 行 microtask 这 里 需 要 留 意 microtask 会 边 执 行 边 生 成 新 的 添 加 到 事 件 队 列 队 尾 因 此 执 行 完 所 有 microtask 才 重 新 进 入 事 件 循 环 开 始 下 一 项 执 行 task settimeout 根 据 前 面 的 示 例 图 这 里 又 轮 到 了 task 的 执 行 只 不 过 这 次 是 settimout node 端 前 面 介 绍 了 下 浏 览 器 端 的 事 件 循 环 涉 及 到 task 和 microtask 其 实 node 端 的 异 步 任 务 也 包 括 这 些 只 不 过 node 端 的 task 划 分 的 更 细 如 下 图 所 示 node 端 的 task 可 以 分 为 4 类 任 务 队 列 index js entry settimeout setinterval 网 络 i o fs disk child process setimmediate close 事 件 而 microtask 包 括 process nexttick promise 开 始 后 会 首 先 执 行 注 册 过 的 所 有 microtask 然 后 会 依 次 执 行 该 4 类 task 队 列 而 每 执 行 完 一 个 task 队 列 就 会 接 着 执 行 microtask 队 列 然 后 再 接 着 执 行 下 一 个 task 队 列 因 此 microtask 队 列 的 执 行 是 穿 插 在 各 个 类 形 的 task 之 间 的 当 然 也 可 以 node 端 与 浏 览 器 端 事 件 循 环 的 一 个 很 重 要 的 不 同 点 是 浏 览 器 端 task 队 列 每 轮 事 件 循 环 仅 出 队 一 个 回 调 函 数 去 执 行 接 着 去 执 行 microtask 而 node 端 只 要 轮 到 执 行 task 则 会 跟 执 行 完 队 列 中 的 所 有 当 前 任 务 但 是 当 前 轮 次 新 添 加 到 队 尾 的 任 务 则 会 等 到 下 一 轮 次 才 会 执 行 该 机 制 与 浏 览 器 端 的 requestanimationframe 的 调 度 机 制 时 一 样 的 总 结 一 下 node 端 的 事 件 循 环 共 包 括 4 类 task 事 件 队 列 与 2 类 microtask 事 件 队 列 microtask 穿 插 在 task 之 间 执 行 task 每 次 轮 到 执 行 会 将 当 前 队 列 中 的 所 有 回 调 函 数 出 队 执 行 而 microtask 的 调 度 机 制 则 与 浏 览 器 端 一 样 每 次 轮 到 执 行 都 会 出 队 所 有 当 前 队 列 的 回 调 函 数 以 及 自 己 轮 次 执 行 过 程 中 又 新 增 到 队 尾 的 回 调 函 数 去 执 行 与 浏 览 器 端 不 一 样 的 是 node 端 的 microtask 包 括 process nexttick 和 promise 两 类", "source_text": "实践一下\ndemo1: 对比index.js、promise、setTimeout的执行先后顺序\n代码解读\n复制代码\nconsole.log('script start');\n\nsetTimeout(function () {\n console.log('setTimeout');\n}, 0);\n\nnew Promise(function (resolve) {\n console.log('promise1.1');\n resolve();\n}).then(function () {\n console.log('promise1.2');\n}).then(function () {\n console.log('promise1.3');\n}).then(function () {\n console.log('promise1.4');\n});\n\nnew Promise(function (resolve) {\n console.log('promise2.1');\n resolve();\n}).then(function () {\n console.log('promise2.2');\n}).then(function () {\n console.log('promise2.3');\n}).then(function () {\n console.log('promise2.4');\n});\n\nconsole.log('script end');\n\n\n这段代码的输入如下:\n\n代码解读\n复制代码\nscript start\npromise1.1\npromise2.1\nscript end\npromise1.2\npromise2.2\npromise1.3\npromise2.3\npromise1.4\npromise2.4\nsetTimeout\n\n\n按照前面的事件循环示例图,按照如下顺序执行:\n\n执行task(index.js); 这里包括四项输出:script start、promise1.1、promise2.1、script end。其中需要留意promise1.1和promise2.1,因为new Promise中resolve()调用之前也是同步代码,因此也会同步执行。\n执行microtask; 这里需要留意microtask会边执行边生成新的添加到事件队列队尾,因此执行完所有microtask才重新进入事件循环开始下一项。\n执行task(setTimeout); 根据前面的示例图,这里又轮到了task的执行,只不过这次是setTimout。\nnode端\n\n前面介绍了下浏览器端的事件循环,涉及到task和microtask,其实node端的异步任务也包括这些,只不过node端的task划分的更细,如下图所示,node端的task可以分为4类任务队列:\n\nindex.js(entry)、setTimeout、setInterval\n网络I/O、fs(disk)、child_process\nsetImmediate\nclose事件\n\n而microtask包括:\n\nprocess.nextTick\npromise\n开始后会首先执行注册过的所有microtask,然后会依次执行该4类task队列。而每执行完一个task队列就会接着执行microtask队列,然后再接着执行下一个task队列。因此microtask队列的执行是穿插在各个类形的task之间的,当然也可以。 node端与浏览器端事件循环的一个很重要的不同点是,浏览器端task队列每轮事件循环仅出队一个回调函数去执行接着去执行microtask,而node端只要轮到执行task,则会跟执行完队列中的所有当前任务,但是当前轮次新添加到队尾的任务则会等到下一轮次才会执行,该机制与浏览器端的requestAnimationFrame的调度机制时一样的。 总结一下node端的事件循环,共包括4类task事件队列与2类microtask事件队列,microtask穿插在task之间执行。task每次轮到执行会将当前队列中的所有回调函数出队执行,而microtask的调度机制则与浏览器端一样,每次轮到执行都会出队所有当前队列的回调函数以及自己轮次执行过程中又新增到队尾的回调函数去执行。与浏览器端不一样的是node端的microtask包括process.nextTick和promise两类。", "segmentation_method": "reviewed_source_semantics", "label": "实践一下 — node端", "source_line_range": [ 55, 125 ] }, { "id": "body-region-4", "text": "实 践 一 下 demo1 对 比 promise 与 settimeout 的 执 行 顺 序 代 码 解 读 复 制 代 码 console log main settimeout function console log execute in first timeout promise resolve 3 then res console log execute in third promise 0 settimeout function console log execute in second timeout promise resolve 4 then res console log execute in fourth promise 0 promise resolve 1 then res console log execute in first promise promise resolve 2 then res console log execute in second promise 前 面 这 段 代 码 的 输 出 结 果 如 下 代 码 解 读 复 制 代 码 main execute in first promise execute in second promise execute in first timeout execute in second timeout execute in third promise execute in fourth promise 执 行 顺 序 如 下 index js 主 程 序 代 码 main microtask promise1 promise2 task settimeout1 settimeout2 microtask promise3 promise4 这 个 执 行 顺 序 与 之 前 画 的 图 完 全 对 应 demo2 对 比 index js promise async await settimeout 的 执 行 先 后 顺 序 代 码 解 读 复 制 代 码 console log script start async function async1 console log async1 start await async2 console log async1 end async function async2 console log entry async2 return promise resolve settimeout function console log settimeout 0 async1 new promise function resolve console log promise1 resolve then function console log promise2 then function console log promise3 then function console log promise4 then function console log promise5 then function console log promise6 console log script end 这 段 代 码 在 node10 环 境 的 执 行 结 果 如 下 代 码 解 读 复 制 代 码 script start async1 start entry async2 promise1 script end promise2 promise3 promise4 async1 end promise5 promise6 settimeout 注 意 我 这 里 强 调 了 是 node10 环 境 是 因 为 node8 和 node9 下 面 async await 有 bug 而 node10 中 得 到 了 修 复 详 情 可 以 参 考 这 篇 文 章 faster async functions and promises 下 面 按 照 前 面 的 事 件 循 环 示 例 图 分 析 下 前 面 这 段 代 码 的 执 行 结 果 执 行 task index js 这 里 包 括 5 项 输 出 script start async1 start entry async2 promise1 script end 这 里 要 注 意 async 函 数 中 第 一 个 await 之 前 执 行 的 代 码 也 是 同 步 代 码 因 此 会 打 印 出 scync1 start 以 及 entry async2 执 行 microtask 这 里 打 印 了 所 有 剩 下 的 promise 以 及 一 个 位 于 await 后 的 语 句 async1 end 打 印 这 个 集 合 肯 定 是 没 问 题 的 但 是 问 题 是 为 什 么 async1 end 会 比 promise 延 迟 3 个 呢 这 个 问 题 是 这 段 代 码 最 难 懂 的 地 方 答 案 在 刚 刚 提 到 的 那 篇 文 章 中 每 个 await 需 要 至 少 3 个 microtask queue ticks 因 此 这 里 async1 end 的 打 印 相 对 于 promise 晚 打 印 了 3 个 tick 其 实 通 过 这 里 例 子 我 们 也 应 该 的 出 一 个 结 论 就 是 最 要 不 要 把 promise 和 async await 混 用 否 则 容 易 时 序 混 乱 执 行 task settimeout 根 据 前 面 的 示 例 图 这 里 又 轮 到 了 task 的 执 行 只 不 过 这 次 是 settimout 从 demo2 可 以 看 出 虽 然 async await 本 质 上 也 是 microtask 但 是 每 个 await 会 耗 费 至 少 3 个 microtask queue ticks 这 点 需 要 注 意", "source_text": "实践一下\ndemo1: 对比promise与setTimeout的执行顺序\n代码解读\n复制代码\nconsole.log('main');\nsetTimeout(function () {\n console.log('execute in first timeout');\n Promise.resolve(3).then(res => {\n console.log('execute in third promise');\n });\n}, 0);\nsetTimeout(function () {\n console.log('execute in second timeout');\n Promise.resolve(4).then(res => {\n console.log('execute in fourth promise');\n });\n}, 0);\nPromise.resolve(1).then(res => {\n console.log('execute in first promise');\n});\nPromise.resolve(2).then(res => {\n console.log('execute in second promise');\n});\n\n\n前面这段代码的输出结果如下:\n\n代码解读\n复制代码\nmain\nexecute in first promise\nexecute in second promise\nexecute in first timeout\nexecute in second timeout\nexecute in third promise\nexecute in fourth promise\n\n\n执行顺序如下:\n\nindex.js(主程序代码main);\nmicrotask(promise1, promise2);\ntask(setTimeout1, setTimeout2);\nmicrotask(promise3, promise4);\n\n这个执行顺序与之前画的图完全对应。\n\ndemo2: 对比index.js、promise、async await、setTimeout的执行先后顺序\n代码解读\n复制代码\nconsole.log('script start');\n\nasync function async1() {\n console.log('async1 start');\n await async2();\n console.log('async1 end');\n}\n\nasync function async2() {\n console.log('entry async2');\n return Promise.resolve();\n}\n\nsetTimeout(function () {\n console.log('setTimeout');\n}, 0);\n\nasync1();\n\nnew Promise(function (resolve) {\n console.log('promise1');\n resolve();\n}).then(function () {\n console.log('promise2');\n}).then(function () {\n console.log('promise3');\n}).then(function () {\n console.log('promise4');\n}).then(function () {\n console.log('promise5');\n}).then(function () {\n console.log('promise6');\n});\n\nconsole.log('script end');\n\n\n这段代码在node10环境的执行结果如下:\n\n代码解读\n复制代码\nscript start\nasync1 start\nentry async2\npromise1\nscript end\npromise2\npromise3\npromise4\nasync1 end\npromise5\npromise6\nsetTimeout\n\n\n注意我这里强调了是node10环境,是因为node8和node9下面async await有bug,而node10中得到了修复,详情可以参考这篇文章:Faster async functions and promises。下面按照前面的事件循环示例图分析下前面这段代码的执行结果:\n\n执行task(index.js); 这里包括5项输出:script start、async1 start、entry async2、promise1、script end。这里要注意async函数中第一个await之前执行的代码也是同步代码,因此会打印出scync1 start以及entry async2。\n执行microtask; 这里打印了所有剩下的promise以及一个位于await后的语句async1 end。打印这个集合肯定是没问题的,但是问题是为什么async1 end会比promise延迟3个呢? 这个问题是这段代码最难懂的地方,答案在刚刚提到的那篇文章中:每个await需要至少3个microtask queue ticks,因此这里async1 end的打印相对于promise晚打印了3个tick。其实通过这里例子我们也应该的出一个结论,就是最要不要把promise和async await混用,否则容易时序混乱。\n执行task(setTimeout)。 根据前面的示例图,这里又轮到了task的执行,只不过这次是setTimout。 从demo2可以看出,虽然async await本质上也是microtask,但是每个await会耗费至少3个microtask queue ticks,这点需要注意。", "segmentation_method": "reviewed_source_semantics", "label": "实践一下", "source_line_range": [ 126, 235 ] }, { "id": "body-region-5", "text": "引 用 本 篇 总 结 主 要 参 考 了 如 下 资 源 强 烈 推 荐 浏 览 阅 读 jake archibald in the loop jsconf asia 2018 philip roberts what the heck is the event loop anyway jsconf eu 2014 everything you need to know about node js event loop bert belder ibm event loop and the big picture nodejs event loop part 1 timers immediates and process nexttick nodejs event loop part 2 promises next ticks and immediates nodejs event loop part 3 handling io nodejs event loop part 4 event loop best practices nodejs event loop part 5 using requestidlecallback", "source_text": "引用\n\n本篇总结主要参考了如下资源,强烈推荐浏览阅读:\n\nJake Archibald: In The Loop - JSConf.Asia 2018\nPhilip Roberts: What the heck is the event loop anyway? - JSConf.EU 2014\nEverything You Need to Know About Node.js Event Loop - Bert Belder, IBM\nEvent Loop and the Big Picture — NodeJS Event Loop Part 1\nTimers, Immediates and Process.nextTick— NodeJS Event Loop Part 2\nPromises, Next-Ticks and Immediates— NodeJS Event Loop Part 3\nHandling IO — NodeJS Event Loop Part 4\nEvent Loop Best Practices — NodeJS Event Loop Part 5\nUsing requestIdleCallback", "segmentation_method": "reviewed_source_semantics", "label": "引用", "source_line_range": [ 236, 248 ] } ], "ending": { "text": "eJS Event Loop Part 4\nEvent Loop Best Practices — NodeJS Event Loop Part 5\nUsing requestIdleCallback" } } }, { "id": "article-015", "name": "Avenir-Web 开源相关报道", "url": "https://blog.csdn.net/QbitAI/article/details/160638160", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "龙虾冲浪终于不迷路了!网页智能体新框架Avenir\\-Web开源即SOTA" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "登录" ] }, { "id": "stable-2", "alternatives": [ "消息" ] }, { "id": "stable-3", "alternatives": [ "创作" ] }, { "id": "stable-4", "alternatives": [ "首页" ] }, { "id": "stable-5", "alternatives": [ "博客" ] }, { "id": "stable-6", "alternatives": [ "下载" ] }, { "id": "stable-7", "alternatives": [ "学习" ] }, { "id": "stable-8", "alternatives": [ "社区" ] }, { "id": "stable-9", "alternatives": [ "模型市场" ] }, { "id": "stable-10", "alternatives": [ "AI搜索" ] }, { "id": "stable-11", "alternatives": [ "AtomGit" ] }, { "id": "stable-12", "alternatives": [ "InsCode" ] }, { "id": "stable-13", "alternatives": [ "技术会议" ] }, { "id": "stable-14", "alternatives": [ "墨衍" ] }, { "id": "stable-15", "alternatives": [ "MoGrow" ] }, { "id": "stable-16", "alternatives": [ "收藏" ] }, { "id": "stable-17", "alternatives": [ "历史" ] }, { "id": "stable-18", "alternatives": [ "会员中心" ] }, { "id": "stable-19", "alternatives": [ "创作中心" ] }, { "id": "stable-21", "alternatives": [ "QbitAl" ] }, { "id": "stable-22", "alternatives": [ "墨衍会员" ] }, { "id": "stable-23", "alternatives": [ "AI 创作全网分发" ] }, { "id": "stable-24", "alternatives": [ "码龄" ] }, { "id": "stable-25", "alternatives": [ "关注" ] }, { "id": "stable-26", "alternatives": [ "转载" ] }, { "id": "stable-27", "alternatives": [ "2026-04-29 20:44:30" ] }, { "id": "stable-28", "alternatives": [ "阅读" ] }, { "id": "stable-29", "alternatives": [ "AI 写同款" ] }, { "id": "stable-30", "alternatives": [ "关注博主即可阅读全文" ] }, { "id": "stable-31", "alternatives": [ "收录于" ] }, { "id": "stable-32", "alternatives": [ "天工造物局" ] }, { "id": "stable-33", "alternatives": [ "标签" ] }, { "id": "stable-34", "alternatives": [ "#前端" ] }, { "id": "stable-35", "alternatives": [ "原文链接:" ] }, { "id": "stable-36", "alternatives": [ "相关推荐" ] }, { "id": "stable-37", "alternatives": [ "换一换" ] }, { "id": "stable-38", "alternatives": [ "上一篇:" ] }, { "id": "stable-39", "alternatives": [ "下一篇:" ] }, { "id": "stable-40", "alternatives": [ "目录" ] }, { "id": "body-41", "alternatives": [ "Avenir-Web 团队 投稿量子位 | 公众号 QbitAI", "Avenir-Web 团队 投稿\n量子位 | 公众号 QbitAI" ] }, { "id": "body-42", "alternatives": [ "Avenir-Web 的 Agent Harness 核心设计" ] }, { "id": "body-43", "alternatives": [ "元素定位不准(Inaccurate Grounding):过度依赖DOM树,在处理非标准结构(如 Canvas、嵌套 iframe)时极易失效。" ] }, { "id": "body-44", "alternatives": [ "缺乏特定站点的流程知识(Site-specific Procedural Knowledge):Agent不懂得参考“用户手册”或“攻略”,只能乱撞。" ] }, { "id": "body-45", "alternatives": [ "长程任务跟踪与记忆力不稳定(Unstable Memory):跨页面操作时容易产生“导航漂移”,陷入重复错误的循环。" ] }, { "id": "body-46", "alternatives": [ "Web Agent 的三大难题" ] }, { "id": "body-47", "alternatives": [ "AI冲浪不丝滑?" ] }, { "id": "body-48", "alternatives": [ "伦敦大学学院(UCL)、普林斯顿大学和爱丁堡大学的研究团队联合推出了Avenir-Web,让现有多模态模型像人类一样使用网页。" ] }, { "id": "body-49", "alternatives": [ "现有的Web Agent在面对复杂的网页结构(如 iframe、Shadow DOM)时,往往会陷入“定位不准”“缺乏常识”或“走着走着就忘了”的窘境。" ] }, { "id": "body-50", "alternatives": [ "特别是在长程任务(Long-horizon tasks)中,由于缺乏对特定网站操作流程的认知,Agent往往只能盲目探索,导致任务成功率低下。" ] }, { "id": "body-51", "alternatives": [ "Avenir-Web是一个不需要额外训练的新模型,本质上是一套开源的Agent Harness,也就是一个training-free的框架,在ONLINE-MIND2WEB上取得53.7%的成功率,刷新最强开源纪录。" ] }, { "id": "body-52", "alternatives": [ "研究团队指出,目前Web Agent在实际部署中面临三个核心瓶颈:" ] }, { "id": "body-53", "alternatives": [ "针对这些痛点,Avenir-Web提出了一套模块化的Agent Harness框架。" ] }, { "id": "body-54", "alternatives": [ "由于它是Harness,而不是需要重新训练的模型,因此整个方案天然具备training-free的部署优势。" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Human explicitly accepts complete displayed portion of retained original URL without expanding collapsed body. Every displayed character/block is source-bound through real clipping/mask geometry; full unopened article/answer is not claimed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "龙虾冲浪终于不迷路了!网页智能体新框架Avenir-Web开源即SOTA" ], "html_selector": "#articleContentId,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-015/comment-qualification-reference-r5.json", "sha256": "079b3a479b1a38d95ce580250261b1954e3cbe22b87bcf3c038d92269f43dce8", "chars": 804, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Avenir-Web 团队 投稿\n量子位 | 公众号 QbitAI\n\nAI冲浪不丝滑?\n\n伦敦大学学院(UCL)、普林斯顿大学和爱丁堡大学的研究团队联合推出了Avenir-Web,让现有多模态模型像人类一样使用网页。\n\n现有的Web Agent在面对复杂的网页结构(如 iframe、Shadow DOM)时,往往会陷入“定位不准”“缺乏常识”或“走着走着就忘了”的窘境。\n\n特别是在长程任务(Long-horizon tasks)中,由于缺乏对特定网站操作流程的认知,Agent往往只能盲目探索,导致任务成功率低下。\n\nAvenir-Web是一个不需要额外训练的新模型,本质上是一套开源的Agent Harness,也就是一个training-free的框架,在ONLINE-MIND2WEB上取得53.7%的成功率,刷新最强开源纪录。\n\nWeb Agent 的三大难题\n\n研究团队指出,目前Web Agent在实际部署中面临三个核心瓶颈:\n\n1. 元素定位不准(Inaccurate Grounding):过度依赖DOM树,在处理非标准结构(如 Canvas、嵌套 iframe)时极易失效。\n\n2. 缺乏特定站点的流程知识(Site-specific Procedural Knowledge):Agent不懂得参考“用户手册”或“攻略”,只能乱撞。\n\n3. 长程任务跟踪与记忆力不稳定(Unstable Memory):跨页面操作时容易产生“导航漂移”,陷入重复错误的循环。\n\n针对这些痛点,Avenir-Web提出了一套模块化的Agent Harness框架。\n\n由于它是Harness,而不是需要重新训练的模型,因此整个方案天然具备training-free的部署优势。\n\nAvenir-Web 的 Agent Harness 核心设计\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 3, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "avenir web 团 队 投 稿 量 子 位 公 众 号 qbitai ai 冲 浪 不 丝 滑 伦 敦 大 学 学 院 ucl 普 林 斯 顿 大 学 和 爱 丁 堡 大 学 的 研 究 团 队 联 合 推 出 了 avenir web 让 现 有 多 模 态 模 型 像 人 类 一 样 使 用 网 页 现 有 的 web agent 在 面 对 复 杂 的 网 页 结 构 如 iframe shadow dom 时 往 往 会 陷 入 定 位 不 准 缺 乏 常 识 或 走 着 走 着 就 忘 了 的 窘 境 特 别 是 在 长 程 任 务 long horizon tasks 中 由 于 缺 乏 对 特 定 网 站 操 作 流 程 的 认 知 agent 往 往 只 能 盲 目 探 索 导 致 任 务 成 功 率 低 下 avenir web 是 一 个 不 需 要 额 外 训 练 的 新 模 型 本 质 上 是 一 套 开 源 的 agent harness 也 就 是 一 个 training free 的 框 架 在 online mind2web 上 取 得 53 7 的 成 功 率 刷 新 最 强 开 源 纪 录", "source_text": "Avenir-Web 团队 投稿\n量子位 | 公众号 QbitAI\n\nAI冲浪不丝滑?\n\n伦敦大学学院(UCL)、普林斯顿大学和爱丁堡大学的研究团队联合推出了Avenir-Web,让现有多模态模型像人类一样使用网页。\n\n现有的Web Agent在面对复杂的网页结构(如 iframe、Shadow DOM)时,往往会陷入“定位不准”“缺乏常识”或“走着走着就忘了”的窘境。\n\n特别是在长程任务(Long-horizon tasks)中,由于缺乏对特定网站操作流程的认知,Agent往往只能盲目探索,导致任务成功率低下。\n\nAvenir-Web是一个不需要额外训练的新模型,本质上是一套开源的Agent Harness,也就是一个training-free的框架,在ONLINE-MIND2WEB上取得53.7%的成功率,刷新最强开源纪录。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Avenir-Web 团队 投稿", "source_line_range": [ 1, 13 ] }, { "id": "body-region-2", "text": "web agent 的 三 大 难 题 研 究 团 队 指 出 目 前 web agent 在 实 际 部 署 中 面 临 三 个 核 心 瓶 颈 1 元 素 定 位 不 准 inaccurate grounding 过 度 依 赖 dom 树 在 处 理 非 标 准 结 构 如 canvas 嵌 套 iframe 时 极 易 失 效 2 缺 乏 特 定 站 点 的 流 程 知 识 site specific procedural knowledge agent 不 懂 得 参 考 用 户 手 册 或 攻 略 只 能 乱 撞 3 长 程 任 务 跟 踪 与 记 忆 力 不 稳 定 unstable memory 跨 页 面 操 作 时 容 易 产 生 导 航 漂 移 陷 入 重 复 错 误 的 循 环 针 对 这 些 痛 点 avenir web 提 出 了 一 套 模 块 化 的 agent harness 框 架 由 于 它 是 harness 而 不 是 需 要 重 新 训 练 的 模 型 因 此 整 个 方 案 天 然 具 备 training free 的 部 署 优 势", "source_text": "Web Agent 的三大难题\n\n研究团队指出,目前Web Agent在实际部署中面临三个核心瓶颈:\n\n1. 元素定位不准(Inaccurate Grounding):过度依赖DOM树,在处理非标准结构(如 Canvas、嵌套 iframe)时极易失效。\n\n2. 缺乏特定站点的流程知识(Site-specific Procedural Knowledge):Agent不懂得参考“用户手册”或“攻略”,只能乱撞。\n\n3. 长程任务跟踪与记忆力不稳定(Unstable Memory):跨页面操作时容易产生“导航漂移”,陷入重复错误的循环。\n\n针对这些痛点,Avenir-Web提出了一套模块化的Agent Harness框架。\n\n由于它是Harness,而不是需要重新训练的模型,因此整个方案天然具备training-free的部署优势。", "segmentation_method": "reviewed_source_semantics", "label": "Web Agent 的三大难题", "source_line_range": [ 14, 27 ] }, { "id": "body-region-3", "text": "avenir web 的 agent harness 核 心 设 计", "source_text": "Avenir-Web 的 Agent Harness 核心设计", "segmentation_method": "reviewed_source_semantics", "label": "Avenir-Web 的 Agent Harness 核心设计", "source_line_range": [ 28, 28 ] } ], "ending": { "text": "跨页面操作时容易产生“导航漂移”,陷入重复错误的循环。\n\n针对这些痛点,Avenir-Web提出了一套模块化的Agent Harness框架。\n\n由于它是Harness,而不是需要重新训练的模型,因此整个方案天然具备training-free的部署优势。\n\nAvenir-Web 的 Agent Harness 核心设计" } } }, { "id": "article-016", "name": "区级又怎样?这个博物馆拿捏了数十万人的心", "url": "https://www.sohu.com/a/770951465_121119379", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "区级又怎样?这个博物馆“拿捏”了数十万人的心" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "砍柴艺术观" ] }, { "id": "stable-3", "alternatives": [ "新闻" ] }, { "id": "stable-4", "alternatives": [ "体育" ] }, { "id": "stable-5", "alternatives": [ "汽车" ] }, { "id": "stable-6", "alternatives": [ "房产" ] }, { "id": "stable-7", "alternatives": [ "旅游" ] }, { "id": "stable-8", "alternatives": [ "教育" ] }, { "id": "stable-9", "alternatives": [ "时尚" ] }, { "id": "stable-10", "alternatives": [ "科技" ] }, { "id": "stable-11", "alternatives": [ "财经" ] }, { "id": "stable-12", "alternatives": [ "娱乐" ] }, { "id": "stable-13", "alternatives": [ "母婴" ] }, { "id": "stable-14", "alternatives": [ "健康" ] }, { "id": "stable-15", "alternatives": [ "历史" ] }, { "id": "stable-16", "alternatives": [ "军事" ] }, { "id": "stable-17", "alternatives": [ "美食" ] }, { "id": "stable-18", "alternatives": [ "更多" ] }, { "id": "stable-19", "alternatives": [ "无障碍" ] }, { "id": "stable-20", "alternatives": [ "关怀版" ] }, { "id": "stable-21", "alternatives": [ "登录" ] }, { "id": "stable-22", "alternatives": [ "订阅" ] }, { "id": "stable-23", "alternatives": [ "查看TA的文章" ] }, { "id": "stable-24", "alternatives": [ "评论" ] }, { "id": "stable-25", "alternatives": [ "收藏" ] }, { "id": "stable-26", "alternatives": [ "分享" ] }, { "id": "stable-27", "alternatives": [ "扫码打开" ] }, { "id": "stable-28", "alternatives": [ "手机搜狐网" ] }, { "id": "stable-29", "alternatives": [ "无需下载APP" ] }, { "id": "stable-30", "alternatives": [ "精彩内容随时看" ] }, { "id": "stable-31", "alternatives": [ "平台声明" ] }, { "id": "stable-32", "alternatives": [ "内容举报" ] }, { "id": "stable-33", "alternatives": [ "大家都在看" ] }, { "id": "stable-34", "alternatives": [ "我来说两句" ] }, { "id": "stable-35", "alternatives": [ "用户公约" ] }, { "id": "stable-36", "alternatives": [ "点击登录" ] }, { "id": "stable-37", "alternatives": [ "发布" ] }, { "id": "stable-38", "alternatives": [ "热门精选" ] }, { "id": "stable-39", "alternatives": [ "24小时热文" ] }, { "id": "stable-40", "alternatives": [ "搜狐号" ] } ] }, "rule_review": { "status": "reviewed", "reason": "All fixed article text, captions, three main interview sections, editorial credits and original publisher subscription footer appear in initial #mp-editor. DOM shows full element height and end screenshot confirms final owned homepage link before platform statement and comments; no expansion. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "区级又怎样?这个博物馆“拿捏”了数十万人的心" ], "html_selector": ".text-title h1,h1,h2,[role=\"heading\"]", "excluded_html_selectors": [ "h1.screen-reader-only" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-016/comment-qualification-reference-r5.json", "sha256": "8d133eebdefe429fbc934c0aeb1043315a4074846a740c3d5091ab3dff350629", "chars": 772, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "文丨本刊记者 陈曦\n\n在一间全透明的“修复室”中,几位油画修复师正在一件老旧、皲裂的大幅油画前忙碌着,不时拿起各种高精仪器对画作进行检测、记录……如果你这几天走进上海奉贤区博物馆新馆,便会看到这样的场景。\n\n环绕着这间玻璃修复室的,还有不少曾出现在课本上的“名场面”——罗工柳的《地道战》、刘耀真的《刘胡兰》、俞云阶的《吾土吾民》、刘海粟的《打铁》……来自国家博物馆、中华艺术宫(上海美术馆)、上海油画雕塑院、刘海粟美术馆等机构的20余件红色经典油画汇聚一堂。它们不仅唤醒了观众脑海中的红色记忆,也展现了近半个多世纪以来我国油画保护与修复的光辉成果。\n\n“修复日记II——永不褪色的红”展览现场\n\n这场“修复日记II——永不褪色的红”红色经典油画回顾与修复科技展,正是奉贤区博物馆今春呈现给观众的一大“新玩法”。不过,这只是近年来在该馆上演的亮眼活动之一,作为一家新馆,其此前还推出了“雍正故宫文物大展”“古蜀之光——三星堆·金沙遗址出土文物大展”“丹甲青文——中国汉字文物精华展”等重量级大展。\n\n这座规模不大的区级博物馆,距市中心四五十公里,正式开馆才5年,藏品不足万件,却能与故宫博物院、国家博物馆、四川广汉三星堆博物馆等重要文博机构携手办展,吸引数十万观众一再前来打卡……它,到底有什么“魔力”?\n\n日前,《中国收藏》杂志记者独家专访了上海市政协委员、奉贤区博物馆馆长张雪松。自20世纪90年代一头扎进博物馆工作中,张雪松近30年来见证着曾经那座“无人知晓”的奉贤区博物馆,逐渐演变为一个“开放、阳光、温度”的文化会客厅。\n\n张雪松\n\n奉贤区博物馆馆长\n\n奉贤区博物馆在哪儿?\n\n1958年,原为江苏省管辖的奉贤县被划归上海市,成立奉贤区。奉贤区博物馆也于次年经上海市文物管理委员会批准建立。可没过多久,博物馆经营难以为继,被文化馆合并,直到1994年才重新恢复建制。据张雪松回忆,曾经有一二十年的时间,奉贤区博物馆馆址一直在迁移变动,场地、资源也很有限,处于一段“晃晃悠悠”的过渡时期。“每当有外来游客询问‘奉贤区博物馆在哪儿’,本地群众甚至连出租车司机都答不上来。奉贤在当时的确很缺乏一座固定的、完整的、能对外展示区域历史文化的博物馆。”张雪松说道。\n\n近几年,上海着力建设五大新城,奉贤新城也是其中之一,进入了发展快车道。2017年,奉贤区博物馆迎来了重要节点——新馆立项,在金海湖畔启动建设,占地面积约2万平方米,总建筑面积3.6万平方米。整体建筑由日本新生代建筑师藤本壮介设计,兼具当代建筑的时尚感和江南文化的韵味,由紫铜格栅和玻璃幕墙构成的外立面与周遭环境和谐统一。\n\n奉贤区博物馆新馆\n\n馆内设施则严格按照文物保护标准配备了恒温恒湿系统,这不仅需要大量的资金投入,也离不开张雪松及博物馆团队从动工开始的全程参与。在张雪松看来,博物馆不同于一般性建筑,要达到使用标准必须做好充分的前期准备工作,而奉贤区所处的海洋性气候也对文物保护提出了特殊的要求。\n\n“当时建设方见到我们就‘头痛’,但如果有些关键问题我们不去‘争一争’的话,在今后的运营中可能会遇到一些瓶颈或阻碍。比如说临展厅如果没能按照一级博物馆的要求建设,那么像故宫博物院、国家博物馆等机构的重要文物是不可能来这里展出的。”\n\n作为博物馆“掌门人”,张雪松其实从新馆立项那一天起就深感“压力山大”,曾经只需做好野外文物巡查等基础工作的“清闲日子一去不复返了”。面对着有更多可能性的新馆,承载着各方的期许,张雪松和奉博团队紧锣密鼓地对博物馆的蓝图展开了规划。\n\n外观这么漂亮、体量这么大的一座综合性文化场馆,如何才能办出有影响力的展览?奉博团队决定“无中生有,点石成金”。\n\n再给我们一个星期的时间!\n\n2019年5月16日,奉贤区博物馆新馆正式开馆。在展示当地历史文化遗存的常设展之外,一场“雍正故宫文物大展”在临展厅重磅开幕,展出了故宫博物院藏120余件书画、瓷器、玉器、珐琅器、漆器等,也创造了一次超出预期的首秀。\n\n对观众来说,在这家区级博物馆竟然能看到故宫文物大展,实在是震撼不已。为期3个月的展览共吸引了观众20多万人次,不少观众还从外地驱车甚至包机专程赶来,对于奉贤区博物馆来说,这个数字无疑是值得骄傲的。\n\n“雍正故宫文物大展”与奉贤区博物馆新馆一同揭幕。\n\n除了展览期间车水马龙、人头攒动的盛况,让张雪松印象尤其深刻的是,有一位老先生当时站在一件清雍正仿成化的斗彩盖罐面前仔细欣赏了3个小时,非常令人动容。“他说这是他看过的雍正斗彩中最漂亮的一件,之前从没见过这么多雍正文物公开展出。”诚然,这场雍正文物大展的成功背后有着诸多艰辛和不易。\n\n那么,首秀为何不做康熙、乾隆文物展,而“锁定”了在位时间较短、存世文物较少的雍正帝?据张雪松介绍,一方面是因为故宫博物院此前并未办过雍正文物专题展,而另一方面则是雍正帝与奉贤这片土地的渊源——奉贤区目前唯一的全国重点文物保护单位“华亭海塘”是雍正二年御批修筑的,作为防御海患、保卫家园的重要工程造福了此地人民,奉贤建县也是在雍正四年。\n\n雍正故宫文物展策划开启时,奉贤区博物馆新馆已经建成,当时故宫博物院安全技术处负责人到实地考察展厅环境,发现安全防护上还存在漏洞,不具备展出部分珍贵文物的条件,展览很可能会受影响。“请您再给我们一个星期的时间!”张雪松及工作团队在那一周内不眠不休,按照要求严格调整,终于让此次展览如期举行。珍藏于故宫博物院的雍正文物史无前例地荟萃于沪上,当中不少文物更是首次出宫亮相,一下子打响了名声。“奉贤区博物馆重开啦!”“新馆展览不一般!”等消息也迅速传开。\n\n开馆首展超高的人气和观众的好评如潮给了张雪松信心,他带着团队马不停蹄地又踏上了新的征程:与国家博物馆合作推出“追梦前行——共和国现代化之路”,与四川广汉三星堆博物馆、成都金沙遗址博物馆携手呈现“古蜀之光——三星堆·金沙遗址出土文物大展”,与陕西历史博物馆、秦始皇帝陵博物馆联合举办“与天无极——陕西周秦汉唐文物精华展”……数个重磅展览接连在奉贤区博物馆新馆登场,豪华展品阵容一个又一个,让观众目不暇接。\n\n奉贤区博物馆已成为沪上文化地标之一,吸引数十万观众一再前来打卡。\n\n“这里面的故事实在太多了,一把辛酸泪!”而当张雪松忆起这些展览的筹备经过,真可谓是一出出借展“历险记”。由于2020年至2022年还处在新冠肺炎疫情的影响下,无论是工作人员出行还是借展文物运输,都面临着复杂的情形和极大的挑战。为了让沪上观众一睹三星堆考古新发现,奉博团队大年初五就跑到四川商讨借展事宜“抢占”先机,受疫情影响被迫临时闭馆后给10万位预约观众一一电话通知到位;为了把秦始皇陵兵马俑原件“搬”到上海,让观众近距离看到秦朝工匠留下的指纹,张雪松费尽工夫、多方斡旋;“丹甲青文——中国汉字文物精华展”展品涉及全国10个省市、26家博物馆,奉博团队兵分六路,哪怕路途遥远、发着高烧也要护送展品安全抵达……每一场赢得喝彩的展览背后都有着道不尽的艰难与汗水。\n\n在张雪松看来,务必要让不远千里赶来的观众不虚此行,所以他们会为借来每一件文物真品力争到底。“最终目的还是为了服务好每一位观众。”\n\n每逢大展开启,观众在奉贤区博物馆外大排长龙的画面总会上演。\n\n“与天无极——陕西周秦汉唐文物精华展”难得地将兵马俑“请”到了沪上观众面前。\n\n油画修复就好比做手术。\n\n这5年来,奉贤区博物馆一方面不停地策划文物大展以飨观众,同时也不忘深耕硬实力——文物修复,并将其搬到了台前,向公众科普更多文物保护知识。今年3月启幕的这场“修复日记II——永不褪色的红”红色经典油画回顾与修复科技展览,就是一次备受关注的创新尝试。\n\n“修复日记II——永不褪色的红”向公众展示了油画修复工作的全过程。\n\n值得一说的是,奉贤区博物馆是目前上海唯一具有可移动油画文物修复资质的机构,一群年轻的油画修复师正在这里发光发热。而之所以选择主打油画修复这张王牌,张雪松表示,在我国可移动文物保护工作中,书画、陶瓷、青铜器等修复早已成为不少文博机构的强项,但油画保护与修复却少有人问津,可提升的空间还很大。\n\n现存于各地博物馆、纪念馆的现当代油画数量庞大,当中不乏重大历史题材作品,承载着一代人的红色记忆,极具历史、文化及艺术价值。但大多数油画没有进行文物定级,在保护与修复工作中缺乏制度、资金等方面的保障。全国精通油画修复的专家也不足百人,而且一件油画的修复过程往往需要油画艺术家、颜料研究专家、科技检测专家、修复师等多学科人才的通力合作。\n\n“油画并不是真的‘100年不变样’,哪怕是20世纪80年代的油彩,到如今已经光油老化、斑驳、起甲了,它们的损坏、病害程度是超乎人们想象的。”据张雪松介绍,奉贤区博物馆于2022年举办了第一场“修复日记”展,对比展示了一幅20世纪50年代的伊朗油画修复前后的模样。修复团队刚接手时发现该作老化、损坏情况触目惊心,经过一番光学成像分析诊断后,针对其病害的特殊性制定了专门的修复方案,最终让这件面目全非的作品重现真容。\n\n张雪松强调道,科技检测是尤其重要的一环。“我们博物馆的油画修复专家王方经常以‘做手术’来打比方,油画病害检测分析就像是医院检验科先出具数据报告,医生再有针对性地开刀。”由于中国油画与西方油画在材料、创作习惯、保存环境等方面存在较大差异,修复方式不能一概而论,需先经过科学诊断。奉贤区博物馆修复中心还收藏了新中国成立前后天津、上海等地生产的各品种颜料,计划收集数据以建立中国油画颜料数据库。“我们希望未来可以跟国外的油画颜料数据库打通,这也代表中国油画在世界上占据的重要一席之地。”\n\n展览现场展示了不同的油画材料测试分析之后的成果\n\n张雪松同时还指出,在目前的文保修复工作中,“检验科”与“主刀医生”二者处于一种割裂的局面——对于修复技艺传承人尤其是老一辈修复师来说,他们更依赖于口口相传的经验,对于科研数据不甚关注;与此同时,许多专业研究机构的数据成果并未投入到实践当中,研究仅止于数字。“我们倡导的是更科学的、可持续的文物保护,希望在油画修复领域做深、做透,从而影响整个行业的修复理念,也提升公众对油画保护的认知观念。”\n\n《中国收藏》杂志记者注意到,“修复日记”系列展览还引入了第三方机构的力量。张雪松表示,之所以将该系列展览交给安川机构这样的专业第三方承办,其实是对博物馆综合实力的一种补充。“双方在油画修复上意气相投,一同突破业界的传统思维模式,更好地实现博物馆与社会的良性互动。”\n\n奉贤区博物馆还基于展览推出了“小小名画修复师”课程,带领孩子们在欣赏作品的同时了解颜料的来源、色彩变化、画面微生物观察、特种成像技术等多学科的知识交互。\n\n从“展文物”到“修文物”,奉贤区博物馆的金字招牌一再擦亮,也得到了上级部门的格外重视,成为奉贤区文化建设中一个重要的高地、堡垒。每年政府都会鼎力提供几百万元的经费支持,这在全国范围内的区级博物馆当中都是绝无仅有的。\n\n“明年打算办什么展?”这是区领导每年必问张雪松的一个问题。在张雪松看来,与其说这是一种将工作越做越好的压力,不如说是一份不愿辜负的期待。他透露道,今年6月,一场科技文物精华展将在奉贤区博物馆重磅推出,立足于上海这个科学创新中心,带领观众重温中国科技发展史的辉煌成就。\n\n图丨奉贤区博物馆提供\n\n编辑丨丁晨\n\n校对丨子毅\n\n本文为原创,版权归中国收藏杂志所有,欢迎转发到朋友圈,未经授权不得转载。\n\n《中国收藏》杂志\n\n还不赶紧订一套!\n\n它们将带给您——\n\n多重享受\n\n一本杂志,还有“试听”双重体验。音频及视频号讲述的背后故事,都将在杂志独家呈现。\n\n有趣有料\n\n在“流量为王”的时代,《中国收藏》带您踏上探寻传统文化的奇妙之旅,静静享受一顿下午茶。\n\n创造无价\n\n一个月40元的投资,贵吗?知识无价,独立的观点无价,带给您的精神财富更无价。\n\n杂志每月1日出版 零售价40元\n\n全年12期 订阅价480元\n\n全国各地邮局均可订阅\n\n邮发代号2-688 订阅热线11185\n\n长按下方二维码\n\n关注更多精彩的《中国收藏》返回搜狐,查看更多", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "文 丨 本 刊 记 者 陈 曦 在 一 间 全 透 明 的 修 复 室 中 几 位 油 画 修 复 师 正 在 一 件 老 旧 皲 裂 的 大 幅 油 画 前 忙 碌 着 不 时 拿 起 各 种 高 精 仪 器 对 画 作 进 行 检 测 记 录 如 果 你 这 几 天 走 进 上 海 奉 贤 区 博 物 馆 新 馆 便 会 看 到 这 样 的 场 景 环 绕 着 这 间 玻 璃 修 复 室 的 还 有 不 少 曾 出 现 在 课 本 上 的 名 场 面 罗 工 柳 的 地 道 战 刘 耀 真 的 刘 胡 兰 俞 云 阶 的 吾 土 吾 民 刘 海 粟 的 打 铁 来 自 国 家 博 物 馆 中 华 艺 术 宫 上 海 美 术 馆 上 海 油 画 雕 塑 院 刘 海 粟 美 术 馆 等 机 构 的 20 余 件 红 色 经 典 油 画 汇 聚 一 堂 它 们 不 仅 唤 醒 了 观 众 脑 海 中 的 红 色 记 忆 也 展 现 了 近 半 个 多 世 纪 以 来 我 国 油 画 保 护 与 修 复 的 光 辉 成 果 修 复 日 记 ii 永 不 褪 色 的 红 展 览 现 场 这 场 修 复 日 记 ii 永 不 褪 色 的 红 红 色 经 典 油 画 回 顾 与 修 复 科 技 展 正 是 奉 贤 区 博 物 馆 今 春 呈 现 给 观 众 的 一 大 新 玩 法 不 过 这 只 是 近 年 来 在 该 馆 上 演 的 亮 眼 活 动 之 一 作 为 一 家 新 馆 其 此 前 还 推 出 了 雍 正 故 宫 文 物 大 展 古 蜀 之 光 三 星 堆 金 沙 遗 址 出 土 文 物 大 展 丹 甲 青 文 中 国 汉 字 文 物 精 华 展 等 重 量 级 大 展 这 座 规 模 不 大 的 区 级 博 物 馆 距 市 中 心 四 五 十 公 里 正 式 开 馆 才 5 年 藏 品 不 足 万 件 却 能 与 故 宫 博 物 院 国 家 博 物 馆 四 川 广 汉 三 星 堆 博 物 馆 等 重 要 文 博 机 构 携 手 办 展 吸 引 数 十 万 观 众 一 再 前 来 打 卡 它 到 底 有 什 么 魔 力 日 前 中 国 收 藏 杂 志 记 者 独 家 专 访 了 上 海 市 政 协 委 员 奉 贤 区 博 物 馆 馆 长 张 雪 松 自 20 世 纪 90 年 代 一 头 扎 进 博 物 馆 工 作 中 张 雪 松 近 30 年 来 见 证 着 曾 经 那 座 无 人 知 晓 的 奉 贤 区 博 物 馆 逐 渐 演 变 为 一 个 开 放 阳 光 温 度 的 文 化 会 客 厅 张 雪 松 奉 贤 区 博 物 馆 馆 长 奉 贤 区 博 物 馆 在 哪 儿 1958 年 原 为 江 苏 省 管 辖 的 奉 贤 县 被 划 归 上 海 市 成 立 奉 贤 区 奉 贤 区 博 物 馆 也 于 次 年 经 上 海 市 文 物 管 理 委 员 会 批 准 建 立 可 没 过 多 久 博 物 馆 经 营 难 以 为 继 被 文 化 馆 合 并 直 到 1994 年 才 重 新 恢 复 建 制 据 张 雪 松 回 忆 曾 经 有 一 二 十 年 的 时 间 奉 贤 区 博 物 馆 馆 址 一 直 在 迁 移 变 动 场 地 资 源 也 很 有 限 处 于 一 段 晃 晃 悠 悠 的 过 渡 时 期 每 当 有 外 来 游 客 询 问 奉 贤 区 博 物 馆 在 哪 儿 本 地 群 众 甚 至 连 出 租 车 司 机 都 答 不 上 来 奉 贤 在 当 时 的 确 很 缺 乏 一 座 固 定 的 完 整 的 能 对 外 展 示 区 域 历 史 文 化 的 博 物 馆 张 雪 松 说 道", "source_text": "文丨本刊记者 陈曦\n\n在一间全透明的“修复室”中,几位油画修复师正在一件老旧、皲裂的大幅油画前忙碌着,不时拿起各种高精仪器对画作进行检测、记录……如果你这几天走进上海奉贤区博物馆新馆,便会看到这样的场景。\n\n环绕着这间玻璃修复室的,还有不少曾出现在课本上的“名场面”——罗工柳的《地道战》、刘耀真的《刘胡兰》、俞云阶的《吾土吾民》、刘海粟的《打铁》……来自国家博物馆、中华艺术宫(上海美术馆)、上海油画雕塑院、刘海粟美术馆等机构的20余件红色经典油画汇聚一堂。它们不仅唤醒了观众脑海中的红色记忆,也展现了近半个多世纪以来我国油画保护与修复的光辉成果。\n\n“修复日记II——永不褪色的红”展览现场\n\n这场“修复日记II——永不褪色的红”红色经典油画回顾与修复科技展,正是奉贤区博物馆今春呈现给观众的一大“新玩法”。不过,这只是近年来在该馆上演的亮眼活动之一,作为一家新馆,其此前还推出了“雍正故宫文物大展”“古蜀之光——三星堆·金沙遗址出土文物大展”“丹甲青文——中国汉字文物精华展”等重量级大展。\n\n这座规模不大的区级博物馆,距市中心四五十公里,正式开馆才5年,藏品不足万件,却能与故宫博物院、国家博物馆、四川广汉三星堆博物馆等重要文博机构携手办展,吸引数十万观众一再前来打卡……它,到底有什么“魔力”?\n\n日前,《中国收藏》杂志记者独家专访了上海市政协委员、奉贤区博物馆馆长张雪松。自20世纪90年代一头扎进博物馆工作中,张雪松近30年来见证着曾经那座“无人知晓”的奉贤区博物馆,逐渐演变为一个“开放、阳光、温度”的文化会客厅。\n\n张雪松\n\n奉贤区博物馆馆长\n\n奉贤区博物馆在哪儿?\n\n1958年,原为江苏省管辖的奉贤县被划归上海市,成立奉贤区。奉贤区博物馆也于次年经上海市文物管理委员会批准建立。可没过多久,博物馆经营难以为继,被文化馆合并,直到1994年才重新恢复建制。据张雪松回忆,曾经有一二十年的时间,奉贤区博物馆馆址一直在迁移变动,场地、资源也很有限,处于一段“晃晃悠悠”的过渡时期。“每当有外来游客询问‘奉贤区博物馆在哪儿’,本地群众甚至连出租车司机都答不上来。奉贤在当时的确很缺乏一座固定的、完整的、能对外展示区域历史文化的博物馆。”张雪松说道。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:文丨本刊记者 陈曦 — 段落/内容单元:1958年,原为江苏省管辖的奉贤县被划归上海市,成立奉贤区。奉贤区博物馆也于次年经上海市文物管理委员会批准建立。可没过多", "source_line_range": [ 1, 22 ] }, { "id": "body-region-2", "text": "近 几 年 上 海 着 力 建 设 五 大 新 城 奉 贤 新 城 也 是 其 中 之 一 进 入 了 发 展 快 车 道 2017 年 奉 贤 区 博 物 馆 迎 来 了 重 要 节 点 新 馆 立 项 在 金 海 湖 畔 启 动 建 设 占 地 面 积 约 2 万 平 方 米 总 建 筑 面 积 3 6 万 平 方 米 整 体 建 筑 由 日 本 新 生 代 建 筑 师 藤 本 壮 介 设 计 兼 具 当 代 建 筑 的 时 尚 感 和 江 南 文 化 的 韵 味 由 紫 铜 格 栅 和 玻 璃 幕 墙 构 成 的 外 立 面 与 周 遭 环 境 和 谐 统 一 奉 贤 区 博 物 馆 新 馆 馆 内 设 施 则 严 格 按 照 文 物 保 护 标 准 配 备 了 恒 温 恒 湿 系 统 这 不 仅 需 要 大 量 的 资 金 投 入 也 离 不 开 张 雪 松 及 博 物 馆 团 队 从 动 工 开 始 的 全 程 参 与 在 张 雪 松 看 来 博 物 馆 不 同 于 一 般 性 建 筑 要 达 到 使 用 标 准 必 须 做 好 充 分 的 前 期 准 备 工 作 而 奉 贤 区 所 处 的 海 洋 性 气 候 也 对 文 物 保 护 提 出 了 特 殊 的 要 求 当 时 建 设 方 见 到 我 们 就 头 痛 但 如 果 有 些 关 键 问 题 我 们 不 去 争 一 争 的 话 在 今 后 的 运 营 中 可 能 会 遇 到 一 些 瓶 颈 或 阻 碍 比 如 说 临 展 厅 如 果 没 能 按 照 一 级 博 物 馆 的 要 求 建 设 那 么 像 故 宫 博 物 院 国 家 博 物 馆 等 机 构 的 重 要 文 物 是 不 可 能 来 这 里 展 出 的 作 为 博 物 馆 掌 门 人 张 雪 松 其 实 从 新 馆 立 项 那 一 天 起 就 深 感 压 力 山 大 曾 经 只 需 做 好 野 外 文 物 巡 查 等 基 础 工 作 的 清 闲 日 子 一 去 不 复 返 了 面 对 着 有 更 多 可 能 性 的 新 馆 承 载 着 各 方 的 期 许 张 雪 松 和 奉 博 团 队 紧 锣 密 鼓 地 对 博 物 馆 的 蓝 图 展 开 了 规 划 外 观 这 么 漂 亮 体 量 这 么 大 的 一 座 综 合 性 文 化 场 馆 如 何 才 能 办 出 有 影 响 力 的 展 览 奉 博 团 队 决 定 无 中 生 有 点 石 成 金 再 给 我 们 一 个 星 期 的 时 间 2019 年 5 月 16 日 奉 贤 区 博 物 馆 新 馆 正 式 开 馆 在 展 示 当 地 历 史 文 化 遗 存 的 常 设 展 之 外 一 场 雍 正 故 宫 文 物 大 展 在 临 展 厅 重 磅 开 幕 展 出 了 故 宫 博 物 院 藏 120 余 件 书 画 瓷 器 玉 器 珐 琅 器 漆 器 等 也 创 造 了 一 次 超 出 预 期 的 首 秀 对 观 众 来 说 在 这 家 区 级 博 物 馆 竟 然 能 看 到 故 宫 文 物 大 展 实 在 是 震 撼 不 已 为 期 3 个 月 的 展 览 共 吸 引 了 观 众 20 多 万 人 次 不 少 观 众 还 从 外 地 驱 车 甚 至 包 机 专 程 赶 来 对 于 奉 贤 区 博 物 馆 来 说 这 个 数 字 无 疑 是 值 得 骄 傲 的 雍 正 故 宫 文 物 大 展 与 奉 贤 区 博 物 馆 新 馆 一 同 揭 幕 除 了 展 览 期 间 车 水 马 龙 人 头 攒 动 的 盛 况 让 张 雪 松 印 象 尤 其 深 刻 的 是 有 一 位 老 先 生 当 时 站 在 一 件 清 雍 正 仿 成 化 的 斗 彩 盖 罐 面 前 仔 细 欣 赏 了 3 个 小 时 非 常 令 人 动 容 他 说 这 是 他 看 过 的 雍 正 斗 彩 中 最 漂 亮 的 一 件 之 前 从 没 见 过 这 么 多 雍 正 文 物 公 开 展 出 诚 然 这 场 雍 正 文 物 大 展 的 成 功 背 后 有 着 诸 多 艰 辛 和 不 易", "source_text": "近几年,上海着力建设五大新城,奉贤新城也是其中之一,进入了发展快车道。2017年,奉贤区博物馆迎来了重要节点——新馆立项,在金海湖畔启动建设,占地面积约2万平方米,总建筑面积3.6万平方米。整体建筑由日本新生代建筑师藤本壮介设计,兼具当代建筑的时尚感和江南文化的韵味,由紫铜格栅和玻璃幕墙构成的外立面与周遭环境和谐统一。\n\n奉贤区博物馆新馆\n\n馆内设施则严格按照文物保护标准配备了恒温恒湿系统,这不仅需要大量的资金投入,也离不开张雪松及博物馆团队从动工开始的全程参与。在张雪松看来,博物馆不同于一般性建筑,要达到使用标准必须做好充分的前期准备工作,而奉贤区所处的海洋性气候也对文物保护提出了特殊的要求。\n\n“当时建设方见到我们就‘头痛’,但如果有些关键问题我们不去‘争一争’的话,在今后的运营中可能会遇到一些瓶颈或阻碍。比如说临展厅如果没能按照一级博物馆的要求建设,那么像故宫博物院、国家博物馆等机构的重要文物是不可能来这里展出的。”\n\n作为博物馆“掌门人”,张雪松其实从新馆立项那一天起就深感“压力山大”,曾经只需做好野外文物巡查等基础工作的“清闲日子一去不复返了”。面对着有更多可能性的新馆,承载着各方的期许,张雪松和奉博团队紧锣密鼓地对博物馆的蓝图展开了规划。\n\n外观这么漂亮、体量这么大的一座综合性文化场馆,如何才能办出有影响力的展览?奉博团队决定“无中生有,点石成金”。\n\n再给我们一个星期的时间!\n\n2019年5月16日,奉贤区博物馆新馆正式开馆。在展示当地历史文化遗存的常设展之外,一场“雍正故宫文物大展”在临展厅重磅开幕,展出了故宫博物院藏120余件书画、瓷器、玉器、珐琅器、漆器等,也创造了一次超出预期的首秀。\n\n对观众来说,在这家区级博物馆竟然能看到故宫文物大展,实在是震撼不已。为期3个月的展览共吸引了观众20多万人次,不少观众还从外地驱车甚至包机专程赶来,对于奉贤区博物馆来说,这个数字无疑是值得骄傲的。\n\n“雍正故宫文物大展”与奉贤区博物馆新馆一同揭幕。\n\n除了展览期间车水马龙、人头攒动的盛况,让张雪松印象尤其深刻的是,有一位老先生当时站在一件清雍正仿成化的斗彩盖罐面前仔细欣赏了3个小时,非常令人动容。“他说这是他看过的雍正斗彩中最漂亮的一件,之前从没见过这么多雍正文物公开展出。”诚然,这场雍正文物大展的成功背后有着诸多艰辛和不易。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:近几年,上海着力建设五大新城,奉贤新城也是其中之一,进入了发展快车道。2017年,奉贤区博物馆迎来了重要节点——新馆立项 — 段落/内容单元:除了展览期间车水马龙、人头攒动的盛况,让张雪松印象尤其深刻的是,有一位老先生当时站在一件清雍正仿成化的斗彩盖罐面前仔细欣", "source_line_range": [ 23, 44 ] }, { "id": "body-region-3", "text": "那 么 首 秀 为 何 不 做 康 熙 乾 隆 文 物 展 而 锁 定 了 在 位 时 间 较 短 存 世 文 物 较 少 的 雍 正 帝 据 张 雪 松 介 绍 一 方 面 是 因 为 故 宫 博 物 院 此 前 并 未 办 过 雍 正 文 物 专 题 展 而 另 一 方 面 则 是 雍 正 帝 与 奉 贤 这 片 土 地 的 渊 源 奉 贤 区 目 前 唯 一 的 全 国 重 点 文 物 保 护 单 位 华 亭 海 塘 是 雍 正 二 年 御 批 修 筑 的 作 为 防 御 海 患 保 卫 家 园 的 重 要 工 程 造 福 了 此 地 人 民 奉 贤 建 县 也 是 在 雍 正 四 年 雍 正 故 宫 文 物 展 策 划 开 启 时 奉 贤 区 博 物 馆 新 馆 已 经 建 成 当 时 故 宫 博 物 院 安 全 技 术 处 负 责 人 到 实 地 考 察 展 厅 环 境 发 现 安 全 防 护 上 还 存 在 漏 洞 不 具 备 展 出 部 分 珍 贵 文 物 的 条 件 展 览 很 可 能 会 受 影 响 请 您 再 给 我 们 一 个 星 期 的 时 间 张 雪 松 及 工 作 团 队 在 那 一 周 内 不 眠 不 休 按 照 要 求 严 格 调 整 终 于 让 此 次 展 览 如 期 举 行 珍 藏 于 故 宫 博 物 院 的 雍 正 文 物 史 无 前 例 地 荟 萃 于 沪 上 当 中 不 少 文 物 更 是 首 次 出 宫 亮 相 一 下 子 打 响 了 名 声 奉 贤 区 博 物 馆 重 开 啦 新 馆 展 览 不 一 般 等 消 息 也 迅 速 传 开 开 馆 首 展 超 高 的 人 气 和 观 众 的 好 评 如 潮 给 了 张 雪 松 信 心 他 带 着 团 队 马 不 停 蹄 地 又 踏 上 了 新 的 征 程 与 国 家 博 物 馆 合 作 推 出 追 梦 前 行 共 和 国 现 代 化 之 路 与 四 川 广 汉 三 星 堆 博 物 馆 成 都 金 沙 遗 址 博 物 馆 携 手 呈 现 古 蜀 之 光 三 星 堆 金 沙 遗 址 出 土 文 物 大 展 与 陕 西 历 史 博 物 馆 秦 始 皇 帝 陵 博 物 馆 联 合 举 办 与 天 无 极 陕 西 周 秦 汉 唐 文 物 精 华 展 数 个 重 磅 展 览 接 连 在 奉 贤 区 博 物 馆 新 馆 登 场 豪 华 展 品 阵 容 一 个 又 一 个 让 观 众 目 不 暇 接 奉 贤 区 博 物 馆 已 成 为 沪 上 文 化 地 标 之 一 吸 引 数 十 万 观 众 一 再 前 来 打 卡 这 里 面 的 故 事 实 在 太 多 了 一 把 辛 酸 泪 而 当 张 雪 松 忆 起 这 些 展 览 的 筹 备 经 过 真 可 谓 是 一 出 出 借 展 历 险 记 由 于 2020 年 至 2022 年 还 处 在 新 冠 肺 炎 疫 情 的 影 响 下 无 论 是 工 作 人 员 出 行 还 是 借 展 文 物 运 输 都 面 临 着 复 杂 的 情 形 和 极 大 的 挑 战 为 了 让 沪 上 观 众 一 睹 三 星 堆 考 古 新 发 现 奉 博 团 队 大 年 初 五 就 跑 到 四 川 商 讨 借 展 事 宜 抢 占 先 机 受 疫 情 影 响 被 迫 临 时 闭 馆 后 给 10 万 位 预 约 观 众 一 一 电 话 通 知 到 位 为 了 把 秦 始 皇 陵 兵 马 俑 原 件 搬 到 上 海 让 观 众 近 距 离 看 到 秦 朝 工 匠 留 下 的 指 纹 张 雪 松 费 尽 工 夫 多 方 斡 旋 丹 甲 青 文 中 国 汉 字 文 物 精 华 展 展 品 涉 及 全 国 10 个 省 市 26 家 博 物 馆 奉 博 团 队 兵 分 六 路 哪 怕 路 途 遥 远 发 着 高 烧 也 要 护 送 展 品 安 全 抵 达 每 一 场 赢 得 喝 彩 的 展 览 背 后 都 有 着 道 不 尽 的 艰 难 与 汗 水 在 张 雪 松 看 来 务 必 要 让 不 远 千 里 赶 来 的 观 众 不 虚 此 行 所 以 他 们 会 为 借 来 每 一 件 文 物 真 品 力 争 到 底 最 终 目 的 还 是 为 了 服 务 好 每 一 位 观 众 每 逢 大 展 开 启 观 众 在 奉 贤 区 博 物 馆 外 大 排 长 龙 的 画 面 总 会 上 演", "source_text": "那么,首秀为何不做康熙、乾隆文物展,而“锁定”了在位时间较短、存世文物较少的雍正帝?据张雪松介绍,一方面是因为故宫博物院此前并未办过雍正文物专题展,而另一方面则是雍正帝与奉贤这片土地的渊源——奉贤区目前唯一的全国重点文物保护单位“华亭海塘”是雍正二年御批修筑的,作为防御海患、保卫家园的重要工程造福了此地人民,奉贤建县也是在雍正四年。\n\n雍正故宫文物展策划开启时,奉贤区博物馆新馆已经建成,当时故宫博物院安全技术处负责人到实地考察展厅环境,发现安全防护上还存在漏洞,不具备展出部分珍贵文物的条件,展览很可能会受影响。“请您再给我们一个星期的时间!”张雪松及工作团队在那一周内不眠不休,按照要求严格调整,终于让此次展览如期举行。珍藏于故宫博物院的雍正文物史无前例地荟萃于沪上,当中不少文物更是首次出宫亮相,一下子打响了名声。“奉贤区博物馆重开啦!”“新馆展览不一般!”等消息也迅速传开。\n\n开馆首展超高的人气和观众的好评如潮给了张雪松信心,他带着团队马不停蹄地又踏上了新的征程:与国家博物馆合作推出“追梦前行——共和国现代化之路”,与四川广汉三星堆博物馆、成都金沙遗址博物馆携手呈现“古蜀之光——三星堆·金沙遗址出土文物大展”,与陕西历史博物馆、秦始皇帝陵博物馆联合举办“与天无极——陕西周秦汉唐文物精华展”……数个重磅展览接连在奉贤区博物馆新馆登场,豪华展品阵容一个又一个,让观众目不暇接。\n\n奉贤区博物馆已成为沪上文化地标之一,吸引数十万观众一再前来打卡。\n\n“这里面的故事实在太多了,一把辛酸泪!”而当张雪松忆起这些展览的筹备经过,真可谓是一出出借展“历险记”。由于2020年至2022年还处在新冠肺炎疫情的影响下,无论是工作人员出行还是借展文物运输,都面临着复杂的情形和极大的挑战。为了让沪上观众一睹三星堆考古新发现,奉博团队大年初五就跑到四川商讨借展事宜“抢占”先机,受疫情影响被迫临时闭馆后给10万位预约观众一一电话通知到位;为了把秦始皇陵兵马俑原件“搬”到上海,让观众近距离看到秦朝工匠留下的指纹,张雪松费尽工夫、多方斡旋;“丹甲青文——中国汉字文物精华展”展品涉及全国10个省市、26家博物馆,奉博团队兵分六路,哪怕路途遥远、发着高烧也要护送展品安全抵达……每一场赢得喝彩的展览背后都有着道不尽的艰难与汗水。\n\n在张雪松看来,务必要让不远千里赶来的观众不虚此行,所以他们会为借来每一件文物真品力争到底。“最终目的还是为了服务好每一位观众。”\n\n每逢大展开启,观众在奉贤区博物馆外大排长龙的画面总会上演。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:那么,首秀为何不做康熙、乾隆文物展,而“锁定”了在位时间较短、存世文物较少的雍正帝?据张雪松介绍,一方面是因为故宫博物院 — 段落/内容单元:每逢大展开启,观众在奉贤区博物馆外大排长龙的画面总会上演。", "source_line_range": [ 45, 58 ] }, { "id": "body-region-4", "text": "与 天 无 极 陕 西 周 秦 汉 唐 文 物 精 华 展 难 得 地 将 兵 马 俑 请 到 了 沪 上 观 众 面 前 油 画 修 复 就 好 比 做 手 术 这 5 年 来 奉 贤 区 博 物 馆 一 方 面 不 停 地 策 划 文 物 大 展 以 飨 观 众 同 时 也 不 忘 深 耕 硬 实 力 文 物 修 复 并 将 其 搬 到 了 台 前 向 公 众 科 普 更 多 文 物 保 护 知 识 今 年 3 月 启 幕 的 这 场 修 复 日 记 ii 永 不 褪 色 的 红 红 色 经 典 油 画 回 顾 与 修 复 科 技 展 览 就 是 一 次 备 受 关 注 的 创 新 尝 试 修 复 日 记 ii 永 不 褪 色 的 红 向 公 众 展 示 了 油 画 修 复 工 作 的 全 过 程 值 得 一 说 的 是 奉 贤 区 博 物 馆 是 目 前 上 海 唯 一 具 有 可 移 动 油 画 文 物 修 复 资 质 的 机 构 一 群 年 轻 的 油 画 修 复 师 正 在 这 里 发 光 发 热 而 之 所 以 选 择 主 打 油 画 修 复 这 张 王 牌 张 雪 松 表 示 在 我 国 可 移 动 文 物 保 护 工 作 中 书 画 陶 瓷 青 铜 器 等 修 复 早 已 成 为 不 少 文 博 机 构 的 强 项 但 油 画 保 护 与 修 复 却 少 有 人 问 津 可 提 升 的 空 间 还 很 大 现 存 于 各 地 博 物 馆 纪 念 馆 的 现 当 代 油 画 数 量 庞 大 当 中 不 乏 重 大 历 史 题 材 作 品 承 载 着 一 代 人 的 红 色 记 忆 极 具 历 史 文 化 及 艺 术 价 值 但 大 多 数 油 画 没 有 进 行 文 物 定 级 在 保 护 与 修 复 工 作 中 缺 乏 制 度 资 金 等 方 面 的 保 障 全 国 精 通 油 画 修 复 的 专 家 也 不 足 百 人 而 且 一 件 油 画 的 修 复 过 程 往 往 需 要 油 画 艺 术 家 颜 料 研 究 专 家 科 技 检 测 专 家 修 复 师 等 多 学 科 人 才 的 通 力 合 作 油 画 并 不 是 真 的 100 年 不 变 样 哪 怕 是 20 世 纪 80 年 代 的 油 彩 到 如 今 已 经 光 油 老 化 斑 驳 起 甲 了 它 们 的 损 坏 病 害 程 度 是 超 乎 人 们 想 象 的 据 张 雪 松 介 绍 奉 贤 区 博 物 馆 于 2022 年 举 办 了 第 一 场 修 复 日 记 展 对 比 展 示 了 一 幅 20 世 纪 50 年 代 的 伊 朗 油 画 修 复 前 后 的 模 样 修 复 团 队 刚 接 手 时 发 现 该 作 老 化 损 坏 情 况 触 目 惊 心 经 过 一 番 光 学 成 像 分 析 诊 断 后 针 对 其 病 害 的 特 殊 性 制 定 了 专 门 的 修 复 方 案 最 终 让 这 件 面 目 全 非 的 作 品 重 现 真 容 张 雪 松 强 调 道 科 技 检 测 是 尤 其 重 要 的 一 环 我 们 博 物 馆 的 油 画 修 复 专 家 王 方 经 常 以 做 手 术 来 打 比 方 油 画 病 害 检 测 分 析 就 像 是 医 院 检 验 科 先 出 具 数 据 报 告 医 生 再 有 针 对 性 地 开 刀 由 于 中 国 油 画 与 西 方 油 画 在 材 料 创 作 习 惯 保 存 环 境 等 方 面 存 在 较 大 差 异 修 复 方 式 不 能 一 概 而 论 需 先 经 过 科 学 诊 断 奉 贤 区 博 物 馆 修 复 中 心 还 收 藏 了 新 中 国 成 立 前 后 天 津 上 海 等 地 生 产 的 各 品 种 颜 料 计 划 收 集 数 据 以 建 立 中 国 油 画 颜 料 数 据 库 我 们 希 望 未 来 可 以 跟 国 外 的 油 画 颜 料 数 据 库 打 通 这 也 代 表 中 国 油 画 在 世 界 上 占 据 的 重 要 一 席 之 地", "source_text": "“与天无极——陕西周秦汉唐文物精华展”难得地将兵马俑“请”到了沪上观众面前。\n\n油画修复就好比做手术。\n\n这5年来,奉贤区博物馆一方面不停地策划文物大展以飨观众,同时也不忘深耕硬实力——文物修复,并将其搬到了台前,向公众科普更多文物保护知识。今年3月启幕的这场“修复日记II——永不褪色的红”红色经典油画回顾与修复科技展览,就是一次备受关注的创新尝试。\n\n“修复日记II——永不褪色的红”向公众展示了油画修复工作的全过程。\n\n值得一说的是,奉贤区博物馆是目前上海唯一具有可移动油画文物修复资质的机构,一群年轻的油画修复师正在这里发光发热。而之所以选择主打油画修复这张王牌,张雪松表示,在我国可移动文物保护工作中,书画、陶瓷、青铜器等修复早已成为不少文博机构的强项,但油画保护与修复却少有人问津,可提升的空间还很大。\n\n现存于各地博物馆、纪念馆的现当代油画数量庞大,当中不乏重大历史题材作品,承载着一代人的红色记忆,极具历史、文化及艺术价值。但大多数油画没有进行文物定级,在保护与修复工作中缺乏制度、资金等方面的保障。全国精通油画修复的专家也不足百人,而且一件油画的修复过程往往需要油画艺术家、颜料研究专家、科技检测专家、修复师等多学科人才的通力合作。\n\n“油画并不是真的‘100年不变样’,哪怕是20世纪80年代的油彩,到如今已经光油老化、斑驳、起甲了,它们的损坏、病害程度是超乎人们想象的。”据张雪松介绍,奉贤区博物馆于2022年举办了第一场“修复日记”展,对比展示了一幅20世纪50年代的伊朗油画修复前后的模样。修复团队刚接手时发现该作老化、损坏情况触目惊心,经过一番光学成像分析诊断后,针对其病害的特殊性制定了专门的修复方案,最终让这件面目全非的作品重现真容。\n\n张雪松强调道,科技检测是尤其重要的一环。“我们博物馆的油画修复专家王方经常以‘做手术’来打比方,油画病害检测分析就像是医院检验科先出具数据报告,医生再有针对性地开刀。”由于中国油画与西方油画在材料、创作习惯、保存环境等方面存在较大差异,修复方式不能一概而论,需先经过科学诊断。奉贤区博物馆修复中心还收藏了新中国成立前后天津、上海等地生产的各品种颜料,计划收集数据以建立中国油画颜料数据库。“我们希望未来可以跟国外的油画颜料数据库打通,这也代表中国油画在世界上占据的重要一席之地。”", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:“与天无极——陕西周秦汉唐文物精华展”难得地将兵马俑“请”到了沪上观众面前。 — 段落/内容单元:张雪松强调道,科技检测是尤其重要的一环。“我们博物馆的油画修复专家王方经常以‘做手术’来打比方,油画病害检测分析就像是医", "source_line_range": [ 59, 74 ] }, { "id": "body-region-5", "text": "展 览 现 场 展 示 了 不 同 的 油 画 材 料 测 试 分 析 之 后 的 成 果 张 雪 松 同 时 还 指 出 在 目 前 的 文 保 修 复 工 作 中 检 验 科 与 主 刀 医 生 二 者 处 于 一 种 割 裂 的 局 面 对 于 修 复 技 艺 传 承 人 尤 其 是 老 一 辈 修 复 师 来 说 他 们 更 依 赖 于 口 口 相 传 的 经 验 对 于 科 研 数 据 不 甚 关 注 与 此 同 时 许 多 专 业 研 究 机 构 的 数 据 成 果 并 未 投 入 到 实 践 当 中 研 究 仅 止 于 数 字 我 们 倡 导 的 是 更 科 学 的 可 持 续 的 文 物 保 护 希 望 在 油 画 修 复 领 域 做 深 做 透 从 而 影 响 整 个 行 业 的 修 复 理 念 也 提 升 公 众 对 油 画 保 护 的 认 知 观 念 中 国 收 藏 杂 志 记 者 注 意 到 修 复 日 记 系 列 展 览 还 引 入 了 第 三 方 机 构 的 力 量 张 雪 松 表 示 之 所 以 将 该 系 列 展 览 交 给 安 川 机 构 这 样 的 专 业 第 三 方 承 办 其 实 是 对 博 物 馆 综 合 实 力 的 一 种 补 充 双 方 在 油 画 修 复 上 意 气 相 投 一 同 突 破 业 界 的 传 统 思 维 模 式 更 好 地 实 现 博 物 馆 与 社 会 的 良 性 互 动 奉 贤 区 博 物 馆 还 基 于 展 览 推 出 了 小 小 名 画 修 复 师 课 程 带 领 孩 子 们 在 欣 赏 作 品 的 同 时 了 解 颜 料 的 来 源 色 彩 变 化 画 面 微 生 物 观 察 特 种 成 像 技 术 等 多 学 科 的 知 识 交 互 从 展 文 物 到 修 文 物 奉 贤 区 博 物 馆 的 金 字 招 牌 一 再 擦 亮 也 得 到 了 上 级 部 门 的 格 外 重 视 成 为 奉 贤 区 文 化 建 设 中 一 个 重 要 的 高 地 堡 垒 每 年 政 府 都 会 鼎 力 提 供 几 百 万 元 的 经 费 支 持 这 在 全 国 范 围 内 的 区 级 博 物 馆 当 中 都 是 绝 无 仅 有 的 明 年 打 算 办 什 么 展 这 是 区 领 导 每 年 必 问 张 雪 松 的 一 个 问 题 在 张 雪 松 看 来 与 其 说 这 是 一 种 将 工 作 越 做 越 好 的 压 力 不 如 说 是 一 份 不 愿 辜 负 的 期 待 他 透 露 道 今 年 6 月 一 场 科 技 文 物 精 华 展 将 在 奉 贤 区 博 物 馆 重 磅 推 出 立 足 于 上 海 这 个 科 学 创 新 中 心 带 领 观 众 重 温 中 国 科 技 发 展 史 的 辉 煌 成 就 图 丨 奉 贤 区 博 物 馆 提 供 编 辑 丨 丁 晨 校 对 丨 子 毅 本 文 为 原 创 版 权 归 中 国 收 藏 杂 志 所 有 欢 迎 转 发 到 朋 友 圈 未 经 授 权 不 得 转 载 中 国 收 藏 杂 志 还 不 赶 紧 订 一 套 它 们 将 带 给 您 多 重 享 受 一 本 杂 志 还 有 试 听 双 重 体 验 音 频 及 视 频 号 讲 述 的 背 后 故 事 都 将 在 杂 志 独 家 呈 现 有 趣 有 料 在 流 量 为 王 的 时 代 中 国 收 藏 带 您 踏 上 探 寻 传 统 文 化 的 奇 妙 之 旅 静 静 享 受 一 顿 下 午 茶 创 造 无 价 一 个 月 40 元 的 投 资 贵 吗 知 识 无 价 独 立 的 观 点 无 价 带 给 您 的 精 神 财 富 更 无 价 杂 志 每 月 1 日 出 版 零 售 价 40 元 全 年 12 期 订 阅 价 480 元 全 国 各 地 邮 局 均 可 订 阅 邮 发 代 号 2 688 订 阅 热 线 11185 长 按 下 方 二 维 码 关 注 更 多 精 彩 的 中 国 收 藏 返 回 搜 狐 查 看 更 多", "source_text": "展览现场展示了不同的油画材料测试分析之后的成果\n\n张雪松同时还指出,在目前的文保修复工作中,“检验科”与“主刀医生”二者处于一种割裂的局面——对于修复技艺传承人尤其是老一辈修复师来说,他们更依赖于口口相传的经验,对于科研数据不甚关注;与此同时,许多专业研究机构的数据成果并未投入到实践当中,研究仅止于数字。“我们倡导的是更科学的、可持续的文物保护,希望在油画修复领域做深、做透,从而影响整个行业的修复理念,也提升公众对油画保护的认知观念。”\n\n《中国收藏》杂志记者注意到,“修复日记”系列展览还引入了第三方机构的力量。张雪松表示,之所以将该系列展览交给安川机构这样的专业第三方承办,其实是对博物馆综合实力的一种补充。“双方在油画修复上意气相投,一同突破业界的传统思维模式,更好地实现博物馆与社会的良性互动。”\n\n奉贤区博物馆还基于展览推出了“小小名画修复师”课程,带领孩子们在欣赏作品的同时了解颜料的来源、色彩变化、画面微生物观察、特种成像技术等多学科的知识交互。\n\n从“展文物”到“修文物”,奉贤区博物馆的金字招牌一再擦亮,也得到了上级部门的格外重视,成为奉贤区文化建设中一个重要的高地、堡垒。每年政府都会鼎力提供几百万元的经费支持,这在全国范围内的区级博物馆当中都是绝无仅有的。\n\n“明年打算办什么展?”这是区领导每年必问张雪松的一个问题。在张雪松看来,与其说这是一种将工作越做越好的压力,不如说是一份不愿辜负的期待。他透露道,今年6月,一场科技文物精华展将在奉贤区博物馆重磅推出,立足于上海这个科学创新中心,带领观众重温中国科技发展史的辉煌成就。\n\n图丨奉贤区博物馆提供\n\n编辑丨丁晨\n\n校对丨子毅\n\n本文为原创,版权归中国收藏杂志所有,欢迎转发到朋友圈,未经授权不得转载。\n\n《中国收藏》杂志\n\n还不赶紧订一套!\n\n它们将带给您——\n\n多重享受\n\n一本杂志,还有“试听”双重体验。音频及视频号讲述的背后故事,都将在杂志独家呈现。\n\n有趣有料\n\n在“流量为王”的时代,《中国收藏》带您踏上探寻传统文化的奇妙之旅,静静享受一顿下午茶。\n\n创造无价\n\n一个月40元的投资,贵吗?知识无价,独立的观点无价,带给您的精神财富更无价。\n\n杂志每月1日出版 零售价40元\n\n全年12期 订阅价480元\n\n全国各地邮局均可订阅\n\n邮发代号2-688 订阅热线11185\n\n长按下方二维码\n\n关注更多精彩的《中国收藏》返回搜狐,查看更多", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:展览现场展示了不同的油画材料测试分析之后的成果 — 段落/内容单元:关注更多精彩的《中国收藏》返回搜狐,查看更多", "source_line_range": [ 75, 123 ] } ], "ending": { "text": "价。\n\n杂志每月1日出版 零售价40元\n\n全年12期 订阅价480元\n\n全国各地邮局均可订阅\n\n邮发代号2-688 订阅热线11185\n\n长按下方二维码\n\n关注更多精彩的《中国收藏》返回搜狐,查看更多" } } }, { "id": "article-017", "name": "馆长对话录:从上博东馆开始", "url": "https://www.thepaper.cn/newsDetail_forward_26223402", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "馆长对话录|褚晓波:从上博东馆开始,看这股上博“龙卷风”" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "顾村言 陈若茜" ] }, { "id": "stable-3", "alternatives": [ "古代艺术" ] }, { "id": "stable-4", "alternatives": [ "要闻" ] }, { "id": "stable-5", "alternatives": [ "精选" ] }, { "id": "stable-6", "alternatives": [ "国际" ] }, { "id": "stable-7", "alternatives": [ "时事" ] }, { "id": "stable-8", "alternatives": [ "财经" ] }, { "id": "stable-9", "alternatives": [ "地球" ] }, { "id": "stable-10", "alternatives": [ "上海书评" ] }, { "id": "stable-11", "alternatives": [ "思想" ] }, { "id": "stable-12", "alternatives": [ "更多" ] }, { "id": "stable-13", "alternatives": [ "下载客户端" ] }, { "id": "stable-14", "alternatives": [ "登录" ] }, { "id": "stable-15", "alternatives": [ "无障碍" ] }, { "id": "stable-16", "alternatives": [ "听全文" ] }, { "id": "stable-17", "alternatives": [ "字号" ] }, { "id": "stable-18", "alternatives": [ "收藏" ] }, { "id": "stable-19", "alternatives": [ "我要举报" ] }, { "id": "stable-20", "alternatives": [ "相关推荐" ] }, { "id": "stable-21", "alternatives": [ "评论" ] }, { "id": "stable-22", "alternatives": [ "发表" ] }, { "id": "stable-23", "alternatives": [ "展开更多" ] }, { "id": "stable-24", "alternatives": [ "查看更多" ] }, { "id": "stable-25", "alternatives": [ "开始答题" ] }, { "id": "stable-26", "alternatives": [ "澎湃新闻,未经授权不得转载" ] }, { "id": "stable-27", "alternatives": [ "扫码下载" ] }, { "id": "stable-28", "alternatives": [ "澎湃新闻客户端" ] }, { "id": "stable-29", "alternatives": [ "Android版" ] }, { "id": "stable-30", "alternatives": [ "iPhone版" ] }, { "id": "stable-31", "alternatives": [ "iPad版" ] }, { "id": "stable-32", "alternatives": [ "关于澎湃" ] }, { "id": "stable-33", "alternatives": [ "加入澎湃" ] }, { "id": "stable-34", "alternatives": [ "联系我们" ] }, { "id": "stable-35", "alternatives": [ "广告合作" ] }, { "id": "stable-36", "alternatives": [ "法律声明" ] }, { "id": "stable-37", "alternatives": [ "隐私政策" ] }, { "id": "stable-38", "alternatives": [ "澎湃矩阵" ] }, { "id": "stable-39", "alternatives": [ "新闻报料" ] }, { "id": "stable-40", "alternatives": [ "反馈" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete interview flows from video caption and lead through four named interview sections and final collection-policy answer. Read-only DOM and beginning/middle/end screenshots confirm no clipping or modal; image placeholders do not conceal textual captions. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "馆长对话录|褚晓波:从上博东馆开始,看这股上博“龙卷风”" ], "html_selector": "h1.title__FIwxD,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": ".ant-comment.costomComment__XAR1T", "author_selector": ".ant-comment-content-author-name > a", "body_selector": "[class^=\"content__\"]", "id_attribute": "id", "section_markers": [ "评论", "新评论" ], "version": 2, "minimum_comments": 4, "text_scope": { "body_end": "时中央文化部和华东军管委批准设立筹建上海博物馆,给上博的定位是艺术博物馆。七十多年过去了,对上博而言我们开拓现当代艺术收藏是没有任何问题,因为跟它的定位是吻合的。未来,上海博物馆也会在这方面加大力度。", "end_markers": [ "加载中", "关于澎湃" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-017/comment-qualification-reference-r5.json", "sha256": "8d6431d58f8b934a45eb7a2b09509e1406bbe5f390de4bc5e40d0077225a7419", "chars": 1607, "record_count": 4 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 4, "qualification_only": true } }, "ground_truth_main_content": "褚晓波:今年是龙年,上博要刮起一股“龙卷风”(05:00)\n\n千呼万唤始出来,备受关注的上海博物馆东馆终于揭开面纱。\n\n建馆70多年的上海博物馆于2024年2月2日上午迎来了重要历史时刻:从2017年9月27日在浦东打下了上海博物馆东馆第一根桩基开始,历经六年多的建设,到2024年2月2日,终于建成并正式启用,上博东馆总建筑面积达11.32万平方米,陈列展示面积约3.36万平方米,将在2024年内分三步陆续开放:今天起,上博东馆青铜展厅将率先试开放,并同步推出“星耀中国——三星堆·金沙古蜀文明展”特展,6月底前,东馆开放面积将达到展陈空间的80%,11月底前,上博东馆实现全面开放。\n\n在上博东馆试开放前,上海博物馆馆长褚晓波接受了澎湃新闻的专访,详解上海博物馆的最新定位、展览展陈及未来构想:\n\n“上博东馆将以全世界独一无二的全景式大格局,更好讲述深厚的中华文脉,让展览‘火’起来。”褚晓波说,“东馆开馆以后,人民广场馆的定位是什么,这是我们一直思考的问题,全国六千多家博物馆中,目前为止还没有一家能真正常态化展示世界文明和艺术的场馆。在上海这一国际化程度非常高的城市,能否利用上海博物馆人民广场这一地理位置优势,把人民广场馆打造成为中国第一个能常态化展示世界文明和艺术的重要场所。”\n\n“现在的博物馆都很卷,在新近公布的2024年展览计划中,上博将史无前例,推出十八个特展,所以我说今年是龙年,上博要刮起一股‘龙卷风’。”\n\n“上海博物馆的定位是世界顶级的中国古代艺术博物馆,其实上博在1952年成立之初,上博的定位是艺术博物馆,对上博而言,我们今后开拓现当代方面的艺术收藏并没有任何问题。”\n\n上海博物馆东馆俯视图\n\n上海博物馆东馆\n\n “上博是取之不竭的文化宝库”\n\n澎湃新闻:还是先从您个人开始聊起。您到上博工作也已经一年半了,谈谈您的心路变化。您如何理解过去的上海博物馆,以及未来的上海博物馆?\n\n褚晓波:我之前一直在上海的政府部门工作,分管上海的文物保护、博物馆建设等工作。来到上博以后,我的感受是完全不同的,因为上海博物馆是以上海这座城市命名的博物馆,上博的气质和上海这座城市的精神品格是非常契合的,上海“海纳百川、追求卓越、开明睿智、大气谦和”的城市精神和“开放、创新、包容”的城市品格都能在上海博物馆找到很多契合点。一些专家研究指出,上海“海纳百川”的城市精神,早在宋元时期这一区域已经有这种气象存在,就艺术领域而言,在元代特别是明代,已经有很多当时的艺术大家汇聚在上海这个区域,像元四家黄公望曾居松江,包括以松江董其昌为代表的松江画派,很多艺术家是在上海形成他们的艺术风格。\n\n褚晓波(右二)在“对话达·芬奇”布展现场\n\n上海博物馆有着丰富的馆藏,我到上海博物馆担任馆长,觉得这是一个取之不竭的文化宝库,可以让我学到的东西非常多,也给我另外一重压力是对知识储备的恐慌。上海博物馆收藏有超过一百多万件文物,目前文物门类超过33大类,是全球中国古代艺术门类最齐全的博物馆,这也是上海博物馆通过七十多年的努力积攒下来的文化财富,面对如此庞大的收藏体系,未来怎么样把这些文物资源激活,让文物活起来,更好地发挥文物的育人作用,发挥它们的最大价值,这里有非常多的工作要做,作为馆长我深感责任重大。这一年半多的时间,我深以能在上博工作为荣。对我个人自身的发展来说,也是我人生当中最幸运的一个阶段。上海博物馆出台的“大博物馆计划”,不管从硬件建设还是软实力的提升,未来都有非常大的空间,也是上海博物馆全体员工需要共同绘就的宏伟蓝图。现在的关键是如何把这些宏伟的目标,通过我们一代代上博人的努力去实现,应该说未来的路很长,但我也坚信我们碰上了一个非常好的时代,如何在新时代担负起新的文化使命?归纳起来三句话,一是弘扬中华优秀传统文化,这也是上海博物馆最大的资源优势,我们有这么多的文物收藏,一定要把它们弘扬好;二是推动高质量的发展,我们经过了七十多年的努力和积累,未来我们很多工作方式一定要打破常规,推动高质量的发展;三是将上博打造成为具有世界美誉度的城市文化地标,这就是我们上海博物馆接下来一个重要的新文化使命。\n\n上海博物馆东馆\n\n上海博物馆东馆内部\n\n作为上博的一馆之长,要做的事情真的非常多,相信在上海市委市政府的支持下,我们上博人通过奋力一跳,力争把博物馆的功能发挥到更大。\n\n澎湃新闻:上博有着自己的文脉与精神,您认为上博最重要的精神和传统体现在哪里?您对上海博物馆的立馆之本、文脉、传承如何理解?\n\n褚晓波:我认为上海博物馆历经七十多年发展积淀,闪现出很多上博精神。首先是对标世界一流,追求卓越的目标,这是上博人长期以来的追求。全球博物馆数量不计其数,中国的博物馆数量也已经达到6500多家,如何在众多博物馆当中发挥影响力、号召力,意味着我们一定要有非常高的追求,而这要求我们首先从我们的工作基础入手。博物馆的工作基础核心就是两个,馆藏和研究,所谓固本强基,这个“本”就是藏品,“基”就是研究,在这两个方面我们都有对标世界一流的目标,我相信上博一定可以做到独树一帜。\n\n上海博物馆东馆青铜馆\n\n上海博物馆人民广场馆中国古代陶瓷馆的陈列\n\n一座博物馆如果没有馆藏,那就不能称之为博物馆,可能是一个展览馆。如果没有研究,那就没有文化话语权,这个博物馆就无异于一个文物的库房。七十多年来,上博人在收藏和研究这两方面是花了大力气的。我们为什么拥有超过一百万件的文物收藏,这在全中国乃至全世界都是为数不多的,而且在文物征集过程中我们有意识地去收藏各大门类的藏品;上博同样非常注重学术研究、人才培养,一直强调学术立馆,多年来在博物馆界培养了很多领域的知名专家。\n\n当然,我们还有团结协作的精神,可能很多领域单枪匹马也能干,但博物馆是一个需要团队合作才能推动发展的单位,上海博物馆有很多业务部门,也有很多综合管理部门,做任何一件事都需要大家齐心协力、共同推动,所以说我们上海博物馆的凝聚力特别强,这也是我们多年来的传统。\n\n我来到上博以后,跟馆里的同事沟通想法达成共识以后,大家就心往一处使,朝着一个共同的目标努力,才能办成很多大事。比如我们每举办一个展览,涉及到多个部门的跨部门合作,首先要有策展人,形成策展思路,然后开始挑选相关文物,除了上博以外,我们还要调动全球博物馆的资源,也是需要很多人力去沟通努力,现在文物借展难度很大,都是大家争抢的稀缺资源,每场展览的需要上博人付出艰苦的努力。\n\n上博东馆  “星耀中国——三星堆·金沙古蜀文明展”展览现场\n\n举个例子,马上要配合东馆启用推出的“星耀中国——三星堆·金沙古蜀文明展”,这个展览从开始筹备到现在即将开幕,过程中也是历经坎坷,包括文物的借展,非常艰难。三星堆遗址因为这几年考古新发现非常多,可以说是全球的热门话题,去商借文物的博物馆非常多,这也增加了我们办展难度。\n\n上博东馆  “星耀中国——三星堆·金沙古蜀文明展”展览现场\n\n澎湃新闻:听说你们为了三星堆特展,单单去四川就去了五趟是吗?\n\n褚晓波:对,我和主管我们的领导专门去四川,我们俩加起来就飞了五次。这次参展文物超过360多件,借展的文物涉及全国11个省市自治区,大概有25个地级市,光把这些文物汇聚到上海,我们就跑了1.6万公里。一个高品质展览的诞生,除了有重磅文物,还要有好的陈列设计才能吸引观众。此外,我们每一个展览都会有很多配套,比如文创产品、教育活动等,所以我们所谓的“现象级大展”肯定不是一个部门,更不可能是某一个个人能办成的,需要全馆上下通力合作。\n\n把文物考古大展办成“连续剧”\n\n澎湃新闻:讲到展览,展览的策划是博物馆的抓手之一,也是与观众直接对话的载体,你之前提出,上博东馆将以全世界独一无二的全景式大格局,更好讲述深厚的中华文脉,让展览“火”起来,其实,上博的展览可以说办一个火一个,从轰动的“英国国家美术馆珍藏展”,“何以中国”——崧泽·良渚文明考古特展到当下正在举办的“对话达·芬奇”大展。上海博物馆主打的两大展览品牌“对话世界”文物艺术大展系列和“何以中国”文物考古大展系列的策划脉络愈显清晰。从目前已经推出的展览项目来看,这两大展览系列是按照你们预初的设想在推进么,后续还有哪些展览规划?\n\n褚晓波:上海博物馆出台“大博物馆计划”以后,重点聚焦三大展览品牌,其中有一个是主打中华文化走出去“百物看中国”文物艺术出境大展系列,还有两个是在上海博物馆举办,一个是“何以中国”文物考古大展系列,另一个是“对话世界”文物艺术大展系列。为什么会形成这两大系列的想法?最初我们没有意识到需要去打造一个品牌,随着策划的深入,发现我们的中华文明探源工程出现非常多最新成果,每年都有非常重要的考古新发现,这些是非常重要的可以做展览的资源。因为策划展览得不断有新的内容或者新的策展理念,不能总是去炒冷饭。所以在“宅兹中国——河南夏商周三代文明展”策划过程中,我们觉得聚焦中华文明探源工程是一个非常重要的选题,而且相信这个选题的内容让我们可以至少做十年以上,特别是从中华文明满天星斗,多元一体的大格局出发。所以我们是先有“宅兹中国”,再把它提升为“何以中国”文物考古大展系列。\n\n“宅兹中国——河南夏商周三代文明展” 展览现场的“鸮尊”\n\n基于这个顶层设计,在“宅兹中国——河南夏商周三代文明展”开幕以后,我们就在思考下一个主题。经过论证,我们认为首展聚焦黄河流域文明,第二展应该回到长江流域,长江黄河都是中华文明重要的发源地之一,所以我们第二展叫“实证中国——崧泽·良渚文明考古特展”,这两期展览举办完之后,发现“何以中国”品牌已经深入人心,观众像追连续剧一样追着看“何以中国1”、“何以中国2”,也非常期待“何以中国3”是什么。所以在去年“实证中国”举办后,就在紧密地筹备第三展“星耀中国——三星堆·金沙古蜀文明展览”,把目光聚焦到长江上游,讲好古蜀文明的故事。其实“三星堆展览”还没正式开幕,我们的“何以中国4”已经在策划中了,上海博物馆每年至少会推出一个“何以中国”系列大展,我们也有信心要一直做下去。\n\n “实证中国:崧泽·良渚文明考古特展”展览现场\n\n“对话世界”系列现在已经举办了三期,第一期是疫情期间举办的“东西汇融——中欧陶瓷与文化交流特展”。举办这个展览的时候,还没有把它归到“对话世界”系列,但在展览过程中,我们觉得上海博物馆长期以来跟海内外的很多博物馆都有着紧密联系,上博历史上也举办过非常多跟全球机构合作的大展,应该让它形成一个系列品牌,聚焦东西方文化交流,凸显上海博物馆全球资源配置能力,于是就把“东西汇融——中欧陶瓷与文化交流特展”纳入到“对话世界”系列的第一期,因为它确实是通过瓷器勾连起东西方的文化交流。第二期是就去年举办的“从波提切利到梵高——英国国家美术馆珍藏展”,这个展览非常成功,得益于天时地利人和几方面的多重原因,这个展览最后成为一个“现象级大展”。\n\n“英国国家美术馆珍藏展”展览现场\n\n“英国国家美术馆珍藏展”展览现场\n\n这个展览成为“爆款”以后,我们也冷静做了分析,展览是非常成功的,但我们也觉得有很多遗憾,因为这个展览所有的展品都来自英国国家美术馆,讲述的是西方绘画四百年的历史,我们觉得遗憾的地方是缺少文化交流的对话。对于上海博物馆而言,我们不能只是一味简单地引进展览,虽然这是现在大多数博物馆的通行做法,从上海博物馆的长远发展来看,我们希望能突出我们的国际文化话语权,就需要开展这种对话。\n\n“对话达·芬奇”展览现场\n\n所以在“对话世界”系列第三期,我们聚焦的是“对话达·芬奇”,这次是中意双方各拿出18件艺术珍品,开展跨时空、跨地域的艺术对话。这是我们第一次举办东西方绘画艺术对比展,展览推出以后也给大家带来耳目一新的感觉。当然这是我们第一次尝试这种形式,相信很多观众也会提出自己的疑惑,比如如何开展对话,对话的点在哪里。虽然这一次我们做得还不够特别完美,但是“对话达·芬奇”开了先河,我们迈出的这一步非常重要,上海博物馆一定要通过自己的展览,来增强国人的文化自信,未来我们也会举办越来越多这种对话类型的展览。\n\n阿蒙荷太普四世雕像 18王朝(公元前1550-1295年) 砂岩 埃及国家博物馆藏\n\n这两个系列品牌的打造都给观众留下了深刻印象,在上次新闻发布会上我们也对外公布了“对话世界”第四个展览是“金字塔之巅——古埃及文明大展”,聚焦古埃及文明。在这个展览中,我们同样会开展两个文明古国之间的对话,当然核心的展品主要来自埃及国家博物馆、卢克索博物馆等埃及重点博物馆的文物精品,同时我们也会加入代表中华文明的重要代表性文物,开展两个文明古国的文化对话,我相信这个展览也会引起广泛关注。\n\n上博龙年要刮“龙卷风”\n\n澎湃新闻:在新近公布的2024年展览计划中,上博将史无前例,推出十八个特展。其中本地是十四个,还有多个展览涉及现当代艺术和时尚方面的,算是上博之前较少涉略的领域,可以体现出你们展览思路的哪些变化?\n\n褚晓波:上海博物馆今年因为新开了东馆,加上人民广场馆继续对公众开放,这两处馆舍是最重要的文化阵地,我们肯定要把空间利用好,很早以前我们就在积极策划2024年相关的展览,今年人民广场馆有八个特展,东馆有六个特展,加起来就有十四个,还会同步推进“走出去”文物出境展览,还有国内其他博物馆的展览,总数加起来肯定会超过二十个,所以我说今年是龙年,上博要刮起一股“龙卷风”。\n\n现在全国的博物馆都很卷,大家都很卖力,希望能给市民、游客提供丰富多彩的文化产品,其实展览是拉近观众和博物馆距离的一个最重要的手段。大家都这么用力,上博肯定不甘落后,我们肯定要在这方面发挥优势。今年我们策划的选题也是非常多样,既有“何以中国”系列,还有“对话世界”系列。“对话世界”系列除了古埃及文明以外,还有聚焦古波斯文明,我们会持续推出聚焦世界文明类型的展览,把这项工作一步步做下去。\n\n陶来通杯 铁器时代二期(约公元前1150-前850年) 伊朗马尔力克遗址出土 伊朗国家博物馆藏\n\n除了文物类展览,还有绘画艺术类的展览,比如正在进行的“对话达·芬奇”。除了古代文物艺术品,今年还会聚焦现当代艺术,为什么我们会开始关注现当代艺术?我们发现年轻人对现当代艺术是非常感兴趣的,年轻人也是上海博物馆非常重要的一个观众群体,我们也要举办一些年轻人喜欢的现当代艺术展览。当然上海博物馆的现当代艺术展我们还是设置了非常高的门槛,聚焦一些在国际上享有盛誉的大师级人物,比如今年将要举办的是“拾慧古今”现当代艺术大师系列首展“千年万念:陈世英半世纪珠宝艺术展”。在现当代艺术展中,我们还是比较强调古今对话,因为任何一位现当代艺术大师,他们的很多灵感也是来自于传统文化,所以我们在展览中会呈现文物跟现当代艺术之间的对话。\n\n唐 孙位《高逸图卷》(局部),上海博物馆藏\n\n澎湃新闻:书法与绘画的特展一直是上博的强项,在公众中影响力极大,上博前些年策划的董其昌大展、吴湖帆大展,以其原创性与学术深度极受好评,今后在书画方面还有哪些深度策划。比如说,有没有策划对中国书画史研究有着巨大意义的大展,比如利用东馆的巨大展厅与上博馆藏的优势,梳理“元四家”、“清代四僧”等,我们知道,上博在元四家的收藏方面有着巨大的优势,在八大山人、石涛收藏方面同样更有着巨大的优势,这样的策划如果形成全球总动员,可能也只能上博的策划与呈现最让人期待,有没有可能继续形成一个书画系列大展?\n\n上博收藏的元代倪瓒山水画\n\n褚晓波:上海博物馆展览历史上策划过很多非常成功的书画方面的展览,之前也推出过书画专题研究系列之“海上三部曲”,从“吴湖帆书画鉴藏展”、“丹青宝筏——董其昌书画艺术展”到反映中国书画史脉络的“万年长春:上海历代书画艺术特展”。对上博而言,未来如何策划更多与众不同的与书画相关的展览还是至关重要的。上海博物馆的历代书画收藏非常丰富,素有江南半壁江山之说。在馆藏的100万余件文物中,书画类一级品数量占馆藏文物一级品数量近一半,也可见藏品质量之高。我们书画收藏的体系是非常完整的,目前为止,全世界所有博物馆、艺术馆中,能够举办中国历代书法和历代绘画常设展的只有上海博物馆。基于这样丰富的馆藏资源,在未来东馆的展陈体系中,书画所占的比重是非常大的,除了书法、绘画的通史陈列,还有“海上书画”专题展览。\n\n五代 徐熙《雪竹图轴》\n\n书画类文物是非常脆弱的,对文物保护要求是最高级别的。一般一件古代书画真迹常规展示两三个月就要回到库房养护休眠。上海博物馆书画文物的展示条件相对来说比较好,除了展厅内有中央空调系统,展柜中还有精密的书画独立温湿调控系统,可以保证书画文物展出时具备非常好的恒温恒湿环境,所以我们书画馆的展品展出时间可以达到六个月。上海博物馆的中国古代书画通史常设展将有6套可供轮换的馆藏书画精品,保证每一件作品展出以后,在未来三年里是可以得到休息的,这也是上海博物馆的优势所在。\n\n“吴湖帆书画鉴藏特展”展览现场 董其昌《烟江叠嶂图》\n\n书画类特展肯定是上博展览的重点之一,我们现在也在策划未来书画类的大展,未来上博在书画方面肯定也要策划更多的、更加有创新性的展览,尤其是与江南文化相关的中国书画史上的名家大家特展。\n\n打造中国首个常态化“世界文明馆”\n\n澎湃新闻:讲到“对话世界”,上博一直在不遗余力地做中外文化交流。从上博三馆定位来看,不论是人民广场馆旨在成为“中国看世界”的枢纽平台,还是东馆“世界看中国”的窗口,都格外强调文化交流的重要意义,在展览展示上也留足了空间,你们是如何考虑的?\n\n褚晓波:一个比较现实的问题是,东馆开馆以后,人民广场馆的定位是什么,这是我们一直思考的问题,否则也会给观众带来困惑,所以我们在筹备新馆的过程中也在思考人民广场馆未来它重点聚焦在哪里?我们梳理了上博自身的资源,以及与国际知名文物艺术机构多年来积攒下来的合作关系,希望将人民广场馆打造成一个在中国看世界的“世界文明馆”。在全国六千多家博物馆中,目前为止还没有一家能真正常态化展示世界文明和艺术的场馆。在上海这一国际化程度非常高的城市,能否利用上海博物馆人民广场这一地理位置优势,把人民广场馆打造成为中国第一个能常态化展示世界文明和艺术的重要场所,这是我们的一些思考。\n\n上海博物馆人民广场馆\n\n人民广场馆等候入场的观众\n\n过去我们征集和收藏的重点中国古代的文物艺术品,未来我们将依托馆藏1万余件(套)较成体系的外国文物为基础,启动全球文物艺术征集工作。这符合国际一流博物馆的发展潮流。目前我们已经对外释放这样的信号,欢迎全世界各地的热心人士、爱国华侨可以提供重要的信息给上海博物馆,或者把他们收藏的一些外国文物捐赠给上海博物馆。\n\n澎湃新闻:公众都知道上博收藏的中国古代艺术门类齐全、馆藏丰富,对上博收藏外国文物所知不多。上博馆藏1万余件(套)的外国文物这个基础是怎么打下的?\n\n褚晓波:上博收藏的外国文物过去我们展出不多,因为人民广场馆场地有限,当时常设展是不可能有外国文物展出。未来我们在东馆陶瓷馆中会开设“陶瓷与中外文化交流”专题展厅,通过陶瓷这个媒介讲述中国发明的瓷器是怎样影响着全世界,场地不是很大,但内容还是很精彩,那个展厅会呈现很多国外的陶瓷文物。\n\n“灼烁重现:十五世纪中期景德镇瓷器大展”展览现场\n\n上海博物馆过去也有意识征集国外文物,也鼓励藏家捐赠,但这些外国文物很多是跟上博馆藏有关联,未来我们会更加拓展我们的征集视野。我们馆藏的国外文物也是比较成体系的,比如我们的丝路钱币,可以做一些专题的展览。未来我们更需要呈现一些世界文明类型的展览,就会涉及更多门类的文物,而不仅仅是局限在某一类专题,这是上海博物馆未来需要努力的一个方向。\n\n澎湃新闻:上博的收藏极巨,也一直通过购买与接受捐赠收藏了不少文物名迹,上博的收藏序列中,您认为哪些方面需要增加或调整,以适应上博新的目标与定位,或者说,为下一个百年进行收藏策划?具体在今后的收藏方面还有什么计划?\n\n褚晓波:在藏品征集方面,我们未来肯定也会关注到现当代艺术的征集,这也是全球顶尖博物馆都非常认可的模式。其实我们收藏原来历史上的文物,在当时那个年代就是当代艺术品,为什么它们能流传到今天?它在当时就非同一般,所以能流传到现在。同样我们也要为未来收藏,我们现在聚焦现当代艺术,也是为未来上海博物馆征集文物,我们要扩大范畴,希望能建立一个未来新的收藏体系。\n\n上海博物馆的定位是世界顶级的中国古代艺术博物馆,其实上海博物馆在1952年成立之初,当时中央文化部和华东军管委批准设立筹建上海博物馆,给上博的定位是艺术博物馆。七十多年过去了,对上博而言我们开拓现当代艺术收藏是没有任何问题,因为跟它的定位是吻合的。未来,上海博物馆也会在这方面加大力度。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "褚 晓 波 今 年 是 龙 年 上 博 要 刮 起 一 股 龙 卷 风 05 00 千 呼 万 唤 始 出 来 备 受 关 注 的 上 海 博 物 馆 东 馆 终 于 揭 开 面 纱 建 馆 70 多 年 的 上 海 博 物 馆 于 2024 年 2 月 2 日 上 午 迎 来 了 重 要 历 史 时 刻 从 2017 年 9 月 27 日 在 浦 东 打 下 了 上 海 博 物 馆 东 馆 第 一 根 桩 基 开 始 历 经 六 年 多 的 建 设 到 2024 年 2 月 2 日 终 于 建 成 并 正 式 启 用 上 博 东 馆 总 建 筑 面 积 达 11 32 万 平 方 米 陈 列 展 示 面 积 约 3 36 万 平 方 米 将 在 2024 年 内 分 三 步 陆 续 开 放 今 天 起 上 博 东 馆 青 铜 展 厅 将 率 先 试 开 放 并 同 步 推 出 星 耀 中 国 三 星 堆 金 沙 古 蜀 文 明 展 特 展 6 月 底 前 东 馆 开 放 面 积 将 达 到 展 陈 空 间 的 80 11 月 底 前 上 博 东 馆 实 现 全 面 开 放 在 上 博 东 馆 试 开 放 前 上 海 博 物 馆 馆 长 褚 晓 波 接 受 了 澎 湃 新 闻 的 专 访 详 解 上 海 博 物 馆 的 最 新 定 位 展 览 展 陈 及 未 来 构 想 上 博 东 馆 将 以 全 世 界 独 一 无 二 的 全 景 式 大 格 局 更 好 讲 述 深 厚 的 中 华 文 脉 让 展 览 火 起 来 褚 晓 波 说 东 馆 开 馆 以 后 人 民 广 场 馆 的 定 位 是 什 么 这 是 我 们 一 直 思 考 的 问 题 全 国 六 千 多 家 博 物 馆 中 目 前 为 止 还 没 有 一 家 能 真 正 常 态 化 展 示 世 界 文 明 和 艺 术 的 场 馆 在 上 海 这 一 国 际 化 程 度 非 常 高 的 城 市 能 否 利 用 上 海 博 物 馆 人 民 广 场 这 一 地 理 位 置 优 势 把 人 民 广 场 馆 打 造 成 为 中 国 第 一 个 能 常 态 化 展 示 世 界 文 明 和 艺 术 的 重 要 场 所 现 在 的 博 物 馆 都 很 卷 在 新 近 公 布 的 2024 年 展 览 计 划 中 上 博 将 史 无 前 例 推 出 十 八 个 特 展 所 以 我 说 今 年 是 龙 年 上 博 要 刮 起 一 股 龙 卷 风 上 海 博 物 馆 的 定 位 是 世 界 顶 级 的 中 国 古 代 艺 术 博 物 馆 其 实 上 博 在 1952 年 成 立 之 初 上 博 的 定 位 是 艺 术 博 物 馆 对 上 博 而 言 我 们 今 后 开 拓 现 当 代 方 面 的 艺 术 收 藏 并 没 有 任 何 问 题 上 海 博 物 馆 东 馆 俯 视 图 上 海 博 物 馆 东 馆 上 博 是 取 之 不 竭 的 文 化 宝 库 澎 湃 新 闻 还 是 先 从 您 个 人 开 始 聊 起 您 到 上 博 工 作 也 已 经 一 年 半 了 谈 谈 您 的 心 路 变 化 您 如 何 理 解 过 去 的 上 海 博 物 馆 以 及 未 来 的 上 海 博 物 馆 褚 晓 波 我 之 前 一 直 在 上 海 的 政 府 部 门 工 作 分 管 上 海 的 文 物 保 护 博 物 馆 建 设 等 工 作 来 到 上 博 以 后 我 的 感 受 是 完 全 不 同 的 因 为 上 海 博 物 馆 是 以 上 海 这 座 城 市 命 名 的 博 物 馆 上 博 的 气 质 和 上 海 这 座 城 市 的 精 神 品 格 是 非 常 契 合 的 上 海 海 纳 百 川 追 求 卓 越 开 明 睿 智 大 气 谦 和 的 城 市 精 神 和 开 放 创 新 包 容 的 城 市 品 格 都 能 在 上 海 博 物 馆 找 到 很 多 契 合 点 一 些 专 家 研 究 指 出 上 海 海 纳 百 川 的 城 市 精 神 早 在 宋 元 时 期 这 一 区 域 已 经 有 这 种 气 象 存 在 就 艺 术 领 域 而 言 在 元 代 特 别 是 明 代 已 经 有 很 多 当 时 的 艺 术 大 家 汇 聚 在 上 海 这 个 区 域 像 元 四 家 黄 公 望 曾 居 松 江 包 括 以 松 江 董 其 昌 为 代 表 的 松 江 画 派 很 多 艺 术 家 是 在 上 海 形 成 他 们 的 艺 术 风 格 褚 晓 波 右 二 在 对 话 达 芬 奇 布 展 现 场 上 海 博 物 馆 有 着 丰 富 的 馆 藏 我 到 上 海 博 物 馆 担 任 馆 长 觉 得 这 是 一 个 取 之 不 竭 的 文 化 宝 库 可 以 让 我 学 到 的 东 西 非 常 多 也 给 我 另 外 一 重 压 力 是 对 知 识 储 备 的 恐 慌 上 海 博 物 馆 收 藏 有 超 过 一 百 多 万 件 文 物 目 前 文 物 门 类 超 过 33 大 类 是 全 球 中 国 古 代 艺 术 门 类 最 齐 全 的 博 物 馆 这 也 是 上 海 博 物 馆 通 过 七 十 多 年 的 努 力 积 攒 下 来 的 文 化 财 富 面 对 如 此 庞 大 的 收 藏 体 系 未 来 怎 么 样 把 这 些 文 物 资 源 激 活 让 文 物 活 起 来 更 好 地 发 挥 文 物 的 育 人 作 用 发 挥 它 们 的 最 大 价 值 这 里 有 非 常 多 的 工 作 要 做 作 为 馆 长 我 深 感 责 任 重 大 这 一 年 半 多 的 时 间 我 深 以 能 在 上 博 工 作 为 荣 对 我 个 人 自 身 的 发 展 来 说 也 是 我 人 生 当 中 最 幸 运 的 一 个 阶 段 上 海 博 物 馆 出 台 的 大 博 物 馆 计 划 不 管 从 硬 件 建 设 还 是 软 实 力 的 提 升 未 来 都 有 非 常 大 的 空 间 也 是 上 海 博 物 馆 全 体 员 工 需 要 共 同 绘 就 的 宏 伟 蓝 图 现 在 的 关 键 是 如 何 把 这 些 宏 伟 的 目 标 通 过 我 们 一 代 代 上 博 人 的 努 力 去 实 现 应 该 说 未 来 的 路 很 长 但 我 也 坚 信 我 们 碰 上 了 一 个 非 常 好 的 时 代 如 何 在 新 时 代 担 负 起 新 的 文 化 使 命 归 纳 起 来 三 句 话 一 是 弘 扬 中 华 优 秀 传 统 文 化 这 也 是 上 海 博 物 馆 最 大 的 资 源 优 势 我 们 有 这 么 多 的 文 物 收 藏 一 定 要 把 它 们 弘 扬 好 二 是 推 动 高 质 量 的 发 展 我 们 经 过 了 七 十 多 年 的 努 力 和 积 累 未 来 我 们 很 多 工 作 方 式 一 定 要 打 破 常 规 推 动 高 质 量 的 发 展 三 是 将 上 博 打 造 成 为 具 有 世 界 美 誉 度 的 城 市 文 化 地 标 这 就 是 我 们 上 海 博 物 馆 接 下 来 一 个 重 要 的 新 文 化 使 命 上 海 博 物 馆 东 馆", "source_text": "褚晓波:今年是龙年,上博要刮起一股“龙卷风”(05:00)\n\n千呼万唤始出来,备受关注的上海博物馆东馆终于揭开面纱。\n\n建馆70多年的上海博物馆于2024年2月2日上午迎来了重要历史时刻:从2017年9月27日在浦东打下了上海博物馆东馆第一根桩基开始,历经六年多的建设,到2024年2月2日,终于建成并正式启用,上博东馆总建筑面积达11.32万平方米,陈列展示面积约3.36万平方米,将在2024年内分三步陆续开放:今天起,上博东馆青铜展厅将率先试开放,并同步推出“星耀中国——三星堆·金沙古蜀文明展”特展,6月底前,东馆开放面积将达到展陈空间的80%,11月底前,上博东馆实现全面开放。\n\n在上博东馆试开放前,上海博物馆馆长褚晓波接受了澎湃新闻的专访,详解上海博物馆的最新定位、展览展陈及未来构想:\n\n“上博东馆将以全世界独一无二的全景式大格局,更好讲述深厚的中华文脉,让展览‘火’起来。”褚晓波说,“东馆开馆以后,人民广场馆的定位是什么,这是我们一直思考的问题,全国六千多家博物馆中,目前为止还没有一家能真正常态化展示世界文明和艺术的场馆。在上海这一国际化程度非常高的城市,能否利用上海博物馆人民广场这一地理位置优势,把人民广场馆打造成为中国第一个能常态化展示世界文明和艺术的重要场所。”\n\n“现在的博物馆都很卷,在新近公布的2024年展览计划中,上博将史无前例,推出十八个特展,所以我说今年是龙年,上博要刮起一股‘龙卷风’。”\n\n“上海博物馆的定位是世界顶级的中国古代艺术博物馆,其实上博在1952年成立之初,上博的定位是艺术博物馆,对上博而言,我们今后开拓现当代方面的艺术收藏并没有任何问题。”\n\n上海博物馆东馆俯视图\n\n上海博物馆东馆\n\n “上博是取之不竭的文化宝库”\n\n澎湃新闻:还是先从您个人开始聊起。您到上博工作也已经一年半了,谈谈您的心路变化。您如何理解过去的上海博物馆,以及未来的上海博物馆?\n\n褚晓波:我之前一直在上海的政府部门工作,分管上海的文物保护、博物馆建设等工作。来到上博以后,我的感受是完全不同的,因为上海博物馆是以上海这座城市命名的博物馆,上博的气质和上海这座城市的精神品格是非常契合的,上海“海纳百川、追求卓越、开明睿智、大气谦和”的城市精神和“开放、创新、包容”的城市品格都能在上海博物馆找到很多契合点。一些专家研究指出,上海“海纳百川”的城市精神,早在宋元时期这一区域已经有这种气象存在,就艺术领域而言,在元代特别是明代,已经有很多当时的艺术大家汇聚在上海这个区域,像元四家黄公望曾居松江,包括以松江董其昌为代表的松江画派,很多艺术家是在上海形成他们的艺术风格。\n\n褚晓波(右二)在“对话达·芬奇”布展现场\n\n上海博物馆有着丰富的馆藏,我到上海博物馆担任馆长,觉得这是一个取之不竭的文化宝库,可以让我学到的东西非常多,也给我另外一重压力是对知识储备的恐慌。上海博物馆收藏有超过一百多万件文物,目前文物门类超过33大类,是全球中国古代艺术门类最齐全的博物馆,这也是上海博物馆通过七十多年的努力积攒下来的文化财富,面对如此庞大的收藏体系,未来怎么样把这些文物资源激活,让文物活起来,更好地发挥文物的育人作用,发挥它们的最大价值,这里有非常多的工作要做,作为馆长我深感责任重大。这一年半多的时间,我深以能在上博工作为荣。对我个人自身的发展来说,也是我人生当中最幸运的一个阶段。上海博物馆出台的“大博物馆计划”,不管从硬件建设还是软实力的提升,未来都有非常大的空间,也是上海博物馆全体员工需要共同绘就的宏伟蓝图。现在的关键是如何把这些宏伟的目标,通过我们一代代上博人的努力去实现,应该说未来的路很长,但我也坚信我们碰上了一个非常好的时代,如何在新时代担负起新的文化使命?归纳起来三句话,一是弘扬中华优秀传统文化,这也是上海博物馆最大的资源优势,我们有这么多的文物收藏,一定要把它们弘扬好;二是推动高质量的发展,我们经过了七十多年的努力和积累,未来我们很多工作方式一定要打破常规,推动高质量的发展;三是将上博打造成为具有世界美誉度的城市文化地标,这就是我们上海博物馆接下来一个重要的新文化使命。\n\n上海博物馆东馆", "segmentation_method": "reviewed_source_semantics", "label": "开篇:褚晓波:今年是龙年,上博要刮起一股“龙卷风”(05:00) — 段落/内容单元:上海博物馆有着丰富的馆藏,我到上海博物馆担任馆长,觉得这是一个取之不竭的文化宝库,可以让我学到的东西非常多,也给我另外一", "source_line_range": [ 1, 30 ] }, { "id": "body-region-2", "text": "上 海 博 物 馆 东 馆 内 部 作 为 上 博 的 一 馆 之 长 要 做 的 事 情 真 的 非 常 多 相 信 在 上 海 市 委 市 政 府 的 支 持 下 我 们 上 博 人 通 过 奋 力 一 跳 力 争 把 博 物 馆 的 功 能 发 挥 到 更 大 澎 湃 新 闻 上 博 有 着 自 己 的 文 脉 与 精 神 您 认 为 上 博 最 重 要 的 精 神 和 传 统 体 现 在 哪 里 您 对 上 海 博 物 馆 的 立 馆 之 本 文 脉 传 承 如 何 理 解 褚 晓 波 我 认 为 上 海 博 物 馆 历 经 七 十 多 年 发 展 积 淀 闪 现 出 很 多 上 博 精 神 首 先 是 对 标 世 界 一 流 追 求 卓 越 的 目 标 这 是 上 博 人 长 期 以 来 的 追 求 全 球 博 物 馆 数 量 不 计 其 数 中 国 的 博 物 馆 数 量 也 已 经 达 到 6500 多 家 如 何 在 众 多 博 物 馆 当 中 发 挥 影 响 力 号 召 力 意 味 着 我 们 一 定 要 有 非 常 高 的 追 求 而 这 要 求 我 们 首 先 从 我 们 的 工 作 基 础 入 手 博 物 馆 的 工 作 基 础 核 心 就 是 两 个 馆 藏 和 研 究 所 谓 固 本 强 基 这 个 本 就 是 藏 品 基 就 是 研 究 在 这 两 个 方 面 我 们 都 有 对 标 世 界 一 流 的 目 标 我 相 信 上 博 一 定 可 以 做 到 独 树 一 帜 上 海 博 物 馆 东 馆 青 铜 馆 上 海 博 物 馆 人 民 广 场 馆 中 国 古 代 陶 瓷 馆 的 陈 列 一 座 博 物 馆 如 果 没 有 馆 藏 那 就 不 能 称 之 为 博 物 馆 可 能 是 一 个 展 览 馆 如 果 没 有 研 究 那 就 没 有 文 化 话 语 权 这 个 博 物 馆 就 无 异 于 一 个 文 物 的 库 房 七 十 多 年 来 上 博 人 在 收 藏 和 研 究 这 两 方 面 是 花 了 大 力 气 的 我 们 为 什 么 拥 有 超 过 一 百 万 件 的 文 物 收 藏 这 在 全 中 国 乃 至 全 世 界 都 是 为 数 不 多 的 而 且 在 文 物 征 集 过 程 中 我 们 有 意 识 地 去 收 藏 各 大 门 类 的 藏 品 上 博 同 样 非 常 注 重 学 术 研 究 人 才 培 养 一 直 强 调 学 术 立 馆 多 年 来 在 博 物 馆 界 培 养 了 很 多 领 域 的 知 名 专 家 当 然 我 们 还 有 团 结 协 作 的 精 神 可 能 很 多 领 域 单 枪 匹 马 也 能 干 但 博 物 馆 是 一 个 需 要 团 队 合 作 才 能 推 动 发 展 的 单 位 上 海 博 物 馆 有 很 多 业 务 部 门 也 有 很 多 综 合 管 理 部 门 做 任 何 一 件 事 都 需 要 大 家 齐 心 协 力 共 同 推 动 所 以 说 我 们 上 海 博 物 馆 的 凝 聚 力 特 别 强 这 也 是 我 们 多 年 来 的 传 统 我 来 到 上 博 以 后 跟 馆 里 的 同 事 沟 通 想 法 达 成 共 识 以 后 大 家 就 心 往 一 处 使 朝 着 一 个 共 同 的 目 标 努 力 才 能 办 成 很 多 大 事 比 如 我 们 每 举 办 一 个 展 览 涉 及 到 多 个 部 门 的 跨 部 门 合 作 首 先 要 有 策 展 人 形 成 策 展 思 路 然 后 开 始 挑 选 相 关 文 物 除 了 上 博 以 外 我 们 还 要 调 动 全 球 博 物 馆 的 资 源 也 是 需 要 很 多 人 力 去 沟 通 努 力 现 在 文 物 借 展 难 度 很 大 都 是 大 家 争 抢 的 稀 缺 资 源 每 场 展 览 的 需 要 上 博 人 付 出 艰 苦 的 努 力 上 博 东 馆 星 耀 中 国 三 星 堆 金 沙 古 蜀 文 明 展 展 览 现 场 举 个 例 子 马 上 要 配 合 东 馆 启 用 推 出 的 星 耀 中 国 三 星 堆 金 沙 古 蜀 文 明 展 这 个 展 览 从 开 始 筹 备 到 现 在 即 将 开 幕 过 程 中 也 是 历 经 坎 坷 包 括 文 物 的 借 展 非 常 艰 难 三 星 堆 遗 址 因 为 这 几 年 考 古 新 发 现 非 常 多 可 以 说 是 全 球 的 热 门 话 题 去 商 借 文 物 的 博 物 馆 非 常 多 这 也 增 加 了 我 们 办 展 难 度 上 博 东 馆 星 耀 中 国 三 星 堆 金 沙 古 蜀 文 明 展 展 览 现 场 澎 湃 新 闻 听 说 你 们 为 了 三 星 堆 特 展 单 单 去 四 川 就 去 了 五 趟 是 吗 褚 晓 波 对 我 和 主 管 我 们 的 领 导 专 门 去 四 川 我 们 俩 加 起 来 就 飞 了 五 次 这 次 参 展 文 物 超 过 360 多 件 借 展 的 文 物 涉 及 全 国 11 个 省 市 自 治 区 大 概 有 25 个 地 级 市 光 把 这 些 文 物 汇 聚 到 上 海 我 们 就 跑 了 1 6 万 公 里 一 个 高 品 质 展 览 的 诞 生 除 了 有 重 磅 文 物 还 要 有 好 的 陈 列 设 计 才 能 吸 引 观 众 此 外 我 们 每 一 个 展 览 都 会 有 很 多 配 套 比 如 文 创 产 品 教 育 活 动 等 所 以 我 们 所 谓 的 现 象 级 大 展 肯 定 不 是 一 个 部 门 更 不 可 能 是 某 一 个 个 人 能 办 成 的 需 要 全 馆 上 下 通 力 合 作 把 文 物 考 古 大 展 办 成 连 续 剧 澎 湃 新 闻 讲 到 展 览 展 览 的 策 划 是 博 物 馆 的 抓 手 之 一 也 是 与 观 众 直 接 对 话 的 载 体 你 之 前 提 出 上 博 东 馆 将 以 全 世 界 独 一 无 二 的 全 景 式 大 格 局 更 好 讲 述 深 厚 的 中 华 文 脉 让 展 览 火 起 来 其 实 上 博 的 展 览 可 以 说 办 一 个 火 一 个 从 轰 动 的 英 国 国 家 美 术 馆 珍 藏 展 何 以 中 国 崧 泽 良 渚 文 明 考 古 特 展 到 当 下 正 在 举 办 的 对 话 达 芬 奇 大 展 上 海 博 物 馆 主 打 的 两 大 展 览 品 牌 对 话 世 界 文 物 艺 术 大 展 系 列 和 何 以 中 国 文 物 考 古 大 展 系 列 的 策 划 脉 络 愈 显 清 晰 从 目 前 已 经 推 出 的 展 览 项 目 来 看 这 两 大 展 览 系 列 是 按 照 你 们 预 初 的 设 想 在 推 进 么 后 续 还 有 哪 些 展 览 规 划", "source_text": "上海博物馆东馆内部\n\n作为上博的一馆之长,要做的事情真的非常多,相信在上海市委市政府的支持下,我们上博人通过奋力一跳,力争把博物馆的功能发挥到更大。\n\n澎湃新闻:上博有着自己的文脉与精神,您认为上博最重要的精神和传统体现在哪里?您对上海博物馆的立馆之本、文脉、传承如何理解?\n\n褚晓波:我认为上海博物馆历经七十多年发展积淀,闪现出很多上博精神。首先是对标世界一流,追求卓越的目标,这是上博人长期以来的追求。全球博物馆数量不计其数,中国的博物馆数量也已经达到6500多家,如何在众多博物馆当中发挥影响力、号召力,意味着我们一定要有非常高的追求,而这要求我们首先从我们的工作基础入手。博物馆的工作基础核心就是两个,馆藏和研究,所谓固本强基,这个“本”就是藏品,“基”就是研究,在这两个方面我们都有对标世界一流的目标,我相信上博一定可以做到独树一帜。\n\n上海博物馆东馆青铜馆\n\n上海博物馆人民广场馆中国古代陶瓷馆的陈列\n\n一座博物馆如果没有馆藏,那就不能称之为博物馆,可能是一个展览馆。如果没有研究,那就没有文化话语权,这个博物馆就无异于一个文物的库房。七十多年来,上博人在收藏和研究这两方面是花了大力气的。我们为什么拥有超过一百万件的文物收藏,这在全中国乃至全世界都是为数不多的,而且在文物征集过程中我们有意识地去收藏各大门类的藏品;上博同样非常注重学术研究、人才培养,一直强调学术立馆,多年来在博物馆界培养了很多领域的知名专家。\n\n当然,我们还有团结协作的精神,可能很多领域单枪匹马也能干,但博物馆是一个需要团队合作才能推动发展的单位,上海博物馆有很多业务部门,也有很多综合管理部门,做任何一件事都需要大家齐心协力、共同推动,所以说我们上海博物馆的凝聚力特别强,这也是我们多年来的传统。\n\n我来到上博以后,跟馆里的同事沟通想法达成共识以后,大家就心往一处使,朝着一个共同的目标努力,才能办成很多大事。比如我们每举办一个展览,涉及到多个部门的跨部门合作,首先要有策展人,形成策展思路,然后开始挑选相关文物,除了上博以外,我们还要调动全球博物馆的资源,也是需要很多人力去沟通努力,现在文物借展难度很大,都是大家争抢的稀缺资源,每场展览的需要上博人付出艰苦的努力。\n\n上博东馆  “星耀中国——三星堆·金沙古蜀文明展”展览现场\n\n举个例子,马上要配合东馆启用推出的“星耀中国——三星堆·金沙古蜀文明展”,这个展览从开始筹备到现在即将开幕,过程中也是历经坎坷,包括文物的借展,非常艰难。三星堆遗址因为这几年考古新发现非常多,可以说是全球的热门话题,去商借文物的博物馆非常多,这也增加了我们办展难度。\n\n上博东馆  “星耀中国——三星堆·金沙古蜀文明展”展览现场\n\n澎湃新闻:听说你们为了三星堆特展,单单去四川就去了五趟是吗?\n\n褚晓波:对,我和主管我们的领导专门去四川,我们俩加起来就飞了五次。这次参展文物超过360多件,借展的文物涉及全国11个省市自治区,大概有25个地级市,光把这些文物汇聚到上海,我们就跑了1.6万公里。一个高品质展览的诞生,除了有重磅文物,还要有好的陈列设计才能吸引观众。此外,我们每一个展览都会有很多配套,比如文创产品、教育活动等,所以我们所谓的“现象级大展”肯定不是一个部门,更不可能是某一个个人能办成的,需要全馆上下通力合作。\n\n把文物考古大展办成“连续剧”\n\n澎湃新闻:讲到展览,展览的策划是博物馆的抓手之一,也是与观众直接对话的载体,你之前提出,上博东馆将以全世界独一无二的全景式大格局,更好讲述深厚的中华文脉,让展览“火”起来,其实,上博的展览可以说办一个火一个,从轰动的“英国国家美术馆珍藏展”,“何以中国”——崧泽·良渚文明考古特展到当下正在举办的“对话达·芬奇”大展。上海博物馆主打的两大展览品牌“对话世界”文物艺术大展系列和“何以中国”文物考古大展系列的策划脉络愈显清晰。从目前已经推出的展览项目来看,这两大展览系列是按照你们预初的设想在推进么,后续还有哪些展览规划?", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:上海博物馆东馆内部 — 段落/内容单元:澎湃新闻:讲到展览,展览的策划是博物馆的抓手之一,也是与观众直接对话的载体,你之前提出,上博东馆将以全世界独一无二的全景", "source_line_range": [ 31, 62 ] }, { "id": "body-region-3", "text": "褚 晓 波 上 海 博 物 馆 出 台 大 博 物 馆 计 划 以 后 重 点 聚 焦 三 大 展 览 品 牌 其 中 有 一 个 是 主 打 中 华 文 化 走 出 去 百 物 看 中 国 文 物 艺 术 出 境 大 展 系 列 还 有 两 个 是 在 上 海 博 物 馆 举 办 一 个 是 何 以 中 国 文 物 考 古 大 展 系 列 另 一 个 是 对 话 世 界 文 物 艺 术 大 展 系 列 为 什 么 会 形 成 这 两 大 系 列 的 想 法 最 初 我 们 没 有 意 识 到 需 要 去 打 造 一 个 品 牌 随 着 策 划 的 深 入 发 现 我 们 的 中 华 文 明 探 源 工 程 出 现 非 常 多 最 新 成 果 每 年 都 有 非 常 重 要 的 考 古 新 发 现 这 些 是 非 常 重 要 的 可 以 做 展 览 的 资 源 因 为 策 划 展 览 得 不 断 有 新 的 内 容 或 者 新 的 策 展 理 念 不 能 总 是 去 炒 冷 饭 所 以 在 宅 兹 中 国 河 南 夏 商 周 三 代 文 明 展 策 划 过 程 中 我 们 觉 得 聚 焦 中 华 文 明 探 源 工 程 是 一 个 非 常 重 要 的 选 题 而 且 相 信 这 个 选 题 的 内 容 让 我 们 可 以 至 少 做 十 年 以 上 特 别 是 从 中 华 文 明 满 天 星 斗 多 元 一 体 的 大 格 局 出 发 所 以 我 们 是 先 有 宅 兹 中 国 再 把 它 提 升 为 何 以 中 国 文 物 考 古 大 展 系 列 宅 兹 中 国 河 南 夏 商 周 三 代 文 明 展 展 览 现 场 的 鸮 尊 基 于 这 个 顶 层 设 计 在 宅 兹 中 国 河 南 夏 商 周 三 代 文 明 展 开 幕 以 后 我 们 就 在 思 考 下 一 个 主 题 经 过 论 证 我 们 认 为 首 展 聚 焦 黄 河 流 域 文 明 第 二 展 应 该 回 到 长 江 流 域 长 江 黄 河 都 是 中 华 文 明 重 要 的 发 源 地 之 一 所 以 我 们 第 二 展 叫 实 证 中 国 崧 泽 良 渚 文 明 考 古 特 展 这 两 期 展 览 举 办 完 之 后 发 现 何 以 中 国 品 牌 已 经 深 入 人 心 观 众 像 追 连 续 剧 一 样 追 着 看 何 以 中 国 1 何 以 中 国 2 也 非 常 期 待 何 以 中 国 3 是 什 么 所 以 在 去 年 实 证 中 国 举 办 后 就 在 紧 密 地 筹 备 第 三 展 星 耀 中 国 三 星 堆 金 沙 古 蜀 文 明 展 览 把 目 光 聚 焦 到 长 江 上 游 讲 好 古 蜀 文 明 的 故 事 其 实 三 星 堆 展 览 还 没 正 式 开 幕 我 们 的 何 以 中 国 4 已 经 在 策 划 中 了 上 海 博 物 馆 每 年 至 少 会 推 出 一 个 何 以 中 国 系 列 大 展 我 们 也 有 信 心 要 一 直 做 下 去 实 证 中 国 崧 泽 良 渚 文 明 考 古 特 展 展 览 现 场 对 话 世 界 系 列 现 在 已 经 举 办 了 三 期 第 一 期 是 疫 情 期 间 举 办 的 东 西 汇 融 中 欧 陶 瓷 与 文 化 交 流 特 展 举 办 这 个 展 览 的 时 候 还 没 有 把 它 归 到 对 话 世 界 系 列 但 在 展 览 过 程 中 我 们 觉 得 上 海 博 物 馆 长 期 以 来 跟 海 内 外 的 很 多 博 物 馆 都 有 着 紧 密 联 系 上 博 历 史 上 也 举 办 过 非 常 多 跟 全 球 机 构 合 作 的 大 展 应 该 让 它 形 成 一 个 系 列 品 牌 聚 焦 东 西 方 文 化 交 流 凸 显 上 海 博 物 馆 全 球 资 源 配 置 能 力 于 是 就 把 东 西 汇 融 中 欧 陶 瓷 与 文 化 交 流 特 展 纳 入 到 对 话 世 界 系 列 的 第 一 期 因 为 它 确 实 是 通 过 瓷 器 勾 连 起 东 西 方 的 文 化 交 流 第 二 期 是 就 去 年 举 办 的 从 波 提 切 利 到 梵 高 英 国 国 家 美 术 馆 珍 藏 展 这 个 展 览 非 常 成 功 得 益 于 天 时 地 利 人 和 几 方 面 的 多 重 原 因 这 个 展 览 最 后 成 为 一 个 现 象 级 大 展 英 国 国 家 美 术 馆 珍 藏 展 展 览 现 场 英 国 国 家 美 术 馆 珍 藏 展 展 览 现 场 这 个 展 览 成 为 爆 款 以 后 我 们 也 冷 静 做 了 分 析 展 览 是 非 常 成 功 的 但 我 们 也 觉 得 有 很 多 遗 憾 因 为 这 个 展 览 所 有 的 展 品 都 来 自 英 国 国 家 美 术 馆 讲 述 的 是 西 方 绘 画 四 百 年 的 历 史 我 们 觉 得 遗 憾 的 地 方 是 缺 少 文 化 交 流 的 对 话 对 于 上 海 博 物 馆 而 言 我 们 不 能 只 是 一 味 简 单 地 引 进 展 览 虽 然 这 是 现 在 大 多 数 博 物 馆 的 通 行 做 法 从 上 海 博 物 馆 的 长 远 发 展 来 看 我 们 希 望 能 突 出 我 们 的 国 际 文 化 话 语 权 就 需 要 开 展 这 种 对 话 对 话 达 芬 奇 展 览 现 场 所 以 在 对 话 世 界 系 列 第 三 期 我 们 聚 焦 的 是 对 话 达 芬 奇 这 次 是 中 意 双 方 各 拿 出 18 件 艺 术 珍 品 开 展 跨 时 空 跨 地 域 的 艺 术 对 话 这 是 我 们 第 一 次 举 办 东 西 方 绘 画 艺 术 对 比 展 展 览 推 出 以 后 也 给 大 家 带 来 耳 目 一 新 的 感 觉 当 然 这 是 我 们 第 一 次 尝 试 这 种 形 式 相 信 很 多 观 众 也 会 提 出 自 己 的 疑 惑 比 如 如 何 开 展 对 话 对 话 的 点 在 哪 里 虽 然 这 一 次 我 们 做 得 还 不 够 特 别 完 美 但 是 对 话 达 芬 奇 开 了 先 河 我 们 迈 出 的 这 一 步 非 常 重 要 上 海 博 物 馆 一 定 要 通 过 自 己 的 展 览 来 增 强 国 人 的 文 化 自 信 未 来 我 们 也 会 举 办 越 来 越 多 这 种 对 话 类 型 的 展 览 阿 蒙 荷 太 普 四 世 雕 像 18 王 朝 公 元 前 1550 1295 年 砂 岩 埃 及 国 家 博 物 馆 藏", "source_text": "褚晓波:上海博物馆出台“大博物馆计划”以后,重点聚焦三大展览品牌,其中有一个是主打中华文化走出去“百物看中国”文物艺术出境大展系列,还有两个是在上海博物馆举办,一个是“何以中国”文物考古大展系列,另一个是“对话世界”文物艺术大展系列。为什么会形成这两大系列的想法?最初我们没有意识到需要去打造一个品牌,随着策划的深入,发现我们的中华文明探源工程出现非常多最新成果,每年都有非常重要的考古新发现,这些是非常重要的可以做展览的资源。因为策划展览得不断有新的内容或者新的策展理念,不能总是去炒冷饭。所以在“宅兹中国——河南夏商周三代文明展”策划过程中,我们觉得聚焦中华文明探源工程是一个非常重要的选题,而且相信这个选题的内容让我们可以至少做十年以上,特别是从中华文明满天星斗,多元一体的大格局出发。所以我们是先有“宅兹中国”,再把它提升为“何以中国”文物考古大展系列。\n\n“宅兹中国——河南夏商周三代文明展” 展览现场的“鸮尊”\n\n基于这个顶层设计,在“宅兹中国——河南夏商周三代文明展”开幕以后,我们就在思考下一个主题。经过论证,我们认为首展聚焦黄河流域文明,第二展应该回到长江流域,长江黄河都是中华文明重要的发源地之一,所以我们第二展叫“实证中国——崧泽·良渚文明考古特展”,这两期展览举办完之后,发现“何以中国”品牌已经深入人心,观众像追连续剧一样追着看“何以中国1”、“何以中国2”,也非常期待“何以中国3”是什么。所以在去年“实证中国”举办后,就在紧密地筹备第三展“星耀中国——三星堆·金沙古蜀文明展览”,把目光聚焦到长江上游,讲好古蜀文明的故事。其实“三星堆展览”还没正式开幕,我们的“何以中国4”已经在策划中了,上海博物馆每年至少会推出一个“何以中国”系列大展,我们也有信心要一直做下去。\n\n “实证中国:崧泽·良渚文明考古特展”展览现场\n\n“对话世界”系列现在已经举办了三期,第一期是疫情期间举办的“东西汇融——中欧陶瓷与文化交流特展”。举办这个展览的时候,还没有把它归到“对话世界”系列,但在展览过程中,我们觉得上海博物馆长期以来跟海内外的很多博物馆都有着紧密联系,上博历史上也举办过非常多跟全球机构合作的大展,应该让它形成一个系列品牌,聚焦东西方文化交流,凸显上海博物馆全球资源配置能力,于是就把“东西汇融——中欧陶瓷与文化交流特展”纳入到“对话世界”系列的第一期,因为它确实是通过瓷器勾连起东西方的文化交流。第二期是就去年举办的“从波提切利到梵高——英国国家美术馆珍藏展”,这个展览非常成功,得益于天时地利人和几方面的多重原因,这个展览最后成为一个“现象级大展”。\n\n“英国国家美术馆珍藏展”展览现场\n\n“英国国家美术馆珍藏展”展览现场\n\n这个展览成为“爆款”以后,我们也冷静做了分析,展览是非常成功的,但我们也觉得有很多遗憾,因为这个展览所有的展品都来自英国国家美术馆,讲述的是西方绘画四百年的历史,我们觉得遗憾的地方是缺少文化交流的对话。对于上海博物馆而言,我们不能只是一味简单地引进展览,虽然这是现在大多数博物馆的通行做法,从上海博物馆的长远发展来看,我们希望能突出我们的国际文化话语权,就需要开展这种对话。\n\n“对话达·芬奇”展览现场\n\n所以在“对话世界”系列第三期,我们聚焦的是“对话达·芬奇”,这次是中意双方各拿出18件艺术珍品,开展跨时空、跨地域的艺术对话。这是我们第一次举办东西方绘画艺术对比展,展览推出以后也给大家带来耳目一新的感觉。当然这是我们第一次尝试这种形式,相信很多观众也会提出自己的疑惑,比如如何开展对话,对话的点在哪里。虽然这一次我们做得还不够特别完美,但是“对话达·芬奇”开了先河,我们迈出的这一步非常重要,上海博物馆一定要通过自己的展览,来增强国人的文化自信,未来我们也会举办越来越多这种对话类型的展览。\n\n阿蒙荷太普四世雕像 18王朝(公元前1550-1295年) 砂岩 埃及国家博物馆藏", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:褚晓波:上海博物馆出台“大博物馆计划”以后,重点聚焦三大展览品牌,其中有一个是主打中华文化走出去“百物看中国”文物艺术出 — 段落/内容单元:阿蒙荷太普四世雕像 18王朝(公元前1550-1295年) 砂岩 埃及国家博物馆藏", "source_line_range": [ 63, 84 ] }, { "id": "body-region-4", "text": "这 两 个 系 列 品 牌 的 打 造 都 给 观 众 留 下 了 深 刻 印 象 在 上 次 新 闻 发 布 会 上 我 们 也 对 外 公 布 了 对 话 世 界 第 四 个 展 览 是 金 字 塔 之 巅 古 埃 及 文 明 大 展 聚 焦 古 埃 及 文 明 在 这 个 展 览 中 我 们 同 样 会 开 展 两 个 文 明 古 国 之 间 的 对 话 当 然 核 心 的 展 品 主 要 来 自 埃 及 国 家 博 物 馆 卢 克 索 博 物 馆 等 埃 及 重 点 博 物 馆 的 文 物 精 品 同 时 我 们 也 会 加 入 代 表 中 华 文 明 的 重 要 代 表 性 文 物 开 展 两 个 文 明 古 国 的 文 化 对 话 我 相 信 这 个 展 览 也 会 引 起 广 泛 关 注 上 博 龙 年 要 刮 龙 卷 风 澎 湃 新 闻 在 新 近 公 布 的 2024 年 展 览 计 划 中 上 博 将 史 无 前 例 推 出 十 八 个 特 展 其 中 本 地 是 十 四 个 还 有 多 个 展 览 涉 及 现 当 代 艺 术 和 时 尚 方 面 的 算 是 上 博 之 前 较 少 涉 略 的 领 域 可 以 体 现 出 你 们 展 览 思 路 的 哪 些 变 化 褚 晓 波 上 海 博 物 馆 今 年 因 为 新 开 了 东 馆 加 上 人 民 广 场 馆 继 续 对 公 众 开 放 这 两 处 馆 舍 是 最 重 要 的 文 化 阵 地 我 们 肯 定 要 把 空 间 利 用 好 很 早 以 前 我 们 就 在 积 极 策 划 2024 年 相 关 的 展 览 今 年 人 民 广 场 馆 有 八 个 特 展 东 馆 有 六 个 特 展 加 起 来 就 有 十 四 个 还 会 同 步 推 进 走 出 去 文 物 出 境 展 览 还 有 国 内 其 他 博 物 馆 的 展 览 总 数 加 起 来 肯 定 会 超 过 二 十 个 所 以 我 说 今 年 是 龙 年 上 博 要 刮 起 一 股 龙 卷 风 现 在 全 国 的 博 物 馆 都 很 卷 大 家 都 很 卖 力 希 望 能 给 市 民 游 客 提 供 丰 富 多 彩 的 文 化 产 品 其 实 展 览 是 拉 近 观 众 和 博 物 馆 距 离 的 一 个 最 重 要 的 手 段 大 家 都 这 么 用 力 上 博 肯 定 不 甘 落 后 我 们 肯 定 要 在 这 方 面 发 挥 优 势 今 年 我 们 策 划 的 选 题 也 是 非 常 多 样 既 有 何 以 中 国 系 列 还 有 对 话 世 界 系 列 对 话 世 界 系 列 除 了 古 埃 及 文 明 以 外 还 有 聚 焦 古 波 斯 文 明 我 们 会 持 续 推 出 聚 焦 世 界 文 明 类 型 的 展 览 把 这 项 工 作 一 步 步 做 下 去 陶 来 通 杯 铁 器 时 代 二 期 约 公 元 前 1150 前 850 年 伊 朗 马 尔 力 克 遗 址 出 土 伊 朗 国 家 博 物 馆 藏 除 了 文 物 类 展 览 还 有 绘 画 艺 术 类 的 展 览 比 如 正 在 进 行 的 对 话 达 芬 奇 除 了 古 代 文 物 艺 术 品 今 年 还 会 聚 焦 现 当 代 艺 术 为 什 么 我 们 会 开 始 关 注 现 当 代 艺 术 我 们 发 现 年 轻 人 对 现 当 代 艺 术 是 非 常 感 兴 趣 的 年 轻 人 也 是 上 海 博 物 馆 非 常 重 要 的 一 个 观 众 群 体 我 们 也 要 举 办 一 些 年 轻 人 喜 欢 的 现 当 代 艺 术 展 览 当 然 上 海 博 物 馆 的 现 当 代 艺 术 展 我 们 还 是 设 置 了 非 常 高 的 门 槛 聚 焦 一 些 在 国 际 上 享 有 盛 誉 的 大 师 级 人 物 比 如 今 年 将 要 举 办 的 是 拾 慧 古 今 现 当 代 艺 术 大 师 系 列 首 展 千 年 万 念 陈 世 英 半 世 纪 珠 宝 艺 术 展 在 现 当 代 艺 术 展 中 我 们 还 是 比 较 强 调 古 今 对 话 因 为 任 何 一 位 现 当 代 艺 术 大 师 他 们 的 很 多 灵 感 也 是 来 自 于 传 统 文 化 所 以 我 们 在 展 览 中 会 呈 现 文 物 跟 现 当 代 艺 术 之 间 的 对 话 唐 孙 位 高 逸 图 卷 局 部 上 海 博 物 馆 藏 澎 湃 新 闻 书 法 与 绘 画 的 特 展 一 直 是 上 博 的 强 项 在 公 众 中 影 响 力 极 大 上 博 前 些 年 策 划 的 董 其 昌 大 展 吴 湖 帆 大 展 以 其 原 创 性 与 学 术 深 度 极 受 好 评 今 后 在 书 画 方 面 还 有 哪 些 深 度 策 划 比 如 说 有 没 有 策 划 对 中 国 书 画 史 研 究 有 着 巨 大 意 义 的 大 展 比 如 利 用 东 馆 的 巨 大 展 厅 与 上 博 馆 藏 的 优 势 梳 理 元 四 家 清 代 四 僧 等 我 们 知 道 上 博 在 元 四 家 的 收 藏 方 面 有 着 巨 大 的 优 势 在 八 大 山 人 石 涛 收 藏 方 面 同 样 更 有 着 巨 大 的 优 势 这 样 的 策 划 如 果 形 成 全 球 总 动 员 可 能 也 只 能 上 博 的 策 划 与 呈 现 最 让 人 期 待 有 没 有 可 能 继 续 形 成 一 个 书 画 系 列 大 展 上 博 收 藏 的 元 代 倪 瓒 山 水 画 褚 晓 波 上 海 博 物 馆 展 览 历 史 上 策 划 过 很 多 非 常 成 功 的 书 画 方 面 的 展 览 之 前 也 推 出 过 书 画 专 题 研 究 系 列 之 海 上 三 部 曲 从 吴 湖 帆 书 画 鉴 藏 展 丹 青 宝 筏 董 其 昌 书 画 艺 术 展 到 反 映 中 国 书 画 史 脉 络 的 万 年 长 春 上 海 历 代 书 画 艺 术 特 展 对 上 博 而 言 未 来 如 何 策 划 更 多 与 众 不 同 的 与 书 画 相 关 的 展 览 还 是 至 关 重 要 的 上 海 博 物 馆 的 历 代 书 画 收 藏 非 常 丰 富 素 有 江 南 半 壁 江 山 之 说 在 馆 藏 的 100 万 余 件 文 物 中 书 画 类 一 级 品 数 量 占 馆 藏 文 物 一 级 品 数 量 近 一 半 也 可 见 藏 品 质 量 之 高 我 们 书 画 收 藏 的 体 系 是 非 常 完 整 的 目 前 为 止 全 世 界 所 有 博 物 馆 艺 术 馆 中 能 够 举 办 中 国 历 代 书 法 和 历 代 绘 画 常 设 展 的 只 有 上 海 博 物 馆 基 于 这 样 丰 富 的 馆 藏 资 源 在 未 来 东 馆 的 展 陈 体 系 中 书 画 所 占 的 比 重 是 非 常 大 的 除 了 书 法 绘 画 的 通 史 陈 列 还 有 海 上 书 画 专 题 展 览 五 代 徐 熙 雪 竹 图 轴", "source_text": "这两个系列品牌的打造都给观众留下了深刻印象,在上次新闻发布会上我们也对外公布了“对话世界”第四个展览是“金字塔之巅——古埃及文明大展”,聚焦古埃及文明。在这个展览中,我们同样会开展两个文明古国之间的对话,当然核心的展品主要来自埃及国家博物馆、卢克索博物馆等埃及重点博物馆的文物精品,同时我们也会加入代表中华文明的重要代表性文物,开展两个文明古国的文化对话,我相信这个展览也会引起广泛关注。\n\n上博龙年要刮“龙卷风”\n\n澎湃新闻:在新近公布的2024年展览计划中,上博将史无前例,推出十八个特展。其中本地是十四个,还有多个展览涉及现当代艺术和时尚方面的,算是上博之前较少涉略的领域,可以体现出你们展览思路的哪些变化?\n\n褚晓波:上海博物馆今年因为新开了东馆,加上人民广场馆继续对公众开放,这两处馆舍是最重要的文化阵地,我们肯定要把空间利用好,很早以前我们就在积极策划2024年相关的展览,今年人民广场馆有八个特展,东馆有六个特展,加起来就有十四个,还会同步推进“走出去”文物出境展览,还有国内其他博物馆的展览,总数加起来肯定会超过二十个,所以我说今年是龙年,上博要刮起一股“龙卷风”。\n\n现在全国的博物馆都很卷,大家都很卖力,希望能给市民、游客提供丰富多彩的文化产品,其实展览是拉近观众和博物馆距离的一个最重要的手段。大家都这么用力,上博肯定不甘落后,我们肯定要在这方面发挥优势。今年我们策划的选题也是非常多样,既有“何以中国”系列,还有“对话世界”系列。“对话世界”系列除了古埃及文明以外,还有聚焦古波斯文明,我们会持续推出聚焦世界文明类型的展览,把这项工作一步步做下去。\n\n陶来通杯 铁器时代二期(约公元前1150-前850年) 伊朗马尔力克遗址出土 伊朗国家博物馆藏\n\n除了文物类展览,还有绘画艺术类的展览,比如正在进行的“对话达·芬奇”。除了古代文物艺术品,今年还会聚焦现当代艺术,为什么我们会开始关注现当代艺术?我们发现年轻人对现当代艺术是非常感兴趣的,年轻人也是上海博物馆非常重要的一个观众群体,我们也要举办一些年轻人喜欢的现当代艺术展览。当然上海博物馆的现当代艺术展我们还是设置了非常高的门槛,聚焦一些在国际上享有盛誉的大师级人物,比如今年将要举办的是“拾慧古今”现当代艺术大师系列首展“千年万念:陈世英半世纪珠宝艺术展”。在现当代艺术展中,我们还是比较强调古今对话,因为任何一位现当代艺术大师,他们的很多灵感也是来自于传统文化,所以我们在展览中会呈现文物跟现当代艺术之间的对话。\n\n唐 孙位《高逸图卷》(局部),上海博物馆藏\n\n澎湃新闻:书法与绘画的特展一直是上博的强项,在公众中影响力极大,上博前些年策划的董其昌大展、吴湖帆大展,以其原创性与学术深度极受好评,今后在书画方面还有哪些深度策划。比如说,有没有策划对中国书画史研究有着巨大意义的大展,比如利用东馆的巨大展厅与上博馆藏的优势,梳理“元四家”、“清代四僧”等,我们知道,上博在元四家的收藏方面有着巨大的优势,在八大山人、石涛收藏方面同样更有着巨大的优势,这样的策划如果形成全球总动员,可能也只能上博的策划与呈现最让人期待,有没有可能继续形成一个书画系列大展?\n\n上博收藏的元代倪瓒山水画\n\n褚晓波:上海博物馆展览历史上策划过很多非常成功的书画方面的展览,之前也推出过书画专题研究系列之“海上三部曲”,从“吴湖帆书画鉴藏展”、“丹青宝筏——董其昌书画艺术展”到反映中国书画史脉络的“万年长春:上海历代书画艺术特展”。对上博而言,未来如何策划更多与众不同的与书画相关的展览还是至关重要的。上海博物馆的历代书画收藏非常丰富,素有江南半壁江山之说。在馆藏的100万余件文物中,书画类一级品数量占馆藏文物一级品数量近一半,也可见藏品质量之高。我们书画收藏的体系是非常完整的,目前为止,全世界所有博物馆、艺术馆中,能够举办中国历代书法和历代绘画常设展的只有上海博物馆。基于这样丰富的馆藏资源,在未来东馆的展陈体系中,书画所占的比重是非常大的,除了书法、绘画的通史陈列,还有“海上书画”专题展览。\n\n五代 徐熙《雪竹图轴》", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:这两个系列品牌的打造都给观众留下了深刻印象,在上次新闻发布会上我们也对外公布了“对话世界”第四个展览是“金字塔之巅——古 — 段落/内容单元:五代 徐熙《雪竹图轴》", "source_line_range": [ 85, 108 ] }, { "id": "body-region-5", "text": "书 画 类 文 物 是 非 常 脆 弱 的 对 文 物 保 护 要 求 是 最 高 级 别 的 一 般 一 件 古 代 书 画 真 迹 常 规 展 示 两 三 个 月 就 要 回 到 库 房 养 护 休 眠 上 海 博 物 馆 书 画 文 物 的 展 示 条 件 相 对 来 说 比 较 好 除 了 展 厅 内 有 中 央 空 调 系 统 展 柜 中 还 有 精 密 的 书 画 独 立 温 湿 调 控 系 统 可 以 保 证 书 画 文 物 展 出 时 具 备 非 常 好 的 恒 温 恒 湿 环 境 所 以 我 们 书 画 馆 的 展 品 展 出 时 间 可 以 达 到 六 个 月 上 海 博 物 馆 的 中 国 古 代 书 画 通 史 常 设 展 将 有 6 套 可 供 轮 换 的 馆 藏 书 画 精 品 保 证 每 一 件 作 品 展 出 以 后 在 未 来 三 年 里 是 可 以 得 到 休 息 的 这 也 是 上 海 博 物 馆 的 优 势 所 在 吴 湖 帆 书 画 鉴 藏 特 展 展 览 现 场 董 其 昌 烟 江 叠 嶂 图 书 画 类 特 展 肯 定 是 上 博 展 览 的 重 点 之 一 我 们 现 在 也 在 策 划 未 来 书 画 类 的 大 展 未 来 上 博 在 书 画 方 面 肯 定 也 要 策 划 更 多 的 更 加 有 创 新 性 的 展 览 尤 其 是 与 江 南 文 化 相 关 的 中 国 书 画 史 上 的 名 家 大 家 特 展 打 造 中 国 首 个 常 态 化 世 界 文 明 馆 澎 湃 新 闻 讲 到 对 话 世 界 上 博 一 直 在 不 遗 余 力 地 做 中 外 文 化 交 流 从 上 博 三 馆 定 位 来 看 不 论 是 人 民 广 场 馆 旨 在 成 为 中 国 看 世 界 的 枢 纽 平 台 还 是 东 馆 世 界 看 中 国 的 窗 口 都 格 外 强 调 文 化 交 流 的 重 要 意 义 在 展 览 展 示 上 也 留 足 了 空 间 你 们 是 如 何 考 虑 的 褚 晓 波 一 个 比 较 现 实 的 问 题 是 东 馆 开 馆 以 后 人 民 广 场 馆 的 定 位 是 什 么 这 是 我 们 一 直 思 考 的 问 题 否 则 也 会 给 观 众 带 来 困 惑 所 以 我 们 在 筹 备 新 馆 的 过 程 中 也 在 思 考 人 民 广 场 馆 未 来 它 重 点 聚 焦 在 哪 里 我 们 梳 理 了 上 博 自 身 的 资 源 以 及 与 国 际 知 名 文 物 艺 术 机 构 多 年 来 积 攒 下 来 的 合 作 关 系 希 望 将 人 民 广 场 馆 打 造 成 一 个 在 中 国 看 世 界 的 世 界 文 明 馆 在 全 国 六 千 多 家 博 物 馆 中 目 前 为 止 还 没 有 一 家 能 真 正 常 态 化 展 示 世 界 文 明 和 艺 术 的 场 馆 在 上 海 这 一 国 际 化 程 度 非 常 高 的 城 市 能 否 利 用 上 海 博 物 馆 人 民 广 场 这 一 地 理 位 置 优 势 把 人 民 广 场 馆 打 造 成 为 中 国 第 一 个 能 常 态 化 展 示 世 界 文 明 和 艺 术 的 重 要 场 所 这 是 我 们 的 一 些 思 考 上 海 博 物 馆 人 民 广 场 馆 人 民 广 场 馆 等 候 入 场 的 观 众 过 去 我 们 征 集 和 收 藏 的 重 点 中 国 古 代 的 文 物 艺 术 品 未 来 我 们 将 依 托 馆 藏 1 万 余 件 套 较 成 体 系 的 外 国 文 物 为 基 础 启 动 全 球 文 物 艺 术 征 集 工 作 这 符 合 国 际 一 流 博 物 馆 的 发 展 潮 流 目 前 我 们 已 经 对 外 释 放 这 样 的 信 号 欢 迎 全 世 界 各 地 的 热 心 人 士 爱 国 华 侨 可 以 提 供 重 要 的 信 息 给 上 海 博 物 馆 或 者 把 他 们 收 藏 的 一 些 外 国 文 物 捐 赠 给 上 海 博 物 馆 澎 湃 新 闻 公 众 都 知 道 上 博 收 藏 的 中 国 古 代 艺 术 门 类 齐 全 馆 藏 丰 富 对 上 博 收 藏 外 国 文 物 所 知 不 多 上 博 馆 藏 1 万 余 件 套 的 外 国 文 物 这 个 基 础 是 怎 么 打 下 的 褚 晓 波 上 博 收 藏 的 外 国 文 物 过 去 我 们 展 出 不 多 因 为 人 民 广 场 馆 场 地 有 限 当 时 常 设 展 是 不 可 能 有 外 国 文 物 展 出 未 来 我 们 在 东 馆 陶 瓷 馆 中 会 开 设 陶 瓷 与 中 外 文 化 交 流 专 题 展 厅 通 过 陶 瓷 这 个 媒 介 讲 述 中 国 发 明 的 瓷 器 是 怎 样 影 响 着 全 世 界 场 地 不 是 很 大 但 内 容 还 是 很 精 彩 那 个 展 厅 会 呈 现 很 多 国 外 的 陶 瓷 文 物 灼 烁 重 现 十 五 世 纪 中 期 景 德 镇 瓷 器 大 展 展 览 现 场 上 海 博 物 馆 过 去 也 有 意 识 征 集 国 外 文 物 也 鼓 励 藏 家 捐 赠 但 这 些 外 国 文 物 很 多 是 跟 上 博 馆 藏 有 关 联 未 来 我 们 会 更 加 拓 展 我 们 的 征 集 视 野 我 们 馆 藏 的 国 外 文 物 也 是 比 较 成 体 系 的 比 如 我 们 的 丝 路 钱 币 可 以 做 一 些 专 题 的 展 览 未 来 我 们 更 需 要 呈 现 一 些 世 界 文 明 类 型 的 展 览 就 会 涉 及 更 多 门 类 的 文 物 而 不 仅 仅 是 局 限 在 某 一 类 专 题 这 是 上 海 博 物 馆 未 来 需 要 努 力 的 一 个 方 向 澎 湃 新 闻 上 博 的 收 藏 极 巨 也 一 直 通 过 购 买 与 接 受 捐 赠 收 藏 了 不 少 文 物 名 迹 上 博 的 收 藏 序 列 中 您 认 为 哪 些 方 面 需 要 增 加 或 调 整 以 适 应 上 博 新 的 目 标 与 定 位 或 者 说 为 下 一 个 百 年 进 行 收 藏 策 划 具 体 在 今 后 的 收 藏 方 面 还 有 什 么 计 划 褚 晓 波 在 藏 品 征 集 方 面 我 们 未 来 肯 定 也 会 关 注 到 现 当 代 艺 术 的 征 集 这 也 是 全 球 顶 尖 博 物 馆 都 非 常 认 可 的 模 式 其 实 我 们 收 藏 原 来 历 史 上 的 文 物 在 当 时 那 个 年 代 就 是 当 代 艺 术 品 为 什 么 它 们 能 流 传 到 今 天 它 在 当 时 就 非 同 一 般 所 以 能 流 传 到 现 在 同 样 我 们 也 要 为 未 来 收 藏 我 们 现 在 聚 焦 现 当 代 艺 术 也 是 为 未 来 上 海 博 物 馆 征 集 文 物 我 们 要 扩 大 范 畴 希 望 能 建 立 一 个 未 来 新 的 收 藏 体 系 上 海 博 物 馆 的 定 位 是 世 界 顶 级 的 中 国 古 代 艺 术 博 物 馆 其 实 上 海 博 物 馆 在 1952 年 成 立 之 初 当 时 中 央 文 化 部 和 华 东 军 管 委 批 准 设 立 筹 建 上 海 博 物 馆 给 上 博 的 定 位 是 艺 术 博 物 馆 七 十 多 年 过 去 了 对 上 博 而 言 我 们 开 拓 现 当 代 艺 术 收 藏 是 没 有 任 何 问 题 因 为 跟 它 的 定 位 是 吻 合 的 未 来 上 海 博 物 馆 也 会 在 这 方 面 加 大 力 度", "source_text": "书画类文物是非常脆弱的,对文物保护要求是最高级别的。一般一件古代书画真迹常规展示两三个月就要回到库房养护休眠。上海博物馆书画文物的展示条件相对来说比较好,除了展厅内有中央空调系统,展柜中还有精密的书画独立温湿调控系统,可以保证书画文物展出时具备非常好的恒温恒湿环境,所以我们书画馆的展品展出时间可以达到六个月。上海博物馆的中国古代书画通史常设展将有6套可供轮换的馆藏书画精品,保证每一件作品展出以后,在未来三年里是可以得到休息的,这也是上海博物馆的优势所在。\n\n“吴湖帆书画鉴藏特展”展览现场 董其昌《烟江叠嶂图》\n\n书画类特展肯定是上博展览的重点之一,我们现在也在策划未来书画类的大展,未来上博在书画方面肯定也要策划更多的、更加有创新性的展览,尤其是与江南文化相关的中国书画史上的名家大家特展。\n\n打造中国首个常态化“世界文明馆”\n\n澎湃新闻:讲到“对话世界”,上博一直在不遗余力地做中外文化交流。从上博三馆定位来看,不论是人民广场馆旨在成为“中国看世界”的枢纽平台,还是东馆“世界看中国”的窗口,都格外强调文化交流的重要意义,在展览展示上也留足了空间,你们是如何考虑的?\n\n褚晓波:一个比较现实的问题是,东馆开馆以后,人民广场馆的定位是什么,这是我们一直思考的问题,否则也会给观众带来困惑,所以我们在筹备新馆的过程中也在思考人民广场馆未来它重点聚焦在哪里?我们梳理了上博自身的资源,以及与国际知名文物艺术机构多年来积攒下来的合作关系,希望将人民广场馆打造成一个在中国看世界的“世界文明馆”。在全国六千多家博物馆中,目前为止还没有一家能真正常态化展示世界文明和艺术的场馆。在上海这一国际化程度非常高的城市,能否利用上海博物馆人民广场这一地理位置优势,把人民广场馆打造成为中国第一个能常态化展示世界文明和艺术的重要场所,这是我们的一些思考。\n\n上海博物馆人民广场馆\n\n人民广场馆等候入场的观众\n\n过去我们征集和收藏的重点中国古代的文物艺术品,未来我们将依托馆藏1万余件(套)较成体系的外国文物为基础,启动全球文物艺术征集工作。这符合国际一流博物馆的发展潮流。目前我们已经对外释放这样的信号,欢迎全世界各地的热心人士、爱国华侨可以提供重要的信息给上海博物馆,或者把他们收藏的一些外国文物捐赠给上海博物馆。\n\n澎湃新闻:公众都知道上博收藏的中国古代艺术门类齐全、馆藏丰富,对上博收藏外国文物所知不多。上博馆藏1万余件(套)的外国文物这个基础是怎么打下的?\n\n褚晓波:上博收藏的外国文物过去我们展出不多,因为人民广场馆场地有限,当时常设展是不可能有外国文物展出。未来我们在东馆陶瓷馆中会开设“陶瓷与中外文化交流”专题展厅,通过陶瓷这个媒介讲述中国发明的瓷器是怎样影响着全世界,场地不是很大,但内容还是很精彩,那个展厅会呈现很多国外的陶瓷文物。\n\n“灼烁重现:十五世纪中期景德镇瓷器大展”展览现场\n\n上海博物馆过去也有意识征集国外文物,也鼓励藏家捐赠,但这些外国文物很多是跟上博馆藏有关联,未来我们会更加拓展我们的征集视野。我们馆藏的国外文物也是比较成体系的,比如我们的丝路钱币,可以做一些专题的展览。未来我们更需要呈现一些世界文明类型的展览,就会涉及更多门类的文物,而不仅仅是局限在某一类专题,这是上海博物馆未来需要努力的一个方向。\n\n澎湃新闻:上博的收藏极巨,也一直通过购买与接受捐赠收藏了不少文物名迹,上博的收藏序列中,您认为哪些方面需要增加或调整,以适应上博新的目标与定位,或者说,为下一个百年进行收藏策划?具体在今后的收藏方面还有什么计划?\n\n褚晓波:在藏品征集方面,我们未来肯定也会关注到现当代艺术的征集,这也是全球顶尖博物馆都非常认可的模式。其实我们收藏原来历史上的文物,在当时那个年代就是当代艺术品,为什么它们能流传到今天?它在当时就非同一般,所以能流传到现在。同样我们也要为未来收藏,我们现在聚焦现当代艺术,也是为未来上海博物馆征集文物,我们要扩大范畴,希望能建立一个未来新的收藏体系。\n\n上海博物馆的定位是世界顶级的中国古代艺术博物馆,其实上海博物馆在1952年成立之初,当时中央文化部和华东军管委批准设立筹建上海博物馆,给上博的定位是艺术博物馆。七十多年过去了,对上博而言我们开拓现当代艺术收藏是没有任何问题,因为跟它的定位是吻合的。未来,上海博物馆也会在这方面加大力度。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:书画类文物是非常脆弱的,对文物保护要求是最高级别的。一般一件古代书画真迹常规展示两三个月就要回到库房养护休眠。上海博物馆 — 段落/内容单元:上海博物馆的定位是世界顶级的中国古代艺术博物馆,其实上海博物馆在1952年成立之初,当时中央文化部和华东军管委批准设立筹", "source_line_range": [ 109, 139 ] } ], "ending": { "text": "时中央文化部和华东军管委批准设立筹建上海博物馆,给上博的定位是艺术博物馆。七十多年过去了,对上博而言我们开拓现当代艺术收藏是没有任何问题,因为跟它的定位是吻合的。未来,上海博物馆也会在这方面加大力度。" } } }, { "id": "article-018", "name": "嫦娥六号拍摄月背系列影像图公布", "url": "https://www.ithome.com/0/772/941.htm", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "嫦娥六号拍摄月背系列影像图公布,含着陆点彩色全景图像" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "远洋" ] }, { "id": "stable-3", "alternatives": [ "首页" ] }, { "id": "stable-4", "alternatives": [ "IT圈" ] }, { "id": "stable-5", "alternatives": [ "最会买" ] }, { "id": "stable-6", "alternatives": [ "设置" ] }, { "id": "stable-7", "alternatives": [ "投稿" ] }, { "id": "stable-8", "alternatives": [ "订阅" ] }, { "id": "stable-9", "alternatives": [ "软媒应用" ] }, { "id": "stable-10", "alternatives": [ "登录" ] }, { "id": "stable-11", "alternatives": [ "业界" ] }, { "id": "stable-12", "alternatives": [ "手机" ] }, { "id": "stable-13", "alternatives": [ "电脑" ] }, { "id": "stable-14", "alternatives": [ "测评" ] }, { "id": "stable-15", "alternatives": [ "视频" ] }, { "id": "stable-16", "alternatives": [ "AI" ] }, { "id": "stable-17", "alternatives": [ "苹果" ] }, { "id": "stable-18", "alternatives": [ "iPhone" ] }, { "id": "stable-19", "alternatives": [ "鸿蒙" ] }, { "id": "stable-20", "alternatives": [ "软件" ] }, { "id": "stable-21", "alternatives": [ "智车" ] }, { "id": "stable-22", "alternatives": [ "数码" ] }, { "id": "stable-23", "alternatives": [ "学院" ] }, { "id": "stable-24", "alternatives": [ "游戏" ] }, { "id": "stable-25", "alternatives": [ "直播" ] }, { "id": "stable-26", "alternatives": [ "5G" ] }, { "id": "stable-27", "alternatives": [ "微软" ] }, { "id": "stable-28", "alternatives": [ "Win10" ] }, { "id": "stable-29", "alternatives": [ "Win11" ] }, { "id": "stable-30", "alternatives": [ "专题" ] }, { "id": "stable-31", "alternatives": [ "搜索" ] }, { "id": "stable-32", "alternatives": [ "App" ] }, { "id": "stable-33", "alternatives": [ "公众号" ] }, { "id": "stable-34", "alternatives": [ "科学探索" ] }, { "id": "stable-35", "alternatives": [ "天文航天" ] }, { "id": "stable-36", "alternatives": [ "投诉水文" ] }, { "id": "stable-37", "alternatives": [ "我要纠错" ] }, { "id": "stable-38", "alternatives": [ "文章价值" ] }, { "id": "stable-39", "alternatives": [ "有价值" ] }, { "id": "stable-40", "alternatives": [ "无价值" ] }, { "id": "stable-41", "alternatives": [ "相关文章" ] }, { "id": "stable-42", "alternatives": [ "关键词" ] }, { "id": "stable-43", "alternatives": [ "日榜" ] }, { "id": "stable-44", "alternatives": [ "周榜" ] }, { "id": "stable-45", "alternatives": [ "月榜" ] }, { "id": "stable-46", "alternatives": [ "软媒旗下网站" ] }, { "id": "stable-47", "alternatives": [ "软媒旗下软件" ] }, { "id": "stable-48", "alternatives": [ "iPhone之家" ] }, { "id": "stable-49", "alternatives": [ "Win7之家" ] }, { "id": "stable-50", "alternatives": [ "Win10之家" ] }, { "id": "stable-51", "alternatives": [ "Win11之家" ] }, { "id": "stable-52", "alternatives": [ "软媒手机APP应用" ] }, { "id": "stable-53", "alternatives": [ "魔方" ] }, { "id": "stable-54", "alternatives": [ "要知" ] }, { "id": "stable-55", "alternatives": [ "关于IT之家" ] }, { "id": "stable-56", "alternatives": [ "联系我们" ] }, { "id": "stable-57", "alternatives": [ "加入软媒" ] }, { "id": "stable-58", "alternatives": [ "WAP版" ] }, { "id": "stable-59", "alternatives": [ "网站地图" ] }, { "id": "stable-60", "alternatives": [ "Archiver" ] }, { "id": "stable-61", "alternatives": [ "IT之家,软媒旗下科技门户网站 - 爱科技,爱这里。" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initial article contains lead, all four ordinary figure captions/explanations and final lunar-ascent paragraph with its real internal link. Initial/middle/end screenshots verify article boundary before feedback/value controls with no expansion. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "嫦娥六号拍摄月背系列影像图公布,含着陆点彩色全景图像" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-018/comment-qualification-reference-r5.json", "sha256": "5b410dc53fdfc6e03a82e82859c6d52189ee8046053428d4ab8c97f774241067", "chars": 766, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "IT之家 6 月 4 日消息,IT之家从国家航天局官网获悉,国家航天局发布嫦娥六号着陆器着陆月球背面拍摄的系列影像图,包括落月过程中降落相机拍摄的着陆区域附近影像、全景相机拍摄的着陆点全景影像。相关影像数据经鹊桥二号中继卫星传回,影像图由地面应用系统处理获得。\n\n嫦娥六号着陆器降落相机拍摄影像图 1\n\n图 1 由降落相机刚开机时拍摄,图像显示拍摄月背区域中下部和右部分布有多个十多公里直径的环形坑,拍摄的月背区域上部中间为暗色的玄武岩分布区。\n\n嫦娥六号着陆器降落相机拍摄影像图 2\n\n图 2 由降落相机在降落过程中拍摄,图像显示拍摄的月背区域分布有大量亮色环形坑。\n\n嫦娥六号着陆器降落相机拍摄影像图 3\n\n图 3 由降落相机在着陆器安全着陆后拍摄,图像显示着陆器底部相对平坦,分布有少量亮色石块。\n\n嫦娥六号着陆器全景相机拍摄全景镶嵌图\n\n该图由全景相机在嫦娥六号铲取采样前,对着陆点北侧月面拍摄的彩色图像镶嵌制作而成。图像上方是着陆点北部查菲环形山,图像的下方是着陆腿和着陆时冲击挤压隆起的月壤。\n\nIT之家今天早些时候报道,6 月 4 日 7 时 38 分,嫦娥六号上升器携带月球样品自月球背面起飞,3000N 发动机工作约 6 分钟后,成功将上升器送入预定环月轨道。这是人类首次月背采样返回任务。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "it 之 家 6 月 4 日 消 息 it 之 家 从 国 家 航 天 局 官 网 获 悉 国 家 航 天 局 发 布 嫦 娥 六 号 着 陆 器 着 陆 月 球 背 面 拍 摄 的 系 列 影 像 图 包 括 落 月 过 程 中 降 落 相 机 拍 摄 的 着 陆 区 域 附 近 影 像 全 景 相 机 拍 摄 的 着 陆 点 全 景 影 像 相 关 影 像 数 据 经 鹊 桥 二 号 中 继 卫 星 传 回 影 像 图 由 地 面 应 用 系 统 处 理 获 得", "source_text": "IT之家 6 月 4 日消息,IT之家从国家航天局官网获悉,国家航天局发布嫦娥六号着陆器着陆月球背面拍摄的系列影像图,包括落月过程中降落相机拍摄的着陆区域附近影像、全景相机拍摄的着陆点全景影像。相关影像数据经鹊桥二号中继卫星传回,影像图由地面应用系统处理获得。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:IT之家 6 月 4 日消息,IT之家从国家航天局官网获悉,国家航天局发布嫦娥六号着陆器着陆月球背面拍摄的系列影像图,包", "source_line_range": [ 1, 2 ] }, { "id": "body-region-2", "text": "嫦 娥 六 号 着 陆 器 降 落 相 机 拍 摄 影 像 图 1 图 1 由 降 落 相 机 刚 开 机 时 拍 摄 图 像 显 示 拍 摄 月 背 区 域 中 下 部 和 右 部 分 布 有 多 个 十 多 公 里 直 径 的 环 形 坑 拍 摄 的 月 背 区 域 上 部 中 间 为 暗 色 的 玄 武 岩 分 布 区", "source_text": "嫦娥六号着陆器降落相机拍摄影像图 1\n\n图 1 由降落相机刚开机时拍摄,图像显示拍摄月背区域中下部和右部分布有多个十多公里直径的环形坑,拍摄的月背区域上部中间为暗色的玄武岩分布区。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:嫦娥六号着陆器降落相机拍摄影像图 1 — 段落/内容单元:图 1 由降落相机刚开机时拍摄,图像显示拍摄月背区域中下部和右部分布有多个十多公里直径的环形坑,拍摄的月背区域上部中间为", "source_line_range": [ 3, 6 ] }, { "id": "body-region-3", "text": "嫦 娥 六 号 着 陆 器 降 落 相 机 拍 摄 影 像 图 2 图 2 由 降 落 相 机 在 降 落 过 程 中 拍 摄 图 像 显 示 拍 摄 的 月 背 区 域 分 布 有 大 量 亮 色 环 形 坑 嫦 娥 六 号 着 陆 器 降 落 相 机 拍 摄 影 像 图 3 图 3 由 降 落 相 机 在 着 陆 器 安 全 着 陆 后 拍 摄 图 像 显 示 着 陆 器 底 部 相 对 平 坦 分 布 有 少 量 亮 色 石 块", "source_text": "嫦娥六号着陆器降落相机拍摄影像图 2\n\n图 2 由降落相机在降落过程中拍摄,图像显示拍摄的月背区域分布有大量亮色环形坑。\n\n嫦娥六号着陆器降落相机拍摄影像图 3\n\n图 3 由降落相机在着陆器安全着陆后拍摄,图像显示着陆器底部相对平坦,分布有少量亮色石块。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:嫦娥六号着陆器降落相机拍摄影像图 2 — 段落/内容单元:图 3 由降落相机在着陆器安全着陆后拍摄,图像显示着陆器底部相对平坦,分布有少量亮色石块。", "source_line_range": [ 7, 14 ] }, { "id": "body-region-4", "text": "嫦 娥 六 号 着 陆 器 全 景 相 机 拍 摄 全 景 镶 嵌 图 该 图 由 全 景 相 机 在 嫦 娥 六 号 铲 取 采 样 前 对 着 陆 点 北 侧 月 面 拍 摄 的 彩 色 图 像 镶 嵌 制 作 而 成 图 像 上 方 是 着 陆 点 北 部 查 菲 环 形 山 图 像 的 下 方 是 着 陆 腿 和 着 陆 时 冲 击 挤 压 隆 起 的 月 壤", "source_text": "嫦娥六号着陆器全景相机拍摄全景镶嵌图\n\n该图由全景相机在嫦娥六号铲取采样前,对着陆点北侧月面拍摄的彩色图像镶嵌制作而成。图像上方是着陆点北部查菲环形山,图像的下方是着陆腿和着陆时冲击挤压隆起的月壤。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:嫦娥六号着陆器全景相机拍摄全景镶嵌图 — 段落/内容单元:该图由全景相机在嫦娥六号铲取采样前,对着陆点北侧月面拍摄的彩色图像镶嵌制作而成。图像上方是着陆点北部查菲环形山,图像的下", "source_line_range": [ 15, 18 ] }, { "id": "body-region-5", "text": "it 之 家 今 天 早 些 时 候 报 道 6 月 4 日 7 时 38 分 嫦 娥 六 号 上 升 器 携 带 月 球 样 品 自 月 球 背 面 起 飞 3000n 发 动 机 工 作 约 6 分 钟 后 成 功 将 上 升 器 送 入 预 定 环 月 轨 道 这 是 人 类 首 次 月 背 采 样 返 回 任 务", "source_text": "IT之家今天早些时候报道,6 月 4 日 7 时 38 分,嫦娥六号上升器携带月球样品自月球背面起飞,3000N 发动机工作约 6 分钟后,成功将上升器送入预定环月轨道。这是人类首次月背采样返回任务。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:IT之家今天早些时候报道,6 月 4 日 7 时 38 分,嫦娥六号上升器携带月球样品自月球背面起飞,3000N 发动机", "source_line_range": [ 19, 19 ] } ], "ending": { "text": "IT之家今天早些时候报道,6 月 4 日 7 时 38 分,嫦娥六号上升器携带月球样品自月球背面起飞,3000N 发动机工作约 6 分钟后,成功将上升器送入预定环月轨道。这是人类首次月背采样返回任务。" } } }, { "id": "article-019", "name": "《如何阅读一本书》读书笔记", "url": "https://www3.jianshu.com/p/4fad54d5b510", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "《如何阅读一本书》\\| 读书笔记" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "凡尘生花" ] }, { "id": "stable-3", "alternatives": [ "登录" ] }, { "id": "stable-4", "alternatives": [ "注册" ] }, { "id": "stable-5", "alternatives": [ "写文章" ] }, { "id": "stable-6", "alternatives": [ "首页" ] }, { "id": "stable-7", "alternatives": [ "下载APP" ] }, { "id": "stable-8", "alternatives": [ "会员" ] }, { "id": "stable-9", "alternatives": [ "影视" ] }, { "id": "stable-10", "alternatives": [ "关注" ] }, { "id": "stable-11", "alternatives": [ "赞赏支持" ] }, { "id": "stable-12", "alternatives": [ "更多精彩内容" ] }, { "id": "stable-13", "alternatives": [ "友情链接" ] }, { "id": "stable-14", "alternatives": [ "热门故事" ] }, { "id": "stable-15", "alternatives": [ "推荐阅读" ] }, { "id": "stable-16", "alternatives": [ "手机看全文" ] }, { "id": "stable-17", "alternatives": [ "评论" ] }, { "id": "stable-18", "alternatives": [ "赞" ] }, { "id": "stable-19", "alternatives": [ "© 著作权归作者所有" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The full initial body has the image caption, opening quotation, all eleven numbered reading-note sections, lists and final sentence before edit/copyright notices. Beginning/middle/end screenshots and un-clipped article CSS confirm ordinary complete text without modal. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "《如何阅读一本书》| 读书笔记" ], "html_selector": "h1._2zeTMs,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-019/comment-qualification-reference-r5.json", "sha256": "a1db62262601448f54eacaccfa7dcafe0436c70f82f2c2a458908ddebda4ebf2", "chars": 769, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "图片发自简书App\n“你现在的气质里,藏着你走过的路,读过的书,爱过的人。”\n\n\n相信很多人都听过这句话,我不否认读书、旅行带给人潜移默化的影响,但是最近我好像突然变的功利,迫不及待的想知道我读过一本书后自己收获了什么。\n\n所以这本书也是一样,它写给那些相信一定的阅读技巧可以提高自己的阅读水平的读者。就像我认识的一些人表示他们只是想随随便便看一些书,那这本书对他们来说就没有阅读的必要啦。\n\n01.阅读的目标\n\n为了获得咨询而读;为求得理解而读;为了消遣而读\n\n在自己进行阅读时,一定要清楚自己阅读的目的是什么,这样你起码会对自己要为此次阅读倾注多少时间、精力有个基本的评估,避免浪费过多时间在无意义的事上。\n\n02.阅读的四个层次\n\n基础阅读;检视阅读;分析阅读;主题阅读\n\n基础阅读就是要求有最基本的阅读能力,大部分受过基础教育的人都已具备这种能力,故不赘述。\n\n03.检视阅读\n\n目的:发现一本书值不值得多花时间仔细阅读\n\n检视阅读一:有系统的略读或粗读\n\n1.先看书名页,如果有序就先看序\n\n2.研究目录页\n\n3.如果书中附有索引,检阅一下\n\n4.读出版者的介绍\n\n5.挑几个看起来与主题息息相关的篇章来看\n\n6.随意翻翻,念一两段或几页\n\n检视阅读二:粗浅的阅读\n\n第一次面对一本难读的书的时候,从头到尾先读一遍,碰到不懂的地方不要停下来查询或思索。\n\n阅读的一部分本质就是被困惑,而且知道自己被困惑。\n04.主动阅读的基础\n\n一个阅读者要提出的四个基本问题:\n\n1.整体来说,这本书到底在谈些什么?主题\n\n2.作者细部说了什么,怎么说的?主要的想法、声明、论点\n\n3.这本书说得有道理吗?是全部有道理?还是部分有道理?\n\n4.这本书跟你有什么关系?\n\n05.分析阅读\n\n第一阶段的规则:\n\n1.知道自己读的是哪一类书\n\n2.使用一个单一的句子或最多几句话来叙述整本书的内容\n\n3.将书中重要篇章列举出来,说明它们如何按照顺序组成一个整体的架构\n\n4.找出作者要问的问题\n\n第二阶段的规则:\n\n1.与作者找出共通的词义 找出重要单字,透过它们与作者达成共识\n\n2.判断作者的主旨 将一本书中重要的句子圈出来,找出其中的主旨\n\n3.从相关文句的关联中,设法构架出一本书的基本论述\n\n4.找出作者的解答 确定作者已经解决了哪些问题,还有哪些问题是未解决的\n\n第三阶段的规则:\n\n1.在你说出“我同意”,“我不同意”或“我暂缓评论”之前,一定要能肯定地说“我了解了”\n\n2.当你不同意作者的观点时,要理性地表达自己的意见,不要无理地辩驳或争论\n\n3.尊重知识与个人观点的不同,在作任何评断之前,都要找出理论基础\n\n我们并不是要假装这是一件很容易的事,我们只是坚持着这并不是做不到的事。\n\n读者对作者进行反驳的四种方式:\n\n1.你的知识不足\n\n2.你的知识有错误\n\n3.你不合逻辑 你的推论无法令人信服\n\n4.你的分析不够完整\n\n06.阅读一本书时外在的辅助来源\n\n1.相关经验 一般经验适用于判断小说的真实性和阅读哲学性书籍,特殊经验适用于阅读科学性作品\n\n2.其他的书 一般适用于巨著,按时间或因果顺序阅读与其相关的其他书籍\n\n3.导论与摘要\n\n4.工具书 字典或百科全书\n\n07.如何阅读实用性的书\n任何实用性的书都不能解决该书所关心的实际问题,实际的问题只能靠行动来解决。\n\n实用性的书分类:\n\n为了说明规则;阐述形成规则的真理\n\n需要问的两个问题:\n\n1.作者的目的是什么?\n\n2.他建议用什么方法达到这个目的?\n\n赞同实用书后的四个问题:\n\n1.这本书在谈什么?\n\n2.找出作者的共识、主旨与论述 了解他要你这么做的目的\n\n3.内容真实吗?\n\n4.这本书与我何干?\n\n08.如何阅读想象文学\n我们都是经由感官与想象来体验事情,我们都是运用判断与推论,也就是理智,才能理解事情。\n\n读想象文学的“不要”:\n\n1.不要抗拒想象文学带给你的影响力\n\n2.在想象文学中,不要去找共识、主旨或论述\n\n3.不要用适合于传递知识的,与真理一致的标准来批评小说\n\n小说的要素是插曲、事件、角色与他们的思想、语言、感觉及行动,这些都是作者所创造出来的世界中的要素\n\n共识与主旨有关,小说的要素与整个场景或背景有关 要在这个想象的世界中宾至如归,变成其中的一员去参与、感受\n\n如果说论说性作品中有任何活动,那就是论述的发展\n\n4.在你衷心感激作者试着为你创造的经验之前,不要批评一本想象的作品\n\n09.如何阅读历史书\n诗与政治对正确的标准是不一致的。\n\n两个要点:\n\n1.对你感兴趣的事件或时期,尽可能地阅读一种以上的历史书\n\n2.阅读历史时,不要只关心在过去某个时间、地点真正发生了什么,还要读懂在任何时空之中,尤其是现在,人们有如此这般行动的原因\n\n要提出的问题:\n\n1.弄清这本书在谈什么,没有谈到的又是什么\n\n2.知道作者是用什么方法来说故事的\n\n3.这与我何干?\n\n批评历史书的方式:\n\n1.这本历史书不够逼真 觉得人们不会那样行动,作者无法掌握人性或人类的事物\n\n2.作者误用了资料\n\n10.如何阅读关于当前的事件\n\n1.知道谁在写这篇报道\n\n2.这个作者想要证明什么?\n\n3.他想要说服谁?\n\n4.他使用的特殊语言是什么?\n\n5.他真的知道自己在说些什么吗?\n\n科学的客观不在于没有最初的偏见,而在于坦白承认。\n11.主题阅读\n\n做主题阅读时的要求:\n\n1.知道对一个特定的问题来说,所牵涉的绝不是一本书而已\n\n2.知道就总的来说,应该读的是哪些书\n\n主题阅读的步骤:\n\n1.收集好书目之后,检视书单上所有的书 找到自己需要的书\n\n2.找到相关的章节 在主题阅读中,你及你关心的主题才是基本的重点,而不是你阅读的书\n\n3.带引作者与你达成共识 我们要建立一组词汇来帮助我们了解所有的读者\n\n4.理清问题 要建立起一组不偏不倚的主旨\n\n5.界定议题\n\n6.分析讨论\n\n简单来说,主题阅读就是要能面面俱到,而自己并不预设立场。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "图 片 发 自 简 书 app 你 现 在 的 气 质 里 藏 着 你 走 过 的 路 读 过 的 书 爱 过 的 人 相 信 很 多 人 都 听 过 这 句 话 我 不 否 认 读 书 旅 行 带 给 人 潜 移 默 化 的 影 响 但 是 最 近 我 好 像 突 然 变 的 功 利 迫 不 及 待 的 想 知 道 我 读 过 一 本 书 后 自 己 收 获 了 什 么 所 以 这 本 书 也 是 一 样 它 写 给 那 些 相 信 一 定 的 阅 读 技 巧 可 以 提 高 自 己 的 阅 读 水 平 的 读 者 就 像 我 认 识 的 一 些 人 表 示 他 们 只 是 想 随 随 便 便 看 一 些 书 那 这 本 书 对 他 们 来 说 就 没 有 阅 读 的 必 要 啦 01 阅 读 的 目 标 为 了 获 得 咨 询 而 读 为 求 得 理 解 而 读 为 了 消 遣 而 读 在 自 己 进 行 阅 读 时 一 定 要 清 楚 自 己 阅 读 的 目 的 是 什 么 这 样 你 起 码 会 对 自 己 要 为 此 次 阅 读 倾 注 多 少 时 间 精 力 有 个 基 本 的 评 估 避 免 浪 费 过 多 时 间 在 无 意 义 的 事 上 02 阅 读 的 四 个 层 次 基 础 阅 读 检 视 阅 读 分 析 阅 读 主 题 阅 读 基 础 阅 读 就 是 要 求 有 最 基 本 的 阅 读 能 力 大 部 分 受 过 基 础 教 育 的 人 都 已 具 备 这 种 能 力 故 不 赘 述", "source_text": "图片发自简书App\n“你现在的气质里,藏着你走过的路,读过的书,爱过的人。”\n\n\n相信很多人都听过这句话,我不否认读书、旅行带给人潜移默化的影响,但是最近我好像突然变的功利,迫不及待的想知道我读过一本书后自己收获了什么。\n\n所以这本书也是一样,它写给那些相信一定的阅读技巧可以提高自己的阅读水平的读者。就像我认识的一些人表示他们只是想随随便便看一些书,那这本书对他们来说就没有阅读的必要啦。\n\n01.阅读的目标\n\n为了获得咨询而读;为求得理解而读;为了消遣而读\n\n在自己进行阅读时,一定要清楚自己阅读的目的是什么,这样你起码会对自己要为此次阅读倾注多少时间、精力有个基本的评估,避免浪费过多时间在无意义的事上。\n\n02.阅读的四个层次\n\n基础阅读;检视阅读;分析阅读;主题阅读\n\n基础阅读就是要求有最基本的阅读能力,大部分受过基础教育的人都已具备这种能力,故不赘述。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:图片发自简书App — 02.阅读的四个层次", "source_line_range": [ 1, 20 ] }, { "id": "body-region-2", "text": "03 检 视 阅 读 目 的 发 现 一 本 书 值 不 值 得 多 花 时 间 仔 细 阅 读 检 视 阅 读 一 有 系 统 的 略 读 或 粗 读 1 先 看 书 名 页 如 果 有 序 就 先 看 序 2 研 究 目 录 页 3 如 果 书 中 附 有 索 引 检 阅 一 下 4 读 出 版 者 的 介 绍 5 挑 几 个 看 起 来 与 主 题 息 息 相 关 的 篇 章 来 看 6 随 意 翻 翻 念 一 两 段 或 几 页 检 视 阅 读 二 粗 浅 的 阅 读 第 一 次 面 对 一 本 难 读 的 书 的 时 候 从 头 到 尾 先 读 一 遍 碰 到 不 懂 的 地 方 不 要 停 下 来 查 询 或 思 索 阅 读 的 一 部 分 本 质 就 是 被 困 惑 而 且 知 道 自 己 被 困 惑 04 主 动 阅 读 的 基 础 一 个 阅 读 者 要 提 出 的 四 个 基 本 问 题 1 整 体 来 说 这 本 书 到 底 在 谈 些 什 么 主 题 2 作 者 细 部 说 了 什 么 怎 么 说 的 主 要 的 想 法 声 明 论 点 3 这 本 书 说 得 有 道 理 吗 是 全 部 有 道 理 还 是 部 分 有 道 理 4 这 本 书 跟 你 有 什 么 关 系 05 分 析 阅 读 第 一 阶 段 的 规 则 1 知 道 自 己 读 的 是 哪 一 类 书 2 使 用 一 个 单 一 的 句 子 或 最 多 几 句 话 来 叙 述 整 本 书 的 内 容 3 将 书 中 重 要 篇 章 列 举 出 来 说 明 它 们 如 何 按 照 顺 序 组 成 一 个 整 体 的 架 构 4 找 出 作 者 要 问 的 问 题 第 二 阶 段 的 规 则 1 与 作 者 找 出 共 通 的 词 义 找 出 重 要 单 字 透 过 它 们 与 作 者 达 成 共 识 2 判 断 作 者 的 主 旨 将 一 本 书 中 重 要 的 句 子 圈 出 来 找 出 其 中 的 主 旨 3 从 相 关 文 句 的 关 联 中 设 法 构 架 出 一 本 书 的 基 本 论 述 4 找 出 作 者 的 解 答 确 定 作 者 已 经 解 决 了 哪 些 问 题 还 有 哪 些 问 题 是 未 解 决 的 第 三 阶 段 的 规 则 1 在 你 说 出 我 同 意 我 不 同 意 或 我 暂 缓 评 论 之 前 一 定 要 能 肯 定 地 说 我 了 解 了 2 当 你 不 同 意 作 者 的 观 点 时 要 理 性 地 表 达 自 己 的 意 见 不 要 无 理 地 辩 驳 或 争 论 3 尊 重 知 识 与 个 人 观 点 的 不 同 在 作 任 何 评 断 之 前 都 要 找 出 理 论 基 础 我 们 并 不 是 要 假 装 这 是 一 件 很 容 易 的 事 我 们 只 是 坚 持 着 这 并 不 是 做 不 到 的 事 读 者 对 作 者 进 行 反 驳 的 四 种 方 式 1 你 的 知 识 不 足 2 你 的 知 识 有 错 误 3 你 不 合 逻 辑 你 的 推 论 无 法 令 人 信 服 4 你 的 分 析 不 够 完 整", "source_text": "03.检视阅读\n\n目的:发现一本书值不值得多花时间仔细阅读\n\n检视阅读一:有系统的略读或粗读\n\n1.先看书名页,如果有序就先看序\n\n2.研究目录页\n\n3.如果书中附有索引,检阅一下\n\n4.读出版者的介绍\n\n5.挑几个看起来与主题息息相关的篇章来看\n\n6.随意翻翻,念一两段或几页\n\n检视阅读二:粗浅的阅读\n\n第一次面对一本难读的书的时候,从头到尾先读一遍,碰到不懂的地方不要停下来查询或思索。\n\n阅读的一部分本质就是被困惑,而且知道自己被困惑。\n04.主动阅读的基础\n\n一个阅读者要提出的四个基本问题:\n\n1.整体来说,这本书到底在谈些什么?主题\n\n2.作者细部说了什么,怎么说的?主要的想法、声明、论点\n\n3.这本书说得有道理吗?是全部有道理?还是部分有道理?\n\n4.这本书跟你有什么关系?\n\n05.分析阅读\n\n第一阶段的规则:\n\n1.知道自己读的是哪一类书\n\n2.使用一个单一的句子或最多几句话来叙述整本书的内容\n\n3.将书中重要篇章列举出来,说明它们如何按照顺序组成一个整体的架构\n\n4.找出作者要问的问题\n\n第二阶段的规则:\n\n1.与作者找出共通的词义 找出重要单字,透过它们与作者达成共识\n\n2.判断作者的主旨 将一本书中重要的句子圈出来,找出其中的主旨\n\n3.从相关文句的关联中,设法构架出一本书的基本论述\n\n4.找出作者的解答 确定作者已经解决了哪些问题,还有哪些问题是未解决的\n\n第三阶段的规则:\n\n1.在你说出“我同意”,“我不同意”或“我暂缓评论”之前,一定要能肯定地说“我了解了”\n\n2.当你不同意作者的观点时,要理性地表达自己的意见,不要无理地辩驳或争论\n\n3.尊重知识与个人观点的不同,在作任何评断之前,都要找出理论基础\n\n我们并不是要假装这是一件很容易的事,我们只是坚持着这并不是做不到的事。\n\n读者对作者进行反驳的四种方式:\n\n1.你的知识不足\n\n2.你的知识有错误\n\n3.你不合逻辑 你的推论无法令人信服\n\n4.你的分析不够完整", "segmentation_method": "reviewed_source_semantics", "label": "03.检视阅读 — 05.分析阅读", "source_line_range": [ 21, 97 ] }, { "id": "body-region-3", "text": "06 阅 读 一 本 书 时 外 在 的 辅 助 来 源 1 相 关 经 验 一 般 经 验 适 用 于 判 断 小 说 的 真 实 性 和 阅 读 哲 学 性 书 籍 特 殊 经 验 适 用 于 阅 读 科 学 性 作 品 2 其 他 的 书 一 般 适 用 于 巨 著 按 时 间 或 因 果 顺 序 阅 读 与 其 相 关 的 其 他 书 籍 3 导 论 与 摘 要 4 工 具 书 字 典 或 百 科 全 书 07 如 何 阅 读 实 用 性 的 书 任 何 实 用 性 的 书 都 不 能 解 决 该 书 所 关 心 的 实 际 问 题 实 际 的 问 题 只 能 靠 行 动 来 解 决 实 用 性 的 书 分 类 为 了 说 明 规 则 阐 述 形 成 规 则 的 真 理 需 要 问 的 两 个 问 题 1 作 者 的 目 的 是 什 么 2 他 建 议 用 什 么 方 法 达 到 这 个 目 的 赞 同 实 用 书 后 的 四 个 问 题 1 这 本 书 在 谈 什 么 2 找 出 作 者 的 共 识 主 旨 与 论 述 了 解 他 要 你 这 么 做 的 目 的 3 内 容 真 实 吗 4 这 本 书 与 我 何 干", "source_text": "06.阅读一本书时外在的辅助来源\n\n1.相关经验 一般经验适用于判断小说的真实性和阅读哲学性书籍,特殊经验适用于阅读科学性作品\n\n2.其他的书 一般适用于巨著,按时间或因果顺序阅读与其相关的其他书籍\n\n3.导论与摘要\n\n4.工具书 字典或百科全书\n\n07.如何阅读实用性的书\n任何实用性的书都不能解决该书所关心的实际问题,实际的问题只能靠行动来解决。\n\n实用性的书分类:\n\n为了说明规则;阐述形成规则的真理\n\n需要问的两个问题:\n\n1.作者的目的是什么?\n\n2.他建议用什么方法达到这个目的?\n\n赞同实用书后的四个问题:\n\n1.这本书在谈什么?\n\n2.找出作者的共识、主旨与论述 了解他要你这么做的目的\n\n3.内容真实吗?\n\n4.这本书与我何干?", "segmentation_method": "reviewed_source_semantics", "label": "06.阅读一本书时外在的辅助来源 — 07.如何阅读实用性的书", "source_line_range": [ 98, 130 ] }, { "id": "body-region-4", "text": "08 如 何 阅 读 想 象 文 学 我 们 都 是 经 由 感 官 与 想 象 来 体 验 事 情 我 们 都 是 运 用 判 断 与 推 论 也 就 是 理 智 才 能 理 解 事 情 读 想 象 文 学 的 不 要 1 不 要 抗 拒 想 象 文 学 带 给 你 的 影 响 力 2 在 想 象 文 学 中 不 要 去 找 共 识 主 旨 或 论 述 3 不 要 用 适 合 于 传 递 知 识 的 与 真 理 一 致 的 标 准 来 批 评 小 说 小 说 的 要 素 是 插 曲 事 件 角 色 与 他 们 的 思 想 语 言 感 觉 及 行 动 这 些 都 是 作 者 所 创 造 出 来 的 世 界 中 的 要 素 共 识 与 主 旨 有 关 小 说 的 要 素 与 整 个 场 景 或 背 景 有 关 要 在 这 个 想 象 的 世 界 中 宾 至 如 归 变 成 其 中 的 一 员 去 参 与 感 受 如 果 说 论 说 性 作 品 中 有 任 何 活 动 那 就 是 论 述 的 发 展 4 在 你 衷 心 感 激 作 者 试 着 为 你 创 造 的 经 验 之 前 不 要 批 评 一 本 想 象 的 作 品 09 如 何 阅 读 历 史 书 诗 与 政 治 对 正 确 的 标 准 是 不 一 致 的 两 个 要 点 1 对 你 感 兴 趣 的 事 件 或 时 期 尽 可 能 地 阅 读 一 种 以 上 的 历 史 书 2 阅 读 历 史 时 不 要 只 关 心 在 过 去 某 个 时 间 地 点 真 正 发 生 了 什 么 还 要 读 懂 在 任 何 时 空 之 中 尤 其 是 现 在 人 们 有 如 此 这 般 行 动 的 原 因 要 提 出 的 问 题 1 弄 清 这 本 书 在 谈 什 么 没 有 谈 到 的 又 是 什 么 2 知 道 作 者 是 用 什 么 方 法 来 说 故 事 的 3 这 与 我 何 干 批 评 历 史 书 的 方 式 1 这 本 历 史 书 不 够 逼 真 觉 得 人 们 不 会 那 样 行 动 作 者 无 法 掌 握 人 性 或 人 类 的 事 物 2 作 者 误 用 了 资 料", "source_text": "08.如何阅读想象文学\n我们都是经由感官与想象来体验事情,我们都是运用判断与推论,也就是理智,才能理解事情。\n\n读想象文学的“不要”:\n\n1.不要抗拒想象文学带给你的影响力\n\n2.在想象文学中,不要去找共识、主旨或论述\n\n3.不要用适合于传递知识的,与真理一致的标准来批评小说\n\n小说的要素是插曲、事件、角色与他们的思想、语言、感觉及行动,这些都是作者所创造出来的世界中的要素\n\n共识与主旨有关,小说的要素与整个场景或背景有关 要在这个想象的世界中宾至如归,变成其中的一员去参与、感受\n\n如果说论说性作品中有任何活动,那就是论述的发展\n\n4.在你衷心感激作者试着为你创造的经验之前,不要批评一本想象的作品\n\n09.如何阅读历史书\n诗与政治对正确的标准是不一致的。\n\n两个要点:\n\n1.对你感兴趣的事件或时期,尽可能地阅读一种以上的历史书\n\n2.阅读历史时,不要只关心在过去某个时间、地点真正发生了什么,还要读懂在任何时空之中,尤其是现在,人们有如此这般行动的原因\n\n要提出的问题:\n\n1.弄清这本书在谈什么,没有谈到的又是什么\n\n2.知道作者是用什么方法来说故事的\n\n3.这与我何干?\n\n批评历史书的方式:\n\n1.这本历史书不够逼真 觉得人们不会那样行动,作者无法掌握人性或人类的事物\n\n2.作者误用了资料", "segmentation_method": "reviewed_source_semantics", "label": "08.如何阅读想象文学 — 09.如何阅读历史书", "source_line_range": [ 131, 172 ] }, { "id": "body-region-5", "text": "10 如 何 阅 读 关 于 当 前 的 事 件 1 知 道 谁 在 写 这 篇 报 道 2 这 个 作 者 想 要 证 明 什 么 3 他 想 要 说 服 谁 4 他 使 用 的 特 殊 语 言 是 什 么 5 他 真 的 知 道 自 己 在 说 些 什 么 吗 科 学 的 客 观 不 在 于 没 有 最 初 的 偏 见 而 在 于 坦 白 承 认 11 主 题 阅 读 做 主 题 阅 读 时 的 要 求 1 知 道 对 一 个 特 定 的 问 题 来 说 所 牵 涉 的 绝 不 是 一 本 书 而 已 2 知 道 就 总 的 来 说 应 该 读 的 是 哪 些 书 主 题 阅 读 的 步 骤 1 收 集 好 书 目 之 后 检 视 书 单 上 所 有 的 书 找 到 自 己 需 要 的 书 2 找 到 相 关 的 章 节 在 主 题 阅 读 中 你 及 你 关 心 的 主 题 才 是 基 本 的 重 点 而 不 是 你 阅 读 的 书 3 带 引 作 者 与 你 达 成 共 识 我 们 要 建 立 一 组 词 汇 来 帮 助 我 们 了 解 所 有 的 读 者 4 理 清 问 题 要 建 立 起 一 组 不 偏 不 倚 的 主 旨 5 界 定 议 题 6 分 析 讨 论 简 单 来 说 主 题 阅 读 就 是 要 能 面 面 俱 到 而 自 己 并 不 预 设 立 场", "source_text": "10.如何阅读关于当前的事件\n\n1.知道谁在写这篇报道\n\n2.这个作者想要证明什么?\n\n3.他想要说服谁?\n\n4.他使用的特殊语言是什么?\n\n5.他真的知道自己在说些什么吗?\n\n科学的客观不在于没有最初的偏见,而在于坦白承认。\n11.主题阅读\n\n做主题阅读时的要求:\n\n1.知道对一个特定的问题来说,所牵涉的绝不是一本书而已\n\n2.知道就总的来说,应该读的是哪些书\n\n主题阅读的步骤:\n\n1.收集好书目之后,检视书单上所有的书 找到自己需要的书\n\n2.找到相关的章节 在主题阅读中,你及你关心的主题才是基本的重点,而不是你阅读的书\n\n3.带引作者与你达成共识 我们要建立一组词汇来帮助我们了解所有的读者\n\n4.理清问题 要建立起一组不偏不倚的主旨\n\n5.界定议题\n\n6.分析讨论\n\n简单来说,主题阅读就是要能面面俱到,而自己并不预设立场。", "segmentation_method": "reviewed_source_semantics", "label": "10.如何阅读关于当前的事件 — 11.主题阅读", "source_line_range": [ 173, 208 ] } ], "ending": { "text": "带引作者与你达成共识 我们要建立一组词汇来帮助我们了解所有的读者\n\n4.理清问题 要建立起一组不偏不倚的主旨\n\n5.界定议题\n\n6.分析讨论\n\n简单来说,主题阅读就是要能面面俱到,而自己并不预设立场。" } } }, { "id": "article-020", "name": "事务隔离机制", "url": "https://www.cnblogs.com/wuqiuyin/p/15403538.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "事务隔离机制" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "小丶凡" ] }, { "id": "stable-2", "alternatives": [ "目录" ] }, { "id": "stable-3", "alternatives": [ "本文作者" ] }, { "id": "stable-4", "alternatives": [ "本文链接" ] }, { "id": "stable-5", "alternatives": [ "直接私信" ] }, { "id": "stable-6", "alternatives": [ "版权声明" ] }, { "id": "stable-7", "alternatives": [ "BY-NC-SA" ] }, { "id": "stable-8", "alternatives": [ "声援博主" ] }, { "id": "stable-9", "alternatives": [ "推荐" ] }, { "id": "stable-10", "alternatives": [ "分类" ] }, { "id": "stable-11", "alternatives": [ "免责声明" ] }, { "id": "stable-12", "alternatives": [ "推荐该文" ] }, { "id": "stable-13", "alternatives": [ "关注博主" ] }, { "id": "stable-14", "alternatives": [ "收藏本文" ] }, { "id": "stable-15", "alternatives": [ "分享微信" ] }, { "id": "stable-16", "alternatives": [ "收藏" ] }, { "id": "stable-17", "alternatives": [ "举报" ] }, { "id": "stable-18", "alternatives": [ "登录" ] }, { "id": "stable-19", "alternatives": [ "逛逛" ] }, { "id": "stable-20", "alternatives": [ "博客园首页" ] }, { "id": "stable-21", "alternatives": [ "编辑推荐" ] }, { "id": "stable-22", "alternatives": [ "MENU" ] }, { "id": "stable-23", "alternatives": [ "MYSQL" ] }, { "id": "stable-24", "alternatives": [ "博客园" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete article includes original TOC, all seven sections, transaction tables and every SQL example through final InnoDB next-key-lock conclusion. The __EOF__ marker and generic author/license suffix are site boilerplate excluded from body; screenshots verify uncollapsed text at middle and end. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "事务隔离机制" ], "html_selector": "#事务隔离机制,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-020/comment-qualification-reference-r5.json", "sha256": "88e783fc63fb4bf9ab19496f32f1a20aaa98a0beec0a3eb610bbd2bdf3667a76", "chars": 778, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "目录\n事务隔离机制\n一、事务隔离机制/级别介绍\n二、未提交读(Read uncommitted)\n1、未提交读的数据库锁情况(实现原理)\n三、提交读(Read committed)\n提交读的数据库锁情况\n四、可重复读(Repeatable reads)\n可重复读的数据库锁情况\n五、可序列化(Serializable)\n可序列化的数据库锁情况\n六、修改事务隔离级别\n修改事务隔离级别\n七、InnoDB存储引擎\n\n事务隔离机制\n一、事务隔离机制/级别介绍\n\n事务具有原子性、一致性、隔离性、持久性四大特性,而隔离性顾名思义指的就是事务彼此之间隔离开,多个事务在同时处理一个数据时彼此之间互相不影响,如果隔离的不够好就有可能会产生脏读、不可重复度、幻读等读现象,为此,隔离性总共分为四种级别:\n\n由低到高依次为Read uncommitted 、Read committed 、Repeatable read 、Serializable ,这四个级别可以逐个解决脏读 、不可重复读 、幻读 这几类问题。\n\n隔离机制\t特点\t脏读\t不可重复读\t幻读\nRead uncommitted(独立提交,未提交读)\t允许事务查看其他事务所进行的未提交更改\t√\t√\t√\nRead committed(提交读)\t允许其他事务查看已经提交的事务\t×\t√\t√\nRepeatable read(可重复读,innodb引擎默认)\t确保每个事务的 SELECT 输出一致 InnoDB 的默认级别 #commit之后,其他窗口看不到数据,必须退出重新登录查看\t×\t×\t√\nSerializable(可序列化、串行化)\t将一个事务于其他事务完全隔离,即串行化 #当一个事务没有提交,查询也不行。例如:我改微信头像的时候你不能看我的信息,我看你朋友圈的时候你不能发朋友圈也不能看朋友圈\t×\t×\t×\n\n需要强调的是:我们确实可以采用提高事务的隔离级别的方式来解决脏读、不可重复读、幻读等问题,但与此同时,事务的隔离级别越高,并发能力也就越低。所以,还需要读者根据业务需要进行权衡。\n\n二、未提交读(Read uncommitted)\n\n未提交读(READ UNCOMMITTED)是最低的隔离级别。通过名字我们就可以知道,在这种事务隔离级别下,一个事务可以读到另外一个事务未提交的数据。\n\n1、未提交读的数据库锁情况(实现原理)\n\n事务在读数据的时候并未对数据加锁。\n\n事务在修改数据的时候只对数据增加行级共享锁。\n\n现象:\n\n事务1读取某行记录时,事务2也能对这行记录进行读取、更新(因为事务一并未对数据增加任何锁)。\n\n当事务2对该记录进行更新时,事务1再次读取该记录,能读到事务2对该记录的修改版本(因为事务二只增加了共享读锁,事务一可以再增加共享读锁读取数据),即使该修改尚未被提交,若此时事务2回滚,那事务1读到的就脏数据了,这就引发了脏读现象。\n\n事务1更新某行记录时,事务2不能对这行记录做更新,直到事务1结束。(因为事务一对数据增加了共享读锁,事务二不能增加排他写锁进行数据的修改)。\n\n举例:\n\n下面还是借用我在数据库的读现象浅析一文中举的例子来说明在未提交读的隔离级别中两个事务之间的隔离情况。\n\n注:在测试之前,设置事务的隔离模式:set tx_isolation='READ-UNCOMMITTED';\n\n事务一\t事务二\n/* Query 1 / SELECT age FROM users WHERE id = 1; / will read 20 */\t\n\t/* Query 2 / UPDATE users SET age = 21 WHERE id = 1; / No commit here */\n/* Query 1 / SELECT age FROM users WHERE id = 1; / will read 21 */\t\n\tROLLBACK; /* lock-based DIRTY READ */\n\n事务一共查询了两次,在两次查询的过程中,事务二对数据进行了修改,并未提交(commit)。但是事务一的第二次查询查到了事务二的修改结果。在数据库的读现象浅析中我们介绍过,这种现象我们称之为脏读。\n\n所以,未提交读会导致脏读。\n\n三、提交读(Read committed)\n\n提交读(READ COMMITTED)也可以翻译成读已提交,通过名字也可以分析出,在一个事务修改数据过程中,如果事务还没提交,其他事务不能读该数据。\n\n提交读的数据库锁情况\n\n事务对当前被读取的数据加行级共享锁(当读到时才加锁),一旦读完该行,立即释放该行级共享锁;事务在更新某数据的瞬间(就是发生更新的瞬间),必须先对其加行级排他锁,直到事务结束才释放。但是事务一旦提交,其他事务可以立即查看到已经提交了的数据。\n\n现象:\n\n事务1在读取某行记录的整个过程中,事务2都可以对该行记录进行读取(因为事务一对该行记录增加行级共享锁的情况下,事务二同样可以对该数据增加共享锁来读数据。)。\n\n事务1读取某行的一瞬间,事务2不能修改该行数据,但是,只要事务1读取完改行数据,事务2就可以对该行数据进行修改。(事务一在读取的一瞬间会对数据增加共享锁,任何其他事务都不能对该行数据增加排他锁。但是事务一只要读完该行数据,就会释放行级共享锁,一旦锁释放,事务二就可以对数据增加排他锁并修改数据)。\n\n事务1更新某行记录时,事务2不能对这行记录做更新,直到事务1结束。(事务一在更新数据的时候,会对该行数据增加排他锁,知道事务结束才会释放锁,所以,在事务二没有提交之前,事务一都能不对数据增加共享锁进行数据的读取。所以,提交读可以解决脏读的现象)。\n\n举例:\n\n事务一\t事务二\n/* Query 1 */ SELECT * FROM users WHERE id = 1;\t\n\t/* Query 2 / UPDATE users SET age = 21 WHERE id = 1; COMMIT; / in multiversion concurrency control, or lock-based READ COMMITTED */\n/* Query 1 / SELECT * FROM users WHERE id = 1; COMMIT; /lock-based REPEATABLE READ */\t\n\n在提交读隔离级别中,在事务二提交之前,事务一不能读取数据。只有在事务二提交之后,事务一才能读数据。但是从上面的例子中我们也看到,事务一两次读取的结果并不一致,所以提交读不能解决不可重复读的读现象。\n\n简而言之,提交读这种隔离级别保证了读到的任何数据都是提交的数据,避免了脏读(dirty reads)。但是不保证事务重新读的时候能读到相同的数据,因为在每次数据读完之后其他事务可以修改刚才读到的数据。\n\n四、可重复读(Repeatable reads)\n\n可重复读(REPEATABLE READS),由于提交读隔离级别会产生不可重复读的读现象。所以,比提交读更高一个级别的隔离级别就可以解决不可重复读的问题。这种隔离级别就叫可重复读(这名字起的是不是很任性!!)。\n\n可重复读的数据库锁情况\n\n事务在读取某数据的瞬间(就是开始读取的瞬间),必须先对其加 行级共享锁,直到事务结束才释放;事务在更新某数据的瞬间(就是发生更新的瞬间),必须先对其加 行级排他锁,直到事务结束才释放。\n\n现象\n\n事务1在读取某行记录的整个过程中,事务2都可以对该行记录进行读取(因为事务一对该行记录增加行级共享锁的情况下,事务二同样可以对该数据增加共享锁来读数据。)。\n\n事务1在读取某行记录的整个过程中,事务2都不能修改该行数据(事务一在读取的整个过程会对数据增加共享锁,直到事务提交才会释放锁,所以整个过程中,任何其他事务都不能对该行数据增加排他锁。所以,可重复读能够解决不可重复读的读现象)。\n\n事务1更新某行记录时,事务2不能对这行记录做更新,直到事务1结束。(事务一在更新数据的时候,会对该行数据增加排他锁,知道事务结束才会释放锁,所以,在事务二没有提交之前,事务一都能不对数据增加共享锁进行数据的读取。所以,提交读可以解决脏读的现象)。\n\n举例\n\n事务一\t事务二\n/* Query 1 */ SELECT * FROM users WHERE id = 1; COMMIT;\t\n\t/* Query 2 / UPDATE users SET age = 21 WHERE id = 1; COMMIT; / in multiversion concurrency control, or lock-based READ COMMITTED */\n\n在上面的例子中,只有在事务一提交之后,事务二才能更改该行数据。所以,只要在事务一从开始到结束的这段时间内,无论他读取该行数据多少次,结果都是一样的。\n\n从上面的例子中我们可以得到结论:可重复读隔离级别可以解决不可重复读的读现象。但是可重复读这种隔离级别中,还有另外一种读现象他解决不了,那就是幻读。看下面的例子:\n\n事务一\t事务二\n/* Query 1 */ SELECT * FROM users WHERE age BETWEEN 10 AND 30;\t\n\t/* Query 2 */ INSERT INTO users VALUES ( 3, 'Bob', 27 ); COMMIT;\n/* Query 1 */ SELECT * FROM users WHERE age BETWEEN 10 AND 30;\t\n\n上面的两个事务执行情况及现象如下:\n\n事务一的第一次查询条件是age BETWEEN 10 AND 30;如果这是有十条记录符合条件。这时,他会给符合条件的这十条记录增加行级共享锁。任何其他事务无法更改这十条记录。\n\n事务二执行一条sql语句,语句的内容是向表中插入一条数据。因为此时没有任何事务对表增加表级锁,所以,该操作可以顺利执行。\n\n事务一再次执行SELECT * FROM users WHERE age BETWEEN 10 AND 30;时,结果返回的记录变成了十一条,比刚刚增加了一条,增加的这条正是事务二刚刚插入的那条。\n\n所以,事务一的两次范围查询结果相同。这也就是我们提到的幻读。\n\n五、可序列化(Serializable)\n\n可序列化(Serializable)是最高的隔离级别,前面提到的所有的隔离级别都无法解决的幻读,在可序列化的隔离级别中可以解决。\n\n我们说过,产生幻读的原因是事务一在进行范围查询的时候没有增加范围锁(range-locks:给SELECT 的查询中使用一个“WHERE”子句描述范围加锁),所以导致幻读。\n\n可序列化的数据库锁情况\n\n事务在读取数据时,必须先对其加 表级共享锁 ,直到事务结束才释放;事务在更新数据时,必须先对其加 表级排他锁 ,直到事务结束才释放。\n\n现象:\n\n事务1正在读取A表中的记录时,则事务2也能读取A表,但不能对A表做更新、新增、删除,直到事务1结束。(因为事务一对表增加了表级共享锁,其他事务只能增加共享锁读取数据,不能进行其他任何操作)。\n\n事务1正在更新A表中的记录时,则事务2不能读取A表的任意记录,更不可能对A表做更新、新增、删除,直到事务1结束。(事务一对表增加了表级排他锁,其他事务不能对表增加共享锁或排他锁,也就无法进行任何操作)。\n\n第一步:设置事务的隔离级别\n\t\t\tmysql> set tx_isolation='SERIALIZABLE';\n\t\t\tQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\n\t\t\tmysql> show variables like '%tx_isolation%';\n\t\t\t+---------------+--------------+\n\t\t\t| Variable_name | Value |\n\t\t\t+---------------+--------------+\n\t\t\t| tx_isolation | SERIALIZABLE |\n\t\t\t+---------------+--------------+\n\t\t\t1 row in set (0.00 sec)\n\n\t\t第二步:开启事务\n\n\t\t\tmysql> start transaction;\n\t\t\tQuery OK, 0 rows affected (0.00 sec)\n\n\t\t第三步:修改数据\n\n\t\t\tmysql> update student set age = 18 where id = 2;\n\t\t\tQuery OK, 1 row affected (0.00 sec)\n\t\t\tRows matched: 1 Changed: 1 Warnings: 0\n\n\t\t第四步:查看该数据\n\n\t\t\tmysql> select * from student where id = 2;\n\t\t\t^C^C -- query aborted\n\t\t\tERROR 1317 (70100): Query execution was interrupted\n\n\t\t第五步:修改改数据\n\n\t\t\tmysql> update student set age = 17 where id = 2;\n\t\t\t^C^C -- query aborted\n\t\t\tERROR 1317 (70100): Query execution was interrupted\n\n\t\t当事务的隔离机制为:可序列化机制时,一旦加上排它锁,那么其他事务将无法查看也无法修改该数据。\n\n\n虽然可序列化解决了脏读、不可重复读、幻读等读现象。但是序列化事务会产生以下效果:\n\n无法读取其它事务已修改但未提交的记录。\n\n在当前事务完成之前,其它事务不能修改目前事务已读取的记录。\n\n在当前事务完成之前,其它事务所插入的新记录,其索引键值不能在当前事务的任何语句所读取的索引键范围中。\n\n四种事务隔离级别从隔离程度上越来越高,但同时在并发性上也就越来越低。之所以有这么几种隔离级别,就是为了方便开发人员在开发过程中根据业务需要选择最合适的隔离级别。\n\n六、修改事务隔离级别\n\n在 MySQL 中,可以通过show variables like '%tx_isolation%'或select @@tx_isolation;语句来查看当前事务隔离级别。\n\n查看当前事务隔离级别的 SQL 语句和运行结果如下:\n\nmysql> show variables like '%tx_isolation%';\n+---------------+------------------+\n| Variable_name | Value |\n+---------------+------------------+\n| tx_isolation | READ-UNCOMMITTED |\n+---------------+------------------+\n1 row in set (0.00 sec)\n\nmysql> select @@tx_isolation;\n+------------------+\n| @@tx_isolation |\n+------------------+\n| READ-UNCOMMITTED |\n+------------------+\n1 row in set, 1 warning (0.00 sec)\n\n\n结果显示,目前 MySQL 的事务隔离级别是 READ-UNCOMMITTED。\n\n修改事务隔离级别\n\nMySQL 提供了 SET TRANSACTION 语句,该语句可以改变单个会话或全局的事务隔离级别。语法格式如下:\n\nSET [SESSION | GLOBAL] TRANSACTION ISOLATION LEVEL {READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE}\n\n其中,SESSION 和 GLOBAL 关键字用来指定修改的事务隔离级别的范围:\n\nSESSION:表示修改的事务隔离级别将应用于当前 session(当前 cmd 窗口)内的所有事务\n\nGLOBAL:表示修改的事务隔离级别将应用于所有 session(全局)中的所有事务,且当前已经存在的 session 不受影响\n\n如果省略 SESSION 和 GLOBAL,表示修改的事务隔离级别将应用于当前 session 内的下一个还未开始的事务。\n\n任何用户都能改变会话的事务隔离级别,但是只有拥有 SUPER 权限的用户才能改变全局的事务隔离级别。\n\n如果使用普通用户修改全局事务隔离级别,就会提示需要超级权限才能执行此操作的错误信息,SQL 语句和运行结果如下:\n\nmysql> SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;\nQuery OK, 0 rows affected (0.00 sec)\n\n\n示例 1\n\n使用 SET TRANSACTION 语句分别修改 session 和全局的事务隔离级别SQL 语句和运行结果如下:\n\nmysql> select @@session.tx_isolation;\n+------------------------+\n| @@session.tx_isolation |\n+------------------------+\n| READ-UNCOMMITTED |\n+------------------------+\n1 row in set, 1 warning (0.00 sec)\n\nmysql> SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> select @@global.tx_isolation;\n+-----------------------+\n| @@global.tx_isolation |\n+-----------------------+\n| REPEATABLE-READ |\n+-----------------------+\n1 row in set, 1 warning (0.00 sec)\n\n\n还可以使用 set tx_isolation 命令直接修改当前 session 的事务隔离级别,SQL 语句和运行结果如下:\n\nmysql> set tx_isolation='READ-COMMITTED';\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nmysql> select @@global.tx_isolation;\n+-----------------------+\n| @@global.tx_isolation |\n+-----------------------+\n| REPEATABLE-READ |\n+-----------------------+\n1 row in set, 1 warning (0.00 sec)\n\n\n永久修改如下:\n\n[root@db01 ~]# vim /etc/my.cnf\n[mysqld]\ntransaction_isolation=read-uncommit\n\n七、InnoDB存储引擎\n\n前文我们提到过InnoDB支持行锁(锁定字段含有索引的情况下,否则走表锁),但锁定方式并非简单的锁定指定行上的索引,而是分为3种锁定算法:\n1)记录锁(Record Locks):锁定指定行的索引项\n2)Gap Locks:锁定某一个范围内的索引,但不包括记录本身\n3)间隙锁定(Next-Key Locks):锁定一个范围内的索引,并且锁定记录本身 Next-Key Locks = Record Locks + Gap Locks\nA next-key lock is a combination of a record lock on the index record and a gap lock on the gap before the index record\n\n而InnoDB 存储引擎默认隔离级别为可重复读(Repeatable Read),该隔离级别下,对于索引的查询采用 next-key locks。这样做避免了幻读现象的产生。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "目 录 事 务 隔 离 机 制 一 事 务 隔 离 机 制 级 别 介 绍 二 未 提 交 读 read uncommitted 1 未 提 交 读 的 数 据 库 锁 情 况 实 现 原 理 三 提 交 读 read committed 提 交 读 的 数 据 库 锁 情 况 四 可 重 复 读 repeatable reads 可 重 复 读 的 数 据 库 锁 情 况 五 可 序 列 化 serializable 可 序 列 化 的 数 据 库 锁 情 况 六 修 改 事 务 隔 离 级 别 修 改 事 务 隔 离 级 别 七 innodb 存 储 引 擎 事 务 隔 离 机 制 一 事 务 隔 离 机 制 级 别 介 绍 事 务 具 有 原 子 性 一 致 性 隔 离 性 持 久 性 四 大 特 性 而 隔 离 性 顾 名 思 义 指 的 就 是 事 务 彼 此 之 间 隔 离 开 多 个 事 务 在 同 时 处 理 一 个 数 据 时 彼 此 之 间 互 相 不 影 响 如 果 隔 离 的 不 够 好 就 有 可 能 会 产 生 脏 读 不 可 重 复 度 幻 读 等 读 现 象 为 此 隔 离 性 总 共 分 为 四 种 级 别 由 低 到 高 依 次 为 read uncommitted read committed repeatable read serializable 这 四 个 级 别 可 以 逐 个 解 决 脏 读 不 可 重 复 读 幻 读 这 几 类 问 题 隔 离 机 制 特 点 脏 读 不 可 重 复 读 幻 读 read uncommitted 独 立 提 交 未 提 交 读 允 许 事 务 查 看 其 他 事 务 所 进 行 的 未 提 交 更 改 read committed 提 交 读 允 许 其 他 事 务 查 看 已 经 提 交 的 事 务 repeatable read 可 重 复 读 innodb 引 擎 默 认 确 保 每 个 事 务 的 select 输 出 一 致 innodb 的 默 认 级 别 commit 之 后 其 他 窗 口 看 不 到 数 据 必 须 退 出 重 新 登 录 查 看 serializable 可 序 列 化 串 行 化 将 一 个 事 务 于 其 他 事 务 完 全 隔 离 即 串 行 化 当 一 个 事 务 没 有 提 交 查 询 也 不 行 例 如 我 改 微 信 头 像 的 时 候 你 不 能 看 我 的 信 息 我 看 你 朋 友 圈 的 时 候 你 不 能 发 朋 友 圈 也 不 能 看 朋 友 圈 需 要 强 调 的 是 我 们 确 实 可 以 采 用 提 高 事 务 的 隔 离 级 别 的 方 式 来 解 决 脏 读 不 可 重 复 读 幻 读 等 问 题 但 与 此 同 时 事 务 的 隔 离 级 别 越 高 并 发 能 力 也 就 越 低 所 以 还 需 要 读 者 根 据 业 务 需 要 进 行 权 衡 二 未 提 交 读 read uncommitted 未 提 交 读 read uncommitted 是 最 低 的 隔 离 级 别 通 过 名 字 我 们 就 可 以 知 道 在 这 种 事 务 隔 离 级 别 下 一 个 事 务 可 以 读 到 另 外 一 个 事 务 未 提 交 的 数 据 1 未 提 交 读 的 数 据 库 锁 情 况 实 现 原 理 事 务 在 读 数 据 的 时 候 并 未 对 数 据 加 锁 事 务 在 修 改 数 据 的 时 候 只 对 数 据 增 加 行 级 共 享 锁 现 象 事 务 1 读 取 某 行 记 录 时 事 务 2 也 能 对 这 行 记 录 进 行 读 取 更 新 因 为 事 务 一 并 未 对 数 据 增 加 任 何 锁 当 事 务 2 对 该 记 录 进 行 更 新 时 事 务 1 再 次 读 取 该 记 录 能 读 到 事 务 2 对 该 记 录 的 修 改 版 本 因 为 事 务 二 只 增 加 了 共 享 读 锁 事 务 一 可 以 再 增 加 共 享 读 锁 读 取 数 据 即 使 该 修 改 尚 未 被 提 交 若 此 时 事 务 2 回 滚 那 事 务 1 读 到 的 就 脏 数 据 了 这 就 引 发 了 脏 读 现 象 事 务 1 更 新 某 行 记 录 时 事 务 2 不 能 对 这 行 记 录 做 更 新 直 到 事 务 1 结 束 因 为 事 务 一 对 数 据 增 加 了 共 享 读 锁 事 务 二 不 能 增 加 排 他 写 锁 进 行 数 据 的 修 改 举 例 下 面 还 是 借 用 我 在 数 据 库 的 读 现 象 浅 析 一 文 中 举 的 例 子 来 说 明 在 未 提 交 读 的 隔 离 级 别 中 两 个 事 务 之 间 的 隔 离 情 况 注 在 测 试 之 前 设 置 事 务 的 隔 离 模 式 set tx isolation read uncommitted 事 务 一 事 务 二 query 1 select age from users where id 1 will read 20 query 2 update users set age 21 where id 1 no commit here query 1 select age from users where id 1 will read 21 rollback lock based dirty read 事 务 一 共 查 询 了 两 次 在 两 次 查 询 的 过 程 中 事 务 二 对 数 据 进 行 了 修 改 并 未 提 交 commit 但 是 事 务 一 的 第 二 次 查 询 查 到 了 事 务 二 的 修 改 结 果 在 数 据 库 的 读 现 象 浅 析 中 我 们 介 绍 过 这 种 现 象 我 们 称 之 为 脏 读 所 以 未 提 交 读 会 导 致 脏 读", "source_text": "目录\n事务隔离机制\n一、事务隔离机制/级别介绍\n二、未提交读(Read uncommitted)\n1、未提交读的数据库锁情况(实现原理)\n三、提交读(Read committed)\n提交读的数据库锁情况\n四、可重复读(Repeatable reads)\n可重复读的数据库锁情况\n五、可序列化(Serializable)\n可序列化的数据库锁情况\n六、修改事务隔离级别\n修改事务隔离级别\n七、InnoDB存储引擎\n\n事务隔离机制\n一、事务隔离机制/级别介绍\n\n事务具有原子性、一致性、隔离性、持久性四大特性,而隔离性顾名思义指的就是事务彼此之间隔离开,多个事务在同时处理一个数据时彼此之间互相不影响,如果隔离的不够好就有可能会产生脏读、不可重复度、幻读等读现象,为此,隔离性总共分为四种级别:\n\n由低到高依次为Read uncommitted 、Read committed 、Repeatable read 、Serializable ,这四个级别可以逐个解决脏读 、不可重复读 、幻读 这几类问题。\n\n隔离机制\t特点\t脏读\t不可重复读\t幻读\nRead uncommitted(独立提交,未提交读)\t允许事务查看其他事务所进行的未提交更改\t√\t√\t√\nRead committed(提交读)\t允许其他事务查看已经提交的事务\t×\t√\t√\nRepeatable read(可重复读,innodb引擎默认)\t确保每个事务的 SELECT 输出一致 InnoDB 的默认级别 #commit之后,其他窗口看不到数据,必须退出重新登录查看\t×\t×\t√\nSerializable(可序列化、串行化)\t将一个事务于其他事务完全隔离,即串行化 #当一个事务没有提交,查询也不行。例如:我改微信头像的时候你不能看我的信息,我看你朋友圈的时候你不能发朋友圈也不能看朋友圈\t×\t×\t×\n\n需要强调的是:我们确实可以采用提高事务的隔离级别的方式来解决脏读、不可重复读、幻读等问题,但与此同时,事务的隔离级别越高,并发能力也就越低。所以,还需要读者根据业务需要进行权衡。\n\n二、未提交读(Read uncommitted)\n\n未提交读(READ UNCOMMITTED)是最低的隔离级别。通过名字我们就可以知道,在这种事务隔离级别下,一个事务可以读到另外一个事务未提交的数据。\n\n1、未提交读的数据库锁情况(实现原理)\n\n事务在读数据的时候并未对数据加锁。\n\n事务在修改数据的时候只对数据增加行级共享锁。\n\n现象:\n\n事务1读取某行记录时,事务2也能对这行记录进行读取、更新(因为事务一并未对数据增加任何锁)。\n\n当事务2对该记录进行更新时,事务1再次读取该记录,能读到事务2对该记录的修改版本(因为事务二只增加了共享读锁,事务一可以再增加共享读锁读取数据),即使该修改尚未被提交,若此时事务2回滚,那事务1读到的就脏数据了,这就引发了脏读现象。\n\n事务1更新某行记录时,事务2不能对这行记录做更新,直到事务1结束。(因为事务一对数据增加了共享读锁,事务二不能增加排他写锁进行数据的修改)。\n\n举例:\n\n下面还是借用我在数据库的读现象浅析一文中举的例子来说明在未提交读的隔离级别中两个事务之间的隔离情况。\n\n注:在测试之前,设置事务的隔离模式:set tx_isolation='READ-UNCOMMITTED';\n\n事务一\t事务二\n/* Query 1 / SELECT age FROM users WHERE id = 1; / will read 20 */\t\n\t/* Query 2 / UPDATE users SET age = 21 WHERE id = 1; / No commit here */\n/* Query 1 / SELECT age FROM users WHERE id = 1; / will read 21 */\t\n\tROLLBACK; /* lock-based DIRTY READ */\n\n事务一共查询了两次,在两次查询的过程中,事务二对数据进行了修改,并未提交(commit)。但是事务一的第二次查询查到了事务二的修改结果。在数据库的读现象浅析中我们介绍过,这种现象我们称之为脏读。\n\n所以,未提交读会导致脏读。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:目录 — 二、未提交读(Read uncommitted)", "source_line_range": [ 1, 64 ] }, { "id": "body-region-2", "text": "三 提 交 读 read committed 提 交 读 read committed 也 可 以 翻 译 成 读 已 提 交 通 过 名 字 也 可 以 分 析 出 在 一 个 事 务 修 改 数 据 过 程 中 如 果 事 务 还 没 提 交 其 他 事 务 不 能 读 该 数 据 提 交 读 的 数 据 库 锁 情 况 事 务 对 当 前 被 读 取 的 数 据 加 行 级 共 享 锁 当 读 到 时 才 加 锁 一 旦 读 完 该 行 立 即 释 放 该 行 级 共 享 锁 事 务 在 更 新 某 数 据 的 瞬 间 就 是 发 生 更 新 的 瞬 间 必 须 先 对 其 加 行 级 排 他 锁 直 到 事 务 结 束 才 释 放 但 是 事 务 一 旦 提 交 其 他 事 务 可 以 立 即 查 看 到 已 经 提 交 了 的 数 据 现 象 事 务 1 在 读 取 某 行 记 录 的 整 个 过 程 中 事 务 2 都 可 以 对 该 行 记 录 进 行 读 取 因 为 事 务 一 对 该 行 记 录 增 加 行 级 共 享 锁 的 情 况 下 事 务 二 同 样 可 以 对 该 数 据 增 加 共 享 锁 来 读 数 据 事 务 1 读 取 某 行 的 一 瞬 间 事 务 2 不 能 修 改 该 行 数 据 但 是 只 要 事 务 1 读 取 完 改 行 数 据 事 务 2 就 可 以 对 该 行 数 据 进 行 修 改 事 务 一 在 读 取 的 一 瞬 间 会 对 数 据 增 加 共 享 锁 任 何 其 他 事 务 都 不 能 对 该 行 数 据 增 加 排 他 锁 但 是 事 务 一 只 要 读 完 该 行 数 据 就 会 释 放 行 级 共 享 锁 一 旦 锁 释 放 事 务 二 就 可 以 对 数 据 增 加 排 他 锁 并 修 改 数 据 事 务 1 更 新 某 行 记 录 时 事 务 2 不 能 对 这 行 记 录 做 更 新 直 到 事 务 1 结 束 事 务 一 在 更 新 数 据 的 时 候 会 对 该 行 数 据 增 加 排 他 锁 知 道 事 务 结 束 才 会 释 放 锁 所 以 在 事 务 二 没 有 提 交 之 前 事 务 一 都 能 不 对 数 据 增 加 共 享 锁 进 行 数 据 的 读 取 所 以 提 交 读 可 以 解 决 脏 读 的 现 象 举 例 事 务 一 事 务 二 query 1 select from users where id 1 query 2 update users set age 21 where id 1 commit in multiversion concurrency control or lock based read committed query 1 select from users where id 1 commit lock based repeatable read 在 提 交 读 隔 离 级 别 中 在 事 务 二 提 交 之 前 事 务 一 不 能 读 取 数 据 只 有 在 事 务 二 提 交 之 后 事 务 一 才 能 读 数 据 但 是 从 上 面 的 例 子 中 我 们 也 看 到 事 务 一 两 次 读 取 的 结 果 并 不 一 致 所 以 提 交 读 不 能 解 决 不 可 重 复 读 的 读 现 象 简 而 言 之 提 交 读 这 种 隔 离 级 别 保 证 了 读 到 的 任 何 数 据 都 是 提 交 的 数 据 避 免 了 脏 读 dirty reads 但 是 不 保 证 事 务 重 新 读 的 时 候 能 读 到 相 同 的 数 据 因 为 在 每 次 数 据 读 完 之 后 其 他 事 务 可 以 修 改 刚 才 读 到 的 数 据", "source_text": "三、提交读(Read committed)\n\n提交读(READ COMMITTED)也可以翻译成读已提交,通过名字也可以分析出,在一个事务修改数据过程中,如果事务还没提交,其他事务不能读该数据。\n\n提交读的数据库锁情况\n\n事务对当前被读取的数据加行级共享锁(当读到时才加锁),一旦读完该行,立即释放该行级共享锁;事务在更新某数据的瞬间(就是发生更新的瞬间),必须先对其加行级排他锁,直到事务结束才释放。但是事务一旦提交,其他事务可以立即查看到已经提交了的数据。\n\n现象:\n\n事务1在读取某行记录的整个过程中,事务2都可以对该行记录进行读取(因为事务一对该行记录增加行级共享锁的情况下,事务二同样可以对该数据增加共享锁来读数据。)。\n\n事务1读取某行的一瞬间,事务2不能修改该行数据,但是,只要事务1读取完改行数据,事务2就可以对该行数据进行修改。(事务一在读取的一瞬间会对数据增加共享锁,任何其他事务都不能对该行数据增加排他锁。但是事务一只要读完该行数据,就会释放行级共享锁,一旦锁释放,事务二就可以对数据增加排他锁并修改数据)。\n\n事务1更新某行记录时,事务2不能对这行记录做更新,直到事务1结束。(事务一在更新数据的时候,会对该行数据增加排他锁,知道事务结束才会释放锁,所以,在事务二没有提交之前,事务一都能不对数据增加共享锁进行数据的读取。所以,提交读可以解决脏读的现象)。\n\n举例:\n\n事务一\t事务二\n/* Query 1 */ SELECT * FROM users WHERE id = 1;\t\n\t/* Query 2 / UPDATE users SET age = 21 WHERE id = 1; COMMIT; / in multiversion concurrency control, or lock-based READ COMMITTED */\n/* Query 1 / SELECT * FROM users WHERE id = 1; COMMIT; /lock-based REPEATABLE READ */\t\n\n在提交读隔离级别中,在事务二提交之前,事务一不能读取数据。只有在事务二提交之后,事务一才能读数据。但是从上面的例子中我们也看到,事务一两次读取的结果并不一致,所以提交读不能解决不可重复读的读现象。\n\n简而言之,提交读这种隔离级别保证了读到的任何数据都是提交的数据,避免了脏读(dirty reads)。但是不保证事务重新读的时候能读到相同的数据,因为在每次数据读完之后其他事务可以修改刚才读到的数据。", "segmentation_method": "reviewed_source_semantics", "label": "三、提交读(Read committed)", "source_line_range": [ 65, 91 ] }, { "id": "body-region-3", "text": "四 可 重 复 读 repeatable reads 可 重 复 读 repeatable reads 由 于 提 交 读 隔 离 级 别 会 产 生 不 可 重 复 读 的 读 现 象 所 以 比 提 交 读 更 高 一 个 级 别 的 隔 离 级 别 就 可 以 解 决 不 可 重 复 读 的 问 题 这 种 隔 离 级 别 就 叫 可 重 复 读 这 名 字 起 的 是 不 是 很 任 性 可 重 复 读 的 数 据 库 锁 情 况 事 务 在 读 取 某 数 据 的 瞬 间 就 是 开 始 读 取 的 瞬 间 必 须 先 对 其 加 行 级 共 享 锁 直 到 事 务 结 束 才 释 放 事 务 在 更 新 某 数 据 的 瞬 间 就 是 发 生 更 新 的 瞬 间 必 须 先 对 其 加 行 级 排 他 锁 直 到 事 务 结 束 才 释 放 现 象 事 务 1 在 读 取 某 行 记 录 的 整 个 过 程 中 事 务 2 都 可 以 对 该 行 记 录 进 行 读 取 因 为 事 务 一 对 该 行 记 录 增 加 行 级 共 享 锁 的 情 况 下 事 务 二 同 样 可 以 对 该 数 据 增 加 共 享 锁 来 读 数 据 事 务 1 在 读 取 某 行 记 录 的 整 个 过 程 中 事 务 2 都 不 能 修 改 该 行 数 据 事 务 一 在 读 取 的 整 个 过 程 会 对 数 据 增 加 共 享 锁 直 到 事 务 提 交 才 会 释 放 锁 所 以 整 个 过 程 中 任 何 其 他 事 务 都 不 能 对 该 行 数 据 增 加 排 他 锁 所 以 可 重 复 读 能 够 解 决 不 可 重 复 读 的 读 现 象 事 务 1 更 新 某 行 记 录 时 事 务 2 不 能 对 这 行 记 录 做 更 新 直 到 事 务 1 结 束 事 务 一 在 更 新 数 据 的 时 候 会 对 该 行 数 据 增 加 排 他 锁 知 道 事 务 结 束 才 会 释 放 锁 所 以 在 事 务 二 没 有 提 交 之 前 事 务 一 都 能 不 对 数 据 增 加 共 享 锁 进 行 数 据 的 读 取 所 以 提 交 读 可 以 解 决 脏 读 的 现 象 举 例 事 务 一 事 务 二 query 1 select from users where id 1 commit query 2 update users set age 21 where id 1 commit in multiversion concurrency control or lock based read committed 在 上 面 的 例 子 中 只 有 在 事 务 一 提 交 之 后 事 务 二 才 能 更 改 该 行 数 据 所 以 只 要 在 事 务 一 从 开 始 到 结 束 的 这 段 时 间 内 无 论 他 读 取 该 行 数 据 多 少 次 结 果 都 是 一 样 的 从 上 面 的 例 子 中 我 们 可 以 得 到 结 论 可 重 复 读 隔 离 级 别 可 以 解 决 不 可 重 复 读 的 读 现 象 但 是 可 重 复 读 这 种 隔 离 级 别 中 还 有 另 外 一 种 读 现 象 他 解 决 不 了 那 就 是 幻 读 看 下 面 的 例 子 事 务 一 事 务 二 query 1 select from users where age between 10 and 30 query 2 insert into users values 3 bob 27 commit query 1 select from users where age between 10 and 30 上 面 的 两 个 事 务 执 行 情 况 及 现 象 如 下 事 务 一 的 第 一 次 查 询 条 件 是 age between 10 and 30 如 果 这 是 有 十 条 记 录 符 合 条 件 这 时 他 会 给 符 合 条 件 的 这 十 条 记 录 增 加 行 级 共 享 锁 任 何 其 他 事 务 无 法 更 改 这 十 条 记 录 事 务 二 执 行 一 条 sql 语 句 语 句 的 内 容 是 向 表 中 插 入 一 条 数 据 因 为 此 时 没 有 任 何 事 务 对 表 增 加 表 级 锁 所 以 该 操 作 可 以 顺 利 执 行 事 务 一 再 次 执 行 select from users where age between 10 and 30 时 结 果 返 回 的 记 录 变 成 了 十 一 条 比 刚 刚 增 加 了 一 条 增 加 的 这 条 正 是 事 务 二 刚 刚 插 入 的 那 条 所 以 事 务 一 的 两 次 范 围 查 询 结 果 相 同 这 也 就 是 我 们 提 到 的 幻 读 五 可 序 列 化 serializable 可 序 列 化 serializable 是 最 高 的 隔 离 级 别 前 面 提 到 的 所 有 的 隔 离 级 别 都 无 法 解 决 的 幻 读 在 可 序 列 化 的 隔 离 级 别 中 可 以 解 决 我 们 说 过 产 生 幻 读 的 原 因 是 事 务 一 在 进 行 范 围 查 询 的 时 候 没 有 增 加 范 围 锁 range locks 给 select 的 查 询 中 使 用 一 个 where 子 句 描 述 范 围 加 锁 所 以 导 致 幻 读 可 序 列 化 的 数 据 库 锁 情 况 事 务 在 读 取 数 据 时 必 须 先 对 其 加 表 级 共 享 锁 直 到 事 务 结 束 才 释 放 事 务 在 更 新 数 据 时 必 须 先 对 其 加 表 级 排 他 锁 直 到 事 务 结 束 才 释 放 现 象 事 务 1 正 在 读 取 a 表 中 的 记 录 时 则 事 务 2 也 能 读 取 a 表 但 不 能 对 a 表 做 更 新 新 增 删 除 直 到 事 务 1 结 束 因 为 事 务 一 对 表 增 加 了 表 级 共 享 锁 其 他 事 务 只 能 增 加 共 享 锁 读 取 数 据 不 能 进 行 其 他 任 何 操 作 事 务 1 正 在 更 新 a 表 中 的 记 录 时 则 事 务 2 不 能 读 取 a 表 的 任 意 记 录 更 不 可 能 对 a 表 做 更 新 新 增 删 除 直 到 事 务 1 结 束 事 务 一 对 表 增 加 了 表 级 排 他 锁 其 他 事 务 不 能 对 表 增 加 共 享 锁 或 排 他 锁 也 就 无 法 进 行 任 何 操 作 第 一 步 设 置 事 务 的 隔 离 级 别 mysql set tx isolation serializable query ok 0 rows affected 1 warning 0 00 sec mysql show variables like tx isolation variable name value tx isolation serializable 1 row in set 0 00 sec 第 二 步 开 启 事 务 mysql start transaction query ok 0 rows affected 0 00 sec 第 三 步 修 改 数 据 mysql update student set age 18 where id 2 query ok 1 row affected 0 00 sec rows matched 1 changed 1 warnings 0 第 四 步 查 看 该 数 据 mysql select from student where id 2 c c query aborted error 1317 70100 query execution was interrupted 第 五 步 修 改 改 数 据 mysql update student set age 17 where id 2 c c query aborted error 1317 70100 query execution was interrupted 当 事 务 的 隔 离 机 制 为 可 序 列 化 机 制 时 一 旦 加 上 排 它 锁 那 么 其 他 事 务 将 无 法 查 看 也 无 法 修 改 该 数 据 虽 然 可 序 列 化 解 决 了 脏 读 不 可 重 复 读 幻 读 等 读 现 象 但 是 序 列 化 事 务 会 产 生 以 下 效 果 无 法 读 取 其 它 事 务 已 修 改 但 未 提 交 的 记 录 在 当 前 事 务 完 成 之 前 其 它 事 务 不 能 修 改 目 前 事 务 已 读 取 的 记 录 在 当 前 事 务 完 成 之 前 其 它 事 务 所 插 入 的 新 记 录 其 索 引 键 值 不 能 在 当 前 事 务 的 任 何 语 句 所 读 取 的 索 引 键 范 围 中 四 种 事 务 隔 离 级 别 从 隔 离 程 度 上 越 来 越 高 但 同 时 在 并 发 性 上 也 就 越 来 越 低 之 所 以 有 这 么 几 种 隔 离 级 别 就 是 为 了 方 便 开 发 人 员 在 开 发 过 程 中 根 据 业 务 需 要 选 择 最 合 适 的 隔 离 级 别", "source_text": "四、可重复读(Repeatable reads)\n\n可重复读(REPEATABLE READS),由于提交读隔离级别会产生不可重复读的读现象。所以,比提交读更高一个级别的隔离级别就可以解决不可重复读的问题。这种隔离级别就叫可重复读(这名字起的是不是很任性!!)。\n\n可重复读的数据库锁情况\n\n事务在读取某数据的瞬间(就是开始读取的瞬间),必须先对其加 行级共享锁,直到事务结束才释放;事务在更新某数据的瞬间(就是发生更新的瞬间),必须先对其加 行级排他锁,直到事务结束才释放。\n\n现象\n\n事务1在读取某行记录的整个过程中,事务2都可以对该行记录进行读取(因为事务一对该行记录增加行级共享锁的情况下,事务二同样可以对该数据增加共享锁来读数据。)。\n\n事务1在读取某行记录的整个过程中,事务2都不能修改该行数据(事务一在读取的整个过程会对数据增加共享锁,直到事务提交才会释放锁,所以整个过程中,任何其他事务都不能对该行数据增加排他锁。所以,可重复读能够解决不可重复读的读现象)。\n\n事务1更新某行记录时,事务2不能对这行记录做更新,直到事务1结束。(事务一在更新数据的时候,会对该行数据增加排他锁,知道事务结束才会释放锁,所以,在事务二没有提交之前,事务一都能不对数据增加共享锁进行数据的读取。所以,提交读可以解决脏读的现象)。\n\n举例\n\n事务一\t事务二\n/* Query 1 */ SELECT * FROM users WHERE id = 1; COMMIT;\t\n\t/* Query 2 / UPDATE users SET age = 21 WHERE id = 1; COMMIT; / in multiversion concurrency control, or lock-based READ COMMITTED */\n\n在上面的例子中,只有在事务一提交之后,事务二才能更改该行数据。所以,只要在事务一从开始到结束的这段时间内,无论他读取该行数据多少次,结果都是一样的。\n\n从上面的例子中我们可以得到结论:可重复读隔离级别可以解决不可重复读的读现象。但是可重复读这种隔离级别中,还有另外一种读现象他解决不了,那就是幻读。看下面的例子:\n\n事务一\t事务二\n/* Query 1 */ SELECT * FROM users WHERE age BETWEEN 10 AND 30;\t\n\t/* Query 2 */ INSERT INTO users VALUES ( 3, 'Bob', 27 ); COMMIT;\n/* Query 1 */ SELECT * FROM users WHERE age BETWEEN 10 AND 30;\t\n\n上面的两个事务执行情况及现象如下:\n\n事务一的第一次查询条件是age BETWEEN 10 AND 30;如果这是有十条记录符合条件。这时,他会给符合条件的这十条记录增加行级共享锁。任何其他事务无法更改这十条记录。\n\n事务二执行一条sql语句,语句的内容是向表中插入一条数据。因为此时没有任何事务对表增加表级锁,所以,该操作可以顺利执行。\n\n事务一再次执行SELECT * FROM users WHERE age BETWEEN 10 AND 30;时,结果返回的记录变成了十一条,比刚刚增加了一条,增加的这条正是事务二刚刚插入的那条。\n\n所以,事务一的两次范围查询结果相同。这也就是我们提到的幻读。\n\n五、可序列化(Serializable)\n\n可序列化(Serializable)是最高的隔离级别,前面提到的所有的隔离级别都无法解决的幻读,在可序列化的隔离级别中可以解决。\n\n我们说过,产生幻读的原因是事务一在进行范围查询的时候没有增加范围锁(range-locks:给SELECT 的查询中使用一个“WHERE”子句描述范围加锁),所以导致幻读。\n\n可序列化的数据库锁情况\n\n事务在读取数据时,必须先对其加 表级共享锁 ,直到事务结束才释放;事务在更新数据时,必须先对其加 表级排他锁 ,直到事务结束才释放。\n\n现象:\n\n事务1正在读取A表中的记录时,则事务2也能读取A表,但不能对A表做更新、新增、删除,直到事务1结束。(因为事务一对表增加了表级共享锁,其他事务只能增加共享锁读取数据,不能进行其他任何操作)。\n\n事务1正在更新A表中的记录时,则事务2不能读取A表的任意记录,更不可能对A表做更新、新增、删除,直到事务1结束。(事务一对表增加了表级排他锁,其他事务不能对表增加共享锁或排他锁,也就无法进行任何操作)。\n\n第一步:设置事务的隔离级别\n\t\t\tmysql> set tx_isolation='SERIALIZABLE';\n\t\t\tQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\n\t\t\tmysql> show variables like '%tx_isolation%';\n\t\t\t+---------------+--------------+\n\t\t\t| Variable_name | Value |\n\t\t\t+---------------+--------------+\n\t\t\t| tx_isolation | SERIALIZABLE |\n\t\t\t+---------------+--------------+\n\t\t\t1 row in set (0.00 sec)\n\n\t\t第二步:开启事务\n\n\t\t\tmysql> start transaction;\n\t\t\tQuery OK, 0 rows affected (0.00 sec)\n\n\t\t第三步:修改数据\n\n\t\t\tmysql> update student set age = 18 where id = 2;\n\t\t\tQuery OK, 1 row affected (0.00 sec)\n\t\t\tRows matched: 1 Changed: 1 Warnings: 0\n\n\t\t第四步:查看该数据\n\n\t\t\tmysql> select * from student where id = 2;\n\t\t\t^C^C -- query aborted\n\t\t\tERROR 1317 (70100): Query execution was interrupted\n\n\t\t第五步:修改改数据\n\n\t\t\tmysql> update student set age = 17 where id = 2;\n\t\t\t^C^C -- query aborted\n\t\t\tERROR 1317 (70100): Query execution was interrupted\n\n\t\t当事务的隔离机制为:可序列化机制时,一旦加上排它锁,那么其他事务将无法查看也无法修改该数据。\n\n\n虽然可序列化解决了脏读、不可重复读、幻读等读现象。但是序列化事务会产生以下效果:\n\n无法读取其它事务已修改但未提交的记录。\n\n在当前事务完成之前,其它事务不能修改目前事务已读取的记录。\n\n在当前事务完成之前,其它事务所插入的新记录,其索引键值不能在当前事务的任何语句所读取的索引键范围中。\n\n四种事务隔离级别从隔离程度上越来越高,但同时在并发性上也就越来越低。之所以有这么几种隔离级别,就是为了方便开发人员在开发过程中根据业务需要选择最合适的隔离级别。", "segmentation_method": "reviewed_source_semantics", "label": "四、可重复读(Repeatable reads) — 五、可序列化(Serializable)", "source_line_range": [ 92, 196 ] }, { "id": "body-region-4", "text": "六 修 改 事 务 隔 离 级 别 在 mysql 中 可 以 通 过 show variables like tx isolation 或 select tx isolation 语 句 来 查 看 当 前 事 务 隔 离 级 别 查 看 当 前 事 务 隔 离 级 别 的 sql 语 句 和 运 行 结 果 如 下 mysql show variables like tx isolation variable name value tx isolation read uncommitted 1 row in set 0 00 sec mysql select tx isolation tx isolation read uncommitted 1 row in set 1 warning 0 00 sec 结 果 显 示 目 前 mysql 的 事 务 隔 离 级 别 是 read uncommitted 修 改 事 务 隔 离 级 别 mysql 提 供 了 set transaction 语 句 该 语 句 可 以 改 变 单 个 会 话 或 全 局 的 事 务 隔 离 级 别 语 法 格 式 如 下 set session global transaction isolation level read uncommitted read committed repeatable read serializable 其 中 session 和 global 关 键 字 用 来 指 定 修 改 的 事 务 隔 离 级 别 的 范 围 session 表 示 修 改 的 事 务 隔 离 级 别 将 应 用 于 当 前 session 当 前 cmd 窗 口 内 的 所 有 事 务 global 表 示 修 改 的 事 务 隔 离 级 别 将 应 用 于 所 有 session 全 局 中 的 所 有 事 务 且 当 前 已 经 存 在 的 session 不 受 影 响 如 果 省 略 session 和 global 表 示 修 改 的 事 务 隔 离 级 别 将 应 用 于 当 前 session 内 的 下 一 个 还 未 开 始 的 事 务 任 何 用 户 都 能 改 变 会 话 的 事 务 隔 离 级 别 但 是 只 有 拥 有 super 权 限 的 用 户 才 能 改 变 全 局 的 事 务 隔 离 级 别 如 果 使 用 普 通 用 户 修 改 全 局 事 务 隔 离 级 别 就 会 提 示 需 要 超 级 权 限 才 能 执 行 此 操 作 的 错 误 信 息 sql 语 句 和 运 行 结 果 如 下 mysql set session transaction isolation level read uncommitted query ok 0 rows affected 0 00 sec 示 例 1 使 用 set transaction 语 句 分 别 修 改 session 和 全 局 的 事 务 隔 离 级 别 sql 语 句 和 运 行 结 果 如 下 mysql select session tx isolation session tx isolation read uncommitted 1 row in set 1 warning 0 00 sec mysql set global transaction isolation level repeatable read query ok 0 rows affected 0 00 sec mysql select global tx isolation global tx isolation repeatable read 1 row in set 1 warning 0 00 sec 还 可 以 使 用 set tx isolation 命 令 直 接 修 改 当 前 session 的 事 务 隔 离 级 别 sql 语 句 和 运 行 结 果 如 下 mysql set tx isolation read committed query ok 0 rows affected 1 warning 0 00 sec mysql select global tx isolation global tx isolation repeatable read 1 row in set 1 warning 0 00 sec 永 久 修 改 如 下 root db01 vim etc my cnf mysqld transaction isolation read uncommit", "source_text": "六、修改事务隔离级别\n\n在 MySQL 中,可以通过show variables like '%tx_isolation%'或select @@tx_isolation;语句来查看当前事务隔离级别。\n\n查看当前事务隔离级别的 SQL 语句和运行结果如下:\n\nmysql> show variables like '%tx_isolation%';\n+---------------+------------------+\n| Variable_name | Value |\n+---------------+------------------+\n| tx_isolation | READ-UNCOMMITTED |\n+---------------+------------------+\n1 row in set (0.00 sec)\n\nmysql> select @@tx_isolation;\n+------------------+\n| @@tx_isolation |\n+------------------+\n| READ-UNCOMMITTED |\n+------------------+\n1 row in set, 1 warning (0.00 sec)\n\n\n结果显示,目前 MySQL 的事务隔离级别是 READ-UNCOMMITTED。\n\n修改事务隔离级别\n\nMySQL 提供了 SET TRANSACTION 语句,该语句可以改变单个会话或全局的事务隔离级别。语法格式如下:\n\nSET [SESSION | GLOBAL] TRANSACTION ISOLATION LEVEL {READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE}\n\n其中,SESSION 和 GLOBAL 关键字用来指定修改的事务隔离级别的范围:\n\nSESSION:表示修改的事务隔离级别将应用于当前 session(当前 cmd 窗口)内的所有事务\n\nGLOBAL:表示修改的事务隔离级别将应用于所有 session(全局)中的所有事务,且当前已经存在的 session 不受影响\n\n如果省略 SESSION 和 GLOBAL,表示修改的事务隔离级别将应用于当前 session 内的下一个还未开始的事务。\n\n任何用户都能改变会话的事务隔离级别,但是只有拥有 SUPER 权限的用户才能改变全局的事务隔离级别。\n\n如果使用普通用户修改全局事务隔离级别,就会提示需要超级权限才能执行此操作的错误信息,SQL 语句和运行结果如下:\n\nmysql> SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;\nQuery OK, 0 rows affected (0.00 sec)\n\n\n示例 1\n\n使用 SET TRANSACTION 语句分别修改 session 和全局的事务隔离级别SQL 语句和运行结果如下:\n\nmysql> select @@session.tx_isolation;\n+------------------------+\n| @@session.tx_isolation |\n+------------------------+\n| READ-UNCOMMITTED |\n+------------------------+\n1 row in set, 1 warning (0.00 sec)\n\nmysql> SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql> select @@global.tx_isolation;\n+-----------------------+\n| @@global.tx_isolation |\n+-----------------------+\n| REPEATABLE-READ |\n+-----------------------+\n1 row in set, 1 warning (0.00 sec)\n\n\n还可以使用 set tx_isolation 命令直接修改当前 session 的事务隔离级别,SQL 语句和运行结果如下:\n\nmysql> set tx_isolation='READ-COMMITTED';\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\n\nmysql> select @@global.tx_isolation;\n+-----------------------+\n| @@global.tx_isolation |\n+-----------------------+\n| REPEATABLE-READ |\n+-----------------------+\n1 row in set, 1 warning (0.00 sec)\n\n\n永久修改如下:\n\n[root@db01 ~]# vim /etc/my.cnf\n[mysqld]\ntransaction_isolation=read-uncommit", "segmentation_method": "reviewed_source_semantics", "label": "六、修改事务隔离级别", "source_line_range": [ 197, 287 ] }, { "id": "body-region-5", "text": "七 innodb 存 储 引 擎 前 文 我 们 提 到 过 innodb 支 持 行 锁 锁 定 字 段 含 有 索 引 的 情 况 下 否 则 走 表 锁 但 锁 定 方 式 并 非 简 单 的 锁 定 指 定 行 上 的 索 引 而 是 分 为 3 种 锁 定 算 法 1 记 录 锁 record locks 锁 定 指 定 行 的 索 引 项 2 gap locks 锁 定 某 一 个 范 围 内 的 索 引 但 不 包 括 记 录 本 身 3 间 隙 锁 定 next key locks 锁 定 一 个 范 围 内 的 索 引 并 且 锁 定 记 录 本 身 next key locks record locks gap locks a next key lock is a combination of a record lock on the index record and a gap lock on the gap before the index record 而 innodb 存 储 引 擎 默 认 隔 离 级 别 为 可 重 复 读 repeatable read 该 隔 离 级 别 下 对 于 索 引 的 查 询 采 用 next key locks 这 样 做 避 免 了 幻 读 现 象 的 产 生", "source_text": "七、InnoDB存储引擎\n\n前文我们提到过InnoDB支持行锁(锁定字段含有索引的情况下,否则走表锁),但锁定方式并非简单的锁定指定行上的索引,而是分为3种锁定算法:\n1)记录锁(Record Locks):锁定指定行的索引项\n2)Gap Locks:锁定某一个范围内的索引,但不包括记录本身\n3)间隙锁定(Next-Key Locks):锁定一个范围内的索引,并且锁定记录本身 Next-Key Locks = Record Locks + Gap Locks\nA next-key lock is a combination of a record lock on the index record and a gap lock on the gap before the index record\n\n而InnoDB 存储引擎默认隔离级别为可重复读(Repeatable Read),该隔离级别下,对于索引的查询采用 next-key locks。这样做避免了幻读现象的产生。", "segmentation_method": "reviewed_source_semantics", "label": "七、InnoDB存储引擎", "source_line_range": [ 288, 296 ] } ], "ending": { "text": "ndex record\n\n而InnoDB 存储引擎默认隔离级别为可重复读(Repeatable Read),该隔离级别下,对于索引的查询采用 next-key locks。这样做避免了幻读现象的产生。" } } }, { "id": "article-021", "name": "添加解析时提示 DNS 不正确如何处理?", "url": "https://developer.cloud.tencent.com/article/1927047", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "在腾讯云添加解析时,提示 DNS 不正确如何处理?" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "可乐不是你的" ] }, { "id": "stable-3", "alternatives": [ "月亮和星星" ] }, { "id": "stable-4", "alternatives": [ "腾讯云" ] }, { "id": "stable-5", "alternatives": [ "开发者社区" ] }, { "id": "stable-6", "alternatives": [ "文档" ] }, { "id": "stable-7", "alternatives": [ "建议反馈" ] }, { "id": "stable-8", "alternatives": [ "控制台" ] }, { "id": "stable-9", "alternatives": [ "登录/注册" ] }, { "id": "stable-10", "alternatives": [ "首页" ] }, { "id": "stable-11", "alternatives": [ "学习" ] }, { "id": "stable-12", "alternatives": [ "活动" ] }, { "id": "stable-13", "alternatives": [ "专区" ] }, { "id": "stable-14", "alternatives": [ "圈层" ] }, { "id": "stable-15", "alternatives": [ "工具" ] }, { "id": "stable-16", "alternatives": [ "MCP广场" ] }, { "id": "stable-17", "alternatives": [ "发布" ] }, { "id": "stable-18", "alternatives": [ "社区首页" ] }, { "id": "stable-19", "alternatives": [ "专栏" ] }, { "id": "stable-20", "alternatives": [ "原创" ] }, { "id": "stable-21", "alternatives": [ "举报" ] }, { "id": "stable-22", "alternatives": [ "关联问题" ] }, { "id": "stable-23", "alternatives": [ "换一批" ] }, { "id": "stable-24", "alternatives": [ "评论" ] }, { "id": "stable-25", "alternatives": [ "推荐阅读" ] }, { "id": "stable-26", "alternatives": [ "编辑精选文章" ] }, { "id": "stable-27", "alternatives": [ "关注" ] }, { "id": "stable-28", "alternatives": [ "目录" ] }, { "id": "stable-29", "alternatives": [ "相关产品与服务" ] }, { "id": "stable-30", "alternatives": [ "产品介绍" ] }, { "id": "stable-31", "alternatives": [ "产品文档" ] }, { "id": "stable-32", "alternatives": [ "社区" ] }, { "id": "stable-33", "alternatives": [ "技术文章" ] }, { "id": "stable-34", "alternatives": [ "技术问答" ] }, { "id": "stable-35", "alternatives": [ "技术沙龙" ] }, { "id": "stable-36", "alternatives": [ "技术视频" ] }, { "id": "stable-37", "alternatives": [ "学习中心" ] }, { "id": "stable-38", "alternatives": [ "技术百科" ] }, { "id": "stable-39", "alternatives": [ "技术专区" ] }, { "id": "stable-40", "alternatives": [ "关于" ] }, { "id": "stable-41", "alternatives": [ "社区规范" ] }, { "id": "stable-42", "alternatives": [ "免责声明" ] }, { "id": "stable-43", "alternatives": [ "联系我们" ] }, { "id": "stable-44", "alternatives": [ "友情链接" ] }, { "id": "stable-45", "alternatives": [ "MCP广场开源版权声明" ] }, { "id": "stable-46", "alternatives": [ "原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initial body includes both management scenarios, three-row DNS address/location table, ordinary captions, warning and final three reference links. Initial/middle/end screenshots confirm no clipping/overlay or expansion. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "在腾讯云添加解析时,提示 DNS 不正确如何处理?" ], "html_selector": "h1.title-text,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-021/comment-qualification-reference-r5.json", "sha256": "a2a32604f60029e590e70a2dcfa3003f734ed342c982d3a5fdcf88fd6fa79d41", "chars": 781, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "域名在腾讯云管理\n\n域名在腾讯云管理的情况下,可登录 域名注册控制台 进行调整。\n\n腾讯云域名列表\n\n单击域名名称,进入域名信息详情页,找到 DNS 服务器,单击修改。\n\n如果是免费解析套餐升级为付费解析套餐的情况下,可按照以下内容调整。\n\n解析套餐版本\n\n\t\n\nDNS 服务器地址\n\n\t\n\nDNS 集群分布地域\n\n\n\n\n专业版\n\n\t\n\nns3.dnsv2.com/ns4.dnsv2.com\n\n\t\n\n上海、南京、中国香港、孟买、硅谷、法兰克福、莫斯科\n\n\n\n\n企业版\n\n\t\n\nns3.dnsv4.com/ns4.dnsv4.com\n\n\t\n\n上海、南京、天津、深圳、中国香港、新加坡、孟买、硅谷、法兰克福、莫斯科\n\n\n\n\n尊享版\n\n\t\n\nns3.dnsv5.com/ns4.dnsv5.com\n\n\t\n\n上海、南京、深圳、中国香港、曼谷、新加坡、孟买、东京、首尔、硅谷、法兰克福、莫斯科\n\n如果是由于其他情况导致免费解析套餐的 DNS 服务器地址不正确,可前往 DNSPod 管理控制台,系统将提示 DNS 服务器地址不正确并给出对应的地址。\n\n获取地址后登录 域名注册控制台 进行调整。\n\nDNSPod 平台\n\n注意:解析套餐为免费的情况下,并且在腾讯云注册管理的域名一般不需要进行调整,系统将自动分配好 DNS 地址,无需手动调整。\n\n域名在其他注册商管理\n\n如果域名在其他注册商注册管理,但目前在使用腾讯云的解析,则需要去对应的注册商修改 DNS 服务器地址,修改为腾讯云提供的地址,才可使用腾讯云的解析。\n\nDNSPod 平台\n\n阿里云注册域名如何配置为 DNSPod 的 DNS 服务器\n\nGoogle 注册域名如何配置为 DNSPod 的 DNS 服务器\n\n如需查看更多注册商配置 DNS 服务器地址请前往 修改域名 DNS 服务器。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "域 名 在 腾 讯 云 管 理 域 名 在 腾 讯 云 管 理 的 情 况 下 可 登 录 域 名 注 册 控 制 台 进 行 调 整 腾 讯 云 域 名 列 表 单 击 域 名 名 称 进 入 域 名 信 息 详 情 页 找 到 dns 服 务 器 单 击 修 改 如 果 是 免 费 解 析 套 餐 升 级 为 付 费 解 析 套 餐 的 情 况 下 可 按 照 以 下 内 容 调 整 解 析 套 餐 版 本 dns 服 务 器 地 址 dns 集 群 分 布 地 域 专 业 版 ns3 dnsv2 com ns4 dnsv2 com 上 海 南 京 中 国 香 港 孟 买 硅 谷 法 兰 克 福 莫 斯 科 企 业 版 ns3 dnsv4 com ns4 dnsv4 com 上 海 南 京 天 津 深 圳 中 国 香 港 新 加 坡 孟 买 硅 谷 法 兰 克 福 莫 斯 科 尊 享 版 ns3 dnsv5 com ns4 dnsv5 com 上 海 南 京 深 圳 中 国 香 港 曼 谷 新 加 坡 孟 买 东 京 首 尔 硅 谷 法 兰 克 福 莫 斯 科 如 果 是 由 于 其 他 情 况 导 致 免 费 解 析 套 餐 的 dns 服 务 器 地 址 不 正 确 可 前 往 dnspod 管 理 控 制 台 系 统 将 提 示 dns 服 务 器 地 址 不 正 确 并 给 出 对 应 的 地 址 获 取 地 址 后 登 录 域 名 注 册 控 制 台 进 行 调 整 dnspod 平 台 注 意 解 析 套 餐 为 免 费 的 情 况 下 并 且 在 腾 讯 云 注 册 管 理 的 域 名 一 般 不 需 要 进 行 调 整 系 统 将 自 动 分 配 好 dns 地 址 无 需 手 动 调 整", "source_text": "域名在腾讯云管理\n\n域名在腾讯云管理的情况下,可登录 域名注册控制台 进行调整。\n\n腾讯云域名列表\n\n单击域名名称,进入域名信息详情页,找到 DNS 服务器,单击修改。\n\n如果是免费解析套餐升级为付费解析套餐的情况下,可按照以下内容调整。\n\n解析套餐版本\n\n\t\n\nDNS 服务器地址\n\n\t\n\nDNS 集群分布地域\n\n\n\n\n专业版\n\n\t\n\nns3.dnsv2.com/ns4.dnsv2.com\n\n\t\n\n上海、南京、中国香港、孟买、硅谷、法兰克福、莫斯科\n\n\n\n\n企业版\n\n\t\n\nns3.dnsv4.com/ns4.dnsv4.com\n\n\t\n\n上海、南京、天津、深圳、中国香港、新加坡、孟买、硅谷、法兰克福、莫斯科\n\n\n\n\n尊享版\n\n\t\n\nns3.dnsv5.com/ns4.dnsv5.com\n\n\t\n\n上海、南京、深圳、中国香港、曼谷、新加坡、孟买、东京、首尔、硅谷、法兰克福、莫斯科\n\n如果是由于其他情况导致免费解析套餐的 DNS 服务器地址不正确,可前往 DNSPod 管理控制台,系统将提示 DNS 服务器地址不正确并给出对应的地址。\n\n获取地址后登录 域名注册控制台 进行调整。\n\nDNSPod 平台\n\n注意:解析套餐为免费的情况下,并且在腾讯云注册管理的域名一般不需要进行调整,系统将自动分配好 DNS 地址,无需手动调整。", "segmentation_method": "reviewed_source_semantics", "label": "域名在腾讯云管理", "source_line_range": [ 1, 67 ] }, { "id": "body-region-2", "text": "域 名 在 其 他 注 册 商 管 理 如 果 域 名 在 其 他 注 册 商 注 册 管 理 但 目 前 在 使 用 腾 讯 云 的 解 析 则 需 要 去 对 应 的 注 册 商 修 改 dns 服 务 器 地 址 修 改 为 腾 讯 云 提 供 的 地 址 才 可 使 用 腾 讯 云 的 解 析 dnspod 平 台 阿 里 云 注 册 域 名 如 何 配 置 为 dnspod 的 dns 服 务 器 google 注 册 域 名 如 何 配 置 为 dnspod 的 dns 服 务 器 如 需 查 看 更 多 注 册 商 配 置 dns 服 务 器 地 址 请 前 往 修 改 域 名 dns 服 务 器", "source_text": "域名在其他注册商管理\n\n如果域名在其他注册商注册管理,但目前在使用腾讯云的解析,则需要去对应的注册商修改 DNS 服务器地址,修改为腾讯云提供的地址,才可使用腾讯云的解析。\n\nDNSPod 平台\n\n阿里云注册域名如何配置为 DNSPod 的 DNS 服务器\n\nGoogle 注册域名如何配置为 DNSPod 的 DNS 服务器\n\n如需查看更多注册商配置 DNS 服务器地址请前往 修改域名 DNS 服务器。", "segmentation_method": "reviewed_source_semantics", "label": "域名在其他注册商管理", "source_line_range": [ 68, 78 ] } ], "ending": { "text": "册域名如何配置为 DNSPod 的 DNS 服务器\n\nGoogle 注册域名如何配置为 DNSPod 的 DNS 服务器\n\n如需查看更多注册商配置 DNS 服务器地址请前往 修改域名 DNS 服务器。" } } }, { "id": "article-022", "name": "项目开发规范", "url": "https://developer.aliyun.com/article/659453", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "项目开发规范" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "互联网编程" ] }, { "id": "stable-3", "alternatives": [ "大模型" ] }, { "id": "stable-4", "alternatives": [ "产品" ] }, { "id": "stable-5", "alternatives": [ "解决方案" ] }, { "id": "stable-6", "alternatives": [ "权益" ] }, { "id": "stable-7", "alternatives": [ "定价" ] }, { "id": "stable-8", "alternatives": [ "AI 应用市场" ] }, { "id": "stable-9", "alternatives": [ "伙伴" ] }, { "id": "stable-10", "alternatives": [ "服务" ] }, { "id": "stable-11", "alternatives": [ "文档" ] }, { "id": "stable-12", "alternatives": [ "备案" ] }, { "id": "stable-13", "alternatives": [ "控制台" ] }, { "id": "stable-14", "alternatives": [ "注册" ] }, { "id": "stable-15", "alternatives": [ "登录" ] }, { "id": "stable-16", "alternatives": [ "开发者社区" ] }, { "id": "stable-17", "alternatives": [ "首页" ] }, { "id": "stable-18", "alternatives": [ "模型体验" ] }, { "id": "stable-19", "alternatives": [ "探索云世界" ] }, { "id": "stable-20", "alternatives": [ "问产品" ] }, { "id": "stable-21", "alternatives": [ "动手实践" ] }, { "id": "stable-22", "alternatives": [ "官方博客" ] }, { "id": "stable-23", "alternatives": [ "考认证" ] }, { "id": "stable-24", "alternatives": [ "TIANCHI大赛" ] }, { "id": "stable-25", "alternatives": [ "活动广场" ] }, { "id": "stable-26", "alternatives": [ "下载" ] }, { "id": "stable-27", "alternatives": [ "个人" ] }, { "id": "stable-28", "alternatives": [ "积分" ] }, { "id": "stable-29", "alternatives": [ "发布" ] }, { "id": "stable-30", "alternatives": [ "开发与运维" ] }, { "id": "stable-31", "alternatives": [ "文章" ] }, { "id": "stable-32", "alternatives": [ "正文" ] }, { "id": "stable-33", "alternatives": [ "版权" ] }, { "id": "stable-34", "alternatives": [ "文章标签" ] }, { "id": "stable-35", "alternatives": [ "关注" ] }, { "id": "stable-36", "alternatives": [ "相关文章" ] }, { "id": "stable-37", "alternatives": [ "热门文章" ] }, { "id": "stable-38", "alternatives": [ "最新文章" ] }, { "id": "stable-39", "alternatives": [ "相关电子书" ] }, { "id": "stable-40", "alternatives": [ "更多" ] }, { "id": "stable-41", "alternatives": [ "下一篇" ] }, { "id": "stable-42", "alternatives": [ "目录" ] }, { "id": "stable-43", "alternatives": [ "为什么选择阿里云" ] }, { "id": "stable-44", "alternatives": [ "什么是云计算" ] }, { "id": "stable-45", "alternatives": [ "全球基础设施" ] }, { "id": "stable-46", "alternatives": [ "技术领先" ] }, { "id": "stable-47", "alternatives": [ "稳定可靠" ] }, { "id": "stable-48", "alternatives": [ "安全合规" ] }, { "id": "stable-49", "alternatives": [ "分析师报告" ] }, { "id": "stable-50", "alternatives": [ "产品和定价" ] }, { "id": "stable-51", "alternatives": [ "全部产品" ] }, { "id": "stable-52", "alternatives": [ "免费试用" ] }, { "id": "stable-53", "alternatives": [ "产品动态" ] }, { "id": "stable-54", "alternatives": [ "产品定价" ] }, { "id": "stable-55", "alternatives": [ "配置报价器" ] }, { "id": "stable-56", "alternatives": [ "云上成本管理" ] }, { "id": "stable-57", "alternatives": [ "技术内容" ] }, { "id": "stable-58", "alternatives": [ "技术解决方案" ] }, { "id": "stable-59", "alternatives": [ "帮助文档" ] }, { "id": "stable-60", "alternatives": [ "天池大赛" ] }, { "id": "stable-61", "alternatives": [ "阿里云认证" ] }, { "id": "stable-62", "alternatives": [ "基础服务" ] }, { "id": "stable-63", "alternatives": [ "企业增值服务" ] }, { "id": "stable-64", "alternatives": [ "迁云服务" ] }, { "id": "stable-65", "alternatives": [ "官网公告" ] }, { "id": "stable-66", "alternatives": [ "健康看板" ] }, { "id": "stable-67", "alternatives": [ "信任中心" ] }, { "id": "stable-68", "alternatives": [ "关注阿里云" ] }, { "id": "stable-69", "alternatives": [ "法律声明" ] }, { "id": "stable-70", "alternatives": [ "Cookies政策" ] }, { "id": "stable-71", "alternatives": [ "廉正举报" ] }, { "id": "stable-72", "alternatives": [ "安全举报" ] }, { "id": "stable-73", "alternatives": [ "联系我们" ] }, { "id": "stable-74", "alternatives": [ "加入我们" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The entire initial free article includes preface/TOC, nine programming subsections, exception/logging, unit testing, security, database, engineering, both appendices and final legal statement. Body height exceeds 44k px without clipping; beginning/middle/end screenshots verify full text through original upload-failure placeholders. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "项目开发规范" ], "html_selector": "h1.article-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-022/comment-qualification-reference-r5.json", "sha256": "f1e5a84090d47bc1f3cb1e3aa302484cbad50f31e5ba83136182a75c84450c8a", "chars": 773, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "前言\n\n本开发规范基于《阿里巴巴Java开发手册终极版》修改,并集成我们自己的项目开发规范,整合而成。\n\n为表示对阿里的敬意,先放原版连接:\n\n中文版: 阿里巴巴Java开发手册\nEnglish Version: Alibaba Java Coding Guidelines\n手册书籍版天猫官方店: 阿里巴巴JAVA开发手册最新版\n阿里开源的IDE代码规约检测插件\nIDEA插件使用文档\nEclipse插件使用文档\n\n《阿里巴巴Java开发手册》是阿里巴巴集团技术团队的集体智慧结晶和经验总结,经历了多次大规模一线实战的检验及不断的完善,系统化地整理成册,反馈给广大开发者。现代软件行业的高速发展对开发者的综合素质要求越来越高,因为不仅是编程知识点,其它维度的知识点也会影响到软件的最终交付质量。比如:数据库的表结构和索引设计缺陷可能带来软件上的架构缺陷或性能风险;工程结构混乱导致后续维护艰难;没有鉴权的漏洞代码易被黑客攻击等等。所以本手册以Java开发者为中心视角,划分为编程规约、异常日志、单元测试、安全规约、工程结构、MySQL数据库六个维度,再根据内容特征,细分成若干二级子目录。根据约束力强弱及故障敏感性,规约依次分为强制、推荐、参考三大类。对于规约条目的延伸信息中,“说明”对内容做了适当扩展和解释;“正例”提倡什么样的编码和实现方式;“反例”说明需要提防的雷区,以及真实的错误案例。\n\n目录\n\n前言\n一、编程规约..................................................... 1\n\n(一) 命名风格.................................................... 1\n\n(二) 常量定义.................................................... 3\n\n(三) 代码格式.................................................... 4\n\n(四) OOP规约.................................................... 6\n\n(五) 集合处理.................................................... 9\n\n(六) 并发处理................................................... 12\n\n(七) 控制语句................................................... 14\n\n(八) 注释规约................................................... 16\n\n(九) 其它....................................................... 17\n\n二、异常日志.................................................... 18\n\n(一) 异常处理................................................... 18\n\n(二) 日志规约................................................... 19\n\n三、单元测试.................................................... 21\n\n四、安全规约.................................................... 23\n\n五、MySQL数据库.............................................. 24\n\n(一) 建表规约................................................... 24\n\n(二) 索引规约................................................... 25\n\n(三) SQL语句................................................... 27\n\n(四) ORM映射.................................................. 28\n\n六、工程结构.................................................... 30\n\n(一) 应用分层................................................... 30\n\n(二) 二方库依赖................................................. 31\n\n(三) 服务器..................................................... 32\n\n附1:版本历史.................................................. 34\n\n附2:本手册专有名词............................................ 35\n\n(注:浏览时请使用PDF左侧导航栏)\n\nJava开发手册\n\n|\n\n版本号\n\n|\n\n制定团队\n\n|\n\n更新日期\n\n|\n\n备注\n\n|\n|\n\n1.3.0\n\n|\n\n阿里巴巴集团技术团队\n\n|\n\n2017.9.25\n\n|\n\n增加单元测试规约(PDF终极版)\n\n|\n\n一、编程规约\n(一)命名风格\n【强制】代码中的命名均不能以下划线或美元符号开始,也不能以下划线或美元符号结束。\n\n反例:_name / _name / $Object / name / name\n/Object\n/\n𝑂\n𝑏\n𝑗\n𝑒\n𝑐\n𝑡\n\n【强制】代码中的命名严禁使用拼音与英文混合的方式,更不允许直接使用中文的方式。说明:正确的英文拼写和语法可以让阅读者易于理解,避免歧义。注意,即使纯拼音命名方式也要避免采用。正例:alibaba / taobao / youku / hangzhou 等国际通用的名称,可视同英文。\n\n反例:DaZhePromotion [打折] / getPingfenByName() [评分] / int 某变量 = 3\n\n【强制】类名使用UpperCamelCase风格,必须遵从驼峰形式,但以下情形例外:DO / BO /\n\nDTO / VO / AO\n\n正例:MarcoPolo / UserDO / XmlService / TcpUdpDeal / TaPromotion 反例:macroPolo / UserDo / XMLService / TCPUDPDeal / TAPromotion\n\n【强制】方法名、参数名、成员变量、局部变量都统一使用lowerCamelCase风格,必须遵从驼峰形式。\n\n正例: localValue / getHttpMessage() / inputUserId\n\n【强制】常量命名全部大写,单词间用下划线隔开,力求语义表达完整清楚,不要嫌名字长。\n\n正例:MAX_STOCK_COUNT 反例:MAX_COUNT\n\n【强制】抽象类命名使用Abstract或Base开头;异常类命名使用Exception结尾;测试类命名以它要测试的类的名称开始,以Test结尾。\n\n【强制】中括号是数组类型的一部分,数组定义如下:String[] args; 反例:使用String args[]的方式来定义。\n\n【强制】POJO类中布尔类型的变量,都不要加is,否则部分框架解析会引起序列化错误。\n\n反例:定义为基本数据类型Boolean isDeleted;的属性,它的方法也是isDeleted(),RPC\n\n框架在反向解析的时候,“以为”对应的属性名称是deleted,导致属性获取不到,进而抛出异常。\n\n【强制】包名统一使用小写,点分隔符之间有且仅有一个自然语义的英语单词。包名统一使用单数形式,但是类名如果有复数含义,类名可以使用复数形式。\n\n正例: 应用工具类包名为com.alibaba.open.util、类名为MessageUtils(此规则参考 spring的框架结构)\n\n【强制】杜绝完全不规范的缩写,避免望文不知义。\n\n反例:AbstractClass“缩写”命名成AbsClass;condition“缩写”命名成 condi,此类随意缩写严重降低了代码的可阅读性。\n\n【推荐】为了达到代码自解释的目标,任何自定义编程元素在命名时,使用尽量完整的单词组合来表达其意。\n\n正例:从远程仓库拉取代码的类命名为 PullCodeFromRemoteRepository。\n\n反例:变量 int a; 的随意命名方式。\n\n【推荐】如果模块、接口、类、方法使用了设计模式,在命名时体现出具体模式。\n\n说明:将设计模式体现在名字中,有利于阅读者快速理解架构设计理念。\n\n正例:public class OrderFactory; public class LoginProxy;\n\npublic class ResourceObserver;\n\n【推荐】接口类中的方法和属性不要加任何修饰符号(public 也不要加),保持代码的简洁性,并加上有效的Javadoc注释。尽量不要在接口里定义变量,如果一定要定义变量,肯定是与接口方法相关,并且是整个应用的基础常量。\n\n正例:接口方法签名:void f();\n\n接口基础常量表示:String COMPANY = \"alibaba\";\n\n反例:接口方法定义:public abstract void f();\n\n说明:JDK8中接口允许有默认实现,那么这个default方法,是对所有实现类都有价值的默认实现。\n\n接口和实现类的命名有两套规则:\n\n1) 【强制】对于Service和DAO类,基于SOA的理念,暴露出来的服务一定是接口,内部的实现类用Impl的后缀与接口区别。\n\n正例:CacheServiceImpl实现CacheService接口。\n\n2) 【推荐】 如果是形容能力的接口名称,取对应的形容词做接口名(通常是–able的形式)。\n\n正例:AbstractTranslator实现 Translatable。\n\n【参考】枚举类名建议带上Enum后缀,枚举成员名称需要全大写,单词间用下划线隔开。\n\n说明:枚举其实就是特殊的常量类,且构造方法被默认强制是私有。\n\n正例:枚举名字为ProcessStatusEnum的成员名称:SUCCESS / UNKOWN_REASON。\n\n【参考】各层命名规约:\n\nA) Service/DAO层方法命名规约\n\n1) 获取单个对象的方法用get做前缀。\n\n2) 获取多个对象的方法用list做前缀。\n\n3) 获取统计值的方法用count做前缀。\n\n4) 插入的方法用save/insert做前缀。\n\n5) 删除的方法用remove/delete做前缀。\n\n6) 修改的方法用update做前缀。\n\nB) 领域模型命名规约\n\n1) 数据对象:xxxDO,xxx即为数据表名。\n\n2) 数据传输对象:xxxDTO,xxx为业务领域相关的名称。\n\n3) 展示对象:xxxVO,xxx一般为网页名称。\n\n4) POJO是DO/DTO/BO/VO的统称,禁止命名成xxxPOJO。\n\n(二)常量定义\n【强制】不允许任何魔法值(即未经定义的常量)直接出现在代码中。\n\n反例:String key = \"Id#taobao_\" + tradeId; cache.put(key, value);\n\n【强制】long或者Long初始赋值时,使用大写的L,不能是小写的l,小写容易跟数字1混淆,造成误解。\n\n说明:Long a = 2l; 写的是数字的21,还是Long型的2?\n\n【推荐】不要使用一个常量类维护所有常量,按常量功能进行归类,分开维护。\n\n说明:大而全的常量类,非得使用查找功能才能定位到修改的常量,不利于理解和维护。\n\n正例:缓存相关常量放在类CacheConsts下;系统配置相关常量放在类ConfigConsts下。\n\n【推荐】常量的复用层次有五层:跨应用共享常量、应用内共享常量、子工程内共享常量、包内共享常量、类内共享常量。\n\n1) 跨应用共享常量:放置在二方库中,通常是client.jar中的constant目录下。\n\n2) 应用内共享常量:放置在一方库中,通常是modules中的constant目录下。\n\n 反例:易懂变量也要统一定义成应用内共享常量,两位攻城师在两个类中分别定义了表示\n\n\n“是”的变量:\n\n 类A中:public static final String YES = \"yes\"; 类B中:public static final String YES = \"y\";\n\n A.YES.equals(B.YES),预期是true,但实际返回为false,导致线上问题。\n\n\n3) 子工程内部共享常量:即在当前子工程的constant目录下。\n\n4) 包内共享常量:即在当前包下单独的constant目录下。\n\n5) 类内共享常量:直接在类内部private static final定义。\n\n【推荐】如果变量值仅在一个范围内变化,且带有名称之外的延伸属性,定义为枚举类。下面正例中的数字就是延伸信息,表示星期几。\n\n正例:public Enum { MONDAY(1), TUESDAY(2), WEDNESDAY(3), THURSDAY(4), FRIDAY(5), SATURDAY(6), SUNDAY(7);}\n\n(三)代码格式\n【强制】大括号的使用约定。如果是大括号内为空,则简洁地写成{}即可,不需要换行;如果是非空代码块则: 1) 左大括号前不换行。\n\n2) 左大括号后换行。\n\n3) 右大括号前换行。\n\n4) 右大括号后还有else等代码则不换行;表示终止的右大括号后必须换行。\n\n【强制】 左小括号和字符之间不出现空格;同样,右小括号和字符之间也不出现空格。详见第5条下方正例提示。\n\n|\n\n空格\n\n|\n\na == b\n\n|\n\n空格\n\n|\n\n反例:if ()\n\n【强制】if/for/while/switch/do等保留字与括号之间都必须加空格。\n\n【强制】任何二目、三目运算符的左右两边都需要加一个空格。\n\n说明:运算符包括赋值运算符=、逻辑运算符&&、加减乘除符号等。\n\n【强制】采用4个空格缩进,禁止使用tab字符。\n\n[图片上传失败...(image-faf96d-1526115059995)] 说明:如果使用tab缩进,必须设置1个tab为4个空格。IDEA设置tab为4个空格时,请勿勾选Use tab character;而在eclipse中,必须勾选insert spaces for tabs。\n\n正例: (涉及1-5点)\n\npublic static void main(String[] args) {\n\n// 缩进4个空格\n\nString say = \"hello\";\n\n// 运算符的左右必须有一个空格\n\nint flag = 0;\n\n// 关键词if与括号之间必须有一个空格,括号内的f与左括号,0与右括号不需要空格 if (flag == 0) {\n\nSystem.out.println(say);\n\n}\n\n// 左大括号前加空格且不换行;左大括号后换行\n\nif (flag == 1) {\n\nSystem.out.println(\"world\");\n\n// 右大括号前换行,右大括号后有else,不用换行\n\n} else {\n\nSystem.out.println(\"ok\");\n\n// 在右大括号后直接结束,则必须换行\n\n}\n\n}\n\n【强制】注释的双斜线与注释内容之间有且仅有一个空格。\n\n正例:// 注释内容,注意在//和注释内容之间有一个空格。\n\n【强制】单行字符数限制不超过 120 个,超出需要换行,换行时遵循如下原则: 1) 第二行相对第一行缩进 4 个空格,从第三行开始,不再继续缩进,参考示例。\n\n2) 运算符与下文一起换行。\n\n3) 方法调用的点符号与下文一起换行。\n\n4) 方法调用时,多个参数,需要换行时,在逗号后进行。\n\n5) 在括号前不要换行,见反例。正例:\n\nStringBuffer sb = new StringBuffer();\n\n// 超过120个字符的情况下,换行缩进4个空格,点号和方法名称一起换行 sb.append(\"zi\").append(\"xin\")...\n\n.append(\"huang\")...\n\n.append(\"huang\")...\n\n.append(\"huang\");\n\n反例:\n\nStringBuffer sb = new StringBuffer();\n\n// 超过120个字符的情况下,不要在括号前换行\n\nsb.append(\"zi\").append(\"xin\")...append\n\n(\"huang\");\n\n// 参数很多的方法调用可能超过120个字符,不要在逗号前换行 method(args1, args2, args3, ...\n\n, argsX);\n\n【强制】方法参数在定义和传入时,多个参数逗号后边必须加空格。\n\n正例:下例中实参的\"a\",后边必须要有一个空格。\n\nmethod(\"a\", \"b\", \"c\");\n\n【强制】IDE的text file encoding设置为UTF-8; IDE中文件的换行符使用Unix格式,不要使用Windows格式。\n\n【推荐】没有必要增加若干空格来使某一行的字符与上一行对应位置的字符对齐。\n\n正例:\n\nint a = 3;\n\nlong b = 4L;\n\nfloat c = 5F;\n\nStringBuffer sb = new StringBuffer();\n\n说明:增加sb这个变量,如果需要对齐,则给a、b、c都要增加几个空格,在变量比较多的情况下,是一种累赘的事情。\n\n【推荐】方法体内的执行语句组、变量的定义语句组、不同的业务逻辑之间或者不同的语义之间插入一个空行。相同业务逻辑和语义之间不需要插入空行。\n\n说明:没有必要插入多个空行进行隔开。\n\n(四)OOP规约\n\n【强制】避免通过一个类的对象引用访问此类的静态变量或静态方法,无谓增加编译器解析成本,直接用类名来访问即可。\n\n【强制】所有的覆写方法,必须加@Override注解。\n\n说明:getObject()与get0bject()的问题。一个是字母的O,一个是数字的0,加@Override 可以准确判断是否覆盖成功。另外,如果在抽象类中对方法签名进行修改,其实现类会马上编译报错。\n\n【强制】相同参数类型,相同业务含义,才可以使用Java的可变参数,避免使用Object。\n\n说明:可变参数必须放置在参数列表的最后。(提倡同学们尽量不用可变参数编程)正例:public User getUsers(String type, Integer... ids) {...}\n\n【强制】外部正在调用或者二方库依赖的接口,不允许修改方法签名,避免对接口调用方产生影响。接口过时必须加@Deprecated注解,并清晰地说明采用的新接口或者新服务是什么。\n\n【强制】不能使用过时的类或方法。\n\n说明:java.net.URLDecoder 中的方法decode(String encodeStr) 这个方法已经过时,应该使用双参数decode(String source, String encode)。接口提供方既然明确是过时接口,那么有义务同时提供新的接口;作为调用方来说,有义务去考证过时方法的新实现是什么。\n\n【强制】Object的equals方法容易抛空指针异常,应使用常量或确定有值的对象来调用 equals。\n\n正例:\"test\".equals(object); 反例:object.equals(\"test\");\n\n说明:推荐使用java.util.Objects#equals(JDK7引入的工具类)\n\n【强制】所有的相同类型的包装类对象之间值的比较,全部使用equals方法比较。\n\n说明:对于Integer var = ? 在-128至127范围内的赋值,Integer对象是在 IntegerCache.cache产生,会复用已有对象,这个区间内的Integer值可以直接使用==进行判断,但是这个区间之外的所有数据,都会在堆上产生,并不会复用已有对象,这是一个大坑,推荐使用equals方法进行判断。\n\n关于基本数据类型与包装数据类型的使用标准如下:\n\n1) 【强制】所有的POJO类属性必须使用包装数据类型。\n\n2) 【强制】RPC方法的返回值和参数必须使用包装数据类型。\n\n3) 【推荐】所有的局部变量使用基本数据类型。\n\n说明:POJO类属性没有初值是提醒使用者在需要使用时,必须自己显式地进行赋值,任何\n\nNPE问题,或者入库检查,都由使用者来保证。\n\n正例:数据库的查询结果可能是null,因为自动拆箱,用基本数据类型接收有NPE风险。 反例:比如显示成交总额涨跌情况,即正负x%,x为基本数据类型,调用的RPC服务,调用不成功时,返回的是默认值,页面显示为0%,这是不合理的,应该显示成中划线。所以包装数据类型的null值,能够表示额外的信息,如:远程调用失败,异常退出。\n\n【强制】定义DO/DTO/VO等POJO类时,不要设定任何属性默认值。\n\n反例:POJO类的gmtCreate默认值为new Date();但是这个属性在数据提取时并没有置入具体值,在更新其它字段时又附带更新了此字段,导致创建时间被修改成当前时间。\n\n【强制】序列化类新增属性时,请不要修改serialVersionUID字段,避免反序列失败;如果完全不兼容升级,避免反序列化混乱,那么请修改serialVersionUID值。\n\n说明:注意serialVersionUID不一致会抛出序列化运行时异常。\n\n【强制】构造方法里面禁止加入任何业务逻辑,如果有初始化逻辑,请放在init方法中。\n\n【强制】POJO类必须写toString方法。使用IDE的中工具:source> generate toString 时,如果继承了另一个POJO类,注意在前面加一下super.toString。\n\n说明:在方法执行抛出异常时,可以直接调用POJO的toString()方法打印其属性值,便于排查问题。\n\n【推荐】使用索引访问用String的split方法得到的数组时,需做最后一个分隔符后有无\n\n内容的检查,否则会有抛IndexOutOfBoundsException的风险。\n\n说明:\n\nString str = \"a,b,c,,\";\n\nString[] ary = str.split(\",\");\n\n// 预期大于3,结果是3\n\nSystem.out.println(ary.length);\n\n【推荐】当一个类有多个构造方法,或者多个同名方法,这些方法应该按顺序放置在一起,便于阅读,此条规则优先于第15条规则。\n\n【推荐】 类内方法定义顺序依次是:公有方法或保护方法 > 私有方法 > getter/setter 方法。说明:公有方法是类的调用者和维护者最关心的方法,首屏展示最好;保护方法虽然只是子类关心,也可能是“模板设计模式”下的核心方法;而私有方法外部一般不需要特别关心,是一个黑盒实现;因为承载的信息价值较低,所有Service和DAO的getter/setter方法放在类体最后。\n\n【推荐】setter方法中,参数名称与类成员变量名称一致,this.成员名 = 参数名。在\n\ngetter/setter方法中,不要增加业务逻辑,增加排查问题的难度。\n\n反例:\n\npublic Integer getData() { if (true) {\n\nreturn this.data + 100;\n\n} else {\n\nreturn this.data - 100;\n\n}\n\n}\n\n【推荐】循环体内,字符串的连接方式,使用StringBuilder的append方法进行扩展。说明:反编译出的字节码文件显示每次循环都会new出一个StringBuilder对象,然后进行 append操作,最后通过toString方法返回String对象,造成内存资源浪费。\n反例:\n\nString str = \"start\";\n\nfor (int i = 0; i < 100; i++) { str = str + \"hello\";\n\n}\n\n【推荐】final可以声明类、成员变量、方法、以及本地变量,下列情况使用final关键字:\n\n1) 不允许被继承的类,如:String类。\n\n2) 不允许修改引用的域对象,如:POJO类的域变量。\n\n3) 不允许被重写的方法,如:POJO类的setter方法。\n\n4) 不允许运行过程中重新赋值的局部变量。\n\n5) 避免上下文重复使用一个变量,使用final描述可以强制重新定义一个变量,方便更好地进行重构。\n\n【推荐】慎用Object的clone方法来拷贝对象。\n\n说明:对象的clone方法默认是浅拷贝,若想实现深拷贝需要重写clone方法实现属性对象的拷贝。\n\n【推荐】类成员与方法访问控制从严:\n\n1) 如果不允许外部直接通过new来创建对象,那么构造方法必须是private。\n\n2) 工具类不允许有public或default构造方法。\n\n3) 类非static成员变量并且与子类共享,必须是protected。\n\n4) 类非static成员变量并且仅在本类使用,必须是private。\n\n5) 类static成员变量如果仅在本类使用,必须是private。\n\n6) 若是static成员变量,必须考虑是否为final。 7) 类成员方法只供类内部调用,必须是private。\n\n8) 类成员方法只对继承类公开,那么限制为protected。说明:任何类、方法、参数、变量,严控访问范围。过于宽泛的访问范围,不利于模块解耦。思考:如果是一个private的方法,想删除就删除,可是一个public的service方法,或者一个public的成员变量,删除一下,不得手心冒点汗吗?变量像自己的小孩,尽量在自己的视线内,变量作用域太大,无限制的到处跑,那么你会担心的。\n\n(五)集合处理\n【强制】关于hashCode和equals的处理,遵循如下规则: 1) 只要重写equals,就必须重写hashCode。\n\n2) 因为Set存储的是不重复的对象,依据hashCode和equals进行判断,所以Set存储的对象必须重写这两个方法。\n\n3) 如果自定义对象做为Map的键,那么必须重写hashCode和equals。\n\n说明:String重写了hashCode和equals方法,所以我们可以非常愉快地使用String对象作为key来使用。\n\n【强制】 ArrayList的subList结果不可强转成ArrayList,否则会抛出ClassCastException 异常,即java.util.RandomAccessSubList cannot be cast to java.util.ArrayList.\n\n说明:subList 返回的是 ArrayList 的内部类 SubList,并不是 ArrayList ,而是 ArrayList 的一个视图,对于SubList子列表的所有操作最终会反映到原列表上。\n\n【强制】在subList场景中,高度注意对原集合元素个数的修改,会导致子列表的遍历、增加、删除均会产生ConcurrentModificationException 异常。\n\n【强制】使用集合转数组的方法,必须使用集合的toArray(T[] array),传入的是类型完全一样的数组,大小就是list.size()。\n\n说明:使用toArray带参方法,入参分配的数组空间不够大时,toArray方法内部将重新分配内存空间,并返回新数组地址;如果数组元素大于实际所需,下标为[ list.size() ]的数组元素将被置为null,其它数组元素保持原值,因此最好将方法入参数组大小定义与集合元素个数一致。正例:\n\nList list = new ArrayList(2); list.add(\"guan\"); list.add(\"bao\");\n\nString[] array = new String[list.size()]; array = list.toArray(array);\n\n反例:直接使用toArray无参方法存在问题,此方法返回值只能是Object[]类,若强转其它类型数组将出现ClassCastException错误。\n\n【强制】使用工具类Arrays.asList()把数组转换成集合时,不能使用其修改集合相关的方法,它的add/remove/clear方法会抛出UnsupportedOperationException异常。\n\n说明:asList的返回对象是一个Arrays内部类,并没有实现集合的修改方法。Arrays.asList 体现的是适配器模式,只是转换接口,后台的数据仍是数组。\n\nString[] str = new String[] { \"you\", \"wu\" }; List list = Arrays.asList(str);\n\n第一种情况:list.add(\"yangguanbao\"); 运行时异常。第二种情况:str[0] = \"gujin\"; 那么list.get(0)也会随之修改。\n\n【强制】泛型通配符来接收返回的数据,此写法的泛型集合不能使用add方法,而不能使用get方法,做为接口调用赋值时易出错。\n\n说明:扩展说一下PECS(Producer Extends Consumer Super)原则:第一、频繁往外读取内容的,适合用。第二、经常往里插入的,适合用。\n\n【强制】不要在foreach循环里进行元素的remove/add操作。remove元素请使用Iterator 方式,如果并发操作,需要对Iterator对象加锁。正例:\n\nIterator iterator = list.iterator(); while (iterator.hasNext()) {\n\nString item = iterator.next(); if (删除元素的条件) { iterator.remove();\n\n}\n\n}\n\n反例:\n\nList list = new ArrayList(); list.add(\"1\"); list.add(\"2\"); for (String item : list) { if (\"1\".equals(item)) { list.remove(item);\n\n}\n\n}\n\n说明:以上代码的执行结果肯定会出乎大家的意料,那么试一下把“1”换成“2”,会是同样的结果吗?\n\n【强制】 在JDK7版本及以上,Comparator要满足如下三个条件,不然Arrays.sort,\n\nCollections.sort会报IllegalArgumentException异常。\n\n说明:三个条件如下\n\n1) x,y的比较结果和y,x的比较结果相反。\n\n2) x>y,y>z,则x>z。\n\n3) x=y,则x,z比较结果和y,z比较结果相同。\n\n反例:下例中没有处理相等的情况,实际使用中可能会出现异常:\n\nnew Comparator() {\n\n@Override public int compare(Student o1, Student o2) { return o1.getId() > o2.getId() ? 1 : -1; }\n\n};\n\n【推荐】集合初始化时,指定集合初始值大小。\n\n说明:HashMap使用HashMap(int initialCapacity) 初始化,正例:initialCapacity = (需要存储的元素个数 / 负载因子) + 1。注意负载因子(即loader factor)默认为0.75,如果暂时无法确定初始值大小,请设置为16(即默认值)。\n\n反例:HashMap需要放置1024个元素,由于没有设置容量初始大小,随着元素不断增加,容量 7 次被迫扩大,resize需要重建hash表,严重影响性能。\n\n【推荐】使用entrySet遍历Map类集合KV,而不是keySet方式进行遍历。\n\n说明:keySet其实是遍历了2次,一次是转为Iterator对象,另一次是从hashMap中取出 key所对应的value。而entrySet只是遍历了一次就把key和value都放到了entry中,效率更高。如果是JDK8,使用Map.foreach方法。\n\n正例:values()返回的是V值集合,是一个list集合对象;keySet()返回的是K值集合,是一个Set集合对象;entrySet()返回的是K-V值组合集合。\n\n【推荐】高度注意Map类集合K/V能不能存储null值的情况,如下表格:\n\n|\n\n集合类\n\n|\n\nKey\n\n|\n\nValue\n\n|\n\nSuper\n\n|\n\n说明\n\n|\n|\n\nHashtable\n\n|\n\n不允许为null\n\n|\n\n不允许为null\n\n|\n\nDictionary\n\n|\n\n线程安全\n\n|\n|\n\nConcurrentHashMap\n\n|\n\n不允许为null\n\n|\n\n不允许为null\n\n|\n\nAbstractMap\n\n|\n\n锁分段技术(JDK8:CAS)\n\n|\n|\n\nTreeMap\n\n|\n\n不允许为null\n\n|\n\n允许为null\n\n|\n\nAbstractMap\n\n|\n\n线程不安全\n\n|\n|\n\nHashMap\n\n|\n\n允许为null\n\n|\n\n允许为null\n\n|\n\nAbstractMap\n\n|\n\n线程不安全\n\n|\n\n反例: 由于HashMap的干扰,很多人认为ConcurrentHashMap是可以置入null值,而事实上,存储null值时会抛出NPE异常。\n\n【参考】合理利用好集合的有序性(sort)和稳定性(order),避免集合的无序性(unsort)和不稳定性(unorder)带来的负面影响。\n\n说明:有序性是指遍历的结果是按某种比较规则依次排列的。稳定性指集合每次遍历的元素次\n\n序是一定的。如:ArrayList是order/unsort;HashMap是unorder/unsort;TreeSet是 order/sort。\n\n【参考】利用Set元素唯一的特性,可以快速对一个集合进行去重操作,避免使用List的 contains方法进行遍历、对比、去重操作。\n(六)并发处理\n\n【强制】获取单例对象需要保证线程安全,其中的方法也要保证线程安全。说明:资源驱动类、工具类、单例工厂类都需要注意。\n\n【强制】创建线程或线程池时请指定有意义的线程名称,方便出错时回溯。\n\n正例:\n\npublic class TimerTaskThread extends Thread { public TimerTaskThread() { super.setName(\"TimerTaskThread\"); ... }\n\n【强制】线程资源必须通过线程池提供,不允许在应用中自行显式创建线程。\n\n说明:使用线程池的好处是减少在创建和销毁线程上所花的时间以及系统资源的开销,解决资源不足的问题。如果不使用线程池,有可能造成系统创建大量同类线程而导致消耗完内存或者 “过度切换”的问题。\n\n【强制】线程池不允许使用Executors去创建,而是通过ThreadPoolExecutor的方式,这样的处理方式让写的同学更加明确线程池的运行规则,规避资源耗尽的风险。\n\n说明:Executors返回的线程池对象的弊端如下:\n\n1) FixedThreadPool和SingleThreadPool: 允许的请求队列长度为Integer.MAX_VALUE,可能会堆积大量的请求,从而导致OOM。\n\n2) CachedThreadPool和ScheduledThreadPool: 允许的创建线程数量为Integer.MAX_VALUE,可能会创建大量的线程,从而导致OOM。\n\n【强制】SimpleDateFormat 是线程不安全的类,一般不要定义为static变量,如果定义为 static,必须加锁,或者使用DateUtils工具类。\n\n正例:注意线程安全,使用DateUtils。亦推荐如下处理:\n\nprivate static final ThreadLocal df = new ThreadLocal() {\n\n@Override protected DateFormat initialValue() { return new SimpleDateFormat(\"yyyy-MM-dd\"); }\n\n};\n\n说明:如果是JDK8的应用,可以使用Instant代替Date,LocalDateTime代替Calendar, DateTimeFormatter代替SimpleDateFormat,官方给出的解释:simple beautiful strong immutable thread-safe。\n\n【强制】高并发时,同步调用应该去考量锁的性能损耗。能用无锁数据结构,就不要用锁;能锁区块,就不要锁整个方法体;能用对象锁,就不要用类锁。\n\n说明:尽可能使加锁的代码块工作量尽可能的小,避免在锁代码块中调用 RPC 方法。\n\n【强制】对多个资源、数据库表、对象同时加锁时,需要保持一致的加锁顺序,否则可能会造成死锁。\n\n说明:线程一需要对表A、B、C依次全部加锁后才可以进行更新操作,那么线程二的加锁顺序也必须是A、B、C,否则可能出现死锁。\n\n【强制】并发修改同一记录时,避免更新丢失,需要加锁。要么在应用层加锁,要么在缓存加\n\n锁,要么在数据库层使用乐观锁,使用version作为更新依据。\n\n说明:如果每次访问冲突概率小于20%,推荐使用乐观锁,否则使用悲观锁。乐观锁的重试次数不得小于3次。\n\n【强制】多线程并行处理定时任务时,Timer运行多个TimeTask时,只要其中之一没有捕获\n\n抛出的异常,其它任务便会自动终止运行,使用ScheduledExecutorService则没有这个问题。\n\n【推荐】使用CountDownLatch进行异步转同步操作,每个线程退出前必须调用countDown 方法,线程执行代码注意catch异常,确保countDown方法被执行到,避免主线程无法执行至await方法,直到超时才返回结果。\n\n说明:注意,子线程抛出异常堆栈,不能在主线程try-catch到。\n\n【推荐】避免Random实例被多线程使用,虽然共享该实例是线程安全的,但会因竞争同一\n\nseed 导致的性能下降。\n\n说明:Random实例包括java.util.Random 的实例或者 Math.random()的方式。\n\n正例:在JDK7之后,可以直接使用API ThreadLocalRandom,而在 JDK7之前,需要编码保证每个线程持有一个实例。\n\n【推荐】在并发场景下,通过双重检查锁(double-checked locking)实现延迟初始化的优化问题隐患(可参考 The \"Double-Checked Locking is Broken\" Declaration),推荐解决方案中较为简单一种(适用于JDK5及以上版本),将目标属性声明为 volatile型。\n反例:\n\nclass Singleton { private Helper helper = null; public Helper getHelper() {\n\nif (helper == null) synchronized(this) { if (helper == null) helper = new Helper();\n\n}\n\nreturn helper;\n\n}\n\n// other methods and fields...\n\n}\n\n【参考】volatile解决多线程内存不可见问题。对于一写多读,是可以解决变量同步问题,但是如果多写,同样无法解决线程安全问题。如果是count++操作,使用如下类实现:\n\nAtomicInteger count = new AtomicInteger(); count.addAndGet(1); 如果是JDK8,推荐使用LongAdder对象,比AtomicLong性能更好(减少乐观锁的重试次数)。\n\n【参考】 HashMap在容量不够进行resize时由于高并发可能出现死链,导致CPU飙升,在开发过程中可以使用其它数据结构或加锁来规避此风险。\n\n【参考】ThreadLocal无法解决共享对象的更新问题,ThreadLocal对象建议使用static\n\n修饰。这个变量是针对一个线程内所有操作共享的,所以设置为静态变量,所有此类实例共享此静态变量 ,也就是说在类第一次被使用时装载,只分配一块存储空间,所有此类的对象(只要是这个线程内定义的)都可以操控这个变量。\n\n(七)控制语句\n\n【强制】在一个switch块内,每个case要么通过break/return等来终止,要么注释说明程序将继续执行到哪一个case为止;在一个switch块内,都必须包含一个default语句并且放在最后,即使它什么代码也没有。\n\n【强制】在if/else/for/while/do语句中必须使用大括号。即使只有一行代码,避免采用\n\n单行的编码方式:if (condition) statements;\n\n【推荐】表达异常的分支时,少用if-else方式,这种方式可以改写成:\n\nif (condition) { ...\n\nreturn obj;\n\n}\n\n// 接着写else的业务逻辑代码; 说明:如果非得使用if()...else if()...else...方式表达逻辑,【强制】避免后续代码维护困难,请勿超过3层。 正例:超过3层的 if-else 的逻辑判断代码可以使用卫语句、策略模式、状态模式等来实现,其中卫语句示例如下:\n\npublic void today() { if (isBusy()) {\n\nSystem.out.println(“change time.”);\n\n\nreturn;\n\n}\n\nif (isFree()) {\n\nSystem.out.println(“go to travel.”); return;\n\n}\n\nSystem.out.println(“stay at home to learn Alibaba Java Coding Guidelines.”); return;\n\n}\n\n【推荐】除常用方法(如 getXxx/isXxx)等外,不要在条件判断中执行其它复杂的语句,将复\n\n杂逻辑判断的结果赋值给一个有意义的布尔变量名,以提高可读性。\n\n说明:很多 if 语句内的逻辑相当复杂,阅读者需要分析条件表达式的最终结果,才能明确什么样的条件执行什么样的语句,那么,如果阅读者分析逻辑表达式错误呢?正例:\n\n// 伪代码如下\n\nfinal boolean existed = (file.open(fileName, \"w\") != null) && (...) || (...); if (existed) {\n\n...\n\n}\n\n反例:\n\nif ((file.open(fileName, \"w\") != null) && (...) || (...)) {\n\n...\n\n}\n\n【推荐】循环体中的语句要考量性能,以下操作尽量移至循环体外处理,如定义对象、变量、\n\n获取数据库连接,进行不必要的try-catch操作(这个try-catch是否可以移至循环体外)。\n\n【推荐】接口入参保护,这种场景常见的是用于做批量操作的接口。\n\n【参考】下列情形,需要进行参数校验:\n\n1) 调用频次低的方法。\n\n2) 执行时间开销很大的方法。此情形中,参数校验时间几乎可以忽略不计,但如果因为参数错误导致中间执行回退,或者错误,那得不偿失。\n\n3) 需要极高稳定性和可用性的方法。\n\n4) 对外提供的开放接口,不管是RPC/API/HTTP接口。\n\n5) 敏感权限入口。\n\n【参考】下列情形,不需要进行参数校验:\n\n1) 极有可能被循环调用的方法。但在方法说明里必须注明外部参数检查要求。\n\n2) 底层调用频度比较高的方法。毕竟是像纯净水过滤的最后一道,参数错误不太可能到底层才会暴露问题。一般DAO层与Service层都在同一个应用中,部署在同一台服务器中,所以DAO的参数校验,可以省略。\n\n3) 被声明成private只会被自己代码所调用的方法,如果能够确定调用方法的代码传入参数已经做过检查或者肯定不会有问题,此时可以不校验参数。\n\n(八)注释规约\n【强制】类、类属性、类方法的注释必须使用Javadoc规范,使用/*内容/格式,不得使用\n\n// xxx方式。\n\n说明:在IDE编辑窗口中,Javadoc方式会提示相关注释,生成Javadoc可以正确输出相应注释;在IDE中,工程调用方法时,不进入方法即可悬浮提示方法、参数、返回值的意义,提高阅读效率。\n\n【强制】所有的抽象方法(包括接口中的方法)必须要用Javadoc注释、除了返回值、参数、异常说明外,还必须指出该方法做什么事情,实现什么功能。说明:对子类的实现要求,或者调用注意事项,请一并说明。\n\n【强制】所有的类都必须添加创建者和创建日期。\n\n【强制】方法内部单行注释,在被注释语句上方另起一行,使用//注释。方法内部多行注释使用/* */注释,注意与代码对齐。\n\n【强制】所有的枚举类型字段必须要有注释,说明每个数据项的用途。\n\n【推荐】与其“半吊子”英文来注释,不如用中文注释把问题说清楚。专有名词与关键字保持英文原文即可。\n\n反例:“TCP连接超时”解释成“传输控制协议连接超时”,理解反而费脑筋。\n\n【推荐】代码修改的同时,注释也要进行相应的修改,尤其是参数、返回值、异常、核心逻辑等的修改。\n\n说明:代码与注释更新不同步,就像路网与导航软件更新不同步一样,如果导航软件严重滞后,就失去了导航的意义。\n\n【参考】谨慎注释掉代码。在上方详细说明,而不是简单地注释掉。如果无用,则删除。\n\n说明:代码被注释掉有两种可能性:1)后续会恢复此段代码逻辑。2)永久不用。前者如果没有备注信息,难以知晓注释动机。后者建议直接删掉(代码仓库保存了历史代码)。\n\n【参考】对于注释的要求:第一、能够准确反应设计思想和代码逻辑;第二、能够描述业务含义,使别的程序员能够迅速了解到代码背后的信息。完全没有注释的大段代码对于阅读者形同天书,注释是给自己看的,即使隔很长时间,也能清晰理解当时的思路;注释也是给继任者看的,使其能够快速接替自己的工作。\n\n【参考】好的命名、代码结构是自解释的,注释力求精简准确、表达到位。避免出现注释的一个极端:过多过滥的注释,代码的逻辑一旦修改,修改注释是相当大的负担。\n\n反例:\n\n// put elephant into fridge put(elephant, fridge);\n\n方法名put,加上两个有意义的变量名elephant和fridge,已经说明了这是在干什么,语义清晰的代码不需要额外的注释。\n\n【参考】特殊注释标记,请注明标记人与标记时间。注意及时处理这些标记,通过标记扫描,经常清理此类标记。线上故障有时候就是来源于这些标记处的代码。\n\n1) 待办事宜(TODO):( 标记人,标记时间,[预计处理时间])\n\n表示需要实现,但目前还未实现的功能。这实际上是一个Javadoc的标签,目前的Javadoc 还没有实现,但已经被广泛使用。只能应用于类,接口和方法(因为它是一个Javadoc标签)。\n\n2) 错误,不能工作(FIXME):(标记人,标记时间,[预计处理时间])\n\n在注释中用FIXME标记某代码是错误的,而且不能工作,需要及时纠正的情况。\n\n(九)其它\n【强制】在使用正则表达式时,利用好其预编译功能,可以有效加快正则匹配速度。\n\n说明:不要在方法体内定义:Pattern pattern = Pattern.compile(规则);\n\n【强制】velocity调用POJO类的属性时,建议直接使用属性名取值即可,模板引擎会自动按\n\n规范调用POJO的getXxx(),如果是boolean基本数据类型变量(boolean命名不需要加is 前缀),会自动调用isXxx()方法。\n\n说明:注意如果是Boolean包装类对象,优先调用getXxx()的方法。\n\n【强制】后台输送给页面的变量必须加$!{var}——中间的感叹号。\n\n说明:如果var=null或者不存在,那么${var}会直接显示在页面上。\n\n【强制】注意 Math.random() 这个方法返回是double类型,注意取值的范围 0≤x<1(能够取到零值,注意除零异常),如果想获取整数类型的随机数,不要将x放大10的若干倍然后取整,直接使用Random对象的nextInt或者nextLong方法。\n\n【强制】获取当前毫秒数System.currentTimeMillis(); 而不是new Date().getTime(); 说明:如果想获取更加精确的纳秒级时间值,使用System.nanoTime()的方式。在JDK8中,针对统计时间等场景,推荐使用Instant类。\n\n【推荐】不要在视图模板中加入任何复杂的逻辑。\n\n说明:根据 MVC 理论,视图的职责是展示,不要抢模型和控制器的活。\n\n【推荐】任何数据结构的构造或初始化,都应指定大小,避免数据结构无限增长吃光内存。\n\n【推荐】及时清理不再使用的代码段或配置信息。\n\n说明:对于垃圾代码或过时配置,坚决清理干净,避免程序过度臃肿,代码冗余。\n\n正例:对于暂时被注释掉,后续可能恢复使用的代码片断,在注释代码上方,统一规定使用三个斜杠(///)来说明注释掉代码的理由。\n\n二、异常日志\n(一)异常处理\n【强制】Java 类库中定义的一类RuntimeException可以通过预先检查进行规避,而不应该通过catch 来处理,比如:IndexOutOfBoundsException,NullPointerException等等。说明:无法通过预检查的异常除外,如在解析一个外部传来的字符串形式数字时,通过catch\n\nNumberFormatException来实现。\n\n正例:if (obj != null) {...}\n\n反例:try { obj.method() } catch (NullPointerException e) {...}\n\n【强制】异常不要用来做流程控制,条件控制,因为异常的处理效率比条件分支低。\n\n【强制】对大段代码进行try-catch,这是不负责任的表现。catch时请分清稳定代码和非稳定代码,稳定代码指的是无论如何不会出错的代码。对于非稳定代码的catch尽可能进行区分异常类型,再做对应的异常处理。\n\n【强制】捕获异常是为了处理它,不要捕获了却什么都不处理而抛弃之,如果不想处理它,请将该异常抛给它的调用者。最外层的业务使用者,必须处理异常,将其转化为用户可以理解的内容。\n\n【强制】有try块放到了事务代码中,catch异常后,如果需要回滚事务,一定要注意手动回滚事务。\n\n【强制】finally块必须对资源对象、流对象进行关闭,有异常也要做try-catch。\n\n说明:如果JDK7及以上,可以使用try-with-resources方式。\n\n【强制】不能在finally块中使用return,finally块中的return返回后方法结束执行,不会再执行try块中的return语句。\n\n【强制】捕获异常与抛异常,必须是完全匹配,或者捕获异常是抛异常的父类。\n\n说明:如果预期对方抛的是绣球,实际接到的是铅球,就会产生意外情况。\n\n【推荐】方法的返回值可以为null,不强制返回空集合,或者空对象等,必须添加注释充分\n\n说明什么情况下会返回null值。调用方需要进行null判断防止NPE问题。\n\n说明:本手册明确防止NPE是调用者的责任。即使被调用方法返回空集合或者空对象,对调用\n\n者来说,也并非高枕无忧,必须考虑到远程调用失败、序列化失败、运行时异常等场景返回 null的情况。\n\n【推荐】防止NPE,是程序员的基本修养,注意NPE产生的场景:\n\n1) 返回类型为基本数据类型,return 包装数据类型的对象时,自动拆箱有可能产生 NPE。\n\n反例:public int f() { return Integer对象}, 如果为null,自动解箱抛NPE。\n\n2) 数据库的查询结果可能为null。\n\n3) 集合里的元素即使isNotEmpty,取出的数据元素也可能为null。\n\n4) 远程调用返回对象时,一律要求进行空指针判断,防止NPE。\n\n5) 对于Session中获取的数据,建议NPE检查,避免空指针。\n\n6) 级联调用obj.getA().getB().getC();一连串调用,易产生NPE。\n\n正例:使用JDK8的Optional类来防止NPE问题。\n\n【推荐】定义时区分unchecked / checked 异常,避免直接抛出new RuntimeException(),更不允许抛出Exception或者Throwable,应使用有业务含义的自定义异常。推荐业界已定义过的自定义异常,如:DAOException / ServiceException等。\n\n【参考】在代码中使用“抛异常”还是“返回错误码”,对于公司外的http/api开放接口必须使用“错误码”;而应用内部推荐异常抛出;跨应用间RPC调用优先考虑使用Result方式,封装isSuccess()方法、“错误码”、“错误简短信息”。\n\n说明:关于RPC方法返回方式使用Result方式的理由:\n\n1) 使用抛异常返回方式,调用方如果没有捕获到就会产生运行时错误。\n\n2) 如果不加栈信息,只是new自定义异常,加入自己的理解的error message,对于调用端解决问题的帮助不会太多。如果加了栈信息,在频繁调用出错的情况下,数据序列化和传输的性能损耗也是问题。\n\n【参考】避免出现重复的代码(Don’t Repeat Yourself),即DRY原则。\n\n说明:随意复制和粘贴代码,必然会导致代码的重复,在以后需要修改时,需要修改所有的副本,容易遗漏。必要时抽取共性方法,或者抽象公共类,甚至是组件化。\n\n正例:一个类中有多个public方法,都需要进行数行相同的参数校验操作,这个时候请抽取:\n\nprivate boolean checkParam(DTO dto) {...}\n\n(二)日志规约\n【强制】应用中不可直接使用日志系统(Log4j、Logback)中的API,而应依赖使用日志框架\n\nSLF4J中的API,使用门面模式的日志框架,有利于维护和各个类的日志处理方式统一。\n\nimport org.slf4j.Logger;\n\nimport org.slf4j.LoggerFactory;\n\nprivate static final Logger logger = LoggerFactory.getLogger(Abc.class);\n\n【强制】日志文件推荐至少保存15天,因为有些异常具备以“周”为频次发生的特点。\n\n【强制】应用中的扩展日志(如打点、临时监控、访问日志等)命名方式:\n\nappName_logType_logName.log。logType:日志类型,推荐分类有\n\nstats/desc/monitor/visit等;logName:日志描述。这种命名的好处:通过文件名就可知道日志文件属于什么应用,什么类型,什么目的,也有利于归类查找。正例:mppserver应用中单独监控时区转换异常,如:\n\nmppserver_monitor_timeZoneConvert.log\n\n说明:推荐对日志进行分类,如将错误日志和业务日志分开存放,便于开发人员查看,也便于通过日志对系统进行及时监控。\n\n【强制】对trace/debug/info级别的日志输出,必须使用条件输出形式或者使用占位符的方式。\n\n说明:logger.debug(\"Processing trade with id: \" + id + \" and symbol: \" + symbol);\n\n如果日志级别是warn,上述日志不会打印,但是会执行字符串拼接操作,如果symbol是对象,会执行toString()方法,浪费了系统资源,执行了上述操作,最终日志却没有打印。\n\n正例:(条件)\n\nif (logger.isDebugEnabled()) { logger.debug(\"Processing trade with id: \" + id + \" and symbol: \" + symbol);\n\n}\n\n正例:(占位符)\n\nlogger.debug(\"Processing trade with id: {} and symbol : {} \", id, symbol);\n\n【强制】避免重复打印日志,浪费磁盘空间,务必在log4j.xml中设置additivity=false。\n\n正例:\n\n【强制】异常信息应该包括两类信息:案发现场信息和异常堆栈信息。如果不处理,那么通过关键字throws往上抛出。\n\n正例:logger.error(各类参数或者对象toString + \"_\" + e.getMessage(), e);\n\n【推荐】谨慎地记录日志。生产环境禁止输出debug日志;有选择地输出info日志;如果使用warn来记录刚上线时的业务行为信息,一定要注意日志输出量的问题,避免把服务器磁盘撑爆,并记得及时删除这些观察日志。\n\n说明:大量地输出无效日志,不利于系统性能提升,也不利于快速定位错误点。记录日志时请思考:这些日志真的有人看吗?看到这条日志你能做什么?能不能给问题排查带来好处?\n\n【参考】可以使用warn日志级别来记录用户输入参数错误的情况,避免用户投诉时,无所适从。注意日志输出的级别,error级别只记录系统逻辑出错、异常等重要的错误信息。如非必要,请不要在此场景打出error级别。\n三、单元测试\n【强制】好的单元测试必须遵守AIR原则。\n\n说明:单元测试在线上运行时,感觉像空气(AIR)一样并不存在,但在测试质量的保障上,却是非常关键的。好的单元测试宏观上来说,具有自动化、独立性、可重复执行的特点。\n\nl A:Automatic(自动化)\n\nl I:Independent(独立性)\n\nl R:Repeatable(可重复)\n\n【强制】单元测试应该是全自动执行的,并且非交互式的。测试框架通常是定期执行的,执行过程必须完全自动化才有意义。输出结果需要人工检查的测试不是一个好的单元测试。单元测试中不准使用System.out来进行人肉验证,必须使用assert来验证。\n\n【强制】保持单元测试的独立性。为了保证单元测试稳定可靠且便于维护,单元测试用例之间决不能互相调用,也不能依赖执行的先后次序。\n\n反例:method2需要依赖method1的执行,将执行结果做为method2的输入。\n\n【强制】单元测试是可以重复执行的,不能受到外界环境的影响。\n\n说明:单元测试通常会被放到持续集成中,每次有代码check in时单元测试都会被执行。如果单测对外部环境(网络、服务、中间件等)有依赖,容易导致持续集成机制的不可用。\n\n正例:为了不受外界环境影响,要求设计代码时就把SUT的依赖改成注入,在测试时用spring 这样的DI框架注入一个本地(内存)实现或者Mock实现。\n\n【强制】对于单元测试,要保证测试粒度足够小,有助于精确定位问题。单测粒度至多是类级别,一般是方法级别。\n\n说明:只有测试粒度小才能在出错时尽快定位到出错位置。单测不负责检查跨类或者跨系统的交互逻辑,那是集成测试的领域。\n\n【强制】核心业务、核心应用、核心模块的增量代码确保单元测试通过。\n\n说明:新增代码及时补充单元测试,如果新增代码影响了原有单元测试,请及时修正。\n\n【强制】单元测试代码必须写在如下工程目录:src/test/java,不允许写在业务代码目录下。\n\n说明:源码构建时会跳过此目录,而单元测试框架默认是扫描此目录。\n\n【推荐】单元测试的基本目标:语句覆盖率达到70%;核心模块的语句覆盖率和分支覆盖率都要达到100%\n\n说明:在工程规约的应用分层中提到的DAO层,Manager层,可重用度高的Service,都应该进行单元测试。\n\n【推荐】编写单元测试代码遵守BCDE原则,以保证被测试模块的交付质量。\n\nl B:Border,边界值测试,包括循环边界、特殊取值、特殊时间点、数据顺序等。\n\nl C:Correct,正确的输入,并得到预期的结果。\n\nl D:Design,与设计文档相结合,来编写单元测试。\n\nl E:Error,强制错误信息输入(如:非法数据、异常流程、非业务允许输入等),并得到预期的结果。\n\n【推荐】对于数据库相关的查询,更新,删除等操作,不能假设数据库里的数据是存在的,或者直接操作数据库把数据插入进去,请使用程序插入或者导入数据的方式来准备数据。\n\n反例:删除某一行数据的单元测试,在数据库中,先直接手动增加一行作为删除目标,但是这一行新增数据并不符合业务插入规则,导致测试结果异常。\n\n【推荐】和数据库相关的单元测试,可以设定自动回滚机制,不给数据库造成脏数据。或者对单元测试产生的数据有明确的前后缀标识。\n\n正例:在RDC内部单元测试中,使用RDC_UNIT_TEST_的前缀标识数据。\n\n【推荐】对于不可测的代码建议做必要的重构,使代码变得可测,避免为了达到测试要求而书写不规范测试代码。\n\n【推荐】在设计评审阶段,开发人员需要和测试人员一起确定单元测试范围,单元测试最好覆盖所有测试用例(UC)。\n\n【推荐】单元测试作为一种质量保障手段,不建议项目发布后补充单元测试用例,建议在项目提测前完成单元测试。\n\n【参考】为了更方便地进行单元测试,业务代码应避免以下情况:\n\nl 构造方法中做的事情过多。\n\nl 存在过多的全局变量和静态方法。\n\nl 存在过多的外部依赖。\n\nl 存在过多的条件语句。\n\n说明:多层条件语句建议使用卫语句、策略模式、状态模式等方式重构。\n\n【参考】不要对单元测试存在如下误解:\n\nl 那是测试同学干的事情。本文是开发手册,凡是本文内容都是与开发同学强相关的。 l 单元测试代码是多余的。汽车的整体功能与各单元部件的测试正常与否是强相关的。\n\nl 单元测试代码不需要维护。一年半载后,那么单元测试几乎处于废弃状态。\n\nl 单元测试与线上故障没有辩证关系。好的单元测试能够最大限度地规避线上故障。\n\n四、安全规约\n【强制】隶属于用户个人的页面或者功能必须进行权限控制校验。\n\n说明:防止没有做水平权限校验就可随意访问、修改、删除别人的数据,比如查看他人的私信内容、修改他人的订单。\n\n【强制】用户敏感数据禁止直接展示,必须对展示数据进行脱敏。\n\n说明:查看个人手机号码会显示成:158****9119,隐藏中间4位,防止隐私泄露。\n\n【强制】用户输入的SQL参数严格使用参数绑定或者METADATA字段值限定,防止SQL注入,禁止字符串拼接SQL访问数据库。\n\n【强制】用户请求传入的任何参数必须做有效性验证。\n\n说明:忽略参数校验可能导致:\n\nl page size过大导致内存溢出\n\nl 恶意order by导致数据库慢查询\n\nl 任意重定向\n\nl SQL注入\n\nl 反序列化注入\n\nl 正则输入源串拒绝服务ReDoS\n\n说明:Java 代码用正则来验证客户端的输入,有些正则写法验证普通用户输入没有问题,但是如果攻击人员使用的是特殊构造的字符串来验证,有可能导致死循环的结果。\n\n【强制】禁止向HTML页面输出未经安全过滤或未正确转义的用户数据。\n\n【强制】表单、AJAX提交必须执行CSRF安全过滤。\n\n说明:CSRF(Cross-site request forgery)跨站请求伪造是一类常见编程漏洞。对于存在\n\nCSRF漏洞的应用/网站,攻击者可以事先构造好URL,只要受害者用户一访问,后台便在用户不知情情况下对数据库中用户参数进行相应修改。\n\n【强制】在使用平台资源,譬如短信、邮件、电话、下单、支付,必须实现正确的防重放限制,如数量限制、疲劳度控制、验证码校验,避免被滥刷、资损。\n\n说明:如注册时发送验证码到手机,如果没有限制次数和频率,那么可以利用此功能骚扰到其它用户,并造成短信平台资源浪费。\n\n【推荐】发贴、评论、发送即时消息等用户生成内容的场景必须实现防刷、文本内容违禁词过滤等风控策略。\n五、MySQL数据库\n(一)建表规约\n【强制】表达是与否概念的字段,必须使用is_xxx的方式命名,数据类型是unsigned tinyint\n\n( 1表示是,0表示否)。\n\n说明:任何字段如果为非负数,必须是unsigned。\n\n正例:表达逻辑删除的字段名is_deleted,1 表示删除,0 表示未删除。\n\n【强制】表名、字段名必须使用小写字母或数字,禁止出现数字开头,禁止两个下划线中间只出现数字。数据库字段名的修改代价很大,因为无法进行预发布,所以字段名称需要慎重考虑。\n\n说明:MySQL 在 Windows 下不区分大小写,但在 Linux 下默认是区分大小写。因此,数据库名、表名、字段名,都不允许出现任何大写字母,避免节外生枝。\n\n正例:aliyun_admin,rdc_config,level3_name 反例:AliyunAdmin,rdcConfig,level_3_name\n\n【强制】表名不使用复数名词。\n\n说明:表名应该仅仅表示表里面的实体内容,不应该表示实体数量,对应于DO类名也是单数形式,符合表达习惯。\n\n【强制】禁用保留字,如desc、range、match、delayed等,请参考MySQL官方保留字。\n\n【强制】主键索引名为pk_字段名;唯一索引名为uk_字段名;普通索引名则为idx_字段名。\n\n说明:pk_ 即primary key;uk_ 即 unique key;idx_ 即index的简称。\n\n【强制】小数类型为decimal,禁止使用float和double。\n\n说明:float和double在存储的时候,存在精度损失的问题,很可能在值的比较时,得到不\n\n正确的结果。如果存储的数据范围超过decimal的范围,建议将数据拆成整数和小数分开存储。\n\n【强制】如果存储的字符串长度几乎相等,使用char定长字符串类型。\n\n【强制】varchar是可变长字符串,不预先分配存储空间,长度不要超过5000,如果存储长度大于此值,定义字段类型为text,独立出来一张表,用主键来对应,避免影响其它字段索引效率。\n\n【强制】表必备三字段:id, gmt_create, gmt_modified。\n\n说明:其中id必为主键,类型为unsigned bigint、单表时自增、步长为 1。gmt_create, gmt_modified的类型均为date_time类型,前者现在时表示主动创建,后者过去分词表示被动更新。\n\n【推荐】表的命名最好是加上“业务名称_表的作用”。\n\n正例:alipay_task / force_project / trade_config\n\n【推荐】库名与应用名称尽量一致。\n\n【推荐】如果修改字段含义或对字段表示的状态追加时,需要及时更新字段注释。\n\n【推荐】字段允许适当冗余,以提高查询性能,但必须考虑数据一致。冗余字段应遵循:\n\n1) 不是频繁修改的字段。\n\n2) 不是varchar超长字段,更不能是text字段。\n\n正例:商品类目名称使用频率高,字段长度短,名称基本一成不变,可在相关联的表中冗余存储类目名称,避免关联查询。\n\n【推荐】单表行数超过500万行或者单表容量超过2GB,才推荐进行分库分表。\n\n说明:如果预计三年后的数据量根本达不到这个级别,请不要在创建表时就分库分表。\n\n【参考】合适的字符存储长度,不但节约数据库表空间、节约索引存储,更重要的是提升检索速度。\n\n正例:如下表,其中无符号值可以避免误存负数,且扩大了表示范围。\n\n|\n\n对象\n\n|\n\n年龄区间\n\n|\n\n类型\n\n|\n\n字节\n\n|\n\n表示范围\n\n|\n|\n\n人\n\n|\n\n150岁之内\n\n|\n\nunsigned tinyint\n\n|\n\n1\n\n|\n\n无符号值:0到255\n\n|\n|\n\n龟\n\n|\n\n数百岁\n\n|\n\nunsigned smallint\n\n|\n\n2\n\n|\n\n无符号值:0到65535\n\n|\n|\n\n恐龙化石\n\n|\n\n数千万年\n\n|\n\nunsigned int\n\n|\n\n4\n\n|\n\n无符号值:0到约42.9亿\n\n|\n|\n\n太阳\n\n|\n\n约50亿年\n\n|\n\nunsigned bigint\n\n|\n\n8\n\n|\n\n无符号值:0到约10的19次方\n\n|\n\n(二)索引规约\n【强制】业务上具有唯一特性的字段,即使是多个字段的组合,也必须建成唯一索引。\n\n说明:不要以为唯一索引影响了insert速度,这个速度损耗可以忽略,但提高查找速度是明显的;另外,即使在应用层做了非常完善的校验控制,只要没有唯一索引,根据墨菲定律,必然有脏数据产生。\n\n【强制】超过三个表禁止join。需要join的字段,数据类型必须绝对一致;多表关联查询时,保证被关联的字段需要有索引。\n\n说明:即使双表join也要注意表索引、SQL性能。\n\n【强制】在varchar字段上建立索引时,必须指定索引长度,没必要对全字段建立索引,根据实际文本区分度决定索引长度即可。\n\n说明:索引的长度与区分度是一对矛盾体,一般对字符串类型数据,长度为20的索引,区分度会高达90%以上,可以使用count(distinct left(列名, 索引长度))/count(*)的区分度来确定。\n\n【强制】页面搜索严禁左模糊或者全模糊,如果需要请走搜索引擎来解决。\n\n说明:索引文件具有B-Tree的最左前缀匹配特性,如果左边的值未确定,那么无法使用此索引。\n\n【推荐】如果有order by的场景,请注意利用索引的有序性。order by 最后的字段是组合索引的一部分,并且放在索引组合顺序的最后,避免出现file_sort的情况,影响查询性能。\n\n正例:where a=? and b=? order by c; 索引:a_b_c\n\n反例:索引中有范围查找,那么索引有序性无法利用,如:WHERE a>10 ORDER BY b; 索引 a_b无法排序。\n\n【推荐】利用覆盖索引来进行查询操作,避免回表。\n\n说明:如果一本书需要知道第11章是什么标题,会翻开第11章对应的那一页吗?目录浏览一下就好,这个目录就是起到覆盖索引的作用。\n\n正例:能够建立索引的种类:主键索引、唯一索引、普通索引,而覆盖索引是一种查询的一种效果,用explain的结果,extra列会出现:using index。\n\n【推荐】利用延迟关联或者子查询优化超多分页场景。\n\n说明:MySQL并不是跳过offset行,而是取offset+N行,然后返回放弃前offset行,返回 N行,那当offset特别大的时候,效率就非常的低下,要么控制返回的总页数,要么对超过特定阈值的页数进行SQL改写。\n\n正例:先快速定位需要获取的id段,然后再关联:\n\nSELECT a.* FROM 表1 a, (select id from 表1 where 条件 LIMIT 100000,20 ) b where a.id=b.id\n\n【推荐】 SQL性能优化的目标:至少要达到 range 级别,要求是ref级别,如果可以是consts 最好。说明:\n\n1) consts 单表中最多只有一个匹配行(主键或者唯一索引),在优化阶段即可读取到数据。\n\n2) ref 指的是使用普通的索引(normal index)。\n\n3) range 对索引进行范围检索。\n\n反例:explain表的结果,type=index,索引物理文件全扫描,速度非常慢,这个index级别比较range还低,与全表扫描是小巫见大巫。\n\n【推荐】建组合索引的时候,区分度最高的在最左边。\n\n正例:如果where a=? and b=? ,a列的几乎接近于唯一值,那么只需要单建idx_a索引即可。\n\n说明:存在非等号和等号混合判断条件时,在建索引时,请把等号条件的列前置。如:where a>?\n\nand b=? 那么即使a的区分度更高,也必须把b放在索引的最前列。\n\n【推荐】防止因字段类型不同造成的隐式转换,导致索引失效。\n\n【参考】创建索引时避免有如下极端误解:\n\n1) 宁滥勿缺。认为一个查询就需要建一个索引。\n\n2) 宁缺勿滥。认为索引会消耗空间、严重拖慢更新和新增速度。\n\n3) 抵制惟一索引。认为业务的惟一性一律需要在应用层通过“先查后插”方式解决。\n\n(三)SQL语句\n【强制】不要使用count(列名)或count(常量)来替代count(),count()是SQL92定义的标准统计行数的语法,跟数据库无关,跟NULL和非NULL无关。\n\n说明:count(*)会统计值为NULL的行,而count(列名)不会统计此列为NULL值的行。\n\n【强制】count(distinct col) 计算该列除NULL之外的不重复行数,注意 count(distinct col1, col2) 如果其中一列全为NULL,那么即使另一列有不同的值,也返回为0。\n\n【强制】当某一列的值全是NULL时,count(col)的返回结果为0,但sum(col)的返回结果为\n\nNULL,因此使用sum()时需注意NPE问题。\n\n正例:可以使用如下方式来避免sum的NPE问题:SELECT IF(ISNULL(SUM(g)),0,SUM(g))\n\nFROM table;\n\n【强制】使用ISNULL()来判断是否为NULL值。\n\n说明:NULL与任何值的直接比较都为NULL。\n\n1) NULL<>NULL的返回结果是NULL,而不是false。\n\n2) NULL=NULL的返回结果是NULL,而不是true。\n\n3) NULL<>1的返回结果是NULL,而不是true。\n\n【强制】 在代码中写分页查询逻辑时,若count为0应直接返回,避免执行后面的分页语句。\n\n【强制】不得使用外键与级联,一切外键概念必须在应用层解决。\n\n说明:以学生和成绩的关系为例,学生表中的student_id是主键,那么成绩表中的student_id 则为外键。如果更新学生表中的student_id,同时触发成绩表中的student_id更新,即为级联更新。外键与级联更新适用于单机低并发,不适合分布式、高并发集群;级联更新是强阻塞,存在数据库更新风暴的风险;外键影响数据库的插入速度。\n\n【强制】禁止使用存储过程,存储过程难以调试和扩展,更没有移植性。\n\n【强制】数据订正时,删除和修改记录时,要先select,避免出现误删除,确认无误才能执行更新语句。\n\n【推荐】in操作能避免则避免,若实在避免不了,需要仔细评估in后边的集合元素数量,控制在1000个之内。\n\n【参考】如果有全球化需要,所有的字符存储与表示,均以utf-8编码,注意字符统计函数的区别。\n\n说明:\n\nSELECT LENGTH(\"轻松工作\"); 返回为12\n\nSELECT CHARACTER_LENGTH(\"轻松工作\"); 返回为4\n\n如果需要存储表情,那么选择utfmb4来进行存储,注意它与utf-8编码的区别。\n\n【参考】 TRUNCATE TABLE 比 DELETE 速度快,且使用的系统和事务日志资源少,但TRUNCATE 无事务且不触发trigger,有可能造成事故,故不建议在开发代码中使用此语句。\n\n说明:TRUNCATE TABLE 在功能上与不带 WHERE 子句的 DELETE 语句相同。\n\n(四)ORM映射\n【强制】在表查询中,一律不要使用 * 作为查询的字段列表,需要哪些字段必须明确写明。\n\n说明:1)增加查询分析器解析成本。2)增减字段容易与resultMap配置不一致。\n\n【强制】POJO类的布尔属性不能加is,而数据库字段必须加is_,要求在resultMap中进行字段与属性之间的映射。\n\n说明:参见定义POJO类以及数据库字段定义规定,在中增加映射,是必须的。在MyBatis Generator生成的代码中,需要进行对应的修改。\n\n【强制】不要用resultClass当返回参数,即使所有类属性名与数据库字段一一对应,也需要定义;反过来,每一个表也必然有一个与之对应。\n\n说明:配置映射关系,使字段与DO类解耦,方便维护。\n\n【强制】sql.xml配置参数使用:#{},#param# 不要使用${} 此种方式容易出现SQL注入。\n\n【强制】iBATIS自带的queryForList(String statementName,int start,int size)不推荐使用。\n\n说明:其实现方式是在数据库取到statementName对应的SQL语句的所有记录,再通过subList 取start,size的子集合。\n\n正例:Map map = new HashMap();\n\nmap.put(\"start\", start); map.put(\"size\", size);\n\n【强制】不允许直接拿HashMap与Hashtable作为查询结果集的输出。\n\n说明:resultClass=”Hashtable”,会置入字段名和属性值,但是值的类型不可控。\n\n【强制】更新数据表记录时,必须同时更新记录对应的gmt_modified字段值为当前时间。\n\n【推荐】不要写一个大而全的数据更新接口。传入为POJO类,不管是不是自己的目标更新字段,都进行update table set c1=value1,c2=value2,c3=value3; 这是不对的。执行SQL 时,不要更新无改动的字段,一是易出错;二是效率低;三是增加binlog存储。\n\n【参考】@Transactional事务不要滥用。事务会影响数据库的QPS,另外使用事务的地方需要考虑各方面的回滚方案,包括缓存回滚、搜索引擎回滚、消息补偿、统计修正等。\n\n【参考】中的compareValue是与属性值对比的常量,一般是数字,表示相等时带上此条件;表示不为空且不为null时执行;表示不为null值时执行。\n\n六、工程结构\n(一)应用分层\n【推荐】图中默认上层依赖于下层,箭头关系表示可直接依赖,如:开放接口层可以依赖于\n\nWeb层,也可以直接依赖于Service层,依此类推:\n\n[图片上传失败...(image-b8d664-1526115059992)]\n\n• 开放接口层:可直接封装Service方法暴露成RPC接口;通过Web封装成http接口;进行网关安全控制、流量控制等。\n\n• 终端显示层:各个端的模板渲染并执行显示的层。当前主要是velocity渲染,JS渲染,\n\nJSP渲染,移动端展示等。\n\n• Web层:主要是对访问控制进行转发,各类基本参数校验,或者不复用的业务简单处理等。\n\n• Service层:相对具体的业务逻辑服务层。\n\n• Manager层:通用业务处理层,它有如下特征:\n\n1) 对第三方平台封装的层,预处理返回结果及转化异常信息;\n\n2) 对Service层通用能力的下沉,如缓存方案、中间件通用处理;\n\n3) 与DAO层交互,对多个DAO的组合复用。\n\n• DAO层:数据访问层,与底层MySQL、Oracle、Hbase等进行数据交互。\n\n• 外部接口或第三方平台:包括其它部门RPC开放接口,基础平台,其它公司的HTTP接口。\n\n【参考】 (分层异常处理规约)在DAO层,产生的异常类型有很多,无法用细粒度的异常进\n\n行catch,使用catch(Exception e)方式,并throw new DAOException(e),不需要打印日志,因为日志在Manager/Service层一定需要捕获并打到日志文件中去,如果同台服务器再打日志,浪费性能和存储。在Service层出现异常时,必须记录出错日志到磁盘,尽可能带上参数信息,相当于保护案发现场。如果Manager层与Service同机部署,日志方式与DAO 层处理一致,如果是单独部署,则采用与Service一致的处理方式。Web层绝不应该继续往上抛异常,因为已经处于顶层,如果意识到这个异常将导致页面无法正常渲染,那么就应该直接跳转到友好错误页面,加上用户容易理解的错误提示信息。开放接口层要将异常处理成错误码和错误信息方式返回。\n\n【参考】分层领域模型规约:\n\n• DO(Data Object):与数据库表结构一一对应,通过DAO层向上传输数据源对象。\n\n• DTO(Data Transfer Object):数据传输对象,Service或Manager向外传输的对象。\n\n• BO(Business Object):业务对象。由Service层输出的封装业务逻辑的对象。\n\n• AO(Application Object):应用对象。在Web层与Service层之间抽象的复用对象模型,极为贴近展示层,复用度不高。\n\n• VO(View Object):显示层对象,通常是Web向模板渲染引擎层传输的对象。\n\n• Query:数据查询对象,各层接收上层的查询请求。注意超过2个参数的查询封装,禁止使用Map类来传输。\n\n(二)二方库依赖\n【强制】定义GAV遵从以下规则:\n\n1) GroupID格式:com.{公司/BU }.业务线.[子业务线],最多4级。\n\n说明:{公司/BU} 例如:alibaba/taobao/tmall/aliexpress等BU一级;子业务线可选。\n\n正例:com.taobao.jstorm 或 com.alibaba.dubbo.register\n\n2) ArtifactID格式:产品线名-模块名。语义不重复不遗漏,先到中央仓库去查证一下。\n\n正例:dubbo-client / fastjson-api / jstorm-tool\n\n3) Version:详细规定参考下方。\n\n【强制】二方库版本号命名方式:主版本号.次版本号.修订号\n\n1) 主版本号:产品方向改变,或者大规模API不兼容,或者架构不兼容升级。\n\n2) 次版本号:保持相对兼容性,增加主要功能特性,影响范围极小的API不兼容修改。\n\n3) 修订号:保持完全兼容性,修复BUG、新增次要功能特性等。\n\n说明:注意起始版本号必须为:1.0.0,而不是0.0.1 正式发布的类库必须先去中央仓库进行查证,使版本号有延续性,正式版本号不允许覆盖升级。如当前版本:1.3.3,那么下一个合理的版本号:1.3.4 或 1.4.0 或 2.0.0\n\n【强制】线上应用不要依赖SNAPSHOT版本(安全包除外)。\n\n说明:不依赖SNAPSHOT版本是保证应用发布的幂等性。另外,也可以加快编译时的打包构建。\n\n【强制】二方库的新增或升级,保持除功能点之外的其它jar包仲裁结果不变。如果有改变,\n\n必须明确评估和验证,建议进行dependency:resolve前后信息比对,如果仲裁结果完全不一致,那么通过dependency:tree命令,找出差异点,进行排除jar包。\n\n【强制】二方库里可以定义枚举类型,参数可以使用枚举类型,但是接口返回值不允许使用枚举类型或者包含枚举类型的POJO对象。\n\n【强制】依赖于一个二方库群时,必须定义一个统一的版本变量,避免版本号不一致。\n\n说明:依赖springframework-core,-context,-beans,它们都是同一个版本,可以定义一个变量来保存版本:${spring.version},定义依赖的时候,引用该版本。\n\n【强制】禁止在子项目的pom依赖中出现相同的GroupId,相同的ArtifactId,但是不同的\n\nVersion。\n\n说明:在本地调试时会使用各子项目指定的版本号,但是合并成一个war,只能有一个版本号出现在最后的lib目录中。可能出现线下调试是正确的,发布到线上却出故障的问题。\n\n【推荐】所有pom文件中的依赖声明放在语句块中,所有版本仲裁放在\n\n语句块中。\n\n说明:里只是声明版本,并不实现引入,因此子项目需要显式的声\n\n明依赖,version和scope都读取自父pom。而所有声明在主pom的\n\n里的依赖都会自动引入,并默认被所有的子项目继承。\n\n【推荐】二方库不要有配置项,最低限度不要再增加配置项。\n\n【参考】为避免应用二方库的依赖冲突问题,二方库发布者应当遵循以下原则:\n\n1) 精简可控原则。移除一切不必要的API和依赖,只包含 Service API、必要的领域模型对象、Utils类、常量、枚举等。如果依赖其它二方库,尽量是provided引入,让二方库使用者去依赖具体版本号;无log具体实现,只依赖日志框架。\n\n2) 稳定可追溯原则。每个版本的变化应该被记录,二方库由谁维护,源码在哪里,都需要能方便查到。除非用户主动升级版本,否则公共二方库的行为不应该发生变化。\n\n(三)服务器\n【推荐】高并发服务器建议调小TCP协议的time_wait超时时间。\n\n说明:操作系统默认240秒后,才会关闭处于time_wait状态的连接,在高并发访问下,服务器端会因为处于time_wait的连接数太多,可能无法建立新的连接,所以需要在服务器上调小此等待值。\n\n正例:在linux服务器上请通过变更/etc/sysctl.conf文件去修改该缺省值(秒): net.ipv4.tcp_fin_timeout = 30\n\n【推荐】调大服务器所支持的最大文件句柄数(File Descriptor,简写为fd)。\n\n说明:主流操作系统的设计是将TCP/UDP连接采用与文件一样的方式去管理,即一个连接对应于一个fd。主流的linux服务器默认所支持最大fd数量为1024,当并发连接数很大时很容易因为fd不足而出现“open too many files”错误,导致新的连接无法建立。 建议将linux 服务器所支持的最大句柄数调高数倍(与服务器的内存数量相关)。\n\n【推荐】给JVM设置-XX:+HeapDumpOnOutOfMemoryError参数,让JVM碰到OOM场景时输出 dump信息。\n\n说明:OOM的发生是有概率的,甚至有规律地相隔数月才出现一例,出现时的现场信息对查错非常有价值。\n\n【推荐】在线上生产环境,JVM的Xms和Xmx设置一样大小的内存容量,避免在GC 后调整堆大小带来的压力。\n\n【参考】服务器内部重定向使用forward;外部重定向地址使用URL拼装工具类来生成,否则会带来URL维护不一致的问题和潜在的安全风险。\n\n附1:版本历史\n\n|\n\n版本号\n\n|\n\n更新日期\n\n|\n\n备注\n\n|\n|\n\n1.0.0\n\n|\n\n2017.2.9\n\n|\n\n阿里巴巴集团正式对外发布\n\n|\n|\n\n1.0.1\n\n|\n\n2017.2.13\n\n|\n\n1)修正String[]的前后矛盾。2)vm修正成velocity。3)修正countdown描述错误。\n\n|\n|\n\n1.0.2\n\n|\n\n2017.2.20\n\n|\n\n1)去除文底水印。2)数据类型中引用太阳系年龄问题。3)修正关于异常和方法签名的部分描述。4)修正final描述。5)去除Comparator部分描述。\n\n|\n|\n\n1.1.0\n\n|\n\n2017.2.27\n\n|\n\n1)增加前言。2)增加描述和说明。3)增加版本历史。4)增加专有名词解释。\n\n|\n|\n\n1.1.1\n\n|\n\n2017.3.31\n\n|\n\n修正页码总数和部分示例。\n\n|\n|\n\n1.2.0\n\n|\n\n2017.5.20\n\n|\n\n1)根据云栖社区的“聚能聊”活动反馈,对手册的页码、排版、描述进行修正。2)增加final 的适用场景描述。3)增加关于锁的粒度的说明。4)增加“指定集合大小”的详细说明以及正反例。5)增加卫语句的示例代码。6)明确数据库表示删除概念的字段名为is_deleted\n\n|\n| | |\n\n增加单元测试规约(PDF终极版),阿里开源的IDE代码规约检测插件:点此下载https://github.com/alibaba/p3c更多及时信息,请关注《阿里巴巴Java开发手册》官方公众号:\n\n|\n|\n\n1.3.0\n\n|\n\n2017.9.25\n\n|\n\n[图片上传失败...(image-983f5b-1526115059985)]\n\n|\n\n附2:本手册专有名词\n\nPOJO(Plain Ordinary Java Object): 在本手册中,POJO专指只有setter / getter / toString的简单类,包括DO/DTO/BO/VO等。\n\nGAV(GroupId、ArtifactctId、Version): Maven坐标,是用来唯一标识jar包。\n\nOOP(Object Oriented Programming): 本手册泛指类、对象的编程处理方式。\n\nORM(Object Relation Mapping): 对象关系映射,对象领域模型与底层数据之间的转换,本文泛指iBATIS, mybatis等框架。\n\nNPE(java.lang.NullPointerException): 空指针异常。\n\nSOA(Service-Oriented Architecture): 面向服务架构,它可以根据需求通过网络对松散\n\n耦合的粗粒度应用组件进行分布式部署、组合和使用,有利于提升组件可重用性,可维护性。\n\n一方库: 本工程内部子项目模块依赖的库(jar包)。\n\n二方库: 公司内部发布到中央仓库,可供公司内部其它应用依赖的库(jar包)。\n\n三方库: 公司之外的开源库(jar包)。\n\nIDE(Integrated Development Environment): 用于提供程序开发环境的应用程序,一\n\n般包括代码编辑器、编译器、调试器和图形用户界面等工具,本《手册》泛指IntelliJ IDEA 和eclipse。\n\n法律声明\n\n本手册为阿里巴巴集团技术部的技术分享,版权归阿里巴巴集团所有,仅供大家交流、学习及研究使用,禁止用于商业用途,违者必究。\n\n| |\n| | [图片上传失败...(image-1888e5-1526115059985)]\n\n|", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "前 言 本 开 发 规 范 基 于 阿 里 巴 巴 java 开 发 手 册 终 极 版 修 改 并 集 成 我 们 自 己 的 项 目 开 发 规 范 整 合 而 成 为 表 示 对 阿 里 的 敬 意 先 放 原 版 连 接 中 文 版 阿 里 巴 巴 java 开 发 手 册 english version alibaba java coding guidelines 手 册 书 籍 版 天 猫 官 方 店 阿 里 巴 巴 java 开 发 手 册 最 新 版 阿 里 开 源 的 ide 代 码 规 约 检 测 插 件 idea 插 件 使 用 文 档 eclipse 插 件 使 用 文 档 阿 里 巴 巴 java 开 发 手 册 是 阿 里 巴 巴 集 团 技 术 团 队 的 集 体 智 慧 结 晶 和 经 验 总 结 经 历 了 多 次 大 规 模 一 线 实 战 的 检 验 及 不 断 的 完 善 系 统 化 地 整 理 成 册 反 馈 给 广 大 开 发 者 现 代 软 件 行 业 的 高 速 发 展 对 开 发 者 的 综 合 素 质 要 求 越 来 越 高 因 为 不 仅 是 编 程 知 识 点 其 它 维 度 的 知 识 点 也 会 影 响 到 软 件 的 最 终 交 付 质 量 比 如 数 据 库 的 表 结 构 和 索 引 设 计 缺 陷 可 能 带 来 软 件 上 的 架 构 缺 陷 或 性 能 风 险 工 程 结 构 混 乱 导 致 后 续 维 护 艰 难 没 有 鉴 权 的 漏 洞 代 码 易 被 黑 客 攻 击 等 等 所 以 本 手 册 以 java 开 发 者 为 中 心 视 角 划 分 为 编 程 规 约 异 常 日 志 单 元 测 试 安 全 规 约 工 程 结 构 mysql 数 据 库 六 个 维 度 再 根 据 内 容 特 征 细 分 成 若 干 二 级 子 目 录 根 据 约 束 力 强 弱 及 故 障 敏 感 性 规 约 依 次 分 为 强 制 推 荐 参 考 三 大 类 对 于 规 约 条 目 的 延 伸 信 息 中 说 明 对 内 容 做 了 适 当 扩 展 和 解 释 正 例 提 倡 什 么 样 的 编 码 和 实 现 方 式 反 例 说 明 需 要 提 防 的 雷 区 以 及 真 实 的 错 误 案 例 目 录 前 言 一 编 程 规 约 1 一 命 名 风 格 1 二 常 量 定 义 3 三 代 码 格 式 4 四 oop 规 约 6 五 集 合 处 理 9 六 并 发 处 理 12 七 控 制 语 句 14 八 注 释 规 约 16 九 其 它 17 二 异 常 日 志 18 一 异 常 处 理 18 二 日 志 规 约 19 三 单 元 测 试 21 四 安 全 规 约 23 五 mysql 数 据 库 24 一 建 表 规 约 24 二 索 引 规 约 25 三 sql 语 句 27 四 orm 映 射 28 六 工 程 结 构 30 一 应 用 分 层 30 二 二 方 库 依 赖 31 三 服 务 器 32 附 1 版 本 历 史 34 附 2 本 手 册 专 有 名 词 35 w sdt 注 浏 览 时 请 使 用 pdf 左 侧 导 航 栏 java 开 发 手 册 版 本 号 制 定 团 队 更 新 日 期 备 注 1 3 0 阿 里 巴 巴 集 团 技 术 团 队 2017 9 25 增 加 单 元 测 试 规 约 pdf 终 极 版", "source_text": "前言\n\n本开发规范基于《阿里巴巴Java开发手册终极版》修改,并集成我们自己的项目开发规范,整合而成。\n\n为表示对阿里的敬意,先放原版连接:\n\n中文版: 阿里巴巴Java开发手册\nEnglish Version: Alibaba Java Coding Guidelines\n手册书籍版天猫官方店: 阿里巴巴JAVA开发手册最新版\n阿里开源的IDE代码规约检测插件\nIDEA插件使用文档\nEclipse插件使用文档\n\n《阿里巴巴Java开发手册》是阿里巴巴集团技术团队的集体智慧结晶和经验总结,经历了多次大规模一线实战的检验及不断的完善,系统化地整理成册,反馈给广大开发者。现代软件行业的高速发展对开发者的综合素质要求越来越高,因为不仅是编程知识点,其它维度的知识点也会影响到软件的最终交付质量。比如:数据库的表结构和索引设计缺陷可能带来软件上的架构缺陷或性能风险;工程结构混乱导致后续维护艰难;没有鉴权的漏洞代码易被黑客攻击等等。所以本手册以Java开发者为中心视角,划分为编程规约、异常日志、单元测试、安全规约、工程结构、MySQL数据库六个维度,再根据内容特征,细分成若干二级子目录。根据约束力强弱及故障敏感性,规约依次分为强制、推荐、参考三大类。对于规约条目的延伸信息中,“说明”对内容做了适当扩展和解释;“正例”提倡什么样的编码和实现方式;“反例”说明需要提防的雷区,以及真实的错误案例。\n\n目录\n\n前言\n一、编程规约..................................................... 1\n\n(一) 命名风格.................................................... 1\n\n(二) 常量定义.................................................... 3\n\n(三) 代码格式.................................................... 4\n\n(四) OOP规约.................................................... 6\n\n(五) 集合处理.................................................... 9\n\n(六) 并发处理................................................... 12\n\n(七) 控制语句................................................... 14\n\n(八) 注释规约................................................... 16\n\n(九) 其它....................................................... 17\n\n二、异常日志.................................................... 18\n\n(一) 异常处理................................................... 18\n\n(二) 日志规约................................................... 19\n\n三、单元测试.................................................... 21\n\n四、安全规约.................................................... 23\n\n五、MySQL数据库.............................................. 24\n\n(一) 建表规约................................................... 24\n\n(二) 索引规约................................................... 25\n\n(三) SQL语句................................................... 27\n\n(四) ORM映射.................................................. 28\n\n六、工程结构.................................................... 30\n\n(一) 应用分层................................................... 30\n\n(二) 二方库依赖................................................. 31\n\n(三) 服务器..................................................... 32\n\n附1:版本历史.................................................. 34\n\n附2:本手册专有名词............................................ 35\n\n(注:浏览时请使用PDF左侧导航栏)\n\nJava开发手册\n\n|\n\n版本号\n\n|\n\n制定团队\n\n|\n\n更新日期\n\n|\n\n备注\n\n|\n|\n\n1.3.0\n\n|\n\n阿里巴巴集团技术团队\n\n|\n\n2017.9.25\n\n|\n\n增加单元测试规约(PDF终极版)\n\n|", "segmentation_method": "reviewed_source_semantics", "label": "前言 — 前言", "source_line_range": [ 1, 109 ] }, { "id": "body-region-2", "text": "一 编 程 规 约 一 命 名 风 格 强 制 代 码 中 的 命 名 均 不 能 以 下 划 线 或 美 元 符 号 开 始 也 不 能 以 下 划 线 或 美 元 符 号 结 束 反 例 name name object name name object o b j e c t 强 制 代 码 中 的 命 名 严 禁 使 用 拼 音 与 英 文 混 合 的 方 式 更 不 允 许 直 接 使 用 中 文 的 方 式 说 明 正 确 的 英 文 拼 写 和 语 法 可 以 让 阅 读 者 易 于 理 解 避 免 歧 义 注 意 即 使 纯 拼 音 命 名 方 式 也 要 避 免 采 用 正 例 alibaba taobao youku hangzhou 等 国 际 通 用 的 名 称 可 视 同 英 文 反 例 dazhepromotion 打 折 getpingfenbyname 评 分 int 某 变 量 3 强 制 类 名 使 用 uppercamelcase 风 格 必 须 遵 从 驼 峰 形 式 但 以 下 情 形 例 外 do bo dto vo ao 正 例 marcopolo userdo xmlservice tcpudpdeal tapromotion 反 例 macropolo userdo xmlservice tcpudpdeal tapromotion 强 制 方 法 名 参 数 名 成 员 变 量 局 部 变 量 都 统 一 使 用 lowercamelcase 风 格 必 须 遵 从 驼 峰 形 式 正 例 localvalue gethttpmessage inputuserid 强 制 常 量 命 名 全 部 大 写 单 词 间 用 下 划 线 隔 开 力 求 语 义 表 达 完 整 清 楚 不 要 嫌 名 字 长 正 例 max stock count 反 例 max count 强 制 抽 象 类 命 名 使 用 abstract 或 base 开 头 异 常 类 命 名 使 用 exception 结 尾 测 试 类 命 名 以 它 要 测 试 的 类 的 名 称 开 始 以 test 结 尾 强 制 中 括 号 是 数 组 类 型 的 一 部 分 数 组 定 义 如 下 string args 反 例 使 用 string args 的 方 式 来 定 义 强 制 pojo 类 中 布 尔 类 型 的 变 量 都 不 要 加 is 否 则 部 分 框 架 解 析 会 引 起 序 列 化 错 误 反 例 定 义 为 基 本 数 据 类 型 boolean isdeleted 的 属 性 它 的 方 法 也 是 isdeleted rpc 框 架 在 反 向 解 析 的 时 候 以 为 对 应 的 属 性 名 称 是 deleted 导 致 属 性 获 取 不 到 进 而 抛 出 异 常 强 制 包 名 统 一 使 用 小 写 点 分 隔 符 之 间 有 且 仅 有 一 个 自 然 语 义 的 英 语 单 词 包 名 统 一 使 用 单 数 形 式 但 是 类 名 如 果 有 复 数 含 义 类 名 可 以 使 用 复 数 形 式 正 例 应 用 工 具 类 包 名 为 com alibaba open util 类 名 为 messageutils 此 规 则 参 考 spring 的 框 架 结 构 强 制 杜 绝 完 全 不 规 范 的 缩 写 避 免 望 文 不 知 义 反 例 abstractclass 缩 写 命 名 成 absclass condition 缩 写 命 名 成 condi 此 类 随 意 缩 写 严 重 降 低 了 代 码 的 可 阅 读 性 推 荐 为 了 达 到 代 码 自 解 释 的 目 标 任 何 自 定 义 编 程 元 素 在 命 名 时 使 用 尽 量 完 整 的 单 词 组 合 来 表 达 其 意 正 例 从 远 程 仓 库 拉 取 代 码 的 类 命 名 为 pullcodefromremoterepository 反 例 变 量 int a 的 随 意 命 名 方 式 推 荐 如 果 模 块 接 口 类 方 法 使 用 了 设 计 模 式 在 命 名 时 体 现 出 具 体 模 式 说 明 将 设 计 模 式 体 现 在 名 字 中 有 利 于 阅 读 者 快 速 理 解 架 构 设 计 理 念 正 例 public class orderfactory public class loginproxy public class resourceobserver 推 荐 接 口 类 中 的 方 法 和 属 性 不 要 加 任 何 修 饰 符 号 public 也 不 要 加 保 持 代 码 的 简 洁 性 并 加 上 有 效 的 javadoc 注 释 尽 量 不 要 在 接 口 里 定 义 变 量 如 果 一 定 要 定 义 变 量 肯 定 是 与 接 口 方 法 相 关 并 且 是 整 个 应 用 的 基 础 常 量 正 例 接 口 方 法 签 名 void f 接 口 基 础 常 量 表 示 string company alibaba 反 例 接 口 方 法 定 义 public abstract void f 说 明 jdk8 中 接 口 允 许 有 默 认 实 现 那 么 这 个 default 方 法 是 对 所 有 实 现 类 都 有 价 值 的 默 认 实 现 接 口 和 实 现 类 的 命 名 有 两 套 规 则 1 强 制 对 于 service 和 dao 类 基 于 soa 的 理 念 暴 露 出 来 的 服 务 一 定 是 接 口 内 部 的 实 现 类 用 impl 的 后 缀 与 接 口 区 别 正 例 cacheserviceimpl 实 现 cacheservice 接 口 2 推 荐 如 果 是 形 容 能 力 的 接 口 名 称 取 对 应 的 形 容 词 做 接 口 名 通 常 是 able 的 形 式 正 例 abstracttranslator 实 现 translatable 参 考 枚 举 类 名 建 议 带 上 enum 后 缀 枚 举 成 员 名 称 需 要 全 大 写 单 词 间 用 下 划 线 隔 开 说 明 枚 举 其 实 就 是 特 殊 的 常 量 类 且 构 造 方 法 被 默 认 强 制 是 私 有 正 例 枚 举 名 字 为 processstatusenum 的 成 员 名 称 success unkown reason 参 考 各 层 命 名 规 约 a service dao 层 方 法 命 名 规 约 1 获 取 单 个 对 象 的 方 法 用 get 做 前 缀 2 获 取 多 个 对 象 的 方 法 用 list 做 前 缀 3 获 取 统 计 值 的 方 法 用 count 做 前 缀 4 插 入 的 方 法 用 save insert 做 前 缀 5 删 除 的 方 法 用 remove delete 做 前 缀 6 修 改 的 方 法 用 update 做 前 缀 b 领 域 模 型 命 名 规 约 1 数 据 对 象 xxxdo xxx 即 为 数 据 表 名 2 数 据 传 输 对 象 xxxdto xxx 为 业 务 领 域 相 关 的 名 称 3 展 示 对 象 xxxvo xxx 一 般 为 网 页 名 称 4 pojo 是 do dto bo vo 的 统 称 禁 止 命 名 成 xxxpojo 二 常 量 定 义 强 制 不 允 许 任 何 魔 法 值 即 未 经 定 义 的 常 量 直 接 出 现 在 代 码 中 反 例 string key id taobao tradeid cache put key value 强 制 long 或 者 long 初 始 赋 值 时 使 用 大 写 的 l 不 能 是 小 写 的 l 小 写 容 易 跟 数 字 1 混 淆 造 成 误 解 说 明 long a 2l 写 的 是 数 字 的 21 还 是 long 型 的 2 推 荐 不 要 使 用 一 个 常 量 类 维 护 所 有 常 量 按 常 量 功 能 进 行 归 类 分 开 维 护 说 明 大 而 全 的 常 量 类 非 得 使 用 查 找 功 能 才 能 定 位 到 修 改 的 常 量 不 利 于 理 解 和 维 护 正 例 缓 存 相 关 常 量 放 在 类 cacheconsts 下 系 统 配 置 相 关 常 量 放 在 类 configconsts 下 推 荐 常 量 的 复 用 层 次 有 五 层 跨 应 用 共 享 常 量 应 用 内 共 享 常 量 子 工 程 内 共 享 常 量 包 内 共 享 常 量 类 内 共 享 常 量 1 跨 应 用 共 享 常 量 放 置 在 二 方 库 中 通 常 是 client jar 中 的 constant 目 录 下 2 应 用 内 共 享 常 量 放 置 在 一 方 库 中 通 常 是 modules 中 的 constant 目 录 下 反 例 易 懂 变 量 也 要 统 一 定 义 成 应 用 内 共 享 常 量 两 位 攻 城 师 在 两 个 类 中 分 别 定 义 了 表 示 是 的 变 量 类 a 中 public static final string yes yes 类 b 中 public static final string yes y a yes equals b yes 预 期 是 true 但 实 际 返 回 为 false 导 致 线 上 问 题 3 子 工 程 内 部 共 享 常 量 即 在 当 前 子 工 程 的 constant 目 录 下 4 包 内 共 享 常 量 即 在 当 前 包 下 单 独 的 constant 目 录 下 5 类 内 共 享 常 量 直 接 在 类 内 部 private static final 定 义 推 荐 如 果 变 量 值 仅 在 一 个 范 围 内 变 化 且 带 有 名 称 之 外 的 延 伸 属 性 定 义 为 枚 举 类 下 面 正 例 中 的 数 字 就 是 延 伸 信 息 表 示 星 期 几 正 例 public enum monday 1 tuesday 2 wednesday 3 thursday 4 friday 5 saturday 6 sunday 7 三 代 码 格 式 强 制 大 括 号 的 使 用 约 定 如 果 是 大 括 号 内 为 空 则 简 洁 地 写 成 即 可 不 需 要 换 行 如 果 是 非 空 代 码 块 则 1 左 大 括 号 前 不 换 行 2 左 大 括 号 后 换 行 3 右 大 括 号 前 换 行 4 右 大 括 号 后 还 有 else 等 代 码 则 不 换 行 表 示 终 止 的 右 大 括 号 后 必 须 换 行 强 制 左 小 括 号 和 字 符 之 间 不 出 现 空 格 同 样 右 小 括 号 和 字 符 之 间 也 不 出 现 空 格 详 见 第 5 条 下 方 正 例 提 示 空 格 a b 空 格 反 例 if 强 制 if for while switch do 等 保 留 字 与 括 号 之 间 都 必 须 加 空 格 强 制 任 何 二 目 三 目 运 算 符 的 左 右 两 边 都 需 要 加 一 个 空 格 说 明 运 算 符 包 括 赋 值 运 算 符 逻 辑 运 算 符 加 减 乘 除 符 号 等 强 制 采 用 4 个 空 格 缩 进 禁 止 使 用 tab 字 符 图 片 上 传 失 败 image faf96d 1526115059995 说 明 如 果 使 用 tab 缩 进 必 须 设 置 1 个 tab 为 4 个 空 格 idea 设 置 tab 为 4 个 空 格 时 请 勿 勾 选 use tab character 而 在 eclipse 中 必 须 勾 选 insert spaces for tabs 正 例 涉 及 1 5 点 public static void main string args 缩 进 4 个 空 格 string say hello 运 算 符 的 左 右 必 须 有 一 个 空 格 int flag 0 关 键 词 if 与 括 号 之 间 必 须 有 一 个 空 格 括 号 内 的 f 与 左 括 号 0 与 右 括 号 不 需 要 空 格 if flag 0 system out println say 左 大 括 号 前 加 空 格 且 不 换 行 左 大 括 号 后 换 行 if flag 1 system out println world 右 大 括 号 前 换 行 右 大 括 号 后 有 else 不 用 换 行 else system out println ok 在 右 大 括 号 后 直 接 结 束 则 必 须 换 行 强 制 注 释 的 双 斜 线 与 注 释 内 容 之 间 有 且 仅 有 一 个 空 格 正 例 注 释 内 容 注 意 在 和 注 释 内 容 之 间 有 一 个 空 格 强 制 单 行 字 符 数 限 制 不 超 过 120 个 超 出 需 要 换 行 换 行 时 遵 循 如 下 原 则 1 第 二 行 相 对 第 一 行 缩 进 4 个 空 格 从 第 三 行 开 始 不 再 继 续 缩 进 参 考 示 例 2 运 算 符 与 下 文 一 起 换 行 3 方 法 调 用 的 点 符 号 与 下 文 一 起 换 行 4 方 法 调 用 时 多 个 参 数 需 要 换 行 时 在 逗 号 后 进 行 5 在 括 号 前 不 要 换 行 见 反 例 正 例 stringbuffer sb new stringbuffer 超 过 120 个 字 符 的 情 况 下 换 行 缩 进 4 个 空 格 点 号 和 方 法 名 称 一 起 换 行 sb append zi append xin append huang append huang append huang 反 例 stringbuffer sb new stringbuffer 超 过 120 个 字 符 的 情 况 下 不 要 在 括 号 前 换 行 sb append zi append xin append huang 参 数 很 多 的 方 法 调 用 可 能 超 过 120 个 字 符 不 要 在 逗 号 前 换 行 method args1 args2 args3 argsx 强 制 方 法 参 数 在 定 义 和 传 入 时 多 个 参 数 逗 号 后 边 必 须 加 空 格 正 例 下 例 中 实 参 的 a 后 边 必 须 要 有 一 个 空 格 method a b c 强 制 ide 的 text file encoding 设 置 为 utf 8 ide 中 文 件 的 换 行 符 使 用 unix 格 式 不 要 使 用 windows 格 式 推 荐 没 有 必 要 增 加 若 干 空 格 来 使 某 一 行 的 字 符 与 上 一 行 对 应 位 置 的 字 符 对 齐 正 例 int a 3 long b 4l float c 5f stringbuffer sb new stringbuffer 说 明 增 加 sb 这 个 变 量 如 果 需 要 对 齐 则 给 a b c 都 要 增 加 几 个 空 格 在 变 量 比 较 多 的 情 况 下 是 一 种 累 赘 的 事 情 推 荐 方 法 体 内 的 执 行 语 句 组 变 量 的 定 义 语 句 组 不 同 的 业 务 逻 辑 之 间 或 者 不 同 的 语 义 之 间 插 入 一 个 空 行 相 同 业 务 逻 辑 和 语 义 之 间 不 需 要 插 入 空 行 说 明 没 有 必 要 插 入 多 个 空 行 进 行 隔 开 四 oop 规 约 强 制 避 免 通 过 一 个 类 的 对 象 引 用 访 问 此 类 的 静 态 变 量 或 静 态 方 法 无 谓 增 加 编 译 器 解 析 成 本 直 接 用 类 名 来 访 问 即 可 强 制 所 有 的 覆 写 方 法 必 须 加 override 注 解 说 明 getobject 与 get0bject 的 问 题 一 个 是 字 母 的 o 一 个 是 数 字 的 0 加 override 可 以 准 确 判 断 是 否 覆 盖 成 功 另 外 如 果 在 抽 象 类 中 对 方 法 签 名 进 行 修 改 其 实 现 类 会 马 上 编 译 报 错 强 制 相 同 参 数 类 型 相 同 业 务 含 义 才 可 以 使 用 java 的 可 变 参 数 避 免 使 用 object 说 明 可 变 参 数 必 须 放 置 在 参 数 列 表 的 最 后 提 倡 同 学 们 尽 量 不 用 可 变 参 数 编 程 正 例 public user getusers string type integer ids 强 制 外 部 正 在 调 用 或 者 二 方 库 依 赖 的 接 口 不 允 许 修 改 方 法 签 名 避 免 对 接 口 调 用 方 产 生 影 响 接 口 过 时 必 须 加 deprecated 注 解 并 清 晰 地 说 明 采 用 的 新 接 口 或 者 新 服 务 是 什 么 强 制 不 能 使 用 过 时 的 类 或 方 法 说 明 java net urldecoder 中 的 方 法 decode string encodestr 这 个 方 法 已 经 过 时 应 该 使 用 双 参 数 decode string source string encode 接 口 提 供 方 既 然 明 确 是 过 时 接 口 那 么 有 义 务 同 时 提 供 新 的 接 口 作 为 调 用 方 来 说 有 义 务 去 考 证 过 时 方 法 的 新 实 现 是 什 么 强 制 object 的 equals 方 法 容 易 抛 空 指 针 异 常 应 使 用 常 量 或 确 定 有 值 的 对 象 来 调 用 equals 正 例 test equals object 反 例 object equals test 说 明 推 荐 使 用 java util objects equals jdk7 引 入 的 工 具 类 强 制 所 有 的 相 同 类 型 的 包 装 类 对 象 之 间 值 的 比 较 全 部 使 用 equals 方 法 比 较 说 明 对 于 integer var 在 128 至 127 范 围 内 的 赋 值 integer 对 象 是 在 integercache cache 产 生 会 复 用 已 有 对 象 这 个 区 间 内 的 integer 值 可 以 直 接 使 用 进 行 判 断 但 是 这 个 区 间 之 外 的 所 有 数 据 都 会 在 堆 上 产 生 并 不 会 复 用 已 有 对 象 这 是 一 个 大 坑 推 荐 使 用 equals 方 法 进 行 判 断 关 于 基 本 数 据 类 型 与 包 装 数 据 类 型 的 使 用 标 准 如 下 1 强 制 所 有 的 pojo 类 属 性 必 须 使 用 包 装 数 据 类 型 2 强 制 rpc 方 法 的 返 回 值 和 参 数 必 须 使 用 包 装 数 据 类 型 3 推 荐 所 有 的 局 部 变 量 使 用 基 本 数 据 类 型 说 明 pojo 类 属 性 没 有 初 值 是 提 醒 使 用 者 在 需 要 使 用 时 必 须 自 己 显 式 地 进 行 赋 值 任 何 npe 问 题 或 者 入 库 检 查 都 由 使 用 者 来 保 证 正 例 数 据 库 的 查 询 结 果 可 能 是 null 因 为 自 动 拆 箱 用 基 本 数 据 类 型 接 收 有 npe 风 险 反 例 比 如 显 示 成 交 总 额 涨 跌 情 况 即 正 负 x x 为 基 本 数 据 类 型 调 用 的 rpc 服 务 调 用 不 成 功 时 返 回 的 是 默 认 值 页 面 显 示 为 0 这 是 不 合 理 的 应 该 显 示 成 中 划 线 所 以 包 装 数 据 类 型 的 null 值 能 够 表 示 额 外 的 信 息 如 远 程 调 用 失 败 异 常 退 出 强 制 定 义 do dto vo 等 pojo 类 时 不 要 设 定 任 何 属 性 默 认 值 反 例 pojo 类 的 gmtcreate 默 认 值 为 new date 但 是 这 个 属 性 在 数 据 提 取 时 并 没 有 置 入 具 体 值 在 更 新 其 它 字 段 时 又 附 带 更 新 了 此 字 段 导 致 创 建 时 间 被 修 改 成 当 前 时 间 强 制 序 列 化 类 新 增 属 性 时 请 不 要 修 改 serialversionuid 字 段 避 免 反 序 列 失 败 如 果 完 全 不 兼 容 升 级 避 免 反 序 列 化 混 乱 那 么 请 修 改 serialversionuid 值 说 明 注 意 serialversionuid 不 一 致 会 抛 出 序 列 化 运 行 时 异 常 强 制 构 造 方 法 里 面 禁 止 加 入 任 何 业 务 逻 辑 如 果 有 初 始 化 逻 辑 请 放 在 init 方 法 中 强 制 pojo 类 必 须 写 tostring 方 法 使 用 ide 的 中 工 具 source generate tostring 时 如 果 继 承 了 另 一 个 pojo 类 注 意 在 前 面 加 一 下 super tostring 说 明 在 方 法 执 行 抛 出 异 常 时 可 以 直 接 调 用 pojo 的 tostring 方 法 打 印 其 属 性 值 便 于 排 查 问 题 推 荐 使 用 索 引 访 问 用 string 的 split 方 法 得 到 的 数 组 时 需 做 最 后 一 个 分 隔 符 后 有 无 内 容 的 检 查 否 则 会 有 抛 indexoutofboundsexception 的 风 险 说 明 string str a b c string ary str split 预 期 大 于 3 结 果 是 3 system out println ary length 推 荐 当 一 个 类 有 多 个 构 造 方 法 或 者 多 个 同 名 方 法 这 些 方 法 应 该 按 顺 序 放 置 在 一 起 便 于 阅 读 此 条 规 则 优 先 于 第 15 条 规 则 推 荐 类 内 方 法 定 义 顺 序 依 次 是 公 有 方 法 或 保 护 方 法 私 有 方 法 getter setter 方 法 说 明 公 有 方 法 是 类 的 调 用 者 和 维 护 者 最 关 心 的 方 法 首 屏 展 示 最 好 保 护 方 法 虽 然 只 是 子 类 关 心 也 可 能 是 模 板 设 计 模 式 下 的 核 心 方 法 而 私 有 方 法 外 部 一 般 不 需 要 特 别 关 心 是 一 个 黑 盒 实 现 因 为 承 载 的 信 息 价 值 较 低 所 有 service 和 dao 的 getter setter 方 法 放 在 类 体 最 后 推 荐 setter 方 法 中 参 数 名 称 与 类 成 员 变 量 名 称 一 致 this 成 员 名 参 数 名 在 getter setter 方 法 中 不 要 增 加 业 务 逻 辑 增 加 排 查 问 题 的 难 度 反 例 public integer getdata if true return this data 100 else return this data 100 推 荐 循 环 体 内 字 符 串 的 连 接 方 式 使 用 stringbuilder 的 append 方 法 进 行 扩 展 说 明 反 编 译 出 的 字 节 码 文 件 显 示 每 次 循 环 都 会 new 出 一 个 stringbuilder 对 象 然 后 进 行 append 操 作 最 后 通 过 tostring 方 法 返 回 string 对 象 造 成 内 存 资 源 浪 费 反 例 string str start for int i 0 i 100 i str str hello 推 荐 final 可 以 声 明 类 成 员 变 量 方 法 以 及 本 地 变 量 下 列 情 况 使 用 final 关 键 字 1 不 允 许 被 继 承 的 类 如 string 类 2 不 允 许 修 改 引 用 的 域 对 象 如 pojo 类 的 域 变 量 3 不 允 许 被 重 写 的 方 法 如 pojo 类 的 setter 方 法 4 不 允 许 运 行 过 程 中 重 新 赋 值 的 局 部 变 量 5 避 免 上 下 文 重 复 使 用 一 个 变 量 使 用 final 描 述 可 以 强 制 重 新 定 义 一 个 变 量 方 便 更 好 地 进 行 重 构 推 荐 慎 用 object 的 clone 方 法 来 拷 贝 对 象 说 明 对 象 的 clone 方 法 默 认 是 浅 拷 贝 若 想 实 现 深 拷 贝 需 要 重 写 clone 方 法 实 现 属 性 对 象 的 拷 贝 推 荐 类 成 员 与 方 法 访 问 控 制 从 严 1 如 果 不 允 许 外 部 直 接 通 过 new 来 创 建 对 象 那 么 构 造 方 法 必 须 是 private 2 工 具 类 不 允 许 有 public 或 default 构 造 方 法 3 类 非 static 成 员 变 量 并 且 与 子 类 共 享 必 须 是 protected 4 类 非 static 成 员 变 量 并 且 仅 在 本 类 使 用 必 须 是 private 5 类 static 成 员 变 量 如 果 仅 在 本 类 使 用 必 须 是 private 6 若 是 static 成 员 变 量 必 须 考 虑 是 否 为 final 7 类 成 员 方 法 只 供 类 内 部 调 用 必 须 是 private 8 类 成 员 方 法 只 对 继 承 类 公 开 那 么 限 制 为 protected 说 明 任 何 类 方 法 参 数 变 量 严 控 访 问 范 围 过 于 宽 泛 的 访 问 范 围 不 利 于 模 块 解 耦 思 考 如 果 是 一 个 private 的 方 法 想 删 除 就 删 除 可 是 一 个 public 的 service 方 法 或 者 一 个 public 的 成 员 变 量 删 除 一 下 不 得 手 心 冒 点 汗 吗 变 量 像 自 己 的 小 孩 尽 量 在 自 己 的 视 线 内 变 量 作 用 域 太 大 无 限 制 的 到 处 跑 那 么 你 会 担 心 的 五 集 合 处 理 强 制 关 于 hashcode 和 equals 的 处 理 遵 循 如 下 规 则 1 只 要 重 写 equals 就 必 须 重 写 hashcode 2 因 为 set 存 储 的 是 不 重 复 的 对 象 依 据 hashcode 和 equals 进 行 判 断 所 以 set 存 储 的 对 象 必 须 重 写 这 两 个 方 法 3 如 果 自 定 义 对 象 做 为 map 的 键 那 么 必 须 重 写 hashcode 和 equals 说 明 string 重 写 了 hashcode 和 equals 方 法 所 以 我 们 可 以 非 常 愉 快 地 使 用 string 对 象 作 为 key 来 使 用 强 制 arraylist 的 sublist 结 果 不 可 强 转 成 arraylist 否 则 会 抛 出 classcastexception 异 常 即 java util randomaccesssublist cannot be cast to java util arraylist 说 明 sublist 返 回 的 是 arraylist 的 内 部 类 sublist 并 不 是 arraylist 而 是 arraylist 的 一 个 视 图 对 于 sublist 子 列 表 的 所 有 操 作 最 终 会 反 映 到 原 列 表 上 强 制 在 sublist 场 景 中 高 度 注 意 对 原 集 合 元 素 个 数 的 修 改 会 导 致 子 列 表 的 遍 历 增 加 删 除 均 会 产 生 concurrentmodificationexception 异 常 强 制 使 用 集 合 转 数 组 的 方 法 必 须 使 用 集 合 的 toarray t array 传 入 的 是 类 型 完 全 一 样 的 数 组 大 小 就 是 list size 说 明 使 用 toarray 带 参 方 法 入 参 分 配 的 数 组 空 间 不 够 大 时 toarray 方 法 内 部 将 重 新 分 配 内 存 空 间 并 返 回 新 数 组 地 址 如 果 数 组 元 素 大 于 实 际 所 需 下 标 为 list size 的 数 组 元 素 将 被 置 为 null 其 它 数 组 元 素 保 持 原 值 因 此 最 好 将 方 法 入 参 数 组 大 小 定 义 与 集 合 元 素 个 数 一 致 正 例 list string list new arraylist string 2 list add guan list add bao string array new string list size array list toarray array 反 例 直 接 使 用 toarray 无 参 方 法 存 在 问 题 此 方 法 返 回 值 只 能 是 object 类 若 强 转 其 它 类 型 数 组 将 出 现 classcastexception 错 误 强 制 使 用 工 具 类 arrays aslist 把 数 组 转 换 成 集 合 时 不 能 使 用 其 修 改 集 合 相 关 的 方 法 它 的 add remove clear 方 法 会 抛 出 unsupportedoperationexception 异 常 说 明 aslist 的 返 回 对 象 是 一 个 arrays 内 部 类 并 没 有 实 现 集 合 的 修 改 方 法 arrays aslist 体 现 的 是 适 配 器 模 式 只 是 转 换 接 口 后 台 的 数 据 仍 是 数 组 string str new string you wu list list arrays aslist str 第 一 种 情 况 list add yangguanbao 运 行 时 异 常 第 二 种 情 况 str 0 gujin 那 么 list get 0 也 会 随 之 修 改 强 制 泛 型 通 配 符 extends t 来 接 收 返 回 的 数 据 此 写 法 的 泛 型 集 合 不 能 使 用 add 方 法 而 super t 不 能 使 用 get 方 法 做 为 接 口 调 用 赋 值 时 易 出 错 说 明 扩 展 说 一 下 pecs producer extends consumer super 原 则 第 一 频 繁 往 外 读 取 内 容 的 适 合 用 extends t 第 二 经 常 往 里 插 入 的 适 合 用 super t 强 制 不 要 在 foreach 循 环 里 进 行 元 素 的 remove add 操 作 remove 元 素 请 使 用 iterator 方 式 如 果 并 发 操 作 需 要 对 iterator 对 象 加 锁 正 例 iterator string iterator list iterator while iterator hasnext string item iterator next if 删 除 元 素 的 条 件 iterator remove 反 例 list string list new arraylist string list add 1 list add 2 for string item list if 1 equals item list remove item 说 明 以 上 代 码 的 执 行 结 果 肯 定 会 出 乎 大 家 的 意 料 那 么 试 一 下 把 1 换 成 2 会 是 同 样 的 结 果 吗 强 制 在 jdk7 版 本 及 以 上 comparator 要 满 足 如 下 三 个 条 件 不 然 arrays sort collections sort 会 报 illegalargumentexception 异 常 说 明 三 个 条 件 如 下 1 x y 的 比 较 结 果 和 y x 的 比 较 结 果 相 反 2 x y y z 则 x z 3 x y 则 x z 比 较 结 果 和 y z 比 较 结 果 相 同 反 例 下 例 中 没 有 处 理 相 等 的 情 况 实 际 使 用 中 可 能 会 出 现 异 常 new comparator student override public int compare student o1 student o2 return o1 getid o2 getid 1 1 推 荐 集 合 初 始 化 时 指 定 集 合 初 始 值 大 小 说 明 hashmap 使 用 hashmap int initialcapacity 初 始 化 正 例 initialcapacity 需 要 存 储 的 元 素 个 数 负 载 因 子 1 注 意 负 载 因 子 即 loader factor 默 认 为 0 75 如 果 暂 时 无 法 确 定 初 始 值 大 小 请 设 置 为 16 即 默 认 值 反 例 hashmap 需 要 放 置 1024 个 元 素 由 于 没 有 设 置 容 量 初 始 大 小 随 着 元 素 不 断 增 加 容 量 7 次 被 迫 扩 大 resize 需 要 重 建 hash 表 严 重 影 响 性 能 推 荐 使 用 entryset 遍 历 map 类 集 合 kv 而 不 是 keyset 方 式 进 行 遍 历 说 明 keyset 其 实 是 遍 历 了 2 次 一 次 是 转 为 iterator 对 象 另 一 次 是 从 hashmap 中 取 出 key 所 对 应 的 value 而 entryset 只 是 遍 历 了 一 次 就 把 key 和 value 都 放 到 了 entry 中 效 率 更 高 如 果 是 jdk8 使 用 map foreach 方 法 正 例 values 返 回 的 是 v 值 集 合 是 一 个 list 集 合 对 象 keyset 返 回 的 是 k 值 集 合 是 一 个 set 集 合 对 象 entryset 返 回 的 是 k v 值 组 合 集 合 推 荐 高 度 注 意 map 类 集 合 k v 能 不 能 存 储 null 值 的 情 况 如 下 表 格 集 合 类 key value super 说 明 hashtable 不 允 许 为 null 不 允 许 为 null dictionary 线 程 安 全 concurrenthashmap 不 允 许 为 null 不 允 许 为 null abstractmap 锁 分 段 技 术 jdk8 cas treemap 不 允 许 为 null 允 许 为 null abstractmap 线 程 不 安 全 hashmap 允 许 为 null 允 许 为 null abstractmap 线 程 不 安 全 反 例 由 于 hashmap 的 干 扰 很 多 人 认 为 concurrenthashmap 是 可 以 置 入 null 值 而 事 实 上 存 储 null 值 时 会 抛 出 npe 异 常 参 考 合 理 利 用 好 集 合 的 有 序 性 sort 和 稳 定 性 order 避 免 集 合 的 无 序 性 unsort 和 不 稳 定 性 unorder 带 来 的 负 面 影 响 说 明 有 序 性 是 指 遍 历 的 结 果 是 按 某 种 比 较 规 则 依 次 排 列 的 稳 定 性 指 集 合 每 次 遍 历 的 元 素 次 序 是 一 定 的 如 arraylist 是 order unsort hashmap 是 unorder unsort treeset 是 order sort 参 考 利 用 set 元 素 唯 一 的 特 性 可 以 快 速 对 一 个 集 合 进 行 去 重 操 作 避 免 使 用 list 的 contains 方 法 进 行 遍 历 对 比 去 重 操 作 六 并 发 处 理 强 制 获 取 单 例 对 象 需 要 保 证 线 程 安 全 其 中 的 方 法 也 要 保 证 线 程 安 全 说 明 资 源 驱 动 类 工 具 类 单 例 工 厂 类 都 需 要 注 意 强 制 创 建 线 程 或 线 程 池 时 请 指 定 有 意 义 的 线 程 名 称 方 便 出 错 时 回 溯 正 例 public class timertaskthread extends thread public timertaskthread super setname timertaskthread 强 制 线 程 资 源 必 须 通 过 线 程 池 提 供 不 允 许 在 应 用 中 自 行 显 式 创 建 线 程 说 明 使 用 线 程 池 的 好 处 是 减 少 在 创 建 和 销 毁 线 程 上 所 花 的 时 间 以 及 系 统 资 源 的 开 销 解 决 资 源 不 足 的 问 题 如 果 不 使 用 线 程 池 有 可 能 造 成 系 统 创 建 大 量 同 类 线 程 而 导 致 消 耗 完 内 存 或 者 过 度 切 换 的 问 题 强 制 线 程 池 不 允 许 使 用 executors 去 创 建 而 是 通 过 threadpoolexecutor 的 方 式 这 样 的 处 理 方 式 让 写 的 同 学 更 加 明 确 线 程 池 的 运 行 规 则 规 避 资 源 耗 尽 的 风 险 说 明 executors 返 回 的 线 程 池 对 象 的 弊 端 如 下 1 fixedthreadpool 和 singlethreadpool 允 许 的 请 求 队 列 长 度 为 integer max value 可 能 会 堆 积 大 量 的 请 求 从 而 导 致 oom 2 cachedthreadpool 和 scheduledthreadpool 允 许 的 创 建 线 程 数 量 为 integer max value 可 能 会 创 建 大 量 的 线 程 从 而 导 致 oom 强 制 simpledateformat 是 线 程 不 安 全 的 类 一 般 不 要 定 义 为 static 变 量 如 果 定 义 为 static 必 须 加 锁 或 者 使 用 dateutils 工 具 类 正 例 注 意 线 程 安 全 使 用 dateutils 亦 推 荐 如 下 处 理 private static final threadlocal dateformat df new threadlocal dateformat override protected dateformat initialvalue return new simpledateformat yyyy mm dd 说 明 如 果 是 jdk8 的 应 用 可 以 使 用 instant 代 替 date localdatetime 代 替 calendar datetimeformatter 代 替 simpledateformat 官 方 给 出 的 解 释 simple beautiful strong immutable thread safe 强 制 高 并 发 时 同 步 调 用 应 该 去 考 量 锁 的 性 能 损 耗 能 用 无 锁 数 据 结 构 就 不 要 用 锁 能 锁 区 块 就 不 要 锁 整 个 方 法 体 能 用 对 象 锁 就 不 要 用 类 锁 说 明 尽 可 能 使 加 锁 的 代 码 块 工 作 量 尽 可 能 的 小 避 免 在 锁 代 码 块 中 调 用 rpc 方 法 强 制 对 多 个 资 源 数 据 库 表 对 象 同 时 加 锁 时 需 要 保 持 一 致 的 加 锁 顺 序 否 则 可 能 会 造 成 死 锁 说 明 线 程 一 需 要 对 表 a b c 依 次 全 部 加 锁 后 才 可 以 进 行 更 新 操 作 那 么 线 程 二 的 加 锁 顺 序 也 必 须 是 a b c 否 则 可 能 出 现 死 锁 强 制 并 发 修 改 同 一 记 录 时 避 免 更 新 丢 失 需 要 加 锁 要 么 在 应 用 层 加 锁 要 么 在 缓 存 加 锁 要 么 在 数 据 库 层 使 用 乐 观 锁 使 用 version 作 为 更 新 依 据 说 明 如 果 每 次 访 问 冲 突 概 率 小 于 20 推 荐 使 用 乐 观 锁 否 则 使 用 悲 观 锁 乐 观 锁 的 重 试 次 数 不 得 小 于 3 次 强 制 多 线 程 并 行 处 理 定 时 任 务 时 timer 运 行 多 个 timetask 时 只 要 其 中 之 一 没 有 捕 获 抛 出 的 异 常 其 它 任 务 便 会 自 动 终 止 运 行 使 用 scheduledexecutorservice 则 没 有 这 个 问 题 推 荐 使 用 countdownlatch 进 行 异 步 转 同 步 操 作 每 个 线 程 退 出 前 必 须 调 用 countdown 方 法 线 程 执 行 代 码 注 意 catch 异 常 确 保 countdown 方 法 被 执 行 到 避 免 主 线 程 无 法 执 行 至 await 方 法 直 到 超 时 才 返 回 结 果 说 明 注 意 子 线 程 抛 出 异 常 堆 栈 不 能 在 主 线 程 try catch 到 推 荐 避 免 random 实 例 被 多 线 程 使 用 虽 然 共 享 该 实 例 是 线 程 安 全 的 但 会 因 竞 争 同 一 seed 导 致 的 性 能 下 降 说 明 random 实 例 包 括 java util random 的 实 例 或 者 math random 的 方 式 正 例 在 jdk7 之 后 可 以 直 接 使 用 api threadlocalrandom 而 在 jdk7 之 前 需 要 编 码 保 证 每 个 线 程 持 有 一 个 实 例 推 荐 在 并 发 场 景 下 通 过 双 重 检 查 锁 double checked locking 实 现 延 迟 初 始 化 的 优 化 问 题 隐 患 可 参 考 the double checked locking is broken declaration 推 荐 解 决 方 案 中 较 为 简 单 一 种 适 用 于 jdk5 及 以 上 版 本 将 目 标 属 性 声 明 为 volatile 型 反 例 class singleton private helper helper null public helper gethelper if helper null synchronized this if helper null helper new helper return helper other methods and fields 参 考 volatile 解 决 多 线 程 内 存 不 可 见 问 题 对 于 一 写 多 读 是 可 以 解 决 变 量 同 步 问 题 但 是 如 果 多 写 同 样 无 法 解 决 线 程 安 全 问 题 如 果 是 count 操 作 使 用 如 下 类 实 现 atomicinteger count new atomicinteger count addandget 1 如 果 是 jdk8 推 荐 使 用 longadder 对 象 比 atomiclong 性 能 更 好 减 少 乐 观 锁 的 重 试 次 数 参 考 hashmap 在 容 量 不 够 进 行 resize 时 由 于 高 并 发 可 能 出 现 死 链 导 致 cpu 飙 升 在 开 发 过 程 中 可 以 使 用 其 它 数 据 结 构 或 加 锁 来 规 避 此 风 险 参 考 threadlocal 无 法 解 决 共 享 对 象 的 更 新 问 题 threadlocal 对 象 建 议 使 用 static 修 饰 这 个 变 量 是 针 对 一 个 线 程 内 所 有 操 作 共 享 的 所 以 设 置 为 静 态 变 量 所 有 此 类 实 例 共 享 此 静 态 变 量 也 就 是 说 在 类 第 一 次 被 使 用 时 装 载 只 分 配 一 块 存 储 空 间 所 有 此 类 的 对 象 只 要 是 这 个 线 程 内 定 义 的 都 可 以 操 控 这 个 变 量 七 控 制 语 句 强 制 在 一 个 switch 块 内 每 个 case 要 么 通 过 break return 等 来 终 止 要 么 注 释 说 明 程 序 将 继 续 执 行 到 哪 一 个 case 为 止 在 一 个 switch 块 内 都 必 须 包 含 一 个 default 语 句 并 且 放 在 最 后 即 使 它 什 么 代 码 也 没 有 强 制 在 if else for while do 语 句 中 必 须 使 用 大 括 号 即 使 只 有 一 行 代 码 避 免 采 用 单 行 的 编 码 方 式 if condition statements 推 荐 表 达 异 常 的 分 支 时 少 用 if else 方 式 这 种 方 式 可 以 改 写 成 if condition return obj 接 着 写 else 的 业 务 逻 辑 代 码 说 明 如 果 非 得 使 用 if else if else 方 式 表 达 逻 辑 强 制 避 免 后 续 代 码 维 护 困 难 请 勿 超 过 3 层 正 例 超 过 3 层 的 if else 的 逻 辑 判 断 代 码 可 以 使 用 卫 语 句 策 略 模 式 状 态 模 式 等 来 实 现 其 中 卫 语 句 示 例 如 下 public void today if isbusy system out println change time return if isfree system out println go to travel return system out println stay at home to learn alibaba java coding guidelines return 推 荐 除 常 用 方 法 如 getxxx isxxx 等 外 不 要 在 条 件 判 断 中 执 行 其 它 复 杂 的 语 句 将 复 杂 逻 辑 判 断 的 结 果 赋 值 给 一 个 有 意 义 的 布 尔 变 量 名 以 提 高 可 读 性 说 明 很 多 if 语 句 内 的 逻 辑 相 当 复 杂 阅 读 者 需 要 分 析 条 件 表 达 式 的 最 终 结 果 才 能 明 确 什 么 样 的 条 件 执 行 什 么 样 的 语 句 那 么 如 果 阅 读 者 分 析 逻 辑 表 达 式 错 误 呢 正 例 伪 代 码 如 下 final boolean existed file open filename w null if existed 反 例 if file open filename w null 推 荐 循 环 体 中 的 语 句 要 考 量 性 能 以 下 操 作 尽 量 移 至 循 环 体 外 处 理 如 定 义 对 象 变 量 获 取 数 据 库 连 接 进 行 不 必 要 的 try catch 操 作 这 个 try catch 是 否 可 以 移 至 循 环 体 外 推 荐 接 口 入 参 保 护 这 种 场 景 常 见 的 是 用 于 做 批 量 操 作 的 接 口 参 考 下 列 情 形 需 要 进 行 参 数 校 验 1 调 用 频 次 低 的 方 法 2 执 行 时 间 开 销 很 大 的 方 法 此 情 形 中 参 数 校 验 时 间 几 乎 可 以 忽 略 不 计 但 如 果 因 为 参 数 错 误 导 致 中 间 执 行 回 退 或 者 错 误 那 得 不 偿 失 3 需 要 极 高 稳 定 性 和 可 用 性 的 方 法 4 对 外 提 供 的 开 放 接 口 不 管 是 rpc api http 接 口 5 敏 感 权 限 入 口 参 考 下 列 情 形 不 需 要 进 行 参 数 校 验 1 极 有 可 能 被 循 环 调 用 的 方 法 但 在 方 法 说 明 里 必 须 注 明 外 部 参 数 检 查 要 求 2 底 层 调 用 频 度 比 较 高 的 方 法 毕 竟 是 像 纯 净 水 过 滤 的 最 后 一 道 参 数 错 误 不 太 可 能 到 底 层 才 会 暴 露 问 题 一 般 dao 层 与 service 层 都 在 同 一 个 应 用 中 部 署 在 同 一 台 服 务 器 中 所 以 dao 的 参 数 校 验 可 以 省 略 3 被 声 明 成 private 只 会 被 自 己 代 码 所 调 用 的 方 法 如 果 能 够 确 定 调 用 方 法 的 代 码 传 入 参 数 已 经 做 过 检 查 或 者 肯 定 不 会 有 问 题 此 时 可 以 不 校 验 参 数 八 注 释 规 约 强 制 类 类 属 性 类 方 法 的 注 释 必 须 使 用 javadoc 规 范 使 用 内 容 格 式 不 得 使 用 xxx 方 式 说 明 在 ide 编 辑 窗 口 中 javadoc 方 式 会 提 示 相 关 注 释 生 成 javadoc 可 以 正 确 输 出 相 应 注 释 在 ide 中 工 程 调 用 方 法 时 不 进 入 方 法 即 可 悬 浮 提 示 方 法 参 数 返 回 值 的 意 义 提 高 阅 读 效 率 强 制 所 有 的 抽 象 方 法 包 括 接 口 中 的 方 法 必 须 要 用 javadoc 注 释 除 了 返 回 值 参 数 异 常 说 明 外 还 必 须 指 出 该 方 法 做 什 么 事 情 实 现 什 么 功 能 说 明 对 子 类 的 实 现 要 求 或 者 调 用 注 意 事 项 请 一 并 说 明 强 制 所 有 的 类 都 必 须 添 加 创 建 者 和 创 建 日 期 强 制 方 法 内 部 单 行 注 释 在 被 注 释 语 句 上 方 另 起 一 行 使 用 注 释 方 法 内 部 多 行 注 释 使 用 注 释 注 意 与 代 码 对 齐 强 制 所 有 的 枚 举 类 型 字 段 必 须 要 有 注 释 说 明 每 个 数 据 项 的 用 途 推 荐 与 其 半 吊 子 英 文 来 注 释 不 如 用 中 文 注 释 把 问 题 说 清 楚 专 有 名 词 与 关 键 字 保 持 英 文 原 文 即 可 反 例 tcp 连 接 超 时 解 释 成 传 输 控 制 协 议 连 接 超 时 理 解 反 而 费 脑 筋 推 荐 代 码 修 改 的 同 时 注 释 也 要 进 行 相 应 的 修 改 尤 其 是 参 数 返 回 值 异 常 核 心 逻 辑 等 的 修 改 说 明 代 码 与 注 释 更 新 不 同 步 就 像 路 网 与 导 航 软 件 更 新 不 同 步 一 样 如 果 导 航 软 件 严 重 滞 后 就 失 去 了 导 航 的 意 义 参 考 谨 慎 注 释 掉 代 码 在 上 方 详 细 说 明 而 不 是 简 单 地 注 释 掉 如 果 无 用 则 删 除 说 明 代 码 被 注 释 掉 有 两 种 可 能 性 1 后 续 会 恢 复 此 段 代 码 逻 辑 2 永 久 不 用 前 者 如 果 没 有 备 注 信 息 难 以 知 晓 注 释 动 机 后 者 建 议 直 接 删 掉 代 码 仓 库 保 存 了 历 史 代 码 参 考 对 于 注 释 的 要 求 第 一 能 够 准 确 反 应 设 计 思 想 和 代 码 逻 辑 第 二 能 够 描 述 业 务 含 义 使 别 的 程 序 员 能 够 迅 速 了 解 到 代 码 背 后 的 信 息 完 全 没 有 注 释 的 大 段 代 码 对 于 阅 读 者 形 同 天 书 注 释 是 给 自 己 看 的 即 使 隔 很 长 时 间 也 能 清 晰 理 解 当 时 的 思 路 注 释 也 是 给 继 任 者 看 的 使 其 能 够 快 速 接 替 自 己 的 工 作 参 考 好 的 命 名 代 码 结 构 是 自 解 释 的 注 释 力 求 精 简 准 确 表 达 到 位 避 免 出 现 注 释 的 一 个 极 端 过 多 过 滥 的 注 释 代 码 的 逻 辑 一 旦 修 改 修 改 注 释 是 相 当 大 的 负 担 反 例 put elephant into fridge put elephant fridge 方 法 名 put 加 上 两 个 有 意 义 的 变 量 名 elephant 和 fridge 已 经 说 明 了 这 是 在 干 什 么 语 义 清 晰 的 代 码 不 需 要 额 外 的 注 释 参 考 特 殊 注 释 标 记 请 注 明 标 记 人 与 标 记 时 间 注 意 及 时 处 理 这 些 标 记 通 过 标 记 扫 描 经 常 清 理 此 类 标 记 线 上 故 障 有 时 候 就 是 来 源 于 这 些 标 记 处 的 代 码 1 待 办 事 宜 todo 标 记 人 标 记 时 间 预 计 处 理 时 间 表 示 需 要 实 现 但 目 前 还 未 实 现 的 功 能 这 实 际 上 是 一 个 javadoc 的 标 签 目 前 的 javadoc 还 没 有 实 现 但 已 经 被 广 泛 使 用 只 能 应 用 于 类 接 口 和 方 法 因 为 它 是 一 个 javadoc 标 签 2 错 误 不 能 工 作 fixme 标 记 人 标 记 时 间 预 计 处 理 时 间 在 注 释 中 用 fixme 标 记 某 代 码 是 错 误 的 而 且 不 能 工 作 需 要 及 时 纠 正 的 情 况 九 其 它 强 制 在 使 用 正 则 表 达 式 时 利 用 好 其 预 编 译 功 能 可 以 有 效 加 快 正 则 匹 配 速 度 说 明 不 要 在 方 法 体 内 定 义 pattern pattern pattern compile 规 则 强 制 velocity 调 用 pojo 类 的 属 性 时 建 议 直 接 使 用 属 性 名 取 值 即 可 模 板 引 擎 会 自 动 按 规 范 调 用 pojo 的 getxxx 如 果 是 boolean 基 本 数 据 类 型 变 量 boolean 命 名 不 需 要 加 is 前 缀 会 自 动 调 用 isxxx 方 法 说 明 注 意 如 果 是 boolean 包 装 类 对 象 优 先 调 用 getxxx 的 方 法 强 制 后 台 输 送 给 页 面 的 变 量 必 须 加 var 中 间 的 感 叹 号 说 明 如 果 var null 或 者 不 存 在 那 么 var 会 直 接 显 示 在 页 面 上 强 制 注 意 math random 这 个 方 法 返 回 是 double 类 型 注 意 取 值 的 范 围 0 x 1 能 够 取 到 零 值 注 意 除 零 异 常 如 果 想 获 取 整 数 类 型 的 随 机 数 不 要 将 x 放 大 10 的 若 干 倍 然 后 取 整 直 接 使 用 random 对 象 的 nextint 或 者 nextlong 方 法 强 制 获 取 当 前 毫 秒 数 system currenttimemillis 而 不 是 new date gettime 说 明 如 果 想 获 取 更 加 精 确 的 纳 秒 级 时 间 值 使 用 system nanotime 的 方 式 在 jdk8 中 针 对 统 计 时 间 等 场 景 推 荐 使 用 instant 类 推 荐 不 要 在 视 图 模 板 中 加 入 任 何 复 杂 的 逻 辑 说 明 根 据 mvc 理 论 视 图 的 职 责 是 展 示 不 要 抢 模 型 和 控 制 器 的 活 推 荐 任 何 数 据 结 构 的 构 造 或 初 始 化 都 应 指 定 大 小 避 免 数 据 结 构 无 限 增 长 吃 光 内 存 推 荐 及 时 清 理 不 再 使 用 的 代 码 段 或 配 置 信 息 说 明 对 于 垃 圾 代 码 或 过 时 配 置 坚 决 清 理 干 净 避 免 程 序 过 度 臃 肿 代 码 冗 余 正 例 对 于 暂 时 被 注 释 掉 后 续 可 能 恢 复 使 用 的 代 码 片 断 在 注 释 代 码 上 方 统 一 规 定 使 用 三 个 斜 杠 来 说 明 注 释 掉 代 码 的 理 由", "source_text": "一、编程规约\n(一)命名风格\n【强制】代码中的命名均不能以下划线或美元符号开始,也不能以下划线或美元符号结束。\n\n反例:_name / _name / $Object / name / name\n/Object\n/\n𝑂\n𝑏\n𝑗\n𝑒\n𝑐\n𝑡\n\n【强制】代码中的命名严禁使用拼音与英文混合的方式,更不允许直接使用中文的方式。说明:正确的英文拼写和语法可以让阅读者易于理解,避免歧义。注意,即使纯拼音命名方式也要避免采用。正例:alibaba / taobao / youku / hangzhou 等国际通用的名称,可视同英文。\n\n反例:DaZhePromotion [打折] / getPingfenByName() [评分] / int 某变量 = 3\n\n【强制】类名使用UpperCamelCase风格,必须遵从驼峰形式,但以下情形例外:DO / BO /\n\nDTO / VO / AO\n\n正例:MarcoPolo / UserDO / XmlService / TcpUdpDeal / TaPromotion 反例:macroPolo / UserDo / XMLService / TCPUDPDeal / TAPromotion\n\n【强制】方法名、参数名、成员变量、局部变量都统一使用lowerCamelCase风格,必须遵从驼峰形式。\n\n正例: localValue / getHttpMessage() / inputUserId\n\n【强制】常量命名全部大写,单词间用下划线隔开,力求语义表达完整清楚,不要嫌名字长。\n\n正例:MAX_STOCK_COUNT 反例:MAX_COUNT\n\n【强制】抽象类命名使用Abstract或Base开头;异常类命名使用Exception结尾;测试类命名以它要测试的类的名称开始,以Test结尾。\n\n【强制】中括号是数组类型的一部分,数组定义如下:String[] args; 反例:使用String args[]的方式来定义。\n\n【强制】POJO类中布尔类型的变量,都不要加is,否则部分框架解析会引起序列化错误。\n\n反例:定义为基本数据类型Boolean isDeleted;的属性,它的方法也是isDeleted(),RPC\n\n框架在反向解析的时候,“以为”对应的属性名称是deleted,导致属性获取不到,进而抛出异常。\n\n【强制】包名统一使用小写,点分隔符之间有且仅有一个自然语义的英语单词。包名统一使用单数形式,但是类名如果有复数含义,类名可以使用复数形式。\n\n正例: 应用工具类包名为com.alibaba.open.util、类名为MessageUtils(此规则参考 spring的框架结构)\n\n【强制】杜绝完全不规范的缩写,避免望文不知义。\n\n反例:AbstractClass“缩写”命名成AbsClass;condition“缩写”命名成 condi,此类随意缩写严重降低了代码的可阅读性。\n\n【推荐】为了达到代码自解释的目标,任何自定义编程元素在命名时,使用尽量完整的单词组合来表达其意。\n\n正例:从远程仓库拉取代码的类命名为 PullCodeFromRemoteRepository。\n\n反例:变量 int a; 的随意命名方式。\n\n【推荐】如果模块、接口、类、方法使用了设计模式,在命名时体现出具体模式。\n\n说明:将设计模式体现在名字中,有利于阅读者快速理解架构设计理念。\n\n正例:public class OrderFactory; public class LoginProxy;\n\npublic class ResourceObserver;\n\n【推荐】接口类中的方法和属性不要加任何修饰符号(public 也不要加),保持代码的简洁性,并加上有效的Javadoc注释。尽量不要在接口里定义变量,如果一定要定义变量,肯定是与接口方法相关,并且是整个应用的基础常量。\n\n正例:接口方法签名:void f();\n\n接口基础常量表示:String COMPANY = \"alibaba\";\n\n反例:接口方法定义:public abstract void f();\n\n说明:JDK8中接口允许有默认实现,那么这个default方法,是对所有实现类都有价值的默认实现。\n\n接口和实现类的命名有两套规则:\n\n1) 【强制】对于Service和DAO类,基于SOA的理念,暴露出来的服务一定是接口,内部的实现类用Impl的后缀与接口区别。\n\n正例:CacheServiceImpl实现CacheService接口。\n\n2) 【推荐】 如果是形容能力的接口名称,取对应的形容词做接口名(通常是–able的形式)。\n\n正例:AbstractTranslator实现 Translatable。\n\n【参考】枚举类名建议带上Enum后缀,枚举成员名称需要全大写,单词间用下划线隔开。\n\n说明:枚举其实就是特殊的常量类,且构造方法被默认强制是私有。\n\n正例:枚举名字为ProcessStatusEnum的成员名称:SUCCESS / UNKOWN_REASON。\n\n【参考】各层命名规约:\n\nA) Service/DAO层方法命名规约\n\n1) 获取单个对象的方法用get做前缀。\n\n2) 获取多个对象的方法用list做前缀。\n\n3) 获取统计值的方法用count做前缀。\n\n4) 插入的方法用save/insert做前缀。\n\n5) 删除的方法用remove/delete做前缀。\n\n6) 修改的方法用update做前缀。\n\nB) 领域模型命名规约\n\n1) 数据对象:xxxDO,xxx即为数据表名。\n\n2) 数据传输对象:xxxDTO,xxx为业务领域相关的名称。\n\n3) 展示对象:xxxVO,xxx一般为网页名称。\n\n4) POJO是DO/DTO/BO/VO的统称,禁止命名成xxxPOJO。\n\n(二)常量定义\n【强制】不允许任何魔法值(即未经定义的常量)直接出现在代码中。\n\n反例:String key = \"Id#taobao_\" + tradeId; cache.put(key, value);\n\n【强制】long或者Long初始赋值时,使用大写的L,不能是小写的l,小写容易跟数字1混淆,造成误解。\n\n说明:Long a = 2l; 写的是数字的21,还是Long型的2?\n\n【推荐】不要使用一个常量类维护所有常量,按常量功能进行归类,分开维护。\n\n说明:大而全的常量类,非得使用查找功能才能定位到修改的常量,不利于理解和维护。\n\n正例:缓存相关常量放在类CacheConsts下;系统配置相关常量放在类ConfigConsts下。\n\n【推荐】常量的复用层次有五层:跨应用共享常量、应用内共享常量、子工程内共享常量、包内共享常量、类内共享常量。\n\n1) 跨应用共享常量:放置在二方库中,通常是client.jar中的constant目录下。\n\n2) 应用内共享常量:放置在一方库中,通常是modules中的constant目录下。\n\n 反例:易懂变量也要统一定义成应用内共享常量,两位攻城师在两个类中分别定义了表示\n\n\n“是”的变量:\n\n 类A中:public static final String YES = \"yes\"; 类B中:public static final String YES = \"y\";\n\n A.YES.equals(B.YES),预期是true,但实际返回为false,导致线上问题。\n\n\n3) 子工程内部共享常量:即在当前子工程的constant目录下。\n\n4) 包内共享常量:即在当前包下单独的constant目录下。\n\n5) 类内共享常量:直接在类内部private static final定义。\n\n【推荐】如果变量值仅在一个范围内变化,且带有名称之外的延伸属性,定义为枚举类。下面正例中的数字就是延伸信息,表示星期几。\n\n正例:public Enum { MONDAY(1), TUESDAY(2), WEDNESDAY(3), THURSDAY(4), FRIDAY(5), SATURDAY(6), SUNDAY(7);}\n\n(三)代码格式\n【强制】大括号的使用约定。如果是大括号内为空,则简洁地写成{}即可,不需要换行;如果是非空代码块则: 1) 左大括号前不换行。\n\n2) 左大括号后换行。\n\n3) 右大括号前换行。\n\n4) 右大括号后还有else等代码则不换行;表示终止的右大括号后必须换行。\n\n【强制】 左小括号和字符之间不出现空格;同样,右小括号和字符之间也不出现空格。详见第5条下方正例提示。\n\n|\n\n空格\n\n|\n\na == b\n\n|\n\n空格\n\n|\n\n反例:if ()\n\n【强制】if/for/while/switch/do等保留字与括号之间都必须加空格。\n\n【强制】任何二目、三目运算符的左右两边都需要加一个空格。\n\n说明:运算符包括赋值运算符=、逻辑运算符&&、加减乘除符号等。\n\n【强制】采用4个空格缩进,禁止使用tab字符。\n\n[图片上传失败...(image-faf96d-1526115059995)] 说明:如果使用tab缩进,必须设置1个tab为4个空格。IDEA设置tab为4个空格时,请勿勾选Use tab character;而在eclipse中,必须勾选insert spaces for tabs。\n\n正例: (涉及1-5点)\n\npublic static void main(String[] args) {\n\n// 缩进4个空格\n\nString say = \"hello\";\n\n// 运算符的左右必须有一个空格\n\nint flag = 0;\n\n// 关键词if与括号之间必须有一个空格,括号内的f与左括号,0与右括号不需要空格 if (flag == 0) {\n\nSystem.out.println(say);\n\n}\n\n// 左大括号前加空格且不换行;左大括号后换行\n\nif (flag == 1) {\n\nSystem.out.println(\"world\");\n\n// 右大括号前换行,右大括号后有else,不用换行\n\n} else {\n\nSystem.out.println(\"ok\");\n\n// 在右大括号后直接结束,则必须换行\n\n}\n\n}\n\n【强制】注释的双斜线与注释内容之间有且仅有一个空格。\n\n正例:// 注释内容,注意在//和注释内容之间有一个空格。\n\n【强制】单行字符数限制不超过 120 个,超出需要换行,换行时遵循如下原则: 1) 第二行相对第一行缩进 4 个空格,从第三行开始,不再继续缩进,参考示例。\n\n2) 运算符与下文一起换行。\n\n3) 方法调用的点符号与下文一起换行。\n\n4) 方法调用时,多个参数,需要换行时,在逗号后进行。\n\n5) 在括号前不要换行,见反例。正例:\n\nStringBuffer sb = new StringBuffer();\n\n// 超过120个字符的情况下,换行缩进4个空格,点号和方法名称一起换行 sb.append(\"zi\").append(\"xin\")...\n\n.append(\"huang\")...\n\n.append(\"huang\")...\n\n.append(\"huang\");\n\n反例:\n\nStringBuffer sb = new StringBuffer();\n\n// 超过120个字符的情况下,不要在括号前换行\n\nsb.append(\"zi\").append(\"xin\")...append\n\n(\"huang\");\n\n// 参数很多的方法调用可能超过120个字符,不要在逗号前换行 method(args1, args2, args3, ...\n\n, argsX);\n\n【强制】方法参数在定义和传入时,多个参数逗号后边必须加空格。\n\n正例:下例中实参的\"a\",后边必须要有一个空格。\n\nmethod(\"a\", \"b\", \"c\");\n\n【强制】IDE的text file encoding设置为UTF-8; IDE中文件的换行符使用Unix格式,不要使用Windows格式。\n\n【推荐】没有必要增加若干空格来使某一行的字符与上一行对应位置的字符对齐。\n\n正例:\n\nint a = 3;\n\nlong b = 4L;\n\nfloat c = 5F;\n\nStringBuffer sb = new StringBuffer();\n\n说明:增加sb这个变量,如果需要对齐,则给a、b、c都要增加几个空格,在变量比较多的情况下,是一种累赘的事情。\n\n【推荐】方法体内的执行语句组、变量的定义语句组、不同的业务逻辑之间或者不同的语义之间插入一个空行。相同业务逻辑和语义之间不需要插入空行。\n\n说明:没有必要插入多个空行进行隔开。\n\n(四)OOP规约\n\n【强制】避免通过一个类的对象引用访问此类的静态变量或静态方法,无谓增加编译器解析成本,直接用类名来访问即可。\n\n【强制】所有的覆写方法,必须加@Override注解。\n\n说明:getObject()与get0bject()的问题。一个是字母的O,一个是数字的0,加@Override 可以准确判断是否覆盖成功。另外,如果在抽象类中对方法签名进行修改,其实现类会马上编译报错。\n\n【强制】相同参数类型,相同业务含义,才可以使用Java的可变参数,避免使用Object。\n\n说明:可变参数必须放置在参数列表的最后。(提倡同学们尽量不用可变参数编程)正例:public User getUsers(String type, Integer... ids) {...}\n\n【强制】外部正在调用或者二方库依赖的接口,不允许修改方法签名,避免对接口调用方产生影响。接口过时必须加@Deprecated注解,并清晰地说明采用的新接口或者新服务是什么。\n\n【强制】不能使用过时的类或方法。\n\n说明:java.net.URLDecoder 中的方法decode(String encodeStr) 这个方法已经过时,应该使用双参数decode(String source, String encode)。接口提供方既然明确是过时接口,那么有义务同时提供新的接口;作为调用方来说,有义务去考证过时方法的新实现是什么。\n\n【强制】Object的equals方法容易抛空指针异常,应使用常量或确定有值的对象来调用 equals。\n\n正例:\"test\".equals(object); 反例:object.equals(\"test\");\n\n说明:推荐使用java.util.Objects#equals(JDK7引入的工具类)\n\n【强制】所有的相同类型的包装类对象之间值的比较,全部使用equals方法比较。\n\n说明:对于Integer var = ? 在-128至127范围内的赋值,Integer对象是在 IntegerCache.cache产生,会复用已有对象,这个区间内的Integer值可以直接使用==进行判断,但是这个区间之外的所有数据,都会在堆上产生,并不会复用已有对象,这是一个大坑,推荐使用equals方法进行判断。\n\n关于基本数据类型与包装数据类型的使用标准如下:\n\n1) 【强制】所有的POJO类属性必须使用包装数据类型。\n\n2) 【强制】RPC方法的返回值和参数必须使用包装数据类型。\n\n3) 【推荐】所有的局部变量使用基本数据类型。\n\n说明:POJO类属性没有初值是提醒使用者在需要使用时,必须自己显式地进行赋值,任何\n\nNPE问题,或者入库检查,都由使用者来保证。\n\n正例:数据库的查询结果可能是null,因为自动拆箱,用基本数据类型接收有NPE风险。 反例:比如显示成交总额涨跌情况,即正负x%,x为基本数据类型,调用的RPC服务,调用不成功时,返回的是默认值,页面显示为0%,这是不合理的,应该显示成中划线。所以包装数据类型的null值,能够表示额外的信息,如:远程调用失败,异常退出。\n\n【强制】定义DO/DTO/VO等POJO类时,不要设定任何属性默认值。\n\n反例:POJO类的gmtCreate默认值为new Date();但是这个属性在数据提取时并没有置入具体值,在更新其它字段时又附带更新了此字段,导致创建时间被修改成当前时间。\n\n【强制】序列化类新增属性时,请不要修改serialVersionUID字段,避免反序列失败;如果完全不兼容升级,避免反序列化混乱,那么请修改serialVersionUID值。\n\n说明:注意serialVersionUID不一致会抛出序列化运行时异常。\n\n【强制】构造方法里面禁止加入任何业务逻辑,如果有初始化逻辑,请放在init方法中。\n\n【强制】POJO类必须写toString方法。使用IDE的中工具:source> generate toString 时,如果继承了另一个POJO类,注意在前面加一下super.toString。\n\n说明:在方法执行抛出异常时,可以直接调用POJO的toString()方法打印其属性值,便于排查问题。\n\n【推荐】使用索引访问用String的split方法得到的数组时,需做最后一个分隔符后有无\n\n内容的检查,否则会有抛IndexOutOfBoundsException的风险。\n\n说明:\n\nString str = \"a,b,c,,\";\n\nString[] ary = str.split(\",\");\n\n// 预期大于3,结果是3\n\nSystem.out.println(ary.length);\n\n【推荐】当一个类有多个构造方法,或者多个同名方法,这些方法应该按顺序放置在一起,便于阅读,此条规则优先于第15条规则。\n\n【推荐】 类内方法定义顺序依次是:公有方法或保护方法 > 私有方法 > getter/setter 方法。说明:公有方法是类的调用者和维护者最关心的方法,首屏展示最好;保护方法虽然只是子类关心,也可能是“模板设计模式”下的核心方法;而私有方法外部一般不需要特别关心,是一个黑盒实现;因为承载的信息价值较低,所有Service和DAO的getter/setter方法放在类体最后。\n\n【推荐】setter方法中,参数名称与类成员变量名称一致,this.成员名 = 参数名。在\n\ngetter/setter方法中,不要增加业务逻辑,增加排查问题的难度。\n\n反例:\n\npublic Integer getData() { if (true) {\n\nreturn this.data + 100;\n\n} else {\n\nreturn this.data - 100;\n\n}\n\n}\n\n【推荐】循环体内,字符串的连接方式,使用StringBuilder的append方法进行扩展。说明:反编译出的字节码文件显示每次循环都会new出一个StringBuilder对象,然后进行 append操作,最后通过toString方法返回String对象,造成内存资源浪费。\n反例:\n\nString str = \"start\";\n\nfor (int i = 0; i < 100; i++) { str = str + \"hello\";\n\n}\n\n【推荐】final可以声明类、成员变量、方法、以及本地变量,下列情况使用final关键字:\n\n1) 不允许被继承的类,如:String类。\n\n2) 不允许修改引用的域对象,如:POJO类的域变量。\n\n3) 不允许被重写的方法,如:POJO类的setter方法。\n\n4) 不允许运行过程中重新赋值的局部变量。\n\n5) 避免上下文重复使用一个变量,使用final描述可以强制重新定义一个变量,方便更好地进行重构。\n\n【推荐】慎用Object的clone方法来拷贝对象。\n\n说明:对象的clone方法默认是浅拷贝,若想实现深拷贝需要重写clone方法实现属性对象的拷贝。\n\n【推荐】类成员与方法访问控制从严:\n\n1) 如果不允许外部直接通过new来创建对象,那么构造方法必须是private。\n\n2) 工具类不允许有public或default构造方法。\n\n3) 类非static成员变量并且与子类共享,必须是protected。\n\n4) 类非static成员变量并且仅在本类使用,必须是private。\n\n5) 类static成员变量如果仅在本类使用,必须是private。\n\n6) 若是static成员变量,必须考虑是否为final。 7) 类成员方法只供类内部调用,必须是private。\n\n8) 类成员方法只对继承类公开,那么限制为protected。说明:任何类、方法、参数、变量,严控访问范围。过于宽泛的访问范围,不利于模块解耦。思考:如果是一个private的方法,想删除就删除,可是一个public的service方法,或者一个public的成员变量,删除一下,不得手心冒点汗吗?变量像自己的小孩,尽量在自己的视线内,变量作用域太大,无限制的到处跑,那么你会担心的。\n\n(五)集合处理\n【强制】关于hashCode和equals的处理,遵循如下规则: 1) 只要重写equals,就必须重写hashCode。\n\n2) 因为Set存储的是不重复的对象,依据hashCode和equals进行判断,所以Set存储的对象必须重写这两个方法。\n\n3) 如果自定义对象做为Map的键,那么必须重写hashCode和equals。\n\n说明:String重写了hashCode和equals方法,所以我们可以非常愉快地使用String对象作为key来使用。\n\n【强制】 ArrayList的subList结果不可强转成ArrayList,否则会抛出ClassCastException 异常,即java.util.RandomAccessSubList cannot be cast to java.util.ArrayList.\n\n说明:subList 返回的是 ArrayList 的内部类 SubList,并不是 ArrayList ,而是 ArrayList 的一个视图,对于SubList子列表的所有操作最终会反映到原列表上。\n\n【强制】在subList场景中,高度注意对原集合元素个数的修改,会导致子列表的遍历、增加、删除均会产生ConcurrentModificationException 异常。\n\n【强制】使用集合转数组的方法,必须使用集合的toArray(T[] array),传入的是类型完全一样的数组,大小就是list.size()。\n\n说明:使用toArray带参方法,入参分配的数组空间不够大时,toArray方法内部将重新分配内存空间,并返回新数组地址;如果数组元素大于实际所需,下标为[ list.size() ]的数组元素将被置为null,其它数组元素保持原值,因此最好将方法入参数组大小定义与集合元素个数一致。正例:\n\nList list = new ArrayList(2); list.add(\"guan\"); list.add(\"bao\");\n\nString[] array = new String[list.size()]; array = list.toArray(array);\n\n反例:直接使用toArray无参方法存在问题,此方法返回值只能是Object[]类,若强转其它类型数组将出现ClassCastException错误。\n\n【强制】使用工具类Arrays.asList()把数组转换成集合时,不能使用其修改集合相关的方法,它的add/remove/clear方法会抛出UnsupportedOperationException异常。\n\n说明:asList的返回对象是一个Arrays内部类,并没有实现集合的修改方法。Arrays.asList 体现的是适配器模式,只是转换接口,后台的数据仍是数组。\n\nString[] str = new String[] { \"you\", \"wu\" }; List list = Arrays.asList(str);\n\n第一种情况:list.add(\"yangguanbao\"); 运行时异常。第二种情况:str[0] = \"gujin\"; 那么list.get(0)也会随之修改。\n\n【强制】泛型通配符来接收返回的数据,此写法的泛型集合不能使用add方法,而不能使用get方法,做为接口调用赋值时易出错。\n\n说明:扩展说一下PECS(Producer Extends Consumer Super)原则:第一、频繁往外读取内容的,适合用。第二、经常往里插入的,适合用。\n\n【强制】不要在foreach循环里进行元素的remove/add操作。remove元素请使用Iterator 方式,如果并发操作,需要对Iterator对象加锁。正例:\n\nIterator iterator = list.iterator(); while (iterator.hasNext()) {\n\nString item = iterator.next(); if (删除元素的条件) { iterator.remove();\n\n}\n\n}\n\n反例:\n\nList list = new ArrayList(); list.add(\"1\"); list.add(\"2\"); for (String item : list) { if (\"1\".equals(item)) { list.remove(item);\n\n}\n\n}\n\n说明:以上代码的执行结果肯定会出乎大家的意料,那么试一下把“1”换成“2”,会是同样的结果吗?\n\n【强制】 在JDK7版本及以上,Comparator要满足如下三个条件,不然Arrays.sort,\n\nCollections.sort会报IllegalArgumentException异常。\n\n说明:三个条件如下\n\n1) x,y的比较结果和y,x的比较结果相反。\n\n2) x>y,y>z,则x>z。\n\n3) x=y,则x,z比较结果和y,z比较结果相同。\n\n反例:下例中没有处理相等的情况,实际使用中可能会出现异常:\n\nnew Comparator() {\n\n@Override public int compare(Student o1, Student o2) { return o1.getId() > o2.getId() ? 1 : -1; }\n\n};\n\n【推荐】集合初始化时,指定集合初始值大小。\n\n说明:HashMap使用HashMap(int initialCapacity) 初始化,正例:initialCapacity = (需要存储的元素个数 / 负载因子) + 1。注意负载因子(即loader factor)默认为0.75,如果暂时无法确定初始值大小,请设置为16(即默认值)。\n\n反例:HashMap需要放置1024个元素,由于没有设置容量初始大小,随着元素不断增加,容量 7 次被迫扩大,resize需要重建hash表,严重影响性能。\n\n【推荐】使用entrySet遍历Map类集合KV,而不是keySet方式进行遍历。\n\n说明:keySet其实是遍历了2次,一次是转为Iterator对象,另一次是从hashMap中取出 key所对应的value。而entrySet只是遍历了一次就把key和value都放到了entry中,效率更高。如果是JDK8,使用Map.foreach方法。\n\n正例:values()返回的是V值集合,是一个list集合对象;keySet()返回的是K值集合,是一个Set集合对象;entrySet()返回的是K-V值组合集合。\n\n【推荐】高度注意Map类集合K/V能不能存储null值的情况,如下表格:\n\n|\n\n集合类\n\n|\n\nKey\n\n|\n\nValue\n\n|\n\nSuper\n\n|\n\n说明\n\n|\n|\n\nHashtable\n\n|\n\n不允许为null\n\n|\n\n不允许为null\n\n|\n\nDictionary\n\n|\n\n线程安全\n\n|\n|\n\nConcurrentHashMap\n\n|\n\n不允许为null\n\n|\n\n不允许为null\n\n|\n\nAbstractMap\n\n|\n\n锁分段技术(JDK8:CAS)\n\n|\n|\n\nTreeMap\n\n|\n\n不允许为null\n\n|\n\n允许为null\n\n|\n\nAbstractMap\n\n|\n\n线程不安全\n\n|\n|\n\nHashMap\n\n|\n\n允许为null\n\n|\n\n允许为null\n\n|\n\nAbstractMap\n\n|\n\n线程不安全\n\n|\n\n反例: 由于HashMap的干扰,很多人认为ConcurrentHashMap是可以置入null值,而事实上,存储null值时会抛出NPE异常。\n\n【参考】合理利用好集合的有序性(sort)和稳定性(order),避免集合的无序性(unsort)和不稳定性(unorder)带来的负面影响。\n\n说明:有序性是指遍历的结果是按某种比较规则依次排列的。稳定性指集合每次遍历的元素次\n\n序是一定的。如:ArrayList是order/unsort;HashMap是unorder/unsort;TreeSet是 order/sort。\n\n【参考】利用Set元素唯一的特性,可以快速对一个集合进行去重操作,避免使用List的 contains方法进行遍历、对比、去重操作。\n(六)并发处理\n\n【强制】获取单例对象需要保证线程安全,其中的方法也要保证线程安全。说明:资源驱动类、工具类、单例工厂类都需要注意。\n\n【强制】创建线程或线程池时请指定有意义的线程名称,方便出错时回溯。\n\n正例:\n\npublic class TimerTaskThread extends Thread { public TimerTaskThread() { super.setName(\"TimerTaskThread\"); ... }\n\n【强制】线程资源必须通过线程池提供,不允许在应用中自行显式创建线程。\n\n说明:使用线程池的好处是减少在创建和销毁线程上所花的时间以及系统资源的开销,解决资源不足的问题。如果不使用线程池,有可能造成系统创建大量同类线程而导致消耗完内存或者 “过度切换”的问题。\n\n【强制】线程池不允许使用Executors去创建,而是通过ThreadPoolExecutor的方式,这样的处理方式让写的同学更加明确线程池的运行规则,规避资源耗尽的风险。\n\n说明:Executors返回的线程池对象的弊端如下:\n\n1) FixedThreadPool和SingleThreadPool: 允许的请求队列长度为Integer.MAX_VALUE,可能会堆积大量的请求,从而导致OOM。\n\n2) CachedThreadPool和ScheduledThreadPool: 允许的创建线程数量为Integer.MAX_VALUE,可能会创建大量的线程,从而导致OOM。\n\n【强制】SimpleDateFormat 是线程不安全的类,一般不要定义为static变量,如果定义为 static,必须加锁,或者使用DateUtils工具类。\n\n正例:注意线程安全,使用DateUtils。亦推荐如下处理:\n\nprivate static final ThreadLocal df = new ThreadLocal() {\n\n@Override protected DateFormat initialValue() { return new SimpleDateFormat(\"yyyy-MM-dd\"); }\n\n};\n\n说明:如果是JDK8的应用,可以使用Instant代替Date,LocalDateTime代替Calendar, DateTimeFormatter代替SimpleDateFormat,官方给出的解释:simple beautiful strong immutable thread-safe。\n\n【强制】高并发时,同步调用应该去考量锁的性能损耗。能用无锁数据结构,就不要用锁;能锁区块,就不要锁整个方法体;能用对象锁,就不要用类锁。\n\n说明:尽可能使加锁的代码块工作量尽可能的小,避免在锁代码块中调用 RPC 方法。\n\n【强制】对多个资源、数据库表、对象同时加锁时,需要保持一致的加锁顺序,否则可能会造成死锁。\n\n说明:线程一需要对表A、B、C依次全部加锁后才可以进行更新操作,那么线程二的加锁顺序也必须是A、B、C,否则可能出现死锁。\n\n【强制】并发修改同一记录时,避免更新丢失,需要加锁。要么在应用层加锁,要么在缓存加\n\n锁,要么在数据库层使用乐观锁,使用version作为更新依据。\n\n说明:如果每次访问冲突概率小于20%,推荐使用乐观锁,否则使用悲观锁。乐观锁的重试次数不得小于3次。\n\n【强制】多线程并行处理定时任务时,Timer运行多个TimeTask时,只要其中之一没有捕获\n\n抛出的异常,其它任务便会自动终止运行,使用ScheduledExecutorService则没有这个问题。\n\n【推荐】使用CountDownLatch进行异步转同步操作,每个线程退出前必须调用countDown 方法,线程执行代码注意catch异常,确保countDown方法被执行到,避免主线程无法执行至await方法,直到超时才返回结果。\n\n说明:注意,子线程抛出异常堆栈,不能在主线程try-catch到。\n\n【推荐】避免Random实例被多线程使用,虽然共享该实例是线程安全的,但会因竞争同一\n\nseed 导致的性能下降。\n\n说明:Random实例包括java.util.Random 的实例或者 Math.random()的方式。\n\n正例:在JDK7之后,可以直接使用API ThreadLocalRandom,而在 JDK7之前,需要编码保证每个线程持有一个实例。\n\n【推荐】在并发场景下,通过双重检查锁(double-checked locking)实现延迟初始化的优化问题隐患(可参考 The \"Double-Checked Locking is Broken\" Declaration),推荐解决方案中较为简单一种(适用于JDK5及以上版本),将目标属性声明为 volatile型。\n反例:\n\nclass Singleton { private Helper helper = null; public Helper getHelper() {\n\nif (helper == null) synchronized(this) { if (helper == null) helper = new Helper();\n\n}\n\nreturn helper;\n\n}\n\n// other methods and fields...\n\n}\n\n【参考】volatile解决多线程内存不可见问题。对于一写多读,是可以解决变量同步问题,但是如果多写,同样无法解决线程安全问题。如果是count++操作,使用如下类实现:\n\nAtomicInteger count = new AtomicInteger(); count.addAndGet(1); 如果是JDK8,推荐使用LongAdder对象,比AtomicLong性能更好(减少乐观锁的重试次数)。\n\n【参考】 HashMap在容量不够进行resize时由于高并发可能出现死链,导致CPU飙升,在开发过程中可以使用其它数据结构或加锁来规避此风险。\n\n【参考】ThreadLocal无法解决共享对象的更新问题,ThreadLocal对象建议使用static\n\n修饰。这个变量是针对一个线程内所有操作共享的,所以设置为静态变量,所有此类实例共享此静态变量 ,也就是说在类第一次被使用时装载,只分配一块存储空间,所有此类的对象(只要是这个线程内定义的)都可以操控这个变量。\n\n(七)控制语句\n\n【强制】在一个switch块内,每个case要么通过break/return等来终止,要么注释说明程序将继续执行到哪一个case为止;在一个switch块内,都必须包含一个default语句并且放在最后,即使它什么代码也没有。\n\n【强制】在if/else/for/while/do语句中必须使用大括号。即使只有一行代码,避免采用\n\n单行的编码方式:if (condition) statements;\n\n【推荐】表达异常的分支时,少用if-else方式,这种方式可以改写成:\n\nif (condition) { ...\n\nreturn obj;\n\n}\n\n// 接着写else的业务逻辑代码; 说明:如果非得使用if()...else if()...else...方式表达逻辑,【强制】避免后续代码维护困难,请勿超过3层。 正例:超过3层的 if-else 的逻辑判断代码可以使用卫语句、策略模式、状态模式等来实现,其中卫语句示例如下:\n\npublic void today() { if (isBusy()) {\n\nSystem.out.println(“change time.”);\n\n\nreturn;\n\n}\n\nif (isFree()) {\n\nSystem.out.println(“go to travel.”); return;\n\n}\n\nSystem.out.println(“stay at home to learn Alibaba Java Coding Guidelines.”); return;\n\n}\n\n【推荐】除常用方法(如 getXxx/isXxx)等外,不要在条件判断中执行其它复杂的语句,将复\n\n杂逻辑判断的结果赋值给一个有意义的布尔变量名,以提高可读性。\n\n说明:很多 if 语句内的逻辑相当复杂,阅读者需要分析条件表达式的最终结果,才能明确什么样的条件执行什么样的语句,那么,如果阅读者分析逻辑表达式错误呢?正例:\n\n// 伪代码如下\n\nfinal boolean existed = (file.open(fileName, \"w\") != null) && (...) || (...); if (existed) {\n\n...\n\n}\n\n反例:\n\nif ((file.open(fileName, \"w\") != null) && (...) || (...)) {\n\n...\n\n}\n\n【推荐】循环体中的语句要考量性能,以下操作尽量移至循环体外处理,如定义对象、变量、\n\n获取数据库连接,进行不必要的try-catch操作(这个try-catch是否可以移至循环体外)。\n\n【推荐】接口入参保护,这种场景常见的是用于做批量操作的接口。\n\n【参考】下列情形,需要进行参数校验:\n\n1) 调用频次低的方法。\n\n2) 执行时间开销很大的方法。此情形中,参数校验时间几乎可以忽略不计,但如果因为参数错误导致中间执行回退,或者错误,那得不偿失。\n\n3) 需要极高稳定性和可用性的方法。\n\n4) 对外提供的开放接口,不管是RPC/API/HTTP接口。\n\n5) 敏感权限入口。\n\n【参考】下列情形,不需要进行参数校验:\n\n1) 极有可能被循环调用的方法。但在方法说明里必须注明外部参数检查要求。\n\n2) 底层调用频度比较高的方法。毕竟是像纯净水过滤的最后一道,参数错误不太可能到底层才会暴露问题。一般DAO层与Service层都在同一个应用中,部署在同一台服务器中,所以DAO的参数校验,可以省略。\n\n3) 被声明成private只会被自己代码所调用的方法,如果能够确定调用方法的代码传入参数已经做过检查或者肯定不会有问题,此时可以不校验参数。\n\n(八)注释规约\n【强制】类、类属性、类方法的注释必须使用Javadoc规范,使用/*内容/格式,不得使用\n\n// xxx方式。\n\n说明:在IDE编辑窗口中,Javadoc方式会提示相关注释,生成Javadoc可以正确输出相应注释;在IDE中,工程调用方法时,不进入方法即可悬浮提示方法、参数、返回值的意义,提高阅读效率。\n\n【强制】所有的抽象方法(包括接口中的方法)必须要用Javadoc注释、除了返回值、参数、异常说明外,还必须指出该方法做什么事情,实现什么功能。说明:对子类的实现要求,或者调用注意事项,请一并说明。\n\n【强制】所有的类都必须添加创建者和创建日期。\n\n【强制】方法内部单行注释,在被注释语句上方另起一行,使用//注释。方法内部多行注释使用/* */注释,注意与代码对齐。\n\n【强制】所有的枚举类型字段必须要有注释,说明每个数据项的用途。\n\n【推荐】与其“半吊子”英文来注释,不如用中文注释把问题说清楚。专有名词与关键字保持英文原文即可。\n\n反例:“TCP连接超时”解释成“传输控制协议连接超时”,理解反而费脑筋。\n\n【推荐】代码修改的同时,注释也要进行相应的修改,尤其是参数、返回值、异常、核心逻辑等的修改。\n\n说明:代码与注释更新不同步,就像路网与导航软件更新不同步一样,如果导航软件严重滞后,就失去了导航的意义。\n\n【参考】谨慎注释掉代码。在上方详细说明,而不是简单地注释掉。如果无用,则删除。\n\n说明:代码被注释掉有两种可能性:1)后续会恢复此段代码逻辑。2)永久不用。前者如果没有备注信息,难以知晓注释动机。后者建议直接删掉(代码仓库保存了历史代码)。\n\n【参考】对于注释的要求:第一、能够准确反应设计思想和代码逻辑;第二、能够描述业务含义,使别的程序员能够迅速了解到代码背后的信息。完全没有注释的大段代码对于阅读者形同天书,注释是给自己看的,即使隔很长时间,也能清晰理解当时的思路;注释也是给继任者看的,使其能够快速接替自己的工作。\n\n【参考】好的命名、代码结构是自解释的,注释力求精简准确、表达到位。避免出现注释的一个极端:过多过滥的注释,代码的逻辑一旦修改,修改注释是相当大的负担。\n\n反例:\n\n// put elephant into fridge put(elephant, fridge);\n\n方法名put,加上两个有意义的变量名elephant和fridge,已经说明了这是在干什么,语义清晰的代码不需要额外的注释。\n\n【参考】特殊注释标记,请注明标记人与标记时间。注意及时处理这些标记,通过标记扫描,经常清理此类标记。线上故障有时候就是来源于这些标记处的代码。\n\n1) 待办事宜(TODO):( 标记人,标记时间,[预计处理时间])\n\n表示需要实现,但目前还未实现的功能。这实际上是一个Javadoc的标签,目前的Javadoc 还没有实现,但已经被广泛使用。只能应用于类,接口和方法(因为它是一个Javadoc标签)。\n\n2) 错误,不能工作(FIXME):(标记人,标记时间,[预计处理时间])\n\n在注释中用FIXME标记某代码是错误的,而且不能工作,需要及时纠正的情况。\n\n(九)其它\n【强制】在使用正则表达式时,利用好其预编译功能,可以有效加快正则匹配速度。\n\n说明:不要在方法体内定义:Pattern pattern = Pattern.compile(规则);\n\n【强制】velocity调用POJO类的属性时,建议直接使用属性名取值即可,模板引擎会自动按\n\n规范调用POJO的getXxx(),如果是boolean基本数据类型变量(boolean命名不需要加is 前缀),会自动调用isXxx()方法。\n\n说明:注意如果是Boolean包装类对象,优先调用getXxx()的方法。\n\n【强制】后台输送给页面的变量必须加$!{var}——中间的感叹号。\n\n说明:如果var=null或者不存在,那么${var}会直接显示在页面上。\n\n【强制】注意 Math.random() 这个方法返回是double类型,注意取值的范围 0≤x<1(能够取到零值,注意除零异常),如果想获取整数类型的随机数,不要将x放大10的若干倍然后取整,直接使用Random对象的nextInt或者nextLong方法。\n\n【强制】获取当前毫秒数System.currentTimeMillis(); 而不是new Date().getTime(); 说明:如果想获取更加精确的纳秒级时间值,使用System.nanoTime()的方式。在JDK8中,针对统计时间等场景,推荐使用Instant类。\n\n【推荐】不要在视图模板中加入任何复杂的逻辑。\n\n说明:根据 MVC 理论,视图的职责是展示,不要抢模型和控制器的活。\n\n【推荐】任何数据结构的构造或初始化,都应指定大小,避免数据结构无限增长吃光内存。\n\n【推荐】及时清理不再使用的代码段或配置信息。\n\n说明:对于垃圾代码或过时配置,坚决清理干净,避免程序过度臃肿,代码冗余。\n\n正例:对于暂时被注释掉,后续可能恢复使用的代码片断,在注释代码上方,统一规定使用三个斜杠(///)来说明注释掉代码的理由。", "segmentation_method": "reviewed_source_semantics", "label": "一、编程规约", "source_line_range": [ 110, 996 ] }, { "id": "body-region-3", "text": "二 异 常 日 志 一 异 常 处 理 强 制 java 类 库 中 定 义 的 一 类 runtimeexception 可 以 通 过 预 先 检 查 进 行 规 避 而 不 应 该 通 过 catch 来 处 理 比 如 indexoutofboundsexception nullpointerexception 等 等 说 明 无 法 通 过 预 检 查 的 异 常 除 外 如 在 解 析 一 个 外 部 传 来 的 字 符 串 形 式 数 字 时 通 过 catch numberformatexception 来 实 现 正 例 if obj null 反 例 try obj method catch nullpointerexception e 强 制 异 常 不 要 用 来 做 流 程 控 制 条 件 控 制 因 为 异 常 的 处 理 效 率 比 条 件 分 支 低 强 制 对 大 段 代 码 进 行 try catch 这 是 不 负 责 任 的 表 现 catch 时 请 分 清 稳 定 代 码 和 非 稳 定 代 码 稳 定 代 码 指 的 是 无 论 如 何 不 会 出 错 的 代 码 对 于 非 稳 定 代 码 的 catch 尽 可 能 进 行 区 分 异 常 类 型 再 做 对 应 的 异 常 处 理 强 制 捕 获 异 常 是 为 了 处 理 它 不 要 捕 获 了 却 什 么 都 不 处 理 而 抛 弃 之 如 果 不 想 处 理 它 请 将 该 异 常 抛 给 它 的 调 用 者 最 外 层 的 业 务 使 用 者 必 须 处 理 异 常 将 其 转 化 为 用 户 可 以 理 解 的 内 容 强 制 有 try 块 放 到 了 事 务 代 码 中 catch 异 常 后 如 果 需 要 回 滚 事 务 一 定 要 注 意 手 动 回 滚 事 务 强 制 finally 块 必 须 对 资 源 对 象 流 对 象 进 行 关 闭 有 异 常 也 要 做 try catch 说 明 如 果 jdk7 及 以 上 可 以 使 用 try with resources 方 式 强 制 不 能 在 finally 块 中 使 用 return finally 块 中 的 return 返 回 后 方 法 结 束 执 行 不 会 再 执 行 try 块 中 的 return 语 句 强 制 捕 获 异 常 与 抛 异 常 必 须 是 完 全 匹 配 或 者 捕 获 异 常 是 抛 异 常 的 父 类 说 明 如 果 预 期 对 方 抛 的 是 绣 球 实 际 接 到 的 是 铅 球 就 会 产 生 意 外 情 况 推 荐 方 法 的 返 回 值 可 以 为 null 不 强 制 返 回 空 集 合 或 者 空 对 象 等 必 须 添 加 注 释 充 分 说 明 什 么 情 况 下 会 返 回 null 值 调 用 方 需 要 进 行 null 判 断 防 止 npe 问 题 说 明 本 手 册 明 确 防 止 npe 是 调 用 者 的 责 任 即 使 被 调 用 方 法 返 回 空 集 合 或 者 空 对 象 对 调 用 者 来 说 也 并 非 高 枕 无 忧 必 须 考 虑 到 远 程 调 用 失 败 序 列 化 失 败 运 行 时 异 常 等 场 景 返 回 null 的 情 况 推 荐 防 止 npe 是 程 序 员 的 基 本 修 养 注 意 npe 产 生 的 场 景 1 返 回 类 型 为 基 本 数 据 类 型 return 包 装 数 据 类 型 的 对 象 时 自 动 拆 箱 有 可 能 产 生 npe 反 例 public int f return integer 对 象 如 果 为 null 自 动 解 箱 抛 npe 2 数 据 库 的 查 询 结 果 可 能 为 null 3 集 合 里 的 元 素 即 使 isnotempty 取 出 的 数 据 元 素 也 可 能 为 null 4 远 程 调 用 返 回 对 象 时 一 律 要 求 进 行 空 指 针 判 断 防 止 npe 5 对 于 session 中 获 取 的 数 据 建 议 npe 检 查 避 免 空 指 针 6 级 联 调 用 obj geta getb getc 一 连 串 调 用 易 产 生 npe 正 例 使 用 jdk8 的 optional 类 来 防 止 npe 问 题 推 荐 定 义 时 区 分 unchecked checked 异 常 避 免 直 接 抛 出 new runtimeexception 更 不 允 许 抛 出 exception 或 者 throwable 应 使 用 有 业 务 含 义 的 自 定 义 异 常 推 荐 业 界 已 定 义 过 的 自 定 义 异 常 如 daoexception serviceexception 等 参 考 在 代 码 中 使 用 抛 异 常 还 是 返 回 错 误 码 对 于 公 司 外 的 http api 开 放 接 口 必 须 使 用 错 误 码 而 应 用 内 部 推 荐 异 常 抛 出 跨 应 用 间 rpc 调 用 优 先 考 虑 使 用 result 方 式 封 装 issuccess 方 法 错 误 码 错 误 简 短 信 息 说 明 关 于 rpc 方 法 返 回 方 式 使 用 result 方 式 的 理 由 1 使 用 抛 异 常 返 回 方 式 调 用 方 如 果 没 有 捕 获 到 就 会 产 生 运 行 时 错 误 2 如 果 不 加 栈 信 息 只 是 new 自 定 义 异 常 加 入 自 己 的 理 解 的 error message 对 于 调 用 端 解 决 问 题 的 帮 助 不 会 太 多 如 果 加 了 栈 信 息 在 频 繁 调 用 出 错 的 情 况 下 数 据 序 列 化 和 传 输 的 性 能 损 耗 也 是 问 题 参 考 避 免 出 现 重 复 的 代 码 don t repeat yourself 即 dry 原 则 说 明 随 意 复 制 和 粘 贴 代 码 必 然 会 导 致 代 码 的 重 复 在 以 后 需 要 修 改 时 需 要 修 改 所 有 的 副 本 容 易 遗 漏 必 要 时 抽 取 共 性 方 法 或 者 抽 象 公 共 类 甚 至 是 组 件 化 正 例 一 个 类 中 有 多 个 public 方 法 都 需 要 进 行 数 行 相 同 的 参 数 校 验 操 作 这 个 时 候 请 抽 取 private boolean checkparam dto dto 二 日 志 规 约 强 制 应 用 中 不 可 直 接 使 用 日 志 系 统 log4j logback 中 的 api 而 应 依 赖 使 用 日 志 框 架 slf4j 中 的 api 使 用 门 面 模 式 的 日 志 框 架 有 利 于 维 护 和 各 个 类 的 日 志 处 理 方 式 统 一 import org slf4j logger import org slf4j loggerfactory private static final logger logger loggerfactory getlogger abc class 强 制 日 志 文 件 推 荐 至 少 保 存 15 天 因 为 有 些 异 常 具 备 以 周 为 频 次 发 生 的 特 点 强 制 应 用 中 的 扩 展 日 志 如 打 点 临 时 监 控 访 问 日 志 等 命 名 方 式 appname logtype logname log logtype 日 志 类 型 推 荐 分 类 有 stats desc monitor visit 等 logname 日 志 描 述 这 种 命 名 的 好 处 通 过 文 件 名 就 可 知 道 日 志 文 件 属 于 什 么 应 用 什 么 类 型 什 么 目 的 也 有 利 于 归 类 查 找 正 例 mppserver 应 用 中 单 独 监 控 时 区 转 换 异 常 如 mppserver monitor timezoneconvert log 说 明 推 荐 对 日 志 进 行 分 类 如 将 错 误 日 志 和 业 务 日 志 分 开 存 放 便 于 开 发 人 员 查 看 也 便 于 通 过 日 志 对 系 统 进 行 及 时 监 控 强 制 对 trace debug info 级 别 的 日 志 输 出 必 须 使 用 条 件 输 出 形 式 或 者 使 用 占 位 符 的 方 式 说 明 logger debug processing trade with id id and symbol symbol 如 果 日 志 级 别 是 warn 上 述 日 志 不 会 打 印 但 是 会 执 行 字 符 串 拼 接 操 作 如 果 symbol 是 对 象 会 执 行 tostring 方 法 浪 费 了 系 统 资 源 执 行 了 上 述 操 作 最 终 日 志 却 没 有 打 印 正 例 条 件 if logger isdebugenabled logger debug processing trade with id id and symbol symbol 正 例 占 位 符 logger debug processing trade with id and symbol id symbol 强 制 避 免 重 复 打 印 日 志 浪 费 磁 盘 空 间 务 必 在 log4j xml 中 设 置 additivity false 正 例 logger name com taobao dubbo config additivity false 强 制 异 常 信 息 应 该 包 括 两 类 信 息 案 发 现 场 信 息 和 异 常 堆 栈 信 息 如 果 不 处 理 那 么 通 过 关 键 字 throws 往 上 抛 出 正 例 logger error 各 类 参 数 或 者 对 象 tostring e getmessage e 推 荐 谨 慎 地 记 录 日 志 生 产 环 境 禁 止 输 出 debug 日 志 有 选 择 地 输 出 info 日 志 如 果 使 用 warn 来 记 录 刚 上 线 时 的 业 务 行 为 信 息 一 定 要 注 意 日 志 输 出 量 的 问 题 避 免 把 服 务 器 磁 盘 撑 爆 并 记 得 及 时 删 除 这 些 观 察 日 志 说 明 大 量 地 输 出 无 效 日 志 不 利 于 系 统 性 能 提 升 也 不 利 于 快 速 定 位 错 误 点 记 录 日 志 时 请 思 考 这 些 日 志 真 的 有 人 看 吗 看 到 这 条 日 志 你 能 做 什 么 能 不 能 给 问 题 排 查 带 来 好 处 参 考 可 以 使 用 warn 日 志 级 别 来 记 录 用 户 输 入 参 数 错 误 的 情 况 避 免 用 户 投 诉 时 无 所 适 从 注 意 日 志 输 出 的 级 别 error 级 别 只 记 录 系 统 逻 辑 出 错 异 常 等 重 要 的 错 误 信 息 如 非 必 要 请 不 要 在 此 场 景 打 出 error 级 别", "source_text": "二、异常日志\n(一)异常处理\n【强制】Java 类库中定义的一类RuntimeException可以通过预先检查进行规避,而不应该通过catch 来处理,比如:IndexOutOfBoundsException,NullPointerException等等。说明:无法通过预检查的异常除外,如在解析一个外部传来的字符串形式数字时,通过catch\n\nNumberFormatException来实现。\n\n正例:if (obj != null) {...}\n\n反例:try { obj.method() } catch (NullPointerException e) {...}\n\n【强制】异常不要用来做流程控制,条件控制,因为异常的处理效率比条件分支低。\n\n【强制】对大段代码进行try-catch,这是不负责任的表现。catch时请分清稳定代码和非稳定代码,稳定代码指的是无论如何不会出错的代码。对于非稳定代码的catch尽可能进行区分异常类型,再做对应的异常处理。\n\n【强制】捕获异常是为了处理它,不要捕获了却什么都不处理而抛弃之,如果不想处理它,请将该异常抛给它的调用者。最外层的业务使用者,必须处理异常,将其转化为用户可以理解的内容。\n\n【强制】有try块放到了事务代码中,catch异常后,如果需要回滚事务,一定要注意手动回滚事务。\n\n【强制】finally块必须对资源对象、流对象进行关闭,有异常也要做try-catch。\n\n说明:如果JDK7及以上,可以使用try-with-resources方式。\n\n【强制】不能在finally块中使用return,finally块中的return返回后方法结束执行,不会再执行try块中的return语句。\n\n【强制】捕获异常与抛异常,必须是完全匹配,或者捕获异常是抛异常的父类。\n\n说明:如果预期对方抛的是绣球,实际接到的是铅球,就会产生意外情况。\n\n【推荐】方法的返回值可以为null,不强制返回空集合,或者空对象等,必须添加注释充分\n\n说明什么情况下会返回null值。调用方需要进行null判断防止NPE问题。\n\n说明:本手册明确防止NPE是调用者的责任。即使被调用方法返回空集合或者空对象,对调用\n\n者来说,也并非高枕无忧,必须考虑到远程调用失败、序列化失败、运行时异常等场景返回 null的情况。\n\n【推荐】防止NPE,是程序员的基本修养,注意NPE产生的场景:\n\n1) 返回类型为基本数据类型,return 包装数据类型的对象时,自动拆箱有可能产生 NPE。\n\n反例:public int f() { return Integer对象}, 如果为null,自动解箱抛NPE。\n\n2) 数据库的查询结果可能为null。\n\n3) 集合里的元素即使isNotEmpty,取出的数据元素也可能为null。\n\n4) 远程调用返回对象时,一律要求进行空指针判断,防止NPE。\n\n5) 对于Session中获取的数据,建议NPE检查,避免空指针。\n\n6) 级联调用obj.getA().getB().getC();一连串调用,易产生NPE。\n\n正例:使用JDK8的Optional类来防止NPE问题。\n\n【推荐】定义时区分unchecked / checked 异常,避免直接抛出new RuntimeException(),更不允许抛出Exception或者Throwable,应使用有业务含义的自定义异常。推荐业界已定义过的自定义异常,如:DAOException / ServiceException等。\n\n【参考】在代码中使用“抛异常”还是“返回错误码”,对于公司外的http/api开放接口必须使用“错误码”;而应用内部推荐异常抛出;跨应用间RPC调用优先考虑使用Result方式,封装isSuccess()方法、“错误码”、“错误简短信息”。\n\n说明:关于RPC方法返回方式使用Result方式的理由:\n\n1) 使用抛异常返回方式,调用方如果没有捕获到就会产生运行时错误。\n\n2) 如果不加栈信息,只是new自定义异常,加入自己的理解的error message,对于调用端解决问题的帮助不会太多。如果加了栈信息,在频繁调用出错的情况下,数据序列化和传输的性能损耗也是问题。\n\n【参考】避免出现重复的代码(Don’t Repeat Yourself),即DRY原则。\n\n说明:随意复制和粘贴代码,必然会导致代码的重复,在以后需要修改时,需要修改所有的副本,容易遗漏。必要时抽取共性方法,或者抽象公共类,甚至是组件化。\n\n正例:一个类中有多个public方法,都需要进行数行相同的参数校验操作,这个时候请抽取:\n\nprivate boolean checkParam(DTO dto) {...}\n\n(二)日志规约\n【强制】应用中不可直接使用日志系统(Log4j、Logback)中的API,而应依赖使用日志框架\n\nSLF4J中的API,使用门面模式的日志框架,有利于维护和各个类的日志处理方式统一。\n\nimport org.slf4j.Logger;\n\nimport org.slf4j.LoggerFactory;\n\nprivate static final Logger logger = LoggerFactory.getLogger(Abc.class);\n\n【强制】日志文件推荐至少保存15天,因为有些异常具备以“周”为频次发生的特点。\n\n【强制】应用中的扩展日志(如打点、临时监控、访问日志等)命名方式:\n\nappName_logType_logName.log。logType:日志类型,推荐分类有\n\nstats/desc/monitor/visit等;logName:日志描述。这种命名的好处:通过文件名就可知道日志文件属于什么应用,什么类型,什么目的,也有利于归类查找。正例:mppserver应用中单独监控时区转换异常,如:\n\nmppserver_monitor_timeZoneConvert.log\n\n说明:推荐对日志进行分类,如将错误日志和业务日志分开存放,便于开发人员查看,也便于通过日志对系统进行及时监控。\n\n【强制】对trace/debug/info级别的日志输出,必须使用条件输出形式或者使用占位符的方式。\n\n说明:logger.debug(\"Processing trade with id: \" + id + \" and symbol: \" + symbol);\n\n如果日志级别是warn,上述日志不会打印,但是会执行字符串拼接操作,如果symbol是对象,会执行toString()方法,浪费了系统资源,执行了上述操作,最终日志却没有打印。\n\n正例:(条件)\n\nif (logger.isDebugEnabled()) { logger.debug(\"Processing trade with id: \" + id + \" and symbol: \" + symbol);\n\n}\n\n正例:(占位符)\n\nlogger.debug(\"Processing trade with id: {} and symbol : {} \", id, symbol);\n\n【强制】避免重复打印日志,浪费磁盘空间,务必在log4j.xml中设置additivity=false。\n\n正例:\n\n【强制】异常信息应该包括两类信息:案发现场信息和异常堆栈信息。如果不处理,那么通过关键字throws往上抛出。\n\n正例:logger.error(各类参数或者对象toString + \"_\" + e.getMessage(), e);\n\n【推荐】谨慎地记录日志。生产环境禁止输出debug日志;有选择地输出info日志;如果使用warn来记录刚上线时的业务行为信息,一定要注意日志输出量的问题,避免把服务器磁盘撑爆,并记得及时删除这些观察日志。\n\n说明:大量地输出无效日志,不利于系统性能提升,也不利于快速定位错误点。记录日志时请思考:这些日志真的有人看吗?看到这条日志你能做什么?能不能给问题排查带来好处?\n\n【参考】可以使用warn日志级别来记录用户输入参数错误的情况,避免用户投诉时,无所适从。注意日志输出的级别,error级别只记录系统逻辑出错、异常等重要的错误信息。如非必要,请不要在此场景打出error级别。", "segmentation_method": "reviewed_source_semantics", "label": "二、异常日志", "source_line_range": [ 997, 1120 ] }, { "id": "body-region-4", "text": "三 单 元 测 试 强 制 好 的 单 元 测 试 必 须 遵 守 air 原 则 说 明 单 元 测 试 在 线 上 运 行 时 感 觉 像 空 气 air 一 样 并 不 存 在 但 在 测 试 质 量 的 保 障 上 却 是 非 常 关 键 的 好 的 单 元 测 试 宏 观 上 来 说 具 有 自 动 化 独 立 性 可 重 复 执 行 的 特 点 l a automatic 自 动 化 l i independent 独 立 性 l r repeatable 可 重 复 强 制 单 元 测 试 应 该 是 全 自 动 执 行 的 并 且 非 交 互 式 的 测 试 框 架 通 常 是 定 期 执 行 的 执 行 过 程 必 须 完 全 自 动 化 才 有 意 义 输 出 结 果 需 要 人 工 检 查 的 测 试 不 是 一 个 好 的 单 元 测 试 单 元 测 试 中 不 准 使 用 system out 来 进 行 人 肉 验 证 必 须 使 用 assert 来 验 证 强 制 保 持 单 元 测 试 的 独 立 性 为 了 保 证 单 元 测 试 稳 定 可 靠 且 便 于 维 护 单 元 测 试 用 例 之 间 决 不 能 互 相 调 用 也 不 能 依 赖 执 行 的 先 后 次 序 反 例 method2 需 要 依 赖 method1 的 执 行 将 执 行 结 果 做 为 method2 的 输 入 强 制 单 元 测 试 是 可 以 重 复 执 行 的 不 能 受 到 外 界 环 境 的 影 响 说 明 单 元 测 试 通 常 会 被 放 到 持 续 集 成 中 每 次 有 代 码 check in 时 单 元 测 试 都 会 被 执 行 如 果 单 测 对 外 部 环 境 网 络 服 务 中 间 件 等 有 依 赖 容 易 导 致 持 续 集 成 机 制 的 不 可 用 正 例 为 了 不 受 外 界 环 境 影 响 要 求 设 计 代 码 时 就 把 sut 的 依 赖 改 成 注 入 在 测 试 时 用 spring 这 样 的 di 框 架 注 入 一 个 本 地 内 存 实 现 或 者 mock 实 现 强 制 对 于 单 元 测 试 要 保 证 测 试 粒 度 足 够 小 有 助 于 精 确 定 位 问 题 单 测 粒 度 至 多 是 类 级 别 一 般 是 方 法 级 别 说 明 只 有 测 试 粒 度 小 才 能 在 出 错 时 尽 快 定 位 到 出 错 位 置 单 测 不 负 责 检 查 跨 类 或 者 跨 系 统 的 交 互 逻 辑 那 是 集 成 测 试 的 领 域 强 制 核 心 业 务 核 心 应 用 核 心 模 块 的 增 量 代 码 确 保 单 元 测 试 通 过 说 明 新 增 代 码 及 时 补 充 单 元 测 试 如 果 新 增 代 码 影 响 了 原 有 单 元 测 试 请 及 时 修 正 强 制 单 元 测 试 代 码 必 须 写 在 如 下 工 程 目 录 src test java 不 允 许 写 在 业 务 代 码 目 录 下 说 明 源 码 构 建 时 会 跳 过 此 目 录 而 单 元 测 试 框 架 默 认 是 扫 描 此 目 录 推 荐 单 元 测 试 的 基 本 目 标 语 句 覆 盖 率 达 到 70 核 心 模 块 的 语 句 覆 盖 率 和 分 支 覆 盖 率 都 要 达 到 100 说 明 在 工 程 规 约 的 应 用 分 层 中 提 到 的 dao 层 manager 层 可 重 用 度 高 的 service 都 应 该 进 行 单 元 测 试 推 荐 编 写 单 元 测 试 代 码 遵 守 bcde 原 则 以 保 证 被 测 试 模 块 的 交 付 质 量 l b border 边 界 值 测 试 包 括 循 环 边 界 特 殊 取 值 特 殊 时 间 点 数 据 顺 序 等 l c correct 正 确 的 输 入 并 得 到 预 期 的 结 果 l d design 与 设 计 文 档 相 结 合 来 编 写 单 元 测 试 l e error 强 制 错 误 信 息 输 入 如 非 法 数 据 异 常 流 程 非 业 务 允 许 输 入 等 并 得 到 预 期 的 结 果 推 荐 对 于 数 据 库 相 关 的 查 询 更 新 删 除 等 操 作 不 能 假 设 数 据 库 里 的 数 据 是 存 在 的 或 者 直 接 操 作 数 据 库 把 数 据 插 入 进 去 请 使 用 程 序 插 入 或 者 导 入 数 据 的 方 式 来 准 备 数 据 反 例 删 除 某 一 行 数 据 的 单 元 测 试 在 数 据 库 中 先 直 接 手 动 增 加 一 行 作 为 删 除 目 标 但 是 这 一 行 新 增 数 据 并 不 符 合 业 务 插 入 规 则 导 致 测 试 结 果 异 常 推 荐 和 数 据 库 相 关 的 单 元 测 试 可 以 设 定 自 动 回 滚 机 制 不 给 数 据 库 造 成 脏 数 据 或 者 对 单 元 测 试 产 生 的 数 据 有 明 确 的 前 后 缀 标 识 正 例 在 rdc 内 部 单 元 测 试 中 使 用 rdc unit test 的 前 缀 标 识 数 据 推 荐 对 于 不 可 测 的 代 码 建 议 做 必 要 的 重 构 使 代 码 变 得 可 测 避 免 为 了 达 到 测 试 要 求 而 书 写 不 规 范 测 试 代 码 推 荐 在 设 计 评 审 阶 段 开 发 人 员 需 要 和 测 试 人 员 一 起 确 定 单 元 测 试 范 围 单 元 测 试 最 好 覆 盖 所 有 测 试 用 例 uc 推 荐 单 元 测 试 作 为 一 种 质 量 保 障 手 段 不 建 议 项 目 发 布 后 补 充 单 元 测 试 用 例 建 议 在 项 目 提 测 前 完 成 单 元 测 试 参 考 为 了 更 方 便 地 进 行 单 元 测 试 业 务 代 码 应 避 免 以 下 情 况 l 构 造 方 法 中 做 的 事 情 过 多 l 存 在 过 多 的 全 局 变 量 和 静 态 方 法 l 存 在 过 多 的 外 部 依 赖 l 存 在 过 多 的 条 件 语 句 说 明 多 层 条 件 语 句 建 议 使 用 卫 语 句 策 略 模 式 状 态 模 式 等 方 式 重 构 参 考 不 要 对 单 元 测 试 存 在 如 下 误 解 l 那 是 测 试 同 学 干 的 事 情 本 文 是 开 发 手 册 凡 是 本 文 内 容 都 是 与 开 发 同 学 强 相 关 的 l 单 元 测 试 代 码 是 多 余 的 汽 车 的 整 体 功 能 与 各 单 元 部 件 的 测 试 正 常 与 否 是 强 相 关 的 l 单 元 测 试 代 码 不 需 要 维 护 一 年 半 载 后 那 么 单 元 测 试 几 乎 处 于 废 弃 状 态 l 单 元 测 试 与 线 上 故 障 没 有 辩 证 关 系 好 的 单 元 测 试 能 够 最 大 限 度 地 规 避 线 上 故 障 四 安 全 规 约 强 制 隶 属 于 用 户 个 人 的 页 面 或 者 功 能 必 须 进 行 权 限 控 制 校 验 说 明 防 止 没 有 做 水 平 权 限 校 验 就 可 随 意 访 问 修 改 删 除 别 人 的 数 据 比 如 查 看 他 人 的 私 信 内 容 修 改 他 人 的 订 单 强 制 用 户 敏 感 数 据 禁 止 直 接 展 示 必 须 对 展 示 数 据 进 行 脱 敏 说 明 查 看 个 人 手 机 号 码 会 显 示 成 158 9119 隐 藏 中 间 4 位 防 止 隐 私 泄 露 强 制 用 户 输 入 的 sql 参 数 严 格 使 用 参 数 绑 定 或 者 metadata 字 段 值 限 定 防 止 sql 注 入 禁 止 字 符 串 拼 接 sql 访 问 数 据 库 强 制 用 户 请 求 传 入 的 任 何 参 数 必 须 做 有 效 性 验 证 说 明 忽 略 参 数 校 验 可 能 导 致 l page size 过 大 导 致 内 存 溢 出 l 恶 意 order by 导 致 数 据 库 慢 查 询 l 任 意 重 定 向 l sql 注 入 l 反 序 列 化 注 入 l 正 则 输 入 源 串 拒 绝 服 务 redos 说 明 java 代 码 用 正 则 来 验 证 客 户 端 的 输 入 有 些 正 则 写 法 验 证 普 通 用 户 输 入 没 有 问 题 但 是 如 果 攻 击 人 员 使 用 的 是 特 殊 构 造 的 字 符 串 来 验 证 有 可 能 导 致 死 循 环 的 结 果 强 制 禁 止 向 html 页 面 输 出 未 经 安 全 过 滤 或 未 正 确 转 义 的 用 户 数 据 强 制 表 单 ajax 提 交 必 须 执 行 csrf 安 全 过 滤 说 明 csrf cross site request forgery 跨 站 请 求 伪 造 是 一 类 常 见 编 程 漏 洞 对 于 存 在 csrf 漏 洞 的 应 用 网 站 攻 击 者 可 以 事 先 构 造 好 url 只 要 受 害 者 用 户 一 访 问 后 台 便 在 用 户 不 知 情 情 况 下 对 数 据 库 中 用 户 参 数 进 行 相 应 修 改 强 制 在 使 用 平 台 资 源 譬 如 短 信 邮 件 电 话 下 单 支 付 必 须 实 现 正 确 的 防 重 放 限 制 如 数 量 限 制 疲 劳 度 控 制 验 证 码 校 验 避 免 被 滥 刷 资 损 说 明 如 注 册 时 发 送 验 证 码 到 手 机 如 果 没 有 限 制 次 数 和 频 率 那 么 可 以 利 用 此 功 能 骚 扰 到 其 它 用 户 并 造 成 短 信 平 台 资 源 浪 费 推 荐 发 贴 评 论 发 送 即 时 消 息 等 用 户 生 成 内 容 的 场 景 必 须 实 现 防 刷 文 本 内 容 违 禁 词 过 滤 等 风 控 策 略 五 mysql 数 据 库 一 建 表 规 约 强 制 表 达 是 与 否 概 念 的 字 段 必 须 使 用 is xxx 的 方 式 命 名 数 据 类 型 是 unsigned tinyint 1 表 示 是 0 表 示 否 说 明 任 何 字 段 如 果 为 非 负 数 必 须 是 unsigned 正 例 表 达 逻 辑 删 除 的 字 段 名 is deleted 1 表 示 删 除 0 表 示 未 删 除 强 制 表 名 字 段 名 必 须 使 用 小 写 字 母 或 数 字 禁 止 出 现 数 字 开 头 禁 止 两 个 下 划 线 中 间 只 出 现 数 字 数 据 库 字 段 名 的 修 改 代 价 很 大 因 为 无 法 进 行 预 发 布 所 以 字 段 名 称 需 要 慎 重 考 虑 说 明 mysql 在 windows 下 不 区 分 大 小 写 但 在 linux 下 默 认 是 区 分 大 小 写 因 此 数 据 库 名 表 名 字 段 名 都 不 允 许 出 现 任 何 大 写 字 母 避 免 节 外 生 枝 正 例 aliyun admin rdc config level3 name 反 例 aliyunadmin rdcconfig level 3 name 强 制 表 名 不 使 用 复 数 名 词 说 明 表 名 应 该 仅 仅 表 示 表 里 面 的 实 体 内 容 不 应 该 表 示 实 体 数 量 对 应 于 do 类 名 也 是 单 数 形 式 符 合 表 达 习 惯 强 制 禁 用 保 留 字 如 desc range match delayed 等 请 参 考 mysql 官 方 保 留 字 强 制 主 键 索 引 名 为 pk 字 段 名 唯 一 索 引 名 为 uk 字 段 名 普 通 索 引 名 则 为 idx 字 段 名 说 明 pk 即 primary key uk 即 unique key idx 即 index 的 简 称 强 制 小 数 类 型 为 decimal 禁 止 使 用 float 和 double 说 明 float 和 double 在 存 储 的 时 候 存 在 精 度 损 失 的 问 题 很 可 能 在 值 的 比 较 时 得 到 不 正 确 的 结 果 如 果 存 储 的 数 据 范 围 超 过 decimal 的 范 围 建 议 将 数 据 拆 成 整 数 和 小 数 分 开 存 储 强 制 如 果 存 储 的 字 符 串 长 度 几 乎 相 等 使 用 char 定 长 字 符 串 类 型 强 制 varchar 是 可 变 长 字 符 串 不 预 先 分 配 存 储 空 间 长 度 不 要 超 过 5000 如 果 存 储 长 度 大 于 此 值 定 义 字 段 类 型 为 text 独 立 出 来 一 张 表 用 主 键 来 对 应 避 免 影 响 其 它 字 段 索 引 效 率 强 制 表 必 备 三 字 段 id gmt create gmt modified 说 明 其 中 id 必 为 主 键 类 型 为 unsigned bigint 单 表 时 自 增 步 长 为 1 gmt create gmt modified 的 类 型 均 为 date time 类 型 前 者 现 在 时 表 示 主 动 创 建 后 者 过 去 分 词 表 示 被 动 更 新 推 荐 表 的 命 名 最 好 是 加 上 业 务 名 称 表 的 作 用 正 例 alipay task force project trade config 推 荐 库 名 与 应 用 名 称 尽 量 一 致 推 荐 如 果 修 改 字 段 含 义 或 对 字 段 表 示 的 状 态 追 加 时 需 要 及 时 更 新 字 段 注 释 推 荐 字 段 允 许 适 当 冗 余 以 提 高 查 询 性 能 但 必 须 考 虑 数 据 一 致 冗 余 字 段 应 遵 循 1 不 是 频 繁 修 改 的 字 段 2 不 是 varchar 超 长 字 段 更 不 能 是 text 字 段 正 例 商 品 类 目 名 称 使 用 频 率 高 字 段 长 度 短 名 称 基 本 一 成 不 变 可 在 相 关 联 的 表 中 冗 余 存 储 类 目 名 称 避 免 关 联 查 询 推 荐 单 表 行 数 超 过 500 万 行 或 者 单 表 容 量 超 过 2gb 才 推 荐 进 行 分 库 分 表 说 明 如 果 预 计 三 年 后 的 数 据 量 根 本 达 不 到 这 个 级 别 请 不 要 在 创 建 表 时 就 分 库 分 表 参 考 合 适 的 字 符 存 储 长 度 不 但 节 约 数 据 库 表 空 间 节 约 索 引 存 储 更 重 要 的 是 提 升 检 索 速 度 正 例 如 下 表 其 中 无 符 号 值 可 以 避 免 误 存 负 数 且 扩 大 了 表 示 范 围 对 象 年 龄 区 间 类 型 字 节 表 示 范 围 人 150 岁 之 内 unsigned tinyint 1 无 符 号 值 0 到 255 龟 数 百 岁 unsigned smallint 2 无 符 号 值 0 到 65535 恐 龙 化 石 数 千 万 年 unsigned int 4 无 符 号 值 0 到 约 42 9 亿 太 阳 约 50 亿 年 unsigned bigint 8 无 符 号 值 0 到 约 10 的 19 次 方 二 索 引 规 约 强 制 业 务 上 具 有 唯 一 特 性 的 字 段 即 使 是 多 个 字 段 的 组 合 也 必 须 建 成 唯 一 索 引 说 明 不 要 以 为 唯 一 索 引 影 响 了 insert 速 度 这 个 速 度 损 耗 可 以 忽 略 但 提 高 查 找 速 度 是 明 显 的 另 外 即 使 在 应 用 层 做 了 非 常 完 善 的 校 验 控 制 只 要 没 有 唯 一 索 引 根 据 墨 菲 定 律 必 然 有 脏 数 据 产 生 强 制 超 过 三 个 表 禁 止 join 需 要 join 的 字 段 数 据 类 型 必 须 绝 对 一 致 多 表 关 联 查 询 时 保 证 被 关 联 的 字 段 需 要 有 索 引 说 明 即 使 双 表 join 也 要 注 意 表 索 引 sql 性 能 强 制 在 varchar 字 段 上 建 立 索 引 时 必 须 指 定 索 引 长 度 没 必 要 对 全 字 段 建 立 索 引 根 据 实 际 文 本 区 分 度 决 定 索 引 长 度 即 可 说 明 索 引 的 长 度 与 区 分 度 是 一 对 矛 盾 体 一 般 对 字 符 串 类 型 数 据 长 度 为 20 的 索 引 区 分 度 会 高 达 90 以 上 可 以 使 用 count distinct left 列 名 索 引 长 度 count 的 区 分 度 来 确 定 强 制 页 面 搜 索 严 禁 左 模 糊 或 者 全 模 糊 如 果 需 要 请 走 搜 索 引 擎 来 解 决 说 明 索 引 文 件 具 有 b tree 的 最 左 前 缀 匹 配 特 性 如 果 左 边 的 值 未 确 定 那 么 无 法 使 用 此 索 引 推 荐 如 果 有 order by 的 场 景 请 注 意 利 用 索 引 的 有 序 性 order by 最 后 的 字 段 是 组 合 索 引 的 一 部 分 并 且 放 在 索 引 组 合 顺 序 的 最 后 避 免 出 现 file sort 的 情 况 影 响 查 询 性 能 正 例 where a and b order by c 索 引 a b c 反 例 索 引 中 有 范 围 查 找 那 么 索 引 有 序 性 无 法 利 用 如 where a 10 order by b 索 引 a b 无 法 排 序 推 荐 利 用 覆 盖 索 引 来 进 行 查 询 操 作 避 免 回 表 说 明 如 果 一 本 书 需 要 知 道 第 11 章 是 什 么 标 题 会 翻 开 第 11 章 对 应 的 那 一 页 吗 目 录 浏 览 一 下 就 好 这 个 目 录 就 是 起 到 覆 盖 索 引 的 作 用 正 例 能 够 建 立 索 引 的 种 类 主 键 索 引 唯 一 索 引 普 通 索 引 而 覆 盖 索 引 是 一 种 查 询 的 一 种 效 果 用 explain 的 结 果 extra 列 会 出 现 using index 推 荐 利 用 延 迟 关 联 或 者 子 查 询 优 化 超 多 分 页 场 景 说 明 mysql 并 不 是 跳 过 offset 行 而 是 取 offset n 行 然 后 返 回 放 弃 前 offset 行 返 回 n 行 那 当 offset 特 别 大 的 时 候 效 率 就 非 常 的 低 下 要 么 控 制 返 回 的 总 页 数 要 么 对 超 过 特 定 阈 值 的 页 数 进 行 sql 改 写 正 例 先 快 速 定 位 需 要 获 取 的 id 段 然 后 再 关 联 select a from 表 1 a select id from 表 1 where 条 件 limit 100000 20 b where a id b id 推 荐 sql 性 能 优 化 的 目 标 至 少 要 达 到 range 级 别 要 求 是 ref 级 别 如 果 可 以 是 consts 最 好 说 明 1 consts 单 表 中 最 多 只 有 一 个 匹 配 行 主 键 或 者 唯 一 索 引 在 优 化 阶 段 即 可 读 取 到 数 据 2 ref 指 的 是 使 用 普 通 的 索 引 normal index 3 range 对 索 引 进 行 范 围 检 索 反 例 explain 表 的 结 果 type index 索 引 物 理 文 件 全 扫 描 速 度 非 常 慢 这 个 index 级 别 比 较 range 还 低 与 全 表 扫 描 是 小 巫 见 大 巫 推 荐 建 组 合 索 引 的 时 候 区 分 度 最 高 的 在 最 左 边 正 例 如 果 where a and b a 列 的 几 乎 接 近 于 唯 一 值 那 么 只 需 要 单 建 idx a 索 引 即 可 说 明 存 在 非 等 号 和 等 号 混 合 判 断 条 件 时 在 建 索 引 时 请 把 等 号 条 件 的 列 前 置 如 where a and b 那 么 即 使 a 的 区 分 度 更 高 也 必 须 把 b 放 在 索 引 的 最 前 列 推 荐 防 止 因 字 段 类 型 不 同 造 成 的 隐 式 转 换 导 致 索 引 失 效 参 考 创 建 索 引 时 避 免 有 如 下 极 端 误 解 1 宁 滥 勿 缺 认 为 一 个 查 询 就 需 要 建 一 个 索 引 2 宁 缺 勿 滥 认 为 索 引 会 消 耗 空 间 严 重 拖 慢 更 新 和 新 增 速 度 3 抵 制 惟 一 索 引 认 为 业 务 的 惟 一 性 一 律 需 要 在 应 用 层 通 过 先 查 后 插 方 式 解 决 三 sql 语 句 强 制 不 要 使 用 count 列 名 或 count 常 量 来 替 代 count count 是 sql92 定 义 的 标 准 统 计 行 数 的 语 法 跟 数 据 库 无 关 跟 null 和 非 null 无 关 说 明 count 会 统 计 值 为 null 的 行 而 count 列 名 不 会 统 计 此 列 为 null 值 的 行 强 制 count distinct col 计 算 该 列 除 null 之 外 的 不 重 复 行 数 注 意 count distinct col1 col2 如 果 其 中 一 列 全 为 null 那 么 即 使 另 一 列 有 不 同 的 值 也 返 回 为 0 强 制 当 某 一 列 的 值 全 是 null 时 count col 的 返 回 结 果 为 0 但 sum col 的 返 回 结 果 为 null 因 此 使 用 sum 时 需 注 意 npe 问 题 正 例 可 以 使 用 如 下 方 式 来 避 免 sum 的 npe 问 题 select if isnull sum g 0 sum g from table 强 制 使 用 isnull 来 判 断 是 否 为 null 值 说 明 null 与 任 何 值 的 直 接 比 较 都 为 null 1 null null 的 返 回 结 果 是 null 而 不 是 false 2 null null 的 返 回 结 果 是 null 而 不 是 true 3 null 1 的 返 回 结 果 是 null 而 不 是 true 强 制 在 代 码 中 写 分 页 查 询 逻 辑 时 若 count 为 0 应 直 接 返 回 避 免 执 行 后 面 的 分 页 语 句 强 制 不 得 使 用 外 键 与 级 联 一 切 外 键 概 念 必 须 在 应 用 层 解 决 说 明 以 学 生 和 成 绩 的 关 系 为 例 学 生 表 中 的 student id 是 主 键 那 么 成 绩 表 中 的 student id 则 为 外 键 如 果 更 新 学 生 表 中 的 student id 同 时 触 发 成 绩 表 中 的 student id 更 新 即 为 级 联 更 新 外 键 与 级 联 更 新 适 用 于 单 机 低 并 发 不 适 合 分 布 式 高 并 发 集 群 级 联 更 新 是 强 阻 塞 存 在 数 据 库 更 新 风 暴 的 风 险 外 键 影 响 数 据 库 的 插 入 速 度 强 制 禁 止 使 用 存 储 过 程 存 储 过 程 难 以 调 试 和 扩 展 更 没 有 移 植 性 强 制 数 据 订 正 时 删 除 和 修 改 记 录 时 要 先 select 避 免 出 现 误 删 除 确 认 无 误 才 能 执 行 更 新 语 句 推 荐 in 操 作 能 避 免 则 避 免 若 实 在 避 免 不 了 需 要 仔 细 评 估 in 后 边 的 集 合 元 素 数 量 控 制 在 1000 个 之 内 参 考 如 果 有 全 球 化 需 要 所 有 的 字 符 存 储 与 表 示 均 以 utf 8 编 码 注 意 字 符 统 计 函 数 的 区 别 说 明 select length 轻 松 工 作 返 回 为 12 select character length 轻 松 工 作 返 回 为 4 如 果 需 要 存 储 表 情 那 么 选 择 utfmb4 来 进 行 存 储 注 意 它 与 utf 8 编 码 的 区 别 参 考 truncate table 比 delete 速 度 快 且 使 用 的 系 统 和 事 务 日 志 资 源 少 但 truncate 无 事 务 且 不 触 发 trigger 有 可 能 造 成 事 故 故 不 建 议 在 开 发 代 码 中 使 用 此 语 句 说 明 truncate table 在 功 能 上 与 不 带 where 子 句 的 delete 语 句 相 同 四 orm 映 射 强 制 在 表 查 询 中 一 律 不 要 使 用 作 为 查 询 的 字 段 列 表 需 要 哪 些 字 段 必 须 明 确 写 明 说 明 1 增 加 查 询 分 析 器 解 析 成 本 2 增 减 字 段 容 易 与 resultmap 配 置 不 一 致 强 制 pojo 类 的 布 尔 属 性 不 能 加 is 而 数 据 库 字 段 必 须 加 is 要 求 在 resultmap 中 进 行 字 段 与 属 性 之 间 的 映 射 说 明 参 见 定 义 pojo 类 以 及 数 据 库 字 段 定 义 规 定 在 resultmap 中 增 加 映 射 是 必 须 的 在 mybatis generator 生 成 的 代 码 中 需 要 进 行 对 应 的 修 改 强 制 不 要 用 resultclass 当 返 回 参 数 即 使 所 有 类 属 性 名 与 数 据 库 字 段 一 一 对 应 也 需 要 定 义 反 过 来 每 一 个 表 也 必 然 有 一 个 与 之 对 应 说 明 配 置 映 射 关 系 使 字 段 与 do 类 解 耦 方 便 维 护 强 制 sql xml 配 置 参 数 使 用 param 不 要 使 用 此 种 方 式 容 易 出 现 sql 注 入 强 制 ibatis 自 带 的 queryforlist string statementname int start int size 不 推 荐 使 用 说 明 其 实 现 方 式 是 在 数 据 库 取 到 statementname 对 应 的 sql 语 句 的 所 有 记 录 再 通 过 sublist 取 start size 的 子 集 合 正 例 map string object map new hashmap string object map put start start map put size size 强 制 不 允 许 直 接 拿 hashmap 与 hashtable 作 为 查 询 结 果 集 的 输 出 说 明 resultclass hashtable 会 置 入 字 段 名 和 属 性 值 但 是 值 的 类 型 不 可 控 强 制 更 新 数 据 表 记 录 时 必 须 同 时 更 新 记 录 对 应 的 gmt modified 字 段 值 为 当 前 时 间 推 荐 不 要 写 一 个 大 而 全 的 数 据 更 新 接 口 传 入 为 pojo 类 不 管 是 不 是 自 己 的 目 标 更 新 字 段 都 进 行 update table set c1 value1 c2 value2 c3 value3 这 是 不 对 的 执 行 sql 时 不 要 更 新 无 改 动 的 字 段 一 是 易 出 错 二 是 效 率 低 三 是 增 加 binlog 存 储 参 考 transactional 事 务 不 要 滥 用 事 务 会 影 响 数 据 库 的 qps 另 外 使 用 事 务 的 地 方 需 要 考 虑 各 方 面 的 回 滚 方 案 包 括 缓 存 回 滚 搜 索 引 擎 回 滚 消 息 补 偿 统 计 修 正 等 参 考 isequal 中 的 comparevalue 是 与 属 性 值 对 比 的 常 量 一 般 是 数 字 表 示 相 等 时 带 上 此 条 件 isnotempty 表 示 不 为 空 且 不 为 null 时 执 行 isnotnull 表 示 不 为 null 值 时 执 行", "source_text": "三、单元测试\n【强制】好的单元测试必须遵守AIR原则。\n\n说明:单元测试在线上运行时,感觉像空气(AIR)一样并不存在,但在测试质量的保障上,却是非常关键的。好的单元测试宏观上来说,具有自动化、独立性、可重复执行的特点。\n\nl A:Automatic(自动化)\n\nl I:Independent(独立性)\n\nl R:Repeatable(可重复)\n\n【强制】单元测试应该是全自动执行的,并且非交互式的。测试框架通常是定期执行的,执行过程必须完全自动化才有意义。输出结果需要人工检查的测试不是一个好的单元测试。单元测试中不准使用System.out来进行人肉验证,必须使用assert来验证。\n\n【强制】保持单元测试的独立性。为了保证单元测试稳定可靠且便于维护,单元测试用例之间决不能互相调用,也不能依赖执行的先后次序。\n\n反例:method2需要依赖method1的执行,将执行结果做为method2的输入。\n\n【强制】单元测试是可以重复执行的,不能受到外界环境的影响。\n\n说明:单元测试通常会被放到持续集成中,每次有代码check in时单元测试都会被执行。如果单测对外部环境(网络、服务、中间件等)有依赖,容易导致持续集成机制的不可用。\n\n正例:为了不受外界环境影响,要求设计代码时就把SUT的依赖改成注入,在测试时用spring 这样的DI框架注入一个本地(内存)实现或者Mock实现。\n\n【强制】对于单元测试,要保证测试粒度足够小,有助于精确定位问题。单测粒度至多是类级别,一般是方法级别。\n\n说明:只有测试粒度小才能在出错时尽快定位到出错位置。单测不负责检查跨类或者跨系统的交互逻辑,那是集成测试的领域。\n\n【强制】核心业务、核心应用、核心模块的增量代码确保单元测试通过。\n\n说明:新增代码及时补充单元测试,如果新增代码影响了原有单元测试,请及时修正。\n\n【强制】单元测试代码必须写在如下工程目录:src/test/java,不允许写在业务代码目录下。\n\n说明:源码构建时会跳过此目录,而单元测试框架默认是扫描此目录。\n\n【推荐】单元测试的基本目标:语句覆盖率达到70%;核心模块的语句覆盖率和分支覆盖率都要达到100%\n\n说明:在工程规约的应用分层中提到的DAO层,Manager层,可重用度高的Service,都应该进行单元测试。\n\n【推荐】编写单元测试代码遵守BCDE原则,以保证被测试模块的交付质量。\n\nl B:Border,边界值测试,包括循环边界、特殊取值、特殊时间点、数据顺序等。\n\nl C:Correct,正确的输入,并得到预期的结果。\n\nl D:Design,与设计文档相结合,来编写单元测试。\n\nl E:Error,强制错误信息输入(如:非法数据、异常流程、非业务允许输入等),并得到预期的结果。\n\n【推荐】对于数据库相关的查询,更新,删除等操作,不能假设数据库里的数据是存在的,或者直接操作数据库把数据插入进去,请使用程序插入或者导入数据的方式来准备数据。\n\n反例:删除某一行数据的单元测试,在数据库中,先直接手动增加一行作为删除目标,但是这一行新增数据并不符合业务插入规则,导致测试结果异常。\n\n【推荐】和数据库相关的单元测试,可以设定自动回滚机制,不给数据库造成脏数据。或者对单元测试产生的数据有明确的前后缀标识。\n\n正例:在RDC内部单元测试中,使用RDC_UNIT_TEST_的前缀标识数据。\n\n【推荐】对于不可测的代码建议做必要的重构,使代码变得可测,避免为了达到测试要求而书写不规范测试代码。\n\n【推荐】在设计评审阶段,开发人员需要和测试人员一起确定单元测试范围,单元测试最好覆盖所有测试用例(UC)。\n\n【推荐】单元测试作为一种质量保障手段,不建议项目发布后补充单元测试用例,建议在项目提测前完成单元测试。\n\n【参考】为了更方便地进行单元测试,业务代码应避免以下情况:\n\nl 构造方法中做的事情过多。\n\nl 存在过多的全局变量和静态方法。\n\nl 存在过多的外部依赖。\n\nl 存在过多的条件语句。\n\n说明:多层条件语句建议使用卫语句、策略模式、状态模式等方式重构。\n\n【参考】不要对单元测试存在如下误解:\n\nl 那是测试同学干的事情。本文是开发手册,凡是本文内容都是与开发同学强相关的。 l 单元测试代码是多余的。汽车的整体功能与各单元部件的测试正常与否是强相关的。\n\nl 单元测试代码不需要维护。一年半载后,那么单元测试几乎处于废弃状态。\n\nl 单元测试与线上故障没有辩证关系。好的单元测试能够最大限度地规避线上故障。\n\n四、安全规约\n【强制】隶属于用户个人的页面或者功能必须进行权限控制校验。\n\n说明:防止没有做水平权限校验就可随意访问、修改、删除别人的数据,比如查看他人的私信内容、修改他人的订单。\n\n【强制】用户敏感数据禁止直接展示,必须对展示数据进行脱敏。\n\n说明:查看个人手机号码会显示成:158****9119,隐藏中间4位,防止隐私泄露。\n\n【强制】用户输入的SQL参数严格使用参数绑定或者METADATA字段值限定,防止SQL注入,禁止字符串拼接SQL访问数据库。\n\n【强制】用户请求传入的任何参数必须做有效性验证。\n\n说明:忽略参数校验可能导致:\n\nl page size过大导致内存溢出\n\nl 恶意order by导致数据库慢查询\n\nl 任意重定向\n\nl SQL注入\n\nl 反序列化注入\n\nl 正则输入源串拒绝服务ReDoS\n\n说明:Java 代码用正则来验证客户端的输入,有些正则写法验证普通用户输入没有问题,但是如果攻击人员使用的是特殊构造的字符串来验证,有可能导致死循环的结果。\n\n【强制】禁止向HTML页面输出未经安全过滤或未正确转义的用户数据。\n\n【强制】表单、AJAX提交必须执行CSRF安全过滤。\n\n说明:CSRF(Cross-site request forgery)跨站请求伪造是一类常见编程漏洞。对于存在\n\nCSRF漏洞的应用/网站,攻击者可以事先构造好URL,只要受害者用户一访问,后台便在用户不知情情况下对数据库中用户参数进行相应修改。\n\n【强制】在使用平台资源,譬如短信、邮件、电话、下单、支付,必须实现正确的防重放限制,如数量限制、疲劳度控制、验证码校验,避免被滥刷、资损。\n\n说明:如注册时发送验证码到手机,如果没有限制次数和频率,那么可以利用此功能骚扰到其它用户,并造成短信平台资源浪费。\n\n【推荐】发贴、评论、发送即时消息等用户生成内容的场景必须实现防刷、文本内容违禁词过滤等风控策略。\n五、MySQL数据库\n(一)建表规约\n【强制】表达是与否概念的字段,必须使用is_xxx的方式命名,数据类型是unsigned tinyint\n\n( 1表示是,0表示否)。\n\n说明:任何字段如果为非负数,必须是unsigned。\n\n正例:表达逻辑删除的字段名is_deleted,1 表示删除,0 表示未删除。\n\n【强制】表名、字段名必须使用小写字母或数字,禁止出现数字开头,禁止两个下划线中间只出现数字。数据库字段名的修改代价很大,因为无法进行预发布,所以字段名称需要慎重考虑。\n\n说明:MySQL 在 Windows 下不区分大小写,但在 Linux 下默认是区分大小写。因此,数据库名、表名、字段名,都不允许出现任何大写字母,避免节外生枝。\n\n正例:aliyun_admin,rdc_config,level3_name 反例:AliyunAdmin,rdcConfig,level_3_name\n\n【强制】表名不使用复数名词。\n\n说明:表名应该仅仅表示表里面的实体内容,不应该表示实体数量,对应于DO类名也是单数形式,符合表达习惯。\n\n【强制】禁用保留字,如desc、range、match、delayed等,请参考MySQL官方保留字。\n\n【强制】主键索引名为pk_字段名;唯一索引名为uk_字段名;普通索引名则为idx_字段名。\n\n说明:pk_ 即primary key;uk_ 即 unique key;idx_ 即index的简称。\n\n【强制】小数类型为decimal,禁止使用float和double。\n\n说明:float和double在存储的时候,存在精度损失的问题,很可能在值的比较时,得到不\n\n正确的结果。如果存储的数据范围超过decimal的范围,建议将数据拆成整数和小数分开存储。\n\n【强制】如果存储的字符串长度几乎相等,使用char定长字符串类型。\n\n【强制】varchar是可变长字符串,不预先分配存储空间,长度不要超过5000,如果存储长度大于此值,定义字段类型为text,独立出来一张表,用主键来对应,避免影响其它字段索引效率。\n\n【强制】表必备三字段:id, gmt_create, gmt_modified。\n\n说明:其中id必为主键,类型为unsigned bigint、单表时自增、步长为 1。gmt_create, gmt_modified的类型均为date_time类型,前者现在时表示主动创建,后者过去分词表示被动更新。\n\n【推荐】表的命名最好是加上“业务名称_表的作用”。\n\n正例:alipay_task / force_project / trade_config\n\n【推荐】库名与应用名称尽量一致。\n\n【推荐】如果修改字段含义或对字段表示的状态追加时,需要及时更新字段注释。\n\n【推荐】字段允许适当冗余,以提高查询性能,但必须考虑数据一致。冗余字段应遵循:\n\n1) 不是频繁修改的字段。\n\n2) 不是varchar超长字段,更不能是text字段。\n\n正例:商品类目名称使用频率高,字段长度短,名称基本一成不变,可在相关联的表中冗余存储类目名称,避免关联查询。\n\n【推荐】单表行数超过500万行或者单表容量超过2GB,才推荐进行分库分表。\n\n说明:如果预计三年后的数据量根本达不到这个级别,请不要在创建表时就分库分表。\n\n【参考】合适的字符存储长度,不但节约数据库表空间、节约索引存储,更重要的是提升检索速度。\n\n正例:如下表,其中无符号值可以避免误存负数,且扩大了表示范围。\n\n|\n\n对象\n\n|\n\n年龄区间\n\n|\n\n类型\n\n|\n\n字节\n\n|\n\n表示范围\n\n|\n|\n\n人\n\n|\n\n150岁之内\n\n|\n\nunsigned tinyint\n\n|\n\n1\n\n|\n\n无符号值:0到255\n\n|\n|\n\n龟\n\n|\n\n数百岁\n\n|\n\nunsigned smallint\n\n|\n\n2\n\n|\n\n无符号值:0到65535\n\n|\n|\n\n恐龙化石\n\n|\n\n数千万年\n\n|\n\nunsigned int\n\n|\n\n4\n\n|\n\n无符号值:0到约42.9亿\n\n|\n|\n\n太阳\n\n|\n\n约50亿年\n\n|\n\nunsigned bigint\n\n|\n\n8\n\n|\n\n无符号值:0到约10的19次方\n\n|\n\n(二)索引规约\n【强制】业务上具有唯一特性的字段,即使是多个字段的组合,也必须建成唯一索引。\n\n说明:不要以为唯一索引影响了insert速度,这个速度损耗可以忽略,但提高查找速度是明显的;另外,即使在应用层做了非常完善的校验控制,只要没有唯一索引,根据墨菲定律,必然有脏数据产生。\n\n【强制】超过三个表禁止join。需要join的字段,数据类型必须绝对一致;多表关联查询时,保证被关联的字段需要有索引。\n\n说明:即使双表join也要注意表索引、SQL性能。\n\n【强制】在varchar字段上建立索引时,必须指定索引长度,没必要对全字段建立索引,根据实际文本区分度决定索引长度即可。\n\n说明:索引的长度与区分度是一对矛盾体,一般对字符串类型数据,长度为20的索引,区分度会高达90%以上,可以使用count(distinct left(列名, 索引长度))/count(*)的区分度来确定。\n\n【强制】页面搜索严禁左模糊或者全模糊,如果需要请走搜索引擎来解决。\n\n说明:索引文件具有B-Tree的最左前缀匹配特性,如果左边的值未确定,那么无法使用此索引。\n\n【推荐】如果有order by的场景,请注意利用索引的有序性。order by 最后的字段是组合索引的一部分,并且放在索引组合顺序的最后,避免出现file_sort的情况,影响查询性能。\n\n正例:where a=? and b=? order by c; 索引:a_b_c\n\n反例:索引中有范围查找,那么索引有序性无法利用,如:WHERE a>10 ORDER BY b; 索引 a_b无法排序。\n\n【推荐】利用覆盖索引来进行查询操作,避免回表。\n\n说明:如果一本书需要知道第11章是什么标题,会翻开第11章对应的那一页吗?目录浏览一下就好,这个目录就是起到覆盖索引的作用。\n\n正例:能够建立索引的种类:主键索引、唯一索引、普通索引,而覆盖索引是一种查询的一种效果,用explain的结果,extra列会出现:using index。\n\n【推荐】利用延迟关联或者子查询优化超多分页场景。\n\n说明:MySQL并不是跳过offset行,而是取offset+N行,然后返回放弃前offset行,返回 N行,那当offset特别大的时候,效率就非常的低下,要么控制返回的总页数,要么对超过特定阈值的页数进行SQL改写。\n\n正例:先快速定位需要获取的id段,然后再关联:\n\nSELECT a.* FROM 表1 a, (select id from 表1 where 条件 LIMIT 100000,20 ) b where a.id=b.id\n\n【推荐】 SQL性能优化的目标:至少要达到 range 级别,要求是ref级别,如果可以是consts 最好。说明:\n\n1) consts 单表中最多只有一个匹配行(主键或者唯一索引),在优化阶段即可读取到数据。\n\n2) ref 指的是使用普通的索引(normal index)。\n\n3) range 对索引进行范围检索。\n\n反例:explain表的结果,type=index,索引物理文件全扫描,速度非常慢,这个index级别比较range还低,与全表扫描是小巫见大巫。\n\n【推荐】建组合索引的时候,区分度最高的在最左边。\n\n正例:如果where a=? and b=? ,a列的几乎接近于唯一值,那么只需要单建idx_a索引即可。\n\n说明:存在非等号和等号混合判断条件时,在建索引时,请把等号条件的列前置。如:where a>?\n\nand b=? 那么即使a的区分度更高,也必须把b放在索引的最前列。\n\n【推荐】防止因字段类型不同造成的隐式转换,导致索引失效。\n\n【参考】创建索引时避免有如下极端误解:\n\n1) 宁滥勿缺。认为一个查询就需要建一个索引。\n\n2) 宁缺勿滥。认为索引会消耗空间、严重拖慢更新和新增速度。\n\n3) 抵制惟一索引。认为业务的惟一性一律需要在应用层通过“先查后插”方式解决。\n\n(三)SQL语句\n【强制】不要使用count(列名)或count(常量)来替代count(),count()是SQL92定义的标准统计行数的语法,跟数据库无关,跟NULL和非NULL无关。\n\n说明:count(*)会统计值为NULL的行,而count(列名)不会统计此列为NULL值的行。\n\n【强制】count(distinct col) 计算该列除NULL之外的不重复行数,注意 count(distinct col1, col2) 如果其中一列全为NULL,那么即使另一列有不同的值,也返回为0。\n\n【强制】当某一列的值全是NULL时,count(col)的返回结果为0,但sum(col)的返回结果为\n\nNULL,因此使用sum()时需注意NPE问题。\n\n正例:可以使用如下方式来避免sum的NPE问题:SELECT IF(ISNULL(SUM(g)),0,SUM(g))\n\nFROM table;\n\n【强制】使用ISNULL()来判断是否为NULL值。\n\n说明:NULL与任何值的直接比较都为NULL。\n\n1) NULL<>NULL的返回结果是NULL,而不是false。\n\n2) NULL=NULL的返回结果是NULL,而不是true。\n\n3) NULL<>1的返回结果是NULL,而不是true。\n\n【强制】 在代码中写分页查询逻辑时,若count为0应直接返回,避免执行后面的分页语句。\n\n【强制】不得使用外键与级联,一切外键概念必须在应用层解决。\n\n说明:以学生和成绩的关系为例,学生表中的student_id是主键,那么成绩表中的student_id 则为外键。如果更新学生表中的student_id,同时触发成绩表中的student_id更新,即为级联更新。外键与级联更新适用于单机低并发,不适合分布式、高并发集群;级联更新是强阻塞,存在数据库更新风暴的风险;外键影响数据库的插入速度。\n\n【强制】禁止使用存储过程,存储过程难以调试和扩展,更没有移植性。\n\n【强制】数据订正时,删除和修改记录时,要先select,避免出现误删除,确认无误才能执行更新语句。\n\n【推荐】in操作能避免则避免,若实在避免不了,需要仔细评估in后边的集合元素数量,控制在1000个之内。\n\n【参考】如果有全球化需要,所有的字符存储与表示,均以utf-8编码,注意字符统计函数的区别。\n\n说明:\n\nSELECT LENGTH(\"轻松工作\"); 返回为12\n\nSELECT CHARACTER_LENGTH(\"轻松工作\"); 返回为4\n\n如果需要存储表情,那么选择utfmb4来进行存储,注意它与utf-8编码的区别。\n\n【参考】 TRUNCATE TABLE 比 DELETE 速度快,且使用的系统和事务日志资源少,但TRUNCATE 无事务且不触发trigger,有可能造成事故,故不建议在开发代码中使用此语句。\n\n说明:TRUNCATE TABLE 在功能上与不带 WHERE 子句的 DELETE 语句相同。\n\n(四)ORM映射\n【强制】在表查询中,一律不要使用 * 作为查询的字段列表,需要哪些字段必须明确写明。\n\n说明:1)增加查询分析器解析成本。2)增减字段容易与resultMap配置不一致。\n\n【强制】POJO类的布尔属性不能加is,而数据库字段必须加is_,要求在resultMap中进行字段与属性之间的映射。\n\n说明:参见定义POJO类以及数据库字段定义规定,在中增加映射,是必须的。在MyBatis Generator生成的代码中,需要进行对应的修改。\n\n【强制】不要用resultClass当返回参数,即使所有类属性名与数据库字段一一对应,也需要定义;反过来,每一个表也必然有一个与之对应。\n\n说明:配置映射关系,使字段与DO类解耦,方便维护。\n\n【强制】sql.xml配置参数使用:#{},#param# 不要使用${} 此种方式容易出现SQL注入。\n\n【强制】iBATIS自带的queryForList(String statementName,int start,int size)不推荐使用。\n\n说明:其实现方式是在数据库取到statementName对应的SQL语句的所有记录,再通过subList 取start,size的子集合。\n\n正例:Map map = new HashMap();\n\nmap.put(\"start\", start); map.put(\"size\", size);\n\n【强制】不允许直接拿HashMap与Hashtable作为查询结果集的输出。\n\n说明:resultClass=”Hashtable”,会置入字段名和属性值,但是值的类型不可控。\n\n【强制】更新数据表记录时,必须同时更新记录对应的gmt_modified字段值为当前时间。\n\n【推荐】不要写一个大而全的数据更新接口。传入为POJO类,不管是不是自己的目标更新字段,都进行update table set c1=value1,c2=value2,c3=value3; 这是不对的。执行SQL 时,不要更新无改动的字段,一是易出错;二是效率低;三是增加binlog存储。\n\n【参考】@Transactional事务不要滥用。事务会影响数据库的QPS,另外使用事务的地方需要考虑各方面的回滚方案,包括缓存回滚、搜索引擎回滚、消息补偿、统计修正等。\n\n【参考】中的compareValue是与属性值对比的常量,一般是数字,表示相等时带上此条件;表示不为空且不为null时执行;表示不为null值时执行。", "segmentation_method": "reviewed_source_semantics", "label": "三、单元测试 — 五、MySQL数据库", "source_line_range": [ 1121, 1566 ] }, { "id": "body-region-5", "text": "六 工 程 结 构 一 应 用 分 层 推 荐 图 中 默 认 上 层 依 赖 于 下 层 箭 头 关 系 表 示 可 直 接 依 赖 如 开 放 接 口 层 可 以 依 赖 于 web 层 也 可 以 直 接 依 赖 于 service 层 依 此 类 推 图 片 上 传 失 败 image b8d664 1526115059992 开 放 接 口 层 可 直 接 封 装 service 方 法 暴 露 成 rpc 接 口 通 过 web 封 装 成 http 接 口 进 行 网 关 安 全 控 制 流 量 控 制 等 终 端 显 示 层 各 个 端 的 模 板 渲 染 并 执 行 显 示 的 层 当 前 主 要 是 velocity 渲 染 js 渲 染 jsp 渲 染 移 动 端 展 示 等 web 层 主 要 是 对 访 问 控 制 进 行 转 发 各 类 基 本 参 数 校 验 或 者 不 复 用 的 业 务 简 单 处 理 等 service 层 相 对 具 体 的 业 务 逻 辑 服 务 层 manager 层 通 用 业 务 处 理 层 它 有 如 下 特 征 1 对 第 三 方 平 台 封 装 的 层 预 处 理 返 回 结 果 及 转 化 异 常 信 息 2 对 service 层 通 用 能 力 的 下 沉 如 缓 存 方 案 中 间 件 通 用 处 理 3 与 dao 层 交 互 对 多 个 dao 的 组 合 复 用 dao 层 数 据 访 问 层 与 底 层 mysql oracle hbase 等 进 行 数 据 交 互 外 部 接 口 或 第 三 方 平 台 包 括 其 它 部 门 rpc 开 放 接 口 基 础 平 台 其 它 公 司 的 http 接 口 参 考 分 层 异 常 处 理 规 约 在 dao 层 产 生 的 异 常 类 型 有 很 多 无 法 用 细 粒 度 的 异 常 进 行 catch 使 用 catch exception e 方 式 并 throw new daoexception e 不 需 要 打 印 日 志 因 为 日 志 在 manager service 层 一 定 需 要 捕 获 并 打 到 日 志 文 件 中 去 如 果 同 台 服 务 器 再 打 日 志 浪 费 性 能 和 存 储 在 service 层 出 现 异 常 时 必 须 记 录 出 错 日 志 到 磁 盘 尽 可 能 带 上 参 数 信 息 相 当 于 保 护 案 发 现 场 如 果 manager 层 与 service 同 机 部 署 日 志 方 式 与 dao 层 处 理 一 致 如 果 是 单 独 部 署 则 采 用 与 service 一 致 的 处 理 方 式 web 层 绝 不 应 该 继 续 往 上 抛 异 常 因 为 已 经 处 于 顶 层 如 果 意 识 到 这 个 异 常 将 导 致 页 面 无 法 正 常 渲 染 那 么 就 应 该 直 接 跳 转 到 友 好 错 误 页 面 加 上 用 户 容 易 理 解 的 错 误 提 示 信 息 开 放 接 口 层 要 将 异 常 处 理 成 错 误 码 和 错 误 信 息 方 式 返 回 参 考 分 层 领 域 模 型 规 约 do data object 与 数 据 库 表 结 构 一 一 对 应 通 过 dao 层 向 上 传 输 数 据 源 对 象 dto data transfer object 数 据 传 输 对 象 service 或 manager 向 外 传 输 的 对 象 bo business object 业 务 对 象 由 service 层 输 出 的 封 装 业 务 逻 辑 的 对 象 ao application object 应 用 对 象 在 web 层 与 service 层 之 间 抽 象 的 复 用 对 象 模 型 极 为 贴 近 展 示 层 复 用 度 不 高 vo view object 显 示 层 对 象 通 常 是 web 向 模 板 渲 染 引 擎 层 传 输 的 对 象 query 数 据 查 询 对 象 各 层 接 收 上 层 的 查 询 请 求 注 意 超 过 2 个 参 数 的 查 询 封 装 禁 止 使 用 map 类 来 传 输 二 二 方 库 依 赖 强 制 定 义 gav 遵 从 以 下 规 则 1 groupid 格 式 com 公 司 bu 业 务 线 子 业 务 线 最 多 4 级 说 明 公 司 bu 例 如 alibaba taobao tmall aliexpress 等 bu 一 级 子 业 务 线 可 选 正 例 com taobao jstorm 或 com alibaba dubbo register 2 artifactid 格 式 产 品 线 名 模 块 名 语 义 不 重 复 不 遗 漏 先 到 中 央 仓 库 去 查 证 一 下 正 例 dubbo client fastjson api jstorm tool 3 version 详 细 规 定 参 考 下 方 强 制 二 方 库 版 本 号 命 名 方 式 主 版 本 号 次 版 本 号 修 订 号 1 主 版 本 号 产 品 方 向 改 变 或 者 大 规 模 api 不 兼 容 或 者 架 构 不 兼 容 升 级 2 次 版 本 号 保 持 相 对 兼 容 性 增 加 主 要 功 能 特 性 影 响 范 围 极 小 的 api 不 兼 容 修 改 3 修 订 号 保 持 完 全 兼 容 性 修 复 bug 新 增 次 要 功 能 特 性 等 说 明 注 意 起 始 版 本 号 必 须 为 1 0 0 而 不 是 0 0 1 正 式 发 布 的 类 库 必 须 先 去 中 央 仓 库 进 行 查 证 使 版 本 号 有 延 续 性 正 式 版 本 号 不 允 许 覆 盖 升 级 如 当 前 版 本 1 3 3 那 么 下 一 个 合 理 的 版 本 号 1 3 4 或 1 4 0 或 2 0 0 强 制 线 上 应 用 不 要 依 赖 snapshot 版 本 安 全 包 除 外 说 明 不 依 赖 snapshot 版 本 是 保 证 应 用 发 布 的 幂 等 性 另 外 也 可 以 加 快 编 译 时 的 打 包 构 建 强 制 二 方 库 的 新 增 或 升 级 保 持 除 功 能 点 之 外 的 其 它 jar 包 仲 裁 结 果 不 变 如 果 有 改 变 必 须 明 确 评 估 和 验 证 建 议 进 行 dependency resolve 前 后 信 息 比 对 如 果 仲 裁 结 果 完 全 不 一 致 那 么 通 过 dependency tree 命 令 找 出 差 异 点 进 行 excludes 排 除 jar 包 强 制 二 方 库 里 可 以 定 义 枚 举 类 型 参 数 可 以 使 用 枚 举 类 型 但 是 接 口 返 回 值 不 允 许 使 用 枚 举 类 型 或 者 包 含 枚 举 类 型 的 pojo 对 象 强 制 依 赖 于 一 个 二 方 库 群 时 必 须 定 义 一 个 统 一 的 版 本 变 量 避 免 版 本 号 不 一 致 说 明 依 赖 springframework core context beans 它 们 都 是 同 一 个 版 本 可 以 定 义 一 个 变 量 来 保 存 版 本 spring version 定 义 依 赖 的 时 候 引 用 该 版 本 强 制 禁 止 在 子 项 目 的 pom 依 赖 中 出 现 相 同 的 groupid 相 同 的 artifactid 但 是 不 同 的 version 说 明 在 本 地 调 试 时 会 使 用 各 子 项 目 指 定 的 版 本 号 但 是 合 并 成 一 个 war 只 能 有 一 个 版 本 号 出 现 在 最 后 的 lib 目 录 中 可 能 出 现 线 下 调 试 是 正 确 的 发 布 到 线 上 却 出 故 障 的 问 题 推 荐 所 有 pom 文 件 中 的 依 赖 声 明 放 在 dependencies 语 句 块 中 所 有 版 本 仲 裁 放 在 dependencymanagement 语 句 块 中 说 明 dependencymanagement 里 只 是 声 明 版 本 并 不 实 现 引 入 因 此 子 项 目 需 要 显 式 的 声 明 依 赖 version 和 scope 都 读 取 自 父 pom 而 dependencies 所 有 声 明 在 主 pom 的 dependencies 里 的 依 赖 都 会 自 动 引 入 并 默 认 被 所 有 的 子 项 目 继 承 推 荐 二 方 库 不 要 有 配 置 项 最 低 限 度 不 要 再 增 加 配 置 项 参 考 为 避 免 应 用 二 方 库 的 依 赖 冲 突 问 题 二 方 库 发 布 者 应 当 遵 循 以 下 原 则 1 精 简 可 控 原 则 移 除 一 切 不 必 要 的 api 和 依 赖 只 包 含 service api 必 要 的 领 域 模 型 对 象 utils 类 常 量 枚 举 等 如 果 依 赖 其 它 二 方 库 尽 量 是 provided 引 入 让 二 方 库 使 用 者 去 依 赖 具 体 版 本 号 无 log 具 体 实 现 只 依 赖 日 志 框 架 2 稳 定 可 追 溯 原 则 每 个 版 本 的 变 化 应 该 被 记 录 二 方 库 由 谁 维 护 源 码 在 哪 里 都 需 要 能 方 便 查 到 除 非 用 户 主 动 升 级 版 本 否 则 公 共 二 方 库 的 行 为 不 应 该 发 生 变 化 三 服 务 器 推 荐 高 并 发 服 务 器 建 议 调 小 tcp 协 议 的 time wait 超 时 时 间 说 明 操 作 系 统 默 认 240 秒 后 才 会 关 闭 处 于 time wait 状 态 的 连 接 在 高 并 发 访 问 下 服 务 器 端 会 因 为 处 于 time wait 的 连 接 数 太 多 可 能 无 法 建 立 新 的 连 接 所 以 需 要 在 服 务 器 上 调 小 此 等 待 值 正 例 在 linux 服 务 器 上 请 通 过 变 更 etc sysctl conf 文 件 去 修 改 该 缺 省 值 秒 net ipv4 tcp fin timeout 30 推 荐 调 大 服 务 器 所 支 持 的 最 大 文 件 句 柄 数 file descriptor 简 写 为 fd 说 明 主 流 操 作 系 统 的 设 计 是 将 tcp udp 连 接 采 用 与 文 件 一 样 的 方 式 去 管 理 即 一 个 连 接 对 应 于 一 个 fd 主 流 的 linux 服 务 器 默 认 所 支 持 最 大 fd 数 量 为 1024 当 并 发 连 接 数 很 大 时 很 容 易 因 为 fd 不 足 而 出 现 open too many files 错 误 导 致 新 的 连 接 无 法 建 立 建 议 将 linux 服 务 器 所 支 持 的 最 大 句 柄 数 调 高 数 倍 与 服 务 器 的 内 存 数 量 相 关 推 荐 给 jvm 设 置 xx heapdumponoutofmemoryerror 参 数 让 jvm 碰 到 oom 场 景 时 输 出 dump 信 息 说 明 oom 的 发 生 是 有 概 率 的 甚 至 有 规 律 地 相 隔 数 月 才 出 现 一 例 出 现 时 的 现 场 信 息 对 查 错 非 常 有 价 值 推 荐 在 线 上 生 产 环 境 jvm 的 xms 和 xmx 设 置 一 样 大 小 的 内 存 容 量 避 免 在 gc 后 调 整 堆 大 小 带 来 的 压 力 参 考 服 务 器 内 部 重 定 向 使 用 forward 外 部 重 定 向 地 址 使 用 url 拼 装 工 具 类 来 生 成 否 则 会 带 来 url 维 护 不 一 致 的 问 题 和 潜 在 的 安 全 风 险 附 1 版 本 历 史 版 本 号 更 新 日 期 备 注 1 0 0 2017 2 9 阿 里 巴 巴 集 团 正 式 对 外 发 布 1 0 1 2017 2 13 1 修 正 string 的 前 后 矛 盾 2 vm 修 正 成 velocity 3 修 正 countdown 描 述 错 误 1 0 2 2017 2 20 1 去 除 文 底 水 印 2 数 据 类 型 中 引 用 太 阳 系 年 龄 问 题 3 修 正 关 于 异 常 和 方 法 签 名 的 部 分 描 述 4 修 正 final 描 述 5 去 除 comparator 部 分 描 述 1 1 0 2017 2 27 1 增 加 前 言 2 增 加 extends t 描 述 和 说 明 3 增 加 版 本 历 史 4 增 加 专 有 名 词 解 释 1 1 1 2017 3 31 修 正 页 码 总 数 和 部 分 示 例 1 2 0 2017 5 20 1 根 据 云 栖 社 区 的 聚 能 聊 活 动 反 馈 对 手 册 的 页 码 排 版 描 述 进 行 修 正 2 增 加 final 的 适 用 场 景 描 述 3 增 加 关 于 锁 的 粒 度 的 说 明 4 增 加 指 定 集 合 大 小 的 详 细 说 明 以 及 正 反 例 5 增 加 卫 语 句 的 示 例 代 码 6 明 确 数 据 库 表 示 删 除 概 念 的 字 段 名 为 is deleted 增 加 单 元 测 试 规 约 pdf 终 极 版 阿 里 开 源 的 ide 代 码 规 约 检 测 插 件 点 此 下 载 https github com alibaba p3c 更 多 及 时 信 息 请 关 注 阿 里 巴 巴 java 开 发 手 册 官 方 公 众 号 1 3 0 2017 9 25 图 片 上 传 失 败 image 983f5b 1526115059985 附 2 本 手 册 专 有 名 词 pojo plain ordinary java object 在 本 手 册 中 pojo 专 指 只 有 setter getter tostring 的 简 单 类 包 括 do dto bo vo 等 gav groupid artifactctid version maven 坐 标 是 用 来 唯 一 标 识 jar 包 oop object oriented programming 本 手 册 泛 指 类 对 象 的 编 程 处 理 方 式 orm object relation mapping 对 象 关 系 映 射 对 象 领 域 模 型 与 底 层 数 据 之 间 的 转 换 本 文 泛 指 ibatis mybatis 等 框 架 npe java lang nullpointerexception 空 指 针 异 常 soa service oriented architecture 面 向 服 务 架 构 它 可 以 根 据 需 求 通 过 网 络 对 松 散 耦 合 的 粗 粒 度 应 用 组 件 进 行 分 布 式 部 署 组 合 和 使 用 有 利 于 提 升 组 件 可 重 用 性 可 维 护 性 一 方 库 本 工 程 内 部 子 项 目 模 块 依 赖 的 库 jar 包 二 方 库 公 司 内 部 发 布 到 中 央 仓 库 可 供 公 司 内 部 其 它 应 用 依 赖 的 库 jar 包 三 方 库 公 司 之 外 的 开 源 库 jar 包 ide integrated development environment 用 于 提 供 程 序 开 发 环 境 的 应 用 程 序 一 般 包 括 代 码 编 辑 器 编 译 器 调 试 器 和 图 形 用 户 界 面 等 工 具 本 手 册 泛 指 intellij idea 和 eclipse 法 律 声 明 本 手 册 为 阿 里 巴 巴 集 团 技 术 部 的 技 术 分 享 版 权 归 阿 里 巴 巴 集 团 所 有 仅 供 大 家 交 流 学 习 及 研 究 使 用 禁 止 用 于 商 业 用 途 违 者 必 究 图 片 上 传 失 败 image 1888e5 1526115059985", "source_text": "六、工程结构\n(一)应用分层\n【推荐】图中默认上层依赖于下层,箭头关系表示可直接依赖,如:开放接口层可以依赖于\n\nWeb层,也可以直接依赖于Service层,依此类推:\n\n[图片上传失败...(image-b8d664-1526115059992)]\n\n• 开放接口层:可直接封装Service方法暴露成RPC接口;通过Web封装成http接口;进行网关安全控制、流量控制等。\n\n• 终端显示层:各个端的模板渲染并执行显示的层。当前主要是velocity渲染,JS渲染,\n\nJSP渲染,移动端展示等。\n\n• Web层:主要是对访问控制进行转发,各类基本参数校验,或者不复用的业务简单处理等。\n\n• Service层:相对具体的业务逻辑服务层。\n\n• Manager层:通用业务处理层,它有如下特征:\n\n1) 对第三方平台封装的层,预处理返回结果及转化异常信息;\n\n2) 对Service层通用能力的下沉,如缓存方案、中间件通用处理;\n\n3) 与DAO层交互,对多个DAO的组合复用。\n\n• DAO层:数据访问层,与底层MySQL、Oracle、Hbase等进行数据交互。\n\n• 外部接口或第三方平台:包括其它部门RPC开放接口,基础平台,其它公司的HTTP接口。\n\n【参考】 (分层异常处理规约)在DAO层,产生的异常类型有很多,无法用细粒度的异常进\n\n行catch,使用catch(Exception e)方式,并throw new DAOException(e),不需要打印日志,因为日志在Manager/Service层一定需要捕获并打到日志文件中去,如果同台服务器再打日志,浪费性能和存储。在Service层出现异常时,必须记录出错日志到磁盘,尽可能带上参数信息,相当于保护案发现场。如果Manager层与Service同机部署,日志方式与DAO 层处理一致,如果是单独部署,则采用与Service一致的处理方式。Web层绝不应该继续往上抛异常,因为已经处于顶层,如果意识到这个异常将导致页面无法正常渲染,那么就应该直接跳转到友好错误页面,加上用户容易理解的错误提示信息。开放接口层要将异常处理成错误码和错误信息方式返回。\n\n【参考】分层领域模型规约:\n\n• DO(Data Object):与数据库表结构一一对应,通过DAO层向上传输数据源对象。\n\n• DTO(Data Transfer Object):数据传输对象,Service或Manager向外传输的对象。\n\n• BO(Business Object):业务对象。由Service层输出的封装业务逻辑的对象。\n\n• AO(Application Object):应用对象。在Web层与Service层之间抽象的复用对象模型,极为贴近展示层,复用度不高。\n\n• VO(View Object):显示层对象,通常是Web向模板渲染引擎层传输的对象。\n\n• Query:数据查询对象,各层接收上层的查询请求。注意超过2个参数的查询封装,禁止使用Map类来传输。\n\n(二)二方库依赖\n【强制】定义GAV遵从以下规则:\n\n1) GroupID格式:com.{公司/BU }.业务线.[子业务线],最多4级。\n\n说明:{公司/BU} 例如:alibaba/taobao/tmall/aliexpress等BU一级;子业务线可选。\n\n正例:com.taobao.jstorm 或 com.alibaba.dubbo.register\n\n2) ArtifactID格式:产品线名-模块名。语义不重复不遗漏,先到中央仓库去查证一下。\n\n正例:dubbo-client / fastjson-api / jstorm-tool\n\n3) Version:详细规定参考下方。\n\n【强制】二方库版本号命名方式:主版本号.次版本号.修订号\n\n1) 主版本号:产品方向改变,或者大规模API不兼容,或者架构不兼容升级。\n\n2) 次版本号:保持相对兼容性,增加主要功能特性,影响范围极小的API不兼容修改。\n\n3) 修订号:保持完全兼容性,修复BUG、新增次要功能特性等。\n\n说明:注意起始版本号必须为:1.0.0,而不是0.0.1 正式发布的类库必须先去中央仓库进行查证,使版本号有延续性,正式版本号不允许覆盖升级。如当前版本:1.3.3,那么下一个合理的版本号:1.3.4 或 1.4.0 或 2.0.0\n\n【强制】线上应用不要依赖SNAPSHOT版本(安全包除外)。\n\n说明:不依赖SNAPSHOT版本是保证应用发布的幂等性。另外,也可以加快编译时的打包构建。\n\n【强制】二方库的新增或升级,保持除功能点之外的其它jar包仲裁结果不变。如果有改变,\n\n必须明确评估和验证,建议进行dependency:resolve前后信息比对,如果仲裁结果完全不一致,那么通过dependency:tree命令,找出差异点,进行排除jar包。\n\n【强制】二方库里可以定义枚举类型,参数可以使用枚举类型,但是接口返回值不允许使用枚举类型或者包含枚举类型的POJO对象。\n\n【强制】依赖于一个二方库群时,必须定义一个统一的版本变量,避免版本号不一致。\n\n说明:依赖springframework-core,-context,-beans,它们都是同一个版本,可以定义一个变量来保存版本:${spring.version},定义依赖的时候,引用该版本。\n\n【强制】禁止在子项目的pom依赖中出现相同的GroupId,相同的ArtifactId,但是不同的\n\nVersion。\n\n说明:在本地调试时会使用各子项目指定的版本号,但是合并成一个war,只能有一个版本号出现在最后的lib目录中。可能出现线下调试是正确的,发布到线上却出故障的问题。\n\n【推荐】所有pom文件中的依赖声明放在语句块中,所有版本仲裁放在\n\n语句块中。\n\n说明:里只是声明版本,并不实现引入,因此子项目需要显式的声\n\n明依赖,version和scope都读取自父pom。而所有声明在主pom的\n\n里的依赖都会自动引入,并默认被所有的子项目继承。\n\n【推荐】二方库不要有配置项,最低限度不要再增加配置项。\n\n【参考】为避免应用二方库的依赖冲突问题,二方库发布者应当遵循以下原则:\n\n1) 精简可控原则。移除一切不必要的API和依赖,只包含 Service API、必要的领域模型对象、Utils类、常量、枚举等。如果依赖其它二方库,尽量是provided引入,让二方库使用者去依赖具体版本号;无log具体实现,只依赖日志框架。\n\n2) 稳定可追溯原则。每个版本的变化应该被记录,二方库由谁维护,源码在哪里,都需要能方便查到。除非用户主动升级版本,否则公共二方库的行为不应该发生变化。\n\n(三)服务器\n【推荐】高并发服务器建议调小TCP协议的time_wait超时时间。\n\n说明:操作系统默认240秒后,才会关闭处于time_wait状态的连接,在高并发访问下,服务器端会因为处于time_wait的连接数太多,可能无法建立新的连接,所以需要在服务器上调小此等待值。\n\n正例:在linux服务器上请通过变更/etc/sysctl.conf文件去修改该缺省值(秒): net.ipv4.tcp_fin_timeout = 30\n\n【推荐】调大服务器所支持的最大文件句柄数(File Descriptor,简写为fd)。\n\n说明:主流操作系统的设计是将TCP/UDP连接采用与文件一样的方式去管理,即一个连接对应于一个fd。主流的linux服务器默认所支持最大fd数量为1024,当并发连接数很大时很容易因为fd不足而出现“open too many files”错误,导致新的连接无法建立。 建议将linux 服务器所支持的最大句柄数调高数倍(与服务器的内存数量相关)。\n\n【推荐】给JVM设置-XX:+HeapDumpOnOutOfMemoryError参数,让JVM碰到OOM场景时输出 dump信息。\n\n说明:OOM的发生是有概率的,甚至有规律地相隔数月才出现一例,出现时的现场信息对查错非常有价值。\n\n【推荐】在线上生产环境,JVM的Xms和Xmx设置一样大小的内存容量,避免在GC 后调整堆大小带来的压力。\n\n【参考】服务器内部重定向使用forward;外部重定向地址使用URL拼装工具类来生成,否则会带来URL维护不一致的问题和潜在的安全风险。\n\n附1:版本历史\n\n|\n\n版本号\n\n|\n\n更新日期\n\n|\n\n备注\n\n|\n|\n\n1.0.0\n\n|\n\n2017.2.9\n\n|\n\n阿里巴巴集团正式对外发布\n\n|\n|\n\n1.0.1\n\n|\n\n2017.2.13\n\n|\n\n1)修正String[]的前后矛盾。2)vm修正成velocity。3)修正countdown描述错误。\n\n|\n|\n\n1.0.2\n\n|\n\n2017.2.20\n\n|\n\n1)去除文底水印。2)数据类型中引用太阳系年龄问题。3)修正关于异常和方法签名的部分描述。4)修正final描述。5)去除Comparator部分描述。\n\n|\n|\n\n1.1.0\n\n|\n\n2017.2.27\n\n|\n\n1)增加前言。2)增加描述和说明。3)增加版本历史。4)增加专有名词解释。\n\n|\n|\n\n1.1.1\n\n|\n\n2017.3.31\n\n|\n\n修正页码总数和部分示例。\n\n|\n|\n\n1.2.0\n\n|\n\n2017.5.20\n\n|\n\n1)根据云栖社区的“聚能聊”活动反馈,对手册的页码、排版、描述进行修正。2)增加final 的适用场景描述。3)增加关于锁的粒度的说明。4)增加“指定集合大小”的详细说明以及正反例。5)增加卫语句的示例代码。6)明确数据库表示删除概念的字段名为is_deleted\n\n|\n| | |\n\n增加单元测试规约(PDF终极版),阿里开源的IDE代码规约检测插件:点此下载https://github.com/alibaba/p3c更多及时信息,请关注《阿里巴巴Java开发手册》官方公众号:\n\n|\n|\n\n1.3.0\n\n|\n\n2017.9.25\n\n|\n\n[图片上传失败...(image-983f5b-1526115059985)]\n\n|\n\n附2:本手册专有名词\n\nPOJO(Plain Ordinary Java Object): 在本手册中,POJO专指只有setter / getter / toString的简单类,包括DO/DTO/BO/VO等。\n\nGAV(GroupId、ArtifactctId、Version): Maven坐标,是用来唯一标识jar包。\n\nOOP(Object Oriented Programming): 本手册泛指类、对象的编程处理方式。\n\nORM(Object Relation Mapping): 对象关系映射,对象领域模型与底层数据之间的转换,本文泛指iBATIS, mybatis等框架。\n\nNPE(java.lang.NullPointerException): 空指针异常。\n\nSOA(Service-Oriented Architecture): 面向服务架构,它可以根据需求通过网络对松散\n\n耦合的粗粒度应用组件进行分布式部署、组合和使用,有利于提升组件可重用性,可维护性。\n\n一方库: 本工程内部子项目模块依赖的库(jar包)。\n\n二方库: 公司内部发布到中央仓库,可供公司内部其它应用依赖的库(jar包)。\n\n三方库: 公司之外的开源库(jar包)。\n\nIDE(Integrated Development Environment): 用于提供程序开发环境的应用程序,一\n\n般包括代码编辑器、编译器、调试器和图形用户界面等工具,本《手册》泛指IntelliJ IDEA 和eclipse。\n\n法律声明\n\n本手册为阿里巴巴集团技术部的技术分享,版权归阿里巴巴集团所有,仅供大家交流、学习及研究使用,禁止用于商业用途,违者必究。\n\n| |\n| | [图片上传失败...(image-1888e5-1526115059985)]\n\n|", "segmentation_method": "reviewed_source_semantics", "label": "六、工程结构 — 附2:本手册专有名词", "source_line_range": [ 1567, 1842 ] } ], "ending": { "text": "部的技术分享,版权归阿里巴巴集团所有,仅供大家交流、学习及研究使用,禁止用于商业用途,违者必究。\n\n| |\n| | [图片上传失败...(image-1888e5-1526115059985)]\n\n|" } } }, { "id": "article-023", "name": "星巴克在中国这20年", "url": "https://www.huxiu.com/article/280829.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "星巴克在中国这20年" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "界面新闻" ] }, { "id": "stable-3", "alternatives": [ "虎嗅APP" ] }, { "id": "stable-4", "alternatives": [ "公众号矩阵" ] }, { "id": "stable-5", "alternatives": [ "加入社群" ] }, { "id": "stable-6", "alternatives": [ "我要投稿" ] }, { "id": "stable-7", "alternatives": [ "资讯" ] }, { "id": "stable-8", "alternatives": [ "24小时" ] }, { "id": "stable-9", "alternatives": [ "源流" ] }, { "id": "stable-10", "alternatives": [ "视频" ] }, { "id": "stable-11", "alternatives": [ "活动/榜单/专题" ] }, { "id": "stable-12", "alternatives": [ "妙投" ] }, { "id": "stable-13", "alternatives": [ "虎嗅智库" ] }, { "id": "stable-14", "alternatives": [ "关注" ] }, { "id": "stable-15", "alternatives": [ "商业消费" ] }, { "id": "stable-16", "alternatives": [ "本内容由作者授权发布,观点仅代表作者本人,不代表虎嗅立场。" ] }, { "id": "stable-17", "alternatives": [ "赞赏" ] }, { "id": "stable-18", "alternatives": [ "别打CALL,打钱" ] }, { "id": "stable-19", "alternatives": [ "评论" ] }, { "id": "stable-20", "alternatives": [ "虎嗅用户社区交流公约" ] }, { "id": "stable-21", "alternatives": [ "热门评论" ] }, { "id": "stable-22", "alternatives": [ "最新评论" ] }, { "id": "stable-23", "alternatives": [ "虎嗅网" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Initial .article__content has full introduction and all five named historical sections, captions and final paragraph. Auto-height wrapper exceeds body height and does not clip it; beginning/middle/end screenshots confirm complete ordinary text. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "星巴克在中国这20年" ], "html_selector": "h1,h2,[role=\"heading\"],h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#comment .comment-item", "author_selector": ".user-info__username", "body_selector": ".comment-content-box > .comment-content", "id_attribute": "data-comment-id", "section_markers": [ "评论", "最新评论" ], "version": 2, "minimum_comments": 8, "text_scope": { "body_end": "欢咖啡开始”讲述了品牌进入中国20周年的故事。看起来这个品牌正努力变成一个正值年轻的少年形象,朝气蓬勃、还有梦想,刚满20岁。毕竟在经历了过去20年中国市场的开拓之后,它需要找到更多吸引消费者的东西。", "end_markers": [ "回顶部", "Copyright ©" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-023/comment-qualification-reference-r5.json", "sha256": "a0c06a24763e321815a771fa3744b4253c3a0cf39766f9e21362a623b844f047", "chars": 2280, "record_count": 9 }, "comment_presence_review": { "status": "visible_text", "basis": "One complete historical initial source, not a claim of repeated-session stability. It supports authoring provenance only.", "observed_record_count": 9, "qualification_only": true } }, "ground_truth_main_content": "虎嗅注:本文转自界面,记者:刘雨静、杨立赟,编辑:牙韩翔。\n\n\n\n\n2019年1月11日是来自西雅图的咖啡公司星巴克进入中国市场20周年纪念日。\n\n\n\n\n如今,中国市场对于星巴克的意义毋庸置疑。从业绩上看,中国市场的同店销售已经保持了9年的增长——尽管在2018财年第三季度首次出现了下降;星巴克公司对未来的发展策略中,把中国市场与数字化及高端品牌星巴克臻选放在同等重要的位置。眼下,它正在以每天超过一家门店的数量在中国扩张,平均每年创造近1万个就业机会,上海市星巴克的门店数量已经超过了纽约,是后者的两倍。\n\n\n\n\n对于觊觎中国市场的外资零售公司而言,星巴克在中国市场的大获成功值得研究。\n\n\n\n\n麦当劳与肯德基把西式快餐带入中国,至今仍然被人称为“垃圾食品”;沃尔玛靠“低价”的概念让人们接受了大卖场的模式,电商出现价格优势不再,便人去场空;可口可乐在中国投入不菲,最终也卖掉了自有的装瓶业务。\n\n\n\n\n但星巴克却能让喝茶的中国人接受喝咖啡,并且愿意承担一种让它获利颇丰的商业溢价——用30元左右的价格购买,一杯带有被人们认为有“逼格”的咖啡文化或者体验,哪怕大部分人至今都不太理解其内涵——这是西方外来者们曾经不敢期待的局面。\n\n\n\n\n20年,星巴克终于找到了一种温和恰当的方式在中国站稳、起跑与加速。\n\n\n\n\n一名消费者拿着星巴克产品对着其标志拍照。(图片来源:视觉中国)\n\n\n\n\n开出第一家店起,星巴克在中国亏了九年\n\n\n\n\n1999年1月,当星巴克在中国内地的第一家门店在北京中国国际贸易中心正式开业的时候,中国人对咖啡的认知还停留在雀巢的速溶咖啡。\n\n\n\n\n时任星巴克大中华区总裁王金龙是北京本地人。1985年他从北京赴美求学,7年后加入星巴克美国任法律和公司事务部副总裁时,星巴克在美国还只有150多家分店。1995年,星巴克开始考虑向海外拓展,王金龙被委以重任,升任负责国际业务拓展的全球副总裁。\n\n\n\n\n4年之后,王金龙把星巴克带回了他的故乡北京。\n\n\n\n\n特许经营是包括星巴克、麦当劳等不少外资餐饮品牌进入中国选择的方式。一方面,1990年代末的中国,尚不允许外资独资经营零售和餐饮业;另一方面,对于那些刚刚进入中国市场的外资品牌而言,与本土企业合作方便他们更快速地深入本地市场,也是降低异地移植风险的最佳选择——采购、厨房控制有人分担,自己只需要输出品牌及管理体系,便能拥有一定的销售分成。\n\n\n\n\n星巴克最早实行与三家业者合资代理的经营模式:北京美大咖啡有限公司取得中国北方的代理权(北京和天津业务),台湾统一集团取得苏浙沪地区的代理权,南方地区(香港、澳门、广东、海南、深圳等)的代理权则由香港的美心公司取得。\n\n\n\n\n北京之后,2000年5月,星巴克先后进入香港和上海,分别位于香港中环交易广场、上海淮海路力宝广场——这多少意味着星巴克一开始就打定主意在中国走高端路线,从高端商场、写字楼的商务人士、白领开始,培育第一批核心用户。\n\n\n\n\n开在步行街的星巴克咖啡\n\n\n\n\n事实上这也符合星巴克在美国的扩张逻辑。早前星巴克创始人霍华德·舒尔茨(Howard Schultz)提出的为人们津津乐道的“第三空间”概念——把咖啡店视为家与办公场所以外的社交去处,这帮星巴克在美国扩张初期便深受那些受过高等教育、拥有一定购买力、对社交及生活品质有所要求的年轻人们拥趸——随着这群人开始接纳星巴克,此后他们便开始在更多层次的消费者中站稳脚跟。\n\n\n\n\n不过在当时的中国,北京的房价还停留在每平米2000元,而一杯卡布奇诺最低售价就要19元,甚至没几个人知道卡布奇诺到底是什么——要让习惯喝茶的中国消费者心甘情愿地为此掏钱实在太难了。\n\n\n\n\n从1999年在北京开出第一家店起,星巴克整整亏损了九年。\n\n\n\n\n进入中国市场的计划起初也不被投资人看好。“(在中国市场)多年的亏损在公司内部和外界都形成了离开和放弃中国市场的巨大压力,”霍华德在自传《一路向前》中说。“公司面临的一个挑战是需要让这个以茶闻名的国度了解咖啡文化。”\n\n\n\n\n星巴克在中国的尝试初期,有些股东抱怨花了太多钱。但王金龙坚持认为,这是一个能够获得长期回报的策略,关键在于等待。总有一天能等到中国消费者达到一定收入水平,等到品牌引导他们形成咖啡消费习惯。\n\n\n\n\n当然除了等,霍华德也在想星巴克进入中国的方式是不是出了问题。\n\n\n\n\n虽然中国消费者对于外资品牌多少有一种盲从,但把星巴克美国的资深经理调往中国,经营那里的业务,让中国员工铭记星巴克的文化,最后被证明是一个错误。\n\n\n\n\n2009年9月,霍华德飞往中国,走访了多地的星巴克伙伴和消费者,迫切地想通过这个世界上经济增长最快的主要经济体推动星巴克的未来。这一次的走访中,这个创始人被星巴克在中国市场的本土化所震惊,他甚至用一种观察者的目光来看待这个品牌在中国市场所接受的“改造”。\n\n\n\n\n在一顿午餐的过程中,霍华德尝试了一道接一道的新产品:花生摩卡星冰乐、黑芝麻抹茶星冰乐、冰镇芦荟东方美人茶……这些中国餐饮中常用的原料,被创意性地添加到这个美国的咖啡品牌中。\n\n\n\n\n霍华德意识到,中国伙伴“摆脱了旧思维的束缚”,富有创造力——虽然他尝到的这些新品,大部分仅限于“老板菜单”,这些新品并不一定真的会在中国上市。但他意识到,领导团队必须是美国人和中国人的结合,最终完全是一个满腔热忱的中国管理团队,由一名中国首席执行官领导。\n\n\n\n\n但即便如此,星巴克在融入中国文化的一开始,还是有点“水土不服”。\n\n\n\n\n第三空间=装逼?\n\n\n\n\n星巴克也没有想到,自己提出的“第三空间”概念在推向中国时被演绎成了另外一种面貌。\n\n\n\n\n“首先你必须带一本杂志,啥?《读者》?呸,那你只配去火车站买杯豆浆蹲着喝去。中文的杂志一律PASS!必须得英文原版的!什么?《Reader’s digest》?我说你有完没完啊?!按照小资圣经——保罗.福塞尔写的那本《格调》里面所说,连《国家地理》《TIME》之类的杂志都只会暴露出你庸俗的小中产阶级格调,起码得拿本《Economist》吧,或者《FORTUNE》、《Forbes》……”\n\n2010年豆瓣曾流传着一份《星巴克完全装逼指南》,关于如何在星巴克装逼,从着装、携带的书籍、电子设备,到支付方式、打电话的语言等等,都有详尽的说明。\n\n\n\n\n很显然,在10年前,星巴克的“第三空间”,仍然是很多中国人对西方生活生活的窥视窗口,虽然带着一种不自信的嘲讽与鄙视。\n\n\n\n\n星巴克把门店视为一种“第三空间”的概念\n\n\n\n\n不过,从商业回报上来说,这种情绪对于星巴克在中国的扩张来说却是最强劲的“东风”。\n\n\n\n\n在中国经济逐渐起步上升的过程中,这些消费者一边嘲讽着西式的“装逼”,一边又向往着那样的生活方式。他们对外来品牌的期待,并不是我能在这里买到什么,而是在这里消费,能让我看起来像什么。\n\n\n\n\n澳大利亚市场学教授Byron Sharp曾在《品牌如何增长》一书中讲述,任何消费品品牌的增长都可以归结为心智的显著性(Mental Availability)和购买的便利性(Physical Availability)。心智的显著性便是人们在某个消费场合主动想到品牌的可能性,它并不只与品牌曝光有关,而是与人们对品牌的既有印象和品牌传递的质量有关。\n\n\n\n\n当星巴克逐步把自己在中国顾客中的品牌形象直接与高端划上等号——变成白领、商务人士谈事的地方,或是追求生活品质的人才去消费的地方,加之线下门店的逐步扩张——很大程度上刺激了人们的消费。\n\n\n\n\n碰壁与让步\n\n\n\n\n但有时候,这种暧昧的关系也会走向极端。\n\n\n\n\n比如最基本的——星巴克的杯型命名方式就曾受到诸多质疑,在星巴克点餐台没有“小杯”的选项,取而代之他们命名为中杯(tall)、大杯(grande)与超大杯(venti)。\n\n\n\n\n2016年,一位名为林国童的星巴克金卡会员在自己的公众号中向星巴克中国CEO王静瑛写了一封公开信,表示自己作为6年星享卡金卡会员,在星巴克消费时,明明只想买一杯中杯咖啡,却被店员连续两次确认“你确定是中杯吗”,“中杯是我们最小的杯型哦”,这让他觉得有所冒犯。罗永浩也曾在微电影《幸福59厘米之小马》中,用自抽耳光的方式表达对星巴克把大中小三种杯型分为“超大、大与中杯”的不满。\n\n\n\n\n而星巴克中国当时对于中杯事件的回应称,在门店日常运营中,为确保顾客杯型选择准确,有时会再次与顾客确认杯型,并无推销意味。\n\n\n\n\n星巴克的杯型设置\n\n\n\n\n还有2007年1月12日,当时的央视主播芮成钢在博客上发出了一篇名为《请星巴克从故宫里出去》文章,认为“故宫里的星巴克”是对中国传统文化的糟蹋,并以个人名义向星巴克总裁发出抗议书,要求星巴克从故宫里搬出去。随后《人民日报》首先刊发了芮成钢的文章,国内几百家媒体开始报道。博客点击量几天之内50万,当时的舆论中不少网友表示支持。\n\n\n\n\n随后星巴克方面回应称,“六年前,是应故宫博物院的邀请,星巴克在故宫开了分店”,并已经为“适应紫禁城的环境作了认真的努力。”\n\n\n\n\n但它在舆论的压力之下不断让步——先把把窗户上的标识摘了下来,随后把故宫里的所有星巴克标识一减再减,尽量做到让人认不出来,直到2007年7月,星巴克正式撤离故宫。\n\n\n\n\n早年故宫里的星巴克\n\n\n\n\n对中国的“隐形”投入\n\n\n\n\n虽然偶有摩擦,星巴克还是找到了一个更温和的方式融入中国市场。它加大了对中国的投资力度,不仅仅是商业层面上的,还有门店背后的各种方面,有时候它想要捕获欢心的对象也不仅仅是消费者。\n\n星巴克把自己的员工称为“伙伴”。星巴克的伙伴通常拥有免费咖啡、免费伙伴券的福利,除了国家规定的福利待遇之外,它还颇为少见地为员工的父母们购买大病保险。\n\n\n\n\n星巴克在中国召开的员工大会,霍华德也曾出现,一些来自门店的员工见到他激动到哭出来。星巴克还曾推出过一项计划,当星巴克不断下沉至低线城市时,如果在员工自己的家乡开店,他们可以申请调职回去。\n\n\n\n\n2012年,这家美国公司在云南投资建厂,并在云南普洱设立了咖啡种植者支持中心扶持当地的咖啡豆种植者,收购它所认可的咖啡生豆,星巴克云南咖啡已经覆盖1678个农场和16000公顷咖啡。它还大力宣传来自云南的咖啡豆,类似于曾经星巴克推广过的哥伦比亚、埃塞俄比亚和苏门答腊岛的咖啡。\n\n这些投入事实上也是在努力获得中国——无论是政府还是消费者的——认同的一种尝试。\n\n\n\n\n星巴克很注重培养员工对企业的认同感\n\n\n\n\n当经历了各种磨合与挑战,最终获得大多数消费者认可的时候,星巴克便开始加速扩张。它在2017年发起了史上最大首笔的收购案,为了全面掌握在中国的经营权——他们以13亿美元收购中国合作伙伴统一企业和统一超商手中剩余50%股权,全资拥有华东地区1500家星巴克门店。\n\n\n\n\n星巴克门店的市场经营权正逐步重新回到星巴克手中——在特许经营的常规合作流程里,无论是门店改造、增设设备还是移动数字化改造都需要经过特许经营伙伴的许可,更需要自己承担全部成本。收回特许经营权意味着,尽管经历了不少争议与挑战,但他们在中国的扩张进一步扫除了障碍。\n\n\n\n\n随后,星巴克在中国开始再次加速扩张。\n\n\n\n\n2018年5月16日,星巴克第一次在中国召开了它的全球投资者交流大会。它毫不掩饰自己的野心——星巴克计划截至2022财年底,将以每年新拓展18~20个城市的速度在中国大陆全新进入100个城市,覆盖总数达到230个城市,同时,每年新增门店数将提升20%至600家,最终实现门店数达到6000家的目标。此外,在未来五年,星巴克中国的总营收预计将达到2017财年的3倍,营运收入将翻两番以上。\n\n\n\n\n霍华德曾在某次接受CNBC采访时说,“如果有天我们在中国市场上的连锁店数量超过了美国连锁店的数量,我不会对此感到意外......现在我们刚刚开始教中国人学着在早上喝咖啡。”\n\n\n\n\n中国的下一个20年\n\n\n\n\n星巴克的底气来自中国的三四线城市。\n\n\n\n\n2015年5月15日,河南洛阳的第一家星巴克开幕——这也是星巴克在河南省于郑州市以外的第二站。年轻人刘松豪在7点40分来到了洛阳王府井百货门店。 3个小时后,他在十几位星巴克店员的夹道欢迎中买到了洛阳第一杯星巴克,此后他手握洛阳城市杯的照片出现在河南省内最大的报纸《大河报》上。“我走上了星巴克装逼之路。”刘松豪当日的朋友圈写道。\n\n\n\n\n在外等待开业的人还有更多。而从星巴克2004年在苏州开出一线城市以外的第一家门店开始,星巴克每进入一个城市时,开业的情况多少伴随着这种仪式感。\n\n\n\n\n2017年11月11日,星巴克在河北衡水开出当地第一家门店\n\n\n\n\n\n\n\n最近几年,星巴克也不断出现在三四线城市。在2018财年,星巴克在中国市场新开了585家门店,进入17个新兴城市。在2018财年第四季度,星巴克新开了139家门店,并新进入5个城市。\n\n\n\n\n星巴克对“小镇青年”的影响,正复制了其最早在中国扩张时,对一线城市消费者的影响一样——高级消费生活文化,训练有素的店员,与其他快餐店截然不同的横向排队方式——这方便人们直观看到咖啡师的制作过程,减少等待的焦虑感……\n\n\n\n\n不过如今星巴克在中国面临的扩张挑战已是今时不同往日。\n\n\n\n\n虽然城市消费文化在不同等级的中国城市中还有明显的差异,但是人们的消费水平已经相对趋同——现在不会有人在豆瓣或者微信公众号教你如何在星巴克点单。\n\n\n\n\n追求咖啡美学化的第三次咖啡浪潮正逐步萌芽并向连锁咖啡店发起冲击,%Arabica等精品咖啡品牌进入中国市场,本土精品咖啡店也在崛起;而瑞幸、连咖啡等咖啡外送“搅局者”的出现,伴随着数字化生活为消费者带来的便利,也让一度高高在上的星巴克开始试着拥抱电商及各种线上平台。在瑞幸掀起的外卖咖啡风潮下,星巴克也加速了自己推出外卖服务的计划,与阿里巴巴合作在饿了么平台上进行配送。\n\n\n\n\n中国市场事实上已经开始出了饱和的迹象,至少在一二线城市星巴克咖啡随处可见——星巴克2018财年第三季度(2018年4月1日~6月30日)的财报显示,其中国区同店销售下降了2%,这是星巴克中国市场九年以来首次下滑,是当季全球表现最差的市场之一。\n\n\n\n\n而曾经在中国消费者心中遥不可及的星巴克,如今变得更迫切地想与消费者建立关联,来继续维持一种吸引力。\n\n\n\n\n星巴克在2016年12月终于接入微信支付,9个月后又接入了支付宝支付,并在此后迅速开始了数字化改革:开发微信社交礼品电子产品小程序“用星说”,接入阿里的会员体系并与阿里签订合作推出咖啡外送“专星送”服务......他们也在一线城市迅速扩张臻选门店。\n\n\n\n\n在星巴克微信账号1月9日的推送中,他们用“我们的20岁从喜欢咖啡开始”讲述了品牌进入中国20周年的故事。看起来这个品牌正努力变成一个正值年轻的少年形象,朝气蓬勃、还有梦想,刚满20岁。毕竟在经历了过去20年中国市场的开拓之后,它需要找到更多吸引消费者的东西。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "虎 嗅 注 本 文 转 自 界 面 记 者 刘 雨 静 杨 立 赟 编 辑 牙 韩 翔 2019 年 1 月 11 日 是 来 自 西 雅 图 的 咖 啡 公 司 星 巴 克 进 入 中 国 市 场 20 周 年 纪 念 日 如 今 中 国 市 场 对 于 星 巴 克 的 意 义 毋 庸 置 疑 从 业 绩 上 看 中 国 市 场 的 同 店 销 售 已 经 保 持 了 9 年 的 增 长 尽 管 在 2018 财 年 第 三 季 度 首 次 出 现 了 下 降 星 巴 克 公 司 对 未 来 的 发 展 策 略 中 把 中 国 市 场 与 数 字 化 及 高 端 品 牌 星 巴 克 臻 选 放 在 同 等 重 要 的 位 置 眼 下 它 正 在 以 每 天 超 过 一 家 门 店 的 数 量 在 中 国 扩 张 平 均 每 年 创 造 近 1 万 个 就 业 机 会 上 海 市 星 巴 克 的 门 店 数 量 已 经 超 过 了 纽 约 是 后 者 的 两 倍 对 于 觊 觎 中 国 市 场 的 外 资 零 售 公 司 而 言 星 巴 克 在 中 国 市 场 的 大 获 成 功 值 得 研 究 麦 当 劳 与 肯 德 基 把 西 式 快 餐 带 入 中 国 至 今 仍 然 被 人 称 为 垃 圾 食 品 沃 尔 玛 靠 低 价 的 概 念 让 人 们 接 受 了 大 卖 场 的 模 式 电 商 出 现 价 格 优 势 不 再 便 人 去 场 空 可 口 可 乐 在 中 国 投 入 不 菲 最 终 也 卖 掉 了 自 有 的 装 瓶 业 务 但 星 巴 克 却 能 让 喝 茶 的 中 国 人 接 受 喝 咖 啡 并 且 愿 意 承 担 一 种 让 它 获 利 颇 丰 的 商 业 溢 价 用 30 元 左 右 的 价 格 购 买 一 杯 带 有 被 人 们 认 为 有 逼 格 的 咖 啡 文 化 或 者 体 验 哪 怕 大 部 分 人 至 今 都 不 太 理 解 其 内 涵 这 是 西 方 外 来 者 们 曾 经 不 敢 期 待 的 局 面 20 年 星 巴 克 终 于 找 到 了 一 种 温 和 恰 当 的 方 式 在 中 国 站 稳 起 跑 与 加 速 一 名 消 费 者 拿 着 星 巴 克 产 品 对 着 其 标 志 拍 照 图 片 来 源 视 觉 中 国", "source_text": "虎嗅注:本文转自界面,记者:刘雨静、杨立赟,编辑:牙韩翔。\n\n\n\n\n2019年1月11日是来自西雅图的咖啡公司星巴克进入中国市场20周年纪念日。\n\n\n\n\n如今,中国市场对于星巴克的意义毋庸置疑。从业绩上看,中国市场的同店销售已经保持了9年的增长——尽管在2018财年第三季度首次出现了下降;星巴克公司对未来的发展策略中,把中国市场与数字化及高端品牌星巴克臻选放在同等重要的位置。眼下,它正在以每天超过一家门店的数量在中国扩张,平均每年创造近1万个就业机会,上海市星巴克的门店数量已经超过了纽约,是后者的两倍。\n\n\n\n\n对于觊觎中国市场的外资零售公司而言,星巴克在中国市场的大获成功值得研究。\n\n\n\n\n麦当劳与肯德基把西式快餐带入中国,至今仍然被人称为“垃圾食品”;沃尔玛靠“低价”的概念让人们接受了大卖场的模式,电商出现价格优势不再,便人去场空;可口可乐在中国投入不菲,最终也卖掉了自有的装瓶业务。\n\n\n\n\n但星巴克却能让喝茶的中国人接受喝咖啡,并且愿意承担一种让它获利颇丰的商业溢价——用30元左右的价格购买,一杯带有被人们认为有“逼格”的咖啡文化或者体验,哪怕大部分人至今都不太理解其内涵——这是西方外来者们曾经不敢期待的局面。\n\n\n\n\n20年,星巴克终于找到了一种温和恰当的方式在中国站稳、起跑与加速。\n\n\n\n\n一名消费者拿着星巴克产品对着其标志拍照。(图片来源:视觉中国)", "segmentation_method": "reviewed_source_semantics", "label": "开篇:虎嗅注:本文转自界面,记者:刘雨静、杨立赟,编辑:牙韩翔。", "source_line_range": [ 1, 40 ] }, { "id": "body-region-2", "text": "开 出 第 一 家 店 起 星 巴 克 在 中 国 亏 了 九 年 1999 年 1 月 当 星 巴 克 在 中 国 内 地 的 第 一 家 门 店 在 北 京 中 国 国 际 贸 易 中 心 正 式 开 业 的 时 候 中 国 人 对 咖 啡 的 认 知 还 停 留 在 雀 巢 的 速 溶 咖 啡 时 任 星 巴 克 大 中 华 区 总 裁 王 金 龙 是 北 京 本 地 人 1985 年 他 从 北 京 赴 美 求 学 7 年 后 加 入 星 巴 克 美 国 任 法 律 和 公 司 事 务 部 副 总 裁 时 星 巴 克 在 美 国 还 只 有 150 多 家 分 店 1995 年 星 巴 克 开 始 考 虑 向 海 外 拓 展 王 金 龙 被 委 以 重 任 升 任 负 责 国 际 业 务 拓 展 的 全 球 副 总 裁 4 年 之 后 王 金 龙 把 星 巴 克 带 回 了 他 的 故 乡 北 京 特 许 经 营 是 包 括 星 巴 克 麦 当 劳 等 不 少 外 资 餐 饮 品 牌 进 入 中 国 选 择 的 方 式 一 方 面 1990 年 代 末 的 中 国 尚 不 允 许 外 资 独 资 经 营 零 售 和 餐 饮 业 另 一 方 面 对 于 那 些 刚 刚 进 入 中 国 市 场 的 外 资 品 牌 而 言 与 本 土 企 业 合 作 方 便 他 们 更 快 速 地 深 入 本 地 市 场 也 是 降 低 异 地 移 植 风 险 的 最 佳 选 择 采 购 厨 房 控 制 有 人 分 担 自 己 只 需 要 输 出 品 牌 及 管 理 体 系 便 能 拥 有 一 定 的 销 售 分 成 星 巴 克 最 早 实 行 与 三 家 业 者 合 资 代 理 的 经 营 模 式 北 京 美 大 咖 啡 有 限 公 司 取 得 中 国 北 方 的 代 理 权 北 京 和 天 津 业 务 台 湾 统 一 集 团 取 得 苏 浙 沪 地 区 的 代 理 权 南 方 地 区 香 港 澳 门 广 东 海 南 深 圳 等 的 代 理 权 则 由 香 港 的 美 心 公 司 取 得 北 京 之 后 2000 年 5 月 星 巴 克 先 后 进 入 香 港 和 上 海 分 别 位 于 香 港 中 环 交 易 广 场 上 海 淮 海 路 力 宝 广 场 这 多 少 意 味 着 星 巴 克 一 开 始 就 打 定 主 意 在 中 国 走 高 端 路 线 从 高 端 商 场 写 字 楼 的 商 务 人 士 白 领 开 始 培 育 第 一 批 核 心 用 户 开 在 步 行 街 的 星 巴 克 咖 啡 事 实 上 这 也 符 合 星 巴 克 在 美 国 的 扩 张 逻 辑 早 前 星 巴 克 创 始 人 霍 华 德 舒 尔 茨 howard schultz 提 出 的 为 人 们 津 津 乐 道 的 第 三 空 间 概 念 把 咖 啡 店 视 为 家 与 办 公 场 所 以 外 的 社 交 去 处 这 帮 星 巴 克 在 美 国 扩 张 初 期 便 深 受 那 些 受 过 高 等 教 育 拥 有 一 定 购 买 力 对 社 交 及 生 活 品 质 有 所 要 求 的 年 轻 人 们 拥 趸 随 着 这 群 人 开 始 接 纳 星 巴 克 此 后 他 们 便 开 始 在 更 多 层 次 的 消 费 者 中 站 稳 脚 跟 不 过 在 当 时 的 中 国 北 京 的 房 价 还 停 留 在 每 平 米 2000 元 而 一 杯 卡 布 奇 诺 最 低 售 价 就 要 19 元 甚 至 没 几 个 人 知 道 卡 布 奇 诺 到 底 是 什 么 要 让 习 惯 喝 茶 的 中 国 消 费 者 心 甘 情 愿 地 为 此 掏 钱 实 在 太 难 了 从 1999 年 在 北 京 开 出 第 一 家 店 起 星 巴 克 整 整 亏 损 了 九 年 进 入 中 国 市 场 的 计 划 起 初 也 不 被 投 资 人 看 好 在 中 国 市 场 多 年 的 亏 损 在 公 司 内 部 和 外 界 都 形 成 了 离 开 和 放 弃 中 国 市 场 的 巨 大 压 力 霍 华 德 在 自 传 一 路 向 前 中 说 公 司 面 临 的 一 个 挑 战 是 需 要 让 这 个 以 茶 闻 名 的 国 度 了 解 咖 啡 文 化 星 巴 克 在 中 国 的 尝 试 初 期 有 些 股 东 抱 怨 花 了 太 多 钱 但 王 金 龙 坚 持 认 为 这 是 一 个 能 够 获 得 长 期 回 报 的 策 略 关 键 在 于 等 待 总 有 一 天 能 等 到 中 国 消 费 者 达 到 一 定 收 入 水 平 等 到 品 牌 引 导 他 们 形 成 咖 啡 消 费 习 惯 当 然 除 了 等 霍 华 德 也 在 想 星 巴 克 进 入 中 国 的 方 式 是 不 是 出 了 问 题 虽 然 中 国 消 费 者 对 于 外 资 品 牌 多 少 有 一 种 盲 从 但 把 星 巴 克 美 国 的 资 深 经 理 调 往 中 国 经 营 那 里 的 业 务 让 中 国 员 工 铭 记 星 巴 克 的 文 化 最 后 被 证 明 是 一 个 错 误 2009 年 9 月 霍 华 德 飞 往 中 国 走 访 了 多 地 的 星 巴 克 伙 伴 和 消 费 者 迫 切 地 想 通 过 这 个 世 界 上 经 济 增 长 最 快 的 主 要 经 济 体 推 动 星 巴 克 的 未 来 这 一 次 的 走 访 中 这 个 创 始 人 被 星 巴 克 在 中 国 市 场 的 本 土 化 所 震 惊 他 甚 至 用 一 种 观 察 者 的 目 光 来 看 待 这 个 品 牌 在 中 国 市 场 所 接 受 的 改 造 在 一 顿 午 餐 的 过 程 中 霍 华 德 尝 试 了 一 道 接 一 道 的 新 产 品 花 生 摩 卡 星 冰 乐 黑 芝 麻 抹 茶 星 冰 乐 冰 镇 芦 荟 东 方 美 人 茶 这 些 中 国 餐 饮 中 常 用 的 原 料 被 创 意 性 地 添 加 到 这 个 美 国 的 咖 啡 品 牌 中 霍 华 德 意 识 到 中 国 伙 伴 摆 脱 了 旧 思 维 的 束 缚 富 有 创 造 力 虽 然 他 尝 到 的 这 些 新 品 大 部 分 仅 限 于 老 板 菜 单 这 些 新 品 并 不 一 定 真 的 会 在 中 国 上 市 但 他 意 识 到 领 导 团 队 必 须 是 美 国 人 和 中 国 人 的 结 合 最 终 完 全 是 一 个 满 腔 热 忱 的 中 国 管 理 团 队 由 一 名 中 国 首 席 执 行 官 领 导 但 即 便 如 此 星 巴 克 在 融 入 中 国 文 化 的 一 开 始 还 是 有 点 水 土 不 服", "source_text": "开出第一家店起,星巴克在中国亏了九年\n\n\n\n\n1999年1月,当星巴克在中国内地的第一家门店在北京中国国际贸易中心正式开业的时候,中国人对咖啡的认知还停留在雀巢的速溶咖啡。\n\n\n\n\n时任星巴克大中华区总裁王金龙是北京本地人。1985年他从北京赴美求学,7年后加入星巴克美国任法律和公司事务部副总裁时,星巴克在美国还只有150多家分店。1995年,星巴克开始考虑向海外拓展,王金龙被委以重任,升任负责国际业务拓展的全球副总裁。\n\n\n\n\n4年之后,王金龙把星巴克带回了他的故乡北京。\n\n\n\n\n特许经营是包括星巴克、麦当劳等不少外资餐饮品牌进入中国选择的方式。一方面,1990年代末的中国,尚不允许外资独资经营零售和餐饮业;另一方面,对于那些刚刚进入中国市场的外资品牌而言,与本土企业合作方便他们更快速地深入本地市场,也是降低异地移植风险的最佳选择——采购、厨房控制有人分担,自己只需要输出品牌及管理体系,便能拥有一定的销售分成。\n\n\n\n\n星巴克最早实行与三家业者合资代理的经营模式:北京美大咖啡有限公司取得中国北方的代理权(北京和天津业务),台湾统一集团取得苏浙沪地区的代理权,南方地区(香港、澳门、广东、海南、深圳等)的代理权则由香港的美心公司取得。\n\n\n\n\n北京之后,2000年5月,星巴克先后进入香港和上海,分别位于香港中环交易广场、上海淮海路力宝广场——这多少意味着星巴克一开始就打定主意在中国走高端路线,从高端商场、写字楼的商务人士、白领开始,培育第一批核心用户。\n\n\n\n\n开在步行街的星巴克咖啡\n\n\n\n\n事实上这也符合星巴克在美国的扩张逻辑。早前星巴克创始人霍华德·舒尔茨(Howard Schultz)提出的为人们津津乐道的“第三空间”概念——把咖啡店视为家与办公场所以外的社交去处,这帮星巴克在美国扩张初期便深受那些受过高等教育、拥有一定购买力、对社交及生活品质有所要求的年轻人们拥趸——随着这群人开始接纳星巴克,此后他们便开始在更多层次的消费者中站稳脚跟。\n\n\n\n\n不过在当时的中国,北京的房价还停留在每平米2000元,而一杯卡布奇诺最低售价就要19元,甚至没几个人知道卡布奇诺到底是什么——要让习惯喝茶的中国消费者心甘情愿地为此掏钱实在太难了。\n\n\n\n\n从1999年在北京开出第一家店起,星巴克整整亏损了九年。\n\n\n\n\n进入中国市场的计划起初也不被投资人看好。“(在中国市场)多年的亏损在公司内部和外界都形成了离开和放弃中国市场的巨大压力,”霍华德在自传《一路向前》中说。“公司面临的一个挑战是需要让这个以茶闻名的国度了解咖啡文化。”\n\n\n\n\n星巴克在中国的尝试初期,有些股东抱怨花了太多钱。但王金龙坚持认为,这是一个能够获得长期回报的策略,关键在于等待。总有一天能等到中国消费者达到一定收入水平,等到品牌引导他们形成咖啡消费习惯。\n\n\n\n\n当然除了等,霍华德也在想星巴克进入中国的方式是不是出了问题。\n\n\n\n\n虽然中国消费者对于外资品牌多少有一种盲从,但把星巴克美国的资深经理调往中国,经营那里的业务,让中国员工铭记星巴克的文化,最后被证明是一个错误。\n\n\n\n\n2009年9月,霍华德飞往中国,走访了多地的星巴克伙伴和消费者,迫切地想通过这个世界上经济增长最快的主要经济体推动星巴克的未来。这一次的走访中,这个创始人被星巴克在中国市场的本土化所震惊,他甚至用一种观察者的目光来看待这个品牌在中国市场所接受的“改造”。\n\n\n\n\n在一顿午餐的过程中,霍华德尝试了一道接一道的新产品:花生摩卡星冰乐、黑芝麻抹茶星冰乐、冰镇芦荟东方美人茶……这些中国餐饮中常用的原料,被创意性地添加到这个美国的咖啡品牌中。\n\n\n\n\n霍华德意识到,中国伙伴“摆脱了旧思维的束缚”,富有创造力——虽然他尝到的这些新品,大部分仅限于“老板菜单”,这些新品并不一定真的会在中国上市。但他意识到,领导团队必须是美国人和中国人的结合,最终完全是一个满腔热忱的中国管理团队,由一名中国首席执行官领导。\n\n\n\n\n但即便如此,星巴克在融入中国文化的一开始,还是有点“水土不服”。", "segmentation_method": "reviewed_source_semantics", "label": "开出第一家店起,星巴克在中国亏了九年", "source_line_range": [ 41, 135 ] }, { "id": "body-region-3", "text": "第 三 空 间 装 逼 星 巴 克 也 没 有 想 到 自 己 提 出 的 第 三 空 间 概 念 在 推 向 中 国 时 被 演 绎 成 了 另 外 一 种 面 貌 首 先 你 必 须 带 一 本 杂 志 啥 读 者 呸 那 你 只 配 去 火 车 站 买 杯 豆 浆 蹲 着 喝 去 中 文 的 杂 志 一 律 pass 必 须 得 英 文 原 版 的 什 么 reader s digest 我 说 你 有 完 没 完 啊 按 照 小 资 圣 经 保 罗 福 塞 尔 写 的 那 本 格 调 里 面 所 说 连 国 家 地 理 time 之 类 的 杂 志 都 只 会 暴 露 出 你 庸 俗 的 小 中 产 阶 级 格 调 起 码 得 拿 本 economist 吧 或 者 fortune forbes 2010 年 豆 瓣 曾 流 传 着 一 份 星 巴 克 完 全 装 逼 指 南 关 于 如 何 在 星 巴 克 装 逼 从 着 装 携 带 的 书 籍 电 子 设 备 到 支 付 方 式 打 电 话 的 语 言 等 等 都 有 详 尽 的 说 明 很 显 然 在 10 年 前 星 巴 克 的 第 三 空 间 仍 然 是 很 多 中 国 人 对 西 方 生 活 生 活 的 窥 视 窗 口 虽 然 带 着 一 种 不 自 信 的 嘲 讽 与 鄙 视 星 巴 克 把 门 店 视 为 一 种 第 三 空 间 的 概 念 不 过 从 商 业 回 报 上 来 说 这 种 情 绪 对 于 星 巴 克 在 中 国 的 扩 张 来 说 却 是 最 强 劲 的 东 风 在 中 国 经 济 逐 渐 起 步 上 升 的 过 程 中 这 些 消 费 者 一 边 嘲 讽 着 西 式 的 装 逼 一 边 又 向 往 着 那 样 的 生 活 方 式 他 们 对 外 来 品 牌 的 期 待 并 不 是 我 能 在 这 里 买 到 什 么 而 是 在 这 里 消 费 能 让 我 看 起 来 像 什 么 澳 大 利 亚 市 场 学 教 授 byron sharp 曾 在 品 牌 如 何 增 长 一 书 中 讲 述 任 何 消 费 品 品 牌 的 增 长 都 可 以 归 结 为 心 智 的 显 著 性 mental availability 和 购 买 的 便 利 性 physical availability 心 智 的 显 著 性 便 是 人 们 在 某 个 消 费 场 合 主 动 想 到 品 牌 的 可 能 性 它 并 不 只 与 品 牌 曝 光 有 关 而 是 与 人 们 对 品 牌 的 既 有 印 象 和 品 牌 传 递 的 质 量 有 关 当 星 巴 克 逐 步 把 自 己 在 中 国 顾 客 中 的 品 牌 形 象 直 接 与 高 端 划 上 等 号 变 成 白 领 商 务 人 士 谈 事 的 地 方 或 是 追 求 生 活 品 质 的 人 才 去 消 费 的 地 方 加 之 线 下 门 店 的 逐 步 扩 张 很 大 程 度 上 刺 激 了 人 们 的 消 费 碰 壁 与 让 步 但 有 时 候 这 种 暧 昧 的 关 系 也 会 走 向 极 端 比 如 最 基 本 的 星 巴 克 的 杯 型 命 名 方 式 就 曾 受 到 诸 多 质 疑 在 星 巴 克 点 餐 台 没 有 小 杯 的 选 项 取 而 代 之 他 们 命 名 为 中 杯 tall 大 杯 grande 与 超 大 杯 venti 2016 年 一 位 名 为 林 国 童 的 星 巴 克 金 卡 会 员 在 自 己 的 公 众 号 中 向 星 巴 克 中 国 ceo 王 静 瑛 写 了 一 封 公 开 信 表 示 自 己 作 为 6 年 星 享 卡 金 卡 会 员 在 星 巴 克 消 费 时 明 明 只 想 买 一 杯 中 杯 咖 啡 却 被 店 员 连 续 两 次 确 认 你 确 定 是 中 杯 吗 中 杯 是 我 们 最 小 的 杯 型 哦 这 让 他 觉 得 有 所 冒 犯 罗 永 浩 也 曾 在 微 电 影 幸 福 59 厘 米 之 小 马 中 用 自 抽 耳 光 的 方 式 表 达 对 星 巴 克 把 大 中 小 三 种 杯 型 分 为 超 大 大 与 中 杯 的 不 满 而 星 巴 克 中 国 当 时 对 于 中 杯 事 件 的 回 应 称 在 门 店 日 常 运 营 中 为 确 保 顾 客 杯 型 选 择 准 确 有 时 会 再 次 与 顾 客 确 认 杯 型 并 无 推 销 意 味 星 巴 克 的 杯 型 设 置 还 有 2007 年 1 月 12 日 当 时 的 央 视 主 播 芮 成 钢 在 博 客 上 发 出 了 一 篇 名 为 请 星 巴 克 从 故 宫 里 出 去 文 章 认 为 故 宫 里 的 星 巴 克 是 对 中 国 传 统 文 化 的 糟 蹋 并 以 个 人 名 义 向 星 巴 克 总 裁 发 出 抗 议 书 要 求 星 巴 克 从 故 宫 里 搬 出 去 随 后 人 民 日 报 首 先 刊 发 了 芮 成 钢 的 文 章 国 内 几 百 家 媒 体 开 始 报 道 博 客 点 击 量 几 天 之 内 50 万 当 时 的 舆 论 中 不 少 网 友 表 示 支 持 随 后 星 巴 克 方 面 回 应 称 六 年 前 是 应 故 宫 博 物 院 的 邀 请 星 巴 克 在 故 宫 开 了 分 店 并 已 经 为 适 应 紫 禁 城 的 环 境 作 了 认 真 的 努 力 但 它 在 舆 论 的 压 力 之 下 不 断 让 步 先 把 把 窗 户 上 的 标 识 摘 了 下 来 随 后 把 故 宫 里 的 所 有 星 巴 克 标 识 一 减 再 减 尽 量 做 到 让 人 认 不 出 来 直 到 2007 年 7 月 星 巴 克 正 式 撤 离 故 宫 早 年 故 宫 里 的 星 巴 克", "source_text": "第三空间=装逼?\n\n\n\n\n星巴克也没有想到,自己提出的“第三空间”概念在推向中国时被演绎成了另外一种面貌。\n\n\n\n\n“首先你必须带一本杂志,啥?《读者》?呸,那你只配去火车站买杯豆浆蹲着喝去。中文的杂志一律PASS!必须得英文原版的!什么?《Reader’s digest》?我说你有完没完啊?!按照小资圣经——保罗.福塞尔写的那本《格调》里面所说,连《国家地理》《TIME》之类的杂志都只会暴露出你庸俗的小中产阶级格调,起码得拿本《Economist》吧,或者《FORTUNE》、《Forbes》……”\n\n2010年豆瓣曾流传着一份《星巴克完全装逼指南》,关于如何在星巴克装逼,从着装、携带的书籍、电子设备,到支付方式、打电话的语言等等,都有详尽的说明。\n\n\n\n\n很显然,在10年前,星巴克的“第三空间”,仍然是很多中国人对西方生活生活的窥视窗口,虽然带着一种不自信的嘲讽与鄙视。\n\n\n\n\n星巴克把门店视为一种“第三空间”的概念\n\n\n\n\n不过,从商业回报上来说,这种情绪对于星巴克在中国的扩张来说却是最强劲的“东风”。\n\n\n\n\n在中国经济逐渐起步上升的过程中,这些消费者一边嘲讽着西式的“装逼”,一边又向往着那样的生活方式。他们对外来品牌的期待,并不是我能在这里买到什么,而是在这里消费,能让我看起来像什么。\n\n\n\n\n澳大利亚市场学教授Byron Sharp曾在《品牌如何增长》一书中讲述,任何消费品品牌的增长都可以归结为心智的显著性(Mental Availability)和购买的便利性(Physical Availability)。心智的显著性便是人们在某个消费场合主动想到品牌的可能性,它并不只与品牌曝光有关,而是与人们对品牌的既有印象和品牌传递的质量有关。\n\n\n\n\n当星巴克逐步把自己在中国顾客中的品牌形象直接与高端划上等号——变成白领、商务人士谈事的地方,或是追求生活品质的人才去消费的地方,加之线下门店的逐步扩张——很大程度上刺激了人们的消费。\n\n\n\n\n碰壁与让步\n\n\n\n\n但有时候,这种暧昧的关系也会走向极端。\n\n\n\n\n比如最基本的——星巴克的杯型命名方式就曾受到诸多质疑,在星巴克点餐台没有“小杯”的选项,取而代之他们命名为中杯(tall)、大杯(grande)与超大杯(venti)。\n\n\n\n\n2016年,一位名为林国童的星巴克金卡会员在自己的公众号中向星巴克中国CEO王静瑛写了一封公开信,表示自己作为6年星享卡金卡会员,在星巴克消费时,明明只想买一杯中杯咖啡,却被店员连续两次确认“你确定是中杯吗”,“中杯是我们最小的杯型哦”,这让他觉得有所冒犯。罗永浩也曾在微电影《幸福59厘米之小马》中,用自抽耳光的方式表达对星巴克把大中小三种杯型分为“超大、大与中杯”的不满。\n\n\n\n\n而星巴克中国当时对于中杯事件的回应称,在门店日常运营中,为确保顾客杯型选择准确,有时会再次与顾客确认杯型,并无推销意味。\n\n\n\n\n星巴克的杯型设置\n\n\n\n\n还有2007年1月12日,当时的央视主播芮成钢在博客上发出了一篇名为《请星巴克从故宫里出去》文章,认为“故宫里的星巴克”是对中国传统文化的糟蹋,并以个人名义向星巴克总裁发出抗议书,要求星巴克从故宫里搬出去。随后《人民日报》首先刊发了芮成钢的文章,国内几百家媒体开始报道。博客点击量几天之内50万,当时的舆论中不少网友表示支持。\n\n\n\n\n随后星巴克方面回应称,“六年前,是应故宫博物院的邀请,星巴克在故宫开了分店”,并已经为“适应紫禁城的环境作了认真的努力。”\n\n\n\n\n但它在舆论的压力之下不断让步——先把把窗户上的标识摘了下来,随后把故宫里的所有星巴克标识一减再减,尽量做到让人认不出来,直到2007年7月,星巴克正式撤离故宫。\n\n\n\n\n早年故宫里的星巴克", "segmentation_method": "reviewed_source_semantics", "label": "第三空间=装逼? — 碰壁与让步", "source_line_range": [ 136, 232 ] }, { "id": "body-region-4", "text": "对 中 国 的 隐 形 投 入 虽 然 偶 有 摩 擦 星 巴 克 还 是 找 到 了 一 个 更 温 和 的 方 式 融 入 中 国 市 场 它 加 大 了 对 中 国 的 投 资 力 度 不 仅 仅 是 商 业 层 面 上 的 还 有 门 店 背 后 的 各 种 方 面 有 时 候 它 想 要 捕 获 欢 心 的 对 象 也 不 仅 仅 是 消 费 者 星 巴 克 把 自 己 的 员 工 称 为 伙 伴 星 巴 克 的 伙 伴 通 常 拥 有 免 费 咖 啡 免 费 伙 伴 券 的 福 利 除 了 国 家 规 定 的 福 利 待 遇 之 外 它 还 颇 为 少 见 地 为 员 工 的 父 母 们 购 买 大 病 保 险 星 巴 克 在 中 国 召 开 的 员 工 大 会 霍 华 德 也 曾 出 现 一 些 来 自 门 店 的 员 工 见 到 他 激 动 到 哭 出 来 星 巴 克 还 曾 推 出 过 一 项 计 划 当 星 巴 克 不 断 下 沉 至 低 线 城 市 时 如 果 在 员 工 自 己 的 家 乡 开 店 他 们 可 以 申 请 调 职 回 去 2012 年 这 家 美 国 公 司 在 云 南 投 资 建 厂 并 在 云 南 普 洱 设 立 了 咖 啡 种 植 者 支 持 中 心 扶 持 当 地 的 咖 啡 豆 种 植 者 收 购 它 所 认 可 的 咖 啡 生 豆 星 巴 克 云 南 咖 啡 已 经 覆 盖 1678 个 农 场 和 16000 公 顷 咖 啡 它 还 大 力 宣 传 来 自 云 南 的 咖 啡 豆 类 似 于 曾 经 星 巴 克 推 广 过 的 哥 伦 比 亚 埃 塞 俄 比 亚 和 苏 门 答 腊 岛 的 咖 啡 这 些 投 入 事 实 上 也 是 在 努 力 获 得 中 国 无 论 是 政 府 还 是 消 费 者 的 认 同 的 一 种 尝 试 星 巴 克 很 注 重 培 养 员 工 对 企 业 的 认 同 感 当 经 历 了 各 种 磨 合 与 挑 战 最 终 获 得 大 多 数 消 费 者 认 可 的 时 候 星 巴 克 便 开 始 加 速 扩 张 它 在 2017 年 发 起 了 史 上 最 大 首 笔 的 收 购 案 为 了 全 面 掌 握 在 中 国 的 经 营 权 他 们 以 13 亿 美 元 收 购 中 国 合 作 伙 伴 统 一 企 业 和 统 一 超 商 手 中 剩 余 50 股 权 全 资 拥 有 华 东 地 区 1500 家 星 巴 克 门 店 星 巴 克 门 店 的 市 场 经 营 权 正 逐 步 重 新 回 到 星 巴 克 手 中 在 特 许 经 营 的 常 规 合 作 流 程 里 无 论 是 门 店 改 造 增 设 设 备 还 是 移 动 数 字 化 改 造 都 需 要 经 过 特 许 经 营 伙 伴 的 许 可 更 需 要 自 己 承 担 全 部 成 本 收 回 特 许 经 营 权 意 味 着 尽 管 经 历 了 不 少 争 议 与 挑 战 但 他 们 在 中 国 的 扩 张 进 一 步 扫 除 了 障 碍 随 后 星 巴 克 在 中 国 开 始 再 次 加 速 扩 张 2018 年 5 月 16 日 星 巴 克 第 一 次 在 中 国 召 开 了 它 的 全 球 投 资 者 交 流 大 会 它 毫 不 掩 饰 自 己 的 野 心 星 巴 克 计 划 截 至 2022 财 年 底 将 以 每 年 新 拓 展 18 20 个 城 市 的 速 度 在 中 国 大 陆 全 新 进 入 100 个 城 市 覆 盖 总 数 达 到 230 个 城 市 同 时 每 年 新 增 门 店 数 将 提 升 20 至 600 家 最 终 实 现 门 店 数 达 到 6000 家 的 目 标 此 外 在 未 来 五 年 星 巴 克 中 国 的 总 营 收 预 计 将 达 到 2017 财 年 的 3 倍 营 运 收 入 将 翻 两 番 以 上 霍 华 德 曾 在 某 次 接 受 cnbc 采 访 时 说 如 果 有 天 我 们 在 中 国 市 场 上 的 连 锁 店 数 量 超 过 了 美 国 连 锁 店 的 数 量 我 不 会 对 此 感 到 意 外 现 在 我 们 刚 刚 开 始 教 中 国 人 学 着 在 早 上 喝 咖 啡", "source_text": "对中国的“隐形”投入\n\n\n\n\n虽然偶有摩擦,星巴克还是找到了一个更温和的方式融入中国市场。它加大了对中国的投资力度,不仅仅是商业层面上的,还有门店背后的各种方面,有时候它想要捕获欢心的对象也不仅仅是消费者。\n\n星巴克把自己的员工称为“伙伴”。星巴克的伙伴通常拥有免费咖啡、免费伙伴券的福利,除了国家规定的福利待遇之外,它还颇为少见地为员工的父母们购买大病保险。\n\n\n\n\n星巴克在中国召开的员工大会,霍华德也曾出现,一些来自门店的员工见到他激动到哭出来。星巴克还曾推出过一项计划,当星巴克不断下沉至低线城市时,如果在员工自己的家乡开店,他们可以申请调职回去。\n\n\n\n\n2012年,这家美国公司在云南投资建厂,并在云南普洱设立了咖啡种植者支持中心扶持当地的咖啡豆种植者,收购它所认可的咖啡生豆,星巴克云南咖啡已经覆盖1678个农场和16000公顷咖啡。它还大力宣传来自云南的咖啡豆,类似于曾经星巴克推广过的哥伦比亚、埃塞俄比亚和苏门答腊岛的咖啡。\n\n这些投入事实上也是在努力获得中国——无论是政府还是消费者的——认同的一种尝试。\n\n\n\n\n星巴克很注重培养员工对企业的认同感\n\n\n\n\n当经历了各种磨合与挑战,最终获得大多数消费者认可的时候,星巴克便开始加速扩张。它在2017年发起了史上最大首笔的收购案,为了全面掌握在中国的经营权——他们以13亿美元收购中国合作伙伴统一企业和统一超商手中剩余50%股权,全资拥有华东地区1500家星巴克门店。\n\n\n\n\n星巴克门店的市场经营权正逐步重新回到星巴克手中——在特许经营的常规合作流程里,无论是门店改造、增设设备还是移动数字化改造都需要经过特许经营伙伴的许可,更需要自己承担全部成本。收回特许经营权意味着,尽管经历了不少争议与挑战,但他们在中国的扩张进一步扫除了障碍。\n\n\n\n\n随后,星巴克在中国开始再次加速扩张。\n\n\n\n\n2018年5月16日,星巴克第一次在中国召开了它的全球投资者交流大会。它毫不掩饰自己的野心——星巴克计划截至2022财年底,将以每年新拓展18~20个城市的速度在中国大陆全新进入100个城市,覆盖总数达到230个城市,同时,每年新增门店数将提升20%至600家,最终实现门店数达到6000家的目标。此外,在未来五年,星巴克中国的总营收预计将达到2017财年的3倍,营运收入将翻两番以上。\n\n\n\n\n霍华德曾在某次接受CNBC采访时说,“如果有天我们在中国市场上的连锁店数量超过了美国连锁店的数量,我不会对此感到意外......现在我们刚刚开始教中国人学着在早上喝咖啡。”", "segmentation_method": "reviewed_source_semantics", "label": "对中国的“隐形”投入", "source_line_range": [ 233, 286 ] }, { "id": "body-region-5", "text": "中 国 的 下 一 个 20 年 星 巴 克 的 底 气 来 自 中 国 的 三 四 线 城 市 2015 年 5 月 15 日 河 南 洛 阳 的 第 一 家 星 巴 克 开 幕 这 也 是 星 巴 克 在 河 南 省 于 郑 州 市 以 外 的 第 二 站 年 轻 人 刘 松 豪 在 7 点 40 分 来 到 了 洛 阳 王 府 井 百 货 门 店 3 个 小 时 后 他 在 十 几 位 星 巴 克 店 员 的 夹 道 欢 迎 中 买 到 了 洛 阳 第 一 杯 星 巴 克 此 后 他 手 握 洛 阳 城 市 杯 的 照 片 出 现 在 河 南 省 内 最 大 的 报 纸 大 河 报 上 我 走 上 了 星 巴 克 装 逼 之 路 刘 松 豪 当 日 的 朋 友 圈 写 道 在 外 等 待 开 业 的 人 还 有 更 多 而 从 星 巴 克 2004 年 在 苏 州 开 出 一 线 城 市 以 外 的 第 一 家 门 店 开 始 星 巴 克 每 进 入 一 个 城 市 时 开 业 的 情 况 多 少 伴 随 着 这 种 仪 式 感 2017 年 11 月 11 日 星 巴 克 在 河 北 衡 水 开 出 当 地 第 一 家 门 店 最 近 几 年 星 巴 克 也 不 断 出 现 在 三 四 线 城 市 在 2018 财 年 星 巴 克 在 中 国 市 场 新 开 了 585 家 门 店 进 入 17 个 新 兴 城 市 在 2018 财 年 第 四 季 度 星 巴 克 新 开 了 139 家 门 店 并 新 进 入 5 个 城 市 星 巴 克 对 小 镇 青 年 的 影 响 正 复 制 了 其 最 早 在 中 国 扩 张 时 对 一 线 城 市 消 费 者 的 影 响 一 样 高 级 消 费 生 活 文 化 训 练 有 素 的 店 员 与 其 他 快 餐 店 截 然 不 同 的 横 向 排 队 方 式 这 方 便 人 们 直 观 看 到 咖 啡 师 的 制 作 过 程 减 少 等 待 的 焦 虑 感 不 过 如 今 星 巴 克 在 中 国 面 临 的 扩 张 挑 战 已 是 今 时 不 同 往 日 虽 然 城 市 消 费 文 化 在 不 同 等 级 的 中 国 城 市 中 还 有 明 显 的 差 异 但 是 人 们 的 消 费 水 平 已 经 相 对 趋 同 现 在 不 会 有 人 在 豆 瓣 或 者 微 信 公 众 号 教 你 如 何 在 星 巴 克 点 单 追 求 咖 啡 美 学 化 的 第 三 次 咖 啡 浪 潮 正 逐 步 萌 芽 并 向 连 锁 咖 啡 店 发 起 冲 击 arabica 等 精 品 咖 啡 品 牌 进 入 中 国 市 场 本 土 精 品 咖 啡 店 也 在 崛 起 而 瑞 幸 连 咖 啡 等 咖 啡 外 送 搅 局 者 的 出 现 伴 随 着 数 字 化 生 活 为 消 费 者 带 来 的 便 利 也 让 一 度 高 高 在 上 的 星 巴 克 开 始 试 着 拥 抱 电 商 及 各 种 线 上 平 台 在 瑞 幸 掀 起 的 外 卖 咖 啡 风 潮 下 星 巴 克 也 加 速 了 自 己 推 出 外 卖 服 务 的 计 划 与 阿 里 巴 巴 合 作 在 饿 了 么 平 台 上 进 行 配 送 中 国 市 场 事 实 上 已 经 开 始 出 了 饱 和 的 迹 象 至 少 在 一 二 线 城 市 星 巴 克 咖 啡 随 处 可 见 星 巴 克 2018 财 年 第 三 季 度 2018 年 4 月 1 日 6 月 30 日 的 财 报 显 示 其 中 国 区 同 店 销 售 下 降 了 2 这 是 星 巴 克 中 国 市 场 九 年 以 来 首 次 下 滑 是 当 季 全 球 表 现 最 差 的 市 场 之 一 而 曾 经 在 中 国 消 费 者 心 中 遥 不 可 及 的 星 巴 克 如 今 变 得 更 迫 切 地 想 与 消 费 者 建 立 关 联 来 继 续 维 持 一 种 吸 引 力 星 巴 克 在 2016 年 12 月 终 于 接 入 微 信 支 付 9 个 月 后 又 接 入 了 支 付 宝 支 付 并 在 此 后 迅 速 开 始 了 数 字 化 改 革 开 发 微 信 社 交 礼 品 电 子 产 品 小 程 序 用 星 说 接 入 阿 里 的 会 员 体 系 并 与 阿 里 签 订 合 作 推 出 咖 啡 外 送 专 星 送 服 务 他 们 也 在 一 线 城 市 迅 速 扩 张 臻 选 门 店 在 星 巴 克 微 信 账 号 1 月 9 日 的 推 送 中 他 们 用 我 们 的 20 岁 从 喜 欢 咖 啡 开 始 讲 述 了 品 牌 进 入 中 国 20 周 年 的 故 事 看 起 来 这 个 品 牌 正 努 力 变 成 一 个 正 值 年 轻 的 少 年 形 象 朝 气 蓬 勃 还 有 梦 想 刚 满 20 岁 毕 竟 在 经 历 了 过 去 20 年 中 国 市 场 的 开 拓 之 后 它 需 要 找 到 更 多 吸 引 消 费 者 的 东 西", "source_text": "中国的下一个20年\n\n\n\n\n星巴克的底气来自中国的三四线城市。\n\n\n\n\n2015年5月15日,河南洛阳的第一家星巴克开幕——这也是星巴克在河南省于郑州市以外的第二站。年轻人刘松豪在7点40分来到了洛阳王府井百货门店。 3个小时后,他在十几位星巴克店员的夹道欢迎中买到了洛阳第一杯星巴克,此后他手握洛阳城市杯的照片出现在河南省内最大的报纸《大河报》上。“我走上了星巴克装逼之路。”刘松豪当日的朋友圈写道。\n\n\n\n\n在外等待开业的人还有更多。而从星巴克2004年在苏州开出一线城市以外的第一家门店开始,星巴克每进入一个城市时,开业的情况多少伴随着这种仪式感。\n\n\n\n\n2017年11月11日,星巴克在河北衡水开出当地第一家门店\n\n\n\n\n\n\n\n最近几年,星巴克也不断出现在三四线城市。在2018财年,星巴克在中国市场新开了585家门店,进入17个新兴城市。在2018财年第四季度,星巴克新开了139家门店,并新进入5个城市。\n\n\n\n\n星巴克对“小镇青年”的影响,正复制了其最早在中国扩张时,对一线城市消费者的影响一样——高级消费生活文化,训练有素的店员,与其他快餐店截然不同的横向排队方式——这方便人们直观看到咖啡师的制作过程,减少等待的焦虑感……\n\n\n\n\n不过如今星巴克在中国面临的扩张挑战已是今时不同往日。\n\n\n\n\n虽然城市消费文化在不同等级的中国城市中还有明显的差异,但是人们的消费水平已经相对趋同——现在不会有人在豆瓣或者微信公众号教你如何在星巴克点单。\n\n\n\n\n追求咖啡美学化的第三次咖啡浪潮正逐步萌芽并向连锁咖啡店发起冲击,%Arabica等精品咖啡品牌进入中国市场,本土精品咖啡店也在崛起;而瑞幸、连咖啡等咖啡外送“搅局者”的出现,伴随着数字化生活为消费者带来的便利,也让一度高高在上的星巴克开始试着拥抱电商及各种线上平台。在瑞幸掀起的外卖咖啡风潮下,星巴克也加速了自己推出外卖服务的计划,与阿里巴巴合作在饿了么平台上进行配送。\n\n\n\n\n中国市场事实上已经开始出了饱和的迹象,至少在一二线城市星巴克咖啡随处可见——星巴克2018财年第三季度(2018年4月1日~6月30日)的财报显示,其中国区同店销售下降了2%,这是星巴克中国市场九年以来首次下滑,是当季全球表现最差的市场之一。\n\n\n\n\n而曾经在中国消费者心中遥不可及的星巴克,如今变得更迫切地想与消费者建立关联,来继续维持一种吸引力。\n\n\n\n\n星巴克在2016年12月终于接入微信支付,9个月后又接入了支付宝支付,并在此后迅速开始了数字化改革:开发微信社交礼品电子产品小程序“用星说”,接入阿里的会员体系并与阿里签订合作推出咖啡外送“专星送”服务......他们也在一线城市迅速扩张臻选门店。\n\n\n\n\n在星巴克微信账号1月9日的推送中,他们用“我们的20岁从喜欢咖啡开始”讲述了品牌进入中国20周年的故事。看起来这个品牌正努力变成一个正值年轻的少年形象,朝气蓬勃、还有梦想,刚满20岁。毕竟在经历了过去20年中国市场的开拓之后,它需要找到更多吸引消费者的东西。", "segmentation_method": "reviewed_source_semantics", "label": "中国的下一个20年", "source_line_range": [ 287, 355 ] } ], "ending": { "text": "欢咖啡开始”讲述了品牌进入中国20周年的故事。看起来这个品牌正努力变成一个正值年轻的少年形象,朝气蓬勃、还有梦想,刚满20岁。毕竟在经历了过去20年中国市场的开拓之后,它需要找到更多吸引消费者的东西。" } } }, { "id": "article-024", "name": "参观国博实用攻略", "url": "https://www.chnmuseum.cn/zx/gbxw/202609/t20260923_282658.shtml", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "参观国博实用攻略,请您查收!" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "中国国家博物馆" ] }, { "id": "stable-3", "alternatives": [ "藏品" ] }, { "id": "stable-4", "alternatives": [ "文保" ] }, { "id": "stable-5", "alternatives": [ "研究" ] }, { "id": "stable-6", "alternatives": [ "展览" ] }, { "id": "stable-7", "alternatives": [ "社教" ] }, { "id": "stable-8", "alternatives": [ "文创" ] }, { "id": "stable-9", "alternatives": [ "服务" ] }, { "id": "stable-10", "alternatives": [ "视频" ] }, { "id": "stable-11", "alternatives": [ "English" ] }, { "id": "stable-12", "alternatives": [ "首页" ] }, { "id": "stable-13", "alternatives": [ "资讯" ] }, { "id": "stable-14", "alternatives": [ "国博要闻" ] }, { "id": "stable-15", "alternatives": [ "友情链接" ] }, { "id": "stable-16", "alternatives": [ "文化和旅游部" ] }, { "id": "stable-17", "alternatives": [ "国家文物局" ] }, { "id": "stable-18", "alternatives": [ "故宫博物院" ] }, { "id": "stable-19", "alternatives": [ "上海博物馆" ] }, { "id": "stable-20", "alternatives": [ "南京博物院" ] }, { "id": "stable-21", "alternatives": [ "湖南省博物馆" ] }, { "id": "stable-22", "alternatives": [ "陕西历史博物馆" ] }, { "id": "stable-23", "alternatives": [ "更多" ] }, { "id": "stable-24", "alternatives": [ "APP下载" ] }, { "id": "stable-25", "alternatives": [ "微信公众号" ] }, { "id": "stable-26", "alternatives": [ "微信小程序" ] }, { "id": "stable-27", "alternatives": [ "强国号" ] }, { "id": "stable-28", "alternatives": [ "小红书" ] }, { "id": "stable-29", "alternatives": [ "抖音" ] }, { "id": "stable-30", "alternatives": [ "B站" ] }, { "id": "stable-31", "alternatives": [ "视频号" ] }, { "id": "stable-32", "alternatives": [ "微博" ] }, { "id": "stable-33", "alternatives": [ "网站地图" ] }, { "id": "stable-34", "alternatives": [ "国博招聘" ] }, { "id": "stable-35", "alternatives": [ "留言板" ] }, { "id": "stable-36", "alternatives": [ "资料下载" ] }, { "id": "stable-37", "alternatives": [ "联系我们" ] }, { "id": "stable-38", "alternatives": [ "版权声明" ] }, { "id": "stable-39", "alternatives": [ "隐私安全声明" ] }, { "id": "stable-40", "alternatives": [ "中国国家博物馆版权所有" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initial guide has opening, reservation instructions, service desk list, convenience facilities, public explanations, self-guided options and final wish. Screenshots verify beginning/middle/end without clipping, modal or expansion; article body links retained without following them. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "参观国博实用攻略,请您查收!" ], "html_selector": ".content_layout > .title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-024/comment-qualification-reference-r5.json", "sha256": "85b79444770ad9ccc468b74972eb730fef528235834b66260a7dafaafbba7264", "chars": 564, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "赴一场博物馆之约,在国家博物馆看中国、读世界。\n\n这份参观实用攻略,涵盖预约、入馆、便民服务、公益讲解、自助导览等多个方面。无论是“旧相识”,还是“新朋友”,希望这份攻略都能帮到您,助您解锁愉快参观体验。\n\n \n\n【官方预约&现场服务】\n助您开启美好参观之旅\n\n一、官方预约攻略\n\n1.认准官方预约渠道提前预约\n\n为保障个人信息安全,共建有序的参观环境,请您使用官方平台免费预约。\n\n国家博物馆的官方预约渠道:\n\n“国家博物馆”官方网站\n\n“国家博物馆”微信小程序\n\n“国家博物馆”微信服务号\n\n \n\n《温馨提示》\n\nhttps://mp.weixin.qq.com/s/qH6d_G4iaQOkaoeBEYgvfA\n\n \n\n扫描下方二维码,预约参观国家博物馆:\n\n国博可最多提前7天预约,每日17:00准时放票。建议提前锁定放票时间,搭配稳定网络成功率更高哦!\n\n \n\n预约小技巧:提前在“国家博物馆”小程序中完成实名认证、点击左上角“我的”,在“常用联系人”内添加所有参观者的身份信息,放票时可直接勾选,提升预约效率。\n\n2. 快速查看预约信息\n\n预约成功后,可随时核验订单:打开“国家博物馆”小程序,点击左上角“我的”,在“我的预约”中点击对应记录的“详情”,可查看完整的预约时段、入馆须知等完整信息。\n\n3. 提前规划观展行程\n\n国博目前有近二十个展览正在展出,观展前提前做好攻略,参观更有收获!您可通过“国家博物馆”官网、APP和小程序、微信公众号、小红书等平台查看当前展讯。\n\n馆内北门服务咨询台、研学导览服务台、艺术长廊南区等区域均设有信息大屏,可快速查询在展项目、展厅分布及配套服务设施位置,方便随时调整参观路线。\n\n4. 参观当日小贴士\n\n参观当日须按照您所预约的时段入馆,建议您合理规划出行时间,提前规划路线、关注实时交通。请随身携带本人身份证件,从国博北门预约观众入口排队有序入馆,错峰出行、按时到场,避免错过参观时段。\n\n\n\n\n【现场便民服务指南】\n\n咨询服务\n\n服务咨询台:艺术长廊北入口西侧\n\n研学导览服务台:艺术长廊北入口东侧\n\n咨询台:南区三层、北区三层\n\n【便民举措】\n\n行李寄存\n\n携带大件行李的观众,可前往北门外东侧存包处寄存。\n\n咨询租借\n\n艺术长廊服务咨询台为您提供综合问询及其他便民服务,也可免费提供轮椅、婴儿车租借服务。\n\n智能存包柜\n\n艺术长廊及3层公共空间综合休闲体验区,均设有分时段计费智能存包柜,方便观众临时寄存衣物及随身物品。\n\n饮水设施\n\n馆内设有多处直饮水机,提供常温、温水直饮水,点位覆盖“古代中国”展厅序厅、尾厅外走廊,二层文创商店南侧、三层公共区域、四层中央大厅等位置,随时补水超便捷。\n\n休憩放松\n\n三层公共空间设有观众休息区,不仅是观展途中歇脚之所,更是充满人文气息的温馨驿站。\n\n母婴服务\n\n艺术长廊南侧设有母婴室,为有需要的哺乳期妈妈提供安全、私密、温馨的休整空间。\n\n就餐购物\n\n馆内设有多处餐饮区、咖啡厅及自动售货机,可购买简餐、零食、咖啡及各类饮品。\n\n文创体验区汇集海量国博特色文创,让您“把博物馆带回家”。\n\n\n\n\n【公益讲解、自助导览】\n助您观展更有收获\n\n \n\n一、公益讲解\n\n国博全年开放公益讲解服务,每周开设百余场,全程免费、无需额外预约。讲解覆盖馆内基本陈列、专题展览及部分临时展览。\n\n讲解团队由国博专职讲解员、志愿讲解员组成,内容详实有据,定能让您收获满满。\n\n \n\n公益讲解时间表查询方式:\n\n·“国家博物馆”官方网站:\n\n进入国博官网“服务”栏目,点击“公益讲解”即可查看。\n\n·“国家博物馆”APP、小程序:\n\n在APP或小程序首页,点击“公益讲解”图标即可查看\n\n·“国博君”微信订阅号:\n\n公众号每篇推送文末均附有公益讲解时间表二维码,识别二维码即可查看。\n\n·“国家博物馆”微博、“中国国家博物馆”小红书\n\n访问主页,查看置顶博文或笔记即可查看。\n\n \n\n公益讲解时间表每周一更新当周安排,会根据展览实际情况与观众观展需求动态优化场次。建议出行前查看最新信息,做好规划。\n\n观展当日对照场次时间,提前抵达对应展厅入口或指定等候位置,认准身穿工作服、携带扩音式讲解设备的讲解员,即可跟随听讲。\n\n \n\n二、自助导览\n\n想要读懂展览,又希望自由参观,随心而行?选择国博官方自助导览服务,随时随地听讲解,自由把控节奏、随心观展。\n\n \n\n·“国家博物馆”APP:\n\n在手机应用商店搜索“国家博物馆”即可下载。建议更新至最新版本,解锁最全展览资源与官方服务。\n\n·“国家博物馆”小程序:\n\n微信直接搜索“国家博物馆”,或扫描下方二维码,无需下载,随开随用。\n\n打开APP或小程序,进入“导览”栏目,点击“听展览”,即可自由选择对应展览收听。\n\nAPP、小程序内含40余个展览、近2000条专业讲解音频,同时上线分众语音导览等特色内容,适配不同年龄、不同深度的观展需求。建议您佩戴耳机,沉浸式体验更佳且不打扰其他观众。\n\n·“国博智慧导览”小程序:\n\n微信搜索“国博智慧导览”,或扫描下方二维码直达!\n\n“国博智慧导览”小程序主打金牌讲解员实拍视频精讲。就展览中重点文物,深度解读文物工艺、历史背景、文化价值,搭配实景路线指引,参观不迷路、看展有深度。\n\n \n\n来国博,看中国,读世界。收藏好这份官方攻略,祝您愉快观展、收获知识,收获一场难忘的国博参观之旅!", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "赴 一 场 博 物 馆 之 约 在 国 家 博 物 馆 看 中 国 读 世 界 这 份 参 观 实 用 攻 略 涵 盖 预 约 入 馆 便 民 服 务 公 益 讲 解 自 助 导 览 等 多 个 方 面 无 论 是 旧 相 识 还 是 新 朋 友 希 望 这 份 攻 略 都 能 帮 到 您 助 您 解 锁 愉 快 参 观 体 验 官 方 预 约 现 场 服 务 助 您 开 启 美 好 参 观 之 旅 一 官 方 预 约 攻 略 1 认 准 官 方 预 约 渠 道 提 前 预 约 为 保 障 个 人 信 息 安 全 共 建 有 序 的 参 观 环 境 请 您 使 用 官 方 平 台 免 费 预 约 国 家 博 物 馆 的 官 方 预 约 渠 道 国 家 博 物 馆 官 方 网 站 国 家 博 物 馆 微 信 小 程 序 国 家 博 物 馆 微 信 服 务 号 温 馨 提 示 https mp weixin qq com s qh6d g4iaqokaoebeygvfa 扫 描 下 方 二 维 码 预 约 参 观 国 家 博 物 馆 国 博 可 最 多 提 前 7 天 预 约 每 日 17 00 准 时 放 票 建 议 提 前 锁 定 放 票 时 间 搭 配 稳 定 网 络 成 功 率 更 高 哦 预 约 小 技 巧 提 前 在 国 家 博 物 馆 小 程 序 中 完 成 实 名 认 证 点 击 左 上 角 我 的 在 常 用 联 系 人 内 添 加 所 有 参 观 者 的 身 份 信 息 放 票 时 可 直 接 勾 选 提 升 预 约 效 率", "source_text": "赴一场博物馆之约,在国家博物馆看中国、读世界。\n\n这份参观实用攻略,涵盖预约、入馆、便民服务、公益讲解、自助导览等多个方面。无论是“旧相识”,还是“新朋友”,希望这份攻略都能帮到您,助您解锁愉快参观体验。\n\n \n\n【官方预约&现场服务】\n助您开启美好参观之旅\n\n一、官方预约攻略\n\n1.认准官方预约渠道提前预约\n\n为保障个人信息安全,共建有序的参观环境,请您使用官方平台免费预约。\n\n国家博物馆的官方预约渠道:\n\n“国家博物馆”官方网站\n\n“国家博物馆”微信小程序\n\n“国家博物馆”微信服务号\n\n \n\n《温馨提示》\n\nhttps://mp.weixin.qq.com/s/qH6d_G4iaQOkaoeBEYgvfA\n\n \n\n扫描下方二维码,预约参观国家博物馆:\n\n国博可最多提前7天预约,每日17:00准时放票。建议提前锁定放票时间,搭配稳定网络成功率更高哦!\n\n \n\n预约小技巧:提前在“国家博物馆”小程序中完成实名认证、点击左上角“我的”,在“常用联系人”内添加所有参观者的身份信息,放票时可直接勾选,提升预约效率。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:赴一场博物馆之约,在国家博物馆看中国、读世界。 — 段落/内容单元:预约小技巧:提前在“国家博物馆”小程序中完成实名认证、点击左上角“我的”,在“常用联系人”内添加所有参观者的身份信息,放", "source_line_range": [ 1, 39 ] }, { "id": "body-region-2", "text": "2 快 速 查 看 预 约 信 息 预 约 成 功 后 可 随 时 核 验 订 单 打 开 国 家 博 物 馆 小 程 序 点 击 左 上 角 我 的 在 我 的 预 约 中 点 击 对 应 记 录 的 详 情 可 查 看 完 整 的 预 约 时 段 入 馆 须 知 等 完 整 信 息 3 提 前 规 划 观 展 行 程 国 博 目 前 有 近 二 十 个 展 览 正 在 展 出 观 展 前 提 前 做 好 攻 略 参 观 更 有 收 获 您 可 通 过 国 家 博 物 馆 官 网 app 和 小 程 序 微 信 公 众 号 小 红 书 等 平 台 查 看 当 前 展 讯 馆 内 北 门 服 务 咨 询 台 研 学 导 览 服 务 台 艺 术 长 廊 南 区 等 区 域 均 设 有 信 息 大 屏 可 快 速 查 询 在 展 项 目 展 厅 分 布 及 配 套 服 务 设 施 位 置 方 便 随 时 调 整 参 观 路 线 4 参 观 当 日 小 贴 士 参 观 当 日 须 按 照 您 所 预 约 的 时 段 入 馆 建 议 您 合 理 规 划 出 行 时 间 提 前 规 划 路 线 关 注 实 时 交 通 请 随 身 携 带 本 人 身 份 证 件 从 国 博 北 门 预 约 观 众 入 口 排 队 有 序 入 馆 错 峰 出 行 按 时 到 场 避 免 错 过 参 观 时 段 现 场 便 民 服 务 指 南 咨 询 服 务 服 务 咨 询 台 艺 术 长 廊 北 入 口 西 侧 研 学 导 览 服 务 台 艺 术 长 廊 北 入 口 东 侧", "source_text": "2. 快速查看预约信息\n\n预约成功后,可随时核验订单:打开“国家博物馆”小程序,点击左上角“我的”,在“我的预约”中点击对应记录的“详情”,可查看完整的预约时段、入馆须知等完整信息。\n\n3. 提前规划观展行程\n\n国博目前有近二十个展览正在展出,观展前提前做好攻略,参观更有收获!您可通过“国家博物馆”官网、APP和小程序、微信公众号、小红书等平台查看当前展讯。\n\n馆内北门服务咨询台、研学导览服务台、艺术长廊南区等区域均设有信息大屏,可快速查询在展项目、展厅分布及配套服务设施位置,方便随时调整参观路线。\n\n4. 参观当日小贴士\n\n参观当日须按照您所预约的时段入馆,建议您合理规划出行时间,提前规划路线、关注实时交通。请随身携带本人身份证件,从国博北门预约观众入口排队有序入馆,错峰出行、按时到场,避免错过参观时段。\n\n\n\n\n【现场便民服务指南】\n\n咨询服务\n\n服务咨询台:艺术长廊北入口西侧\n\n研学导览服务台:艺术长廊北入口东侧", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:2. 快速查看预约信息 — 段落/内容单元:研学导览服务台:艺术长廊北入口东侧", "source_line_range": [ 40, 64 ] }, { "id": "body-region-3", "text": "咨 询 台 南 区 三 层 北 区 三 层 便 民 举 措 行 李 寄 存 携 带 大 件 行 李 的 观 众 可 前 往 北 门 外 东 侧 存 包 处 寄 存 咨 询 租 借 艺 术 长 廊 服 务 咨 询 台 为 您 提 供 综 合 问 询 及 其 他 便 民 服 务 也 可 免 费 提 供 轮 椅 婴 儿 车 租 借 服 务 智 能 存 包 柜 艺 术 长 廊 及 3 层 公 共 空 间 综 合 休 闲 体 验 区 均 设 有 分 时 段 计 费 智 能 存 包 柜 方 便 观 众 临 时 寄 存 衣 物 及 随 身 物 品 饮 水 设 施 馆 内 设 有 多 处 直 饮 水 机 提 供 常 温 温 水 直 饮 水 点 位 覆 盖 古 代 中 国 展 厅 序 厅 尾 厅 外 走 廊 二 层 文 创 商 店 南 侧 三 层 公 共 区 域 四 层 中 央 大 厅 等 位 置 随 时 补 水 超 便 捷 休 憩 放 松 三 层 公 共 空 间 设 有 观 众 休 息 区 不 仅 是 观 展 途 中 歇 脚 之 所 更 是 充 满 人 文 气 息 的 温 馨 驿 站 母 婴 服 务 艺 术 长 廊 南 侧 设 有 母 婴 室 为 有 需 要 的 哺 乳 期 妈 妈 提 供 安 全 私 密 温 馨 的 休 整 空 间 就 餐 购 物 馆 内 设 有 多 处 餐 饮 区 咖 啡 厅 及 自 动 售 货 机 可 购 买 简 餐 零 食 咖 啡 及 各 类 饮 品 文 创 体 验 区 汇 集 海 量 国 博 特 色 文 创 让 您 把 博 物 馆 带 回 家 公 益 讲 解 自 助 导 览 助 您 观 展 更 有 收 获 一 公 益 讲 解", "source_text": "咨询台:南区三层、北区三层\n\n【便民举措】\n\n行李寄存\n\n携带大件行李的观众,可前往北门外东侧存包处寄存。\n\n咨询租借\n\n艺术长廊服务咨询台为您提供综合问询及其他便民服务,也可免费提供轮椅、婴儿车租借服务。\n\n智能存包柜\n\n艺术长廊及3层公共空间综合休闲体验区,均设有分时段计费智能存包柜,方便观众临时寄存衣物及随身物品。\n\n饮水设施\n\n馆内设有多处直饮水机,提供常温、温水直饮水,点位覆盖“古代中国”展厅序厅、尾厅外走廊,二层文创商店南侧、三层公共区域、四层中央大厅等位置,随时补水超便捷。\n\n休憩放松\n\n三层公共空间设有观众休息区,不仅是观展途中歇脚之所,更是充满人文气息的温馨驿站。\n\n母婴服务\n\n艺术长廊南侧设有母婴室,为有需要的哺乳期妈妈提供安全、私密、温馨的休整空间。\n\n就餐购物\n\n馆内设有多处餐饮区、咖啡厅及自动售货机,可购买简餐、零食、咖啡及各类饮品。\n\n文创体验区汇集海量国博特色文创,让您“把博物馆带回家”。\n\n\n\n\n【公益讲解、自助导览】\n助您观展更有收获\n\n \n\n一、公益讲解", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:咨询台:南区三层、北区三层 — 段落/内容单元:【公益讲解、自助导览】", "source_line_range": [ 65, 108 ] }, { "id": "body-region-4", "text": "国 博 全 年 开 放 公 益 讲 解 服 务 每 周 开 设 百 余 场 全 程 免 费 无 需 额 外 预 约 讲 解 覆 盖 馆 内 基 本 陈 列 专 题 展 览 及 部 分 临 时 展 览 讲 解 团 队 由 国 博 专 职 讲 解 员 志 愿 讲 解 员 组 成 内 容 详 实 有 据 定 能 让 您 收 获 满 满 公 益 讲 解 时 间 表 查 询 方 式 国 家 博 物 馆 官 方 网 站 进 入 国 博 官 网 服 务 栏 目 点 击 公 益 讲 解 即 可 查 看 国 家 博 物 馆 app 小 程 序 在 app 或 小 程 序 首 页 点 击 公 益 讲 解 图 标 即 可 查 看 国 博 君 微 信 订 阅 号 公 众 号 每 篇 推 送 文 末 均 附 有 公 益 讲 解 时 间 表 二 维 码 识 别 二 维 码 即 可 查 看 国 家 博 物 馆 微 博 中 国 国 家 博 物 馆 小 红 书 访 问 主 页 查 看 置 顶 博 文 或 笔 记 即 可 查 看 公 益 讲 解 时 间 表 每 周 一 更 新 当 周 安 排 会 根 据 展 览 实 际 情 况 与 观 众 观 展 需 求 动 态 优 化 场 次 建 议 出 行 前 查 看 最 新 信 息 做 好 规 划 观 展 当 日 对 照 场 次 时 间 提 前 抵 达 对 应 展 厅 入 口 或 指 定 等 候 位 置 认 准 身 穿 工 作 服 携 带 扩 音 式 讲 解 设 备 的 讲 解 员 即 可 跟 随 听 讲 二 自 助 导 览", "source_text": "国博全年开放公益讲解服务,每周开设百余场,全程免费、无需额外预约。讲解覆盖馆内基本陈列、专题展览及部分临时展览。\n\n讲解团队由国博专职讲解员、志愿讲解员组成,内容详实有据,定能让您收获满满。\n\n \n\n公益讲解时间表查询方式:\n\n·“国家博物馆”官方网站:\n\n进入国博官网“服务”栏目,点击“公益讲解”即可查看。\n\n·“国家博物馆”APP、小程序:\n\n在APP或小程序首页,点击“公益讲解”图标即可查看\n\n·“国博君”微信订阅号:\n\n公众号每篇推送文末均附有公益讲解时间表二维码,识别二维码即可查看。\n\n·“国家博物馆”微博、“中国国家博物馆”小红书\n\n访问主页,查看置顶博文或笔记即可查看。\n\n \n\n公益讲解时间表每周一更新当周安排,会根据展览实际情况与观众观展需求动态优化场次。建议出行前查看最新信息,做好规划。\n\n观展当日对照场次时间,提前抵达对应展厅入口或指定等候位置,认准身穿工作服、携带扩音式讲解设备的讲解员,即可跟随听讲。\n\n \n\n二、自助导览", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:国博全年开放公益讲解服务,每周开设百余场,全程免费、无需额外预约。讲解覆盖馆内基本陈列、专题展览及部分临时展览。 — 段落/内容单元:观展当日对照场次时间,提前抵达对应展厅入口或指定等候位置,认准身穿工作服、携带扩音式讲解设备的讲解员,即可跟随听讲。", "source_line_range": [ 109, 142 ] }, { "id": "body-region-5", "text": "想 要 读 懂 展 览 又 希 望 自 由 参 观 随 心 而 行 选 择 国 博 官 方 自 助 导 览 服 务 随 时 随 地 听 讲 解 自 由 把 控 节 奏 随 心 观 展 国 家 博 物 馆 app 在 手 机 应 用 商 店 搜 索 国 家 博 物 馆 即 可 下 载 建 议 更 新 至 最 新 版 本 解 锁 最 全 展 览 资 源 与 官 方 服 务 国 家 博 物 馆 小 程 序 微 信 直 接 搜 索 国 家 博 物 馆 或 扫 描 下 方 二 维 码 无 需 下 载 随 开 随 用 打 开 app 或 小 程 序 进 入 导 览 栏 目 点 击 听 展 览 即 可 自 由 选 择 对 应 展 览 收 听 app 小 程 序 内 含 40 余 个 展 览 近 2000 条 专 业 讲 解 音 频 同 时 上 线 分 众 语 音 导 览 等 特 色 内 容 适 配 不 同 年 龄 不 同 深 度 的 观 展 需 求 建 议 您 佩 戴 耳 机 沉 浸 式 体 验 更 佳 且 不 打 扰 其 他 观 众 国 博 智 慧 导 览 小 程 序 微 信 搜 索 国 博 智 慧 导 览 或 扫 描 下 方 二 维 码 直 达 国 博 智 慧 导 览 小 程 序 主 打 金 牌 讲 解 员 实 拍 视 频 精 讲 就 展 览 中 重 点 文 物 深 度 解 读 文 物 工 艺 历 史 背 景 文 化 价 值 搭 配 实 景 路 线 指 引 参 观 不 迷 路 看 展 有 深 度 来 国 博 看 中 国 读 世 界 收 藏 好 这 份 官 方 攻 略 祝 您 愉 快 观 展 收 获 知 识 收 获 一 场 难 忘 的 国 博 参 观 之 旅", "source_text": "想要读懂展览,又希望自由参观,随心而行?选择国博官方自助导览服务,随时随地听讲解,自由把控节奏、随心观展。\n\n \n\n·“国家博物馆”APP:\n\n在手机应用商店搜索“国家博物馆”即可下载。建议更新至最新版本,解锁最全展览资源与官方服务。\n\n·“国家博物馆”小程序:\n\n微信直接搜索“国家博物馆”,或扫描下方二维码,无需下载,随开随用。\n\n打开APP或小程序,进入“导览”栏目,点击“听展览”,即可自由选择对应展览收听。\n\nAPP、小程序内含40余个展览、近2000条专业讲解音频,同时上线分众语音导览等特色内容,适配不同年龄、不同深度的观展需求。建议您佩戴耳机,沉浸式体验更佳且不打扰其他观众。\n\n·“国博智慧导览”小程序:\n\n微信搜索“国博智慧导览”,或扫描下方二维码直达!\n\n“国博智慧导览”小程序主打金牌讲解员实拍视频精讲。就展览中重点文物,深度解读文物工艺、历史背景、文化价值,搭配实景路线指引,参观不迷路、看展有深度。\n\n \n\n来国博,看中国,读世界。收藏好这份官方攻略,祝您愉快观展、收获知识,收获一场难忘的国博参观之旅!", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:想要读懂展览,又希望自由参观,随心而行?选择国博官方自助导览服务,随时随地听讲解,自由把控节奏、随心观展。 — 段落/内容单元:来国博,看中国,读世界。收藏好这份官方攻略,祝您愉快观展、收获知识,收获一场难忘的国博参观之旅!", "source_line_range": [ 143, 167 ] } ], "ending": { "text": "览中重点文物,深度解读文物工艺、历史背景、文化价值,搭配实景路线指引,参观不迷路、看展有深度。\n\n \n\n来国博,看中国,读世界。收藏好这份官方攻略,祝您愉快观展、收获知识,收获一场难忘的国博参观之旅!" } } }, { "id": "article-025", "name": "Flex 布局教程:语法篇", "url": "https://www.ruanyifeng.com/blog/2015/07/flex-grammar.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Flex 布局教程:语法篇" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "阮一峰" ] }, { "id": "stable-3", "alternatives": [ "阮一峰的网络日志" ] }, { "id": "stable-4", "alternatives": [ "首页" ] }, { "id": "stable-5", "alternatives": [ "档案" ] }, { "id": "stable-6", "alternatives": [ "上一篇" ] }, { "id": "stable-7", "alternatives": [ "下一篇" ] }, { "id": "stable-8", "alternatives": [ "分类" ] }, { "id": "stable-9", "alternatives": [ "开发者手册" ] }, { "id": "stable-10", "alternatives": [ "文档信息" ] }, { "id": "stable-11", "alternatives": [ "版权声明:自由转载-非商用-非衍生-保持署名" ] }, { "id": "stable-12", "alternatives": [ "创意共享3.0许可证" ] }, { "id": "stable-13", "alternatives": [ "发表日期" ] }, { "id": "stable-14", "alternatives": [ "相关文章" ] }, { "id": "stable-15", "alternatives": [ "留言" ] }, { "id": "stable-16", "alternatives": [ "引用" ] }, { "id": "stable-17", "alternatives": [ "我要发表看法" ] }, { "id": "stable-18", "alternatives": [ "您的留言" ] }, { "id": "stable-19", "alternatives": [ "您的大名" ] }, { "id": "stable-20", "alternatives": [ "电子邮件" ] }, { "id": "stable-21", "alternatives": [ "个人网址" ] }, { "id": "stable-22", "alternatives": [ "记住个人信息" ] }, { "id": "stable-23", "alternatives": [ "发表" ] }, { "id": "stable-24", "alternatives": [ "Weibo" ] }, { "id": "stable-25", "alternatives": [ "Twitter" ] }, { "id": "stable-26", "alternatives": [ "GitHub" ] }, { "id": "stable-27", "alternatives": [ "Email" ] } ] }, "rule_review": { "status": "reviewed", "reason": "All initial body paragraphs, four major sections, twelve property subsections, CSS examples and final (完) marker are present in #main-content. Screenshots confirm middle and final align-self text before document information; no clipping or expansion. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Flex 布局教程:语法篇" ], "html_selector": "#page-title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#comments-content > .comment", "author_selector": ".comment-header .author", "body_selector": ".comment-content", "id_attribute": "id", "section_markers": [ "留言", "我要发表看法" ], "version": 2, "minimum_comments": 204, "text_scope": { "body_end": "lex-start | flex-end | center | baseline | stretch;\n}\n\n\n该属性可能取6个值,除了auto,其他都与align-items属性完全一致。\n\n(完)", "end_markers": [ "我要发表看法" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-025/comment-qualification-reference-r5.json", "sha256": "960ad53d1ca22fd5d003bacc7dd9dbaa5d01af60917eadcca90558e5b56df36b", "chars": 59589, "record_count": 255 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 255, "qualification_only": true } }, "ground_truth_main_content": "网页布局(layout)是 CSS 的一个重点应用。\n\n布局的传统解决方案,基于盒状模型,依赖 display 属性 + position属性 + float属性。它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现。\n\n2009年,W3C 提出了一种新的方案----Flex 布局,可以简便、完整、响应式地实现各种页面布局。目前,它已经得到了所有浏览器的支持,这意味着,现在就能很安全地使用这项功能。\n\nFlex 布局将成为未来布局的首选方案。本文介绍它的语法,下一篇文章给出常见布局的 Flex 写法。网友 JailBreak 为本文的所有示例制作了 Demo,也可以参考。\n\n以下内容主要参考了下面两篇文章:A Complete Guide to Flexbox 和 A Visual Guide to CSS3 Flexbox Properties。\n\n一、Flex 布局是什么?\n\nFlex 是 Flexible Box 的缩写,意为\"弹性布局\",用来为盒状模型提供最大的灵活性。\n\n任何一个容器都可以指定为 Flex 布局。\n\n\n.box{\n display: flex;\n}\n\n\n行内元素也可以使用 Flex 布局。\n\n\n.box{\n display: inline-flex;\n}\n\n\nWebkit 内核的浏览器,必须加上-webkit前缀。\n\n\n.box{\n display: -webkit-flex; /* Safari */\n display: flex;\n}\n\n\n注意,设为 Flex 布局以后,子元素的float、clear和vertical-align属性将失效。\n\n二、基本概念\n\n采用 Flex 布局的元素,称为 Flex 容器(flex container),简称\"容器\"。它的所有子元素自动成为容器成员,称为 Flex 项目(flex item),简称\"项目\"。\n\n容器默认存在两根轴:水平的主轴(main axis)和垂直的交叉轴(cross axis)。主轴的开始位置(与边框的交叉点)叫做main start,结束位置叫做main end;交叉轴的开始位置叫做cross start,结束位置叫做cross end。\n\n项目默认沿主轴排列。单个项目占据的主轴空间叫做main size,占据的交叉轴空间叫做cross size。\n\n三、容器的属性\n\n以下6个属性设置在容器上。\n\nflex-direction\nflex-wrap\nflex-flow\njustify-content\nalign-items\nalign-content\n3.1 flex-direction属性\n\nflex-direction属性决定主轴的方向(即项目的排列方向)。\n\n\n.box {\n flex-direction: row | row-reverse | column | column-reverse;\n}\n\n\n它可能有4个值。\n\nrow(默认值):主轴为水平方向,起点在左端。\nrow-reverse:主轴为水平方向,起点在右端。\ncolumn:主轴为垂直方向,起点在上沿。\ncolumn-reverse:主轴为垂直方向,起点在下沿。\n3.2 flex-wrap属性\n\n默认情况下,项目都排在一条线(又称\"轴线\")上。flex-wrap属性定义,如果一条轴线排不下,如何换行。\n\n\n.box{\n flex-wrap: nowrap | wrap | wrap-reverse;\n}\n\n\n它可能取三个值。\n\n(1)nowrap(默认):不换行。\n\n(2)wrap:换行,第一行在上方。\n\n(3)wrap-reverse:换行,第一行在下方。\n\n3.3 flex-flow\n\nflex-flow属性是flex-direction属性和flex-wrap属性的简写形式,默认值为row nowrap。\n\n\n.box {\n flex-flow: || ;\n}\n\n3.4 justify-content属性\n\njustify-content属性定义了项目在主轴上的对齐方式。\n\n\n.box {\n justify-content: flex-start | flex-end | center | space-between | space-around;\n}\n\n\n它可能取5个值,具体对齐方式与轴的方向有关。下面假设主轴为从左到右。\n\nflex-start(默认值):左对齐\nflex-end:右对齐\ncenter: 居中\nspace-between:两端对齐,项目之间的间隔都相等。\nspace-around:每个项目两侧的间隔相等。所以,项目之间的间隔比项目与边框的间隔大一倍。\n3.5 align-items属性\n\nalign-items属性定义项目在交叉轴上如何对齐。\n\n\n.box {\n align-items: flex-start | flex-end | center | baseline | stretch;\n}\n\n\n它可能取5个值。具体的对齐方式与交叉轴的方向有关,下面假设交叉轴从上到下。\n\nflex-start:交叉轴的起点对齐。\nflex-end:交叉轴的终点对齐。\ncenter:交叉轴的中点对齐。\nbaseline: 项目的第一行文字的基线对齐。\nstretch(默认值):如果项目未设置高度或设为auto,将占满整个容器的高度。\n3.6 align-content属性\n\nalign-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线,该属性不起作用。\n\n\n.box {\n align-content: flex-start | flex-end | center | space-between | space-around | stretch;\n}\n\n\n该属性可能取6个值。\n\nflex-start:与交叉轴的起点对齐。\nflex-end:与交叉轴的终点对齐。\ncenter:与交叉轴的中点对齐。\nspace-between:与交叉轴两端对齐,轴线之间的间隔平均分布。\nspace-around:每根轴线两侧的间隔都相等。所以,轴线之间的间隔比轴线与边框的间隔大一倍。\nstretch(默认值):轴线占满整个交叉轴。\n四、项目的属性\n\n以下6个属性设置在项目上。\n\norder\nflex-grow\nflex-shrink\nflex-basis\nflex\nalign-self\n4.1 order属性\n\norder属性定义项目的排列顺序。数值越小,排列越靠前,默认为0。\n\n\n.item {\n order: ;\n}\n\n\n4.2 flex-grow属性\n\nflex-grow属性定义项目的放大比例,默认为0,即如果存在剩余空间,也不放大。\n\n\n.item {\n flex-grow: ; /* default 0 */\n}\n\n\n如果所有项目的flex-grow属性都为1,则它们将等分剩余空间(如果有的话)。如果一个项目的flex-grow属性为2,其他项目都为1,则前者占据的剩余空间将比其他项多一倍。\n\n4.3 flex-shrink属性\n\nflex-shrink属性定义了项目的缩小比例,默认为1,即如果空间不足,该项目将缩小。\n\n\n.item {\n flex-shrink: ; /* default 1 */\n}\n\n\n如果所有项目的flex-shrink属性都为1,当空间不足时,都将等比例缩小。如果一个项目的flex-shrink属性为0,其他项目都为1,则空间不足时,前者不缩小。\n\n负值对该属性无效。\n\n4.4 flex-basis属性\n\nflex-basis属性定义了在分配多余空间之前,项目占据的主轴空间(main size)。浏览器根据这个属性,计算主轴是否有多余空间。它的默认值为auto,即项目的本来大小。\n\n\n.item {\n flex-basis: | auto; /* default auto */\n}\n\n\n它可以设为跟width或height属性一样的值(比如350px),则项目将占据固定空间。\n\n4.5 flex属性\n\nflex属性是flex-grow, flex-shrink 和 flex-basis的简写,默认值为0 1 auto。后两个属性可选。\n\n\n.item {\n flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]\n}\n\n\n该属性有两个快捷值:auto (1 1 auto) 和 none (0 0 auto)。\n\n建议优先使用这个属性,而不是单独写三个分离的属性,因为浏览器会推算相关值。\n\n4.6 align-self属性\n\nalign-self属性允许单个项目有与其他项目不一样的对齐方式,可覆盖align-items属性。默认值为auto,表示继承父元素的align-items属性,如果没有父元素,则等同于stretch。\n\n\n.item {\n align-self: auto | flex-start | flex-end | center | baseline | stretch;\n}\n\n\n该属性可能取6个值,除了auto,其他都与align-items属性完全一致。\n\n(完)", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 4, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "网 页 布 局 layout 是 css 的 一 个 重 点 应 用 布 局 的 传 统 解 决 方 案 基 于 盒 状 模 型 依 赖 display 属 性 position 属 性 float 属 性 它 对 于 那 些 特 殊 布 局 非 常 不 方 便 比 如 垂 直 居 中 就 不 容 易 实 现 2009 年 w3c 提 出 了 一 种 新 的 方 案 flex 布 局 可 以 简 便 完 整 响 应 式 地 实 现 各 种 页 面 布 局 目 前 它 已 经 得 到 了 所 有 浏 览 器 的 支 持 这 意 味 着 现 在 就 能 很 安 全 地 使 用 这 项 功 能 flex 布 局 将 成 为 未 来 布 局 的 首 选 方 案 本 文 介 绍 它 的 语 法 下 一 篇 文 章 给 出 常 见 布 局 的 flex 写 法 网 友 jailbreak 为 本 文 的 所 有 示 例 制 作 了 demo 也 可 以 参 考 以 下 内 容 主 要 参 考 了 下 面 两 篇 文 章 a complete guide to flexbox 和 a visual guide to css3 flexbox properties", "source_text": "网页布局(layout)是 CSS 的一个重点应用。\n\n布局的传统解决方案,基于盒状模型,依赖 display 属性 + position属性 + float属性。它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现。\n\n2009年,W3C 提出了一种新的方案----Flex 布局,可以简便、完整、响应式地实现各种页面布局。目前,它已经得到了所有浏览器的支持,这意味着,现在就能很安全地使用这项功能。\n\nFlex 布局将成为未来布局的首选方案。本文介绍它的语法,下一篇文章给出常见布局的 Flex 写法。网友 JailBreak 为本文的所有示例制作了 Demo,也可以参考。\n\n以下内容主要参考了下面两篇文章:A Complete Guide to Flexbox 和 A Visual Guide to CSS3 Flexbox Properties。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:网页布局(layout)是 CSS 的一个重点应用。", "source_line_range": [ 1, 10 ] }, { "id": "body-region-2", "text": "一 flex 布 局 是 什 么 flex 是 flexible box 的 缩 写 意 为 弹 性 布 局 用 来 为 盒 状 模 型 提 供 最 大 的 灵 活 性 任 何 一 个 容 器 都 可 以 指 定 为 flex 布 局 box display flex 行 内 元 素 也 可 以 使 用 flex 布 局 box display inline flex webkit 内 核 的 浏 览 器 必 须 加 上 webkit 前 缀 box display webkit flex safari display flex 注 意 设 为 flex 布 局 以 后 子 元 素 的 float clear 和 vertical align 属 性 将 失 效", "source_text": "一、Flex 布局是什么?\n\nFlex 是 Flexible Box 的缩写,意为\"弹性布局\",用来为盒状模型提供最大的灵活性。\n\n任何一个容器都可以指定为 Flex 布局。\n\n\n.box{\n display: flex;\n}\n\n\n行内元素也可以使用 Flex 布局。\n\n\n.box{\n display: inline-flex;\n}\n\n\nWebkit 内核的浏览器,必须加上-webkit前缀。\n\n\n.box{\n display: -webkit-flex; /* Safari */\n display: flex;\n}\n\n\n注意,设为 Flex 布局以后,子元素的float、clear和vertical-align属性将失效。", "segmentation_method": "reviewed_source_semantics", "label": "一、Flex 布局是什么?", "source_line_range": [ 11, 41 ] }, { "id": "body-region-3", "text": "二 基 本 概 念 采 用 flex 布 局 的 元 素 称 为 flex 容 器 flex container 简 称 容 器 它 的 所 有 子 元 素 自 动 成 为 容 器 成 员 称 为 flex 项 目 flex item 简 称 项 目 容 器 默 认 存 在 两 根 轴 水 平 的 主 轴 main axis 和 垂 直 的 交 叉 轴 cross axis 主 轴 的 开 始 位 置 与 边 框 的 交 叉 点 叫 做 main start 结 束 位 置 叫 做 main end 交 叉 轴 的 开 始 位 置 叫 做 cross start 结 束 位 置 叫 做 cross end 项 目 默 认 沿 主 轴 排 列 单 个 项 目 占 据 的 主 轴 空 间 叫 做 main size 占 据 的 交 叉 轴 空 间 叫 做 cross size", "source_text": "二、基本概念\n\n采用 Flex 布局的元素,称为 Flex 容器(flex container),简称\"容器\"。它的所有子元素自动成为容器成员,称为 Flex 项目(flex item),简称\"项目\"。\n\n容器默认存在两根轴:水平的主轴(main axis)和垂直的交叉轴(cross axis)。主轴的开始位置(与边框的交叉点)叫做main start,结束位置叫做main end;交叉轴的开始位置叫做cross start,结束位置叫做cross end。\n\n项目默认沿主轴排列。单个项目占据的主轴空间叫做main size,占据的交叉轴空间叫做cross size。", "segmentation_method": "reviewed_source_semantics", "label": "二、基本概念", "source_line_range": [ 42, 49 ] }, { "id": "body-region-4", "text": "三 容 器 的 属 性 以 下 6 个 属 性 设 置 在 容 器 上 flex direction flex wrap flex flow justify content align items align content 3 1 flex direction 属 性 flex direction 属 性 决 定 主 轴 的 方 向 即 项 目 的 排 列 方 向 box flex direction row row reverse column column reverse 它 可 能 有 4 个 值 row 默 认 值 主 轴 为 水 平 方 向 起 点 在 左 端 row reverse 主 轴 为 水 平 方 向 起 点 在 右 端 column 主 轴 为 垂 直 方 向 起 点 在 上 沿 column reverse 主 轴 为 垂 直 方 向 起 点 在 下 沿 3 2 flex wrap 属 性 默 认 情 况 下 项 目 都 排 在 一 条 线 又 称 轴 线 上 flex wrap 属 性 定 义 如 果 一 条 轴 线 排 不 下 如 何 换 行 box flex wrap nowrap wrap wrap reverse 它 可 能 取 三 个 值 1 nowrap 默 认 不 换 行 2 wrap 换 行 第 一 行 在 上 方 3 wrap reverse 换 行 第 一 行 在 下 方 3 3 flex flow flex flow 属 性 是 flex direction 属 性 和 flex wrap 属 性 的 简 写 形 式 默 认 值 为 row nowrap box flex flow flex direction flex wrap 3 4 justify content 属 性 justify content 属 性 定 义 了 项 目 在 主 轴 上 的 对 齐 方 式 box justify content flex start flex end center space between space around 它 可 能 取 5 个 值 具 体 对 齐 方 式 与 轴 的 方 向 有 关 下 面 假 设 主 轴 为 从 左 到 右 flex start 默 认 值 左 对 齐 flex end 右 对 齐 center 居 中 space between 两 端 对 齐 项 目 之 间 的 间 隔 都 相 等 space around 每 个 项 目 两 侧 的 间 隔 相 等 所 以 项 目 之 间 的 间 隔 比 项 目 与 边 框 的 间 隔 大 一 倍 3 5 align items 属 性 align items 属 性 定 义 项 目 在 交 叉 轴 上 如 何 对 齐 box align items flex start flex end center baseline stretch 它 可 能 取 5 个 值 具 体 的 对 齐 方 式 与 交 叉 轴 的 方 向 有 关 下 面 假 设 交 叉 轴 从 上 到 下 flex start 交 叉 轴 的 起 点 对 齐 flex end 交 叉 轴 的 终 点 对 齐 center 交 叉 轴 的 中 点 对 齐 baseline 项 目 的 第 一 行 文 字 的 基 线 对 齐 stretch 默 认 值 如 果 项 目 未 设 置 高 度 或 设 为 auto 将 占 满 整 个 容 器 的 高 度 3 6 align content 属 性 align content 属 性 定 义 了 多 根 轴 线 的 对 齐 方 式 如 果 项 目 只 有 一 根 轴 线 该 属 性 不 起 作 用 box align content flex start flex end center space between space around stretch 该 属 性 可 能 取 6 个 值 flex start 与 交 叉 轴 的 起 点 对 齐 flex end 与 交 叉 轴 的 终 点 对 齐 center 与 交 叉 轴 的 中 点 对 齐 space between 与 交 叉 轴 两 端 对 齐 轴 线 之 间 的 间 隔 平 均 分 布 space around 每 根 轴 线 两 侧 的 间 隔 都 相 等 所 以 轴 线 之 间 的 间 隔 比 轴 线 与 边 框 的 间 隔 大 一 倍 stretch 默 认 值 轴 线 占 满 整 个 交 叉 轴 四 项 目 的 属 性 以 下 6 个 属 性 设 置 在 项 目 上 order flex grow flex shrink flex basis flex align self 4 1 order 属 性 order 属 性 定 义 项 目 的 排 列 顺 序 数 值 越 小 排 列 越 靠 前 默 认 为 0 item order integer 4 2 flex grow 属 性 flex grow 属 性 定 义 项 目 的 放 大 比 例 默 认 为 0 即 如 果 存 在 剩 余 空 间 也 不 放 大 item flex grow number default 0 如 果 所 有 项 目 的 flex grow 属 性 都 为 1 则 它 们 将 等 分 剩 余 空 间 如 果 有 的 话 如 果 一 个 项 目 的 flex grow 属 性 为 2 其 他 项 目 都 为 1 则 前 者 占 据 的 剩 余 空 间 将 比 其 他 项 多 一 倍 4 3 flex shrink 属 性 flex shrink 属 性 定 义 了 项 目 的 缩 小 比 例 默 认 为 1 即 如 果 空 间 不 足 该 项 目 将 缩 小 item flex shrink number default 1 如 果 所 有 项 目 的 flex shrink 属 性 都 为 1 当 空 间 不 足 时 都 将 等 比 例 缩 小 如 果 一 个 项 目 的 flex shrink 属 性 为 0 其 他 项 目 都 为 1 则 空 间 不 足 时 前 者 不 缩 小 负 值 对 该 属 性 无 效 4 4 flex basis 属 性 flex basis 属 性 定 义 了 在 分 配 多 余 空 间 之 前 项 目 占 据 的 主 轴 空 间 main size 浏 览 器 根 据 这 个 属 性 计 算 主 轴 是 否 有 多 余 空 间 它 的 默 认 值 为 auto 即 项 目 的 本 来 大 小 item flex basis length auto default auto 它 可 以 设 为 跟 width 或 height 属 性 一 样 的 值 比 如 350px 则 项 目 将 占 据 固 定 空 间 4 5 flex 属 性 flex 属 性 是 flex grow flex shrink 和 flex basis 的 简 写 默 认 值 为 0 1 auto 后 两 个 属 性 可 选 item flex none flex grow flex shrink flex basis 该 属 性 有 两 个 快 捷 值 auto 1 1 auto 和 none 0 0 auto 建 议 优 先 使 用 这 个 属 性 而 不 是 单 独 写 三 个 分 离 的 属 性 因 为 浏 览 器 会 推 算 相 关 值 4 6 align self 属 性 align self 属 性 允 许 单 个 项 目 有 与 其 他 项 目 不 一 样 的 对 齐 方 式 可 覆 盖 align items 属 性 默 认 值 为 auto 表 示 继 承 父 元 素 的 align items 属 性 如 果 没 有 父 元 素 则 等 同 于 stretch item align self auto flex start flex end center baseline stretch 该 属 性 可 能 取 6 个 值 除 了 auto 其 他 都 与 align items 属 性 完 全 一 致 完", "source_text": "三、容器的属性\n\n以下6个属性设置在容器上。\n\nflex-direction\nflex-wrap\nflex-flow\njustify-content\nalign-items\nalign-content\n3.1 flex-direction属性\n\nflex-direction属性决定主轴的方向(即项目的排列方向)。\n\n\n.box {\n flex-direction: row | row-reverse | column | column-reverse;\n}\n\n\n它可能有4个值。\n\nrow(默认值):主轴为水平方向,起点在左端。\nrow-reverse:主轴为水平方向,起点在右端。\ncolumn:主轴为垂直方向,起点在上沿。\ncolumn-reverse:主轴为垂直方向,起点在下沿。\n3.2 flex-wrap属性\n\n默认情况下,项目都排在一条线(又称\"轴线\")上。flex-wrap属性定义,如果一条轴线排不下,如何换行。\n\n\n.box{\n flex-wrap: nowrap | wrap | wrap-reverse;\n}\n\n\n它可能取三个值。\n\n(1)nowrap(默认):不换行。\n\n(2)wrap:换行,第一行在上方。\n\n(3)wrap-reverse:换行,第一行在下方。\n\n3.3 flex-flow\n\nflex-flow属性是flex-direction属性和flex-wrap属性的简写形式,默认值为row nowrap。\n\n\n.box {\n flex-flow: || ;\n}\n\n3.4 justify-content属性\n\njustify-content属性定义了项目在主轴上的对齐方式。\n\n\n.box {\n justify-content: flex-start | flex-end | center | space-between | space-around;\n}\n\n\n它可能取5个值,具体对齐方式与轴的方向有关。下面假设主轴为从左到右。\n\nflex-start(默认值):左对齐\nflex-end:右对齐\ncenter: 居中\nspace-between:两端对齐,项目之间的间隔都相等。\nspace-around:每个项目两侧的间隔相等。所以,项目之间的间隔比项目与边框的间隔大一倍。\n3.5 align-items属性\n\nalign-items属性定义项目在交叉轴上如何对齐。\n\n\n.box {\n align-items: flex-start | flex-end | center | baseline | stretch;\n}\n\n\n它可能取5个值。具体的对齐方式与交叉轴的方向有关,下面假设交叉轴从上到下。\n\nflex-start:交叉轴的起点对齐。\nflex-end:交叉轴的终点对齐。\ncenter:交叉轴的中点对齐。\nbaseline: 项目的第一行文字的基线对齐。\nstretch(默认值):如果项目未设置高度或设为auto,将占满整个容器的高度。\n3.6 align-content属性\n\nalign-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线,该属性不起作用。\n\n\n.box {\n align-content: flex-start | flex-end | center | space-between | space-around | stretch;\n}\n\n\n该属性可能取6个值。\n\nflex-start:与交叉轴的起点对齐。\nflex-end:与交叉轴的终点对齐。\ncenter:与交叉轴的中点对齐。\nspace-between:与交叉轴两端对齐,轴线之间的间隔平均分布。\nspace-around:每根轴线两侧的间隔都相等。所以,轴线之间的间隔比轴线与边框的间隔大一倍。\nstretch(默认值):轴线占满整个交叉轴。\n四、项目的属性\n\n以下6个属性设置在项目上。\n\norder\nflex-grow\nflex-shrink\nflex-basis\nflex\nalign-self\n4.1 order属性\n\norder属性定义项目的排列顺序。数值越小,排列越靠前,默认为0。\n\n\n.item {\n order: ;\n}\n\n\n4.2 flex-grow属性\n\nflex-grow属性定义项目的放大比例,默认为0,即如果存在剩余空间,也不放大。\n\n\n.item {\n flex-grow: ; /* default 0 */\n}\n\n\n如果所有项目的flex-grow属性都为1,则它们将等分剩余空间(如果有的话)。如果一个项目的flex-grow属性为2,其他项目都为1,则前者占据的剩余空间将比其他项多一倍。\n\n4.3 flex-shrink属性\n\nflex-shrink属性定义了项目的缩小比例,默认为1,即如果空间不足,该项目将缩小。\n\n\n.item {\n flex-shrink: ; /* default 1 */\n}\n\n\n如果所有项目的flex-shrink属性都为1,当空间不足时,都将等比例缩小。如果一个项目的flex-shrink属性为0,其他项目都为1,则空间不足时,前者不缩小。\n\n负值对该属性无效。\n\n4.4 flex-basis属性\n\nflex-basis属性定义了在分配多余空间之前,项目占据的主轴空间(main size)。浏览器根据这个属性,计算主轴是否有多余空间。它的默认值为auto,即项目的本来大小。\n\n\n.item {\n flex-basis: | auto; /* default auto */\n}\n\n\n它可以设为跟width或height属性一样的值(比如350px),则项目将占据固定空间。\n\n4.5 flex属性\n\nflex属性是flex-grow, flex-shrink 和 flex-basis的简写,默认值为0 1 auto。后两个属性可选。\n\n\n.item {\n flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]\n}\n\n\n该属性有两个快捷值:auto (1 1 auto) 和 none (0 0 auto)。\n\n建议优先使用这个属性,而不是单独写三个分离的属性,因为浏览器会推算相关值。\n\n4.6 align-self属性\n\nalign-self属性允许单个项目有与其他项目不一样的对齐方式,可覆盖align-items属性。默认值为auto,表示继承父元素的align-items属性,如果没有父元素,则等同于stretch。\n\n\n.item {\n align-self: auto | flex-start | flex-end | center | baseline | stretch;\n}\n\n\n该属性可能取6个值,除了auto,其他都与align-items属性完全一致。\n\n(完)", "segmentation_method": "reviewed_source_semantics", "label": "三、容器的属性", "source_line_range": [ 50, 239 ] } ], "ending": { "text": "lex-start | flex-end | center | baseline | stretch;\n}\n\n\n该属性可能取6个值,除了auto,其他都与align-items属性完全一致。\n\n(完)" } } }, { "id": "article-026", "name": "The Illustrated Transformer", "url": "https://shekhar14.medium.com/the-illustrated-transformer-5ae5230f4cd7", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The Illustrated Transformer" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Aman Shekhar" ] }, { "id": "stable-3", "alternatives": [ "Get app" ] }, { "id": "stable-4", "alternatives": [ "Write" ] }, { "id": "stable-5", "alternatives": [ "Sign up" ] }, { "id": "stable-6", "alternatives": [ "Sign in" ] }, { "id": "stable-7", "alternatives": [ "Follow" ] }, { "id": "stable-8", "alternatives": [ "Machine Learning" ] }, { "id": "stable-9", "alternatives": [ "Transformers" ] }, { "id": "stable-10", "alternatives": [ "Deep Learning" ] }, { "id": "stable-11", "alternatives": [ "AI" ] }, { "id": "stable-12", "alternatives": [ "Help" ] }, { "id": "stable-13", "alternatives": [ "Status" ] }, { "id": "stable-14", "alternatives": [ "About" ] }, { "id": "stable-15", "alternatives": [ "Careers" ] }, { "id": "stable-16", "alternatives": [ "Press" ] }, { "id": "stable-17", "alternatives": [ "Blog" ] }, { "id": "stable-18", "alternatives": [ "Store" ] }, { "id": "stable-19", "alternatives": [ "Privacy" ] }, { "id": "stable-20", "alternatives": [ "Rules" ] }, { "id": "stable-21", "alternatives": [ "Terms" ] }, { "id": "stable-22", "alternatives": [ "Text to speech" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete article prose, code and original author connection/LeetCode/book-promotion sections are retained through Kindle Unlimited ending. Captured selectable paragraphs/PRE exclude the inserted platform subscription form; screenshots confirm beginning, visible Python and final body before tags/author card. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Illustrated Transformer" ], "html_selector": "#\\36 639,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-026/comment-qualification-reference-r5.json", "sha256": "abc3be7959c158b4d4a69bb2c21ed001e6edebe01569a6f9e9956fdf2d914684", "chars": 799, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Ever had that moment when you come across a piece of tech that just clicks? A few weeks ago, I stumbled upon “The Illustrated Transformer,” and let me tell you, it was like flipping a switch in my brain. As someone who’s been knee-deep in AI and machine learning, I’ve always found the intricacies of transformers to be a bit, shall we say, overwhelming. But this resource? It made it all click.\n\nWhat’s the Big Deal About Transformers?\n\nIf you’ve been in the AI space for a hot minute, you’ve probably heard about transformers. But why are they so crucial? Ever wondered why your favorite chatbots sound so human-like? It’s all thanks to this architecture! To put it simply, transformers revolutionized how machines process language. Before transformers, we had recurrent neural networks (RNNs), which were like trying to read a book one letter at a time — painfully slow and inefficient. Then came transformers, which process data in parallel, making them faster and more effective at capturing relationships in data.\n\nI remember the first time I implemented a transformer model using Hugging Face’s Transformers library. I was excited but also terrified. Would I be able to handle the complexity? But after diving into the recommended resources, my fear turned into fascination.\n\nThe Illustrated Transformer: A Game Changer\n\nWhen I came across “The Illustrated Transformer,” it felt like I’d found the cheat code. It breaks down the architecture with visuals that are so clear you’d think they were drawn just for me! I found myself nodding along like a cartoon character when the light bulb goes off. The illustrations helped me grasp concepts like self-attention and multi-head attention in a matter of hours.\n\nFor instance, there’s this beautiful diagram showing how the input sequence is transformed into a contextualized representation. I had always struggled with visualizing how words in a sentence relate to one another, but suddenly, it was as if someone had turned on the lights in a dark room.\n\nDiving Deeper: Understanding Self-Attention\n\nSelf-attention is where the magic happens. Ever wondered how a model understands which words in a sentence are important? This is where self-attention comes into play. It allows the model to weigh the significance of different words when creating an output.\n\nLet’s say, for example, you’re working with the sentence “The cat sat on the mat, and it was very comfortable.” When the transformer processes this, it needs to figure out that “it” refers to “mat”. That’s where self-attention shines. Here’s a simplified code snippet that shows how you can use self-attention in practice:\n\nimport torch\nimport torch.nn.functional as F\n\ndef scaled_dot_product_attention(query, key, value):\n matmul_qk = torch.matmul(query, key.transpose(-2, -1))\n d_k = query.size()[-1]\n scaled_attention_logits = matmul_qk / torch.sqrt(torch.tensor(d_k, dtype=torch.float32))\n attention_weights = F.softmax(scaled_attention_logits, dim=-1)\n output = torch.matmul(attention_weights, value)\n return output, attention_weights\n\nWhen I first tried this out, I was unsure if I would get meaningful results. But as I played around with different inputs and observed how the attention weights shifted, I had one of those “aha moments.” It was exhilarating to see how the model prioritized certain words!\n\nReal-World Applications: Where Transformers Shine\n\nIn my experience, transformers are not just a theoretical concept; they’re very much a part of our daily lives. Think about it — when you use a language translation app, or when Netflix suggests your next binge-worthy series, it’s likely using transformers under the hood.\n\nI’ve been building a personal project around text summarization using BART, a transformer model. I started with some initial results that were promising, but I soon realized the importance of fine-tuning the model with quality data. I initially fed it subpar input, and the output was laughably bad. After some trial and error with better datasets, I saw a significant improvement. It’s a reminder that, in AI, garbage in equals garbage out.\n\nChallenges and Lessons Learned\n\nOf course, working with transformers isn’t all roses. One of the biggest challenges I faced was overfitting. I’d train my model on a small dataset, and it would perform brilliantly on that data but flop on unseen data. It was a real gut punch.\n\nTo combat this, I started implementing techniques like dropout and data augmentation. It’s a bit like taking a step back to make sure your model has a solid foundation before building the rest. Remember, the goal isn’t just to perform well on training data; you want your model to generalize to new data.\n\nThe Future of Transformers: What’s Next?\n\nI’m genuinely excited about where transformers are headed. With recent advancements like Vision Transformers (ViTs) for image processing, it feels like we’re just scratching the surface of what’s possible. I’ve been experimenting with ViTs in some of my side projects, and the results are mind-blowing.\n\nOne thing I’m particularly interested in is how transformers will evolve with the need for more efficient models. Smaller models like DistilBERT have shown us that we can compress knowledge without losing too much performance. I believe this will be the future — efficient, effective models that democratize access to AI.\n\nFinal Thoughts: Embracing the Journey\n\nReflecting on my journey with “The Illustrated Transformer” and the world of transformers in general, I realize that it’s all about embracing the process. There’s so much out there to learn, and every failure is a stepping stone to something greater.\n\nSo, if you’re on the fence about diving into transformers, I say, go for it! Whether it’s through resources like “The Illustrated Transformer” or hands-on experimentation, you might just find that light bulb moment I did. Let’s keep pushing the boundaries together, and who knows? Maybe one day, your model will be the next big thing in AI!\n\nConnect with Me\n\nIf you enjoyed this article, let’s connect! I’d love to hear your thoughts and continue the conversation.\n\nLinkedIn: Connect with me on LinkedIn\n\nGitHub: Check out my projects on GitHub\n\nYouTube: Master DSA with me! Join my YouTube channel for Data Structures & Algorithms tutorials — let’s solve problems together! 🚀\n\nPortfolio: Visit my portfolio to see my work and projects\n\nPractice LeetCode with Me\n\nI also solve daily LeetCode problems and share solutions on my GitHub repository. My repository includes solutions for:\n\nBlind 75 problems\n\nNeetCode 150 problems\n\nStriver’s 450 questions\n\nDo you solve daily LeetCode problems? If you do, please contribute! If you’re stuck on a problem, feel free to check out my solutions. Let’s learn and grow together! 💪\n\nLeetCode Solutions: View my solutions on GitHub\n\nLeetCode Profile: Check out my LeetCode profile\n\nLove Reading?\n\nIf you’re a fan of reading books, I’ve written a fantasy fiction series that you might enjoy:\n\n📚 The Manas Saga: Mysteries of the Ancients — An epic trilogy blending Indian mythology with modern adventure, featuring immortal warriors, ancient secrets, and a quest that spans millennia.\n\nThe series follows Manas, a young man who discovers his extraordinary destiny tied to the Mahabharata, as he embarks on a journey to restore the sacred Saraswati River and confront dark forces threatening the world.\n\nYou can find it on Amazon Kindle, and it’s also available with Kindle Unlimited!", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "ever had that moment when you come across a piece of tech that just clicks a few weeks ago i stumbled upon the illustrated transformer and let me tell you it was like flipping a switch in my brain as someone who s been knee deep in ai and machine learning i ve always found the intricacies of transformers to be a bit shall we say overwhelming but this resource it made it all click what s the big deal about transformers if you ve been in the ai space for a hot minute you ve probably heard about transformers but why are they so crucial ever wondered why your favorite chatbots sound so human like it s all thanks to this architecture to put it simply transformers revolutionized how machines process language before transformers we had recurrent neural networks rnns which were like trying to read a book one letter at a time painfully slow and inefficient then came transformers which process data in parallel making them faster and more effective at capturing relationships in data i remember the first time i implemented a transformer model using hugging face s transformers library i was excited but also terrified would i be able to handle the complexity but after diving into the recommended resources my fear turned into fascination", "source_text": "Ever had that moment when you come across a piece of tech that just clicks? A few weeks ago, I stumbled upon “The Illustrated Transformer,” and let me tell you, it was like flipping a switch in my brain. As someone who’s been knee-deep in AI and machine learning, I’ve always found the intricacies of transformers to be a bit, shall we say, overwhelming. But this resource? It made it all click.\n\nWhat’s the Big Deal About Transformers?\n\nIf you’ve been in the AI space for a hot minute, you’ve probably heard about transformers. But why are they so crucial? Ever wondered why your favorite chatbots sound so human-like? It’s all thanks to this architecture! To put it simply, transformers revolutionized how machines process language. Before transformers, we had recurrent neural networks (RNNs), which were like trying to read a book one letter at a time — painfully slow and inefficient. Then came transformers, which process data in parallel, making them faster and more effective at capturing relationships in data.\n\nI remember the first time I implemented a transformer model using Hugging Face’s Transformers library. I was excited but also terrified. Would I be able to handle the complexity? But after diving into the recommended resources, my fear turned into fascination.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Ever had that moment when you come across a piece of tech th — What’s the Big Deal About Transformers?", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "the illustrated transformer a game changer when i came across the illustrated transformer it felt like i d found the cheat code it breaks down the architecture with visuals that are so clear you d think they were drawn just for me i found myself nodding along like a cartoon character when the light bulb goes off the illustrations helped me grasp concepts like self attention and multi head attention in a matter of hours for instance there s this beautiful diagram showing how the input sequence is transformed into a contextualized representation i had always struggled with visualizing how words in a sentence relate to one another but suddenly it was as if someone had turned on the lights in a dark room diving deeper understanding self attention self attention is where the magic happens ever wondered how a model understands which words in a sentence are important this is where self attention comes into play it allows the model to weigh the significance of different words when creating an output let s say for example you re working with the sentence the cat sat on the mat and it was very comfortable when the transformer processes this it needs to figure out that it refers to mat that s where self attention shines here s a simplified code snippet that shows how you can use self attention in practice import torch import torch nn functional as f def scaled dot product attention query key value matmul qk torch matmul query key transpose 2 1 d k query size 1 scaled attention logits matmul qk torch sqrt torch tensor d k dtype torch float32 attention weights f softmax scaled attention logits dim 1 output torch matmul attention weights value return output attention weights when i first tried this out i was unsure if i would get meaningful results but as i played around with different inputs and observed how the attention weights shifted i had one of those aha moments it was exhilarating to see how the model prioritized certain words", "source_text": "The Illustrated Transformer: A Game Changer\n\nWhen I came across “The Illustrated Transformer,” it felt like I’d found the cheat code. It breaks down the architecture with visuals that are so clear you’d think they were drawn just for me! I found myself nodding along like a cartoon character when the light bulb goes off. The illustrations helped me grasp concepts like self-attention and multi-head attention in a matter of hours.\n\nFor instance, there’s this beautiful diagram showing how the input sequence is transformed into a contextualized representation. I had always struggled with visualizing how words in a sentence relate to one another, but suddenly, it was as if someone had turned on the lights in a dark room.\n\nDiving Deeper: Understanding Self-Attention\n\nSelf-attention is where the magic happens. Ever wondered how a model understands which words in a sentence are important? This is where self-attention comes into play. It allows the model to weigh the significance of different words when creating an output.\n\nLet’s say, for example, you’re working with the sentence “The cat sat on the mat, and it was very comfortable.” When the transformer processes this, it needs to figure out that “it” refers to “mat”. That’s where self-attention shines. Here’s a simplified code snippet that shows how you can use self-attention in practice:\n\nimport torch\nimport torch.nn.functional as F\n\ndef scaled_dot_product_attention(query, key, value):\n matmul_qk = torch.matmul(query, key.transpose(-2, -1))\n d_k = query.size()[-1]\n scaled_attention_logits = matmul_qk / torch.sqrt(torch.tensor(d_k, dtype=torch.float32))\n attention_weights = F.softmax(scaled_attention_logits, dim=-1)\n output = torch.matmul(attention_weights, value)\n return output, attention_weights\n\nWhen I first tried this out, I was unsure if I would get meaningful results. But as I played around with different inputs and observed how the attention weights shifted, I had one of those “aha moments.” It was exhilarating to see how the model prioritized certain words!", "segmentation_method": "reviewed_source_semantics", "label": "The Illustrated Transformer: A Game Changer — Diving Deeper: Understanding Self-Attention", "source_line_range": [ 9, 33 ] }, { "id": "body-region-3", "text": "real world applications where transformers shine in my experience transformers are not just a theoretical concept they re very much a part of our daily lives think about it when you use a language translation app or when netflix suggests your next binge worthy series it s likely using transformers under the hood i ve been building a personal project around text summarization using bart a transformer model i started with some initial results that were promising but i soon realized the importance of fine tuning the model with quality data i initially fed it subpar input and the output was laughably bad after some trial and error with better datasets i saw a significant improvement it s a reminder that in ai garbage in equals garbage out challenges and lessons learned of course working with transformers isn t all roses one of the biggest challenges i faced was overfitting i d train my model on a small dataset and it would perform brilliantly on that data but flop on unseen data it was a real gut punch to combat this i started implementing techniques like dropout and data augmentation it s a bit like taking a step back to make sure your model has a solid foundation before building the rest remember the goal isn t just to perform well on training data you want your model to generalize to new data", "source_text": "Real-World Applications: Where Transformers Shine\n\nIn my experience, transformers are not just a theoretical concept; they’re very much a part of our daily lives. Think about it — when you use a language translation app, or when Netflix suggests your next binge-worthy series, it’s likely using transformers under the hood.\n\nI’ve been building a personal project around text summarization using BART, a transformer model. I started with some initial results that were promising, but I soon realized the importance of fine-tuning the model with quality data. I initially fed it subpar input, and the output was laughably bad. After some trial and error with better datasets, I saw a significant improvement. It’s a reminder that, in AI, garbage in equals garbage out.\n\nChallenges and Lessons Learned\n\nOf course, working with transformers isn’t all roses. One of the biggest challenges I faced was overfitting. I’d train my model on a small dataset, and it would perform brilliantly on that data but flop on unseen data. It was a real gut punch.\n\nTo combat this, I started implementing techniques like dropout and data augmentation. It’s a bit like taking a step back to make sure your model has a solid foundation before building the rest. Remember, the goal isn’t just to perform well on training data; you want your model to generalize to new data.", "segmentation_method": "reviewed_source_semantics", "label": "Real-World Applications: Where Transformers Shine — Challenges and Lessons Learned", "source_line_range": [ 34, 45 ] }, { "id": "body-region-4", "text": "the future of transformers what s next i m genuinely excited about where transformers are headed with recent advancements like vision transformers vits for image processing it feels like we re just scratching the surface of what s possible i ve been experimenting with vits in some of my side projects and the results are mind blowing one thing i m particularly interested in is how transformers will evolve with the need for more efficient models smaller models like distilbert have shown us that we can compress knowledge without losing too much performance i believe this will be the future efficient effective models that democratize access to ai final thoughts embracing the journey reflecting on my journey with the illustrated transformer and the world of transformers in general i realize that it s all about embracing the process there s so much out there to learn and every failure is a stepping stone to something greater so if you re on the fence about diving into transformers i say go for it whether it s through resources like the illustrated transformer or hands on experimentation you might just find that light bulb moment i did let s keep pushing the boundaries together and who knows maybe one day your model will be the next big thing in ai", "source_text": "The Future of Transformers: What’s Next?\n\nI’m genuinely excited about where transformers are headed. With recent advancements like Vision Transformers (ViTs) for image processing, it feels like we’re just scratching the surface of what’s possible. I’ve been experimenting with ViTs in some of my side projects, and the results are mind-blowing.\n\nOne thing I’m particularly interested in is how transformers will evolve with the need for more efficient models. Smaller models like DistilBERT have shown us that we can compress knowledge without losing too much performance. I believe this will be the future — efficient, effective models that democratize access to AI.\n\nFinal Thoughts: Embracing the Journey\n\nReflecting on my journey with “The Illustrated Transformer” and the world of transformers in general, I realize that it’s all about embracing the process. There’s so much out there to learn, and every failure is a stepping stone to something greater.\n\nSo, if you’re on the fence about diving into transformers, I say, go for it! Whether it’s through resources like “The Illustrated Transformer” or hands-on experimentation, you might just find that light bulb moment I did. Let’s keep pushing the boundaries together, and who knows? Maybe one day, your model will be the next big thing in AI!", "segmentation_method": "reviewed_source_semantics", "label": "The Future of Transformers: What’s Next? — Final Thoughts: Embracing the Journey", "source_line_range": [ 46, 57 ] }, { "id": "body-region-5", "text": "connect with me if you enjoyed this article let s connect i d love to hear your thoughts and continue the conversation linkedin connect with me on linkedin github check out my projects on github youtube master dsa with me join my youtube channel for data structures algorithms tutorials let s solve problems together portfolio visit my portfolio to see my work and projects practice leetcode with me i also solve daily leetcode problems and share solutions on my github repository my repository includes solutions for blind 75 problems neetcode 150 problems striver s 450 questions do you solve daily leetcode problems if you do please contribute if you re stuck on a problem feel free to check out my solutions let s learn and grow together leetcode solutions view my solutions on github leetcode profile check out my leetcode profile love reading if you re a fan of reading books i ve written a fantasy fiction series that you might enjoy the manas saga mysteries of the ancients an epic trilogy blending indian mythology with modern adventure featuring immortal warriors ancient secrets and a quest that spans millennia the series follows manas a young man who discovers his extraordinary destiny tied to the mahabharata as he embarks on a journey to restore the sacred saraswati river and confront dark forces threatening the world you can find it on amazon kindle and it s also available with kindle unlimited", "source_text": "Connect with Me\n\nIf you enjoyed this article, let’s connect! I’d love to hear your thoughts and continue the conversation.\n\nLinkedIn: Connect with me on LinkedIn\n\nGitHub: Check out my projects on GitHub\n\nYouTube: Master DSA with me! Join my YouTube channel for Data Structures & Algorithms tutorials — let’s solve problems together! 🚀\n\nPortfolio: Visit my portfolio to see my work and projects\n\nPractice LeetCode with Me\n\nI also solve daily LeetCode problems and share solutions on my GitHub repository. My repository includes solutions for:\n\nBlind 75 problems\n\nNeetCode 150 problems\n\nStriver’s 450 questions\n\nDo you solve daily LeetCode problems? If you do, please contribute! If you’re stuck on a problem, feel free to check out my solutions. Let’s learn and grow together! 💪\n\nLeetCode Solutions: View my solutions on GitHub\n\nLeetCode Profile: Check out my LeetCode profile\n\nLove Reading?\n\nIf you’re a fan of reading books, I’ve written a fantasy fiction series that you might enjoy:\n\n📚 The Manas Saga: Mysteries of the Ancients — An epic trilogy blending Indian mythology with modern adventure, featuring immortal warriors, ancient secrets, and a quest that spans millennia.\n\nThe series follows Manas, a young man who discovers his extraordinary destiny tied to the Mahabharata, as he embarks on a journey to restore the sacred Saraswati River and confront dark forces threatening the world.\n\nYou can find it on Amazon Kindle, and it’s also available with Kindle Unlimited!", "segmentation_method": "reviewed_source_semantics", "label": "Connect with Me — Love Reading?", "source_line_range": [ 58, 94 ] } ], "ending": { "text": "atening the world.\n\nYou can find it on Amazon Kindle, and it’s also available with Kindle Unlimited!" } } }, { "id": "article-027", "name": "How to Write", "url": "https://bradleytusk.substack.com/p/how-to-write", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How to Write" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Bradley Tusk’s Substack" ] }, { "id": "stable-2", "alternatives": [ "Subscribe" ] }, { "id": "stable-3", "alternatives": [ "Sign in" ] }, { "id": "stable-4", "alternatives": [ "Translate" ] }, { "id": "stable-6", "alternatives": [ "BRADLEY TUSK" ] }, { "id": "stable-7", "alternatives": [ "JUL 21, 2026" ] }, { "id": "stable-8", "alternatives": [ "Share" ] }, { "id": "stable-9", "alternatives": [ "Subscribe to Bradley Tusk’s Substack" ] }, { "id": "stable-10", "alternatives": [ "Politics, technology and the pursuit of happiness." ] }, { "id": "stable-11", "alternatives": [ "By subscribing, you agree to Substack's Terms of Use, and acknowledge its Information Collection Notice and Privacy Policy." ] }, { "id": "stable-12", "alternatives": [ "Previous" ] }, { "id": "stable-13", "alternatives": [ "Next" ] }, { "id": "stable-14", "alternatives": [ "Discussion about this post" ] }, { "id": "stable-15", "alternatives": [ "Comments" ] }, { "id": "stable-16", "alternatives": [ "Restacks" ] }, { "id": "stable-17", "alternatives": [ "Top" ] }, { "id": "stable-18", "alternatives": [ "Latest" ] }, { "id": "stable-19", "alternatives": [ "Discussions" ] }, { "id": "stable-20", "alternatives": [ "See all" ] }, { "id": "stable-21", "alternatives": [ "Ready for more?" ] }, { "id": "stable-22", "alternatives": [ "Bradley Tusk" ] }, { "id": "stable-23", "alternatives": [ "Privacy" ] }, { "id": "stable-24", "alternatives": [ "Terms" ] }, { "id": "stable-25", "alternatives": [ "Collection notice" ] }, { "id": "stable-26", "alternatives": [ "Start your Substack" ] }, { "id": "stable-27", "alternatives": [ "Get the app" ] }, { "id": "stable-28", "alternatives": [ "Substack" ] }, { "id": "stable-29", "alternatives": [ "is the home for great culture" ] }, { "id": "stable-30", "alternatives": [ "Type your email..." ], "visible_control": { "selector": "input[type=\"email\"][placeholder=\"Type your email...\"]", "attribute": "placeholder" } }, { "id": "stable-31", "alternatives": [ "Write a comment..." ], "visible_control": { "selector": "textarea[placeholder=\"Write a comment...\"]", "attribute": "placeholder" } }, { "id": "body-32", "alternatives": [ "The Secret to Writing Is Editing" ] }, { "id": "body-34", "alternatives": [ "Firewall with Bradley Tusk" ] }, { "id": "body-36", "alternatives": [ "Write like you speak." ] }, { "id": "body-37", "alternatives": [ "Do not try to sound smart." ] }, { "id": "body-38", "alternatives": [ "Speak your mind/ don’t sound like a politician." ] }, { "id": "body-39", "alternatives": [ "Use most of your time for editing" ] }, { "id": "body-40", "alternatives": [ "Then put it to bed." ] }, { "id": "body-41", "alternatives": [ "Keep your subconscious going." ] }, { "id": "body-42", "alternatives": [ "Have regular milestones." ] }, { "id": "body-43", "alternatives": [ "Talk out your ideas." ] }, { "id": "body-44", "alternatives": [ "If you’re writing fiction, have empathy for your characters. If it’s non-fiction, have empathy for yourself." ] }, { "id": "body-45", "alternatives": [ "Read a lot." ] }, { "id": "body-46", "alternatives": [ "Not everyone likes to write. And not everyone needs to. But if you do enjoy it — or if you have to write because of work or school — there’s no reason not to do it as well as you can. The tips above are certainly not the entirety of sound writing advice, but they have worked for me. I hope some of them work for you too!" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Retained original approved URL under explicit authoring-only obstruction-dismissal policy. Complete authored prose existed before dismissal. Initial loaded Spotify ordinary text is proven in both pre-fullpage native AX captures; complete article/list/child scope visually reviewed without expanding content. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How to Write" ], "html_selector": "h1.post-title.published,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#discussion .comment-list-items > .comment", "author_selector": "a[href*=\"/profile/\"][data-native=\"true\"]", "body_selector": ".comment-body", "id_attribute": "id", "section_markers": [ "Discussion about this post", "Comments" ], "version": 2, "minimum_comments": 1, "text_scope": { "body_end": "it as well as you can. The tips above are certainly not the entirety of sound writing advice, but they have worked for me. I hope some of them work for you too!", "end_markers": [ "Ready for more?", "Privacy" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-027/comment-qualification-reference-r5.json", "sha256": "a70a478f54766c79bb6b1a546d540475701550cd319561fcbceb8b140f8c2a99", "chars": 1060, "record_count": 1 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 1, "qualification_only": true } }, "ground_truth_main_content": "I’ve always loved writing. I do it frequently — books, columns, scripts, memos, speeches. Some of it has come out well. Some less so. But the act of writing itself makes me happy, so I keep doing it. Writing well is hard no matter who you are or how much you do it, but there are approaches that can help. Here are a few that have worked for me.\n\nThe Secret to Writing Is Editing\n\n7月21日\n\nFirewall with Bradley Tusk\n\n在 Spotify 上收藏\n\n1. Write like you speak. When most people speak, their goal is to communicate whatever they have to say as clearly as possible. Writing should be the same. Your writing can’t have a true voice if it doesn’t sound like you (or your characters, if you’re writing fiction). Just say what you want to say as plainly, concisely and clearly as possible.\n\n2. Do not try to sound smart. The worst writing is someone trying to impress you with how smart they are by using long, complex words and sentences simply because they’re long and complex. If the writer was truly smart, they wouldn’t need to do that. It’s the surest way to alienate your audience. My worst grade in law school was in legal writing. The instructor insisted there was one correct way to write and in my view, her way was simply bad writing, even if it was standard practice in the legal industry. I refused and my grade reflected it. So be it (when I published my first book, I made a cursory effort to find the instructor and send it to her but her name completely escaped me; I realized that for the sake of my writing in the years since her class, that was probably for the best).\n\n3. Speak your mind/ don’t sound like a politician. If you’re too afraid to write how you actually feel, don’t waste the reader’s time. This is why politicians’ biographies are usually unreadable. By definition, politicians try to be politic. If your only goal is to never offend anyone or say anything disagreeable, that probably means you don’t have anything worth saying in the first place.\n\n4. Use most of your time for editing. Blaise Pascal once famously concluded a letter apologizing for its length, saying something along the lines of “If I had more time, this letter would have been shorter.” I try to get whatever I can down on paper as quickly as possible and leave most of the time for editing. Having the time to rethink the piece, see what does and doesn’t work, what belongs where, what isn’t essential is what makes a piece worth reading. If someone asks you to read a draft of something, the best way to help them is rarely just by saying what you think of the substance itself. Focus instead on the writing, the flow, the voice, the structure, the feel. Opinions about ideas are easy. Anyone can do that. Feedback on the writing itself is more helpful.\n\n5. Then put it to bed. While editing is the most important part, there also comes a point to stop. Yes, you can always keep editing and keep making it incrementally better. I can go back to everything I’ve ever written and find plenty of things I would now change. But at a certain point, the returns become very diminishing. Move on.\n\n6. Keep your subconscious going. If I’m working on a column or chapter or script I’m excited about, my subconscious never stops thinking about it. I’ll often wake up in the middle of the night and realize where a sentence needs to go or why an argument doesn’t work or why the opening needs to be rewritten. Yes, every sleep expert would tell you to not then immediately dive into the document. They’re probably right. But how many of them can really write?\n\n7. Have regular milestones. Like most things, deadlines and accountability helps. The reason I produce a weekly substack and a monthly column for the Daily News is because it keeps me writing. I’m accountable to a specific output and that forces me to continually think, write and edit.\n\n8. Talk out your ideas. My substack comes out on Tuesdays. I record one of my podcasts on Monday mornings and the topic of the substack is almost always one of the topics of the podcast too. By talking through the piece in the studio, I realize what’s wrong with it and I go back and edit more before it’s published the next day. You may not have that specific setup, but just talking through your writing with others or even just reading out loud to yourself can really help.\n\n9. If you’re writing fiction, have empathy for your characters. If it’s non-fiction, have empathy for yourself. There was a guy once who was angry at me and in an effort to hurt my feelings, he told me that my novel Obvious in Hindsight didn’t work because it was clear I hated all of the characters. He was right. I was so focused on emotional and intellectual honesty that I did it at the expense of making my characters sympathetic, relatable, human. Your characters don’t have to be perfect or even good. But they do have to be redeeming in some way.\n\n10. Read a lot. I can’t imagine that many people write well in a vacuum. Being good at anything takes a lot of practice. But the act of writing alone is typically not enough. You need to read to learn from others. How do they express themselves? How do they tell a story? How do they write concisely? How do they structure their sentences, their paragraphs? For writing to be more than passable, reading is essential. With that said, as a reader, I am very protective of my time. If I don’t like something after 40 pages, I’m out. If I don’t like certain types of genres, I don’t read them. If everyone loves a book and I don’t, I put it down. Something like 150 million books have been written in human history. If you read 100 books a year, live to 100 and start reading the minute you come out of the womb, that’s .00006 percent of them. You can’t even make a dent in the total, so just read what you like.\n\nNot everyone likes to write. And not everyone needs to. But if you do enjoy it — or if you have to write because of work or school — there’s no reason not to do it as well as you can. The tips above are certainly not the entirety of sound writing advice, but they have worked for me. I hope some of them work for you too!\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "i ve always loved writing i do it frequently books columns scripts memos speeches some of it has come out well some less so but the act of writing itself makes me happy so i keep doing it writing well is hard no matter who you are or how much you do it but there are approaches that can help here are a few that have worked for me the secret to writing is editing 7 月 21 日 firewall with bradley tusk 在 spotify 上 收 藏 1 write like you speak when most people speak their goal is to communicate whatever they have to say as clearly as possible writing should be the same your writing can t have a true voice if it doesn t sound like you or your characters if you re writing fiction just say what you want to say as plainly concisely and clearly as possible 2 do not try to sound smart the worst writing is someone trying to impress you with how smart they are by using long complex words and sentences simply because they re long and complex if the writer was truly smart they wouldn t need to do that it s the surest way to alienate your audience my worst grade in law school was in legal writing the instructor insisted there was one correct way to write and in my view her way was simply bad writing even if it was standard practice in the legal industry i refused and my grade reflected it so be it when i published my first book i made a cursory effort to find the instructor and send it to her but her name completely escaped me i realized that for the sake of my writing in the years since her class that was probably for the best", "source_text": "I’ve always loved writing. I do it frequently — books, columns, scripts, memos, speeches. Some of it has come out well. Some less so. But the act of writing itself makes me happy, so I keep doing it. Writing well is hard no matter who you are or how much you do it, but there are approaches that can help. Here are a few that have worked for me.\n\nThe Secret to Writing Is Editing\n\n7月21日\n\nFirewall with Bradley Tusk\n\n在 Spotify 上收藏\n\n1. Write like you speak. When most people speak, their goal is to communicate whatever they have to say as clearly as possible. Writing should be the same. Your writing can’t have a true voice if it doesn’t sound like you (or your characters, if you’re writing fiction). Just say what you want to say as plainly, concisely and clearly as possible.\n\n2. Do not try to sound smart. The worst writing is someone trying to impress you with how smart they are by using long, complex words and sentences simply because they’re long and complex. If the writer was truly smart, they wouldn’t need to do that. It’s the surest way to alienate your audience. My worst grade in law school was in legal writing. The instructor insisted there was one correct way to write and in my view, her way was simply bad writing, even if it was standard practice in the legal industry. I refused and my grade reflected it. So be it (when I published my first book, I made a cursory effort to find the instructor and send it to her but her name completely escaped me; I realized that for the sake of my writing in the years since her class, that was probably for the best).", "segmentation_method": "reviewed_source_semantics", "label": "开篇:I’ve always loved writing. I do it frequently — books, colum — 段落/内容单元:2. Do not try to sound smart. The worst writing is someone t", "source_line_range": [ 1, 14 ] }, { "id": "body-region-2", "text": "3 speak your mind don t sound like a politician if you re too afraid to write how you actually feel don t waste the reader s time this is why politicians biographies are usually unreadable by definition politicians try to be politic if your only goal is to never offend anyone or say anything disagreeable that probably means you don t have anything worth saying in the first place 4 use most of your time for editing blaise pascal once famously concluded a letter apologizing for its length saying something along the lines of if i had more time this letter would have been shorter i try to get whatever i can down on paper as quickly as possible and leave most of the time for editing having the time to rethink the piece see what does and doesn t work what belongs where what isn t essential is what makes a piece worth reading if someone asks you to read a draft of something the best way to help them is rarely just by saying what you think of the substance itself focus instead on the writing the flow the voice the structure the feel opinions about ideas are easy anyone can do that feedback on the writing itself is more helpful", "source_text": "3. Speak your mind/ don’t sound like a politician. If you’re too afraid to write how you actually feel, don’t waste the reader’s time. This is why politicians’ biographies are usually unreadable. By definition, politicians try to be politic. If your only goal is to never offend anyone or say anything disagreeable, that probably means you don’t have anything worth saying in the first place.\n\n4. Use most of your time for editing. Blaise Pascal once famously concluded a letter apologizing for its length, saying something along the lines of “If I had more time, this letter would have been shorter.” I try to get whatever I can down on paper as quickly as possible and leave most of the time for editing. Having the time to rethink the piece, see what does and doesn’t work, what belongs where, what isn’t essential is what makes a piece worth reading. If someone asks you to read a draft of something, the best way to help them is rarely just by saying what you think of the substance itself. Focus instead on the writing, the flow, the voice, the structure, the feel. Opinions about ideas are easy. Anyone can do that. Feedback on the writing itself is more helpful.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:3. Speak your mind/ don’t sound like a politician. If you’re — 段落/内容单元:4. Use most of your time for editing. Blaise Pascal once fam", "source_line_range": [ 15, 18 ] }, { "id": "body-region-3", "text": "5 then put it to bed while editing is the most important part there also comes a point to stop yes you can always keep editing and keep making it incrementally better i can go back to everything i ve ever written and find plenty of things i would now change but at a certain point the returns become very diminishing move on 6 keep your subconscious going if i m working on a column or chapter or script i m excited about my subconscious never stops thinking about it i ll often wake up in the middle of the night and realize where a sentence needs to go or why an argument doesn t work or why the opening needs to be rewritten yes every sleep expert would tell you to not then immediately dive into the document they re probably right but how many of them can really write", "source_text": "5. Then put it to bed. While editing is the most important part, there also comes a point to stop. Yes, you can always keep editing and keep making it incrementally better. I can go back to everything I’ve ever written and find plenty of things I would now change. But at a certain point, the returns become very diminishing. Move on.\n\n6. Keep your subconscious going. If I’m working on a column or chapter or script I’m excited about, my subconscious never stops thinking about it. I’ll often wake up in the middle of the night and realize where a sentence needs to go or why an argument doesn’t work or why the opening needs to be rewritten. Yes, every sleep expert would tell you to not then immediately dive into the document. They’re probably right. But how many of them can really write?", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:5. Then put it to bed. While editing is the most important p — 段落/内容单元:6. Keep your subconscious going. If I’m working on a column ", "source_line_range": [ 19, 22 ] }, { "id": "body-region-4", "text": "7 have regular milestones like most things deadlines and accountability helps the reason i produce a weekly substack and a monthly column for the daily news is because it keeps me writing i m accountable to a specific output and that forces me to continually think write and edit 8 talk out your ideas my substack comes out on tuesdays i record one of my podcasts on monday mornings and the topic of the substack is almost always one of the topics of the podcast too by talking through the piece in the studio i realize what s wrong with it and i go back and edit more before it s published the next day you may not have that specific setup but just talking through your writing with others or even just reading out loud to yourself can really help 9 if you re writing fiction have empathy for your characters if it s non fiction have empathy for yourself there was a guy once who was angry at me and in an effort to hurt my feelings he told me that my novel obvious in hindsight didn t work because it was clear i hated all of the characters he was right i was so focused on emotional and intellectual honesty that i did it at the expense of making my characters sympathetic relatable human your characters don t have to be perfect or even good but they do have to be redeeming in some way", "source_text": "7. Have regular milestones. Like most things, deadlines and accountability helps. The reason I produce a weekly substack and a monthly column for the Daily News is because it keeps me writing. I’m accountable to a specific output and that forces me to continually think, write and edit.\n\n8. Talk out your ideas. My substack comes out on Tuesdays. I record one of my podcasts on Monday mornings and the topic of the substack is almost always one of the topics of the podcast too. By talking through the piece in the studio, I realize what’s wrong with it and I go back and edit more before it’s published the next day. You may not have that specific setup, but just talking through your writing with others or even just reading out loud to yourself can really help.\n\n9. If you’re writing fiction, have empathy for your characters. If it’s non-fiction, have empathy for yourself. There was a guy once who was angry at me and in an effort to hurt my feelings, he told me that my novel Obvious in Hindsight didn’t work because it was clear I hated all of the characters. He was right. I was so focused on emotional and intellectual honesty that I did it at the expense of making my characters sympathetic, relatable, human. Your characters don’t have to be perfect or even good. But they do have to be redeeming in some way.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:7. Have regular milestones. Like most things, deadlines and — 段落/内容单元:9. If you’re writing fiction, have empathy for your characte", "source_line_range": [ 23, 28 ] }, { "id": "body-region-5", "text": "10 read a lot i can t imagine that many people write well in a vacuum being good at anything takes a lot of practice but the act of writing alone is typically not enough you need to read to learn from others how do they express themselves how do they tell a story how do they write concisely how do they structure their sentences their paragraphs for writing to be more than passable reading is essential with that said as a reader i am very protective of my time if i don t like something after 40 pages i m out if i don t like certain types of genres i don t read them if everyone loves a book and i don t i put it down something like 150 million books have been written in human history if you read 100 books a year live to 100 and start reading the minute you come out of the womb that s 00006 percent of them you can t even make a dent in the total so just read what you like not everyone likes to write and not everyone needs to but if you do enjoy it or if you have to write because of work or school there s no reason not to do it as well as you can the tips above are certainly not the entirety of sound writing advice but they have worked for me i hope some of them work for you too", "source_text": "10. Read a lot. I can’t imagine that many people write well in a vacuum. Being good at anything takes a lot of practice. But the act of writing alone is typically not enough. You need to read to learn from others. How do they express themselves? How do they tell a story? How do they write concisely? How do they structure their sentences, their paragraphs? For writing to be more than passable, reading is essential. With that said, as a reader, I am very protective of my time. If I don’t like something after 40 pages, I’m out. If I don’t like certain types of genres, I don’t read them. If everyone loves a book and I don’t, I put it down. Something like 150 million books have been written in human history. If you read 100 books a year, live to 100 and start reading the minute you come out of the womb, that’s .00006 percent of them. You can’t even make a dent in the total, so just read what you like.\n\nNot everyone likes to write. And not everyone needs to. But if you do enjoy it — or if you have to write because of work or school — there’s no reason not to do it as well as you can. The tips above are certainly not the entirety of sound writing advice, but they have worked for me. I hope some of them work for you too!", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:10. Read a lot. I can’t imagine that many people write well — 段落/内容单元:Not everyone likes to write. And not everyone needs to. But ", "source_line_range": [ 29, 31 ] } ], "ending": { "text": "it as well as you can. The tips above are certainly not the entirety of sound writing advice, but they have worked for me. I hope some of them work for you too!" } } }, { "id": "article-028", "name": "AIがチャットから仕事を代行する存在へ", "url": "https://note.com/ai_gpt_take/n/n85e2a2b98456", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "AIが“チャット”から“仕事を代行する存在”へ" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "けたけけ/GPTsクリエイター" ] }, { "id": "stable-2", "alternatives": [ "投稿" ] }, { "id": "stable-3", "alternatives": [ "ログイン" ] }, { "id": "stable-4", "alternatives": [ "会員登録" ] }, { "id": "stable-5", "alternatives": [ "フォロー" ] }, { "id": "stable-6", "alternatives": [ "いいなと思ったら応援しよう!" ] }, { "id": "stable-7", "alternatives": [ "チップで応援する" ] }, { "id": "stable-8", "alternatives": [ "#AIニュース" ] }, { "id": "stable-9", "alternatives": [ "コメント" ] }, { "id": "stable-10", "alternatives": [ "コメントを投稿するには、ログインまたは会員登録をお願いします。" ] }, { "id": "stable-11", "alternatives": [ "noteプレミアム" ] }, { "id": "stable-12", "alternatives": [ "note pro" ] }, { "id": "stable-13", "alternatives": [ "ヘルプ" ] }, { "id": "stable-14", "alternatives": [ "プライバシー" ] }, { "id": "stable-15", "alternatives": [ "クリエイターへのお問い合わせ" ] }, { "id": "stable-16", "alternatives": [ "フィードバック" ] }, { "id": "stable-17", "alternatives": [ "ご利用規約" ] }, { "id": "stable-18", "alternatives": [ "通常ポイント利用特約" ] }, { "id": "stable-19", "alternatives": [ "加盟店規約" ] }, { "id": "stable-20", "alternatives": [ "資金決済法に基づく表示" ] }, { "id": "stable-21", "alternatives": [ "特商法表記" ] }, { "id": "stable-22", "alternatives": [ "投資情報の免責事項" ] }, { "id": "article-title", "alternatives": [ "AIが“チャット”から“仕事を代行する存在”へ" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initially rendered 64k-character weekly digest, including original introduction, glossary, currently visible partial table of contents, every news category and concluding column. Auto-height body; beginning/middle/ending screenshots confirm no body truncation. Collapsed TOC is left untouched. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "【AIニュース】AIが“チャット”から“仕事を代行する存在”へ – Weekly Digest (04/05〜04/11)" ], "html_selector": "h1.pointer-events-auto.mt-\\[30px\\],h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-028/comment-qualification-reference-r5.json", "sha256": "527f3b45779648844e19970ed8f415da64a71939ee7841164d9a8a94ee33acf8", "chars": 774, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "4/5の週は、AIがただ質問に答えるだけでなく、実際の仕事を進める存在へ近づいていることを感じる1週間でした。\n\n特に目立ったのは、Claude Managed Agents、Genspark AI Workspace 4.0、Factory Desktop、LangSmith Deploymentsなど、AIエージェントを「試す」段階から、業務に組み込んで動かす方向へのアップデートです。\n\nSlackの中でエージェントに依頼する。\nOfficeアプリの中で資料や文書を作る。\n開発環境やデスクトップ上でAIが作業を進める。\n\nこうした流れを見ると、AIは少しずつ「チャット相手」から「仕事を代行するパートナー」へ変わり始めています。\n\n本記事では、AI初心者の方にもわかりやすいように、1週間分のAI関連ニュースをできるだけ簡潔にまとめています。気になったニュースがあれば、ぜひ一次ソースも確認してみてください。\n\nこの記事はトピック数が多めなので、最初から全部を細かく読む必要はありません。\nまずは「自分の仕事に関係ありそう」と感じた項目だけ拾い読みしても大丈夫です。\n\n特に、資料作成、議事録、動画制作、コード修正、業務自動化に関心がある方は、該当する見出しから読んでみてください。\n\nこの記事でよく出てくる用語ミニ解説\n\nAIエージェント:人の指示を受けて、調査・資料作成・コード修正などの作業を進めるAIのことです。\n\nAPI:アプリやサービス同士をつなぐための仕組みです。開発者向けの利用方法と考えると分かりやすいです。\n\nMCP:AIが外部ツールやデータに接続しやすくするための仕組みです。\n\nデプロイ:作ったAIやアプリを、実際に使える状態で公開・運用することです。\n\nクレジット制:使った分だけポイントを消費する料金方式です。動画生成AIでよく使われます。\n\n難しい言葉も出てきますが、細かい技術理解よりも「自分の作業にどう関係するか」を見ていけば大丈夫です。\n\n目次\nこの記事でよく出てくる用語ミニ解説\n🔁 モデル・バージョンアップ\n【Pollo AI】【Pollo 3.0】一貫キャラクター・カメラ制御・マルチショット生成を訴求(04/07)\n【Google DeepMind】【Gemma 4】小型でも高性能なオープンモデルとして発表、公式SNSでも反響を紹介(04/10)\n【Liquid AI】【LFM2.5-VL-450M】エッジ向けリアルタイム視覚言語モデルを公開(04/09)\n【PixVerse】【PixVerse C1】映画制作向け初モデルをリリース(04/08)\n【Suno】【v5.5】新音楽モデルを発表、公式SNSでも改めて紹介(04/08)\n🔌 モデル対応アップデート\n【Alibaba Qwen】【Qwen3.6-Plus】OpenRouterで好調、本番API利用を訴求(04/08)\n【Clawi】【主要LLM対応】Claude・GPT・Gemini・Qwenなど複数モデルを統合(04/05)\nすべて表示\n🔁 モデル・バージョンアップ\n【Pollo AI】【Pollo 3.0】一貫キャラクター・カメラ制御・マルチショット生成を訴求(04/07)\n\nPollo 3.0のローンチが告知されました。\n\n一貫したキャラクター、精密なプロンプト、カメラ/モーション制御、マルチショットストーリーテリングが特徴です。\n\n1回の生成で、より映像作品らしい構成を作れることをアピールしています。\n\n▶️ ポイント:\n\n動画生成で難しかった「同じキャラを保つ」「複数カットをつなぐ」作業を、より簡単にする方向のアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/itsPolloAI/status/2041450652963066262\n・補足・関連情報: https://x.com/itsPolloAI/status/2041450656364716237\n・公式サイト: https://pollo.ai/\n\n💳 料金・プラン:\n\n・公式料金ページ: https://pollo.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可、生成はクレジット制\n・補足:Pollo AIは無料で始められます。ただし、生成にはクレジットを消費し、無料枠では透かし、生成回数、速度、出力品質などに制限がある場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://pollo.ai/\n\n【Google DeepMind】【Gemma 4】小型でも高性能なオープンモデルとして発表、公式SNSでも反響を紹介(04/10)\n\nGemma 4が、サイズ以上の性能を発揮するオープンモデルとして紹介されました。\n\n公式ブログ上の発表日は2026年4月2日で、4月10日の公式SNSでは公開初週の反響も紹介されています。\n\nGoogleの公式情報では、Gemma 4はApache 2.0ライセンスで公開されています。\n\n▶️ ポイント:\n\n軽量モデルでも高性能化が進むことで、ローカル環境や低コスト環境でも実用的なAI活用が広がります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleDeepMind/status/2042283481640615944\n・公式ブログ: https://blog.google/innovation-and-ai/technology/developers-tools/gemma-4/\n・Google Open Source Blog: https://opensource.googleblog.com/2026/03/gemma-4-expanding-the-gemmaverse-with-apache-20.html\n・モデルページ: https://deepmind.google/models/gemma/gemma-4/\n・モデルカード: https://ai.google.dev/gemma/docs/core/model_card_4\n\n💳 料金・プラン:\n\n・公式モデルページ: https://deepmind.google/models/gemma/gemma-4/\n・Google AI Studio: https://aistudio.google.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:Gemma 4はApache 2.0ライセンスのオープンモデルとして公開されています。商用利用を含む詳しい条件は、公式モデルカードとライセンスを確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://aistudio.google.com/\n・モデルページ: https://deepmind.google/models/gemma/gemma-4/\n\n【Liquid AI】【LFM2.5-VL-450M】エッジ向けリアルタイム視覚言語モデルを公開(04/09)\n\nLFM2.5-VL-450Mが、エッジデバイス向けの視覚言語モデルとして発表されました。\n\n512×512画像を約240msで処理し、4FPSのビデオストリーム推論にも対応すると説明されています。\n\nバウンディングボックス予測、多言語視覚理解、関数呼び出し、Jetsonやスマホなどでの実行が紹介されています。\n\n▶️ ポイント:\n\nクラウドに送らず、端末側で画像理解AIを動かしやすくする発表です。監視、ロボット、モバイルアプリなどへの応用が期待できます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/liquidai/status/2041912441060143251\n・補足・関連情報: https://x.com/liquidai/status/2041912454020542565\n・公式ブログ: https://www.liquid.ai/blog/lfm2-5-vl-450m\n・Hugging Face: https://huggingface.co/LiquidAI/LFM2.5-VL-450M\n\n💳 料金・プラン:\n\n・Hugging Faceモデルページ: https://huggingface.co/LiquidAI/LFM2.5-VL-450M\n・Liquid AI公式サイト: https://www.liquid.ai/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:モデルはHugging Faceで公開されています。ローカル実行や研究利用は可能ですが、商用利用・再配布・派生モデル作成などの条件は、公式モデルカードとライセンスを確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Hugging Face: https://huggingface.co/LiquidAI/LFM2.5-VL-450M\n・公式ブログ: https://www.liquid.ai/blog/lfm2-5-vl-450m\n\n【PixVerse】【PixVerse C1】映画制作向け初モデルをリリース(04/08)\n\nPixVerse C1が、映画制作向けの初モデルとして発表されました。\n\n1080p、15秒、ネイティブオーディオ対応が特徴です。\n\nWebアプリでの試用リンクも案内されています。\n\n▶️ ポイント:\n\nAI動画生成が短いクリップだけでなく、音声付きの映像制作に近づいていることを示す発表です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/PixVerse_/status/2041536108660740162\n・試用リンク導線: https://x.com/PixVerse_/status/2041536112511033375\n・公式ドキュメント: https://docs.platform.pixverse.ai/\n・モデル料金: https://docs.platform.pixverse.ai/model-pricing-796039m0\n\n💳 料金・プラン:\n\n・公式料金ドキュメント: https://docs.platform.pixverse.ai/model-pricing-796039m0\n・課金ページ: https://platform.pixverse.ai/billing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ クレジット制\n・補足:PixVerse Platformではモデルごとのクレジット消費が設定されています。無料クレジットや新規特典が提供される場合もありますが、C1を継続利用する場合はクレジット消費・有料購入が前提になる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://app.pixverse.ai/\n・開発者向けPlatform: https://platform.pixverse.ai/\n\n【Suno】【v5.5】新音楽モデルを発表、公式SNSでも改めて紹介(04/08)\n\nSunoが新モデル「v5.5」を発表しました。公式ブログ上の発表日は2026年3月26日で、4月8日の投稿ではこの新モデルが改めて紹介されています。\n\nv5.5では、Voices、Custom models、My Tasteなど、ユーザーの声・好み・制作スタイルに合わせる機能が強化されています。\n\n有料プランでは、より高性能なモデルや編集ツール、Voices/Custom modelsなどの高度な機能を利用できる構成になっています。\n\n▶️ ポイント:\n\n音楽生成AIでも、単に“曲を作る”だけでなく、自分の声や好みに合わせて制作するパーソナライズ競争が進んでいます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/suno/status/2041541160015937995\n・公式ブログ: https://suno.com/blog/v5-5\n・公式料金ページ: https://suno.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://suno.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ v5.5の本格利用は有料プラン中心\n・補足:Sunoには無料プランがありますが、v5.5やVoices、Custom modelsなどの高度な機能はPro/Premier向けとして案内されています。無料プランでは使えるモデルや機能に制限があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://suno.com/\n\n🔌 モデル対応アップデート\n【Alibaba Qwen】【Qwen3.6-Plus】OpenRouterで好調、本番API利用を訴求(04/08)\n\nQwen3.6-PlusがOpenRouterのデイリー・ウィークリー・トレンディングチャートで好調だったことが報告されました。\n\n投稿では、トライアル期間が終了し、本番稼働済みであることがアナウンスされています。\n\n低遅延、高い推論性能、低コストを特徴として、API統合を呼びかけています。\n\nQwen Codeのアップデートとは異なり、こちらは「Qwen3.6-PlusというモデルをAPI経由で使う」こと自体が主題です。\n\n▶️ ポイント:\n\nQwen3.6-Plusは、OpenRouter経由で利用できる実運用向けモデルとして存在感を高めています。開発者にとっては、コスト・速度・推論性能のバランスを見ながら採用候補にできるモデル選択肢です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Alibaba_Qwen/status/2041871541080924477\n・OpenRouterモデルページ: https://openrouter.ai/qwen/qwen3.6-plus\n\n💳 料金・プラン:\n\n・OpenRouterモデル料金: https://openrouter.ai/qwen/qwen3.6-plus\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 原則API課金\n・補足:OpenRouterではモデルごとに入力・出力トークン単価が表示されます。無料提供や一時的なプロモーションがある場合でも、本番利用ではAPI従量課金の確認が必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・OpenRouter: https://openrouter.ai/qwen/qwen3.6-plus\n\n【Clawi】【主要LLM対応】Claude・GPT・Gemini・Qwenなど複数モデルを統合(04/05)\n\nClawiでClaude、GPT、Geminiなど20以上のモデルをサブスクリプション内で利用できると紹介されました。\n\nQwen 3.6 Plusを含むモデル提供や、追加API費用なしの使い方が訴求されています。\n\nモデルプロバイダーにロックインされない点を強調しています。\n\n▶️ ポイント:\n\n1つのサービス内で複数モデルを切り替えられると、用途ごとに得意なAIを選びやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/ClawiAi/status/2040499750269534496\n・補足・関連情報: https://x.com/ClawiAi/status/2040805959216374039\n・公式サイト: https://clawi.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://clawi.ai/\n・補足:公式サイトではBasic、Pro、Ultraの有料プランが掲載されています。\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Clawiはクラウド上でAIエージェントを動かす有料サービスです。モデル利用、メッセンジャー連携、エージェントリソースなどがプランによって異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・公式サイト: https://clawi.ai/\n\n【Freepik】【Seedance 2.0】日本・全プランへ提供範囲を拡大(04/05〜04/10)\n\nSeedance 2.0が日本で正式利用可能になり、当初はBusiness/Enterprise向けとして紹介されました。\n\nその後、Freepik全プランで利用可能になったと発表されています。\n\nプロンプト作成記事や、1プロンプトで映画的動画を作る解説も共有されています。\n\n▶️ ポイント:\n\n動画生成モデルの提供範囲が広がることで、専門ユーザーだけでなく一般クリエイターも試しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/freepik/status/2040766188607946822\n・公式SNS: https://x.com/freepik/status/2042316920352096558\n・補足・関連情報: https://x.com/freepik/status/2042607677805670686\n・公式料金ページ: https://www.freepik.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.freepik.com/pricing\n・Seedance 2.0ページ: https://www.freepik.com/seedance-2\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 全プラン対応だがクレジット制\n・補足:Freepikには無料プランがありますが、Seedance 2.0はクレジット消費型の動画生成モデルとして扱われています。無料プランでの利用量、解像度、生成回数は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.freepik.com/\n・Seedance 2.0: https://www.freepik.com/seedance-2\n\n【Gamma】【Connector Suite】OpenAI・Claude・Zapier・n8nなどと連携(04/08)\n\nGamma向けの新コネクタースイートが発表されました。\n\nOpenAI、Claude、Zapier、Make、n8n、Atlassian Rovo、Superhuman Go、Gleanなどとの統合が紹介されています。\n\nさまざまな業務ツールからプレゼン生成につなげられる点が特徴です。\n\n▶️ ポイント:\n\n資料作成AIが単体ツールから、既存業務ツールの中で動く存在へ近づいています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GammaApp/status/2041562184082505863\n・コネクター公式ドキュメント: https://developers.gamma.app/connectors/connectors-and-integrations\n・公式料金ページ: https://gamma.app/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://gamma.app/pricing\n・API/連携の料金説明: https://developers.gamma.app/get-started/access-and-pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料プランでも一部利用可能\n・補足:Gammaには無料プランがあります。ChatGPT、Claude、Superhuman Go、Atlassian Rovo連携は全Gammaプランで利用可能と案内されています。一方で、Zapier、Make、n8n、API連携などはAPIキーや有料条件が関係する場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://gamma.app/\n\n【Gamma】【Atlassian/Rovo】Confluenceからプレゼン生成に対応(04/10)\n\nGammaがAtlassianと連携し、Confluence内のパートナーエージェントとして統合されたと発表されました。\n\nRovoチャットからページ、議事録、ステータス更新をもとにプレゼンを生成できると説明されています。\n\nチーム内のナレッジを資料化しやすくするアップデートです。\n\n▶️ ポイント:\n\n社内ドキュメントをそのままプレゼンに変換できるため、会議資料や報告資料の作成時間を減らせます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GammaApp/status/2042259992670011651\n・Gamma連携ページ: https://gamma.app/integrations/atlassian-rovo\n・Atlassian関連情報: https://www.atlassian.com/ja/blog/rovo-remix-3p-agents-confluence\n\n💳 料金・プラン:\n\n・Gamma料金ページ: https://gamma.app/pricing\n・Atlassian料金ページ: https://www.atlassian.com/software/confluence/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Gamma側は無料プランあり、Rovo/Confluence側は別途条件あり\n・補足:Gamma自体には無料プランがあります。ただし、Confluence・Rovo連携を実際に使うには、Atlassian側の対象プランや組織設定が関係する可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gamma: https://gamma.app/\n・Gamma × Atlassian Rovo: https://gamma.app/integrations/atlassian-rovo\n\n【Firebase】【Kiro】Firebase MCPサーバーをワンクリック導入可能に(04/09)\n\nFirebaseがKiroの公式Powerになったと発表されました。\n\nFirebase MCPサーバーをKiroにワンクリックでインストールできると説明されています。\n\nAI開発環境からFirebase機能へ接続しやすくなる更新です。\n\n▶️ ポイント:\n\nMCP連携により、AI IDEやエージェントがFirebaseの情報・機能を扱いやすくなります。\n初心者向けに言うと、「AI開発ツールからFirebaseを使いやすくする接続機能」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Firebase/status/2041942967284293774\n・Kiro Powers: https://kiro.dev/powers/\n・Firebase料金: https://firebase.google.com/pricing\n\n💳 料金・プラン:\n\n・Kiro料金ページ: https://kiro.dev/pricing/\n・Firebase料金ページ: https://firebase.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:KiroにはFree tierがあり、Firebaseにも無料のSparkプランがあります。ただし、Firebaseの一部機能や利用量増加時はBlazeプランの従量課金が必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Kiro: https://kiro.dev/\n・Firebase: https://firebase.google.com/\n\n【Google】【Gemini 3.1 Pro】Augment Codeのモデルピッカーで利用可能に(04/07)\n\nGemini 3.1 ProがAugment Codeのモデルピッカーで利用可能になったと紹介されました。\n\n大規模コードベースの変更を効率化できると訴求されています。\n\n高性能・低コストのコード支援モデルとしての利用が期待されます。\n\n▶️ ポイント:\n\nコーディング支援ツールで使えるモデルが増えると、開発者はタスクに合うAIを選びやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googleaidevs/status/2041213569354604630\n・Augment公式ブログ: https://www.augmentcode.com/blog/gemini-3-1-pro-now-available-in-augment-code\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n💳 料金・プラン:\n\n・Augment Code: https://www.augmentcode.com/\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン/有料API中心\n・補足:Gemini 3.1 ProはAugment Code内のモデル選択肢として提供されます。利用にはAugment Code側の契約条件が関係します。また、Gemini APIではPro系モデルが無料Tier対象外として表示される場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Augment Code: https://www.augmentcode.com/\n\n【LangChain】【LangSmith Fleet】Arcadeの7,500以上のMCPツールに対応(04/08)\n\nArcade社の7,500以上のエージェント最適化MCPツールが、LangSmith Fleetで利用可能になりました。\n\nSalesforce、GitHub、Zendesk、Asanaなど、多数のサービスへ安全接続できると紹介されています。\n\nエージェントが外部業務ツールを操作する範囲が広がります。\n\n▶️ ポイント:\n\nAIエージェントに「使える道具」が増えるほど、実務自動化の幅が広がります。\nたとえば、営業管理、問い合わせ対応、タスク管理などをAIが扱いやすくなるイメージです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041557866365251588\n・LangChain料金ページ: https://www.langchain.com/pricing\n\n💳 料金・プラン:\n\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料枠あり、Fleet本格利用は有料プラン確認が必要\n・補足:LangSmithにはDeveloper向け無料枠があります。ただし、Fleetエージェント数や本番運用、Arcade連携の利用条件はプランごとに異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・LangSmith: https://smith.langchain.com/\n・LangChain: https://www.langchain.com/\n\n【Manus】【Manus for Slack】Slack内DMからエージェントを利用可能に(04/07)\n\nManus for Slackが発表されました。\n\nSlack内DMでManusエージェントを使い、チャット上のアイデアや意思決定を実行へつなげられると説明されています。\n\nFAQでは、有料Slackプラン、セキュリティ、チャンネル権限、プライベートメッセージの扱いにも触れています。\n\n▶️ ポイント:\n\nSlackの会話をそのままAIエージェントへの仕事依頼に変えられるため、業務の流れを止めにくくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/ManusAI_JP/status/2041337705452442005\n・補足・関連情報: https://x.com/ManusAI_JP/status/2041337772439667116\n・設定リンク導線: https://x.com/ManusAI_JP/status/2041337784716460512\n・公式ブログ: https://manus.im/blog/manus-your-partner-on-slack\n\n💳 料金・プラン:\n\n・Manus料金ページ: https://manus.im/pricing\n・Slack料金ページ: https://slack.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料Slackプランが必要\n・補足:Manus for SlackのFAQでは、有料Slackプランが必要と説明されています。Manus本体には無料トライアル案内がありますが、Slack連携の実利用条件はManusとSlack双方のプラン確認が必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Manus: https://manus.im/\n・Slack連携ドキュメント: https://manus.im/docs/integrations/slack-integration\n\n【Medeo】【Seedance 2.0】Medeo x Seedance 2.0提携を発表(04/10)\n\nMedeoがSeedance 2.0との提携を発表しました。\n\n初月$6で利用可能とされ、シネマティックビジュアル、マルチモーダル入力、ネイティブサウンドが特徴として紹介されています。\n\n動画生成モデルをMedeo上で使えるようにするモデル対応アップデートです。\n\n▶️ ポイント:\n\n人気動画生成モデルが複数サービスに広がることで、ユーザーは使い慣れた制作環境から試せるようになります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Medeo_AI/status/2042256470247403864\n・公式料金ページ: https://www.medeo.app/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.medeo.app/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Seedance 2.0利用は有料/クレジット対象の可能性が高い\n・補足:MedeoにはFreeプランがあります。ただし、Seedance 2.0などの高性能動画モデルはクレジット消費や有料プラン対象になる可能性があるため、無料プランでどこまで使えるかはアプリ内表示を確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.medeo.app/\n\n【Perplexity】【Computer × Plaid】金融口座連携に対応(04/10)\n\nPerplexity ComputerがPlaidと連携し、銀行口座・クレジットカード・ローンをリンク可能になったと発表されました。\n\n支出追跡、予算ツール作成、投資ポートフォリオと並べた純資産可視化に対応すると説明されています。\n\nComputerタスクはPro/Maxサブスクライバー限定とされています。\n\n▶️ ポイント:\n\nAIが個人の金融データを扱うことで、家計管理や資産把握を対話的に行える可能性があります。\n便利な一方で、お金に関わる情報を連携するため、権限やセキュリティ確認は特に大切です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/perplexity_ai/status/2042256932397019368\n・補足・関連情報: https://x.com/perplexity_ai/status/2042256944426364931\n・公式サイト: https://www.perplexity.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://www.perplexity.ai/\n・Pro: https://www.perplexity.ai/pro\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 一部有料プランのみ\n・補足:口座連携やページ閲覧は全ユーザー向けとされていますが、ComputerタスクはPro/Maxサブスクライバー限定と説明されています。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.perplexity.ai/\n\n【Lovart】【Seedance 2.0】Lovart上でSeedance 2.0対応を告知(04/10)\n\nLovartでSeedance 2.0が使えるようになったと複数投稿で告知されました。\n\n「発想から完成まで一気に実現できる」制作環境として訴求されています。\n\n動画作例を通じて、Lovart上でのSeedance 2.0活用が紹介されています。\n\n▶️ ポイント:\n\n画像・動画制作プラットフォームに動画生成モデルが追加されることで、制作フローの中で直接動画化しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/lovart_jp/status/2042512912070095242\n・補足・関連情報: https://x.com/lovart_jp/status/2042535558988095586\n・補足・関連情報: https://x.com/lovart_jp/status/2042558213749432348\n・Seedanceページ: https://www.lovart.ai/features/online-multimodal-ai-creator-seedance\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.lovart.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Seedance利用はクレジット/対象プラン確認が必要\n・補足:Lovartには無料プランがあります。ただし、Seedance 2.0の利用枠、生成回数、クレジット消費は公式料金ページとアプリ内表示で確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.lovart.ai/\n\n【Runway】【Seedance 2.0】Runwayに搭載、全有料プランへ拡大(04/07〜04/10)\n\nSeedance 2.0がRunwayに搭載されました。\n\nテキスト・画像・動画・音声を入力として、複数ショットの動画シーケンスを生成できると説明されています。\n\nその後、米国を含む全有料プランで利用可能になったと告知されました。\n\n使い方記事も共有されています。\n\n▶️ ポイント:\n\nRunway利用者は、既存の制作環境の中でSeedance 2.0を使えるようになり、動画生成モデルの選択肢が広がります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/runwayml/status/2041517519664463940\n・公式SNS: https://x.com/runwayml/status/2042336701557703020\n・補足・関連情報: https://x.com/runwayml/status/2041872715640914095\n・公式料金ページ: https://runwayml.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://runwayml.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プランのみ\n・補足:投稿では全有料プランで利用可能と説明されています。Runwayには無料プランもありますが、Seedance 2.0の利用は有料プラン対象として扱うのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://runwayml.com/\n\n【Factory】【Droid】GLM-5.1対応でモデル選択肢を拡大(04/10)\n\nFactoryのDroidでGLM-5.1が使えるようになりました。\n\n高性能・低コスト、長時間セッションでの安定性が訴求されています。\n\n複雑なMCPツール利用にも強いと説明されています。\n\n▶️ ポイント:\n\nコーディングエージェントで使えるモデルが増えると、精度・速度・コストを用途別に調整しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2042399866006192484\n・補足・関連情報: https://x.com/FactoryAI/status/2042399878148735249\n・公式料金ページ: https://factory.ai/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Factoryは有料プラン中心のサービスです。Droidやモデル利用条件はプランごとに異なるため、公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/\n\n【WaveSpeedAI / YouWareAI】動画・画像モデル対応とAI開発体験を連続更新(04/05〜04/11)\n\nWaveSpeedAIでは、Wan 2.7 Video、LipSync-3、Kling Advanced Elements、Ideogram V3、JoyAI Image Edit、Vidu Q3 Reference-to-Videoなどの対応が紹介されました。\n\nAI Generatorとして、画像・動画・音声・アバター・3Dをワンプレイスで扱えることも訴求されています。\n\nYouWareAIでは、Credit Care、ビデオ理解、Auto-Fix Mode、モバイルアプリ、オープンリミックス機能が紹介されました。\n\n▶️ ポイント:\n\n生成AIサービスは、単一モデルの性能だけでなく「複数モデルを束ねる制作環境」「失敗を補償する仕組み」「自動修正」まで競争軸が広がっています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・WaveSpeedAI公式SNS: https://x.com/wavespeed_ai/status/2040457860405162391\n・WaveSpeedAI公式SNS: https://x.com/wavespeed_ai/status/2041518044879692097\n・WaveSpeedAI公式SNS: https://x.com/wavespeed_ai/status/2041818472536281558\n・YouWareAI公式SNS: https://x.com/YouWareAI/status/2041212376758862298\n・YouWareAI公式SNS: https://x.com/YouWareAI/status/2041954843766444314\n\n💳 料金・プラン:\n\n・WaveSpeedAI料金ページ: https://wavespeed.ai/pricing\n・YouWareAI公式サイト: https://www.youware.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ WaveSpeedAIは無料クレジットあり、YouWareAIはアプリ内条件に従う形\n・補足:WaveSpeedAIは新規ユーザー向け無料クレジットを案内しています。YouWareAIの各機能提供条件は、公式サイトまたはアプリ内表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・WaveSpeedAI: https://wavespeed.ai/\n・YouWareAI: https://www.youware.com/\n\n⚙️ プロダクト更新\n【Qwen】【Qwen Code v0.14系】リモート操作・Cron Jobs・Qwen3.6-Plus統合を追加(04/10)\n\nQwen Code v0.14.0〜v0.14.2のリリース内容が紹介されました。\n\nTelegram/DingTalk/WeChatからのリモート操作、定期AIタスク、Qwen3.6-Plus統合が追加されています。\n\nサブエージェント別モデル割り当て、/planモード、Follow-up提案、Adaptive Output Tokensなども含まれます。\n\n▶️ ポイント:\n\nコーディングAIが、チャット操作・定期実行・複数エージェント管理まで含む開発支援基盤へ進化しています。\nCron Jobsは「決まった時間に自動実行する仕組み」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Alibaba_Qwen/status/2042551216769765449\n・補足・関連情報: https://x.com/Alibaba_Qwen/status/2042551220423004193\n・補足・関連情報: https://x.com/Alibaba_Qwen/status/2042551230023762081\n・GitHub: https://github.com/QwenLM/qwen-code\n\n💳 料金・プラン:\n\n・GitHub: https://github.com/QwenLM/qwen-code\n・OpenRouter Qwen3.6-Plus: https://openrouter.ai/qwen/qwen3.6-plus\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ Qwen Code本体は無料利用可能\n・補足:Qwen CodeはOSSとして利用できます。ただし、Qwen3.6-Plusなど外部モデル/APIを使う場合は、API料金や各プロバイダーの無料枠が別途関係します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・GitHub: https://github.com/QwenLM/qwen-code\n\n【Claude】【Cowork】全有料プランでGA、Enterprise管理機能も追加(04/10)\n\nClaude Coworkが全有料プランで一般提供開始されました。\n\nEnterprise向けに、役割ベースのアクセス制御、グループ支出制限、使用状況アナリティクス、拡張OpenTelemetryが追加されています。\n\nmacOSおよびWindowsで利用可能と案内されています。\n\n▶️ ポイント:\n\n個人利用だけでなく、企業が管理しながらAIエージェントを組織展開しやすくなるアップデートです。\nOpenTelemetryは、初心者向けに言うと「AIがどのように動いたかを追跡するための仕組み」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/claudeai/status/2042273755485888810\n・補足・関連情報: https://x.com/claudeai/status/2042273756983226661\n・ダウンロード導線: https://x.com/claudeai/status/2042273758208020610\n・公式ブログ: https://claude.com/blog/cowork-for-enterprise\n\n💳 料金・プラン:\n\n・Claude料金ページ: https://claude.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プランのみ\n・補足:Claude Coworkは全有料プランで一般提供と案内されています。無料プランで使う機能ではなく、有料ユーザー向けの業務支援機能として見るのがよさそうです。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://claude.ai/\n・デスクトップ: https://claude.ai/download\n\n【Firecrawl】【v2.9.0】Web操作・PDF処理・SDKを強化(04/08〜04/11)\n\nFirecrawl v2.9.0が紹介されました。\n\n/interactにより、スクレイプ後にクリック・タイピング・ナビゲーションなどのブラウザ操作が可能になります。\n\nPDFハンドリング強化、新スクレイプ形式、Java SDK、OpenCodeプラグイン、新SDKなども含まれます。\n\n▶️ ポイント:\n\nWeb情報を読むだけでなく、AIエージェントがページ上で操作するための基盤が強化されています。\nつまり、AIが「Webページを見る」だけでなく「ボタンを押す」「入力する」方向に近づいています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/firecrawl/status/2041546687152624049\n・公式SNS: https://x.com/firecrawl/status/2042643323345866856\n・GitHub Releases: https://github.com/firecrawl/firecrawl/releases\n・公式料金ページ: https://www.firecrawl.dev/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.firecrawl.dev/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:Firecrawlには無料プランがあり、公式料金ページでは無料クレジット枠が案内されています。大量利用や高レート利用は有料プランが必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ/API: https://www.firecrawl.dev/\n・GitHub: https://github.com/firecrawl/firecrawl\n\n【OpenClaw / Clawi】2026.4.x週次アップデートでDreaming・Gemma 4・Codexハーネス等を追加(04/06〜04/11)\n\nOpenClaw 2026.4.5では、動画・音楽生成、/dreaming、GPT-5.4移行などが告知されました。\n\n2026.4.7では、推論機能、音楽/動画編集、セッション分岐、Gemma 4対応、memory-wikiが紹介されています。\n\n2026.4.9/4.10では、Dreaming改善、SSRF強化、Android連携、アクティブメモリ、MLXトークモード、Codexハーネスプラグインなどが追加されています。\n\nClawi側からも、OpenClaw更新・リリースノート導線が共有されました。\n\n▶️ ポイント:\n\nOpenClawは、記憶・推論・メディア生成・ローカル実行・安全性をまとめて改善しており、エージェント基盤としての完成度を上げています。\nSSRFはWebサービスの安全性に関わる対策で、初心者の方は「セキュリティ改善の一種」と見ておけば大丈夫です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/openclaw/status/2040998570317197607\n・公式SNS: https://x.com/openclaw/status/2041714270212108657\n・公式SNS: https://x.com/openclaw/status/2042072722902077938\n・公式SNS: https://x.com/openclaw/status/2042811598058742012\n・補足・関連情報: https://x.com/ClawiAi/status/2041802797117579511\n\n💳 料金・プラン:\n\n・OpenClaw料金ページ: https://www.getopenclaw.ai/pricing\n・Clawi公式サイト: https://clawi.ai/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ セルフホスト版は無料、Cloud/Clawiは有料中心\n・補足:OpenClawのセルフホスト版は無料で利用できます。OpenClaw CloudやClawiは有料プランが中心です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・OpenClaw: https://www.getopenclaw.ai/\n・Clawi: https://clawi.ai/\n\n【Genspark】【Plus/Pro】5時間ごとのセッション制限を導入(04/09)\n\nGenspark AI ChatとAI Image Agentsの需要増加に伴い、Plus/Proプランに5時間ごとのセッション制限が導入されました。\n\nウィンドウリセット後は利用枠が全回復すると説明されています。\n\n無制限アクセス自体は変わらないと補足されています。\n\n▶️ ポイント:\n\n人気AIサービスでは、需要増加に応じて「無制限」の中身が利用ウィンドウ制に変わるケースが増えています。\n使い放題に見えるプランでも、実際には時間帯ごとの上限がある場合があります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/genspark_japan/status/2042191622520390093\n・ヘルプセンター: https://www.genspark.ai/helpcenter?doc=general_Membership_Plans\n\n💳 料金・プラン:\n\n・Gensparkヘルプセンター: https://www.genspark.ai/helpcenter?doc=general_Membership_Plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン対象\n・補足:今回の制限導入はPlus/Proプランが対象です。無料プランの利用枠は、公式ヘルプセンターやアプリ内表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.genspark.ai/\n\n【Firebase】AI Studio連携・ハイブリッドAI推論などRelease Notesを公開(04/08)\n\nFirebase Release Notes動画で複数の更新が紹介されました。\n\nFirebase in AI Studio、AndroidのハイブリッドAI推論、Firestore Enterpriseネイティブモードが含まれます。\n\nFirebase Data Connect無料トライアル、App Hosting環境変数、Firebase Studio提供終了告知も含まれます。\n\n▶️ ポイント:\n\nFirebaseがAI開発・アプリホスティング・データ接続の周辺機能をまとめて更新しており、AIアプリ開発者に影響があります。\n初心者向けに言うと、「AIアプリを作るための裏側の仕組み」が強化されています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Firebase/status/2041609463350669334\n・公式Release Notes: https://firebase.google.com/support/releases\n・Firebase料金ページ: https://firebase.google.com/pricing\n\n💳 料金・プラン:\n\n・Firebase料金ページ: https://firebase.google.com/pricing\n・Firebase料金プラン説明: https://firebase.google.com/docs/projects/billing/firebase-pricing-plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料Sparkプランあり\n・補足:Firebaseには無料のSparkプランと従量課金のBlazeプランがあります。AI Studio連携、Data Connect、Firestore Enterpriseなどは機能ごとに無料枠や課金条件が異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Firebase: https://firebase.google.com/\n\n【Firebase Studio】移行ガイドを公開、Google AI Studio/Antigravityを移行先に提示(04/11)\n\nFirebase Studioプロジェクト移行ガイドが紹介されました。\n\nブラウザベースのvibe codingが好きだったユーザーには、Google AI Studioへの移行を推奨しています。\n\nIDE機能やエージェント体験、ターミナルが重要だったユーザーには、Antigravityへの移行を推奨しています。\n\n▶️ ポイント:\n\nFirebase Studio終了・移行の影響を受けるユーザーにとって、作業スタイル別に移行先が示された重要な案内です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Firebase/status/2042626157346992562\n・補足・関連情報: https://x.com/Firebase/status/2042626161604223230\n・補足・関連情報: https://x.com/Firebase/status/2042648134677852593\n・移行ガイド: https://firebase.google.com/docs/studio/migrating-project\n\n💳 料金・プラン:\n\n・Firebase料金ページ: https://firebase.google.com/pricing\n・Google AI Studio: https://aistudio.google.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 移行先サービスごとに異なる\n・補足:Firebase Studioからの移行案内です。Google AI Studio、Antigravity、Firebaseの各機能は、それぞれ無料枠・有料枠・提供条件が異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・移行ガイド: https://firebase.google.com/docs/studio/migrating-project\n・Google AI Studio: https://aistudio.google.com/\n\n【Google】【Veo 3.1 Fast】価格引き下げを告知(04/08)\n\nVeo 3.1 Fastの価格引き下げが告知されました。\n\n動画生成モデルの利用コストに関わる更新です。\n\n詳細な新価格や対象APIは、公式料金情報の確認が必要です。\n\n▶️ ポイント:\n\n動画生成の単価が下がると、試作だけでなく、継続的な広告・SNS動画制作にも使いやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googleaidevs/status/2041564835662475441\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n・Google AI Studioモデルページ: https://aistudio.google.com/models/veo-3\n\n💳 料金・プラン:\n\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ API/有料利用中心\n・補足:Veo 3.1 Fastは動画生成APIの価格改定に関する発表です。無料枠や試用可否は、Google AI StudioおよびGemini APIの料金表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Google AI Studio: https://aistudio.google.com/\n\n【Google Maps Platform】クレジットカード不要のMaps Demo Keyを提供(04/10)\n\nGoogle Maps Platformで、クレジットカード不要のMaps Demo Keyが紹介されました。\n\nプロトタイプ作成、コード調整、アイデア検証に使えると説明されています。\n\n開発開始までの心理的ハードルを下げる更新です。\n\n▶️ ポイント:\n\n決済情報なしで地図APIの試作を始められるため、個人開発者や学習者が試しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GMapsPlatform/status/2042296634864746939\n・Maps Demo Key: https://mapsplatform.google.com/maps-demo-key/\n・Google Maps Platform料金: https://mapsplatform.google.com/pricing/\n\n💳 料金・プラン:\n\n・Maps Demo Key: https://mapsplatform.google.com/maps-demo-key/\n・Google Maps Platform料金: https://mapsplatform.google.com/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で試用可能\n・補足:Maps Demo Keyはクレジットカード不要で試せるプロトタイプ向けキーです。本番利用や利用制限、対応APIは公式ページの条件に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Maps Demo Key: https://mapsplatform.google.com/maps-demo-key/\n\n【Google Workspace】Gmail/Calendar/Meet、スケジュール調整・タイムゾーン・CarPlay対応を更新(04/09〜04/11)\n\nGoogle Workspace関連の複数アップデートが、公式SNSで改めて紹介されました。\n\nGmailの「スケジュールをお手伝い」機能は、公式アップデート上ではグループスケジューリング対応として案内されています。\n\nGoogle Calendarでは、都市名入力でタイムゾーン設定が可能になった更新が紹介されています。\n\nGoogle MeetはApple CarPlayに対応し、車内から音声のみで会議参加できるようになりました。\n\nなお、これらは公式SNS投稿日とWorkspace Updates上の掲載日が異なる場合があります。\n\n▶️ ポイント:\n\n日程調整・時差対応・移動中の会議参加など、日常業務の小さな面倒を減らすアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2042226775212589427\n・公式SNS: https://x.com/GoogleWorkspace/status/2042317372170596630\n・公式SNS: https://x.com/GoogleWorkspace/status/2042656865356525855\n・Workspace Updates: https://workspaceupdates.googleblog.com/\n\n💳 料金・プラン:\n\n・Google Workspace料金ページ: https://workspace.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 機能ごとに対象プランが異なる\n・補足:Google Workspaceの各機能は、個人向けGoogleアカウント、Workspaceエディション、Geminiアドオンの有無で提供条件が変わります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gmail: https://mail.google.com/\n・Google Calendar: https://calendar.google.com/\n・Google Meet: https://meet.google.com/\n\n【NotebookLM】オーディオ概要プレーヤーにスキップ/速度ボタンを追加(04/10)\n\nNotebookLMのオーディオ概要Webプレーヤーに、新しい操作ボタンが追加されました。\n\nスキップや速度コントロールがしやすくなったと説明されています。\n\nユーザーからのフィードバックも継続して募集されています。\n\n▶️ ポイント:\n\n長い音声要約を聞くときに、必要な部分へ移動しやすくなり、学習・調査用途で使いやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/NotebookLM/status/2042300158290055189\n・NotebookLMプラン: https://notebooklm.google/plans\n・アップグレード説明: https://support.google.com/notebooklm/answer/16213268\n\n💳 料金・プラン:\n\n・NotebookLMプラン: https://notebooklm.google/plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:NotebookLMには無料で使える範囲があります。NotebookLM Proでは上限拡大、追加機能、組織向け機能などが提供されます。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://notebooklm.google/\n\n【Stitch by Google】ローンチ後の主要バグ修正を公開(04/10)\n\nStitch by Googleが、ローンチ後に修正した主要バグを公開しました。\n\nデザインシステムの尊重、DESIGN.md同期、キャンバスレイアウト改善、直接編集の滑らか化が含まれます。\n\nプロジェクト命名バグ修正やUI洗練も紹介されています。\n\n▶️ ポイント:\n\nデザイン生成AIは、生成品質だけでなく「既存のデザインルールを守れるか」が実務利用の鍵になります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/stitchbygoogle/status/2042283938203517188\n・公式サイト: https://stitch.withgoogle.com/\n・料金ページ: https://stitch.withgoogle.com/pricing\n\n💳 料金・プラン:\n\n・Stitch料金ページ: https://stitch.withgoogle.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 利用可能だが、提供条件・上限・料金は公式表示に従う\n・補足:Stitchは公式サイト上で利用可能です。ただし、提供地域、利用上限、将来的な料金変更は公式ページの表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://stitch.withgoogle.com/\n\n【LangChain】【LangSmith】コストアラートとClaude Agent SDKトレーシングを強化(04/07〜04/10)\n\nLangSmithにコストアラート機能が導入されました。\n\nエージェントが予算を超えた際に通知を受け取れるようになります。\n\nClaude Agent SDKトレーシングも強化され、サブエージェントやMCPツール内の子ラン、コスト追跡が可能になりました。\n\n▶️ ポイント:\n\n本番エージェント運用では、動いたかどうかだけでなく「いくら使ったか」「どこで失敗したか」を追えることが重要です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041236011439771648\n・公式SNS: https://x.com/LangChain/status/2042282725084971380\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n💳 料金・プラン:\n\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料枠あり、機能ごとに対象プラン確認が必要\n・補足:LangSmithにはDeveloper向け無料枠があります。コストアラートや本番向け監視機能の対象プランは公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・LangSmith: https://smith.langchain.com/\n\n【LangChain】【LangSmith Deployments / Deep Agents Deploy】A2A・MCP・Agent Protocol対応を拡充(04/09〜04/10)\n\nLangSmith Deploymentsで、A2Aプロトコル対応のエージェントデプロイが紹介されました。\n\nDeep Agents Deployベータ版も発表され、オープンソースエージェントハーネスを本番環境へ素早くデプロイできると説明されています。\n\nMCP、A2A、Agent Protocolでエージェントを公開でき、短期・長期メモリも扱えるとされています。\n\n▶️ ポイント:\n\nエージェントを実験から本番運用へ移すための「配備・接続・記憶」の土台が整いつつあります。\nA2Aは「AIエージェント同士をつなぐ仕組み」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041908977642967322\n・公式SNS: https://x.com/LangChain/status/2042268554364592543\n・補足・関連情報: https://x.com/LangChain/status/2042268562908426584\n・公式ブログ: https://www.langchain.com/blog/deep-agents-deploy-an-open-alternative-to-claude-managed-agents\n\n💳 料金・プラン:\n\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 開発用無料枠あり、本番デプロイは有料条件あり\n・補足:LangSmithには無料のDeveloper枠がありますが、Deploymentsや本番運用はデプロイ実行・稼働時間などの課金が関係します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・LangSmith: https://smith.langchain.com/\n\n【MagicPath】モバイル共有時に公開ファイル内プロトタイプ一覧表示へ対応(04/07)\n\nMagicPathで、公開ファイルをモバイル共有した際の表示機能が更新されました。\n\nファイル内の全プロトタイプを、リスト形式またはフィード形式で一覧表示できるようになったと説明されています。\n\nプロトタイプ共有時の閲覧体験を改善する機能です。\n\n▶️ ポイント:\n\nモバイルからでも複数プロトタイプを見つけやすくなり、レビューや共有がスムーズになります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/MagicPathAI/status/2041529502061232400\n・料金/プラン: https://www.magicpath.ai/documentation/help/plans\n\n💳 料金・プラン:\n\n・料金/プラン: https://www.magicpath.ai/documentation/help/plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料枠の有無・共有機能の条件はプランに依存\n・補足:MagicPathの公開共有機能、プロトタイプ数、クレジット、チーム利用などはプランごとに制限される可能性があります。利用前に公式プラン表示を見るのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.magicpath.ai/\n\n【OpenClaw】AnthropicのClaudeサブスク適用停止を報告(04/06)\n\nOpenClawが、AnthropicがサードパーティハーネスへのClaudeサブスクリプション適用を停止したと報告しました。\n\nAPIキーや代替LLMへの移行が案内されています。\n\nサードパーティツール経由でClaudeを使っていたユーザーには影響がある可能性があります。\n\n▶️ ポイント:\n\nAIツールの利用条件は突然変わることがあるため、APIキー運用や代替モデルの準備が重要です。\n初心者の方は「外部ツール経由でAIを使う場合、契約条件が変わることもある」と覚えておくとよさそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/openclaw/status/2041002065174888578\n・OpenClaw料金ページ: https://www.getopenclaw.ai/pricing\n・関連報道: https://www.theverge.com/ai-artificial-intelligence/907074/anthropic-openclaw-claude-subscription-ban\n\n💳 料金・プラン:\n\n・OpenClaw料金ページ: https://www.getopenclaw.ai/pricing\n・Anthropic API料金: https://www.anthropic.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ OpenClaw自体はセルフホスト無料、Claude利用はAPI課金が必要になる可能性\n・補足:OpenClawのセルフホスト版は無料ですが、Claudeを使う場合はClaudeサブスクではなくAPIキーや従量課金が必要になる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・OpenClaw: https://www.getopenclaw.ai/\n\n【OpenAI】【Codex】ChatGPTプランとCodex利用量を更新(04/10)\n\nOpenAIが、ChatGPT Pro/PlusのCodex利用拡充に向けたサブスクリプション更新を発表しました。\n\n月額$100のProティア導入、Plusの5倍のCodex利用量が紹介されています。\n\n既存$200 Pro tierは最高利用量オプションとして継続し、5月31日までCodexプロモーションも延長されると説明されています。\n\n▶️ ポイント:\n\nCodexをたくさん使う開発者向けに、利用量別のプラン設計が細かくなっています。\nただし、Codex自体は無料プランでも制限付きで試せるため、「本格利用するなら有料プラン」という見方が近いです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAI/status/2042295688323875316\n・補足・関連情報: https://x.com/OpenAI/status/2042295690382995789\n・補足・関連情報: https://x.com/OpenAI/status/2042296046009626989\n・Codex料金: https://developers.openai.com/codex/pricing\n\n💳 料金・プラン:\n\n・ChatGPT料金ページ: https://openai.com/chatgpt/pricing/\n・Codex料金: https://developers.openai.com/codex/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランでも制限付きで利用可能。利用量拡大はPlus/Pro中心\n・補足:CodexはChatGPT無料版でも制限付きで試せます。ただし、長時間の開発作業や高頻度利用では、Plus/Proなどの有料プランで利用量が拡大します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・ChatGPT: https://chatgpt.com/\n・Codex: https://developers.openai.com/codex/\n\n【OpenAI Devs】【Codex】旧モデル廃止と新対応モデルを告知(04/08)\n\n4月14日以降、ChatGPTアカウントでCodexにサインインする際、古いCodexモデルが廃止されると告知されました。\n\ngpt-5.2-codex、gpt-5.1-codex-mini、gpt-5.1、gpt-5などが対象として挙げられています。\n\n以降はgpt-5.4、gpt-5.4-mini、gpt-5.3-codexなどがサポートされると案内されています。\n\n▶️ ポイント:\n\n開発ワークフローで固定モデルを使っている場合、モデル廃止により設定変更や検証が必要になる可能性があります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAIDevs/status/2041610989607727164\n・補足・関連情報: https://x.com/OpenAIDevs/status/2041611001410593163\n・Codex Changelog: https://developers.openai.com/codex/changelog\n\n💳 料金・プラン:\n\n・Codex料金: https://developers.openai.com/codex/pricing\n・ChatGPT料金ページ: https://openai.com/chatgpt/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランでも制限付きで利用可能。利用量はプランにより異なる\n・補足:この話題は「無料か有料か」よりも、古いモデルから新しい対応モデルへ移行する話です。Codex自体は無料プランでも試せますが、利用量や使えるモデルはプランによって変わります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Codex: https://developers.openai.com/codex/\n\n【Factory】【Fast Mode】/fastコマンドで高速モードを提供(04/07)\n\nFactoryが、`/fast` コマンドでFast Modeを有効化できる機能を紹介しました。\n\nOpus 4.6、GPT-5.4、GPT-5.3-Codexに対応するとされています。\n\nスピードとインテリジェンスを両立することを訴求しています。\n\n▶️ ポイント:\n\nコーディングエージェントで「速く返してほしい作業」と「深く考えてほしい作業」を切り替えやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2041211942602522692\n・公式料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Factoryは有料プラン中心のサービスです。Fast Modeの対象プラン、対象モデル、利用量制限は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/\n\n🆕 新登場\n【Abacus AI】【Deep Agent】英語からフルスタック/モバイルアプリをVibe Coding(04/09)\n\nAbacus AI Deep Agentで、英語の指示からフルスタック・モバイルアプリを作れると紹介されました。\n\n大規模システムの本番運用までAIが担うことを訴求しています。\n\nコーディングだけでなく、実運用まで見据えたAIエージェント活用の投稿です。\n\n▶️ ポイント:\n\n「コードを書くAI」から「アプリを作って運用まで支援するAI」へ、役割が広がっていることが分かります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/abacusai/status/2042089325278720241\n・Deep Agent FAQ: https://deepagent.abacus.ai/deepagent_faq\n\n💳 料金・プラン:\n\n・Deep Agent FAQ: https://deepagent.abacus.ai/deepagent_faq\n・Abacus AI料金: https://abacus.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料利用中心\n・補足:Deep Agentは月額料金が案内されている有料サービスです。無料トライアルやキャンペーンは時期によって変わるため、最新の公式表示を見るのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Deep Agent: https://deepagent.abacus.ai/\n・Abacus AI: https://abacus.ai/\n\n【Adobe】【Firefly】Generate SpeechとPrecision Flow/AI Markupで制作精度を強化(04/07〜04/10)\n\nGenerate Speechでは、70種類以上の高品質音声から選び、テキスト入力、声・アクセント選択、トーン調整、プレビュー、エクスポートが可能と紹介されています。\n\nPrecision Flowでは、1つのプロンプトから複数バリエーションを生成できます。\n\nAI Markupでは、画像に注釈を入れて修正箇所を精密に指定できます。\n\n▶️ ポイント:\n\nFireflyは、ただ生成するだけでなく「狙った表現に近づける編集機能」を強化しています。\n画像や音声を仕事で使う人にとって、修正指示を出しやすくなるのは大きなポイントです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/AdobeFirefly/status/2041530482278473731\n・補足・関連情報: https://x.com/AdobeFirefly/status/2041530485831008518\n・公式SNS: https://x.com/AdobeFirefly/status/2042276974173790462\n・Fireflyプラン: https://www.adobe.com/jp/products/firefly/plans.html\n\n💳 料金・プラン:\n\n・Fireflyプラン: https://www.adobe.com/jp/products/firefly/plans.html\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Firefly無料枠あり。ただし新機能は生成クレジット/対象プラン確認が必要\n・補足:Adobe Fireflyには無料枠があります。ただし、Generate Speech、動画・音声系機能、高度な生成機能は生成クレジットや対象プランの制限を受ける場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://firefly.adobe.com/\n\n【Claude】【Managed Agents】大規模エージェントの構築・デプロイ基盤を発表(04/09)\n\nClaude Managed Agentsがパブリックベータとして発表されました。\n\nエージェントのタスク、ツール、ガードレールを定義するだけで、本番運用に近い形で動かせると説明されています。\n\nNotion、Asana、楽天、Sentry、Vibecodeなどの活用事例も紹介されています。\n\nAnthropicのEngineering Blogでは、長時間稼働エージェント向け設計思想も解説されています。\n\n▶️ ポイント:\n\nAIエージェントを試作品で終わらせず、企業で安定運用するためのインフラ化が進んでいます。\nガードレールは「AIがやってよいこと・やってはいけないことのルール」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/claudeai/status/2041927687460024721\n・公式ブログ導線: https://x.com/AnthropicAI/status/2041929199976640948\n・補足・関連情報: https://x.com/claudeai/status/2041927700063883281\n・公式ブログ: https://claude.com/blog/claude-managed-agents\n\n💳 料金・プラン:\n\n・Anthropic料金ページ: https://www.anthropic.com/pricing\n・Claude料金ページ: https://claude.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料/API利用中心\n・補足:Claude Managed AgentsはClaude Platform上のベータ機能として案内されています。利用にはAPI利用料や対象アカウント条件が関係します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Claude: https://claude.ai/\n・Anthropic Console: https://console.anthropic.com/\n\n【Claude】【Claude for Word】Wordサイドバーで下書き・編集・変更履歴付きリバイスに対応(04/11)\n\nClaude for Wordベータ版が発表されました。\n\nWordのサイドバーからClaudeで文書の下書き、編集、リバイスができます。\n\n書式を保持したまま、編集内容を変更履歴として確認できると説明されています。\n\nClaude for Excel/PowerPointともコンテキストを共有できます。\n\n対象はClaudeの一部有料プラン向けベータとして案内されています。\n\n▶️ ポイント:\n\nWord文書の作成・修正をAIと一緒に進めやすくなり、Office横断の作業にもつながります。\n文章チェック、要約、提案文作成など、初心者でも使い道をイメージしやすい機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/claudeai/status/2042670341915295865\n・補足・関連情報: https://x.com/claudeai/status/2042670343173574705\n・公式ページ: https://claude.com/claude-for-word\n・公式ヘルプ: https://support.claude.com/en/articles/14465370-use-claude-for-word\n・Claude料金ページ: https://claude.com/pricing\n\n💳 料金・プラン:\n\n・Claude料金ページ: https://claude.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン向けベータ\n・補足:Claude for Wordは有料プラン向けのベータ機能として案内されています。無料ユーザー向けの一般機能ではない点に注意です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Claude: https://claude.ai/\n・Claude for Word: https://claude.com/claude-for-word\n\n【Browser Use】【Skills】Webエージェントが失敗を記憶・学習する機能を公開(04/07)\n\nBrowser Useが、自己進化するWebエージェントを構築したと発表しました。\n\nエージェントがウェブ操作のミスを記憶・学習する「スキル」機能が紹介されています。\n\n別投稿では、この機能がライブ公開されたことも告知されています。\n\n▶️ ポイント:\n\n同じ失敗を繰り返さないWebエージェントに近づくことで、ブラウザ操作の自動化がより実用的になります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/browser_use/status/2041339523016368423\n・公式SNS: https://x.com/browser_use/status/2041375061408632986\n・補足・関連情報: https://x.com/browser_use/status/2041375063820378585\n・公式料金ページ: https://browser-use.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://browser-use.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可能、利用量に応じて課金\n・補足:Browser Useは無料で開始できますが、Cloud Browser、Skills、Browser Minutesなどは利用量やプランに応じて制限・課金が発生します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://browser-use.com/\n\n【Browser Use】【Cloud】Hermes/Claude Code連携と無料クラウドブラウザを拡充(04/09〜04/11)\n\nNousResearchのHermes Agentユーザー向けに、無料クラウドブラウザを提供すると発表されました。\n\n無制限のブラウザ時間、無料プロキシ、永続的な認証が利用可能と説明されています。\n\nClaude CodeとBrowser Useの連携も紹介され、設定ドキュメントへのリンクが共有されています。\n\n▶️ ポイント:\n\nAIエージェントがブラウザを使うためのクラウド環境が整うと、ローカル設定なしでWeb自動化を始めやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/browser_use/status/2042077879186698386\n・補足・関連情報: https://x.com/browser_use/status/2042077880864403872\n・公式SNS: https://x.com/browser_use/status/2042788896476664310\n・公式料金ページ: https://browser-use.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://browser-use.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料提供の案内あり、対象条件あり\n・補足:投稿では無料クラウドブラウザ提供が案内されています。ただし、対象ユーザー、無料範囲、商用利用、長期利用条件は公式料金ページと関連ドキュメントに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://browser-use.com/\n\n【Pollo AI】【Video Reframe】SNS向け動画リサイズを自動化(04/11)\n\nPollo AIでVideo Reframe機能が提供開始されました。\n\n動画をアップロードし、比率を選ぶだけでAIが背景を補完します。\n\nTikTok、X、YouTubeなど、各プラットフォーム向けに自動リサイズできます。\n\n▶️ ポイント:\n\n1本の動画を複数SNS向けに作り直す手間を減らせる、実務向けの編集機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/itsPolloAI/status/2042978769686925676\n・公式サイト: https://pollo.ai/\n・公式料金ページ: https://pollo.ai/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://pollo.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可、Video Reframeはクレジット/出力制限あり\n・補足:Pollo AIは無料で始められます。ただし、Video Reframeの利用回数、出力品質、透かし、クレジット消費はプランによって変わる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://pollo.ai/\n\n【Felo】【Note記事自動生成】文章生成からアイキャッチ画像まで一貫作成(04/08)\n\nFeloのNote記事自動生成機能が紹介されました。\n\n「ソーシャルメディア」から「Note記事」を選び、内容を入力するだけで、文章生成とアイキャッチ画像作成まで行えると説明されています。\n\nスタイル選択や、URLから書き方を再現する機能も紹介されています。\n\n▶️ ポイント:\n\nSNS投稿や素材から記事化までをAIが支援するため、発信作業のハードルを下げられます。\nnoteを書く人にとっては、下書き作成やアイデア出しに使いやすい機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/felo_ai/status/2041803245174321640\n・Felo公式サイト: https://felo.ai/\n・Felo料金関連: https://felo.ai/ja/blog/felo-search-pro-vs-free-plan-differences/\n\n💳 料金・プラン:\n\n・Felo公式サイト: https://felo.ai/\n・Free/Pro比較: https://felo.ai/ja/blog/felo-search-pro-vs-free-plan-differences/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:Feloには無料プランとProプランがあります。Note記事自動生成、画像生成、URL参照などの利用回数・対象機能は公式サイトやアプリ内表示で確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://felo.ai/\n\n【Figma】【Figma Make】30種類以上のファイル添付に対応(04/08)\n\nFigma Makeで、ドキュメント、データ、メディア、コードなど、複数種類のファイルを直接添付できるようになったと紹介されました。\n\n公式SNSでは、30種類以上のファイル形式に対応すると案内されています。\n\nプレースホルダーではなく、実際の入力データを使ってデザインできることを訴求しています。\n\n▶️ ポイント:\n\n実データを使ってAIデザインを作れるため、より現実に近いプロトタイプ制作がしやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/figma/status/2041616983095947607\n・補足・関連情報: https://x.com/figma/status/2041617150394175704\n・公式料金ページ: https://www.figma.com/pricing/\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.figma.com/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Figma無料プランあり、Figma Make/AI機能は対象プラン確認が必要\n・補足:FigmaにはStarter無料プランがあります。ただし、Figma MakeやAI関連機能はAI creditsや対象プランの制限を受ける場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.figma.com/\n\n【Figma】デザインキャンバス上のビデオ再生機能を展開(04/09)\n\nFigmaのデザインキャンバス上で、ビデオ再生機能が展開予定と発表されました。\n\nデザイナーが作業中に集中を保ちやすくする機能として紹介されています。\n\nメディアを含むデザインワークフローの改善につながります。\n\n▶️ ポイント:\n\n動画素材を別ツールで確認せず、Figma上で扱いやすくなるため、レビューや制作効率が上がります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/figma/status/2041920857002668136\n・公式料金ページ: https://www.figma.com/pricing/\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.figma.com/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Figma無料プランあり、展開対象はプラン・提供状況による\n・補足:Figmaには無料プランがあります。デザインキャンバス上のビデオ再生機能は、展開状況によって利用できるユーザーが変わる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.figma.com/\n\n【Clawi】SOUL.md編集とレシート自動記録でエージェント運用を強化(04/07〜04/08)\n\nClawiダッシュボードから、エージェントのSOUL.mdを直接編集できる新機能が紹介されました。\n\nレシートを撮影または送信するだけで詳細を自動記録し、スプレッドシートのエントリーに変換する機能も紹介されています。\n\nエージェントの人格設定と実務処理の両面を強化する内容です。\n\n▶️ ポイント:\n\nAIエージェントを「設定できる存在」「日常作業を処理する存在」として使いやすくする更新です。\nレシート記録のような細かい作業を任せられると、実務での利用イメージがかなり分かりやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/ClawiAi/status/2041212542786441609\n・公式SNS: https://x.com/ClawiAi/status/2041544669440458938\n・公式サイト: https://clawi.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://clawi.ai/\n・補足:公式サイトではBasic、Pro、Ultraの有料プランが掲載されています。\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:SOUL.md編集やレシート自動記録の利用条件は、Clawiの対象プランやエージェントリソースに紐づく可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・公式サイト: https://clawi.ai/\n\n【Genspark】【AI Workspace 4.0】Desktop・Office・Workflowsを発表(04/08)\n\nGenspark AI Workspace 4.0が正式発表されました。\n\nGenspark Claw for Desktop、Microsoft Office統合、Speaklyリアルタイム翻訳/AI議事録、Advanced Workflowsが紹介されています。\n\nOffice統合では、PowerPoint、Excel、Word内でAIエージェントが作業できると説明されています。\n\n▶️ ポイント:\n\nAIがWebアプリ内だけでなく、デスクトップやOfficeアプリの中まで入り、普段の作業環境で動く方向へ進んでいます。\n資料作成や議事録など、初心者にも使い道をイメージしやすいアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/genspark_japan/status/2041830878247297103\n・補足・関連情報: https://x.com/genspark_japan/status/2041831977024942484\n・インストール導線: https://x.com/genspark_japan/status/2041831979411501241\n・公式ブログ: https://www.genspark.ai/blog/genspark-ai-workspace-4\n\n💳 料金・プラン:\n\n・Gensparkヘルプセンター: https://www.genspark.ai/helpcenter?doc=general_Membership_Plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可能、主要機能は対象プラン確認が必要\n・補足:Gensparkは無料で試せる導線があります。ただし、Desktop、Office統合、Advanced Workflowsなどの提供範囲はプランごとに異なる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.genspark.ai/\n\n【Gemini】【Notebooks / NotebookLM】GeminiとNotebookLMの統合を展開(04/09〜04/10)\n\nGeminiにノートブック機能が導入されました。\n\n複数プロジェクトの整理、過去チャットやファイルのソース追加が可能と紹介されています。\n\nGemini AppからNotebookLMの個人ノートブックへアクセスでき、Geminiチャットをソースとして利用できる統合も発表されています。\n\nWebのGoogle AI Ultra/Pro/Plusユーザーから先行展開されています。\n\n▶️ ポイント:\n\nチャットAIとノート整理AIがつながることで、調べた内容をプロジェクト単位で蓄積・再利用しやすくなります。\n調査メモ、記事ネタ、学習ノートをまとめたい人にはかなり便利そうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GeminiApp/status/2041983079787721013\n・補足・関連情報: https://x.com/GeminiApp/status/2041983287577735396\n・NotebookLM公式SNS: https://x.com/NotebookLM/status/2041982449387810962\n・公式ブログ: https://blog.google/innovation-and-ai/products/gemini-app/notebooks-gemini-notebooklm/\n\n💳 料金・プラン:\n\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n・NotebookLMプラン: https://notebooklm.google/plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン先行\n・補足:WebのGoogle AI Ultra/Pro/Plusユーザーから先行展開されています。無料ユーザーへの提供時期は今後の案内待ちです。また、一部のGoogle AI Ultra関連機能は地域・言語が限定される場合があるため、日本ユーザーはアプリ内表示を確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gemini: https://gemini.google.com/\n・NotebookLM: https://notebooklm.google/\n\n【Gemini】チャット内でインタラクティブ可視化を生成可能に(04/10)\n\nGeminiが、質問や複雑な概念をインタラクティブな可視化に変換できる新機能を発表しました。\n\n3Dモデル、変数調整、データ探索などに対応すると紹介されています。\n\nProモデルで「show me」「help me visualize」と入力して試す案内も投稿されています。\n\n▶️ ポイント:\n\nテキスト説明だけでは分かりにくい内容を、動かせる図やモデルとして理解しやすくする機能です。\n学習、資料作成、データ分析などで使いやすそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GeminiApp/status/2042272415951253932\n・試し方: https://x.com/GeminiApp/status/2042278665397187011\n・公式ブログ: https://blog.google/innovation-and-ai/products/gemini-app/3d-models-charts/\n\n💳 料金・プラン:\n\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n・Gemini: https://gemini.google.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 有料AIプラン中心\n・補足:インタラクティブ可視化はGoogle AI Plus/Pro/Ultraなどの有料AIプラン側で案内されています。無料プランでの提供範囲、利用回数、対象地域はGeminiアプリ内表示と公式ブログに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gemini: https://gemini.google.com/\n\n【Gemini】無料のロングトラック音楽生成を提供開始(04/10)\n\nGeminiで無料のロングトラック音楽生成が可能になったと告知されました。\n\nツールメニューから「Create music」を選び、ThinkingまたはProモデルを使うよう案内されています。\n\nGemini内で音楽生成を試せる機能です。\n\n▶️ ポイント:\n\n文章や画像だけでなく、音楽生成も主要AIアプリの中に統合され始めています。\nBGM案やSNS動画用の音楽づくりにも活用できそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GeminiApp/status/2042316630253076945\n・公式ブログ: https://blog.google/innovation-and-ai/products/gemini-app/lyria-3/\n・ヘルプ: https://support.google.com/gemini/answer/16901237\n\n💳 料金・プラン:\n\n・Gemini: https://gemini.google.com/\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:投稿では無料で利用可能と案内されています。ただし、利用回数、対象地域、対象モデル、年齢制限などは公式ヘルプに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gemini: https://gemini.google.com/\n\n【Chrome】垂直タブと没入型リーディングモードを発表(04/08)\n\nChromeに垂直タブ機能が登場すると発表されました。\n\n全画面・集中ビューの没入型リーディングモードも予告されています。\n\n詳細情報としてblog.googleの記事リンクが共有されています。\n\n▶️ ポイント:\n\nタブが多くなりがちな作業環境で、画面整理と読書集中を助けるブラウザ更新です。\nAIツールを複数開く人にも地味にうれしいアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googlechrome/status/2041574044449857602\n・公式ブログ導線: https://x.com/googlechrome/status/2041574048967115159\n・公式ブログ: https://blog.google/products-and-platforms/products/chrome/new-chrome-productivity-features/\n\n💳 料金・プラン:\n\n・Chrome公式ページ: https://www.google.com/chrome/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:Chromeブラウザの機能として提供されるため、基本的に無料で利用できます。提供時期や対象OSは公式ブログに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・デスクトップ: https://www.google.com/chrome/\n・iOSアプリDL: https://apps.apple.com/app/google-chrome/id535886823\n・AndroidアプリDL: https://play.google.com/store/apps/details?id=com.android.chrome\n\n【Google】【Gemini 3.1 Flash Live】リアルタイム会話型エージェント構築を紹介(04/08)\n\nGemini 3.1 Flash Liveを使った、リアルタイム会話型エージェントの構築方法が紹介されました。\n\n公式ブログ上の発表日は2026年3月26日で、4月8日の投稿では開発者向けの活用例として改めて紹介されています。\n\n90言語以上、自然な会話、アクセント対応、マルチモーダル入力に対応すると説明されています。\n\n開発者はGemini Live APIを通じて、音声・映像を含むリアルタイムAIアシスタントを構築できます。\n\n▶️ ポイント:\n\n音声・映像を含むリアルタイムAIアシスタントを作るための技術が、開発者向けに整備されています。\n将来的には、通話型サポート、接客、教育アプリなどにもつながりそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googledevs/status/2041682441014788186\n・公式ブログ: https://blog.google/innovation-and-ai/technology/developers-tools/build-with-gemini-3-1-flash-live/\n・モデル紹介: https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-1-flash-live/\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n💳 料金・プラン:\n\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ API無料枠あり、Live APIは条件確認が必要\n・補足:Gemini APIには無料Tierと有料Tierがあります。ただし、Gemini 3.1 Flash Liveの利用条件、レート制限、対象リージョンは公式ドキュメントに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Google AI Studio: https://aistudio.google.com/\n・Gemini API Docs: https://ai.google.dev/\n\n【Google Vids】カスタムアバター作成に対応(04/08)\n\nGoogle Vidsで、カスタムアバターを作成できる新機能が紹介されました。\n\nフォーマル・カジュアルなど、場面に合わせた装いのアバターを作成できると説明されています。\n\n`vids.new` から作成できると案内されています。\n\n▶️ ポイント:\n\n社内説明動画やプレゼン動画で、自分やブランドに合わせたアバターを使いやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2041562399300297180\n・Google Vids AI Avatars: https://workspace.google.com/products/vids/ai-avatars/\n・Google Workspace料金: https://workspace.google.com/pricing\n\n💳 料金・プラン:\n\n・Google Workspace料金: https://workspace.google.com/pricing\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Google Workspace / Google AIプランの対象条件確認が必要\n・補足:Google VidsおよびAIアバター機能は、Google WorkspaceやGoogle AIプランの対象機能として提供される場合があります。無料提供範囲、対象エディション、提供地域は公式ページの表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://vids.new\n・Google Vids: https://workspace.google.com/products/vids/\n\n【Google Workspace Studio】GeminiでクロスWorkspaceタスクを自動化(04/09)\n\nGoogle Workspace Studioが、GeminiでWorkspace横断タスクを自動化できると紹介されました。\n\nコーディング不要で、日常業務から複雑なプロセスまで自動化できると説明されています。\n\nGmail、Docs、Sheetsなどをまたぐ業務自動化に関わる更新です。\n\n▶️ ポイント:\n\n部署横断の定型作業を、コードを書かずに自動化できる方向へ進んでいます。\nたとえば、メール内容をもとに資料や表を作るような作業に近いイメージです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2041924784133468404\n・Google Workspace料金: https://workspace.google.com/pricing\n\n💳 料金・プラン:\n\n・Google Workspace料金: https://workspace.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料Workspaceプラン中心\n・補足:Google Workspace StudioはWorkspace向け機能として紹介されています。対象エディション、Geminiアドオンの必要有無、提供時期は公式情報に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Google Workspace: https://workspace.google.com/\n\n【OiiOii】マルチコマ分鏡機能でAIアニメ制作を支援(04/07)\n\nOiiOiiのマルチコマ分鏡機能が紹介されました。\n\nシーンの複雑さに応じて自動生成され、全体を俯瞰しながらピンポイント調整できると説明されています。\n\nAIアニメーション制作向けの絵コンテ支援機能です。\n\n▶️ ポイント:\n\nアニメ制作で重要な「場面の分割」と「構図調整」をAIが支援することで、制作初期の負担を減らせます。\n初心者向けに言うと、「動画の流れをコマ割りで考える作業」をAIが手伝ってくれるイメージです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OiiOii_AI/status/2041451917906444734\n・公式サイト: https://www.oiioii.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://www.oiioii.ai/\n・補足:料金や利用枠は、公式サイトまたはアプリ内表示に従う形になります。\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 公式サイト/アプリ内表示に従う形\n・補足:OiiOiiはAIアニメ・動画制作向けのプラットフォームです。無料枠や生成回数は変更される可能性があるため、利用前にアプリ内の表示を見るのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・公式サイト: https://www.oiioii.ai/\n\n【Lovable】【Academy】AIアプリ構築の学習パスとテンプレートを提供(04/10)\n\nLovable Academyが紹介されました。\n\nAIで実際のアプリを構築するためのガイドとして、テンプレート、プロンプトのコツ、学習パスを提供します。\n\nユーザーの職種や課題に合わせて、何を作るべきかのアイデア提案も紹介されています。\n\n▶️ ポイント:\n\nAIアプリ開発を始めたい人が、ゼロから迷わずテンプレートと手順を使って進められる学習基盤です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Lovable/status/2042589697809989846\n・補足・関連情報: https://x.com/Lovable/status/2042589700343398559\n・補足・関連情報: https://x.com/Lovable/status/2042589718408294741\n・料金ページ: https://lovable.dev/pricing\n\n💳 料金・プラン:\n\n・Lovable料金ページ: https://lovable.dev/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料プランあり\n・補足:Lovableには無料プランがあります。Academyの閲覧、テンプレート利用、Lovable本体でのアプリ生成は、それぞれ利用条件が異なる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://lovable.dev/\n\n【Luma】Ray3.14 EXR・Draw・Agents・Media Transformなど制作機能を拡充(04/08〜04/11)\n\nLumaが、Ray3.14、Draw、Agents、Media Transformなどの制作機能を公式SNSで継続的に紹介しました。\n\nRay3.14自体は2026年1月に発表済みのモデルですが、1080p解像度でのEXR形式エクスポートなど、映像制作向け機能として改めて活用例が紹介されています。\n\n参照画像からキャンペーン用製品写真を作る機能、画像上に直接描き込んで生成するDraw機能が紹介されています。\n\nLuma Agentsによるピッチデッキ自動生成、PDF出力・クリップ結合・透かし追加などのMedia Transformも紹介されました。\n\n▶️ ポイント:\n\nLumaは動画生成だけでなく、広告制作・資料作成・メディア変換まで含む制作ワークスペース化を進めています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LumaLabsAI/status/2041584670090121469\n・公式SNS: https://x.com/LumaLabsAI/status/2042406234494812458\n・公式SNS: https://x.com/LumaLabsAI/status/2042665027036180537\n・公式SNS: https://x.com/LumaLabsAI/status/2042706887272206605\n・Ray3.14公式ニュース: https://lumalabs.ai/news/ray3_14\n・料金ページ: https://lumalabs.ai/pricing\n\n💳 料金・プラン:\n\n・Luma料金ページ: https://lumalabs.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料トライアル/無料クレジットあり\n・補足:Lumaは無料で試せるクレジットを提供しています。Ray、Agents、Media Transformなど各機能の利用量、解像度、商用利用条件は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://lumalabs.ai/\n\n【Microsoft Copilot】【Tasks】作業代行機能のウェイトリストを案内(04/07)\n\nCopilot Tasksが紹介されました。\n\n面倒な作業を代行し、計画通りに進める手助けをする機能として説明されています。\n\n税務シーズン向けには、メールから必要書類を探し、一か所にまとめる活用例も紹介されています。\n\n▶️ ポイント:\n\nCopilotが質問に答えるだけでなく、ユーザーの代わりに作業を進める方向へ進化しています。\nメール整理や資料探しのような地味に時間がかかる作業ほど、AI代行の効果が分かりやすそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Copilot/status/2041275993424289870\n・補足・関連情報: https://x.com/Copilot/status/2041653415969759450\n・公式ブログ: https://www.microsoft.com/en-us/microsoft-copilot/blog/2026/02/26/copilot-tasks-from-answers-to-actions/\n\n💳 料金・プラン:\n\n・Microsoft Copilot: https://copilot.microsoft.com/\n・Microsoft 365 Copilot: https://www.microsoft.com/microsoft-365/copilot\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ ウェイトリスト/プレビュー段階\n・補足:Copilot Tasksはウェイトリスト・プレビューとして案内されています。正式提供時の無料/有料条件、対象地域、対象アカウントは今後の案内に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Copilot: https://copilot.microsoft.com/\n\n【Stability AI】【Brand Studio】ブランド中心のクリエイティブ制作プラットフォームを発表(04/08)\n\nStability AIがBrand Studioを発表しました。\n\n汎用AIツールではブランドが後回しになるという課題に対し、ブランドを中心に置いた制作プラットフォームとして紹介されています。\n\nブランド一貫性を保ちながら制作する用途を狙った新サービスです。\n\n▶️ ポイント:\n\n企業がAI制作を使う際に重要な「ブランドらしさ」を保つための専用ツールとして注目です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/StabilityAI/status/2041873936967782837\n・公式ブログ: https://stability.ai/news-updates/brand-studio-by-stability-ai-creative-production-platform-for-brands\n・料金ページ: https://stability.ai/pricing\n\n💳 料金・プラン:\n\n・Stability AI料金ページ: https://stability.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 対象プランにより異なる\n・補足:Brand Studioはブランド制作向けプラットフォームとして発表されています。Stability AIにはFree/Coreなどのプラン案内がありますが、Brand Studioの無料枠・対象プラン・商用利用条件は公式ページと料金ページに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Stability AI: https://stability.ai/\n\n【Runway】【Characters】カメラ/画面共有とカスタムボイスに対応(04/08〜04/09)\n\nRunway Charactersがカメラと画面共有に対応しました。\n\nユーザーがライブフィードを共有すると、Characterが画面内容を把握して応答できると説明されています。\n\nカスタムボイス機能も追加され、テキストプロンプトから新しい声をデザインできます。\n\nWebアプリとRunway API経由で利用可能と案内されています。\n\nなお、Runwayの開発者ドキュメントでは、カメラ/画面共有と一部のカスタムキャラクター・カスタムボイス機能の組み合わせには制限があるため、実装時は公式ドキュメント確認が必要です。\n\n▶️ ポイント:\n\nキャラクターAIが「見る」「聞く」「話す」を組み合わせ、より対話的なメディア体験を作れるようになります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/runwayml/status/2041594922688508371\n・補足・関連情報: https://x.com/runwayml/status/2041594924697563536\n・公式SNS: https://x.com/runwayml/status/2041940020861223079\n・料金ページ: https://runwayml.com/pricing\n・Characters開発者ドキュメント: https://docs.dev.runwayml.com/characters/\n\n💳 料金・プラン:\n\n・Runway料金ページ: https://runwayml.com/pricing\n・Runway API: https://runwayml.com/api\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Characters/APIはクレジット・対象プラン確認が必要\n・補足:Runwayには無料プランがあります。ただし、Characters、カスタムボイス、API利用はクレジット消費や有料プランが必要になる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://runwayml.com/\n・API: https://runwayml.com/api\n\n【Studio】Scroll Effectを正式リリース(04/09)\n\nStudioが新機能Scroll Effectを正式リリースしました。\n\nスクロール位置や画面内表示タイミングに応じて、要素の動きを制御できます。\n\nパララックスやスクロール連動アニメーションを、Studioだけで直感的に制作できると説明されています。\n\n作例動画、リリース記事、解説イベント、ワークショップも案内されています。\n\n▶️ ポイント:\n\nノーコードWeb制作でも、リッチなスクロール演出を作りやすくなる機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/StudioDesign/status/2042161737458455008\n・公式記事導線: https://x.com/StudioDesign/status/2042161739857580468\n・補足・関連情報: https://x.com/StudioDesign/status/2042161741581455377\n・料金ページ: https://studio.design/ja/pricing\n\n💳 料金・プラン:\n\n・Studio料金ページ: https://studio.design/ja/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料プランあり\n・補足:Studioには無料プランがあります。Scroll Effectの利用可否、公開サイト数、CMS、独自ドメインなどはプランごとに異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://studio.design/ja\n\n【Suno】Voice Transformation機能を紹介(04/07)\n\nSunoがVoice Transformation機能を紹介しました。\n\n「あなたの声を何にでも変えましょう」と訴求されています。\n\n声を別の表現へ変換する音声生成機能です。\n\n▶️ ポイント:\n\n自分の声を素材にして、別の歌声や音声表現へ変える制作がしやすくなります。\n音楽制作だけでなく、ナレーションやキャラクター音声にも応用できそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/suno/status/2041211403780956184\n・公式料金ページ: https://suno.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://suno.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Voice Transformationは対象プラン確認が必要\n・補足:Sunoには無料プランがありますが、Voice Transformationの利用可否、回数、商用利用、対象モデルは公式料金ページとアプリ内表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://suno.com/\n\n【Factory】【Desktop】Droidコンピューターとマルチエージェント操作を提供(04/09〜04/10)\n\nFactory Desktopアプリがリリースされました。\n\n各Droidに永続的なマシンを割り当て、クラウドや自宅デバイスに登録できると説明されています。\n\nVS Code、ブラウザ、Excelなどを操作できるComputer Use機能、マルチエージェントセッション、会話内の図表・ダッシュボード生成も紹介されています。\n\nDroidのネイティブマルチエージェントオーケストレーション機能も紹介されました。\n\n▶️ ポイント:\n\nAIコーディングエージェントが、チャット画面を超えてデスクトップ作業や複数プロジェクト管理まで担う方向に進んでいます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2041928406158471299\n・補足・関連情報: https://x.com/FactoryAI/status/2041928508763766941\n・公式SNS: https://x.com/FactoryAI/status/2042313481551331791\n・Factory Desktop: https://factory.ai/product/desktop\n\n💳 料金・プラン:\n\n・Factory料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Factory DesktopはFactoryのプランに紐づく機能です。全プラン提供の案内がある場合でも、無料枠、利用量、対象モデル、Computer Useの制限は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/\n・Desktop: https://factory.ai/product/desktop\n\n【Factory】【Missions】大規模作業をエージェント分担で進める新機能を発表(04/11)\n\nFactoryが新機能Missionsを発表しました。\n\n単一コンテキストウィンドウでは処理しきれない大規模プロジェクトを、焦点を絞った作業単位に分解します。\n\nOrchestrator、Workers、Validatorsの3役割で構成され、TDD的に検証を組み込む設計です。\n\nDroidセッションで `/missions` コマンドから開始できると案内されています。\n\n▶️ ポイント:\n\n大きな開発作業をAIに任せる際の「途中で迷う」「検証が弱い」問題を、役割分担と検証で解決しようとする機能です。\nTDDは「先にテストを作り、動作を確認しながら開発する方法」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2042671155191173532\n・補足・関連情報: https://x.com/FactoryAI/status/2042671181002871090\n・補足・関連情報: https://x.com/FactoryAI/status/2042671205849928124\n・公式ニュース: https://factory.ai/news/missions\n\n💳 料金・プラン:\n\n・Factory料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:MissionsはFactory/Droidの機能として案内されています。対象プラン、利用量制限、提供時期は公式ニュースと料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/\n・公式ニュース: https://factory.ai/news/missions\n\n🏢 導入・事例\n【Google Workspace】【Gemini】SPH MediaとAjax Systemsの活用事例を紹介(04/07〜04/09)\n\nSPH MediaがGoogle Workspace、Gemini、NotebookLMを活用し、翻訳時間を半減した事例が紹介されました。\n\nビジュアル生成成功率99%という成果も示されています。\n\nAjax SystemsがGemini搭載Google Workspaceで、プロセス効率化と高いセキュリティ基準を両立している事例も紹介されました。\n\n▶️ ポイント:\n\n生成AIが、ニュースルームやセキュリティ重視の企業業務で実際に活用され始めていることが分かります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2041245308273725700\n・公式SNS: https://x.com/GoogleWorkspace/status/2041985182467514673\n・Google Workspace公式ブログ: https://workspace.google.com/blog/\n\n▶️ 関連リンク:\n\n・Google Workspace: https://workspace.google.com/\n\n【LangChain】【LangGraph / LangSmith】LinkedInとFlintのエージェント活用事例を紹介(04/09〜04/11)\n\nLinkedInがLangGraphとLangSmithを活用し、AI採用エージェントを構築した事例が紹介されました。\n\nFlint社は、自律型Webサイト生成プラットフォームでLangSmithを使い、エージェントの可視化とコスト追跡を行っていると紹介されています。\n\nどちらもエージェントの本番運用に関わる事例です。\n\n▶️ ポイント:\n\nエージェントを業務に入れる際は、動作の可視化・評価・コスト追跡が重要であることを示す事例です。\nAIをただ使うだけでなく、「どう動いたかを見える化する」段階に入っているのがポイントです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041921174888968479\n・公式SNS: https://x.com/LangChain/status/2042678270156562731\n・LangChain公式ブログ: https://www.langchain.com/blog\n\n▶️ 関連リンク:\n\n・LangSmith: https://smith.langchain.com/\n・LangGraph: https://www.langchain.com/langgraph\n\n📜 制度・ガバナンス\n【Anthropic】【Project Glasswing】AIで重要ソフトウェアの脆弱性発見を支援(04/07)\n\nAnthropicがProject Glasswingを発表しました。\n\nClaude Mythos Previewを使い、重要ソフトウェアの脆弱性発見・修正を支援する取り組みです。\n\nAWS、Apple、Broadcom、Cisco、CrowdStrike、Google、JPMorgan Chase、Linux Foundation、Microsoft、NVIDIA、Palo Alto Networksなどとの連携が紹介されています。\n\nMythos Previewは一般公開せず、安全展開のためのセーフガードをテストすると説明されています。\n\n最大1億ドルの使用クレジット提供も表明されています。\n\n▶️ ポイント:\n\n高性能AIを攻撃ではなく防御に使うため、企業・OSS・研究者を巻き込む大型セキュリティ施策です。\n初心者向けに言うと、「AIを使って重要ソフトの弱点を早く見つける取り組み」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/AnthropicAI/status/2041578392852517128\n・技術レポート導線: https://x.com/AnthropicAI/status/2041578416487489601\n・システムカード導線: https://x.com/AnthropicAI/status/2041580670774923517\n・公式ページ: https://www.anthropic.com/project/glasswing\n・補足・関連情報: https://www.anthropic.com/glasswing\n・技術/安全性関連: https://red.anthropic.com/2026/mythos-preview/\n\n▶️ 関連情報:\n\n・Mythos Previewは一般公開予定なしと説明されています。\n・一般ユーザー向けの新機能というより、AI安全性・サイバー防御に関する取り組みです。\n\n【OpenAI】【Safety Fellowship】AI安全性・アライメント研究支援プログラムを発表(04/07)\n\nOpenAI Safety Fellowshipが発表されました。\n\nAIの安全性とアライメントに関する独立研究や、次世代研究者を支援するプログラムです。\n\n安全性研究の裾野を広げる取り組みとして位置づけられます。\n\n▶️ ポイント:\n\nAIの能力向上だけでなく、安全性研究に人材と資金を向ける動きが続いています。\nアライメントは「AIを人間の意図やルールに沿って動かすための研究」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAI/status/2041202511647019251\n・公式ページ: https://openai.com/index/introducing-openai-safety-fellowship/\n\n▶️ 関連情報:\n\n・研究支援プログラムに関する発表です。\n・応募条件や対象分野は公式ページの案内に従う形になります。\n\n【OpenAI】インテリジェンス時代の新しい産業政策文書を公開(04/07)\n\nOpenAI Newsroomが「インテリジェンス時代のための新しい産業政策」に関する文書公開を告知しました。\n\nAI時代の産業政策に関する考え方を示す文書です。\n\n規制・産業競争力・インフラ投資などの議論に関わる可能性があります。\n\n▶️ ポイント:\n\nAI企業が製品だけでなく、国家・産業政策の議論にも積極的に関わり始めています。\nツール利用者にとっても、今後のAI規制や産業支援の方向性を見るうえで重要な動きです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041198359420215453\n・公式ページ: https://openai.com/index/industrial-policy-for-the-intelligence-age/\n\n▶️ 関連情報:\n\n・政策文書に関する情報です。\n・直接試すツールではありませんが、AI業界の方向性を知るうえで参考になります。\n\n【OpenAI】【Child Safety Blueprint】AI時代の子ども保護方針を提示(04/08)\n\nOpenAIがChild Safety Blueprintを発表しました。\n\nAI時代における米国の子ども保護強化に向けた政策青写真です。\n\n法律の近代化、報告と調整の改善、GenAIによる被害の防止・検知が優先事項として挙げられています。\n\n▶️ ポイント:\n\n生成AIの普及に伴い、子どもの安全を守る制度設計が重要テーマになっています。\nAIを便利に使うだけでなく、安全に使うためのルールづくりも進んでいます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041851289886425325\n・公式ページ: https://openai.com/index/introducing-child-safety-blueprint/\n\n▶️ 関連情報:\n\n・政策文書に関する情報です。\n・AI時代の安全対策や制度づくりに関心がある方は、公式ページを読んでおくと理解が深まります。\n\n💰 資金・M&A・提携\n【OpenAI】大型資金調達と計算能力戦略に関する発信(04/07)\n\nOpenAI Newsroomが、OpenAIの大型資金調達と計算能力戦略に触れたBloomberg動画を共有しました。\n\n計算能力への集中的な投資と、そのフライホイール効果について言及されています。\n\nAI企業にとって、モデル性能だけでなく計算資源確保が競争力の中心になっていることが示されています。\n\n▶️ ポイント:\n\n生成AIの競争は、モデル開発だけでなく、巨大な計算基盤に資金を投入できるかにも左右されます。\n私たち利用者側から見ると、こうした投資が将来のモデル性能や料金にも影響する可能性があります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041261969051918581\n・補足・関連情報:Bloomberg動画リンクは投稿内参照\n・OpenAI News: https://openai.com/news/\n\n▶️ 関連情報:\n\n・資金調達・計算能力戦略に関する情報です。\n・AI業界全体の競争環境を見るうえで参考になります。\n\n⚠️ 事案・リスク\n【OpenAI】Axios関連の開発者ツール侵害に関する対応を告知しFAQを公開(04/11)\n\nOpenAIが、Axios関連の開発者ツール侵害への対応について公式ページを公開しました。\n\nOpenAIは、macOSアプリ利用者に最新版への更新を呼びかけています。\n\n公式FAQでは、OpenAIユーザーデータへの不正アクセスやOpenAIシステム侵害は確認されていないと説明されています。\n\n技術的詳細とFAQがopenai.comで公開されています。\n\n▶️ ポイント:\n\n自社システムに直接侵害がなくても、外部ライブラリや開発者ツール周辺の問題がアプリ更新やユーザー対応につながることがあります。\nAIツールも、ふつうのアプリと同じように最新版へ更新しておくことが大切です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAI/status/2042780052669239782\n・公式FAQ/告知: https://openai.com/index/axios-developer-tool-compromise/\n\n▶️ 関連情報:\n\n・セキュリティ告知です。\n・対象ユーザーは、公式案内に沿ってアプリを最新版に更新しておくと安心です。\n\n【OpenAI】イーロン・マスク訴訟に反論(04/08)\n\nOpenAI Newsroomが、イーロン・マスクによる非営利のOpenAI財団への訴訟について反論しました。\n\n投稿では、この訴訟を「権力と金銭のためのハラスメントキャンペーン」と表現しています。\n\n法務・ガバナンス上の大きな対立として注目されます。\n\n▶️ ポイント:\n\nAI企業の成長に伴い、企業統治・非営利性・資本構造をめぐる法的対立も大きなニュースになっています。\nツールの機能とは直接関係しませんが、AI業界の今後を見るうえでは重要な動きです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041648263078801765\n・OpenAI News: https://openai.com/news/\n\n▶️ 関連情報:\n\n・訴訟・声明に関する情報です。\n・今後のOpenAIの組織運営や業界動向にも関わる可能性があります。\n\n📚 研究・ベンチ\n【Allen AI】【WildDet3D】野外単眼3D物体検出のオープンモデルをリリース(04/08)\n\nAllen AIがWildDet3Dをリリースしました。\n\n野外での単眼3D物体検出向けオープンモデルです。\n\nテキスト、クリック、2Dボックスで動作し、ゼロショット評価で従来最高スコアをほぼ2倍に更新したと説明されています。\n\nスレッド内で、研究の詳細やデモ、評価結果が補足されています。\n\n▶️ ポイント:\n\n1枚の画像から3D空間内の物体を理解する技術は、自動運転・ロボット・ARなどに関わる重要分野です。\n初心者向けに言うと、「写真から物体の位置や奥行きをAIが理解する技術」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/allen_ai/status/2041545111151022094\n・Allen AI公式サイト: https://allenai.org/\n\n▶️ 関連情報:\n\n・論文やコードは公式SNSスレッドからたどれる形で案内されています。\n・研究公開系のため、利用条件は論文・コード公開先のライセンスに従う形になります。\n\n【Allen AI】【MolmoWeb】Webエージェント研究の全コードベースを公開(04/11)\n\nAllen AIがMolmoWebの全コードベース公開を発表しました。\n\n学習コード、評価ハーネス、アノテーションツール、合成データパイプライン、デモ用クライアントコードが含まれます。\n\n自前タスクでWebエージェントの学習・適応・評価を実施できるようにする発表です。\n\n▶️ ポイント:\n\nWebエージェント研究を再現・拡張しやすくするため、研究だけでなく開発者にも価値のあるコード公開です。\nWebエージェントとは、ブラウザ上で調べる・クリックする・入力するような作業を行うAIのことです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/allen_ai/status/2042618879650725996\n・Allen AI公式サイト: https://allenai.org/\n\n▶️ 関連情報:\n\n・GitHubや論文への導線は公式SNSスレッドから案内されています。\n\n🧱 基盤・インフラ\n【Google Maps Platform】【Street View Insights】BigQuery・Vertex AI連携でインフラ分析へ活用(04/08)\n\nGoogle Maps Platformが、Street View InsightsをBigQuery・Vertex AIと連携して活用できることを紹介しました。\n\n2,800億枚超の360°/3D画像を、インフラストラクチャーインテリジェンスへ変換できると説明されています。\n\n街路・設備・都市インフラ分析に関わる基盤アップデートです。\n\n▶️ ポイント:\n\n地図・画像・AI・データ基盤を組み合わせることで、都市やインフラの状況把握を自動化しやすくなります。\n身近なところでは、道路、看板、設備、街の変化をデータとして分析するような使い方につながります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GMapsPlatform/status/2041590303426040122\n・Google Maps Platform: https://mapsplatform.google.com/\n・BigQuery: https://cloud.google.com/bigquery\n・Vertex AI: https://cloud.google.com/vertex-ai\n\n💳 料金・プラン:\n\n・Google Maps Platform料金: https://mapsplatform.google.com/pricing/\n・Google Cloud料金: https://cloud.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料で試せる部分あり、本格利用は従量課金\n・補足:Google CloudやGoogle Maps Platformには無料枠や試用枠がある場合があります。ただし、BigQuery、Vertex AI、Maps Platformを組み合わせた本格的な分析では、利用量に応じた課金が発生する可能性があります。\n\n▶️ 関連リンク:\n\n・Google Maps Platform: https://mapsplatform.google.com/\n・Google Cloud: https://cloud.google.com/\n\nトレンド & 今後の注目\n\n4/5の週は、AIエージェントを本番運用するための基盤整備が大きな流れでした。\n\nさらに、Seedance 2.0やGemma 4など、モデルそのものよりも「どのツールで使えるか」がニュース価値になっています。\n\n今後は、料金制限・安全性・企業導入・モデル対応範囲の変化が重要なチェックポイントになりそうです。\n\nここまで見ると、少し専門的なニュースも多く感じるかもしれません。\nただ、初心者の方はすべてを理解しようとしなくて大丈夫です。\n\n大事なのは、AIがどんどん普段の仕事道具の中に入ってきているという流れをつかむことです。\n\nたとえば、Slackで依頼する、Wordで文章を直す、Office内で資料を作る、動画をSNS向けに変換する。\nこうした身近な作業から、AI活用はかなり試しやすくなっています。\n\nまとめ・コラム\n\nこの週の大きな流れは、AIが「答えるだけのツール」から「作業を進める存在」へ進化していることです。\n\nClaude Managed Agents、Genspark 4.0、Factory Desktop、Slack連携、Office連携などを見ると、AIはチャット画面の中だけでなく、普段使っている仕事環境の中に入り始めています。\n\nもちろん、すべてをすぐに任せられるわけではありません。\n料金、精度、セキュリティ、対象プランなど、確認すべき点もまだ多いです。\n\nただ、これからのAI活用では「何を聞くか」だけでなく、どの作業をAIに任せるかが重要になっていきそうです。\n\nまずは、資料作成、調査、議事録、コード修正、SNS動画制作など、自分の作業の中で「少し面倒だな」と感じるものを1つ選んで、関連ツールの公式情報を見てみるのがおすすめです。\n\nいきなり全部をAIに任せる必要はありません。\nまずは小さな作業から試して、「ここはAIに任せても大丈夫そう」という感覚を少しずつ増やしていくのが、いちばん現実的な使い方だと思います。\n\n今回の記事は以上になります。\nぜひみなさんも、気になったAIツールを1つ選んで、自分の作業にどう使えるか試してみてくださいね。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "4 5の 週 は aiがただ 質 問 に 答 えるだけでなく 実 際 の 仕 事 を 進 める 存 在 へ 近 づいていることを 感 じる1 週 間 でした 特 に 目 立 ったのは claude managed agents genspark ai workspace 4 0 factory desktop langsmith deploymentsなど aiエージェントを 試 す 段 階 から 業 務 に 組 み 込 んで 動 かす 方 向 へのアップデートです slackの 中 でエージェントに 依 頼 する officeアプリの 中 で 資 料 や 文 書 を 作 る 開 発 環 境 やデスクトップ 上 でaiが 作 業 を 進 める こうした 流 れを 見 ると aiは 少 しずつ チャット 相 手 から 仕 事 を 代 行 するパートナー へ 変 わり 始 めています 本 記 事 では ai 初 心 者 の 方 にもわかりやすいように 1 週 間 分 のai 関 連 ニュースをできるだけ 簡 潔 にまとめています 気 になったニュースがあれば ぜひ 一 次 ソースも 確 認 してみてください この 記 事 はトピック 数 が 多 めなので 最 初 から 全 部 を 細 かく 読 む 必 要 はありません まずは 自 分 の 仕 事 に 関 係 ありそう と 感 じた 項 目 だけ 拾 い 読 みしても 大 丈 夫 です 特 に 資 料 作 成 議 事 録 動 画 制 作 コード 修 正 業 務 自 動 化 に 関 心 がある 方 は 該 当 する 見 出 しから 読 んでみてください この 記 事 でよく 出 てくる 用 語 ミニ 解 説 aiエージェント 人 の 指 示 を 受 けて 調 査 資 料 作 成 コード 修 正 などの 作 業 を 進 めるaiのことです api アプリやサービス 同 士 をつなぐための 仕 組 みです 開 発 者 向 けの 利 用 方 法 と 考 えると 分 かりやすいです mcp aiが 外 部 ツールやデータに 接 続 しやすくするための 仕 組 みです デプロイ 作 ったaiやアプリを 実 際 に 使 える 状 態 で 公 開 運 用 することです クレジット 制 使 った 分 だけポイントを 消 費 する 料 金 方 式 です 動 画 生 成 aiでよく 使 われます 難 しい 言 葉 も 出 てきますが 細 かい 技 術 理 解 よりも 自 分 の 作 業 にどう 関 係 するか を 見 ていけば 大 丈 夫 です 目 次 この 記 事 でよく 出 てくる 用 語 ミニ 解 説 モデル バージョンアップ pollo ai pollo 3 0 一 貫 キャラクター カメラ 制 御 マルチショット 生 成 を 訴 求 04 07 google deepmind gemma 4 小 型 でも 高 性 能 なオープンモデルとして 発 表 公 式 snsでも 反 響 を 紹 介 04 10 liquid ai lfm2 5 vl 450m エッジ 向 けリアルタイム 視 覚 言 語 モデルを 公 開 04 09 pixverse pixverse c1 映 画 制 作 向 け 初 モデルをリリース 04 08 suno v5 5 新 音 楽 モデルを 発 表 公 式 snsでも 改 めて 紹 介 04 08 モデル 対 応 アップデート alibaba qwen qwen3 6 plus openrouterで 好 調 本 番 api 利 用 を 訴 求 04 08 clawi 主 要 llm 対 応 claude gpt gemini qwenなど 複 数 モデルを 統 合 04 05 すべて 表 示 モデル バージョンアップ pollo ai pollo 3 0 一 貫 キャラクター カメラ 制 御 マルチショット 生 成 を 訴 求 04 07 pollo 3 0のローンチが 告 知 されました 一 貫 したキャラクター 精 密 なプロンプト カメラ モーション 制 御 マルチショットストーリーテリングが 特 徴 です 1 回 の 生 成 で より 映 像 作 品 らしい 構 成 を 作 れることをアピールしています ポイント 動 画 生 成 で 難 しかった 同 じキャラを 保 つ 複 数 カットをつなぐ 作 業 を より 簡 単 にする 方 向 のアップデートです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com itspolloai status 2041450652963066262 補 足 関 連 情 報 https x com itspolloai status 2041450656364716237 公 式 サイト https pollo ai 料 金 プラン 公 式 料 金 ページ https pollo ai pricing 無 料 で 使 えるか 利 用 料 金 無 料 開 始 可 生 成 はクレジット 制 補 足 pollo aiは 無 料 で 始 められます ただし 生 成 にはクレジットを 消 費 し 無 料 枠 では 透 かし 生 成 回 数 速 度 出 力 品 質 などに 制 限 がある 場 合 があります 今 すぐ 試 す 公 式 リンク webアプリ https pollo ai google deepmind gemma 4 小 型 でも 高 性 能 なオープンモデルとして 発 表 公 式 snsでも 反 響 を 紹 介 04 10 gemma 4が サイズ 以 上 の 性 能 を 発 揮 するオープンモデルとして 紹 介 されました 公 式 ブログ 上 の 発 表 日 は2026 年 4 月 2 日 で 4 月 10 日 の 公 式 snsでは 公 開 初 週 の 反 響 も 紹 介 されています googleの 公 式 情 報 では gemma 4はapache 2 0ライセンスで 公 開 されています ポイント 軽 量 モデルでも 高 性 能 化 が 進 むことで ローカル 環 境 や 低 コスト 環 境 でも 実 用 的 なai 活 用 が 広 がります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googledeepmind status 2042283481640615944 公 式 ブログ https blog google innovation and ai technology developers tools gemma 4 google open source blog https opensource googleblog com 2026 03 gemma 4 expanding the gemmaverse with apache 20 html モデルページ https deepmind google models gemma gemma 4 モデルカード https ai google dev gemma docs core model card 4 料 金 プラン 公 式 モデルページ https deepmind google models gemma gemma 4 google ai studio https aistudio google com 無 料 で 使 えるか 利 用 料 金 無 料 で 利 用 可 能 補 足 gemma 4はapache 2 0ライセンスのオープンモデルとして 公 開 されています 商 用 利 用 を 含 む 詳 しい 条 件 は 公 式 モデルカードとライセンスを 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https aistudio google com モデルページ https deepmind google models gemma gemma 4 liquid ai lfm2 5 vl 450m エッジ 向 けリアルタイム 視 覚 言 語 モデルを 公 開 04 09 lfm2 5 vl 450mが エッジデバイス 向 けの 視 覚 言 語 モデルとして 発 表 されました 512 512 画 像 を 約 240msで 処 理 し 4fpsのビデオストリーム 推 論 にも 対 応 すると 説 明 されています バウンディングボックス 予 測 多 言 語 視 覚 理 解 関 数 呼 び 出 し jetsonやスマホなどでの 実 行 が 紹 介 されています ポイント クラウドに 送 らず 端 末 側 で 画 像 理 解 aiを 動 かしやすくする 発 表 です 監 視 ロボット モバイルアプリなどへの 応 用 が 期 待 できます 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com liquidai status 2041912441060143251 補 足 関 連 情 報 https x com liquidai status 2041912454020542565 公 式 ブログ https www liquid ai blog lfm2 5 vl 450m hugging face https huggingface co liquidai lfm2 5 vl 450m 料 金 プラン hugging faceモデルページ https huggingface co liquidai lfm2 5 vl 450m liquid ai 公 式 サイト https www liquid ai 無 料 で 使 えるか 利 用 料 金 無 料 で 利 用 可 能 補 足 モデルはhugging faceで 公 開 されています ローカル 実 行 や 研 究 利 用 は 可 能 ですが 商 用 利 用 再 配 布 派 生 モデル 作 成 などの 条 件 は 公 式 モデルカードとライセンスを 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク hugging face https huggingface co liquidai lfm2 5 vl 450m 公 式 ブログ https www liquid ai blog lfm2 5 vl 450m pixverse pixverse c1 映 画 制 作 向 け 初 モデルをリリース 04 08 pixverse c1が 映 画 制 作 向 けの 初 モデルとして 発 表 されました 1080p 15 秒 ネイティブオーディオ 対 応 が 特 徴 です webアプリでの 試 用 リンクも 案 内 されています ポイント ai 動 画 生 成 が 短 いクリップだけでなく 音 声 付 きの 映 像 制 作 に 近 づいていることを 示 す 発 表 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com pixverse status 2041536108660740162 試 用 リンク 導 線 https x com pixverse status 2041536112511033375 公 式 ドキュメント https docs platform pixverse ai モデル 料 金 https docs platform pixverse ai model pricing 796039m0 料 金 プラン 公 式 料 金 ドキュメント https docs platform pixverse ai model pricing 796039m0 課 金 ページ https platform pixverse ai billing 無 料 で 使 えるか 利 用 料 金 クレジット 制 補 足 pixverse platformではモデルごとのクレジット 消 費 が 設 定 されています 無 料 クレジットや 新 規 特 典 が 提 供 される 場 合 もありますが c1を 継 続 利 用 する 場 合 はクレジット 消 費 有 料 購 入 が 前 提 になる 可 能 性 があります 今 すぐ 試 す 公 式 リンク webアプリ https app pixverse ai 開 発 者 向 けplatform https platform pixverse ai suno v5 5 新 音 楽 モデルを 発 表 公 式 snsでも 改 めて 紹 介 04 08 sunoが 新 モデル v5 5 を 発 表 しました 公 式 ブログ 上 の 発 表 日 は2026 年 3 月 26 日 で 4 月 8 日 の 投 稿 ではこの 新 モデルが 改 めて 紹 介 されています v5 5では voices custom models my tasteなど ユーザーの 声 好 み 制 作 スタイルに 合 わせる 機 能 が 強 化 されています 有 料 プランでは より 高 性 能 なモデルや 編 集 ツール voices custom modelsなどの 高 度 な 機 能 を 利 用 できる 構 成 になっています ポイント 音 楽 生 成 aiでも 単 に 曲 を 作 る だけでなく 自 分 の 声 や 好 みに 合 わせて 制 作 するパーソナライズ 競 争 が 進 んでいます 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com suno status 2041541160015937995 公 式 ブログ https suno com blog v5 5 公 式 料 金 ページ https suno com pricing 料 金 プラン 公 式 料 金 ページ https suno com pricing 無 料 で 使 えるか 利 用 料 金 v5 5の 本 格 利 用 は 有 料 プラン 中 心 補 足 sunoには 無 料 プランがありますが v5 5やvoices custom modelsなどの 高 度 な 機 能 はpro premier 向 けとして 案 内 されています 無 料 プランでは 使 えるモデルや 機 能 に 制 限 があります 今 すぐ 試 す 公 式 リンク webアプリ https suno com モデル 対 応 アップデート alibaba qwen qwen3 6 plus openrouterで 好 調 本 番 api 利 用 を 訴 求 04 08 qwen3 6 plusがopenrouterのデイリー ウィークリー トレンディングチャートで 好 調 だったことが 報 告 されました 投 稿 では トライアル 期 間 が 終 了 し 本 番 稼 働 済 みであることがアナウンスされています 低 遅 延 高 い 推 論 性 能 低 コストを 特 徴 として api 統 合 を 呼 びかけています qwen codeのアップデートとは 異 なり こちらは qwen3 6 plusというモデルをapi 経 由 で 使 う こと 自 体 が 主 題 です ポイント qwen3 6 plusは openrouter 経 由 で 利 用 できる 実 運 用 向 けモデルとして 存 在 感 を 高 めています 開 発 者 にとっては コスト 速 度 推 論 性 能 のバランスを 見 ながら 採 用 候 補 にできるモデル 選 択 肢 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com alibaba qwen status 2041871541080924477 openrouterモデルページ https openrouter ai qwen qwen3 6 plus 料 金 プラン openrouterモデル 料 金 https openrouter ai qwen qwen3 6 plus 無 料 で 使 えるか 利 用 料 金 原 則 api 課 金 補 足 openrouterではモデルごとに 入 力 出 力 トークン 単 価 が 表 示 されます 無 料 提 供 や 一 時 的 なプロモーションがある 場 合 でも 本 番 利 用 ではapi 従 量 課 金 の 確 認 が 必 要 です 今 すぐ 試 す 公 式 リンク openrouter https openrouter ai qwen qwen3 6 plus clawi 主 要 llm 対 応 claude gpt gemini qwenなど 複 数 モデルを 統 合 04 05 clawiでclaude gpt geminiなど20 以 上 のモデルをサブスクリプション 内 で 利 用 できると 紹 介 されました qwen 3 6 plusを 含 むモデル 提 供 や 追 加 api 費 用 なしの 使 い 方 が 訴 求 されています モデルプロバイダーにロックインされない 点 を 強 調 しています ポイント 1つのサービス 内 で 複 数 モデルを 切 り 替 えられると 用 途 ごとに 得 意 なaiを 選 びやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com clawiai status 2040499750269534496 補 足 関 連 情 報 https x com clawiai status 2040805959216374039 公 式 サイト https clawi ai 料 金 プラン 公 式 サイト https clawi ai 補 足 公 式 サイトではbasic pro ultraの 有 料 プランが 掲 載 されています 無 料 で 使 えるか 利 用 料 金 有 料 プラン 中 心 補 足 clawiはクラウド 上 でaiエージェントを 動 かす 有 料 サービスです モデル 利 用 メッセンジャー 連 携 エージェントリソースなどがプランによって 異 なります 今 すぐ 試 す 公 式 リンク 公 式 サイト https clawi ai freepik seedance 2 0 日 本 全 プランへ 提 供 範 囲 を 拡 大 04 05 04 10 seedance 2 0が 日 本 で 正 式 利 用 可 能 になり 当 初 はbusiness enterprise 向 けとして 紹 介 されました その 後 freepik 全 プランで 利 用 可 能 になったと 発 表 されています プロンプト 作 成 記 事 や 1プロンプトで 映 画 的 動 画 を 作 る 解 説 も 共 有 されています ポイント 動 画 生 成 モデルの 提 供 範 囲 が 広 がることで 専 門 ユーザーだけでなく 一 般 クリエイターも 試 しやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com freepik status 2040766188607946822 公 式 sns https x com freepik status 2042316920352096558 補 足 関 連 情 報 https x com freepik status 2042607677805670686 公 式 料 金 ページ https www freepik com pricing 料 金 プラン 公 式 料 金 ページ https www freepik com pricing seedance 2 0ページ https www freepik com seedance 2 無 料 で 使 えるか 利 用 料 金 全 プラン 対 応 だがクレジット 制 補 足 freepikには 無 料 プランがありますが seedance 2 0はクレジット 消 費 型 の 動 画 生 成 モデルとして 扱 われています 無 料 プランでの 利 用 量 解 像 度 生 成 回 数 は 公 式 料 金 ページで 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https www freepik com seedance 2 0 https www freepik com seedance 2 gamma connector suite openai claude zapier n8nなどと 連 携 04 08 gamma 向 けの 新 コネクタースイートが 発 表 されました openai claude zapier make n8n atlassian rovo superhuman go gleanなどとの 統 合 が 紹 介 されています さまざまな 業 務 ツールからプレゼン 生 成 につなげられる 点 が 特 徴 です ポイント 資 料 作 成 aiが 単 体 ツールから 既 存 業 務 ツールの 中 で 動 く 存 在 へ 近 づいています 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com gammaapp status 2041562184082505863 コネクター 公 式 ドキュメント https developers gamma app connectors connectors and integrations 公 式 料 金 ページ https gamma app pricing 料 金 プラン 公 式 料 金 ページ https gamma app pricing api 連 携 の 料 金 説 明 https developers gamma app get started access and pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランでも 一 部 利 用 可 能 補 足 gammaには 無 料 プランがあります chatgpt claude superhuman go atlassian rovo 連 携 は 全 gammaプランで 利 用 可 能 と 案 内 されています 一 方 で zapier make n8n api 連 携 などはapiキーや 有 料 条 件 が 関 係 する 場 合 があります 今 すぐ 試 す 公 式 リンク webアプリ https gamma app gamma atlassian rovo confluenceからプレゼン 生 成 に 対 応 04 10 gammaがatlassianと 連 携 し confluence 内 のパートナーエージェントとして 統 合 されたと 発 表 されました rovoチャットからページ 議 事 録 ステータス 更 新 をもとにプレゼンを 生 成 できると 説 明 されています チーム 内 のナレッジを 資 料 化 しやすくするアップデートです ポイント 社 内 ドキュメントをそのままプレゼンに 変 換 できるため 会 議 資 料 や 報 告 資 料 の 作 成 時 間 を 減 らせます 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com gammaapp status 2042259992670011651 gamma 連 携 ページ https gamma app integrations atlassian rovo atlassian 関 連 情 報 https www atlassian com ja blog rovo remix 3p agents confluence 料 金 プラン gamma 料 金 ページ https gamma app pricing atlassian 料 金 ページ https www atlassian com software confluence pricing 無 料 で 使 えるか 利 用 料 金 gamma 側 は 無 料 プランあり rovo confluence 側 は 別 途 条 件 あり 補 足 gamma 自 体 には 無 料 プランがあります ただし confluence rovo 連 携 を 実 際 に 使 うには atlassian 側 の 対 象 プランや 組 織 設 定 が 関 係 する 可 能 性 があります 今 すぐ 試 す 公 式 リンク gamma https gamma app gamma atlassian rovo https gamma app integrations atlassian rovo firebase kiro firebase mcpサーバーをワンクリック 導 入 可 能 に 04 09 firebaseがkiroの 公 式 powerになったと 発 表 されました firebase mcpサーバーをkiroにワンクリックでインストールできると 説 明 されています ai 開 発 環 境 からfirebase 機 能 へ 接 続 しやすくなる 更 新 です ポイント mcp 連 携 により ai ideやエージェントがfirebaseの 情 報 機 能 を 扱 いやすくなります 初 心 者 向 けに 言 うと ai 開 発 ツールからfirebaseを 使 いやすくする 接 続 機 能 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com firebase status 2041942967284293774 kiro powers https kiro dev powers firebase 料 金 https firebase google com pricing 料 金 プラン kiro 料 金 ページ https kiro dev pricing firebase 料 金 ページ https firebase google com pricing 無 料 で 使 えるか 利 用 料 金 無 料 枠 あり 補 足 kiroにはfree tierがあり firebaseにも 無 料 のsparkプランがあります ただし firebaseの 一 部 機 能 や 利 用 量 増 加 時 はblazeプランの 従 量 課 金 が 必 要 です 今 すぐ 試 す 公 式 リンク kiro https kiro dev firebase https firebase google com google gemini 3 1 pro augment codeのモデルピッカーで 利 用 可 能 に 04 07 gemini 3 1 proがaugment codeのモデルピッカーで 利 用 可 能 になったと 紹 介 されました 大 規 模 コードベースの 変 更 を 効 率 化 できると 訴 求 されています 高 性 能 低 コストのコード 支 援 モデルとしての 利 用 が 期 待 されます ポイント コーディング 支 援 ツールで 使 えるモデルが 増 えると 開 発 者 はタスクに 合 うaiを 選 びやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googleaidevs status 2041213569354604630 augment 公 式 ブログ https www augmentcode com blog gemini 3 1 pro now available in augment code gemini api 料 金 https ai google dev gemini api docs pricing 料 金 プラン augment code https www augmentcode com gemini api 料 金 https ai google dev gemini api docs pricing 無 料 で 使 えるか 利 用 料 金 有 料 プラン 有 料 api 中 心 補 足 gemini 3 1 proはaugment code 内 のモデル 選 択 肢 として 提 供 されます 利 用 にはaugment code 側 の 契 約 条 件 が 関 係 します また gemini apiではpro 系 モデルが 無 料 tier 対 象 外 として 表 示 される 場 合 があります 今 すぐ 試 す 公 式 リンク augment code https www augmentcode com langchain langsmith fleet arcadeの7 500 以 上 のmcpツールに 対 応 04 08 arcade 社 の7 500 以 上 のエージェント 最 適 化 mcpツールが langsmith fleetで 利 用 可 能 になりました salesforce github zendesk asanaなど 多 数 のサービスへ 安 全 接 続 できると 紹 介 されています エージェントが 外 部 業 務 ツールを 操 作 する 範 囲 が 広 がります ポイント aiエージェントに 使 える 道 具 が 増 えるほど 実 務 自 動 化 の 幅 が 広 がります たとえば 営 業 管 理 問 い 合 わせ 対 応 タスク 管 理 などをaiが 扱 いやすくなるイメージです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com langchain status 2041557866365251588 langchain 料 金 ページ https www langchain com pricing 料 金 プラン langsmith 料 金 ページ https www langchain com pricing 無 料 で 使 えるか 利 用 料 金 無 料 枠 あり fleet 本 格 利 用 は 有 料 プラン 確 認 が 必 要 補 足 langsmithにはdeveloper 向 け 無 料 枠 があります ただし fleetエージェント 数 や 本 番 運 用 arcade 連 携 の 利 用 条 件 はプランごとに 異 なります 今 すぐ 試 す 公 式 リンク langsmith https smith langchain com langchain https www langchain com manus manus for slack slack 内 dmからエージェントを 利 用 可 能 に 04 07 manus for slackが 発 表 されました slack 内 dmでmanusエージェントを 使 い チャット 上 のアイデアや 意 思 決 定 を 実 行 へつなげられると 説 明 されています faqでは 有 料 slackプラン セキュリティ チャンネル 権 限 プライベートメッセージの 扱 いにも 触 れています ポイント slackの 会 話 をそのままaiエージェントへの 仕 事 依 頼 に 変 えられるため 業 務 の 流 れを 止 めにくくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com manusai jp status 2041337705452442005 補 足 関 連 情 報 https x com manusai jp status 2041337772439667116 設 定 リンク 導 線 https x com manusai jp status 2041337784716460512 公 式 ブログ https manus im blog manus your partner on slack 料 金 プラン manus 料 金 ページ https manus im pricing slack 料 金 ページ https slack com pricing 無 料 で 使 えるか 利 用 料 金 有 料 slackプランが 必 要 補 足 manus for slackのfaqでは 有 料 slackプランが 必 要 と 説 明 されています manus 本 体 には 無 料 トライアル 案 内 がありますが slack 連 携 の 実 利 用 条 件 はmanusとslack 双 方 のプラン 確 認 が 必 要 です 今 すぐ 試 す 公 式 リンク manus https manus im slack 連 携 ドキュメント https manus im docs integrations slack integration medeo seedance 2 0 medeo x seedance 2 0 提 携 を 発 表 04 10 medeoがseedance 2 0との 提 携 を 発 表 しました 初 月 6で 利 用 可 能 とされ シネマティックビジュアル マルチモーダル 入 力 ネイティブサウンドが 特 徴 として 紹 介 されています 動 画 生 成 モデルをmedeo 上 で 使 えるようにするモデル 対 応 アップデートです ポイント 人 気 動 画 生 成 モデルが 複 数 サービスに 広 がることで ユーザーは 使 い 慣 れた 制 作 環 境 から 試 せるようになります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com medeo ai status 2042256470247403864 公 式 料 金 ページ https www medeo app pricing 料 金 プラン 公 式 料 金 ページ https www medeo app pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランあり seedance 2 0 利 用 は 有 料 クレジット 対 象 の 可 能 性 が 高 い 補 足 medeoにはfreeプランがあります ただし seedance 2 0などの 高 性 能 動 画 モデルはクレジット 消 費 や 有 料 プラン 対 象 になる 可 能 性 があるため 無 料 プランでどこまで 使 えるかはアプリ 内 表 示 を 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https www medeo app perplexity computer plaid 金 融 口 座 連 携 に 対 応 04 10 perplexity computerがplaidと 連 携 し 銀 行 口 座 クレジットカード ローンをリンク 可 能 になったと 発 表 されました 支 出 追 跡 予 算 ツール 作 成 投 資 ポートフォリオと 並 べた 純 資 産 可 視 化 に 対 応 すると 説 明 されています computerタスクはpro maxサブスクライバー 限 定 とされています ポイント aiが 個 人 の 金 融 データを 扱 うことで 家 計 管 理 や 資 産 把 握 を 対 話 的 に 行 える 可 能 性 があります 便 利 な 一 方 で お 金 に 関 わる 情 報 を 連 携 するため 権 限 やセキュリティ 確 認 は 特 に 大 切 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com perplexity ai status 2042256932397019368 補 足 関 連 情 報 https x com perplexity ai status 2042256944426364931 公 式 サイト https www perplexity ai 料 金 プラン 公 式 サイト https www perplexity ai pro https www perplexity ai pro 無 料 で 使 えるか 利 用 料 金 一 部 有 料 プランのみ 補 足 口 座 連 携 やページ 閲 覧 は 全 ユーザー 向 けとされていますが computerタスクはpro maxサブスクライバー 限 定 と 説 明 されています 今 すぐ 試 す 公 式 リンク webアプリ https www perplexity ai lovart seedance 2 0 lovart 上 でseedance 2 0 対 応 を 告 知 04 10 lovartでseedance 2 0が 使 えるようになったと 複 数 投 稿 で 告 知 されました 発 想 から 完 成 まで 一 気 に 実 現 できる 制 作 環 境 として 訴 求 されています 動 画 作 例 を 通 じて lovart 上 でのseedance 2 0 活 用 が 紹 介 されています ポイント 画 像 動 画 制 作 プラットフォームに 動 画 生 成 モデルが 追 加 されることで 制 作 フローの 中 で 直 接 動 画 化 しやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com lovart jp status 2042512912070095242 補 足 関 連 情 報 https x com lovart jp status 2042535558988095586 補 足 関 連 情 報 https x com lovart jp status 2042558213749432348 seedanceページ https www lovart ai features online multimodal ai creator seedance 料 金 プラン 公 式 料 金 ページ https www lovart ai pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランあり seedance 利 用 はクレジット 対 象 プラン 確 認 が 必 要 補 足 lovartには 無 料 プランがあります ただし seedance 2 0の 利 用 枠 生 成 回 数 クレジット 消 費 は 公 式 料 金 ページとアプリ 内 表 示 で 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https www lovart ai runway seedance 2 0 runwayに 搭 載 全 有 料 プランへ 拡 大 04 07 04 10 seedance 2 0がrunwayに 搭 載 されました テキスト 画 像 動 画 音 声 を 入 力 として 複 数 ショットの 動 画 シーケンスを 生 成 できると 説 明 されています その 後 米 国 を 含 む 全 有 料 プランで 利 用 可 能 になったと 告 知 されました 使 い 方 記 事 も 共 有 されています ポイント runway 利 用 者 は 既 存 の 制 作 環 境 の 中 でseedance 2 0を 使 えるようになり 動 画 生 成 モデルの 選 択 肢 が 広 がります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com runwayml status 2041517519664463940 公 式 sns https x com runwayml status 2042336701557703020 補 足 関 連 情 報 https x com runwayml status 2041872715640914095 公 式 料 金 ページ https runwayml com pricing 料 金 プラン 公 式 料 金 ページ https runwayml com pricing 無 料 で 使 えるか 利 用 料 金 有 料 プランのみ 補 足 投 稿 では 全 有 料 プランで 利 用 可 能 と 説 明 されています runwayには 無 料 プランもありますが seedance 2 0の 利 用 は 有 料 プラン 対 象 として 扱 うのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https runwayml com factory droid glm 5 1 対 応 でモデル 選 択 肢 を 拡 大 04 10 factoryのdroidでglm 5 1が 使 えるようになりました 高 性 能 低 コスト 長 時 間 セッションでの 安 定 性 が 訴 求 されています 複 雑 なmcpツール 利 用 にも 強 いと 説 明 されています ポイント コーディングエージェントで 使 えるモデルが 増 えると 精 度 速 度 コストを 用 途 別 に 調 整 しやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com factoryai status 2042399866006192484 補 足 関 連 情 報 https x com factoryai status 2042399878148735249 公 式 料 金 ページ https factory ai pricing 料 金 プラン 公 式 料 金 ページ https factory ai pricing 料 金 ドキュメント https docs factory ai pricing 無 料 で 使 えるか 利 用 料 金 有 料 プラン 中 心 補 足 factoryは 有 料 プラン 中 心 のサービスです droidやモデル 利 用 条 件 はプランごとに 異 なるため 公 式 料 金 ページで 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https factory ai wavespeedai youwareai 動 画 画 像 モデル 対 応 とai 開 発 体 験 を 連 続 更 新 04 05 04 11 wavespeedaiでは wan 2 7 video lipsync 3 kling advanced elements ideogram v3 joyai image edit vidu q3 reference to videoなどの 対 応 が 紹 介 されました ai generatorとして 画 像 動 画 音 声 アバター 3dをワンプレイスで 扱 えることも 訴 求 されています youwareaiでは credit care ビデオ 理 解 auto fix mode モバイルアプリ オープンリミックス 機 能 が 紹 介 されました ポイント 生 成 aiサービスは 単 一 モデルの 性 能 だけでなく 複 数 モデルを 束 ねる 制 作 環 境 失 敗 を 補 償 する 仕 組 み 自 動 修 正 まで 競 争 軸 が 広 がっています 一 次 ソース 公 式 ブログ 公 式 snsなど wavespeedai 公 式 sns https x com wavespeed ai status 2040457860405162391 wavespeedai 公 式 sns https x com wavespeed ai status 2041518044879692097 wavespeedai 公 式 sns https x com wavespeed ai status 2041818472536281558 youwareai 公 式 sns https x com youwareai status 2041212376758862298 youwareai 公 式 sns https x com youwareai status 2041954843766444314 料 金 プラン wavespeedai 料 金 ページ https wavespeed ai pricing youwareai 公 式 サイト https www youware com 無 料 で 使 えるか 利 用 料 金 wavespeedaiは 無 料 クレジットあり youwareaiはアプリ 内 条 件 に 従 う 形 補 足 wavespeedaiは 新 規 ユーザー 向 け 無 料 クレジットを 案 内 しています youwareaiの 各 機 能 提 供 条 件 は 公 式 サイトまたはアプリ 内 表 示 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク wavespeedai https wavespeed ai youwareai https www youware com", "source_text": "4/5の週は、AIがただ質問に答えるだけでなく、実際の仕事を進める存在へ近づいていることを感じる1週間でした。\n\n特に目立ったのは、Claude Managed Agents、Genspark AI Workspace 4.0、Factory Desktop、LangSmith Deploymentsなど、AIエージェントを「試す」段階から、業務に組み込んで動かす方向へのアップデートです。\n\nSlackの中でエージェントに依頼する。\nOfficeアプリの中で資料や文書を作る。\n開発環境やデスクトップ上でAIが作業を進める。\n\nこうした流れを見ると、AIは少しずつ「チャット相手」から「仕事を代行するパートナー」へ変わり始めています。\n\n本記事では、AI初心者の方にもわかりやすいように、1週間分のAI関連ニュースをできるだけ簡潔にまとめています。気になったニュースがあれば、ぜひ一次ソースも確認してみてください。\n\nこの記事はトピック数が多めなので、最初から全部を細かく読む必要はありません。\nまずは「自分の仕事に関係ありそう」と感じた項目だけ拾い読みしても大丈夫です。\n\n特に、資料作成、議事録、動画制作、コード修正、業務自動化に関心がある方は、該当する見出しから読んでみてください。\n\nこの記事でよく出てくる用語ミニ解説\n\nAIエージェント:人の指示を受けて、調査・資料作成・コード修正などの作業を進めるAIのことです。\n\nAPI:アプリやサービス同士をつなぐための仕組みです。開発者向けの利用方法と考えると分かりやすいです。\n\nMCP:AIが外部ツールやデータに接続しやすくするための仕組みです。\n\nデプロイ:作ったAIやアプリを、実際に使える状態で公開・運用することです。\n\nクレジット制:使った分だけポイントを消費する料金方式です。動画生成AIでよく使われます。\n\n難しい言葉も出てきますが、細かい技術理解よりも「自分の作業にどう関係するか」を見ていけば大丈夫です。\n\n目次\nこの記事でよく出てくる用語ミニ解説\n🔁 モデル・バージョンアップ\n【Pollo AI】【Pollo 3.0】一貫キャラクター・カメラ制御・マルチショット生成を訴求(04/07)\n【Google DeepMind】【Gemma 4】小型でも高性能なオープンモデルとして発表、公式SNSでも反響を紹介(04/10)\n【Liquid AI】【LFM2.5-VL-450M】エッジ向けリアルタイム視覚言語モデルを公開(04/09)\n【PixVerse】【PixVerse C1】映画制作向け初モデルをリリース(04/08)\n【Suno】【v5.5】新音楽モデルを発表、公式SNSでも改めて紹介(04/08)\n🔌 モデル対応アップデート\n【Alibaba Qwen】【Qwen3.6-Plus】OpenRouterで好調、本番API利用を訴求(04/08)\n【Clawi】【主要LLM対応】Claude・GPT・Gemini・Qwenなど複数モデルを統合(04/05)\nすべて表示\n🔁 モデル・バージョンアップ\n【Pollo AI】【Pollo 3.0】一貫キャラクター・カメラ制御・マルチショット生成を訴求(04/07)\n\nPollo 3.0のローンチが告知されました。\n\n一貫したキャラクター、精密なプロンプト、カメラ/モーション制御、マルチショットストーリーテリングが特徴です。\n\n1回の生成で、より映像作品らしい構成を作れることをアピールしています。\n\n▶️ ポイント:\n\n動画生成で難しかった「同じキャラを保つ」「複数カットをつなぐ」作業を、より簡単にする方向のアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/itsPolloAI/status/2041450652963066262\n・補足・関連情報: https://x.com/itsPolloAI/status/2041450656364716237\n・公式サイト: https://pollo.ai/\n\n💳 料金・プラン:\n\n・公式料金ページ: https://pollo.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可、生成はクレジット制\n・補足:Pollo AIは無料で始められます。ただし、生成にはクレジットを消費し、無料枠では透かし、生成回数、速度、出力品質などに制限がある場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://pollo.ai/\n\n【Google DeepMind】【Gemma 4】小型でも高性能なオープンモデルとして発表、公式SNSでも反響を紹介(04/10)\n\nGemma 4が、サイズ以上の性能を発揮するオープンモデルとして紹介されました。\n\n公式ブログ上の発表日は2026年4月2日で、4月10日の公式SNSでは公開初週の反響も紹介されています。\n\nGoogleの公式情報では、Gemma 4はApache 2.0ライセンスで公開されています。\n\n▶️ ポイント:\n\n軽量モデルでも高性能化が進むことで、ローカル環境や低コスト環境でも実用的なAI活用が広がります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleDeepMind/status/2042283481640615944\n・公式ブログ: https://blog.google/innovation-and-ai/technology/developers-tools/gemma-4/\n・Google Open Source Blog: https://opensource.googleblog.com/2026/03/gemma-4-expanding-the-gemmaverse-with-apache-20.html\n・モデルページ: https://deepmind.google/models/gemma/gemma-4/\n・モデルカード: https://ai.google.dev/gemma/docs/core/model_card_4\n\n💳 料金・プラン:\n\n・公式モデルページ: https://deepmind.google/models/gemma/gemma-4/\n・Google AI Studio: https://aistudio.google.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:Gemma 4はApache 2.0ライセンスのオープンモデルとして公開されています。商用利用を含む詳しい条件は、公式モデルカードとライセンスを確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://aistudio.google.com/\n・モデルページ: https://deepmind.google/models/gemma/gemma-4/\n\n【Liquid AI】【LFM2.5-VL-450M】エッジ向けリアルタイム視覚言語モデルを公開(04/09)\n\nLFM2.5-VL-450Mが、エッジデバイス向けの視覚言語モデルとして発表されました。\n\n512×512画像を約240msで処理し、4FPSのビデオストリーム推論にも対応すると説明されています。\n\nバウンディングボックス予測、多言語視覚理解、関数呼び出し、Jetsonやスマホなどでの実行が紹介されています。\n\n▶️ ポイント:\n\nクラウドに送らず、端末側で画像理解AIを動かしやすくする発表です。監視、ロボット、モバイルアプリなどへの応用が期待できます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/liquidai/status/2041912441060143251\n・補足・関連情報: https://x.com/liquidai/status/2041912454020542565\n・公式ブログ: https://www.liquid.ai/blog/lfm2-5-vl-450m\n・Hugging Face: https://huggingface.co/LiquidAI/LFM2.5-VL-450M\n\n💳 料金・プラン:\n\n・Hugging Faceモデルページ: https://huggingface.co/LiquidAI/LFM2.5-VL-450M\n・Liquid AI公式サイト: https://www.liquid.ai/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:モデルはHugging Faceで公開されています。ローカル実行や研究利用は可能ですが、商用利用・再配布・派生モデル作成などの条件は、公式モデルカードとライセンスを確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Hugging Face: https://huggingface.co/LiquidAI/LFM2.5-VL-450M\n・公式ブログ: https://www.liquid.ai/blog/lfm2-5-vl-450m\n\n【PixVerse】【PixVerse C1】映画制作向け初モデルをリリース(04/08)\n\nPixVerse C1が、映画制作向けの初モデルとして発表されました。\n\n1080p、15秒、ネイティブオーディオ対応が特徴です。\n\nWebアプリでの試用リンクも案内されています。\n\n▶️ ポイント:\n\nAI動画生成が短いクリップだけでなく、音声付きの映像制作に近づいていることを示す発表です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/PixVerse_/status/2041536108660740162\n・試用リンク導線: https://x.com/PixVerse_/status/2041536112511033375\n・公式ドキュメント: https://docs.platform.pixverse.ai/\n・モデル料金: https://docs.platform.pixverse.ai/model-pricing-796039m0\n\n💳 料金・プラン:\n\n・公式料金ドキュメント: https://docs.platform.pixverse.ai/model-pricing-796039m0\n・課金ページ: https://platform.pixverse.ai/billing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ クレジット制\n・補足:PixVerse Platformではモデルごとのクレジット消費が設定されています。無料クレジットや新規特典が提供される場合もありますが、C1を継続利用する場合はクレジット消費・有料購入が前提になる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://app.pixverse.ai/\n・開発者向けPlatform: https://platform.pixverse.ai/\n\n【Suno】【v5.5】新音楽モデルを発表、公式SNSでも改めて紹介(04/08)\n\nSunoが新モデル「v5.5」を発表しました。公式ブログ上の発表日は2026年3月26日で、4月8日の投稿ではこの新モデルが改めて紹介されています。\n\nv5.5では、Voices、Custom models、My Tasteなど、ユーザーの声・好み・制作スタイルに合わせる機能が強化されています。\n\n有料プランでは、より高性能なモデルや編集ツール、Voices/Custom modelsなどの高度な機能を利用できる構成になっています。\n\n▶️ ポイント:\n\n音楽生成AIでも、単に“曲を作る”だけでなく、自分の声や好みに合わせて制作するパーソナライズ競争が進んでいます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/suno/status/2041541160015937995\n・公式ブログ: https://suno.com/blog/v5-5\n・公式料金ページ: https://suno.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://suno.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ v5.5の本格利用は有料プラン中心\n・補足:Sunoには無料プランがありますが、v5.5やVoices、Custom modelsなどの高度な機能はPro/Premier向けとして案内されています。無料プランでは使えるモデルや機能に制限があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://suno.com/\n\n🔌 モデル対応アップデート\n【Alibaba Qwen】【Qwen3.6-Plus】OpenRouterで好調、本番API利用を訴求(04/08)\n\nQwen3.6-PlusがOpenRouterのデイリー・ウィークリー・トレンディングチャートで好調だったことが報告されました。\n\n投稿では、トライアル期間が終了し、本番稼働済みであることがアナウンスされています。\n\n低遅延、高い推論性能、低コストを特徴として、API統合を呼びかけています。\n\nQwen Codeのアップデートとは異なり、こちらは「Qwen3.6-PlusというモデルをAPI経由で使う」こと自体が主題です。\n\n▶️ ポイント:\n\nQwen3.6-Plusは、OpenRouter経由で利用できる実運用向けモデルとして存在感を高めています。開発者にとっては、コスト・速度・推論性能のバランスを見ながら採用候補にできるモデル選択肢です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Alibaba_Qwen/status/2041871541080924477\n・OpenRouterモデルページ: https://openrouter.ai/qwen/qwen3.6-plus\n\n💳 料金・プラン:\n\n・OpenRouterモデル料金: https://openrouter.ai/qwen/qwen3.6-plus\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 原則API課金\n・補足:OpenRouterではモデルごとに入力・出力トークン単価が表示されます。無料提供や一時的なプロモーションがある場合でも、本番利用ではAPI従量課金の確認が必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・OpenRouter: https://openrouter.ai/qwen/qwen3.6-plus\n\n【Clawi】【主要LLM対応】Claude・GPT・Gemini・Qwenなど複数モデルを統合(04/05)\n\nClawiでClaude、GPT、Geminiなど20以上のモデルをサブスクリプション内で利用できると紹介されました。\n\nQwen 3.6 Plusを含むモデル提供や、追加API費用なしの使い方が訴求されています。\n\nモデルプロバイダーにロックインされない点を強調しています。\n\n▶️ ポイント:\n\n1つのサービス内で複数モデルを切り替えられると、用途ごとに得意なAIを選びやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/ClawiAi/status/2040499750269534496\n・補足・関連情報: https://x.com/ClawiAi/status/2040805959216374039\n・公式サイト: https://clawi.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://clawi.ai/\n・補足:公式サイトではBasic、Pro、Ultraの有料プランが掲載されています。\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Clawiはクラウド上でAIエージェントを動かす有料サービスです。モデル利用、メッセンジャー連携、エージェントリソースなどがプランによって異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・公式サイト: https://clawi.ai/\n\n【Freepik】【Seedance 2.0】日本・全プランへ提供範囲を拡大(04/05〜04/10)\n\nSeedance 2.0が日本で正式利用可能になり、当初はBusiness/Enterprise向けとして紹介されました。\n\nその後、Freepik全プランで利用可能になったと発表されています。\n\nプロンプト作成記事や、1プロンプトで映画的動画を作る解説も共有されています。\n\n▶️ ポイント:\n\n動画生成モデルの提供範囲が広がることで、専門ユーザーだけでなく一般クリエイターも試しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/freepik/status/2040766188607946822\n・公式SNS: https://x.com/freepik/status/2042316920352096558\n・補足・関連情報: https://x.com/freepik/status/2042607677805670686\n・公式料金ページ: https://www.freepik.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.freepik.com/pricing\n・Seedance 2.0ページ: https://www.freepik.com/seedance-2\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 全プラン対応だがクレジット制\n・補足:Freepikには無料プランがありますが、Seedance 2.0はクレジット消費型の動画生成モデルとして扱われています。無料プランでの利用量、解像度、生成回数は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.freepik.com/\n・Seedance 2.0: https://www.freepik.com/seedance-2\n\n【Gamma】【Connector Suite】OpenAI・Claude・Zapier・n8nなどと連携(04/08)\n\nGamma向けの新コネクタースイートが発表されました。\n\nOpenAI、Claude、Zapier、Make、n8n、Atlassian Rovo、Superhuman Go、Gleanなどとの統合が紹介されています。\n\nさまざまな業務ツールからプレゼン生成につなげられる点が特徴です。\n\n▶️ ポイント:\n\n資料作成AIが単体ツールから、既存業務ツールの中で動く存在へ近づいています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GammaApp/status/2041562184082505863\n・コネクター公式ドキュメント: https://developers.gamma.app/connectors/connectors-and-integrations\n・公式料金ページ: https://gamma.app/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://gamma.app/pricing\n・API/連携の料金説明: https://developers.gamma.app/get-started/access-and-pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料プランでも一部利用可能\n・補足:Gammaには無料プランがあります。ChatGPT、Claude、Superhuman Go、Atlassian Rovo連携は全Gammaプランで利用可能と案内されています。一方で、Zapier、Make、n8n、API連携などはAPIキーや有料条件が関係する場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://gamma.app/\n\n【Gamma】【Atlassian/Rovo】Confluenceからプレゼン生成に対応(04/10)\n\nGammaがAtlassianと連携し、Confluence内のパートナーエージェントとして統合されたと発表されました。\n\nRovoチャットからページ、議事録、ステータス更新をもとにプレゼンを生成できると説明されています。\n\nチーム内のナレッジを資料化しやすくするアップデートです。\n\n▶️ ポイント:\n\n社内ドキュメントをそのままプレゼンに変換できるため、会議資料や報告資料の作成時間を減らせます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GammaApp/status/2042259992670011651\n・Gamma連携ページ: https://gamma.app/integrations/atlassian-rovo\n・Atlassian関連情報: https://www.atlassian.com/ja/blog/rovo-remix-3p-agents-confluence\n\n💳 料金・プラン:\n\n・Gamma料金ページ: https://gamma.app/pricing\n・Atlassian料金ページ: https://www.atlassian.com/software/confluence/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Gamma側は無料プランあり、Rovo/Confluence側は別途条件あり\n・補足:Gamma自体には無料プランがあります。ただし、Confluence・Rovo連携を実際に使うには、Atlassian側の対象プランや組織設定が関係する可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gamma: https://gamma.app/\n・Gamma × Atlassian Rovo: https://gamma.app/integrations/atlassian-rovo\n\n【Firebase】【Kiro】Firebase MCPサーバーをワンクリック導入可能に(04/09)\n\nFirebaseがKiroの公式Powerになったと発表されました。\n\nFirebase MCPサーバーをKiroにワンクリックでインストールできると説明されています。\n\nAI開発環境からFirebase機能へ接続しやすくなる更新です。\n\n▶️ ポイント:\n\nMCP連携により、AI IDEやエージェントがFirebaseの情報・機能を扱いやすくなります。\n初心者向けに言うと、「AI開発ツールからFirebaseを使いやすくする接続機能」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Firebase/status/2041942967284293774\n・Kiro Powers: https://kiro.dev/powers/\n・Firebase料金: https://firebase.google.com/pricing\n\n💳 料金・プラン:\n\n・Kiro料金ページ: https://kiro.dev/pricing/\n・Firebase料金ページ: https://firebase.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:KiroにはFree tierがあり、Firebaseにも無料のSparkプランがあります。ただし、Firebaseの一部機能や利用量増加時はBlazeプランの従量課金が必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Kiro: https://kiro.dev/\n・Firebase: https://firebase.google.com/\n\n【Google】【Gemini 3.1 Pro】Augment Codeのモデルピッカーで利用可能に(04/07)\n\nGemini 3.1 ProがAugment Codeのモデルピッカーで利用可能になったと紹介されました。\n\n大規模コードベースの変更を効率化できると訴求されています。\n\n高性能・低コストのコード支援モデルとしての利用が期待されます。\n\n▶️ ポイント:\n\nコーディング支援ツールで使えるモデルが増えると、開発者はタスクに合うAIを選びやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googleaidevs/status/2041213569354604630\n・Augment公式ブログ: https://www.augmentcode.com/blog/gemini-3-1-pro-now-available-in-augment-code\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n💳 料金・プラン:\n\n・Augment Code: https://www.augmentcode.com/\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン/有料API中心\n・補足:Gemini 3.1 ProはAugment Code内のモデル選択肢として提供されます。利用にはAugment Code側の契約条件が関係します。また、Gemini APIではPro系モデルが無料Tier対象外として表示される場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Augment Code: https://www.augmentcode.com/\n\n【LangChain】【LangSmith Fleet】Arcadeの7,500以上のMCPツールに対応(04/08)\n\nArcade社の7,500以上のエージェント最適化MCPツールが、LangSmith Fleetで利用可能になりました。\n\nSalesforce、GitHub、Zendesk、Asanaなど、多数のサービスへ安全接続できると紹介されています。\n\nエージェントが外部業務ツールを操作する範囲が広がります。\n\n▶️ ポイント:\n\nAIエージェントに「使える道具」が増えるほど、実務自動化の幅が広がります。\nたとえば、営業管理、問い合わせ対応、タスク管理などをAIが扱いやすくなるイメージです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041557866365251588\n・LangChain料金ページ: https://www.langchain.com/pricing\n\n💳 料金・プラン:\n\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料枠あり、Fleet本格利用は有料プラン確認が必要\n・補足:LangSmithにはDeveloper向け無料枠があります。ただし、Fleetエージェント数や本番運用、Arcade連携の利用条件はプランごとに異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・LangSmith: https://smith.langchain.com/\n・LangChain: https://www.langchain.com/\n\n【Manus】【Manus for Slack】Slack内DMからエージェントを利用可能に(04/07)\n\nManus for Slackが発表されました。\n\nSlack内DMでManusエージェントを使い、チャット上のアイデアや意思決定を実行へつなげられると説明されています。\n\nFAQでは、有料Slackプラン、セキュリティ、チャンネル権限、プライベートメッセージの扱いにも触れています。\n\n▶️ ポイント:\n\nSlackの会話をそのままAIエージェントへの仕事依頼に変えられるため、業務の流れを止めにくくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/ManusAI_JP/status/2041337705452442005\n・補足・関連情報: https://x.com/ManusAI_JP/status/2041337772439667116\n・設定リンク導線: https://x.com/ManusAI_JP/status/2041337784716460512\n・公式ブログ: https://manus.im/blog/manus-your-partner-on-slack\n\n💳 料金・プラン:\n\n・Manus料金ページ: https://manus.im/pricing\n・Slack料金ページ: https://slack.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料Slackプランが必要\n・補足:Manus for SlackのFAQでは、有料Slackプランが必要と説明されています。Manus本体には無料トライアル案内がありますが、Slack連携の実利用条件はManusとSlack双方のプラン確認が必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Manus: https://manus.im/\n・Slack連携ドキュメント: https://manus.im/docs/integrations/slack-integration\n\n【Medeo】【Seedance 2.0】Medeo x Seedance 2.0提携を発表(04/10)\n\nMedeoがSeedance 2.0との提携を発表しました。\n\n初月$6で利用可能とされ、シネマティックビジュアル、マルチモーダル入力、ネイティブサウンドが特徴として紹介されています。\n\n動画生成モデルをMedeo上で使えるようにするモデル対応アップデートです。\n\n▶️ ポイント:\n\n人気動画生成モデルが複数サービスに広がることで、ユーザーは使い慣れた制作環境から試せるようになります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Medeo_AI/status/2042256470247403864\n・公式料金ページ: https://www.medeo.app/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.medeo.app/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Seedance 2.0利用は有料/クレジット対象の可能性が高い\n・補足:MedeoにはFreeプランがあります。ただし、Seedance 2.0などの高性能動画モデルはクレジット消費や有料プラン対象になる可能性があるため、無料プランでどこまで使えるかはアプリ内表示を確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.medeo.app/\n\n【Perplexity】【Computer × Plaid】金融口座連携に対応(04/10)\n\nPerplexity ComputerがPlaidと連携し、銀行口座・クレジットカード・ローンをリンク可能になったと発表されました。\n\n支出追跡、予算ツール作成、投資ポートフォリオと並べた純資産可視化に対応すると説明されています。\n\nComputerタスクはPro/Maxサブスクライバー限定とされています。\n\n▶️ ポイント:\n\nAIが個人の金融データを扱うことで、家計管理や資産把握を対話的に行える可能性があります。\n便利な一方で、お金に関わる情報を連携するため、権限やセキュリティ確認は特に大切です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/perplexity_ai/status/2042256932397019368\n・補足・関連情報: https://x.com/perplexity_ai/status/2042256944426364931\n・公式サイト: https://www.perplexity.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://www.perplexity.ai/\n・Pro: https://www.perplexity.ai/pro\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 一部有料プランのみ\n・補足:口座連携やページ閲覧は全ユーザー向けとされていますが、ComputerタスクはPro/Maxサブスクライバー限定と説明されています。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.perplexity.ai/\n\n【Lovart】【Seedance 2.0】Lovart上でSeedance 2.0対応を告知(04/10)\n\nLovartでSeedance 2.0が使えるようになったと複数投稿で告知されました。\n\n「発想から完成まで一気に実現できる」制作環境として訴求されています。\n\n動画作例を通じて、Lovart上でのSeedance 2.0活用が紹介されています。\n\n▶️ ポイント:\n\n画像・動画制作プラットフォームに動画生成モデルが追加されることで、制作フローの中で直接動画化しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/lovart_jp/status/2042512912070095242\n・補足・関連情報: https://x.com/lovart_jp/status/2042535558988095586\n・補足・関連情報: https://x.com/lovart_jp/status/2042558213749432348\n・Seedanceページ: https://www.lovart.ai/features/online-multimodal-ai-creator-seedance\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.lovart.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Seedance利用はクレジット/対象プラン確認が必要\n・補足:Lovartには無料プランがあります。ただし、Seedance 2.0の利用枠、生成回数、クレジット消費は公式料金ページとアプリ内表示で確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.lovart.ai/\n\n【Runway】【Seedance 2.0】Runwayに搭載、全有料プランへ拡大(04/07〜04/10)\n\nSeedance 2.0がRunwayに搭載されました。\n\nテキスト・画像・動画・音声を入力として、複数ショットの動画シーケンスを生成できると説明されています。\n\nその後、米国を含む全有料プランで利用可能になったと告知されました。\n\n使い方記事も共有されています。\n\n▶️ ポイント:\n\nRunway利用者は、既存の制作環境の中でSeedance 2.0を使えるようになり、動画生成モデルの選択肢が広がります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/runwayml/status/2041517519664463940\n・公式SNS: https://x.com/runwayml/status/2042336701557703020\n・補足・関連情報: https://x.com/runwayml/status/2041872715640914095\n・公式料金ページ: https://runwayml.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://runwayml.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プランのみ\n・補足:投稿では全有料プランで利用可能と説明されています。Runwayには無料プランもありますが、Seedance 2.0の利用は有料プラン対象として扱うのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://runwayml.com/\n\n【Factory】【Droid】GLM-5.1対応でモデル選択肢を拡大(04/10)\n\nFactoryのDroidでGLM-5.1が使えるようになりました。\n\n高性能・低コスト、長時間セッションでの安定性が訴求されています。\n\n複雑なMCPツール利用にも強いと説明されています。\n\n▶️ ポイント:\n\nコーディングエージェントで使えるモデルが増えると、精度・速度・コストを用途別に調整しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2042399866006192484\n・補足・関連情報: https://x.com/FactoryAI/status/2042399878148735249\n・公式料金ページ: https://factory.ai/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Factoryは有料プラン中心のサービスです。Droidやモデル利用条件はプランごとに異なるため、公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/\n\n【WaveSpeedAI / YouWareAI】動画・画像モデル対応とAI開発体験を連続更新(04/05〜04/11)\n\nWaveSpeedAIでは、Wan 2.7 Video、LipSync-3、Kling Advanced Elements、Ideogram V3、JoyAI Image Edit、Vidu Q3 Reference-to-Videoなどの対応が紹介されました。\n\nAI Generatorとして、画像・動画・音声・アバター・3Dをワンプレイスで扱えることも訴求されています。\n\nYouWareAIでは、Credit Care、ビデオ理解、Auto-Fix Mode、モバイルアプリ、オープンリミックス機能が紹介されました。\n\n▶️ ポイント:\n\n生成AIサービスは、単一モデルの性能だけでなく「複数モデルを束ねる制作環境」「失敗を補償する仕組み」「自動修正」まで競争軸が広がっています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・WaveSpeedAI公式SNS: https://x.com/wavespeed_ai/status/2040457860405162391\n・WaveSpeedAI公式SNS: https://x.com/wavespeed_ai/status/2041518044879692097\n・WaveSpeedAI公式SNS: https://x.com/wavespeed_ai/status/2041818472536281558\n・YouWareAI公式SNS: https://x.com/YouWareAI/status/2041212376758862298\n・YouWareAI公式SNS: https://x.com/YouWareAI/status/2041954843766444314\n\n💳 料金・プラン:\n\n・WaveSpeedAI料金ページ: https://wavespeed.ai/pricing\n・YouWareAI公式サイト: https://www.youware.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ WaveSpeedAIは無料クレジットあり、YouWareAIはアプリ内条件に従う形\n・補足:WaveSpeedAIは新規ユーザー向け無料クレジットを案内しています。YouWareAIの各機能提供条件は、公式サイトまたはアプリ内表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・WaveSpeedAI: https://wavespeed.ai/\n・YouWareAI: https://www.youware.com/", "segmentation_method": "reviewed_source_semantics", "label": "开篇:4/5の週は、AIがただ質問に答えるだけでなく、実際の仕事を進める存在へ近づいていることを感じる1週間でした。 — 🔌 モデル対応アップデート", "source_line_range": [ 1, 701 ] }, { "id": "body-region-2", "text": "プロダクト 更 新 qwen qwen code v0 14 系 リモート 操 作 cron jobs qwen3 6 plus 統 合 を 追 加 04 10 qwen code v0 14 0 v0 14 2のリリース 内 容 が 紹 介 されました telegram dingtalk wechatからのリモート 操 作 定 期 aiタスク qwen3 6 plus 統 合 が 追 加 されています サブエージェント 別 モデル 割 り 当 て planモード follow up 提 案 adaptive output tokensなども 含 まれます ポイント コーディングaiが チャット 操 作 定 期 実 行 複 数 エージェント 管 理 まで 含 む 開 発 支 援 基 盤 へ 進 化 しています cron jobsは 決 まった 時 間 に 自 動 実 行 する 仕 組 み と 考 えると 分 かりやすいです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com alibaba qwen status 2042551216769765449 補 足 関 連 情 報 https x com alibaba qwen status 2042551220423004193 補 足 関 連 情 報 https x com alibaba qwen status 2042551230023762081 github https github com qwenlm qwen code 料 金 プラン github https github com qwenlm qwen code openrouter qwen3 6 plus https openrouter ai qwen qwen3 6 plus 無 料 で 使 えるか 利 用 料 金 qwen code 本 体 は 無 料 利 用 可 能 補 足 qwen codeはossとして 利 用 できます ただし qwen3 6 plusなど 外 部 モデル apiを 使 う 場 合 は api 料 金 や 各 プロバイダーの 無 料 枠 が 別 途 関 係 します 今 すぐ 試 す 公 式 リンク github https github com qwenlm qwen code claude cowork 全 有 料 プランでga enterprise 管 理 機 能 も 追 加 04 10 claude coworkが 全 有 料 プランで 一 般 提 供 開 始 されました enterprise 向 けに 役 割 ベースのアクセス 制 御 グループ 支 出 制 限 使 用 状 況 アナリティクス 拡 張 opentelemetryが 追 加 されています macosおよびwindowsで 利 用 可 能 と 案 内 されています ポイント 個 人 利 用 だけでなく 企 業 が 管 理 しながらaiエージェントを 組 織 展 開 しやすくなるアップデートです opentelemetryは 初 心 者 向 けに 言 うと aiがどのように 動 いたかを 追 跡 するための 仕 組 み です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com claudeai status 2042273755485888810 補 足 関 連 情 報 https x com claudeai status 2042273756983226661 ダウンロード 導 線 https x com claudeai status 2042273758208020610 公 式 ブログ https claude com blog cowork for enterprise 料 金 プラン claude 料 金 ページ https claude com pricing 無 料 で 使 えるか 利 用 料 金 有 料 プランのみ 補 足 claude coworkは 全 有 料 プランで 一 般 提 供 と 案 内 されています 無 料 プランで 使 う 機 能 ではなく 有 料 ユーザー 向 けの 業 務 支 援 機 能 として 見 るのがよさそうです 今 すぐ 試 す 公 式 リンク webアプリ https claude ai デスクトップ https claude ai download firecrawl v2 9 0 web 操 作 pdf 処 理 sdkを 強 化 04 08 04 11 firecrawl v2 9 0が 紹 介 されました interactにより スクレイプ 後 にクリック タイピング ナビゲーションなどのブラウザ 操 作 が 可 能 になります pdfハンドリング 強 化 新 スクレイプ 形 式 java sdk opencodeプラグイン 新 sdkなども 含 まれます ポイント web 情 報 を 読 むだけでなく aiエージェントがページ 上 で 操 作 するための 基 盤 が 強 化 されています つまり aiが webページを 見 る だけでなく ボタンを 押 す 入 力 する 方 向 に 近 づいています 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com firecrawl status 2041546687152624049 公 式 sns https x com firecrawl status 2042643323345866856 github releases https github com firecrawl firecrawl releases 公 式 料 金 ページ https www firecrawl dev pricing 料 金 プラン 公 式 料 金 ページ https www firecrawl dev pricing 無 料 で 使 えるか 利 用 料 金 無 料 枠 あり 補 足 firecrawlには 無 料 プランがあり 公 式 料 金 ページでは 無 料 クレジット 枠 が 案 内 されています 大 量 利 用 や 高 レート 利 用 は 有 料 プランが 必 要 です 今 すぐ 試 す 公 式 リンク webアプリ api https www firecrawl dev github https github com firecrawl firecrawl openclaw clawi 2026 4 x 週 次 アップデートでdreaming gemma 4 codexハーネス 等 を 追 加 04 06 04 11 openclaw 2026 4 5では 動 画 音 楽 生 成 dreaming gpt 5 4 移 行 などが 告 知 されました 2026 4 7では 推 論 機 能 音 楽 動 画 編 集 セッション 分 岐 gemma 4 対 応 memory wikiが 紹 介 されています 2026 4 9 4 10では dreaming 改 善 ssrf 強 化 android 連 携 アクティブメモリ mlxトークモード codexハーネスプラグインなどが 追 加 されています clawi 側 からも openclaw 更 新 リリースノート 導 線 が 共 有 されました ポイント openclawは 記 憶 推 論 メディア 生 成 ローカル 実 行 安 全 性 をまとめて 改 善 しており エージェント 基 盤 としての 完 成 度 を 上 げています ssrfはwebサービスの 安 全 性 に 関 わる 対 策 で 初 心 者 の 方 は セキュリティ 改 善 の 一 種 と 見 ておけば 大 丈 夫 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openclaw status 2040998570317197607 公 式 sns https x com openclaw status 2041714270212108657 公 式 sns https x com openclaw status 2042072722902077938 公 式 sns https x com openclaw status 2042811598058742012 補 足 関 連 情 報 https x com clawiai status 2041802797117579511 料 金 プラン openclaw 料 金 ページ https www getopenclaw ai pricing clawi 公 式 サイト https clawi ai 無 料 で 使 えるか 利 用 料 金 セルフホスト 版 は 無 料 cloud clawiは 有 料 中 心 補 足 openclawのセルフホスト 版 は 無 料 で 利 用 できます openclaw cloudやclawiは 有 料 プランが 中 心 です 今 すぐ 試 す 公 式 リンク openclaw https www getopenclaw ai clawi https clawi ai genspark plus pro 5 時 間 ごとのセッション 制 限 を 導 入 04 09 genspark ai chatとai image agentsの 需 要 増 加 に 伴 い plus proプランに5 時 間 ごとのセッション 制 限 が 導 入 されました ウィンドウリセット 後 は 利 用 枠 が 全 回 復 すると 説 明 されています 無 制 限 アクセス 自 体 は 変 わらないと 補 足 されています ポイント 人 気 aiサービスでは 需 要 増 加 に 応 じて 無 制 限 の 中 身 が 利 用 ウィンドウ 制 に 変 わるケースが 増 えています 使 い 放 題 に 見 えるプランでも 実 際 には 時 間 帯 ごとの 上 限 がある 場 合 があります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com genspark japan status 2042191622520390093 ヘルプセンター https www genspark ai helpcenter doc general membership plans 料 金 プラン gensparkヘルプセンター https www genspark ai helpcenter doc general membership plans 無 料 で 使 えるか 利 用 料 金 有 料 プラン 対 象 補 足 今 回 の 制 限 導 入 はplus proプランが 対 象 です 無 料 プランの 利 用 枠 は 公 式 ヘルプセンターやアプリ 内 表 示 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク webアプリ https www genspark ai firebase ai studio 連 携 ハイブリッドai 推 論 などrelease notesを 公 開 04 08 firebase release notes 動 画 で 複 数 の 更 新 が 紹 介 されました firebase in ai studio androidのハイブリッドai 推 論 firestore enterpriseネイティブモードが 含 まれます firebase data connect 無 料 トライアル app hosting 環 境 変 数 firebase studio 提 供 終 了 告 知 も 含 まれます ポイント firebaseがai 開 発 アプリホスティング データ 接 続 の 周 辺 機 能 をまとめて 更 新 しており aiアプリ 開 発 者 に 影 響 があります 初 心 者 向 けに 言 うと aiアプリを 作 るための 裏 側 の 仕 組 み が 強 化 されています 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com firebase status 2041609463350669334 公 式 release notes https firebase google com support releases firebase 料 金 ページ https firebase google com pricing 料 金 プラン firebase 料 金 ページ https firebase google com pricing firebase 料 金 プラン 説 明 https firebase google com docs projects billing firebase pricing plans 無 料 で 使 えるか 利 用 料 金 無 料 sparkプランあり 補 足 firebaseには 無 料 のsparkプランと 従 量 課 金 のblazeプランがあります ai studio 連 携 data connect firestore enterpriseなどは 機 能 ごとに 無 料 枠 や 課 金 条 件 が 異 なります 今 すぐ 試 す 公 式 リンク firebase https firebase google com firebase studio 移 行 ガイドを 公 開 google ai studio antigravityを 移 行 先 に 提 示 04 11 firebase studioプロジェクト 移 行 ガイドが 紹 介 されました ブラウザベースのvibe codingが 好 きだったユーザーには google ai studioへの 移 行 を 推 奨 しています ide 機 能 やエージェント 体 験 ターミナルが 重 要 だったユーザーには antigravityへの 移 行 を 推 奨 しています ポイント firebase studio 終 了 移 行 の 影 響 を 受 けるユーザーにとって 作 業 スタイル 別 に 移 行 先 が 示 された 重 要 な 案 内 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com firebase status 2042626157346992562 補 足 関 連 情 報 https x com firebase status 2042626161604223230 補 足 関 連 情 報 https x com firebase status 2042648134677852593 移 行 ガイド https firebase google com docs studio migrating project 料 金 プラン firebase 料 金 ページ https firebase google com pricing google ai studio https aistudio google com 無 料 で 使 えるか 利 用 料 金 移 行 先 サービスごとに 異 なる 補 足 firebase studioからの 移 行 案 内 です google ai studio antigravity firebaseの 各 機 能 は それぞれ 無 料 枠 有 料 枠 提 供 条 件 が 異 なります 今 すぐ 試 す 公 式 リンク 移 行 ガイド https firebase google com docs studio migrating project google ai studio https aistudio google com google veo 3 1 fast 価 格 引 き 下 げを 告 知 04 08 veo 3 1 fastの 価 格 引 き 下 げが 告 知 されました 動 画 生 成 モデルの 利 用 コストに 関 わる 更 新 です 詳 細 な 新 価 格 や 対 象 apiは 公 式 料 金 情 報 の 確 認 が 必 要 です ポイント 動 画 生 成 の 単 価 が 下 がると 試 作 だけでなく 継 続 的 な 広 告 sns 動 画 制 作 にも 使 いやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googleaidevs status 2041564835662475441 gemini api 料 金 https ai google dev gemini api docs pricing google ai studioモデルページ https aistudio google com models veo 3 料 金 プラン gemini api 料 金 https ai google dev gemini api docs pricing 無 料 で 使 えるか 利 用 料 金 api 有 料 利 用 中 心 補 足 veo 3 1 fastは 動 画 生 成 apiの 価 格 改 定 に 関 する 発 表 です 無 料 枠 や 試 用 可 否 は google ai studioおよびgemini apiの 料 金 表 示 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク google ai studio https aistudio google com google maps platform クレジットカード 不 要 のmaps demo keyを 提 供 04 10 google maps platformで クレジットカード 不 要 のmaps demo keyが 紹 介 されました プロトタイプ 作 成 コード 調 整 アイデア 検 証 に 使 えると 説 明 されています 開 発 開 始 までの 心 理 的 ハードルを 下 げる 更 新 です ポイント 決 済 情 報 なしで 地 図 apiの 試 作 を 始 められるため 個 人 開 発 者 や 学 習 者 が 試 しやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com gmapsplatform status 2042296634864746939 maps demo key https mapsplatform google com maps demo key google maps platform 料 金 https mapsplatform google com pricing 料 金 プラン maps demo key https mapsplatform google com maps demo key google maps platform 料 金 https mapsplatform google com pricing 無 料 で 使 えるか 利 用 料 金 無 料 で 試 用 可 能 補 足 maps demo keyはクレジットカード 不 要 で 試 せるプロトタイプ 向 けキーです 本 番 利 用 や 利 用 制 限 対 応 apiは 公 式 ページの 条 件 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク maps demo key https mapsplatform google com maps demo key google workspace gmail calendar meet スケジュール 調 整 タイムゾーン carplay 対 応 を 更 新 04 09 04 11 google workspace 関 連 の 複 数 アップデートが 公 式 snsで 改 めて 紹 介 されました gmailの スケジュールをお 手 伝 い 機 能 は 公 式 アップデート 上 ではグループスケジューリング 対 応 として 案 内 されています google calendarでは 都 市 名 入 力 でタイムゾーン 設 定 が 可 能 になった 更 新 が 紹 介 されています google meetはapple carplayに 対 応 し 車 内 から 音 声 のみで 会 議 参 加 できるようになりました なお これらは 公 式 sns 投 稿 日 とworkspace updates 上 の 掲 載 日 が 異 なる 場 合 があります ポイント 日 程 調 整 時 差 対 応 移 動 中 の 会 議 参 加 など 日 常 業 務 の 小 さな 面 倒 を 減 らすアップデートです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googleworkspace status 2042226775212589427 公 式 sns https x com googleworkspace status 2042317372170596630 公 式 sns https x com googleworkspace status 2042656865356525855 workspace updates https workspaceupdates googleblog com 料 金 プラン google workspace 料 金 ページ https workspace google com pricing 無 料 で 使 えるか 利 用 料 金 機 能 ごとに 対 象 プランが 異 なる 補 足 google workspaceの 各 機 能 は 個 人 向 けgoogleアカウント workspaceエディション geminiアドオンの 有 無 で 提 供 条 件 が 変 わります 今 すぐ 試 す 公 式 リンク gmail https mail google com google calendar https calendar google com google meet https meet google com notebooklm オーディオ 概 要 プレーヤーにスキップ 速 度 ボタンを 追 加 04 10 notebooklmのオーディオ 概 要 webプレーヤーに 新 しい 操 作 ボタンが 追 加 されました スキップや 速 度 コントロールがしやすくなったと 説 明 されています ユーザーからのフィードバックも 継 続 して 募 集 されています ポイント 長 い 音 声 要 約 を 聞 くときに 必 要 な 部 分 へ 移 動 しやすくなり 学 習 調 査 用 途 で 使 いやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com notebooklm status 2042300158290055189 notebooklmプラン https notebooklm google plans アップグレード 説 明 https support google com notebooklm answer 16213268 料 金 プラン notebooklmプラン https notebooklm google plans 無 料 で 使 えるか 利 用 料 金 無 料 枠 あり 補 足 notebooklmには 無 料 で 使 える 範 囲 があります notebooklm proでは 上 限 拡 大 追 加 機 能 組 織 向 け 機 能 などが 提 供 されます 今 すぐ 試 す 公 式 リンク webアプリ https notebooklm google stitch by google ローンチ 後 の 主 要 バグ 修 正 を 公 開 04 10 stitch by googleが ローンチ 後 に 修 正 した 主 要 バグを 公 開 しました デザインシステムの 尊 重 design md 同 期 キャンバスレイアウト 改 善 直 接 編 集 の 滑 らか 化 が 含 まれます プロジェクト 命 名 バグ 修 正 やui 洗 練 も 紹 介 されています ポイント デザイン 生 成 aiは 生 成 品 質 だけでなく 既 存 のデザインルールを 守 れるか が 実 務 利 用 の 鍵 になります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com stitchbygoogle status 2042283938203517188 公 式 サイト https stitch withgoogle com 料 金 ページ https stitch withgoogle com pricing 料 金 プラン stitch 料 金 ページ https stitch withgoogle com pricing 無 料 で 使 えるか 利 用 料 金 利 用 可 能 だが 提 供 条 件 上 限 料 金 は 公 式 表 示 に 従 う 補 足 stitchは 公 式 サイト 上 で 利 用 可 能 です ただし 提 供 地 域 利 用 上 限 将 来 的 な 料 金 変 更 は 公 式 ページの 表 示 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク webアプリ https stitch withgoogle com langchain langsmith コストアラートとclaude agent sdkトレーシングを 強 化 04 07 04 10 langsmithにコストアラート 機 能 が 導 入 されました エージェントが 予 算 を 超 えた 際 に 通 知 を 受 け 取 れるようになります claude agent sdkトレーシングも 強 化 され サブエージェントやmcpツール 内 の 子 ラン コスト 追 跡 が 可 能 になりました ポイント 本 番 エージェント 運 用 では 動 いたかどうかだけでなく いくら 使 ったか どこで 失 敗 したか を 追 えることが 重 要 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com langchain status 2041236011439771648 公 式 sns https x com langchain status 2042282725084971380 langsmith 料 金 ページ https www langchain com pricing 料 金 プラン langsmith 料 金 ページ https www langchain com pricing 無 料 で 使 えるか 利 用 料 金 無 料 枠 あり 機 能 ごとに 対 象 プラン 確 認 が 必 要 補 足 langsmithにはdeveloper 向 け 無 料 枠 があります コストアラートや 本 番 向 け 監 視 機 能 の 対 象 プランは 公 式 料 金 ページで 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク langsmith https smith langchain com langchain langsmith deployments deep agents deploy a2a mcp agent protocol 対 応 を 拡 充 04 09 04 10 langsmith deploymentsで a2aプロトコル 対 応 のエージェントデプロイが 紹 介 されました deep agents deployベータ 版 も 発 表 され オープンソースエージェントハーネスを 本 番 環 境 へ 素 早 くデプロイできると 説 明 されています mcp a2a agent protocolでエージェントを 公 開 でき 短 期 長 期 メモリも 扱 えるとされています ポイント エージェントを 実 験 から 本 番 運 用 へ 移 すための 配 備 接 続 記 憶 の 土 台 が 整 いつつあります a2aは aiエージェント 同 士 をつなぐ 仕 組 み と 考 えると 分 かりやすいです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com langchain status 2041908977642967322 公 式 sns https x com langchain status 2042268554364592543 補 足 関 連 情 報 https x com langchain status 2042268562908426584 公 式 ブログ https www langchain com blog deep agents deploy an open alternative to claude managed agents 料 金 プラン langsmith 料 金 ページ https www langchain com pricing 無 料 で 使 えるか 利 用 料 金 開 発 用 無 料 枠 あり 本 番 デプロイは 有 料 条 件 あり 補 足 langsmithには 無 料 のdeveloper 枠 がありますが deploymentsや 本 番 運 用 はデプロイ 実 行 稼 働 時 間 などの 課 金 が 関 係 します 今 すぐ 試 す 公 式 リンク langsmith https smith langchain com magicpath モバイル 共 有 時 に 公 開 ファイル 内 プロトタイプ 一 覧 表 示 へ 対 応 04 07 magicpathで 公 開 ファイルをモバイル 共 有 した 際 の 表 示 機 能 が 更 新 されました ファイル 内 の 全 プロトタイプを リスト 形 式 またはフィード 形 式 で 一 覧 表 示 できるようになったと 説 明 されています プロトタイプ 共 有 時 の 閲 覧 体 験 を 改 善 する 機 能 です ポイント モバイルからでも 複 数 プロトタイプを 見 つけやすくなり レビューや 共 有 がスムーズになります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com magicpathai status 2041529502061232400 料 金 プラン https www magicpath ai documentation help plans 料 金 プラン 料 金 プラン https www magicpath ai documentation help plans 無 料 で 使 えるか 利 用 料 金 無 料 枠 の 有 無 共 有 機 能 の 条 件 はプランに 依 存 補 足 magicpathの 公 開 共 有 機 能 プロトタイプ 数 クレジット チーム 利 用 などはプランごとに 制 限 される 可 能 性 があります 利 用 前 に 公 式 プラン 表 示 を 見 るのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https www magicpath ai openclaw anthropicのclaudeサブスク 適 用 停 止 を 報 告 04 06 openclawが anthropicがサードパーティハーネスへのclaudeサブスクリプション 適 用 を 停 止 したと 報 告 しました apiキーや 代 替 llmへの 移 行 が 案 内 されています サードパーティツール 経 由 でclaudeを 使 っていたユーザーには 影 響 がある 可 能 性 があります ポイント aiツールの 利 用 条 件 は 突 然 変 わることがあるため apiキー 運 用 や 代 替 モデルの 準 備 が 重 要 です 初 心 者 の 方 は 外 部 ツール 経 由 でaiを 使 う 場 合 契 約 条 件 が 変 わることもある と 覚 えておくとよさそうです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openclaw status 2041002065174888578 openclaw 料 金 ページ https www getopenclaw ai pricing 関 連 報 道 https www theverge com ai artificial intelligence 907074 anthropic openclaw claude subscription ban 料 金 プラン openclaw 料 金 ページ https www getopenclaw ai pricing anthropic api 料 金 https www anthropic com pricing 無 料 で 使 えるか 利 用 料 金 openclaw 自 体 はセルフホスト 無 料 claude 利 用 はapi 課 金 が 必 要 になる 可 能 性 補 足 openclawのセルフホスト 版 は 無 料 ですが claudeを 使 う 場 合 はclaudeサブスクではなくapiキーや 従 量 課 金 が 必 要 になる 可 能 性 があります 今 すぐ 試 す 公 式 リンク openclaw https www getopenclaw ai openai codex chatgptプランとcodex 利 用 量 を 更 新 04 10 openaiが chatgpt pro plusのcodex 利 用 拡 充 に 向 けたサブスクリプション 更 新 を 発 表 しました 月 額 100のproティア 導 入 plusの5 倍 のcodex 利 用 量 が 紹 介 されています 既 存 200 pro tierは 最 高 利 用 量 オプションとして 継 続 し 5 月 31 日 までcodexプロモーションも 延 長 されると 説 明 されています ポイント codexをたくさん 使 う 開 発 者 向 けに 利 用 量 別 のプラン 設 計 が 細 かくなっています ただし codex 自 体 は 無 料 プランでも 制 限 付 きで 試 せるため 本 格 利 用 するなら 有 料 プラン という 見 方 が 近 いです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openai status 2042295688323875316 補 足 関 連 情 報 https x com openai status 2042295690382995789 補 足 関 連 情 報 https x com openai status 2042296046009626989 codex 料 金 https developers openai com codex pricing 料 金 プラン chatgpt 料 金 ページ https openai com chatgpt pricing codex 料 金 https developers openai com codex pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランでも 制 限 付 きで 利 用 可 能 利 用 量 拡 大 はplus pro 中 心 補 足 codexはchatgpt 無 料 版 でも 制 限 付 きで 試 せます ただし 長 時 間 の 開 発 作 業 や 高 頻 度 利 用 では plus proなどの 有 料 プランで 利 用 量 が 拡 大 します 今 すぐ 試 す 公 式 リンク chatgpt https chatgpt com codex https developers openai com codex openai devs codex 旧 モデル 廃 止 と 新 対 応 モデルを 告 知 04 08 4 月 14 日 以 降 chatgptアカウントでcodexにサインインする 際 古 いcodexモデルが 廃 止 されると 告 知 されました gpt 5 2 codex gpt 5 1 codex mini gpt 5 1 gpt 5などが 対 象 として 挙 げられています 以 降 はgpt 5 4 gpt 5 4 mini gpt 5 3 codexなどがサポートされると 案 内 されています ポイント 開 発 ワークフローで 固 定 モデルを 使 っている 場 合 モデル 廃 止 により 設 定 変 更 や 検 証 が 必 要 になる 可 能 性 があります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openaidevs status 2041610989607727164 補 足 関 連 情 報 https x com openaidevs status 2041611001410593163 codex changelog https developers openai com codex changelog 料 金 プラン codex 料 金 https developers openai com codex pricing chatgpt 料 金 ページ https openai com chatgpt pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランでも 制 限 付 きで 利 用 可 能 利 用 量 はプランにより 異 なる 補 足 この 話 題 は 無 料 か 有 料 か よりも 古 いモデルから 新 しい 対 応 モデルへ 移 行 する 話 です codex 自 体 は 無 料 プランでも 試 せますが 利 用 量 や 使 えるモデルはプランによって 変 わります 今 すぐ 試 す 公 式 リンク codex https developers openai com codex factory fast mode fastコマンドで 高 速 モードを 提 供 04 07 factoryが fast コマンドでfast modeを 有 効 化 できる 機 能 を 紹 介 しました opus 4 6 gpt 5 4 gpt 5 3 codexに 対 応 するとされています スピードとインテリジェンスを 両 立 することを 訴 求 しています ポイント コーディングエージェントで 速 く 返 してほしい 作 業 と 深 く 考 えてほしい 作 業 を 切 り 替 えやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com factoryai status 2041211942602522692 公 式 料 金 ページ https factory ai pricing 料 金 ドキュメント https docs factory ai pricing 料 金 プラン 公 式 料 金 ページ https factory ai pricing 無 料 で 使 えるか 利 用 料 金 有 料 プラン 中 心 補 足 factoryは 有 料 プラン 中 心 のサービスです fast modeの 対 象 プラン 対 象 モデル 利 用 量 制 限 は 公 式 料 金 ページで 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https factory ai", "source_text": "⚙️ プロダクト更新\n【Qwen】【Qwen Code v0.14系】リモート操作・Cron Jobs・Qwen3.6-Plus統合を追加(04/10)\n\nQwen Code v0.14.0〜v0.14.2のリリース内容が紹介されました。\n\nTelegram/DingTalk/WeChatからのリモート操作、定期AIタスク、Qwen3.6-Plus統合が追加されています。\n\nサブエージェント別モデル割り当て、/planモード、Follow-up提案、Adaptive Output Tokensなども含まれます。\n\n▶️ ポイント:\n\nコーディングAIが、チャット操作・定期実行・複数エージェント管理まで含む開発支援基盤へ進化しています。\nCron Jobsは「決まった時間に自動実行する仕組み」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Alibaba_Qwen/status/2042551216769765449\n・補足・関連情報: https://x.com/Alibaba_Qwen/status/2042551220423004193\n・補足・関連情報: https://x.com/Alibaba_Qwen/status/2042551230023762081\n・GitHub: https://github.com/QwenLM/qwen-code\n\n💳 料金・プラン:\n\n・GitHub: https://github.com/QwenLM/qwen-code\n・OpenRouter Qwen3.6-Plus: https://openrouter.ai/qwen/qwen3.6-plus\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ Qwen Code本体は無料利用可能\n・補足:Qwen CodeはOSSとして利用できます。ただし、Qwen3.6-Plusなど外部モデル/APIを使う場合は、API料金や各プロバイダーの無料枠が別途関係します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・GitHub: https://github.com/QwenLM/qwen-code\n\n【Claude】【Cowork】全有料プランでGA、Enterprise管理機能も追加(04/10)\n\nClaude Coworkが全有料プランで一般提供開始されました。\n\nEnterprise向けに、役割ベースのアクセス制御、グループ支出制限、使用状況アナリティクス、拡張OpenTelemetryが追加されています。\n\nmacOSおよびWindowsで利用可能と案内されています。\n\n▶️ ポイント:\n\n個人利用だけでなく、企業が管理しながらAIエージェントを組織展開しやすくなるアップデートです。\nOpenTelemetryは、初心者向けに言うと「AIがどのように動いたかを追跡するための仕組み」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/claudeai/status/2042273755485888810\n・補足・関連情報: https://x.com/claudeai/status/2042273756983226661\n・ダウンロード導線: https://x.com/claudeai/status/2042273758208020610\n・公式ブログ: https://claude.com/blog/cowork-for-enterprise\n\n💳 料金・プラン:\n\n・Claude料金ページ: https://claude.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プランのみ\n・補足:Claude Coworkは全有料プランで一般提供と案内されています。無料プランで使う機能ではなく、有料ユーザー向けの業務支援機能として見るのがよさそうです。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://claude.ai/\n・デスクトップ: https://claude.ai/download\n\n【Firecrawl】【v2.9.0】Web操作・PDF処理・SDKを強化(04/08〜04/11)\n\nFirecrawl v2.9.0が紹介されました。\n\n/interactにより、スクレイプ後にクリック・タイピング・ナビゲーションなどのブラウザ操作が可能になります。\n\nPDFハンドリング強化、新スクレイプ形式、Java SDK、OpenCodeプラグイン、新SDKなども含まれます。\n\n▶️ ポイント:\n\nWeb情報を読むだけでなく、AIエージェントがページ上で操作するための基盤が強化されています。\nつまり、AIが「Webページを見る」だけでなく「ボタンを押す」「入力する」方向に近づいています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/firecrawl/status/2041546687152624049\n・公式SNS: https://x.com/firecrawl/status/2042643323345866856\n・GitHub Releases: https://github.com/firecrawl/firecrawl/releases\n・公式料金ページ: https://www.firecrawl.dev/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.firecrawl.dev/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:Firecrawlには無料プランがあり、公式料金ページでは無料クレジット枠が案内されています。大量利用や高レート利用は有料プランが必要です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ/API: https://www.firecrawl.dev/\n・GitHub: https://github.com/firecrawl/firecrawl\n\n【OpenClaw / Clawi】2026.4.x週次アップデートでDreaming・Gemma 4・Codexハーネス等を追加(04/06〜04/11)\n\nOpenClaw 2026.4.5では、動画・音楽生成、/dreaming、GPT-5.4移行などが告知されました。\n\n2026.4.7では、推論機能、音楽/動画編集、セッション分岐、Gemma 4対応、memory-wikiが紹介されています。\n\n2026.4.9/4.10では、Dreaming改善、SSRF強化、Android連携、アクティブメモリ、MLXトークモード、Codexハーネスプラグインなどが追加されています。\n\nClawi側からも、OpenClaw更新・リリースノート導線が共有されました。\n\n▶️ ポイント:\n\nOpenClawは、記憶・推論・メディア生成・ローカル実行・安全性をまとめて改善しており、エージェント基盤としての完成度を上げています。\nSSRFはWebサービスの安全性に関わる対策で、初心者の方は「セキュリティ改善の一種」と見ておけば大丈夫です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/openclaw/status/2040998570317197607\n・公式SNS: https://x.com/openclaw/status/2041714270212108657\n・公式SNS: https://x.com/openclaw/status/2042072722902077938\n・公式SNS: https://x.com/openclaw/status/2042811598058742012\n・補足・関連情報: https://x.com/ClawiAi/status/2041802797117579511\n\n💳 料金・プラン:\n\n・OpenClaw料金ページ: https://www.getopenclaw.ai/pricing\n・Clawi公式サイト: https://clawi.ai/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ セルフホスト版は無料、Cloud/Clawiは有料中心\n・補足:OpenClawのセルフホスト版は無料で利用できます。OpenClaw CloudやClawiは有料プランが中心です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・OpenClaw: https://www.getopenclaw.ai/\n・Clawi: https://clawi.ai/\n\n【Genspark】【Plus/Pro】5時間ごとのセッション制限を導入(04/09)\n\nGenspark AI ChatとAI Image Agentsの需要増加に伴い、Plus/Proプランに5時間ごとのセッション制限が導入されました。\n\nウィンドウリセット後は利用枠が全回復すると説明されています。\n\n無制限アクセス自体は変わらないと補足されています。\n\n▶️ ポイント:\n\n人気AIサービスでは、需要増加に応じて「無制限」の中身が利用ウィンドウ制に変わるケースが増えています。\n使い放題に見えるプランでも、実際には時間帯ごとの上限がある場合があります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/genspark_japan/status/2042191622520390093\n・ヘルプセンター: https://www.genspark.ai/helpcenter?doc=general_Membership_Plans\n\n💳 料金・プラン:\n\n・Gensparkヘルプセンター: https://www.genspark.ai/helpcenter?doc=general_Membership_Plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン対象\n・補足:今回の制限導入はPlus/Proプランが対象です。無料プランの利用枠は、公式ヘルプセンターやアプリ内表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.genspark.ai/\n\n【Firebase】AI Studio連携・ハイブリッドAI推論などRelease Notesを公開(04/08)\n\nFirebase Release Notes動画で複数の更新が紹介されました。\n\nFirebase in AI Studio、AndroidのハイブリッドAI推論、Firestore Enterpriseネイティブモードが含まれます。\n\nFirebase Data Connect無料トライアル、App Hosting環境変数、Firebase Studio提供終了告知も含まれます。\n\n▶️ ポイント:\n\nFirebaseがAI開発・アプリホスティング・データ接続の周辺機能をまとめて更新しており、AIアプリ開発者に影響があります。\n初心者向けに言うと、「AIアプリを作るための裏側の仕組み」が強化されています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Firebase/status/2041609463350669334\n・公式Release Notes: https://firebase.google.com/support/releases\n・Firebase料金ページ: https://firebase.google.com/pricing\n\n💳 料金・プラン:\n\n・Firebase料金ページ: https://firebase.google.com/pricing\n・Firebase料金プラン説明: https://firebase.google.com/docs/projects/billing/firebase-pricing-plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料Sparkプランあり\n・補足:Firebaseには無料のSparkプランと従量課金のBlazeプランがあります。AI Studio連携、Data Connect、Firestore Enterpriseなどは機能ごとに無料枠や課金条件が異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Firebase: https://firebase.google.com/\n\n【Firebase Studio】移行ガイドを公開、Google AI Studio/Antigravityを移行先に提示(04/11)\n\nFirebase Studioプロジェクト移行ガイドが紹介されました。\n\nブラウザベースのvibe codingが好きだったユーザーには、Google AI Studioへの移行を推奨しています。\n\nIDE機能やエージェント体験、ターミナルが重要だったユーザーには、Antigravityへの移行を推奨しています。\n\n▶️ ポイント:\n\nFirebase Studio終了・移行の影響を受けるユーザーにとって、作業スタイル別に移行先が示された重要な案内です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Firebase/status/2042626157346992562\n・補足・関連情報: https://x.com/Firebase/status/2042626161604223230\n・補足・関連情報: https://x.com/Firebase/status/2042648134677852593\n・移行ガイド: https://firebase.google.com/docs/studio/migrating-project\n\n💳 料金・プラン:\n\n・Firebase料金ページ: https://firebase.google.com/pricing\n・Google AI Studio: https://aistudio.google.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 移行先サービスごとに異なる\n・補足:Firebase Studioからの移行案内です。Google AI Studio、Antigravity、Firebaseの各機能は、それぞれ無料枠・有料枠・提供条件が異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・移行ガイド: https://firebase.google.com/docs/studio/migrating-project\n・Google AI Studio: https://aistudio.google.com/\n\n【Google】【Veo 3.1 Fast】価格引き下げを告知(04/08)\n\nVeo 3.1 Fastの価格引き下げが告知されました。\n\n動画生成モデルの利用コストに関わる更新です。\n\n詳細な新価格や対象APIは、公式料金情報の確認が必要です。\n\n▶️ ポイント:\n\n動画生成の単価が下がると、試作だけでなく、継続的な広告・SNS動画制作にも使いやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googleaidevs/status/2041564835662475441\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n・Google AI Studioモデルページ: https://aistudio.google.com/models/veo-3\n\n💳 料金・プラン:\n\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ API/有料利用中心\n・補足:Veo 3.1 Fastは動画生成APIの価格改定に関する発表です。無料枠や試用可否は、Google AI StudioおよびGemini APIの料金表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Google AI Studio: https://aistudio.google.com/\n\n【Google Maps Platform】クレジットカード不要のMaps Demo Keyを提供(04/10)\n\nGoogle Maps Platformで、クレジットカード不要のMaps Demo Keyが紹介されました。\n\nプロトタイプ作成、コード調整、アイデア検証に使えると説明されています。\n\n開発開始までの心理的ハードルを下げる更新です。\n\n▶️ ポイント:\n\n決済情報なしで地図APIの試作を始められるため、個人開発者や学習者が試しやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GMapsPlatform/status/2042296634864746939\n・Maps Demo Key: https://mapsplatform.google.com/maps-demo-key/\n・Google Maps Platform料金: https://mapsplatform.google.com/pricing/\n\n💳 料金・プラン:\n\n・Maps Demo Key: https://mapsplatform.google.com/maps-demo-key/\n・Google Maps Platform料金: https://mapsplatform.google.com/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で試用可能\n・補足:Maps Demo Keyはクレジットカード不要で試せるプロトタイプ向けキーです。本番利用や利用制限、対応APIは公式ページの条件に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Maps Demo Key: https://mapsplatform.google.com/maps-demo-key/\n\n【Google Workspace】Gmail/Calendar/Meet、スケジュール調整・タイムゾーン・CarPlay対応を更新(04/09〜04/11)\n\nGoogle Workspace関連の複数アップデートが、公式SNSで改めて紹介されました。\n\nGmailの「スケジュールをお手伝い」機能は、公式アップデート上ではグループスケジューリング対応として案内されています。\n\nGoogle Calendarでは、都市名入力でタイムゾーン設定が可能になった更新が紹介されています。\n\nGoogle MeetはApple CarPlayに対応し、車内から音声のみで会議参加できるようになりました。\n\nなお、これらは公式SNS投稿日とWorkspace Updates上の掲載日が異なる場合があります。\n\n▶️ ポイント:\n\n日程調整・時差対応・移動中の会議参加など、日常業務の小さな面倒を減らすアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2042226775212589427\n・公式SNS: https://x.com/GoogleWorkspace/status/2042317372170596630\n・公式SNS: https://x.com/GoogleWorkspace/status/2042656865356525855\n・Workspace Updates: https://workspaceupdates.googleblog.com/\n\n💳 料金・プラン:\n\n・Google Workspace料金ページ: https://workspace.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 機能ごとに対象プランが異なる\n・補足:Google Workspaceの各機能は、個人向けGoogleアカウント、Workspaceエディション、Geminiアドオンの有無で提供条件が変わります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gmail: https://mail.google.com/\n・Google Calendar: https://calendar.google.com/\n・Google Meet: https://meet.google.com/\n\n【NotebookLM】オーディオ概要プレーヤーにスキップ/速度ボタンを追加(04/10)\n\nNotebookLMのオーディオ概要Webプレーヤーに、新しい操作ボタンが追加されました。\n\nスキップや速度コントロールがしやすくなったと説明されています。\n\nユーザーからのフィードバックも継続して募集されています。\n\n▶️ ポイント:\n\n長い音声要約を聞くときに、必要な部分へ移動しやすくなり、学習・調査用途で使いやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/NotebookLM/status/2042300158290055189\n・NotebookLMプラン: https://notebooklm.google/plans\n・アップグレード説明: https://support.google.com/notebooklm/answer/16213268\n\n💳 料金・プラン:\n\n・NotebookLMプラン: https://notebooklm.google/plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:NotebookLMには無料で使える範囲があります。NotebookLM Proでは上限拡大、追加機能、組織向け機能などが提供されます。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://notebooklm.google/\n\n【Stitch by Google】ローンチ後の主要バグ修正を公開(04/10)\n\nStitch by Googleが、ローンチ後に修正した主要バグを公開しました。\n\nデザインシステムの尊重、DESIGN.md同期、キャンバスレイアウト改善、直接編集の滑らか化が含まれます。\n\nプロジェクト命名バグ修正やUI洗練も紹介されています。\n\n▶️ ポイント:\n\nデザイン生成AIは、生成品質だけでなく「既存のデザインルールを守れるか」が実務利用の鍵になります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/stitchbygoogle/status/2042283938203517188\n・公式サイト: https://stitch.withgoogle.com/\n・料金ページ: https://stitch.withgoogle.com/pricing\n\n💳 料金・プラン:\n\n・Stitch料金ページ: https://stitch.withgoogle.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 利用可能だが、提供条件・上限・料金は公式表示に従う\n・補足:Stitchは公式サイト上で利用可能です。ただし、提供地域、利用上限、将来的な料金変更は公式ページの表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://stitch.withgoogle.com/\n\n【LangChain】【LangSmith】コストアラートとClaude Agent SDKトレーシングを強化(04/07〜04/10)\n\nLangSmithにコストアラート機能が導入されました。\n\nエージェントが予算を超えた際に通知を受け取れるようになります。\n\nClaude Agent SDKトレーシングも強化され、サブエージェントやMCPツール内の子ラン、コスト追跡が可能になりました。\n\n▶️ ポイント:\n\n本番エージェント運用では、動いたかどうかだけでなく「いくら使ったか」「どこで失敗したか」を追えることが重要です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041236011439771648\n・公式SNS: https://x.com/LangChain/status/2042282725084971380\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n💳 料金・プラン:\n\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料枠あり、機能ごとに対象プラン確認が必要\n・補足:LangSmithにはDeveloper向け無料枠があります。コストアラートや本番向け監視機能の対象プランは公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・LangSmith: https://smith.langchain.com/\n\n【LangChain】【LangSmith Deployments / Deep Agents Deploy】A2A・MCP・Agent Protocol対応を拡充(04/09〜04/10)\n\nLangSmith Deploymentsで、A2Aプロトコル対応のエージェントデプロイが紹介されました。\n\nDeep Agents Deployベータ版も発表され、オープンソースエージェントハーネスを本番環境へ素早くデプロイできると説明されています。\n\nMCP、A2A、Agent Protocolでエージェントを公開でき、短期・長期メモリも扱えるとされています。\n\n▶️ ポイント:\n\nエージェントを実験から本番運用へ移すための「配備・接続・記憶」の土台が整いつつあります。\nA2Aは「AIエージェント同士をつなぐ仕組み」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041908977642967322\n・公式SNS: https://x.com/LangChain/status/2042268554364592543\n・補足・関連情報: https://x.com/LangChain/status/2042268562908426584\n・公式ブログ: https://www.langchain.com/blog/deep-agents-deploy-an-open-alternative-to-claude-managed-agents\n\n💳 料金・プラン:\n\n・LangSmith料金ページ: https://www.langchain.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 開発用無料枠あり、本番デプロイは有料条件あり\n・補足:LangSmithには無料のDeveloper枠がありますが、Deploymentsや本番運用はデプロイ実行・稼働時間などの課金が関係します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・LangSmith: https://smith.langchain.com/\n\n【MagicPath】モバイル共有時に公開ファイル内プロトタイプ一覧表示へ対応(04/07)\n\nMagicPathで、公開ファイルをモバイル共有した際の表示機能が更新されました。\n\nファイル内の全プロトタイプを、リスト形式またはフィード形式で一覧表示できるようになったと説明されています。\n\nプロトタイプ共有時の閲覧体験を改善する機能です。\n\n▶️ ポイント:\n\nモバイルからでも複数プロトタイプを見つけやすくなり、レビューや共有がスムーズになります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/MagicPathAI/status/2041529502061232400\n・料金/プラン: https://www.magicpath.ai/documentation/help/plans\n\n💳 料金・プラン:\n\n・料金/プラン: https://www.magicpath.ai/documentation/help/plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料枠の有無・共有機能の条件はプランに依存\n・補足:MagicPathの公開共有機能、プロトタイプ数、クレジット、チーム利用などはプランごとに制限される可能性があります。利用前に公式プラン表示を見るのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.magicpath.ai/\n\n【OpenClaw】AnthropicのClaudeサブスク適用停止を報告(04/06)\n\nOpenClawが、AnthropicがサードパーティハーネスへのClaudeサブスクリプション適用を停止したと報告しました。\n\nAPIキーや代替LLMへの移行が案内されています。\n\nサードパーティツール経由でClaudeを使っていたユーザーには影響がある可能性があります。\n\n▶️ ポイント:\n\nAIツールの利用条件は突然変わることがあるため、APIキー運用や代替モデルの準備が重要です。\n初心者の方は「外部ツール経由でAIを使う場合、契約条件が変わることもある」と覚えておくとよさそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/openclaw/status/2041002065174888578\n・OpenClaw料金ページ: https://www.getopenclaw.ai/pricing\n・関連報道: https://www.theverge.com/ai-artificial-intelligence/907074/anthropic-openclaw-claude-subscription-ban\n\n💳 料金・プラン:\n\n・OpenClaw料金ページ: https://www.getopenclaw.ai/pricing\n・Anthropic API料金: https://www.anthropic.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ OpenClaw自体はセルフホスト無料、Claude利用はAPI課金が必要になる可能性\n・補足:OpenClawのセルフホスト版は無料ですが、Claudeを使う場合はClaudeサブスクではなくAPIキーや従量課金が必要になる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・OpenClaw: https://www.getopenclaw.ai/\n\n【OpenAI】【Codex】ChatGPTプランとCodex利用量を更新(04/10)\n\nOpenAIが、ChatGPT Pro/PlusのCodex利用拡充に向けたサブスクリプション更新を発表しました。\n\n月額$100のProティア導入、Plusの5倍のCodex利用量が紹介されています。\n\n既存$200 Pro tierは最高利用量オプションとして継続し、5月31日までCodexプロモーションも延長されると説明されています。\n\n▶️ ポイント:\n\nCodexをたくさん使う開発者向けに、利用量別のプラン設計が細かくなっています。\nただし、Codex自体は無料プランでも制限付きで試せるため、「本格利用するなら有料プラン」という見方が近いです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAI/status/2042295688323875316\n・補足・関連情報: https://x.com/OpenAI/status/2042295690382995789\n・補足・関連情報: https://x.com/OpenAI/status/2042296046009626989\n・Codex料金: https://developers.openai.com/codex/pricing\n\n💳 料金・プラン:\n\n・ChatGPT料金ページ: https://openai.com/chatgpt/pricing/\n・Codex料金: https://developers.openai.com/codex/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランでも制限付きで利用可能。利用量拡大はPlus/Pro中心\n・補足:CodexはChatGPT無料版でも制限付きで試せます。ただし、長時間の開発作業や高頻度利用では、Plus/Proなどの有料プランで利用量が拡大します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・ChatGPT: https://chatgpt.com/\n・Codex: https://developers.openai.com/codex/\n\n【OpenAI Devs】【Codex】旧モデル廃止と新対応モデルを告知(04/08)\n\n4月14日以降、ChatGPTアカウントでCodexにサインインする際、古いCodexモデルが廃止されると告知されました。\n\ngpt-5.2-codex、gpt-5.1-codex-mini、gpt-5.1、gpt-5などが対象として挙げられています。\n\n以降はgpt-5.4、gpt-5.4-mini、gpt-5.3-codexなどがサポートされると案内されています。\n\n▶️ ポイント:\n\n開発ワークフローで固定モデルを使っている場合、モデル廃止により設定変更や検証が必要になる可能性があります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAIDevs/status/2041610989607727164\n・補足・関連情報: https://x.com/OpenAIDevs/status/2041611001410593163\n・Codex Changelog: https://developers.openai.com/codex/changelog\n\n💳 料金・プラン:\n\n・Codex料金: https://developers.openai.com/codex/pricing\n・ChatGPT料金ページ: https://openai.com/chatgpt/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランでも制限付きで利用可能。利用量はプランにより異なる\n・補足:この話題は「無料か有料か」よりも、古いモデルから新しい対応モデルへ移行する話です。Codex自体は無料プランでも試せますが、利用量や使えるモデルはプランによって変わります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Codex: https://developers.openai.com/codex/\n\n【Factory】【Fast Mode】/fastコマンドで高速モードを提供(04/07)\n\nFactoryが、`/fast` コマンドでFast Modeを有効化できる機能を紹介しました。\n\nOpus 4.6、GPT-5.4、GPT-5.3-Codexに対応するとされています。\n\nスピードとインテリジェンスを両立することを訴求しています。\n\n▶️ ポイント:\n\nコーディングエージェントで「速く返してほしい作業」と「深く考えてほしい作業」を切り替えやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2041211942602522692\n・公式料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Factoryは有料プラン中心のサービスです。Fast Modeの対象プラン、対象モデル、利用量制限は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/", "segmentation_method": "reviewed_source_semantics", "label": "⚙️ プロダクト更新", "source_line_range": [ 702, 1328 ] }, { "id": "body-region-3", "text": "新 登 場 abacus ai deep agent 英 語 からフルスタック モバイルアプリをvibe coding 04 09 abacus ai deep agentで 英 語 の 指 示 からフルスタック モバイルアプリを 作 れると 紹 介 されました 大 規 模 システムの 本 番 運 用 までaiが 担 うことを 訴 求 しています コーディングだけでなく 実 運 用 まで 見 据 えたaiエージェント 活 用 の 投 稿 です ポイント コードを 書 くai から アプリを 作 って 運 用 まで 支 援 するai へ 役 割 が 広 がっていることが 分 かります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com abacusai status 2042089325278720241 deep agent faq https deepagent abacus ai deepagent faq 料 金 プラン deep agent faq https deepagent abacus ai deepagent faq abacus ai 料 金 https abacus ai pricing 無 料 で 使 えるか 利 用 料 金 有 料 利 用 中 心 補 足 deep agentは 月 額 料 金 が 案 内 されている 有 料 サービスです 無 料 トライアルやキャンペーンは 時 期 によって 変 わるため 最 新 の 公 式 表 示 を 見 るのが 安 全 です 今 すぐ 試 す 公 式 リンク deep agent https deepagent abacus ai abacus ai https abacus ai adobe firefly generate speechとprecision flow ai markupで 制 作 精 度 を 強 化 04 07 04 10 generate speechでは 70 種 類 以 上 の 高 品 質 音 声 から 選 び テキスト 入 力 声 アクセント 選 択 トーン 調 整 プレビュー エクスポートが 可 能 と 紹 介 されています precision flowでは 1つのプロンプトから 複 数 バリエーションを 生 成 できます ai markupでは 画 像 に 注 釈 を 入 れて 修 正 箇 所 を 精 密 に 指 定 できます ポイント fireflyは ただ 生 成 するだけでなく 狙 った 表 現 に 近 づける 編 集 機 能 を 強 化 しています 画 像 や 音 声 を 仕 事 で 使 う 人 にとって 修 正 指 示 を 出 しやすくなるのは 大 きなポイントです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com adobefirefly status 2041530482278473731 補 足 関 連 情 報 https x com adobefirefly status 2041530485831008518 公 式 sns https x com adobefirefly status 2042276974173790462 fireflyプラン https www adobe com jp products firefly plans html 料 金 プラン fireflyプラン https www adobe com jp products firefly plans html 無 料 で 使 えるか 利 用 料 金 firefly 無 料 枠 あり ただし 新 機 能 は 生 成 クレジット 対 象 プラン 確 認 が 必 要 補 足 adobe fireflyには 無 料 枠 があります ただし generate speech 動 画 音 声 系 機 能 高 度 な 生 成 機 能 は 生 成 クレジットや 対 象 プランの 制 限 を 受 ける 場 合 があります 今 すぐ 試 す 公 式 リンク webアプリ https firefly adobe com claude managed agents 大 規 模 エージェントの 構 築 デプロイ 基 盤 を 発 表 04 09 claude managed agentsがパブリックベータとして 発 表 されました エージェントのタスク ツール ガードレールを 定 義 するだけで 本 番 運 用 に 近 い 形 で 動 かせると 説 明 されています notion asana 楽 天 sentry vibecodeなどの 活 用 事 例 も 紹 介 されています anthropicのengineering blogでは 長 時 間 稼 働 エージェント 向 け 設 計 思 想 も 解 説 されています ポイント aiエージェントを 試 作 品 で 終 わらせず 企 業 で 安 定 運 用 するためのインフラ 化 が 進 んでいます ガードレールは aiがやってよいこと やってはいけないことのルール と 考 えると 分 かりやすいです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com claudeai status 2041927687460024721 公 式 ブログ 導 線 https x com anthropicai status 2041929199976640948 補 足 関 連 情 報 https x com claudeai status 2041927700063883281 公 式 ブログ https claude com blog claude managed agents 料 金 プラン anthropic 料 金 ページ https www anthropic com pricing claude 料 金 ページ https claude com pricing 無 料 で 使 えるか 利 用 料 金 有 料 api 利 用 中 心 補 足 claude managed agentsはclaude platform 上 のベータ 機 能 として 案 内 されています 利 用 にはapi 利 用 料 や 対 象 アカウント 条 件 が 関 係 します 今 すぐ 試 す 公 式 リンク claude https claude ai anthropic console https console anthropic com claude claude for word wordサイドバーで 下 書 き 編 集 変 更 履 歴 付 きリバイスに 対 応 04 11 claude for wordベータ 版 が 発 表 されました wordのサイドバーからclaudeで 文 書 の 下 書 き 編 集 リバイスができます 書 式 を 保 持 したまま 編 集 内 容 を 変 更 履 歴 として 確 認 できると 説 明 されています claude for excel powerpointともコンテキストを 共 有 できます 対 象 はclaudeの 一 部 有 料 プラン 向 けベータとして 案 内 されています ポイント word 文 書 の 作 成 修 正 をaiと 一 緒 に 進 めやすくなり office 横 断 の 作 業 にもつながります 文 章 チェック 要 約 提 案 文 作 成 など 初 心 者 でも 使 い 道 をイメージしやすい 機 能 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com claudeai status 2042670341915295865 補 足 関 連 情 報 https x com claudeai status 2042670343173574705 公 式 ページ https claude com claude for word 公 式 ヘルプ https support claude com en articles 14465370 use claude for word claude 料 金 ページ https claude com pricing 料 金 プラン claude 料 金 ページ https claude com pricing 無 料 で 使 えるか 利 用 料 金 有 料 プラン 向 けベータ 補 足 claude for wordは 有 料 プラン 向 けのベータ 機 能 として 案 内 されています 無 料 ユーザー 向 けの 一 般 機 能 ではない 点 に 注 意 です 今 すぐ 試 す 公 式 リンク claude https claude ai claude for word https claude com claude for word browser use skills webエージェントが 失 敗 を 記 憶 学 習 する 機 能 を 公 開 04 07 browser useが 自 己 進 化 するwebエージェントを 構 築 したと 発 表 しました エージェントがウェブ 操 作 のミスを 記 憶 学 習 する スキル 機 能 が 紹 介 されています 別 投 稿 では この 機 能 がライブ 公 開 されたことも 告 知 されています ポイント 同 じ 失 敗 を 繰 り 返 さないwebエージェントに 近 づくことで ブラウザ 操 作 の 自 動 化 がより 実 用 的 になります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com browser use status 2041339523016368423 公 式 sns https x com browser use status 2041375061408632986 補 足 関 連 情 報 https x com browser use status 2041375063820378585 公 式 料 金 ページ https browser use com pricing 料 金 プラン 公 式 料 金 ページ https browser use com pricing 無 料 で 使 えるか 利 用 料 金 無 料 開 始 可 能 利 用 量 に 応 じて 課 金 補 足 browser useは 無 料 で 開 始 できますが cloud browser skills browser minutesなどは 利 用 量 やプランに 応 じて 制 限 課 金 が 発 生 します 今 すぐ 試 す 公 式 リンク webアプリ https browser use com browser use cloud hermes claude code 連 携 と 無 料 クラウドブラウザを 拡 充 04 09 04 11 nousresearchのhermes agentユーザー 向 けに 無 料 クラウドブラウザを 提 供 すると 発 表 されました 無 制 限 のブラウザ 時 間 無 料 プロキシ 永 続 的 な 認 証 が 利 用 可 能 と 説 明 されています claude codeとbrowser useの 連 携 も 紹 介 され 設 定 ドキュメントへのリンクが 共 有 されています ポイント aiエージェントがブラウザを 使 うためのクラウド 環 境 が 整 うと ローカル 設 定 なしでweb 自 動 化 を 始 めやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com browser use status 2042077879186698386 補 足 関 連 情 報 https x com browser use status 2042077880864403872 公 式 sns https x com browser use status 2042788896476664310 公 式 料 金 ページ https browser use com pricing 料 金 プラン 公 式 料 金 ページ https browser use com pricing 無 料 で 使 えるか 利 用 料 金 無 料 提 供 の 案 内 あり 対 象 条 件 あり 補 足 投 稿 では 無 料 クラウドブラウザ 提 供 が 案 内 されています ただし 対 象 ユーザー 無 料 範 囲 商 用 利 用 長 期 利 用 条 件 は 公 式 料 金 ページと 関 連 ドキュメントに 従 う 形 になります 今 すぐ 試 す 公 式 リンク webアプリ https browser use com pollo ai video reframe sns 向 け 動 画 リサイズを 自 動 化 04 11 pollo aiでvideo reframe 機 能 が 提 供 開 始 されました 動 画 をアップロードし 比 率 を 選 ぶだけでaiが 背 景 を 補 完 します tiktok x youtubeなど 各 プラットフォーム 向 けに 自 動 リサイズできます ポイント 1 本 の 動 画 を 複 数 sns 向 けに 作 り 直 す 手 間 を 減 らせる 実 務 向 けの 編 集 機 能 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com itspolloai status 2042978769686925676 公 式 サイト https pollo ai 公 式 料 金 ページ https pollo ai pricing 料 金 プラン 公 式 料 金 ページ https pollo ai pricing 無 料 で 使 えるか 利 用 料 金 無 料 開 始 可 video reframeはクレジット 出 力 制 限 あり 補 足 pollo aiは 無 料 で 始 められます ただし video reframeの 利 用 回 数 出 力 品 質 透 かし クレジット 消 費 はプランによって 変 わる 可 能 性 があります 今 すぐ 試 す 公 式 リンク webアプリ https pollo ai felo note 記 事 自 動 生 成 文 章 生 成 からアイキャッチ 画 像 まで 一 貫 作 成 04 08 feloのnote 記 事 自 動 生 成 機 能 が 紹 介 されました ソーシャルメディア から note 記 事 を 選 び 内 容 を 入 力 するだけで 文 章 生 成 とアイキャッチ 画 像 作 成 まで 行 えると 説 明 されています スタイル 選 択 や urlから 書 き 方 を 再 現 する 機 能 も 紹 介 されています ポイント sns 投 稿 や 素 材 から 記 事 化 までをaiが 支 援 するため 発 信 作 業 のハードルを 下 げられます noteを 書 く 人 にとっては 下 書 き 作 成 やアイデア 出 しに 使 いやすい 機 能 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com felo ai status 2041803245174321640 felo 公 式 サイト https felo ai felo 料 金 関 連 https felo ai ja blog felo search pro vs free plan differences 料 金 プラン felo 公 式 サイト https felo ai free pro 比 較 https felo ai ja blog felo search pro vs free plan differences 無 料 で 使 えるか 利 用 料 金 無 料 枠 あり 補 足 feloには 無 料 プランとproプランがあります note 記 事 自 動 生 成 画 像 生 成 url 参 照 などの 利 用 回 数 対 象 機 能 は 公 式 サイトやアプリ 内 表 示 で 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https felo ai figma figma make 30 種 類 以 上 のファイル 添 付 に 対 応 04 08 figma makeで ドキュメント データ メディア コードなど 複 数 種 類 のファイルを 直 接 添 付 できるようになったと 紹 介 されました 公 式 snsでは 30 種 類 以 上 のファイル 形 式 に 対 応 すると 案 内 されています プレースホルダーではなく 実 際 の 入 力 データを 使 ってデザインできることを 訴 求 しています ポイント 実 データを 使 ってaiデザインを 作 れるため より 現 実 に 近 いプロトタイプ 制 作 がしやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com figma status 2041616983095947607 補 足 関 連 情 報 https x com figma status 2041617150394175704 公 式 料 金 ページ https www figma com pricing 料 金 プラン 公 式 料 金 ページ https www figma com pricing 無 料 で 使 えるか 利 用 料 金 figma 無 料 プランあり figma make ai 機 能 は 対 象 プラン 確 認 が 必 要 補 足 figmaにはstarter 無 料 プランがあります ただし figma makeやai 関 連 機 能 はai creditsや 対 象 プランの 制 限 を 受 ける 場 合 があります 今 すぐ 試 す 公 式 リンク webアプリ https www figma com figma デザインキャンバス 上 のビデオ 再 生 機 能 を 展 開 04 09 figmaのデザインキャンバス 上 で ビデオ 再 生 機 能 が 展 開 予 定 と 発 表 されました デザイナーが 作 業 中 に 集 中 を 保 ちやすくする 機 能 として 紹 介 されています メディアを 含 むデザインワークフローの 改 善 につながります ポイント 動 画 素 材 を 別 ツールで 確 認 せず figma 上 で 扱 いやすくなるため レビューや 制 作 効 率 が 上 がります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com figma status 2041920857002668136 公 式 料 金 ページ https www figma com pricing 料 金 プラン 公 式 料 金 ページ https www figma com pricing 無 料 で 使 えるか 利 用 料 金 figma 無 料 プランあり 展 開 対 象 はプラン 提 供 状 況 による 補 足 figmaには 無 料 プランがあります デザインキャンバス 上 のビデオ 再 生 機 能 は 展 開 状 況 によって 利 用 できるユーザーが 変 わる 可 能 性 があります 今 すぐ 試 す 公 式 リンク webアプリ https www figma com clawi soul md 編 集 とレシート 自 動 記 録 でエージェント 運 用 を 強 化 04 07 04 08 clawiダッシュボードから エージェントのsoul mdを 直 接 編 集 できる 新 機 能 が 紹 介 されました レシートを 撮 影 または 送 信 するだけで 詳 細 を 自 動 記 録 し スプレッドシートのエントリーに 変 換 する 機 能 も 紹 介 されています エージェントの 人 格 設 定 と 実 務 処 理 の 両 面 を 強 化 する 内 容 です ポイント aiエージェントを 設 定 できる 存 在 日 常 作 業 を 処 理 する 存 在 として 使 いやすくする 更 新 です レシート 記 録 のような 細 かい 作 業 を 任 せられると 実 務 での 利 用 イメージがかなり 分 かりやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com clawiai status 2041212542786441609 公 式 sns https x com clawiai status 2041544669440458938 公 式 サイト https clawi ai 料 金 プラン 公 式 サイト https clawi ai 補 足 公 式 サイトではbasic pro ultraの 有 料 プランが 掲 載 されています 無 料 で 使 えるか 利 用 料 金 有 料 プラン 中 心 補 足 soul md 編 集 やレシート 自 動 記 録 の 利 用 条 件 は clawiの 対 象 プランやエージェントリソースに 紐 づく 可 能 性 があります 今 すぐ 試 す 公 式 リンク 公 式 サイト https clawi ai genspark ai workspace 4 0 desktop office workflowsを 発 表 04 08 genspark ai workspace 4 0が 正 式 発 表 されました genspark claw for desktop microsoft office 統 合 speaklyリアルタイム 翻 訳 ai 議 事 録 advanced workflowsが 紹 介 されています office 統 合 では powerpoint excel word 内 でaiエージェントが 作 業 できると 説 明 されています ポイント aiがwebアプリ 内 だけでなく デスクトップやofficeアプリの 中 まで 入 り 普 段 の 作 業 環 境 で 動 く 方 向 へ 進 んでいます 資 料 作 成 や 議 事 録 など 初 心 者 にも 使 い 道 をイメージしやすいアップデートです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com genspark japan status 2041830878247297103 補 足 関 連 情 報 https x com genspark japan status 2041831977024942484 インストール 導 線 https x com genspark japan status 2041831979411501241 公 式 ブログ https www genspark ai blog genspark ai workspace 4 料 金 プラン gensparkヘルプセンター https www genspark ai helpcenter doc general membership plans 無 料 で 使 えるか 利 用 料 金 無 料 開 始 可 能 主 要 機 能 は 対 象 プラン 確 認 が 必 要 補 足 gensparkは 無 料 で 試 せる 導 線 があります ただし desktop office 統 合 advanced workflowsなどの 提 供 範 囲 はプランごとに 異 なる 可 能 性 があります 今 すぐ 試 す 公 式 リンク webアプリ https www genspark ai gemini notebooks notebooklm geminiとnotebooklmの 統 合 を 展 開 04 09 04 10 geminiにノートブック 機 能 が 導 入 されました 複 数 プロジェクトの 整 理 過 去 チャットやファイルのソース 追 加 が 可 能 と 紹 介 されています gemini appからnotebooklmの 個 人 ノートブックへアクセスでき geminiチャットをソースとして 利 用 できる 統 合 も 発 表 されています webのgoogle ai ultra pro plusユーザーから 先 行 展 開 されています ポイント チャットaiとノート 整 理 aiがつながることで 調 べた 内 容 をプロジェクト 単 位 で 蓄 積 再 利 用 しやすくなります 調 査 メモ 記 事 ネタ 学 習 ノートをまとめたい 人 にはかなり 便 利 そうです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com geminiapp status 2041983079787721013 補 足 関 連 情 報 https x com geminiapp status 2041983287577735396 notebooklm 公 式 sns https x com notebooklm status 2041982449387810962 公 式 ブログ https blog google innovation and ai products gemini app notebooks gemini notebooklm 料 金 プラン google aiプラン https one google com about google ai plans notebooklmプラン https notebooklm google plans 無 料 で 使 えるか 利 用 料 金 有 料 プラン 先 行 補 足 webのgoogle ai ultra pro plusユーザーから 先 行 展 開 されています 無 料 ユーザーへの 提 供 時 期 は 今 後 の 案 内 待 ちです また 一 部 のgoogle ai ultra 関 連 機 能 は 地 域 言 語 が 限 定 される 場 合 があるため 日 本 ユーザーはアプリ 内 表 示 を 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク gemini https gemini google com notebooklm https notebooklm google gemini チャット 内 でインタラクティブ 可 視 化 を 生 成 可 能 に 04 10 geminiが 質 問 や 複 雑 な 概 念 をインタラクティブな 可 視 化 に 変 換 できる 新 機 能 を 発 表 しました 3dモデル 変 数 調 整 データ 探 索 などに 対 応 すると 紹 介 されています proモデルで show me help me visualize と 入 力 して 試 す 案 内 も 投 稿 されています ポイント テキスト 説 明 だけでは 分 かりにくい 内 容 を 動 かせる 図 やモデルとして 理 解 しやすくする 機 能 です 学 習 資 料 作 成 データ 分 析 などで 使 いやすそうです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com geminiapp status 2042272415951253932 試 し 方 https x com geminiapp status 2042278665397187011 公 式 ブログ https blog google innovation and ai products gemini app 3d models charts 料 金 プラン google aiプラン https one google com about google ai plans gemini https gemini google com 無 料 で 使 えるか 利 用 料 金 有 料 aiプラン 中 心 補 足 インタラクティブ 可 視 化 はgoogle ai plus pro ultraなどの 有 料 aiプラン 側 で 案 内 されています 無 料 プランでの 提 供 範 囲 利 用 回 数 対 象 地 域 はgeminiアプリ 内 表 示 と 公 式 ブログに 従 う 形 になります 今 すぐ 試 す 公 式 リンク gemini https gemini google com gemini 無 料 のロングトラック 音 楽 生 成 を 提 供 開 始 04 10 geminiで 無 料 のロングトラック 音 楽 生 成 が 可 能 になったと 告 知 されました ツールメニューから create music を 選 び thinkingまたはproモデルを 使 うよう 案 内 されています gemini 内 で 音 楽 生 成 を 試 せる 機 能 です ポイント 文 章 や 画 像 だけでなく 音 楽 生 成 も 主 要 aiアプリの 中 に 統 合 され 始 めています bgm 案 やsns 動 画 用 の 音 楽 づくりにも 活 用 できそうです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com geminiapp status 2042316630253076945 公 式 ブログ https blog google innovation and ai products gemini app lyria 3 ヘルプ https support google com gemini answer 16901237 料 金 プラン gemini https gemini google com google aiプラン https one google com about google ai plans 無 料 で 使 えるか 利 用 料 金 無 料 で 利 用 可 能 補 足 投 稿 では 無 料 で 利 用 可 能 と 案 内 されています ただし 利 用 回 数 対 象 地 域 対 象 モデル 年 齢 制 限 などは 公 式 ヘルプに 従 う 形 になります 今 すぐ 試 す 公 式 リンク gemini https gemini google com chrome 垂 直 タブと 没 入 型 リーディングモードを 発 表 04 08 chromeに 垂 直 タブ 機 能 が 登 場 すると 発 表 されました 全 画 面 集 中 ビューの 没 入 型 リーディングモードも 予 告 されています 詳 細 情 報 としてblog googleの 記 事 リンクが 共 有 されています ポイント タブが 多 くなりがちな 作 業 環 境 で 画 面 整 理 と 読 書 集 中 を 助 けるブラウザ 更 新 です aiツールを 複 数 開 く 人 にも 地 味 にうれしいアップデートです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googlechrome status 2041574044449857602 公 式 ブログ 導 線 https x com googlechrome status 2041574048967115159 公 式 ブログ https blog google products and platforms products chrome new chrome productivity features 料 金 プラン chrome 公 式 ページ https www google com chrome 無 料 で 使 えるか 利 用 料 金 無 料 で 利 用 可 能 補 足 chromeブラウザの 機 能 として 提 供 されるため 基 本 的 に 無 料 で 利 用 できます 提 供 時 期 や 対 象 osは 公 式 ブログに 従 う 形 になります 今 すぐ 試 す 公 式 リンク デスクトップ https www google com chrome iosアプリdl https apps apple com app google chrome id535886823 androidアプリdl https play google com store apps details id com android chrome google gemini 3 1 flash live リアルタイム 会 話 型 エージェント 構 築 を 紹 介 04 08 gemini 3 1 flash liveを 使 った リアルタイム 会 話 型 エージェントの 構 築 方 法 が 紹 介 されました 公 式 ブログ 上 の 発 表 日 は2026 年 3 月 26 日 で 4 月 8 日 の 投 稿 では 開 発 者 向 けの 活 用 例 として 改 めて 紹 介 されています 90 言 語 以 上 自 然 な 会 話 アクセント 対 応 マルチモーダル 入 力 に 対 応 すると 説 明 されています 開 発 者 はgemini live apiを 通 じて 音 声 映 像 を 含 むリアルタイムaiアシスタントを 構 築 できます ポイント 音 声 映 像 を 含 むリアルタイムaiアシスタントを 作 るための 技 術 が 開 発 者 向 けに 整 備 されています 将 来 的 には 通 話 型 サポート 接 客 教 育 アプリなどにもつながりそうです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googledevs status 2041682441014788186 公 式 ブログ https blog google innovation and ai technology developers tools build with gemini 3 1 flash live モデル 紹 介 https blog google innovation and ai models and research gemini models gemini 3 1 flash live gemini api 料 金 https ai google dev gemini api docs pricing 料 金 プラン gemini api 料 金 https ai google dev gemini api docs pricing 無 料 で 使 えるか 利 用 料 金 api 無 料 枠 あり live apiは 条 件 確 認 が 必 要 補 足 gemini apiには 無 料 tierと 有 料 tierがあります ただし gemini 3 1 flash liveの 利 用 条 件 レート 制 限 対 象 リージョンは 公 式 ドキュメントに 従 う 形 になります 今 すぐ 試 す 公 式 リンク google ai studio https aistudio google com gemini api docs https ai google dev google vids カスタムアバター 作 成 に 対 応 04 08 google vidsで カスタムアバターを 作 成 できる 新 機 能 が 紹 介 されました フォーマル カジュアルなど 場 面 に 合 わせた 装 いのアバターを 作 成 できると 説 明 されています vids new から 作 成 できると 案 内 されています ポイント 社 内 説 明 動 画 やプレゼン 動 画 で 自 分 やブランドに 合 わせたアバターを 使 いやすくなります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googleworkspace status 2041562399300297180 google vids ai avatars https workspace google com products vids ai avatars google workspace 料 金 https workspace google com pricing 料 金 プラン google workspace 料 金 https workspace google com pricing google aiプラン https one google com about google ai plans 無 料 で 使 えるか 利 用 料 金 google workspace google aiプランの 対 象 条 件 確 認 が 必 要 補 足 google vidsおよびaiアバター 機 能 は google workspaceやgoogle aiプランの 対 象 機 能 として 提 供 される 場 合 があります 無 料 提 供 範 囲 対 象 エディション 提 供 地 域 は 公 式 ページの 表 示 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク webアプリ https vids new google vids https workspace google com products vids google workspace studio geminiでクロスworkspaceタスクを 自 動 化 04 09 google workspace studioが geminiでworkspace 横 断 タスクを 自 動 化 できると 紹 介 されました コーディング 不 要 で 日 常 業 務 から 複 雑 なプロセスまで 自 動 化 できると 説 明 されています gmail docs sheetsなどをまたぐ 業 務 自 動 化 に 関 わる 更 新 です ポイント 部 署 横 断 の 定 型 作 業 を コードを 書 かずに 自 動 化 できる 方 向 へ 進 んでいます たとえば メール 内 容 をもとに 資 料 や 表 を 作 るような 作 業 に 近 いイメージです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googleworkspace status 2041924784133468404 google workspace 料 金 https workspace google com pricing 料 金 プラン google workspace 料 金 https workspace google com pricing 無 料 で 使 えるか 利 用 料 金 有 料 workspaceプラン 中 心 補 足 google workspace studioはworkspace 向 け 機 能 として 紹 介 されています 対 象 エディション geminiアドオンの 必 要 有 無 提 供 時 期 は 公 式 情 報 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク google workspace https workspace google com oiioii マルチコマ 分 鏡 機 能 でaiアニメ 制 作 を 支 援 04 07 oiioiiのマルチコマ 分 鏡 機 能 が 紹 介 されました シーンの 複 雑 さに 応 じて 自 動 生 成 され 全 体 を 俯 瞰 しながらピンポイント 調 整 できると 説 明 されています aiアニメーション 制 作 向 けの 絵 コンテ 支 援 機 能 です ポイント アニメ 制 作 で 重 要 な 場 面 の 分 割 と 構 図 調 整 をaiが 支 援 することで 制 作 初 期 の 負 担 を 減 らせます 初 心 者 向 けに 言 うと 動 画 の 流 れをコマ 割 りで 考 える 作 業 をaiが 手 伝 ってくれるイメージです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com oiioii ai status 2041451917906444734 公 式 サイト https www oiioii ai 料 金 プラン 公 式 サイト https www oiioii ai 補 足 料 金 や 利 用 枠 は 公 式 サイトまたはアプリ 内 表 示 に 従 う 形 になります 無 料 で 使 えるか 利 用 料 金 公 式 サイト アプリ 内 表 示 に 従 う 形 補 足 oiioiiはaiアニメ 動 画 制 作 向 けのプラットフォームです 無 料 枠 や 生 成 回 数 は 変 更 される 可 能 性 があるため 利 用 前 にアプリ 内 の 表 示 を 見 るのが 安 全 です 今 すぐ 試 す 公 式 リンク 公 式 サイト https www oiioii ai lovable academy aiアプリ 構 築 の 学 習 パスとテンプレートを 提 供 04 10 lovable academyが 紹 介 されました aiで 実 際 のアプリを 構 築 するためのガイドとして テンプレート プロンプトのコツ 学 習 パスを 提 供 します ユーザーの 職 種 や 課 題 に 合 わせて 何 を 作 るべきかのアイデア 提 案 も 紹 介 されています ポイント aiアプリ 開 発 を 始 めたい 人 が ゼロから 迷 わずテンプレートと 手 順 を 使 って 進 められる 学 習 基 盤 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com lovable status 2042589697809989846 補 足 関 連 情 報 https x com lovable status 2042589700343398559 補 足 関 連 情 報 https x com lovable status 2042589718408294741 料 金 ページ https lovable dev pricing 料 金 プラン lovable 料 金 ページ https lovable dev pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランあり 補 足 lovableには 無 料 プランがあります academyの 閲 覧 テンプレート 利 用 lovable 本 体 でのアプリ 生 成 は それぞれ 利 用 条 件 が 異 なる 可 能 性 があります 今 すぐ 試 す 公 式 リンク webアプリ https lovable dev luma ray3 14 exr draw agents media transformなど 制 作 機 能 を 拡 充 04 08 04 11 lumaが ray3 14 draw agents media transformなどの 制 作 機 能 を 公 式 snsで 継 続 的 に 紹 介 しました ray3 14 自 体 は2026 年 1 月 に 発 表 済 みのモデルですが 1080p 解 像 度 でのexr 形 式 エクスポートなど 映 像 制 作 向 け 機 能 として 改 めて 活 用 例 が 紹 介 されています 参 照 画 像 からキャンペーン 用 製 品 写 真 を 作 る 機 能 画 像 上 に 直 接 描 き 込 んで 生 成 するdraw 機 能 が 紹 介 されています luma agentsによるピッチデッキ 自 動 生 成 pdf 出 力 クリップ 結 合 透 かし 追 加 などのmedia transformも 紹 介 されました ポイント lumaは 動 画 生 成 だけでなく 広 告 制 作 資 料 作 成 メディア 変 換 まで 含 む 制 作 ワークスペース 化 を 進 めています 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com lumalabsai status 2041584670090121469 公 式 sns https x com lumalabsai status 2042406234494812458 公 式 sns https x com lumalabsai status 2042665027036180537 公 式 sns https x com lumalabsai status 2042706887272206605 ray3 14 公 式 ニュース https lumalabs ai news ray3 14 料 金 ページ https lumalabs ai pricing 料 金 プラン luma 料 金 ページ https lumalabs ai pricing 無 料 で 使 えるか 利 用 料 金 無 料 トライアル 無 料 クレジットあり 補 足 lumaは 無 料 で 試 せるクレジットを 提 供 しています ray agents media transformなど 各 機 能 の 利 用 量 解 像 度 商 用 利 用 条 件 は 公 式 料 金 ページで 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https lumalabs ai microsoft copilot tasks 作 業 代 行 機 能 のウェイトリストを 案 内 04 07 copilot tasksが 紹 介 されました 面 倒 な 作 業 を 代 行 し 計 画 通 りに 進 める 手 助 けをする 機 能 として 説 明 されています 税 務 シーズン 向 けには メールから 必 要 書 類 を 探 し 一 か 所 にまとめる 活 用 例 も 紹 介 されています ポイント copilotが 質 問 に 答 えるだけでなく ユーザーの 代 わりに 作 業 を 進 める 方 向 へ 進 化 しています メール 整 理 や 資 料 探 しのような 地 味 に 時 間 がかかる 作 業 ほど ai 代 行 の 効 果 が 分 かりやすそうです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com copilot status 2041275993424289870 補 足 関 連 情 報 https x com copilot status 2041653415969759450 公 式 ブログ https www microsoft com en us microsoft copilot blog 2026 02 26 copilot tasks from answers to actions 料 金 プラン microsoft copilot https copilot microsoft com microsoft 365 copilot https www microsoft com microsoft 365 copilot 無 料 で 使 えるか 利 用 料 金 ウェイトリスト プレビュー 段 階 補 足 copilot tasksはウェイトリスト プレビューとして 案 内 されています 正 式 提 供 時 の 無 料 有 料 条 件 対 象 地 域 対 象 アカウントは 今 後 の 案 内 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク copilot https copilot microsoft com stability ai brand studio ブランド 中 心 のクリエイティブ 制 作 プラットフォームを 発 表 04 08 stability aiがbrand studioを 発 表 しました 汎 用 aiツールではブランドが 後 回 しになるという 課 題 に 対 し ブランドを 中 心 に 置 いた 制 作 プラットフォームとして 紹 介 されています ブランド 一 貫 性 を 保 ちながら 制 作 する 用 途 を 狙 った 新 サービスです ポイント 企 業 がai 制 作 を 使 う 際 に 重 要 な ブランドらしさ を 保 つための 専 用 ツールとして 注 目 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com stabilityai status 2041873936967782837 公 式 ブログ https stability ai news updates brand studio by stability ai creative production platform for brands 料 金 ページ https stability ai pricing 料 金 プラン stability ai 料 金 ページ https stability ai pricing 無 料 で 使 えるか 利 用 料 金 対 象 プランにより 異 なる 補 足 brand studioはブランド 制 作 向 けプラットフォームとして 発 表 されています stability aiにはfree coreなどのプラン 案 内 がありますが brand studioの 無 料 枠 対 象 プラン 商 用 利 用 条 件 は 公 式 ページと 料 金 ページに 従 う 形 になります 今 すぐ 試 す 公 式 リンク stability ai https stability ai runway characters カメラ 画 面 共 有 とカスタムボイスに 対 応 04 08 04 09 runway charactersがカメラと 画 面 共 有 に 対 応 しました ユーザーがライブフィードを 共 有 すると characterが 画 面 内 容 を 把 握 して 応 答 できると 説 明 されています カスタムボイス 機 能 も 追 加 され テキストプロンプトから 新 しい 声 をデザインできます webアプリとrunway api 経 由 で 利 用 可 能 と 案 内 されています なお runwayの 開 発 者 ドキュメントでは カメラ 画 面 共 有 と 一 部 のカスタムキャラクター カスタムボイス 機 能 の 組 み 合 わせには 制 限 があるため 実 装 時 は 公 式 ドキュメント 確 認 が 必 要 です ポイント キャラクターaiが 見 る 聞 く 話 す を 組 み 合 わせ より 対 話 的 なメディア 体 験 を 作 れるようになります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com runwayml status 2041594922688508371 補 足 関 連 情 報 https x com runwayml status 2041594924697563536 公 式 sns https x com runwayml status 2041940020861223079 料 金 ページ https runwayml com pricing characters 開 発 者 ドキュメント https docs dev runwayml com characters 料 金 プラン runway 料 金 ページ https runwayml com pricing runway api https runwayml com api 無 料 で 使 えるか 利 用 料 金 無 料 プランあり characters apiはクレジット 対 象 プラン 確 認 が 必 要 補 足 runwayには 無 料 プランがあります ただし characters カスタムボイス api 利 用 はクレジット 消 費 や 有 料 プランが 必 要 になる 可 能 性 があります 今 すぐ 試 す 公 式 リンク webアプリ https runwayml com api https runwayml com api studio scroll effectを 正 式 リリース 04 09 studioが 新 機 能 scroll effectを 正 式 リリースしました スクロール 位 置 や 画 面 内 表 示 タイミングに 応 じて 要 素 の 動 きを 制 御 できます パララックスやスクロール 連 動 アニメーションを studioだけで 直 感 的 に 制 作 できると 説 明 されています 作 例 動 画 リリース 記 事 解 説 イベント ワークショップも 案 内 されています ポイント ノーコードweb 制 作 でも リッチなスクロール 演 出 を 作 りやすくなる 機 能 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com studiodesign status 2042161737458455008 公 式 記 事 導 線 https x com studiodesign status 2042161739857580468 補 足 関 連 情 報 https x com studiodesign status 2042161741581455377 料 金 ページ https studio design ja pricing 料 金 プラン studio 料 金 ページ https studio design ja pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランあり 補 足 studioには 無 料 プランがあります scroll effectの 利 用 可 否 公 開 サイト 数 cms 独 自 ドメインなどはプランごとに 異 なります 今 すぐ 試 す 公 式 リンク webアプリ https studio design ja suno voice transformation 機 能 を 紹 介 04 07 sunoがvoice transformation 機 能 を 紹 介 しました あなたの 声 を 何 にでも 変 えましょう と 訴 求 されています 声 を 別 の 表 現 へ 変 換 する 音 声 生 成 機 能 です ポイント 自 分 の 声 を 素 材 にして 別 の 歌 声 や 音 声 表 現 へ 変 える 制 作 がしやすくなります 音 楽 制 作 だけでなく ナレーションやキャラクター 音 声 にも 応 用 できそうです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com suno status 2041211403780956184 公 式 料 金 ページ https suno com pricing 料 金 プラン 公 式 料 金 ページ https suno com pricing 無 料 で 使 えるか 利 用 料 金 無 料 プランあり voice transformationは 対 象 プラン 確 認 が 必 要 補 足 sunoには 無 料 プランがありますが voice transformationの 利 用 可 否 回 数 商 用 利 用 対 象 モデルは 公 式 料 金 ページとアプリ 内 表 示 に 従 う 形 になります 今 すぐ 試 す 公 式 リンク webアプリ https suno com factory desktop droidコンピューターとマルチエージェント 操 作 を 提 供 04 09 04 10 factory desktopアプリがリリースされました 各 droidに 永 続 的 なマシンを 割 り 当 て クラウドや 自 宅 デバイスに 登 録 できると 説 明 されています vs code ブラウザ excelなどを 操 作 できるcomputer use 機 能 マルチエージェントセッション 会 話 内 の 図 表 ダッシュボード 生 成 も 紹 介 されています droidのネイティブマルチエージェントオーケストレーション 機 能 も 紹 介 されました ポイント aiコーディングエージェントが チャット 画 面 を 超 えてデスクトップ 作 業 や 複 数 プロジェクト 管 理 まで 担 う 方 向 に 進 んでいます 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com factoryai status 2041928406158471299 補 足 関 連 情 報 https x com factoryai status 2041928508763766941 公 式 sns https x com factoryai status 2042313481551331791 factory desktop https factory ai product desktop 料 金 プラン factory 料 金 ページ https factory ai pricing 料 金 ドキュメント https docs factory ai pricing 無 料 で 使 えるか 利 用 料 金 有 料 プラン 中 心 補 足 factory desktopはfactoryのプランに 紐 づく 機 能 です 全 プラン 提 供 の 案 内 がある 場 合 でも 無 料 枠 利 用 量 対 象 モデル computer useの 制 限 は 公 式 料 金 ページで 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https factory ai desktop https factory ai product desktop factory missions 大 規 模 作 業 をエージェント 分 担 で 進 める 新 機 能 を 発 表 04 11 factoryが 新 機 能 missionsを 発 表 しました 単 一 コンテキストウィンドウでは 処 理 しきれない 大 規 模 プロジェクトを 焦 点 を 絞 った 作 業 単 位 に 分 解 します orchestrator workers validatorsの3 役 割 で 構 成 され tdd 的 に 検 証 を 組 み 込 む 設 計 です droidセッションで missions コマンドから 開 始 できると 案 内 されています ポイント 大 きな 開 発 作 業 をaiに 任 せる 際 の 途 中 で 迷 う 検 証 が 弱 い 問 題 を 役 割 分 担 と 検 証 で 解 決 しようとする 機 能 です tddは 先 にテストを 作 り 動 作 を 確 認 しながら 開 発 する 方 法 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com factoryai status 2042671155191173532 補 足 関 連 情 報 https x com factoryai status 2042671181002871090 補 足 関 連 情 報 https x com factoryai status 2042671205849928124 公 式 ニュース https factory ai news missions 料 金 プラン factory 料 金 ページ https factory ai pricing 料 金 ドキュメント https docs factory ai pricing 無 料 で 使 えるか 利 用 料 金 有 料 プラン 中 心 補 足 missionsはfactory droidの 機 能 として 案 内 されています 対 象 プラン 利 用 量 制 限 提 供 時 期 は 公 式 ニュースと 料 金 ページで 確 認 するのが 安 全 です 今 すぐ 試 す 公 式 リンク webアプリ https factory ai 公 式 ニュース https factory ai news missions", "source_text": "🆕 新登場\n【Abacus AI】【Deep Agent】英語からフルスタック/モバイルアプリをVibe Coding(04/09)\n\nAbacus AI Deep Agentで、英語の指示からフルスタック・モバイルアプリを作れると紹介されました。\n\n大規模システムの本番運用までAIが担うことを訴求しています。\n\nコーディングだけでなく、実運用まで見据えたAIエージェント活用の投稿です。\n\n▶️ ポイント:\n\n「コードを書くAI」から「アプリを作って運用まで支援するAI」へ、役割が広がっていることが分かります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/abacusai/status/2042089325278720241\n・Deep Agent FAQ: https://deepagent.abacus.ai/deepagent_faq\n\n💳 料金・プラン:\n\n・Deep Agent FAQ: https://deepagent.abacus.ai/deepagent_faq\n・Abacus AI料金: https://abacus.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料利用中心\n・補足:Deep Agentは月額料金が案内されている有料サービスです。無料トライアルやキャンペーンは時期によって変わるため、最新の公式表示を見るのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Deep Agent: https://deepagent.abacus.ai/\n・Abacus AI: https://abacus.ai/\n\n【Adobe】【Firefly】Generate SpeechとPrecision Flow/AI Markupで制作精度を強化(04/07〜04/10)\n\nGenerate Speechでは、70種類以上の高品質音声から選び、テキスト入力、声・アクセント選択、トーン調整、プレビュー、エクスポートが可能と紹介されています。\n\nPrecision Flowでは、1つのプロンプトから複数バリエーションを生成できます。\n\nAI Markupでは、画像に注釈を入れて修正箇所を精密に指定できます。\n\n▶️ ポイント:\n\nFireflyは、ただ生成するだけでなく「狙った表現に近づける編集機能」を強化しています。\n画像や音声を仕事で使う人にとって、修正指示を出しやすくなるのは大きなポイントです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/AdobeFirefly/status/2041530482278473731\n・補足・関連情報: https://x.com/AdobeFirefly/status/2041530485831008518\n・公式SNS: https://x.com/AdobeFirefly/status/2042276974173790462\n・Fireflyプラン: https://www.adobe.com/jp/products/firefly/plans.html\n\n💳 料金・プラン:\n\n・Fireflyプラン: https://www.adobe.com/jp/products/firefly/plans.html\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Firefly無料枠あり。ただし新機能は生成クレジット/対象プラン確認が必要\n・補足:Adobe Fireflyには無料枠があります。ただし、Generate Speech、動画・音声系機能、高度な生成機能は生成クレジットや対象プランの制限を受ける場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://firefly.adobe.com/\n\n【Claude】【Managed Agents】大規模エージェントの構築・デプロイ基盤を発表(04/09)\n\nClaude Managed Agentsがパブリックベータとして発表されました。\n\nエージェントのタスク、ツール、ガードレールを定義するだけで、本番運用に近い形で動かせると説明されています。\n\nNotion、Asana、楽天、Sentry、Vibecodeなどの活用事例も紹介されています。\n\nAnthropicのEngineering Blogでは、長時間稼働エージェント向け設計思想も解説されています。\n\n▶️ ポイント:\n\nAIエージェントを試作品で終わらせず、企業で安定運用するためのインフラ化が進んでいます。\nガードレールは「AIがやってよいこと・やってはいけないことのルール」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/claudeai/status/2041927687460024721\n・公式ブログ導線: https://x.com/AnthropicAI/status/2041929199976640948\n・補足・関連情報: https://x.com/claudeai/status/2041927700063883281\n・公式ブログ: https://claude.com/blog/claude-managed-agents\n\n💳 料金・プラン:\n\n・Anthropic料金ページ: https://www.anthropic.com/pricing\n・Claude料金ページ: https://claude.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料/API利用中心\n・補足:Claude Managed AgentsはClaude Platform上のベータ機能として案内されています。利用にはAPI利用料や対象アカウント条件が関係します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Claude: https://claude.ai/\n・Anthropic Console: https://console.anthropic.com/\n\n【Claude】【Claude for Word】Wordサイドバーで下書き・編集・変更履歴付きリバイスに対応(04/11)\n\nClaude for Wordベータ版が発表されました。\n\nWordのサイドバーからClaudeで文書の下書き、編集、リバイスができます。\n\n書式を保持したまま、編集内容を変更履歴として確認できると説明されています。\n\nClaude for Excel/PowerPointともコンテキストを共有できます。\n\n対象はClaudeの一部有料プラン向けベータとして案内されています。\n\n▶️ ポイント:\n\nWord文書の作成・修正をAIと一緒に進めやすくなり、Office横断の作業にもつながります。\n文章チェック、要約、提案文作成など、初心者でも使い道をイメージしやすい機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/claudeai/status/2042670341915295865\n・補足・関連情報: https://x.com/claudeai/status/2042670343173574705\n・公式ページ: https://claude.com/claude-for-word\n・公式ヘルプ: https://support.claude.com/en/articles/14465370-use-claude-for-word\n・Claude料金ページ: https://claude.com/pricing\n\n💳 料金・プラン:\n\n・Claude料金ページ: https://claude.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン向けベータ\n・補足:Claude for Wordは有料プラン向けのベータ機能として案内されています。無料ユーザー向けの一般機能ではない点に注意です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Claude: https://claude.ai/\n・Claude for Word: https://claude.com/claude-for-word\n\n【Browser Use】【Skills】Webエージェントが失敗を記憶・学習する機能を公開(04/07)\n\nBrowser Useが、自己進化するWebエージェントを構築したと発表しました。\n\nエージェントがウェブ操作のミスを記憶・学習する「スキル」機能が紹介されています。\n\n別投稿では、この機能がライブ公開されたことも告知されています。\n\n▶️ ポイント:\n\n同じ失敗を繰り返さないWebエージェントに近づくことで、ブラウザ操作の自動化がより実用的になります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/browser_use/status/2041339523016368423\n・公式SNS: https://x.com/browser_use/status/2041375061408632986\n・補足・関連情報: https://x.com/browser_use/status/2041375063820378585\n・公式料金ページ: https://browser-use.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://browser-use.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可能、利用量に応じて課金\n・補足:Browser Useは無料で開始できますが、Cloud Browser、Skills、Browser Minutesなどは利用量やプランに応じて制限・課金が発生します。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://browser-use.com/\n\n【Browser Use】【Cloud】Hermes/Claude Code連携と無料クラウドブラウザを拡充(04/09〜04/11)\n\nNousResearchのHermes Agentユーザー向けに、無料クラウドブラウザを提供すると発表されました。\n\n無制限のブラウザ時間、無料プロキシ、永続的な認証が利用可能と説明されています。\n\nClaude CodeとBrowser Useの連携も紹介され、設定ドキュメントへのリンクが共有されています。\n\n▶️ ポイント:\n\nAIエージェントがブラウザを使うためのクラウド環境が整うと、ローカル設定なしでWeb自動化を始めやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/browser_use/status/2042077879186698386\n・補足・関連情報: https://x.com/browser_use/status/2042077880864403872\n・公式SNS: https://x.com/browser_use/status/2042788896476664310\n・公式料金ページ: https://browser-use.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://browser-use.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料提供の案内あり、対象条件あり\n・補足:投稿では無料クラウドブラウザ提供が案内されています。ただし、対象ユーザー、無料範囲、商用利用、長期利用条件は公式料金ページと関連ドキュメントに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://browser-use.com/\n\n【Pollo AI】【Video Reframe】SNS向け動画リサイズを自動化(04/11)\n\nPollo AIでVideo Reframe機能が提供開始されました。\n\n動画をアップロードし、比率を選ぶだけでAIが背景を補完します。\n\nTikTok、X、YouTubeなど、各プラットフォーム向けに自動リサイズできます。\n\n▶️ ポイント:\n\n1本の動画を複数SNS向けに作り直す手間を減らせる、実務向けの編集機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/itsPolloAI/status/2042978769686925676\n・公式サイト: https://pollo.ai/\n・公式料金ページ: https://pollo.ai/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://pollo.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可、Video Reframeはクレジット/出力制限あり\n・補足:Pollo AIは無料で始められます。ただし、Video Reframeの利用回数、出力品質、透かし、クレジット消費はプランによって変わる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://pollo.ai/\n\n【Felo】【Note記事自動生成】文章生成からアイキャッチ画像まで一貫作成(04/08)\n\nFeloのNote記事自動生成機能が紹介されました。\n\n「ソーシャルメディア」から「Note記事」を選び、内容を入力するだけで、文章生成とアイキャッチ画像作成まで行えると説明されています。\n\nスタイル選択や、URLから書き方を再現する機能も紹介されています。\n\n▶️ ポイント:\n\nSNS投稿や素材から記事化までをAIが支援するため、発信作業のハードルを下げられます。\nnoteを書く人にとっては、下書き作成やアイデア出しに使いやすい機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/felo_ai/status/2041803245174321640\n・Felo公式サイト: https://felo.ai/\n・Felo料金関連: https://felo.ai/ja/blog/felo-search-pro-vs-free-plan-differences/\n\n💳 料金・プラン:\n\n・Felo公式サイト: https://felo.ai/\n・Free/Pro比較: https://felo.ai/ja/blog/felo-search-pro-vs-free-plan-differences/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料枠あり\n・補足:Feloには無料プランとProプランがあります。Note記事自動生成、画像生成、URL参照などの利用回数・対象機能は公式サイトやアプリ内表示で確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://felo.ai/\n\n【Figma】【Figma Make】30種類以上のファイル添付に対応(04/08)\n\nFigma Makeで、ドキュメント、データ、メディア、コードなど、複数種類のファイルを直接添付できるようになったと紹介されました。\n\n公式SNSでは、30種類以上のファイル形式に対応すると案内されています。\n\nプレースホルダーではなく、実際の入力データを使ってデザインできることを訴求しています。\n\n▶️ ポイント:\n\n実データを使ってAIデザインを作れるため、より現実に近いプロトタイプ制作がしやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/figma/status/2041616983095947607\n・補足・関連情報: https://x.com/figma/status/2041617150394175704\n・公式料金ページ: https://www.figma.com/pricing/\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.figma.com/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Figma無料プランあり、Figma Make/AI機能は対象プラン確認が必要\n・補足:FigmaにはStarter無料プランがあります。ただし、Figma MakeやAI関連機能はAI creditsや対象プランの制限を受ける場合があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.figma.com/\n\n【Figma】デザインキャンバス上のビデオ再生機能を展開(04/09)\n\nFigmaのデザインキャンバス上で、ビデオ再生機能が展開予定と発表されました。\n\nデザイナーが作業中に集中を保ちやすくする機能として紹介されています。\n\nメディアを含むデザインワークフローの改善につながります。\n\n▶️ ポイント:\n\n動画素材を別ツールで確認せず、Figma上で扱いやすくなるため、レビューや制作効率が上がります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/figma/status/2041920857002668136\n・公式料金ページ: https://www.figma.com/pricing/\n\n💳 料金・プラン:\n\n・公式料金ページ: https://www.figma.com/pricing/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Figma無料プランあり、展開対象はプラン・提供状況による\n・補足:Figmaには無料プランがあります。デザインキャンバス上のビデオ再生機能は、展開状況によって利用できるユーザーが変わる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.figma.com/\n\n【Clawi】SOUL.md編集とレシート自動記録でエージェント運用を強化(04/07〜04/08)\n\nClawiダッシュボードから、エージェントのSOUL.mdを直接編集できる新機能が紹介されました。\n\nレシートを撮影または送信するだけで詳細を自動記録し、スプレッドシートのエントリーに変換する機能も紹介されています。\n\nエージェントの人格設定と実務処理の両面を強化する内容です。\n\n▶️ ポイント:\n\nAIエージェントを「設定できる存在」「日常作業を処理する存在」として使いやすくする更新です。\nレシート記録のような細かい作業を任せられると、実務での利用イメージがかなり分かりやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/ClawiAi/status/2041212542786441609\n・公式SNS: https://x.com/ClawiAi/status/2041544669440458938\n・公式サイト: https://clawi.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://clawi.ai/\n・補足:公式サイトではBasic、Pro、Ultraの有料プランが掲載されています。\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:SOUL.md編集やレシート自動記録の利用条件は、Clawiの対象プランやエージェントリソースに紐づく可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・公式サイト: https://clawi.ai/\n\n【Genspark】【AI Workspace 4.0】Desktop・Office・Workflowsを発表(04/08)\n\nGenspark AI Workspace 4.0が正式発表されました。\n\nGenspark Claw for Desktop、Microsoft Office統合、Speaklyリアルタイム翻訳/AI議事録、Advanced Workflowsが紹介されています。\n\nOffice統合では、PowerPoint、Excel、Word内でAIエージェントが作業できると説明されています。\n\n▶️ ポイント:\n\nAIがWebアプリ内だけでなく、デスクトップやOfficeアプリの中まで入り、普段の作業環境で動く方向へ進んでいます。\n資料作成や議事録など、初心者にも使い道をイメージしやすいアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/genspark_japan/status/2041830878247297103\n・補足・関連情報: https://x.com/genspark_japan/status/2041831977024942484\n・インストール導線: https://x.com/genspark_japan/status/2041831979411501241\n・公式ブログ: https://www.genspark.ai/blog/genspark-ai-workspace-4\n\n💳 料金・プラン:\n\n・Gensparkヘルプセンター: https://www.genspark.ai/helpcenter?doc=general_Membership_Plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料開始可能、主要機能は対象プラン確認が必要\n・補足:Gensparkは無料で試せる導線があります。ただし、Desktop、Office統合、Advanced Workflowsなどの提供範囲はプランごとに異なる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://www.genspark.ai/\n\n【Gemini】【Notebooks / NotebookLM】GeminiとNotebookLMの統合を展開(04/09〜04/10)\n\nGeminiにノートブック機能が導入されました。\n\n複数プロジェクトの整理、過去チャットやファイルのソース追加が可能と紹介されています。\n\nGemini AppからNotebookLMの個人ノートブックへアクセスでき、Geminiチャットをソースとして利用できる統合も発表されています。\n\nWebのGoogle AI Ultra/Pro/Plusユーザーから先行展開されています。\n\n▶️ ポイント:\n\nチャットAIとノート整理AIがつながることで、調べた内容をプロジェクト単位で蓄積・再利用しやすくなります。\n調査メモ、記事ネタ、学習ノートをまとめたい人にはかなり便利そうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GeminiApp/status/2041983079787721013\n・補足・関連情報: https://x.com/GeminiApp/status/2041983287577735396\n・NotebookLM公式SNS: https://x.com/NotebookLM/status/2041982449387810962\n・公式ブログ: https://blog.google/innovation-and-ai/products/gemini-app/notebooks-gemini-notebooklm/\n\n💳 料金・プラン:\n\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n・NotebookLMプラン: https://notebooklm.google/plans\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン先行\n・補足:WebのGoogle AI Ultra/Pro/Plusユーザーから先行展開されています。無料ユーザーへの提供時期は今後の案内待ちです。また、一部のGoogle AI Ultra関連機能は地域・言語が限定される場合があるため、日本ユーザーはアプリ内表示を確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gemini: https://gemini.google.com/\n・NotebookLM: https://notebooklm.google/\n\n【Gemini】チャット内でインタラクティブ可視化を生成可能に(04/10)\n\nGeminiが、質問や複雑な概念をインタラクティブな可視化に変換できる新機能を発表しました。\n\n3Dモデル、変数調整、データ探索などに対応すると紹介されています。\n\nProモデルで「show me」「help me visualize」と入力して試す案内も投稿されています。\n\n▶️ ポイント:\n\nテキスト説明だけでは分かりにくい内容を、動かせる図やモデルとして理解しやすくする機能です。\n学習、資料作成、データ分析などで使いやすそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GeminiApp/status/2042272415951253932\n・試し方: https://x.com/GeminiApp/status/2042278665397187011\n・公式ブログ: https://blog.google/innovation-and-ai/products/gemini-app/3d-models-charts/\n\n💳 料金・プラン:\n\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n・Gemini: https://gemini.google.com/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 有料AIプラン中心\n・補足:インタラクティブ可視化はGoogle AI Plus/Pro/Ultraなどの有料AIプラン側で案内されています。無料プランでの提供範囲、利用回数、対象地域はGeminiアプリ内表示と公式ブログに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gemini: https://gemini.google.com/\n\n【Gemini】無料のロングトラック音楽生成を提供開始(04/10)\n\nGeminiで無料のロングトラック音楽生成が可能になったと告知されました。\n\nツールメニューから「Create music」を選び、ThinkingまたはProモデルを使うよう案内されています。\n\nGemini内で音楽生成を試せる機能です。\n\n▶️ ポイント:\n\n文章や画像だけでなく、音楽生成も主要AIアプリの中に統合され始めています。\nBGM案やSNS動画用の音楽づくりにも活用できそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GeminiApp/status/2042316630253076945\n・公式ブログ: https://blog.google/innovation-and-ai/products/gemini-app/lyria-3/\n・ヘルプ: https://support.google.com/gemini/answer/16901237\n\n💳 料金・プラン:\n\n・Gemini: https://gemini.google.com/\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:投稿では無料で利用可能と案内されています。ただし、利用回数、対象地域、対象モデル、年齢制限などは公式ヘルプに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Gemini: https://gemini.google.com/\n\n【Chrome】垂直タブと没入型リーディングモードを発表(04/08)\n\nChromeに垂直タブ機能が登場すると発表されました。\n\n全画面・集中ビューの没入型リーディングモードも予告されています。\n\n詳細情報としてblog.googleの記事リンクが共有されています。\n\n▶️ ポイント:\n\nタブが多くなりがちな作業環境で、画面整理と読書集中を助けるブラウザ更新です。\nAIツールを複数開く人にも地味にうれしいアップデートです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googlechrome/status/2041574044449857602\n・公式ブログ導線: https://x.com/googlechrome/status/2041574048967115159\n・公式ブログ: https://blog.google/products-and-platforms/products/chrome/new-chrome-productivity-features/\n\n💳 料金・プラン:\n\n・Chrome公式ページ: https://www.google.com/chrome/\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料で利用可能\n・補足:Chromeブラウザの機能として提供されるため、基本的に無料で利用できます。提供時期や対象OSは公式ブログに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・デスクトップ: https://www.google.com/chrome/\n・iOSアプリDL: https://apps.apple.com/app/google-chrome/id535886823\n・AndroidアプリDL: https://play.google.com/store/apps/details?id=com.android.chrome\n\n【Google】【Gemini 3.1 Flash Live】リアルタイム会話型エージェント構築を紹介(04/08)\n\nGemini 3.1 Flash Liveを使った、リアルタイム会話型エージェントの構築方法が紹介されました。\n\n公式ブログ上の発表日は2026年3月26日で、4月8日の投稿では開発者向けの活用例として改めて紹介されています。\n\n90言語以上、自然な会話、アクセント対応、マルチモーダル入力に対応すると説明されています。\n\n開発者はGemini Live APIを通じて、音声・映像を含むリアルタイムAIアシスタントを構築できます。\n\n▶️ ポイント:\n\n音声・映像を含むリアルタイムAIアシスタントを作るための技術が、開発者向けに整備されています。\n将来的には、通話型サポート、接客、教育アプリなどにもつながりそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/googledevs/status/2041682441014788186\n・公式ブログ: https://blog.google/innovation-and-ai/technology/developers-tools/build-with-gemini-3-1-flash-live/\n・モデル紹介: https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-1-flash-live/\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n💳 料金・プラン:\n\n・Gemini API料金: https://ai.google.dev/gemini-api/docs/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ API無料枠あり、Live APIは条件確認が必要\n・補足:Gemini APIには無料Tierと有料Tierがあります。ただし、Gemini 3.1 Flash Liveの利用条件、レート制限、対象リージョンは公式ドキュメントに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Google AI Studio: https://aistudio.google.com/\n・Gemini API Docs: https://ai.google.dev/\n\n【Google Vids】カスタムアバター作成に対応(04/08)\n\nGoogle Vidsで、カスタムアバターを作成できる新機能が紹介されました。\n\nフォーマル・カジュアルなど、場面に合わせた装いのアバターを作成できると説明されています。\n\n`vids.new` から作成できると案内されています。\n\n▶️ ポイント:\n\n社内説明動画やプレゼン動画で、自分やブランドに合わせたアバターを使いやすくなります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2041562399300297180\n・Google Vids AI Avatars: https://workspace.google.com/products/vids/ai-avatars/\n・Google Workspace料金: https://workspace.google.com/pricing\n\n💳 料金・プラン:\n\n・Google Workspace料金: https://workspace.google.com/pricing\n・Google AIプラン: https://one.google.com/about/google-ai-plans/\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ Google Workspace / Google AIプランの対象条件確認が必要\n・補足:Google VidsおよびAIアバター機能は、Google WorkspaceやGoogle AIプランの対象機能として提供される場合があります。無料提供範囲、対象エディション、提供地域は公式ページの表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://vids.new\n・Google Vids: https://workspace.google.com/products/vids/\n\n【Google Workspace Studio】GeminiでクロスWorkspaceタスクを自動化(04/09)\n\nGoogle Workspace Studioが、GeminiでWorkspace横断タスクを自動化できると紹介されました。\n\nコーディング不要で、日常業務から複雑なプロセスまで自動化できると説明されています。\n\nGmail、Docs、Sheetsなどをまたぐ業務自動化に関わる更新です。\n\n▶️ ポイント:\n\n部署横断の定型作業を、コードを書かずに自動化できる方向へ進んでいます。\nたとえば、メール内容をもとに資料や表を作るような作業に近いイメージです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2041924784133468404\n・Google Workspace料金: https://workspace.google.com/pricing\n\n💳 料金・プラン:\n\n・Google Workspace料金: https://workspace.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料Workspaceプラン中心\n・補足:Google Workspace StudioはWorkspace向け機能として紹介されています。対象エディション、Geminiアドオンの必要有無、提供時期は公式情報に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Google Workspace: https://workspace.google.com/\n\n【OiiOii】マルチコマ分鏡機能でAIアニメ制作を支援(04/07)\n\nOiiOiiのマルチコマ分鏡機能が紹介されました。\n\nシーンの複雑さに応じて自動生成され、全体を俯瞰しながらピンポイント調整できると説明されています。\n\nAIアニメーション制作向けの絵コンテ支援機能です。\n\n▶️ ポイント:\n\nアニメ制作で重要な「場面の分割」と「構図調整」をAIが支援することで、制作初期の負担を減らせます。\n初心者向けに言うと、「動画の流れをコマ割りで考える作業」をAIが手伝ってくれるイメージです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OiiOii_AI/status/2041451917906444734\n・公式サイト: https://www.oiioii.ai/\n\n💳 料金・プラン:\n\n・公式サイト: https://www.oiioii.ai/\n・補足:料金や利用枠は、公式サイトまたはアプリ内表示に従う形になります。\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 公式サイト/アプリ内表示に従う形\n・補足:OiiOiiはAIアニメ・動画制作向けのプラットフォームです。無料枠や生成回数は変更される可能性があるため、利用前にアプリ内の表示を見るのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・公式サイト: https://www.oiioii.ai/\n\n【Lovable】【Academy】AIアプリ構築の学習パスとテンプレートを提供(04/10)\n\nLovable Academyが紹介されました。\n\nAIで実際のアプリを構築するためのガイドとして、テンプレート、プロンプトのコツ、学習パスを提供します。\n\nユーザーの職種や課題に合わせて、何を作るべきかのアイデア提案も紹介されています。\n\n▶️ ポイント:\n\nAIアプリ開発を始めたい人が、ゼロから迷わずテンプレートと手順を使って進められる学習基盤です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Lovable/status/2042589697809989846\n・補足・関連情報: https://x.com/Lovable/status/2042589700343398559\n・補足・関連情報: https://x.com/Lovable/status/2042589718408294741\n・料金ページ: https://lovable.dev/pricing\n\n💳 料金・プラン:\n\n・Lovable料金ページ: https://lovable.dev/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料プランあり\n・補足:Lovableには無料プランがあります。Academyの閲覧、テンプレート利用、Lovable本体でのアプリ生成は、それぞれ利用条件が異なる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://lovable.dev/\n\n【Luma】Ray3.14 EXR・Draw・Agents・Media Transformなど制作機能を拡充(04/08〜04/11)\n\nLumaが、Ray3.14、Draw、Agents、Media Transformなどの制作機能を公式SNSで継続的に紹介しました。\n\nRay3.14自体は2026年1月に発表済みのモデルですが、1080p解像度でのEXR形式エクスポートなど、映像制作向け機能として改めて活用例が紹介されています。\n\n参照画像からキャンペーン用製品写真を作る機能、画像上に直接描き込んで生成するDraw機能が紹介されています。\n\nLuma Agentsによるピッチデッキ自動生成、PDF出力・クリップ結合・透かし追加などのMedia Transformも紹介されました。\n\n▶️ ポイント:\n\nLumaは動画生成だけでなく、広告制作・資料作成・メディア変換まで含む制作ワークスペース化を進めています。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LumaLabsAI/status/2041584670090121469\n・公式SNS: https://x.com/LumaLabsAI/status/2042406234494812458\n・公式SNS: https://x.com/LumaLabsAI/status/2042665027036180537\n・公式SNS: https://x.com/LumaLabsAI/status/2042706887272206605\n・Ray3.14公式ニュース: https://lumalabs.ai/news/ray3_14\n・料金ページ: https://lumalabs.ai/pricing\n\n💳 料金・プラン:\n\n・Luma料金ページ: https://lumalabs.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料トライアル/無料クレジットあり\n・補足:Lumaは無料で試せるクレジットを提供しています。Ray、Agents、Media Transformなど各機能の利用量、解像度、商用利用条件は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://lumalabs.ai/\n\n【Microsoft Copilot】【Tasks】作業代行機能のウェイトリストを案内(04/07)\n\nCopilot Tasksが紹介されました。\n\n面倒な作業を代行し、計画通りに進める手助けをする機能として説明されています。\n\n税務シーズン向けには、メールから必要書類を探し、一か所にまとめる活用例も紹介されています。\n\n▶️ ポイント:\n\nCopilotが質問に答えるだけでなく、ユーザーの代わりに作業を進める方向へ進化しています。\nメール整理や資料探しのような地味に時間がかかる作業ほど、AI代行の効果が分かりやすそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/Copilot/status/2041275993424289870\n・補足・関連情報: https://x.com/Copilot/status/2041653415969759450\n・公式ブログ: https://www.microsoft.com/en-us/microsoft-copilot/blog/2026/02/26/copilot-tasks-from-answers-to-actions/\n\n💳 料金・プラン:\n\n・Microsoft Copilot: https://copilot.microsoft.com/\n・Microsoft 365 Copilot: https://www.microsoft.com/microsoft-365/copilot\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ ウェイトリスト/プレビュー段階\n・補足:Copilot Tasksはウェイトリスト・プレビューとして案内されています。正式提供時の無料/有料条件、対象地域、対象アカウントは今後の案内に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Copilot: https://copilot.microsoft.com/\n\n【Stability AI】【Brand Studio】ブランド中心のクリエイティブ制作プラットフォームを発表(04/08)\n\nStability AIがBrand Studioを発表しました。\n\n汎用AIツールではブランドが後回しになるという課題に対し、ブランドを中心に置いた制作プラットフォームとして紹介されています。\n\nブランド一貫性を保ちながら制作する用途を狙った新サービスです。\n\n▶️ ポイント:\n\n企業がAI制作を使う際に重要な「ブランドらしさ」を保つための専用ツールとして注目です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/StabilityAI/status/2041873936967782837\n・公式ブログ: https://stability.ai/news-updates/brand-studio-by-stability-ai-creative-production-platform-for-brands\n・料金ページ: https://stability.ai/pricing\n\n💳 料金・プラン:\n\n・Stability AI料金ページ: https://stability.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 対象プランにより異なる\n・補足:Brand Studioはブランド制作向けプラットフォームとして発表されています。Stability AIにはFree/Coreなどのプラン案内がありますが、Brand Studioの無料枠・対象プラン・商用利用条件は公式ページと料金ページに従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Stability AI: https://stability.ai/\n\n【Runway】【Characters】カメラ/画面共有とカスタムボイスに対応(04/08〜04/09)\n\nRunway Charactersがカメラと画面共有に対応しました。\n\nユーザーがライブフィードを共有すると、Characterが画面内容を把握して応答できると説明されています。\n\nカスタムボイス機能も追加され、テキストプロンプトから新しい声をデザインできます。\n\nWebアプリとRunway API経由で利用可能と案内されています。\n\nなお、Runwayの開発者ドキュメントでは、カメラ/画面共有と一部のカスタムキャラクター・カスタムボイス機能の組み合わせには制限があるため、実装時は公式ドキュメント確認が必要です。\n\n▶️ ポイント:\n\nキャラクターAIが「見る」「聞く」「話す」を組み合わせ、より対話的なメディア体験を作れるようになります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/runwayml/status/2041594922688508371\n・補足・関連情報: https://x.com/runwayml/status/2041594924697563536\n・公式SNS: https://x.com/runwayml/status/2041940020861223079\n・料金ページ: https://runwayml.com/pricing\n・Characters開発者ドキュメント: https://docs.dev.runwayml.com/characters/\n\n💳 料金・プラン:\n\n・Runway料金ページ: https://runwayml.com/pricing\n・Runway API: https://runwayml.com/api\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Characters/APIはクレジット・対象プラン確認が必要\n・補足:Runwayには無料プランがあります。ただし、Characters、カスタムボイス、API利用はクレジット消費や有料プランが必要になる可能性があります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://runwayml.com/\n・API: https://runwayml.com/api\n\n【Studio】Scroll Effectを正式リリース(04/09)\n\nStudioが新機能Scroll Effectを正式リリースしました。\n\nスクロール位置や画面内表示タイミングに応じて、要素の動きを制御できます。\n\nパララックスやスクロール連動アニメーションを、Studioだけで直感的に制作できると説明されています。\n\n作例動画、リリース記事、解説イベント、ワークショップも案内されています。\n\n▶️ ポイント:\n\nノーコードWeb制作でも、リッチなスクロール演出を作りやすくなる機能です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/StudioDesign/status/2042161737458455008\n・公式記事導線: https://x.com/StudioDesign/status/2042161739857580468\n・補足・関連情報: https://x.com/StudioDesign/status/2042161741581455377\n・料金ページ: https://studio.design/ja/pricing\n\n💳 料金・プラン:\n\n・Studio料金ページ: https://studio.design/ja/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ✅ 無料プランあり\n・補足:Studioには無料プランがあります。Scroll Effectの利用可否、公開サイト数、CMS、独自ドメインなどはプランごとに異なります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://studio.design/ja\n\n【Suno】Voice Transformation機能を紹介(04/07)\n\nSunoがVoice Transformation機能を紹介しました。\n\n「あなたの声を何にでも変えましょう」と訴求されています。\n\n声を別の表現へ変換する音声生成機能です。\n\n▶️ ポイント:\n\n自分の声を素材にして、別の歌声や音声表現へ変える制作がしやすくなります。\n音楽制作だけでなく、ナレーションやキャラクター音声にも応用できそうです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/suno/status/2041211403780956184\n・公式料金ページ: https://suno.com/pricing\n\n💳 料金・プラン:\n\n・公式料金ページ: https://suno.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料プランあり、Voice Transformationは対象プラン確認が必要\n・補足:Sunoには無料プランがありますが、Voice Transformationの利用可否、回数、商用利用、対象モデルは公式料金ページとアプリ内表示に従う形になります。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://suno.com/\n\n【Factory】【Desktop】Droidコンピューターとマルチエージェント操作を提供(04/09〜04/10)\n\nFactory Desktopアプリがリリースされました。\n\n各Droidに永続的なマシンを割り当て、クラウドや自宅デバイスに登録できると説明されています。\n\nVS Code、ブラウザ、Excelなどを操作できるComputer Use機能、マルチエージェントセッション、会話内の図表・ダッシュボード生成も紹介されています。\n\nDroidのネイティブマルチエージェントオーケストレーション機能も紹介されました。\n\n▶️ ポイント:\n\nAIコーディングエージェントが、チャット画面を超えてデスクトップ作業や複数プロジェクト管理まで担う方向に進んでいます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2041928406158471299\n・補足・関連情報: https://x.com/FactoryAI/status/2041928508763766941\n・公式SNS: https://x.com/FactoryAI/status/2042313481551331791\n・Factory Desktop: https://factory.ai/product/desktop\n\n💳 料金・プラン:\n\n・Factory料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:Factory DesktopはFactoryのプランに紐づく機能です。全プラン提供の案内がある場合でも、無料枠、利用量、対象モデル、Computer Useの制限は公式料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/\n・Desktop: https://factory.ai/product/desktop\n\n【Factory】【Missions】大規模作業をエージェント分担で進める新機能を発表(04/11)\n\nFactoryが新機能Missionsを発表しました。\n\n単一コンテキストウィンドウでは処理しきれない大規模プロジェクトを、焦点を絞った作業単位に分解します。\n\nOrchestrator、Workers、Validatorsの3役割で構成され、TDD的に検証を組み込む設計です。\n\nDroidセッションで `/missions` コマンドから開始できると案内されています。\n\n▶️ ポイント:\n\n大きな開発作業をAIに任せる際の「途中で迷う」「検証が弱い」問題を、役割分担と検証で解決しようとする機能です。\nTDDは「先にテストを作り、動作を確認しながら開発する方法」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/FactoryAI/status/2042671155191173532\n・補足・関連情報: https://x.com/FactoryAI/status/2042671181002871090\n・補足・関連情報: https://x.com/FactoryAI/status/2042671205849928124\n・公式ニュース: https://factory.ai/news/missions\n\n💳 料金・プラン:\n\n・Factory料金ページ: https://factory.ai/pricing\n・料金ドキュメント: https://docs.factory.ai/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ❌ 有料プラン中心\n・補足:MissionsはFactory/Droidの機能として案内されています。対象プラン、利用量制限、提供時期は公式ニュースと料金ページで確認するのが安全です。\n\n▶️ 今すぐ試す(公式リンク):\n\n・Webアプリ: https://factory.ai/\n・公式ニュース: https://factory.ai/news/missions", "segmentation_method": "reviewed_source_semantics", "label": "🆕 新登場", "source_line_range": [ 1329, 2303 ] }, { "id": "body-region-4", "text": "導 入 事 例 google workspace gemini sph mediaとajax systemsの 活 用 事 例 を 紹 介 04 07 04 09 sph mediaがgoogle workspace gemini notebooklmを 活 用 し 翻 訳 時 間 を 半 減 した 事 例 が 紹 介 されました ビジュアル 生 成 成 功 率 99 という 成 果 も 示 されています ajax systemsがgemini 搭 載 google workspaceで プロセス 効 率 化 と 高 いセキュリティ 基 準 を 両 立 している 事 例 も 紹 介 されました ポイント 生 成 aiが ニュースルームやセキュリティ 重 視 の 企 業 業 務 で 実 際 に 活 用 され 始 めていることが 分 かります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com googleworkspace status 2041245308273725700 公 式 sns https x com googleworkspace status 2041985182467514673 google workspace 公 式 ブログ https workspace google com blog 関 連 リンク google workspace https workspace google com langchain langgraph langsmith linkedinとflintのエージェント 活 用 事 例 を 紹 介 04 09 04 11 linkedinがlanggraphとlangsmithを 活 用 し ai 採 用 エージェントを 構 築 した 事 例 が 紹 介 されました flint 社 は 自 律 型 webサイト 生 成 プラットフォームでlangsmithを 使 い エージェントの 可 視 化 とコスト 追 跡 を 行 っていると 紹 介 されています どちらもエージェントの 本 番 運 用 に 関 わる 事 例 です ポイント エージェントを 業 務 に 入 れる 際 は 動 作 の 可 視 化 評 価 コスト 追 跡 が 重 要 であることを 示 す 事 例 です aiをただ 使 うだけでなく どう 動 いたかを 見 える 化 する 段 階 に 入 っているのがポイントです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com langchain status 2041921174888968479 公 式 sns https x com langchain status 2042678270156562731 langchain 公 式 ブログ https www langchain com blog 関 連 リンク langsmith https smith langchain com langgraph https www langchain com langgraph", "source_text": "🏢 導入・事例\n【Google Workspace】【Gemini】SPH MediaとAjax Systemsの活用事例を紹介(04/07〜04/09)\n\nSPH MediaがGoogle Workspace、Gemini、NotebookLMを活用し、翻訳時間を半減した事例が紹介されました。\n\nビジュアル生成成功率99%という成果も示されています。\n\nAjax SystemsがGemini搭載Google Workspaceで、プロセス効率化と高いセキュリティ基準を両立している事例も紹介されました。\n\n▶️ ポイント:\n\n生成AIが、ニュースルームやセキュリティ重視の企業業務で実際に活用され始めていることが分かります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GoogleWorkspace/status/2041245308273725700\n・公式SNS: https://x.com/GoogleWorkspace/status/2041985182467514673\n・Google Workspace公式ブログ: https://workspace.google.com/blog/\n\n▶️ 関連リンク:\n\n・Google Workspace: https://workspace.google.com/\n\n【LangChain】【LangGraph / LangSmith】LinkedInとFlintのエージェント活用事例を紹介(04/09〜04/11)\n\nLinkedInがLangGraphとLangSmithを活用し、AI採用エージェントを構築した事例が紹介されました。\n\nFlint社は、自律型Webサイト生成プラットフォームでLangSmithを使い、エージェントの可視化とコスト追跡を行っていると紹介されています。\n\nどちらもエージェントの本番運用に関わる事例です。\n\n▶️ ポイント:\n\nエージェントを業務に入れる際は、動作の可視化・評価・コスト追跡が重要であることを示す事例です。\nAIをただ使うだけでなく、「どう動いたかを見える化する」段階に入っているのがポイントです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/LangChain/status/2041921174888968479\n・公式SNS: https://x.com/LangChain/status/2042678270156562731\n・LangChain公式ブログ: https://www.langchain.com/blog\n\n▶️ 関連リンク:\n\n・LangSmith: https://smith.langchain.com/\n・LangGraph: https://www.langchain.com/langgraph", "segmentation_method": "reviewed_source_semantics", "label": "🏢 導入・事例", "source_line_range": [ 2304, 2350 ] }, { "id": "body-region-5", "text": "制 度 ガバナンス anthropic project glasswing aiで 重 要 ソフトウェアの 脆 弱 性 発 見 を 支 援 04 07 anthropicがproject glasswingを 発 表 しました claude mythos previewを 使 い 重 要 ソフトウェアの 脆 弱 性 発 見 修 正 を 支 援 する 取 り 組 みです aws apple broadcom cisco crowdstrike google jpmorgan chase linux foundation microsoft nvidia palo alto networksなどとの 連 携 が 紹 介 されています mythos previewは 一 般 公 開 せず 安 全 展 開 のためのセーフガードをテストすると 説 明 されています 最 大 1 億 ドルの 使 用 クレジット 提 供 も 表 明 されています ポイント 高 性 能 aiを 攻 撃 ではなく 防 御 に 使 うため 企 業 oss 研 究 者 を 巻 き 込 む 大 型 セキュリティ 施 策 です 初 心 者 向 けに 言 うと aiを 使 って 重 要 ソフトの 弱 点 を 早 く 見 つける 取 り 組 み です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com anthropicai status 2041578392852517128 技 術 レポート 導 線 https x com anthropicai status 2041578416487489601 システムカード 導 線 https x com anthropicai status 2041580670774923517 公 式 ページ https www anthropic com project glasswing 補 足 関 連 情 報 https www anthropic com glasswing 技 術 安 全 性 関 連 https red anthropic com 2026 mythos preview 関 連 情 報 mythos previewは 一 般 公 開 予 定 なしと 説 明 されています 一 般 ユーザー 向 けの 新 機 能 というより ai 安 全 性 サイバー 防 御 に 関 する 取 り 組 みです openai safety fellowship ai 安 全 性 アライメント 研 究 支 援 プログラムを 発 表 04 07 openai safety fellowshipが 発 表 されました aiの 安 全 性 とアライメントに 関 する 独 立 研 究 や 次 世 代 研 究 者 を 支 援 するプログラムです 安 全 性 研 究 の 裾 野 を 広 げる 取 り 組 みとして 位 置 づけられます ポイント aiの 能 力 向 上 だけでなく 安 全 性 研 究 に 人 材 と 資 金 を 向 ける 動 きが 続 いています アライメントは aiを 人 間 の 意 図 やルールに 沿 って 動 かすための 研 究 と 考 えると 分 かりやすいです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openai status 2041202511647019251 公 式 ページ https openai com index introducing openai safety fellowship 関 連 情 報 研 究 支 援 プログラムに 関 する 発 表 です 応 募 条 件 や 対 象 分 野 は 公 式 ページの 案 内 に 従 う 形 になります openai インテリジェンス 時 代 の 新 しい 産 業 政 策 文 書 を 公 開 04 07 openai newsroomが インテリジェンス 時 代 のための 新 しい 産 業 政 策 に 関 する 文 書 公 開 を 告 知 しました ai 時 代 の 産 業 政 策 に 関 する 考 え 方 を 示 す 文 書 です 規 制 産 業 競 争 力 インフラ 投 資 などの 議 論 に 関 わる 可 能 性 があります ポイント ai 企 業 が 製 品 だけでなく 国 家 産 業 政 策 の 議 論 にも 積 極 的 に 関 わり 始 めています ツール 利 用 者 にとっても 今 後 のai 規 制 や 産 業 支 援 の 方 向 性 を 見 るうえで 重 要 な 動 きです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openainewsroom status 2041198359420215453 公 式 ページ https openai com index industrial policy for the intelligence age 関 連 情 報 政 策 文 書 に 関 する 情 報 です 直 接 試 すツールではありませんが ai 業 界 の 方 向 性 を 知 るうえで 参 考 になります openai child safety blueprint ai 時 代 の 子 ども 保 護 方 針 を 提 示 04 08 openaiがchild safety blueprintを 発 表 しました ai 時 代 における 米 国 の 子 ども 保 護 強 化 に 向 けた 政 策 青 写 真 です 法 律 の 近 代 化 報 告 と 調 整 の 改 善 genaiによる 被 害 の 防 止 検 知 が 優 先 事 項 として 挙 げられています ポイント 生 成 aiの 普 及 に 伴 い 子 どもの 安 全 を 守 る 制 度 設 計 が 重 要 テーマになっています aiを 便 利 に 使 うだけでなく 安 全 に 使 うためのルールづくりも 進 んでいます 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openainewsroom status 2041851289886425325 公 式 ページ https openai com index introducing child safety blueprint 関 連 情 報 政 策 文 書 に 関 する 情 報 です ai 時 代 の 安 全 対 策 や 制 度 づくりに 関 心 がある 方 は 公 式 ページを 読 んでおくと 理 解 が 深 まります 資 金 m a 提 携 openai 大 型 資 金 調 達 と 計 算 能 力 戦 略 に 関 する 発 信 04 07 openai newsroomが openaiの 大 型 資 金 調 達 と 計 算 能 力 戦 略 に 触 れたbloomberg 動 画 を 共 有 しました 計 算 能 力 への 集 中 的 な 投 資 と そのフライホイール 効 果 について 言 及 されています ai 企 業 にとって モデル 性 能 だけでなく 計 算 資 源 確 保 が 競 争 力 の 中 心 になっていることが 示 されています ポイント 生 成 aiの 競 争 は モデル 開 発 だけでなく 巨 大 な 計 算 基 盤 に 資 金 を 投 入 できるかにも 左 右 されます 私 たち 利 用 者 側 から 見 ると こうした 投 資 が 将 来 のモデル 性 能 や 料 金 にも 影 響 する 可 能 性 があります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openainewsroom status 2041261969051918581 補 足 関 連 情 報 bloomberg 動 画 リンクは 投 稿 内 参 照 openai news https openai com news 関 連 情 報 資 金 調 達 計 算 能 力 戦 略 に 関 する 情 報 です ai 業 界 全 体 の 競 争 環 境 を 見 るうえで 参 考 になります 事 案 リスク openai axios 関 連 の 開 発 者 ツール 侵 害 に 関 する 対 応 を 告 知 しfaqを 公 開 04 11 openaiが axios 関 連 の 開 発 者 ツール 侵 害 への 対 応 について 公 式 ページを 公 開 しました openaiは macosアプリ 利 用 者 に 最 新 版 への 更 新 を 呼 びかけています 公 式 faqでは openaiユーザーデータへの 不 正 アクセスやopenaiシステム 侵 害 は 確 認 されていないと 説 明 されています 技 術 的 詳 細 とfaqがopenai comで 公 開 されています ポイント 自 社 システムに 直 接 侵 害 がなくても 外 部 ライブラリや 開 発 者 ツール 周 辺 の 問 題 がアプリ 更 新 やユーザー 対 応 につながることがあります aiツールも ふつうのアプリと 同 じように 最 新 版 へ 更 新 しておくことが 大 切 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openai status 2042780052669239782 公 式 faq 告 知 https openai com index axios developer tool compromise 関 連 情 報 セキュリティ 告 知 です 対 象 ユーザーは 公 式 案 内 に 沿 ってアプリを 最 新 版 に 更 新 しておくと 安 心 です openai イーロン マスク 訴 訟 に 反 論 04 08 openai newsroomが イーロン マスクによる 非 営 利 のopenai 財 団 への 訴 訟 について 反 論 しました 投 稿 では この 訴 訟 を 権 力 と 金 銭 のためのハラスメントキャンペーン と 表 現 しています 法 務 ガバナンス 上 の 大 きな 対 立 として 注 目 されます ポイント ai 企 業 の 成 長 に 伴 い 企 業 統 治 非 営 利 性 資 本 構 造 をめぐる 法 的 対 立 も 大 きなニュースになっています ツールの 機 能 とは 直 接 関 係 しませんが ai 業 界 の 今 後 を 見 るうえでは 重 要 な 動 きです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com openainewsroom status 2041648263078801765 openai news https openai com news 関 連 情 報 訴 訟 声 明 に 関 する 情 報 です 今 後 のopenaiの 組 織 運 営 や 業 界 動 向 にも 関 わる 可 能 性 があります 研 究 ベンチ allen ai wilddet3d 野 外 単 眼 3d 物 体 検 出 のオープンモデルをリリース 04 08 allen aiがwilddet3dをリリースしました 野 外 での 単 眼 3d 物 体 検 出 向 けオープンモデルです テキスト クリック 2dボックスで 動 作 し ゼロショット 評 価 で 従 来 最 高 スコアをほぼ2 倍 に 更 新 したと 説 明 されています スレッド 内 で 研 究 の 詳 細 やデモ 評 価 結 果 が 補 足 されています ポイント 1 枚 の 画 像 から3d 空 間 内 の 物 体 を 理 解 する 技 術 は 自 動 運 転 ロボット arなどに 関 わる 重 要 分 野 です 初 心 者 向 けに 言 うと 写 真 から 物 体 の 位 置 や 奥 行 きをaiが 理 解 する 技 術 です 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com allen ai status 2041545111151022094 allen ai 公 式 サイト https allenai org 関 連 情 報 論 文 やコードは 公 式 snsスレッドからたどれる 形 で 案 内 されています 研 究 公 開 系 のため 利 用 条 件 は 論 文 コード 公 開 先 のライセンスに 従 う 形 になります allen ai molmoweb webエージェント 研 究 の 全 コードベースを 公 開 04 11 allen aiがmolmowebの 全 コードベース 公 開 を 発 表 しました 学 習 コード 評 価 ハーネス アノテーションツール 合 成 データパイプライン デモ 用 クライアントコードが 含 まれます 自 前 タスクでwebエージェントの 学 習 適 応 評 価 を 実 施 できるようにする 発 表 です ポイント webエージェント 研 究 を 再 現 拡 張 しやすくするため 研 究 だけでなく 開 発 者 にも 価 値 のあるコード 公 開 です webエージェントとは ブラウザ 上 で 調 べる クリックする 入 力 するような 作 業 を 行 うaiのことです 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com allen ai status 2042618879650725996 allen ai 公 式 サイト https allenai org 関 連 情 報 githubや 論 文 への 導 線 は 公 式 snsスレッドから 案 内 されています 基 盤 インフラ google maps platform street view insights bigquery vertex ai 連 携 でインフラ 分 析 へ 活 用 04 08 google maps platformが street view insightsをbigquery vertex aiと 連 携 して 活 用 できることを 紹 介 しました 2 800 億 枚 超 の360 3d 画 像 を インフラストラクチャーインテリジェンスへ 変 換 できると 説 明 されています 街 路 設 備 都 市 インフラ 分 析 に 関 わる 基 盤 アップデートです ポイント 地 図 画 像 ai データ 基 盤 を 組 み 合 わせることで 都 市 やインフラの 状 況 把 握 を 自 動 化 しやすくなります 身 近 なところでは 道 路 看 板 設 備 街 の 変 化 をデータとして 分 析 するような 使 い 方 につながります 一 次 ソース 公 式 ブログ 公 式 snsなど 公 式 sns https x com gmapsplatform status 2041590303426040122 google maps platform https mapsplatform google com bigquery https cloud google com bigquery vertex ai https cloud google com vertex ai 料 金 プラン google maps platform 料 金 https mapsplatform google com pricing google cloud 料 金 https cloud google com pricing 無 料 で 使 えるか 利 用 料 金 無 料 で 試 せる 部 分 あり 本 格 利 用 は 従 量 課 金 補 足 google cloudやgoogle maps platformには 無 料 枠 や 試 用 枠 がある 場 合 があります ただし bigquery vertex ai maps platformを 組 み 合 わせた 本 格 的 な 分 析 では 利 用 量 に 応 じた 課 金 が 発 生 する 可 能 性 があります 関 連 リンク google maps platform https mapsplatform google com google cloud https cloud google com トレンド 今 後 の 注 目 4 5の 週 は aiエージェントを 本 番 運 用 するための 基 盤 整 備 が 大 きな 流 れでした さらに seedance 2 0やgemma 4など モデルそのものよりも どのツールで 使 えるか がニュース 価 値 になっています 今 後 は 料 金 制 限 安 全 性 企 業 導 入 モデル 対 応 範 囲 の 変 化 が 重 要 なチェックポイントになりそうです ここまで 見 ると 少 し 専 門 的 なニュースも 多 く 感 じるかもしれません ただ 初 心 者 の 方 はすべてを 理 解 しようとしなくて 大 丈 夫 です 大 事 なのは aiがどんどん 普 段 の 仕 事 道 具 の 中 に 入 ってきているという 流 れをつかむことです たとえば slackで 依 頼 する wordで 文 章 を 直 す office 内 で 資 料 を 作 る 動 画 をsns 向 けに 変 換 する こうした 身 近 な 作 業 から ai 活 用 はかなり 試 しやすくなっています まとめ コラム この 週 の 大 きな 流 れは aiが 答 えるだけのツール から 作 業 を 進 める 存 在 へ 進 化 していることです claude managed agents genspark 4 0 factory desktop slack 連 携 office 連 携 などを 見 ると aiはチャット 画 面 の 中 だけでなく 普 段 使 っている 仕 事 環 境 の 中 に 入 り 始 めています もちろん すべてをすぐに 任 せられるわけではありません 料 金 精 度 セキュリティ 対 象 プランなど 確 認 すべき 点 もまだ 多 いです ただ これからのai 活 用 では 何 を 聞 くか だけでなく どの 作 業 をaiに 任 せるかが 重 要 になっていきそうです まずは 資 料 作 成 調 査 議 事 録 コード 修 正 sns 動 画 制 作 など 自 分 の 作 業 の 中 で 少 し 面 倒 だな と 感 じるものを1つ 選 んで 関 連 ツールの 公 式 情 報 を 見 てみるのがおすすめです いきなり 全 部 をaiに 任 せる 必 要 はありません まずは 小 さな 作 業 から 試 して ここはaiに 任 せても 大 丈 夫 そう という 感 覚 を 少 しずつ 増 やしていくのが いちばん 現 実 的 な 使 い 方 だと 思 います 今 回 の 記 事 は 以 上 になります ぜひみなさんも 気 になったaiツールを1つ 選 んで 自 分 の 作 業 にどう 使 えるか 試 してみてくださいね", "source_text": "📜 制度・ガバナンス\n【Anthropic】【Project Glasswing】AIで重要ソフトウェアの脆弱性発見を支援(04/07)\n\nAnthropicがProject Glasswingを発表しました。\n\nClaude Mythos Previewを使い、重要ソフトウェアの脆弱性発見・修正を支援する取り組みです。\n\nAWS、Apple、Broadcom、Cisco、CrowdStrike、Google、JPMorgan Chase、Linux Foundation、Microsoft、NVIDIA、Palo Alto Networksなどとの連携が紹介されています。\n\nMythos Previewは一般公開せず、安全展開のためのセーフガードをテストすると説明されています。\n\n最大1億ドルの使用クレジット提供も表明されています。\n\n▶️ ポイント:\n\n高性能AIを攻撃ではなく防御に使うため、企業・OSS・研究者を巻き込む大型セキュリティ施策です。\n初心者向けに言うと、「AIを使って重要ソフトの弱点を早く見つける取り組み」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/AnthropicAI/status/2041578392852517128\n・技術レポート導線: https://x.com/AnthropicAI/status/2041578416487489601\n・システムカード導線: https://x.com/AnthropicAI/status/2041580670774923517\n・公式ページ: https://www.anthropic.com/project/glasswing\n・補足・関連情報: https://www.anthropic.com/glasswing\n・技術/安全性関連: https://red.anthropic.com/2026/mythos-preview/\n\n▶️ 関連情報:\n\n・Mythos Previewは一般公開予定なしと説明されています。\n・一般ユーザー向けの新機能というより、AI安全性・サイバー防御に関する取り組みです。\n\n【OpenAI】【Safety Fellowship】AI安全性・アライメント研究支援プログラムを発表(04/07)\n\nOpenAI Safety Fellowshipが発表されました。\n\nAIの安全性とアライメントに関する独立研究や、次世代研究者を支援するプログラムです。\n\n安全性研究の裾野を広げる取り組みとして位置づけられます。\n\n▶️ ポイント:\n\nAIの能力向上だけでなく、安全性研究に人材と資金を向ける動きが続いています。\nアライメントは「AIを人間の意図やルールに沿って動かすための研究」と考えると分かりやすいです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAI/status/2041202511647019251\n・公式ページ: https://openai.com/index/introducing-openai-safety-fellowship/\n\n▶️ 関連情報:\n\n・研究支援プログラムに関する発表です。\n・応募条件や対象分野は公式ページの案内に従う形になります。\n\n【OpenAI】インテリジェンス時代の新しい産業政策文書を公開(04/07)\n\nOpenAI Newsroomが「インテリジェンス時代のための新しい産業政策」に関する文書公開を告知しました。\n\nAI時代の産業政策に関する考え方を示す文書です。\n\n規制・産業競争力・インフラ投資などの議論に関わる可能性があります。\n\n▶️ ポイント:\n\nAI企業が製品だけでなく、国家・産業政策の議論にも積極的に関わり始めています。\nツール利用者にとっても、今後のAI規制や産業支援の方向性を見るうえで重要な動きです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041198359420215453\n・公式ページ: https://openai.com/index/industrial-policy-for-the-intelligence-age/\n\n▶️ 関連情報:\n\n・政策文書に関する情報です。\n・直接試すツールではありませんが、AI業界の方向性を知るうえで参考になります。\n\n【OpenAI】【Child Safety Blueprint】AI時代の子ども保護方針を提示(04/08)\n\nOpenAIがChild Safety Blueprintを発表しました。\n\nAI時代における米国の子ども保護強化に向けた政策青写真です。\n\n法律の近代化、報告と調整の改善、GenAIによる被害の防止・検知が優先事項として挙げられています。\n\n▶️ ポイント:\n\n生成AIの普及に伴い、子どもの安全を守る制度設計が重要テーマになっています。\nAIを便利に使うだけでなく、安全に使うためのルールづくりも進んでいます。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041851289886425325\n・公式ページ: https://openai.com/index/introducing-child-safety-blueprint/\n\n▶️ 関連情報:\n\n・政策文書に関する情報です。\n・AI時代の安全対策や制度づくりに関心がある方は、公式ページを読んでおくと理解が深まります。\n\n💰 資金・M&A・提携\n【OpenAI】大型資金調達と計算能力戦略に関する発信(04/07)\n\nOpenAI Newsroomが、OpenAIの大型資金調達と計算能力戦略に触れたBloomberg動画を共有しました。\n\n計算能力への集中的な投資と、そのフライホイール効果について言及されています。\n\nAI企業にとって、モデル性能だけでなく計算資源確保が競争力の中心になっていることが示されています。\n\n▶️ ポイント:\n\n生成AIの競争は、モデル開発だけでなく、巨大な計算基盤に資金を投入できるかにも左右されます。\n私たち利用者側から見ると、こうした投資が将来のモデル性能や料金にも影響する可能性があります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041261969051918581\n・補足・関連情報:Bloomberg動画リンクは投稿内参照\n・OpenAI News: https://openai.com/news/\n\n▶️ 関連情報:\n\n・資金調達・計算能力戦略に関する情報です。\n・AI業界全体の競争環境を見るうえで参考になります。\n\n⚠️ 事案・リスク\n【OpenAI】Axios関連の開発者ツール侵害に関する対応を告知しFAQを公開(04/11)\n\nOpenAIが、Axios関連の開発者ツール侵害への対応について公式ページを公開しました。\n\nOpenAIは、macOSアプリ利用者に最新版への更新を呼びかけています。\n\n公式FAQでは、OpenAIユーザーデータへの不正アクセスやOpenAIシステム侵害は確認されていないと説明されています。\n\n技術的詳細とFAQがopenai.comで公開されています。\n\n▶️ ポイント:\n\n自社システムに直接侵害がなくても、外部ライブラリや開発者ツール周辺の問題がアプリ更新やユーザー対応につながることがあります。\nAIツールも、ふつうのアプリと同じように最新版へ更新しておくことが大切です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAI/status/2042780052669239782\n・公式FAQ/告知: https://openai.com/index/axios-developer-tool-compromise/\n\n▶️ 関連情報:\n\n・セキュリティ告知です。\n・対象ユーザーは、公式案内に沿ってアプリを最新版に更新しておくと安心です。\n\n【OpenAI】イーロン・マスク訴訟に反論(04/08)\n\nOpenAI Newsroomが、イーロン・マスクによる非営利のOpenAI財団への訴訟について反論しました。\n\n投稿では、この訴訟を「権力と金銭のためのハラスメントキャンペーン」と表現しています。\n\n法務・ガバナンス上の大きな対立として注目されます。\n\n▶️ ポイント:\n\nAI企業の成長に伴い、企業統治・非営利性・資本構造をめぐる法的対立も大きなニュースになっています。\nツールの機能とは直接関係しませんが、AI業界の今後を見るうえでは重要な動きです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/OpenAINewsroom/status/2041648263078801765\n・OpenAI News: https://openai.com/news/\n\n▶️ 関連情報:\n\n・訴訟・声明に関する情報です。\n・今後のOpenAIの組織運営や業界動向にも関わる可能性があります。\n\n📚 研究・ベンチ\n【Allen AI】【WildDet3D】野外単眼3D物体検出のオープンモデルをリリース(04/08)\n\nAllen AIがWildDet3Dをリリースしました。\n\n野外での単眼3D物体検出向けオープンモデルです。\n\nテキスト、クリック、2Dボックスで動作し、ゼロショット評価で従来最高スコアをほぼ2倍に更新したと説明されています。\n\nスレッド内で、研究の詳細やデモ、評価結果が補足されています。\n\n▶️ ポイント:\n\n1枚の画像から3D空間内の物体を理解する技術は、自動運転・ロボット・ARなどに関わる重要分野です。\n初心者向けに言うと、「写真から物体の位置や奥行きをAIが理解する技術」です。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/allen_ai/status/2041545111151022094\n・Allen AI公式サイト: https://allenai.org/\n\n▶️ 関連情報:\n\n・論文やコードは公式SNSスレッドからたどれる形で案内されています。\n・研究公開系のため、利用条件は論文・コード公開先のライセンスに従う形になります。\n\n【Allen AI】【MolmoWeb】Webエージェント研究の全コードベースを公開(04/11)\n\nAllen AIがMolmoWebの全コードベース公開を発表しました。\n\n学習コード、評価ハーネス、アノテーションツール、合成データパイプライン、デモ用クライアントコードが含まれます。\n\n自前タスクでWebエージェントの学習・適応・評価を実施できるようにする発表です。\n\n▶️ ポイント:\n\nWebエージェント研究を再現・拡張しやすくするため、研究だけでなく開発者にも価値のあるコード公開です。\nWebエージェントとは、ブラウザ上で調べる・クリックする・入力するような作業を行うAIのことです。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/allen_ai/status/2042618879650725996\n・Allen AI公式サイト: https://allenai.org/\n\n▶️ 関連情報:\n\n・GitHubや論文への導線は公式SNSスレッドから案内されています。\n\n🧱 基盤・インフラ\n【Google Maps Platform】【Street View Insights】BigQuery・Vertex AI連携でインフラ分析へ活用(04/08)\n\nGoogle Maps Platformが、Street View InsightsをBigQuery・Vertex AIと連携して活用できることを紹介しました。\n\n2,800億枚超の360°/3D画像を、インフラストラクチャーインテリジェンスへ変換できると説明されています。\n\n街路・設備・都市インフラ分析に関わる基盤アップデートです。\n\n▶️ ポイント:\n\n地図・画像・AI・データ基盤を組み合わせることで、都市やインフラの状況把握を自動化しやすくなります。\n身近なところでは、道路、看板、設備、街の変化をデータとして分析するような使い方につながります。\n\n▶️ 一次ソース(公式ブログ/公式SNSなど):\n\n・公式SNS: https://x.com/GMapsPlatform/status/2041590303426040122\n・Google Maps Platform: https://mapsplatform.google.com/\n・BigQuery: https://cloud.google.com/bigquery\n・Vertex AI: https://cloud.google.com/vertex-ai\n\n💳 料金・プラン:\n\n・Google Maps Platform料金: https://mapsplatform.google.com/pricing/\n・Google Cloud料金: https://cloud.google.com/pricing\n\n▶️ 無料で使えるか:\n\n・利用料金: ⚠️ 無料で試せる部分あり、本格利用は従量課金\n・補足:Google CloudやGoogle Maps Platformには無料枠や試用枠がある場合があります。ただし、BigQuery、Vertex AI、Maps Platformを組み合わせた本格的な分析では、利用量に応じた課金が発生する可能性があります。\n\n▶️ 関連リンク:\n\n・Google Maps Platform: https://mapsplatform.google.com/\n・Google Cloud: https://cloud.google.com/\n\nトレンド & 今後の注目\n\n4/5の週は、AIエージェントを本番運用するための基盤整備が大きな流れでした。\n\nさらに、Seedance 2.0やGemma 4など、モデルそのものよりも「どのツールで使えるか」がニュース価値になっています。\n\n今後は、料金制限・安全性・企業導入・モデル対応範囲の変化が重要なチェックポイントになりそうです。\n\nここまで見ると、少し専門的なニュースも多く感じるかもしれません。\nただ、初心者の方はすべてを理解しようとしなくて大丈夫です。\n\n大事なのは、AIがどんどん普段の仕事道具の中に入ってきているという流れをつかむことです。\n\nたとえば、Slackで依頼する、Wordで文章を直す、Office内で資料を作る、動画をSNS向けに変換する。\nこうした身近な作業から、AI活用はかなり試しやすくなっています。\n\nまとめ・コラム\n\nこの週の大きな流れは、AIが「答えるだけのツール」から「作業を進める存在」へ進化していることです。\n\nClaude Managed Agents、Genspark 4.0、Factory Desktop、Slack連携、Office連携などを見ると、AIはチャット画面の中だけでなく、普段使っている仕事環境の中に入り始めています。\n\nもちろん、すべてをすぐに任せられるわけではありません。\n料金、精度、セキュリティ、対象プランなど、確認すべき点もまだ多いです。\n\nただ、これからのAI活用では「何を聞くか」だけでなく、どの作業をAIに任せるかが重要になっていきそうです。\n\nまずは、資料作成、調査、議事録、コード修正、SNS動画制作など、自分の作業の中で「少し面倒だな」と感じるものを1つ選んで、関連ツールの公式情報を見てみるのがおすすめです。\n\nいきなり全部をAIに任せる必要はありません。\nまずは小さな作業から試して、「ここはAIに任せても大丈夫そう」という感覚を少しずつ増やしていくのが、いちばん現実的な使い方だと思います。\n\n今回の記事は以上になります。\nぜひみなさんも、気になったAIツールを1つ選んで、自分の作業にどう使えるか試してみてくださいね。", "segmentation_method": "reviewed_source_semantics", "label": "📜 制度・ガバナンス — まとめ・コラム", "source_line_range": [ 2351, 2643 ] } ], "ending": { "text": "う感覚を少しずつ増やしていくのが、いちばん現実的な使い方だと思います。\n\n今回の記事は以上になります。\nぜひみなさんも、気になったAIツールを1つ選んで、自分の作業にどう使えるか試してみてくださいね。" } } }, { "id": "article-029", "name": "Writes and Write-Nots", "url": "https://www.paulgraham.com/writes.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "world divided into writes and write-nots" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "October 2024" ] }, { "id": "stable-2", "alternatives": [ "Jessica Livingston, Ben Miller, and Robert Morris" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Initial full-page screenshot and DOM show the complete essay, Lamport quotation, final comparison and acknowledgment, with no collapsed content or overlay. Site navigation and article title are image lettering. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "ground_truth_main_content": "October 2024\n\nI'm usually reluctant to make predictions about technology, but I feel fairly confident about this one: in a couple decades there won't be many people who can write.\n\nOne of the strangest things you learn if you're a writer is how many people have trouble writing. Doctors know how many people have a mole they're worried about; people who are good at setting up computers know how many people aren't; writers know how many people need help writing.\n\nThe reason so many people have trouble writing is that it's fundamentally difficult. To write well you have to think clearly, and thinking clearly is hard.\n\nAnd yet writing pervades many jobs, and the more prestigious the job, the more writing it tends to require.\n\nThese two powerful opposing forces, the pervasive expectation of writing and the irreducible difficulty of doing it, create enormous pressure. This is why eminent professors often turn out to have resorted to plagiarism. The most striking thing to me about these cases is the pettiness of the thefts. The stuff they steal is usually the most mundane boilerplate — the sort of thing that anyone who was even halfway decent at writing could turn out with no effort at all. Which means they're not even halfway decent at writing.\n\nTill recently there was no convenient escape valve for the pressure created by these opposing forces. You could pay someone to write for you, like JFK, or plagiarize, like MLK, but if you couldn't buy or steal words, you had to write them yourself. And as a result nearly everyone who was expected to write had to learn how.\n\nNot anymore. AI has blown this world open. Almost all pressure to write has dissipated. You can have AI do it for you, both in school and at work.\n\nThe result will be a world divided into writes and write-nots. There will still be some people who can write. Some of us like it. But the middle ground between those who are good at writing and those who can't write at all will disappear. Instead of good writers, ok writers, and people who can't write, there will just be good writers and people who can't write.\n\nIs that so bad? Isn't it common for skills to disappear when technology makes them obsolete? There aren't many blacksmiths left, and it doesn't seem to be a problem.\n\nYes, it's bad. The reason is something I mentioned earlier: writing is thinking. In fact there's a kind of thinking that can only be done by writing. You can't make this point better than Leslie Lamport did:\nIf you're thinking without writing, you only think you're thinking.\nSo a world divided into writes and write-nots is more dangerous than it sounds. It will be a world of thinks and think-nots. I know which half I want to be in, and I bet you do too.\n\nThis situation is not unprecedented. In preindustrial times most people's jobs made them strong. Now if you want to be strong, you work out. So there are still strong people, but only those who choose to be.\n\nIt will be the same with writing. There will still be smart people, but only those who choose to be.\n\n\n\n\n\n\n\n\n\nThanks to Jessica Livingston, Ben Miller, and Robert Morris for reading drafts of this.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "october 2024 i m usually reluctant to make predictions about technology but i feel fairly confident about this one in a couple decades there won t be many people who can write one of the strangest things you learn if you re a writer is how many people have trouble writing doctors know how many people have a mole they re worried about people who are good at setting up computers know how many people aren t writers know how many people need help writing the reason so many people have trouble writing is that it s fundamentally difficult to write well you have to think clearly and thinking clearly is hard and yet writing pervades many jobs and the more prestigious the job the more writing it tends to require these two powerful opposing forces the pervasive expectation of writing and the irreducible difficulty of doing it create enormous pressure this is why eminent professors often turn out to have resorted to plagiarism the most striking thing to me about these cases is the pettiness of the thefts the stuff they steal is usually the most mundane boilerplate the sort of thing that anyone who was even halfway decent at writing could turn out with no effort at all which means they re not even halfway decent at writing till recently there was no convenient escape valve for the pressure created by these opposing forces you could pay someone to write for you like jfk or plagiarize like mlk but if you couldn t buy or steal words you had to write them yourself and as a result nearly everyone who was expected to write had to learn how not anymore ai has blown this world open almost all pressure to write has dissipated you can have ai do it for you both in school and at work the result will be a world divided into writes and write nots there will still be some people who can write some of us like it but the middle ground between those who are good at writing and those who can t write at all will disappear instead of good writers ok writers and people who can t write there will just be good writers and people who can t write is that so bad isn t it common for skills to disappear when technology makes them obsolete there aren t many blacksmiths left and it doesn t seem to be a problem yes it s bad the reason is something i mentioned earlier writing is thinking in fact there s a kind of thinking that can only be done by writing you can t make this point better than leslie lamport did", "source_text": "October 2024\n\nI'm usually reluctant to make predictions about technology, but I feel fairly confident about this one: in a couple decades there won't be many people who can write.\n\nOne of the strangest things you learn if you're a writer is how many people have trouble writing. Doctors know how many people have a mole they're worried about; people who are good at setting up computers know how many people aren't; writers know how many people need help writing.\n\nThe reason so many people have trouble writing is that it's fundamentally difficult. To write well you have to think clearly, and thinking clearly is hard.\n\nAnd yet writing pervades many jobs, and the more prestigious the job, the more writing it tends to require.\n\nThese two powerful opposing forces, the pervasive expectation of writing and the irreducible difficulty of doing it, create enormous pressure. This is why eminent professors often turn out to have resorted to plagiarism. The most striking thing to me about these cases is the pettiness of the thefts. The stuff they steal is usually the most mundane boilerplate — the sort of thing that anyone who was even halfway decent at writing could turn out with no effort at all. Which means they're not even halfway decent at writing.\n\nTill recently there was no convenient escape valve for the pressure created by these opposing forces. You could pay someone to write for you, like JFK, or plagiarize, like MLK, but if you couldn't buy or steal words, you had to write them yourself. And as a result nearly everyone who was expected to write had to learn how.\n\nNot anymore. AI has blown this world open. Almost all pressure to write has dissipated. You can have AI do it for you, both in school and at work.\n\nThe result will be a world divided into writes and write-nots. There will still be some people who can write. Some of us like it. But the middle ground between those who are good at writing and those who can't write at all will disappear. Instead of good writers, ok writers, and people who can't write, there will just be good writers and people who can't write.\n\nIs that so bad? Isn't it common for skills to disappear when technology makes them obsolete? There aren't many blacksmiths left, and it doesn't seem to be a problem.\n\nYes, it's bad. The reason is something I mentioned earlier: writing is thinking. In fact there's a kind of thinking that can only be done by writing. You can't make this point better than Leslie Lamport did:", "segmentation_method": "reviewed_source_semantics", "label": "开篇:October 2024", "source_line_range": [ 1, 21 ] }, { "id": "body-region-2", "text": "if you re thinking without writing you only think you re thinking so a world divided into writes and write nots is more dangerous than it sounds it will be a world of thinks and think nots i know which half i want to be in and i bet you do too this situation is not unprecedented in preindustrial times most people s jobs made them strong now if you want to be strong you work out so there are still strong people but only those who choose to be it will be the same with writing there will still be smart people but only those who choose to be thanks to jessica livingston ben miller and robert morris for reading drafts of this", "source_text": "If you're thinking without writing, you only think you're thinking.\nSo a world divided into writes and write-nots is more dangerous than it sounds. It will be a world of thinks and think-nots. I know which half I want to be in, and I bet you do too.\n\nThis situation is not unprecedented. In preindustrial times most people's jobs made them strong. Now if you want to be strong, you work out. So there are still strong people, but only those who choose to be.\n\nIt will be the same with writing. There will still be smart people, but only those who choose to be.\n\n\n\n\n\n\n\n\n\nThanks to Jessica Livingston, Ben Miller, and Robert Morris for reading drafts of this.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:If you're thinking without writing, you only think you're th", "source_line_range": [ 22, 37 ] } ], "ending": { "text": "be.\n\n\n\n\n\n\n\n\n\nThanks to Jessica Livingston, Ben Miller, and Robert Morris for reading drafts of this." } }, "source_benchmark": { "comment_qualification_proof": { "path": "article-completeness-r5/article-029/comment-qualification-reference-r5.json", "sha256": "a78ff2b9d8d8a60ee6f7e3045e221aaedd651cada287ccb6298cc7b3b052abbf", "chars": 768, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } } }, { "id": "article-030", "name": "A cartoon intro to WebAssembly", "url": "https://hacks.mozilla.org/2017/02/a-cartoon-intro-to-webassembly/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "A cartoon intro to WebAssembly" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Lin Clark" ] }, { "id": "stable-2", "alternatives": [ "Featured Article" ] }, { "id": "stable-3", "alternatives": [ "Performance" ] }, { "id": "stable-4", "alternatives": [ "Download Firefox" ] }, { "id": "stable-5", "alternatives": [ "About Lin Clark" ] }, { "id": "stable-6", "alternatives": [ "More articles by Lin Clark…" ] }, { "id": "stable-7", "alternatives": [ "Discover great resources for web development" ] }, { "id": "stable-8", "alternatives": [ "Sign up for the Mozilla Developer Newsletter:" ] }, { "id": "stable-9", "alternatives": [ "I'm okay with Mozilla handling my info as explained in this Privacy Policy." ] }, { "id": "stable-10", "alternatives": [ "Sign up now" ] }, { "id": "stable-11", "alternatives": [ "Comments are closed for this article." ] }, { "id": "stable-12", "alternatives": [ "Creative Commons Attribution Share-Alike License v3.0" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete introductory article including linked Background, present and future series lists. Full-page screenshot verifies all prose and final link before separate author card. Image diagram text excluded; ordinary linked titles preserved with href in review.json. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "A cartoon intro to WebAssembly" ], "html_selector": "h1.post__title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "li.comment", "author_selector": ".comment__title > cite.author", "body_selector": ".comment__body", "id_attribute": "id", "section_markers": [ "comments", "Comments" ], "version": 2, "minimum_comments": 18, "text_scope": { "body_end": "ules\nWhat makes WebAssembly fast?\nWebAssembly, the future:\nWhere is WebAssembly now and what’s next?", "end_markers": [ "Comments are closed for this article." ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-030/comment-qualification-reference-r5.json", "sha256": "d0e5262d8ac81a324ee4e3a28d279505ab5f6cfd360a1dfa9cdae17b43d7b957", "chars": 7720, "record_count": 22 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 22, "qualification_only": true } }, "ground_truth_main_content": "WebAssembly is fast. You’ve probably heard this. But what is it that makes WebAssembly fast?\n\nIn this series, I want to explain to you why WebAssembly is fast.\n\nWait, so what is WebAssembly?\n\nWebAssembly is a way of taking code written in programming languages other than JavaScript and running that code in the browser. So when people say that WebAssembly is fast, what they are comparing it to is JavaScript.\n\nNow, I don’t want to imply that it’s an either/or situation — that you’re either using WebAssembly or using JavaScript. In fact, we expect that developers will use both WebAssembly and JavaScript in the same application.\n\nBut it is useful to compare the two, so you can understand the potential impact that WebAssembly will have.\n\nA little performance history\n\nJavaScript was created in 1995. It wasn’t designed to be fast, and for the first decade, it wasn’t fast.\n\nThen the browsers started getting more competitive.\n\nIn 2008, a period that people call the performance wars began. Multiple browsers added just-in-time compilers, also called JITs. As JavaScript was running, the JIT could see patterns and make the code run faster based on those patterns.\n\nThe introduction of these JITs led to an inflection point in the performance of JavaScript. Execution of JS was 10x faster.\n\nWith this improved performance, JavaScript started being used for things no one ever expected it to be used for, like server-side programming with Node.js. The performance improvement made it feasible to use JavaScript on a whole new class of problems.\n\nWe may be at another one of those inflection points now, with WebAssembly.\n\nSo, let’s dive into the details to understand what makes WebAssembly fast.\n\nBackground:\nA crash course in just-in-time (JIT) compilers\nA crash course in assembly\nWebAssembly, the present:\nCreating and working with WebAssembly modules\nWhat makes WebAssembly fast?\nWebAssembly, the future:\nWhere is WebAssembly now and what’s next?", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 3, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "webassembly is fast you ve probably heard this but what is it that makes webassembly fast in this series i want to explain to you why webassembly is fast", "source_text": "WebAssembly is fast. You’ve probably heard this. But what is it that makes WebAssembly fast?\n\nIn this series, I want to explain to you why WebAssembly is fast.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:WebAssembly is fast. You’ve probably heard this. But what is", "source_line_range": [ 1, 4 ] }, { "id": "body-region-2", "text": "wait so what is webassembly webassembly is a way of taking code written in programming languages other than javascript and running that code in the browser so when people say that webassembly is fast what they are comparing it to is javascript now i don t want to imply that it s an either or situation that you re either using webassembly or using javascript in fact we expect that developers will use both webassembly and javascript in the same application but it is useful to compare the two so you can understand the potential impact that webassembly will have", "source_text": "Wait, so what is WebAssembly?\n\nWebAssembly is a way of taking code written in programming languages other than JavaScript and running that code in the browser. So when people say that WebAssembly is fast, what they are comparing it to is JavaScript.\n\nNow, I don’t want to imply that it’s an either/or situation — that you’re either using WebAssembly or using JavaScript. In fact, we expect that developers will use both WebAssembly and JavaScript in the same application.\n\nBut it is useful to compare the two, so you can understand the potential impact that WebAssembly will have.", "segmentation_method": "reviewed_source_semantics", "label": "Wait, so what is WebAssembly?", "source_line_range": [ 5, 12 ] }, { "id": "body-region-3", "text": "a little performance history javascript was created in 1995 it wasn t designed to be fast and for the first decade it wasn t fast then the browsers started getting more competitive in 2008 a period that people call the performance wars began multiple browsers added just in time compilers also called jits as javascript was running the jit could see patterns and make the code run faster based on those patterns the introduction of these jits led to an inflection point in the performance of javascript execution of js was 10x faster with this improved performance javascript started being used for things no one ever expected it to be used for like server side programming with node js the performance improvement made it feasible to use javascript on a whole new class of problems we may be at another one of those inflection points now with webassembly so let s dive into the details to understand what makes webassembly fast background a crash course in just in time jit compilers a crash course in assembly webassembly the present creating and working with webassembly modules what makes webassembly fast webassembly the future where is webassembly now and what s next", "source_text": "A little performance history\n\nJavaScript was created in 1995. It wasn’t designed to be fast, and for the first decade, it wasn’t fast.\n\nThen the browsers started getting more competitive.\n\nIn 2008, a period that people call the performance wars began. Multiple browsers added just-in-time compilers, also called JITs. As JavaScript was running, the JIT could see patterns and make the code run faster based on those patterns.\n\nThe introduction of these JITs led to an inflection point in the performance of JavaScript. Execution of JS was 10x faster.\n\nWith this improved performance, JavaScript started being used for things no one ever expected it to be used for, like server-side programming with Node.js. The performance improvement made it feasible to use JavaScript on a whole new class of problems.\n\nWe may be at another one of those inflection points now, with WebAssembly.\n\nSo, let’s dive into the details to understand what makes WebAssembly fast.\n\nBackground:\nA crash course in just-in-time (JIT) compilers\nA crash course in assembly\nWebAssembly, the present:\nCreating and working with WebAssembly modules\nWhat makes WebAssembly fast?\nWebAssembly, the future:\nWhere is WebAssembly now and what’s next?", "segmentation_method": "reviewed_source_semantics", "label": "A little performance history", "source_line_range": [ 13, 36 ] } ], "ending": { "text": "ules\nWhat makes WebAssembly fast?\nWebAssembly, the future:\nWhere is WebAssembly now and what’s next?" } } }, { "id": "article-031", "name": "Cloudflare outage on June 21, 2022", "url": "https://blog.cloudflare.com/cloudflare-outage-on-june-21-2022/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Cloudflare outage on June 21, 2022" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Products" ] }, { "id": "stable-2", "alternatives": [ "Solutions" ] }, { "id": "stable-3", "alternatives": [ "Resources" ] }, { "id": "stable-4", "alternatives": [ "Pricing" ] }, { "id": "stable-5", "alternatives": [ "All Categories" ] }, { "id": "stable-6", "alternatives": [ "Login" ] }, { "id": "stable-7", "alternatives": [ "Contact Sales" ] }, { "id": "stable-8", "alternatives": [ "Blog" ] }, { "id": "stable-9", "alternatives": [ "Outage" ] }, { "id": "stable-10", "alternatives": [ "Post Mortem" ] }, { "id": "stable-11", "alternatives": [ "Tom Strickx" ] }, { "id": "stable-12", "alternatives": [ "Jeremy Hartman" ] }, { "id": "stable-13", "alternatives": [ "COPY URL" ] }, { "id": "stable-14", "alternatives": [ "ON THIS PAGE" ] }, { "id": "stable-15", "alternatives": [ "DISCUSS ONLINE" ] }, { "id": "stable-16", "alternatives": [ "RELATED TAGS" ] }, { "id": "stable-17", "alternatives": [ "FOLLOW ON SOCIAL MEDIA" ] }, { "id": "stable-18", "alternatives": [ "Subscribe to receive notifications of new posts" ] }, { "id": "stable-19", "alternatives": [ "We’ll never share your email address." ] }, { "id": "stable-20", "alternatives": [ "Subscribe" ] }, { "id": "stable-21", "alternatives": [ "Getting Started" ] }, { "id": "stable-22", "alternatives": [ "Plans" ] }, { "id": "stable-23", "alternatives": [ "Partners" ] }, { "id": "stable-24", "alternatives": [ "Find a partner" ] }, { "id": "stable-25", "alternatives": [ "Startups" ] }, { "id": "stable-26", "alternatives": [ "Under attack?" ] }, { "id": "stable-27", "alternatives": [ "Domain name search" ] }, { "id": "stable-28", "alternatives": [ "Public interest" ] }, { "id": "stable-29", "alternatives": [ "Project Galileo" ] }, { "id": "stable-30", "alternatives": [ "Athenian Project" ] }, { "id": "stable-31", "alternatives": [ "Cloudflare for Campaigns" ] }, { "id": "stable-32", "alternatives": [ "Project Fairshot" ] }, { "id": "stable-33", "alternatives": [ "Impact/ESG" ] }, { "id": "stable-34", "alternatives": [ "App innovation report" ] }, { "id": "stable-35", "alternatives": [ "Cloudflare Radar" ] }, { "id": "stable-36", "alternatives": [ "Case studies" ] }, { "id": "stable-37", "alternatives": [ "Status" ] }, { "id": "stable-38", "alternatives": [ "Support" ] }, { "id": "stable-39", "alternatives": [ "Events" ] }, { "id": "stable-40", "alternatives": [ "SSE and SASE platform" ] }, { "id": "stable-41", "alternatives": [ "Cloudflare AI Cloud" ] }, { "id": "stable-42", "alternatives": [ "AI Security" ] }, { "id": "stable-43", "alternatives": [ "Frontend Development Platform" ] }, { "id": "stable-44", "alternatives": [ "Multi-Tenant Platform Development" ] }, { "id": "stable-45", "alternatives": [ "Web Security Platform" ] }, { "id": "stable-46", "alternatives": [ "Company" ] }, { "id": "stable-47", "alternatives": [ "About" ] }, { "id": "stable-48", "alternatives": [ "Careers" ] }, { "id": "stable-49", "alternatives": [ "Investors" ] }, { "id": "stable-50", "alternatives": [ "Press" ] }, { "id": "stable-51", "alternatives": [ "Press kit" ] }, { "id": "stable-52", "alternatives": [ "Global network" ] }, { "id": "stable-53", "alternatives": [ "Compliance" ] }, { "id": "stable-54", "alternatives": [ "Compliance resources" ] }, { "id": "stable-55", "alternatives": [ "Trust" ] }, { "id": "stable-56", "alternatives": [ "GDPR" ] }, { "id": "stable-57", "alternatives": [ "Responsible AI" ] }, { "id": "stable-58", "alternatives": [ "Transparency report" ] }, { "id": "stable-59", "alternatives": [ "Report abuse" ] }, { "id": "stable-60", "alternatives": [ "Developers" ] }, { "id": "stable-61", "alternatives": [ "Documentation" ] }, { "id": "stable-62", "alternatives": [ "Learning center" ] }, { "id": "stable-63", "alternatives": [ "Community" ] }, { "id": "stable-64", "alternatives": [ "Your privacy choices" ] }, { "id": "stable-65", "alternatives": [ "Report security issues" ] }, { "id": "stable-66", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-67", "alternatives": [ "Terms of use" ] }, { "id": "stable-68", "alternatives": [ "Trademark" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete incident post with six sections, timeline, all four configuration code examples and conclusion. Full-page capture and auto-height styles confirm complete prose; lazy image placeholders do not contribute body text. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Cloudflare outage on June 21, 2022" ], "html_selector": "h1.m-0.text-4xl,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-031/comment-qualification-reference-r5.json", "sha256": "8fa96745034983c9be1e2bf8e11d17ab52e8cdf2b1e4d0f47a926e9c830564a7", "chars": 792, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Introduction\n\nToday, June 21, 2022, Cloudflare suffered an outage that affected traffic in 19 of our data centers. Unfortunately, these 19 locations handle a significant proportion of our global traffic. This outage was caused by a change that was part of a long-running project to increase resilience in our busiest locations. A change to the network configuration in those locations caused an outage which started at 06:27 UTC. At 06:58 UTC the first data center was brought back online and by 07:42 UTC all data centers were online and working correctly.\n\nDepending on your location in the world you may have been unable to access websites and services that rely on Cloudflare. In other locations, Cloudflare continued to operate normally.\n\nWe are very sorry for this outage. This was our error and not the result of an attack or malicious activity.\n\nBackground\n\nOver the last 18 months, Cloudflare has been working to convert all of our busiest locations to a more flexible and resilient architecture. In this time, we’ve converted 19 of our data centers to this architecture, internally called Multi-Colo PoP (MCP): Amsterdam, Atlanta, Ashburn, Chicago, Frankfurt, London, Los Angeles, Madrid, Manchester, Miami, Milan, Mumbai, Newark, Osaka, São Paulo, San Jose, Singapore, Sydney, Tokyo.\n\nA critical part of this new architecture, which is designed as a Clos network, is an added layer of routing that creates a mesh of connections. This mesh allows us to easily disable and enable parts of the internal network in a data center for maintenance or to deal with a problem. This layer is represented by the spines in the following diagram.\n\nThis new architecture has provided us with significant reliability improvements, as well as allowing us to run maintenance in these locations without disrupting customer traffic. As these locations also carry a significant proportion of the Cloudflare traffic, any problem here can have a very wide impact, and unfortunately, that’s what happened today.\n\nIncident timeline and impact\n\nIn order to be reachable on the Internet, networks like Cloudflare make use of a protocol called BGP. As part of this protocol, operators define policies which decide which prefixes (a collection of adjacent IP addresses) are advertised to peers (the other networks they connect to), or accepted from peers.\n\nThese policies have individual components, which are evaluated sequentially. The end result is that any given prefixes will either be advertised or not advertised. A change in policy can mean a previously advertised prefix is no longer advertised, known as being \"withdrawn\", and those IP addresses will no longer be reachable on the Internet.\n\nWhile deploying a change to our prefix advertisement policies, a re-ordering of terms caused us to withdraw a critical subset of prefixes.\n\nDue to this withdrawal, Cloudflare engineers experienced added difficulty in reaching the affected locations to revert the problematic change. We have backup procedures for handling such an event and used them to take control of the affected locations.\n\n03:56 UTC: We deploy the change to our first location. None of our locations are impacted by the change, as these are using our older architecture.06:17: The change is deployed to our busiest locations, but not the locations with the MCP architecture.06:27: The rollout reached the MCP-enabled locations, and the change is deployed to our spines. This is when the incident started, as this swiftly took these 19 locations offline.06:32: Internal Cloudflare incident declared.06:51: First change made on a router to verify the root cause.06:58: Root cause found and understood. Work begins to revert the problematic change.07:42: The last of the reverts has been completed. This was delayed as network engineers walked over each other's changes, reverting the previous reverts, causing the problem to re-appear sporadically.08:00: Incident closed.\n\nThe criticality of these data centers can clearly be seen in the volume of successful HTTP requests we handled globally:\n\nEven though these locations are only 4% of our total network, the outage impacted 50% of total requests. The same can be seen in our egress bandwidth:\n\nTechnical description of the error and how it happened\n\nAs part of our continued effort to standardize our infrastructure configuration, we were rolling out a change to standardize the BGP communities we attach to a subset of the prefixes we advertise. Specifically, we were adding informational communities to our site-local prefixes.\n\nThese prefixes allow our metals to communicate with each other, as well as connect to customer origins. As part of the change procedure at Cloudflare, a Change Request ticket was created, which includes a dry-run of the change, as well as a stepped rollout procedure. Before it was allowed to go out, it was also peer reviewed by multiple engineers. Unfortunately, in this case, the steps weren’t small enough to catch the error before it hit all of our spines.\n\nThe change looked like this on one of the routers:\n\n[edit policy-options policy-statement 4-COGENT-TRANSIT-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n[edit policy-options policy-statement 4-PUBLIC-PEER-ANYCAST-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n[edit policy-options policy-statement 6-COGENT-TRANSIT-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n[edit policy-options policy-statement 6-PUBLIC-PEER-ANYCAST-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n\nThis was harmless, and just added some additional information to these prefix advertisements. The change on the spines was the following:\n\n[edit policy-options policy-statement AGGREGATES-OUT]\nterm 6-DISABLED_PREFIXES { ... }\n! term 6-ADV-TRAFFIC-PREDICTOR { ... }\n! term 4-ADV-TRAFFIC-PREDICTOR { ... }\n! term ADV-FREE { ... }\n! term ADV-PRO { ... }\n! term ADV-BIZ { ... }\n! term ADV-ENT { ... }\n! term ADV-DNS { ... }\n! term REJECT-THE-REST { ... }\n! term 4-ADV-SITE-LOCALS { ... }\n! term 6-ADV-SITE-LOCALS { ... }\n[edit policy-options policy-statement AGGREGATES-OUT term 4-ADV-SITE-LOCALS then]\ncommunity delete NO-EXPORT { ... }\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add AMS07;\n+ community add EUROPE;\n[edit policy-options policy-statement AGGREGATES-OUT term 6-ADV-SITE-LOCALS then]\ncommunity delete NO-EXPORT { ... }\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add AMS07;\n+ community add EUROPE;\n\nAn initial glance at this diff might give the impression that this change is identical, but unfortunately, that’s not the case. If we focus on one part of the diff, it might become clear why:\n\n! term REJECT-THE-REST { ... }\n! term 4-ADV-SITE-LOCALS { ... }\n! term 6-ADV-SITE-LOCALS { ... }\n\nIn this diff format, the exclamation marks in front of the terms indicate a re-ordering of the terms. In this case, multiple terms moved up, and two terms were added to the bottom. Specifically, the 4-ADV-SITE-LOCALS and 6-ADV-SITE-LOCALS terms moved from the top to the bottom. These terms were now behind the REJECT-THE-REST term, and as might be clear from the name, this term is an explicit reject:\n\nterm REJECT-THE-REST {\n then reject;\n} \n\nAs this term is now before the site-local terms, we immediately stopped advertising our site-local prefixes, removing our direct access to all the impacted locations, as well as removing the ability of our servers to reach origin servers.\n\nOn top of the inability to contact origins, the removal of these site-local prefixes also caused our internal load balancing system Multimog (a variation of our Unimog load-balancer) to stop working, as it could no longer forward requests between the servers in our MCPs. This meant that our smaller compute clusters in an MCP received the same amount of traffic as our largest clusters, causing the smaller ones to overload.\n\nRemediation and follow-up steps\n\nThis incident had widespread impact, and we take availability very seriously. We have identified several areas of improvement and will continue to work on uncovering any other gaps that could cause a recurrence.\n\nHere is what we are working on immediately:\n\nProcess: While the MCP program was designed to improve availability, a procedural gap in how we updated these data centers ultimately caused a broader impact in MCP locations specifically. While we did use a stagger procedure for this change, the stagger policy did not include an MCP data center until the final step. Change procedures and automation need to include MCP-specific test and deploy procedures to ensure there are no unintended consequences.\n\nArchitecture: The incorrect router configuration prevented the proper routes from being announced, preventing traffic from flowing properly to our infrastructure. Ultimately the policy statement that caused the incorrect routing advertisement will be redesigned to prevent an unintentional incorrect ordering.\n\nAutomation: There are several opportunities in our automation suite that would mitigate some or all of the impact seen from this event. Primarily, we will be concentrating on automation improvements that enforce an improved stagger policy for rollouts of network configuration and provide an automated “commit-confirm” rollback. The former enhancement would have significantly lessened the overall impact, and the latter would have greatly reduced the Time-to-Resolve during the incident.\n\nConclusion\n\nAlthough Cloudflare has invested significantly in our MCP design to improve service availability, we clearly fell short of our customer expectations with this very painful incident. We are deeply sorry for the disruption to our customers and to all the users who were unable to access Internet properties during the outage. We have already started working on the changes outlined above and will continue our diligence to ensure this cannot happen again.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "introduction today june 21 2022 cloudflare suffered an outage that affected traffic in 19 of our data centers unfortunately these 19 locations handle a significant proportion of our global traffic this outage was caused by a change that was part of a long running project to increase resilience in our busiest locations a change to the network configuration in those locations caused an outage which started at 06 27 utc at 06 58 utc the first data center was brought back online and by 07 42 utc all data centers were online and working correctly depending on your location in the world you may have been unable to access websites and services that rely on cloudflare in other locations cloudflare continued to operate normally we are very sorry for this outage this was our error and not the result of an attack or malicious activity background over the last 18 months cloudflare has been working to convert all of our busiest locations to a more flexible and resilient architecture in this time we ve converted 19 of our data centers to this architecture internally called multi colo pop mcp amsterdam atlanta ashburn chicago frankfurt london los angeles madrid manchester miami milan mumbai newark osaka são paulo san jose singapore sydney tokyo a critical part of this new architecture which is designed as a clos network is an added layer of routing that creates a mesh of connections this mesh allows us to easily disable and enable parts of the internal network in a data center for maintenance or to deal with a problem this layer is represented by the spines in the following diagram this new architecture has provided us with significant reliability improvements as well as allowing us to run maintenance in these locations without disrupting customer traffic as these locations also carry a significant proportion of the cloudflare traffic any problem here can have a very wide impact and unfortunately that s what happened today", "source_text": "Introduction\n\nToday, June 21, 2022, Cloudflare suffered an outage that affected traffic in 19 of our data centers. Unfortunately, these 19 locations handle a significant proportion of our global traffic. This outage was caused by a change that was part of a long-running project to increase resilience in our busiest locations. A change to the network configuration in those locations caused an outage which started at 06:27 UTC. At 06:58 UTC the first data center was brought back online and by 07:42 UTC all data centers were online and working correctly.\n\nDepending on your location in the world you may have been unable to access websites and services that rely on Cloudflare. In other locations, Cloudflare continued to operate normally.\n\nWe are very sorry for this outage. This was our error and not the result of an attack or malicious activity.\n\nBackground\n\nOver the last 18 months, Cloudflare has been working to convert all of our busiest locations to a more flexible and resilient architecture. In this time, we’ve converted 19 of our data centers to this architecture, internally called Multi-Colo PoP (MCP): Amsterdam, Atlanta, Ashburn, Chicago, Frankfurt, London, Los Angeles, Madrid, Manchester, Miami, Milan, Mumbai, Newark, Osaka, São Paulo, San Jose, Singapore, Sydney, Tokyo.\n\nA critical part of this new architecture, which is designed as a Clos network, is an added layer of routing that creates a mesh of connections. This mesh allows us to easily disable and enable parts of the internal network in a data center for maintenance or to deal with a problem. This layer is represented by the spines in the following diagram.\n\nThis new architecture has provided us with significant reliability improvements, as well as allowing us to run maintenance in these locations without disrupting customer traffic. As these locations also carry a significant proportion of the Cloudflare traffic, any problem here can have a very wide impact, and unfortunately, that’s what happened today.", "segmentation_method": "reviewed_source_semantics", "label": "Introduction — Background", "source_line_range": [ 1, 16 ] }, { "id": "body-region-2", "text": "incident timeline and impact in order to be reachable on the internet networks like cloudflare make use of a protocol called bgp as part of this protocol operators define policies which decide which prefixes a collection of adjacent ip addresses are advertised to peers the other networks they connect to or accepted from peers these policies have individual components which are evaluated sequentially the end result is that any given prefixes will either be advertised or not advertised a change in policy can mean a previously advertised prefix is no longer advertised known as being withdrawn and those ip addresses will no longer be reachable on the internet while deploying a change to our prefix advertisement policies a re ordering of terms caused us to withdraw a critical subset of prefixes due to this withdrawal cloudflare engineers experienced added difficulty in reaching the affected locations to revert the problematic change we have backup procedures for handling such an event and used them to take control of the affected locations 03 56 utc we deploy the change to our first location none of our locations are impacted by the change as these are using our older architecture 06 17 the change is deployed to our busiest locations but not the locations with the mcp architecture 06 27 the rollout reached the mcp enabled locations and the change is deployed to our spines this is when the incident started as this swiftly took these 19 locations offline 06 32 internal cloudflare incident declared 06 51 first change made on a router to verify the root cause 06 58 root cause found and understood work begins to revert the problematic change 07 42 the last of the reverts has been completed this was delayed as network engineers walked over each other s changes reverting the previous reverts causing the problem to re appear sporadically 08 00 incident closed the criticality of these data centers can clearly be seen in the volume of successful http requests we handled globally even though these locations are only 4 of our total network the outage impacted 50 of total requests the same can be seen in our egress bandwidth", "source_text": "Incident timeline and impact\n\nIn order to be reachable on the Internet, networks like Cloudflare make use of a protocol called BGP. As part of this protocol, operators define policies which decide which prefixes (a collection of adjacent IP addresses) are advertised to peers (the other networks they connect to), or accepted from peers.\n\nThese policies have individual components, which are evaluated sequentially. The end result is that any given prefixes will either be advertised or not advertised. A change in policy can mean a previously advertised prefix is no longer advertised, known as being \"withdrawn\", and those IP addresses will no longer be reachable on the Internet.\n\nWhile deploying a change to our prefix advertisement policies, a re-ordering of terms caused us to withdraw a critical subset of prefixes.\n\nDue to this withdrawal, Cloudflare engineers experienced added difficulty in reaching the affected locations to revert the problematic change. We have backup procedures for handling such an event and used them to take control of the affected locations.\n\n03:56 UTC: We deploy the change to our first location. None of our locations are impacted by the change, as these are using our older architecture.06:17: The change is deployed to our busiest locations, but not the locations with the MCP architecture.06:27: The rollout reached the MCP-enabled locations, and the change is deployed to our spines. This is when the incident started, as this swiftly took these 19 locations offline.06:32: Internal Cloudflare incident declared.06:51: First change made on a router to verify the root cause.06:58: Root cause found and understood. Work begins to revert the problematic change.07:42: The last of the reverts has been completed. This was delayed as network engineers walked over each other's changes, reverting the previous reverts, causing the problem to re-appear sporadically.08:00: Incident closed.\n\nThe criticality of these data centers can clearly be seen in the volume of successful HTTP requests we handled globally:\n\nEven though these locations are only 4% of our total network, the outage impacted 50% of total requests. The same can be seen in our egress bandwidth:", "segmentation_method": "reviewed_source_semantics", "label": "Incident timeline and impact", "source_line_range": [ 17, 32 ] }, { "id": "body-region-3", "text": "technical description of the error and how it happened as part of our continued effort to standardize our infrastructure configuration we were rolling out a change to standardize the bgp communities we attach to a subset of the prefixes we advertise specifically we were adding informational communities to our site local prefixes these prefixes allow our metals to communicate with each other as well as connect to customer origins as part of the change procedure at cloudflare a change request ticket was created which includes a dry run of the change as well as a stepped rollout procedure before it was allowed to go out it was also peer reviewed by multiple engineers unfortunately in this case the steps weren t small enough to catch the error before it hit all of our spines the change looked like this on one of the routers edit policy options policy statement 4 cogent transit out term adv sitelocal then community add static route community add site local route community add tll01 community add europe edit policy options policy statement 4 public peer anycast out term adv sitelocal then community add static route community add site local route community add tll01 community add europe edit policy options policy statement 6 cogent transit out term adv sitelocal then community add static route community add site local route community add tll01 community add europe edit policy options policy statement 6 public peer anycast out term adv sitelocal then community add static route community add site local route community add tll01 community add europe this was harmless and just added some additional information to these prefix advertisements the change on the spines was the following edit policy options policy statement aggregates out term 6 disabled prefixes term 6 adv traffic predictor term 4 adv traffic predictor term adv free term adv pro term adv biz term adv ent term adv dns term reject the rest term 4 adv site locals term 6 adv site locals edit policy options policy statement aggregates out term 4 adv site locals then community delete no export community add static route community add site local route community add ams07 community add europe edit policy options policy statement aggregates out term 6 adv site locals then community delete no export community add static route community add site local route community add ams07 community add europe an initial glance at this diff might give the impression that this change is identical but unfortunately that s not the case if we focus on one part of the diff it might become clear why term reject the rest term 4 adv site locals term 6 adv site locals in this diff format the exclamation marks in front of the terms indicate a re ordering of the terms in this case multiple terms moved up and two terms were added to the bottom specifically the 4 adv site locals and 6 adv site locals terms moved from the top to the bottom these terms were now behind the reject the rest term and as might be clear from the name this term is an explicit reject term reject the rest then reject as this term is now before the site local terms we immediately stopped advertising our site local prefixes removing our direct access to all the impacted locations as well as removing the ability of our servers to reach origin servers on top of the inability to contact origins the removal of these site local prefixes also caused our internal load balancing system multimog a variation of our unimog load balancer to stop working as it could no longer forward requests between the servers in our mcps this meant that our smaller compute clusters in an mcp received the same amount of traffic as our largest clusters causing the smaller ones to overload", "source_text": "Technical description of the error and how it happened\n\nAs part of our continued effort to standardize our infrastructure configuration, we were rolling out a change to standardize the BGP communities we attach to a subset of the prefixes we advertise. Specifically, we were adding informational communities to our site-local prefixes.\n\nThese prefixes allow our metals to communicate with each other, as well as connect to customer origins. As part of the change procedure at Cloudflare, a Change Request ticket was created, which includes a dry-run of the change, as well as a stepped rollout procedure. Before it was allowed to go out, it was also peer reviewed by multiple engineers. Unfortunately, in this case, the steps weren’t small enough to catch the error before it hit all of our spines.\n\nThe change looked like this on one of the routers:\n\n[edit policy-options policy-statement 4-COGENT-TRANSIT-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n[edit policy-options policy-statement 4-PUBLIC-PEER-ANYCAST-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n[edit policy-options policy-statement 6-COGENT-TRANSIT-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n[edit policy-options policy-statement 6-PUBLIC-PEER-ANYCAST-OUT term ADV-SITELOCAL then]\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add TLL01;\n+ community add EUROPE;\n\nThis was harmless, and just added some additional information to these prefix advertisements. The change on the spines was the following:\n\n[edit policy-options policy-statement AGGREGATES-OUT]\nterm 6-DISABLED_PREFIXES { ... }\n! term 6-ADV-TRAFFIC-PREDICTOR { ... }\n! term 4-ADV-TRAFFIC-PREDICTOR { ... }\n! term ADV-FREE { ... }\n! term ADV-PRO { ... }\n! term ADV-BIZ { ... }\n! term ADV-ENT { ... }\n! term ADV-DNS { ... }\n! term REJECT-THE-REST { ... }\n! term 4-ADV-SITE-LOCALS { ... }\n! term 6-ADV-SITE-LOCALS { ... }\n[edit policy-options policy-statement AGGREGATES-OUT term 4-ADV-SITE-LOCALS then]\ncommunity delete NO-EXPORT { ... }\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add AMS07;\n+ community add EUROPE;\n[edit policy-options policy-statement AGGREGATES-OUT term 6-ADV-SITE-LOCALS then]\ncommunity delete NO-EXPORT { ... }\n+ community add STATIC-ROUTE;\n+ community add SITE-LOCAL-ROUTE;\n+ community add AMS07;\n+ community add EUROPE;\n\nAn initial glance at this diff might give the impression that this change is identical, but unfortunately, that’s not the case. If we focus on one part of the diff, it might become clear why:\n\n! term REJECT-THE-REST { ... }\n! term 4-ADV-SITE-LOCALS { ... }\n! term 6-ADV-SITE-LOCALS { ... }\n\nIn this diff format, the exclamation marks in front of the terms indicate a re-ordering of the terms. In this case, multiple terms moved up, and two terms were added to the bottom. Specifically, the 4-ADV-SITE-LOCALS and 6-ADV-SITE-LOCALS terms moved from the top to the bottom. These terms were now behind the REJECT-THE-REST term, and as might be clear from the name, this term is an explicit reject:\n\nterm REJECT-THE-REST {\n then reject;\n} \n\nAs this term is now before the site-local terms, we immediately stopped advertising our site-local prefixes, removing our direct access to all the impacted locations, as well as removing the ability of our servers to reach origin servers.\n\nOn top of the inability to contact origins, the removal of these site-local prefixes also caused our internal load balancing system Multimog (a variation of our Unimog load-balancer) to stop working, as it could no longer forward requests between the servers in our MCPs. This meant that our smaller compute clusters in an MCP received the same amount of traffic as our largest clusters, causing the smaller ones to overload.", "segmentation_method": "reviewed_source_semantics", "label": "Technical description of the error and how it happened", "source_line_range": [ 33, 104 ] }, { "id": "body-region-4", "text": "remediation and follow up steps this incident had widespread impact and we take availability very seriously we have identified several areas of improvement and will continue to work on uncovering any other gaps that could cause a recurrence here is what we are working on immediately process while the mcp program was designed to improve availability a procedural gap in how we updated these data centers ultimately caused a broader impact in mcp locations specifically while we did use a stagger procedure for this change the stagger policy did not include an mcp data center until the final step change procedures and automation need to include mcp specific test and deploy procedures to ensure there are no unintended consequences architecture the incorrect router configuration prevented the proper routes from being announced preventing traffic from flowing properly to our infrastructure ultimately the policy statement that caused the incorrect routing advertisement will be redesigned to prevent an unintentional incorrect ordering automation there are several opportunities in our automation suite that would mitigate some or all of the impact seen from this event primarily we will be concentrating on automation improvements that enforce an improved stagger policy for rollouts of network configuration and provide an automated commit confirm rollback the former enhancement would have significantly lessened the overall impact and the latter would have greatly reduced the time to resolve during the incident", "source_text": "Remediation and follow-up steps\n\nThis incident had widespread impact, and we take availability very seriously. We have identified several areas of improvement and will continue to work on uncovering any other gaps that could cause a recurrence.\n\nHere is what we are working on immediately:\n\nProcess: While the MCP program was designed to improve availability, a procedural gap in how we updated these data centers ultimately caused a broader impact in MCP locations specifically. While we did use a stagger procedure for this change, the stagger policy did not include an MCP data center until the final step. Change procedures and automation need to include MCP-specific test and deploy procedures to ensure there are no unintended consequences.\n\nArchitecture: The incorrect router configuration prevented the proper routes from being announced, preventing traffic from flowing properly to our infrastructure. Ultimately the policy statement that caused the incorrect routing advertisement will be redesigned to prevent an unintentional incorrect ordering.\n\nAutomation: There are several opportunities in our automation suite that would mitigate some or all of the impact seen from this event. Primarily, we will be concentrating on automation improvements that enforce an improved stagger policy for rollouts of network configuration and provide an automated “commit-confirm” rollback. The former enhancement would have significantly lessened the overall impact, and the latter would have greatly reduced the Time-to-Resolve during the incident.", "segmentation_method": "reviewed_source_semantics", "label": "Remediation and follow-up steps", "source_line_range": [ 105, 116 ] }, { "id": "body-region-5", "text": "conclusion although cloudflare has invested significantly in our mcp design to improve service availability we clearly fell short of our customer expectations with this very painful incident we are deeply sorry for the disruption to our customers and to all the users who were unable to access internet properties during the outage we have already started working on the changes outlined above and will continue our diligence to ensure this cannot happen again", "source_text": "Conclusion\n\nAlthough Cloudflare has invested significantly in our MCP design to improve service availability, we clearly fell short of our customer expectations with this very painful incident. We are deeply sorry for the disruption to our customers and to all the users who were unable to access Internet properties during the outage. We have already started working on the changes outlined above and will continue our diligence to ensure this cannot happen again.", "segmentation_method": "reviewed_source_semantics", "label": "Conclusion", "source_line_range": [ 117, 119 ] } ], "ending": { "text": "ng on the changes outlined above and will continue our diligence to ensure this cannot happen again." } } }, { "id": "article-032", "name": "JavaScript Visualized: Event Loop", "url": "https://dev.to/lydiahallie/javascript-visualized-event-loop-3dif", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Oh\\ boi\\ the\\ event\\ loop\\.", "✨♻️\\ JavaScript\\ Visualized:\\ Event\\ Loop" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Lydia Hallie" ] }, { "id": "stable-2", "alternatives": [ "Powered by Algolia" ] }, { "id": "stable-3", "alternatives": [ "Log in" ] }, { "id": "stable-4", "alternatives": [ "Create account" ] }, { "id": "stable-5", "alternatives": [ "webdev" ] }, { "id": "stable-6", "alternatives": [ "javascript" ] }, { "id": "stable-7", "alternatives": [ "JavaScript Visualized" ] }, { "id": "stable-8", "alternatives": [ "JavaScript Visualized: Hoisting" ] }, { "id": "stable-9", "alternatives": [ "JavaScript Visualized: Generators and Iterators" ] }, { "id": "stable-10", "alternatives": [ "JavaScript Visualized: Promises & Async/Await" ] }, { "id": "stable-11", "alternatives": [ "Top comments" ] }, { "id": "stable-12", "alternatives": [ "Subscribe" ] }, { "id": "stable-13", "alternatives": [ "Submit" ] }, { "id": "stable-14", "alternatives": [ "Preview" ] }, { "id": "stable-15", "alternatives": [ "Code of Conduct" ] }, { "id": "stable-16", "alternatives": [ "Report abuse" ] }, { "id": "stable-17", "alternatives": [ "JOINED" ] }, { "id": "stable-18", "alternatives": [ "More from Lydia Hallie" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Prior rejection overgeneralized a nonmodal sign-in notification. Saved independent initial DOM/AX contain full ordinary article and inline code; article ancestor CSS has no clamp or hidden/inert gate, and screenshot shows no dimming backdrop. Notification remains untouched and excluded. Complete body runs from original updated-post notice through closing Stack Overflow paragraph. Complete ordinary h1 is separately required; the nonmodal notification does not disqualify already loaded title text. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "✨♻️ JavaScript Visualized: Event Loop" ], "html_selector": "h1.fs-3xl.m\\:fs-4xl,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": ".single-comment-node", "author_selector": ".comment__header > a .js-comment-username", "body_selector": ".comment__body", "id_attribute": "id", "section_markers": [ "Top comments", "Comments" ], "version": 2, "minimum_comments": 20, "text_scope": { "body_end": "end up on the correct Stack Overflow page 💪🏼 Feel free to reach out to me if you have any questions!", "end_markers": [ "Some comments may only be visible to logged-in visitors.", "Code of Conduct", "More from" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-032/comment-qualification-reference-r5.json", "sha256": "9049c00cac1bdfcb8866b907dbf9b8c34573efd07c08fc7da9d0d12e06e424ce", "chars": 9507, "record_count": 24 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 24, "qualification_only": true } }, "ground_truth_main_content": "If you're here in 2024 (or later), here's an updated blog post!](https://lydiahallie.com/blog/event-loop)\n\nOh boi the event loop. It’s one of those things that every JavaScript developer has to deal with in one way or another, but it can be a bit confusing to understand at first. I’m a visual learner so I thought I’d try to help you by explaining it in a visual way through low-res gifs because it's 2019 and gifs are somehow still pixelated and blurry.\n\nBut first, what is the event loop and why should you care?\n\nJavaScript is single-threaded: only one task can run at a time. Usually that’s no big deal, but now imagine you’re running a task which takes 30 seconds.. Ya.. During that task we’re waiting for 30 seconds before anything else can happen (JavaScript runs on the browser’s main thread by default, so the entire UI is stuck) 😬 It’s 2019, no one wants a slow, unresponsive website.\n\nLuckily, the browser gives us some features that the JavaScript engine itself doesn’t provide: a Web API. This includes the DOM API, setTimeout, HTTP requests, and so on. This can help us create some async, non-blocking behavior 🚀\n\nWhen we invoke a function, it gets added to something called the call stack. The call stack is part of the JS engine, this isn’t browser specific. It’s a stack, meaning that it’s first in, last out (think of a pile of pancakes). When a function returns a value, it gets popped off the stack 👋\n\nThe respond function returns a setTimeout function. The setTimeout is provided to us by the Web API: it lets us delay tasks without blocking the main thread. The callback function that we passed to the setTimeout function, the arrow function () => { return 'Hey' } gets added to the Web API. In the meantime, the setTimeout function and the respond function get popped off the stack, they both returned their values!\n\nIn the Web API, a timer runs for as long as the second argument we passed to it, 1000ms. The callback doesn’t immediately get added to the call stack, instead it’s passed to something called the queue.\n\nThis can be a confusing part: it doesn't mean that the callback function gets added to the callstack(thus returns a value) after 1000ms! It simply gets added to the queue after 1000ms. But it’s a queue, the function has got to wait for its turn!\n\nNow this is the part we’ve all been waiting for… Time for the event loop to do its only task: connecting the queue with the call stack! If the call stack is empty, so if all previously invoked functions have returned their values and have been popped off the stack, the first item in the queue gets added to the call stack. In this case, no other functions were invoked, meaning that the call stack was empty by the time the callback function was the first item in the queue.\n\nThe callback is added to the call stack, gets invoked, and returns a value, and gets popped off the stack.\n\nReading an article is fun, but you'll only get entirely comfortable with this by actually working with it over and over. Try to figure out what gets logged to the console if we run the following:\n\n\n\n\nconst foo = () => console.log(\"First\");\nconst bar = () => setTimeout(() => console.log(\"Second\"), 500);\nconst baz = () => console.log(\"Third\");\n\nbar();\nfoo();\nbaz();\n\n\n\n\nGot it? Let's quickly take a look at what's happening when we're running this code in a browser:\n\nWe invoke bar. bar returns a setTimeout function.\nThe callback we passed to setTimeout gets added to the Web API, the setTimeout function and bar get popped off the callstack.\nThe timer runs, in the meantime foo gets invoked and logs First. foo returns (undefined),baz gets invoked, and the callback gets added to the queue.\nbaz logs Third. The event loop sees the callstack is empty after baz returned, after which the callback gets added to the call stack.\nThe callback logs Second.\n\nHope that this makes you feel a bit more comfortable with the event loop! Don't worry if it still seems confusing, the most important thing is to understand where certain errors/behavior can come from in order to Google the right terms efficiently and end up on the correct Stack Overflow page 💪🏼 Feel free to reach out to me if you have any questions!", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "if you re here in 2024 or later here s an updated blog post https lydiahallie com blog event loop oh boi the event loop it s one of those things that every javascript developer has to deal with in one way or another but it can be a bit confusing to understand at first i m a visual learner so i thought i d try to help you by explaining it in a visual way through low res gifs because it s 2019 and gifs are somehow still pixelated and blurry but first what is the event loop and why should you care javascript is single threaded only one task can run at a time usually that s no big deal but now imagine you re running a task which takes 30 seconds ya during that task we re waiting for 30 seconds before anything else can happen javascript runs on the browser s main thread by default so the entire ui is stuck it s 2019 no one wants a slow unresponsive website", "source_text": "If you're here in 2024 (or later), here's an updated blog post!](https://lydiahallie.com/blog/event-loop)\n\nOh boi the event loop. It’s one of those things that every JavaScript developer has to deal with in one way or another, but it can be a bit confusing to understand at first. I’m a visual learner so I thought I’d try to help you by explaining it in a visual way through low-res gifs because it's 2019 and gifs are somehow still pixelated and blurry.\n\nBut first, what is the event loop and why should you care?\n\nJavaScript is single-threaded: only one task can run at a time. Usually that’s no big deal, but now imagine you’re running a task which takes 30 seconds.. Ya.. During that task we’re waiting for 30 seconds before anything else can happen (JavaScript runs on the browser’s main thread by default, so the entire UI is stuck) 😬 It’s 2019, no one wants a slow, unresponsive website.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:If you're here in 2024 (or later), here's an updated blog po — 段落/内容单元:JavaScript is single-threaded: only one task can run at a ti", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "luckily the browser gives us some features that the javascript engine itself doesn t provide a web api this includes the dom api settimeout http requests and so on this can help us create some async non blocking behavior when we invoke a function it gets added to something called the call stack the call stack is part of the js engine this isn t browser specific it s a stack meaning that it s first in last out think of a pile of pancakes when a function returns a value it gets popped off the stack the respond function returns a settimeout function the settimeout is provided to us by the web api it lets us delay tasks without blocking the main thread the callback function that we passed to the settimeout function the arrow function return hey gets added to the web api in the meantime the settimeout function and the respond function get popped off the stack they both returned their values", "source_text": "Luckily, the browser gives us some features that the JavaScript engine itself doesn’t provide: a Web API. This includes the DOM API, setTimeout, HTTP requests, and so on. This can help us create some async, non-blocking behavior 🚀\n\nWhen we invoke a function, it gets added to something called the call stack. The call stack is part of the JS engine, this isn’t browser specific. It’s a stack, meaning that it’s first in, last out (think of a pile of pancakes). When a function returns a value, it gets popped off the stack 👋\n\nThe respond function returns a setTimeout function. The setTimeout is provided to us by the Web API: it lets us delay tasks without blocking the main thread. The callback function that we passed to the setTimeout function, the arrow function () => { return 'Hey' } gets added to the Web API. In the meantime, the setTimeout function and the respond function get popped off the stack, they both returned their values!", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:Luckily, the browser gives us some features that the JavaScr — 段落/内容单元:The respond function returns a setTimeout function. The setT", "source_line_range": [ 9, 14 ] }, { "id": "body-region-3", "text": "in the web api a timer runs for as long as the second argument we passed to it 1000ms the callback doesn t immediately get added to the call stack instead it s passed to something called the queue this can be a confusing part it doesn t mean that the callback function gets added to the callstack thus returns a value after 1000ms it simply gets added to the queue after 1000ms but it s a queue the function has got to wait for its turn", "source_text": "In the Web API, a timer runs for as long as the second argument we passed to it, 1000ms. The callback doesn’t immediately get added to the call stack, instead it’s passed to something called the queue.\n\nThis can be a confusing part: it doesn't mean that the callback function gets added to the callstack(thus returns a value) after 1000ms! It simply gets added to the queue after 1000ms. But it’s a queue, the function has got to wait for its turn!", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:In the Web API, a timer runs for as long as the second argum — 段落/内容单元:This can be a confusing part: it doesn't mean that the callb", "source_line_range": [ 15, 18 ] }, { "id": "body-region-4", "text": "now this is the part we ve all been waiting for time for the event loop to do its only task connecting the queue with the call stack if the call stack is empty so if all previously invoked functions have returned their values and have been popped off the stack the first item in the queue gets added to the call stack in this case no other functions were invoked meaning that the call stack was empty by the time the callback function was the first item in the queue the callback is added to the call stack gets invoked and returns a value and gets popped off the stack reading an article is fun but you ll only get entirely comfortable with this by actually working with it over and over try to figure out what gets logged to the console if we run the following const foo console log first const bar settimeout console log second 500 const baz console log third bar foo baz got it let s quickly take a look at what s happening when we re running this code in a browser", "source_text": "Now this is the part we’ve all been waiting for… Time for the event loop to do its only task: connecting the queue with the call stack! If the call stack is empty, so if all previously invoked functions have returned their values and have been popped off the stack, the first item in the queue gets added to the call stack. In this case, no other functions were invoked, meaning that the call stack was empty by the time the callback function was the first item in the queue.\n\nThe callback is added to the call stack, gets invoked, and returns a value, and gets popped off the stack.\n\nReading an article is fun, but you'll only get entirely comfortable with this by actually working with it over and over. Try to figure out what gets logged to the console if we run the following:\n\n\n\n\nconst foo = () => console.log(\"First\");\nconst bar = () => setTimeout(() => console.log(\"Second\"), 500);\nconst baz = () => console.log(\"Third\");\n\nbar();\nfoo();\nbaz();\n\n\n\n\nGot it? Let's quickly take a look at what's happening when we're running this code in a browser:", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:Now this is the part we’ve all been waiting for… Time for th — 段落/内容单元:Got it? Let's quickly take a look at what's happening when w", "source_line_range": [ 19, 40 ] }, { "id": "body-region-5", "text": "we invoke bar bar returns a settimeout function the callback we passed to settimeout gets added to the web api the settimeout function and bar get popped off the callstack the timer runs in the meantime foo gets invoked and logs first foo returns undefined baz gets invoked and the callback gets added to the queue baz logs third the event loop sees the callstack is empty after baz returned after which the callback gets added to the call stack the callback logs second hope that this makes you feel a bit more comfortable with the event loop don t worry if it still seems confusing the most important thing is to understand where certain errors behavior can come from in order to google the right terms efficiently and end up on the correct stack overflow page feel free to reach out to me if you have any questions", "source_text": "We invoke bar. bar returns a setTimeout function.\nThe callback we passed to setTimeout gets added to the Web API, the setTimeout function and bar get popped off the callstack.\nThe timer runs, in the meantime foo gets invoked and logs First. foo returns (undefined),baz gets invoked, and the callback gets added to the queue.\nbaz logs Third. The event loop sees the callstack is empty after baz returned, after which the callback gets added to the call stack.\nThe callback logs Second.\n\nHope that this makes you feel a bit more comfortable with the event loop! Don't worry if it still seems confusing, the most important thing is to understand where certain errors/behavior can come from in order to Google the right terms efficiently and end up on the correct Stack Overflow page 💪🏼 Feel free to reach out to me if you have any questions!", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:We invoke bar. bar returns a setTimeout function. — 段落/内容单元:Hope that this makes you feel a bit more comfortable with th", "source_line_range": [ 41, 47 ] } ], "ending": { "text": "end up on the correct Stack Overflow page 💪🏼 Feel free to reach out to me if you have any questions!" } } }, { "id": "article-033", "name": "New AI model could streamline operations in a robotic warehouse", "url": "https://news.mit.edu/2024/new-ai-model-could-streamline-operations-robotic-warehouse-0227", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "New AI model could streamline operations in a robotic warehouse" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Education" ] }, { "id": "stable-2", "alternatives": [ "Research" ] }, { "id": "stable-3", "alternatives": [ "Innovation" ] }, { "id": "stable-4", "alternatives": [ "Admissions + Aid" ] }, { "id": "stable-5", "alternatives": [ "Campus Life" ] }, { "id": "stable-6", "alternatives": [ "News" ] }, { "id": "stable-7", "alternatives": [ "Alumni" ] }, { "id": "stable-8", "alternatives": [ "About MIT" ] }, { "id": "stable-9", "alternatives": [ "BROWSE" ] }, { "id": "stable-10", "alternatives": [ "Adam Zewe | MIT News" ] }, { "id": "stable-11", "alternatives": [ "PRESS INQUIRIES" ] }, { "id": "stable-12", "alternatives": [ "RELATED LINKS" ] }, { "id": "stable-13", "alternatives": [ "Cathy Wu" ] }, { "id": "stable-14", "alternatives": [ "Laboratory for Information and Decision Systems" ] }, { "id": "stable-15", "alternatives": [ "Institute for Data, Systems, and Society" ] }, { "id": "stable-16", "alternatives": [ "Department of Civil and Environmental Engineering" ] }, { "id": "stable-17", "alternatives": [ "School of Engineering" ] }, { "id": "stable-18", "alternatives": [ "MIT Schwarzman College of Computing" ] }, { "id": "stable-19", "alternatives": [ "RELATED TOPICS" ] }, { "id": "stable-20", "alternatives": [ "Computer science and technology" ] }, { "id": "stable-21", "alternatives": [ "Artificial intelligence" ] }, { "id": "stable-22", "alternatives": [ "Machine learning" ] }, { "id": "stable-23", "alternatives": [ "Algorithms" ] }, { "id": "stable-24", "alternatives": [ "Civil and environmental engineering" ] }, { "id": "stable-25", "alternatives": [ "Robotics" ] }, { "id": "stable-26", "alternatives": [ "RELATED ARTICLES" ] }, { "id": "stable-27", "alternatives": [ "Institute Office of Communications" ] }, { "id": "stable-28", "alternatives": [ "News by Schools/College:" ] }, { "id": "stable-29", "alternatives": [ "School of Architecture and Planning" ] }, { "id": "stable-30", "alternatives": [ "School of Humanities, Arts, and Social Sciences" ] }, { "id": "stable-31", "alternatives": [ "MIT Sloan School of Management" ] }, { "id": "stable-32", "alternatives": [ "School of Science" ] }, { "id": "stable-33", "alternatives": [ "About the MIT News Office" ] }, { "id": "stable-34", "alternatives": [ "MIT News Press Center" ] }, { "id": "stable-35", "alternatives": [ "Terms of Use" ] }, { "id": "stable-36", "alternatives": [ "Press Inquiries" ] }, { "id": "stable-37", "alternatives": [ "Filming Guidelines" ] }, { "id": "stable-38", "alternatives": [ "RSS Feeds" ] }, { "id": "stable-39", "alternatives": [ "Subscribe to MIT Daily/Weekly" ] }, { "id": "stable-40", "alternatives": [ "Subscribe to press releases" ] }, { "id": "stable-41", "alternatives": [ "Submit campus news" ] }, { "id": "stable-42", "alternatives": [ "Guidelines for campus news contributors" ] }, { "id": "stable-43", "alternatives": [ "Guidelines on generative AI" ] }, { "id": "stable-44", "alternatives": [ "Visit" ] }, { "id": "stable-45", "alternatives": [ "Map" ] }, { "id": "stable-46", "alternatives": [ "Events" ] }, { "id": "stable-47", "alternatives": [ "People" ] }, { "id": "stable-48", "alternatives": [ "Careers" ] }, { "id": "stable-49", "alternatives": [ "Contact" ] }, { "id": "stable-50", "alternatives": [ "Privacy" ] }, { "id": "stable-51", "alternatives": [ "Accessibility" ] }, { "id": "stable-52", "alternatives": [ "Social Media Hub" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initially visible article includes subtitle, ordinary image caption and credit, full lead, Robotic Tetris, Considering relationships and funding acknowledgement. Full-page screenshot confirms no obstruction or collapsed body; all links retained. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "New AI model could streamline operations in a robotic warehouse" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-033/comment-qualification-reference-r5.json", "sha256": "35e5da59fe60e6ce64e992d8f1b80cc6dc60d32192d0130e2504e895d5020152", "chars": 819, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "By breaking an intractable problem into smaller chunks, a deep-learning technique identifies the optimal areas for thinning out traffic in a warehouse.\n\nCaption\n:\nA group of MIT researchers who use AI to mitigate traffic congestion applied ideas from that domain to tackle the problem of multiple robots in a warehouse setting.\n\nCredits\n:\nImage: iStock\n\nHundreds of robots zip back and forth across the floor of a colossal robotic warehouse, grabbing items and delivering them to human workers for packing and shipping. Such warehouses are increasingly becoming part of the supply chain in many industries, from e-commerce to automotive production.\n\nHowever, getting 800 robots to and from their destinations efficiently while keeping them from crashing into each other is no easy task. It is such a complex problem that even the best path-finding algorithms struggle to keep up with the breakneck pace of e-commerce or manufacturing. \n\nIn a sense, these robots are like cars trying to navigate a crowded city center. So, a group of MIT researchers who use AI to mitigate traffic congestion applied ideas from that domain to tackle this problem.\n\nThey built a deep-learning model that encodes important information about the warehouse, including the robots, planned paths, tasks, and obstacles, and uses it to predict the best areas of the warehouse to decongest to improve overall efficiency.\n\nTheir technique divides the warehouse robots into groups, so these smaller groups of robots can be decongested faster with traditional algorithms used to coordinate robots. In the end, their method decongests the robots nearly four times faster than a strong random search method.\n\nIn addition to streamlining warehouse operations, this deep learning approach could be used in other complex planning tasks, like computer chip design or pipe routing in large buildings.\n\n“We devised a new neural network architecture that is actually suitable for real-time operations at the scale and complexity of these warehouses. It can encode hundreds of robots in terms of their trajectories, origins, destinations, and relationships with other robots, and it can do this in an efficient manner that reuses computation across groups of robots,” says Cathy Wu, the Gilbert W. Winslow Career Development Assistant Professor in Civil and Environmental Engineering (CEE), and a member of a member of the Laboratory for Information and Decision Systems (LIDS) and the Institute for Data, Systems, and Society (IDSS).\n\nWu, senior author of a paper on this technique, is joined by lead author Zhongxia Yan, a graduate student in electrical engineering and computer science. The work will be presented at the International Conference on Learning Representations.\n\nRobotic Tetris\n\nFrom a bird’s eye view, the floor of a robotic e-commerce warehouse looks a bit like a fast-paced game of “Tetris.”\n\nWhen a customer order comes in, a robot travels to an area of the warehouse, grabs the shelf that holds the requested item, and delivers it to a human operator who picks and packs the item. Hundreds of robots do this simultaneously, and if two robots’ paths conflict as they cross the massive warehouse, they might crash.\n\nTraditional search-based algorithms avoid potential crashes by keeping one robot on its course and replanning a trajectory for the other. But with so many robots and potential collisions, the problem quickly grows exponentially.\n\n“Because the warehouse is operating online, the robots are replanned about every 100 milliseconds. That means that every second, a robot is replanned 10 times. So, these operations need to be very fast,” Wu says.\n\nBecause time is so critical during replanning, the MIT researchers use machine learning to focus the replanning on the most actionable areas of congestion — where there exists the most potential to reduce the total travel time of robots.\n\nWu and Yan built a neural network architecture that considers smaller groups of robots at the same time. For instance, in a warehouse with 800 robots, the network might cut the warehouse floor into smaller groups that contain 40 robots each.\n\nThen, it predicts which group has the most potential to improve the overall solution if a search-based solver were used to coordinate trajectories of robots in that group.\n\nAn iterative process, the overall algorithm picks the most promising robot group with the neural network, decongests the group with the search-based solver, then picks the next most promising group with the neural network, and so on.\n\nConsidering relationships\n\nThe neural network can reason about groups of robots efficiently because it captures complicated relationships that exist between individual robots. For example, even though one robot may be far away from another initially, their paths could still cross during their trips.\n\nThe technique also streamlines computation by encoding constraints only once, rather than repeating the process for each subproblem. For instance, in a warehouse with 800 robots, decongesting a group of 40 robots requires holding the other 760 robots as constraints. Other approaches require reasoning about all 800 robots once per group in each iteration.\n\nInstead, the researchers’ approach only requires reasoning about the 800 robots once across all groups in each iteration.\n\n“The warehouse is one big setting, so a lot of these robot groups will have some shared aspects of the larger problem. We designed our architecture to make use of this common information,” she adds.\n\nThey tested their technique in several simulated environments, including some set up like warehouses, some with random obstacles, and even maze-like settings that emulate building interiors.\n\nBy identifying more effective groups to decongest, their learning-based approach decongests the warehouse up to four times faster than strong, non-learning-based approaches. Even when they factored in the additional computational overhead of running the neural network, their approach still solved the problem 3.5 times faster.\n\nIn the future, the researchers want to derive simple, rule-based insights from their neural model, since the decisions of the neural network can be opaque and difficult to interpret. Simpler, rule-based methods could also be easier to implement and maintain in actual robotic warehouse settings.\n\n“This approach is based on a novel architecture where convolution and attention mechanisms interact effectively and efficiently. Impressively, this leads to being able to take into account the spatiotemporal component of the constructed paths without the need of problem-specific feature engineering. The results are outstanding: Not only is it possible to improve on state-of-the-art large neighborhood search methods in terms of quality of the solution and speed, but the model generalizes to unseen cases wonderfully,” says Andrea Lodi, the Andrew H. and Ann R. Tisch Professor at Cornell Tech, and who was not involved with this research.\n\nThis work was supported by Amazon and the MIT Amazon Science Hub.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "by breaking an intractable problem into smaller chunks a deep learning technique identifies the optimal areas for thinning out traffic in a warehouse caption a group of mit researchers who use ai to mitigate traffic congestion applied ideas from that domain to tackle the problem of multiple robots in a warehouse setting credits image istock hundreds of robots zip back and forth across the floor of a colossal robotic warehouse grabbing items and delivering them to human workers for packing and shipping such warehouses are increasingly becoming part of the supply chain in many industries from e commerce to automotive production however getting 800 robots to and from their destinations efficiently while keeping them from crashing into each other is no easy task it is such a complex problem that even the best path finding algorithms struggle to keep up with the breakneck pace of e commerce or manufacturing in a sense these robots are like cars trying to navigate a crowded city center so a group of mit researchers who use ai to mitigate traffic congestion applied ideas from that domain to tackle this problem they built a deep learning model that encodes important information about the warehouse including the robots planned paths tasks and obstacles and uses it to predict the best areas of the warehouse to decongest to improve overall efficiency", "source_text": "By breaking an intractable problem into smaller chunks, a deep-learning technique identifies the optimal areas for thinning out traffic in a warehouse.\n\nCaption\n:\nA group of MIT researchers who use AI to mitigate traffic congestion applied ideas from that domain to tackle the problem of multiple robots in a warehouse setting.\n\nCredits\n:\nImage: iStock\n\nHundreds of robots zip back and forth across the floor of a colossal robotic warehouse, grabbing items and delivering them to human workers for packing and shipping. Such warehouses are increasingly becoming part of the supply chain in many industries, from e-commerce to automotive production.\n\nHowever, getting 800 robots to and from their destinations efficiently while keeping them from crashing into each other is no easy task. It is such a complex problem that even the best path-finding algorithms struggle to keep up with the breakneck pace of e-commerce or manufacturing. \n\nIn a sense, these robots are like cars trying to navigate a crowded city center. So, a group of MIT researchers who use AI to mitigate traffic congestion applied ideas from that domain to tackle this problem.\n\nThey built a deep-learning model that encodes important information about the warehouse, including the robots, planned paths, tasks, and obstacles, and uses it to predict the best areas of the warehouse to decongest to improve overall efficiency.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:By breaking an intractable problem into smaller chunks, a de — 段落/内容单元:They built a deep-learning model that encodes important info", "source_line_range": [ 1, 18 ] }, { "id": "body-region-2", "text": "their technique divides the warehouse robots into groups so these smaller groups of robots can be decongested faster with traditional algorithms used to coordinate robots in the end their method decongests the robots nearly four times faster than a strong random search method in addition to streamlining warehouse operations this deep learning approach could be used in other complex planning tasks like computer chip design or pipe routing in large buildings we devised a new neural network architecture that is actually suitable for real time operations at the scale and complexity of these warehouses it can encode hundreds of robots in terms of their trajectories origins destinations and relationships with other robots and it can do this in an efficient manner that reuses computation across groups of robots says cathy wu the gilbert w winslow career development assistant professor in civil and environmental engineering cee and a member of a member of the laboratory for information and decision systems lids and the institute for data systems and society idss wu senior author of a paper on this technique is joined by lead author zhongxia yan a graduate student in electrical engineering and computer science the work will be presented at the international conference on learning representations robotic tetris from a bird s eye view the floor of a robotic e commerce warehouse looks a bit like a fast paced game of tetris", "source_text": "Their technique divides the warehouse robots into groups, so these smaller groups of robots can be decongested faster with traditional algorithms used to coordinate robots. In the end, their method decongests the robots nearly four times faster than a strong random search method.\n\nIn addition to streamlining warehouse operations, this deep learning approach could be used in other complex planning tasks, like computer chip design or pipe routing in large buildings.\n\n“We devised a new neural network architecture that is actually suitable for real-time operations at the scale and complexity of these warehouses. It can encode hundreds of robots in terms of their trajectories, origins, destinations, and relationships with other robots, and it can do this in an efficient manner that reuses computation across groups of robots,” says Cathy Wu, the Gilbert W. Winslow Career Development Assistant Professor in Civil and Environmental Engineering (CEE), and a member of a member of the Laboratory for Information and Decision Systems (LIDS) and the Institute for Data, Systems, and Society (IDSS).\n\nWu, senior author of a paper on this technique, is joined by lead author Zhongxia Yan, a graduate student in electrical engineering and computer science. The work will be presented at the International Conference on Learning Representations.\n\nRobotic Tetris\n\nFrom a bird’s eye view, the floor of a robotic e-commerce warehouse looks a bit like a fast-paced game of “Tetris.”", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:Their technique divides the warehouse robots into groups, so — 段落/内容单元:From a bird’s eye view, the floor of a robotic e-commerce wa", "source_line_range": [ 19, 30 ] }, { "id": "body-region-3", "text": "when a customer order comes in a robot travels to an area of the warehouse grabs the shelf that holds the requested item and delivers it to a human operator who picks and packs the item hundreds of robots do this simultaneously and if two robots paths conflict as they cross the massive warehouse they might crash traditional search based algorithms avoid potential crashes by keeping one robot on its course and replanning a trajectory for the other but with so many robots and potential collisions the problem quickly grows exponentially because the warehouse is operating online the robots are replanned about every 100 milliseconds that means that every second a robot is replanned 10 times so these operations need to be very fast wu says because time is so critical during replanning the mit researchers use machine learning to focus the replanning on the most actionable areas of congestion where there exists the most potential to reduce the total travel time of robots wu and yan built a neural network architecture that considers smaller groups of robots at the same time for instance in a warehouse with 800 robots the network might cut the warehouse floor into smaller groups that contain 40 robots each then it predicts which group has the most potential to improve the overall solution if a search based solver were used to coordinate trajectories of robots in that group", "source_text": "When a customer order comes in, a robot travels to an area of the warehouse, grabs the shelf that holds the requested item, and delivers it to a human operator who picks and packs the item. Hundreds of robots do this simultaneously, and if two robots’ paths conflict as they cross the massive warehouse, they might crash.\n\nTraditional search-based algorithms avoid potential crashes by keeping one robot on its course and replanning a trajectory for the other. But with so many robots and potential collisions, the problem quickly grows exponentially.\n\n“Because the warehouse is operating online, the robots are replanned about every 100 milliseconds. That means that every second, a robot is replanned 10 times. So, these operations need to be very fast,” Wu says.\n\nBecause time is so critical during replanning, the MIT researchers use machine learning to focus the replanning on the most actionable areas of congestion — where there exists the most potential to reduce the total travel time of robots.\n\nWu and Yan built a neural network architecture that considers smaller groups of robots at the same time. For instance, in a warehouse with 800 robots, the network might cut the warehouse floor into smaller groups that contain 40 robots each.\n\nThen, it predicts which group has the most potential to improve the overall solution if a search-based solver were used to coordinate trajectories of robots in that group.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:When a customer order comes in, a robot travels to an area o — 段落/内容单元:Then, it predicts which group has the most potential to impr", "source_line_range": [ 31, 42 ] }, { "id": "body-region-4", "text": "an iterative process the overall algorithm picks the most promising robot group with the neural network decongests the group with the search based solver then picks the next most promising group with the neural network and so on considering relationships the neural network can reason about groups of robots efficiently because it captures complicated relationships that exist between individual robots for example even though one robot may be far away from another initially their paths could still cross during their trips the technique also streamlines computation by encoding constraints only once rather than repeating the process for each subproblem for instance in a warehouse with 800 robots decongesting a group of 40 robots requires holding the other 760 robots as constraints other approaches require reasoning about all 800 robots once per group in each iteration instead the researchers approach only requires reasoning about the 800 robots once across all groups in each iteration the warehouse is one big setting so a lot of these robot groups will have some shared aspects of the larger problem we designed our architecture to make use of this common information she adds they tested their technique in several simulated environments including some set up like warehouses some with random obstacles and even maze like settings that emulate building interiors", "source_text": "An iterative process, the overall algorithm picks the most promising robot group with the neural network, decongests the group with the search-based solver, then picks the next most promising group with the neural network, and so on.\n\nConsidering relationships\n\nThe neural network can reason about groups of robots efficiently because it captures complicated relationships that exist between individual robots. For example, even though one robot may be far away from another initially, their paths could still cross during their trips.\n\nThe technique also streamlines computation by encoding constraints only once, rather than repeating the process for each subproblem. For instance, in a warehouse with 800 robots, decongesting a group of 40 robots requires holding the other 760 robots as constraints. Other approaches require reasoning about all 800 robots once per group in each iteration.\n\nInstead, the researchers’ approach only requires reasoning about the 800 robots once across all groups in each iteration.\n\n“The warehouse is one big setting, so a lot of these robot groups will have some shared aspects of the larger problem. We designed our architecture to make use of this common information,” she adds.\n\nThey tested their technique in several simulated environments, including some set up like warehouses, some with random obstacles, and even maze-like settings that emulate building interiors.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:An iterative process, the overall algorithm picks the most p — 段落/内容单元:They tested their technique in several simulated environment", "source_line_range": [ 43, 56 ] }, { "id": "body-region-5", "text": "by identifying more effective groups to decongest their learning based approach decongests the warehouse up to four times faster than strong non learning based approaches even when they factored in the additional computational overhead of running the neural network their approach still solved the problem 3 5 times faster in the future the researchers want to derive simple rule based insights from their neural model since the decisions of the neural network can be opaque and difficult to interpret simpler rule based methods could also be easier to implement and maintain in actual robotic warehouse settings this approach is based on a novel architecture where convolution and attention mechanisms interact effectively and efficiently impressively this leads to being able to take into account the spatiotemporal component of the constructed paths without the need of problem specific feature engineering the results are outstanding not only is it possible to improve on state of the art large neighborhood search methods in terms of quality of the solution and speed but the model generalizes to unseen cases wonderfully says andrea lodi the andrew h and ann r tisch professor at cornell tech and who was not involved with this research this work was supported by amazon and the mit amazon science hub", "source_text": "By identifying more effective groups to decongest, their learning-based approach decongests the warehouse up to four times faster than strong, non-learning-based approaches. Even when they factored in the additional computational overhead of running the neural network, their approach still solved the problem 3.5 times faster.\n\nIn the future, the researchers want to derive simple, rule-based insights from their neural model, since the decisions of the neural network can be opaque and difficult to interpret. Simpler, rule-based methods could also be easier to implement and maintain in actual robotic warehouse settings.\n\n“This approach is based on a novel architecture where convolution and attention mechanisms interact effectively and efficiently. Impressively, this leads to being able to take into account the spatiotemporal component of the constructed paths without the need of problem-specific feature engineering. The results are outstanding: Not only is it possible to improve on state-of-the-art large neighborhood search methods in terms of quality of the solution and speed, but the model generalizes to unseen cases wonderfully,” says Andrea Lodi, the Andrew H. and Ann R. Tisch Professor at Cornell Tech, and who was not involved with this research.\n\nThis work was supported by Amazon and the MIT Amazon Science Hub.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:By identifying more effective groups to decongest, their lea — 段落/内容单元:This work was supported by Amazon and the MIT Amazon Science", "source_line_range": [ 57, 63 ] } ], "ending": { "text": " not involved with this research.\n\nThis work was supported by Amazon and the MIT Amazon Science Hub." } } }, { "id": "article-034", "name": "NASA’s Webb Delivers Deepest Infrared Image of Universe Yet", "url": "https://science.nasa.gov/missions/webb/nasas-webb-delivers-deepest-infrared-image-of-universe-yet/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "NASA’s\\ Webb\\ Delivers\\ Deepest\\ Infrared\\ Image\\ of\\ Universe\\ Yet" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "NASA Webb Mission Team" ] }, { "id": "stable-3", "alternatives": [ "Goddard Space Flight Center" ] }, { "id": "stable-4", "alternatives": [ "JUL 12, 2022" ] }, { "id": "stable-5", "alternatives": [ "ARTICLE" ] }, { "id": "stable-6", "alternatives": [ "5 MIN READ" ] }, { "id": "stable-7", "alternatives": [ "Explore" ] }, { "id": "stable-8", "alternatives": [ "News & Events" ] }, { "id": "stable-9", "alternatives": [ "Multimedia" ] }, { "id": "stable-10", "alternatives": [ "NASA+" ] }, { "id": "stable-11", "alternatives": [ "Science" ] }, { "id": "stable-12", "alternatives": [ "James Webb Space Telescope (JWST)" ] }, { "id": "stable-13", "alternatives": [ "Webb" ] }, { "id": "stable-14", "alternatives": [ "News" ] }, { "id": "stable-15", "alternatives": [ "Overview" ] }, { "id": "stable-16", "alternatives": [ "Observatory" ] }, { "id": "stable-17", "alternatives": [ "Team" ] }, { "id": "stable-18", "alternatives": [ "More" ] }, { "id": "stable-19", "alternatives": [ "Related Images & Videos" ] }, { "id": "stable-20", "alternatives": [ "Share" ] }, { "id": "stable-21", "alternatives": [ "Details" ] }, { "id": "stable-22", "alternatives": [ "LAST UPDATED" ] }, { "id": "stable-23", "alternatives": [ "LOCATION" ] }, { "id": "stable-24", "alternatives": [ "NASA Goddard Space Flight Center" ] }, { "id": "stable-25", "alternatives": [ "CONTACT" ] }, { "id": "stable-26", "alternatives": [ "Media" ] }, { "id": "stable-27", "alternatives": [ "Laura Betz" ] }, { "id": "stable-28", "alternatives": [ "NASA’s Goddard Space Flight Center" ] }, { "id": "stable-29", "alternatives": [ "Greenbelt, Maryland" ] }, { "id": "stable-30", "alternatives": [ "laura.e.betz@nasa.gov" ] }, { "id": "stable-31", "alternatives": [ "RELEASE CREDIT" ] }, { "id": "stable-32", "alternatives": [ "NASA, ESA, CSA, STScI" ] }, { "id": "stable-33", "alternatives": [ "Related Terms" ] }, { "id": "stable-34", "alternatives": [ "Galaxies" ] }, { "id": "stable-35", "alternatives": [ "Galaxy clusters" ] }, { "id": "stable-36", "alternatives": [ "Gravitational Lensing" ] }, { "id": "stable-37", "alternatives": [ "Related Links and Documents" ] }, { "id": "stable-38", "alternatives": [ "Noticias en español: Webb ofrece la imagen infrarroja más profunda del universo hasta la fecha" ] }, { "id": "stable-39", "alternatives": [ "KEEP EXPLORING" ] }, { "id": "stable-40", "alternatives": [ "Discover More Topics From Webb" ] }, { "id": "stable-41", "alternatives": [ "National Aeronautics and Space Administration" ] }, { "id": "stable-42", "alternatives": [ "NASA explores the unknown in air and space, innovates for the benefit of humanity, and inspires the world through discovery." ] }, { "id": "stable-43", "alternatives": [ "About NASA's Mission" ] }, { "id": "stable-44", "alternatives": [ "Join Us" ] }, { "id": "stable-45", "alternatives": [ "Home" ] }, { "id": "stable-46", "alternatives": [ "Missions" ] }, { "id": "stable-47", "alternatives": [ "Humans in Space" ] }, { "id": "stable-48", "alternatives": [ "Earth" ] }, { "id": "stable-49", "alternatives": [ "The Solar System" ] }, { "id": "stable-50", "alternatives": [ "The Universe" ] }, { "id": "stable-51", "alternatives": [ "Aeronautics" ] }, { "id": "stable-52", "alternatives": [ "Technology" ] }, { "id": "stable-53", "alternatives": [ "Learning Resources" ] }, { "id": "stable-54", "alternatives": [ "About NASA" ] }, { "id": "stable-55", "alternatives": [ "NASA en Español" ] }, { "id": "stable-56", "alternatives": [ "Follow NASA" ] }, { "id": "stable-57", "alternatives": [ "More NASA Social Accounts" ] }, { "id": "stable-58", "alternatives": [ "NASA Newsletters" ] }, { "id": "stable-59", "alternatives": [ "Sitemap" ] }, { "id": "stable-60", "alternatives": [ "For Media" ] }, { "id": "stable-61", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-62", "alternatives": [ "FOIA" ] }, { "id": "stable-63", "alternatives": [ "No FEAR Act" ] }, { "id": "stable-64", "alternatives": [ "Office of the IG" ] }, { "id": "stable-65", "alternatives": [ "Budget & Annual Reports" ] }, { "id": "stable-66", "alternatives": [ "Agency Financial Reports" ] }, { "id": "stable-67", "alternatives": [ "Contact NASA" ] }, { "id": "stable-68", "alternatives": [ "Accessibility" ] }, { "id": "stable-69", "alternatives": [ "Page Last Updated:" ] }, { "id": "stable-70", "alternatives": [ "Page Editor:" ] }, { "id": "stable-71", "alternatives": [ "Responsible NASA Official for Science:" ] }, { "id": "visible-search-placeholder", "alternatives": [ "Search..." ], "visible_control": { "selector": "header.usa-header-primary #search-field-en-small--desktop", "attribute": "placeholder" } }, { "id": "body-hero-credit", "alternatives": [ "Image: NASA, ESA, CSA, STScI" ] }, { "id": "body-embedded-card", "alternatives": [ "First Images Slideshow The image below is a SLIDESHOW. Hover over the image to see the image title and controls. Click the image to go to a detail page with more info and the ability to download the image at various resolutions (click downward arrow in lower right corner)." ] } ] }, "rule_review": { "status": "reviewed", "reason": "Approved NASA URL successfully loaded after earlier transient tool/DNS failure. Same-run root03 complete parent article and automatically rendered iframe were reviewed against fullpage screenshot and AX. Body includes actual hero HTML caption/credit, four summary bullets, all14 paragraphs and the complete visible Webb’s First Images card; related-image recommendation previews are outside the authored body. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "NASA’s Webb Delivers Deepest Infrared Image of Universe Yet" ], "html_selector": "h1.display-48.margin-bottom-2,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-034/comment-qualification-reference-r5.json", "sha256": "ccf874c7a219ce0e46c8d70e756e379613c51d4b0754d541192976e20e57ef51", "chars": 858, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Thousands of galaxies flood this near-infrared image of galaxy cluster SMACS 0723. High-resolution imaging from NASA’s James Webb Space Telescope combined with a natural effect known as gravitational lensing made this finely detailed image possible. First, focus on the...\nImage: NASA, ESA, CSA, STScI\nPresident Joe Biden unveiled this image of galaxy cluster SMACS 0723, known as Webb's First Deep Field, during a White House event Monday, July 11\nWebb's image covers a patch of sky approximately the size of a grain of sand held at arm's length by someone on the ground – and reveals thousands of galaxies in a tiny sliver of vast universe\nWebb's sharp near-infrared view brought out faint structures in extremely distant galaxies, offering the most detailed view of the early universe to date\nNASA and its partners will release the full series of Webb's first full-color images and data, known as spectra, Tuesday, July 12, during a live NASA TV broadcast\n\nNASA's James Webb Space Telescope has delivered the deepest and sharpest infrared image of the distant universe so far. Webb's First Deep Field is galaxy cluster SMACS 0723, and it is teeming with thousands of galaxies – including the faintest objects ever observed in the infrared.\n\nWebb's image is approximately the size of a grain of sand held at arm's length, a tiny sliver of the vast universe. The combined mass of this galaxy cluster acts as a gravitational lens, magnifying more distant galaxies, including some seen when the universe was less than a billion years old. This deep field, taken by Webb's Near-Infrared Camera (NIRCam), is a composite made from images at different wavelengths, totaling 12.5 hours – achieving depths at infrared wavelengths beyond the Hubble Space Telescope's deepest fields, which took weeks. And this is only the beginning. Researchers will continue to use Webb to take longer exposures, revealing more of our vast universe.\n\nThis image shows the galaxy cluster SMACS 0723 as it appeared 4.6 billion years ago, with many more galaxies in front of and behind the cluster. Much more about this cluster will be revealed as researchers begin digging into Webb's data. This field was also imaged by Webb's Mid-Infrared Instrument (MIRI), which observes mid-infrared light.\n\nWebb's NIRCam has brought distant galaxies into sharp focus – they have tiny, faint structures that have never been seen before, including star clusters and diffuse features.\n\nLight from these galaxies took billions of years to reach us. We are looking back in time to within a billion years after the big bang when viewing the youngest galaxies in this field. The light was stretched by the expansion of the universe to infrared wavelengths that Webb was designed to observe. Researchers will soon begin to learn more about the galaxies' masses, ages, histories, and compositions.\n\nOther features include the prominent arcs in this field. The powerful gravitational field of a galaxy cluster can bend the light rays from more distant galaxies behind it, just as a magnifying glass bends and warps images. Stars are also captured with prominent diffraction spikes, as they appear brighter at shorter wavelengths.\n\nWebb's MIRI image offers a kaleidoscope of colors and highlights where the dust is – a major ingredient for star formation, and ultimately life itself. Blue galaxies contain stars, but very little dust. The red objects in this field are enshrouded in thick layers of dust. Green galaxies are populated with hydrocarbons and other chemical compounds. Researchers will be able to use data like these to understand how galaxies form, grow, and merge with each other, and in some cases why they stop forming stars altogether.\n\nIn addition to taking images, two of Webb's instruments also obtained spectra – data that reveal objects' physical and chemical properties that will help researchers identify many more details about distant galaxies in this field. Webb's Near Infrared Spectrograph (NIRSpec) microshutter array observed 48 individual galaxies at the same time – a new technology used for the first time in space – returning a full suite of details about each. The data revealed light from one galaxy that traveled for 13.1 billion years before Webb's mirrors captured it. NIRSpec data also demonstrate how detailed galaxy spectra will be with Webb observations.\n\nFinally, Webb's Near-Infrared Imager and Slitless Spectrograph (NIRISS) used Wide-Field Slitless Spectroscopy to capture spectra of all the objects in the entire field of view at once. Among the results, it proves that one of the galaxies has a mirror image.\n\nSMACS 0723 can be viewed near the constellation Volans in the southern sky.\n\nThe James Webb Space Telescope is the world's premier space science observatory. Webb will solve mysteries in our solar system, look beyond to distant worlds around other stars, and probe the mysterious structures and origins of our universe and our place in it. Webb is an international program led by NASA with its partners, ESA (European Space Agency) and CSA (Canadian Space Agency).\n\nNASA Headquarters oversees the mission for the agency's Science Mission Directorate. NASA's Goddard Space Flight Center in Greenbelt, Maryland, manages Webb for the agency and oversees work on the mission performed by the Space Telescope Science Institute, Northrop Grumman, and other mission partners. In addition to Goddard, several NASA centers contributed to the project, including the agency's Johnson Space Center in Houston; Jet Propulsion Laboratory (JPL) in Southern California; Marshall Space Flight Center in Huntsville, Alabama; Ames Research Center in California's Silicon Valley; and others.\n\nNIRCam was built by a team at the University of Arizona and Lockheed Martin's Advanced Technology Center.\n\nFor a full array of Webb’s first images and spectra, including downloadable files, please visit:\n\nWebb’s First Images\nFirst Images Slideshow The image below is a SLIDESHOW. Hover over the image to see the image title and controls. Click the image to go to a detail page with more info and the ability to download the image at various resolutions (click downward arrow in lower right corner).\nNASA Science\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "thousands of galaxies flood this near infrared image of galaxy cluster smacs 0723 high resolution imaging from nasa s james webb space telescope combined with a natural effect known as gravitational lensing made this finely detailed image possible first focus on the image nasa esa csa stsci president joe biden unveiled this image of galaxy cluster smacs 0723 known as webb s first deep field during a white house event monday july 11 webb s image covers a patch of sky approximately the size of a grain of sand held at arm s length by someone on the ground and reveals thousands of galaxies in a tiny sliver of vast universe webb s sharp near infrared view brought out faint structures in extremely distant galaxies offering the most detailed view of the early universe to date nasa and its partners will release the full series of webb s first full color images and data known as spectra tuesday july 12 during a live nasa tv broadcast nasa s james webb space telescope has delivered the deepest and sharpest infrared image of the distant universe so far webb s first deep field is galaxy cluster smacs 0723 and it is teeming with thousands of galaxies including the faintest objects ever observed in the infrared", "source_text": "Thousands of galaxies flood this near-infrared image of galaxy cluster SMACS 0723. High-resolution imaging from NASA’s James Webb Space Telescope combined with a natural effect known as gravitational lensing made this finely detailed image possible. First, focus on the...\nImage: NASA, ESA, CSA, STScI\nPresident Joe Biden unveiled this image of galaxy cluster SMACS 0723, known as Webb's First Deep Field, during a White House event Monday, July 11\nWebb's image covers a patch of sky approximately the size of a grain of sand held at arm's length by someone on the ground – and reveals thousands of galaxies in a tiny sliver of vast universe\nWebb's sharp near-infrared view brought out faint structures in extremely distant galaxies, offering the most detailed view of the early universe to date\nNASA and its partners will release the full series of Webb's first full-color images and data, known as spectra, Tuesday, July 12, during a live NASA TV broadcast\n\nNASA's James Webb Space Telescope has delivered the deepest and sharpest infrared image of the distant universe so far. Webb's First Deep Field is galaxy cluster SMACS 0723, and it is teeming with thousands of galaxies – including the faintest objects ever observed in the infrared.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Thousands of galaxies flood this near-infrared image of gala — 段落/内容单元:NASA's James Webb Space Telescope has delivered the deepest ", "source_line_range": [ 1, 9 ] }, { "id": "body-region-2", "text": "webb s image is approximately the size of a grain of sand held at arm s length a tiny sliver of the vast universe the combined mass of this galaxy cluster acts as a gravitational lens magnifying more distant galaxies including some seen when the universe was less than a billion years old this deep field taken by webb s near infrared camera nircam is a composite made from images at different wavelengths totaling 12 5 hours achieving depths at infrared wavelengths beyond the hubble space telescope s deepest fields which took weeks and this is only the beginning researchers will continue to use webb to take longer exposures revealing more of our vast universe this image shows the galaxy cluster smacs 0723 as it appeared 4 6 billion years ago with many more galaxies in front of and behind the cluster much more about this cluster will be revealed as researchers begin digging into webb s data this field was also imaged by webb s mid infrared instrument miri which observes mid infrared light webb s nircam has brought distant galaxies into sharp focus they have tiny faint structures that have never been seen before including star clusters and diffuse features", "source_text": "Webb's image is approximately the size of a grain of sand held at arm's length, a tiny sliver of the vast universe. The combined mass of this galaxy cluster acts as a gravitational lens, magnifying more distant galaxies, including some seen when the universe was less than a billion years old. This deep field, taken by Webb's Near-Infrared Camera (NIRCam), is a composite made from images at different wavelengths, totaling 12.5 hours – achieving depths at infrared wavelengths beyond the Hubble Space Telescope's deepest fields, which took weeks. And this is only the beginning. Researchers will continue to use Webb to take longer exposures, revealing more of our vast universe.\n\nThis image shows the galaxy cluster SMACS 0723 as it appeared 4.6 billion years ago, with many more galaxies in front of and behind the cluster. Much more about this cluster will be revealed as researchers begin digging into Webb's data. This field was also imaged by Webb's Mid-Infrared Instrument (MIRI), which observes mid-infrared light.\n\nWebb's NIRCam has brought distant galaxies into sharp focus – they have tiny, faint structures that have never been seen before, including star clusters and diffuse features.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:Webb's image is approximately the size of a grain of sand he — 段落/内容单元:Webb's NIRCam has brought distant galaxies into sharp focus ", "source_line_range": [ 10, 15 ] }, { "id": "body-region-3", "text": "light from these galaxies took billions of years to reach us we are looking back in time to within a billion years after the big bang when viewing the youngest galaxies in this field the light was stretched by the expansion of the universe to infrared wavelengths that webb was designed to observe researchers will soon begin to learn more about the galaxies masses ages histories and compositions other features include the prominent arcs in this field the powerful gravitational field of a galaxy cluster can bend the light rays from more distant galaxies behind it just as a magnifying glass bends and warps images stars are also captured with prominent diffraction spikes as they appear brighter at shorter wavelengths webb s miri image offers a kaleidoscope of colors and highlights where the dust is a major ingredient for star formation and ultimately life itself blue galaxies contain stars but very little dust the red objects in this field are enshrouded in thick layers of dust green galaxies are populated with hydrocarbons and other chemical compounds researchers will be able to use data like these to understand how galaxies form grow and merge with each other and in some cases why they stop forming stars altogether", "source_text": "Light from these galaxies took billions of years to reach us. We are looking back in time to within a billion years after the big bang when viewing the youngest galaxies in this field. The light was stretched by the expansion of the universe to infrared wavelengths that Webb was designed to observe. Researchers will soon begin to learn more about the galaxies' masses, ages, histories, and compositions.\n\nOther features include the prominent arcs in this field. The powerful gravitational field of a galaxy cluster can bend the light rays from more distant galaxies behind it, just as a magnifying glass bends and warps images. Stars are also captured with prominent diffraction spikes, as they appear brighter at shorter wavelengths.\n\nWebb's MIRI image offers a kaleidoscope of colors and highlights where the dust is – a major ingredient for star formation, and ultimately life itself. Blue galaxies contain stars, but very little dust. The red objects in this field are enshrouded in thick layers of dust. Green galaxies are populated with hydrocarbons and other chemical compounds. Researchers will be able to use data like these to understand how galaxies form, grow, and merge with each other, and in some cases why they stop forming stars altogether.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:Light from these galaxies took billions of years to reach us — 段落/内容单元:Webb's MIRI image offers a kaleidoscope of colors and highli", "source_line_range": [ 16, 21 ] }, { "id": "body-region-4", "text": "in addition to taking images two of webb s instruments also obtained spectra data that reveal objects physical and chemical properties that will help researchers identify many more details about distant galaxies in this field webb s near infrared spectrograph nirspec microshutter array observed 48 individual galaxies at the same time a new technology used for the first time in space returning a full suite of details about each the data revealed light from one galaxy that traveled for 13 1 billion years before webb s mirrors captured it nirspec data also demonstrate how detailed galaxy spectra will be with webb observations finally webb s near infrared imager and slitless spectrograph niriss used wide field slitless spectroscopy to capture spectra of all the objects in the entire field of view at once among the results it proves that one of the galaxies has a mirror image smacs 0723 can be viewed near the constellation volans in the southern sky the james webb space telescope is the world s premier space science observatory webb will solve mysteries in our solar system look beyond to distant worlds around other stars and probe the mysterious structures and origins of our universe and our place in it webb is an international program led by nasa with its partners esa european space agency and csa canadian space agency", "source_text": "In addition to taking images, two of Webb's instruments also obtained spectra – data that reveal objects' physical and chemical properties that will help researchers identify many more details about distant galaxies in this field. Webb's Near Infrared Spectrograph (NIRSpec) microshutter array observed 48 individual galaxies at the same time – a new technology used for the first time in space – returning a full suite of details about each. The data revealed light from one galaxy that traveled for 13.1 billion years before Webb's mirrors captured it. NIRSpec data also demonstrate how detailed galaxy spectra will be with Webb observations.\n\nFinally, Webb's Near-Infrared Imager and Slitless Spectrograph (NIRISS) used Wide-Field Slitless Spectroscopy to capture spectra of all the objects in the entire field of view at once. Among the results, it proves that one of the galaxies has a mirror image.\n\nSMACS 0723 can be viewed near the constellation Volans in the southern sky.\n\nThe James Webb Space Telescope is the world's premier space science observatory. Webb will solve mysteries in our solar system, look beyond to distant worlds around other stars, and probe the mysterious structures and origins of our universe and our place in it. Webb is an international program led by NASA with its partners, ESA (European Space Agency) and CSA (Canadian Space Agency).", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:In addition to taking images, two of Webb's instruments also — 段落/内容单元:The James Webb Space Telescope is the world's premier space ", "source_line_range": [ 22, 29 ] }, { "id": "body-region-5", "text": "nasa headquarters oversees the mission for the agency s science mission directorate nasa s goddard space flight center in greenbelt maryland manages webb for the agency and oversees work on the mission performed by the space telescope science institute northrop grumman and other mission partners in addition to goddard several nasa centers contributed to the project including the agency s johnson space center in houston jet propulsion laboratory jpl in southern california marshall space flight center in huntsville alabama ames research center in california s silicon valley and others nircam was built by a team at the university of arizona and lockheed martin s advanced technology center for a full array of webb s first images and spectra including downloadable files please visit webb s first images first images slideshow the image below is a slideshow hover over the image to see the image title and controls click the image to go to a detail page with more info and the ability to download the image at various resolutions click downward arrow in lower right corner nasa science", "source_text": "NASA Headquarters oversees the mission for the agency's Science Mission Directorate. NASA's Goddard Space Flight Center in Greenbelt, Maryland, manages Webb for the agency and oversees work on the mission performed by the Space Telescope Science Institute, Northrop Grumman, and other mission partners. In addition to Goddard, several NASA centers contributed to the project, including the agency's Johnson Space Center in Houston; Jet Propulsion Laboratory (JPL) in Southern California; Marshall Space Flight Center in Huntsville, Alabama; Ames Research Center in California's Silicon Valley; and others.\n\nNIRCam was built by a team at the University of Arizona and Lockheed Martin's Advanced Technology Center.\n\nFor a full array of Webb’s first images and spectra, including downloadable files, please visit:\n\nWebb’s First Images\nFirst Images Slideshow The image below is a SLIDESHOW. Hover over the image to see the image title and controls. Click the image to go to a detail page with more info and the ability to download the image at various resolutions (click downward arrow in lower right corner).\nNASA Science", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:NASA Headquarters oversees the mission for the agency's Scie — 段落/内容单元:For a full array of Webb’s first images and spectra, includi", "source_line_range": [ 30, 38 ] } ], "ending": { "text": "First Images Slideshow The image below is a SLIDESHOW. Hover over the image to see the image title and controls. Click the image to go to a detail page with more info and the ability to download the image at various resolutions (click downward arrow in lower right corner).\nNASA Science" } } }, { "id": "article-035", "name": "The Mimic Octopus", "url": "https://www.smithsonianmag.com/science-nature/the-mimic-octopus-34059594/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The\\ Mimic\\ Octopus" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Sarah Zielinski" ] }, { "id": "stable-3", "alternatives": [ "August 27, 2010" ] }, { "id": "stable-4", "alternatives": [ "Share" ] }, { "id": "stable-5", "alternatives": [ "Add as preferred source" ] }, { "id": "stable-6", "alternatives": [ "Search" ] }, { "id": "stable-7", "alternatives": [ "Shop" ] }, { "id": "stable-8", "alternatives": [ "Newsletters" ] }, { "id": "stable-9", "alternatives": [ "Renew" ] }, { "id": "stable-10", "alternatives": [ "Give a Gift" ] }, { "id": "stable-11", "alternatives": [ "Subscribe" ] }, { "id": "stable-12", "alternatives": [ "Membership" ] }, { "id": "stable-13", "alternatives": [ "You Might Also Like" ] }, { "id": "stable-14", "alternatives": [ "Get the latest Science stories in your inbox." ] }, { "id": "stable-15", "alternatives": [ "Email Powered by Salesforce Marketing Cloud" ] }, { "id": "stable-16", "alternatives": [ "Privacy Notice" ] }, { "id": "stable-17", "alternatives": [ "Terms & Conditions" ] }, { "id": "stable-18", "alternatives": [ "More about:" ] }, { "id": "stable-19", "alternatives": [ "Evolution" ] }, { "id": "stable-20", "alternatives": [ "Fish" ] }, { "id": "stable-21", "alternatives": [ "Oceans" ] }, { "id": "stable-22", "alternatives": [ "Follow Us" ] }, { "id": "stable-23", "alternatives": [ "Explore" ] }, { "id": "stable-24", "alternatives": [ "Smart News" ] }, { "id": "stable-25", "alternatives": [ "History" ] }, { "id": "stable-26", "alternatives": [ "Science" ] }, { "id": "stable-27", "alternatives": [ "Innovation" ] }, { "id": "stable-28", "alternatives": [ "Arts & Culture" ] }, { "id": "stable-29", "alternatives": [ "Travel" ] }, { "id": "stable-30", "alternatives": [ "At the Smithsonian" ] }, { "id": "stable-31", "alternatives": [ "Photo Contest" ] }, { "id": "stable-32", "alternatives": [ "Podcast" ] }, { "id": "stable-33", "alternatives": [ "Video" ] }, { "id": "stable-34", "alternatives": [ "Subscription" ] }, { "id": "stable-35", "alternatives": [ "Manage My Account" ] }, { "id": "stable-36", "alternatives": [ "Sign Up" ] }, { "id": "stable-37", "alternatives": [ "About" ] }, { "id": "stable-38", "alternatives": [ "About Us" ] }, { "id": "stable-39", "alternatives": [ "Advertising" ] }, { "id": "stable-40", "alternatives": [ "Contact Us" ] }, { "id": "stable-41", "alternatives": [ "Content Licensing" ] }, { "id": "stable-42", "alternatives": [ "FAQ" ] }, { "id": "stable-43", "alternatives": [ "Feedback" ] }, { "id": "stable-44", "alternatives": [ "Internships & Employment" ] }, { "id": "stable-45", "alternatives": [ "Member Services" ] }, { "id": "stable-46", "alternatives": [ "Smithsonian Institution" ] }, { "id": "stable-47", "alternatives": [ "Staff" ] }, { "id": "stable-48", "alternatives": [ "Our Partners" ] }, { "id": "stable-49", "alternatives": [ "Smithsonian.com" ] }, { "id": "stable-50", "alternatives": [ "Smithsonian Store" ] }, { "id": "stable-51", "alternatives": [ "Smithsonian Journeys" ] }, { "id": "stable-52", "alternatives": [ "Smithsonian Channel" ] }, { "id": "stable-53", "alternatives": [ "Smithsonian Books" ] }, { "id": "stable-54", "alternatives": [ "Smithsonian Membership" ] }, { "id": "stable-55", "alternatives": [ "Privacy Statement" ] }, { "id": "stable-56", "alternatives": [ "Cookie Policy" ] }, { "id": "stable-57", "alternatives": [ "Terms of Use" ] }, { "id": "stable-58", "alternatives": [ "Advertising Notice" ] }, { "id": "stable-59", "alternatives": [ "Your Privacy Choices" ] }, { "id": "stable-60", "alternatives": [ "Cookie Settings" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Fresh independently observed initial source contains complete ordinary article before later automatic advertising transition. Early completeDOM/nativeAX and visible/unclipped per-paragraph ancestor metadata agree; independently inspected bodyclip visibly confirms credit and all4paragraphs. Later same-context bodyoverflow:hidden/campaign insertion is separately timestamped and is not used as unobstructed-body evidence. Previous modal observation remains valid for its older session; this qualification binds the documented early source only. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Mimic Octopus" ], "html_selector": "h1.headline,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-035/comment-qualification-reference-r5.json", "sha256": "d9fa572cffd41b80ec3299f8bbf40c37d0d480cddeb88e03e10a9e6c87a9cfd3", "chars": 803, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Feedloader (Clickability)\n\nThe mimic octopus (Thaumoctopus mimicus) has some interesting ways to keep from being eaten. The brown-and-white stripes on its arms resemble the patterning on venomous sea snakes and the coloring of spiny lionfish. And it can vary its shape and positioning to look like a variety of different underwater creatures. For example, when the octopus swims, it can arrange all of its long arms behind its body and impersonate a toxic flatfish, such as a zebra sole. These aren't perfect impersonations, but they may startle a predator enough that the octopus has time to flee.\n\nIn a new study in the Biological Journal of the Linnean Society, biologists examined DNA sequences of the mimic octopus and 35 of its relatives to create a family tree and determine when each of the mimic's distinctive traits evolved. They found that the octopus began to swim like a flatfish around the same time that it evolved very long arms. The conspicuous body patterning came later.\n\nThat coloring may not all be mimicry, though. The mimic octopus wasn't discovered until 1998, so scientists are still learning basic characteristics. The bright pattern may be a warning that the octopus isn't tasty, though it's not been confirmed that it's unpalatable to fish or anyone else. However, scientists have witnessed at least one case in which a flounder spit a mimic out after trying to eat it.\n\nCheck out the entire collection of Surprising Science’s Pictures of the Week on our Facebook page.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "feedloader clickability", "source_text": "Feedloader (Clickability)", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Feedloader (Clickability)", "source_line_range": [ 1, 2 ] }, { "id": "body-region-2", "text": "the mimic octopus thaumoctopus mimicus has some interesting ways to keep from being eaten the brown and white stripes on its arms resemble the patterning on venomous sea snakes and the coloring of spiny lionfish and it can vary its shape and positioning to look like a variety of different underwater creatures for example when the octopus swims it can arrange all of its long arms behind its body and impersonate a toxic flatfish such as a zebra sole these aren t perfect impersonations but they may startle a predator enough that the octopus has time to flee", "source_text": "The mimic octopus (Thaumoctopus mimicus) has some interesting ways to keep from being eaten. The brown-and-white stripes on its arms resemble the patterning on venomous sea snakes and the coloring of spiny lionfish. And it can vary its shape and positioning to look like a variety of different underwater creatures. For example, when the octopus swims, it can arrange all of its long arms behind its body and impersonate a toxic flatfish, such as a zebra sole. These aren't perfect impersonations, but they may startle a predator enough that the octopus has time to flee.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:The mimic octopus (Thaumoctopus mimicus) has some interestin", "source_line_range": [ 3, 4 ] }, { "id": "body-region-3", "text": "in a new study in the biological journal of the linnean society biologists examined dna sequences of the mimic octopus and 35 of its relatives to create a family tree and determine when each of the mimic s distinctive traits evolved they found that the octopus began to swim like a flatfish around the same time that it evolved very long arms the conspicuous body patterning came later", "source_text": "In a new study in the Biological Journal of the Linnean Society, biologists examined DNA sequences of the mimic octopus and 35 of its relatives to create a family tree and determine when each of the mimic's distinctive traits evolved. They found that the octopus began to swim like a flatfish around the same time that it evolved very long arms. The conspicuous body patterning came later.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:In a new study in the Biological Journal of the Linnean Soci", "source_line_range": [ 5, 6 ] }, { "id": "body-region-4", "text": "that coloring may not all be mimicry though the mimic octopus wasn t discovered until 1998 so scientists are still learning basic characteristics the bright pattern may be a warning that the octopus isn t tasty though it s not been confirmed that it s unpalatable to fish or anyone else however scientists have witnessed at least one case in which a flounder spit a mimic out after trying to eat it", "source_text": "That coloring may not all be mimicry, though. The mimic octopus wasn't discovered until 1998, so scientists are still learning basic characteristics. The bright pattern may be a warning that the octopus isn't tasty, though it's not been confirmed that it's unpalatable to fish or anyone else. However, scientists have witnessed at least one case in which a flounder spit a mimic out after trying to eat it.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:That coloring may not all be mimicry, though. The mimic octo", "source_line_range": [ 7, 8 ] }, { "id": "body-region-5", "text": "check out the entire collection of surprising science s pictures of the week on our facebook page", "source_text": "Check out the entire collection of Surprising Science’s Pictures of the Week on our Facebook page.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:Check out the entire collection of Surprising Science’s Pict", "source_line_range": [ 9, 9 ] } ], "ending": { "text": "\n\nCheck out the entire collection of Surprising Science’s Pictures of the Week on our Facebook page." } } }, { "id": "article-036", "name": "与普通章鱼相遇", "url": "https://www.theguardian.com/environment/2024/apr/04/the-finger-touch-sent-shivers-down-my-spine-my-encounter-with-a-common-octopus", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "my\\ encounter\\ with\\ a\\ common\\ octopus" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Support the Guardian" ] }, { "id": "stable-2", "alternatives": [ "Support us" ] }, { "id": "stable-3", "alternatives": [ "Print subscriptions" ] }, { "id": "stable-4", "alternatives": [ "Newsletters" ] }, { "id": "stable-5", "alternatives": [ "Sign in" ] }, { "id": "stable-6", "alternatives": [ "News" ] }, { "id": "stable-7", "alternatives": [ "Opinion" ] }, { "id": "stable-8", "alternatives": [ "Sport" ] }, { "id": "stable-9", "alternatives": [ "Culture" ] }, { "id": "stable-10", "alternatives": [ "Lifestyle" ] }, { "id": "stable-11", "alternatives": [ "Environment" ] }, { "id": "stable-12", "alternatives": [ "Climate crisis" ] }, { "id": "stable-13", "alternatives": [ "Wildlife" ] }, { "id": "stable-14", "alternatives": [ "Energy" ] }, { "id": "stable-15", "alternatives": [ "Pollution" ] }, { "id": "stable-16", "alternatives": [ "Green light" ] }, { "id": "stable-17", "alternatives": [ "UK invertebrate of the year" ] }, { "id": "stable-18", "alternatives": [ "Marine life" ] }, { "id": "stable-19", "alternatives": [ "Supported by" ] }, { "id": "stable-20", "alternatives": [ "About this content" ] }, { "id": "stable-21", "alternatives": [ "Helen Scales" ] }, { "id": "stable-22", "alternatives": [ "Share" ] }, { "id": "stable-23", "alternatives": [ "Prefer the Guardian on Google" ] }, { "id": "stable-24", "alternatives": [ "Explore more on these topics" ] }, { "id": "stable-25", "alternatives": [ "Animals" ] }, { "id": "stable-26", "alternatives": [ "features" ] }, { "id": "stable-27", "alternatives": [ "Reuse this content" ] }, { "id": "stable-28", "alternatives": [ "Sign up for our email" ] }, { "id": "stable-29", "alternatives": [ "About us" ] }, { "id": "stable-30", "alternatives": [ "Help" ] }, { "id": "stable-31", "alternatives": [ "Complaints & corrections" ] }, { "id": "stable-32", "alternatives": [ "Contact us" ] }, { "id": "stable-33", "alternatives": [ "Tip us off" ] }, { "id": "stable-34", "alternatives": [ "SecureDrop" ] }, { "id": "stable-35", "alternatives": [ "Privacy policy" ] }, { "id": "stable-36", "alternatives": [ "Cookie policy" ] }, { "id": "stable-37", "alternatives": [ "Tax strategy" ] }, { "id": "stable-38", "alternatives": [ "Terms & conditions" ] }, { "id": "stable-39", "alternatives": [ "All topics" ] }, { "id": "stable-40", "alternatives": [ "All writers" ] }, { "id": "stable-41", "alternatives": [ "Digital newspaper archive" ] }, { "id": "stable-42", "alternatives": [ "Bluesky" ] }, { "id": "stable-43", "alternatives": [ "Facebook" ] }, { "id": "stable-44", "alternatives": [ "Instagram" ] }, { "id": "stable-45", "alternatives": [ "LinkedIn" ] }, { "id": "stable-46", "alternatives": [ "Threads" ] }, { "id": "stable-47", "alternatives": [ "TikTok" ] }, { "id": "stable-48", "alternatives": [ "YouTube" ] }, { "id": "stable-49", "alternatives": [ "Advertise with us" ] }, { "id": "stable-50", "alternatives": [ "Guardian Labs" ] }, { "id": "stable-51", "alternatives": [ "Search jobs" ] }, { "id": "stable-52", "alternatives": [ "Work with us" ] }, { "id": "stable-53", "alternatives": [ "Accessibility settings" ] }, { "id": "stable-54", "alternatives": [ "Back to top" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initial article with subtitle and two owned related links, both ordinary figure captions, seven narrative paragraphs and original closing attribution/competition note. Full-page screenshot confirms beginning, encounter middle and final note, and no visible modal. Hidden image viewer excluded. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "‘The finger-touch sent shivers down my spine’: my encounter with a common octopus" ], "html_selector": "h1.dcr-l0wuod,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-036/comment-qualification-reference-r5.json", "sha256": "497ee7631f7269422cfbb6de1f0570f43eae9d33ffd6be9e60ecd5d3b941defd", "chars": 860, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Marine biologist Helen Scales had seen octopuses before – but she had never had a meeting quite like this one\n\nInvertebrate of the year 2024: all hail Earth’s spineless heroes\nNominate your UK invertebrate species of the year\n\nThe smartest invertebrate of them all: the common octopus (Octopus vulgaris). Photograph: wrangel/Getty Images/iStockphoto\n\nI\nf I could relive any wildlife encounter, it would be the time last summer when I played peekaboo with an octopus. Usually, when I find myself in the rare company of an underwater celebrity, such as a beautiful, eight-armed cephalopod, only a few fleeting moments pass before I unintentionally scare it away. But this octopus wasn’t going anywhere.\n\nI was floating in knee-high water, heading back to shore after a long free-dive off the coast of Brittany, when I saw the octopus right in front of me. It was a common octopus (Octopus vulgaris), a species that has recently been showing up in large numbers along north-east Atlantic coasts. Octopus booms have happened before, most likely linked to warm currents bringing streams of paralarvae, the mini-octopuses that drift for a time before settling on to the seabed. In 1899, fishers in Cornwall and Devon moaned about a plague of octopuses climbing into their crab pots and munching all the bait. In the last few years, octopuses off Brittany have been doing the same thing.\n\nThe one I saw was the size of a small pet cat and it wasn’t in a trap; it was just sitting among seaweedy rocks, its skin dark and mottled and raised into bumps, a devil horn above each eye. It moved a short way and turned its body smooth and pale, fine red lines matching the veins of the bare rocks. Octopuses are masters of disguise.\n\nI sensed the octopus was comfortable in my presence. It was obviously watching me back with those expressive eyes, so I decided to have a go at re-creating a moment from the Netflix documentary My Octopus Teacher. I reached out a hand, and almost instantly the octopus obligingly unfurled an arm and investigated my fingers, the thin tip like a wriggling worm.\n\nThat finger-touch sent shivers down my spine. I had seen octopuses before, including a curled octopus (Eledone cirrhosa) in Strangford Lough, Northern Ireland, but had never made contact with one. And it was more than a physical connection. This was the first time a wild animal – free to go at any time – had hung around, paid me attention and wondered what I was.\n\nThe octopus met by Helen. Photograph: Helen Scales\n\nNot to cast aspersions on the other invertebrates, but octopuses are undoubtedly the smartest of them all. Their nervous systems are more complex than any other spineless species, a sophisticated arrangement of half a billion nerve cells. When kept in captivity, octopuses need constant stimulation and puzzles to solve; they find ingenious ways to escape and raid nearby aquarium tanks for food before covering their tracks and acting as if nothing happened; they are adept at using tools, like coconut shells, to hide inside, and when they fall asleep it looks as if their dreams are scribbled on their skin in colourful, changing patterns. They leave us humans trying to imagine what it feels like to be an octopus, conscious of their own existence.\n\nI don’t know what the octopus was thinking as we shook hands, but my next move gave me a tangible glimpse inside its mind. As I ducked behind a rock and deliberately slipped out of its line of sight, the octopus reared up with its pliable body and stretched its eyes as tall as they would go. Surely it had one thought: Where did you go?\n\nHelen Scales is a marine biologist and writer\n\nWelcome to the Guardian’s invertebrate of the year competition! Every day between April 2-12 we’ll be profiling one of the incredible invertebrates that live in and around the UK. Let us know which invertebrates you think we should be including here. And at midnight on Friday 12 April, voting will open to decide which is our favourite invertebrate. The winner will be announced on Monday 15 April.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "marine biologist helen scales had seen octopuses before but she had never had a meeting quite like this one invertebrate of the year 2024 all hail earth s spineless heroes nominate your uk invertebrate species of the year the smartest invertebrate of them all the common octopus octopus vulgaris photograph wrangel getty images istockphoto i f i could relive any wildlife encounter it would be the time last summer when i played peekaboo with an octopus usually when i find myself in the rare company of an underwater celebrity such as a beautiful eight armed cephalopod only a few fleeting moments pass before i unintentionally scare it away but this octopus wasn t going anywhere", "source_text": "Marine biologist Helen Scales had seen octopuses before – but she had never had a meeting quite like this one\n\nInvertebrate of the year 2024: all hail Earth’s spineless heroes\nNominate your UK invertebrate species of the year\n\nThe smartest invertebrate of them all: the common octopus (Octopus vulgaris). Photograph: wrangel/Getty Images/iStockphoto\n\nI\nf I could relive any wildlife encounter, it would be the time last summer when I played peekaboo with an octopus. Usually, when I find myself in the rare company of an underwater celebrity, such as a beautiful, eight-armed cephalopod, only a few fleeting moments pass before I unintentionally scare it away. But this octopus wasn’t going anywhere.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Marine biologist Helen Scales had seen octopuses before – bu — 段落/内容单元:I", "source_line_range": [ 1, 10 ] }, { "id": "body-region-2", "text": "i was floating in knee high water heading back to shore after a long free dive off the coast of brittany when i saw the octopus right in front of me it was a common octopus octopus vulgaris a species that has recently been showing up in large numbers along north east atlantic coasts octopus booms have happened before most likely linked to warm currents bringing streams of paralarvae the mini octopuses that drift for a time before settling on to the seabed in 1899 fishers in cornwall and devon moaned about a plague of octopuses climbing into their crab pots and munching all the bait in the last few years octopuses off brittany have been doing the same thing the one i saw was the size of a small pet cat and it wasn t in a trap it was just sitting among seaweedy rocks its skin dark and mottled and raised into bumps a devil horn above each eye it moved a short way and turned its body smooth and pale fine red lines matching the veins of the bare rocks octopuses are masters of disguise", "source_text": "I was floating in knee-high water, heading back to shore after a long free-dive off the coast of Brittany, when I saw the octopus right in front of me. It was a common octopus (Octopus vulgaris), a species that has recently been showing up in large numbers along north-east Atlantic coasts. Octopus booms have happened before, most likely linked to warm currents bringing streams of paralarvae, the mini-octopuses that drift for a time before settling on to the seabed. In 1899, fishers in Cornwall and Devon moaned about a plague of octopuses climbing into their crab pots and munching all the bait. In the last few years, octopuses off Brittany have been doing the same thing.\n\nThe one I saw was the size of a small pet cat and it wasn’t in a trap; it was just sitting among seaweedy rocks, its skin dark and mottled and raised into bumps, a devil horn above each eye. It moved a short way and turned its body smooth and pale, fine red lines matching the veins of the bare rocks. Octopuses are masters of disguise.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:I was floating in knee-high water, heading back to shore aft — 段落/内容单元:The one I saw was the size of a small pet cat and it wasn’t ", "source_line_range": [ 11, 14 ] }, { "id": "body-region-3", "text": "i sensed the octopus was comfortable in my presence it was obviously watching me back with those expressive eyes so i decided to have a go at re creating a moment from the netflix documentary my octopus teacher i reached out a hand and almost instantly the octopus obligingly unfurled an arm and investigated my fingers the thin tip like a wriggling worm that finger touch sent shivers down my spine i had seen octopuses before including a curled octopus eledone cirrhosa in strangford lough northern ireland but had never made contact with one and it was more than a physical connection this was the first time a wild animal free to go at any time had hung around paid me attention and wondered what i was", "source_text": "I sensed the octopus was comfortable in my presence. It was obviously watching me back with those expressive eyes, so I decided to have a go at re-creating a moment from the Netflix documentary My Octopus Teacher. I reached out a hand, and almost instantly the octopus obligingly unfurled an arm and investigated my fingers, the thin tip like a wriggling worm.\n\nThat finger-touch sent shivers down my spine. I had seen octopuses before, including a curled octopus (Eledone cirrhosa) in Strangford Lough, Northern Ireland, but had never made contact with one. And it was more than a physical connection. This was the first time a wild animal – free to go at any time – had hung around, paid me attention and wondered what I was.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:I sensed the octopus was comfortable in my presence. It was — 段落/内容单元:That finger-touch sent shivers down my spine. I had seen oct", "source_line_range": [ 15, 18 ] }, { "id": "body-region-4", "text": "the octopus met by helen photograph helen scales not to cast aspersions on the other invertebrates but octopuses are undoubtedly the smartest of them all their nervous systems are more complex than any other spineless species a sophisticated arrangement of half a billion nerve cells when kept in captivity octopuses need constant stimulation and puzzles to solve they find ingenious ways to escape and raid nearby aquarium tanks for food before covering their tracks and acting as if nothing happened they are adept at using tools like coconut shells to hide inside and when they fall asleep it looks as if their dreams are scribbled on their skin in colourful changing patterns they leave us humans trying to imagine what it feels like to be an octopus conscious of their own existence", "source_text": "The octopus met by Helen. Photograph: Helen Scales\n\nNot to cast aspersions on the other invertebrates, but octopuses are undoubtedly the smartest of them all. Their nervous systems are more complex than any other spineless species, a sophisticated arrangement of half a billion nerve cells. When kept in captivity, octopuses need constant stimulation and puzzles to solve; they find ingenious ways to escape and raid nearby aquarium tanks for food before covering their tracks and acting as if nothing happened; they are adept at using tools, like coconut shells, to hide inside, and when they fall asleep it looks as if their dreams are scribbled on their skin in colourful, changing patterns. They leave us humans trying to imagine what it feels like to be an octopus, conscious of their own existence.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:The octopus met by Helen. Photograph: Helen Scales — 段落/内容单元:Not to cast aspersions on the other invertebrates, but octop", "source_line_range": [ 19, 22 ] }, { "id": "body-region-5", "text": "i don t know what the octopus was thinking as we shook hands but my next move gave me a tangible glimpse inside its mind as i ducked behind a rock and deliberately slipped out of its line of sight the octopus reared up with its pliable body and stretched its eyes as tall as they would go surely it had one thought where did you go helen scales is a marine biologist and writer welcome to the guardian s invertebrate of the year competition every day between april 2 12 we ll be profiling one of the incredible invertebrates that live in and around the uk let us know which invertebrates you think we should be including here and at midnight on friday 12 april voting will open to decide which is our favourite invertebrate the winner will be announced on monday 15 april", "source_text": "I don’t know what the octopus was thinking as we shook hands, but my next move gave me a tangible glimpse inside its mind. As I ducked behind a rock and deliberately slipped out of its line of sight, the octopus reared up with its pliable body and stretched its eyes as tall as they would go. Surely it had one thought: Where did you go?\n\nHelen Scales is a marine biologist and writer\n\nWelcome to the Guardian’s invertebrate of the year competition! Every day between April 2-12 we’ll be profiling one of the incredible invertebrates that live in and around the UK. Let us know which invertebrates you think we should be including here. And at midnight on Friday 12 April, voting will open to decide which is our favourite invertebrate. The winner will be announced on Monday 15 April.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:I don’t know what the octopus was thinking as we shook hands — 段落/内容单元:Welcome to the Guardian’s invertebrate of the year competiti", "source_line_range": [ 23, 27 ] } ], "ending": { "text": "open to decide which is our favourite invertebrate. The winner will be announced on Monday 15 April." } } }, { "id": "article-037", "name": "The Perfect Belgrade Itinerary", "url": "https://www.bbc.com/storyworks/travel/experience-serbia/the-perfect-belgrade-itinerary", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The\\ Perfect\\ Belgrade\\ Itinerary" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Sign in" ] }, { "id": "stable-2", "alternatives": [ "Home" ] }, { "id": "stable-3", "alternatives": [ "News" ] }, { "id": "stable-4", "alternatives": [ "Sport" ] }, { "id": "stable-5", "alternatives": [ "Business" ] }, { "id": "stable-6", "alternatives": [ "Technology" ] }, { "id": "stable-7", "alternatives": [ "Health" ] }, { "id": "stable-8", "alternatives": [ "Culture" ] }, { "id": "stable-9", "alternatives": [ "Search BBC" ] }, { "id": "stable-10", "alternatives": [ "Paid and Presented by" ] }, { "id": "stable-11", "alternatives": [ "A commercial production by" ] }, { "id": "stable-12", "alternatives": [ "Experience! Serbia | National Tourism Organisation of Serbia" ] }, { "id": "stable-13", "alternatives": [ "Cities filled with culture and experiences. Mountains and rivers filled with adventure and beauty." ] }, { "id": "stable-14", "alternatives": [ "Explore all that the diverse destination of Serbia has to offer at any time of year." ] }, { "id": "stable-15", "alternatives": [ "DISCOVER" ] }, { "id": "stable-16", "alternatives": [ "Explore the BBC" ] }, { "id": "stable-17", "alternatives": [ "Arts" ] }, { "id": "stable-18", "alternatives": [ "Travel" ] }, { "id": "stable-19", "alternatives": [ "Earth" ] }, { "id": "stable-20", "alternatives": [ "Audio" ] }, { "id": "stable-21", "alternatives": [ "Video" ] }, { "id": "stable-22", "alternatives": [ "Live" ] }, { "id": "stable-23", "alternatives": [ "Terms of Use" ] }, { "id": "stable-24", "alternatives": [ "About the BBC" ] }, { "id": "stable-25", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-26", "alternatives": [ "Cookies" ] }, { "id": "stable-27", "alternatives": [ "Accessibility Help" ] }, { "id": "stable-28", "alternatives": [ "Parental Guidance" ] }, { "id": "stable-29", "alternatives": [ "Contact the BBC" ] }, { "id": "stable-30", "alternatives": [ "Careers" ] }, { "id": "stable-31", "alternatives": [ "BBC emails for you" ] }, { "id": "stable-32", "alternatives": [ "Advertise with us" ] }, { "id": "stable-33", "alternatives": [ "Do not share or sell my info" ] }, { "id": "stable-34", "alternatives": [ "Read about our approach to external linking." ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initially rendered itinerary, including original travel notice, lead, all five destination/food/transport sections and six must-see bullets. Direct clipping screenshots begin/middle/end verify full prose. Full-page screenshot changes vh-sized hero painting, so completeness relies on saved clips and visible auto-height body styles rather than that capture alone. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Perfect Belgrade Itinerary" ], "html_selector": "h1.sc-8e3fc05-0.sc-77279772-11,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-037/comment-qualification-reference-r5.json", "sha256": "9e14c677b8b8faa9a56a8c40dbb46a27af8308612f9757a103155b2a15f1c58f", "chars": 816, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Please always refer to the latest government advice before booking travel and departing on any trip.\n\nForget Berlin, Paris or Rome; for a city break rich in culture, history, scenery and gastronomy, yet unspoiled by the tourist masses, try Belgrade instead.\n\nThere's an abundance of things to see and do in spring and summer - enough to fill a season without trying. Make the most of your visit with this definitive guide to one of Europe’s most magical yet underrated cities.\n\nWHERE TO START\n\nGet the lay of the land at Belgrade Fortress and Kalemegdan Park, which sit above the point at which the Danube and Sava rivers collide and have a great view, not only of this impressive confluence but also of the city. Explore the fortress, which in its glory defended the city in 115 battles, and has been destroyed and rebuilt over 40 times.\n\nIf you visit in summer and find you want to escape the heat then go underground and explore the network of tunnels that criss-cross the city centre under the fortress. It's like a secret world - hundreds of caves, passageways and bunkers are waiting to be explored, and you can join an organised tour to do so.\n\nTHEN HEAD SOUTH\n\nKneza Mihaila, the main street leading up to the park, is pedestrianised, so it's easy to set off on foot and it’s particularly enjoyable to do so in spring, when the city is in full bloom. Many of Belgrade’s historic sites are within a kilometre radius of here, so there’s plenty to explore. Some of the best include the Main Orthodox Church, Kneginja Ljubica Residence, Ethnographic Museum, Nikola Tesla Museum, and a little further afield, St Sava Temple, which is one of the biggest orthodox churches in the world.\n\nOTHER MUST-SEES\nTrg Republike: Belgrade’s favourite meeting point, the main square is a great spot for people watching and enjoying the atmosphere of the city, particularly in the early evening.\nZeleni Venac (Zelenjak) market: Belgrade’s oldest fresh produce market is worth a visit, not necessarily to buy but rather to experience this hectic, vibrant and colourful spectacle.\nThe Royal Compound: See how the heir to the throne lives in this tour of the royal compound. Crown Prince Alexander II and his family took up residence in 2001, and open their home from April to October for a 10am or 1.30pm tour on Saturdays and Sundays, so you'll only get this glimpse into royal life if visiting in spring or summer.\nMuseum of Yugoslav History: Over 200,000 artefacts tell the captivating story of Yugoslavia’s turbulent past. Plus admission to Tito’s grave, which is in the grounds of the museum, is included in the entry price.\nExplore the river banks: both the Danube and Sava rivers offer an abundance of attractions, from galleries to sport, but not least the floating nightclubs which help cement Belgrade’s reputation as one of the best places to party on the continent.\nLeave the historic Old Town for the new and take a tram to Belgrade’s Waterfront, which is undergoing regeneration and transformation from an underused area to a hub of riverside cafes and restaurants, shopping mall, park, performance venues and promenade, as well as hotels, offices and a residential complex.\nWHERE TO EAT\n\nFrom traditional kafanas offering authentic Serbian food to a super trendy concept store/fusion restaurant, whatever your tastes, you’ll be in foodie heaven in Belgrade.\n\nOne restaurant not to miss is the intriguing ? - yes, that really is its name, thanks to a long-ago dispute with the Serbian Orthodox Church. Somehow the unusual moniker has stuck and is now the unlikely name of Belgrade’s oldest traditional tavern or kafana. Soak up the traditional food, music, and atmosphere in this landmark tavern.\n\nHOW TO GET THERE\n\nNamed after the physicist and inventor, Belgrade Nikola Tesla Airport is 18km from the city centre. An international airport, it served almost 5 million passengers in 2016.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "please always refer to the latest government advice before booking travel and departing on any trip", "source_text": "Please always refer to the latest government advice before booking travel and departing on any trip.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Please always refer to the latest government advice before b", "source_line_range": [ 1, 2 ] }, { "id": "body-region-2", "text": "forget berlin paris or rome for a city break rich in culture history scenery and gastronomy yet unspoiled by the tourist masses try belgrade instead there s an abundance of things to see and do in spring and summer enough to fill a season without trying make the most of your visit with this definitive guide to one of europe s most magical yet underrated cities where to start get the lay of the land at belgrade fortress and kalemegdan park which sit above the point at which the danube and sava rivers collide and have a great view not only of this impressive confluence but also of the city explore the fortress which in its glory defended the city in 115 battles and has been destroyed and rebuilt over 40 times if you visit in summer and find you want to escape the heat then go underground and explore the network of tunnels that criss cross the city centre under the fortress it s like a secret world hundreds of caves passageways and bunkers are waiting to be explored and you can join an organised tour to do so then head south kneza mihaila the main street leading up to the park is pedestrianised so it s easy to set off on foot and it s particularly enjoyable to do so in spring when the city is in full bloom many of belgrade s historic sites are within a kilometre radius of here so there s plenty to explore some of the best include the main orthodox church kneginja ljubica residence ethnographic museum nikola tesla museum and a little further afield st sava temple which is one of the biggest orthodox churches in the world other must sees trg republike belgrade s favourite meeting point the main square is a great spot for people watching and enjoying the atmosphere of the city particularly in the early evening zeleni venac zelenjak market belgrade s oldest fresh produce market is worth a visit not necessarily to buy but rather to experience this hectic vibrant and colourful spectacle the royal compound see how the heir to the throne lives in this tour of the royal compound crown prince alexander ii and his family took up residence in 2001 and open their home from april to october for a 10am or 1 30pm tour on saturdays and sundays so you ll only get this glimpse into royal life if visiting in spring or summer museum of yugoslav history over 200 000 artefacts tell the captivating story of yugoslavia s turbulent past plus admission to tito s grave which is in the grounds of the museum is included in the entry price explore the river banks both the danube and sava rivers offer an abundance of attractions from galleries to sport but not least the floating nightclubs which help cement belgrade s reputation as one of the best places to party on the continent leave the historic old town for the new and take a tram to belgrade s waterfront which is undergoing regeneration and transformation from an underused area to a hub of riverside cafes and restaurants shopping mall park performance venues and promenade as well as hotels offices and a residential complex where to eat from traditional kafanas offering authentic serbian food to a super trendy concept store fusion restaurant whatever your tastes you ll be in foodie heaven in belgrade one restaurant not to miss is the intriguing yes that really is its name thanks to a long ago dispute with the serbian orthodox church somehow the unusual moniker has stuck and is now the unlikely name of belgrade s oldest traditional tavern or kafana soak up the traditional food music and atmosphere in this landmark tavern how to get there named after the physicist and inventor belgrade nikola tesla airport is 18km from the city centre an international airport it served almost 5 million passengers in 2016", "source_text": "Forget Berlin, Paris or Rome; for a city break rich in culture, history, scenery and gastronomy, yet unspoiled by the tourist masses, try Belgrade instead.\n\nThere's an abundance of things to see and do in spring and summer - enough to fill a season without trying. Make the most of your visit with this definitive guide to one of Europe’s most magical yet underrated cities.\n\nWHERE TO START\n\nGet the lay of the land at Belgrade Fortress and Kalemegdan Park, which sit above the point at which the Danube and Sava rivers collide and have a great view, not only of this impressive confluence but also of the city. Explore the fortress, which in its glory defended the city in 115 battles, and has been destroyed and rebuilt over 40 times.\n\nIf you visit in summer and find you want to escape the heat then go underground and explore the network of tunnels that criss-cross the city centre under the fortress. It's like a secret world - hundreds of caves, passageways and bunkers are waiting to be explored, and you can join an organised tour to do so.\n\nTHEN HEAD SOUTH\n\nKneza Mihaila, the main street leading up to the park, is pedestrianised, so it's easy to set off on foot and it’s particularly enjoyable to do so in spring, when the city is in full bloom. Many of Belgrade’s historic sites are within a kilometre radius of here, so there’s plenty to explore. Some of the best include the Main Orthodox Church, Kneginja Ljubica Residence, Ethnographic Museum, Nikola Tesla Museum, and a little further afield, St Sava Temple, which is one of the biggest orthodox churches in the world.\n\nOTHER MUST-SEES\nTrg Republike: Belgrade’s favourite meeting point, the main square is a great spot for people watching and enjoying the atmosphere of the city, particularly in the early evening.\nZeleni Venac (Zelenjak) market: Belgrade’s oldest fresh produce market is worth a visit, not necessarily to buy but rather to experience this hectic, vibrant and colourful spectacle.\nThe Royal Compound: See how the heir to the throne lives in this tour of the royal compound. Crown Prince Alexander II and his family took up residence in 2001, and open their home from April to October for a 10am or 1.30pm tour on Saturdays and Sundays, so you'll only get this glimpse into royal life if visiting in spring or summer.\nMuseum of Yugoslav History: Over 200,000 artefacts tell the captivating story of Yugoslavia’s turbulent past. Plus admission to Tito’s grave, which is in the grounds of the museum, is included in the entry price.\nExplore the river banks: both the Danube and Sava rivers offer an abundance of attractions, from galleries to sport, but not least the floating nightclubs which help cement Belgrade’s reputation as one of the best places to party on the continent.\nLeave the historic Old Town for the new and take a tram to Belgrade’s Waterfront, which is undergoing regeneration and transformation from an underused area to a hub of riverside cafes and restaurants, shopping mall, park, performance venues and promenade, as well as hotels, offices and a residential complex.\nWHERE TO EAT\n\nFrom traditional kafanas offering authentic Serbian food to a super trendy concept store/fusion restaurant, whatever your tastes, you’ll be in foodie heaven in Belgrade.\n\nOne restaurant not to miss is the intriguing ? - yes, that really is its name, thanks to a long-ago dispute with the Serbian Orthodox Church. Somehow the unusual moniker has stuck and is now the unlikely name of Belgrade’s oldest traditional tavern or kafana. Soak up the traditional food, music, and atmosphere in this landmark tavern.\n\nHOW TO GET THERE\n\nNamed after the physicist and inventor, Belgrade Nikola Tesla Airport is 18km from the city centre. An international airport, it served almost 5 million passengers in 2016.", "segmentation_method": "reviewed_source_semantics", "label": "Forget Berlin, Paris or Rome; for a city break rich in culture, history, scenery and gastronomy, yet unspoiled by the tourist masses, try Belgrade instead.", "source_line_range": [ 3, 32 ] } ], "ending": { "text": " 18km from the city centre. An international airport, it served almost 5 million passengers in 2016." } } }, { "id": "article-038", "name": "Browser Use 主页", "url": "https://x.com/browser_use", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "@browser_use" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Browser Use" ] }, { "id": "stable-2", "alternatives": [ "@browser_use" ] }, { "id": "stable-3", "alternatives": [ "Posts" ] }, { "id": "stable-4", "alternatives": [ "Replies" ] }, { "id": "stable-5", "alternatives": [ "Reposts" ] }, { "id": "stable-6", "alternatives": [ "Media" ] }, { "id": "stable-7", "alternatives": [ "Articles" ] }, { "id": "stable-8", "alternatives": [ "Terms" ] }, { "id": "stable-9", "alternatives": [ "Privacy" ] }, { "id": "stable-10", "alternatives": [ "Cookies" ] }, { "id": "stable-11", "alternatives": [ "Accessibility" ] }, { "id": "stable-12", "alternatives": [ "US TIDA" ] }, { "id": "stable-13", "alternatives": [ "Ads Info" ] }, { "id": "profile-1", "alternatives": [ "Agents that use the Browser" ] }, { "id": "profile-2", "alternatives": [ "Science & Technology" ] }, { "id": "profile-3", "alternatives": [ "San Francisco" ] }, { "id": "profile-4", "alternatives": [ "browser-use.com" ] }, { "id": "profile-5", "alternatives": [ "Joined November 2024" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Two independently captured automatic initial loads each displayed 4 qualified records. Require at least 4 distinct owned post links with author and nonempty visible text, permitting attributed quotes for empty outer text. Retain page identity and stable labels. No runtime reference, fixed wording or current membership is required; this is coverage, not full-text completeness or freshness." }, "ground_truth_main_content": "", "source_benchmark": { "mode": "article_post_collection", "post_contract": { "version": 2, "hosts": [ "x.com" ], "entry_path": "/browser_use/status/[0-9]+", "html_record_selector": "article[data-testid=\"tweet\"]", "html_permalink_selector": "a:has(time)", "html_author_selector": "[data-testid=\"User-Name\"] > div:first-child", "html_body_selector": "[data-testid=\"tweetText\"]", "html_quote_selector": "div[role=\"link\"][tabindex=\"0\"]:has([data-testid=\"tweetText\"])", "quote_markers": [ "Quote" ], "minimum_posts": 4, "allow_empty_outer_with_quotes": true, "ignored_labels": [ "bookmark", "bookmarks", "like", "likes", "load more", "log in", "permalink", "read more", "replies", "reply", "report", "repost", "reposts", "share", "show more", "sign in", "today", "view", "views", "yesterday", "今天", "分享", "加载更多", "回复", "展开", "收藏", "昨天", "查看", "查看更多", "注册", "点赞", "登录", "转发" ], "unavailable_notices": [], "non_author_labels": [ "today", "yesterday", "date", "time", "permalink", "view post", "post", "今天", "昨天", "详情", "查看帖子" ] }, "qualification_proof": { "path": "article-reference-inputs-v1/article-038/qualification-posts.json", "sha256": "8fb37c133c8e99197eefc26eea9fda04bc1f6a5043e948e95564e1dd85097199" } } }, { "id": "article-039", "name": "Browser Use 回复页", "url": "https://x.com/browser_use/with_replies", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "@browser_use" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Browser Use" ] }, { "id": "stable-2", "alternatives": [ "@browser_use" ] }, { "id": "stable-3", "alternatives": [ "Agents that use the Browser" ] }, { "id": "stable-4", "alternatives": [ "Science & Technology" ] }, { "id": "stable-5", "alternatives": [ "San Francisco" ] }, { "id": "stable-6", "alternatives": [ "browser-use.com" ] }, { "id": "stable-7", "alternatives": [ "Joined November 2024" ] }, { "id": "stable-8", "alternatives": [ "Following" ] }, { "id": "stable-9", "alternatives": [ "Followers" ] }, { "id": "stable-10", "alternatives": [ "Affiliates" ] }, { "id": "stable-11", "alternatives": [ "Posts" ] }, { "id": "stable-12", "alternatives": [ "Replies" ] }, { "id": "stable-13", "alternatives": [ "Reposts" ] }, { "id": "stable-14", "alternatives": [ "Media" ] }, { "id": "stable-15", "alternatives": [ "Articles" ] }, { "id": "stable-16", "alternatives": [ "Follow" ] }, { "id": "stable-17", "alternatives": [ "Home" ] }, { "id": "stable-18", "alternatives": [ "Explore" ] }, { "id": "stable-19", "alternatives": [ "Notifications" ] }, { "id": "stable-20", "alternatives": [ "Chat" ] }, { "id": "stable-21", "alternatives": [ "Calls" ] }, { "id": "stable-22", "alternatives": [ "Grok" ] }, { "id": "stable-23", "alternatives": [ "History" ] }, { "id": "stable-24", "alternatives": [ "Profile" ] }, { "id": "stable-25", "alternatives": [ "More" ] }, { "id": "stable-26", "alternatives": [ "Post" ] }, { "id": "stable-27", "alternatives": [ "What’s happening" ] }, { "id": "stable-28", "alternatives": [ "Show more" ] }, { "id": "stable-29", "alternatives": [ "Terms" ] }, { "id": "stable-30", "alternatives": [ "Privacy" ] }, { "id": "stable-31", "alternatives": [ "Cookies" ] }, { "id": "stable-32", "alternatives": [ "Accessibility" ] }, { "id": "stable-33", "alternatives": [ "US TIDA" ] }, { "id": "stable-34", "alternatives": [ "Ads Info" ] }, { "id": "stable-35", "alternatives": [ "Search" ], "visible_control": { "selector": "[data-testid=\"SearchBox_Search_Input\"]", "attribute": "placeholder" } } ] }, "rule_review": { "status": "reviewed", "reason": "Two independently captured automatic initial loads each displayed 9 qualified records. Require at least 8 distinct owned post links with author and nonempty visible text, permitting attributed quotes for empty outer text. Retain page identity and stable labels. No runtime reference, fixed wording or current membership is required; this is coverage, not full-text completeness or freshness." }, "ground_truth_main_content": "", "source_benchmark": { "mode": "article_post_collection", "post_contract": { "version": 2, "hosts": [ "x.com" ], "entry_path": "/[^/]+/status/[0-9]+", "html_record_selector": "article[data-testid=\"tweet\"]", "html_permalink_selector": "a:has(time)", "html_author_selector": "[data-testid=\"User-Name\"] > div:first-child", "html_body_selector": "div.r-1iusvr4.r-kzbkwu", "html_quote_selector": "div[role=\"link\"][tabindex=\"0\"]:has([data-testid=\"tweetText\"])", "quote_markers": [ "Quote" ], "minimum_posts": 8, "allow_empty_outer_with_quotes": true, "ignored_labels": [ "bookmark", "bookmarks", "like", "likes", "load more", "log in", "permalink", "read more", "replies", "reply", "report", "repost", "reposts", "share", "show more", "sign in", "today", "view", "views", "yesterday", "今天", "分享", "加载更多", "回复", "展开", "收藏", "昨天", "查看", "查看更多", "注册", "点赞", "登录", "转发" ], "unavailable_notices": [], "non_author_labels": [ "today", "yesterday", "date", "time", "permalink", "view post", "post", "今天", "昨天", "详情", "查看帖子" ] }, "qualification_proof": { "path": "article-reference-inputs-v1/article-039/displayed-scope-r3/qualification-posts.json", "sha256": "5af29463b56c324d5a00b6b72f736e55584c834b17a74d56afe87e110fc92399" } } }, { "id": "article-040", "name": "Browser Use 转发页", "url": "https://x.com/browser_use/reposts", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "@browser_use" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Browser Use" ] }, { "id": "stable-2", "alternatives": [ "@browser_use" ] }, { "id": "stable-3", "alternatives": [ "Agents that use the Browser" ] }, { "id": "stable-4", "alternatives": [ "Science & Technology" ] }, { "id": "stable-5", "alternatives": [ "San Francisco" ] }, { "id": "stable-6", "alternatives": [ "browser-use.com" ] }, { "id": "stable-7", "alternatives": [ "Joined November 2024" ] }, { "id": "stable-8", "alternatives": [ "Following" ] }, { "id": "stable-9", "alternatives": [ "Followers" ] }, { "id": "stable-10", "alternatives": [ "Affiliates" ] }, { "id": "stable-11", "alternatives": [ "Posts" ] }, { "id": "stable-12", "alternatives": [ "Replies" ] }, { "id": "stable-13", "alternatives": [ "Reposts" ] }, { "id": "stable-14", "alternatives": [ "Media" ] }, { "id": "stable-15", "alternatives": [ "Articles" ] }, { "id": "stable-16", "alternatives": [ "Browser Use’s reposts" ] }, { "id": "stable-17", "alternatives": [ "Browser Use reposted" ] }, { "id": "stable-18", "alternatives": [ "Trending now" ] }, { "id": "stable-19", "alternatives": [ "What’s happening" ] }, { "id": "stable-20", "alternatives": [ "Show more" ] }, { "id": "stable-21", "alternatives": [ "Terms" ] }, { "id": "stable-22", "alternatives": [ "Privacy" ] }, { "id": "stable-23", "alternatives": [ "Cookies" ] }, { "id": "stable-24", "alternatives": [ "Accessibility" ] }, { "id": "stable-25", "alternatives": [ "US TIDA" ] }, { "id": "stable-26", "alternatives": [ "Ads Info" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Two independently captured automatic initial loads each displayed 4 qualified records. Require at least 4 distinct owned post links with author and nonempty visible text, permitting attributed quotes for empty outer text. Retain page identity and stable labels. No runtime reference, fixed wording or current membership is required; this is coverage, not full-text completeness or freshness." }, "ground_truth_main_content": "", "source_benchmark": { "mode": "article_post_collection", "post_contract": { "version": 2, "hosts": [ "x.com" ], "entry_path": "/[^/]+/status/[0-9]+", "html_record_selector": "article[data-testid=\"tweet\"]", "html_permalink_selector": "a:has(time)", "html_author_selector": "[data-testid=\"User-Name\"] > div:first-child", "html_body_selector": "[data-testid=\"tweetText\"]", "html_quote_selector": "div[role=\"link\"][tabindex=\"0\"]:has([data-testid=\"tweetText\"])", "quote_markers": [ "Quote" ], "minimum_posts": 4, "allow_empty_outer_with_quotes": true, "ignored_labels": [ "bookmark", "bookmarks", "like", "likes", "load more", "log in", "permalink", "read more", "replies", "reply", "report", "repost", "reposts", "share", "show more", "sign in", "today", "view", "views", "yesterday", "今天", "分享", "加载更多", "回复", "展开", "收藏", "昨天", "查看", "查看更多", "注册", "点赞", "登录", "转发" ], "unavailable_notices": [], "non_author_labels": [ "today", "yesterday", "date", "time", "permalink", "view post", "post", "今天", "昨天", "详情", "查看帖子" ] }, "qualification_proof": { "path": "article-reference-inputs-v1/article-040/qualification-posts-a3.json", "sha256": "65089ad3d7ec16da02a9dcd269b8225c306ffa3a6b67dd185d7e5129555f4f9f" } } }, { "id": "article-041", "name": "Browser Use 媒体页", "url": "https://x.com/browser_use/media", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "@browser_use" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "Browser Use" ] }, { "id": "stable-2", "alternatives": [ "@browser_use" ] }, { "id": "stable-3", "alternatives": [ "Posts" ] }, { "id": "stable-4", "alternatives": [ "Replies" ] }, { "id": "stable-5", "alternatives": [ "Reposts" ] }, { "id": "stable-7", "alternatives": [ "Articles" ] }, { "id": "stable-8", "alternatives": [ "Terms" ] }, { "id": "stable-9", "alternatives": [ "Privacy" ] }, { "id": "stable-10", "alternatives": [ "Cookies" ] }, { "id": "stable-11", "alternatives": [ "Accessibility" ] }, { "id": "stable-12", "alternatives": [ "US TIDA" ] }, { "id": "stable-13", "alternatives": [ "Ads Info" ] }, { "id": "media-tab", "alternatives": [ "Videos" ] }, { "id": "profile-1", "alternatives": [ "Agents that use the Browser" ] }, { "id": "profile-2", "alternatives": [ "Science & Technology" ] }, { "id": "profile-3", "alternatives": [ "San Francisco" ] }, { "id": "profile-4", "alternatives": [ "browser-use.com" ] }, { "id": "profile-5", "alternatives": [ "Joined November 2024" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Two independently captured automatic initial loads each displayed 4 qualified records. Require at least 4 distinct owned post links with author and nonempty visible text, permitting attributed quotes for empty outer text. Retain page identity and stable labels. No runtime reference, fixed wording or current membership is required; this is coverage, not full-text completeness or freshness." }, "ground_truth_main_content": "", "source_benchmark": { "mode": "article_post_collection", "post_contract": { "version": 2, "hosts": [ "x.com" ], "entry_path": "/browser_use/status/[0-9]+", "html_record_selector": "article[data-testid=\"tweet\"]", "html_permalink_selector": "a:has(time)", "html_author_selector": "[data-testid=\"User-Name\"] > div:first-child", "html_body_selector": "[data-testid=\"tweetText\"]", "html_quote_selector": "div[role=\"link\"][tabindex=\"0\"]:has([data-testid=\"tweetText\"])", "quote_markers": [ "Quote" ], "minimum_posts": 4, "allow_empty_outer_with_quotes": true, "ignored_labels": [ "bookmark", "bookmarks", "like", "likes", "load more", "log in", "permalink", "read more", "replies", "reply", "report", "repost", "reposts", "share", "show more", "sign in", "today", "view", "views", "yesterday", "今天", "分享", "加载更多", "回复", "展开", "收藏", "昨天", "查看", "查看更多", "注册", "点赞", "登录", "转发" ], "unavailable_notices": [], "non_author_labels": [ "today", "yesterday", "date", "time", "permalink", "view post", "post", "今天", "昨天", "详情", "查看帖子" ] }, "qualification_proof": { "path": "article-reference-inputs-v1/article-041/qualification-posts.json", "sha256": "ee7bbd86aec02e301418c4a677040e3ab86ec24cbefdf7fe69b4fd93b9109d36" } } }, { "id": "article-044", "name": "入行二十年,有知有畏,但求称职", "url": "https://www.xueqiu.com/2245748859/383327076", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "入行二十年" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "就叫姜诚" ] }, { "id": "stable-2", "alternatives": [ "2026-04-10 11:20" ] }, { "id": "stable-3", "alternatives": [ "首页" ] }, { "id": "stable-4", "alternatives": [ "下载App" ] }, { "id": "stable-5", "alternatives": [ "风险提示:用户发表的所有文章仅代表个人观点,与雪球的立场无关。投资决策需建立在独立思考之上。" ] }, { "id": "stable-6", "alternatives": [ "讨论" ] }, { "id": "stable-7", "alternatives": [ "投诉" ] }, { "id": "stable-8", "alternatives": [ "仅在正文下讨论" ] }, { "id": "stable-9", "alternatives": [ "发布" ] }, { "id": "stable-10", "alternatives": [ "全部讨论" ] }, { "id": "stable-11", "alternatives": [ "最热" ] }, { "id": "stable-12", "alternatives": [ "最新" ] }, { "id": "stable-13", "alternatives": [ "最早" ] }, { "id": "stable-14", "alternatives": [ "热门话题" ] }, { "id": "stable-15", "alternatives": [ "热股榜" ] }, { "id": "stable-16", "alternatives": [ "更多" ] }, { "id": "stable-17", "alternatives": [ "全球" ] }, { "id": "stable-18", "alternatives": [ "沪深" ] }, { "id": "stable-19", "alternatives": [ "港股" ] }, { "id": "stable-20", "alternatives": [ "美股" ] }, { "id": "stable-21", "alternatives": [ "1小时内最热" ] }, { "id": "stable-22", "alternatives": [ "24小时内最热" ] }, { "id": "stable-23", "alternatives": [ "涨跌幅榜" ] }, { "id": "stable-24", "alternatives": [ "涨幅榜" ] }, { "id": "stable-25", "alternatives": [ "跌幅榜" ] }, { "id": "stable-26", "alternatives": [ "热门基金" ] }, { "id": "stable-27", "alternatives": [ "年化(近5年)" ] }, { "id": "stable-28", "alternatives": [ "常见问题" ] }, { "id": "stable-29", "alternatives": [ "关于雪球" ] }, { "id": "stable-30", "alternatives": [ "投资者教育" ] }, { "id": "stable-31", "alternatives": [ "风险提示" ] }, { "id": "stable-32", "alternatives": [ "XUEQIU.COM" ] }, { "id": "stable-33", "alternatives": [ "北京雪球信息科技有限公司" ] }, { "id": "stable-34", "alternatives": [ "京公网安备 11010502040379号" ] }, { "id": "stable-35", "alternatives": [ "京ICP证100666号" ] }, { "id": "stable-36", "alternatives": [ "京ICP备10040543" ] }, { "id": "stable-37", "alternatives": [ "京金信备〔2022〕3号" ] }, { "id": "stable-38", "alternatives": [ "营业执照" ] }, { "id": "stable-39", "alternatives": [ "侵权投诉指引" ] }, { "id": "stable-40", "alternatives": [ "出版物经营许可证" ] }, { "id": "body-disclaimer", "alternatives": [ "以上内容仅代表个人观点,不作为投资建议,请大家理性。", "以上内容仅代表个人观点\n,\n不作为投资建议\n,\n请大家理性\n。" ] }, { "id": "body-final-link", "alternatives": [ "$中泰兴诚价值一年持有混合A(F010728)$" ] }, { "id": "visible-search", "alternatives": [ "搜索" ], "visible_control": { "selector": "nav .nav__search input[name=\"q\"]", "attribute": "placeholder" } } ] }, "rule_review": { "status": "reviewed", "reason": "User approved exact replacementURL in cohortrevision2. Independent root direct initial DOM/AX/screenshot establish complete standalone .article__bd; all ordinary paragraphs, original authored ending/disclaimer and owned links retained. One source-hidden attribution paragraph and image-only lettering are excluded. Article and ancestors visible/unclipped; bottomright nonmodal login promotion does not overlap article. No clicks, expansion, input, login or scrolling performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "入行二十年 , 有知有畏 , 但求称职" ], "html_selector": "h1.article__bd__title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": ".comment__item, .comment__item__reply > .items", "author_selector": ".comment__item__main__hd > a.user-name, :scope > a.user-name:first-of-type", "body_selector": ".comment__item__main > p, :scope > .content", "id_attribute": "data-id", "section_markers": [ "全部讨论", "评论" ], "version": 2, "minimum_comments": 24, "text_scope": { "body_end": "。\n\n以上内容仅代表个人观点,不作为投资建议,请大家理性。\n\n@今日话题 @中泰证券资管\n\n#价值投资# $中泰星元灵活配置混合A(F006567)$ $中泰兴诚价值一年持有混合A(F010728)$", "end_markers": [ "热门话题", "热股榜" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-044/comment-qualification-reference-r5.json", "sha256": "4661fd39b34b96a0d13a85f9590f07adb8c8de71d2b0793e7ffe27adbb1614d7", "chars": 6592, "record_count": 29 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 29, "qualification_only": true } }, "ground_truth_main_content": "入行二十年,有知有畏,但求称职\n\n岁月如梭,转眼入行已二十年,同事提醒我该好好回(反)顾(思)一下这一路走来的得与失了。其实反思不必等二十年才做一次,是随时随地进行的,借此机会汇报给大家。\n\n我自认为在投资上没有突出的天赋,优秀的同行太多,他们对宏观经济、中观产业和微观个股的洞见往往让我自叹弗如,叹为观止。但我也有股轴劲儿,不羞于下笨功夫,又赶上了好时代,碰到了好运气,作为基金经理,迄今还算交出了一份合格的答卷。\n\n的确,投资这个行当的最大红利就是你可以不必特别聪明,或者非要比别人聪明。在能力范围内做力所能及的事儿,就大概率不会差。孟岩老师说得精辟:“可能只有在投资领域,智力、体能、技术、经验、资源才不是最重要的,看起来虚无缥缈的个性、环境与行为,反而是影响成败的根本性因素。”\n\n二十年中,剔除看几眼报表就淘汰的标的,我大约研究过几百只股票,涉及了二十多个行业,买过的股票大约一百只。经历提升认知,给认知加杠杆的是读书。二十年读过一千多本书后,我懂的更多了,不懂的也更多了。\n\n没错,投资就是这么吊诡,它不会因你懂的少而更难,也不会因你懂的多而简单。\n\n回想入行不久时,得出判断和做出决策往往是自信和坦然的,现在反而更迟疑和忐忑。大概是掉的坑多了,看别人掉的坑也多了,对投资也就更敬畏了。现在的组合中,股票数量不到二十只,还免不了常常提心吊胆,生怕它变脸而我看走眼。往好了说,这叫更成熟、更谨慎、更有自知之明了;往坏了说,投资这本大书,我还在越读越厚的过程中,能力圈不够大,境界还差得远。能力的平台期,往往始于业绩好时的自我满足,需要自省,然后自发地突破。\n\n但书不白读,坑不白掉,钱也不会白亏。随着“投资年纪”的变老,我发现股市相比于我却越来越年轻了。回到2006年初,那时A股的中位数“年纪”(上市时间)大约是8.1年;二十年后的2026年初,中位数年纪只微微涨到了9.2年,78%的股票上市短于20年。也就是说,近八成的股票上市年龄小于我的工龄,多数股票比我“年轻”。\n\n对运动员来说,工龄是减分项,对程序员或许也如此,对基金经理则一定不是如此。阅历是财富,让人沉稳,沉稳对投资是好事儿。当市场上多数的上涨逻辑你已见怪不怪,就不会轻易盲从。就好比你读过太多版本的伤仲永,就不会轻易相信奇才或神童。股市永远不缺“神童”,但不妨等它再发育发育,观察期长一点。\n\n所以,虽然每一个投资决策依然让我犹疑,却不致于忧郁,错过牛股也不特别惋惜。因为人只能赚认知之内的钱,也会亏认知之外的钱。虽然我曾经历无知无畏的洒脱,但我更喜欢现在的有知有畏,毕竟在投资所需的技能清单中,并不包括勇气。\n\n除投资之外,我还有一项重大收获,甚至比投资技能的提升更重要。这要感谢我亲爱的持有人们,在你们的陪伴下,我对资产管理行业的理解更深刻了,对基金经理的职责也更明确了。\n\n走上价值投资这条路之初,我的目标是用自己的职业生涯去实践它,以公募基金这种没有deadline的产品为载体,拿漂亮的长期净值曲线来证明自己。应该说,那时的目标是简单的,但并不纯粹。基金经理的第一目标应该是履行好岗位职责,而非满足个人的英雄情结;基金经理的岗位职责是为持有人获得合适的回报,而非画一条打上个人标签的净值曲线。\n\n财富管理是一项值得奋斗的事业,也是发展空间巨大的事业。它的价值链不短,它要解决的主要矛盾是信息不对称。现在我认为,客户对财富管理的需求是个性化的,所以没有最好的产品,只有相对匹配的产品。就好比萝卜青菜各有所爱,资产管理侧的基金经理是种菜的,财富管理端的渠道和投顾是炒菜的厨师和上菜的服务员,持有人是点菜的,在顾客不知点什么菜时,服务员可以根据对顾客的了解推荐菜。\n\n说萝卜比青菜好吃是不对的,反之亦然。基金经理的职责是努力种好自己擅长种的菜,主动推广自己种的菜,一定不能是自己明明种了萝卜、却骗人说是冬瓜,哪怕冬瓜再好卖。种好自己的菜,打破而非利用信息不对称,就是基金经理的职责。这个职责完成得好,顾客大概率会满意。感谢持有人的宽容,感谢渠道伙伴的助力,也感谢我自己的不说谎,在过去七年中,我们共同成就了33亿的回报。\n\n二十年投研生涯给了我太多,九年的公募基金经理生涯给了我更多,包括但不限于知识、阅历、声誉、收入,我也因这段经历成为了一个更“好”的人。但一个人的价值不取决于ta得到的,而取决于ta创造的。芒格说得简洁至极,要得到一样东西的最好办法是努力让自己配得上它。所以我得继续努力,让我创造的配得上我得到的。\n\n按当前的退休政策,我已经走过了就业年限的一半,但后面的路还很长。我希望能在工作中持续进步,不断收获,每天能像跳着踢踏舞一样去上班。我也希望有一天能把投资这本大书读薄,决策时少一些犹疑,多一些坚定,像巴菲特那样简单过目后就可以对一只股票云淡风轻地说:成了,就是它。但有一个愿望值得这两个愿望加起来去交换,那就是在我的基金经理生涯结束时,从持有人那得到的评价是——称职。\n\n以上内容仅代表个人观点,不作为投资建议,请大家理性。\n\n@今日话题 @中泰证券资管\n\n#价值投资# $中泰星元灵活配置混合A(F006567)$ $中泰兴诚价值一年持有混合A(F010728)$", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "入 行 二 十 年 有 知 有 畏 但 求 称 职 岁 月 如 梭 转 眼 入 行 已 二 十 年 同 事 提 醒 我 该 好 好 回 反 顾 思 一 下 这 一 路 走 来 的 得 与 失 了 其 实 反 思 不 必 等 二 十 年 才 做 一 次 是 随 时 随 地 进 行 的 借 此 机 会 汇 报 给 大 家 我 自 认 为 在 投 资 上 没 有 突 出 的 天 赋 优 秀 的 同 行 太 多 他 们 对 宏 观 经 济 中 观 产 业 和 微 观 个 股 的 洞 见 往 往 让 我 自 叹 弗 如 叹 为 观 止 但 我 也 有 股 轴 劲 儿 不 羞 于 下 笨 功 夫 又 赶 上 了 好 时 代 碰 到 了 好 运 气 作 为 基 金 经 理 迄 今 还 算 交 出 了 一 份 合 格 的 答 卷 的 确 投 资 这 个 行 当 的 最 大 红 利 就 是 你 可 以 不 必 特 别 聪 明 或 者 非 要 比 别 人 聪 明 在 能 力 范 围 内 做 力 所 能 及 的 事 儿 就 大 概 率 不 会 差 孟 岩 老 师 说 得 精 辟 可 能 只 有 在 投 资 领 域 智 力 体 能 技 术 经 验 资 源 才 不 是 最 重 要 的 看 起 来 虚 无 缥 缈 的 个 性 环 境 与 行 为 反 而 是 影 响 成 败 的 根 本 性 因 素 二 十 年 中 剔 除 看 几 眼 报 表 就 淘 汰 的 标 的 我 大 约 研 究 过 几 百 只 股 票 涉 及 了 二 十 多 个 行 业 买 过 的 股 票 大 约 一 百 只 经 历 提 升 认 知 给 认 知 加 杠 杆 的 是 读 书 二 十 年 读 过 一 千 多 本 书 后 我 懂 的 更 多 了 不 懂 的 也 更 多 了", "source_text": "入行二十年,有知有畏,但求称职\n\n岁月如梭,转眼入行已二十年,同事提醒我该好好回(反)顾(思)一下这一路走来的得与失了。其实反思不必等二十年才做一次,是随时随地进行的,借此机会汇报给大家。\n\n我自认为在投资上没有突出的天赋,优秀的同行太多,他们对宏观经济、中观产业和微观个股的洞见往往让我自叹弗如,叹为观止。但我也有股轴劲儿,不羞于下笨功夫,又赶上了好时代,碰到了好运气,作为基金经理,迄今还算交出了一份合格的答卷。\n\n的确,投资这个行当的最大红利就是你可以不必特别聪明,或者非要比别人聪明。在能力范围内做力所能及的事儿,就大概率不会差。孟岩老师说得精辟:“可能只有在投资领域,智力、体能、技术、经验、资源才不是最重要的,看起来虚无缥缈的个性、环境与行为,反而是影响成败的根本性因素。”\n\n二十年中,剔除看几眼报表就淘汰的标的,我大约研究过几百只股票,涉及了二十多个行业,买过的股票大约一百只。经历提升认知,给认知加杠杆的是读书。二十年读过一千多本书后,我懂的更多了,不懂的也更多了。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:入行二十年,有知有畏,但求称职 — 段落/内容单元:二十年中,剔除看几眼报表就淘汰的标的,我大约研究过几百只股票,涉及了二十多个行业,买过的股票大约一百只。经历提升认知,给", "source_line_range": [ 1, 10 ] }, { "id": "body-region-2", "text": "没 错 投 资 就 是 这 么 吊 诡 它 不 会 因 你 懂 的 少 而 更 难 也 不 会 因 你 懂 的 多 而 简 单 回 想 入 行 不 久 时 得 出 判 断 和 做 出 决 策 往 往 是 自 信 和 坦 然 的 现 在 反 而 更 迟 疑 和 忐 忑 大 概 是 掉 的 坑 多 了 看 别 人 掉 的 坑 也 多 了 对 投 资 也 就 更 敬 畏 了 现 在 的 组 合 中 股 票 数 量 不 到 二 十 只 还 免 不 了 常 常 提 心 吊 胆 生 怕 它 变 脸 而 我 看 走 眼 往 好 了 说 这 叫 更 成 熟 更 谨 慎 更 有 自 知 之 明 了 往 坏 了 说 投 资 这 本 大 书 我 还 在 越 读 越 厚 的 过 程 中 能 力 圈 不 够 大 境 界 还 差 得 远 能 力 的 平 台 期 往 往 始 于 业 绩 好 时 的 自 我 满 足 需 要 自 省 然 后 自 发 地 突 破 但 书 不 白 读 坑 不 白 掉 钱 也 不 会 白 亏 随 着 投 资 年 纪 的 变 老 我 发 现 股 市 相 比 于 我 却 越 来 越 年 轻 了 回 到 2006 年 初 那 时 a 股 的 中 位 数 年 纪 上 市 时 间 大 约 是 8 1 年 二 十 年 后 的 2026 年 初 中 位 数 年 纪 只 微 微 涨 到 了 9 2 年 78 的 股 票 上 市 短 于 20 年 也 就 是 说 近 八 成 的 股 票 上 市 年 龄 小 于 我 的 工 龄 多 数 股 票 比 我 年 轻", "source_text": "没错,投资就是这么吊诡,它不会因你懂的少而更难,也不会因你懂的多而简单。\n\n回想入行不久时,得出判断和做出决策往往是自信和坦然的,现在反而更迟疑和忐忑。大概是掉的坑多了,看别人掉的坑也多了,对投资也就更敬畏了。现在的组合中,股票数量不到二十只,还免不了常常提心吊胆,生怕它变脸而我看走眼。往好了说,这叫更成熟、更谨慎、更有自知之明了;往坏了说,投资这本大书,我还在越读越厚的过程中,能力圈不够大,境界还差得远。能力的平台期,往往始于业绩好时的自我满足,需要自省,然后自发地突破。\n\n但书不白读,坑不白掉,钱也不会白亏。随着“投资年纪”的变老,我发现股市相比于我却越来越年轻了。回到2006年初,那时A股的中位数“年纪”(上市时间)大约是8.1年;二十年后的2026年初,中位数年纪只微微涨到了9.2年,78%的股票上市短于20年。也就是说,近八成的股票上市年龄小于我的工龄,多数股票比我“年轻”。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:没错,投资就是这么吊诡,它不会因你懂的少而更难,也不会因你懂的多而简单。 — 段落/内容单元:但书不白读,坑不白掉,钱也不会白亏。随着“投资年纪”的变老,我发现股市相比于我却越来越年轻了。回到2006年初,那时A股", "source_line_range": [ 11, 16 ] }, { "id": "body-region-3", "text": "对 运 动 员 来 说 工 龄 是 减 分 项 对 程 序 员 或 许 也 如 此 对 基 金 经 理 则 一 定 不 是 如 此 阅 历 是 财 富 让 人 沉 稳 沉 稳 对 投 资 是 好 事 儿 当 市 场 上 多 数 的 上 涨 逻 辑 你 已 见 怪 不 怪 就 不 会 轻 易 盲 从 就 好 比 你 读 过 太 多 版 本 的 伤 仲 永 就 不 会 轻 易 相 信 奇 才 或 神 童 股 市 永 远 不 缺 神 童 但 不 妨 等 它 再 发 育 发 育 观 察 期 长 一 点 所 以 虽 然 每 一 个 投 资 决 策 依 然 让 我 犹 疑 却 不 致 于 忧 郁 错 过 牛 股 也 不 特 别 惋 惜 因 为 人 只 能 赚 认 知 之 内 的 钱 也 会 亏 认 知 之 外 的 钱 虽 然 我 曾 经 历 无 知 无 畏 的 洒 脱 但 我 更 喜 欢 现 在 的 有 知 有 畏 毕 竟 在 投 资 所 需 的 技 能 清 单 中 并 不 包 括 勇 气 除 投 资 之 外 我 还 有 一 项 重 大 收 获 甚 至 比 投 资 技 能 的 提 升 更 重 要 这 要 感 谢 我 亲 爱 的 持 有 人 们 在 你 们 的 陪 伴 下 我 对 资 产 管 理 行 业 的 理 解 更 深 刻 了 对 基 金 经 理 的 职 责 也 更 明 确 了 走 上 价 值 投 资 这 条 路 之 初 我 的 目 标 是 用 自 己 的 职 业 生 涯 去 实 践 它 以 公 募 基 金 这 种 没 有 deadline 的 产 品 为 载 体 拿 漂 亮 的 长 期 净 值 曲 线 来 证 明 自 己 应 该 说 那 时 的 目 标 是 简 单 的 但 并 不 纯 粹 基 金 经 理 的 第 一 目 标 应 该 是 履 行 好 岗 位 职 责 而 非 满 足 个 人 的 英 雄 情 结 基 金 经 理 的 岗 位 职 责 是 为 持 有 人 获 得 合 适 的 回 报 而 非 画 一 条 打 上 个 人 标 签 的 净 值 曲 线", "source_text": "对运动员来说,工龄是减分项,对程序员或许也如此,对基金经理则一定不是如此。阅历是财富,让人沉稳,沉稳对投资是好事儿。当市场上多数的上涨逻辑你已见怪不怪,就不会轻易盲从。就好比你读过太多版本的伤仲永,就不会轻易相信奇才或神童。股市永远不缺“神童”,但不妨等它再发育发育,观察期长一点。\n\n所以,虽然每一个投资决策依然让我犹疑,却不致于忧郁,错过牛股也不特别惋惜。因为人只能赚认知之内的钱,也会亏认知之外的钱。虽然我曾经历无知无畏的洒脱,但我更喜欢现在的有知有畏,毕竟在投资所需的技能清单中,并不包括勇气。\n\n除投资之外,我还有一项重大收获,甚至比投资技能的提升更重要。这要感谢我亲爱的持有人们,在你们的陪伴下,我对资产管理行业的理解更深刻了,对基金经理的职责也更明确了。\n\n走上价值投资这条路之初,我的目标是用自己的职业生涯去实践它,以公募基金这种没有deadline的产品为载体,拿漂亮的长期净值曲线来证明自己。应该说,那时的目标是简单的,但并不纯粹。基金经理的第一目标应该是履行好岗位职责,而非满足个人的英雄情结;基金经理的岗位职责是为持有人获得合适的回报,而非画一条打上个人标签的净值曲线。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:对运动员来说,工龄是减分项,对程序员或许也如此,对基金经理则一定不是如此。阅历是财富,让人沉稳,沉稳对投资是好事儿。当市 — 段落/内容单元:走上价值投资这条路之初,我的目标是用自己的职业生涯去实践它,以公募基金这种没有deadline的产品为载体,拿漂亮的长期", "source_line_range": [ 17, 24 ] }, { "id": "body-region-4", "text": "财 富 管 理 是 一 项 值 得 奋 斗 的 事 业 也 是 发 展 空 间 巨 大 的 事 业 它 的 价 值 链 不 短 它 要 解 决 的 主 要 矛 盾 是 信 息 不 对 称 现 在 我 认 为 客 户 对 财 富 管 理 的 需 求 是 个 性 化 的 所 以 没 有 最 好 的 产 品 只 有 相 对 匹 配 的 产 品 就 好 比 萝 卜 青 菜 各 有 所 爱 资 产 管 理 侧 的 基 金 经 理 是 种 菜 的 财 富 管 理 端 的 渠 道 和 投 顾 是 炒 菜 的 厨 师 和 上 菜 的 服 务 员 持 有 人 是 点 菜 的 在 顾 客 不 知 点 什 么 菜 时 服 务 员 可 以 根 据 对 顾 客 的 了 解 推 荐 菜 说 萝 卜 比 青 菜 好 吃 是 不 对 的 反 之 亦 然 基 金 经 理 的 职 责 是 努 力 种 好 自 己 擅 长 种 的 菜 主 动 推 广 自 己 种 的 菜 一 定 不 能 是 自 己 明 明 种 了 萝 卜 却 骗 人 说 是 冬 瓜 哪 怕 冬 瓜 再 好 卖 种 好 自 己 的 菜 打 破 而 非 利 用 信 息 不 对 称 就 是 基 金 经 理 的 职 责 这 个 职 责 完 成 得 好 顾 客 大 概 率 会 满 意 感 谢 持 有 人 的 宽 容 感 谢 渠 道 伙 伴 的 助 力 也 感 谢 我 自 己 的 不 说 谎 在 过 去 七 年 中 我 们 共 同 成 就 了 33 亿 的 回 报", "source_text": "财富管理是一项值得奋斗的事业,也是发展空间巨大的事业。它的价值链不短,它要解决的主要矛盾是信息不对称。现在我认为,客户对财富管理的需求是个性化的,所以没有最好的产品,只有相对匹配的产品。就好比萝卜青菜各有所爱,资产管理侧的基金经理是种菜的,财富管理端的渠道和投顾是炒菜的厨师和上菜的服务员,持有人是点菜的,在顾客不知点什么菜时,服务员可以根据对顾客的了解推荐菜。\n\n说萝卜比青菜好吃是不对的,反之亦然。基金经理的职责是努力种好自己擅长种的菜,主动推广自己种的菜,一定不能是自己明明种了萝卜、却骗人说是冬瓜,哪怕冬瓜再好卖。种好自己的菜,打破而非利用信息不对称,就是基金经理的职责。这个职责完成得好,顾客大概率会满意。感谢持有人的宽容,感谢渠道伙伴的助力,也感谢我自己的不说谎,在过去七年中,我们共同成就了33亿的回报。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:财富管理是一项值得奋斗的事业,也是发展空间巨大的事业。它的价值链不短,它要解决的主要矛盾是信息不对称。现在我认为,客户对 — 段落/内容单元:说萝卜比青菜好吃是不对的,反之亦然。基金经理的职责是努力种好自己擅长种的菜,主动推广自己种的菜,一定不能是自己明明种了萝", "source_line_range": [ 25, 28 ] }, { "id": "body-region-5", "text": "二 十 年 投 研 生 涯 给 了 我 太 多 九 年 的 公 募 基 金 经 理 生 涯 给 了 我 更 多 包 括 但 不 限 于 知 识 阅 历 声 誉 收 入 我 也 因 这 段 经 历 成 为 了 一 个 更 好 的 人 但 一 个 人 的 价 值 不 取 决 于 ta 得 到 的 而 取 决 于 ta 创 造 的 芒 格 说 得 简 洁 至 极 要 得 到 一 样 东 西 的 最 好 办 法 是 努 力 让 自 己 配 得 上 它 所 以 我 得 继 续 努 力 让 我 创 造 的 配 得 上 我 得 到 的 按 当 前 的 退 休 政 策 我 已 经 走 过 了 就 业 年 限 的 一 半 但 后 面 的 路 还 很 长 我 希 望 能 在 工 作 中 持 续 进 步 不 断 收 获 每 天 能 像 跳 着 踢 踏 舞 一 样 去 上 班 我 也 希 望 有 一 天 能 把 投 资 这 本 大 书 读 薄 决 策 时 少 一 些 犹 疑 多 一 些 坚 定 像 巴 菲 特 那 样 简 单 过 目 后 就 可 以 对 一 只 股 票 云 淡 风 轻 地 说 成 了 就 是 它 但 有 一 个 愿 望 值 得 这 两 个 愿 望 加 起 来 去 交 换 那 就 是 在 我 的 基 金 经 理 生 涯 结 束 时 从 持 有 人 那 得 到 的 评 价 是 称 职 以 上 内 容 仅 代 表 个 人 观 点 不 作 为 投 资 建 议 请 大 家 理 性 今 日 话 题 中 泰 证 券 资 管 价 值 投 资 中 泰 星 元 灵 活 配 置 混 合 a f006567 中 泰 兴 诚 价 值 一 年 持 有 混 合 a f010728", "source_text": "二十年投研生涯给了我太多,九年的公募基金经理生涯给了我更多,包括但不限于知识、阅历、声誉、收入,我也因这段经历成为了一个更“好”的人。但一个人的价值不取决于ta得到的,而取决于ta创造的。芒格说得简洁至极,要得到一样东西的最好办法是努力让自己配得上它。所以我得继续努力,让我创造的配得上我得到的。\n\n按当前的退休政策,我已经走过了就业年限的一半,但后面的路还很长。我希望能在工作中持续进步,不断收获,每天能像跳着踢踏舞一样去上班。我也希望有一天能把投资这本大书读薄,决策时少一些犹疑,多一些坚定,像巴菲特那样简单过目后就可以对一只股票云淡风轻地说:成了,就是它。但有一个愿望值得这两个愿望加起来去交换,那就是在我的基金经理生涯结束时,从持有人那得到的评价是——称职。\n\n以上内容仅代表个人观点,不作为投资建议,请大家理性。\n\n@今日话题 @中泰证券资管\n\n#价值投资# $中泰星元灵活配置混合A(F006567)$ $中泰兴诚价值一年持有混合A(F010728)$", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:二十年投研生涯给了我太多,九年的公募基金经理生涯给了我更多,包括但不限于知识、阅历、声誉、收入,我也因这段经历成为了一个 — 段落/内容单元:#价值投资# $中泰星元灵活配置混合A(F006567)$ $中泰兴诚价值一年持有混合A(F010728)$", "source_line_range": [ 29, 37 ] } ], "ending": { "text": "。\n\n以上内容仅代表个人观点,不作为投资建议,请大家理性。\n\n@今日话题 @中泰证券资管\n\n#价值投资# $中泰星元灵活配置混合A(F006567)$ $中泰兴诚价值一年持有混合A(F010728)$" } } }, { "id": "article-045", "name": "大模型基础应用框架创新及零售业务落地", "url": "https://www.infoq.cn/article/bixpxztgivpmgwwkli77", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "大模型基础应用框架 \\(ReACT\\\\SFT\\\\RAG\\) 创新及零售业务落地" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "京东零售技术" ] }, { "id": "stable-3", "alternatives": [ "首页" ] }, { "id": "stable-4", "alternatives": [ "AI会议" ] }, { "id": "stable-5", "alternatives": [ "AI课程" ] }, { "id": "stable-6", "alternatives": [ "AI应用" ] }, { "id": "stable-7", "alternatives": [ "报告" ] }, { "id": "stable-8", "alternatives": [ "HarmonyOS" ] }, { "id": "stable-9", "alternatives": [ "Snowflake" ] }, { "id": "stable-10", "alternatives": [ "更多" ] }, { "id": "stable-11", "alternatives": [ "写点什么" ] }, { "id": "stable-12", "alternatives": [ "登录" ] }, { "id": "stable-13", "alternatives": [ "企业动态" ] }, { "id": "stable-14", "alternatives": [ "行业深度" ] }, { "id": "stable-15", "alternatives": [ "AI&大模型" ] }, { "id": "stable-16", "alternatives": [ "出海" ] }, { "id": "stable-17", "alternatives": [ "后端" ] }, { "id": "stable-18", "alternatives": [ "芯片&算力" ] }, { "id": "stable-19", "alternatives": [ "架构" ] }, { "id": "stable-20", "alternatives": [ "大数据" ] }, { "id": "stable-21", "alternatives": [ "软件工程" ] }, { "id": "stable-22", "alternatives": [ "云计算" ] }, { "id": "stable-23", "alternatives": [ "大前端" ] }, { "id": "stable-24", "alternatives": [ "管理/文化" ] }, { "id": "stable-26", "alternatives": [ "轻点一下,留下你的鼓励" ] }, { "id": "stable-27", "alternatives": [ "评论" ] }, { "id": "stable-28", "alternatives": [ "发布" ] }, { "id": "stable-29", "alternatives": [ "延伸阅读——来自 InfoQ 精选" ] }, { "id": "stable-30", "alternatives": [ "换一换" ] }, { "id": "stable-31", "alternatives": [ "查看更多" ] }, { "id": "stable-32", "alternatives": [ "推荐阅读" ] }, { "id": "stable-33", "alternatives": [ "电子书" ] }, { "id": "stable-34", "alternatives": [ "大厂实战PPT下载" ] }, { "id": "stable-35", "alternatives": [ "立即下载" ] }, { "id": "stable-36", "alternatives": [ "促进软件开发及相关领域知识与创新的传播" ] }, { "id": "stable-37", "alternatives": [ "关于我们" ] }, { "id": "stable-38", "alternatives": [ "我要投稿" ] }, { "id": "stable-39", "alternatives": [ "合作伙伴" ] }, { "id": "stable-40", "alternatives": [ "加入我们" ] }, { "id": "stable-41", "alternatives": [ "关注我们" ] }, { "id": "stable-42", "alternatives": [ "联系我们" ] }, { "id": "stable-43", "alternatives": [ "内容投稿" ] }, { "id": "stable-44", "alternatives": [ "业务合作" ] }, { "id": "stable-45", "alternatives": [ "反馈投诉" ] }, { "id": "stable-46", "alternatives": [ "联系电话" ] }, { "id": "stable-47", "alternatives": [ "地址" ] }, { "id": "stable-48", "alternatives": [ "InfoQ 近期会议" ] }, { "id": "stable-49", "alternatives": [ "全球 InfoQ" ] }, { "id": "stable-50", "alternatives": [ "InfoQ En" ] }, { "id": "stable-51", "alternatives": [ "InfoQ Jp" ] }, { "id": "stable-52", "alternatives": [ "InfoQ Fr" ] }, { "id": "stable-53", "alternatives": [ "InfoQ Br" ] }, { "id": "stable-54", "alternatives": [ "产品资质" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "大模型基础应用框架 (ReACT\\SFT\\RAG) 创新及零售业务落地" ], "html_selector": "h1.article-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-045/comment-qualification-reference-r5.json", "sha256": "27428c9180277715c8786eee330265d4838049cff86dd537dd616c305edfdc9c", "chars": 779, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "一、前言\n\n\n\n\n2023 年,大语言模型以前所未有的速度和能力改变我们对智能系统的认知,成为技术圈最被热议的话题。但“百模大战”终将走向“落地为王”,如何将大语言模型的强大能力融入实际业务、产生业务价值成为致胜关键。\n\n\n\n\n在零售场,大模型应用面临的核心挑战包括以下三点:\n\n\n\n\n(1)模型缺乏零售领域的专业知识,建设业务专属大模型训练成本高\n\n(2)模型内容生产伴有幻觉,而检索海量业务信息又缺乏有效技术,检索成本高\n\n(3)在商家问答等多流程复杂业务场景下,模型缺乏自主规划能力,需要大量人工干预\n\n\n\n\n为了应对上述三点挑战,九数算法中台推出了一整套大语言模型应用解决方案,一种融合基于 ReAct 框架的 AI Agent、SFT(指令微调)与 RAG(检索增强生成)技术的应用框架,不仅赋予大模型学习领域知识的能力,还显著提升了模型的自主决策和信息处理精确度,为业务人员高效落地大模型的微调、部署和应用提供了落地保障。\n\n\n\n\n九数算法中台大模型基础应用框架\n\n二、高效微调(SFT)\n\n\n\n\n通用大模型虽然在处理通用知识方面表现出色,但缺乏针对零售垂直领域的知识理解。为此,需要引入经过人工标注的领域数据,对已完成预训练的通用大模型进行微调,从而得到具有该领域知识的零售垂域大模型。这个过程就是“有监督微调(Supervised Fine-Tuning)”,简称 SFT。\n\n【2.1 SFT 流程介绍】\n\n\n\n\nSFT 的流程包括数据生产、模型选型、模型微调、效果验证几个环节,每一步都存在相应的技术挑战:\n\n\n\n\n(1)数据生产:创建用于微调预训练模型的高质量数据集,数据集质量对模型训练的效果至关重要。在零售场,京东沉淀了丰富的领域数据,比如电商营销策略、消费者行为数据、商品信息数据等,这些数据往往格式不统一、噪声多,如何以这些业务数据为基础,高效构建可用于微调训练的数据集,是数据生产环节的痛点。\n\n\n\n\n(2)模型选型:根据对中文的支持程度、参数量级、性能等选择合适的预训练模型作为微调的起点。高速发展的开源社区为业务方提供了大量可供选择的预训练模型,但不同模型擅长不同任务,需要实验对比模型表现。而开源模型存在样本标注、模型标准不统一的问题,将开源方案应用在企业环境中也需要一定的适配工作量,给业务方带来了较高的模型选型成本。\n\n\n\n\n(3)模型微调:使用准备好的数据集对选定的预训练模型进行微调。训练时需要设置适当的学习率、批次大小和训练周期等参数,同时监控模型的性能,如损失函数和准确率等指标。在算力资源紧缺的背景下,不少业务方面临算力资源不足的问题,如何用最小的算力资源实现最优的模型训练性能至关重要。\n\n\n\n\n(4)效果验证:使用独立的验证数据集对模型进行测试,评估模型训练效果。关键是建立系统的模型评估指标,并选择合适的方法高效进行效果评估。\n\n\n\n\nSFT 流程介绍\n\n【2.2 九数算法中台 SFT 框架的优势】\n\n\n\n\n九数算法中台通过自研的 SFT 高效微调框架,从高质量数据集的构建到灵活的模型选择,训练过程中的算力优化,到效果验证,都提供了创新的解决方案,确保了 SFT 技术的高效实施。主要优势如下:\n\n\n\n\n(1)数据生产:通过使用开源基座大模型能力,构建通用大模型数据增强(LLM Data Augmentation,简称 LDA)工具,使用场景覆盖 Self-Instruct、Query 扩展,Query2Doc,Doc2Query 等。帮助业务方高效创建可用于 SFT 训练的标准样本集。\n\n\n\n\n(2)模型选型:集成 15 个左右的主流 LLM 模型(如言犀、ChatGLM,Llama 等) ,统一模型的样本标准和训练模式,实现一份样本在多模型间随意切换;同时,开源 LLM 模型经过中台工程师的适配,可在九数的环境下开箱即用,帮助业务方灵活进行模型选型实验。\n\n\n\n\n(3)模型微调:\n\n\n\n\n①支持方法广:支持对 LLM 模型的预训练(Pretrain)和高效微调(SFT),微调方面支持全参微调(Full-Parameter Fine-Tuning)和 LoRA 等参数高效微调 PEFT 方法(Parameter-Efficient Fine-Tuning )。支持人类反馈强化学习 RLHF 训练(Reinforcement Learning from Human Feedback),支持 PPO(Proximal Policy Optimization)、DPO(Direct Preference Optimization)等强化学习算法。\n\n\n\n\n②训练性能高:通过编译优化、算子优化、网络和 IO 优化等方法,相比纯开源的代码性能提升 40%左右;支持 70B+超大规模模型微调;\n\n\n\n\n③支持 SFT 模型蒸馏:建设模型知识蒸馏组件,在模型效果无损或损失较小的同时缩小模型规模,降低模型线上运行的成本,帮助业务方节约算力资源,未来可在端上使用。\n\n\n\n\n(4)效果验证:支持高性能批量离线推理与客观+主观评估方式。通过手动融合 kernel、triton 编译优化、通信压缩等手段,提升批量离线推理性能。通过建立客观评估维度与用户自定义主观维度,实现生成效果验证。\n\n\n\n\n目前,九数算法中台自研 SFT 框架已于京东内部多个业务试点应用,实现 SFT 技术的低成本应用。\n\n三、检索增强生成(RAG)\n\n\n\n\n大型语言模型通过监督式微调(SFT)补充了特定领域知识的不足,但在获取时效性知识、减少内容幻觉以及确保数据安全等方面依然存在挑战。在零售场景中,无论是来自 C 端用户的商品咨询,还是来自 B 端商家的平台规则咨询,对生成答案的时效性、专业度、准确性要求都更高,还需要大模型具备多轮对话的理解能力。\n\n\n\n\n检索增强生成技术(Retrieval-Augmented Generation,简称 RAG)的引入,有效减轻了这些问题。RAG 的核心是根据用户提问(Query)从外部数据库检索相关信息,并基于此生成回答(Answer),相当于给大模型装上了“知识外挂”,基础大模型不用再训练即可随时调用特定领域知识。 这不仅提升了回答的时效性和准确性,还增加了答案的可解释性和可扩展性。此外,企业可以将数据库在本地维护,无需上传至开源模型,确保了数据安全性。\n\n\n\n\n当用户询问“某两款不同品牌手机有什么不同时”时,RAG 技术通过索引,为大模型“外挂”两款手机不同参数和属性数据、最新热门趋势等知识库,通过检索技术在商品知识库中找到准确的商品参数等信息,通过大模型生成能力对比两款手机在哪些重要维度有所不同,高效、精准地向用户输出两款手机差异性。\n\n【3.1 RAG 流程介绍】\n\n\n\n\nRAG 的流程包括检索数据增强、检索过程增强、效果增强三个阶段。\n\n\n\n\n(1)检索数据增强阶段:构建用于检索的语料库的过程,包括“数据提取与处理—文本向量化—创建索引—导入向量数据库”几步。这一阶段的关键是如何通过各类技术,构建有效的语料库,以提供给模型用于生成文本的信息。\n\n\n\n\n(2)检索过程增强阶段:根据用户查询(Query)在语料库中进行检索,召回相关信息,并通过 LLM 服务生成摘要内容的过程。检索环节中,通过文本检索与向量检索的方式计算问题与语料库内文档块之间相似度来,召回相似度最高的 top K 个文档块。为了提升检索的精度,往往会在首次召回后加上过滤(Filter)、排序(Rank)等环节。摘要生成环节中,结合 prompt 工程,利用大模型对用户问题与检索完成的答案进行总结,生成答案摘要。为提升结果准确度,大模型可根据问题范围提前进行 SFT 微调训练。\n\n\n\n\n(3)效果增强阶段:针对 RAG 检索和生成结果可进行效果评估,通过客观+主观方式对 RAG 模式进行批量标注与评分,评价结果可用于进一步优化检索质量与生成质量。\n\n\n\n\nRAG 流程介绍\n\n【3.2 九数算法中台 RAG 技术优势】\n\n\n\n\n九数算法中台的 RAG 技术覆盖检索数据增强、检索过程增强、效果增强三个阶段,力求通过全流程技术方案的设计,提升 RAG 的效率和性能。\n\n\n\n\n九数算法中台 RAG 架构\n\n\n\n\n(1)检索数据增强阶段\n\n\n\n\n①知识库构建\n\n基于 Data Warehouse 构建知识库,通过增强数据粒度、对齐优化等优化策略增强知识库可用性。 增强数据粒度策略加强数据源可读性。通过推行数据标准化流程,去除无关信息、特殊字符、歧义及重复内容,对数据内容进行修订和简化,重点建设结构化知识索引,促进信息的高效检索与利用。对齐优化策略解决用户问题与文档内容不一致问题,引入假设性问题生成机制,针对语料库中每个文档设计相应的问题(Query)并嵌入文档中,提升用户问题/Query 的召回率,有效解决了文档间的对齐挑战。\n\n\n\n\n②数据索引优化\n\n数据索引优化旨在通过对索引结构优化和元数据信息整合等策略提升索引内容的质量,确保数据检索的效率和精度。 索引结构优化策略提升知识库内答案相关上下文被召回概率,通过块优化技术(Chunk optimization)调整切词大小和参数,最小化噪声数据的影响;还可以通过改变索引路径,并引入图结构信息来进一步优化索引结构。添加元数据信息策略提升检索相关性,特别是在处理时间敏感的数据如电子邮件查询时,强调最新信息的相关性而不仅是内容相似性。通过在索引块中嵌入关键元数据属性(如时间戳和章节编号等结构标识),进行精细化过滤,从而提升检索效率与相关度。\n\n\n\n\n③优化 Embedding 模型\n\nEmbedding 模型将用户查询(Query)和语料块(Doc)文本转换成为向量。通过选取动态 Embedding(Dynamic Embedding)模型,并微调 Embedding(Fine-tuning Embedding) ,优化 Embedding 效果,提高其精确度和适应性。\n\n\n\n\n通过选取动态 Embedding 模型,可将用户查询 Query 与知识库内容结合上下文内容转化为向量并进行匹配,提升匹配精准度。动态 Embedding 模型利用基于 Transformer 架构的深度学习模型、细粒度的语义捕获和多任务学习能力,根据对同一词汇的上下文理解,动态调整其向量表示,使得模型能够生成反映全局语义特征的向量,优化了词义多样性和歧义词汇的精准表征。为提升模型对垂域内容理解,可微调 Embedding,通过对预训练 Embedding 模型(如 BGE、Voyage 等)进行微调训练,增强模型在垂直领域任务中的表现。包括针对特定领域微调,帮助模型捕捉到该领域的术语和微妙差异,以及针对具体的检索任务微调,使之精准匹配用户查询(Query)和相关文档块(Doc)。\n\n\n\n\n④兼容向量数据库\n\n支持包含 Vearch、Milvus、Pinecone 等在内的多种向量数据库。\n\n\n\n\n(2)检索过程增强阶段\n\n\n\n\n检索过程增强检涉及对搜索引擎检索流程的综合优化,包括深度理解用户查询(Query)、改进召回策略、优化过滤和排序机制以及改进生成摘要等环节。\n\n\n\n\n①查询(Query)改写\n\n通过知识推理、关键词识别、属性抽取等技术,深入理解用户查询(Query)意图,并通过查询改写(Query Rewrite)提高检索的相关性和精度。\n\n\n\n\n②召回策略\n\n召回策略优化的目标包括准确率提升和性能提升两方面。准确率提升方面,我们采用多跳检索(Multi-hop Retrieval)和相关性召回策略,执行多次连续且逐渐深入的检索,以便从不同的数据源中获取更全面深刻的信息,从而提升召回的准确率;性能提升方面,引入检索结果缓存机制(Retrieval Cache)以优化系统性能,减少查询响应时间。\n\n\n\n\n③过滤/排序(Filtering/Ranking)\n\n采用排序算法和过滤机制,根据用户行为和上下文信息对召回的文档进行精准排序,排除不相关或低质量的内容。\n\n\n\n\n④摘要生成\n\n利用提示词工程(Prompt Engineering)技术,给用户提供相应的 Prompt 模板,优化文档摘要的自动生成结果;并通过模型微调(Fine-tuning)提升生成摘要的相关性和丰富度。\n\n\n\n\n(3)效果增强阶段\n\n\n\n\n①建立效果评估机制\n\n效果增强阶段旨在通过多轮评估,明确现有 RAG 方案的优化方向,优化最终生成效果。我们支持主观+客观相结合的评估方式,针对检索质量和生成质量分别建立相应的评估维度,使用多种主流评估框架对 RAG 效果进行评估。\n\n\n\n\n②针对检索质量优化\n\n针对检索质量,采取检索策略选择与检索精度调优的双重途径。基于评估反馈,筛选与当前数据集和任务目标最匹配的检索策略,包括关键词匹配、语义搜索、图数据库检索等,并对检索参数进行精细调整,以优化检索结果的准确率和相关度。\n\n\n\n\n③针对生成质量优化\n\n针对生成质量,进行模型微调和数据结构重组两方面优化。根据评估效果反馈,进一步微调 Embedding 模型和生成模型,精确适配特定语料库和任务。此外,优化的数据结构与处理流程,以提高模型的学习效率和生成质量。\n\n\n\n\n(4)联邦 RAG\n\n\n\n\n除上述常规 RAG 流程外,针对当前私域数据分散,私域数据无法在保护数据隐私的前提下参与大模型训练、RAG 检索等问题,京东试点联邦 RAG 模式,将联邦学习(Federated Learning)和 RAG 相结合,支持用户私域数据在本地构建知识库,延续联邦学习数据可用不可见原则,支持异构数据分布式安全模型训练与微调,实现保障私域数据隐私的联邦 RAG 模式。\n\n四、AI 智能体(AI Agent)\n\n\n\n\n通过 SFT+RAG 技术,已经可以实现相对固定流程复杂业务问题的解决。面向未来,九数算法中台致力于实现“基于意图的结果指定”这一全新的产品交互方式,通过 AI Agent(智能体)赋予大模型自主规划和执行能力,高效解决多流程复杂的业务问题。\n\n【4.1 AI Agent 介绍】\n\n\n\n\nAI Agent 可以理解为:一个可以感知环境并能够基于当前场景做出决策的“智能体”。 当下大模型应用大多仅具备类似 ChatGPT 的对话式能力,无法自主执行复杂任务。为了拓展大模型的能力,可以为其添加各类组件(如 Planning/Proflie /Memory/Action 等),实现复杂任务的拆解、规划和执行。AI Agent 常见组件如下:\n\n\n\n\n①Planning:将复杂的任务分解为更易处理的子任务,并制定出有效的策略。\n\n②Proflie:描述了 Agent 的各种属性,如角色、目标、能力、知识和行为方式等。\n\n③Memory:存储和组织从环境中获取的信息,以指导未来行动。\n\n④Action:将抽象的决策转化为具体的行动。\n\n\n\n\nAI Agent 四类组件\n\n\n\n\n就交互形式而言,基于大型语言模型的 AI 代理可以分为两大类:单一智能体(Single Agent)和多智能体系统(Multi-Agents)。\n\n\n\n\n早在 20 世纪 80 年代,计算机科学家已着手探索类似 AI Agent 这样能与人类交互的智能软件。在大模型能力的加持下,AI Agent 已成为既具有想象空间,又贴近应用的 AI 行业爆点。从交互形式上看,基于大语言模型的 Agent(LLM-based Agent)可分为单智能体(Single Agent)和多智能体系统(Multi-Agents):\n\n\n\n\n(1)单一智能体 Single Agent:在其运行环境中独立作用,专注于一个特定的任务或服务领域,能够接收人类以自然语言提出的指令,并基于这些指令执行一些简单的任务,如数据查询、日程管理等,扮演人类智能助手的角色。目前比较成熟的产品包括 AutoGPT、BabyAGI 等等。\n\n\n\n\n(2)多智能体 Multi-Agents:涉及多个 Agent 协同工作,以解决单 Agent 难以独立处理的复杂问题。Agents 们有不同的角色和专长,通过有效的协作共同实现目标。协作方式可以是合作型的,即通过共享信息、观点和资源来解决问题;也可以是对抗型的,比如通过竞争、谈判和辩论来优化决策过程,淘汰错误策略。这种多元化的互动模式使得多智能体系统能够应对更为复杂和动态的环境,展现出比单一智能体更加强大和灵活的问题解决能力。\n\n【4.2 京东零售的 AI Agent 应用】\n\n\n\n\n在复杂业务模型自主规划层面,京东零售基于 ReAct 范式构建 Agent LLM,帮助大语言模型理解上下文,精确把握用户意图,并在复杂情况下做出决策、执行任务和使用工具。 ReAct 范式结合了推理(Reasoning)与行动(Acting)机制,通过生成交替的推理路径和特定行动,优化模型的决策制定和执行流程,以及与外部资源的有效交互。此过程中,推理路径为模型提供了对行动计划的追踪与更新机制,而具体的行动则使模型能够与外部工具进行直接交互。这种交替机制增强了模型在复杂情景下的决策和多应用调度的精确度。\n\n\n\n\n以常见的商家助手场景为例,随着越来越多的商家入驻京东平台,关于平台入驻规则、产品营销策略等方面的提问逐渐增多,传统的智能客服、人工回复等方式无法精准回复商家提问,且运营成本较高。京东零售基于 Multi-Agents 理念搭建的商家助手大模型在线推理服务架构,打通数据系统、算法系统和业务系统,不仅能够帮助商家快速了解平台规则、优化经营策略,还能通过自然语言交互提供个性化、多轮次的即时沟通服务。 这一系统的核心是算法层多个定制的 AI Agents,每个 Agent 都有专门角色和功能,可以调用不同的工具来解决相应的问题。例如,当商家就如何提升某个商品的销量提出问题,AI Agent 首先对商家提问进行语义理解,精准识别出商家的具体需求,然后调用商品信息查询的 API 接口,快速获取所需的数据和信息,并据此给出个性化的销量提升建议。\n\n\n\n\n商家助手大模型在线推理服务架构\n\n\n\n\n目前京东零售的 Agent LLM 已经应用于零售业务知识库构建,成功服务于商家、消费者、企业、门店等多类的用户群体,涵盖多种复杂使用场景,并支持通过工具调用来解决多流程的复杂业务问题。\n\n五、结语\n\n\n\n\n综上,九数算法中台的大模型基础应用框架融合基于 ReAct 框架的 AI Agent、SFT(指令微调)与 RAG(检索增强生成)技术,显著提高了大语言模型在零售业务的应用效率和效果。通过这一系列技术融合和创新,京东零售成功地将大模型的强大能力应用于人、货、场场景中,在人场,提供面向用户与商家的智能助手服务,如:商家助手、用户增长等;在货场,提供面向商品的知识问答服务,如:知识问答等;在场域,提供面向场域的智能运营服务,如:舆情风险挖掘、数据分析等。 零售大模型应用不仅提升了用户体验,优化了运营效率,还为零售行业的数智化转型提供了有力支撑,展现了大模型技术在零售领域广泛应用的巨大潜力和价值。\n\n\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 4, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "一 前 言 2023 年 大 语 言 模 型 以 前 所 未 有 的 速 度 和 能 力 改 变 我 们 对 智 能 系 统 的 认 知 成 为 技 术 圈 最 被 热 议 的 话 题 但 百 模 大 战 终 将 走 向 落 地 为 王 如 何 将 大 语 言 模 型 的 强 大 能 力 融 入 实 际 业 务 产 生 业 务 价 值 成 为 致 胜 关 键 在 零 售 场 大 模 型 应 用 面 临 的 核 心 挑 战 包 括 以 下 三 点 1 模 型 缺 乏 零 售 领 域 的 专 业 知 识 建 设 业 务 专 属 大 模 型 训 练 成 本 高 2 模 型 内 容 生 产 伴 有 幻 觉 而 检 索 海 量 业 务 信 息 又 缺 乏 有 效 技 术 检 索 成 本 高 3 在 商 家 问 答 等 多 流 程 复 杂 业 务 场 景 下 模 型 缺 乏 自 主 规 划 能 力 需 要 大 量 人 工 干 预 为 了 应 对 上 述 三 点 挑 战 九 数 算 法 中 台 推 出 了 一 整 套 大 语 言 模 型 应 用 解 决 方 案 一 种 融 合 基 于 react 框 架 的 ai agent sft 指 令 微 调 与 rag 检 索 增 强 生 成 技 术 的 应 用 框 架 不 仅 赋 予 大 模 型 学 习 领 域 知 识 的 能 力 还 显 著 提 升 了 模 型 的 自 主 决 策 和 信 息 处 理 精 确 度 为 业 务 人 员 高 效 落 地 大 模 型 的 微 调 部 署 和 应 用 提 供 了 落 地 保 障 九 数 算 法 中 台 大 模 型 基 础 应 用 框 架", "source_text": "一、前言\n\n\n\n\n2023 年,大语言模型以前所未有的速度和能力改变我们对智能系统的认知,成为技术圈最被热议的话题。但“百模大战”终将走向“落地为王”,如何将大语言模型的强大能力融入实际业务、产生业务价值成为致胜关键。\n\n\n\n\n在零售场,大模型应用面临的核心挑战包括以下三点:\n\n\n\n\n(1)模型缺乏零售领域的专业知识,建设业务专属大模型训练成本高\n\n(2)模型内容生产伴有幻觉,而检索海量业务信息又缺乏有效技术,检索成本高\n\n(3)在商家问答等多流程复杂业务场景下,模型缺乏自主规划能力,需要大量人工干预\n\n\n\n\n为了应对上述三点挑战,九数算法中台推出了一整套大语言模型应用解决方案,一种融合基于 ReAct 框架的 AI Agent、SFT(指令微调)与 RAG(检索增强生成)技术的应用框架,不仅赋予大模型学习领域知识的能力,还显著提升了模型的自主决策和信息处理精确度,为业务人员高效落地大模型的微调、部署和应用提供了落地保障。\n\n\n\n\n九数算法中台大模型基础应用框架", "segmentation_method": "reviewed_source_semantics", "label": "一、前言", "source_line_range": [ 1, 31 ] }, { "id": "body-region-2", "text": "二 高 效 微 调 sft 通 用 大 模 型 虽 然 在 处 理 通 用 知 识 方 面 表 现 出 色 但 缺 乏 针 对 零 售 垂 直 领 域 的 知 识 理 解 为 此 需 要 引 入 经 过 人 工 标 注 的 领 域 数 据 对 已 完 成 预 训 练 的 通 用 大 模 型 进 行 微 调 从 而 得 到 具 有 该 领 域 知 识 的 零 售 垂 域 大 模 型 这 个 过 程 就 是 有 监 督 微 调 supervised fine tuning 简 称 sft 2 1 sft 流 程 介 绍 sft 的 流 程 包 括 数 据 生 产 模 型 选 型 模 型 微 调 效 果 验 证 几 个 环 节 每 一 步 都 存 在 相 应 的 技 术 挑 战 1 数 据 生 产 创 建 用 于 微 调 预 训 练 模 型 的 高 质 量 数 据 集 数 据 集 质 量 对 模 型 训 练 的 效 果 至 关 重 要 在 零 售 场 京 东 沉 淀 了 丰 富 的 领 域 数 据 比 如 电 商 营 销 策 略 消 费 者 行 为 数 据 商 品 信 息 数 据 等 这 些 数 据 往 往 格 式 不 统 一 噪 声 多 如 何 以 这 些 业 务 数 据 为 基 础 高 效 构 建 可 用 于 微 调 训 练 的 数 据 集 是 数 据 生 产 环 节 的 痛 点 2 模 型 选 型 根 据 对 中 文 的 支 持 程 度 参 数 量 级 性 能 等 选 择 合 适 的 预 训 练 模 型 作 为 微 调 的 起 点 高 速 发 展 的 开 源 社 区 为 业 务 方 提 供 了 大 量 可 供 选 择 的 预 训 练 模 型 但 不 同 模 型 擅 长 不 同 任 务 需 要 实 验 对 比 模 型 表 现 而 开 源 模 型 存 在 样 本 标 注 模 型 标 准 不 统 一 的 问 题 将 开 源 方 案 应 用 在 企 业 环 境 中 也 需 要 一 定 的 适 配 工 作 量 给 业 务 方 带 来 了 较 高 的 模 型 选 型 成 本 3 模 型 微 调 使 用 准 备 好 的 数 据 集 对 选 定 的 预 训 练 模 型 进 行 微 调 训 练 时 需 要 设 置 适 当 的 学 习 率 批 次 大 小 和 训 练 周 期 等 参 数 同 时 监 控 模 型 的 性 能 如 损 失 函 数 和 准 确 率 等 指 标 在 算 力 资 源 紧 缺 的 背 景 下 不 少 业 务 方 面 临 算 力 资 源 不 足 的 问 题 如 何 用 最 小 的 算 力 资 源 实 现 最 优 的 模 型 训 练 性 能 至 关 重 要 4 效 果 验 证 使 用 独 立 的 验 证 数 据 集 对 模 型 进 行 测 试 评 估 模 型 训 练 效 果 关 键 是 建 立 系 统 的 模 型 评 估 指 标 并 选 择 合 适 的 方 法 高 效 进 行 效 果 评 估 sft 流 程 介 绍 2 2 九 数 算 法 中 台 sft 框 架 的 优 势 九 数 算 法 中 台 通 过 自 研 的 sft 高 效 微 调 框 架 从 高 质 量 数 据 集 的 构 建 到 灵 活 的 模 型 选 择 训 练 过 程 中 的 算 力 优 化 到 效 果 验 证 都 提 供 了 创 新 的 解 决 方 案 确 保 了 sft 技 术 的 高 效 实 施 主 要 优 势 如 下 1 数 据 生 产 通 过 使 用 开 源 基 座 大 模 型 能 力 构 建 通 用 大 模 型 数 据 增 强 llm data augmentation 简 称 lda 工 具 使 用 场 景 覆 盖 self instruct query 扩 展 query2doc doc2query 等 帮 助 业 务 方 高 效 创 建 可 用 于 sft 训 练 的 标 准 样 本 集 2 模 型 选 型 集 成 15 个 左 右 的 主 流 llm 模 型 如 言 犀 chatglm llama 等 统 一 模 型 的 样 本 标 准 和 训 练 模 式 实 现 一 份 样 本 在 多 模 型 间 随 意 切 换 同 时 开 源 llm 模 型 经 过 中 台 工 程 师 的 适 配 可 在 九 数 的 环 境 下 开 箱 即 用 帮 助 业 务 方 灵 活 进 行 模 型 选 型 实 验 3 模 型 微 调 1 支 持 方 法 广 支 持 对 llm 模 型 的 预 训 练 pretrain 和 高 效 微 调 sft 微 调 方 面 支 持 全 参 微 调 full parameter fine tuning 和 lora 等 参 数 高 效 微 调 peft 方 法 parameter efficient fine tuning 支 持 人 类 反 馈 强 化 学 习 rlhf 训 练 reinforcement learning from human feedback 支 持 ppo proximal policy optimization dpo direct preference optimization 等 强 化 学 习 算 法 2 训 练 性 能 高 通 过 编 译 优 化 算 子 优 化 网 络 和 io 优 化 等 方 法 相 比 纯 开 源 的 代 码 性 能 提 升 40 左 右 支 持 70b 超 大 规 模 模 型 微 调 3 支 持 sft 模 型 蒸 馏 建 设 模 型 知 识 蒸 馏 组 件 在 模 型 效 果 无 损 或 损 失 较 小 的 同 时 缩 小 模 型 规 模 降 低 模 型 线 上 运 行 的 成 本 帮 助 业 务 方 节 约 算 力 资 源 未 来 可 在 端 上 使 用 4 效 果 验 证 支 持 高 性 能 批 量 离 线 推 理 与 客 观 主 观 评 估 方 式 通 过 手 动 融 合 kernel triton 编 译 优 化 通 信 压 缩 等 手 段 提 升 批 量 离 线 推 理 性 能 通 过 建 立 客 观 评 估 维 度 与 用 户 自 定 义 主 观 维 度 实 现 生 成 效 果 验 证 目 前 九 数 算 法 中 台 自 研 sft 框 架 已 于 京 东 内 部 多 个 业 务 试 点 应 用 实 现 sft 技 术 的 低 成 本 应 用", "source_text": "二、高效微调(SFT)\n\n\n\n\n通用大模型虽然在处理通用知识方面表现出色,但缺乏针对零售垂直领域的知识理解。为此,需要引入经过人工标注的领域数据,对已完成预训练的通用大模型进行微调,从而得到具有该领域知识的零售垂域大模型。这个过程就是“有监督微调(Supervised Fine-Tuning)”,简称 SFT。\n\n【2.1 SFT 流程介绍】\n\n\n\n\nSFT 的流程包括数据生产、模型选型、模型微调、效果验证几个环节,每一步都存在相应的技术挑战:\n\n\n\n\n(1)数据生产:创建用于微调预训练模型的高质量数据集,数据集质量对模型训练的效果至关重要。在零售场,京东沉淀了丰富的领域数据,比如电商营销策略、消费者行为数据、商品信息数据等,这些数据往往格式不统一、噪声多,如何以这些业务数据为基础,高效构建可用于微调训练的数据集,是数据生产环节的痛点。\n\n\n\n\n(2)模型选型:根据对中文的支持程度、参数量级、性能等选择合适的预训练模型作为微调的起点。高速发展的开源社区为业务方提供了大量可供选择的预训练模型,但不同模型擅长不同任务,需要实验对比模型表现。而开源模型存在样本标注、模型标准不统一的问题,将开源方案应用在企业环境中也需要一定的适配工作量,给业务方带来了较高的模型选型成本。\n\n\n\n\n(3)模型微调:使用准备好的数据集对选定的预训练模型进行微调。训练时需要设置适当的学习率、批次大小和训练周期等参数,同时监控模型的性能,如损失函数和准确率等指标。在算力资源紧缺的背景下,不少业务方面临算力资源不足的问题,如何用最小的算力资源实现最优的模型训练性能至关重要。\n\n\n\n\n(4)效果验证:使用独立的验证数据集对模型进行测试,评估模型训练效果。关键是建立系统的模型评估指标,并选择合适的方法高效进行效果评估。\n\n\n\n\nSFT 流程介绍\n\n【2.2 九数算法中台 SFT 框架的优势】\n\n\n\n\n九数算法中台通过自研的 SFT 高效微调框架,从高质量数据集的构建到灵活的模型选择,训练过程中的算力优化,到效果验证,都提供了创新的解决方案,确保了 SFT 技术的高效实施。主要优势如下:\n\n\n\n\n(1)数据生产:通过使用开源基座大模型能力,构建通用大模型数据增强(LLM Data Augmentation,简称 LDA)工具,使用场景覆盖 Self-Instruct、Query 扩展,Query2Doc,Doc2Query 等。帮助业务方高效创建可用于 SFT 训练的标准样本集。\n\n\n\n\n(2)模型选型:集成 15 个左右的主流 LLM 模型(如言犀、ChatGLM,Llama 等) ,统一模型的样本标准和训练模式,实现一份样本在多模型间随意切换;同时,开源 LLM 模型经过中台工程师的适配,可在九数的环境下开箱即用,帮助业务方灵活进行模型选型实验。\n\n\n\n\n(3)模型微调:\n\n\n\n\n①支持方法广:支持对 LLM 模型的预训练(Pretrain)和高效微调(SFT),微调方面支持全参微调(Full-Parameter Fine-Tuning)和 LoRA 等参数高效微调 PEFT 方法(Parameter-Efficient Fine-Tuning )。支持人类反馈强化学习 RLHF 训练(Reinforcement Learning from Human Feedback),支持 PPO(Proximal Policy Optimization)、DPO(Direct Preference Optimization)等强化学习算法。\n\n\n\n\n②训练性能高:通过编译优化、算子优化、网络和 IO 优化等方法,相比纯开源的代码性能提升 40%左右;支持 70B+超大规模模型微调;\n\n\n\n\n③支持 SFT 模型蒸馏:建设模型知识蒸馏组件,在模型效果无损或损失较小的同时缩小模型规模,降低模型线上运行的成本,帮助业务方节约算力资源,未来可在端上使用。\n\n\n\n\n(4)效果验证:支持高性能批量离线推理与客观+主观评估方式。通过手动融合 kernel、triton 编译优化、通信压缩等手段,提升批量离线推理性能。通过建立客观评估维度与用户自定义主观维度,实现生成效果验证。\n\n\n\n\n目前,九数算法中台自研 SFT 框架已于京东内部多个业务试点应用,实现 SFT 技术的低成本应用。", "segmentation_method": "reviewed_source_semantics", "label": "二、高效微调(SFT)", "source_line_range": [ 32, 117 ] }, { "id": "body-region-3", "text": "三 检 索 增 强 生 成 rag 大 型 语 言 模 型 通 过 监 督 式 微 调 sft 补 充 了 特 定 领 域 知 识 的 不 足 但 在 获 取 时 效 性 知 识 减 少 内 容 幻 觉 以 及 确 保 数 据 安 全 等 方 面 依 然 存 在 挑 战 在 零 售 场 景 中 无 论 是 来 自 c 端 用 户 的 商 品 咨 询 还 是 来 自 b 端 商 家 的 平 台 规 则 咨 询 对 生 成 答 案 的 时 效 性 专 业 度 准 确 性 要 求 都 更 高 还 需 要 大 模 型 具 备 多 轮 对 话 的 理 解 能 力 检 索 增 强 生 成 技 术 retrieval augmented generation 简 称 rag 的 引 入 有 效 减 轻 了 这 些 问 题 rag 的 核 心 是 根 据 用 户 提 问 query 从 外 部 数 据 库 检 索 相 关 信 息 并 基 于 此 生 成 回 答 answer 相 当 于 给 大 模 型 装 上 了 知 识 外 挂 基 础 大 模 型 不 用 再 训 练 即 可 随 时 调 用 特 定 领 域 知 识 这 不 仅 提 升 了 回 答 的 时 效 性 和 准 确 性 还 增 加 了 答 案 的 可 解 释 性 和 可 扩 展 性 此 外 企 业 可 以 将 数 据 库 在 本 地 维 护 无 需 上 传 至 开 源 模 型 确 保 了 数 据 安 全 性 当 用 户 询 问 某 两 款 不 同 品 牌 手 机 有 什 么 不 同 时 时 rag 技 术 通 过 索 引 为 大 模 型 外 挂 两 款 手 机 不 同 参 数 和 属 性 数 据 最 新 热 门 趋 势 等 知 识 库 通 过 检 索 技 术 在 商 品 知 识 库 中 找 到 准 确 的 商 品 参 数 等 信 息 通 过 大 模 型 生 成 能 力 对 比 两 款 手 机 在 哪 些 重 要 维 度 有 所 不 同 高 效 精 准 地 向 用 户 输 出 两 款 手 机 差 异 性 3 1 rag 流 程 介 绍 rag 的 流 程 包 括 检 索 数 据 增 强 检 索 过 程 增 强 效 果 增 强 三 个 阶 段 1 检 索 数 据 增 强 阶 段 构 建 用 于 检 索 的 语 料 库 的 过 程 包 括 数 据 提 取 与 处 理 文 本 向 量 化 创 建 索 引 导 入 向 量 数 据 库 几 步 这 一 阶 段 的 关 键 是 如 何 通 过 各 类 技 术 构 建 有 效 的 语 料 库 以 提 供 给 模 型 用 于 生 成 文 本 的 信 息 2 检 索 过 程 增 强 阶 段 根 据 用 户 查 询 query 在 语 料 库 中 进 行 检 索 召 回 相 关 信 息 并 通 过 llm 服 务 生 成 摘 要 内 容 的 过 程 检 索 环 节 中 通 过 文 本 检 索 与 向 量 检 索 的 方 式 计 算 问 题 与 语 料 库 内 文 档 块 之 间 相 似 度 来 召 回 相 似 度 最 高 的 top k 个 文 档 块 为 了 提 升 检 索 的 精 度 往 往 会 在 首 次 召 回 后 加 上 过 滤 filter 排 序 rank 等 环 节 摘 要 生 成 环 节 中 结 合 prompt 工 程 利 用 大 模 型 对 用 户 问 题 与 检 索 完 成 的 答 案 进 行 总 结 生 成 答 案 摘 要 为 提 升 结 果 准 确 度 大 模 型 可 根 据 问 题 范 围 提 前 进 行 sft 微 调 训 练 3 效 果 增 强 阶 段 针 对 rag 检 索 和 生 成 结 果 可 进 行 效 果 评 估 通 过 客 观 主 观 方 式 对 rag 模 式 进 行 批 量 标 注 与 评 分 评 价 结 果 可 用 于 进 一 步 优 化 检 索 质 量 与 生 成 质 量 rag 流 程 介 绍 3 2 九 数 算 法 中 台 rag 技 术 优 势 九 数 算 法 中 台 的 rag 技 术 覆 盖 检 索 数 据 增 强 检 索 过 程 增 强 效 果 增 强 三 个 阶 段 力 求 通 过 全 流 程 技 术 方 案 的 设 计 提 升 rag 的 效 率 和 性 能 九 数 算 法 中 台 rag 架 构 1 检 索 数 据 增 强 阶 段 1 知 识 库 构 建 基 于 data warehouse 构 建 知 识 库 通 过 增 强 数 据 粒 度 对 齐 优 化 等 优 化 策 略 增 强 知 识 库 可 用 性 增 强 数 据 粒 度 策 略 加 强 数 据 源 可 读 性 通 过 推 行 数 据 标 准 化 流 程 去 除 无 关 信 息 特 殊 字 符 歧 义 及 重 复 内 容 对 数 据 内 容 进 行 修 订 和 简 化 重 点 建 设 结 构 化 知 识 索 引 促 进 信 息 的 高 效 检 索 与 利 用 对 齐 优 化 策 略 解 决 用 户 问 题 与 文 档 内 容 不 一 致 问 题 引 入 假 设 性 问 题 生 成 机 制 针 对 语 料 库 中 每 个 文 档 设 计 相 应 的 问 题 query 并 嵌 入 文 档 中 提 升 用 户 问 题 query 的 召 回 率 有 效 解 决 了 文 档 间 的 对 齐 挑 战 2 数 据 索 引 优 化 数 据 索 引 优 化 旨 在 通 过 对 索 引 结 构 优 化 和 元 数 据 信 息 整 合 等 策 略 提 升 索 引 内 容 的 质 量 确 保 数 据 检 索 的 效 率 和 精 度 索 引 结 构 优 化 策 略 提 升 知 识 库 内 答 案 相 关 上 下 文 被 召 回 概 率 通 过 块 优 化 技 术 chunk optimization 调 整 切 词 大 小 和 参 数 最 小 化 噪 声 数 据 的 影 响 还 可 以 通 过 改 变 索 引 路 径 并 引 入 图 结 构 信 息 来 进 一 步 优 化 索 引 结 构 添 加 元 数 据 信 息 策 略 提 升 检 索 相 关 性 特 别 是 在 处 理 时 间 敏 感 的 数 据 如 电 子 邮 件 查 询 时 强 调 最 新 信 息 的 相 关 性 而 不 仅 是 内 容 相 似 性 通 过 在 索 引 块 中 嵌 入 关 键 元 数 据 属 性 如 时 间 戳 和 章 节 编 号 等 结 构 标 识 进 行 精 细 化 过 滤 从 而 提 升 检 索 效 率 与 相 关 度 3 优 化 embedding 模 型 embedding 模 型 将 用 户 查 询 query 和 语 料 块 doc 文 本 转 换 成 为 向 量 通 过 选 取 动 态 embedding dynamic embedding 模 型 并 微 调 embedding fine tuning embedding 优 化 embedding 效 果 提 高 其 精 确 度 和 适 应 性 通 过 选 取 动 态 embedding 模 型 可 将 用 户 查 询 query 与 知 识 库 内 容 结 合 上 下 文 内 容 转 化 为 向 量 并 进 行 匹 配 提 升 匹 配 精 准 度 动 态 embedding 模 型 利 用 基 于 transformer 架 构 的 深 度 学 习 模 型 细 粒 度 的 语 义 捕 获 和 多 任 务 学 习 能 力 根 据 对 同 一 词 汇 的 上 下 文 理 解 动 态 调 整 其 向 量 表 示 使 得 模 型 能 够 生 成 反 映 全 局 语 义 特 征 的 向 量 优 化 了 词 义 多 样 性 和 歧 义 词 汇 的 精 准 表 征 为 提 升 模 型 对 垂 域 内 容 理 解 可 微 调 embedding 通 过 对 预 训 练 embedding 模 型 如 bge voyage 等 进 行 微 调 训 练 增 强 模 型 在 垂 直 领 域 任 务 中 的 表 现 包 括 针 对 特 定 领 域 微 调 帮 助 模 型 捕 捉 到 该 领 域 的 术 语 和 微 妙 差 异 以 及 针 对 具 体 的 检 索 任 务 微 调 使 之 精 准 匹 配 用 户 查 询 query 和 相 关 文 档 块 doc 4 兼 容 向 量 数 据 库 支 持 包 含 vearch milvus pinecone 等 在 内 的 多 种 向 量 数 据 库 2 检 索 过 程 增 强 阶 段 检 索 过 程 增 强 检 涉 及 对 搜 索 引 擎 检 索 流 程 的 综 合 优 化 包 括 深 度 理 解 用 户 查 询 query 改 进 召 回 策 略 优 化 过 滤 和 排 序 机 制 以 及 改 进 生 成 摘 要 等 环 节 1 查 询 query 改 写 通 过 知 识 推 理 关 键 词 识 别 属 性 抽 取 等 技 术 深 入 理 解 用 户 查 询 query 意 图 并 通 过 查 询 改 写 query rewrite 提 高 检 索 的 相 关 性 和 精 度 2 召 回 策 略 召 回 策 略 优 化 的 目 标 包 括 准 确 率 提 升 和 性 能 提 升 两 方 面 准 确 率 提 升 方 面 我 们 采 用 多 跳 检 索 multi hop retrieval 和 相 关 性 召 回 策 略 执 行 多 次 连 续 且 逐 渐 深 入 的 检 索 以 便 从 不 同 的 数 据 源 中 获 取 更 全 面 深 刻 的 信 息 从 而 提 升 召 回 的 准 确 率 性 能 提 升 方 面 引 入 检 索 结 果 缓 存 机 制 retrieval cache 以 优 化 系 统 性 能 减 少 查 询 响 应 时 间 3 过 滤 排 序 filtering ranking 采 用 排 序 算 法 和 过 滤 机 制 根 据 用 户 行 为 和 上 下 文 信 息 对 召 回 的 文 档 进 行 精 准 排 序 排 除 不 相 关 或 低 质 量 的 内 容 4 摘 要 生 成 利 用 提 示 词 工 程 prompt engineering 技 术 给 用 户 提 供 相 应 的 prompt 模 板 优 化 文 档 摘 要 的 自 动 生 成 结 果 并 通 过 模 型 微 调 fine tuning 提 升 生 成 摘 要 的 相 关 性 和 丰 富 度 3 效 果 增 强 阶 段 1 建 立 效 果 评 估 机 制 效 果 增 强 阶 段 旨 在 通 过 多 轮 评 估 明 确 现 有 rag 方 案 的 优 化 方 向 优 化 最 终 生 成 效 果 我 们 支 持 主 观 客 观 相 结 合 的 评 估 方 式 针 对 检 索 质 量 和 生 成 质 量 分 别 建 立 相 应 的 评 估 维 度 使 用 多 种 主 流 评 估 框 架 对 rag 效 果 进 行 评 估 2 针 对 检 索 质 量 优 化 针 对 检 索 质 量 采 取 检 索 策 略 选 择 与 检 索 精 度 调 优 的 双 重 途 径 基 于 评 估 反 馈 筛 选 与 当 前 数 据 集 和 任 务 目 标 最 匹 配 的 检 索 策 略 包 括 关 键 词 匹 配 语 义 搜 索 图 数 据 库 检 索 等 并 对 检 索 参 数 进 行 精 细 调 整 以 优 化 检 索 结 果 的 准 确 率 和 相 关 度 3 针 对 生 成 质 量 优 化 针 对 生 成 质 量 进 行 模 型 微 调 和 数 据 结 构 重 组 两 方 面 优 化 根 据 评 估 效 果 反 馈 进 一 步 微 调 embedding 模 型 和 生 成 模 型 精 确 适 配 特 定 语 料 库 和 任 务 此 外 优 化 的 数 据 结 构 与 处 理 流 程 以 提 高 模 型 的 学 习 效 率 和 生 成 质 量 4 联 邦 rag 除 上 述 常 规 rag 流 程 外 针 对 当 前 私 域 数 据 分 散 私 域 数 据 无 法 在 保 护 数 据 隐 私 的 前 提 下 参 与 大 模 型 训 练 rag 检 索 等 问 题 京 东 试 点 联 邦 rag 模 式 将 联 邦 学 习 federated learning 和 rag 相 结 合 支 持 用 户 私 域 数 据 在 本 地 构 建 知 识 库 延 续 联 邦 学 习 数 据 可 用 不 可 见 原 则 支 持 异 构 数 据 分 布 式 安 全 模 型 训 练 与 微 调 实 现 保 障 私 域 数 据 隐 私 的 联 邦 rag 模 式", "source_text": "三、检索增强生成(RAG)\n\n\n\n\n大型语言模型通过监督式微调(SFT)补充了特定领域知识的不足,但在获取时效性知识、减少内容幻觉以及确保数据安全等方面依然存在挑战。在零售场景中,无论是来自 C 端用户的商品咨询,还是来自 B 端商家的平台规则咨询,对生成答案的时效性、专业度、准确性要求都更高,还需要大模型具备多轮对话的理解能力。\n\n\n\n\n检索增强生成技术(Retrieval-Augmented Generation,简称 RAG)的引入,有效减轻了这些问题。RAG 的核心是根据用户提问(Query)从外部数据库检索相关信息,并基于此生成回答(Answer),相当于给大模型装上了“知识外挂”,基础大模型不用再训练即可随时调用特定领域知识。 这不仅提升了回答的时效性和准确性,还增加了答案的可解释性和可扩展性。此外,企业可以将数据库在本地维护,无需上传至开源模型,确保了数据安全性。\n\n\n\n\n当用户询问“某两款不同品牌手机有什么不同时”时,RAG 技术通过索引,为大模型“外挂”两款手机不同参数和属性数据、最新热门趋势等知识库,通过检索技术在商品知识库中找到准确的商品参数等信息,通过大模型生成能力对比两款手机在哪些重要维度有所不同,高效、精准地向用户输出两款手机差异性。\n\n【3.1 RAG 流程介绍】\n\n\n\n\nRAG 的流程包括检索数据增强、检索过程增强、效果增强三个阶段。\n\n\n\n\n(1)检索数据增强阶段:构建用于检索的语料库的过程,包括“数据提取与处理—文本向量化—创建索引—导入向量数据库”几步。这一阶段的关键是如何通过各类技术,构建有效的语料库,以提供给模型用于生成文本的信息。\n\n\n\n\n(2)检索过程增强阶段:根据用户查询(Query)在语料库中进行检索,召回相关信息,并通过 LLM 服务生成摘要内容的过程。检索环节中,通过文本检索与向量检索的方式计算问题与语料库内文档块之间相似度来,召回相似度最高的 top K 个文档块。为了提升检索的精度,往往会在首次召回后加上过滤(Filter)、排序(Rank)等环节。摘要生成环节中,结合 prompt 工程,利用大模型对用户问题与检索完成的答案进行总结,生成答案摘要。为提升结果准确度,大模型可根据问题范围提前进行 SFT 微调训练。\n\n\n\n\n(3)效果增强阶段:针对 RAG 检索和生成结果可进行效果评估,通过客观+主观方式对 RAG 模式进行批量标注与评分,评价结果可用于进一步优化检索质量与生成质量。\n\n\n\n\nRAG 流程介绍\n\n【3.2 九数算法中台 RAG 技术优势】\n\n\n\n\n九数算法中台的 RAG 技术覆盖检索数据增强、检索过程增强、效果增强三个阶段,力求通过全流程技术方案的设计,提升 RAG 的效率和性能。\n\n\n\n\n九数算法中台 RAG 架构\n\n\n\n\n(1)检索数据增强阶段\n\n\n\n\n①知识库构建\n\n基于 Data Warehouse 构建知识库,通过增强数据粒度、对齐优化等优化策略增强知识库可用性。 增强数据粒度策略加强数据源可读性。通过推行数据标准化流程,去除无关信息、特殊字符、歧义及重复内容,对数据内容进行修订和简化,重点建设结构化知识索引,促进信息的高效检索与利用。对齐优化策略解决用户问题与文档内容不一致问题,引入假设性问题生成机制,针对语料库中每个文档设计相应的问题(Query)并嵌入文档中,提升用户问题/Query 的召回率,有效解决了文档间的对齐挑战。\n\n\n\n\n②数据索引优化\n\n数据索引优化旨在通过对索引结构优化和元数据信息整合等策略提升索引内容的质量,确保数据检索的效率和精度。 索引结构优化策略提升知识库内答案相关上下文被召回概率,通过块优化技术(Chunk optimization)调整切词大小和参数,最小化噪声数据的影响;还可以通过改变索引路径,并引入图结构信息来进一步优化索引结构。添加元数据信息策略提升检索相关性,特别是在处理时间敏感的数据如电子邮件查询时,强调最新信息的相关性而不仅是内容相似性。通过在索引块中嵌入关键元数据属性(如时间戳和章节编号等结构标识),进行精细化过滤,从而提升检索效率与相关度。\n\n\n\n\n③优化 Embedding 模型\n\nEmbedding 模型将用户查询(Query)和语料块(Doc)文本转换成为向量。通过选取动态 Embedding(Dynamic Embedding)模型,并微调 Embedding(Fine-tuning Embedding) ,优化 Embedding 效果,提高其精确度和适应性。\n\n\n\n\n通过选取动态 Embedding 模型,可将用户查询 Query 与知识库内容结合上下文内容转化为向量并进行匹配,提升匹配精准度。动态 Embedding 模型利用基于 Transformer 架构的深度学习模型、细粒度的语义捕获和多任务学习能力,根据对同一词汇的上下文理解,动态调整其向量表示,使得模型能够生成反映全局语义特征的向量,优化了词义多样性和歧义词汇的精准表征。为提升模型对垂域内容理解,可微调 Embedding,通过对预训练 Embedding 模型(如 BGE、Voyage 等)进行微调训练,增强模型在垂直领域任务中的表现。包括针对特定领域微调,帮助模型捕捉到该领域的术语和微妙差异,以及针对具体的检索任务微调,使之精准匹配用户查询(Query)和相关文档块(Doc)。\n\n\n\n\n④兼容向量数据库\n\n支持包含 Vearch、Milvus、Pinecone 等在内的多种向量数据库。\n\n\n\n\n(2)检索过程增强阶段\n\n\n\n\n检索过程增强检涉及对搜索引擎检索流程的综合优化,包括深度理解用户查询(Query)、改进召回策略、优化过滤和排序机制以及改进生成摘要等环节。\n\n\n\n\n①查询(Query)改写\n\n通过知识推理、关键词识别、属性抽取等技术,深入理解用户查询(Query)意图,并通过查询改写(Query Rewrite)提高检索的相关性和精度。\n\n\n\n\n②召回策略\n\n召回策略优化的目标包括准确率提升和性能提升两方面。准确率提升方面,我们采用多跳检索(Multi-hop Retrieval)和相关性召回策略,执行多次连续且逐渐深入的检索,以便从不同的数据源中获取更全面深刻的信息,从而提升召回的准确率;性能提升方面,引入检索结果缓存机制(Retrieval Cache)以优化系统性能,减少查询响应时间。\n\n\n\n\n③过滤/排序(Filtering/Ranking)\n\n采用排序算法和过滤机制,根据用户行为和上下文信息对召回的文档进行精准排序,排除不相关或低质量的内容。\n\n\n\n\n④摘要生成\n\n利用提示词工程(Prompt Engineering)技术,给用户提供相应的 Prompt 模板,优化文档摘要的自动生成结果;并通过模型微调(Fine-tuning)提升生成摘要的相关性和丰富度。\n\n\n\n\n(3)效果增强阶段\n\n\n\n\n①建立效果评估机制\n\n效果增强阶段旨在通过多轮评估,明确现有 RAG 方案的优化方向,优化最终生成效果。我们支持主观+客观相结合的评估方式,针对检索质量和生成质量分别建立相应的评估维度,使用多种主流评估框架对 RAG 效果进行评估。\n\n\n\n\n②针对检索质量优化\n\n针对检索质量,采取检索策略选择与检索精度调优的双重途径。基于评估反馈,筛选与当前数据集和任务目标最匹配的检索策略,包括关键词匹配、语义搜索、图数据库检索等,并对检索参数进行精细调整,以优化检索结果的准确率和相关度。\n\n\n\n\n③针对生成质量优化\n\n针对生成质量,进行模型微调和数据结构重组两方面优化。根据评估效果反馈,进一步微调 Embedding 模型和生成模型,精确适配特定语料库和任务。此外,优化的数据结构与处理流程,以提高模型的学习效率和生成质量。\n\n\n\n\n(4)联邦 RAG\n\n\n\n\n除上述常规 RAG 流程外,针对当前私域数据分散,私域数据无法在保护数据隐私的前提下参与大模型训练、RAG 检索等问题,京东试点联邦 RAG 模式,将联邦学习(Federated Learning)和 RAG 相结合,支持用户私域数据在本地构建知识库,延续联邦学习数据可用不可见原则,支持异构数据分布式安全模型训练与微调,实现保障私域数据隐私的联邦 RAG 模式。", "segmentation_method": "reviewed_source_semantics", "label": "三、检索增强生成(RAG)", "source_line_range": [ 118, 285 ] }, { "id": "body-region-4", "text": "四 ai 智 能 体 ai agent 通 过 sft rag 技 术 已 经 可 以 实 现 相 对 固 定 流 程 复 杂 业 务 问 题 的 解 决 面 向 未 来 九 数 算 法 中 台 致 力 于 实 现 基 于 意 图 的 结 果 指 定 这 一 全 新 的 产 品 交 互 方 式 通 过 ai agent 智 能 体 赋 予 大 模 型 自 主 规 划 和 执 行 能 力 高 效 解 决 多 流 程 复 杂 的 业 务 问 题 4 1 ai agent 介 绍 ai agent 可 以 理 解 为 一 个 可 以 感 知 环 境 并 能 够 基 于 当 前 场 景 做 出 决 策 的 智 能 体 当 下 大 模 型 应 用 大 多 仅 具 备 类 似 chatgpt 的 对 话 式 能 力 无 法 自 主 执 行 复 杂 任 务 为 了 拓 展 大 模 型 的 能 力 可 以 为 其 添 加 各 类 组 件 如 planning proflie memory action 等 实 现 复 杂 任 务 的 拆 解 规 划 和 执 行 ai agent 常 见 组 件 如 下 1planning 将 复 杂 的 任 务 分 解 为 更 易 处 理 的 子 任 务 并 制 定 出 有 效 的 策 略 2proflie 描 述 了 agent 的 各 种 属 性 如 角 色 目 标 能 力 知 识 和 行 为 方 式 等 3memory 存 储 和 组 织 从 环 境 中 获 取 的 信 息 以 指 导 未 来 行 动 4action 将 抽 象 的 决 策 转 化 为 具 体 的 行 动 ai agent 四 类 组 件 就 交 互 形 式 而 言 基 于 大 型 语 言 模 型 的 ai 代 理 可 以 分 为 两 大 类 单 一 智 能 体 single agent 和 多 智 能 体 系 统 multi agents 早 在 20 世 纪 80 年 代 计 算 机 科 学 家 已 着 手 探 索 类 似 ai agent 这 样 能 与 人 类 交 互 的 智 能 软 件 在 大 模 型 能 力 的 加 持 下 ai agent 已 成 为 既 具 有 想 象 空 间 又 贴 近 应 用 的 ai 行 业 爆 点 从 交 互 形 式 上 看 基 于 大 语 言 模 型 的 agent llm based agent 可 分 为 单 智 能 体 single agent 和 多 智 能 体 系 统 multi agents 1 单 一 智 能 体 single agent 在 其 运 行 环 境 中 独 立 作 用 专 注 于 一 个 特 定 的 任 务 或 服 务 领 域 能 够 接 收 人 类 以 自 然 语 言 提 出 的 指 令 并 基 于 这 些 指 令 执 行 一 些 简 单 的 任 务 如 数 据 查 询 日 程 管 理 等 扮 演 人 类 智 能 助 手 的 角 色 目 前 比 较 成 熟 的 产 品 包 括 autogpt babyagi 等 等 2 多 智 能 体 multi agents 涉 及 多 个 agent 协 同 工 作 以 解 决 单 agent 难 以 独 立 处 理 的 复 杂 问 题 agents 们 有 不 同 的 角 色 和 专 长 通 过 有 效 的 协 作 共 同 实 现 目 标 协 作 方 式 可 以 是 合 作 型 的 即 通 过 共 享 信 息 观 点 和 资 源 来 解 决 问 题 也 可 以 是 对 抗 型 的 比 如 通 过 竞 争 谈 判 和 辩 论 来 优 化 决 策 过 程 淘 汰 错 误 策 略 这 种 多 元 化 的 互 动 模 式 使 得 多 智 能 体 系 统 能 够 应 对 更 为 复 杂 和 动 态 的 环 境 展 现 出 比 单 一 智 能 体 更 加 强 大 和 灵 活 的 问 题 解 决 能 力 4 2 京 东 零 售 的 ai agent 应 用 在 复 杂 业 务 模 型 自 主 规 划 层 面 京 东 零 售 基 于 react 范 式 构 建 agent llm 帮 助 大 语 言 模 型 理 解 上 下 文 精 确 把 握 用 户 意 图 并 在 复 杂 情 况 下 做 出 决 策 执 行 任 务 和 使 用 工 具 react 范 式 结 合 了 推 理 reasoning 与 行 动 acting 机 制 通 过 生 成 交 替 的 推 理 路 径 和 特 定 行 动 优 化 模 型 的 决 策 制 定 和 执 行 流 程 以 及 与 外 部 资 源 的 有 效 交 互 此 过 程 中 推 理 路 径 为 模 型 提 供 了 对 行 动 计 划 的 追 踪 与 更 新 机 制 而 具 体 的 行 动 则 使 模 型 能 够 与 外 部 工 具 进 行 直 接 交 互 这 种 交 替 机 制 增 强 了 模 型 在 复 杂 情 景 下 的 决 策 和 多 应 用 调 度 的 精 确 度 以 常 见 的 商 家 助 手 场 景 为 例 随 着 越 来 越 多 的 商 家 入 驻 京 东 平 台 关 于 平 台 入 驻 规 则 产 品 营 销 策 略 等 方 面 的 提 问 逐 渐 增 多 传 统 的 智 能 客 服 人 工 回 复 等 方 式 无 法 精 准 回 复 商 家 提 问 且 运 营 成 本 较 高 京 东 零 售 基 于 multi agents 理 念 搭 建 的 商 家 助 手 大 模 型 在 线 推 理 服 务 架 构 打 通 数 据 系 统 算 法 系 统 和 业 务 系 统 不 仅 能 够 帮 助 商 家 快 速 了 解 平 台 规 则 优 化 经 营 策 略 还 能 通 过 自 然 语 言 交 互 提 供 个 性 化 多 轮 次 的 即 时 沟 通 服 务 这 一 系 统 的 核 心 是 算 法 层 多 个 定 制 的 ai agents 每 个 agent 都 有 专 门 角 色 和 功 能 可 以 调 用 不 同 的 工 具 来 解 决 相 应 的 问 题 例 如 当 商 家 就 如 何 提 升 某 个 商 品 的 销 量 提 出 问 题 ai agent 首 先 对 商 家 提 问 进 行 语 义 理 解 精 准 识 别 出 商 家 的 具 体 需 求 然 后 调 用 商 品 信 息 查 询 的 api 接 口 快 速 获 取 所 需 的 数 据 和 信 息 并 据 此 给 出 个 性 化 的 销 量 提 升 建 议 商 家 助 手 大 模 型 在 线 推 理 服 务 架 构 目 前 京 东 零 售 的 agent llm 已 经 应 用 于 零 售 业 务 知 识 库 构 建 成 功 服 务 于 商 家 消 费 者 企 业 门 店 等 多 类 的 用 户 群 体 涵 盖 多 种 复 杂 使 用 场 景 并 支 持 通 过 工 具 调 用 来 解 决 多 流 程 的 复 杂 业 务 问 题 五 结 语 综 上 九 数 算 法 中 台 的 大 模 型 基 础 应 用 框 架 融 合 基 于 react 框 架 的 ai agent sft 指 令 微 调 与 rag 检 索 增 强 生 成 技 术 显 著 提 高 了 大 语 言 模 型 在 零 售 业 务 的 应 用 效 率 和 效 果 通 过 这 一 系 列 技 术 融 合 和 创 新 京 东 零 售 成 功 地 将 大 模 型 的 强 大 能 力 应 用 于 人 货 场 场 景 中 在 人 场 提 供 面 向 用 户 与 商 家 的 智 能 助 手 服 务 如 商 家 助 手 用 户 增 长 等 在 货 场 提 供 面 向 商 品 的 知 识 问 答 服 务 如 知 识 问 答 等 在 场 域 提 供 面 向 场 域 的 智 能 运 营 服 务 如 舆 情 风 险 挖 掘 数 据 分 析 等 零 售 大 模 型 应 用 不 仅 提 升 了 用 户 体 验 优 化 了 运 营 效 率 还 为 零 售 行 业 的 数 智 化 转 型 提 供 了 有 力 支 撑 展 现 了 大 模 型 技 术 在 零 售 领 域 广 泛 应 用 的 巨 大 潜 力 和 价 值", "source_text": "四、AI 智能体(AI Agent)\n\n\n\n\n通过 SFT+RAG 技术,已经可以实现相对固定流程复杂业务问题的解决。面向未来,九数算法中台致力于实现“基于意图的结果指定”这一全新的产品交互方式,通过 AI Agent(智能体)赋予大模型自主规划和执行能力,高效解决多流程复杂的业务问题。\n\n【4.1 AI Agent 介绍】\n\n\n\n\nAI Agent 可以理解为:一个可以感知环境并能够基于当前场景做出决策的“智能体”。 当下大模型应用大多仅具备类似 ChatGPT 的对话式能力,无法自主执行复杂任务。为了拓展大模型的能力,可以为其添加各类组件(如 Planning/Proflie /Memory/Action 等),实现复杂任务的拆解、规划和执行。AI Agent 常见组件如下:\n\n\n\n\n①Planning:将复杂的任务分解为更易处理的子任务,并制定出有效的策略。\n\n②Proflie:描述了 Agent 的各种属性,如角色、目标、能力、知识和行为方式等。\n\n③Memory:存储和组织从环境中获取的信息,以指导未来行动。\n\n④Action:将抽象的决策转化为具体的行动。\n\n\n\n\nAI Agent 四类组件\n\n\n\n\n就交互形式而言,基于大型语言模型的 AI 代理可以分为两大类:单一智能体(Single Agent)和多智能体系统(Multi-Agents)。\n\n\n\n\n早在 20 世纪 80 年代,计算机科学家已着手探索类似 AI Agent 这样能与人类交互的智能软件。在大模型能力的加持下,AI Agent 已成为既具有想象空间,又贴近应用的 AI 行业爆点。从交互形式上看,基于大语言模型的 Agent(LLM-based Agent)可分为单智能体(Single Agent)和多智能体系统(Multi-Agents):\n\n\n\n\n(1)单一智能体 Single Agent:在其运行环境中独立作用,专注于一个特定的任务或服务领域,能够接收人类以自然语言提出的指令,并基于这些指令执行一些简单的任务,如数据查询、日程管理等,扮演人类智能助手的角色。目前比较成熟的产品包括 AutoGPT、BabyAGI 等等。\n\n\n\n\n(2)多智能体 Multi-Agents:涉及多个 Agent 协同工作,以解决单 Agent 难以独立处理的复杂问题。Agents 们有不同的角色和专长,通过有效的协作共同实现目标。协作方式可以是合作型的,即通过共享信息、观点和资源来解决问题;也可以是对抗型的,比如通过竞争、谈判和辩论来优化决策过程,淘汰错误策略。这种多元化的互动模式使得多智能体系统能够应对更为复杂和动态的环境,展现出比单一智能体更加强大和灵活的问题解决能力。\n\n【4.2 京东零售的 AI Agent 应用】\n\n\n\n\n在复杂业务模型自主规划层面,京东零售基于 ReAct 范式构建 Agent LLM,帮助大语言模型理解上下文,精确把握用户意图,并在复杂情况下做出决策、执行任务和使用工具。 ReAct 范式结合了推理(Reasoning)与行动(Acting)机制,通过生成交替的推理路径和特定行动,优化模型的决策制定和执行流程,以及与外部资源的有效交互。此过程中,推理路径为模型提供了对行动计划的追踪与更新机制,而具体的行动则使模型能够与外部工具进行直接交互。这种交替机制增强了模型在复杂情景下的决策和多应用调度的精确度。\n\n\n\n\n以常见的商家助手场景为例,随着越来越多的商家入驻京东平台,关于平台入驻规则、产品营销策略等方面的提问逐渐增多,传统的智能客服、人工回复等方式无法精准回复商家提问,且运营成本较高。京东零售基于 Multi-Agents 理念搭建的商家助手大模型在线推理服务架构,打通数据系统、算法系统和业务系统,不仅能够帮助商家快速了解平台规则、优化经营策略,还能通过自然语言交互提供个性化、多轮次的即时沟通服务。 这一系统的核心是算法层多个定制的 AI Agents,每个 Agent 都有专门角色和功能,可以调用不同的工具来解决相应的问题。例如,当商家就如何提升某个商品的销量提出问题,AI Agent 首先对商家提问进行语义理解,精准识别出商家的具体需求,然后调用商品信息查询的 API 接口,快速获取所需的数据和信息,并据此给出个性化的销量提升建议。\n\n\n\n\n商家助手大模型在线推理服务架构\n\n\n\n\n目前京东零售的 Agent LLM 已经应用于零售业务知识库构建,成功服务于商家、消费者、企业、门店等多类的用户群体,涵盖多种复杂使用场景,并支持通过工具调用来解决多流程的复杂业务问题。\n\n五、结语\n\n\n\n\n综上,九数算法中台的大模型基础应用框架融合基于 ReAct 框架的 AI Agent、SFT(指令微调)与 RAG(检索增强生成)技术,显著提高了大语言模型在零售业务的应用效率和效果。通过这一系列技术融合和创新,京东零售成功地将大模型的强大能力应用于人、货、场场景中,在人场,提供面向用户与商家的智能助手服务,如:商家助手、用户增长等;在货场,提供面向商品的知识问答服务,如:知识问答等;在场域,提供面向场域的智能运营服务,如:舆情风险挖掘、数据分析等。 零售大模型应用不仅提升了用户体验,优化了运营效率,还为零售行业的数智化转型提供了有力支撑,展现了大模型技术在零售领域广泛应用的巨大潜力和价值。", "segmentation_method": "reviewed_source_semantics", "label": "四、AI 智能体(AI Agent)", "source_line_range": [ 286, 365 ] } ], "ending": { "text": "服务,如:舆情风险挖掘、数据分析等。 零售大模型应用不仅提升了用户体验,优化了运营效率,还为零售行业的数智化转型提供了有力支撑,展现了大模型技术在零售领域广泛应用的巨大潜力和价值。" } } }, { "id": "article-046", "name": "复杂场景下的 RAG 架构演进", "url": "https://www.infoq.cn/article/d6zsusmd6pydv88qh6gz", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "复杂场景下的 RAG 架构演进:跨模态知识联邦与统一语义推理实践" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Kitty" ] }, { "id": "stable-3", "alternatives": [ "QCon全球软件开发大会" ] }, { "id": "stable-4", "alternatives": [ "首页" ] }, { "id": "stable-5", "alternatives": [ "AI会议" ] }, { "id": "stable-6", "alternatives": [ "AI课程" ] }, { "id": "stable-7", "alternatives": [ "AI应用" ] }, { "id": "stable-8", "alternatives": [ "报告" ] }, { "id": "stable-9", "alternatives": [ "HarmonyOS" ] }, { "id": "stable-10", "alternatives": [ "Snowflake" ] }, { "id": "stable-11", "alternatives": [ "更多" ] }, { "id": "stable-12", "alternatives": [ "写点什么" ] }, { "id": "stable-13", "alternatives": [ "登录" ] }, { "id": "stable-14", "alternatives": [ "企业动态" ] }, { "id": "stable-15", "alternatives": [ "行业深度" ] }, { "id": "stable-16", "alternatives": [ "AI&大模型" ] }, { "id": "stable-17", "alternatives": [ "出海" ] }, { "id": "stable-18", "alternatives": [ "后端" ] }, { "id": "stable-19", "alternatives": [ "芯片&算力" ] }, { "id": "stable-20", "alternatives": [ "架构" ] }, { "id": "stable-21", "alternatives": [ "大数据" ] }, { "id": "stable-22", "alternatives": [ "软件工程" ] }, { "id": "stable-23", "alternatives": [ "云计算" ] }, { "id": "stable-24", "alternatives": [ "大前端" ] }, { "id": "stable-25", "alternatives": [ "管理/文化" ] }, { "id": "stable-27", "alternatives": [ "轻点一下,留下你的鼓励" ] }, { "id": "stable-28", "alternatives": [ "评论" ] }, { "id": "stable-29", "alternatives": [ "发布" ] }, { "id": "stable-30", "alternatives": [ "延伸阅读——来自 InfoQ 精选" ] }, { "id": "stable-31", "alternatives": [ "换一换" ] }, { "id": "stable-32", "alternatives": [ "查看更多" ] }, { "id": "stable-33", "alternatives": [ "推荐阅读" ] }, { "id": "stable-34", "alternatives": [ "电子书" ] }, { "id": "stable-35", "alternatives": [ "大厂实战PPT下载" ] }, { "id": "stable-36", "alternatives": [ "立即下载" ] }, { "id": "stable-37", "alternatives": [ "促进软件开发及相关领域知识与创新的传播" ] }, { "id": "stable-38", "alternatives": [ "关于我们" ] }, { "id": "stable-39", "alternatives": [ "我要投稿" ] }, { "id": "stable-40", "alternatives": [ "合作伙伴" ] }, { "id": "stable-41", "alternatives": [ "加入我们" ] }, { "id": "stable-42", "alternatives": [ "关注我们" ] }, { "id": "stable-43", "alternatives": [ "联系我们" ] }, { "id": "stable-44", "alternatives": [ "内容投稿" ] }, { "id": "stable-45", "alternatives": [ "业务合作" ] }, { "id": "stable-46", "alternatives": [ "反馈投诉" ] }, { "id": "stable-47", "alternatives": [ "联系电话" ] }, { "id": "stable-48", "alternatives": [ "地址" ] }, { "id": "stable-49", "alternatives": [ "InfoQ 近期会议" ] }, { "id": "stable-50", "alternatives": [ "全球 InfoQ" ] }, { "id": "stable-51", "alternatives": [ "InfoQ En" ] }, { "id": "stable-52", "alternatives": [ "InfoQ Jp" ] }, { "id": "stable-53", "alternatives": [ "InfoQ Fr" ] }, { "id": "stable-54", "alternatives": [ "InfoQ Br" ] }, { "id": "stable-55", "alternatives": [ "产品资质" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "复杂场景下的 RAG 架构演进:跨模态知识联邦与统一语义推理实践" ], "html_selector": "h1.article-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-046/comment-qualification-reference-r5.json", "sha256": "6a3c6400ee156d2eb892c310564f43aa25dce15be749de2804b9c8988adfa09f", "chars": 779, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "随着大语言模型(LLM)与检索增强生成(RAG)技术的深度整合,知识库检索与问答系统已在智能客服、医疗辅助诊断、金融智能投研等场景实现规模化落地。然而,在企业级复杂知识交互场景中,传统 RAG 技术在诸如知识片断的语义关联与跨模态融合推理等方面遇到瓶颈。当检索到的文字内容散落于不同的段落、文档、以及不同的数据源时,如何能高效准确地检索并关联所有相关片段汇总准确生成最终答案?\n\n\n\n\n在 InfoQ 举办的 QCon 全球软件开发大会(北京站)上,枫清科技合伙人、智能平台事业部总经理王传阳分享了“复杂场景下的 RAG 架构演进:跨模态知识联邦与统一语义推理实践”,他深入剖析了基于跨模态知识联邦与统一语义推理的 RAG 架构,并结合生产实践分享实际应用成效,以及后续技术演进方向做了系统的分享。\n\n\n\n\n内容亮点\n\n\n\n\n面向复杂场景应用:聚焦企业级复杂知识交互,解决实际业务痛点\n\n跨模态知识联邦:突破传统 RAG 模态限制,实现多模态数据融合\n\n统一语义推理:提升知识关联和问答准确性,更智能\n\n\n\n\n预告:将于 10 月 23 - 25 召开的 QCon 上海站设计了「AI 搜索」专题,想要深入了解 AI 搜索的前沿技术、应用场景和未来发展趋势,拓宽技术视野,从实践案例中获得启发,并在自己的业务场景中实现更智能的搜索体验的同学不要错过。\n\n\n\n\n以下是演讲实录(经 InfoQ 进行不改变原意的编辑整理)。\n\nRAG 技术概览\n\n\n\n\n在大模型出现之初,我们发现其存在诸多问题,其中最典型的是“幻觉”现象。这是因为大模型在训练初期并未接触到最新的知识,而在应用大模型时,也未使其了解我们希望其掌握的最新知识。因此,当被问及较新的问题时,大模型很难获取到刚出现的知识,从而产生各种幻觉。这引发了我们思考如何让大模型了解这些知识。为此,我们通过在外部构建知识库,并利用 RAG(Retrieval-Augmented Generation)框架,使大模型能够获取相关上下文,对其进行润色后,最终返回给用户作为问题的答案。\n\n\n\n\nRAG 主要范式\n\n\n\n\n在 RAG 的演进过程中,出现了多种形态。从最初的朴素 RAG,到高级 RAG,再到模块化 RAG,其核心链路始终围绕三大步骤:索引、检索和内容生成。高级 RAG 在检索环节前后增加了更多处理,而模块化 RAG 则将这三大步骤进一步细化为五个不同的阶段,使每个部分都能更专注地进行理论和技术突破。例如,在索引部分,针对分块(chunk)的优化成为许多论文和框架的研究重点。基于模块化 RAG,可以衍生出适用于不同场景的多种 RAG 形态。此外,还有与组织编排相关的 graph RAG,利用知识图谱(knowledge graph)进行知识提取、实体与关系连接等操作,这些内容也都在相关图中得到了概括。\n\n\n\n\nRAG 主要使用场景\n\n\n\n\nRAG 在过去一段时间内的典型应用场景包括但不限于以下几种。在判断 RAG 是否适用时,关键在于该场景下的知识库或大模型是否需要参考一个动态频繁更新的知识库。如果需要,那么 RAG 几乎是必不可少的。虽然通过大模型微调或使用私有数据进行蒸馏也可以实现类似功能,但从成本和速度来看,RAG 的见效速度更快。例如在智能客服场景中,产品库会实时更新,通过 RAG 技术构建一个外部知识库,无论知识库如何变化,大模型都能随时从中提取最新产品的相关信息,以回答用户的问题。\n\n复杂场景挑战 一 异构知识\n\n\n\n\n在 RAG 的场景中,除了前面提到的一些简单场景,还会有各种复杂的场景,尤其是针对异构知识的处理。异构知识具有多种特点,今天主要聚焦于其中两个特点:结构的离散性和模态的多样性。\n\n结构的离散性\n\n\n\n\n异构知识的结构离散性是一个复杂问题。虽然“结构离散”这个词可能有些牵强,但异构知识确实存在这种特点,同步知识也可能面临类似问题。例如,相同主题的知识可能分散在不同的文档、媒介中,甚至可能出现在图片、文档、视频或关系型数据库中,它们可能都在描述同一件事情。如果要让大模型统一了解这些知识,就需要考虑如何实现。\n\n\n\n\n即使在同一个文档内部,知识离散性也是一个问题。例如,一个 200 页的 PDF 文档中,可能在第一页提到“我叫张三,今年多少岁,外号小三子”,而最后一页总结时提到“小三子这一生是辉煌的一生”。在这种情况下,如何让大模型理解“小三子”其实就是“张三”,并且在文档的不同部分建立联系,是一个现实问题。传统的 RAG 技术在处理这种问题时面临挑战,因为很难保证切片逻辑在语义上是连贯的,也无法将同一主题的内容切到一起。此外,切片大小也是一个问题。如果切片过大,会影响最终召回知识的准确度;切片过小,则会导致内容更加离散。同时,只要进行切片和向量入库,就很难保证跨文档知识的完整性。最终,用户很难获得关于某个知识主题的完整信息,大模型也无法以此为上下文回答用户的各种问题,通常只能给出片面的答案。\n\n模态的多样性\n\n\n\n\n模态多样性是导致结构离散的底层原因之一。知识的模态包括文本、音视频、图片、关系型数据库、表格等多种形式。传统 RAG 技术在过去主要处理文本数据,现在虽然有一些技术开始处理多模态数据,但从整体来看,很难有一个理想的 RAG 框架能够很好地处理各种多模态数据。这带来了两个主要问题:\n\n\n\n\n多模态检索:例如,提供一段文字,能够检索出相关的图片、视频、表格等不同模态的内容。\n\n跨模态检索:相对简单一些,例如提供一段文字,能够检索出相关的图片,或者反过来,输入一张图片,能够检索出相关联的文字。\n\n如何应对异构知识的挑战\n\n\n\n\n在面对这样的挑战时,我在制作 PPT 时尝试咨询了 DeepSeek 的观点,他们给出的回答和思考过程在大方向上是比较靠谱的。对于结构离散的问题,他们提到可以动态地将相关段落进行合并,这是一个很好的指导思想,但具体如何实现合并并没有详细说明。此外,他们还提到可以使用图结构或知识图谱来连接相关段落,这似乎是一个比较接近解决方案的方向。对于模态多样性的问题,他们指出需要处理不同模态的数据,这虽然是一个正确的方向,但感觉并没有深入展开。他们提到图像应该如何处理,文本应该如何处理,并且强调在处理完成后需要综合多模态信息,结合两者进行综合生成。从大方向上看,这些思路是没有问题的。不过,在细节上,如果基于这样的内容继续追问,DeepSeek 可能会提供更多的详细信息。\n\n\n\n\n基于融合知识库与统一语义层的 RAG 架构\n核心组件 —— 融合知识库\n\n\n\n\n融合知识库它主要是将左边散落的各种多元异构数据,包括指标、结构化数据、文档、图片等信息,通过知识融合技术整合到一个统一的融合知识库中。知识融合的过程涉及多种常用技术手段。例如,对于文档数据,会使用文档解析器和切片工具进行处理,并提取元数据。对于关系型数据库中的数据源,会提取其中的指标和元数据。此外,还会通过可视化工具帮助用户理解知识库中融合了哪些数据以及它们之间的关联关系。融合知识库中包含不同粒度、不同模态的数据,作为一个逻辑存储单元,位于架构的底层。整个过程实际上是将多模态数据转化为融合知识的过程。\n\n\n\n\n从技术形态和产品形态来看,融合知识库是一个逻辑概念。底层的物理存储保持不变,例如文档仍然存储在向量数据库中,关系型数据库的数据源(如 MySQL 或 PostgreSQL)仍然保留在原处,只是它们的元数据被抽取出来,以逻辑视图的形式存储在融合知识库中。\n\n\n\n\n从产品形态上来说,我们可以通过产品中的知识库模块向用户展示融合知识库的概念。例如,用户可以创建不同类型的单体知识库,如文档知识库、网页知识库、数据源知识库、指标知识库等,也可以创建一个融合知识库。创建融合知识库后,用户有两种选择:一是在空的融合知识库中新建文档库、指标库、图片库等,统一组织数据;二是将已有的文档库、指标库、数据源等导入融合知识库,以逻辑方式组织起来,形成新的融合知识库。此外,用户还可以在融合知识库中指定关注的领域模型,即关注的实体和关系。例如,在教育行业的融合知识库中,可以配置关注教师、试题、学生等与教学相关的实体及其关系,这为后续生成统一语义层做好铺垫。\n\n\n\n\n核心组件 —— 统一知识图谱:图谱生成\n\n\n\n\n统一知识图谱在使用时首先需要考虑的是如何生成,然后才是如何使用。生成统一知识图谱的过程可以通过一个图来理解。在图的最左边,我们有各种不同模态的数据,如文档、图片、视频和关系型数据库等。对于这些不同模态的数据,我们提取相应的元素放入知识图谱时,这些元素并不完全相同。\n\n\n\n\n对于文档数据,我们使用了简化版的 Graph RAG(例如 Graph RAG Light)来提取文档中的实体和关系。通常不会提取全部内容,因为这会带来较高的成本和性能问题。我们会指定关注的实体和关系,这与前面构建融合知识库时的业务问题和领域模型密切相关。如果在构建知识库时明确了要解决的业务问题和关注的领域模型,那么在提取文档内容时就会更有针对性和高效性。\n\n\n\n\n\n\n\n对于图片和视频,我们可以通过多模态大模型或客户已有的系统(这些系统在大模型时代之前就做过很多打标签等工作)来提取元信息,并将这些信息放入统一知识图谱中。对于关系型数据库,我们会提取各种元数据,例如数据表的用途、字段的业务含义等,并将这些信息也放入统一知识图谱中。在放入知识图谱的过程中,必然会涉及实体的合并以及关系的发现,最终形成一个完整统一的知识图谱。\n\n核心组件 —— 统一知识图谱:图谱检索\n\n\n\n\n有了这样一个知识图谱后,我们如何在框架中使用它呢?从用户问题出发,用户提出问题或表达任务需求时,我们会先在向量库中进行实体和关系的匹配,这其实是一种语义搜索。目的是理解用户问题中涉及的实体和关系类型。然后,我们会根据这些实体和关系,在统一知识图谱中进行 N 度扩展查询(例如二跳或三跳查询),以提取相关的子图。二跳或三跳查询的具体跳数可以根据实际需求配置,通常二跳查询已经足够,因为三跳查询可能会过于庞大。通过这种查询,我们可以关联出问题中相关的其他实体和关系,形成一个子图。\n\n\n\n\n\n\n\n这个子图必然涉及多模态信息,包括文本、关系型数据库以及音视频文件的元数据。基于这些元数据,我们从底层物理存储中提取具体的数据,并将其送入大模型进行润色和输出,从而为用户提供一个相对完整的答案。因此,这里的核心是基于统一知识图谱生成包含多模态信息的子图。\n\n与 GraphRAG 的对比\n\n\n\n\n在文本处理方面,我们会使用 GraphRAG 相关技术。大家可能会问,整个技术是否主要围绕 GraphRAG 展开,这种想法其实是有一定道理的。我们在文本处理上是站在巨人肩膀上的,但也做了一些改进。例如,通过指定实体和关系,减轻了 GraphRAG 盲目抽取的工作。这与其说是与 GraphRAG 的对比,不如说是对它的优化和改进。\n\n\n\n\n在多模态知识方面,GraphRAG 目前主要支持针对文本(如单篇或多篇文档)抽取实体关系并构建图谱。从算力角度讲,通过预先指定领域模型、实体或关系,可以让抽取过程更加聚焦。在冷启动难度上,我们提到的架构中,各种图表、指标等元数据的准备工作确实需要花费一些时间来整理并放入统一图谱中。在技术复杂度方面,我们对 GraphRAG 进行了纵向简化,没有使用其完整的链路。同时,在横向工程化方面进行了扩展,例如加入了元数据提取、多模态图片和视频识别等功能,构建了一个包含多模态信息的知识图谱。\n\n基于融合知识库与统一语义层的应用架构\n\n\n\n\n重新梳理一下我们提到的架构,两个关键词依然是融合知识库 和 统一语义层,它们都在这个架构图中得到了体现。下面是融合知识库,其中包含了各种不同粒度、不同模态的数据;上面则是统一语义层,包括统一语义库和统一知识图谱,为上层的语义服务提供支持。通常,我们会通过企业知识中台或其他平台来管理底层的统一语义层和融合知识库,进行优化和更新等工作。企业知识中台还能承上启下,为上层应用提供应用构建的支持。因为我们需要将底层的知识和数据转化为应用价值并落地,最终还是要通过具体的应用来实现。所以,企业知识中台在这里提供构建应用的能力,比如智能体应用、工作流应用等各种形式的应用。这些应用结合统一语义层和融合知识库构建而成,最终交付给客户并落地为具体的智能体。\n\n\n\n\n生产场景实践分享\n\n\n\n\n案例分享一:某医院电子病历查询与智能问答业务\n\n\n\n\n在生产场景中,我们有两个具体的实践案例,第一个是某医院的电子病历查询与智能问答业务。近年来,流行的呼吸道传染病频繁爆发,如甲流、乙流等,给医疗系统带来了巨大压力。患者看病时往往面临“看病 30 秒,排队 3 小时”的困境,而医生也希望能有一种更智能的方式,帮助他们快速回顾过去病人的症状、治疗方案和恢复情况,以便为当前患者提供更精准的治疗建议。\n\n\n\n\n具体场景是这样的:张三因流鼻涕和发热等症状来看病,医生将这些症状输入智能小助手,查询推荐的治疗方案。为此,我们采用了基于融合知识库与统一语义层的方案。融合知识库中包含了关系型数据库中的结构化数据(如患者信息、医嘱、住院记录)和电子病历中的文本数据。统一语义层则对医疗相关的概念进行了定义,例如“发热”是指体温在 37℃到 40℃之间,并描述了相关症状。\n\n\n\n\n在统一知识图谱中,我们构建了一个以患者为中心的图结构,包括医嘱、住院记录、手术记录等实体,并从电子病历文本中抽取病症、治疗措施和效果等信息,将其关联到图中。例如,一个患者节点下会关联具体的病症(如支气管炎)、治疗措施(如药物名称)和治疗效果(如康复情况)。\n\n\n\n\n在实际应用中,医生提出问题,如“张三有这些症状,需要一个治疗方案”,系统会根据时间范围(如过去一个月)进行语义搜索,找到相关实体和关系,并在知识图谱中提取子图。例如,系统会通过向量库快速检索与“发热”和“咳嗽”相关的患者记录,并结合电子病历中的详细信息,生成一个综合的治疗建议。最终,医生可以看到历史上类似患者的治疗方案,并据此为张三提供参考。\n\n\n\n\n案例分享二:某银行风险监管指标分析助手\n\n\n\n\n第二个案例的业务背景是银行的风险指标监管。银行已经建立了风险指标库,并希望通过传统 BI 系统以点击按钮等方式查询指标。目前,许多产品和解决方案已经支持通过自然语言查询指标,并在此基础上进行预测和分析,例如归因分析和辅助决策。然而,客户的需求不止于此。他们指出,指标不仅与数据有关,还与许多文档规定相关。例如,其他部门经常发送与指标和监管相关的文档,提醒指标应符合相关规定,或者通知指标算法的变更。这些文件可能会干扰指标系统的输出,这是真实场景中常见的问题。\n\n\n\n\n针对这些问题,客户提出了一个需求:在指标应用场景中,结合文档分析,综合进行指标查询和分析。具体效果是这样的:当查询“过去一个月的不良贷款率是多少”时,一般的指标系统可能只会返回 5.01% 的结果,更高级的系统会进一步分析相关数据的波动情况。但如果文档库中有一份文档明确规定不良贷款率不能高于 5%,并且这份文档被纳入知识库,那么当查询结果显示超过 5% 时,系统需要额外提示,显示具体的规定来源和内容,提醒业务人员注意这一问题。\n\n\n\n\n这种效果的实现基于我们之前提到的框架。具体来说,我们将融合知识库中的指标库和文档进行统一的元数据和数据实体抽取。在大模型进行指标分析时,通过提示词引导模型查看文档库中是否有相关的警告或规定。如果发现相关规定,模型会发出相应的警告或提示。这样,业务人员可以快速了解指标问题的根源,从而做出更准确的决策。\n\n未来演进方向展望\n\n\n\n\n在分享的场景中,虽然许多案例是成功的,但在实践过程中也确实存在一些挑战。从正面来看,这些挑战可以被视为未来展望的方向;反过来,也可以说目前这些方面还存在不足。以下从四个方面进行分享。\n\n\n\n\n统一语义层的动态更新\n\n\n\n\n这是一个非常实际的问题。由于使用了图(graph)和相关算法,图的更新,尤其是实时动态更新,并不容易。目前,虽然有一些工具或框架可以支持实时图更新和计算,但这些技术手段在一定程度上只能部分解决统一语义层动态更新的问题。\n\n图像、视频数据的高效处理\n\n\n\n\n目前,我们在处理图像和视频数据时,还停留在元数据阶段,没有将图像本身的数据与文本进行联合嵌入,也没有实现统一的召回。虽然我们一定会评估和考虑相关的技术手段,包括其性能和效果,但可以肯定的是,这是一个未来的发展方向。\n\n行业语义模型与行业图谱的赋能\n\n\n\n\n目前,企业通常需要依靠自身力量构建与自身业务相关的语义模型和图谱。如果同行业之间能够共享已有的行业语义模型,显然会对整个架构的发展起到很大的推动作用。然而,目前这方面的建设还相对薄弱。\n\n融合知识库的标准化和场景化\n\n\n\n\n在多个实践场景中,我们发现某些模态组合非常顺畅,能够体现很多场景价值,例如指标库与文档库的组合,或者文档库与关系型数据库的组合。然而,并非所有模态组合都能找到相关的应用场景,因此还需要进一步摸索。如果能够对这些组合进行更深入的分析并固化下来,例如建立一个“指标 + 文档”的知识库,那么在效率、性能等方面都可以进行有针对性的优化。这显然比开放式的自由组合更容易实现。\n\n\n\n\n这些挑战虽然存在,但也为未来的发展提供了方向。通过不断探索和改进,我们可以逐步克服这些问题,推动技术的进一步发展。\n\n\n\n\n嘉宾介绍\n\n王传阳,枫清科技(Fabarta)合伙人、智能平台事业部总经理,曾任 IBM 认知计算研究院企业数字化转型研发负责人,具备十余年软件开发与软件工程经验,以及丰富的图数据库与图算法应用实践与客户交付经验。\n\n\n\n\n演讲征集\n\n日前,由极客邦旗下 InfoQ 中国主办的 QCon 全球软件开发大会在北京圆满落幕。140 多场精彩演讲放送,直击行业痛点,为现场 1500+ 参会者传递可复制的经验与模式。10 月 23 - 25 日,QCon 上海站即将召开,如果你有相关案例想要分享,欢迎提交演讲申请。\n\n\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "随 着 大 语 言 模 型 llm 与 检 索 增 强 生 成 rag 技 术 的 深 度 整 合 知 识 库 检 索 与 问 答 系 统 已 在 智 能 客 服 医 疗 辅 助 诊 断 金 融 智 能 投 研 等 场 景 实 现 规 模 化 落 地 然 而 在 企 业 级 复 杂 知 识 交 互 场 景 中 传 统 rag 技 术 在 诸 如 知 识 片 断 的 语 义 关 联 与 跨 模 态 融 合 推 理 等 方 面 遇 到 瓶 颈 当 检 索 到 的 文 字 内 容 散 落 于 不 同 的 段 落 文 档 以 及 不 同 的 数 据 源 时 如 何 能 高 效 准 确 地 检 索 并 关 联 所 有 相 关 片 段 汇 总 准 确 生 成 最 终 答 案 在 infoq 举 办 的 qcon 全 球 软 件 开 发 大 会 北 京 站 上 枫 清 科 技 合 伙 人 智 能 平 台 事 业 部 总 经 理 王 传 阳 分 享 了 复 杂 场 景 下 的 rag 架 构 演 进 跨 模 态 知 识 联 邦 与 统 一 语 义 推 理 实 践 他 深 入 剖 析 了 基 于 跨 模 态 知 识 联 邦 与 统 一 语 义 推 理 的 rag 架 构 并 结 合 生 产 实 践 分 享 实 际 应 用 成 效 以 及 后 续 技 术 演 进 方 向 做 了 系 统 的 分 享 内 容 亮 点 面 向 复 杂 场 景 应 用 聚 焦 企 业 级 复 杂 知 识 交 互 解 决 实 际 业 务 痛 点 跨 模 态 知 识 联 邦 突 破 传 统 rag 模 态 限 制 实 现 多 模 态 数 据 融 合 统 一 语 义 推 理 提 升 知 识 关 联 和 问 答 准 确 性 更 智 能 预 告 将 于 10 月 23 25 召 开 的 qcon 上 海 站 设 计 了 ai 搜 索 专 题 想 要 深 入 了 解 ai 搜 索 的 前 沿 技 术 应 用 场 景 和 未 来 发 展 趋 势 拓 宽 技 术 视 野 从 实 践 案 例 中 获 得 启 发 并 在 自 己 的 业 务 场 景 中 实 现 更 智 能 的 搜 索 体 验 的 同 学 不 要 错 过 以 下 是 演 讲 实 录 经 infoq 进 行 不 改 变 原 意 的 编 辑 整 理 rag 技 术 概 览 在 大 模 型 出 现 之 初 我 们 发 现 其 存 在 诸 多 问 题 其 中 最 典 型 的 是 幻 觉 现 象 这 是 因 为 大 模 型 在 训 练 初 期 并 未 接 触 到 最 新 的 知 识 而 在 应 用 大 模 型 时 也 未 使 其 了 解 我 们 希 望 其 掌 握 的 最 新 知 识 因 此 当 被 问 及 较 新 的 问 题 时 大 模 型 很 难 获 取 到 刚 出 现 的 知 识 从 而 产 生 各 种 幻 觉 这 引 发 了 我 们 思 考 如 何 让 大 模 型 了 解 这 些 知 识 为 此 我 们 通 过 在 外 部 构 建 知 识 库 并 利 用 rag retrieval augmented generation 框 架 使 大 模 型 能 够 获 取 相 关 上 下 文 对 其 进 行 润 色 后 最 终 返 回 给 用 户 作 为 问 题 的 答 案 rag 主 要 范 式 在 rag 的 演 进 过 程 中 出 现 了 多 种 形 态 从 最 初 的 朴 素 rag 到 高 级 rag 再 到 模 块 化 rag 其 核 心 链 路 始 终 围 绕 三 大 步 骤 索 引 检 索 和 内 容 生 成 高 级 rag 在 检 索 环 节 前 后 增 加 了 更 多 处 理 而 模 块 化 rag 则 将 这 三 大 步 骤 进 一 步 细 化 为 五 个 不 同 的 阶 段 使 每 个 部 分 都 能 更 专 注 地 进 行 理 论 和 技 术 突 破 例 如 在 索 引 部 分 针 对 分 块 chunk 的 优 化 成 为 许 多 论 文 和 框 架 的 研 究 重 点 基 于 模 块 化 rag 可 以 衍 生 出 适 用 于 不 同 场 景 的 多 种 rag 形 态 此 外 还 有 与 组 织 编 排 相 关 的 graph rag 利 用 知 识 图 谱 knowledge graph 进 行 知 识 提 取 实 体 与 关 系 连 接 等 操 作 这 些 内 容 也 都 在 相 关 图 中 得 到 了 概 括 rag 主 要 使 用 场 景 rag 在 过 去 一 段 时 间 内 的 典 型 应 用 场 景 包 括 但 不 限 于 以 下 几 种 在 判 断 rag 是 否 适 用 时 关 键 在 于 该 场 景 下 的 知 识 库 或 大 模 型 是 否 需 要 参 考 一 个 动 态 频 繁 更 新 的 知 识 库 如 果 需 要 那 么 rag 几 乎 是 必 不 可 少 的 虽 然 通 过 大 模 型 微 调 或 使 用 私 有 数 据 进 行 蒸 馏 也 可 以 实 现 类 似 功 能 但 从 成 本 和 速 度 来 看 rag 的 见 效 速 度 更 快 例 如 在 智 能 客 服 场 景 中 产 品 库 会 实 时 更 新 通 过 rag 技 术 构 建 一 个 外 部 知 识 库 无 论 知 识 库 如 何 变 化 大 模 型 都 能 随 时 从 中 提 取 最 新 产 品 的 相 关 信 息 以 回 答 用 户 的 问 题 复 杂 场 景 挑 战 一 异 构 知 识", "source_text": "随着大语言模型(LLM)与检索增强生成(RAG)技术的深度整合,知识库检索与问答系统已在智能客服、医疗辅助诊断、金融智能投研等场景实现规模化落地。然而,在企业级复杂知识交互场景中,传统 RAG 技术在诸如知识片断的语义关联与跨模态融合推理等方面遇到瓶颈。当检索到的文字内容散落于不同的段落、文档、以及不同的数据源时,如何能高效准确地检索并关联所有相关片段汇总准确生成最终答案?\n\n\n\n\n在 InfoQ 举办的 QCon 全球软件开发大会(北京站)上,枫清科技合伙人、智能平台事业部总经理王传阳分享了“复杂场景下的 RAG 架构演进:跨模态知识联邦与统一语义推理实践”,他深入剖析了基于跨模态知识联邦与统一语义推理的 RAG 架构,并结合生产实践分享实际应用成效,以及后续技术演进方向做了系统的分享。\n\n\n\n\n内容亮点\n\n\n\n\n面向复杂场景应用:聚焦企业级复杂知识交互,解决实际业务痛点\n\n跨模态知识联邦:突破传统 RAG 模态限制,实现多模态数据融合\n\n统一语义推理:提升知识关联和问答准确性,更智能\n\n\n\n\n预告:将于 10 月 23 - 25 召开的 QCon 上海站设计了「AI 搜索」专题,想要深入了解 AI 搜索的前沿技术、应用场景和未来发展趋势,拓宽技术视野,从实践案例中获得启发,并在自己的业务场景中实现更智能的搜索体验的同学不要错过。\n\n\n\n\n以下是演讲实录(经 InfoQ 进行不改变原意的编辑整理)。\n\nRAG 技术概览\n\n\n\n\n在大模型出现之初,我们发现其存在诸多问题,其中最典型的是“幻觉”现象。这是因为大模型在训练初期并未接触到最新的知识,而在应用大模型时,也未使其了解我们希望其掌握的最新知识。因此,当被问及较新的问题时,大模型很难获取到刚出现的知识,从而产生各种幻觉。这引发了我们思考如何让大模型了解这些知识。为此,我们通过在外部构建知识库,并利用 RAG(Retrieval-Augmented Generation)框架,使大模型能够获取相关上下文,对其进行润色后,最终返回给用户作为问题的答案。\n\n\n\n\nRAG 主要范式\n\n\n\n\n在 RAG 的演进过程中,出现了多种形态。从最初的朴素 RAG,到高级 RAG,再到模块化 RAG,其核心链路始终围绕三大步骤:索引、检索和内容生成。高级 RAG 在检索环节前后增加了更多处理,而模块化 RAG 则将这三大步骤进一步细化为五个不同的阶段,使每个部分都能更专注地进行理论和技术突破。例如,在索引部分,针对分块(chunk)的优化成为许多论文和框架的研究重点。基于模块化 RAG,可以衍生出适用于不同场景的多种 RAG 形态。此外,还有与组织编排相关的 graph RAG,利用知识图谱(knowledge graph)进行知识提取、实体与关系连接等操作,这些内容也都在相关图中得到了概括。\n\n\n\n\nRAG 主要使用场景\n\n\n\n\nRAG 在过去一段时间内的典型应用场景包括但不限于以下几种。在判断 RAG 是否适用时,关键在于该场景下的知识库或大模型是否需要参考一个动态频繁更新的知识库。如果需要,那么 RAG 几乎是必不可少的。虽然通过大模型微调或使用私有数据进行蒸馏也可以实现类似功能,但从成本和速度来看,RAG 的见效速度更快。例如在智能客服场景中,产品库会实时更新,通过 RAG 技术构建一个外部知识库,无论知识库如何变化,大模型都能随时从中提取最新产品的相关信息,以回答用户的问题。\n\n复杂场景挑战 一 异构知识", "segmentation_method": "reviewed_source_semantics", "label": "开篇:随着大语言模型(LLM)与检索增强生成(RAG)技术的深度整合,知识库检索与问答系统已在智能客服、医疗辅助诊断、金融智能 — 段落/内容单元:复杂场景挑战 一 异构知识", "source_line_range": [ 1, 63 ] }, { "id": "body-region-2", "text": "在 rag 的 场 景 中 除 了 前 面 提 到 的 一 些 简 单 场 景 还 会 有 各 种 复 杂 的 场 景 尤 其 是 针 对 异 构 知 识 的 处 理 异 构 知 识 具 有 多 种 特 点 今 天 主 要 聚 焦 于 其 中 两 个 特 点 结 构 的 离 散 性 和 模 态 的 多 样 性 结 构 的 离 散 性 异 构 知 识 的 结 构 离 散 性 是 一 个 复 杂 问 题 虽 然 结 构 离 散 这 个 词 可 能 有 些 牵 强 但 异 构 知 识 确 实 存 在 这 种 特 点 同 步 知 识 也 可 能 面 临 类 似 问 题 例 如 相 同 主 题 的 知 识 可 能 分 散 在 不 同 的 文 档 媒 介 中 甚 至 可 能 出 现 在 图 片 文 档 视 频 或 关 系 型 数 据 库 中 它 们 可 能 都 在 描 述 同 一 件 事 情 如 果 要 让 大 模 型 统 一 了 解 这 些 知 识 就 需 要 考 虑 如 何 实 现 即 使 在 同 一 个 文 档 内 部 知 识 离 散 性 也 是 一 个 问 题 例 如 一 个 200 页 的 pdf 文 档 中 可 能 在 第 一 页 提 到 我 叫 张 三 今 年 多 少 岁 外 号 小 三 子 而 最 后 一 页 总 结 时 提 到 小 三 子 这 一 生 是 辉 煌 的 一 生 在 这 种 情 况 下 如 何 让 大 模 型 理 解 小 三 子 其 实 就 是 张 三 并 且 在 文 档 的 不 同 部 分 建 立 联 系 是 一 个 现 实 问 题 传 统 的 rag 技 术 在 处 理 这 种 问 题 时 面 临 挑 战 因 为 很 难 保 证 切 片 逻 辑 在 语 义 上 是 连 贯 的 也 无 法 将 同 一 主 题 的 内 容 切 到 一 起 此 外 切 片 大 小 也 是 一 个 问 题 如 果 切 片 过 大 会 影 响 最 终 召 回 知 识 的 准 确 度 切 片 过 小 则 会 导 致 内 容 更 加 离 散 同 时 只 要 进 行 切 片 和 向 量 入 库 就 很 难 保 证 跨 文 档 知 识 的 完 整 性 最 终 用 户 很 难 获 得 关 于 某 个 知 识 主 题 的 完 整 信 息 大 模 型 也 无 法 以 此 为 上 下 文 回 答 用 户 的 各 种 问 题 通 常 只 能 给 出 片 面 的 答 案 模 态 的 多 样 性 模 态 多 样 性 是 导 致 结 构 离 散 的 底 层 原 因 之 一 知 识 的 模 态 包 括 文 本 音 视 频 图 片 关 系 型 数 据 库 表 格 等 多 种 形 式 传 统 rag 技 术 在 过 去 主 要 处 理 文 本 数 据 现 在 虽 然 有 一 些 技 术 开 始 处 理 多 模 态 数 据 但 从 整 体 来 看 很 难 有 一 个 理 想 的 rag 框 架 能 够 很 好 地 处 理 各 种 多 模 态 数 据 这 带 来 了 两 个 主 要 问 题 多 模 态 检 索 例 如 提 供 一 段 文 字 能 够 检 索 出 相 关 的 图 片 视 频 表 格 等 不 同 模 态 的 内 容 跨 模 态 检 索 相 对 简 单 一 些 例 如 提 供 一 段 文 字 能 够 检 索 出 相 关 的 图 片 或 者 反 过 来 输 入 一 张 图 片 能 够 检 索 出 相 关 联 的 文 字 如 何 应 对 异 构 知 识 的 挑 战 在 面 对 这 样 的 挑 战 时 我 在 制 作 ppt 时 尝 试 咨 询 了 deepseek 的 观 点 他 们 给 出 的 回 答 和 思 考 过 程 在 大 方 向 上 是 比 较 靠 谱 的 对 于 结 构 离 散 的 问 题 他 们 提 到 可 以 动 态 地 将 相 关 段 落 进 行 合 并 这 是 一 个 很 好 的 指 导 思 想 但 具 体 如 何 实 现 合 并 并 没 有 详 细 说 明 此 外 他 们 还 提 到 可 以 使 用 图 结 构 或 知 识 图 谱 来 连 接 相 关 段 落 这 似 乎 是 一 个 比 较 接 近 解 决 方 案 的 方 向 对 于 模 态 多 样 性 的 问 题 他 们 指 出 需 要 处 理 不 同 模 态 的 数 据 这 虽 然 是 一 个 正 确 的 方 向 但 感 觉 并 没 有 深 入 展 开 他 们 提 到 图 像 应 该 如 何 处 理 文 本 应 该 如 何 处 理 并 且 强 调 在 处 理 完 成 后 需 要 综 合 多 模 态 信 息 结 合 两 者 进 行 综 合 生 成 从 大 方 向 上 看 这 些 思 路 是 没 有 问 题 的 不 过 在 细 节 上 如 果 基 于 这 样 的 内 容 继 续 追 问 deepseek 可 能 会 提 供 更 多 的 详 细 信 息 基 于 融 合 知 识 库 与 统 一 语 义 层 的 rag 架 构 核 心 组 件 融 合 知 识 库 融 合 知 识 库 它 主 要 是 将 左 边 散 落 的 各 种 多 元 异 构 数 据 包 括 指 标 结 构 化 数 据 文 档 图 片 等 信 息 通 过 知 识 融 合 技 术 整 合 到 一 个 统 一 的 融 合 知 识 库 中 知 识 融 合 的 过 程 涉 及 多 种 常 用 技 术 手 段 例 如 对 于 文 档 数 据 会 使 用 文 档 解 析 器 和 切 片 工 具 进 行 处 理 并 提 取 元 数 据 对 于 关 系 型 数 据 库 中 的 数 据 源 会 提 取 其 中 的 指 标 和 元 数 据 此 外 还 会 通 过 可 视 化 工 具 帮 助 用 户 理 解 知 识 库 中 融 合 了 哪 些 数 据 以 及 它 们 之 间 的 关 联 关 系 融 合 知 识 库 中 包 含 不 同 粒 度 不 同 模 态 的 数 据 作 为 一 个 逻 辑 存 储 单 元 位 于 架 构 的 底 层 整 个 过 程 实 际 上 是 将 多 模 态 数 据 转 化 为 融 合 知 识 的 过 程", "source_text": "在 RAG 的场景中,除了前面提到的一些简单场景,还会有各种复杂的场景,尤其是针对异构知识的处理。异构知识具有多种特点,今天主要聚焦于其中两个特点:结构的离散性和模态的多样性。\n\n结构的离散性\n\n\n\n\n异构知识的结构离散性是一个复杂问题。虽然“结构离散”这个词可能有些牵强,但异构知识确实存在这种特点,同步知识也可能面临类似问题。例如,相同主题的知识可能分散在不同的文档、媒介中,甚至可能出现在图片、文档、视频或关系型数据库中,它们可能都在描述同一件事情。如果要让大模型统一了解这些知识,就需要考虑如何实现。\n\n\n\n\n即使在同一个文档内部,知识离散性也是一个问题。例如,一个 200 页的 PDF 文档中,可能在第一页提到“我叫张三,今年多少岁,外号小三子”,而最后一页总结时提到“小三子这一生是辉煌的一生”。在这种情况下,如何让大模型理解“小三子”其实就是“张三”,并且在文档的不同部分建立联系,是一个现实问题。传统的 RAG 技术在处理这种问题时面临挑战,因为很难保证切片逻辑在语义上是连贯的,也无法将同一主题的内容切到一起。此外,切片大小也是一个问题。如果切片过大,会影响最终召回知识的准确度;切片过小,则会导致内容更加离散。同时,只要进行切片和向量入库,就很难保证跨文档知识的完整性。最终,用户很难获得关于某个知识主题的完整信息,大模型也无法以此为上下文回答用户的各种问题,通常只能给出片面的答案。\n\n模态的多样性\n\n\n\n\n模态多样性是导致结构离散的底层原因之一。知识的模态包括文本、音视频、图片、关系型数据库、表格等多种形式。传统 RAG 技术在过去主要处理文本数据,现在虽然有一些技术开始处理多模态数据,但从整体来看,很难有一个理想的 RAG 框架能够很好地处理各种多模态数据。这带来了两个主要问题:\n\n\n\n\n多模态检索:例如,提供一段文字,能够检索出相关的图片、视频、表格等不同模态的内容。\n\n跨模态检索:相对简单一些,例如提供一段文字,能够检索出相关的图片,或者反过来,输入一张图片,能够检索出相关联的文字。\n\n如何应对异构知识的挑战\n\n\n\n\n在面对这样的挑战时,我在制作 PPT 时尝试咨询了 DeepSeek 的观点,他们给出的回答和思考过程在大方向上是比较靠谱的。对于结构离散的问题,他们提到可以动态地将相关段落进行合并,这是一个很好的指导思想,但具体如何实现合并并没有详细说明。此外,他们还提到可以使用图结构或知识图谱来连接相关段落,这似乎是一个比较接近解决方案的方向。对于模态多样性的问题,他们指出需要处理不同模态的数据,这虽然是一个正确的方向,但感觉并没有深入展开。他们提到图像应该如何处理,文本应该如何处理,并且强调在处理完成后需要综合多模态信息,结合两者进行综合生成。从大方向上看,这些思路是没有问题的。不过,在细节上,如果基于这样的内容继续追问,DeepSeek 可能会提供更多的详细信息。\n\n\n\n\n基于融合知识库与统一语义层的 RAG 架构\n核心组件 —— 融合知识库\n\n\n\n\n融合知识库它主要是将左边散落的各种多元异构数据,包括指标、结构化数据、文档、图片等信息,通过知识融合技术整合到一个统一的融合知识库中。知识融合的过程涉及多种常用技术手段。例如,对于文档数据,会使用文档解析器和切片工具进行处理,并提取元数据。对于关系型数据库中的数据源,会提取其中的指标和元数据。此外,还会通过可视化工具帮助用户理解知识库中融合了哪些数据以及它们之间的关联关系。融合知识库中包含不同粒度、不同模态的数据,作为一个逻辑存储单元,位于架构的底层。整个过程实际上是将多模态数据转化为融合知识的过程。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:在 RAG 的场景中,除了前面提到的一些简单场景,还会有各种复杂的场景,尤其是针对异构知识的处理。异构知识具有多种特点, — 段落/内容单元:融合知识库它主要是将左边散落的各种多元异构数据,包括指标、结构化数据、文档、图片等信息,通过知识融合技术整合到一个统一的", "source_line_range": [ 64, 112 ] }, { "id": "body-region-3", "text": "从 技 术 形 态 和 产 品 形 态 来 看 融 合 知 识 库 是 一 个 逻 辑 概 念 底 层 的 物 理 存 储 保 持 不 变 例 如 文 档 仍 然 存 储 在 向 量 数 据 库 中 关 系 型 数 据 库 的 数 据 源 如 mysql 或 postgresql 仍 然 保 留 在 原 处 只 是 它 们 的 元 数 据 被 抽 取 出 来 以 逻 辑 视 图 的 形 式 存 储 在 融 合 知 识 库 中 从 产 品 形 态 上 来 说 我 们 可 以 通 过 产 品 中 的 知 识 库 模 块 向 用 户 展 示 融 合 知 识 库 的 概 念 例 如 用 户 可 以 创 建 不 同 类 型 的 单 体 知 识 库 如 文 档 知 识 库 网 页 知 识 库 数 据 源 知 识 库 指 标 知 识 库 等 也 可 以 创 建 一 个 融 合 知 识 库 创 建 融 合 知 识 库 后 用 户 有 两 种 选 择 一 是 在 空 的 融 合 知 识 库 中 新 建 文 档 库 指 标 库 图 片 库 等 统 一 组 织 数 据 二 是 将 已 有 的 文 档 库 指 标 库 数 据 源 等 导 入 融 合 知 识 库 以 逻 辑 方 式 组 织 起 来 形 成 新 的 融 合 知 识 库 此 外 用 户 还 可 以 在 融 合 知 识 库 中 指 定 关 注 的 领 域 模 型 即 关 注 的 实 体 和 关 系 例 如 在 教 育 行 业 的 融 合 知 识 库 中 可 以 配 置 关 注 教 师 试 题 学 生 等 与 教 学 相 关 的 实 体 及 其 关 系 这 为 后 续 生 成 统 一 语 义 层 做 好 铺 垫 核 心 组 件 统 一 知 识 图 谱 图 谱 生 成 统 一 知 识 图 谱 在 使 用 时 首 先 需 要 考 虑 的 是 如 何 生 成 然 后 才 是 如 何 使 用 生 成 统 一 知 识 图 谱 的 过 程 可 以 通 过 一 个 图 来 理 解 在 图 的 最 左 边 我 们 有 各 种 不 同 模 态 的 数 据 如 文 档 图 片 视 频 和 关 系 型 数 据 库 等 对 于 这 些 不 同 模 态 的 数 据 我 们 提 取 相 应 的 元 素 放 入 知 识 图 谱 时 这 些 元 素 并 不 完 全 相 同 对 于 文 档 数 据 我 们 使 用 了 简 化 版 的 graph rag 例 如 graph rag light 来 提 取 文 档 中 的 实 体 和 关 系 通 常 不 会 提 取 全 部 内 容 因 为 这 会 带 来 较 高 的 成 本 和 性 能 问 题 我 们 会 指 定 关 注 的 实 体 和 关 系 这 与 前 面 构 建 融 合 知 识 库 时 的 业 务 问 题 和 领 域 模 型 密 切 相 关 如 果 在 构 建 知 识 库 时 明 确 了 要 解 决 的 业 务 问 题 和 关 注 的 领 域 模 型 那 么 在 提 取 文 档 内 容 时 就 会 更 有 针 对 性 和 高 效 性 对 于 图 片 和 视 频 我 们 可 以 通 过 多 模 态 大 模 型 或 客 户 已 有 的 系 统 这 些 系 统 在 大 模 型 时 代 之 前 就 做 过 很 多 打 标 签 等 工 作 来 提 取 元 信 息 并 将 这 些 信 息 放 入 统 一 知 识 图 谱 中 对 于 关 系 型 数 据 库 我 们 会 提 取 各 种 元 数 据 例 如 数 据 表 的 用 途 字 段 的 业 务 含 义 等 并 将 这 些 信 息 也 放 入 统 一 知 识 图 谱 中 在 放 入 知 识 图 谱 的 过 程 中 必 然 会 涉 及 实 体 的 合 并 以 及 关 系 的 发 现 最 终 形 成 一 个 完 整 统 一 的 知 识 图 谱 核 心 组 件 统 一 知 识 图 谱 图 谱 检 索 有 了 这 样 一 个 知 识 图 谱 后 我 们 如 何 在 框 架 中 使 用 它 呢 从 用 户 问 题 出 发 用 户 提 出 问 题 或 表 达 任 务 需 求 时 我 们 会 先 在 向 量 库 中 进 行 实 体 和 关 系 的 匹 配 这 其 实 是 一 种 语 义 搜 索 目 的 是 理 解 用 户 问 题 中 涉 及 的 实 体 和 关 系 类 型 然 后 我 们 会 根 据 这 些 实 体 和 关 系 在 统 一 知 识 图 谱 中 进 行 n 度 扩 展 查 询 例 如 二 跳 或 三 跳 查 询 以 提 取 相 关 的 子 图 二 跳 或 三 跳 查 询 的 具 体 跳 数 可 以 根 据 实 际 需 求 配 置 通 常 二 跳 查 询 已 经 足 够 因 为 三 跳 查 询 可 能 会 过 于 庞 大 通 过 这 种 查 询 我 们 可 以 关 联 出 问 题 中 相 关 的 其 他 实 体 和 关 系 形 成 一 个 子 图 这 个 子 图 必 然 涉 及 多 模 态 信 息 包 括 文 本 关 系 型 数 据 库 以 及 音 视 频 文 件 的 元 数 据 基 于 这 些 元 数 据 我 们 从 底 层 物 理 存 储 中 提 取 具 体 的 数 据 并 将 其 送 入 大 模 型 进 行 润 色 和 输 出 从 而 为 用 户 提 供 一 个 相 对 完 整 的 答 案 因 此 这 里 的 核 心 是 基 于 统 一 知 识 图 谱 生 成 包 含 多 模 态 信 息 的 子 图 与 graphrag 的 对 比 在 文 本 处 理 方 面 我 们 会 使 用 graphrag 相 关 技 术 大 家 可 能 会 问 整 个 技 术 是 否 主 要 围 绕 graphrag 展 开 这 种 想 法 其 实 是 有 一 定 道 理 的 我 们 在 文 本 处 理 上 是 站 在 巨 人 肩 膀 上 的 但 也 做 了 一 些 改 进 例 如 通 过 指 定 实 体 和 关 系 减 轻 了 graphrag 盲 目 抽 取 的 工 作 这 与 其 说 是 与 graphrag 的 对 比 不 如 说 是 对 它 的 优 化 和 改 进", "source_text": "从技术形态和产品形态来看,融合知识库是一个逻辑概念。底层的物理存储保持不变,例如文档仍然存储在向量数据库中,关系型数据库的数据源(如 MySQL 或 PostgreSQL)仍然保留在原处,只是它们的元数据被抽取出来,以逻辑视图的形式存储在融合知识库中。\n\n\n\n\n从产品形态上来说,我们可以通过产品中的知识库模块向用户展示融合知识库的概念。例如,用户可以创建不同类型的单体知识库,如文档知识库、网页知识库、数据源知识库、指标知识库等,也可以创建一个融合知识库。创建融合知识库后,用户有两种选择:一是在空的融合知识库中新建文档库、指标库、图片库等,统一组织数据;二是将已有的文档库、指标库、数据源等导入融合知识库,以逻辑方式组织起来,形成新的融合知识库。此外,用户还可以在融合知识库中指定关注的领域模型,即关注的实体和关系。例如,在教育行业的融合知识库中,可以配置关注教师、试题、学生等与教学相关的实体及其关系,这为后续生成统一语义层做好铺垫。\n\n\n\n\n核心组件 —— 统一知识图谱:图谱生成\n\n\n\n\n统一知识图谱在使用时首先需要考虑的是如何生成,然后才是如何使用。生成统一知识图谱的过程可以通过一个图来理解。在图的最左边,我们有各种不同模态的数据,如文档、图片、视频和关系型数据库等。对于这些不同模态的数据,我们提取相应的元素放入知识图谱时,这些元素并不完全相同。\n\n\n\n\n对于文档数据,我们使用了简化版的 Graph RAG(例如 Graph RAG Light)来提取文档中的实体和关系。通常不会提取全部内容,因为这会带来较高的成本和性能问题。我们会指定关注的实体和关系,这与前面构建融合知识库时的业务问题和领域模型密切相关。如果在构建知识库时明确了要解决的业务问题和关注的领域模型,那么在提取文档内容时就会更有针对性和高效性。\n\n\n\n\n\n\n\n对于图片和视频,我们可以通过多模态大模型或客户已有的系统(这些系统在大模型时代之前就做过很多打标签等工作)来提取元信息,并将这些信息放入统一知识图谱中。对于关系型数据库,我们会提取各种元数据,例如数据表的用途、字段的业务含义等,并将这些信息也放入统一知识图谱中。在放入知识图谱的过程中,必然会涉及实体的合并以及关系的发现,最终形成一个完整统一的知识图谱。\n\n核心组件 —— 统一知识图谱:图谱检索\n\n\n\n\n有了这样一个知识图谱后,我们如何在框架中使用它呢?从用户问题出发,用户提出问题或表达任务需求时,我们会先在向量库中进行实体和关系的匹配,这其实是一种语义搜索。目的是理解用户问题中涉及的实体和关系类型。然后,我们会根据这些实体和关系,在统一知识图谱中进行 N 度扩展查询(例如二跳或三跳查询),以提取相关的子图。二跳或三跳查询的具体跳数可以根据实际需求配置,通常二跳查询已经足够,因为三跳查询可能会过于庞大。通过这种查询,我们可以关联出问题中相关的其他实体和关系,形成一个子图。\n\n\n\n\n\n\n\n这个子图必然涉及多模态信息,包括文本、关系型数据库以及音视频文件的元数据。基于这些元数据,我们从底层物理存储中提取具体的数据,并将其送入大模型进行润色和输出,从而为用户提供一个相对完整的答案。因此,这里的核心是基于统一知识图谱生成包含多模态信息的子图。\n\n与 GraphRAG 的对比\n\n\n\n\n在文本处理方面,我们会使用 GraphRAG 相关技术。大家可能会问,整个技术是否主要围绕 GraphRAG 展开,这种想法其实是有一定道理的。我们在文本处理上是站在巨人肩膀上的,但也做了一些改进。例如,通过指定实体和关系,减轻了 GraphRAG 盲目抽取的工作。这与其说是与 GraphRAG 的对比,不如说是对它的优化和改进。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:从技术形态和产品形态来看,融合知识库是一个逻辑概念。底层的物理存储保持不变,例如文档仍然存储在向量数据库中,关系型数据库 — 段落/内容单元:在文本处理方面,我们会使用 GraphRAG 相关技术。大家可能会问,整个技术是否主要围绕 GraphRAG 展开,这种", "source_line_range": [ 113, 167 ] }, { "id": "body-region-4", "text": "在 多 模 态 知 识 方 面 graphrag 目 前 主 要 支 持 针 对 文 本 如 单 篇 或 多 篇 文 档 抽 取 实 体 关 系 并 构 建 图 谱 从 算 力 角 度 讲 通 过 预 先 指 定 领 域 模 型 实 体 或 关 系 可 以 让 抽 取 过 程 更 加 聚 焦 在 冷 启 动 难 度 上 我 们 提 到 的 架 构 中 各 种 图 表 指 标 等 元 数 据 的 准 备 工 作 确 实 需 要 花 费 一 些 时 间 来 整 理 并 放 入 统 一 图 谱 中 在 技 术 复 杂 度 方 面 我 们 对 graphrag 进 行 了 纵 向 简 化 没 有 使 用 其 完 整 的 链 路 同 时 在 横 向 工 程 化 方 面 进 行 了 扩 展 例 如 加 入 了 元 数 据 提 取 多 模 态 图 片 和 视 频 识 别 等 功 能 构 建 了 一 个 包 含 多 模 态 信 息 的 知 识 图 谱 基 于 融 合 知 识 库 与 统 一 语 义 层 的 应 用 架 构 重 新 梳 理 一 下 我 们 提 到 的 架 构 两 个 关 键 词 依 然 是 融 合 知 识 库 和 统 一 语 义 层 它 们 都 在 这 个 架 构 图 中 得 到 了 体 现 下 面 是 融 合 知 识 库 其 中 包 含 了 各 种 不 同 粒 度 不 同 模 态 的 数 据 上 面 则 是 统 一 语 义 层 包 括 统 一 语 义 库 和 统 一 知 识 图 谱 为 上 层 的 语 义 服 务 提 供 支 持 通 常 我 们 会 通 过 企 业 知 识 中 台 或 其 他 平 台 来 管 理 底 层 的 统 一 语 义 层 和 融 合 知 识 库 进 行 优 化 和 更 新 等 工 作 企 业 知 识 中 台 还 能 承 上 启 下 为 上 层 应 用 提 供 应 用 构 建 的 支 持 因 为 我 们 需 要 将 底 层 的 知 识 和 数 据 转 化 为 应 用 价 值 并 落 地 最 终 还 是 要 通 过 具 体 的 应 用 来 实 现 所 以 企 业 知 识 中 台 在 这 里 提 供 构 建 应 用 的 能 力 比 如 智 能 体 应 用 工 作 流 应 用 等 各 种 形 式 的 应 用 这 些 应 用 结 合 统 一 语 义 层 和 融 合 知 识 库 构 建 而 成 最 终 交 付 给 客 户 并 落 地 为 具 体 的 智 能 体 生 产 场 景 实 践 分 享 案 例 分 享 一 某 医 院 电 子 病 历 查 询 与 智 能 问 答 业 务 在 生 产 场 景 中 我 们 有 两 个 具 体 的 实 践 案 例 第 一 个 是 某 医 院 的 电 子 病 历 查 询 与 智 能 问 答 业 务 近 年 来 流 行 的 呼 吸 道 传 染 病 频 繁 爆 发 如 甲 流 乙 流 等 给 医 疗 系 统 带 来 了 巨 大 压 力 患 者 看 病 时 往 往 面 临 看 病 30 秒 排 队 3 小 时 的 困 境 而 医 生 也 希 望 能 有 一 种 更 智 能 的 方 式 帮 助 他 们 快 速 回 顾 过 去 病 人 的 症 状 治 疗 方 案 和 恢 复 情 况 以 便 为 当 前 患 者 提 供 更 精 准 的 治 疗 建 议 具 体 场 景 是 这 样 的 张 三 因 流 鼻 涕 和 发 热 等 症 状 来 看 病 医 生 将 这 些 症 状 输 入 智 能 小 助 手 查 询 推 荐 的 治 疗 方 案 为 此 我 们 采 用 了 基 于 融 合 知 识 库 与 统 一 语 义 层 的 方 案 融 合 知 识 库 中 包 含 了 关 系 型 数 据 库 中 的 结 构 化 数 据 如 患 者 信 息 医 嘱 住 院 记 录 和 电 子 病 历 中 的 文 本 数 据 统 一 语 义 层 则 对 医 疗 相 关 的 概 念 进 行 了 定 义 例 如 发 热 是 指 体 温 在 37 c 到 40 c 之 间 并 描 述 了 相 关 症 状 在 统 一 知 识 图 谱 中 我 们 构 建 了 一 个 以 患 者 为 中 心 的 图 结 构 包 括 医 嘱 住 院 记 录 手 术 记 录 等 实 体 并 从 电 子 病 历 文 本 中 抽 取 病 症 治 疗 措 施 和 效 果 等 信 息 将 其 关 联 到 图 中 例 如 一 个 患 者 节 点 下 会 关 联 具 体 的 病 症 如 支 气 管 炎 治 疗 措 施 如 药 物 名 称 和 治 疗 效 果 如 康 复 情 况 在 实 际 应 用 中 医 生 提 出 问 题 如 张 三 有 这 些 症 状 需 要 一 个 治 疗 方 案 系 统 会 根 据 时 间 范 围 如 过 去 一 个 月 进 行 语 义 搜 索 找 到 相 关 实 体 和 关 系 并 在 知 识 图 谱 中 提 取 子 图 例 如 系 统 会 通 过 向 量 库 快 速 检 索 与 发 热 和 咳 嗽 相 关 的 患 者 记 录 并 结 合 电 子 病 历 中 的 详 细 信 息 生 成 一 个 综 合 的 治 疗 建 议 最 终 医 生 可 以 看 到 历 史 上 类 似 患 者 的 治 疗 方 案 并 据 此 为 张 三 提 供 参 考 案 例 分 享 二 某 银 行 风 险 监 管 指 标 分 析 助 手", "source_text": "在多模态知识方面,GraphRAG 目前主要支持针对文本(如单篇或多篇文档)抽取实体关系并构建图谱。从算力角度讲,通过预先指定领域模型、实体或关系,可以让抽取过程更加聚焦。在冷启动难度上,我们提到的架构中,各种图表、指标等元数据的准备工作确实需要花费一些时间来整理并放入统一图谱中。在技术复杂度方面,我们对 GraphRAG 进行了纵向简化,没有使用其完整的链路。同时,在横向工程化方面进行了扩展,例如加入了元数据提取、多模态图片和视频识别等功能,构建了一个包含多模态信息的知识图谱。\n\n基于融合知识库与统一语义层的应用架构\n\n\n\n\n重新梳理一下我们提到的架构,两个关键词依然是融合知识库 和 统一语义层,它们都在这个架构图中得到了体现。下面是融合知识库,其中包含了各种不同粒度、不同模态的数据;上面则是统一语义层,包括统一语义库和统一知识图谱,为上层的语义服务提供支持。通常,我们会通过企业知识中台或其他平台来管理底层的统一语义层和融合知识库,进行优化和更新等工作。企业知识中台还能承上启下,为上层应用提供应用构建的支持。因为我们需要将底层的知识和数据转化为应用价值并落地,最终还是要通过具体的应用来实现。所以,企业知识中台在这里提供构建应用的能力,比如智能体应用、工作流应用等各种形式的应用。这些应用结合统一语义层和融合知识库构建而成,最终交付给客户并落地为具体的智能体。\n\n\n\n\n生产场景实践分享\n\n\n\n\n案例分享一:某医院电子病历查询与智能问答业务\n\n\n\n\n在生产场景中,我们有两个具体的实践案例,第一个是某医院的电子病历查询与智能问答业务。近年来,流行的呼吸道传染病频繁爆发,如甲流、乙流等,给医疗系统带来了巨大压力。患者看病时往往面临“看病 30 秒,排队 3 小时”的困境,而医生也希望能有一种更智能的方式,帮助他们快速回顾过去病人的症状、治疗方案和恢复情况,以便为当前患者提供更精准的治疗建议。\n\n\n\n\n具体场景是这样的:张三因流鼻涕和发热等症状来看病,医生将这些症状输入智能小助手,查询推荐的治疗方案。为此,我们采用了基于融合知识库与统一语义层的方案。融合知识库中包含了关系型数据库中的结构化数据(如患者信息、医嘱、住院记录)和电子病历中的文本数据。统一语义层则对医疗相关的概念进行了定义,例如“发热”是指体温在 37℃到 40℃之间,并描述了相关症状。\n\n\n\n\n在统一知识图谱中,我们构建了一个以患者为中心的图结构,包括医嘱、住院记录、手术记录等实体,并从电子病历文本中抽取病症、治疗措施和效果等信息,将其关联到图中。例如,一个患者节点下会关联具体的病症(如支气管炎)、治疗措施(如药物名称)和治疗效果(如康复情况)。\n\n\n\n\n在实际应用中,医生提出问题,如“张三有这些症状,需要一个治疗方案”,系统会根据时间范围(如过去一个月)进行语义搜索,找到相关实体和关系,并在知识图谱中提取子图。例如,系统会通过向量库快速检索与“发热”和“咳嗽”相关的患者记录,并结合电子病历中的详细信息,生成一个综合的治疗建议。最终,医生可以看到历史上类似患者的治疗方案,并据此为张三提供参考。\n\n\n\n\n案例分享二:某银行风险监管指标分析助手", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:在多模态知识方面,GraphRAG 目前主要支持针对文本(如单篇或多篇文档)抽取实体关系并构建图谱。从算力角度讲,通过预 — 段落/内容单元:案例分享二:某银行风险监管指标分析助手", "source_line_range": [ 168, 214 ] }, { "id": "body-region-5", "text": "第 二 个 案 例 的 业 务 背 景 是 银 行 的 风 险 指 标 监 管 银 行 已 经 建 立 了 风 险 指 标 库 并 希 望 通 过 传 统 bi 系 统 以 点 击 按 钮 等 方 式 查 询 指 标 目 前 许 多 产 品 和 解 决 方 案 已 经 支 持 通 过 自 然 语 言 查 询 指 标 并 在 此 基 础 上 进 行 预 测 和 分 析 例 如 归 因 分 析 和 辅 助 决 策 然 而 客 户 的 需 求 不 止 于 此 他 们 指 出 指 标 不 仅 与 数 据 有 关 还 与 许 多 文 档 规 定 相 关 例 如 其 他 部 门 经 常 发 送 与 指 标 和 监 管 相 关 的 文 档 提 醒 指 标 应 符 合 相 关 规 定 或 者 通 知 指 标 算 法 的 变 更 这 些 文 件 可 能 会 干 扰 指 标 系 统 的 输 出 这 是 真 实 场 景 中 常 见 的 问 题 针 对 这 些 问 题 客 户 提 出 了 一 个 需 求 在 指 标 应 用 场 景 中 结 合 文 档 分 析 综 合 进 行 指 标 查 询 和 分 析 具 体 效 果 是 这 样 的 当 查 询 过 去 一 个 月 的 不 良 贷 款 率 是 多 少 时 一 般 的 指 标 系 统 可 能 只 会 返 回 5 01 的 结 果 更 高 级 的 系 统 会 进 一 步 分 析 相 关 数 据 的 波 动 情 况 但 如 果 文 档 库 中 有 一 份 文 档 明 确 规 定 不 良 贷 款 率 不 能 高 于 5 并 且 这 份 文 档 被 纳 入 知 识 库 那 么 当 查 询 结 果 显 示 超 过 5 时 系 统 需 要 额 外 提 示 显 示 具 体 的 规 定 来 源 和 内 容 提 醒 业 务 人 员 注 意 这 一 问 题 这 种 效 果 的 实 现 基 于 我 们 之 前 提 到 的 框 架 具 体 来 说 我 们 将 融 合 知 识 库 中 的 指 标 库 和 文 档 进 行 统 一 的 元 数 据 和 数 据 实 体 抽 取 在 大 模 型 进 行 指 标 分 析 时 通 过 提 示 词 引 导 模 型 查 看 文 档 库 中 是 否 有 相 关 的 警 告 或 规 定 如 果 发 现 相 关 规 定 模 型 会 发 出 相 应 的 警 告 或 提 示 这 样 业 务 人 员 可 以 快 速 了 解 指 标 问 题 的 根 源 从 而 做 出 更 准 确 的 决 策 未 来 演 进 方 向 展 望 在 分 享 的 场 景 中 虽 然 许 多 案 例 是 成 功 的 但 在 实 践 过 程 中 也 确 实 存 在 一 些 挑 战 从 正 面 来 看 这 些 挑 战 可 以 被 视 为 未 来 展 望 的 方 向 反 过 来 也 可 以 说 目 前 这 些 方 面 还 存 在 不 足 以 下 从 四 个 方 面 进 行 分 享 统 一 语 义 层 的 动 态 更 新 这 是 一 个 非 常 实 际 的 问 题 由 于 使 用 了 图 graph 和 相 关 算 法 图 的 更 新 尤 其 是 实 时 动 态 更 新 并 不 容 易 目 前 虽 然 有 一 些 工 具 或 框 架 可 以 支 持 实 时 图 更 新 和 计 算 但 这 些 技 术 手 段 在 一 定 程 度 上 只 能 部 分 解 决 统 一 语 义 层 动 态 更 新 的 问 题 图 像 视 频 数 据 的 高 效 处 理 目 前 我 们 在 处 理 图 像 和 视 频 数 据 时 还 停 留 在 元 数 据 阶 段 没 有 将 图 像 本 身 的 数 据 与 文 本 进 行 联 合 嵌 入 也 没 有 实 现 统 一 的 召 回 虽 然 我 们 一 定 会 评 估 和 考 虑 相 关 的 技 术 手 段 包 括 其 性 能 和 效 果 但 可 以 肯 定 的 是 这 是 一 个 未 来 的 发 展 方 向 行 业 语 义 模 型 与 行 业 图 谱 的 赋 能 目 前 企 业 通 常 需 要 依 靠 自 身 力 量 构 建 与 自 身 业 务 相 关 的 语 义 模 型 和 图 谱 如 果 同 行 业 之 间 能 够 共 享 已 有 的 行 业 语 义 模 型 显 然 会 对 整 个 架 构 的 发 展 起 到 很 大 的 推 动 作 用 然 而 目 前 这 方 面 的 建 设 还 相 对 薄 弱 融 合 知 识 库 的 标 准 化 和 场 景 化 在 多 个 实 践 场 景 中 我 们 发 现 某 些 模 态 组 合 非 常 顺 畅 能 够 体 现 很 多 场 景 价 值 例 如 指 标 库 与 文 档 库 的 组 合 或 者 文 档 库 与 关 系 型 数 据 库 的 组 合 然 而 并 非 所 有 模 态 组 合 都 能 找 到 相 关 的 应 用 场 景 因 此 还 需 要 进 一 步 摸 索 如 果 能 够 对 这 些 组 合 进 行 更 深 入 的 分 析 并 固 化 下 来 例 如 建 立 一 个 指 标 文 档 的 知 识 库 那 么 在 效 率 性 能 等 方 面 都 可 以 进 行 有 针 对 性 的 优 化 这 显 然 比 开 放 式 的 自 由 组 合 更 容 易 实 现 这 些 挑 战 虽 然 存 在 但 也 为 未 来 的 发 展 提 供 了 方 向 通 过 不 断 探 索 和 改 进 我 们 可 以 逐 步 克 服 这 些 问 题 推 动 技 术 的 进 一 步 发 展 嘉 宾 介 绍 王 传 阳 枫 清 科 技 fabarta 合 伙 人 智 能 平 台 事 业 部 总 经 理 曾 任 ibm 认 知 计 算 研 究 院 企 业 数 字 化 转 型 研 发 负 责 人 具 备 十 余 年 软 件 开 发 与 软 件 工 程 经 验 以 及 丰 富 的 图 数 据 库 与 图 算 法 应 用 实 践 与 客 户 交 付 经 验 演 讲 征 集 日 前 由 极 客 邦 旗 下 infoq 中 国 主 办 的 qcon 全 球 软 件 开 发 大 会 在 北 京 圆 满 落 幕 140 多 场 精 彩 演 讲 放 送 直 击 行 业 痛 点 为 现 场 1500 参 会 者 传 递 可 复 制 的 经 验 与 模 式 10 月 23 25 日 qcon 上 海 站 即 将 召 开 如 果 你 有 相 关 案 例 想 要 分 享 欢 迎 提 交 演 讲 申 请", "source_text": "第二个案例的业务背景是银行的风险指标监管。银行已经建立了风险指标库,并希望通过传统 BI 系统以点击按钮等方式查询指标。目前,许多产品和解决方案已经支持通过自然语言查询指标,并在此基础上进行预测和分析,例如归因分析和辅助决策。然而,客户的需求不止于此。他们指出,指标不仅与数据有关,还与许多文档规定相关。例如,其他部门经常发送与指标和监管相关的文档,提醒指标应符合相关规定,或者通知指标算法的变更。这些文件可能会干扰指标系统的输出,这是真实场景中常见的问题。\n\n\n\n\n针对这些问题,客户提出了一个需求:在指标应用场景中,结合文档分析,综合进行指标查询和分析。具体效果是这样的:当查询“过去一个月的不良贷款率是多少”时,一般的指标系统可能只会返回 5.01% 的结果,更高级的系统会进一步分析相关数据的波动情况。但如果文档库中有一份文档明确规定不良贷款率不能高于 5%,并且这份文档被纳入知识库,那么当查询结果显示超过 5% 时,系统需要额外提示,显示具体的规定来源和内容,提醒业务人员注意这一问题。\n\n\n\n\n这种效果的实现基于我们之前提到的框架。具体来说,我们将融合知识库中的指标库和文档进行统一的元数据和数据实体抽取。在大模型进行指标分析时,通过提示词引导模型查看文档库中是否有相关的警告或规定。如果发现相关规定,模型会发出相应的警告或提示。这样,业务人员可以快速了解指标问题的根源,从而做出更准确的决策。\n\n未来演进方向展望\n\n\n\n\n在分享的场景中,虽然许多案例是成功的,但在实践过程中也确实存在一些挑战。从正面来看,这些挑战可以被视为未来展望的方向;反过来,也可以说目前这些方面还存在不足。以下从四个方面进行分享。\n\n\n\n\n统一语义层的动态更新\n\n\n\n\n这是一个非常实际的问题。由于使用了图(graph)和相关算法,图的更新,尤其是实时动态更新,并不容易。目前,虽然有一些工具或框架可以支持实时图更新和计算,但这些技术手段在一定程度上只能部分解决统一语义层动态更新的问题。\n\n图像、视频数据的高效处理\n\n\n\n\n目前,我们在处理图像和视频数据时,还停留在元数据阶段,没有将图像本身的数据与文本进行联合嵌入,也没有实现统一的召回。虽然我们一定会评估和考虑相关的技术手段,包括其性能和效果,但可以肯定的是,这是一个未来的发展方向。\n\n行业语义模型与行业图谱的赋能\n\n\n\n\n目前,企业通常需要依靠自身力量构建与自身业务相关的语义模型和图谱。如果同行业之间能够共享已有的行业语义模型,显然会对整个架构的发展起到很大的推动作用。然而,目前这方面的建设还相对薄弱。\n\n融合知识库的标准化和场景化\n\n\n\n\n在多个实践场景中,我们发现某些模态组合非常顺畅,能够体现很多场景价值,例如指标库与文档库的组合,或者文档库与关系型数据库的组合。然而,并非所有模态组合都能找到相关的应用场景,因此还需要进一步摸索。如果能够对这些组合进行更深入的分析并固化下来,例如建立一个“指标 + 文档”的知识库,那么在效率、性能等方面都可以进行有针对性的优化。这显然比开放式的自由组合更容易实现。\n\n\n\n\n这些挑战虽然存在,但也为未来的发展提供了方向。通过不断探索和改进,我们可以逐步克服这些问题,推动技术的进一步发展。\n\n\n\n\n嘉宾介绍\n\n王传阳,枫清科技(Fabarta)合伙人、智能平台事业部总经理,曾任 IBM 认知计算研究院企业数字化转型研发负责人,具备十余年软件开发与软件工程经验,以及丰富的图数据库与图算法应用实践与客户交付经验。\n\n\n\n\n演讲征集\n\n日前,由极客邦旗下 InfoQ 中国主办的 QCon 全球软件开发大会在北京圆满落幕。140 多场精彩演讲放送,直击行业痛点,为现场 1500+ 参会者传递可复制的经验与模式。10 月 23 - 25 日,QCon 上海站即将召开,如果你有相关案例想要分享,欢迎提交演讲申请。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:第二个案例的业务背景是银行的风险指标监管。银行已经建立了风险指标库,并希望通过传统 BI 系统以点击按钮等方式查询指标。 — 段落/内容单元:日前,由极客邦旗下 InfoQ 中国主办的 QCon 全球软件开发大会在北京圆满落幕。140 多场精彩演讲放送,直击行业", "source_line_range": [ 215, 284 ] } ], "ending": { "text": "场精彩演讲放送,直击行业痛点,为现场 1500+ 参会者传递可复制的经验与模式。10 月 23 - 25 日,QCon 上海站即将召开,如果你有相关案例想要分享,欢迎提交演讲申请。" } } }, { "id": "article-047", "name": "JavaScript深入之闭包", "url": "https://segmentfault.com/a/1190000009215716?sort=newest", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "JavaScript深入之闭包" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "冴羽的JavaScript博客" ] }, { "id": "stable-3", "alternatives": [ "冴羽" ] }, { "id": "stable-4", "alternatives": [ "搜索博客关键字" ], "visible_control": { "selector": "input[placeholder=\"搜索博客关键字\"]", "attribute": "placeholder" } }, { "id": "stable-5", "alternatives": [ "关注博客" ] }, { "id": "stable-6", "alternatives": [ "注册登录" ] }, { "id": "stable-7", "alternatives": [ "主页" ] }, { "id": "stable-8", "alternatives": [ "关于" ] }, { "id": "stable-9", "alternatives": [ "RSS" ] }, { "id": "stable-10", "alternatives": [ "赞" ] }, { "id": "stable-11", "alternatives": [ "收藏" ] }, { "id": "stable-12", "alternatives": [ "评论" ] }, { "id": "stable-13", "alternatives": [ "分享" ] }, { "id": "stable-14", "alternatives": [ "举报" ] }, { "id": "stable-15", "alternatives": [ "关注作者" ] }, { "id": "stable-16", "alternatives": [ "上一篇" ] }, { "id": "stable-17", "alternatives": [ "下一篇" ] }, { "id": "stable-18", "alternatives": [ "引用和评论" ] }, { "id": "stable-19", "alternatives": [ "推荐阅读" ] }, { "id": "stable-20", "alternatives": [ "得票" ] }, { "id": "stable-21", "alternatives": [ "最新" ] }, { "id": "stable-23", "alternatives": [ "提交评论" ] }, { "id": "stable-24", "alternatives": [ "回复" ] }, { "id": "stable-25", "alternatives": [ "评论支持部分 Markdown 语法" ] }, { "id": "stable-26", "alternatives": [ "执行上下文" ] }, { "id": "stable-27", "alternatives": [ "进阶" ] }, { "id": "stable-28", "alternatives": [ "前端" ] }, { "id": "stable-29", "alternatives": [ "闭包" ] }, { "id": "stable-30", "alternatives": [ "javascript" ] }, { "id": "stable-31", "alternatives": [ "作品采用《署名-非商业性使用-禁止演绎 4.0 国际》进行许可" ] }, { "id": "stable-32", "alternatives": [ "使用 SegmentFault 发布" ] }, { "id": "stable-33", "alternatives": [ "SegmentFault - 凝聚集体智慧,推动技术进步" ] }, { "id": "stable-34", "alternatives": [ "服务协议" ] }, { "id": "stable-35", "alternatives": [ "隐私政策" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "JavaScript深入之闭包" ], "html_selector": "h1.h2.mb-3,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#comment-area .commentUnit", "author_selector": "a.d-uname", "body_selector": ".parsedText", "id_attribute": "id", "section_markers": [ "条评论", "评论", "提交评论" ], "version": 2, "minimum_comments": 3, "text_scope": { "body_end": "按值传递、call、apply、bind、new、继承等难点概念。\n\n如果有错误或者不严谨的地方,请务必给予指正,十分感谢。如果喜欢或者有所启发,欢迎star,对作者也是一种鼓励。", "end_markers": [ "除特别声明外,", "使用 SegmentFault 发布", "服务协议" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-047/comment-qualification-reference-r5.json", "sha256": "a14f286c714bba5e943fbf712238dba808edee87b24c4be5fec7131854afc808", "chars": 1292, "record_count": 3 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 3, "qualification_only": true } }, "ground_truth_main_content": "JavaScript深入系列第八篇,介绍理论上的闭包和实践上的闭包,以及从作用域链的角度解析经典的闭包题。\n\n定义\n\nMDN 对闭包的定义为:\n\n闭包是指那些能够访问自由变量的函数。\n\n那什么是自由变量呢?\n\n自由变量是指在函数中使用的,但既不是函数参数也不是函数的局部变量的变量。\n\n由此,我们可以看出闭包共有两部分组成:\n\n闭包 = 函数 + 函数能够访问的自由变量\n\n举个例子:\n\nvar a = 1;\n\nfunction foo() {\n console.log(a);\n}\n\nfoo();\n\nfoo 函数可以访问变量 a,但是 a 既不是 foo 函数的局部变量,也不是 foo 函数的参数,所以 a 就是自由变量。\n\n那么,函数 foo + foo 函数访问的自由变量 a 不就是构成了一个闭包嘛……\n\n还真是这样的!\n\n所以在《JavaScript权威指南》中就讲到:从技术的角度讲,所有的JavaScript函数都是闭包。\n\n咦,这怎么跟我们平时看到的讲到的闭包不一样呢!?\n\n别着急,这是理论上的闭包,其实还有一个实践角度上的闭包,让我们看看汤姆大叔翻译的关于闭包的文章中的定义:\n\nECMAScript中,闭包指的是:\n\n从理论角度:所有的函数。因为它们都在创建的时候就将上层上下文的数据保存起来了。哪怕是简单的全局变量也是如此,因为函数中访问全局变量就相当于是在访问自由变量,这个时候使用最外层的作用域。\n\n从实践角度:以下函数才算是闭包:\n\n即使创建它的上下文已经销毁,它仍然存在(比如,内部函数从父函数中返回)\n\n在代码中引用了自由变量\n\n接下来就来讲讲实践上的闭包。\n\n分析\n\n让我们先写个例子,例子依然是来自《JavaScript权威指南》,稍微做点改动:\n\nvar scope = \"global scope\";\nfunction checkscope(){\n var scope = \"local scope\";\n function f(){\n return scope;\n }\n return f;\n}\n\nvar foo = checkscope();\nfoo();\n\n首先我们要分析一下这段代码中执行上下文栈和执行上下文的变化情况。\n\n另一个与这段代码相似的例子,在《JavaScript深入之执行上下文》中有着非常详细的分析。如果看不懂以下的执行过程,建议先阅读这篇文章。\n\n这里直接给出简要的执行过程:\n\n进入全局代码,创建全局执行上下文,全局执行上下文压入执行上下文栈\n\n全局执行上下文初始化\n\n执行 checkscope 函数,创建 checkscope 函数执行上下文,checkscope 执行上下文被压入执行上下文栈\n\ncheckscope 执行上下文初始化,创建变量对象、作用域链、this等\n\ncheckscope 函数执行完毕,checkscope 执行上下文从执行上下文栈中弹出\n\n执行 f 函数,创建 f 函数执行上下文,f 执行上下文被压入执行上下文栈\n\nf 执行上下文初始化,创建变量对象、作用域链、this等\n\nf 函数执行完毕,f 函数上下文从执行上下文栈中弹出\n\n了解到这个过程,我们应该思考一个问题,那就是:\n\n当 f 函数执行的时候,checkscope 函数上下文已经被销毁了啊(即从执行上下文栈中被弹出),怎么还会读取到 checkscope 作用域下的 scope 值呢?\n\n以上的代码,要是转换成 PHP,就会报错,因为在 PHP 中,f 函数只能读取到自己作用域和全局作用域里的值,所以读不到 checkscope 下的 scope 值。(这段我问的PHP同事……)\n\n然而 JavaScript 却是可以的!\n\n当我们了解了具体的执行过程后,我们知道 f 执行上下文维护了一个作用域链:\n\nfContext = {\n Scope: [AO, checkscopeContext.AO, globalContext.VO],\n}\n\n对的,就是因为这个作用域链,f 函数依然可以读取到 checkscopeContext.AO 的值,说明当 f 函数引用了 checkscopeContext.AO 中的值的时候,即使 checkscopeContext 被销毁了,但是 JavaScript 依然会让 checkscopeContext.AO 活在内存中,f 函数依然可以通过 f 函数的作用域链找到它,正是因为 JavaScript 做到了这一点,从而实现了闭包这个概念。\n\n所以,让我们再看一遍实践角度上闭包的定义:\n\n即使创建它的上下文已经销毁,它仍然存在(比如,内部函数从父函数中返回)\n\n在代码中引用了自由变量\n\n在这里再补充一个《JavaScript权威指南》英文原版对闭包的定义:\n\nThis combination of a function object and a scope (a set of variable bindings) in which the function’s variables are resolved is called a closure in the computer science literature.\n\n闭包在计算机科学中也只是一个普通的概念,大家不要去想得太复杂。\n\n必刷题\n\n接下来,看这道刷题必刷,面试必考的闭包题:\n\nvar data = [];\n\nfor (var i = 0; i < 3; i++) {\n data[i] = function () {\n console.log(i);\n };\n}\n\ndata[0]();\ndata[1]();\ndata[2]();\n\n答案是都是 3,让我们分析一下原因:\n\n当执行到 data[0] 函数之前,此时全局上下文的 VO 为:\n\nglobalContext = {\n VO: {\n data: [...],\n i: 3\n }\n}\n\n当执行 data[0] 函数的时候,data[0] 函数的作用域链为:\n\ndata[0]Context = {\n Scope: [AO, globalContext.VO]\n}\n\ndata[0]Context 的 AO 并没有 i 值,所以会从 globalContext.VO 中查找,i 为 3,所以打印的结果就是 3。\n\ndata[1] 和 data[2] 是一样的道理。\n\n所以让我们改成闭包看看:\n\nvar data = [];\n\nfor (var i = 0; i < 3; i++) {\n data[i] = (function (i) {\n return function(){\n console.log(i);\n }\n })(i);\n}\n\ndata[0]();\ndata[1]();\ndata[2]();\n\n当执行到 data[0] 函数之前,此时全局上下文的 VO 为:\n\nglobalContext = {\n VO: {\n data: [...],\n i: 3\n }\n}\n\n跟没改之前一模一样。\n\n当执行 data[0] 函数的时候,data[0] 函数的作用域链发生了改变:\n\ndata[0]Context = {\n Scope: [AO, 匿名函数Context.AO globalContext.VO]\n}\n\n匿名函数执行上下文的 AO 为:\n\n匿名函数Context = {\n AO: {\n arguments: {\n 0: 0,\n length: 1\n },\n i: 0\n }\n}\n\ndata[0]Context 的 AO 并没有 i 值,所以会沿着作用域链从匿名函数 Context.AO 中查找,这时候就会找 i 为 0,找到了就不会往 globalContext.VO 中查找了,即使 globalContext.VO 也有 i 的值(值为3),所以打印的结果就是 0。\n\ndata[1] 和 data[2] 是一样的道理。\n\n下一篇文章\n\nJavaScript深入之参数按值传递\n\n相关链接\n\n如果想了解执行上下文的具体变化,不妨循序渐进,阅读这六篇:\n\n《JavaScript深入之词法作用域和动态作用域》\n\n《JavaScript深入之执行上下文栈》\n\n《JavaScript深入之变量对象》\n\n《JavaScript深入之作用域链》\n\n《JavaScript深入之从ECMAScript规范解读this》\n\n《JavaScript深入之执行上下文》\n\n深入系列\n\nJavaScript深入系列目录地址:https://github.com/mqyqingfeng/Blog。\n\nJavaScript深入系列预计写十五篇左右,旨在帮大家捋顺JavaScript底层知识,重点讲解如原型、作用域、执行上下文、变量对象、this、闭包、按值传递、call、apply、bind、new、继承等难点概念。\n\n如果有错误或者不严谨的地方,请务必给予指正,十分感谢。如果喜欢或者有所启发,欢迎star,对作者也是一种鼓励。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "javascript 深 入 系 列 第 八 篇 介 绍 理 论 上 的 闭 包 和 实 践 上 的 闭 包 以 及 从 作 用 域 链 的 角 度 解 析 经 典 的 闭 包 题 定 义 mdn 对 闭 包 的 定 义 为 闭 包 是 指 那 些 能 够 访 问 自 由 变 量 的 函 数 那 什 么 是 自 由 变 量 呢 自 由 变 量 是 指 在 函 数 中 使 用 的 但 既 不 是 函 数 参 数 也 不 是 函 数 的 局 部 变 量 的 变 量 由 此 我 们 可 以 看 出 闭 包 共 有 两 部 分 组 成 闭 包 函 数 函 数 能 够 访 问 的 自 由 变 量 举 个 例 子 var a 1 function foo console log a foo foo 函 数 可 以 访 问 变 量 a 但 是 a 既 不 是 foo 函 数 的 局 部 变 量 也 不 是 foo 函 数 的 参 数 所 以 a 就 是 自 由 变 量 那 么 函 数 foo foo 函 数 访 问 的 自 由 变 量 a 不 就 是 构 成 了 一 个 闭 包 嘛 还 真 是 这 样 的 所 以 在 javascript 权 威 指 南 中 就 讲 到 从 技 术 的 角 度 讲 所 有 的 javascript 函 数 都 是 闭 包 咦 这 怎 么 跟 我 们 平 时 看 到 的 讲 到 的 闭 包 不 一 样 呢 别 着 急 这 是 理 论 上 的 闭 包 其 实 还 有 一 个 实 践 角 度 上 的 闭 包 让 我 们 看 看 汤 姆 大 叔 翻 译 的 关 于 闭 包 的 文 章 中 的 定 义 ecmascript 中 闭 包 指 的 是 从 理 论 角 度 所 有 的 函 数 因 为 它 们 都 在 创 建 的 时 候 就 将 上 层 上 下 文 的 数 据 保 存 起 来 了 哪 怕 是 简 单 的 全 局 变 量 也 是 如 此 因 为 函 数 中 访 问 全 局 变 量 就 相 当 于 是 在 访 问 自 由 变 量 这 个 时 候 使 用 最 外 层 的 作 用 域 从 实 践 角 度 以 下 函 数 才 算 是 闭 包 即 使 创 建 它 的 上 下 文 已 经 销 毁 它 仍 然 存 在 比 如 内 部 函 数 从 父 函 数 中 返 回 在 代 码 中 引 用 了 自 由 变 量 接 下 来 就 来 讲 讲 实 践 上 的 闭 包", "source_text": "JavaScript深入系列第八篇,介绍理论上的闭包和实践上的闭包,以及从作用域链的角度解析经典的闭包题。\n\n定义\n\nMDN 对闭包的定义为:\n\n闭包是指那些能够访问自由变量的函数。\n\n那什么是自由变量呢?\n\n自由变量是指在函数中使用的,但既不是函数参数也不是函数的局部变量的变量。\n\n由此,我们可以看出闭包共有两部分组成:\n\n闭包 = 函数 + 函数能够访问的自由变量\n\n举个例子:\n\nvar a = 1;\n\nfunction foo() {\n console.log(a);\n}\n\nfoo();\n\nfoo 函数可以访问变量 a,但是 a 既不是 foo 函数的局部变量,也不是 foo 函数的参数,所以 a 就是自由变量。\n\n那么,函数 foo + foo 函数访问的自由变量 a 不就是构成了一个闭包嘛……\n\n还真是这样的!\n\n所以在《JavaScript权威指南》中就讲到:从技术的角度讲,所有的JavaScript函数都是闭包。\n\n咦,这怎么跟我们平时看到的讲到的闭包不一样呢!?\n\n别着急,这是理论上的闭包,其实还有一个实践角度上的闭包,让我们看看汤姆大叔翻译的关于闭包的文章中的定义:\n\nECMAScript中,闭包指的是:\n\n从理论角度:所有的函数。因为它们都在创建的时候就将上层上下文的数据保存起来了。哪怕是简单的全局变量也是如此,因为函数中访问全局变量就相当于是在访问自由变量,这个时候使用最外层的作用域。\n\n从实践角度:以下函数才算是闭包:\n\n即使创建它的上下文已经销毁,它仍然存在(比如,内部函数从父函数中返回)\n\n在代码中引用了自由变量\n\n接下来就来讲讲实践上的闭包。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:JavaScript深入系列第八篇,介绍理论上的闭包和实践上的闭包,以及从作用域链的角度解析经典的闭包题。 — 定义", "source_line_range": [ 1, 50 ] }, { "id": "body-region-2", "text": "分 析 让 我 们 先 写 个 例 子 例 子 依 然 是 来 自 javascript 权 威 指 南 稍 微 做 点 改 动 var scope global scope function checkscope var scope local scope function f return scope return f var foo checkscope foo 首 先 我 们 要 分 析 一 下 这 段 代 码 中 执 行 上 下 文 栈 和 执 行 上 下 文 的 变 化 情 况 另 一 个 与 这 段 代 码 相 似 的 例 子 在 javascript 深 入 之 执 行 上 下 文 中 有 着 非 常 详 细 的 分 析 如 果 看 不 懂 以 下 的 执 行 过 程 建 议 先 阅 读 这 篇 文 章 这 里 直 接 给 出 简 要 的 执 行 过 程 进 入 全 局 代 码 创 建 全 局 执 行 上 下 文 全 局 执 行 上 下 文 压 入 执 行 上 下 文 栈 全 局 执 行 上 下 文 初 始 化 执 行 checkscope 函 数 创 建 checkscope 函 数 执 行 上 下 文 checkscope 执 行 上 下 文 被 压 入 执 行 上 下 文 栈 checkscope 执 行 上 下 文 初 始 化 创 建 变 量 对 象 作 用 域 链 this 等 checkscope 函 数 执 行 完 毕 checkscope 执 行 上 下 文 从 执 行 上 下 文 栈 中 弹 出 执 行 f 函 数 创 建 f 函 数 执 行 上 下 文 f 执 行 上 下 文 被 压 入 执 行 上 下 文 栈 f 执 行 上 下 文 初 始 化 创 建 变 量 对 象 作 用 域 链 this 等 f 函 数 执 行 完 毕 f 函 数 上 下 文 从 执 行 上 下 文 栈 中 弹 出 了 解 到 这 个 过 程 我 们 应 该 思 考 一 个 问 题 那 就 是 当 f 函 数 执 行 的 时 候 checkscope 函 数 上 下 文 已 经 被 销 毁 了 啊 即 从 执 行 上 下 文 栈 中 被 弹 出 怎 么 还 会 读 取 到 checkscope 作 用 域 下 的 scope 值 呢 以 上 的 代 码 要 是 转 换 成 php 就 会 报 错 因 为 在 php 中 f 函 数 只 能 读 取 到 自 己 作 用 域 和 全 局 作 用 域 里 的 值 所 以 读 不 到 checkscope 下 的 scope 值 这 段 我 问 的 php 同 事 然 而 javascript 却 是 可 以 的 当 我 们 了 解 了 具 体 的 执 行 过 程 后 我 们 知 道 f 执 行 上 下 文 维 护 了 一 个 作 用 域 链 fcontext scope ao checkscopecontext ao globalcontext vo 对 的 就 是 因 为 这 个 作 用 域 链 f 函 数 依 然 可 以 读 取 到 checkscopecontext ao 的 值 说 明 当 f 函 数 引 用 了 checkscopecontext ao 中 的 值 的 时 候 即 使 checkscopecontext 被 销 毁 了 但 是 javascript 依 然 会 让 checkscopecontext ao 活 在 内 存 中 f 函 数 依 然 可 以 通 过 f 函 数 的 作 用 域 链 找 到 它 正 是 因 为 javascript 做 到 了 这 一 点 从 而 实 现 了 闭 包 这 个 概 念 所 以 让 我 们 再 看 一 遍 实 践 角 度 上 闭 包 的 定 义 即 使 创 建 它 的 上 下 文 已 经 销 毁 它 仍 然 存 在 比 如 内 部 函 数 从 父 函 数 中 返 回 在 代 码 中 引 用 了 自 由 变 量 在 这 里 再 补 充 一 个 javascript 权 威 指 南 英 文 原 版 对 闭 包 的 定 义 this combination of a function object and a scope a set of variable bindings in which the function s variables are resolved is called a closure in the computer science literature 闭 包 在 计 算 机 科 学 中 也 只 是 一 个 普 通 的 概 念 大 家 不 要 去 想 得 太 复 杂", "source_text": "分析\n\n让我们先写个例子,例子依然是来自《JavaScript权威指南》,稍微做点改动:\n\nvar scope = \"global scope\";\nfunction checkscope(){\n var scope = \"local scope\";\n function f(){\n return scope;\n }\n return f;\n}\n\nvar foo = checkscope();\nfoo();\n\n首先我们要分析一下这段代码中执行上下文栈和执行上下文的变化情况。\n\n另一个与这段代码相似的例子,在《JavaScript深入之执行上下文》中有着非常详细的分析。如果看不懂以下的执行过程,建议先阅读这篇文章。\n\n这里直接给出简要的执行过程:\n\n进入全局代码,创建全局执行上下文,全局执行上下文压入执行上下文栈\n\n全局执行上下文初始化\n\n执行 checkscope 函数,创建 checkscope 函数执行上下文,checkscope 执行上下文被压入执行上下文栈\n\ncheckscope 执行上下文初始化,创建变量对象、作用域链、this等\n\ncheckscope 函数执行完毕,checkscope 执行上下文从执行上下文栈中弹出\n\n执行 f 函数,创建 f 函数执行上下文,f 执行上下文被压入执行上下文栈\n\nf 执行上下文初始化,创建变量对象、作用域链、this等\n\nf 函数执行完毕,f 函数上下文从执行上下文栈中弹出\n\n了解到这个过程,我们应该思考一个问题,那就是:\n\n当 f 函数执行的时候,checkscope 函数上下文已经被销毁了啊(即从执行上下文栈中被弹出),怎么还会读取到 checkscope 作用域下的 scope 值呢?\n\n以上的代码,要是转换成 PHP,就会报错,因为在 PHP 中,f 函数只能读取到自己作用域和全局作用域里的值,所以读不到 checkscope 下的 scope 值。(这段我问的PHP同事……)\n\n然而 JavaScript 却是可以的!\n\n当我们了解了具体的执行过程后,我们知道 f 执行上下文维护了一个作用域链:\n\nfContext = {\n Scope: [AO, checkscopeContext.AO, globalContext.VO],\n}\n\n对的,就是因为这个作用域链,f 函数依然可以读取到 checkscopeContext.AO 的值,说明当 f 函数引用了 checkscopeContext.AO 中的值的时候,即使 checkscopeContext 被销毁了,但是 JavaScript 依然会让 checkscopeContext.AO 活在内存中,f 函数依然可以通过 f 函数的作用域链找到它,正是因为 JavaScript 做到了这一点,从而实现了闭包这个概念。\n\n所以,让我们再看一遍实践角度上闭包的定义:\n\n即使创建它的上下文已经销毁,它仍然存在(比如,内部函数从父函数中返回)\n\n在代码中引用了自由变量\n\n在这里再补充一个《JavaScript权威指南》英文原版对闭包的定义:\n\nThis combination of a function object and a scope (a set of variable bindings) in which the function’s variables are resolved is called a closure in the computer science literature.\n\n闭包在计算机科学中也只是一个普通的概念,大家不要去想得太复杂。", "segmentation_method": "reviewed_source_semantics", "label": "分析", "source_line_range": [ 51, 116 ] }, { "id": "body-region-3", "text": "必 刷 题 接 下 来 看 这 道 刷 题 必 刷 面 试 必 考 的 闭 包 题 var data for var i 0 i 3 i data i function console log i data0 data1 data2 答 案 是 都 是 3 让 我 们 分 析 一 下 原 因 当 执 行 到 data 0 函 数 之 前 此 时 全 局 上 下 文 的 vo 为 globalcontext vo data i 3 当 执 行 data 0 函 数 的 时 候 data 0 函 数 的 作 用 域 链 为 data 0 context scope ao globalcontext vo data 0 context 的 ao 并 没 有 i 值 所 以 会 从 globalcontext vo 中 查 找 i 为 3 所 以 打 印 的 结 果 就 是 3 data 1 和 data 2 是 一 样 的 道 理 所 以 让 我 们 改 成 闭 包 看 看 var data for var i 0 i 3 i data i function i return function console log i i data0 data1 data2 当 执 行 到 data 0 函 数 之 前 此 时 全 局 上 下 文 的 vo 为 globalcontext vo data i 3 跟 没 改 之 前 一 模 一 样 当 执 行 data 0 函 数 的 时 候 data 0 函 数 的 作 用 域 链 发 生 了 改 变 data 0 context scope ao 匿 名 函 数 context ao globalcontext vo 匿 名 函 数 执 行 上 下 文 的 ao 为 匿 名 函 数 context ao arguments 0 0 length 1 i 0 data 0 context 的 ao 并 没 有 i 值 所 以 会 沿 着 作 用 域 链 从 匿 名 函 数 context ao 中 查 找 这 时 候 就 会 找 i 为 0 找 到 了 就 不 会 往 globalcontext vo 中 查 找 了 即 使 globalcontext vo 也 有 i 的 值 值 为 3 所 以 打 印 的 结 果 就 是 0 data 1 和 data 2 是 一 样 的 道 理", "source_text": "必刷题\n\n接下来,看这道刷题必刷,面试必考的闭包题:\n\nvar data = [];\n\nfor (var i = 0; i < 3; i++) {\n data[i] = function () {\n console.log(i);\n };\n}\n\ndata[0]();\ndata[1]();\ndata[2]();\n\n答案是都是 3,让我们分析一下原因:\n\n当执行到 data[0] 函数之前,此时全局上下文的 VO 为:\n\nglobalContext = {\n VO: {\n data: [...],\n i: 3\n }\n}\n\n当执行 data[0] 函数的时候,data[0] 函数的作用域链为:\n\ndata[0]Context = {\n Scope: [AO, globalContext.VO]\n}\n\ndata[0]Context 的 AO 并没有 i 值,所以会从 globalContext.VO 中查找,i 为 3,所以打印的结果就是 3。\n\ndata[1] 和 data[2] 是一样的道理。\n\n所以让我们改成闭包看看:\n\nvar data = [];\n\nfor (var i = 0; i < 3; i++) {\n data[i] = (function (i) {\n return function(){\n console.log(i);\n }\n })(i);\n}\n\ndata[0]();\ndata[1]();\ndata[2]();\n\n当执行到 data[0] 函数之前,此时全局上下文的 VO 为:\n\nglobalContext = {\n VO: {\n data: [...],\n i: 3\n }\n}\n\n跟没改之前一模一样。\n\n当执行 data[0] 函数的时候,data[0] 函数的作用域链发生了改变:\n\ndata[0]Context = {\n Scope: [AO, 匿名函数Context.AO globalContext.VO]\n}\n\n匿名函数执行上下文的 AO 为:\n\n匿名函数Context = {\n AO: {\n arguments: {\n 0: 0,\n length: 1\n },\n i: 0\n }\n}\n\ndata[0]Context 的 AO 并没有 i 值,所以会沿着作用域链从匿名函数 Context.AO 中查找,这时候就会找 i 为 0,找到了就不会往 globalContext.VO 中查找了,即使 globalContext.VO 也有 i 的值(值为3),所以打印的结果就是 0。\n\ndata[1] 和 data[2] 是一样的道理。", "segmentation_method": "reviewed_source_semantics", "label": "必刷题", "source_line_range": [ 117, 202 ] }, { "id": "body-region-4", "text": "下 一 篇 文 章 javascript 深 入 之 参 数 按 值 传 递", "source_text": "下一篇文章\n\nJavaScript深入之参数按值传递", "segmentation_method": "reviewed_source_semantics", "label": "下一篇文章", "source_line_range": [ 203, 206 ] }, { "id": "body-region-5", "text": "相 关 链 接 如 果 想 了 解 执 行 上 下 文 的 具 体 变 化 不 妨 循 序 渐 进 阅 读 这 六 篇 javascript 深 入 之 词 法 作 用 域 和 动 态 作 用 域 javascript 深 入 之 执 行 上 下 文 栈 javascript 深 入 之 变 量 对 象 javascript 深 入 之 作 用 域 链 javascript 深 入 之 从 ecmascript 规 范 解 读 this javascript 深 入 之 执 行 上 下 文 深 入 系 列 javascript 深 入 系 列 目 录 地 址 https github com mqyqingfeng blog javascript 深 入 系 列 预 计 写 十 五 篇 左 右 旨 在 帮 大 家 捋 顺 javascript 底 层 知 识 重 点 讲 解 如 原 型 作 用 域 执 行 上 下 文 变 量 对 象 this 闭 包 按 值 传 递 call apply bind new 继 承 等 难 点 概 念 如 果 有 错 误 或 者 不 严 谨 的 地 方 请 务 必 给 予 指 正 十 分 感 谢 如 果 喜 欢 或 者 有 所 启 发 欢 迎 star 对 作 者 也 是 一 种 鼓 励", "source_text": "相关链接\n\n如果想了解执行上下文的具体变化,不妨循序渐进,阅读这六篇:\n\n《JavaScript深入之词法作用域和动态作用域》\n\n《JavaScript深入之执行上下文栈》\n\n《JavaScript深入之变量对象》\n\n《JavaScript深入之作用域链》\n\n《JavaScript深入之从ECMAScript规范解读this》\n\n《JavaScript深入之执行上下文》\n\n深入系列\n\nJavaScript深入系列目录地址:https://github.com/mqyqingfeng/Blog。\n\nJavaScript深入系列预计写十五篇左右,旨在帮大家捋顺JavaScript底层知识,重点讲解如原型、作用域、执行上下文、变量对象、this、闭包、按值传递、call、apply、bind、new、继承等难点概念。\n\n如果有错误或者不严谨的地方,请务必给予指正,十分感谢。如果喜欢或者有所启发,欢迎star,对作者也是一种鼓励。", "segmentation_method": "reviewed_source_semantics", "label": "相关链接 — 深入系列", "source_line_range": [ 207, 229 ] } ], "ending": { "text": "按值传递、call、apply、bind、new、继承等难点概念。\n\n如果有错误或者不严谨的地方,请务必给予指正,十分感谢。如果喜欢或者有所启发,欢迎star,对作者也是一种鼓励。" } } }, { "id": "article-048", "name": "技术周刊 Vol.46:JavaScript 的那些事", "url": "https://segmentfault.com/a/1190000041921498", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "SegmentFault 思否技术周刊 Vol\\.46 -- JavaScript 的那些事" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "SegmentFault 社区周刊" ] }, { "id": "stable-3", "alternatives": [ "咸口锅包肉" ] }, { "id": "stable-4", "alternatives": [ "上岗小编" ] }, { "id": "stable-5", "alternatives": [ "搜索博客关键字" ], "visible_control": { "selector": "input[placeholder=\"搜索博客关键字\"]", "attribute": "placeholder" } }, { "id": "stable-6", "alternatives": [ "关注博客" ] }, { "id": "stable-7", "alternatives": [ "注册登录" ] }, { "id": "stable-8", "alternatives": [ "主页" ] }, { "id": "stable-9", "alternatives": [ "关于" ] }, { "id": "stable-10", "alternatives": [ "RSS" ] }, { "id": "stable-11", "alternatives": [ "English" ] }, { "id": "stable-12", "alternatives": [ "赞" ] }, { "id": "stable-13", "alternatives": [ "收藏" ] }, { "id": "stable-14", "alternatives": [ "评论" ] }, { "id": "stable-15", "alternatives": [ "分享" ] }, { "id": "stable-16", "alternatives": [ "举报" ] }, { "id": "stable-17", "alternatives": [ "关注作者" ] }, { "id": "stable-18", "alternatives": [ "上一篇" ] }, { "id": "stable-19", "alternatives": [ "下一篇" ] }, { "id": "stable-20", "alternatives": [ "引用和评论" ] }, { "id": "stable-21", "alternatives": [ "推荐阅读" ] }, { "id": "stable-22", "alternatives": [ "得票" ] }, { "id": "stable-23", "alternatives": [ "最新" ] }, { "id": "stable-25", "alternatives": [ "提交评论" ] }, { "id": "stable-26", "alternatives": [ "评论支持部分 Markdown 语法" ] }, { "id": "stable-27", "alternatives": [ "javascript" ] }, { "id": "stable-28", "alternatives": [ "segmentfault-技术周刊" ] }, { "id": "stable-29", "alternatives": [ "作品采用《署名-非商业性使用-禁止演绎 4.0 国际》进行许可" ] }, { "id": "stable-30", "alternatives": [ "使用 SegmentFault 发布" ] }, { "id": "stable-31", "alternatives": [ "SegmentFault - 凝聚集体智慧,推动技术进步" ] }, { "id": "stable-32", "alternatives": [ "服务协议" ] }, { "id": "stable-33", "alternatives": [ "隐私政策" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "SegmentFault 思否技术周刊 Vol.46 -- JavaScript 的那些事" ], "html_selector": "h1.h2.mb-3,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-048/comment-qualification-reference-r5.json", "sha256": "0c81b2d49cbe2e12876fc1d1cbcb5db948489330443d6193826d9cd19787c566", "chars": 773, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "JavaScript 是一门基于原型、头等函数的语言,是一门多范式的语言,它支持面向对象程式設計,指令式编程,以及函数式编程。它提供语法来操控文本、数组、日期以及正则表达式等,不支持 I/O,比如网络、存储和图形等,但这些都可以由它的宿主环境提供支持。\n\n知识进阶\n\n《JS阻塞渲染,这么多年我理解错啦?》\n\n在中文社区,这么多年一直流传一个说法:JS线程负责执行JS,GUI渲染线程负责渲染,这两者是互斥的,所以JS执行时会阻塞渲染。\n\n但随着Dev Tools使用的增多,逐渐开始怀疑以上说法。本文会以实际案例来解释为什么JS阻塞渲染。\n\n《JavaScript 之原型、原型链》\n\n其他编程语言如 Java 等使用 new 命令时,都会调用“类”的构造函数。但是,JavaScript没有“类”,本身并不提供一个 class 实现(虽然在ES6中提供了class 关键字,但其只是语法糖,JavaScript仍然是基于原型的)。于是,JavaScript作了一个简化的思想,new 命令后面跟的不是类,而是构造函数,用构造函数生成实例对象,但其缺点是无法共享属性和方法。于是,就为构造函数设置了一个 prototype 属性,这个属性包含一个对象(prototype对象)。所有实例对象需要共享的属性和方法都放在这个对象里,那些不需要共享的属性和方法就放在构造函数里。\n\n《JavaScript Promise 的理解和使用》\n\n什么是Promise?\nPromise怎么用?\n\n《5个一定要学会的JavaScript新特性》\n\nJavaScript 在不断地升级迭代,越来越多的新特性让我们的代码写起来变得简洁有趣,这篇文章会介绍5个新特性,一起研究一下吧。\n\n《你可能不了解的 Promise 微任务类型》\n\nECMA 规范中把 Promise 微任务分成了 NewPromiseReactionJob 和NewPromiseResolveThenableJob 两种类型,下面结合规范来分别看下这两种微任务的产生时机和执行内容。\n\n《JavaScript闭包》\n\n在 JavaScript 中闭包描述的是 function 中外层作用域的变量被内层作用域引用的场景,闭包的结构为内层作用域保存了外层作用域的变量。\n\n本文将带你用正确姿势看待JavaScript闭包。\n\n《JavaScript内存泄漏》\n\n在传统的网页开发时无需过多考虑内存管理,通常也不会产生严重的后果。因为当用户点击链接打开新页面或者刷新页面,页面内的信息就会从内存中清理掉。\n\n随着SPA(Single Page Application)应用的增多,迫使我们在编码时需要更多的关注内存。因为如果应用使用的内存逐渐增多会直接影响到网页的性能,甚至导致浏览器标签页崩溃。\n\n这篇文章,我们将研究JavaScript编码导致内存泄漏的场景,提供一些内存管理的建议。\n\n《JS中的块作用域和遮蔽效应》\n\nJS中的代码块是什么?\n块级作用域是什么?\n遮蔽效应是什么?\n非法遮蔽是什么?\n块级作用域和词法作用域\n应用实践\n\n《js 生成UUID的几种方法》\n\nUUID(Universally Unique IDentifier) 全局唯一标识符。\nUUID是一种由算法生成的二进制长度为128位的数字标识符。UUID\n的格式为“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”,其中的 x 是 0-9 或 a-f\n范围内的一个32位十六进制数。在理想情况下,任何计算机和计算机集群都不会生成两个相同的UUID。\n\n《js数组去重常见的七种方法》\n\nfilter() 方法创建一个新的数组,新数组中的元素是通过检查指定数组中符合条件的所有元素。item是当前元素的值,index是当前元素的索引值。indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。利用indexOf() 查询到数组的下标,看是否等于当前的下标,相等的话就返回,否则不返回值。\n\n《JavaScript深拷贝的几种方法》\n\n浅拷贝是创建一个新对象,这个对象有着原始对象属性值的拷贝。如果属性是基本类型,拷贝的就是基本类型的值,如果属性是引用类型,拷贝的是内存地址 。如果不进行深拷贝,其中一个对象改变了对象的值,就会影响到另一个对象的值。\n深拷贝是将一个对象从内存中完整的拷贝一份出来,从堆内存中开辟一个新的区域存放新对象,且修改新对象不会影响原对象。\n\n《js 数据类型转换的几种方式》\n\n强制类型转换 String(),toString() 转字符串类型\n字符串转数值类型 Number parseInt()\n字符串转数组split,数组转字符串join\n.......\n\n《JavaScript的几种继承方式》\n\nJavaScript的几种继承方式\n原型链继承\n借助构造函数继承(经典继承)\n组合继承:原型链 + 借用构造函数(最常用)\n原型式继承 (Object.create)\n寄生式继承\n寄生组合式继承(最理想)\nES6中的继承\n\n《让你事半功倍的 JS utils工具函数》\n\n今日分享一篇积累和收集了很久的JS utils工具函数,文章代码量较多,建议收藏起来慢慢看,当哪一天需要用到的时候,打开你尘封已久的收藏夹,相信能让你的业务代码开发事半功倍。\n汇集了时间相关,DOM相关,URL相关,判断相关,图片相关,缓存相关等。部分逻辑处理较为简单,如果是业务量较为复杂的情况建议要斟酌使用,但对于大部分的项目应该是绰绰有余。接下来就进入代码部分吧~\n\n《2022年的JavaScript开发工具》\n\n编译器负责将输入代码转换为某种目标输出格式。出于我们的目的,我们关注的是那些支持将现代 JavaScript 和TypeScript 转换成特定版本的 ECMAscript 的编译器,这些 ECMAscript 兼容浏览器和最新版本的 Node.js。\n\n《手动实现一个JS执行引擎》\n\n支持解析js脚本生成语法树、格式化代码\n支持运行完整js脚本\n支持安全模式运行单行表达式\n支持设置超时时间\n\n《js获取页面尺寸》\n\n在大多数情况下,document.documentElement.clientWidth 都能返回正确的值, 但在IE6的quirks模式中,document.body.clientWidth返回正确的值,所以要做兼容处理。另外clientWidth 和 clientHeight 都是只读属性,不能对它们赋值。\n面试真题\n\n《js面试题(基础)梳理》\n\nJavaScript有几种数据类型?\nJavaScript最大安全数字与最小安全数字?\n深拷贝与浅拷贝的区别?\n闭包是什么?\n\n《js面试题(进阶)梳理》\n\nundeclared 与 undefined的区别?\nlet & const与 var 的区别?\n获取DOM元素有哪些方法?\n操作DOM元素有哪些方法\n热门问答\njs 怎么获取节点下所有子节点的文本并存到数组中?\njs 实现文本压缩可以采用什么方法?\n如何用 js 实现 java 中 int 强制转换为 byte 类型,即(byte)\njs 递归修改树状结构\njs 双存循环如何快速高效判断数组里面的条件是否满足\njs 如何获取今日开始时间戳和结束时间戳\njs 如何把内存循环里面的字段提出来拼接外层循环的字段\njs 如何判断数组里对象的 value 是否有重复\n课程推荐\n\n《前端大数据可视化实战》\n\n相信从事前端开发人员还是对于html,css,javascript,Browser等等有一定认识了解的。但是了解的程度如何呢? 知道含义?简单/熟练使用?深入研究?\n请大家试着回答我下面几个问题:\n\n页面编写是否更多还停留在 div 套 div ?样式编写更多还是宽,高,定位?\nJavaScript 是否深入了解过? javascript 为什么是单线程呢?(设计初衷?受限原因?)\nJavaScript 在 Browser (浏览器)中如何运行的? 如何编译的?( 预编译?即时编译? )\n在前端领域内自己是否有专注的一个方向?或者说是找工作的杀手锏?\n\n试着解答过后或许结果并不是那么理想,结果如何没有太大关系,个人认为有问题不可怕,及时发现问题就是好的结果。对于每个人来说都不是万能的,是需要时刻学习,时刻进步的。\n\n课程收获:\n\n掌握一项随处可见、日益增加的技术需求\n提升自身技术,拓宽前端视野\n加强硬实力,把握晋升机会\n基于计算机底层,向前端架构迈进\n\nPS:大家想看哪些方面的技术内容,可以在评论区留言喔 ~\n如有问题可以添加小姐姐微信~\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "javascript 是 一 门 基 于 原 型 头 等 函 数 的 语 言 是 一 门 多 范 式 的 语 言 它 支 持 面 向 对 象 程 式 設 計 指 令 式 编 程 以 及 函 数 式 编 程 它 提 供 语 法 来 操 控 文 本 数 组 日 期 以 及 正 则 表 达 式 等 不 支 持 i o 比 如 网 络 存 储 和 图 形 等 但 这 些 都 可 以 由 它 的 宿 主 环 境 提 供 支 持 知 识 进 阶 js 阻 塞 渲 染 这 么 多 年 我 理 解 错 啦 在 中 文 社 区 这 么 多 年 一 直 流 传 一 个 说 法 js 线 程 负 责 执 行 js gui 渲 染 线 程 负 责 渲 染 这 两 者 是 互 斥 的 所 以 js 执 行 时 会 阻 塞 渲 染 但 随 着 dev tools 使 用 的 增 多 逐 渐 开 始 怀 疑 以 上 说 法 本 文 会 以 实 际 案 例 来 解 释 为 什 么 js 阻 塞 渲 染 javascript 之 原 型 原 型 链 其 他 编 程 语 言 如 java 等 使 用 new 命 令 时 都 会 调 用 类 的 构 造 函 数 但 是 javascript 没 有 类 本 身 并 不 提 供 一 个 class 实 现 虽 然 在 es6 中 提 供 了 class 关 键 字 但 其 只 是 语 法 糖 javascript 仍 然 是 基 于 原 型 的 于 是 javascript 作 了 一 个 简 化 的 思 想 new 命 令 后 面 跟 的 不 是 类 而 是 构 造 函 数 用 构 造 函 数 生 成 实 例 对 象 但 其 缺 点 是 无 法 共 享 属 性 和 方 法 于 是 就 为 构 造 函 数 设 置 了 一 个 prototype 属 性 这 个 属 性 包 含 一 个 对 象 prototype 对 象 所 有 实 例 对 象 需 要 共 享 的 属 性 和 方 法 都 放 在 这 个 对 象 里 那 些 不 需 要 共 享 的 属 性 和 方 法 就 放 在 构 造 函 数 里 javascript promise 的 理 解 和 使 用 什 么 是 promise promise 怎 么 用 5 个 一 定 要 学 会 的 javascript 新 特 性 javascript 在 不 断 地 升 级 迭 代 越 来 越 多 的 新 特 性 让 我 们 的 代 码 写 起 来 变 得 简 洁 有 趣 这 篇 文 章 会 介 绍 5 个 新 特 性 一 起 研 究 一 下 吧 你 可 能 不 了 解 的 promise 微 任 务 类 型 ecma 规 范 中 把 promise 微 任 务 分 成 了 newpromisereactionjob 和 newpromiseresolvethenablejob 两 种 类 型 下 面 结 合 规 范 来 分 别 看 下 这 两 种 微 任 务 的 产 生 时 机 和 执 行 内 容 javascript 闭 包 在 javascript 中 闭 包 描 述 的 是 function 中 外 层 作 用 域 的 变 量 被 内 层 作 用 域 引 用 的 场 景 闭 包 的 结 构 为 内 层 作 用 域 保 存 了 外 层 作 用 域 的 变 量 本 文 将 带 你 用 正 确 姿 势 看 待 javascript 闭 包 javascript 内 存 泄 漏 在 传 统 的 网 页 开 发 时 无 需 过 多 考 虑 内 存 管 理 通 常 也 不 会 产 生 严 重 的 后 果 因 为 当 用 户 点 击 链 接 打 开 新 页 面 或 者 刷 新 页 面 页 面 内 的 信 息 就 会 从 内 存 中 清 理 掉 随 着 spa single page application 应 用 的 增 多 迫 使 我 们 在 编 码 时 需 要 更 多 的 关 注 内 存 因 为 如 果 应 用 使 用 的 内 存 逐 渐 增 多 会 直 接 影 响 到 网 页 的 性 能 甚 至 导 致 浏 览 器 标 签 页 崩 溃 这 篇 文 章 我 们 将 研 究 javascript 编 码 导 致 内 存 泄 漏 的 场 景 提 供 一 些 内 存 管 理 的 建 议 js 中 的 块 作 用 域 和 遮 蔽 效 应 js 中 的 代 码 块 是 什 么 块 级 作 用 域 是 什 么 遮 蔽 效 应 是 什 么 非 法 遮 蔽 是 什 么 块 级 作 用 域 和 词 法 作 用 域", "source_text": "JavaScript 是一门基于原型、头等函数的语言,是一门多范式的语言,它支持面向对象程式設計,指令式编程,以及函数式编程。它提供语法来操控文本、数组、日期以及正则表达式等,不支持 I/O,比如网络、存储和图形等,但这些都可以由它的宿主环境提供支持。\n\n知识进阶\n\n《JS阻塞渲染,这么多年我理解错啦?》\n\n在中文社区,这么多年一直流传一个说法:JS线程负责执行JS,GUI渲染线程负责渲染,这两者是互斥的,所以JS执行时会阻塞渲染。\n\n但随着Dev Tools使用的增多,逐渐开始怀疑以上说法。本文会以实际案例来解释为什么JS阻塞渲染。\n\n《JavaScript 之原型、原型链》\n\n其他编程语言如 Java 等使用 new 命令时,都会调用“类”的构造函数。但是,JavaScript没有“类”,本身并不提供一个 class 实现(虽然在ES6中提供了class 关键字,但其只是语法糖,JavaScript仍然是基于原型的)。于是,JavaScript作了一个简化的思想,new 命令后面跟的不是类,而是构造函数,用构造函数生成实例对象,但其缺点是无法共享属性和方法。于是,就为构造函数设置了一个 prototype 属性,这个属性包含一个对象(prototype对象)。所有实例对象需要共享的属性和方法都放在这个对象里,那些不需要共享的属性和方法就放在构造函数里。\n\n《JavaScript Promise 的理解和使用》\n\n什么是Promise?\nPromise怎么用?\n\n《5个一定要学会的JavaScript新特性》\n\nJavaScript 在不断地升级迭代,越来越多的新特性让我们的代码写起来变得简洁有趣,这篇文章会介绍5个新特性,一起研究一下吧。\n\n《你可能不了解的 Promise 微任务类型》\n\nECMA 规范中把 Promise 微任务分成了 NewPromiseReactionJob 和NewPromiseResolveThenableJob 两种类型,下面结合规范来分别看下这两种微任务的产生时机和执行内容。\n\n《JavaScript闭包》\n\n在 JavaScript 中闭包描述的是 function 中外层作用域的变量被内层作用域引用的场景,闭包的结构为内层作用域保存了外层作用域的变量。\n\n本文将带你用正确姿势看待JavaScript闭包。\n\n《JavaScript内存泄漏》\n\n在传统的网页开发时无需过多考虑内存管理,通常也不会产生严重的后果。因为当用户点击链接打开新页面或者刷新页面,页面内的信息就会从内存中清理掉。\n\n随着SPA(Single Page Application)应用的增多,迫使我们在编码时需要更多的关注内存。因为如果应用使用的内存逐渐增多会直接影响到网页的性能,甚至导致浏览器标签页崩溃。\n\n这篇文章,我们将研究JavaScript编码导致内存泄漏的场景,提供一些内存管理的建议。\n\n《JS中的块作用域和遮蔽效应》\n\nJS中的代码块是什么?\n块级作用域是什么?\n遮蔽效应是什么?\n非法遮蔽是什么?\n块级作用域和词法作用域", "segmentation_method": "reviewed_source_semantics", "label": "开篇:JavaScript 是一门基于原型、头等函数的语言,是一门多范式的语言,它支持面向对象程式設計,指令式编程,以及函数式 — 知识进阶", "source_line_range": [ 1, 48 ] }, { "id": "body-region-2", "text": "应 用 实 践 js 生 成 uuid 的 几 种 方 法 uuid universally unique identifier 全 局 唯 一 标 识 符 uuid 是 一 种 由 算 法 生 成 的 二 进 制 长 度 为 128 位 的 数 字 标 识 符 uuid 的 格 式 为 xxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxx 其 中 的 x 是 0 9 或 a f 范 围 内 的 一 个 32 位 十 六 进 制 数 在 理 想 情 况 下 任 何 计 算 机 和 计 算 机 集 群 都 不 会 生 成 两 个 相 同 的 uuid js 数 组 去 重 常 见 的 七 种 方 法 filter 方 法 创 建 一 个 新 的 数 组 新 数 组 中 的 元 素 是 通 过 检 查 指 定 数 组 中 符 合 条 件 的 所 有 元 素 item 是 当 前 元 素 的 值 index 是 当 前 元 素 的 索 引 值 indexof 方 法 可 返 回 某 个 指 定 的 字 符 串 值 在 字 符 串 中 首 次 出 现 的 位 置 利 用 indexof 查 询 到 数 组 的 下 标 看 是 否 等 于 当 前 的 下 标 相 等 的 话 就 返 回 否 则 不 返 回 值 javascript 深 拷 贝 的 几 种 方 法 浅 拷 贝 是 创 建 一 个 新 对 象 这 个 对 象 有 着 原 始 对 象 属 性 值 的 拷 贝 如 果 属 性 是 基 本 类 型 拷 贝 的 就 是 基 本 类 型 的 值 如 果 属 性 是 引 用 类 型 拷 贝 的 是 内 存 地 址 如 果 不 进 行 深 拷 贝 其 中 一 个 对 象 改 变 了 对 象 的 值 就 会 影 响 到 另 一 个 对 象 的 值 深 拷 贝 是 将 一 个 对 象 从 内 存 中 完 整 的 拷 贝 一 份 出 来 从 堆 内 存 中 开 辟 一 个 新 的 区 域 存 放 新 对 象 且 修 改 新 对 象 不 会 影 响 原 对 象 js 数 据 类 型 转 换 的 几 种 方 式 强 制 类 型 转 换 string tostring 转 字 符 串 类 型 字 符 串 转 数 值 类 型 number parseint 字 符 串 转 数 组 split 数 组 转 字 符 串 join javascript 的 几 种 继 承 方 式 javascript 的 几 种 继 承 方 式 原 型 链 继 承 借 助 构 造 函 数 继 承 经 典 继 承 组 合 继 承 原 型 链 借 用 构 造 函 数 最 常 用 原 型 式 继 承 object create 寄 生 式 继 承 寄 生 组 合 式 继 承 最 理 想 es6 中 的 继 承 让 你 事 半 功 倍 的 js utils 工 具 函 数 今 日 分 享 一 篇 积 累 和 收 集 了 很 久 的 js utils 工 具 函 数 文 章 代 码 量 较 多 建 议 收 藏 起 来 慢 慢 看 当 哪 一 天 需 要 用 到 的 时 候 打 开 你 尘 封 已 久 的 收 藏 夹 相 信 能 让 你 的 业 务 代 码 开 发 事 半 功 倍 汇 集 了 时 间 相 关 dom 相 关 url 相 关 判 断 相 关 图 片 相 关 缓 存 相 关 等 部 分 逻 辑 处 理 较 为 简 单 如 果 是 业 务 量 较 为 复 杂 的 情 况 建 议 要 斟 酌 使 用 但 对 于 大 部 分 的 项 目 应 该 是 绰 绰 有 余 接 下 来 就 进 入 代 码 部 分 吧 2022 年 的 javascript 开 发 工 具 编 译 器 负 责 将 输 入 代 码 转 换 为 某 种 目 标 输 出 格 式 出 于 我 们 的 目 的 我 们 关 注 的 是 那 些 支 持 将 现 代 javascript 和 typescript 转 换 成 特 定 版 本 的 ecmascript 的 编 译 器 这 些 ecmascript 兼 容 浏 览 器 和 最 新 版 本 的 node js 手 动 实 现 一 个 js 执 行 引 擎 支 持 解 析 js 脚 本 生 成 语 法 树 格 式 化 代 码 支 持 运 行 完 整 js 脚 本 支 持 安 全 模 式 运 行 单 行 表 达 式 支 持 设 置 超 时 时 间 js 获 取 页 面 尺 寸 在 大 多 数 情 况 下 document documentelement clientwidth 都 能 返 回 正 确 的 值 但 在 ie6 的 quirks 模 式 中 document body clientwidth 返 回 正 确 的 值 所 以 要 做 兼 容 处 理 另 外 clientwidth 和 clientheight 都 是 只 读 属 性 不 能 对 它 们 赋 值", "source_text": "应用实践\n\n《js 生成UUID的几种方法》\n\nUUID(Universally Unique IDentifier) 全局唯一标识符。\nUUID是一种由算法生成的二进制长度为128位的数字标识符。UUID\n的格式为“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”,其中的 x 是 0-9 或 a-f\n范围内的一个32位十六进制数。在理想情况下,任何计算机和计算机集群都不会生成两个相同的UUID。\n\n《js数组去重常见的七种方法》\n\nfilter() 方法创建一个新的数组,新数组中的元素是通过检查指定数组中符合条件的所有元素。item是当前元素的值,index是当前元素的索引值。indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。利用indexOf() 查询到数组的下标,看是否等于当前的下标,相等的话就返回,否则不返回值。\n\n《JavaScript深拷贝的几种方法》\n\n浅拷贝是创建一个新对象,这个对象有着原始对象属性值的拷贝。如果属性是基本类型,拷贝的就是基本类型的值,如果属性是引用类型,拷贝的是内存地址 。如果不进行深拷贝,其中一个对象改变了对象的值,就会影响到另一个对象的值。\n深拷贝是将一个对象从内存中完整的拷贝一份出来,从堆内存中开辟一个新的区域存放新对象,且修改新对象不会影响原对象。\n\n《js 数据类型转换的几种方式》\n\n强制类型转换 String(),toString() 转字符串类型\n字符串转数值类型 Number parseInt()\n字符串转数组split,数组转字符串join\n.......\n\n《JavaScript的几种继承方式》\n\nJavaScript的几种继承方式\n原型链继承\n借助构造函数继承(经典继承)\n组合继承:原型链 + 借用构造函数(最常用)\n原型式继承 (Object.create)\n寄生式继承\n寄生组合式继承(最理想)\nES6中的继承\n\n《让你事半功倍的 JS utils工具函数》\n\n今日分享一篇积累和收集了很久的JS utils工具函数,文章代码量较多,建议收藏起来慢慢看,当哪一天需要用到的时候,打开你尘封已久的收藏夹,相信能让你的业务代码开发事半功倍。\n汇集了时间相关,DOM相关,URL相关,判断相关,图片相关,缓存相关等。部分逻辑处理较为简单,如果是业务量较为复杂的情况建议要斟酌使用,但对于大部分的项目应该是绰绰有余。接下来就进入代码部分吧~\n\n《2022年的JavaScript开发工具》\n\n编译器负责将输入代码转换为某种目标输出格式。出于我们的目的,我们关注的是那些支持将现代 JavaScript 和TypeScript 转换成特定版本的 ECMAscript 的编译器,这些 ECMAscript 兼容浏览器和最新版本的 Node.js。\n\n《手动实现一个JS执行引擎》\n\n支持解析js脚本生成语法树、格式化代码\n支持运行完整js脚本\n支持安全模式运行单行表达式\n支持设置超时时间\n\n《js获取页面尺寸》\n\n在大多数情况下,document.documentElement.clientWidth 都能返回正确的值, 但在IE6的quirks模式中,document.body.clientWidth返回正确的值,所以要做兼容处理。另外clientWidth 和 clientHeight 都是只读属性,不能对它们赋值。", "segmentation_method": "reviewed_source_semantics", "label": "应用实践", "source_line_range": [ 49, 103 ] }, { "id": "body-region-3", "text": "面 试 真 题 js 面 试 题 基 础 梳 理 javascript 有 几 种 数 据 类 型 javascript 最 大 安 全 数 字 与 最 小 安 全 数 字 深 拷 贝 与 浅 拷 贝 的 区 别 闭 包 是 什 么 js 面 试 题 进 阶 梳 理 undeclared 与 undefined 的 区 别 let const 与 var 的 区 别 获 取 dom 元 素 有 哪 些 方 法 操 作 dom 元 素 有 哪 些 方 法", "source_text": "面试真题\n\n《js面试题(基础)梳理》\n\nJavaScript有几种数据类型?\nJavaScript最大安全数字与最小安全数字?\n深拷贝与浅拷贝的区别?\n闭包是什么?\n\n《js面试题(进阶)梳理》\n\nundeclared 与 undefined的区别?\nlet & const与 var 的区别?\n获取DOM元素有哪些方法?\n操作DOM元素有哪些方法", "segmentation_method": "reviewed_source_semantics", "label": "面试真题", "source_line_range": [ 104, 118 ] }, { "id": "body-region-4", "text": "热 门 问 答 js 怎 么 获 取 节 点 下 所 有 子 节 点 的 文 本 并 存 到 数 组 中 js 实 现 文 本 压 缩 可 以 采 用 什 么 方 法 如 何 用 js 实 现 java 中 int 强 制 转 换 为 byte 类 型 即 byte js 递 归 修 改 树 状 结 构 js 双 存 循 环 如 何 快 速 高 效 判 断 数 组 里 面 的 条 件 是 否 满 足 js 如 何 获 取 今 日 开 始 时 间 戳 和 结 束 时 间 戳 js 如 何 把 内 存 循 环 里 面 的 字 段 提 出 来 拼 接 外 层 循 环 的 字 段 js 如 何 判 断 数 组 里 对 象 的 value 是 否 有 重 复", "source_text": "热门问答\njs 怎么获取节点下所有子节点的文本并存到数组中?\njs 实现文本压缩可以采用什么方法?\n如何用 js 实现 java 中 int 强制转换为 byte 类型,即(byte)\njs 递归修改树状结构\njs 双存循环如何快速高效判断数组里面的条件是否满足\njs 如何获取今日开始时间戳和结束时间戳\njs 如何把内存循环里面的字段提出来拼接外层循环的字段\njs 如何判断数组里对象的 value 是否有重复", "segmentation_method": "reviewed_source_semantics", "label": "热门问答", "source_line_range": [ 119, 127 ] }, { "id": "body-region-5", "text": "课 程 推 荐 前 端 大 数 据 可 视 化 实 战 相 信 从 事 前 端 开 发 人 员 还 是 对 于 html css javascript browser 等 等 有 一 定 认 识 了 解 的 但 是 了 解 的 程 度 如 何 呢 知 道 含 义 简 单 熟 练 使 用 深 入 研 究 请 大 家 试 着 回 答 我 下 面 几 个 问 题 页 面 编 写 是 否 更 多 还 停 留 在 div 套 div 样 式 编 写 更 多 还 是 宽 高 定 位 javascript 是 否 深 入 了 解 过 javascript 为 什 么 是 单 线 程 呢 设 计 初 衷 受 限 原 因 javascript 在 browser 浏 览 器 中 如 何 运 行 的 如 何 编 译 的 预 编 译 即 时 编 译 在 前 端 领 域 内 自 己 是 否 有 专 注 的 一 个 方 向 或 者 说 是 找 工 作 的 杀 手 锏 试 着 解 答 过 后 或 许 结 果 并 不 是 那 么 理 想 结 果 如 何 没 有 太 大 关 系 个 人 认 为 有 问 题 不 可 怕 及 时 发 现 问 题 就 是 好 的 结 果 对 于 每 个 人 来 说 都 不 是 万 能 的 是 需 要 时 刻 学 习 时 刻 进 步 的 课 程 收 获 掌 握 一 项 随 处 可 见 日 益 增 加 的 技 术 需 求 提 升 自 身 技 术 拓 宽 前 端 视 野 加 强 硬 实 力 把 握 晋 升 机 会 基 于 计 算 机 底 层 向 前 端 架 构 迈 进 ps 大 家 想 看 哪 些 方 面 的 技 术 内 容 可 以 在 评 论 区 留 言 喔 如 有 问 题 可 以 添 加 小 姐 姐 微 信", "source_text": "课程推荐\n\n《前端大数据可视化实战》\n\n相信从事前端开发人员还是对于html,css,javascript,Browser等等有一定认识了解的。但是了解的程度如何呢? 知道含义?简单/熟练使用?深入研究?\n请大家试着回答我下面几个问题:\n\n页面编写是否更多还停留在 div 套 div ?样式编写更多还是宽,高,定位?\nJavaScript 是否深入了解过? javascript 为什么是单线程呢?(设计初衷?受限原因?)\nJavaScript 在 Browser (浏览器)中如何运行的? 如何编译的?( 预编译?即时编译? )\n在前端领域内自己是否有专注的一个方向?或者说是找工作的杀手锏?\n\n试着解答过后或许结果并不是那么理想,结果如何没有太大关系,个人认为有问题不可怕,及时发现问题就是好的结果。对于每个人来说都不是万能的,是需要时刻学习,时刻进步的。\n\n课程收获:\n\n掌握一项随处可见、日益增加的技术需求\n提升自身技术,拓宽前端视野\n加强硬实力,把握晋升机会\n基于计算机底层,向前端架构迈进\n\nPS:大家想看哪些方面的技术内容,可以在评论区留言喔 ~\n如有问题可以添加小姐姐微信~", "segmentation_method": "reviewed_source_semantics", "label": "课程推荐", "source_line_range": [ 128, 150 ] } ], "ending": { "text": "需求\n提升自身技术,拓宽前端视野\n加强硬实力,把握晋升机会\n基于计算机底层,向前端架构迈进\n\nPS:大家想看哪些方面的技术内容,可以在评论区留言喔 ~\n如有问题可以添加小姐姐微信~" } } }, { "id": "article-049", "name": "开源日报:PostgreSQL 17 等", "url": "https://www.oschina.net/news/313870", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "开源日报 \\| PostgreSQL 17;中国AI公司如何绕过美国的芯片禁令;开源许可证选择器;谁能解AI开发者的渴?" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "来源:OSCHINA" ] }, { "id": "stable-3", "alternatives": [ "编辑:局" ] }, { "id": "stable-4", "alternatives": [ "OSC开源社区" ] }, { "id": "stable-12", "alternatives": [ "首页" ] }, { "id": "stable-13", "alternatives": [ "博客" ] }, { "id": "stable-14", "alternatives": [ "软件" ] }, { "id": "stable-15", "alternatives": [ "造物" ] }, { "id": "stable-16", "alternatives": [ "智库" ] }, { "id": "stable-17", "alternatives": [ "动弹" ] }, { "id": "stable-18", "alternatives": [ "专区" ] }, { "id": "stable-19", "alternatives": [ "活动" ] }, { "id": "stable-20", "alternatives": [ "工具" ] }, { "id": "stable-21", "alternatives": [ "培训" ] }, { "id": "stable-22", "alternatives": [ "登录" ] }, { "id": "stable-23", "alternatives": [ "注册" ] }, { "id": "stable-24", "alternatives": [ "复制" ] }, { "id": "stable-25", "alternatives": [ "总结由社区平台通过AI大模型技术生成" ] }, { "id": "stable-26", "alternatives": [ "推荐阅读" ] }, { "id": "stable-27", "alternatives": [ "关注" ] }, { "id": "stable-28", "alternatives": [ "私 信" ] }, { "id": "stable-29", "alternatives": [ "本站新闻禁止未经授权转载,违者依法追究相关法律责任" ] }, { "id": "stable-30", "alternatives": [ "OSCHINA社区" ] }, { "id": "stable-31", "alternatives": [ "关于我们" ] }, { "id": "stable-32", "alternatives": [ "公司动态" ] }, { "id": "stable-33", "alternatives": [ "帮助中心" ] }, { "id": "stable-34", "alternatives": [ "商务合作" ] }, { "id": "stable-35", "alternatives": [ "在线工具" ] }, { "id": "stable-36", "alternatives": [ "CopyCat-代码克隆检测" ] }, { "id": "stable-37", "alternatives": [ "实用在线工具" ] }, { "id": "stable-38", "alternatives": [ "开源/AI软件库" ] }, { "id": "stable-39", "alternatives": [ "Awesome 软件" ] }, { "id": "stable-40", "alternatives": [ "攻略" ] }, { "id": "stable-41", "alternatives": [ "开始造物" ] }, { "id": "stable-42", "alternatives": [ "投递新闻" ] }, { "id": "stable-43", "alternatives": [ "软件投递" ] }, { "id": "stable-44", "alternatives": [ "项目运营" ] }, { "id": "stable-45", "alternatives": [ "OSC开源社区APP" ] }, { "id": "stable-46", "alternatives": [ "Android / iOS" ] }, { "id": "stable-47", "alternatives": [ "开源软件推进联盟" ] }, { "id": "stable-48", "alternatives": [ "指定官方社区" ] }, { "id": "stable-49", "alternatives": [ "社区规范" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "开源日报 | PostgreSQL 17;中国AI公司如何绕过美国的芯片禁令;开源许可证选择器;谁能解AI开发者的渴?" ], "html_selector": "h1,h2,[role=\"heading\"],h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#comment .ant-comment:has(> .ant-comment-inner > .ant-comment-content > .ant-comment-content-author .user-name)", "author_selector": ".ant-comment-content-author-name > .user-name", "body_selector": ".ant-comment-content-detail", "id_attribute": "id", "section_markers": [ "评论", "评论:", "Comments" ], "version": 2, "minimum_comments": 1, "text_scope": { "body_end": "11:只能说,还好祖师爷不是老顽固,冥顽不化。不然linux内核未来真的药丸💊。 毕竟总不能让生生世世的年轻人都去玩c对吧。时代在发展毕竟。大人,时代变了。\n\n---END---", "end_markers": [ "推荐阅读", "关于我们" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-049/comment-qualification-reference-r5.json", "sha256": "db4bfb339f114627ac620b08209ef1573b3202d06c1b37a546076d1936fe6d16", "chars": 945, "record_count": 1 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 1, "qualification_only": true } }, "ground_truth_main_content": "欢迎阅读 OSCHINA 编辑部出品的开源日报,每天更新一期。\n\n# 2024.9.27\n今日要闻\n警惕Unix系列CUPS多个安全漏洞最终可导致远程代码执行\n\nCUPS(Common UNIX Printing System)是一个开源的打印架构,广泛用于类 UNIX 操作系统,CUPS 采用互联网打印协议(IPP,Internet Printing Protocol)作为其核心协议,这使得它能够在网络环境中高效地管理打印任务和打印机资源。\n\n近日有国外安全研究者宣称发现多个关于CUPS的多个安全漏洞(CVE-2024-47176/CVE-2024-47076/CVE-2024-47175/CVE-2024-47177),影响广泛并可导致远程代码执行。攻击者可远程(无需认证)通过cups-browsed进程监听(默认631端口)发送恶意UDP数据包,最终在目前系统上实现任意命令执行。\n\n值得注意该系列漏洞可通过互联网进行攻击,通过知道创宇旗下全球著名网络空间搜索引擎ZoomEye统计有大量的曾经有大量(百万级)的系统对外开放了CUPS服务,近一年也将近约18万资产对互联网开放了CUPS服务。\n\n另外该漏洞细节存在提前泄露可能,所以建议大家注意排查相关服务器安全,修复防御漏洞。\n\n临时防御:目前各操作系统官方补丁还在开发中,目前可通过临时停止相关服务(cpus-browsed)进行缓解。\n\nPostgreSQL 17 发布\n\nPostgreSQL 17 现已发布。公告称 “这是世界上最先进的开源数据库的最新版本。”\n\nPostgreSQL 17 在适应新兴数据访问和存储模式的同时,提高了性能和可扩展性显著提高了整体性能,包括彻底改进的 vacuum 内存管理实现、存储访问优化和高并发工作负载改进、批量加载和导出加速以及索引查询执行改进。PostgreSQL 17 具有使全新工作负载和关键系统都受益的功能,例如,增加了使用 SQL/JSONJSON_TABLE 命令的开发人员体验,增强了逻辑复制从而简化了高可用性工作负载和主要版本升级的管理。\n\nPostgreSQL 核心团队成员 Jonathan Katz 表示:“PostgreSQL 17 凸显了推动 PostgreSQL 发展的全球开源社区如何构建增强功能,帮助用户完成数据库之旅的各个阶段。无论是大规模操作数据库的改进,还是建立在令人愉悦的开发人员体验基础上的新功能,PostgreSQL 17 都将增强您的数据管理体验。”\n\n脚本语言 Tcl 与 Python 使用的那个 GUI 包 Tk 发布 9.0 版本\n\nTcl/Tk 9.0 已经发布,它具有许多新功能,但与 Tcl/Tk 8 存在一些不兼容性。\n\nTcl(最早称为 “工具命令语言”\"Tool Command Language\",但是目前已经不是这个含义,不过我们仍然称呼它为 TCL)是一种 脚本语言。由 John Ousterhout 创建。 TCL 很好学,功能很强大。TCL 经常被用于快速原型开发,脚本编程,GUI 和测试等方面。TCL 念作 “踢叩”(tickle)。\n\n使用最广泛的 TCL 扩展是 Tk,Tk 提供了各种 OS 平台下的图形用户界面 GUI。连强大的 Python 语言都不单独提供自己的 GUI,而是提供接口适配到 Tk 上。是的,Python 上用的那个 Tk。\n\nRWKV-7 架构已发布预览版,真正超越 attention 范式\n\nRWKV-7(代号 Goose 雁)预览版 RWKV-7 \"Goose\" x070.rc2-2409-2r7a-b0b4a 现已推出。\n\nRWKV-7 超越了 attention /linear attention 范式,它的状态演化很灵活,可以解决在相同算力消耗下 attention 无法解决的问题。\n\n相对 RWKV-6 Finch ,RWKV-7 Goose 的训练 Loss 更低,且训练非常稳定:\n\n今日观察\n社交观察\n开源许可证选择器\n\n开源许可证选择器,用大白话和选择项来选择你想要的许可证 http://t.cn/A6E5FcIp。\n\n- 知乎 蚁工厂\n\n中国AI公司通过巧妙创新、调整软件,来绕过美国的芯片禁令\n\n据《经济学人》报道,中国AI公司通过巧妙创新、调整软件,来绕过美国的芯片禁令。\n\n- 微博 萌音新视界\n\n原声音模拟诈骗技术可能来源于2019年的谷歌AI算法\n这个声音模拟诈骗技术可能来源于2019年的谷歌ai算法http://t.cn/A6NSzxks。只需5秒钟音源就可以模拟当事人声音,当时谷歌知道这种技术是双刃剑,所以没有敢开源公布,但是没想到某些人通过论文还原出了这项技术,并且于2019年在国内做出了中文版软件……\n\n- 微博 少年伯爵\n\n“三只羊”录音门案件告破,AI音视频伪造风险敲警钟\n9月16日,王某某利用从互联网下载的音视频资料,杜撰卢某某酒后言论脚本,先使用AI工具训练生成假冒卢某某的音频(其中出现的女声也系AI工具训练生成),后用视频软件合成音视频,并通过网络发布,形成谣言大量传播。目前,王某某已被依法采取刑事强制措施,案件正在进一步侦办中。\n\n- 第一财经\n\n媒体观察\n人工智能能力建设普惠计划\n\n为弥合数字和智能鸿沟,特别是帮助全球南方在人工智能发展进程中平等受益,中方认为要坚持联合国在国际发展合作中的统筹协调作用,坚持真正多边主义,基于主权平等、发展导向、以人为本、普惠包容、协同合作原则,通过南北合作、南南合作和三方合作等形式,切实落实联大加强人工智能能力建设国际合作决议(A/RES/78/311),推动落实联合国2030年可持续发展议程。为此,中国提出“人工智能能力建设普惠计划”,并呼吁各方对人工智能能力建设加大投入。\n\n- 中华人民共和国外交部\n\n打完“价格战”,大模型还要比什么?\n\n下一步,北京将以“平台、项目、人才、合作”为工作主线,大力推动开源领域发展,打造开发者、资金、技术等要素的引力场,助力提升我国在国际开源界的影响力和话语权。要夯实开源基础设施,加快建设北京国际开源社区,大力支持开源软件和技术创新,鼓励高校、科研机构与企业联合开展开源教育,培养更多具有开源意识的创新者。要加速开源项目孵化,支持建设开源创业孵化器,推动优质国内开源项目在重点场景应用落地,鼓励开源硬件与软件同步开放。要深化开源国际合作,完善开源企业出海服务体系,参与全球重要开源项目建设和标准规则制定,提升开源创新国际化水平。\n\n- 伯虎财经\n\n院士称华为搞封闭垄断难对抗西方:众网友反击华为模式足够成功\n\n在网友看来,华为并没有搞垄断,华为的供应链是开放的,华为的手机里绝大部分都是采用的国内供应商的零部件,这都是肉眼可见的助力国产。此外,更多的网友也表示,鸿蒙系统也有开源的版本(纯血鸿蒙更是中国人真正的移动操作系统),华为在美国的持续打压下不仅没有趴下,反而还越来越强大了,证明了华为模式的成功。\n\n在孙凝晖院士看来,自己也并未否定华为模式的优势和作用,而是强调国内的技术发展和突破,仅仅依靠华为模式是不够的,还需要更开放的生态模式,需要更多的企业来发挥他的力量。\n\n- 快科技\n\n中国开源者数量居世界前列 从开源大国迈向开源强国\n\n目前我国开源参与者数量、增长速度均位居世界前列;开源欧拉社区汇聚贡献者2万余人,用户数量超过350万人;开源鸿蒙项目吸引340余家生态单位共建,搭载设备数量超过9亿台;木兰中文开源许可协议实现国际通用。\n\n- 中国经营网 \n\n金融业要如何迎接大模型下半场?\n\n如今,金融业正在迎接大模型的“下半场”,从早期的技术探索转向全面的业务应用。在这场技术变革中,金融机构如何借助大模型提质增效,如何在智能化的浪潮中抢占先机,成为业内关注的焦点。\n\n- 九卦金融圈\n\n谁能解AI开发者的渴?\n\n在技术落地与创新中,AI开发者的角色无可替代。无论是那些拥有名校背景的明星团队,还是独立开发者和高校学生,他们都凭借热忱和胆识投入其中。然而,面对的挑战同样尖锐,资源匮乏、市场竞争白热化、技术迅速迭代等问题一一袭来。\n\n- 市象\n\n今日推荐\n开源项目\ngarden-io/garden\n\nhttps://github.com/garden-io/garden\n\nGarden 是一款可自动完成工作流的开发工具,使 Kubernetes 应用的开发和测试变得快捷,无需在笔记本电脑上运行 Docker 或 Kubernetes,快速的集群内构建、对 dev 和 CI 使用相同的命令和配置。\n\n每日一博\n从数据库发展历程到数据结构设计探析\n\n起初,数据的管理方式是文件系统,数据存储在文件中,数据管理和维护都由程序员完成。后来发展出树形结构和网状结构的数据库,但都存在着难以扩展和维护的问题。直到七十年代,关系数据库理论的提出,以表格形式组织数据,数据之间存在关联关系,具有了良好的结构化和规范化特性,成为主流数据库类型。\n\n开源之声\n用户观点\n谷歌搜索快照功能“死透透”\n观点 1:好了,这下互联网真的没有记忆了\n观点 2:合订本制作工具-1\n观点 3:其实挺可惜的,有些不错的小站悄无声息地没入尘烟,有快照至少还能留住一部分互联网的记忆\n观点 4:防止别有用心的人恶意翻合订本\n观点 5:就是失去了“过去二十余年间积累的快照” 数据 导致本土ai训练材料严重不足\n观点 6:ai搜索的效果就是依托。它效果那么好你干嘛不在所有文本编辑器里也搞这样子的搜索?1200000000条结果只给你返回最前面的100条\n观点 7:Google给Web Archive捐款了没\n观点 8:看来以后想网页留档只能靠自己建一个快照站了\n观点 9:就算不用,搜索引擎也是会存一份快照的,不然怎么匹配网页中的关键字\n淘宝官宣:正式支持「微信支付」\n观点 1:微信啥时候支持支付宝支付呢,开发项目对接支付宝跳来跳去,很麻烦了\n观点 2:那么,京东什么时候支持支付宝\n观点 3:我替大家试了一下,它显示说余额不足,看来还要继续完善啊。\n观点 4:大家都是开放共享的,不是某部门要求的\nLinux创始人:C很简单,但易犯错,而Rust不是\n观点 1:我们编程界原神是这样的(\n观点 2:等等,Linus 这个类比… 先分清楚 rust 和 c 谁是 vi 谁是 emacs,分好之后,好了,大家可以各自加入自己的阵营开始互喷了\n观点 3:不知道rust难不难学\n观点 4:前面一般难,后面非常难。\n观点 5:rust写熟了很高效\n观点 6:刚怼完zig……底层编程需要的是对计算机体系有充分认知的人,而不是一个“提供狗屁安全性的工具”——你都可以自己吃螃蟹海鲜了,居然不能自己上厕所拉屎……听听,这符合逻辑吗!\n观点 7:谁说用rust写内核不需要懂底层了?你不需要提供安全性的工具,你咋不把c的类型检查给扬了?\n观点 8:因为rust太难了,所以才不会犯错吗\n观点 9:抬高了风险代码的编写成本。我发现我曾经无意中写的内存相关BUG,在Rust里真的要用unsafe才能编译通过。\n观点 10:对于linux内核是c好还是rust语言好,还有待争论。但是,编辑器领域必须是Emacs最好,不接受反驳\n观点 11:只能说,还好祖师爷不是老顽固,冥顽不化。不然linux内核未来真的药丸💊。 毕竟总不能让生生世世的年轻人都去玩c对吧。时代在发展毕竟。大人,时代变了。\n\n---END---\n\n ", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "欢 迎 阅 读 oschina 编 辑 部 出 品 的 开 源 日 报 每 天 更 新 一 期 2024 9 27", "source_text": "欢迎阅读 OSCHINA 编辑部出品的开源日报,每天更新一期。\n\n# 2024.9.27", "segmentation_method": "reviewed_source_semantics", "label": "开篇:欢迎阅读 OSCHINA 编辑部出品的开源日报,每天更新一期。", "source_line_range": [ 1, 3 ] }, { "id": "body-region-2", "text": "今 日 要 闻 警 惕 unix 系 列 cups 多 个 安 全 漏 洞 最 终 可 导 致 远 程 代 码 执 行 cups common unix printing system 是 一 个 开 源 的 打 印 架 构 广 泛 用 于 类 unix 操 作 系 统 cups 采 用 互 联 网 打 印 协 议 ipp internet printing protocol 作 为 其 核 心 协 议 这 使 得 它 能 够 在 网 络 环 境 中 高 效 地 管 理 打 印 任 务 和 打 印 机 资 源 近 日 有 国 外 安 全 研 究 者 宣 称 发 现 多 个 关 于 cups 的 多 个 安 全 漏 洞 cve 2024 47176 cve 2024 47076 cve 2024 47175 cve 2024 47177 影 响 广 泛 并 可 导 致 远 程 代 码 执 行 攻 击 者 可 远 程 无 需 认 证 通 过 cups browsed 进 程 监 听 默 认 631 端 口 发 送 恶 意 udp 数 据 包 最 终 在 目 前 系 统 上 实 现 任 意 命 令 执 行 值 得 注 意 该 系 列 漏 洞 可 通 过 互 联 网 进 行 攻 击 通 过 知 道 创 宇 旗 下 全 球 著 名 网 络 空 间 搜 索 引 擎 zoomeye 统 计 有 大 量 的 曾 经 有 大 量 百 万 级 的 系 统 对 外 开 放 了 cups 服 务 近 一 年 也 将 近 约 18 万 资 产 对 互 联 网 开 放 了 cups 服 务 另 外 该 漏 洞 细 节 存 在 提 前 泄 露 可 能 所 以 建 议 大 家 注 意 排 查 相 关 服 务 器 安 全 修 复 防 御 漏 洞 临 时 防 御 目 前 各 操 作 系 统 官 方 补 丁 还 在 开 发 中 目 前 可 通 过 临 时 停 止 相 关 服 务 cpus browsed 进 行 缓 解 postgresql 17 发 布 postgresql 17 现 已 发 布 公 告 称 这 是 世 界 上 最 先 进 的 开 源 数 据 库 的 最 新 版 本 postgresql 17 在 适 应 新 兴 数 据 访 问 和 存 储 模 式 的 同 时 提 高 了 性 能 和 可 扩 展 性 显 著 提 高 了 整 体 性 能 包 括 彻 底 改 进 的 vacuum 内 存 管 理 实 现 存 储 访 问 优 化 和 高 并 发 工 作 负 载 改 进 批 量 加 载 和 导 出 加 速 以 及 索 引 查 询 执 行 改 进 postgresql 17 具 有 使 全 新 工 作 负 载 和 关 键 系 统 都 受 益 的 功 能 例 如 增 加 了 使 用 sql jsonjson table 命 令 的 开 发 人 员 体 验 增 强 了 逻 辑 复 制 从 而 简 化 了 高 可 用 性 工 作 负 载 和 主 要 版 本 升 级 的 管 理 postgresql 核 心 团 队 成 员 jonathan katz 表 示 postgresql 17 凸 显 了 推 动 postgresql 发 展 的 全 球 开 源 社 区 如 何 构 建 增 强 功 能 帮 助 用 户 完 成 数 据 库 之 旅 的 各 个 阶 段 无 论 是 大 规 模 操 作 数 据 库 的 改 进 还 是 建 立 在 令 人 愉 悦 的 开 发 人 员 体 验 基 础 上 的 新 功 能 postgresql 17 都 将 增 强 您 的 数 据 管 理 体 验 脚 本 语 言 tcl 与 python 使 用 的 那 个 gui 包 tk 发 布 9 0 版 本 tcl tk 9 0 已 经 发 布 它 具 有 许 多 新 功 能 但 与 tcl tk 8 存 在 一 些 不 兼 容 性 tcl 最 早 称 为 工 具 命 令 语 言 tool command language 但 是 目 前 已 经 不 是 这 个 含 义 不 过 我 们 仍 然 称 呼 它 为 tcl 是 一 种 脚 本 语 言 由 john ousterhout 创 建 tcl 很 好 学 功 能 很 强 大 tcl 经 常 被 用 于 快 速 原 型 开 发 脚 本 编 程 gui 和 测 试 等 方 面 tcl 念 作 踢 叩 tickle 使 用 最 广 泛 的 tcl 扩 展 是 tk tk 提 供 了 各 种 os 平 台 下 的 图 形 用 户 界 面 gui 连 强 大 的 python 语 言 都 不 单 独 提 供 自 己 的 gui 而 是 提 供 接 口 适 配 到 tk 上 是 的 python 上 用 的 那 个 tk rwkv 7 架 构 已 发 布 预 览 版 真 正 超 越 attention 范 式 rwkv 7 代 号 goose 雁 预 览 版 rwkv 7 goose x070 rc2 2409 2r7a b0b4a 现 已 推 出 rwkv 7 超 越 了 attention linear attention 范 式 它 的 状 态 演 化 很 灵 活 可 以 解 决 在 相 同 算 力 消 耗 下 attention 无 法 解 决 的 问 题 相 对 rwkv 6 finch rwkv 7 goose 的 训 练 loss 更 低 且 训 练 非 常 稳 定", "source_text": "今日要闻\n警惕Unix系列CUPS多个安全漏洞最终可导致远程代码执行\n\nCUPS(Common UNIX Printing System)是一个开源的打印架构,广泛用于类 UNIX 操作系统,CUPS 采用互联网打印协议(IPP,Internet Printing Protocol)作为其核心协议,这使得它能够在网络环境中高效地管理打印任务和打印机资源。\n\n近日有国外安全研究者宣称发现多个关于CUPS的多个安全漏洞(CVE-2024-47176/CVE-2024-47076/CVE-2024-47175/CVE-2024-47177),影响广泛并可导致远程代码执行。攻击者可远程(无需认证)通过cups-browsed进程监听(默认631端口)发送恶意UDP数据包,最终在目前系统上实现任意命令执行。\n\n值得注意该系列漏洞可通过互联网进行攻击,通过知道创宇旗下全球著名网络空间搜索引擎ZoomEye统计有大量的曾经有大量(百万级)的系统对外开放了CUPS服务,近一年也将近约18万资产对互联网开放了CUPS服务。\n\n另外该漏洞细节存在提前泄露可能,所以建议大家注意排查相关服务器安全,修复防御漏洞。\n\n临时防御:目前各操作系统官方补丁还在开发中,目前可通过临时停止相关服务(cpus-browsed)进行缓解。\n\nPostgreSQL 17 发布\n\nPostgreSQL 17 现已发布。公告称 “这是世界上最先进的开源数据库的最新版本。”\n\nPostgreSQL 17 在适应新兴数据访问和存储模式的同时,提高了性能和可扩展性显著提高了整体性能,包括彻底改进的 vacuum 内存管理实现、存储访问优化和高并发工作负载改进、批量加载和导出加速以及索引查询执行改进。PostgreSQL 17 具有使全新工作负载和关键系统都受益的功能,例如,增加了使用 SQL/JSONJSON_TABLE 命令的开发人员体验,增强了逻辑复制从而简化了高可用性工作负载和主要版本升级的管理。\n\nPostgreSQL 核心团队成员 Jonathan Katz 表示:“PostgreSQL 17 凸显了推动 PostgreSQL 发展的全球开源社区如何构建增强功能,帮助用户完成数据库之旅的各个阶段。无论是大规模操作数据库的改进,还是建立在令人愉悦的开发人员体验基础上的新功能,PostgreSQL 17 都将增强您的数据管理体验。”\n\n脚本语言 Tcl 与 Python 使用的那个 GUI 包 Tk 发布 9.0 版本\n\nTcl/Tk 9.0 已经发布,它具有许多新功能,但与 Tcl/Tk 8 存在一些不兼容性。\n\nTcl(最早称为 “工具命令语言”\"Tool Command Language\",但是目前已经不是这个含义,不过我们仍然称呼它为 TCL)是一种 脚本语言。由 John Ousterhout 创建。 TCL 很好学,功能很强大。TCL 经常被用于快速原型开发,脚本编程,GUI 和测试等方面。TCL 念作 “踢叩”(tickle)。\n\n使用最广泛的 TCL 扩展是 Tk,Tk 提供了各种 OS 平台下的图形用户界面 GUI。连强大的 Python 语言都不单独提供自己的 GUI,而是提供接口适配到 Tk 上。是的,Python 上用的那个 Tk。\n\nRWKV-7 架构已发布预览版,真正超越 attention 范式\n\nRWKV-7(代号 Goose 雁)预览版 RWKV-7 \"Goose\" x070.rc2-2409-2r7a-b0b4a 现已推出。\n\nRWKV-7 超越了 attention /linear attention 范式,它的状态演化很灵活,可以解决在相同算力消耗下 attention 无法解决的问题。\n\n相对 RWKV-6 Finch ,RWKV-7 Goose 的训练 Loss 更低,且训练非常稳定:", "segmentation_method": "reviewed_source_semantics", "label": "今日要闻", "source_line_range": [ 4, 40 ] }, { "id": "body-region-3", "text": "今 日 观 察 社 交 观 察 开 源 许 可 证 选 择 器 开 源 许 可 证 选 择 器 用 大 白 话 和 选 择 项 来 选 择 你 想 要 的 许 可 证 http t cn a6e5fcip 知 乎 蚁 工 厂 中 国 ai 公 司 通 过 巧 妙 创 新 调 整 软 件 来 绕 过 美 国 的 芯 片 禁 令 据 经 济 学 人 报 道 中 国 ai 公 司 通 过 巧 妙 创 新 调 整 软 件 来 绕 过 美 国 的 芯 片 禁 令 微 博 萌 音 新 视 界 原 声 音 模 拟 诈 骗 技 术 可 能 来 源 于 2019 年 的 谷 歌 ai 算 法 这 个 声 音 模 拟 诈 骗 技 术 可 能 来 源 于 2019 年 的 谷 歌 ai 算 法 http t cn a6nszxks 只 需 5 秒 钟 音 源 就 可 以 模 拟 当 事 人 声 音 当 时 谷 歌 知 道 这 种 技 术 是 双 刃 剑 所 以 没 有 敢 开 源 公 布 但 是 没 想 到 某 些 人 通 过 论 文 还 原 出 了 这 项 技 术 并 且 于 2019 年 在 国 内 做 出 了 中 文 版 软 件 微 博 少 年 伯 爵 三 只 羊 录 音 门 案 件 告 破 ai 音 视 频 伪 造 风 险 敲 警 钟 9 月 16 日 王 某 某 利 用 从 互 联 网 下 载 的 音 视 频 资 料 杜 撰 卢 某 某 酒 后 言 论 脚 本 先 使 用 ai 工 具 训 练 生 成 假 冒 卢 某 某 的 音 频 其 中 出 现 的 女 声 也 系 ai 工 具 训 练 生 成 后 用 视 频 软 件 合 成 音 视 频 并 通 过 网 络 发 布 形 成 谣 言 大 量 传 播 目 前 王 某 某 已 被 依 法 采 取 刑 事 强 制 措 施 案 件 正 在 进 一 步 侦 办 中 第 一 财 经 媒 体 观 察 人 工 智 能 能 力 建 设 普 惠 计 划 为 弥 合 数 字 和 智 能 鸿 沟 特 别 是 帮 助 全 球 南 方 在 人 工 智 能 发 展 进 程 中 平 等 受 益 中 方 认 为 要 坚 持 联 合 国 在 国 际 发 展 合 作 中 的 统 筹 协 调 作 用 坚 持 真 正 多 边 主 义 基 于 主 权 平 等 发 展 导 向 以 人 为 本 普 惠 包 容 协 同 合 作 原 则 通 过 南 北 合 作 南 南 合 作 和 三 方 合 作 等 形 式 切 实 落 实 联 大 加 强 人 工 智 能 能 力 建 设 国 际 合 作 决 议 a res 78 311 推 动 落 实 联 合 国 2030 年 可 持 续 发 展 议 程 为 此 中 国 提 出 人 工 智 能 能 力 建 设 普 惠 计 划 并 呼 吁 各 方 对 人 工 智 能 能 力 建 设 加 大 投 入 中 华 人 民 共 和 国 外 交 部 打 完 价 格 战 大 模 型 还 要 比 什 么 下 一 步 北 京 将 以 平 台 项 目 人 才 合 作 为 工 作 主 线 大 力 推 动 开 源 领 域 发 展 打 造 开 发 者 资 金 技 术 等 要 素 的 引 力 场 助 力 提 升 我 国 在 国 际 开 源 界 的 影 响 力 和 话 语 权 要 夯 实 开 源 基 础 设 施 加 快 建 设 北 京 国 际 开 源 社 区 大 力 支 持 开 源 软 件 和 技 术 创 新 鼓 励 高 校 科 研 机 构 与 企 业 联 合 开 展 开 源 教 育 培 养 更 多 具 有 开 源 意 识 的 创 新 者 要 加 速 开 源 项 目 孵 化 支 持 建 设 开 源 创 业 孵 化 器 推 动 优 质 国 内 开 源 项 目 在 重 点 场 景 应 用 落 地 鼓 励 开 源 硬 件 与 软 件 同 步 开 放 要 深 化 开 源 国 际 合 作 完 善 开 源 企 业 出 海 服 务 体 系 参 与 全 球 重 要 开 源 项 目 建 设 和 标 准 规 则 制 定 提 升 开 源 创 新 国 际 化 水 平 伯 虎 财 经 院 士 称 华 为 搞 封 闭 垄 断 难 对 抗 西 方 众 网 友 反 击 华 为 模 式 足 够 成 功 在 网 友 看 来 华 为 并 没 有 搞 垄 断 华 为 的 供 应 链 是 开 放 的 华 为 的 手 机 里 绝 大 部 分 都 是 采 用 的 国 内 供 应 商 的 零 部 件 这 都 是 肉 眼 可 见 的 助 力 国 产 此 外 更 多 的 网 友 也 表 示 鸿 蒙 系 统 也 有 开 源 的 版 本 纯 血 鸿 蒙 更 是 中 国 人 真 正 的 移 动 操 作 系 统 华 为 在 美 国 的 持 续 打 压 下 不 仅 没 有 趴 下 反 而 还 越 来 越 强 大 了 证 明 了 华 为 模 式 的 成 功 在 孙 凝 晖 院 士 看 来 自 己 也 并 未 否 定 华 为 模 式 的 优 势 和 作 用 而 是 强 调 国 内 的 技 术 发 展 和 突 破 仅 仅 依 靠 华 为 模 式 是 不 够 的 还 需 要 更 开 放 的 生 态 模 式 需 要 更 多 的 企 业 来 发 挥 他 的 力 量 快 科 技 中 国 开 源 者 数 量 居 世 界 前 列 从 开 源 大 国 迈 向 开 源 强 国 目 前 我 国 开 源 参 与 者 数 量 增 长 速 度 均 位 居 世 界 前 列 开 源 欧 拉 社 区 汇 聚 贡 献 者 2 万 余 人 用 户 数 量 超 过 350 万 人 开 源 鸿 蒙 项 目 吸 引 340 余 家 生 态 单 位 共 建 搭 载 设 备 数 量 超 过 9 亿 台 木 兰 中 文 开 源 许 可 协 议 实 现 国 际 通 用 中 国 经 营 网 金 融 业 要 如 何 迎 接 大 模 型 下 半 场 如 今 金 融 业 正 在 迎 接 大 模 型 的 下 半 场 从 早 期 的 技 术 探 索 转 向 全 面 的 业 务 应 用 在 这 场 技 术 变 革 中 金 融 机 构 如 何 借 助 大 模 型 提 质 增 效 如 何 在 智 能 化 的 浪 潮 中 抢 占 先 机 成 为 业 内 关 注 的 焦 点 九 卦 金 融 圈 谁 能 解 ai 开 发 者 的 渴 在 技 术 落 地 与 创 新 中 ai 开 发 者 的 角 色 无 可 替 代 无 论 是 那 些 拥 有 名 校 背 景 的 明 星 团 队 还 是 独 立 开 发 者 和 高 校 学 生 他 们 都 凭 借 热 忱 和 胆 识 投 入 其 中 然 而 面 对 的 挑 战 同 样 尖 锐 资 源 匮 乏 市 场 竞 争 白 热 化 技 术 迅 速 迭 代 等 问 题 一 一 袭 来 市 象", "source_text": "今日观察\n社交观察\n开源许可证选择器\n\n开源许可证选择器,用大白话和选择项来选择你想要的许可证 http://t.cn/A6E5FcIp。\n\n- 知乎 蚁工厂\n\n中国AI公司通过巧妙创新、调整软件,来绕过美国的芯片禁令\n\n据《经济学人》报道,中国AI公司通过巧妙创新、调整软件,来绕过美国的芯片禁令。\n\n- 微博 萌音新视界\n\n原声音模拟诈骗技术可能来源于2019年的谷歌AI算法\n这个声音模拟诈骗技术可能来源于2019年的谷歌ai算法http://t.cn/A6NSzxks。只需5秒钟音源就可以模拟当事人声音,当时谷歌知道这种技术是双刃剑,所以没有敢开源公布,但是没想到某些人通过论文还原出了这项技术,并且于2019年在国内做出了中文版软件……\n\n- 微博 少年伯爵\n\n“三只羊”录音门案件告破,AI音视频伪造风险敲警钟\n9月16日,王某某利用从互联网下载的音视频资料,杜撰卢某某酒后言论脚本,先使用AI工具训练生成假冒卢某某的音频(其中出现的女声也系AI工具训练生成),后用视频软件合成音视频,并通过网络发布,形成谣言大量传播。目前,王某某已被依法采取刑事强制措施,案件正在进一步侦办中。\n\n- 第一财经\n\n媒体观察\n人工智能能力建设普惠计划\n\n为弥合数字和智能鸿沟,特别是帮助全球南方在人工智能发展进程中平等受益,中方认为要坚持联合国在国际发展合作中的统筹协调作用,坚持真正多边主义,基于主权平等、发展导向、以人为本、普惠包容、协同合作原则,通过南北合作、南南合作和三方合作等形式,切实落实联大加强人工智能能力建设国际合作决议(A/RES/78/311),推动落实联合国2030年可持续发展议程。为此,中国提出“人工智能能力建设普惠计划”,并呼吁各方对人工智能能力建设加大投入。\n\n- 中华人民共和国外交部\n\n打完“价格战”,大模型还要比什么?\n\n下一步,北京将以“平台、项目、人才、合作”为工作主线,大力推动开源领域发展,打造开发者、资金、技术等要素的引力场,助力提升我国在国际开源界的影响力和话语权。要夯实开源基础设施,加快建设北京国际开源社区,大力支持开源软件和技术创新,鼓励高校、科研机构与企业联合开展开源教育,培养更多具有开源意识的创新者。要加速开源项目孵化,支持建设开源创业孵化器,推动优质国内开源项目在重点场景应用落地,鼓励开源硬件与软件同步开放。要深化开源国际合作,完善开源企业出海服务体系,参与全球重要开源项目建设和标准规则制定,提升开源创新国际化水平。\n\n- 伯虎财经\n\n院士称华为搞封闭垄断难对抗西方:众网友反击华为模式足够成功\n\n在网友看来,华为并没有搞垄断,华为的供应链是开放的,华为的手机里绝大部分都是采用的国内供应商的零部件,这都是肉眼可见的助力国产。此外,更多的网友也表示,鸿蒙系统也有开源的版本(纯血鸿蒙更是中国人真正的移动操作系统),华为在美国的持续打压下不仅没有趴下,反而还越来越强大了,证明了华为模式的成功。\n\n在孙凝晖院士看来,自己也并未否定华为模式的优势和作用,而是强调国内的技术发展和突破,仅仅依靠华为模式是不够的,还需要更开放的生态模式,需要更多的企业来发挥他的力量。\n\n- 快科技\n\n中国开源者数量居世界前列 从开源大国迈向开源强国\n\n目前我国开源参与者数量、增长速度均位居世界前列;开源欧拉社区汇聚贡献者2万余人,用户数量超过350万人;开源鸿蒙项目吸引340余家生态单位共建,搭载设备数量超过9亿台;木兰中文开源许可协议实现国际通用。\n\n- 中国经营网 \n\n金融业要如何迎接大模型下半场?\n\n如今,金融业正在迎接大模型的“下半场”,从早期的技术探索转向全面的业务应用。在这场技术变革中,金融机构如何借助大模型提质增效,如何在智能化的浪潮中抢占先机,成为业内关注的焦点。\n\n- 九卦金融圈\n\n谁能解AI开发者的渴?\n\n在技术落地与创新中,AI开发者的角色无可替代。无论是那些拥有名校背景的明星团队,还是独立开发者和高校学生,他们都凭借热忱和胆识投入其中。然而,面对的挑战同样尖锐,资源匮乏、市场竞争白热化、技术迅速迭代等问题一一袭来。\n\n- 市象", "segmentation_method": "reviewed_source_semantics", "label": "今日观察", "source_line_range": [ 41, 103 ] }, { "id": "body-region-4", "text": "今 日 推 荐 开 源 项 目 garden io garden https github com garden io garden garden 是 一 款 可 自 动 完 成 工 作 流 的 开 发 工 具 使 kubernetes 应 用 的 开 发 和 测 试 变 得 快 捷 无 需 在 笔 记 本 电 脑 上 运 行 docker 或 kubernetes 快 速 的 集 群 内 构 建 对 dev 和 ci 使 用 相 同 的 命 令 和 配 置 每 日 一 博 从 数 据 库 发 展 历 程 到 数 据 结 构 设 计 探 析 起 初 数 据 的 管 理 方 式 是 文 件 系 统 数 据 存 储 在 文 件 中 数 据 管 理 和 维 护 都 由 程 序 员 完 成 后 来 发 展 出 树 形 结 构 和 网 状 结 构 的 数 据 库 但 都 存 在 着 难 以 扩 展 和 维 护 的 问 题 直 到 七 十 年 代 关 系 数 据 库 理 论 的 提 出 以 表 格 形 式 组 织 数 据 数 据 之 间 存 在 关 联 关 系 具 有 了 良 好 的 结 构 化 和 规 范 化 特 性 成 为 主 流 数 据 库 类 型", "source_text": "今日推荐\n开源项目\ngarden-io/garden\n\nhttps://github.com/garden-io/garden\n\nGarden 是一款可自动完成工作流的开发工具,使 Kubernetes 应用的开发和测试变得快捷,无需在笔记本电脑上运行 Docker 或 Kubernetes,快速的集群内构建、对 dev 和 CI 使用相同的命令和配置。\n\n每日一博\n从数据库发展历程到数据结构设计探析\n\n起初,数据的管理方式是文件系统,数据存储在文件中,数据管理和维护都由程序员完成。后来发展出树形结构和网状结构的数据库,但都存在着难以扩展和维护的问题。直到七十年代,关系数据库理论的提出,以表格形式组织数据,数据之间存在关联关系,具有了良好的结构化和规范化特性,成为主流数据库类型。", "segmentation_method": "reviewed_source_semantics", "label": "今日推荐", "source_line_range": [ 104, 116 ] }, { "id": "body-region-5", "text": "开 源 之 声 用 户 观 点 谷 歌 搜 索 快 照 功 能 死 透 透 观 点 1 好 了 这 下 互 联 网 真 的 没 有 记 忆 了 观 点 2 合 订 本 制 作 工 具 1 观 点 3 其 实 挺 可 惜 的 有 些 不 错 的 小 站 悄 无 声 息 地 没 入 尘 烟 有 快 照 至 少 还 能 留 住 一 部 分 互 联 网 的 记 忆 观 点 4 防 止 别 有 用 心 的 人 恶 意 翻 合 订 本 观 点 5 就 是 失 去 了 过 去 二 十 余 年 间 积 累 的 快 照 数 据 导 致 本 土 ai 训 练 材 料 严 重 不 足 观 点 6 ai 搜 索 的 效 果 就 是 依 托 它 效 果 那 么 好 你 干 嘛 不 在 所 有 文 本 编 辑 器 里 也 搞 这 样 子 的 搜 索 1200000000 条 结 果 只 给 你 返 回 最 前 面 的 100 条 观 点 7 google 给 web archive 捐 款 了 没 观 点 8 看 来 以 后 想 网 页 留 档 只 能 靠 自 己 建 一 个 快 照 站 了 观 点 9 就 算 不 用 搜 索 引 擎 也 是 会 存 一 份 快 照 的 不 然 怎 么 匹 配 网 页 中 的 关 键 字 淘 宝 官 宣 正 式 支 持 微 信 支 付 观 点 1 微 信 啥 时 候 支 持 支 付 宝 支 付 呢 开 发 项 目 对 接 支 付 宝 跳 来 跳 去 很 麻 烦 了 观 点 2 那 么 京 东 什 么 时 候 支 持 支 付 宝 观 点 3 我 替 大 家 试 了 一 下 它 显 示 说 余 额 不 足 看 来 还 要 继 续 完 善 啊 观 点 4 大 家 都 是 开 放 共 享 的 不 是 某 部 门 要 求 的 linux 创 始 人 c 很 简 单 但 易 犯 错 而 rust 不 是 观 点 1 我 们 编 程 界 原 神 是 这 样 的 观 点 2 等 等 linus 这 个 类 比 先 分 清 楚 rust 和 c 谁 是 vi 谁 是 emacs 分 好 之 后 好 了 大 家 可 以 各 自 加 入 自 己 的 阵 营 开 始 互 喷 了 观 点 3 不 知 道 rust 难 不 难 学 观 点 4 前 面 一 般 难 后 面 非 常 难 观 点 5 rust 写 熟 了 很 高 效 观 点 6 刚 怼 完 zig 底 层 编 程 需 要 的 是 对 计 算 机 体 系 有 充 分 认 知 的 人 而 不 是 一 个 提 供 狗 屁 安 全 性 的 工 具 你 都 可 以 自 己 吃 螃 蟹 海 鲜 了 居 然 不 能 自 己 上 厕 所 拉 屎 听 听 这 符 合 逻 辑 吗 观 点 7 谁 说 用 rust 写 内 核 不 需 要 懂 底 层 了 你 不 需 要 提 供 安 全 性 的 工 具 你 咋 不 把 c 的 类 型 检 查 给 扬 了 观 点 8 因 为 rust 太 难 了 所 以 才 不 会 犯 错 吗 观 点 9 抬 高 了 风 险 代 码 的 编 写 成 本 我 发 现 我 曾 经 无 意 中 写 的 内 存 相 关 bug 在 rust 里 真 的 要 用 unsafe 才 能 编 译 通 过 观 点 10 对 于 linux 内 核 是 c 好 还 是 rust 语 言 好 还 有 待 争 论 但 是 编 辑 器 领 域 必 须 是 emacs 最 好 不 接 受 反 驳 观 点 11 只 能 说 还 好 祖 师 爷 不 是 老 顽 固 冥 顽 不 化 不 然 linux 内 核 未 来 真 的 药 丸 毕 竟 总 不 能 让 生 生 世 世 的 年 轻 人 都 去 玩 c 对 吧 时 代 在 发 展 毕 竟 大 人 时 代 变 了 end", "source_text": "开源之声\n用户观点\n谷歌搜索快照功能“死透透”\n观点 1:好了,这下互联网真的没有记忆了\n观点 2:合订本制作工具-1\n观点 3:其实挺可惜的,有些不错的小站悄无声息地没入尘烟,有快照至少还能留住一部分互联网的记忆\n观点 4:防止别有用心的人恶意翻合订本\n观点 5:就是失去了“过去二十余年间积累的快照” 数据 导致本土ai训练材料严重不足\n观点 6:ai搜索的效果就是依托。它效果那么好你干嘛不在所有文本编辑器里也搞这样子的搜索?1200000000条结果只给你返回最前面的100条\n观点 7:Google给Web Archive捐款了没\n观点 8:看来以后想网页留档只能靠自己建一个快照站了\n观点 9:就算不用,搜索引擎也是会存一份快照的,不然怎么匹配网页中的关键字\n淘宝官宣:正式支持「微信支付」\n观点 1:微信啥时候支持支付宝支付呢,开发项目对接支付宝跳来跳去,很麻烦了\n观点 2:那么,京东什么时候支持支付宝\n观点 3:我替大家试了一下,它显示说余额不足,看来还要继续完善啊。\n观点 4:大家都是开放共享的,不是某部门要求的\nLinux创始人:C很简单,但易犯错,而Rust不是\n观点 1:我们编程界原神是这样的(\n观点 2:等等,Linus 这个类比… 先分清楚 rust 和 c 谁是 vi 谁是 emacs,分好之后,好了,大家可以各自加入自己的阵营开始互喷了\n观点 3:不知道rust难不难学\n观点 4:前面一般难,后面非常难。\n观点 5:rust写熟了很高效\n观点 6:刚怼完zig……底层编程需要的是对计算机体系有充分认知的人,而不是一个“提供狗屁安全性的工具”——你都可以自己吃螃蟹海鲜了,居然不能自己上厕所拉屎……听听,这符合逻辑吗!\n观点 7:谁说用rust写内核不需要懂底层了?你不需要提供安全性的工具,你咋不把c的类型检查给扬了?\n观点 8:因为rust太难了,所以才不会犯错吗\n观点 9:抬高了风险代码的编写成本。我发现我曾经无意中写的内存相关BUG,在Rust里真的要用unsafe才能编译通过。\n观点 10:对于linux内核是c好还是rust语言好,还有待争论。但是,编辑器领域必须是Emacs最好,不接受反驳\n观点 11:只能说,还好祖师爷不是老顽固,冥顽不化。不然linux内核未来真的药丸💊。 毕竟总不能让生生世世的年轻人都去玩c对吧。时代在发展毕竟。大人,时代变了。\n\n---END---", "segmentation_method": "reviewed_source_semantics", "label": "开源之声", "source_line_range": [ 117, 149 ] } ], "ending": { "text": "11:只能说,还好祖师爷不是老顽固,冥顽不化。不然linux内核未来真的药丸💊。 毕竟总不能让生生世世的年轻人都去玩c对吧。时代在发展毕竟。大人,时代变了。\n\n---END---" } } }, { "id": "article-050", "name": "PostgreSQL 17 Released!", "url": "https://www.postgresql.org/about/news/postgresql-17-released-2936/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "PostgreSQL 17 Released!" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "PostgreSQL Global Development Group" ] }, { "id": "stable-3", "alternatives": [ "PostgreSQL Project" ] }, { "id": "stable-4", "alternatives": [ "Home" ] }, { "id": "stable-5", "alternatives": [ "About" ] }, { "id": "stable-6", "alternatives": [ "Download" ] }, { "id": "stable-7", "alternatives": [ "Documentation" ] }, { "id": "stable-8", "alternatives": [ "Community" ] }, { "id": "stable-9", "alternatives": [ "Developers" ] }, { "id": "stable-10", "alternatives": [ "Support" ] }, { "id": "stable-11", "alternatives": [ "Donate" ] }, { "id": "stable-12", "alternatives": [ "Your account" ] }, { "id": "stable-13", "alternatives": [ "Quick Links" ] }, { "id": "stable-14", "alternatives": [ "Governance" ] }, { "id": "stable-15", "alternatives": [ "Policies" ] }, { "id": "stable-16", "alternatives": [ "Feature Matrix" ] }, { "id": "stable-17", "alternatives": [ "History" ] }, { "id": "stable-18", "alternatives": [ "Sponsors" ] }, { "id": "stable-19", "alternatives": [ "Contributing" ] }, { "id": "stable-20", "alternatives": [ "Financial" ] }, { "id": "stable-21", "alternatives": [ "Servers" ] }, { "id": "stable-22", "alternatives": [ "Latest News" ] }, { "id": "stable-23", "alternatives": [ "Upcoming Events" ] }, { "id": "stable-24", "alternatives": [ "Past events" ] }, { "id": "stable-25", "alternatives": [ "Press" ] }, { "id": "stable-26", "alternatives": [ "Licence" ] }, { "id": "stable-27", "alternatives": [ "Code of Conduct" ] }, { "id": "stable-28", "alternatives": [ "About PostgreSQL" ] }, { "id": "stable-29", "alternatives": [ "Contact" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "PostgreSQL 17 Released!" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-050/comment-qualification-reference-r5.json", "sha256": "bdb2476f84cbe585f3bb32589c20eaed10b2ef3505f00750edaa2ef5593df029", "chars": 796, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "The PostgreSQL Global Development Group today announced the release of PostgreSQL 17, the latest version of the world's most advanced open source database.\n\nPostgreSQL 17 builds on decades of open source development, improving its performance and scalability while adapting to emergent data access and storage patterns. This release of PostgreSQL adds significant overall performance gains, including an overhauled memory management implementation for vacuum, optimizations to storage access and improvements for high concurrency workloads, speedups in bulk loading and exports, and query execution improvements for indexes. PostgreSQL 17 has features that benefit brand new workloads and critical systems alike, such as additions to the developer experience with the SQL/JSON JSON_TABLE command, and enhancements to logical replication that simplify management of high availability workloads and major version upgrades.\n\n\"PostgreSQL 17 highlights how the global open source community, which drives the development of PostgreSQL, builds enhancements that help users at all stages of their database journey,\" said Jonathan Katz, a member of the PostgreSQL core team. \"Whether it's improvements for operating databases at scale or new features that build on a delightful developer experience, PostgreSQL 17 will enhance your data management experience.\"\n\nPostgreSQL, an innovative data management system known for its reliability, robustness, and extensibility, benefits from over 25 years of open source development from a global developer community and has become the preferred open source relational database for organizations of all sizes.\n\nSystem-wide performance gains\n\nThe PostgreSQL vacuum process is critical for healthy operations, requiring server instance resources to operate. PostgreSQL 17 introduces a new internal memory structure for vacuum that consumes up to 20x less memory. This improves vacuum speed and also reduces the use of shared resources, making more available for your workload.\n\nPostgreSQL 17 continues to improve performance of its I/O layer. High concurrency workloads may see up to 2x better write throughput due to improvements with write-ahead log (WAL) processing. Additionally, the new streaming I/O interface speeds up sequential scans (reading all the data from a table) and how quickly ANALYZE can update planner statistics.\n\nPostgreSQL 17 also extends its performance gains to query execution. PostgreSQL 17 improves the performance of queries with IN clauses that use B-tree indexes, the default index method in PostgreSQL. Additionally, BRIN indexes now support parallel builds. PostgreSQL 17 includes several improvements for query planning, including optimizations for NOT NULL constraints, and improvements in processing common table expressions (WITH queries). This release adds more SIMD (Single Instruction/Multiple Data) support for accelerating computations, including using AVX-512 for the bit_count function.\n\nFurther expansion of a robust developer experience\n\nPostgreSQL was the first relational database to add JSON support (2012), and PostgreSQL 17 adds to its implementation of the SQL/JSON standard. JSON_TABLE is now available in PostgreSQL 17, letting developers convert JSON data into a standard PostgreSQL table. PostgreSQL 17 now supports SQL/JSON constructors (JSON, JSON_SCALAR, JSON_SERIALIZE) and query functions (JSON_EXISTS, JSON_QUERY, JSON_VALUE), giving developers other ways of interfacing with their JSON data. This release adds more jsonpath expressions, with an emphasis of converting JSON data to a native PostgreSQL data type, including numeric, boolean, string, and date/time types.\n\nPostgreSQL 17 adds more features to MERGE, which is used for conditional updates, including a RETURNING clause and the ability to update views. Additionally, PostgreSQL 17 has new capabilities for bulk loading and data exporting, including up to a 2x performance improvement when exporting large rows using the COPY command. COPY performance also has improvements when the source and destination encodings match, and includes a new option, ON_ERROR, that allows an import to continue even if there is an insert error.\n\nThis release expands on functionality both for managing data in partitions and data distributed across remote PostgreSQL instances. PostgreSQL 17 supports using identity columns and exclusion constraints on partitioned tables. The PostgreSQL foreign data wrapper (postgres_fdw), used to execute queries on remote PostgreSQL instances, can now push EXISTS and IN subqueries to the remote server for more efficient processing.\n\nPostgreSQL 17 also includes a built-in, platform independent, immutable collation provider that's guaranteed to be immutable and provides similar sorting semantics to the C collation except with UTF-8 encoding rather than SQL_ASCII. Using this new collation provider guarantees that your text-based queries will return the same sorted results regardless of where you run PostgreSQL.\n\nLogical replication enhancements for high availability and major version upgrades\n\nLogical replication is used to stream data in real-time across many use cases. However, prior to this release, users who wanted to perform a major version upgrade would have to drop logical replication slots, which requires resynchronizing data to subscribers after an upgrade. Starting with upgrades from PostgreSQL 17, users don't have to drop logical replication slots, simplifying the upgrade process when using logical replication.\n\nPostgreSQL 17 now includes failover control for logical replication, making it more resilient when deployed in high availability environments. Additionally, PostgreSQL 17 introduces the pg_createsubscriber command-line tool for converting a physical replica into a new logical replica.\n\nMore options for managing security and operations\n\nPostgreSQL 17 further extends how users can manage the overall lifecycle of their database systems. PostgreSQL has a new TLS option, sslnegotiation, that lets users perform a direct TLS handshakes when using ALPN (registered as postgresql in the ALPN directory). PostgreSQL 17 also adds the pg_maintain predefined role, which gives users permission to perform maintenance operations.\n\npg_basebackup, the backup utility included in PostgreSQL, now supports incremental backups and adds the pg_combinebackup utility to reconstruct a full backup. Additionally, pg_dump includes a new option called --filter that lets you select what objects to include when generating a dump file.\n\nPostgreSQL 17 also includes enhancements to monitoring and analysis features. EXPLAIN now shows the time spent for local I/O block reads and writes, and includes two new options: SERIALIZE and MEMORY, useful for seeing the time spent in data conversion for network transmission, and how much memory was used. PostgreSQL 17 now reports the progress of vacuuming indexes, and adds the pg_wait_events system view that, when combined with pg_stat_activity, gives more insight into why an active session is waiting.\n\nAdditional Features\n\nMany other new features and improvements have been added to PostgreSQL 17 that may also be helpful for your use cases. Please see the release notes for a complete list of new and changed features.\n\nAbout PostgreSQL\n\nPostgreSQL is the world's most advanced open source database, with a global community of thousands of users, contributors, companies and organizations. Built on over 35 years of engineering, starting at the University of California, Berkeley, PostgreSQL has continued with an unmatched pace of development. PostgreSQL's mature feature set not only matches top proprietary database systems, but exceeds them in advanced database features, extensibility, security, and stability.\n\nLinks\n\nDownload\nRelease Notes\nPress Kit\nSecurity Page\nVersioning Policy\nFollow @postgresql\nDonate", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "the postgresql global development group today announced the release of postgresql 17 the latest version of the world s most advanced open source database postgresql 17 builds on decades of open source development improving its performance and scalability while adapting to emergent data access and storage patterns this release of postgresql adds significant overall performance gains including an overhauled memory management implementation for vacuum optimizations to storage access and improvements for high concurrency workloads speedups in bulk loading and exports and query execution improvements for indexes postgresql 17 has features that benefit brand new workloads and critical systems alike such as additions to the developer experience with the sql json json table command and enhancements to logical replication that simplify management of high availability workloads and major version upgrades postgresql 17 highlights how the global open source community which drives the development of postgresql builds enhancements that help users at all stages of their database journey said jonathan katz a member of the postgresql core team whether it s improvements for operating databases at scale or new features that build on a delightful developer experience postgresql 17 will enhance your data management experience postgresql an innovative data management system known for its reliability robustness and extensibility benefits from over 25 years of open source development from a global developer community and has become the preferred open source relational database for organizations of all sizes", "source_text": "The PostgreSQL Global Development Group today announced the release of PostgreSQL 17, the latest version of the world's most advanced open source database.\n\nPostgreSQL 17 builds on decades of open source development, improving its performance and scalability while adapting to emergent data access and storage patterns. This release of PostgreSQL adds significant overall performance gains, including an overhauled memory management implementation for vacuum, optimizations to storage access and improvements for high concurrency workloads, speedups in bulk loading and exports, and query execution improvements for indexes. PostgreSQL 17 has features that benefit brand new workloads and critical systems alike, such as additions to the developer experience with the SQL/JSON JSON_TABLE command, and enhancements to logical replication that simplify management of high availability workloads and major version upgrades.\n\n\"PostgreSQL 17 highlights how the global open source community, which drives the development of PostgreSQL, builds enhancements that help users at all stages of their database journey,\" said Jonathan Katz, a member of the PostgreSQL core team. \"Whether it's improvements for operating databases at scale or new features that build on a delightful developer experience, PostgreSQL 17 will enhance your data management experience.\"\n\nPostgreSQL, an innovative data management system known for its reliability, robustness, and extensibility, benefits from over 25 years of open source development from a global developer community and has become the preferred open source relational database for organizations of all sizes.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:The PostgreSQL Global Development Group today announced the ", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "system wide performance gains the postgresql vacuum process is critical for healthy operations requiring server instance resources to operate postgresql 17 introduces a new internal memory structure for vacuum that consumes up to 20x less memory this improves vacuum speed and also reduces the use of shared resources making more available for your workload postgresql 17 continues to improve performance of its i o layer high concurrency workloads may see up to 2x better write throughput due to improvements with write ahead log wal processing additionally the new streaming i o interface speeds up sequential scans reading all the data from a table and how quickly analyze can update planner statistics postgresql 17 also extends its performance gains to query execution postgresql 17 improves the performance of queries with in clauses that use b tree indexes the default index method in postgresql additionally brin indexes now support parallel builds postgresql 17 includes several improvements for query planning including optimizations for not null constraints and improvements in processing common table expressions with queries this release adds more simd single instruction multiple data support for accelerating computations including using avx 512 for the bit count function", "source_text": "System-wide performance gains\n\nThe PostgreSQL vacuum process is critical for healthy operations, requiring server instance resources to operate. PostgreSQL 17 introduces a new internal memory structure for vacuum that consumes up to 20x less memory. This improves vacuum speed and also reduces the use of shared resources, making more available for your workload.\n\nPostgreSQL 17 continues to improve performance of its I/O layer. High concurrency workloads may see up to 2x better write throughput due to improvements with write-ahead log (WAL) processing. Additionally, the new streaming I/O interface speeds up sequential scans (reading all the data from a table) and how quickly ANALYZE can update planner statistics.\n\nPostgreSQL 17 also extends its performance gains to query execution. PostgreSQL 17 improves the performance of queries with IN clauses that use B-tree indexes, the default index method in PostgreSQL. Additionally, BRIN indexes now support parallel builds. PostgreSQL 17 includes several improvements for query planning, including optimizations for NOT NULL constraints, and improvements in processing common table expressions (WITH queries). This release adds more SIMD (Single Instruction/Multiple Data) support for accelerating computations, including using AVX-512 for the bit_count function.", "segmentation_method": "reviewed_source_semantics", "label": "System-wide performance gains", "source_line_range": [ 9, 16 ] }, { "id": "body-region-3", "text": "further expansion of a robust developer experience postgresql was the first relational database to add json support 2012 and postgresql 17 adds to its implementation of the sql json standard json table is now available in postgresql 17 letting developers convert json data into a standard postgresql table postgresql 17 now supports sql json constructors json json scalar json serialize and query functions json exists json query json value giving developers other ways of interfacing with their json data this release adds more jsonpath expressions with an emphasis of converting json data to a native postgresql data type including numeric boolean string and date time types postgresql 17 adds more features to merge which is used for conditional updates including a returning clause and the ability to update views additionally postgresql 17 has new capabilities for bulk loading and data exporting including up to a 2x performance improvement when exporting large rows using the copy command copy performance also has improvements when the source and destination encodings match and includes a new option on error that allows an import to continue even if there is an insert error this release expands on functionality both for managing data in partitions and data distributed across remote postgresql instances postgresql 17 supports using identity columns and exclusion constraints on partitioned tables the postgresql foreign data wrapper postgres fdw used to execute queries on remote postgresql instances can now push exists and in subqueries to the remote server for more efficient processing postgresql 17 also includes a built in platform independent immutable collation provider that s guaranteed to be immutable and provides similar sorting semantics to the c collation except with utf 8 encoding rather than sql ascii using this new collation provider guarantees that your text based queries will return the same sorted results regardless of where you run postgresql", "source_text": "Further expansion of a robust developer experience\n\nPostgreSQL was the first relational database to add JSON support (2012), and PostgreSQL 17 adds to its implementation of the SQL/JSON standard. JSON_TABLE is now available in PostgreSQL 17, letting developers convert JSON data into a standard PostgreSQL table. PostgreSQL 17 now supports SQL/JSON constructors (JSON, JSON_SCALAR, JSON_SERIALIZE) and query functions (JSON_EXISTS, JSON_QUERY, JSON_VALUE), giving developers other ways of interfacing with their JSON data. This release adds more jsonpath expressions, with an emphasis of converting JSON data to a native PostgreSQL data type, including numeric, boolean, string, and date/time types.\n\nPostgreSQL 17 adds more features to MERGE, which is used for conditional updates, including a RETURNING clause and the ability to update views. Additionally, PostgreSQL 17 has new capabilities for bulk loading and data exporting, including up to a 2x performance improvement when exporting large rows using the COPY command. COPY performance also has improvements when the source and destination encodings match, and includes a new option, ON_ERROR, that allows an import to continue even if there is an insert error.\n\nThis release expands on functionality both for managing data in partitions and data distributed across remote PostgreSQL instances. PostgreSQL 17 supports using identity columns and exclusion constraints on partitioned tables. The PostgreSQL foreign data wrapper (postgres_fdw), used to execute queries on remote PostgreSQL instances, can now push EXISTS and IN subqueries to the remote server for more efficient processing.\n\nPostgreSQL 17 also includes a built-in, platform independent, immutable collation provider that's guaranteed to be immutable and provides similar sorting semantics to the C collation except with UTF-8 encoding rather than SQL_ASCII. Using this new collation provider guarantees that your text-based queries will return the same sorted results regardless of where you run PostgreSQL.", "segmentation_method": "reviewed_source_semantics", "label": "Further expansion of a robust developer experience", "source_line_range": [ 17, 26 ] }, { "id": "body-region-4", "text": "logical replication enhancements for high availability and major version upgrades logical replication is used to stream data in real time across many use cases however prior to this release users who wanted to perform a major version upgrade would have to drop logical replication slots which requires resynchronizing data to subscribers after an upgrade starting with upgrades from postgresql 17 users don t have to drop logical replication slots simplifying the upgrade process when using logical replication postgresql 17 now includes failover control for logical replication making it more resilient when deployed in high availability environments additionally postgresql 17 introduces the pg createsubscriber command line tool for converting a physical replica into a new logical replica", "source_text": "Logical replication enhancements for high availability and major version upgrades\n\nLogical replication is used to stream data in real-time across many use cases. However, prior to this release, users who wanted to perform a major version upgrade would have to drop logical replication slots, which requires resynchronizing data to subscribers after an upgrade. Starting with upgrades from PostgreSQL 17, users don't have to drop logical replication slots, simplifying the upgrade process when using logical replication.\n\nPostgreSQL 17 now includes failover control for logical replication, making it more resilient when deployed in high availability environments. Additionally, PostgreSQL 17 introduces the pg_createsubscriber command-line tool for converting a physical replica into a new logical replica.", "segmentation_method": "reviewed_source_semantics", "label": "Logical replication enhancements for high availability and major version upgrades", "source_line_range": [ 27, 32 ] }, { "id": "body-region-5", "text": "more options for managing security and operations postgresql 17 further extends how users can manage the overall lifecycle of their database systems postgresql has a new tls option sslnegotiation that lets users perform a direct tls handshakes when using alpn registered as postgresql in the alpn directory postgresql 17 also adds the pg maintain predefined role which gives users permission to perform maintenance operations pg basebackup the backup utility included in postgresql now supports incremental backups and adds the pg combinebackup utility to reconstruct a full backup additionally pg dump includes a new option called filter that lets you select what objects to include when generating a dump file postgresql 17 also includes enhancements to monitoring and analysis features explain now shows the time spent for local i o block reads and writes and includes two new options serialize and memory useful for seeing the time spent in data conversion for network transmission and how much memory was used postgresql 17 now reports the progress of vacuuming indexes and adds the pg wait events system view that when combined with pg stat activity gives more insight into why an active session is waiting additional features many other new features and improvements have been added to postgresql 17 that may also be helpful for your use cases please see the release notes for a complete list of new and changed features about postgresql postgresql is the world s most advanced open source database with a global community of thousands of users contributors companies and organizations built on over 35 years of engineering starting at the university of california berkeley postgresql has continued with an unmatched pace of development postgresql s mature feature set not only matches top proprietary database systems but exceeds them in advanced database features extensibility security and stability links download release notes press kit security page versioning policy follow postgresql donate", "source_text": "More options for managing security and operations\n\nPostgreSQL 17 further extends how users can manage the overall lifecycle of their database systems. PostgreSQL has a new TLS option, sslnegotiation, that lets users perform a direct TLS handshakes when using ALPN (registered as postgresql in the ALPN directory). PostgreSQL 17 also adds the pg_maintain predefined role, which gives users permission to perform maintenance operations.\n\npg_basebackup, the backup utility included in PostgreSQL, now supports incremental backups and adds the pg_combinebackup utility to reconstruct a full backup. Additionally, pg_dump includes a new option called --filter that lets you select what objects to include when generating a dump file.\n\nPostgreSQL 17 also includes enhancements to monitoring and analysis features. EXPLAIN now shows the time spent for local I/O block reads and writes, and includes two new options: SERIALIZE and MEMORY, useful for seeing the time spent in data conversion for network transmission, and how much memory was used. PostgreSQL 17 now reports the progress of vacuuming indexes, and adds the pg_wait_events system view that, when combined with pg_stat_activity, gives more insight into why an active session is waiting.\n\nAdditional Features\n\nMany other new features and improvements have been added to PostgreSQL 17 that may also be helpful for your use cases. Please see the release notes for a complete list of new and changed features.\n\nAbout PostgreSQL\n\nPostgreSQL is the world's most advanced open source database, with a global community of thousands of users, contributors, companies and organizations. Built on over 35 years of engineering, starting at the University of California, Berkeley, PostgreSQL has continued with an unmatched pace of development. PostgreSQL's mature feature set not only matches top proprietary database systems, but exceeds them in advanced database features, extensibility, security, and stability.\n\nLinks\n\nDownload\nRelease Notes\nPress Kit\nSecurity Page\nVersioning Policy\nFollow @postgresql\nDonate", "segmentation_method": "reviewed_source_semantics", "label": "More options for managing security and operations — Links", "source_line_range": [ 33, 57 ] } ], "ending": { "text": "Download\nRelease Notes\nPress Kit\nSecurity Page\nVersioning Policy\nFollow @postgresql\nDonate" } } }, { "id": "article-051", "name": "PostgreSQL 17 中文发布说明", "url": "https://www.postgresql.org/about/press/presskit17/zh/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "PostgreSQL 17 Press Kit" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Contents" ] }, { "id": "stable-3", "alternatives": [ "Original Press Release" ] }, { "id": "stable-4", "alternatives": [ "More About The Features" ] }, { "id": "stable-5", "alternatives": [ "Where to Download" ] }, { "id": "stable-6", "alternatives": [ "Contacts" ] }, { "id": "stable-7", "alternatives": [ "Images and Logos" ] }, { "id": "stable-8", "alternatives": [ "Corporate Support" ] }, { "id": "stable-9", "alternatives": [ "This page in:" ] }, { "id": "stable-10", "alternatives": [ "Chinese" ] }, { "id": "stable-11", "alternatives": [ "English" ] }, { "id": "stable-12", "alternatives": [ "French" ] }, { "id": "stable-13", "alternatives": [ "German" ] }, { "id": "stable-14", "alternatives": [ "Greek" ] }, { "id": "stable-15", "alternatives": [ "Hebrew" ] }, { "id": "stable-16", "alternatives": [ "Indonesian" ] }, { "id": "stable-17", "alternatives": [ "Italian" ] }, { "id": "stable-18", "alternatives": [ "Japanese" ] }, { "id": "stable-19", "alternatives": [ "Korean" ] }, { "id": "stable-20", "alternatives": [ "Polish" ] }, { "id": "stable-21", "alternatives": [ "Portuguese" ] }, { "id": "stable-22", "alternatives": [ "Russian" ] }, { "id": "stable-23", "alternatives": [ "Spanish" ] }, { "id": "stable-24", "alternatives": [ "Swedish" ] }, { "id": "stable-25", "alternatives": [ "Ukrainian" ] }, { "id": "stable-26", "alternatives": [ "Home" ] }, { "id": "stable-27", "alternatives": [ "About" ] }, { "id": "stable-28", "alternatives": [ "Download" ] }, { "id": "stable-29", "alternatives": [ "Documentation" ] }, { "id": "stable-30", "alternatives": [ "Community" ] }, { "id": "stable-31", "alternatives": [ "Developers" ] }, { "id": "stable-32", "alternatives": [ "Support" ] }, { "id": "stable-33", "alternatives": [ "Donate" ] }, { "id": "stable-34", "alternatives": [ "Your account" ] }, { "id": "stable-35", "alternatives": [ "Quick Links" ] }, { "id": "stable-36", "alternatives": [ "Governance" ] }, { "id": "stable-37", "alternatives": [ "Policies" ] }, { "id": "stable-38", "alternatives": [ "Feature Matrix" ] }, { "id": "stable-39", "alternatives": [ "History" ] }, { "id": "stable-40", "alternatives": [ "Sponsors" ] }, { "id": "stable-41", "alternatives": [ "Contributing" ] }, { "id": "stable-42", "alternatives": [ "Financial" ] }, { "id": "stable-43", "alternatives": [ "Servers" ] }, { "id": "stable-44", "alternatives": [ "Latest News" ] }, { "id": "stable-45", "alternatives": [ "Upcoming Events" ] }, { "id": "stable-46", "alternatives": [ "Past events" ] }, { "id": "stable-47", "alternatives": [ "Press" ] }, { "id": "stable-48", "alternatives": [ "Licence" ] }, { "id": "stable-49", "alternatives": [ "Code of Conduct" ] }, { "id": "stable-50", "alternatives": [ "About PostgreSQL" ] }, { "id": "stable-51", "alternatives": [ "Contact" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "PostgreSQL 17 Press Kit" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-051/comment-qualification-reference-r5.json", "sha256": "50b779e970cfc41548f749c00b53fc3add8299a0ec94c2944386c0ba4f0234e2", "chars": 783, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Original Press Release\n\n2024年9月26日 - PostgreSQL全球开发组宣布PostgreSQL 17)正式发布,作为世界上最先进的开源数据库,PostgreSQL 17 是目前的最新版本。\n\nPostgreSQL 17在数十年的开源开发的基础上,提升了其性能和可扩展性,同时适应新兴的数据访问和存储模式。这个版本的PostgreSQL在整体性能上有显著提升,包括对vacuum的内存管理实现进行了全面改进,优化了存储访问和高并发工作负载,加快了批量加载和导出速度,以及改进了索引的查询执行。PostgreSQL 17 引入了一系列新特性,这些特性既适用于全新的工作负载,也能满足关键系统的需求,例如通过SQL/JSON的 JSON_TABLE 命令改善了开发者体验,以及增强了逻辑复制功能,简化了高可用工作负载和主要版本升级的管理。\n\n“PostgreSQL 17 突出展示了全球开源社区(推动PostgreSQL开发的力量)如何帮助不同阶段数据库用户构建增强功能”, PostgreSQL 核心团队成员 Jonathan Katz 说,“无论是提升大规模数据库的操作性能,还是使开发者拥有愉悦体验的新特性,PostgreSQL 17 都将提升您的数据管理体验。”\n\nPostgreSQL是一个创新的数据管理系统,以其可靠性和健壮性著称,得益于全球开发者社区超过25年的开源开发,已经成为各种规模组织的首选开源关系型数据库。\n\n系统级性能提升\n\nPostgreSQL的vacuum进程对于数据库的健康运行至关重要,它需要消耗服务器实例的资源来执行操作。PostgreSQL 17 引入了一种新的vacuum内部内存结构用于 vacuum 操作,最高可以减少20倍内存消耗。这不仅提高了 vacuum 的执行速度,还减少了对共享资源的使用,从而为您的工作负载腾出更多资源。\n\nPostgreSQL 17 继续提升 I/O 层的性能。由于改进了预写日志(WAL)处理,高并发工作负载的写入吞吐量提升最多高达2倍。此外,新的流式 I/O 接口加快了顺序扫描(读取表中所有数据)和ANALYZE更新查询规划器统计信息的速度。\n\nPostgreSQL 17还将其性能提升扩展到查询执行。PostgreSQL 17改进了使用B-tree索引(PostgreSQL 中的默认索引方法)的 IN 子句查询的性能。此外,BRIN索引现在支持并行构建。PostgreSQL 17 引入多个查询规划方面的改进,包括对 NOT NULL 约束的优化以及对公共表表达式(WITH查询)的改进。这个版本增加了更多的SIMD(单指令/多数据)支持以加速计算,包括使用AVX-512加速bit_count 函数。\n\n进一步提升开发者体验\n\nPostgreSQL 是第一个添加JSON支持的关系型数据库(2012年),而 PostgreSQL 17 进一步完善了 SQL/JSON 标准的实现。现在,PostgreSQL 17 中引入了JSON_TABLE,允许开发者将 JSON 数据转换为标准的 PostgreSQL 表。此外,PostgreSQL 17 现在支持 SQL/JSON 构造函数(JSON, JSON_SCALAR, JSON_SERIALIZE) 和查询函数(JSON_EXISTS, JSON_QUERY, JSON_VALUE),为开发者提供更多与 JSON 数据交互的方式。此版本还增加了更多的jsonpath 表达式,重点是将 JSON 数据转换为原生PostgreSQL数据类型,包括数值、布尔值、字符串和日期/时间类型。\n\nPostgreSQL 17 为MERGE命令添加了更多功能,包括 RETURNING 子句和更新视图的能力,这用于条件更新。此外,PostgreSQL 17 在批量加载和数据导出方面增加了新功能,包括使用COPY命令导出大行时性能提升高达2倍。\n\n当源编码和目标编码匹配时,COPY性能也有所提升,并且包括一个新选项ON_ERROR,允许在插入错误时继续导入。\n\n这个版本扩展了管理分区数据和分布在远程PostgreSQL实例上的数据的功能。PostgreSQL 17 支持在分区表上使用身份列和排除约束。用于在远程PostgreSQL实例上执行查询的PostgreSQL外部数据封装器)(postgres_fdw)现在可以将 EXISTS 和 IN 子查询下推到远程服务器以进行更高效的处理。\n\nPostgreSQL 17 还包括一个内置的、跨平台的、保证不可变的排序规则提供程序。它提供类似于 C 排序规则的排序语义,但使用的是 UTF-8 编码而非 SQL_ASCII。通过使用这个新的排序规则提供程序,可以确保无论 PostgreSQL 运行在哪,基于文本的查询都能返回相同的排序结果。\n\n高可用环境和主版本升级时的逻辑复制增强功能\n\n逻辑复制用于在许多场景下实时流式传输数据。然而,在此版本之前,想要执行主版本升级的用户必须删除逻辑复制槽,这需要在升级后重新同步订阅者的数据。从PostgreSQL 17开始,用户无需删除逻辑复制槽,从而简化了使用逻辑复制时的升级过程。\n\nPostgreSQL 17 现在包括对逻辑复制的故障切换控制,使其在高可用环境中更加可靠。此外,PostgreSQL 17 引入了 pg_createsubscriber命令行工具,用于在使用物理复制的副本从库上创建逻辑复制。\n\n更多安全性和操作管理选项\n\nPostgreSQL 17进一步扩展了用户管理其数据库系统整个生命周期的方式。PostgreSQL引入了一个新的 TLS 选项 sslnegotiation,允许用户在使用ALPN时直接进行TLS握手(在ALPN目录中注册为postgresql)。 PostgreSQL 17还增加了pg_maintain预定义角色,该角色授予用户执行维护操作的权限。\n\nPostgreSQL自带的备份工具pg_basebackup现在支持增量备份,并添加了pg_combinebackup工具来重建完整备份。此外,pg_dump增加了一个新选项 --filter,允许用户在生成转储文件时选择要包含的对象。\n\nPostgreSQL 17还增强了监控和分析功能。EXPLAIN现在显示本地 I/O 块读取和写入所花费的时间,并包括两个新选项:SERIALIZE和MEMORY,对于查看用于网络传输的数据转换所花费的时间以及使用了多少内存很有用。PostgreSQL 17现在报告索引清理的进度,并添加了 pg_wait_events 系统视图,结合pg_stat_activity可以更深入了解活动会话为什么在等待。\n\n其他功能\n\nPostgreSQL 17 还新增了许多其他新功能和改进,这些可能对您的使用场景有所帮助。请查看 发布说明 以获取完整的新功能和更改列表。\n\n关于PostgreSQL\n\nPostgreSQL是世界上最先进的开源数据库,它的全球社区是一个拥有数以千计的用户、贡献者、公司和组织组成的。PostgreSQL起源于加利福尼亚大学伯克利分校,已经有超过35年的历史,并且以无与伦比的速度持续发展。PostgreSQL成熟的特性不仅与顶级商业数据库系统匹配,而且在高级数据库功能、可扩展性、安全性和稳定性方面超过了它们。\n\n链接\n\n下载\n发行说明\n新闻资料\n安全\n版本政策\n关注@postgresql\n捐赠\n\n关于PostgreSQL\n\nPostgreSQL是世界上最先进的开源数据库,它的全球社区是一个拥有数以千计的用户、贡献者、公司和组织组成的。PostgreSQL起源于加利福尼亚大学伯克利分校,已经有超过35年的历史,并且以无与伦比的速度持续发展。PostgreSQL成熟的特性不仅与顶级商业数据库系统匹配,而且在高级数据库功能、可扩展性、安全性和稳定性方面超过了它们。\n\nLearn more about PostgreSQL and participate in our community at PostgreSQL.org.\n\n更多功能信息\n\n有关上述功能和其他信息的解释,请参考以下资源:\n\n发行说明\n功能列表\n\n下载地址\n\n您可以通过多种方式下载PostgreSQL 17,包括:\n\n官方下载页面,包含用于Windows、Linux、macOS等多个平台的安装程序和工具。\n源代码\n\n其他工具和扩展可在PostgreSQL Extension Network上找到。\n\n文档\n\nPostgreSQL 17 附带了HTML文档和手册,您还可以在线浏览HTML和PDF格式的文档。\n\n许可证\n\nPostgreSQL使用PostgreSQL 许可证,这是一个类似 BSD 的“宽松”许可证。这个OSI认证的许可证因其灵活性和适用于商业环境而受到广泛赞誉,因为它不限制在商业和专有应用程序中使用PostgreSQL。加上多公司支持和代码的公共所有权,该许可证使PostgreSQL非常受欢迎,因为供应商希望在自己的产品中嵌入数据库,而无需担心费用、供应商锁定或许可条款变更。\n\n联系方式\n\n网址\n\nhttps://www.postgresql.org/\n\n邮箱\n\npress@postgresql.org\n\n图像和标志\n\nPostgres、PostgreSQL和大象标志(Slonik)都是PostgreSQL 社区协会的注册商标。如果您希望使用这些标志,您必须遵守商标政策。\n\nPostgreSQL Elephant Logo, PNG format\nPostgreSQL Elephant Icon\nPostgreSQL Banner with Logo, Elephant and Slogan\n\n企业支持和捐赠\n\nPostgreSQL得到了许多公司的支持,他们赞助开发人员,提供托管资源,并给予我们财务支持。请查看我们的赞助商页面,了解这些项目的支持者。\n\n还有大量提供PostgreSQL支持的公司,包括个人顾问和跨国公司。\n\n如果您希望对PostgreSQL全球开发组或其中一个公认的社群非营利组织进行捐赠,请访问我们的捐赠页面。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "original press release 2024 年 9 月 26 日 postgresql 全 球 开 发 组 宣 布 postgresql 17 正 式 发 布 作 为 世 界 上 最 先 进 的 开 源 数 据 库 postgresql 17 是 目 前 的 最 新 版 本 postgresql 17 在 数 十 年 的 开 源 开 发 的 基 础 上 提 升 了 其 性 能 和 可 扩 展 性 同 时 适 应 新 兴 的 数 据 访 问 和 存 储 模 式 这 个 版 本 的 postgresql 在 整 体 性 能 上 有 显 著 提 升 包 括 对 vacuum 的 内 存 管 理 实 现 进 行 了 全 面 改 进 优 化 了 存 储 访 问 和 高 并 发 工 作 负 载 加 快 了 批 量 加 载 和 导 出 速 度 以 及 改 进 了 索 引 的 查 询 执 行 postgresql 17 引 入 了 一 系 列 新 特 性 这 些 特 性 既 适 用 于 全 新 的 工 作 负 载 也 能 满 足 关 键 系 统 的 需 求 例 如 通 过 sql json 的 json table 命 令 改 善 了 开 发 者 体 验 以 及 增 强 了 逻 辑 复 制 功 能 简 化 了 高 可 用 工 作 负 载 和 主 要 版 本 升 级 的 管 理 postgresql 17 突 出 展 示 了 全 球 开 源 社 区 推 动 postgresql 开 发 的 力 量 如 何 帮 助 不 同 阶 段 数 据 库 用 户 构 建 增 强 功 能 postgresql 核 心 团 队 成 员 jonathan katz 说 无 论 是 提 升 大 规 模 数 据 库 的 操 作 性 能 还 是 使 开 发 者 拥 有 愉 悦 体 验 的 新 特 性 postgresql 17 都 将 提 升 您 的 数 据 管 理 体 验 postgresql 是 一 个 创 新 的 数 据 管 理 系 统 以 其 可 靠 性 和 健 壮 性 著 称 得 益 于 全 球 开 发 者 社 区 超 过 25 年 的 开 源 开 发 已 经 成 为 各 种 规 模 组 织 的 首 选 开 源 关 系 型 数 据 库 系 统 级 性 能 提 升 postgresql 的 vacuum 进 程 对 于 数 据 库 的 健 康 运 行 至 关 重 要 它 需 要 消 耗 服 务 器 实 例 的 资 源 来 执 行 操 作 postgresql 17 引 入 了 一 种 新 的 vacuum 内 部 内 存 结 构 用 于 vacuum 操 作 最 高 可 以 减 少 20 倍 内 存 消 耗 这 不 仅 提 高 了 vacuum 的 执 行 速 度 还 减 少 了 对 共 享 资 源 的 使 用 从 而 为 您 的 工 作 负 载 腾 出 更 多 资 源 postgresql 17 继 续 提 升 i o 层 的 性 能 由 于 改 进 了 预 写 日 志 wal 处 理 高 并 发 工 作 负 载 的 写 入 吞 吐 量 提 升 最 多 高 达 2 倍 此 外 新 的 流 式 i o 接 口 加 快 了 顺 序 扫 描 读 取 表 中 所 有 数 据 和 analyze 更 新 查 询 规 划 器 统 计 信 息 的 速 度 postgresql 17 还 将 其 性 能 提 升 扩 展 到 查 询 执 行 postgresql 17 改 进 了 使 用 b tree 索 引 postgresql 中 的 默 认 索 引 方 法 的 in 子 句 查 询 的 性 能 此 外 brin 索 引 现 在 支 持 并 行 构 建 postgresql 17 引 入 多 个 查 询 规 划 方 面 的 改 进 包 括 对 not null 约 束 的 优 化 以 及 对 公 共 表 表 达 式 with 查 询 的 改 进 这 个 版 本 增 加 了 更 多 的 simd 单 指 令 多 数 据 支 持 以 加 速 计 算 包 括 使 用 avx 512 加 速 bit count 函 数 进 一 步 提 升 开 发 者 体 验 postgresql 是 第 一 个 添 加 json 支 持 的 关 系 型 数 据 库 2012 年 而 postgresql 17 进 一 步 完 善 了 sql json 标 准 的 实 现 现 在 postgresql 17 中 引 入 了 json table 允 许 开 发 者 将 json 数 据 转 换 为 标 准 的 postgresql 表 此 外 postgresql 17 现 在 支 持 sql json 构 造 函 数 json json scalar json serialize 和 查 询 函 数 json exists json query json value 为 开 发 者 提 供 更 多 与 json 数 据 交 互 的 方 式 此 版 本 还 增 加 了 更 多 的 jsonpath 表 达 式 重 点 是 将 json 数 据 转 换 为 原 生 postgresql 数 据 类 型 包 括 数 值 布 尔 值 字 符 串 和 日 期 时 间 类 型 postgresql 17 为 merge 命 令 添 加 了 更 多 功 能 包 括 returning 子 句 和 更 新 视 图 的 能 力 这 用 于 条 件 更 新 此 外 postgresql 17 在 批 量 加 载 和 数 据 导 出 方 面 增 加 了 新 功 能 包 括 使 用 copy 命 令 导 出 大 行 时 性 能 提 升 高 达 2 倍 当 源 编 码 和 目 标 编 码 匹 配 时 copy 性 能 也 有 所 提 升 并 且 包 括 一 个 新 选 项 on error 允 许 在 插 入 错 误 时 继 续 导 入 这 个 版 本 扩 展 了 管 理 分 区 数 据 和 分 布 在 远 程 postgresql 实 例 上 的 数 据 的 功 能 postgresql 17 支 持 在 分 区 表 上 使 用 身 份 列 和 排 除 约 束 用 于 在 远 程 postgresql 实 例 上 执 行 查 询 的 postgresql 外 部 数 据 封 装 器 postgres fdw 现 在 可 以 将 exists 和 in 子 查 询 下 推 到 远 程 服 务 器 以 进 行 更 高 效 的 处 理 postgresql 17 还 包 括 一 个 内 置 的 跨 平 台 的 保 证 不 可 变 的 排 序 规 则 提 供 程 序 它 提 供 类 似 于 c 排 序 规 则 的 排 序 语 义 但 使 用 的 是 utf 8 编 码 而 非 sql ascii 通 过 使 用 这 个 新 的 排 序 规 则 提 供 程 序 可 以 确 保 无 论 postgresql 运 行 在 哪 基 于 文 本 的 查 询 都 能 返 回 相 同 的 排 序 结 果 高 可 用 环 境 和 主 版 本 升 级 时 的 逻 辑 复 制 增 强 功 能 逻 辑 复 制 用 于 在 许 多 场 景 下 实 时 流 式 传 输 数 据 然 而 在 此 版 本 之 前 想 要 执 行 主 版 本 升 级 的 用 户 必 须 删 除 逻 辑 复 制 槽 这 需 要 在 升 级 后 重 新 同 步 订 阅 者 的 数 据 从 postgresql 17 开 始 用 户 无 需 删 除 逻 辑 复 制 槽 从 而 简 化 了 使 用 逻 辑 复 制 时 的 升 级 过 程 postgresql 17 现 在 包 括 对 逻 辑 复 制 的 故 障 切 换 控 制 使 其 在 高 可 用 环 境 中 更 加 可 靠 此 外 postgresql 17 引 入 了 pg createsubscriber 命 令 行 工 具 用 于 在 使 用 物 理 复 制 的 副 本 从 库 上 创 建 逻 辑 复 制 更 多 安 全 性 和 操 作 管 理 选 项 postgresql 17 进 一 步 扩 展 了 用 户 管 理 其 数 据 库 系 统 整 个 生 命 周 期 的 方 式 postgresql 引 入 了 一 个 新 的 tls 选 项 sslnegotiation 允 许 用 户 在 使 用 alpn 时 直 接 进 行 tls 握 手 在 alpn 目 录 中 注 册 为 postgresql postgresql 17 还 增 加 了 pg maintain 预 定 义 角 色 该 角 色 授 予 用 户 执 行 维 护 操 作 的 权 限 postgresql 自 带 的 备 份 工 具 pg basebackup 现 在 支 持 增 量 备 份 并 添 加 了 pg combinebackup 工 具 来 重 建 完 整 备 份 此 外 pg dump 增 加 了 一 个 新 选 项 filter 允 许 用 户 在 生 成 转 储 文 件 时 选 择 要 包 含 的 对 象 postgresql 17 还 增 强 了 监 控 和 分 析 功 能 explain 现 在 显 示 本 地 i o 块 读 取 和 写 入 所 花 费 的 时 间 并 包 括 两 个 新 选 项 serialize 和 memory 对 于 查 看 用 于 网 络 传 输 的 数 据 转 换 所 花 费 的 时 间 以 及 使 用 了 多 少 内 存 很 有 用 postgresql 17 现 在 报 告 索 引 清 理 的 进 度 并 添 加 了 pg wait events 系 统 视 图 结 合 pg stat activity 可 以 更 深 入 了 解 活 动 会 话 为 什 么 在 等 待 其 他 功 能 postgresql 17 还 新 增 了 许 多 其 他 新 功 能 和 改 进 这 些 可 能 对 您 的 使 用 场 景 有 所 帮 助 请 查 看 发 布 说 明 以 获 取 完 整 的 新 功 能 和 更 改 列 表", "source_text": "Original Press Release\n\n2024年9月26日 - PostgreSQL全球开发组宣布PostgreSQL 17)正式发布,作为世界上最先进的开源数据库,PostgreSQL 17 是目前的最新版本。\n\nPostgreSQL 17在数十年的开源开发的基础上,提升了其性能和可扩展性,同时适应新兴的数据访问和存储模式。这个版本的PostgreSQL在整体性能上有显著提升,包括对vacuum的内存管理实现进行了全面改进,优化了存储访问和高并发工作负载,加快了批量加载和导出速度,以及改进了索引的查询执行。PostgreSQL 17 引入了一系列新特性,这些特性既适用于全新的工作负载,也能满足关键系统的需求,例如通过SQL/JSON的 JSON_TABLE 命令改善了开发者体验,以及增强了逻辑复制功能,简化了高可用工作负载和主要版本升级的管理。\n\n“PostgreSQL 17 突出展示了全球开源社区(推动PostgreSQL开发的力量)如何帮助不同阶段数据库用户构建增强功能”, PostgreSQL 核心团队成员 Jonathan Katz 说,“无论是提升大规模数据库的操作性能,还是使开发者拥有愉悦体验的新特性,PostgreSQL 17 都将提升您的数据管理体验。”\n\nPostgreSQL是一个创新的数据管理系统,以其可靠性和健壮性著称,得益于全球开发者社区超过25年的开源开发,已经成为各种规模组织的首选开源关系型数据库。\n\n系统级性能提升\n\nPostgreSQL的vacuum进程对于数据库的健康运行至关重要,它需要消耗服务器实例的资源来执行操作。PostgreSQL 17 引入了一种新的vacuum内部内存结构用于 vacuum 操作,最高可以减少20倍内存消耗。这不仅提高了 vacuum 的执行速度,还减少了对共享资源的使用,从而为您的工作负载腾出更多资源。\n\nPostgreSQL 17 继续提升 I/O 层的性能。由于改进了预写日志(WAL)处理,高并发工作负载的写入吞吐量提升最多高达2倍。此外,新的流式 I/O 接口加快了顺序扫描(读取表中所有数据)和ANALYZE更新查询规划器统计信息的速度。\n\nPostgreSQL 17还将其性能提升扩展到查询执行。PostgreSQL 17改进了使用B-tree索引(PostgreSQL 中的默认索引方法)的 IN 子句查询的性能。此外,BRIN索引现在支持并行构建。PostgreSQL 17 引入多个查询规划方面的改进,包括对 NOT NULL 约束的优化以及对公共表表达式(WITH查询)的改进。这个版本增加了更多的SIMD(单指令/多数据)支持以加速计算,包括使用AVX-512加速bit_count 函数。\n\n进一步提升开发者体验\n\nPostgreSQL 是第一个添加JSON支持的关系型数据库(2012年),而 PostgreSQL 17 进一步完善了 SQL/JSON 标准的实现。现在,PostgreSQL 17 中引入了JSON_TABLE,允许开发者将 JSON 数据转换为标准的 PostgreSQL 表。此外,PostgreSQL 17 现在支持 SQL/JSON 构造函数(JSON, JSON_SCALAR, JSON_SERIALIZE) 和查询函数(JSON_EXISTS, JSON_QUERY, JSON_VALUE),为开发者提供更多与 JSON 数据交互的方式。此版本还增加了更多的jsonpath 表达式,重点是将 JSON 数据转换为原生PostgreSQL数据类型,包括数值、布尔值、字符串和日期/时间类型。\n\nPostgreSQL 17 为MERGE命令添加了更多功能,包括 RETURNING 子句和更新视图的能力,这用于条件更新。此外,PostgreSQL 17 在批量加载和数据导出方面增加了新功能,包括使用COPY命令导出大行时性能提升高达2倍。\n\n当源编码和目标编码匹配时,COPY性能也有所提升,并且包括一个新选项ON_ERROR,允许在插入错误时继续导入。\n\n这个版本扩展了管理分区数据和分布在远程PostgreSQL实例上的数据的功能。PostgreSQL 17 支持在分区表上使用身份列和排除约束。用于在远程PostgreSQL实例上执行查询的PostgreSQL外部数据封装器)(postgres_fdw)现在可以将 EXISTS 和 IN 子查询下推到远程服务器以进行更高效的处理。\n\nPostgreSQL 17 还包括一个内置的、跨平台的、保证不可变的排序规则提供程序。它提供类似于 C 排序规则的排序语义,但使用的是 UTF-8 编码而非 SQL_ASCII。通过使用这个新的排序规则提供程序,可以确保无论 PostgreSQL 运行在哪,基于文本的查询都能返回相同的排序结果。\n\n高可用环境和主版本升级时的逻辑复制增强功能\n\n逻辑复制用于在许多场景下实时流式传输数据。然而,在此版本之前,想要执行主版本升级的用户必须删除逻辑复制槽,这需要在升级后重新同步订阅者的数据。从PostgreSQL 17开始,用户无需删除逻辑复制槽,从而简化了使用逻辑复制时的升级过程。\n\nPostgreSQL 17 现在包括对逻辑复制的故障切换控制,使其在高可用环境中更加可靠。此外,PostgreSQL 17 引入了 pg_createsubscriber命令行工具,用于在使用物理复制的副本从库上创建逻辑复制。\n\n更多安全性和操作管理选项\n\nPostgreSQL 17进一步扩展了用户管理其数据库系统整个生命周期的方式。PostgreSQL引入了一个新的 TLS 选项 sslnegotiation,允许用户在使用ALPN时直接进行TLS握手(在ALPN目录中注册为postgresql)。 PostgreSQL 17还增加了pg_maintain预定义角色,该角色授予用户执行维护操作的权限。\n\nPostgreSQL自带的备份工具pg_basebackup现在支持增量备份,并添加了pg_combinebackup工具来重建完整备份。此外,pg_dump增加了一个新选项 --filter,允许用户在生成转储文件时选择要包含的对象。\n\nPostgreSQL 17还增强了监控和分析功能。EXPLAIN现在显示本地 I/O 块读取和写入所花费的时间,并包括两个新选项:SERIALIZE和MEMORY,对于查看用于网络传输的数据转换所花费的时间以及使用了多少内存很有用。PostgreSQL 17现在报告索引清理的进度,并添加了 pg_wait_events 系统视图,结合pg_stat_activity可以更深入了解活动会话为什么在等待。\n\n其他功能\n\nPostgreSQL 17 还新增了许多其他新功能和改进,这些可能对您的使用场景有所帮助。请查看 发布说明 以获取完整的新功能和更改列表。", "segmentation_method": "reviewed_source_semantics", "label": "Original Press Release", "source_line_range": [ 1, 48 ] }, { "id": "body-region-2", "text": "关 于 postgresql postgresql 是 世 界 上 最 先 进 的 开 源 数 据 库 它 的 全 球 社 区 是 一 个 拥 有 数 以 千 计 的 用 户 贡 献 者 公 司 和 组 织 组 成 的 postgresql 起 源 于 加 利 福 尼 亚 大 学 伯 克 利 分 校 已 经 有 超 过 35 年 的 历 史 并 且 以 无 与 伦 比 的 速 度 持 续 发 展 postgresql 成 熟 的 特 性 不 仅 与 顶 级 商 业 数 据 库 系 统 匹 配 而 且 在 高 级 数 据 库 功 能 可 扩 展 性 安 全 性 和 稳 定 性 方 面 超 过 了 它 们 链 接 下 载 发 行 说 明 新 闻 资 料 安 全 版 本 政 策 关 注 postgresql 捐 赠", "source_text": "关于PostgreSQL\n\nPostgreSQL是世界上最先进的开源数据库,它的全球社区是一个拥有数以千计的用户、贡献者、公司和组织组成的。PostgreSQL起源于加利福尼亚大学伯克利分校,已经有超过35年的历史,并且以无与伦比的速度持续发展。PostgreSQL成熟的特性不仅与顶级商业数据库系统匹配,而且在高级数据库功能、可扩展性、安全性和稳定性方面超过了它们。\n\n链接\n\n下载\n发行说明\n新闻资料\n安全\n版本政策\n关注@postgresql\n捐赠", "segmentation_method": "reviewed_source_semantics", "label": "关于PostgreSQL", "source_line_range": [ 49, 62 ] }, { "id": "body-region-3", "text": "关 于 postgresql postgresql 是 世 界 上 最 先 进 的 开 源 数 据 库 它 的 全 球 社 区 是 一 个 拥 有 数 以 千 计 的 用 户 贡 献 者 公 司 和 组 织 组 成 的 postgresql 起 源 于 加 利 福 尼 亚 大 学 伯 克 利 分 校 已 经 有 超 过 35 年 的 历 史 并 且 以 无 与 伦 比 的 速 度 持 续 发 展 postgresql 成 熟 的 特 性 不 仅 与 顶 级 商 业 数 据 库 系 统 匹 配 而 且 在 高 级 数 据 库 功 能 可 扩 展 性 安 全 性 和 稳 定 性 方 面 超 过 了 它 们 learn more about postgresql and participate in our community at postgresql org", "source_text": "关于PostgreSQL\n\nPostgreSQL是世界上最先进的开源数据库,它的全球社区是一个拥有数以千计的用户、贡献者、公司和组织组成的。PostgreSQL起源于加利福尼亚大学伯克利分校,已经有超过35年的历史,并且以无与伦比的速度持续发展。PostgreSQL成熟的特性不仅与顶级商业数据库系统匹配,而且在高级数据库功能、可扩展性、安全性和稳定性方面超过了它们。\n\nLearn more about PostgreSQL and participate in our community at PostgreSQL.org.", "segmentation_method": "reviewed_source_semantics", "label": "关于PostgreSQL", "source_line_range": [ 63, 68 ] }, { "id": "body-region-4", "text": "更 多 功 能 信 息 有 关 上 述 功 能 和 其 他 信 息 的 解 释 请 参 考 以 下 资 源 发 行 说 明 功 能 列 表", "source_text": "更多功能信息\n\n有关上述功能和其他信息的解释,请参考以下资源:\n\n发行说明\n功能列表", "segmentation_method": "reviewed_source_semantics", "label": "更多功能信息", "source_line_range": [ 69, 75 ] }, { "id": "body-region-5", "text": "下 载 地 址 您 可 以 通 过 多 种 方 式 下 载 postgresql 17 包 括 官 方 下 载 页 面 包 含 用 于 windows linux macos 等 多 个 平 台 的 安 装 程 序 和 工 具 源 代 码 其 他 工 具 和 扩 展 可 在 postgresql extension network 上 找 到 文 档 postgresql 17 附 带 了 html 文 档 和 手 册 您 还 可 以 在 线 浏 览 html 和 pdf 格 式 的 文 档 许 可 证 postgresql 使 用 postgresql 许 可 证 这 是 一 个 类 似 bsd 的 宽 松 许 可 证 这 个 osi 认 证 的 许 可 证 因 其 灵 活 性 和 适 用 于 商 业 环 境 而 受 到 广 泛 赞 誉 因 为 它 不 限 制 在 商 业 和 专 有 应 用 程 序 中 使 用 postgresql 加 上 多 公 司 支 持 和 代 码 的 公 共 所 有 权 该 许 可 证 使 postgresql 非 常 受 欢 迎 因 为 供 应 商 希 望 在 自 己 的 产 品 中 嵌 入 数 据 库 而 无 需 担 心 费 用 供 应 商 锁 定 或 许 可 条 款 变 更 联 系 方 式 网 址 https www postgresql org 邮 箱 press postgresql org 图 像 和 标 志 postgres postgresql 和 大 象 标 志 slonik 都 是 postgresql 社 区 协 会 的 注 册 商 标 如 果 您 希 望 使 用 这 些 标 志 您 必 须 遵 守 商 标 政 策 postgresql elephant logo png format postgresql elephant icon postgresql banner with logo elephant and slogan 企 业 支 持 和 捐 赠 postgresql 得 到 了 许 多 公 司 的 支 持 他 们 赞 助 开 发 人 员 提 供 托 管 资 源 并 给 予 我 们 财 务 支 持 请 查 看 我 们 的 赞 助 商 页 面 了 解 这 些 项 目 的 支 持 者 还 有 大 量 提 供 postgresql 支 持 的 公 司 包 括 个 人 顾 问 和 跨 国 公 司 如 果 您 希 望 对 postgresql 全 球 开 发 组 或 其 中 一 个 公 认 的 社 群 非 营 利 组 织 进 行 捐 赠 请 访 问 我 们 的 捐 赠 页 面", "source_text": "下载地址\n\n您可以通过多种方式下载PostgreSQL 17,包括:\n\n官方下载页面,包含用于Windows、Linux、macOS等多个平台的安装程序和工具。\n源代码\n\n其他工具和扩展可在PostgreSQL Extension Network上找到。\n\n文档\n\nPostgreSQL 17 附带了HTML文档和手册,您还可以在线浏览HTML和PDF格式的文档。\n\n许可证\n\nPostgreSQL使用PostgreSQL 许可证,这是一个类似 BSD 的“宽松”许可证。这个OSI认证的许可证因其灵活性和适用于商业环境而受到广泛赞誉,因为它不限制在商业和专有应用程序中使用PostgreSQL。加上多公司支持和代码的公共所有权,该许可证使PostgreSQL非常受欢迎,因为供应商希望在自己的产品中嵌入数据库,而无需担心费用、供应商锁定或许可条款变更。\n\n联系方式\n\n网址\n\nhttps://www.postgresql.org/\n\n邮箱\n\npress@postgresql.org\n\n图像和标志\n\nPostgres、PostgreSQL和大象标志(Slonik)都是PostgreSQL 社区协会的注册商标。如果您希望使用这些标志,您必须遵守商标政策。\n\nPostgreSQL Elephant Logo, PNG format\nPostgreSQL Elephant Icon\nPostgreSQL Banner with Logo, Elephant and Slogan\n\n企业支持和捐赠\n\nPostgreSQL得到了许多公司的支持,他们赞助开发人员,提供托管资源,并给予我们财务支持。请查看我们的赞助商页面,了解这些项目的支持者。\n\n还有大量提供PostgreSQL支持的公司,包括个人顾问和跨国公司。\n\n如果您希望对PostgreSQL全球开发组或其中一个公认的社群非营利组织进行捐赠,请访问我们的捐赠页面。", "segmentation_method": "reviewed_source_semantics", "label": "下载地址 — 企业支持和捐赠", "source_line_range": [ 76, 117 ] } ], "ending": { "text": "\n\n还有大量提供PostgreSQL支持的公司,包括个人顾问和跨国公司。\n\n如果您希望对PostgreSQL全球开发组或其中一个公认的社群非营利组织进行捐赠,请访问我们的捐赠页面。" } } }, { "id": "article-052", "name": "从小喝到大的三合一咖啡,怎么成了咖啡鄙视链最底端", "url": "https://www.ifanr.com/1409353", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "从小喝到大的三合一咖啡,怎么成了「咖啡鄙视链」最底端" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "黄智健" ] }, { "id": "stable-3", "alternatives": [ "少说废话。" ] }, { "id": "stable-4", "alternatives": [ "咖啡" ] }, { "id": "stable-5", "alternatives": [ "消费" ] }, { "id": "stable-6", "alternatives": [ "消费升级" ] }, { "id": "stable-7", "alternatives": [ "速溶咖啡" ] }, { "id": "stable-8", "alternatives": [ "商务合作" ] }, { "id": "stable-9", "alternatives": [ "内容投稿" ] }, { "id": "stable-10", "alternatives": [ "下载客户端" ] }, { "id": "stable-11", "alternatives": [ "登录" ] }, { "id": "stable-12", "alternatives": [ "注册" ] }, { "id": "stable-13", "alternatives": [ "媒体品牌" ] }, { "id": "stable-14", "alternatives": [ "知晓云" ] }, { "id": "stable-15", "alternatives": [ "制糖工厂" ] }, { "id": "stable-16", "alternatives": [ "分享" ] }, { "id": "stable-17", "alternatives": [ "全部评论" ] }, { "id": "stable-18", "alternatives": [ "最热" ] }, { "id": "stable-19", "alternatives": [ "最新" ] }, { "id": "stable-20", "alternatives": [ "参与讨论前请先登录" ] }, { "id": "stable-21", "alternatives": [ "收到回复邮件通知我" ] }, { "id": "stable-22", "alternatives": [ "发表评论" ] }, { "id": "stable-23", "alternatives": [ "踩" ] }, { "id": "stable-24", "alternatives": [ "回复" ] }, { "id": "stable-25", "alternatives": [ "爱范儿,关注明日产品的数字潮牌" ] }, { "id": "stable-26", "alternatives": [ "AppSo" ] }, { "id": "stable-27", "alternatives": [ "董车会" ] }, { "id": "stable-28", "alternatives": [ "关于爱范儿" ] }, { "id": "stable-29", "alternatives": [ "关于我们" ] }, { "id": "stable-30", "alternatives": [ "社区规则" ] }, { "id": "stable-31", "alternatives": [ "隐私策略" ] }, { "id": "stable-32", "alternatives": [ "加入我们" ] }, { "id": "stable-33", "alternatives": [ "合作伙伴" ] }, { "id": "stable-34", "alternatives": [ "CC BY-NC 4.0" ] }, { "id": "stable-35", "alternatives": [ "All content is made available under the CC BY-NC 4.0 for non-commercial use. Commercial use of this content is prohibited without explicit permission." ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "从小喝到大的三合一咖啡,怎么成了「咖啡鄙视链」最底端" ], "html_selector": "h1.c-single-normal__title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#article-comments li[id^=\"comment-\"]", "author_selector": ".c-article-comments-item__name", "body_selector": ".c-article-comments-item__content", "id_attribute": "id", "section_markers": [ "全部评论", "评论" ], "version": 2, "minimum_comments": 4, "text_scope": { "body_end": "」的末端,也意味着更廉价的三合一咖啡要更加亲民,有着更大的市场受众和需求。这种需求在很长一段时间里都不会被精品咖啡所取代,而真正要担心精品咖啡冲击的,恐怕会是街头巷角的小咖啡店们。", "end_markers": [ "推荐文章", "本篇来自栏目" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-052/comment-qualification-reference-r5.json", "sha256": "2ae84121ec88895d1d4c96914b25689bc684602189e18dc39b683620260532d1", "chars": 1445, "record_count": 4 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 4, "qualification_only": true } }, "ground_truth_main_content": "常有人开玩笑说:打工人血管里流着的不是血液,是咖啡。在开始工作前冲泡一杯咖啡,是很多职场人每个早晨不约而同的习惯。\n\n我也经常由于晚上写(Kai)稿(Hei)太晚了导致早上打不起精神,要去饮水台冲杯咖啡续续命,在那我总能碰到「形色各异」的同事们:有的从冰箱里拿出萃取了一晚上的冷萃咖啡、有的将他的浓缩咖啡液倒在刚买的牛奶冰淇淋上,有的拿着手冲壶悠闲地绕圈「浇水」……\n\n尽管喝咖啡的方式各异,他们都有一个共同点——看着我撕开的三合一咖啡,似笑非笑地对我说一句:「对自己好一点吧」。\n\n根据 USDA 全球供需报告统计,中国人均咖啡消费量已达 15 杯/年。中国咖啡市场 72% 的份额是速溶咖啡,其中以雀巢 2+1 等三合一速溶咖啡占比最大。\n\n三合一咖啡是被消费最多的咖啡品类,也是很多人喝的第一杯咖啡,但是现在却成了咖啡鄙视链的底端。\n\n植脂末是三合一咖啡原罪?\n\n在很长一段的时间里,集合了奶精、糖、即溶咖啡的三合一咖啡就是我对于咖啡的全部印象,香甜、润滑的口感配合咖啡特有的香味组合成了我对于小资生活的想象。\n\n恬静的午后用红色的咖啡杯冲上一杯雀巢三合一咖啡,这就是我的「文艺」启蒙。\n\n但是现在,这杯启蒙咖啡正在被越来越多的消费者所抛弃,「鄙视」三合一咖啡,成为了喝咖啡入门的标准。\n\n根据 CBNdata《2019 中国消费进阶趋势》的数据,速溶咖啡的线上零售额占比正呈逐年下降的趋势。\n\n英敏特的《中国饮料报告——咖啡》中也指出,速溶咖啡虽然仍最受消费者欢迎,但其市场增速正日趋放缓。速溶咖啡的市场份额很可能会被即饮咖啡饮料、耳挂式咖啡和胶囊咖啡所蚕食。\n\n从「第一杯咖啡」升级到「别的咖啡」正成为咖啡消费者的新趋势,当我问及一些完成了消费升级的朋友为什么不再喝三合一咖啡时,答案都不约而同地指向了同一个关注点——健康。\n\n翻开三合一咖啡的成分表可以看到,作为「三合一」的主角,咖啡粉的含量却最少,只占成分的 10% 左右,其余的奶精和糖占了近 90%,有人评价喝三合一咖啡其实是在喝带咖啡因的甜牛奶。\n\n其中备受诟病的,是三合一咖啡所含的奶精,也就是成分表中的植脂末。\n\n植脂末常常被用作奶粉的代替品,不同的是奶粉是由天然鲜奶喷雾干燥而成,而植脂末是用精制植物油或氢化植物油、酪蛋白等合成的人工产品。\n\n两者营养价值不同,但是口味相似,因此在麦片、即饮式奶茶等含「奶」食品中,你常常都能看到植脂末代替奶粉在成分表中出现,植脂末是否健康也成为了人们关注的热门食品问题。\n\n植脂末是通过用葡萄糖浆将油包裹起来,然后添加乳化剂,最后喷雾干燥的技术得到的粉末状颗粒,在炼制的过程可能生成的反式脂肪酸是引起人们恐慌的主要原因。\n\n一些医学报告指出,食用反式脂肪酸会提高罹患冠心病的几率,同时反式脂肪酸也是引起高血脂、脂肪肝的原因之一。\n\n种种研究传出的负面消息让不少消费者谈「反」色变,为此更传出了喝三合一咖啡等于「慢性自杀」等骇人听闻的谣言。\n\n事实上,任何脱离剂量谈毒性的言论是没有意义的。根据世界卫生组织的指引,反式脂肪酸的每日食用的安全上限为 2g(维生素 C 的安全上限也是 2g),目前没有报告指出日食用 2g 以下的反式脂肪酸会对人体健康造成影响。\n\n并且反式脂肪酸只是植脂末在氢化过程时的副产物,目前能不产生反式脂肪酸的完全氢化工艺已经非常成熟。在三合一咖啡的营养表可以看到,即使用了植脂末,反式脂肪酸的含量也是安全值 0g(国标规定低于 0.3g 可以标为 0g)。\n\n▲ 含糖量约为 59.4g 图片来自:深圳市品质研究院\n\n也就是说,每日一杯三合一咖啡,其实并不会对你的健康造成什么影响,而其含糖量,也不及一杯半糖奶茶多。\n\n不过在无糖、低脂的健康消费趋势下,越来越多消费者对三合一咖啡的糖分和脂肪看不顺眼,根据天猫冲调行业的数据报告显示,2020 年精品咖啡消费规模相比同期提升了 169%。\n\n具备健康属性的高品质咖啡品类正得到消费者的关注,中国消费者越来越能喝「苦」了。\n\n苦涩中的仪式感\n\n咖啡的咖啡因能刺激人的神经系统,使人保持情绪高昂和精神亢奋,这种提神效果让咖啡与职场自然地捆绑在了一起,拿起咖啡就要面对堆积如山的文档。\n\n但随着精品咖啡店的增长,咖啡教育得到普及,喝咖啡的场景正从办公室转移到了家中。Data 100 的调查结果显示,消费者饮用咖啡最主流的场景是办公室(74%),其次就是在家里(65%),比休闲娱乐场景(64%)还要高。\n\n咖啡从办公室走入家庭,有了更大更自由的场景和更充裕的时间,咖啡可以变得没那么单调。\n\n在社交媒体上,分享一壶手冲咖啡成了追求文艺的消费者们新的话题。喝咖啡这件事,正在向「品」咖啡的方向转变。\n\n制作一杯手冲咖啡可能需要一下午的时间:磨豆子,调整咖啡和水的比例,掌握好温度,注意注水的方式,严格把控注水的时间……很繁琐,但是在扑鼻的咖啡香味被热气带出的那一刻,人的压力也似乎被柔和的水蒸气一并带走。\n\n手冲咖啡的繁琐也意味着仪式感,冲调一杯咖啡就像是完成了一个不大不小的挑战,这种自我提升带来的愉悦感是便捷的速溶咖啡所没有的。\n\n▲ 图片来自:Pepper.ph\n\n不过繁琐也意味着门槛,在专业的手冲咖啡和「傻瓜式」的速溶咖啡之间,挂耳咖啡和袋泡咖啡等新式咖啡以低门槛、「轻」仪式感带动了一批消费者进行消费升级。\n\n挂耳咖啡将手冲咖啡的步骤被拆分成了两步:磨原料与冲泡,前一步交给生产商,撕开包装袋便是准备好的豆子,后一步交给消费者,简单用水冲泡两圈便可收获动手的仪式感,手冲的难度与愉悦感在挂耳咖啡上得到了平衡。\n\n挂耳咖啡的代表「隅田川咖啡」是目前线上平台最火热的咖啡品牌之一,截至 2020 年年底,隅田川在全球累计的销量为 3 亿杯。\n\n而在过去的 3 月,隅田川咖啡对外宣布已完成近 3 亿元 B 轮融资,这家由 IT 工程师留日期间创立的咖啡品牌正成为被资本追捧新对象。\n\n挂耳咖啡和袋泡咖啡本质上其实还是及冲及得的快捷咖啡,其之所以能在速溶咖啡的眼皮下抢走消费者,是因为它捕捉到了消费者对于咖啡需求的细微变化。\n\nData100 在《咖啡市场趋势洞悉》中对消费者的咖啡饮用动机进行了调查,其中提神需求占比最高(83%),而紧随其后的则是放松心情和压力(68%)。\n\n▲ 咖啡粉+糖+牛奶+热水=三合一咖啡\n\n喝咖啡已经不再是摄取咖啡因的代名词,愉悦的饮用体验正成为消费者新的咖啡需求,这种传统三合一速溶咖啡缺失的体验给挂耳咖啡留下了弯道超车的空间。\n\n越来越专业的咖啡消费者\n\n咖啡从出现到流行再到普及,至今经历了三次浪潮。\n\n第一次咖啡浪潮是以雀巢公司为主体的速溶口粮化,雀巢公司利用喷雾干燥技术让原本难以保存的新鲜咖啡转变成了可以放在家里的一罐罐「精神粮食」。\n\n第二次咖啡浪潮中主体变成了以星巴克为代表的咖啡店,咖啡店用以浓缩咖啡为基础的饮料将咖啡推向了更广泛的受众。\n\n像《老友记》中舒适的咖啡馆沙发、悠闲的气氛成为了消费者对于咖啡的新印象,卡布奇诺、拿铁成了咖啡的代名词。\n\n而在第三次咖啡浪潮中,咖啡的品质、起源、故事得到了更多消费者的关注,精品咖啡馆的出现让消费者意识到原来一杯黑又苦的咖啡也能小巧精致,富有层次。\n\n咖啡店也不再是消费者享受精品咖啡的唯一窗口,对高品质咖啡的追求让他们乐于学习咖啡知识,亲自购买并制作一杯咖啡。\n\n咖啡豆的优劣,则成了「品质」的直观体现。在精品咖啡店潜移默化的教育下,「有高品质的咖啡豆,才有好咖啡」成了咖啡爱好者的共识。\n\n罗布斯塔咖啡豆因为其咖啡因含量高、耐虫害、产量大,是大多数三合一咖啡常用的原料。罗布斯塔的味道较苦且浓烈,香气要比另一种主流咖啡豆阿拉比卡淡。\n\n阿拉比卡的咖啡因要低一点,香气比罗布斯塔浓郁,由于不耐虫害,产量比罗布斯塔低,价格也要比罗布斯塔高。\n\n于是乎,香气和价格的不同,让咖啡因便宜量大的罗布斯塔在咖啡豆鄙视链里,排在了阿拉比卡之后,而广泛采用罗布斯塔的速溶咖啡,也在采用阿拉比卡的精品咖啡面前有点抬不起头。\n\n消费者们对于咖啡的需求已经不只于咖啡因,咖啡的香气、甚至故事都成了影响购物选择的因素之一。\n\n除了咖啡豆以外,工艺也成了消费者衡量「品质」的标准。\n\n传统的速溶咖啡制作是在萃取后将咖啡浓缩液用喷雾干燥法得到咖啡粉,在这个过程中咖啡中的芳香物质会因为高温而挥发,因此得到的咖啡粉往往就少了鲜煮咖啡的香气。\n\n为了能留住咖啡的香味,咖啡厂商想了不少办法。以雀巢为代表的胶囊咖啡通过压缩气体将浓缩咖啡的香气带出。\n\n▲ 图片来自:每日财经新闻\n\n以三顿半为代表的冻干咖啡粉则是用冷冻干燥法将咖啡冻结,再将固态水升华,得到疏松的多孔解构,磨成的冻干咖啡粉会有保留更多的芳香物质,同时溶解性更好。\n\n星巴克开发的 VIA 咖啡称其用了极细研磨技术将咖啡豆磨成了超微颗粒,保留咖啡原本的风味物质的同时,溶解性还很强,可以溶解在酒类、茶类饮料中形成混搭。\n\n冷萃咖啡取代手冲成为新的咖啡喝法,冷萃咖啡液也随之成为了新型咖啡的爆款。\n\n冷萃咖啡液是通过长时间的冰滴冷萃,得到保留咖啡的香气和风味的咖啡浓缩液,在饮用时只需要倒入水或者其他饮品中即可溶得一杯冷萃咖啡。\n\n三合一咖啡在「咖啡鄙视链」上掉队,是受到精品咖啡冲击的消费升级,而消费升级的背后,则是咖啡产业的升级、制作工艺的升级和消费观念的升级。\n\n处于「鄙视链」的末端,也意味着更廉价的三合一咖啡要更加亲民,有着更大的市场受众和需求。这种需求在很长一段时间里都不会被精品咖啡所取代,而真正要担心精品咖啡冲击的,恐怕会是街头巷角的小咖啡店们。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 4, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "常 有 人 开 玩 笑 说 打 工 人 血 管 里 流 着 的 不 是 血 液 是 咖 啡 在 开 始 工 作 前 冲 泡 一 杯 咖 啡 是 很 多 职 场 人 每 个 早 晨 不 约 而 同 的 习 惯 我 也 经 常 由 于 晚 上 写 kai 稿 hei 太 晚 了 导 致 早 上 打 不 起 精 神 要 去 饮 水 台 冲 杯 咖 啡 续 续 命 在 那 我 总 能 碰 到 形 色 各 异 的 同 事 们 有 的 从 冰 箱 里 拿 出 萃 取 了 一 晚 上 的 冷 萃 咖 啡 有 的 将 他 的 浓 缩 咖 啡 液 倒 在 刚 买 的 牛 奶 冰 淇 淋 上 有 的 拿 着 手 冲 壶 悠 闲 地 绕 圈 浇 水 尽 管 喝 咖 啡 的 方 式 各 异 他 们 都 有 一 个 共 同 点 看 着 我 撕 开 的 三 合 一 咖 啡 似 笑 非 笑 地 对 我 说 一 句 对 自 己 好 一 点 吧 根 据 usda 全 球 供 需 报 告 统 计 中 国 人 均 咖 啡 消 费 量 已 达 15 杯 年 中 国 咖 啡 市 场 72 的 份 额 是 速 溶 咖 啡 其 中 以 雀 巢 2 1 等 三 合 一 速 溶 咖 啡 占 比 最 大 三 合 一 咖 啡 是 被 消 费 最 多 的 咖 啡 品 类 也 是 很 多 人 喝 的 第 一 杯 咖 啡 但 是 现 在 却 成 了 咖 啡 鄙 视 链 的 底 端", "source_text": "常有人开玩笑说:打工人血管里流着的不是血液,是咖啡。在开始工作前冲泡一杯咖啡,是很多职场人每个早晨不约而同的习惯。\n\n我也经常由于晚上写(Kai)稿(Hei)太晚了导致早上打不起精神,要去饮水台冲杯咖啡续续命,在那我总能碰到「形色各异」的同事们:有的从冰箱里拿出萃取了一晚上的冷萃咖啡、有的将他的浓缩咖啡液倒在刚买的牛奶冰淇淋上,有的拿着手冲壶悠闲地绕圈「浇水」……\n\n尽管喝咖啡的方式各异,他们都有一个共同点——看着我撕开的三合一咖啡,似笑非笑地对我说一句:「对自己好一点吧」。\n\n根据 USDA 全球供需报告统计,中国人均咖啡消费量已达 15 杯/年。中国咖啡市场 72% 的份额是速溶咖啡,其中以雀巢 2+1 等三合一速溶咖啡占比最大。\n\n三合一咖啡是被消费最多的咖啡品类,也是很多人喝的第一杯咖啡,但是现在却成了咖啡鄙视链的底端。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:常有人开玩笑说:打工人血管里流着的不是血液,是咖啡。在开始工作前冲泡一杯咖啡,是很多职场人每个早晨不约而同的习惯。", "source_line_range": [ 1, 10 ] }, { "id": "body-region-2", "text": "植 脂 末 是 三 合 一 咖 啡 原 罪 在 很 长 一 段 的 时 间 里 集 合 了 奶 精 糖 即 溶 咖 啡 的 三 合 一 咖 啡 就 是 我 对 于 咖 啡 的 全 部 印 象 香 甜 润 滑 的 口 感 配 合 咖 啡 特 有 的 香 味 组 合 成 了 我 对 于 小 资 生 活 的 想 象 恬 静 的 午 后 用 红 色 的 咖 啡 杯 冲 上 一 杯 雀 巢 三 合 一 咖 啡 这 就 是 我 的 文 艺 启 蒙 但 是 现 在 这 杯 启 蒙 咖 啡 正 在 被 越 来 越 多 的 消 费 者 所 抛 弃 鄙 视 三 合 一 咖 啡 成 为 了 喝 咖 啡 入 门 的 标 准 根 据 cbndata 2019 中 国 消 费 进 阶 趋 势 的 数 据 速 溶 咖 啡 的 线 上 零 售 额 占 比 正 呈 逐 年 下 降 的 趋 势 英 敏 特 的 中 国 饮 料 报 告 咖 啡 中 也 指 出 速 溶 咖 啡 虽 然 仍 最 受 消 费 者 欢 迎 但 其 市 场 增 速 正 日 趋 放 缓 速 溶 咖 啡 的 市 场 份 额 很 可 能 会 被 即 饮 咖 啡 饮 料 耳 挂 式 咖 啡 和 胶 囊 咖 啡 所 蚕 食 从 第 一 杯 咖 啡 升 级 到 别 的 咖 啡 正 成 为 咖 啡 消 费 者 的 新 趋 势 当 我 问 及 一 些 完 成 了 消 费 升 级 的 朋 友 为 什 么 不 再 喝 三 合 一 咖 啡 时 答 案 都 不 约 而 同 地 指 向 了 同 一 个 关 注 点 健 康 翻 开 三 合 一 咖 啡 的 成 分 表 可 以 看 到 作 为 三 合 一 的 主 角 咖 啡 粉 的 含 量 却 最 少 只 占 成 分 的 10 左 右 其 余 的 奶 精 和 糖 占 了 近 90 有 人 评 价 喝 三 合 一 咖 啡 其 实 是 在 喝 带 咖 啡 因 的 甜 牛 奶 其 中 备 受 诟 病 的 是 三 合 一 咖 啡 所 含 的 奶 精 也 就 是 成 分 表 中 的 植 脂 末 植 脂 末 常 常 被 用 作 奶 粉 的 代 替 品 不 同 的 是 奶 粉 是 由 天 然 鲜 奶 喷 雾 干 燥 而 成 而 植 脂 末 是 用 精 制 植 物 油 或 氢 化 植 物 油 酪 蛋 白 等 合 成 的 人 工 产 品 两 者 营 养 价 值 不 同 但 是 口 味 相 似 因 此 在 麦 片 即 饮 式 奶 茶 等 含 奶 食 品 中 你 常 常 都 能 看 到 植 脂 末 代 替 奶 粉 在 成 分 表 中 出 现 植 脂 末 是 否 健 康 也 成 为 了 人 们 关 注 的 热 门 食 品 问 题 植 脂 末 是 通 过 用 葡 萄 糖 浆 将 油 包 裹 起 来 然 后 添 加 乳 化 剂 最 后 喷 雾 干 燥 的 技 术 得 到 的 粉 末 状 颗 粒 在 炼 制 的 过 程 可 能 生 成 的 反 式 脂 肪 酸 是 引 起 人 们 恐 慌 的 主 要 原 因 一 些 医 学 报 告 指 出 食 用 反 式 脂 肪 酸 会 提 高 罹 患 冠 心 病 的 几 率 同 时 反 式 脂 肪 酸 也 是 引 起 高 血 脂 脂 肪 肝 的 原 因 之 一 种 种 研 究 传 出 的 负 面 消 息 让 不 少 消 费 者 谈 反 色 变 为 此 更 传 出 了 喝 三 合 一 咖 啡 等 于 慢 性 自 杀 等 骇 人 听 闻 的 谣 言 事 实 上 任 何 脱 离 剂 量 谈 毒 性 的 言 论 是 没 有 意 义 的 根 据 世 界 卫 生 组 织 的 指 引 反 式 脂 肪 酸 的 每 日 食 用 的 安 全 上 限 为 2g 维 生 素 c 的 安 全 上 限 也 是 2g 目 前 没 有 报 告 指 出 日 食 用 2g 以 下 的 反 式 脂 肪 酸 会 对 人 体 健 康 造 成 影 响 并 且 反 式 脂 肪 酸 只 是 植 脂 末 在 氢 化 过 程 时 的 副 产 物 目 前 能 不 产 生 反 式 脂 肪 酸 的 完 全 氢 化 工 艺 已 经 非 常 成 熟 在 三 合 一 咖 啡 的 营 养 表 可 以 看 到 即 使 用 了 植 脂 末 反 式 脂 肪 酸 的 含 量 也 是 安 全 值 0g 国 标 规 定 低 于 0 3g 可 以 标 为 0g 含 糖 量 约 为 59 4g 图 片 来 自 深 圳 市 品 质 研 究 院 也 就 是 说 每 日 一 杯 三 合 一 咖 啡 其 实 并 不 会 对 你 的 健 康 造 成 什 么 影 响 而 其 含 糖 量 也 不 及 一 杯 半 糖 奶 茶 多 不 过 在 无 糖 低 脂 的 健 康 消 费 趋 势 下 越 来 越 多 消 费 者 对 三 合 一 咖 啡 的 糖 分 和 脂 肪 看 不 顺 眼 根 据 天 猫 冲 调 行 业 的 数 据 报 告 显 示 2020 年 精 品 咖 啡 消 费 规 模 相 比 同 期 提 升 了 169 具 备 健 康 属 性 的 高 品 质 咖 啡 品 类 正 得 到 消 费 者 的 关 注 中 国 消 费 者 越 来 越 能 喝 苦 了", "source_text": "植脂末是三合一咖啡原罪?\n\n在很长一段的时间里,集合了奶精、糖、即溶咖啡的三合一咖啡就是我对于咖啡的全部印象,香甜、润滑的口感配合咖啡特有的香味组合成了我对于小资生活的想象。\n\n恬静的午后用红色的咖啡杯冲上一杯雀巢三合一咖啡,这就是我的「文艺」启蒙。\n\n但是现在,这杯启蒙咖啡正在被越来越多的消费者所抛弃,「鄙视」三合一咖啡,成为了喝咖啡入门的标准。\n\n根据 CBNdata《2019 中国消费进阶趋势》的数据,速溶咖啡的线上零售额占比正呈逐年下降的趋势。\n\n英敏特的《中国饮料报告——咖啡》中也指出,速溶咖啡虽然仍最受消费者欢迎,但其市场增速正日趋放缓。速溶咖啡的市场份额很可能会被即饮咖啡饮料、耳挂式咖啡和胶囊咖啡所蚕食。\n\n从「第一杯咖啡」升级到「别的咖啡」正成为咖啡消费者的新趋势,当我问及一些完成了消费升级的朋友为什么不再喝三合一咖啡时,答案都不约而同地指向了同一个关注点——健康。\n\n翻开三合一咖啡的成分表可以看到,作为「三合一」的主角,咖啡粉的含量却最少,只占成分的 10% 左右,其余的奶精和糖占了近 90%,有人评价喝三合一咖啡其实是在喝带咖啡因的甜牛奶。\n\n其中备受诟病的,是三合一咖啡所含的奶精,也就是成分表中的植脂末。\n\n植脂末常常被用作奶粉的代替品,不同的是奶粉是由天然鲜奶喷雾干燥而成,而植脂末是用精制植物油或氢化植物油、酪蛋白等合成的人工产品。\n\n两者营养价值不同,但是口味相似,因此在麦片、即饮式奶茶等含「奶」食品中,你常常都能看到植脂末代替奶粉在成分表中出现,植脂末是否健康也成为了人们关注的热门食品问题。\n\n植脂末是通过用葡萄糖浆将油包裹起来,然后添加乳化剂,最后喷雾干燥的技术得到的粉末状颗粒,在炼制的过程可能生成的反式脂肪酸是引起人们恐慌的主要原因。\n\n一些医学报告指出,食用反式脂肪酸会提高罹患冠心病的几率,同时反式脂肪酸也是引起高血脂、脂肪肝的原因之一。\n\n种种研究传出的负面消息让不少消费者谈「反」色变,为此更传出了喝三合一咖啡等于「慢性自杀」等骇人听闻的谣言。\n\n事实上,任何脱离剂量谈毒性的言论是没有意义的。根据世界卫生组织的指引,反式脂肪酸的每日食用的安全上限为 2g(维生素 C 的安全上限也是 2g),目前没有报告指出日食用 2g 以下的反式脂肪酸会对人体健康造成影响。\n\n并且反式脂肪酸只是植脂末在氢化过程时的副产物,目前能不产生反式脂肪酸的完全氢化工艺已经非常成熟。在三合一咖啡的营养表可以看到,即使用了植脂末,反式脂肪酸的含量也是安全值 0g(国标规定低于 0.3g 可以标为 0g)。\n\n▲ 含糖量约为 59.4g 图片来自:深圳市品质研究院\n\n也就是说,每日一杯三合一咖啡,其实并不会对你的健康造成什么影响,而其含糖量,也不及一杯半糖奶茶多。\n\n不过在无糖、低脂的健康消费趋势下,越来越多消费者对三合一咖啡的糖分和脂肪看不顺眼,根据天猫冲调行业的数据报告显示,2020 年精品咖啡消费规模相比同期提升了 169%。\n\n具备健康属性的高品质咖啡品类正得到消费者的关注,中国消费者越来越能喝「苦」了。", "segmentation_method": "reviewed_source_semantics", "label": "植脂末是三合一咖啡原罪?", "source_line_range": [ 11, 50 ] }, { "id": "body-region-3", "text": "苦 涩 中 的 仪 式 感 咖 啡 的 咖 啡 因 能 刺 激 人 的 神 经 系 统 使 人 保 持 情 绪 高 昂 和 精 神 亢 奋 这 种 提 神 效 果 让 咖 啡 与 职 场 自 然 地 捆 绑 在 了 一 起 拿 起 咖 啡 就 要 面 对 堆 积 如 山 的 文 档 但 随 着 精 品 咖 啡 店 的 增 长 咖 啡 教 育 得 到 普 及 喝 咖 啡 的 场 景 正 从 办 公 室 转 移 到 了 家 中 data 100 的 调 查 结 果 显 示 消 费 者 饮 用 咖 啡 最 主 流 的 场 景 是 办 公 室 74 其 次 就 是 在 家 里 65 比 休 闲 娱 乐 场 景 64 还 要 高 咖 啡 从 办 公 室 走 入 家 庭 有 了 更 大 更 自 由 的 场 景 和 更 充 裕 的 时 间 咖 啡 可 以 变 得 没 那 么 单 调 在 社 交 媒 体 上 分 享 一 壶 手 冲 咖 啡 成 了 追 求 文 艺 的 消 费 者 们 新 的 话 题 喝 咖 啡 这 件 事 正 在 向 品 咖 啡 的 方 向 转 变 制 作 一 杯 手 冲 咖 啡 可 能 需 要 一 下 午 的 时 间 磨 豆 子 调 整 咖 啡 和 水 的 比 例 掌 握 好 温 度 注 意 注 水 的 方 式 严 格 把 控 注 水 的 时 间 很 繁 琐 但 是 在 扑 鼻 的 咖 啡 香 味 被 热 气 带 出 的 那 一 刻 人 的 压 力 也 似 乎 被 柔 和 的 水 蒸 气 一 并 带 走 手 冲 咖 啡 的 繁 琐 也 意 味 着 仪 式 感 冲 调 一 杯 咖 啡 就 像 是 完 成 了 一 个 不 大 不 小 的 挑 战 这 种 自 我 提 升 带 来 的 愉 悦 感 是 便 捷 的 速 溶 咖 啡 所 没 有 的 图 片 来 自 pepper ph 不 过 繁 琐 也 意 味 着 门 槛 在 专 业 的 手 冲 咖 啡 和 傻 瓜 式 的 速 溶 咖 啡 之 间 挂 耳 咖 啡 和 袋 泡 咖 啡 等 新 式 咖 啡 以 低 门 槛 轻 仪 式 感 带 动 了 一 批 消 费 者 进 行 消 费 升 级 挂 耳 咖 啡 将 手 冲 咖 啡 的 步 骤 被 拆 分 成 了 两 步 磨 原 料 与 冲 泡 前 一 步 交 给 生 产 商 撕 开 包 装 袋 便 是 准 备 好 的 豆 子 后 一 步 交 给 消 费 者 简 单 用 水 冲 泡 两 圈 便 可 收 获 动 手 的 仪 式 感 手 冲 的 难 度 与 愉 悦 感 在 挂 耳 咖 啡 上 得 到 了 平 衡 挂 耳 咖 啡 的 代 表 隅 田 川 咖 啡 是 目 前 线 上 平 台 最 火 热 的 咖 啡 品 牌 之 一 截 至 2020 年 年 底 隅 田 川 在 全 球 累 计 的 销 量 为 3 亿 杯 而 在 过 去 的 3 月 隅 田 川 咖 啡 对 外 宣 布 已 完 成 近 3 亿 元 b 轮 融 资 这 家 由 it 工 程 师 留 日 期 间 创 立 的 咖 啡 品 牌 正 成 为 被 资 本 追 捧 新 对 象 挂 耳 咖 啡 和 袋 泡 咖 啡 本 质 上 其 实 还 是 及 冲 及 得 的 快 捷 咖 啡 其 之 所 以 能 在 速 溶 咖 啡 的 眼 皮 下 抢 走 消 费 者 是 因 为 它 捕 捉 到 了 消 费 者 对 于 咖 啡 需 求 的 细 微 变 化 data100 在 咖 啡 市 场 趋 势 洞 悉 中 对 消 费 者 的 咖 啡 饮 用 动 机 进 行 了 调 查 其 中 提 神 需 求 占 比 最 高 83 而 紧 随 其 后 的 则 是 放 松 心 情 和 压 力 68 咖 啡 粉 糖 牛 奶 热 水 三 合 一 咖 啡 喝 咖 啡 已 经 不 再 是 摄 取 咖 啡 因 的 代 名 词 愉 悦 的 饮 用 体 验 正 成 为 消 费 者 新 的 咖 啡 需 求 这 种 传 统 三 合 一 速 溶 咖 啡 缺 失 的 体 验 给 挂 耳 咖 啡 留 下 了 弯 道 超 车 的 空 间", "source_text": "苦涩中的仪式感\n\n咖啡的咖啡因能刺激人的神经系统,使人保持情绪高昂和精神亢奋,这种提神效果让咖啡与职场自然地捆绑在了一起,拿起咖啡就要面对堆积如山的文档。\n\n但随着精品咖啡店的增长,咖啡教育得到普及,喝咖啡的场景正从办公室转移到了家中。Data 100 的调查结果显示,消费者饮用咖啡最主流的场景是办公室(74%),其次就是在家里(65%),比休闲娱乐场景(64%)还要高。\n\n咖啡从办公室走入家庭,有了更大更自由的场景和更充裕的时间,咖啡可以变得没那么单调。\n\n在社交媒体上,分享一壶手冲咖啡成了追求文艺的消费者们新的话题。喝咖啡这件事,正在向「品」咖啡的方向转变。\n\n制作一杯手冲咖啡可能需要一下午的时间:磨豆子,调整咖啡和水的比例,掌握好温度,注意注水的方式,严格把控注水的时间……很繁琐,但是在扑鼻的咖啡香味被热气带出的那一刻,人的压力也似乎被柔和的水蒸气一并带走。\n\n手冲咖啡的繁琐也意味着仪式感,冲调一杯咖啡就像是完成了一个不大不小的挑战,这种自我提升带来的愉悦感是便捷的速溶咖啡所没有的。\n\n▲ 图片来自:Pepper.ph\n\n不过繁琐也意味着门槛,在专业的手冲咖啡和「傻瓜式」的速溶咖啡之间,挂耳咖啡和袋泡咖啡等新式咖啡以低门槛、「轻」仪式感带动了一批消费者进行消费升级。\n\n挂耳咖啡将手冲咖啡的步骤被拆分成了两步:磨原料与冲泡,前一步交给生产商,撕开包装袋便是准备好的豆子,后一步交给消费者,简单用水冲泡两圈便可收获动手的仪式感,手冲的难度与愉悦感在挂耳咖啡上得到了平衡。\n\n挂耳咖啡的代表「隅田川咖啡」是目前线上平台最火热的咖啡品牌之一,截至 2020 年年底,隅田川在全球累计的销量为 3 亿杯。\n\n而在过去的 3 月,隅田川咖啡对外宣布已完成近 3 亿元 B 轮融资,这家由 IT 工程师留日期间创立的咖啡品牌正成为被资本追捧新对象。\n\n挂耳咖啡和袋泡咖啡本质上其实还是及冲及得的快捷咖啡,其之所以能在速溶咖啡的眼皮下抢走消费者,是因为它捕捉到了消费者对于咖啡需求的细微变化。\n\nData100 在《咖啡市场趋势洞悉》中对消费者的咖啡饮用动机进行了调查,其中提神需求占比最高(83%),而紧随其后的则是放松心情和压力(68%)。\n\n▲ 咖啡粉+糖+牛奶+热水=三合一咖啡\n\n喝咖啡已经不再是摄取咖啡因的代名词,愉悦的饮用体验正成为消费者新的咖啡需求,这种传统三合一速溶咖啡缺失的体验给挂耳咖啡留下了弯道超车的空间。", "segmentation_method": "reviewed_source_semantics", "label": "苦涩中的仪式感", "source_line_range": [ 51, 82 ] }, { "id": "body-region-4", "text": "越 来 越 专 业 的 咖 啡 消 费 者 咖 啡 从 出 现 到 流 行 再 到 普 及 至 今 经 历 了 三 次 浪 潮 第 一 次 咖 啡 浪 潮 是 以 雀 巢 公 司 为 主 体 的 速 溶 口 粮 化 雀 巢 公 司 利 用 喷 雾 干 燥 技 术 让 原 本 难 以 保 存 的 新 鲜 咖 啡 转 变 成 了 可 以 放 在 家 里 的 一 罐 罐 精 神 粮 食 第 二 次 咖 啡 浪 潮 中 主 体 变 成 了 以 星 巴 克 为 代 表 的 咖 啡 店 咖 啡 店 用 以 浓 缩 咖 啡 为 基 础 的 饮 料 将 咖 啡 推 向 了 更 广 泛 的 受 众 像 老 友 记 中 舒 适 的 咖 啡 馆 沙 发 悠 闲 的 气 氛 成 为 了 消 费 者 对 于 咖 啡 的 新 印 象 卡 布 奇 诺 拿 铁 成 了 咖 啡 的 代 名 词 而 在 第 三 次 咖 啡 浪 潮 中 咖 啡 的 品 质 起 源 故 事 得 到 了 更 多 消 费 者 的 关 注 精 品 咖 啡 馆 的 出 现 让 消 费 者 意 识 到 原 来 一 杯 黑 又 苦 的 咖 啡 也 能 小 巧 精 致 富 有 层 次 咖 啡 店 也 不 再 是 消 费 者 享 受 精 品 咖 啡 的 唯 一 窗 口 对 高 品 质 咖 啡 的 追 求 让 他 们 乐 于 学 习 咖 啡 知 识 亲 自 购 买 并 制 作 一 杯 咖 啡 咖 啡 豆 的 优 劣 则 成 了 品 质 的 直 观 体 现 在 精 品 咖 啡 店 潜 移 默 化 的 教 育 下 有 高 品 质 的 咖 啡 豆 才 有 好 咖 啡 成 了 咖 啡 爱 好 者 的 共 识 罗 布 斯 塔 咖 啡 豆 因 为 其 咖 啡 因 含 量 高 耐 虫 害 产 量 大 是 大 多 数 三 合 一 咖 啡 常 用 的 原 料 罗 布 斯 塔 的 味 道 较 苦 且 浓 烈 香 气 要 比 另 一 种 主 流 咖 啡 豆 阿 拉 比 卡 淡 阿 拉 比 卡 的 咖 啡 因 要 低 一 点 香 气 比 罗 布 斯 塔 浓 郁 由 于 不 耐 虫 害 产 量 比 罗 布 斯 塔 低 价 格 也 要 比 罗 布 斯 塔 高 于 是 乎 香 气 和 价 格 的 不 同 让 咖 啡 因 便 宜 量 大 的 罗 布 斯 塔 在 咖 啡 豆 鄙 视 链 里 排 在 了 阿 拉 比 卡 之 后 而 广 泛 采 用 罗 布 斯 塔 的 速 溶 咖 啡 也 在 采 用 阿 拉 比 卡 的 精 品 咖 啡 面 前 有 点 抬 不 起 头 消 费 者 们 对 于 咖 啡 的 需 求 已 经 不 只 于 咖 啡 因 咖 啡 的 香 气 甚 至 故 事 都 成 了 影 响 购 物 选 择 的 因 素 之 一 除 了 咖 啡 豆 以 外 工 艺 也 成 了 消 费 者 衡 量 品 质 的 标 准 传 统 的 速 溶 咖 啡 制 作 是 在 萃 取 后 将 咖 啡 浓 缩 液 用 喷 雾 干 燥 法 得 到 咖 啡 粉 在 这 个 过 程 中 咖 啡 中 的 芳 香 物 质 会 因 为 高 温 而 挥 发 因 此 得 到 的 咖 啡 粉 往 往 就 少 了 鲜 煮 咖 啡 的 香 气 为 了 能 留 住 咖 啡 的 香 味 咖 啡 厂 商 想 了 不 少 办 法 以 雀 巢 为 代 表 的 胶 囊 咖 啡 通 过 压 缩 气 体 将 浓 缩 咖 啡 的 香 气 带 出 图 片 来 自 每 日 财 经 新 闻 以 三 顿 半 为 代 表 的 冻 干 咖 啡 粉 则 是 用 冷 冻 干 燥 法 将 咖 啡 冻 结 再 将 固 态 水 升 华 得 到 疏 松 的 多 孔 解 构 磨 成 的 冻 干 咖 啡 粉 会 有 保 留 更 多 的 芳 香 物 质 同 时 溶 解 性 更 好 星 巴 克 开 发 的 via 咖 啡 称 其 用 了 极 细 研 磨 技 术 将 咖 啡 豆 磨 成 了 超 微 颗 粒 保 留 咖 啡 原 本 的 风 味 物 质 的 同 时 溶 解 性 还 很 强 可 以 溶 解 在 酒 类 茶 类 饮 料 中 形 成 混 搭 冷 萃 咖 啡 取 代 手 冲 成 为 新 的 咖 啡 喝 法 冷 萃 咖 啡 液 也 随 之 成 为 了 新 型 咖 啡 的 爆 款 冷 萃 咖 啡 液 是 通 过 长 时 间 的 冰 滴 冷 萃 得 到 保 留 咖 啡 的 香 气 和 风 味 的 咖 啡 浓 缩 液 在 饮 用 时 只 需 要 倒 入 水 或 者 其 他 饮 品 中 即 可 溶 得 一 杯 冷 萃 咖 啡 三 合 一 咖 啡 在 咖 啡 鄙 视 链 上 掉 队 是 受 到 精 品 咖 啡 冲 击 的 消 费 升 级 而 消 费 升 级 的 背 后 则 是 咖 啡 产 业 的 升 级 制 作 工 艺 的 升 级 和 消 费 观 念 的 升 级 处 于 鄙 视 链 的 末 端 也 意 味 着 更 廉 价 的 三 合 一 咖 啡 要 更 加 亲 民 有 着 更 大 的 市 场 受 众 和 需 求 这 种 需 求 在 很 长 一 段 时 间 里 都 不 会 被 精 品 咖 啡 所 取 代 而 真 正 要 担 心 精 品 咖 啡 冲 击 的 恐 怕 会 是 街 头 巷 角 的 小 咖 啡 店 们", "source_text": "越来越专业的咖啡消费者\n\n咖啡从出现到流行再到普及,至今经历了三次浪潮。\n\n第一次咖啡浪潮是以雀巢公司为主体的速溶口粮化,雀巢公司利用喷雾干燥技术让原本难以保存的新鲜咖啡转变成了可以放在家里的一罐罐「精神粮食」。\n\n第二次咖啡浪潮中主体变成了以星巴克为代表的咖啡店,咖啡店用以浓缩咖啡为基础的饮料将咖啡推向了更广泛的受众。\n\n像《老友记》中舒适的咖啡馆沙发、悠闲的气氛成为了消费者对于咖啡的新印象,卡布奇诺、拿铁成了咖啡的代名词。\n\n而在第三次咖啡浪潮中,咖啡的品质、起源、故事得到了更多消费者的关注,精品咖啡馆的出现让消费者意识到原来一杯黑又苦的咖啡也能小巧精致,富有层次。\n\n咖啡店也不再是消费者享受精品咖啡的唯一窗口,对高品质咖啡的追求让他们乐于学习咖啡知识,亲自购买并制作一杯咖啡。\n\n咖啡豆的优劣,则成了「品质」的直观体现。在精品咖啡店潜移默化的教育下,「有高品质的咖啡豆,才有好咖啡」成了咖啡爱好者的共识。\n\n罗布斯塔咖啡豆因为其咖啡因含量高、耐虫害、产量大,是大多数三合一咖啡常用的原料。罗布斯塔的味道较苦且浓烈,香气要比另一种主流咖啡豆阿拉比卡淡。\n\n阿拉比卡的咖啡因要低一点,香气比罗布斯塔浓郁,由于不耐虫害,产量比罗布斯塔低,价格也要比罗布斯塔高。\n\n于是乎,香气和价格的不同,让咖啡因便宜量大的罗布斯塔在咖啡豆鄙视链里,排在了阿拉比卡之后,而广泛采用罗布斯塔的速溶咖啡,也在采用阿拉比卡的精品咖啡面前有点抬不起头。\n\n消费者们对于咖啡的需求已经不只于咖啡因,咖啡的香气、甚至故事都成了影响购物选择的因素之一。\n\n除了咖啡豆以外,工艺也成了消费者衡量「品质」的标准。\n\n传统的速溶咖啡制作是在萃取后将咖啡浓缩液用喷雾干燥法得到咖啡粉,在这个过程中咖啡中的芳香物质会因为高温而挥发,因此得到的咖啡粉往往就少了鲜煮咖啡的香气。\n\n为了能留住咖啡的香味,咖啡厂商想了不少办法。以雀巢为代表的胶囊咖啡通过压缩气体将浓缩咖啡的香气带出。\n\n▲ 图片来自:每日财经新闻\n\n以三顿半为代表的冻干咖啡粉则是用冷冻干燥法将咖啡冻结,再将固态水升华,得到疏松的多孔解构,磨成的冻干咖啡粉会有保留更多的芳香物质,同时溶解性更好。\n\n星巴克开发的 VIA 咖啡称其用了极细研磨技术将咖啡豆磨成了超微颗粒,保留咖啡原本的风味物质的同时,溶解性还很强,可以溶解在酒类、茶类饮料中形成混搭。\n\n冷萃咖啡取代手冲成为新的咖啡喝法,冷萃咖啡液也随之成为了新型咖啡的爆款。\n\n冷萃咖啡液是通过长时间的冰滴冷萃,得到保留咖啡的香气和风味的咖啡浓缩液,在饮用时只需要倒入水或者其他饮品中即可溶得一杯冷萃咖啡。\n\n三合一咖啡在「咖啡鄙视链」上掉队,是受到精品咖啡冲击的消费升级,而消费升级的背后,则是咖啡产业的升级、制作工艺的升级和消费观念的升级。\n\n处于「鄙视链」的末端,也意味着更廉价的三合一咖啡要更加亲民,有着更大的市场受众和需求。这种需求在很长一段时间里都不会被精品咖啡所取代,而真正要担心精品咖啡冲击的,恐怕会是街头巷角的小咖啡店们。", "segmentation_method": "reviewed_source_semantics", "label": "越来越专业的咖啡消费者", "source_line_range": [ 83, 125 ] } ], "ending": { "text": "」的末端,也意味着更廉价的三合一咖啡要更加亲民,有着更大的市场受众和需求。这种需求在很长一段时间里都不会被精品咖啡所取代,而真正要担心精品咖啡冲击的,恐怕会是街头巷角的小咖啡店们。" } } }, { "id": "article-053", "name": "我们采访了十几个人,发现基本没人想「报复性消费」", "url": "https://www.ifanr.com/1312711", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "我们采访了十几个人,发现基本没人想「报复性消费」" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "商业" ] }, { "id": "stable-3", "alternatives": [ "2020-03-01 20:35" ] }, { "id": "stable-4", "alternatives": [ "冷思真" ] }, { "id": "stable-5", "alternatives": [ "编辑" ] }, { "id": "stable-6", "alternatives": [ "不太有趣,不太乐观。" ] }, { "id": "stable-7", "alternatives": [ "商务合作" ] }, { "id": "stable-8", "alternatives": [ "内容投稿" ] }, { "id": "stable-9", "alternatives": [ "下载客户端" ] }, { "id": "stable-10", "alternatives": [ "简" ] }, { "id": "stable-11", "alternatives": [ "繁" ] }, { "id": "stable-12", "alternatives": [ "登录" ] }, { "id": "stable-13", "alternatives": [ "注册" ] }, { "id": "stable-14", "alternatives": [ "媒体品牌" ] }, { "id": "stable-15", "alternatives": [ "知晓云" ] }, { "id": "stable-16", "alternatives": [ "制糖工厂" ] }, { "id": "stable-17", "alternatives": [ "发邮件" ] }, { "id": "stable-18", "alternatives": [ "累计已发布" ] }, { "id": "stable-19", "alternatives": [ "篇文章" ] }, { "id": "stable-20", "alternatives": [ "最近文章:" ] }, { "id": "stable-21", "alternatives": [ "报复性消费" ] }, { "id": "stable-22", "alternatives": [ "消费" ] }, { "id": "stable-23", "alternatives": [ "分享" ] }, { "id": "stable-24", "alternatives": [ "全部评论" ] }, { "id": "stable-25", "alternatives": [ "最热" ] }, { "id": "stable-26", "alternatives": [ "最新" ] }, { "id": "stable-27", "alternatives": [ "登录,参与讨论前请先登录" ] }, { "id": "stable-28", "alternatives": [ "收到回复邮件通知我" ] }, { "id": "stable-29", "alternatives": [ "发表评论" ] }, { "id": "stable-30", "alternatives": [ "爱范儿,关注明日产品的数字潮牌" ] }, { "id": "stable-31", "alternatives": [ "爱范儿" ] }, { "id": "stable-32", "alternatives": [ "AppSo" ] }, { "id": "stable-33", "alternatives": [ "董车会" ] }, { "id": "stable-34", "alternatives": [ "关于爱范儿" ] }, { "id": "stable-35", "alternatives": [ "关于我们" ] }, { "id": "stable-36", "alternatives": [ "社区规则" ] }, { "id": "stable-37", "alternatives": [ "隐私策略" ] }, { "id": "stable-38", "alternatives": [ "加入我们" ] }, { "id": "stable-39", "alternatives": [ "商务合作" ] }, { "id": "stable-40", "alternatives": [ "合作伙伴" ] }, { "id": "stable-41", "alternatives": [ "粤ICP备2025424624号-2" ] }, { "id": "stable-42", "alternatives": [ "广州利沃致远投资管理合伙企业(有限合伙)" ] }, { "id": "stable-43", "alternatives": [ "以商业目的使用爱范儿网站内容需获许可。非商业目的使用授权遵循" ] }, { "id": "stable-44", "alternatives": [ "CC BY-NC 4.0" ] }, { "id": "stable-45", "alternatives": [ "All content is made available under the CC BY-NC 4.0 for non-commercial use. Commercial use of this content is prohibited without explicit permission." ] }, { "id": "body-46", "alternatives": [ "▲ 图片来自界面", "▲ 图片来自 界面" ] }, { "id": "body-47", "alternatives": [ "▲ 图片来自网易", "▲ 图片来自 网易" ] }, { "id": "body-48", "alternatives": [ "▲ 图片来自 Ourboyandgirl" ] }, { "id": "body-49", "alternatives": [ "▲ 图片来自:The Daily Star", "▲ 图片来自: The Daily Star" ] }, { "id": "body-50", "alternatives": [ "▲ 图片来自 Lectureowl" ] }, { "id": "body-51", "alternatives": [ "▲ 图片来自亲子天下", "▲ 图片来自 亲子天下" ] }, { "id": "body-52", "alternatives": [ "▲ 图片来自:US News", "▲ 图片来自: US News" ] }, { "id": "body-53", "alternatives": [ "▲ 图片来自:《蒂凡尼的早餐》" ] }, { "id": "body-54", "alternatives": [ "界面" ] }, { "id": "body-55", "alternatives": [ "由文学学者单正平所创造" ] }, { "id": "body-56", "alternatives": [ "网易" ] }, { "id": "body-57", "alternatives": [ "Ourboyandgirl" ] }, { "id": "body-58", "alternatives": [ "The Daily Star" ] }, { "id": "body-59", "alternatives": [ "Lectureowl" ] }, { "id": "body-60", "alternatives": [ "亲子天下" ] }, { "id": "body-61", "alternatives": [ "US News" ] }, { "id": "body-62", "alternatives": [ "游戏自媒体" ] }, { "id": "body-63", "alternatives": [ "老王创业中" ] }, { "id": "body-64", "alternatives": [ "被迫网课梁老师" ] }, { "id": "body-65", "alternatives": [ "想去武汉看看的孝感人民" ] }, { "id": "body-66", "alternatives": [ "回家不成功梦女士" ] }, { "id": "body-67", "alternatives": [ "哄女儿睡觉哄到俩人大哭的芊女士" ] }, { "id": "body-68", "alternatives": [ "和女儿第一次度过春节的 Lily" ] }, { "id": "body-69", "alternatives": [ "已婚少女" ] }, { "id": "body-70", "alternatives": [ "留守澳洲" ] }, { "id": "body-71", "alternatives": [ "看到阳光就想晒的丹老师" ] }, { "id": "body-72", "alternatives": [ "想喝奶茶喝奶茶,想晒太阳晒太阳,上班不用担心感染,恢复正常生活就很好。" ] }, { "id": "body-73", "alternatives": [ "疫情会过去,生活在继续" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Human approved direct replacement URL in cohort revision2. Complete initial authored body independently reviewed against fullpage screenshot, DOM, accessibility and computed visibility evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "我们采访了十几个人,发现基本没人想「报复性消费」" ], "html_selector": "h1.c-single-normal__title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#article-comments li[id^=\"comment-\"]", "author_selector": ".c-article-comments-item__name", "body_selector": ".c-article-comments-item__content", "id_attribute": "id", "section_markers": [ "全部评论", "评论" ], "version": 2, "minimum_comments": 4, "text_scope": { "body_end": "的诸多分享、吐槽来看,大部分的人都长久的隔离中寻求生活的幸福感。大家的情绪没有那么糟糕,想要的东西也没那么夸张。\n\n当隔离在家需求都能满足,并没那么痛苦时,大部分人其实都没那么想要报复性消费。相比走出家门疯狂消费,大家其实更希望生活秩序恢复正常。\n\n想喝奶茶喝奶茶,想晒太阳晒太阳,上班不用担心感染,恢复正常生活就很好。", "end_markers": [ "推荐文章", "本篇来自栏目" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-053/comment-qualification-reference-r5.json", "sha256": "4b26ac58d3f9d2574b5635cef3ffd779204aec52b15e5c2fdc89e1190c5bd195", "chars": 1648, "record_count": 4 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 4, "qualification_only": true } }, "ground_truth_main_content": "这个漫长的冬天,似乎终于开始可以看到尽头。\n\n随着疫情逐渐好转,不少企业陆续恢复了工作,钟南山也表示有信心可在 4 月底基本控制好疫情。\n\n也正因如此,部分在家里憋了一个月的群众听到餐厅复业,一下子涌到门店排队,想重获下馆子的快乐。没料到这意料之外的热情,为餐厅带来潜在安全问题,不得不在开门后又临时关门调整。\n\n▲ 图片来自界面\n\n有人称这些是「报复性消费」,而且认为除了餐饮界,旅游、电影等这段时间没法做的事情都将迎来「报复」情绪带来消费增长。\n\n但真的是这样吗?\n\n「报复性消费」这一说法,其实是由文学学者单正平所创造。在《报复性消费》一文中,单正平并未对词语进行定义,只提供了一些现象给大家感受感受。\n\n他认为,中国八十年代初的「狂吃海喝」现象是一种报复性消费:因为中国人刚从长期饥饿中解放出来,「不摆满一桌子,不浪费个够,就不解馋,不解气,不够朋友」,指代一种非理性的消费心理。\n\n▲ 图片来自网易\n\n但回望普通消费者的情况,现在并没有出现如此极端的情况,大家更多是乐于拥抱失而复得的平凡快乐。\n\n事实上,消费者内心涌动的消费欲,更像是「补偿性消费」心理。\n\n研究认为,补偿性消费背后有三种心理动机:能力需求、自主需求和归属需求。这三个方面中任一方面出现缺失,都能带来威胁感,激发消费者通过消费来自我补偿。\n\n在自主需求中又包括自由感的缺失,即人对周围的环境没有控制感,不能随心所欲做自己喜欢的事情。研究发现,局限的空间使人感觉失去自由,进而激发补偿性消费需求。这更接近我们所经历的情况。\n\n理论虽然这样说,但经过这一次之后,大家真的都需要补偿性消费吗?\n\n就此,我们采访了十多位来自不同群体的人,尝试了解大家的想法。有趣的是,大部分人并没有那股「疫情结束后我得疯狂买买买」的热情,还是会遵循原有生活计划来进行。\n\n更有趣的是,我们在和大家聊天的时候,发现大家在宅在家的这段时间里,反倒开始重新审视自己和家庭,甚至是自己和自己的关系。\n\n▲ 图片来自 Ourboyandgirl\n\n以下是我们精选的十个人的故事。\n\n创业者\n\n游戏自媒体\n\n钟钟是游戏自媒体「游戏新知」的创业者,和大多数创业者的焦虑不同,她真的很佛系。疫情结束后,她唯一想逛的就是优衣库,因为那是她平常唯一会去的实体店。尽管想吃的东西有一堆,但对旅游什么都没欲望的她反而觉得在家隔离很舒服。\n\n感触最深的是,我居然不是一个上进的人,觉得整天吃吃喝喝睡也挺惬意的。甚至觉得以前是不是过的太过于辛苦了,没有时间好好生活。\n\n而对于她创业的产物「游戏新知」,疫情给这个号带来的最大影响就是老板胖了五斤。不过她所在的游戏行业在疫情期间其实是有短期获利的,好几家游戏公司老板收入涨了三四倍,有个老板本来公司快倒闭了,没钱了,结果疫情期间起死回生了。不过正是因为游戏行业利好,她在创作上反而觉得束手束脚,怕写行业好有种发「国难财」的感觉,写不好的话又觉得 2020 年的游戏行业很需要提振信心,需要一些正面的信息。\n\n除此之外,疫情对钟钟所在游戏媒体营收和用户都没什么影响。\n\n老王创业中\n\n而对于 46 岁的老王而言,疫情带来的最大冲击还是「世事无常」四个字。从来没有想过的事情突然发生了,对他和他家人的冲击都很大,他母亲 80 多岁,也从来没有遇到这样的事。\n\n虽然一直在隔离,老王也没有憋久了想要花钱的消费欲望。在他看来,吃的、喝的、玩的对他来说更多是一种生活,他不会说刻意地去做一些调整。但还是会更注意,因为疫情代表它后续的影响,可能会对经济产生影响,他会更多地留出一些现金,会更注重支出,更有选择性,不会去随意花费了,未来可能会在健康、家庭上投入更多。但对于一些具体的消费,他是没有那么在意的,他认为大多数人可能都没那么在意。\n\n我觉得疫情对消费不会有太大影响。我说更节约的生活,其实也只是一个短期的状态,对我来说生活还是一样过。在疫情的时候我会更注重安全,但它是一个特别事件。过了安全期之后,其实人会放松下来,还是会恢复到以前的。只是你会更注重相对大额的这种投资。比如说可能很多人会愿意去因为这个事情去买保险,\n\n▲ 图片来自:The Daily Star\n\n被迫网课梁老师\n\n梁老师在去年年底刚买了车,本想今年开年就好好努力,填补花掉的这笔大额消费,没想到就遇上了疫情。\n\n几年前,梁老师开始创业自己做钢琴培训。虽然规模不大,但良好的教学口碑让生意「供不应求」,想上课的学生总多于她们能教的人。\n\n这次疫情对梁老师打击很大。\n\n一是因为疫情,课基本都没法上,收入直接中断,但员工工资和房租的压力都在。这两周,梁老师开始尝试网课,给学生线上教学,但也只有 30% 左右学生能接受:\n\n因为有些学生年纪太小或是集体课,网课的效果会很不好;还有一些学生家里没钢琴,也没法用网课。\n\n▲ 图片来自 Lectureowl\n\n现在,没法给学生网课的员工,每天还是得「维护客情」,想出一些在线互动小游戏,保持在朋友圈曝光,「尽量不要让家长忘了我们啊」。\n\n其二,梁老师也很担忧疫情过后会有更长远的影响。在刚开始在家宅的几天里,梁老师曾一度陷入非常绝望的状态,甚至还在考虑是否该移民。但随着疫情逐渐好转,她的心情也开始恢复明朗,开始了网课工作。\n\n疫情过后,梁老师还是计划存钱为主,原本准备今年给工作室装修的计划,看情况也可能会取消。不过说起吃,被迫自己做饭的梁老师还是很期待之后能正常下馆子:\n\n云吞面啊,街边小档口啊,反正就是现在没法吃的这些。\n\n疫区人民\n\n想去武汉看看的孝感人民\n\nOwen 是个孝感人,他 22 号坐上空了一半的飞机回家的时候,可能没想到自己 3 月还回不来。\n\n在湖北孝感封城后,他总共闭关了大概 35 天,平均每天微信步数不超过 1000 步。\n\n隔离期间,他感触最深的就是几乎零消费,存钱好容易,花钱好难。想花但却花不出来让他冲动地在游戏里「氪金」,但除此之外的消费就只有话费和微信红包了。他也尝试了在网上买买买,但 2 月 9 日下单的商品,先是显示 19 号送到,然后是 25 号,再是 28 号,现在是 3 月 9 号……送不到疫区的网购没有意义。\n\n但是某种程度上会影响我的消费观,就是很多消费并非必要,以前的想法是「没必要存这么多,该花就花,开心就好」,现在可能会理性一些,在特殊环境下看到了减少了非必要之处之后的存钱能力,差不多是一线城市的工资,四线城市的消费,所以疫情结束回到一线城市之后,大概还是会减少冲动消费。\n\n如果真能改变消费习惯,他想在回到一线城市后买个房,不求房价下跌,只求平稳。\n\n不过最特别的是 Owen 想去武汉看看,这是疫情带来的全新旅行计划。他虽然在武汉附近长大,但没怎么在这个城市驻留过。如果要说多消费的话,他反而会把消费的机会留在武汉。\n\n刚开始吧,这事出现在武汉,我其实对武汉各方面的反应挺失望的。但是疫情的发展之后,这个城市的人民牺牲非常大,包括我家的一些亲友都感染了,我甚至也可以说是和肺炎擦肩而过。即便如此,武汉的城市基本秩序和人伦还是得到了保持,所以我现在很认同钟南山说的,武汉是英雄的城市。基于此,我就想认真的感受下这个城市。\n\n回家不成功梦女士\n\n梦女士家乡在湖北天门,一个离武汉只有大概两小时车程的小城市。今年 1 月 23 日,眼看疫情开始恶化,梦女士还是决定不回家,留在广州过年了。原本,她弟弟准备在今年过年的时候办婚宴,但最后也因疫情延后了。\n\n上周,梦女士工作的游戏公司开始复工,虽然暂无减薪或停薪的通知,但公司却突然开始拖欠工资:\n\n我司一月的薪水至今未发,也不让员工过问。\n\n这次疫情让我认识到自己的公司并不靠谱,并不会保证员工利益,或者说并不尊重员工,会一再伤害员工权益。\n\n梦女士家人在天门也是做小生意,由于疫情,家里的生意也完全中断了。但她认为,这「也好,重点还是先把疫情控制住」。\n\n也不难理解,梦女士在经历这次疫情后存钱的欲望更强烈了,「要为之后做个防备」。这个不平静的春节,也让梦女士感到世事的无常:\n\n疫情造成了很多家庭的不幸,湖北各地封城举国支援湖北,还有科比的骤然离世,澳大利亚山火和东非蝗灾,感觉今年的开端真的\n\n是多灾多难,需要珍惜现在的生活,让自己开心点。\n\n疫情过去后,梦女士还想去以前每月都去的佛山,吃上好吃的糖水和美食。\n\n年轻母亲\n\n▲ 图片来自亲子天下\n\n哄女儿睡觉哄到俩人大哭的芊女士\n\n芊女士在某国企属下的广告公司做策划,这次疫情让所有原本已计划好的线下活动都取消了,而本该在 2 月 10 日举行的一场投标也因此遥遥无期地延后。现在,她已经从太原回到广州,但还没复工。\n\n公司是暂时不会倒闭的,但我对工作没有什么征服欲,就是完成了,别挨骂,不拖别人后腿就行了。\n\n虽然也是在家里「宅」了一个月,但芊女士对疫情结束后的消费并没有什么希冀,而原本就在进行的存钱计划也不受干扰:\n\n想吃的都学会做了,该买的也上网买了。\n\n免洗洗手液都可以用到我女儿幼儿园毕业了。\n\n对了,她还有一个三岁的女儿。\n\n这次「全天候式」的宅家体验,让芊女士非常紧密地和父母丈夫以及孩子长时间相处,效果堪称「教你做人」:\n\n在家这个一月里,感触最深有两点:一是得好好调整自己的情绪,二是发现了做家务的快感。\n\n因为要花更多时间和父母、爱人和孩子相处,在经历了把妈妈惹生气、哄睡孩子哄到两个人都崩溃大哭之后,明白了要老实做人,好好做一个妈妈。\n\n而做家务就是每天重复做同一件事,以前觉得无聊费时的家务也突然轻松了,总比上班好得多。\n\n这个月跟着付费网课学编曲的丈夫成了她近期的快乐源泉:\n\n他的曲子就跟八十年代午休歌曲一样,昨天作的一首歌能把我笑死,这钱花得值!\n\n和女儿第一次度过春节的 Lily\n\n在国有银行工作的 Lily 今年度过了第一个和女儿一起过的春节,日常时间表主要是照顾女儿和上网课组成。\n\n虽然自己和丈夫的公司以及收入都没有受到疫情影响,并且也已经在家宅了 35 天,Lily 也没有积压太多消费欲望。在疫情过去后,她就只想去吃一下家里没法做的海鲜,以及去理发店剪个头发。\n\n当被问及这次经历带来的最大感触,Lily 告诉我:\n\n生命第一,其它都是浮云。\n\n其它\n\n已婚少女\n\n和那些「无数夫妻想在疫情结束后」离婚不一样,结婚还没一年的咯咯在疫情中觉得有老公真好,「有人干家务有人陪着聊天在家办公」。\n\n她也不想买房买车,没什么大额消费的计划。目前最大的愿望适合朋友出去吃芝士炸鸡和一点点。对其他东西没什么特别的欲望,因为现在的电商购物就能满足她的需求了。\n\n快递恢复后我已经天天刷淘宝买东西了。\n\n淘宝 26 家店,拼多多 7 家店,京东 4 家店, 每家可能平均 1.3 件商品。\n\n留守澳洲\n\n星崽在澳洲念书,澳洲情况并没有那么严重,本来疫情和她没什么密切的关系。直到她所住的楼层发现了一例确诊,她也需要隔离两周才能出门,出门也就是下楼拿外卖而已。不过她觉得隔离生活完全没什么焦虑感,很舒适,还能不出门见人,她觉得很适合自己。\n\n但疫情对她还是有影响的,出门买东西的时候有人看见她会问「是从中国哪里来的?是武汉吗?」她听说悉尼街头有一个华裔老人心脏病发,但在特殊的时期,没人敢上去做 CPR,老人因此去世。\n\n她原本的出游计划就是从悉尼回国:「这次疫情就是我现在还在悉尼并且一直在悉尼的原因,毕竟回去了不知道什么时候才能回来,现在也不知道什么时候才能回去。」不过比起她早早回国的同学,她已经算幸运了,毕竟这些因封关而无法返回学校的人只能想办法申请延期入学。\n\n隔离两周,她基本只会在线上订外卖,不买化妆品也不喜欢网购服装的她不忘吐槽澳洲效率。\n\n在悉尼这种地方,网购的来了,人都等死了哇。\n\n隔离完就可以出门了惹,还有啥要买的。\n\n▲ 图片来自:US News\n\n看到阳光就想晒的丹老师\n\n在汕尾家里宅了 20 多天的丹老师下周就得开始网课了。她所工作的学校以及自己的收入都没有受到疫情影响,但也表示在疫情过后不会出现补偿性的过度消费。\n\n在放假期间,丹老师想买的东西网购基本都满足了。有天,她在朋友圈看到好几个人晒螺蛳粉,这让在家吃饭口味清淡的她一下就馋了起来,并立刻向朋友要了链接。此外,只带了一套睡衣回家的她,也通过电商及时地买了好些家居服。\n\n当被问及疫情过去后想去消费些什么,丹老师和很多人一样都很想去剪头发。除此以外,她还希望等安全后,能找个自然风光好的户外逛逛,估计还是呆得室内太久的「后遗症」:\n\n现在看到空地就想去走走,看到太阳就想去晒。\n\n疫情会过去,生活在继续\n\n我们想用自己或他人的前车之鉴做一个对比,让我们知道未来面对的是什么?。\n\n但这些年的霍乱、H1N1、H7N9、埃博拉等流行病要么是发病区域和中国境况相差太大,要么就是病毒传染性、破坏性和冠状病毒有不小的差距。即便是经常被拿出来做对比「前瞻」的非典,从影响人数、比重上和今天所面对的情况也有很大不同。\n\n比如非典疫情最为严重的时候,休闲服务、建筑装饰、传媒等产业受到的冲击最大,但从这次 A 股的涨跌幅来看,传媒、电子、计算机反而颇被看好。清华大学国家金融研究院院长朱民也表示二者相差颇大:「非典影响总人口占比才 18%,这次是 63%。」\n\n但这仍是对我们最有价值的一段数据。\n\n当我们对照 2003 年快销品购买金额同期增速时,我们就会发现非典时期四五月的消费数据出现了小下滑,六月基本恢复正常,8 月则出现了小幅度的反弹。\n\n但这能叫报复性消费吗?\n\n「报复」有报仇的意思,非典时期的消费数据已经告诉了我们,被隔离在家的民众其实也没有突然释放出极强的消费能力,快销品仅小幅反弹就证明了这一点。而今天,在家隔离的人难道会在基础物资供应都更为及时的情况下,更想「报复性消费」吗?\n\n▲ 图片来自:《蒂凡尼的早餐》\n\n种种数据表明,这次疫情相较非典卷入的人更多,传染性也更强,但我们看到的却是人们情绪相较非典时期更稳定。除了特定的疫区外,互联网的线下触角其实伸向了各个角落,定时抢购的口罩,迅速恢复的物流,电商商城里甚至及时上线了因疫情而受灾的蔬果,这都为人们的生活提供了保障。\n\n大家的情绪其实一直在释放中,不管是公共社群中多样的话题,还是流媒体丰富的选择,不管是鳞次栉比的商品,还是线上办公软件的到位。当需求都能满足的时候,隔离在家的人其实没那么「难搞」。想买东西可以去挑顺丰发货,想吃美食也能自己下厨房,重新恢复的物流秩序更能做到让大部分人足不出户完成消费。\n\n疫情中隔离的人们也没有随着隔离时间的推移而日益崩溃。在各种需求几乎都能满足的社会中,他们的情绪其实一直在释放,他们一直都在消费的过程中。正因如此,恐慌、烦躁感相比十七年的非典都要小的多。\n\n至少从我们的采访来看,众多隔离在家的民众其实没什么太大变化,最多想出门和朋友吃火锅,吃炸鸡,喝奶茶,想出门晒一晒太阳,压一压马路,把这种行为称为「报复性消费」多少有些夸张。最多就是憋久了,想出门吃点好的补偿一下在家长久的隔离时光。\n\n从朋友圈的厨艺大赛和对远程办公的诸多分享、吐槽来看,大部分的人都长久的隔离中寻求生活的幸福感。大家的情绪没有那么糟糕,想要的东西也没那么夸张。\n\n当隔离在家需求都能满足,并没那么痛苦时,大部分人其实都没那么想要报复性消费。相比走出家门疯狂消费,大家其实更希望生活秩序恢复正常。\n\n想喝奶茶喝奶茶,想晒太阳晒太阳,上班不用担心感染,恢复正常生活就很好。\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "这 个 漫 长 的 冬 天 似 乎 终 于 开 始 可 以 看 到 尽 头 随 着 疫 情 逐 渐 好 转 不 少 企 业 陆 续 恢 复 了 工 作 钟 南 山 也 表 示 有 信 心 可 在 4 月 底 基 本 控 制 好 疫 情 也 正 因 如 此 部 分 在 家 里 憋 了 一 个 月 的 群 众 听 到 餐 厅 复 业 一 下 子 涌 到 门 店 排 队 想 重 获 下 馆 子 的 快 乐 没 料 到 这 意 料 之 外 的 热 情 为 餐 厅 带 来 潜 在 安 全 问 题 不 得 不 在 开 门 后 又 临 时 关 门 调 整 图 片 来 自 界 面 有 人 称 这 些 是 报 复 性 消 费 而 且 认 为 除 了 餐 饮 界 旅 游 电 影 等 这 段 时 间 没 法 做 的 事 情 都 将 迎 来 报 复 情 绪 带 来 消 费 增 长 但 真 的 是 这 样 吗 报 复 性 消 费 这 一 说 法 其 实 是 由 文 学 学 者 单 正 平 所 创 造 在 报 复 性 消 费 一 文 中 单 正 平 并 未 对 词 语 进 行 定 义 只 提 供 了 一 些 现 象 给 大 家 感 受 感 受 他 认 为 中 国 八 十 年 代 初 的 狂 吃 海 喝 现 象 是 一 种 报 复 性 消 费 因 为 中 国 人 刚 从 长 期 饥 饿 中 解 放 出 来 不 摆 满 一 桌 子 不 浪 费 个 够 就 不 解 馋 不 解 气 不 够 朋 友 指 代 一 种 非 理 性 的 消 费 心 理 图 片 来 自 网 易 但 回 望 普 通 消 费 者 的 情 况 现 在 并 没 有 出 现 如 此 极 端 的 情 况 大 家 更 多 是 乐 于 拥 抱 失 而 复 得 的 平 凡 快 乐 事 实 上 消 费 者 内 心 涌 动 的 消 费 欲 更 像 是 补 偿 性 消 费 心 理 研 究 认 为 补 偿 性 消 费 背 后 有 三 种 心 理 动 机 能 力 需 求 自 主 需 求 和 归 属 需 求 这 三 个 方 面 中 任 一 方 面 出 现 缺 失 都 能 带 来 威 胁 感 激 发 消 费 者 通 过 消 费 来 自 我 补 偿 在 自 主 需 求 中 又 包 括 自 由 感 的 缺 失 即 人 对 周 围 的 环 境 没 有 控 制 感 不 能 随 心 所 欲 做 自 己 喜 欢 的 事 情 研 究 发 现 局 限 的 空 间 使 人 感 觉 失 去 自 由 进 而 激 发 补 偿 性 消 费 需 求 这 更 接 近 我 们 所 经 历 的 情 况 理 论 虽 然 这 样 说 但 经 过 这 一 次 之 后 大 家 真 的 都 需 要 补 偿 性 消 费 吗 就 此 我 们 采 访 了 十 多 位 来 自 不 同 群 体 的 人 尝 试 了 解 大 家 的 想 法 有 趣 的 是 大 部 分 人 并 没 有 那 股 疫 情 结 束 后 我 得 疯 狂 买 买 买 的 热 情 还 是 会 遵 循 原 有 生 活 计 划 来 进 行 更 有 趣 的 是 我 们 在 和 大 家 聊 天 的 时 候 发 现 大 家 在 宅 在 家 的 这 段 时 间 里 反 倒 开 始 重 新 审 视 自 己 和 家 庭 甚 至 是 自 己 和 自 己 的 关 系 图 片 来 自 ourboyandgirl 以 下 是 我 们 精 选 的 十 个 人 的 故 事", "source_text": "这个漫长的冬天,似乎终于开始可以看到尽头。\n\n随着疫情逐渐好转,不少企业陆续恢复了工作,钟南山也表示有信心可在 4 月底基本控制好疫情。\n\n也正因如此,部分在家里憋了一个月的群众听到餐厅复业,一下子涌到门店排队,想重获下馆子的快乐。没料到这意料之外的热情,为餐厅带来潜在安全问题,不得不在开门后又临时关门调整。\n\n▲ 图片来自界面\n\n有人称这些是「报复性消费」,而且认为除了餐饮界,旅游、电影等这段时间没法做的事情都将迎来「报复」情绪带来消费增长。\n\n但真的是这样吗?\n\n「报复性消费」这一说法,其实是由文学学者单正平所创造。在《报复性消费》一文中,单正平并未对词语进行定义,只提供了一些现象给大家感受感受。\n\n他认为,中国八十年代初的「狂吃海喝」现象是一种报复性消费:因为中国人刚从长期饥饿中解放出来,「不摆满一桌子,不浪费个够,就不解馋,不解气,不够朋友」,指代一种非理性的消费心理。\n\n▲ 图片来自网易\n\n但回望普通消费者的情况,现在并没有出现如此极端的情况,大家更多是乐于拥抱失而复得的平凡快乐。\n\n事实上,消费者内心涌动的消费欲,更像是「补偿性消费」心理。\n\n研究认为,补偿性消费背后有三种心理动机:能力需求、自主需求和归属需求。这三个方面中任一方面出现缺失,都能带来威胁感,激发消费者通过消费来自我补偿。\n\n在自主需求中又包括自由感的缺失,即人对周围的环境没有控制感,不能随心所欲做自己喜欢的事情。研究发现,局限的空间使人感觉失去自由,进而激发补偿性消费需求。这更接近我们所经历的情况。\n\n理论虽然这样说,但经过这一次之后,大家真的都需要补偿性消费吗?\n\n就此,我们采访了十多位来自不同群体的人,尝试了解大家的想法。有趣的是,大部分人并没有那股「疫情结束后我得疯狂买买买」的热情,还是会遵循原有生活计划来进行。\n\n更有趣的是,我们在和大家聊天的时候,发现大家在宅在家的这段时间里,反倒开始重新审视自己和家庭,甚至是自己和自己的关系。\n\n▲ 图片来自 Ourboyandgirl\n\n以下是我们精选的十个人的故事。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:这个漫长的冬天,似乎终于开始可以看到尽头。", "source_line_range": [ 1, 36 ] }, { "id": "body-region-2", "text": "创 业 者 游 戏 自 媒 体 钟 钟 是 游 戏 自 媒 体 游 戏 新 知 的 创 业 者 和 大 多 数 创 业 者 的 焦 虑 不 同 她 真 的 很 佛 系 疫 情 结 束 后 她 唯 一 想 逛 的 就 是 优 衣 库 因 为 那 是 她 平 常 唯 一 会 去 的 实 体 店 尽 管 想 吃 的 东 西 有 一 堆 但 对 旅 游 什 么 都 没 欲 望 的 她 反 而 觉 得 在 家 隔 离 很 舒 服 感 触 最 深 的 是 我 居 然 不 是 一 个 上 进 的 人 觉 得 整 天 吃 吃 喝 喝 睡 也 挺 惬 意 的 甚 至 觉 得 以 前 是 不 是 过 的 太 过 于 辛 苦 了 没 有 时 间 好 好 生 活 而 对 于 她 创 业 的 产 物 游 戏 新 知 疫 情 给 这 个 号 带 来 的 最 大 影 响 就 是 老 板 胖 了 五 斤 不 过 她 所 在 的 游 戏 行 业 在 疫 情 期 间 其 实 是 有 短 期 获 利 的 好 几 家 游 戏 公 司 老 板 收 入 涨 了 三 四 倍 有 个 老 板 本 来 公 司 快 倒 闭 了 没 钱 了 结 果 疫 情 期 间 起 死 回 生 了 不 过 正 是 因 为 游 戏 行 业 利 好 她 在 创 作 上 反 而 觉 得 束 手 束 脚 怕 写 行 业 好 有 种 发 国 难 财 的 感 觉 写 不 好 的 话 又 觉 得 2020 年 的 游 戏 行 业 很 需 要 提 振 信 心 需 要 一 些 正 面 的 信 息 除 此 之 外 疫 情 对 钟 钟 所 在 游 戏 媒 体 营 收 和 用 户 都 没 什 么 影 响 老 王 创 业 中 而 对 于 46 岁 的 老 王 而 言 疫 情 带 来 的 最 大 冲 击 还 是 世 事 无 常 四 个 字 从 来 没 有 想 过 的 事 情 突 然 发 生 了 对 他 和 他 家 人 的 冲 击 都 很 大 他 母 亲 80 多 岁 也 从 来 没 有 遇 到 这 样 的 事 虽 然 一 直 在 隔 离 老 王 也 没 有 憋 久 了 想 要 花 钱 的 消 费 欲 望 在 他 看 来 吃 的 喝 的 玩 的 对 他 来 说 更 多 是 一 种 生 活 他 不 会 说 刻 意 地 去 做 一 些 调 整 但 还 是 会 更 注 意 因 为 疫 情 代 表 它 后 续 的 影 响 可 能 会 对 经 济 产 生 影 响 他 会 更 多 地 留 出 一 些 现 金 会 更 注 重 支 出 更 有 选 择 性 不 会 去 随 意 花 费 了 未 来 可 能 会 在 健 康 家 庭 上 投 入 更 多 但 对 于 一 些 具 体 的 消 费 他 是 没 有 那 么 在 意 的 他 认 为 大 多 数 人 可 能 都 没 那 么 在 意 我 觉 得 疫 情 对 消 费 不 会 有 太 大 影 响 我 说 更 节 约 的 生 活 其 实 也 只 是 一 个 短 期 的 状 态 对 我 来 说 生 活 还 是 一 样 过 在 疫 情 的 时 候 我 会 更 注 重 安 全 但 它 是 一 个 特 别 事 件 过 了 安 全 期 之 后 其 实 人 会 放 松 下 来 还 是 会 恢 复 到 以 前 的 只 是 你 会 更 注 重 相 对 大 额 的 这 种 投 资 比 如 说 可 能 很 多 人 会 愿 意 去 因 为 这 个 事 情 去 买 保 险 图 片 来 自 the daily star 被 迫 网 课 梁 老 师 梁 老 师 在 去 年 年 底 刚 买 了 车 本 想 今 年 开 年 就 好 好 努 力 填 补 花 掉 的 这 笔 大 额 消 费 没 想 到 就 遇 上 了 疫 情 几 年 前 梁 老 师 开 始 创 业 自 己 做 钢 琴 培 训 虽 然 规 模 不 大 但 良 好 的 教 学 口 碑 让 生 意 供 不 应 求 想 上 课 的 学 生 总 多 于 她 们 能 教 的 人 这 次 疫 情 对 梁 老 师 打 击 很 大 一 是 因 为 疫 情 课 基 本 都 没 法 上 收 入 直 接 中 断 但 员 工 工 资 和 房 租 的 压 力 都 在 这 两 周 梁 老 师 开 始 尝 试 网 课 给 学 生 线 上 教 学 但 也 只 有 30 左 右 学 生 能 接 受 因 为 有 些 学 生 年 纪 太 小 或 是 集 体 课 网 课 的 效 果 会 很 不 好 还 有 一 些 学 生 家 里 没 钢 琴 也 没 法 用 网 课 图 片 来 自 lectureowl 现 在 没 法 给 学 生 网 课 的 员 工 每 天 还 是 得 维 护 客 情 想 出 一 些 在 线 互 动 小 游 戏 保 持 在 朋 友 圈 曝 光 尽 量 不 要 让 家 长 忘 了 我 们 啊 其 二 梁 老 师 也 很 担 忧 疫 情 过 后 会 有 更 长 远 的 影 响 在 刚 开 始 在 家 宅 的 几 天 里 梁 老 师 曾 一 度 陷 入 非 常 绝 望 的 状 态 甚 至 还 在 考 虑 是 否 该 移 民 但 随 着 疫 情 逐 渐 好 转 她 的 心 情 也 开 始 恢 复 明 朗 开 始 了 网 课 工 作 疫 情 过 后 梁 老 师 还 是 计 划 存 钱 为 主 原 本 准 备 今 年 给 工 作 室 装 修 的 计 划 看 情 况 也 可 能 会 取 消 不 过 说 起 吃 被 迫 自 己 做 饭 的 梁 老 师 还 是 很 期 待 之 后 能 正 常 下 馆 子 云 吞 面 啊 街 边 小 档 口 啊 反 正 就 是 现 在 没 法 吃 的 这 些", "source_text": "创业者\n\n游戏自媒体\n\n钟钟是游戏自媒体「游戏新知」的创业者,和大多数创业者的焦虑不同,她真的很佛系。疫情结束后,她唯一想逛的就是优衣库,因为那是她平常唯一会去的实体店。尽管想吃的东西有一堆,但对旅游什么都没欲望的她反而觉得在家隔离很舒服。\n\n感触最深的是,我居然不是一个上进的人,觉得整天吃吃喝喝睡也挺惬意的。甚至觉得以前是不是过的太过于辛苦了,没有时间好好生活。\n\n而对于她创业的产物「游戏新知」,疫情给这个号带来的最大影响就是老板胖了五斤。不过她所在的游戏行业在疫情期间其实是有短期获利的,好几家游戏公司老板收入涨了三四倍,有个老板本来公司快倒闭了,没钱了,结果疫情期间起死回生了。不过正是因为游戏行业利好,她在创作上反而觉得束手束脚,怕写行业好有种发「国难财」的感觉,写不好的话又觉得 2020 年的游戏行业很需要提振信心,需要一些正面的信息。\n\n除此之外,疫情对钟钟所在游戏媒体营收和用户都没什么影响。\n\n老王创业中\n\n而对于 46 岁的老王而言,疫情带来的最大冲击还是「世事无常」四个字。从来没有想过的事情突然发生了,对他和他家人的冲击都很大,他母亲 80 多岁,也从来没有遇到这样的事。\n\n虽然一直在隔离,老王也没有憋久了想要花钱的消费欲望。在他看来,吃的、喝的、玩的对他来说更多是一种生活,他不会说刻意地去做一些调整。但还是会更注意,因为疫情代表它后续的影响,可能会对经济产生影响,他会更多地留出一些现金,会更注重支出,更有选择性,不会去随意花费了,未来可能会在健康、家庭上投入更多。但对于一些具体的消费,他是没有那么在意的,他认为大多数人可能都没那么在意。\n\n我觉得疫情对消费不会有太大影响。我说更节约的生活,其实也只是一个短期的状态,对我来说生活还是一样过。在疫情的时候我会更注重安全,但它是一个特别事件。过了安全期之后,其实人会放松下来,还是会恢复到以前的。只是你会更注重相对大额的这种投资。比如说可能很多人会愿意去因为这个事情去买保险,\n\n▲ 图片来自:The Daily Star\n\n被迫网课梁老师\n\n梁老师在去年年底刚买了车,本想今年开年就好好努力,填补花掉的这笔大额消费,没想到就遇上了疫情。\n\n几年前,梁老师开始创业自己做钢琴培训。虽然规模不大,但良好的教学口碑让生意「供不应求」,想上课的学生总多于她们能教的人。\n\n这次疫情对梁老师打击很大。\n\n一是因为疫情,课基本都没法上,收入直接中断,但员工工资和房租的压力都在。这两周,梁老师开始尝试网课,给学生线上教学,但也只有 30% 左右学生能接受:\n\n因为有些学生年纪太小或是集体课,网课的效果会很不好;还有一些学生家里没钢琴,也没法用网课。\n\n▲ 图片来自 Lectureowl\n\n现在,没法给学生网课的员工,每天还是得「维护客情」,想出一些在线互动小游戏,保持在朋友圈曝光,「尽量不要让家长忘了我们啊」。\n\n其二,梁老师也很担忧疫情过后会有更长远的影响。在刚开始在家宅的几天里,梁老师曾一度陷入非常绝望的状态,甚至还在考虑是否该移民。但随着疫情逐渐好转,她的心情也开始恢复明朗,开始了网课工作。\n\n疫情过后,梁老师还是计划存钱为主,原本准备今年给工作室装修的计划,看情况也可能会取消。不过说起吃,被迫自己做饭的梁老师还是很期待之后能正常下馆子:\n\n云吞面啊,街边小档口啊,反正就是现在没法吃的这些。", "segmentation_method": "reviewed_source_semantics", "label": "创业者", "source_line_range": [ 37, 80 ] }, { "id": "body-region-3", "text": "疫 区 人 民 想 去 武 汉 看 看 的 孝 感 人 民 owen 是 个 孝 感 人 他 22 号 坐 上 空 了 一 半 的 飞 机 回 家 的 时 候 可 能 没 想 到 自 己 3 月 还 回 不 来 在 湖 北 孝 感 封 城 后 他 总 共 闭 关 了 大 概 35 天 平 均 每 天 微 信 步 数 不 超 过 1000 步 隔 离 期 间 他 感 触 最 深 的 就 是 几 乎 零 消 费 存 钱 好 容 易 花 钱 好 难 想 花 但 却 花 不 出 来 让 他 冲 动 地 在 游 戏 里 氪 金 但 除 此 之 外 的 消 费 就 只 有 话 费 和 微 信 红 包 了 他 也 尝 试 了 在 网 上 买 买 买 但 2 月 9 日 下 单 的 商 品 先 是 显 示 19 号 送 到 然 后 是 25 号 再 是 28 号 现 在 是 3 月 9 号 送 不 到 疫 区 的 网 购 没 有 意 义 但 是 某 种 程 度 上 会 影 响 我 的 消 费 观 就 是 很 多 消 费 并 非 必 要 以 前 的 想 法 是 没 必 要 存 这 么 多 该 花 就 花 开 心 就 好 现 在 可 能 会 理 性 一 些 在 特 殊 环 境 下 看 到 了 减 少 了 非 必 要 之 处 之 后 的 存 钱 能 力 差 不 多 是 一 线 城 市 的 工 资 四 线 城 市 的 消 费 所 以 疫 情 结 束 回 到 一 线 城 市 之 后 大 概 还 是 会 减 少 冲 动 消 费 如 果 真 能 改 变 消 费 习 惯 他 想 在 回 到 一 线 城 市 后 买 个 房 不 求 房 价 下 跌 只 求 平 稳 不 过 最 特 别 的 是 owen 想 去 武 汉 看 看 这 是 疫 情 带 来 的 全 新 旅 行 计 划 他 虽 然 在 武 汉 附 近 长 大 但 没 怎 么 在 这 个 城 市 驻 留 过 如 果 要 说 多 消 费 的 话 他 反 而 会 把 消 费 的 机 会 留 在 武 汉 刚 开 始 吧 这 事 出 现 在 武 汉 我 其 实 对 武 汉 各 方 面 的 反 应 挺 失 望 的 但 是 疫 情 的 发 展 之 后 这 个 城 市 的 人 民 牺 牲 非 常 大 包 括 我 家 的 一 些 亲 友 都 感 染 了 我 甚 至 也 可 以 说 是 和 肺 炎 擦 肩 而 过 即 便 如 此 武 汉 的 城 市 基 本 秩 序 和 人 伦 还 是 得 到 了 保 持 所 以 我 现 在 很 认 同 钟 南 山 说 的 武 汉 是 英 雄 的 城 市 基 于 此 我 就 想 认 真 的 感 受 下 这 个 城 市 回 家 不 成 功 梦 女 士 梦 女 士 家 乡 在 湖 北 天 门 一 个 离 武 汉 只 有 大 概 两 小 时 车 程 的 小 城 市 今 年 1 月 23 日 眼 看 疫 情 开 始 恶 化 梦 女 士 还 是 决 定 不 回 家 留 在 广 州 过 年 了 原 本 她 弟 弟 准 备 在 今 年 过 年 的 时 候 办 婚 宴 但 最 后 也 因 疫 情 延 后 了 上 周 梦 女 士 工 作 的 游 戏 公 司 开 始 复 工 虽 然 暂 无 减 薪 或 停 薪 的 通 知 但 公 司 却 突 然 开 始 拖 欠 工 资 我 司 一 月 的 薪 水 至 今 未 发 也 不 让 员 工 过 问 这 次 疫 情 让 我 认 识 到 自 己 的 公 司 并 不 靠 谱 并 不 会 保 证 员 工 利 益 或 者 说 并 不 尊 重 员 工 会 一 再 伤 害 员 工 权 益 梦 女 士 家 人 在 天 门 也 是 做 小 生 意 由 于 疫 情 家 里 的 生 意 也 完 全 中 断 了 但 她 认 为 这 也 好 重 点 还 是 先 把 疫 情 控 制 住 也 不 难 理 解 梦 女 士 在 经 历 这 次 疫 情 后 存 钱 的 欲 望 更 强 烈 了 要 为 之 后 做 个 防 备 这 个 不 平 静 的 春 节 也 让 梦 女 士 感 到 世 事 的 无 常 疫 情 造 成 了 很 多 家 庭 的 不 幸 湖 北 各 地 封 城 举 国 支 援 湖 北 还 有 科 比 的 骤 然 离 世 澳 大 利 亚 山 火 和 东 非 蝗 灾 感 觉 今 年 的 开 端 真 的 是 多 灾 多 难 需 要 珍 惜 现 在 的 生 活 让 自 己 开 心 点 疫 情 过 去 后 梦 女 士 还 想 去 以 前 每 月 都 去 的 佛 山 吃 上 好 吃 的 糖 水 和 美 食", "source_text": "疫区人民\n\n想去武汉看看的孝感人民\n\nOwen 是个孝感人,他 22 号坐上空了一半的飞机回家的时候,可能没想到自己 3 月还回不来。\n\n在湖北孝感封城后,他总共闭关了大概 35 天,平均每天微信步数不超过 1000 步。\n\n隔离期间,他感触最深的就是几乎零消费,存钱好容易,花钱好难。想花但却花不出来让他冲动地在游戏里「氪金」,但除此之外的消费就只有话费和微信红包了。他也尝试了在网上买买买,但 2 月 9 日下单的商品,先是显示 19 号送到,然后是 25 号,再是 28 号,现在是 3 月 9 号……送不到疫区的网购没有意义。\n\n但是某种程度上会影响我的消费观,就是很多消费并非必要,以前的想法是「没必要存这么多,该花就花,开心就好」,现在可能会理性一些,在特殊环境下看到了减少了非必要之处之后的存钱能力,差不多是一线城市的工资,四线城市的消费,所以疫情结束回到一线城市之后,大概还是会减少冲动消费。\n\n如果真能改变消费习惯,他想在回到一线城市后买个房,不求房价下跌,只求平稳。\n\n不过最特别的是 Owen 想去武汉看看,这是疫情带来的全新旅行计划。他虽然在武汉附近长大,但没怎么在这个城市驻留过。如果要说多消费的话,他反而会把消费的机会留在武汉。\n\n刚开始吧,这事出现在武汉,我其实对武汉各方面的反应挺失望的。但是疫情的发展之后,这个城市的人民牺牲非常大,包括我家的一些亲友都感染了,我甚至也可以说是和肺炎擦肩而过。即便如此,武汉的城市基本秩序和人伦还是得到了保持,所以我现在很认同钟南山说的,武汉是英雄的城市。基于此,我就想认真的感受下这个城市。\n\n回家不成功梦女士\n\n梦女士家乡在湖北天门,一个离武汉只有大概两小时车程的小城市。今年 1 月 23 日,眼看疫情开始恶化,梦女士还是决定不回家,留在广州过年了。原本,她弟弟准备在今年过年的时候办婚宴,但最后也因疫情延后了。\n\n上周,梦女士工作的游戏公司开始复工,虽然暂无减薪或停薪的通知,但公司却突然开始拖欠工资:\n\n我司一月的薪水至今未发,也不让员工过问。\n\n这次疫情让我认识到自己的公司并不靠谱,并不会保证员工利益,或者说并不尊重员工,会一再伤害员工权益。\n\n梦女士家人在天门也是做小生意,由于疫情,家里的生意也完全中断了。但她认为,这「也好,重点还是先把疫情控制住」。\n\n也不难理解,梦女士在经历这次疫情后存钱的欲望更强烈了,「要为之后做个防备」。这个不平静的春节,也让梦女士感到世事的无常:\n\n疫情造成了很多家庭的不幸,湖北各地封城举国支援湖北,还有科比的骤然离世,澳大利亚山火和东非蝗灾,感觉今年的开端真的\n\n是多灾多难,需要珍惜现在的生活,让自己开心点。\n\n疫情过去后,梦女士还想去以前每月都去的佛山,吃上好吃的糖水和美食。", "segmentation_method": "reviewed_source_semantics", "label": "疫区人民", "source_line_range": [ 81, 118 ] }, { "id": "body-region-4", "text": "年 轻 母 亲 图 片 来 自 亲 子 天 下 哄 女 儿 睡 觉 哄 到 俩 人 大 哭 的 芊 女 士 芊 女 士 在 某 国 企 属 下 的 广 告 公 司 做 策 划 这 次 疫 情 让 所 有 原 本 已 计 划 好 的 线 下 活 动 都 取 消 了 而 本 该 在 2 月 10 日 举 行 的 一 场 投 标 也 因 此 遥 遥 无 期 地 延 后 现 在 她 已 经 从 太 原 回 到 广 州 但 还 没 复 工 公 司 是 暂 时 不 会 倒 闭 的 但 我 对 工 作 没 有 什 么 征 服 欲 就 是 完 成 了 别 挨 骂 不 拖 别 人 后 腿 就 行 了 虽 然 也 是 在 家 里 宅 了 一 个 月 但 芊 女 士 对 疫 情 结 束 后 的 消 费 并 没 有 什 么 希 冀 而 原 本 就 在 进 行 的 存 钱 计 划 也 不 受 干 扰 想 吃 的 都 学 会 做 了 该 买 的 也 上 网 买 了 免 洗 洗 手 液 都 可 以 用 到 我 女 儿 幼 儿 园 毕 业 了 对 了 她 还 有 一 个 三 岁 的 女 儿 这 次 全 天 候 式 的 宅 家 体 验 让 芊 女 士 非 常 紧 密 地 和 父 母 丈 夫 以 及 孩 子 长 时 间 相 处 效 果 堪 称 教 你 做 人 在 家 这 个 一 月 里 感 触 最 深 有 两 点 一 是 得 好 好 调 整 自 己 的 情 绪 二 是 发 现 了 做 家 务 的 快 感 因 为 要 花 更 多 时 间 和 父 母 爱 人 和 孩 子 相 处 在 经 历 了 把 妈 妈 惹 生 气 哄 睡 孩 子 哄 到 两 个 人 都 崩 溃 大 哭 之 后 明 白 了 要 老 实 做 人 好 好 做 一 个 妈 妈 而 做 家 务 就 是 每 天 重 复 做 同 一 件 事 以 前 觉 得 无 聊 费 时 的 家 务 也 突 然 轻 松 了 总 比 上 班 好 得 多 这 个 月 跟 着 付 费 网 课 学 编 曲 的 丈 夫 成 了 她 近 期 的 快 乐 源 泉 他 的 曲 子 就 跟 八 十 年 代 午 休 歌 曲 一 样 昨 天 作 的 一 首 歌 能 把 我 笑 死 这 钱 花 得 值 和 女 儿 第 一 次 度 过 春 节 的 lily 在 国 有 银 行 工 作 的 lily 今 年 度 过 了 第 一 个 和 女 儿 一 起 过 的 春 节 日 常 时 间 表 主 要 是 照 顾 女 儿 和 上 网 课 组 成 虽 然 自 己 和 丈 夫 的 公 司 以 及 收 入 都 没 有 受 到 疫 情 影 响 并 且 也 已 经 在 家 宅 了 35 天 lily 也 没 有 积 压 太 多 消 费 欲 望 在 疫 情 过 去 后 她 就 只 想 去 吃 一 下 家 里 没 法 做 的 海 鲜 以 及 去 理 发 店 剪 个 头 发 当 被 问 及 这 次 经 历 带 来 的 最 大 感 触 lily 告 诉 我 生 命 第 一 其 它 都 是 浮 云 其 它 已 婚 少 女 和 那 些 无 数 夫 妻 想 在 疫 情 结 束 后 离 婚 不 一 样 结 婚 还 没 一 年 的 咯 咯 在 疫 情 中 觉 得 有 老 公 真 好 有 人 干 家 务 有 人 陪 着 聊 天 在 家 办 公 她 也 不 想 买 房 买 车 没 什 么 大 额 消 费 的 计 划 目 前 最 大 的 愿 望 适 合 朋 友 出 去 吃 芝 士 炸 鸡 和 一 点 点 对 其 他 东 西 没 什 么 特 别 的 欲 望 因 为 现 在 的 电 商 购 物 就 能 满 足 她 的 需 求 了 快 递 恢 复 后 我 已 经 天 天 刷 淘 宝 买 东 西 了 淘 宝 26 家 店 拼 多 多 7 家 店 京 东 4 家 店 每 家 可 能 平 均 1 3 件 商 品 留 守 澳 洲 星 崽 在 澳 洲 念 书 澳 洲 情 况 并 没 有 那 么 严 重 本 来 疫 情 和 她 没 什 么 密 切 的 关 系 直 到 她 所 住 的 楼 层 发 现 了 一 例 确 诊 她 也 需 要 隔 离 两 周 才 能 出 门 出 门 也 就 是 下 楼 拿 外 卖 而 已 不 过 她 觉 得 隔 离 生 活 完 全 没 什 么 焦 虑 感 很 舒 适 还 能 不 出 门 见 人 她 觉 得 很 适 合 自 己 但 疫 情 对 她 还 是 有 影 响 的 出 门 买 东 西 的 时 候 有 人 看 见 她 会 问 是 从 中 国 哪 里 来 的 是 武 汉 吗 她 听 说 悉 尼 街 头 有 一 个 华 裔 老 人 心 脏 病 发 但 在 特 殊 的 时 期 没 人 敢 上 去 做 cpr 老 人 因 此 去 世 她 原 本 的 出 游 计 划 就 是 从 悉 尼 回 国 这 次 疫 情 就 是 我 现 在 还 在 悉 尼 并 且 一 直 在 悉 尼 的 原 因 毕 竟 回 去 了 不 知 道 什 么 时 候 才 能 回 来 现 在 也 不 知 道 什 么 时 候 才 能 回 去 不 过 比 起 她 早 早 回 国 的 同 学 她 已 经 算 幸 运 了 毕 竟 这 些 因 封 关 而 无 法 返 回 学 校 的 人 只 能 想 办 法 申 请 延 期 入 学 隔 离 两 周 她 基 本 只 会 在 线 上 订 外 卖 不 买 化 妆 品 也 不 喜 欢 网 购 服 装 的 她 不 忘 吐 槽 澳 洲 效 率 在 悉 尼 这 种 地 方 网 购 的 来 了 人 都 等 死 了 哇 隔 离 完 就 可 以 出 门 了 惹 还 有 啥 要 买 的 图 片 来 自 us news 看 到 阳 光 就 想 晒 的 丹 老 师 在 汕 尾 家 里 宅 了 20 多 天 的 丹 老 师 下 周 就 得 开 始 网 课 了 她 所 工 作 的 学 校 以 及 自 己 的 收 入 都 没 有 受 到 疫 情 影 响 但 也 表 示 在 疫 情 过 后 不 会 出 现 补 偿 性 的 过 度 消 费 在 放 假 期 间 丹 老 师 想 买 的 东 西 网 购 基 本 都 满 足 了 有 天 她 在 朋 友 圈 看 到 好 几 个 人 晒 螺 蛳 粉 这 让 在 家 吃 饭 口 味 清 淡 的 她 一 下 就 馋 了 起 来 并 立 刻 向 朋 友 要 了 链 接 此 外 只 带 了 一 套 睡 衣 回 家 的 她 也 通 过 电 商 及 时 地 买 了 好 些 家 居 服 当 被 问 及 疫 情 过 去 后 想 去 消 费 些 什 么 丹 老 师 和 很 多 人 一 样 都 很 想 去 剪 头 发 除 此 以 外 她 还 希 望 等 安 全 后 能 找 个 自 然 风 光 好 的 户 外 逛 逛 估 计 还 是 呆 得 室 内 太 久 的 后 遗 症 现 在 看 到 空 地 就 想 去 走 走 看 到 太 阳 就 想 去 晒", "source_text": "年轻母亲\n\n▲ 图片来自亲子天下\n\n哄女儿睡觉哄到俩人大哭的芊女士\n\n芊女士在某国企属下的广告公司做策划,这次疫情让所有原本已计划好的线下活动都取消了,而本该在 2 月 10 日举行的一场投标也因此遥遥无期地延后。现在,她已经从太原回到广州,但还没复工。\n\n公司是暂时不会倒闭的,但我对工作没有什么征服欲,就是完成了,别挨骂,不拖别人后腿就行了。\n\n虽然也是在家里「宅」了一个月,但芊女士对疫情结束后的消费并没有什么希冀,而原本就在进行的存钱计划也不受干扰:\n\n想吃的都学会做了,该买的也上网买了。\n\n免洗洗手液都可以用到我女儿幼儿园毕业了。\n\n对了,她还有一个三岁的女儿。\n\n这次「全天候式」的宅家体验,让芊女士非常紧密地和父母丈夫以及孩子长时间相处,效果堪称「教你做人」:\n\n在家这个一月里,感触最深有两点:一是得好好调整自己的情绪,二是发现了做家务的快感。\n\n因为要花更多时间和父母、爱人和孩子相处,在经历了把妈妈惹生气、哄睡孩子哄到两个人都崩溃大哭之后,明白了要老实做人,好好做一个妈妈。\n\n而做家务就是每天重复做同一件事,以前觉得无聊费时的家务也突然轻松了,总比上班好得多。\n\n这个月跟着付费网课学编曲的丈夫成了她近期的快乐源泉:\n\n他的曲子就跟八十年代午休歌曲一样,昨天作的一首歌能把我笑死,这钱花得值!\n\n和女儿第一次度过春节的 Lily\n\n在国有银行工作的 Lily 今年度过了第一个和女儿一起过的春节,日常时间表主要是照顾女儿和上网课组成。\n\n虽然自己和丈夫的公司以及收入都没有受到疫情影响,并且也已经在家宅了 35 天,Lily 也没有积压太多消费欲望。在疫情过去后,她就只想去吃一下家里没法做的海鲜,以及去理发店剪个头发。\n\n当被问及这次经历带来的最大感触,Lily 告诉我:\n\n生命第一,其它都是浮云。\n\n其它\n\n已婚少女\n\n和那些「无数夫妻想在疫情结束后」离婚不一样,结婚还没一年的咯咯在疫情中觉得有老公真好,「有人干家务有人陪着聊天在家办公」。\n\n她也不想买房买车,没什么大额消费的计划。目前最大的愿望适合朋友出去吃芝士炸鸡和一点点。对其他东西没什么特别的欲望,因为现在的电商购物就能满足她的需求了。\n\n快递恢复后我已经天天刷淘宝买东西了。\n\n淘宝 26 家店,拼多多 7 家店,京东 4 家店, 每家可能平均 1.3 件商品。\n\n留守澳洲\n\n星崽在澳洲念书,澳洲情况并没有那么严重,本来疫情和她没什么密切的关系。直到她所住的楼层发现了一例确诊,她也需要隔离两周才能出门,出门也就是下楼拿外卖而已。不过她觉得隔离生活完全没什么焦虑感,很舒适,还能不出门见人,她觉得很适合自己。\n\n但疫情对她还是有影响的,出门买东西的时候有人看见她会问「是从中国哪里来的?是武汉吗?」她听说悉尼街头有一个华裔老人心脏病发,但在特殊的时期,没人敢上去做 CPR,老人因此去世。\n\n她原本的出游计划就是从悉尼回国:「这次疫情就是我现在还在悉尼并且一直在悉尼的原因,毕竟回去了不知道什么时候才能回来,现在也不知道什么时候才能回去。」不过比起她早早回国的同学,她已经算幸运了,毕竟这些因封关而无法返回学校的人只能想办法申请延期入学。\n\n隔离两周,她基本只会在线上订外卖,不买化妆品也不喜欢网购服装的她不忘吐槽澳洲效率。\n\n在悉尼这种地方,网购的来了,人都等死了哇。\n\n隔离完就可以出门了惹,还有啥要买的。\n\n▲ 图片来自:US News\n\n看到阳光就想晒的丹老师\n\n在汕尾家里宅了 20 多天的丹老师下周就得开始网课了。她所工作的学校以及自己的收入都没有受到疫情影响,但也表示在疫情过后不会出现补偿性的过度消费。\n\n在放假期间,丹老师想买的东西网购基本都满足了。有天,她在朋友圈看到好几个人晒螺蛳粉,这让在家吃饭口味清淡的她一下就馋了起来,并立刻向朋友要了链接。此外,只带了一套睡衣回家的她,也通过电商及时地买了好些家居服。\n\n当被问及疫情过去后想去消费些什么,丹老师和很多人一样都很想去剪头发。除此以外,她还希望等安全后,能找个自然风光好的户外逛逛,估计还是呆得室内太久的「后遗症」:\n\n现在看到空地就想去走走,看到太阳就想去晒。", "segmentation_method": "reviewed_source_semantics", "label": "年轻母亲 — 看到阳光就想晒的丹老师", "source_line_range": [ 119, 196 ] }, { "id": "body-region-5", "text": "疫 情 会 过 去 生 活 在 继 续 我 们 想 用 自 己 或 他 人 的 前 车 之 鉴 做 一 个 对 比 让 我 们 知 道 未 来 面 对 的 是 什 么 但 这 些 年 的 霍 乱 h1n1 h7n9 埃 博 拉 等 流 行 病 要 么 是 发 病 区 域 和 中 国 境 况 相 差 太 大 要 么 就 是 病 毒 传 染 性 破 坏 性 和 冠 状 病 毒 有 不 小 的 差 距 即 便 是 经 常 被 拿 出 来 做 对 比 前 瞻 的 非 典 从 影 响 人 数 比 重 上 和 今 天 所 面 对 的 情 况 也 有 很 大 不 同 比 如 非 典 疫 情 最 为 严 重 的 时 候 休 闲 服 务 建 筑 装 饰 传 媒 等 产 业 受 到 的 冲 击 最 大 但 从 这 次 a 股 的 涨 跌 幅 来 看 传 媒 电 子 计 算 机 反 而 颇 被 看 好 清 华 大 学 国 家 金 融 研 究 院 院 长 朱 民 也 表 示 二 者 相 差 颇 大 非 典 影 响 总 人 口 占 比 才 18 这 次 是 63 但 这 仍 是 对 我 们 最 有 价 值 的 一 段 数 据 当 我 们 对 照 2003 年 快 销 品 购 买 金 额 同 期 增 速 时 我 们 就 会 发 现 非 典 时 期 四 五 月 的 消 费 数 据 出 现 了 小 下 滑 六 月 基 本 恢 复 正 常 8 月 则 出 现 了 小 幅 度 的 反 弹 但 这 能 叫 报 复 性 消 费 吗 报 复 有 报 仇 的 意 思 非 典 时 期 的 消 费 数 据 已 经 告 诉 了 我 们 被 隔 离 在 家 的 民 众 其 实 也 没 有 突 然 释 放 出 极 强 的 消 费 能 力 快 销 品 仅 小 幅 反 弹 就 证 明 了 这 一 点 而 今 天 在 家 隔 离 的 人 难 道 会 在 基 础 物 资 供 应 都 更 为 及 时 的 情 况 下 更 想 报 复 性 消 费 吗 图 片 来 自 蒂 凡 尼 的 早 餐 种 种 数 据 表 明 这 次 疫 情 相 较 非 典 卷 入 的 人 更 多 传 染 性 也 更 强 但 我 们 看 到 的 却 是 人 们 情 绪 相 较 非 典 时 期 更 稳 定 除 了 特 定 的 疫 区 外 互 联 网 的 线 下 触 角 其 实 伸 向 了 各 个 角 落 定 时 抢 购 的 口 罩 迅 速 恢 复 的 物 流 电 商 商 城 里 甚 至 及 时 上 线 了 因 疫 情 而 受 灾 的 蔬 果 这 都 为 人 们 的 生 活 提 供 了 保 障 大 家 的 情 绪 其 实 一 直 在 释 放 中 不 管 是 公 共 社 群 中 多 样 的 话 题 还 是 流 媒 体 丰 富 的 选 择 不 管 是 鳞 次 栉 比 的 商 品 还 是 线 上 办 公 软 件 的 到 位 当 需 求 都 能 满 足 的 时 候 隔 离 在 家 的 人 其 实 没 那 么 难 搞 想 买 东 西 可 以 去 挑 顺 丰 发 货 想 吃 美 食 也 能 自 己 下 厨 房 重 新 恢 复 的 物 流 秩 序 更 能 做 到 让 大 部 分 人 足 不 出 户 完 成 消 费 疫 情 中 隔 离 的 人 们 也 没 有 随 着 隔 离 时 间 的 推 移 而 日 益 崩 溃 在 各 种 需 求 几 乎 都 能 满 足 的 社 会 中 他 们 的 情 绪 其 实 一 直 在 释 放 他 们 一 直 都 在 消 费 的 过 程 中 正 因 如 此 恐 慌 烦 躁 感 相 比 十 七 年 的 非 典 都 要 小 的 多 至 少 从 我 们 的 采 访 来 看 众 多 隔 离 在 家 的 民 众 其 实 没 什 么 太 大 变 化 最 多 想 出 门 和 朋 友 吃 火 锅 吃 炸 鸡 喝 奶 茶 想 出 门 晒 一 晒 太 阳 压 一 压 马 路 把 这 种 行 为 称 为 报 复 性 消 费 多 少 有 些 夸 张 最 多 就 是 憋 久 了 想 出 门 吃 点 好 的 补 偿 一 下 在 家 长 久 的 隔 离 时 光 从 朋 友 圈 的 厨 艺 大 赛 和 对 远 程 办 公 的 诸 多 分 享 吐 槽 来 看 大 部 分 的 人 都 长 久 的 隔 离 中 寻 求 生 活 的 幸 福 感 大 家 的 情 绪 没 有 那 么 糟 糕 想 要 的 东 西 也 没 那 么 夸 张 当 隔 离 在 家 需 求 都 能 满 足 并 没 那 么 痛 苦 时 大 部 分 人 其 实 都 没 那 么 想 要 报 复 性 消 费 相 比 走 出 家 门 疯 狂 消 费 大 家 其 实 更 希 望 生 活 秩 序 恢 复 正 常 想 喝 奶 茶 喝 奶 茶 想 晒 太 阳 晒 太 阳 上 班 不 用 担 心 感 染 恢 复 正 常 生 活 就 很 好", "source_text": "疫情会过去,生活在继续\n\n我们想用自己或他人的前车之鉴做一个对比,让我们知道未来面对的是什么?。\n\n但这些年的霍乱、H1N1、H7N9、埃博拉等流行病要么是发病区域和中国境况相差太大,要么就是病毒传染性、破坏性和冠状病毒有不小的差距。即便是经常被拿出来做对比「前瞻」的非典,从影响人数、比重上和今天所面对的情况也有很大不同。\n\n比如非典疫情最为严重的时候,休闲服务、建筑装饰、传媒等产业受到的冲击最大,但从这次 A 股的涨跌幅来看,传媒、电子、计算机反而颇被看好。清华大学国家金融研究院院长朱民也表示二者相差颇大:「非典影响总人口占比才 18%,这次是 63%。」\n\n但这仍是对我们最有价值的一段数据。\n\n当我们对照 2003 年快销品购买金额同期增速时,我们就会发现非典时期四五月的消费数据出现了小下滑,六月基本恢复正常,8 月则出现了小幅度的反弹。\n\n但这能叫报复性消费吗?\n\n「报复」有报仇的意思,非典时期的消费数据已经告诉了我们,被隔离在家的民众其实也没有突然释放出极强的消费能力,快销品仅小幅反弹就证明了这一点。而今天,在家隔离的人难道会在基础物资供应都更为及时的情况下,更想「报复性消费」吗?\n\n▲ 图片来自:《蒂凡尼的早餐》\n\n种种数据表明,这次疫情相较非典卷入的人更多,传染性也更强,但我们看到的却是人们情绪相较非典时期更稳定。除了特定的疫区外,互联网的线下触角其实伸向了各个角落,定时抢购的口罩,迅速恢复的物流,电商商城里甚至及时上线了因疫情而受灾的蔬果,这都为人们的生活提供了保障。\n\n大家的情绪其实一直在释放中,不管是公共社群中多样的话题,还是流媒体丰富的选择,不管是鳞次栉比的商品,还是线上办公软件的到位。当需求都能满足的时候,隔离在家的人其实没那么「难搞」。想买东西可以去挑顺丰发货,想吃美食也能自己下厨房,重新恢复的物流秩序更能做到让大部分人足不出户完成消费。\n\n疫情中隔离的人们也没有随着隔离时间的推移而日益崩溃。在各种需求几乎都能满足的社会中,他们的情绪其实一直在释放,他们一直都在消费的过程中。正因如此,恐慌、烦躁感相比十七年的非典都要小的多。\n\n至少从我们的采访来看,众多隔离在家的民众其实没什么太大变化,最多想出门和朋友吃火锅,吃炸鸡,喝奶茶,想出门晒一晒太阳,压一压马路,把这种行为称为「报复性消费」多少有些夸张。最多就是憋久了,想出门吃点好的补偿一下在家长久的隔离时光。\n\n从朋友圈的厨艺大赛和对远程办公的诸多分享、吐槽来看,大部分的人都长久的隔离中寻求生活的幸福感。大家的情绪没有那么糟糕,想要的东西也没那么夸张。\n\n当隔离在家需求都能满足,并没那么痛苦时,大部分人其实都没那么想要报复性消费。相比走出家门疯狂消费,大家其实更希望生活秩序恢复正常。\n\n想喝奶茶喝奶茶,想晒太阳晒太阳,上班不用担心感染,恢复正常生活就很好。", "segmentation_method": "reviewed_source_semantics", "label": "疫情会过去,生活在继续", "source_line_range": [ 197, 227 ] } ], "ending": { "text": "的诸多分享、吐槽来看,大部分的人都长久的隔离中寻求生活的幸福感。大家的情绪没有那么糟糕,想要的东西也没那么夸张。\n\n当隔离在家需求都能满足,并没那么痛苦时,大部分人其实都没那么想要报复性消费。相比走出家门疯狂消费,大家其实更希望生活秩序恢复正常。\n\n想喝奶茶喝奶茶,想晒太阳晒太阳,上班不用担心感染,恢复正常生活就很好。" } } }, { "id": "article-054", "name": "How we scaled the GitHub API with a sharded, replicated rate limiter in Redis", "url": "https://github.blog/engineering/how-we-scaled-github-api-sharded-replicated-rate-limiter-redis/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How we scaled the GitHub API with a sharded, replicated rate limiter in Redis" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Robert Mosolgo" ] }, { "id": "stable-3", "alternatives": [ "@rmosolgo" ] }, { "id": "stable-4", "alternatives": [ "Infrastructure" ] }, { "id": "stable-5", "alternatives": [ "feature flags" ] }, { "id": "stable-6", "alternatives": [ "Tags:" ] }, { "id": "stable-7", "alternatives": [ "Written by" ] }, { "id": "stable-8", "alternatives": [ "Blog" ] }, { "id": "stable-9", "alternatives": [ "Changelog" ] }, { "id": "stable-10", "alternatives": [ "Docs" ] }, { "id": "stable-11", "alternatives": [ "Customer stories" ] }, { "id": "stable-12", "alternatives": [ "AI & ML" ] }, { "id": "stable-13", "alternatives": [ "Developer skills" ] }, { "id": "stable-14", "alternatives": [ "Engineering" ] }, { "id": "stable-15", "alternatives": [ "Enterprise software" ] }, { "id": "stable-16", "alternatives": [ "News & insights" ] }, { "id": "stable-17", "alternatives": [ "Open Source" ] }, { "id": "stable-18", "alternatives": [ "Security" ] }, { "id": "stable-19", "alternatives": [ "Home" ] }, { "id": "stable-20", "alternatives": [ "Share:" ] }, { "id": "stable-21", "alternatives": [ "More on" ] }, { "id": "stable-22", "alternatives": [ "Related posts" ] }, { "id": "stable-23", "alternatives": [ "Explore more from GitHub" ] }, { "id": "stable-24", "alternatives": [ "Everything you need to master GitHub, all in one place." ] }, { "id": "stable-25", "alternatives": [ "Go to Docs" ] }, { "id": "stable-26", "alternatives": [ "GitHub Actions" ] }, { "id": "stable-27", "alternatives": [ "Native CI/CD alongside code hosted in GitHub." ] }, { "id": "stable-28", "alternatives": [ "Learn more" ] }, { "id": "stable-29", "alternatives": [ "Enterprise content" ] }, { "id": "stable-30", "alternatives": [ "Executive insights, curated just for you" ] }, { "id": "stable-31", "alternatives": [ "Get started" ] }, { "id": "stable-32", "alternatives": [ "We do newsletters, too" ] }, { "id": "stable-33", "alternatives": [ "Discover tips, technical guides, and best practices in our biweekly newsletter just for devs." ] }, { "id": "stable-34", "alternatives": [ "Your email address" ] }, { "id": "stable-35", "alternatives": [ "Subscribe" ] }, { "id": "stable-36", "alternatives": [ "GitHub Privacy Statement" ] }, { "id": "stable-37", "alternatives": [ "Site-wide Links" ] }, { "id": "stable-38", "alternatives": [ "Product" ] }, { "id": "stable-39", "alternatives": [ "Features" ] }, { "id": "stable-40", "alternatives": [ "Enterprise" ] }, { "id": "stable-41", "alternatives": [ "Customer Stories" ] }, { "id": "stable-42", "alternatives": [ "Pricing" ] }, { "id": "stable-43", "alternatives": [ "Resources" ] }, { "id": "stable-44", "alternatives": [ "Platform" ] }, { "id": "stable-45", "alternatives": [ "Developer API" ] }, { "id": "stable-46", "alternatives": [ "Partners" ] }, { "id": "stable-47", "alternatives": [ "Atom" ] }, { "id": "stable-48", "alternatives": [ "Electron" ] }, { "id": "stable-49", "alternatives": [ "GitHub Desktop" ] }, { "id": "stable-50", "alternatives": [ "Support" ] }, { "id": "stable-51", "alternatives": [ "Community Forum" ] }, { "id": "stable-52", "alternatives": [ "Training" ] }, { "id": "stable-53", "alternatives": [ "Status" ] }, { "id": "stable-54", "alternatives": [ "Contact" ] }, { "id": "stable-55", "alternatives": [ "Company" ] }, { "id": "stable-56", "alternatives": [ "About" ] }, { "id": "stable-57", "alternatives": [ "Careers" ] }, { "id": "stable-58", "alternatives": [ "Press" ] }, { "id": "stable-59", "alternatives": [ "Shop" ] }, { "id": "stable-60", "alternatives": [ "Terms" ] }, { "id": "stable-61", "alternatives": [ "Privacy" ] }, { "id": "stable-62", "alternatives": [ "Manage Cookies" ] }, { "id": "stable-63", "alternatives": [ "Do not share my personal information" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How we scaled the GitHub API with a sharded, replicated rate limiter in Redis" ], "html_selector": "h1.h3-mktg.lh-condensed,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-054/comment-qualification-reference-r5.json", "sha256": "f18d52b31beff4395ec1498462b48c0eb508055c5f4a237d9f144afc71a433ac", "chars": 825, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "About a year ago, we migrated an old rate limiter in order to serve more traffic and accommodate a more resilient platform architecture. We adopted a replicated Redis backend with client-side sharding. In the end, it worked out great, but we learned some lessons along the way.\n\nThe Problem\n\nWe had an old rate limiter that was simple enough:\n\nFor every request, determine a “key” for the current rate limit\nIn Memcached, increment the value of that key, setting it to 1 if there wasn’t any current value\nAlso, if there wasn’t already one, set a “reset at” value in Memcached, using a related key (eg, “#{key}:reset_at“)\nWhen incrementing, if the “reset at” value is in the past, ignore the existing value and set a new “reset at”\nAt the beginning of each request, if the value for the key is above the limit, and “reset at” is in the future, then reject the request\n\n(There might have been more nuance to it, but that’s the main idea.)\n\nHowever, this limiter had two problems:\n\nOur Memcached architecture was due to change. Since it was mostly used as a caching layer, we were going to switch from a single, shared Memcached to one Memcached per datacenter. Although that’d work fine for application caching, it would cause our rate limiter to behave very strangely if client requests were routed to different data centers.\nMemcached “persistence” wasn’t working for us. The Memcached backend was shared by the rate limiter and other application caches which meant that, when it filled up, it would sometimes evict rate limiter data, even when it was still active. (As a result, clients would get “fresh” rate limit windows when they shouldn’t. Sometimes, only one key would be evicted – they’d keep the same “used” value, but get new, future, “reset at” values!)\n\nThe proposed solution\n\nAfter some discussion, we decided on a new design for the rate limiter:\n\nUse Redis, since it has a more appropriate persistence system and simple sharding and replication setups\nShard inside the application: the app would pick, for each key, which Redis cluster to read and write from\nTo mitigate the CPU-bound nature of Redis, put a single primary (for writes) and several replicas (for reads) in each cluster\nInstead of writing “reset at” in the database, use Redis expiration to make values disappear when they no longer apply\nImplement the storage logic in Lua, to guarantee atomicity of operations (this was an improvement over the previous design)\n\nOne option we considered but decided against was using our MySQL-backed KV store (GitHub::KV) for storage. We didn’t want to add traffic to already-busy MySQL primaries: usually, we use replicas for GET requests, but rate limit updates would require write access to a primary. By choosing a different storage backend, we could avoid the additional (and substantial) write traffic to MySQL.\n\nAnother advantage to using Redis is that it’s a well-traveled path. We could take inspiration from two excellent existing resources:\n\nRedis’s own documentation, which includes some rate limiter patterns\nStripe’s technical blog post, “Scaling your API with Rate Limiters”, which includes a Ruby and Redis example implementation\n\nThe release\n\nTo roll out this change, we isolated the current persistence logic into a MemcachedBackend class, and built a new RedisBackend class for the rate limiter. We used a feature flag to gate access to the new backend. This allowed us to gradually increase the percentage of clients using the new backend. We could change the percentage without a deploy, which meant, if something went wrong, we could quickly switch back to the old implementation.\n\nThe release went smoothly, and when it was done, we removed the feature flag and the MemcachedBackend class, and integrated RedisBackend directly with the Throttler class that delegated to it.\n\nThen, the bug reports started flowing in….\n\nThe bugs\n\nA lot of integrators watch their rate limit usage very closely. We got two really interesting bug reports in the weeks following our release:\n\nSome clients observed that their X-RateLimit-Reset header value “wobbled” – it might show 2020-01-01 10:00:00 for one request, but 2020-01-01 10:00:01 on another request (with one second difference).\nSome clients had their requests rejected for being over the limit, but the response headers said X-RateLimit-Remaining: 5000. That didn’t make sense: if they had a full rate limit window ahead of them, why was the request rejected?\n\nHow odd!\n\nFix 1: Manage “reset at” in application code\n\nWe were optimistic about using Redis’s built-in time-to-live (TTL) to implement our “reset at” feature. But it turns out, my implementation caused the “wobble” described above.\n\nThe Lua script returned the TTL of the client’s rate limit value, and then in Ruby, it was added to Time.now.to_i to get a timestamp for the X-RateLimit-Reset header. The problem was, time passes between the call to TTL (in Redis) and Time.now.to_i (in Ruby). Depending exactly how much time, and where it fell on the clock’s second boundary, the resulting timestamp might be different. For example, consider the following calls:\n\nRedis call begins\tlatency\tTTL (Redis)\tlatency\tTime.now returns\tsum of TTL and Time.now\n10:00:04.2\t0.1\t5\t0.1\t10:00:05.4\t10:00:10.1\n(then, a half-second later)\t\t\t\t\t\n10:00:05.9\t0.05\t5\t0.1\t10:00:06.05\t10:00:11.05\n\nIn that case, since the second boundary happened between the call to TTL and Time.now, the resulting timestamp was one second bigger than the previous ones.\n\nWe could have tried increasing the precision of this operation (eg, Redis PTTL), but there would still have been some wobble, even if it was greatly reduced.\n\nAnother possibility was to calculate the time using only Redis, instead of mixing Ruby and Redis calls to create it. Redis’s TIME command could have been used as the source of truth. (Old Redis versions didn’t allow TIME in Lua scripts, but Redis 5+ does.) We avoided this design because it would have been harder to test: by using Ruby’s time as the source of truth, I could time-travel in my tests with Timecop, asserting that expired keys were handled correctly without actually waiting for Redis’s calls to the system clock to return true, future times. (I still had to wait on Redis to test the EXPIRE-based database cleanup, but since expires_at came from Ruby-land, I could inject very short expiration windows to simplify testing.)\n\nInstead, we decided to persist the “reset at” time from Ruby in the database. That way, we could be sure it wouldn’t wobble. (Wobbling was an effect of the calculation – but reading from the database would guarantee a stable value.) Instead of reading TTL from Redis, we stored another value in the database (effectively doubling our storage footprint, but OK).\n\nWe still applied a TTL to rate limit keys, but they were set for one second after the “reset at” time. That way, we could use Redis’s own semantics to clean up “dead” rate limit windows.\n\nFix 2: Account for expiration in replicas\n\nWeirdly, many clients reported rejections that included X-RateLimit-Remaining: 5000 headers. What’s going on!?\n\nWe found another problem that worked like this:\n\nAt the beginning of the request, check the client’s current rate limit value. If it’s over the maximum allowed limit, prepare a rejection response.\nBefore delivering the response, increment the current rate limit value, and use the response to populate the X-RateLimit-... headers.\n\nWell, it turned out that Step 1 above hit a Redis replica, since it was a read operation. The read operation returned information about the client’s previous window, and the application prepared a rejection response.\n\nThen, Step 2 would hit a Redis primary. During that database call, Redis would expire the previous window data and return data for a fresh rate limit. This is a known limitation of Redis: replicas don’t expire data until they receive instructions to do so from their primaries, and primaries don’t expire keys until they’re accessed (GitHub issue). (In fact, primaries do randomly sample keys from time to time, expiring them as appropriate, see “How Redis Expires Keys”.)\n\nAddressing this issue required two things:\n\nBasically, the same fix as above: instead of relying on Redis’s TTL to expire old rate limit windows, we needed to manage that feature in the application. (The application should be prepared to read stale data from replicas, then ignore it.)\nEven after fixing that, a better design was required: in the case of rate-limited requests, we should avoid a second call to the database. The client’s window might expire between the two calls, resulting in the kind of inconsistent response described above. This fix required improving the Ruby code that prepared responses so that the response from Step 1 above was used to populate X-RateLimit-... headers.\n\nThe final scripts\n\nHere are the Lua scripts we ended up with for implementing this pattern:\n\nRATE_SCRIPT:\n-- count a request for a client\n-- and return the current state for the client\n-- rename the inputs for clarity below\nlocal rate_limit_key = KEYS[1]\nlocal increment_amount = tonumber(ARGV[1])\nlocal next_expires_at = tonumber(ARGV[2])\nlocal current_time = tonumber(ARGV[3])\nlocal expires_at_key = rate_limit_key .. \":exp\"\nlocal expires_at = tonumber(redis.call(\"get\", expires_at_key))\nif not expires_at or expires_at < current_time then\n -- this is either a brand new window,\n -- or this window has closed, but redis hasn't cleaned up the key yet\n -- (redis will clean it up in one more second)\n -- initialize a new rate limit window\n redis.call(\"set\", rate_limit_key, 0)\n redis.call(\"set\", expires_at_key, next_expires_at)\n -- tell Redis to clean this up _one second after_ the expires-at time.\n -- that way, clock differences between Ruby and Redis won't cause data to disappear.\n -- (Redis will only clean up these keys \"long after\" the window has passed)\n redis.call(\"expireat\", rate_limit_key, next_expires_at + 1)\n redis.call(\"expireat\", expires_at_key, next_expires_at + 1)\n -- since the database was updated, return the new value\n expires_at = next_expires_at\nend\n-- Now that the window is either known to already exist _or_ be freshly initialized,\n-- increment the counter (`incrby` returns a number)\nlocal current = redis.call(\"incrby\", rate_limit_key, increment_amount)\nreturn { current, expires_at }\n\n-- CHECK_SCRIPT:\n-- Getting both the value and the expiration\n-- of key as needed by our algorithm needs to be ran\n-- in an atomic way, hence the script.\n\n-- rename the inputs for clarity below\nlocal rate_limit_key = KEYS[1]\nlocal expires_at_key = rate_limit_key .. \":exp\"\nlocal current_time = tonumber(ARGV[1])\nlocal tries = tonumber(redis.call(\"get\", rate_limit_key))\nlocal expires_at = nil -- maybe overridden below\nif not tries then\n -- this client hasn't initialized a window yet\n -- let this fall through to returning {nil, nil},\n -- where the application will provide defaults\nelse\n -- we found a number of tries, now check\n -- if this window is actually expired\n expires_at = tonumber(redis.call(\"get\", expires_at_key))\n if not expires_at or expires_at < current_time then\n -- this window hasn't been cleaned up by Redis yet, but it has closed.\n -- (maybe it was _partly_ cleaned up, if we found `tries` but not `expires_at`)\n -- ignore the data in the database; return a fresh window instead\n tries = nil\n expires_at = nil\n end\nend\n-- Maybe {nil, nil} if the window is brand new (or expired)\nreturn { tries, expires_at }\n\n\nConclusion\n\nWe’ve learned a lot from this new approach, but there’s still one shortcoming we’re considering: the current implementation doesn’t increment the “current” rate limit value until after the request is finished. We do this because we don’t charge clients for 304 Not Modified responses (this can happen when the client provides an E-Tag). A better implementation might increment the value when the request starts, then refunds the client if the response is 304. That would prevent some edge cases where a client can exceed its limit when the final allowed request is still being processed.\n\nAfter working out the issues described in this post, the new rate limiter has worked great. It has improved reliability, fixed issues for clients, and reduced our support load (eventually ) and the architecture is ready for our next wave of platform improvements.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "about a year ago we migrated an old rate limiter in order to serve more traffic and accommodate a more resilient platform architecture we adopted a replicated redis backend with client side sharding in the end it worked out great but we learned some lessons along the way the problem we had an old rate limiter that was simple enough for every request determine a key for the current rate limit in memcached increment the value of that key setting it to 1 if there wasn t any current value also if there wasn t already one set a reset at value in memcached using a related key eg key reset at when incrementing if the reset at value is in the past ignore the existing value and set a new reset at at the beginning of each request if the value for the key is above the limit and reset at is in the future then reject the request there might have been more nuance to it but that s the main idea however this limiter had two problems our memcached architecture was due to change since it was mostly used as a caching layer we were going to switch from a single shared memcached to one memcached per datacenter although that d work fine for application caching it would cause our rate limiter to behave very strangely if client requests were routed to different data centers memcached persistence wasn t working for us the memcached backend was shared by the rate limiter and other application caches which meant that when it filled up it would sometimes evict rate limiter data even when it was still active as a result clients would get fresh rate limit windows when they shouldn t sometimes only one key would be evicted they d keep the same used value but get new future reset at values the proposed solution after some discussion we decided on a new design for the rate limiter use redis since it has a more appropriate persistence system and simple sharding and replication setups shard inside the application the app would pick for each key which redis cluster to read and write from to mitigate the cpu bound nature of redis put a single primary for writes and several replicas for reads in each cluster instead of writing reset at in the database use redis expiration to make values disappear when they no longer apply implement the storage logic in lua to guarantee atomicity of operations this was an improvement over the previous design one option we considered but decided against was using our mysql backed kv store github kv for storage we didn t want to add traffic to already busy mysql primaries usually we use replicas for get requests but rate limit updates would require write access to a primary by choosing a different storage backend we could avoid the additional and substantial write traffic to mysql another advantage to using redis is that it s a well traveled path we could take inspiration from two excellent existing resources redis s own documentation which includes some rate limiter patterns stripe s technical blog post scaling your api with rate limiters which includes a ruby and redis example implementation", "source_text": "About a year ago, we migrated an old rate limiter in order to serve more traffic and accommodate a more resilient platform architecture. We adopted a replicated Redis backend with client-side sharding. In the end, it worked out great, but we learned some lessons along the way.\n\nThe Problem\n\nWe had an old rate limiter that was simple enough:\n\nFor every request, determine a “key” for the current rate limit\nIn Memcached, increment the value of that key, setting it to 1 if there wasn’t any current value\nAlso, if there wasn’t already one, set a “reset at” value in Memcached, using a related key (eg, “#{key}:reset_at“)\nWhen incrementing, if the “reset at” value is in the past, ignore the existing value and set a new “reset at”\nAt the beginning of each request, if the value for the key is above the limit, and “reset at” is in the future, then reject the request\n\n(There might have been more nuance to it, but that’s the main idea.)\n\nHowever, this limiter had two problems:\n\nOur Memcached architecture was due to change. Since it was mostly used as a caching layer, we were going to switch from a single, shared Memcached to one Memcached per datacenter. Although that’d work fine for application caching, it would cause our rate limiter to behave very strangely if client requests were routed to different data centers.\nMemcached “persistence” wasn’t working for us. The Memcached backend was shared by the rate limiter and other application caches which meant that, when it filled up, it would sometimes evict rate limiter data, even when it was still active. (As a result, clients would get “fresh” rate limit windows when they shouldn’t. Sometimes, only one key would be evicted – they’d keep the same “used” value, but get new, future, “reset at” values!)\n\nThe proposed solution\n\nAfter some discussion, we decided on a new design for the rate limiter:\n\nUse Redis, since it has a more appropriate persistence system and simple sharding and replication setups\nShard inside the application: the app would pick, for each key, which Redis cluster to read and write from\nTo mitigate the CPU-bound nature of Redis, put a single primary (for writes) and several replicas (for reads) in each cluster\nInstead of writing “reset at” in the database, use Redis expiration to make values disappear when they no longer apply\nImplement the storage logic in Lua, to guarantee atomicity of operations (this was an improvement over the previous design)\n\nOne option we considered but decided against was using our MySQL-backed KV store (GitHub::KV) for storage. We didn’t want to add traffic to already-busy MySQL primaries: usually, we use replicas for GET requests, but rate limit updates would require write access to a primary. By choosing a different storage backend, we could avoid the additional (and substantial) write traffic to MySQL.\n\nAnother advantage to using Redis is that it’s a well-traveled path. We could take inspiration from two excellent existing resources:\n\nRedis’s own documentation, which includes some rate limiter patterns\nStripe’s technical blog post, “Scaling your API with Rate Limiters”, which includes a Ruby and Redis example implementation", "segmentation_method": "reviewed_source_semantics", "label": "开篇:About a year ago, we migrated an old rate limiter in order t — The proposed solution", "source_line_range": [ 1, 36 ] }, { "id": "body-region-2", "text": "the release to roll out this change we isolated the current persistence logic into a memcachedbackend class and built a new redisbackend class for the rate limiter we used a feature flag to gate access to the new backend this allowed us to gradually increase the percentage of clients using the new backend we could change the percentage without a deploy which meant if something went wrong we could quickly switch back to the old implementation the release went smoothly and when it was done we removed the feature flag and the memcachedbackend class and integrated redisbackend directly with the throttler class that delegated to it then the bug reports started flowing in the bugs a lot of integrators watch their rate limit usage very closely we got two really interesting bug reports in the weeks following our release some clients observed that their x ratelimit reset header value wobbled it might show 2020 01 01 10 00 00 for one request but 2020 01 01 10 00 01 on another request with one second difference some clients had their requests rejected for being over the limit but the response headers said x ratelimit remaining 5000 that didn t make sense if they had a full rate limit window ahead of them why was the request rejected how odd", "source_text": "The release\n\nTo roll out this change, we isolated the current persistence logic into a MemcachedBackend class, and built a new RedisBackend class for the rate limiter. We used a feature flag to gate access to the new backend. This allowed us to gradually increase the percentage of clients using the new backend. We could change the percentage without a deploy, which meant, if something went wrong, we could quickly switch back to the old implementation.\n\nThe release went smoothly, and when it was done, we removed the feature flag and the MemcachedBackend class, and integrated RedisBackend directly with the Throttler class that delegated to it.\n\nThen, the bug reports started flowing in….\n\nThe bugs\n\nA lot of integrators watch their rate limit usage very closely. We got two really interesting bug reports in the weeks following our release:\n\nSome clients observed that their X-RateLimit-Reset header value “wobbled” – it might show 2020-01-01 10:00:00 for one request, but 2020-01-01 10:00:01 on another request (with one second difference).\nSome clients had their requests rejected for being over the limit, but the response headers said X-RateLimit-Remaining: 5000. That didn’t make sense: if they had a full rate limit window ahead of them, why was the request rejected?\n\nHow odd!", "segmentation_method": "reviewed_source_semantics", "label": "The release — The bugs", "source_line_range": [ 37, 53 ] }, { "id": "body-region-3", "text": "fix 1 manage reset at in application code we were optimistic about using redis s built in time to live ttl to implement our reset at feature but it turns out my implementation caused the wobble described above the lua script returned the ttl of the client s rate limit value and then in ruby it was added to time now to i to get a timestamp for the x ratelimit reset header the problem was time passes between the call to ttl in redis and time now to i in ruby depending exactly how much time and where it fell on the clock s second boundary the resulting timestamp might be different for example consider the following calls redis call begins latency ttl redis latency time now returns sum of ttl and time now 10 00 04 2 0 1 5 0 1 10 00 05 4 10 00 10 1 then a half second later 10 00 05 9 0 05 5 0 1 10 00 06 05 10 00 11 05 in that case since the second boundary happened between the call to ttl and time now the resulting timestamp was one second bigger than the previous ones we could have tried increasing the precision of this operation eg redis pttl but there would still have been some wobble even if it was greatly reduced another possibility was to calculate the time using only redis instead of mixing ruby and redis calls to create it redis s time command could have been used as the source of truth old redis versions didn t allow time in lua scripts but redis 5 does we avoided this design because it would have been harder to test by using ruby s time as the source of truth i could time travel in my tests with timecop asserting that expired keys were handled correctly without actually waiting for redis s calls to the system clock to return true future times i still had to wait on redis to test the expire based database cleanup but since expires at came from ruby land i could inject very short expiration windows to simplify testing instead we decided to persist the reset at time from ruby in the database that way we could be sure it wouldn t wobble wobbling was an effect of the calculation but reading from the database would guarantee a stable value instead of reading ttl from redis we stored another value in the database effectively doubling our storage footprint but ok we still applied a ttl to rate limit keys but they were set for one second after the reset at time that way we could use redis s own semantics to clean up dead rate limit windows", "source_text": "Fix 1: Manage “reset at” in application code\n\nWe were optimistic about using Redis’s built-in time-to-live (TTL) to implement our “reset at” feature. But it turns out, my implementation caused the “wobble” described above.\n\nThe Lua script returned the TTL of the client’s rate limit value, and then in Ruby, it was added to Time.now.to_i to get a timestamp for the X-RateLimit-Reset header. The problem was, time passes between the call to TTL (in Redis) and Time.now.to_i (in Ruby). Depending exactly how much time, and where it fell on the clock’s second boundary, the resulting timestamp might be different. For example, consider the following calls:\n\nRedis call begins\tlatency\tTTL (Redis)\tlatency\tTime.now returns\tsum of TTL and Time.now\n10:00:04.2\t0.1\t5\t0.1\t10:00:05.4\t10:00:10.1\n(then, a half-second later)\t\t\t\t\t\n10:00:05.9\t0.05\t5\t0.1\t10:00:06.05\t10:00:11.05\n\nIn that case, since the second boundary happened between the call to TTL and Time.now, the resulting timestamp was one second bigger than the previous ones.\n\nWe could have tried increasing the precision of this operation (eg, Redis PTTL), but there would still have been some wobble, even if it was greatly reduced.\n\nAnother possibility was to calculate the time using only Redis, instead of mixing Ruby and Redis calls to create it. Redis’s TIME command could have been used as the source of truth. (Old Redis versions didn’t allow TIME in Lua scripts, but Redis 5+ does.) We avoided this design because it would have been harder to test: by using Ruby’s time as the source of truth, I could time-travel in my tests with Timecop, asserting that expired keys were handled correctly without actually waiting for Redis’s calls to the system clock to return true, future times. (I still had to wait on Redis to test the EXPIRE-based database cleanup, but since expires_at came from Ruby-land, I could inject very short expiration windows to simplify testing.)\n\nInstead, we decided to persist the “reset at” time from Ruby in the database. That way, we could be sure it wouldn’t wobble. (Wobbling was an effect of the calculation – but reading from the database would guarantee a stable value.) Instead of reading TTL from Redis, we stored another value in the database (effectively doubling our storage footprint, but OK).\n\nWe still applied a TTL to rate limit keys, but they were set for one second after the “reset at” time. That way, we could use Redis’s own semantics to clean up “dead” rate limit windows.", "segmentation_method": "reviewed_source_semantics", "label": "Fix 1: Manage “reset at” in application code", "source_line_range": [ 54, 74 ] }, { "id": "body-region-4", "text": "fix 2 account for expiration in replicas weirdly many clients reported rejections that included x ratelimit remaining 5000 headers what s going on we found another problem that worked like this at the beginning of the request check the client s current rate limit value if it s over the maximum allowed limit prepare a rejection response before delivering the response increment the current rate limit value and use the response to populate the x ratelimit headers well it turned out that step 1 above hit a redis replica since it was a read operation the read operation returned information about the client s previous window and the application prepared a rejection response then step 2 would hit a redis primary during that database call redis would expire the previous window data and return data for a fresh rate limit this is a known limitation of redis replicas don t expire data until they receive instructions to do so from their primaries and primaries don t expire keys until they re accessed github issue in fact primaries do randomly sample keys from time to time expiring them as appropriate see how redis expires keys addressing this issue required two things basically the same fix as above instead of relying on redis s ttl to expire old rate limit windows we needed to manage that feature in the application the application should be prepared to read stale data from replicas then ignore it even after fixing that a better design was required in the case of rate limited requests we should avoid a second call to the database the client s window might expire between the two calls resulting in the kind of inconsistent response described above this fix required improving the ruby code that prepared responses so that the response from step 1 above was used to populate x ratelimit headers", "source_text": "Fix 2: Account for expiration in replicas\n\nWeirdly, many clients reported rejections that included X-RateLimit-Remaining: 5000 headers. What’s going on!?\n\nWe found another problem that worked like this:\n\nAt the beginning of the request, check the client’s current rate limit value. If it’s over the maximum allowed limit, prepare a rejection response.\nBefore delivering the response, increment the current rate limit value, and use the response to populate the X-RateLimit-... headers.\n\nWell, it turned out that Step 1 above hit a Redis replica, since it was a read operation. The read operation returned information about the client’s previous window, and the application prepared a rejection response.\n\nThen, Step 2 would hit a Redis primary. During that database call, Redis would expire the previous window data and return data for a fresh rate limit. This is a known limitation of Redis: replicas don’t expire data until they receive instructions to do so from their primaries, and primaries don’t expire keys until they’re accessed (GitHub issue). (In fact, primaries do randomly sample keys from time to time, expiring them as appropriate, see “How Redis Expires Keys”.)\n\nAddressing this issue required two things:\n\nBasically, the same fix as above: instead of relying on Redis’s TTL to expire old rate limit windows, we needed to manage that feature in the application. (The application should be prepared to read stale data from replicas, then ignore it.)\nEven after fixing that, a better design was required: in the case of rate-limited requests, we should avoid a second call to the database. The client’s window might expire between the two calls, resulting in the kind of inconsistent response described above. This fix required improving the Ruby code that prepared responses so that the response from Step 1 above was used to populate X-RateLimit-... headers.", "segmentation_method": "reviewed_source_semantics", "label": "Fix 2: Account for expiration in replicas", "source_line_range": [ 75, 92 ] }, { "id": "body-region-5", "text": "the final scripts here are the lua scripts we ended up with for implementing this pattern rate script count a request for a client and return the current state for the client rename the inputs for clarity below local rate limit key keys 1 local increment amount tonumber argv 1 local next expires at tonumber argv 2 local current time tonumber argv 3 local expires at key rate limit key exp local expires at tonumber redis call get expires at key if not expires at or expires at current time then this is either a brand new window or this window has closed but redis hasn t cleaned up the key yet redis will clean it up in one more second initialize a new rate limit window redis call set rate limit key 0 redis call set expires at key next expires at tell redis to clean this up one second after the expires at time that way clock differences between ruby and redis won t cause data to disappear redis will only clean up these keys long after the window has passed redis call expireat rate limit key next expires at 1 redis call expireat expires at key next expires at 1 since the database was updated return the new value expires at next expires at end now that the window is either known to already exist or be freshly initialized increment the counter incrby returns a number local current redis call incrby rate limit key increment amount return current expires at check script getting both the value and the expiration of key as needed by our algorithm needs to be ran in an atomic way hence the script rename the inputs for clarity below local rate limit key keys 1 local expires at key rate limit key exp local current time tonumber argv 1 local tries tonumber redis call get rate limit key local expires at nil maybe overridden below if not tries then this client hasn t initialized a window yet let this fall through to returning nil nil where the application will provide defaults else we found a number of tries now check if this window is actually expired expires at tonumber redis call get expires at key if not expires at or expires at current time then this window hasn t been cleaned up by redis yet but it has closed maybe it was partly cleaned up if we found tries but not expires at ignore the data in the database return a fresh window instead tries nil expires at nil end end maybe nil nil if the window is brand new or expired return tries expires at conclusion we ve learned a lot from this new approach but there s still one shortcoming we re considering the current implementation doesn t increment the current rate limit value until after the request is finished we do this because we don t charge clients for 304 not modified responses this can happen when the client provides an e tag a better implementation might increment the value when the request starts then refunds the client if the response is 304 that would prevent some edge cases where a client can exceed its limit when the final allowed request is still being processed after working out the issues described in this post the new rate limiter has worked great it has improved reliability fixed issues for clients and reduced our support load eventually and the architecture is ready for our next wave of platform improvements", "source_text": "The final scripts\n\nHere are the Lua scripts we ended up with for implementing this pattern:\n\nRATE_SCRIPT:\n-- count a request for a client\n-- and return the current state for the client\n-- rename the inputs for clarity below\nlocal rate_limit_key = KEYS[1]\nlocal increment_amount = tonumber(ARGV[1])\nlocal next_expires_at = tonumber(ARGV[2])\nlocal current_time = tonumber(ARGV[3])\nlocal expires_at_key = rate_limit_key .. \":exp\"\nlocal expires_at = tonumber(redis.call(\"get\", expires_at_key))\nif not expires_at or expires_at < current_time then\n -- this is either a brand new window,\n -- or this window has closed, but redis hasn't cleaned up the key yet\n -- (redis will clean it up in one more second)\n -- initialize a new rate limit window\n redis.call(\"set\", rate_limit_key, 0)\n redis.call(\"set\", expires_at_key, next_expires_at)\n -- tell Redis to clean this up _one second after_ the expires-at time.\n -- that way, clock differences between Ruby and Redis won't cause data to disappear.\n -- (Redis will only clean up these keys \"long after\" the window has passed)\n redis.call(\"expireat\", rate_limit_key, next_expires_at + 1)\n redis.call(\"expireat\", expires_at_key, next_expires_at + 1)\n -- since the database was updated, return the new value\n expires_at = next_expires_at\nend\n-- Now that the window is either known to already exist _or_ be freshly initialized,\n-- increment the counter (`incrby` returns a number)\nlocal current = redis.call(\"incrby\", rate_limit_key, increment_amount)\nreturn { current, expires_at }\n\n-- CHECK_SCRIPT:\n-- Getting both the value and the expiration\n-- of key as needed by our algorithm needs to be ran\n-- in an atomic way, hence the script.\n\n-- rename the inputs for clarity below\nlocal rate_limit_key = KEYS[1]\nlocal expires_at_key = rate_limit_key .. \":exp\"\nlocal current_time = tonumber(ARGV[1])\nlocal tries = tonumber(redis.call(\"get\", rate_limit_key))\nlocal expires_at = nil -- maybe overridden below\nif not tries then\n -- this client hasn't initialized a window yet\n -- let this fall through to returning {nil, nil},\n -- where the application will provide defaults\nelse\n -- we found a number of tries, now check\n -- if this window is actually expired\n expires_at = tonumber(redis.call(\"get\", expires_at_key))\n if not expires_at or expires_at < current_time then\n -- this window hasn't been cleaned up by Redis yet, but it has closed.\n -- (maybe it was _partly_ cleaned up, if we found `tries` but not `expires_at`)\n -- ignore the data in the database; return a fresh window instead\n tries = nil\n expires_at = nil\n end\nend\n-- Maybe {nil, nil} if the window is brand new (or expired)\nreturn { tries, expires_at }\n\n\nConclusion\n\nWe’ve learned a lot from this new approach, but there’s still one shortcoming we’re considering: the current implementation doesn’t increment the “current” rate limit value until after the request is finished. We do this because we don’t charge clients for 304 Not Modified responses (this can happen when the client provides an E-Tag). A better implementation might increment the value when the request starts, then refunds the client if the response is 304. That would prevent some edge cases where a client can exceed its limit when the final allowed request is still being processed.\n\nAfter working out the issues described in this post, the new rate limiter has worked great. It has improved reliability, fixed issues for clients, and reduced our support load (eventually ) and the architecture is ready for our next wave of platform improvements.", "segmentation_method": "reviewed_source_semantics", "label": "The final scripts — Conclusion", "source_line_range": [ 93, 162 ] } ], "ending": { "text": "ad (eventually ) and the architecture is ready for our next wave of platform improvements." } } }, { "id": "article-055", "name": "Reducing Slack’s memory footprint", "url": "https://slack.engineering/reducing-slacks-memory-footprint/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Reducing Slack’s memory footprint" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Johnny Rodgers" ] }, { "id": "stable-3", "alternatives": [ "Principal Engineer" ] }, { "id": "stable-4", "alternatives": [ "Charlie Hess" ] }, { "id": "stable-5", "alternatives": [ "Software Engineer" ] }, { "id": "stable-6", "alternatives": [ "Raissa Largman" ] }, { "id": "stable-7", "alternatives": [ "Staff Software Engineer" ] }, { "id": "stable-8", "alternatives": [ "Jamie Scheinblum" ] }, { "id": "stable-9", "alternatives": [ "Chris Sullivan" ] }, { "id": "stable-10", "alternatives": [ "Sr. Staff Software Engineer" ] }, { "id": "stable-11", "alternatives": [ "“Female track athletes at starting line” by tableatny (cc-by)" ] }, { "id": "stable-12", "alternatives": [ "Slack Engineering" ] }, { "id": "stable-13", "alternatives": [ "SEARCH" ] }, { "id": "stable-14", "alternatives": [ "LATEST POSTS" ] }, { "id": "stable-15", "alternatives": [ "ARCHIVES" ] }, { "id": "stable-16", "alternatives": [ "APPLY NOW" ] }, { "id": "stable-17", "alternatives": [ "Want to help Slack solve tough problems and join our growing team? Check out all our engineering jobs and apply today." ] }, { "id": "stable-18", "alternatives": [ "javascript" ] }, { "id": "stable-19", "alternatives": [ "performance" ] }, { "id": "stable-21", "alternatives": [ "PREVIOUS POST" ] }, { "id": "stable-22", "alternatives": [ "NEXT POST" ] }, { "id": "stable-23", "alternatives": [ "Recommended Reading" ] }, { "id": "stable-24", "alternatives": [ "ARTICLES" ] }, { "id": "stable-25", "alternatives": [ "CAREERS" ] }, { "id": "stable-26", "alternatives": [ "SLACK DEVELOPER BLOG" ] }, { "id": "stable-27", "alternatives": [ "THE SLACK BLOG" ] }, { "id": "stable-28", "alternatives": [ "Terms of Service" ] }, { "id": "stable-29", "alternatives": [ "Privacy Information" ] }, { "id": "stable-30", "alternatives": [ "Cookie Preferences" ] }, { "id": "stable-31", "alternatives": [ "Your Privacy Choices" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Reducing Slack’s memory footprint" ], "html_selector": "h1.ts-jumbo,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-055/comment-qualification-reference-r5.json", "sha256": "9b926a871a62e2b56ddc0d907cb0307c92f9efbd389491c9347fe525b40627b4", "chars": 789, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Our desktop app is the most widely used and most capable Slack client that we offer. For many of our customers, it is one of just a few apps they keep open on their computer throughout the work day. It allows them to communicate and work with all the teams they belong to: reading and writing messages, composing posts, uploading files, taking calls, and responding to notifications.\n\nHowever, these capabilities come at a cost: the desktop client can use a lot of memory. This memory footprint increases as the user signs into more teams, as each team runs in its own webview. More memory usage means worse performance, degrading our customer’s experience of Slack and their other applications.\n\nWork is underway to fix the underlying factors affecting client memory consumption, but in the meantime we’ve built a tiny new Slack client to help address this issue. It is loaded silently in place of the teams that you haven’t looked at in a while. This background client does just a few things:\n\nupdates your unread indicator and notification badge in the team sidebar\ndisplays desktop notifications (that you can click on and reply to as normal)\nconsumes as little memory as possible\n\nTo achieve this we had to teach our servers to be smarter, and to design a thin client that did just enough work to keep your work day flowing.\n\nThe problem\n\nAt the time of writing, about 36% of active Slack users are signed into more than one team in the desktop app. 17% are signed into 3 or more teams, and 5% are signed into 5 or more teams. Each of these teams is running the full JavaScript web application and maintaining and updating the DOM tree as the state of the team changes. This application can consume between ~130MB (p10) and ~960MB (p99) of memory depending on team activity and UI state.\n\nDistribution of memory usage at p10, p50, p90, and p99 for a single team. Collected using a 10% sample of all teams.\n\nOur data tells us that most people who are signed into multiple teams have 1 or 2 that they actively pay attention to during their work day while they check the others less frequently. Regardless of usage, each of these teams eats up a full quota of memory.\n\nA tiny client\n\nThis got us thinking: what is the lightest weight client we could build that could do everything you needed it to do while it was in the background: maintain your presence, display notifications, and keep your unreads and badges up to date?\n\nWe explored several options, including:\n\nunload the DOM for backgrounded teams\npackage a client out of a subset of our JavaScript concerned with just model and notification logic\nbuild a stripped-down client specifically for this purpose\n\nOur exploration indicated that the first two options either didn’t make the impact on memory usage that we were targeting, or increased the complexity of implementation for our primary client unacceptably. So we decided on the third option and built a thin client that maintains minimal state and only presents data as transmitted by the server.\n\nThe aspect of the project concerned with reclaiming resources from backgrounded views isn’t original. Chrome takes a similar approach to tab discarding in order to recover memory from backgrounded tabs, and several popular browser extensions similarly suspend memory-hungry tabs that haven’t been viewed recently.\n\nRedrawing the map\n\nIn order for our new client to be as thin and lightweight as we needed it to be, we had to teach the server to do a lot of work that was previously the responsibility of the client.\n\nFor example, the server now needs to know:\n\nHow to calculate a user’s notification count\nWhich messages qualify for desktop notifications (and how to format those notifications for consumption by the desktop client)\nWhether the user had any unreads across all of their channels and direct messages\n\nAnd it needs to do all this with full awareness of the impact of various team and user preferences and states on the above. Slack is known for its granular and powerful notification preferences — which is great for customers but meant we needed to migrate a good deal of client-side logic to the server:\n\nWorkflow diagram encompassing all the considerations that go into whether to notify a user about a message.\n\nWe developed two pieces of infrastructure to achieve these new requirements.\n\nAn API endpoint that returns whether a user has_unreads and their mention_count. It stores this data in memcache for rapid retrieval. The tiny client polls this endpoint to keep the team sidebar up to date for backgrounded teams.\nNew logic in the server-side message processing code to convert notification-causing messages into a new desktop_notification message type, which is then distributed over the websocket. Currently, only the tiny client pays attention to this type of message. The client uses the payload of this message to pop a desktop notification if the user has notifications enabled.\n\nThe team sidebar in the desktop app displays an unread indicator and a notification badge.\n\nThe tiny client can utilize these tools to do precisely the things it needs to while running in the background: keep your team sidebar up to date with your unread and badge count, and display notifications as the full client does. The client itself is a single JavaScript file of about 1200 lines of unminified code. It keeps just enough model and state data in order to achieve its purposes, and is replaced with the full web application when the team is foregrounded.\n\nSwapping between clients is managed by the desktop application, which monitors team usage and time elapsed since a team was last checked. We measure both which teams you use most often, and those you’ve checked recently, and after a period of inactivity unload those teams that are less likely to be foregrounded.\n\nResults\n\nThe minimal client dramatically reduces the memory required to run a team in the Slack desktop application, as shown below. This helps to reduce the overall footprint of the app and release resources back to the operating system to improve performance for the teams you are actively using.\n\nComparison of memory usage at p10, p50, p90, and p99 for a single team running the full client (left) and minimal client (right). Collected using a 10% sample of all teams.\n\nWhat’s next?\n\nWe are actively working on a number of projects to reduce the memory footprint of the full client. These in-flight efforts include:\n\nRefactoring the JavaScript codebase to more clearly separate concerns and make each layer more efficient.\nMigrating to an incomplete model of all team data (fetched on demand rather than up front). This is already the case for users and bots.\nSwitching to subscription models for high volume events (for example: user presence changes).\nAdopting reactive UI components to reduce churn in the DOM. This is already the case for the Emoji Picker.\nExploring running all teams in a shared context to eliminate the overhead of one webview per team.\n\nIn the meantime, we hope our tiny new client will ease the burden on our customer’s computers and improve their experience of Slack.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "our desktop app is the most widely used and most capable slack client that we offer for many of our customers it is one of just a few apps they keep open on their computer throughout the work day it allows them to communicate and work with all the teams they belong to reading and writing messages composing posts uploading files taking calls and responding to notifications however these capabilities come at a cost the desktop client can use a lot of memory this memory footprint increases as the user signs into more teams as each team runs in its own webview more memory usage means worse performance degrading our customer s experience of slack and their other applications work is underway to fix the underlying factors affecting client memory consumption but in the meantime we ve built a tiny new slack client to help address this issue it is loaded silently in place of the teams that you haven t looked at in a while this background client does just a few things updates your unread indicator and notification badge in the team sidebar displays desktop notifications that you can click on and reply to as normal consumes as little memory as possible to achieve this we had to teach our servers to be smarter and to design a thin client that did just enough work to keep your work day flowing", "source_text": "Our desktop app is the most widely used and most capable Slack client that we offer. For many of our customers, it is one of just a few apps they keep open on their computer throughout the work day. It allows them to communicate and work with all the teams they belong to: reading and writing messages, composing posts, uploading files, taking calls, and responding to notifications.\n\nHowever, these capabilities come at a cost: the desktop client can use a lot of memory. This memory footprint increases as the user signs into more teams, as each team runs in its own webview. More memory usage means worse performance, degrading our customer’s experience of Slack and their other applications.\n\nWork is underway to fix the underlying factors affecting client memory consumption, but in the meantime we’ve built a tiny new Slack client to help address this issue. It is loaded silently in place of the teams that you haven’t looked at in a while. This background client does just a few things:\n\nupdates your unread indicator and notification badge in the team sidebar\ndisplays desktop notifications (that you can click on and reply to as normal)\nconsumes as little memory as possible\n\nTo achieve this we had to teach our servers to be smarter, and to design a thin client that did just enough work to keep your work day flowing.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Our desktop app is the most widely used and most capable Sla", "source_line_range": [ 1, 12 ] }, { "id": "body-region-2", "text": "the problem at the time of writing about 36 of active slack users are signed into more than one team in the desktop app 17 are signed into 3 or more teams and 5 are signed into 5 or more teams each of these teams is running the full javascript web application and maintaining and updating the dom tree as the state of the team changes this application can consume between 130mb p10 and 960mb p99 of memory depending on team activity and ui state distribution of memory usage at p10 p50 p90 and p99 for a single team collected using a 10 sample of all teams our data tells us that most people who are signed into multiple teams have 1 or 2 that they actively pay attention to during their work day while they check the others less frequently regardless of usage each of these teams eats up a full quota of memory a tiny client this got us thinking what is the lightest weight client we could build that could do everything you needed it to do while it was in the background maintain your presence display notifications and keep your unreads and badges up to date we explored several options including unload the dom for backgrounded teams package a client out of a subset of our javascript concerned with just model and notification logic build a stripped down client specifically for this purpose our exploration indicated that the first two options either didn t make the impact on memory usage that we were targeting or increased the complexity of implementation for our primary client unacceptably so we decided on the third option and built a thin client that maintains minimal state and only presents data as transmitted by the server the aspect of the project concerned with reclaiming resources from backgrounded views isn t original chrome takes a similar approach to tab discarding in order to recover memory from backgrounded tabs and several popular browser extensions similarly suspend memory hungry tabs that haven t been viewed recently", "source_text": "The problem\n\nAt the time of writing, about 36% of active Slack users are signed into more than one team in the desktop app. 17% are signed into 3 or more teams, and 5% are signed into 5 or more teams. Each of these teams is running the full JavaScript web application and maintaining and updating the DOM tree as the state of the team changes. This application can consume between ~130MB (p10) and ~960MB (p99) of memory depending on team activity and UI state.\n\nDistribution of memory usage at p10, p50, p90, and p99 for a single team. Collected using a 10% sample of all teams.\n\nOur data tells us that most people who are signed into multiple teams have 1 or 2 that they actively pay attention to during their work day while they check the others less frequently. Regardless of usage, each of these teams eats up a full quota of memory.\n\nA tiny client\n\nThis got us thinking: what is the lightest weight client we could build that could do everything you needed it to do while it was in the background: maintain your presence, display notifications, and keep your unreads and badges up to date?\n\nWe explored several options, including:\n\nunload the DOM for backgrounded teams\npackage a client out of a subset of our JavaScript concerned with just model and notification logic\nbuild a stripped-down client specifically for this purpose\n\nOur exploration indicated that the first two options either didn’t make the impact on memory usage that we were targeting, or increased the complexity of implementation for our primary client unacceptably. So we decided on the third option and built a thin client that maintains minimal state and only presents data as transmitted by the server.\n\nThe aspect of the project concerned with reclaiming resources from backgrounded views isn’t original. Chrome takes a similar approach to tab discarding in order to recover memory from backgrounded tabs, and several popular browser extensions similarly suspend memory-hungry tabs that haven’t been viewed recently.", "segmentation_method": "reviewed_source_semantics", "label": "The problem — A tiny client", "source_line_range": [ 13, 34 ] }, { "id": "body-region-3", "text": "redrawing the map in order for our new client to be as thin and lightweight as we needed it to be we had to teach the server to do a lot of work that was previously the responsibility of the client for example the server now needs to know how to calculate a user s notification count which messages qualify for desktop notifications and how to format those notifications for consumption by the desktop client whether the user had any unreads across all of their channels and direct messages and it needs to do all this with full awareness of the impact of various team and user preferences and states on the above slack is known for its granular and powerful notification preferences which is great for customers but meant we needed to migrate a good deal of client side logic to the server workflow diagram encompassing all the considerations that go into whether to notify a user about a message we developed two pieces of infrastructure to achieve these new requirements an api endpoint that returns whether a user has unreads and their mention count it stores this data in memcache for rapid retrieval the tiny client polls this endpoint to keep the team sidebar up to date for backgrounded teams new logic in the server side message processing code to convert notification causing messages into a new desktop notification message type which is then distributed over the websocket currently only the tiny client pays attention to this type of message the client uses the payload of this message to pop a desktop notification if the user has notifications enabled the team sidebar in the desktop app displays an unread indicator and a notification badge the tiny client can utilize these tools to do precisely the things it needs to while running in the background keep your team sidebar up to date with your unread and badge count and display notifications as the full client does the client itself is a single javascript file of about 1200 lines of unminified code it keeps just enough model and state data in order to achieve its purposes and is replaced with the full web application when the team is foregrounded swapping between clients is managed by the desktop application which monitors team usage and time elapsed since a team was last checked we measure both which teams you use most often and those you ve checked recently and after a period of inactivity unload those teams that are less likely to be foregrounded", "source_text": "Redrawing the map\n\nIn order for our new client to be as thin and lightweight as we needed it to be, we had to teach the server to do a lot of work that was previously the responsibility of the client.\n\nFor example, the server now needs to know:\n\nHow to calculate a user’s notification count\nWhich messages qualify for desktop notifications (and how to format those notifications for consumption by the desktop client)\nWhether the user had any unreads across all of their channels and direct messages\n\nAnd it needs to do all this with full awareness of the impact of various team and user preferences and states on the above. Slack is known for its granular and powerful notification preferences — which is great for customers but meant we needed to migrate a good deal of client-side logic to the server:\n\nWorkflow diagram encompassing all the considerations that go into whether to notify a user about a message.\n\nWe developed two pieces of infrastructure to achieve these new requirements.\n\nAn API endpoint that returns whether a user has_unreads and their mention_count. It stores this data in memcache for rapid retrieval. The tiny client polls this endpoint to keep the team sidebar up to date for backgrounded teams.\nNew logic in the server-side message processing code to convert notification-causing messages into a new desktop_notification message type, which is then distributed over the websocket. Currently, only the tiny client pays attention to this type of message. The client uses the payload of this message to pop a desktop notification if the user has notifications enabled.\n\nThe team sidebar in the desktop app displays an unread indicator and a notification badge.\n\nThe tiny client can utilize these tools to do precisely the things it needs to while running in the background: keep your team sidebar up to date with your unread and badge count, and display notifications as the full client does. The client itself is a single JavaScript file of about 1200 lines of unminified code. It keeps just enough model and state data in order to achieve its purposes, and is replaced with the full web application when the team is foregrounded.\n\nSwapping between clients is managed by the desktop application, which monitors team usage and time elapsed since a team was last checked. We measure both which teams you use most often, and those you’ve checked recently, and after a period of inactivity unload those teams that are less likely to be foregrounded.", "segmentation_method": "reviewed_source_semantics", "label": "Redrawing the map", "source_line_range": [ 35, 59 ] }, { "id": "body-region-4", "text": "results the minimal client dramatically reduces the memory required to run a team in the slack desktop application as shown below this helps to reduce the overall footprint of the app and release resources back to the operating system to improve performance for the teams you are actively using comparison of memory usage at p10 p50 p90 and p99 for a single team running the full client left and minimal client right collected using a 10 sample of all teams", "source_text": "Results\n\nThe minimal client dramatically reduces the memory required to run a team in the Slack desktop application, as shown below. This helps to reduce the overall footprint of the app and release resources back to the operating system to improve performance for the teams you are actively using.\n\nComparison of memory usage at p10, p50, p90, and p99 for a single team running the full client (left) and minimal client (right). Collected using a 10% sample of all teams.", "segmentation_method": "reviewed_source_semantics", "label": "Results", "source_line_range": [ 60, 65 ] }, { "id": "body-region-5", "text": "what s next we are actively working on a number of projects to reduce the memory footprint of the full client these in flight efforts include refactoring the javascript codebase to more clearly separate concerns and make each layer more efficient migrating to an incomplete model of all team data fetched on demand rather than up front this is already the case for users and bots switching to subscription models for high volume events for example user presence changes adopting reactive ui components to reduce churn in the dom this is already the case for the emoji picker exploring running all teams in a shared context to eliminate the overhead of one webview per team in the meantime we hope our tiny new client will ease the burden on our customer s computers and improve their experience of slack", "source_text": "What’s next?\n\nWe are actively working on a number of projects to reduce the memory footprint of the full client. These in-flight efforts include:\n\nRefactoring the JavaScript codebase to more clearly separate concerns and make each layer more efficient.\nMigrating to an incomplete model of all team data (fetched on demand rather than up front). This is already the case for users and bots.\nSwitching to subscription models for high volume events (for example: user presence changes).\nAdopting reactive UI components to reduce churn in the DOM. This is already the case for the Emoji Picker.\nExploring running all teams in a shared context to eliminate the overhead of one webview per team.\n\nIn the meantime, we hope our tiny new client will ease the burden on our customer’s computers and improve their experience of Slack.", "segmentation_method": "reviewed_source_semantics", "label": "What’s next?", "source_line_range": [ 66, 76 ] } ], "ending": { "text": "nt will ease the burden on our customer’s computers and improve their experience of Slack." } } }, { "id": "article-056", "name": "How Discord Stores Trillions of Messages", "url": "https://discord.com/blog/how-discord-stores-trillions-of-messages", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How Discord Stores Trillions of Messages" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Bo Ingram" ] }, { "id": "stable-3", "alternatives": [ "Senior Staff Software Engineer" ] }, { "id": "stable-4", "alternatives": [ "Download" ] }, { "id": "stable-5", "alternatives": [ "Nitro" ] }, { "id": "stable-6", "alternatives": [ "Discover" ] }, { "id": "stable-7", "alternatives": [ "Safety" ] }, { "id": "stable-8", "alternatives": [ "Quests" ] }, { "id": "stable-9", "alternatives": [ "Support" ] }, { "id": "stable-10", "alternatives": [ "Blog" ] }, { "id": "stable-11", "alternatives": [ "Developers" ] }, { "id": "stable-12", "alternatives": [ "Careers" ] }, { "id": "stable-13", "alternatives": [ "Log In" ] }, { "id": "stable-14", "alternatives": [ "Engineering & Developers" ] }, { "id": "stable-15", "alternatives": [ "RELATED ARTICLES" ] }, { "id": "stable-16", "alternatives": [ "Search…" ], "visible_control": { "selector": "#search", "attribute": "placeholder" } }, { "id": "stable-17", "alternatives": [ "Language" ] }, { "id": "stable-18", "alternatives": [ "English" ] }, { "id": "stable-19", "alternatives": [ "Social" ] }, { "id": "stable-20", "alternatives": [ "Product" ] }, { "id": "stable-21", "alternatives": [ "Status" ] }, { "id": "stable-22", "alternatives": [ "App Directory" ] }, { "id": "stable-23", "alternatives": [ "Gift Cards" ] }, { "id": "stable-24", "alternatives": [ "Company" ] }, { "id": "stable-25", "alternatives": [ "About" ] }, { "id": "stable-26", "alternatives": [ "Jobs" ] }, { "id": "stable-27", "alternatives": [ "Brand" ] }, { "id": "stable-28", "alternatives": [ "Newsroom" ] }, { "id": "stable-29", "alternatives": [ "Resources" ] }, { "id": "stable-30", "alternatives": [ "Creators" ] }, { "id": "stable-31", "alternatives": [ "Community" ] }, { "id": "stable-32", "alternatives": [ "Official 3rd Party Merch" ] }, { "id": "stable-33", "alternatives": [ "Feedback" ] }, { "id": "stable-34", "alternatives": [ "Policies" ] }, { "id": "stable-35", "alternatives": [ "Terms" ] }, { "id": "stable-36", "alternatives": [ "Privacy" ] }, { "id": "stable-37", "alternatives": [ "Cookie Settings" ] }, { "id": "stable-38", "alternatives": [ "Guidelines" ] }, { "id": "stable-39", "alternatives": [ "Acknowledgements" ] }, { "id": "stable-40", "alternatives": [ "Licenses" ] }, { "id": "stable-41", "alternatives": [ "Company Information" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How Discord Stores Trillions of Messages" ], "html_selector": "h1.article_heading.is-up-26,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-056/comment-qualification-reference-r5.json", "sha256": "ce86bf031e1e33d048aceb09b6aaad1f7ccbf8b3a3ecbd2e32c837adbe846254", "chars": 795, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "In 2017, we wrote a blog post on how we store billions of messages. We shared our journey of how we started out using MongoDB but migrated our data to Cassandra because we were looking for a database that was scalable, fault-tolerant, and relatively low maintenance. We knew we’d be growing, and we did!\n\nWe wanted a database that grew alongside us, but hopefully, its maintenance needs wouldn’t grow alongside our storage needs. Unfortunately, we found that to not be the case — our Cassandra cluster exhibited serious performance issues that required increasing amounts of effort to just maintain, not improve.\n\nAlmost six years later, we’ve changed a lot, and how we store messages has changed as well.\n‍\n\nOur Cassandra Troubles\n\nWe stored our messages in a database called cassandra-messages. As its name suggests, it ran Cassandra, and it stored messages. In 2017, we ran 12 Cassandra nodes, storing billions of messages.\n\nAt the beginning of 2022, it had 177 nodes with trillions of messages. To our chagrin, it was a high-toil system — our on-call team was frequently paged for issues with the database, latency was unpredictable, and we were having to cut down on maintenance operations that became too expensive to run.\n\nWhat was causing these issues? First, let’s take a look at a message.\n\n\tCREATE TABLE messages (\n\t channel_id bigint,\n\t bucket int,\n\t message_id bigint,\n\t author_id bigint,\n\t content text,\n\t PRIMARY KEY ((channel_id, bucket), message_id)\n\t) WITH CLUSTERING ORDER BY (message_id DESC);\nview raw\ngistfile1.sql hosted with ❤ by GitHub\n\nThe CQL statement above is a minimal version of our message schema. Every ID we use is a Snowflake, making it chronologically sortable. We partition our messages by the channel they’re sent in, along with a bucket, which is a static time window. This partitioning means that, in Cassandra, all messages for a given channel and bucket will be stored together and replicated across three nodes (or whatever you’ve set the replication factor).\n\nWithin this partitioning lies a potential performance pitfall: a server with just a small group of friends tends to send orders of magnitude fewer messages than a server with hundreds of thousands of people.\n\nIn Cassandra, reads are more expensive than writes. Writes are appended to a commit log and written to an in memory structure called a memtable that is eventually flushed to disk. Reads, however, need to query the memtable and potentially multiple SSTables (on-disk files), a more expensive operation. Lots of concurrent reads as users interact with servers can hotspot a partition, which we refer to imaginatively as a “hot partition”.  The size of our dataset when combined with these access patterns led to struggles for our cluster.\n\nWhen we encountered a hot partition, it frequently affected latency across our entire database cluster. One channel and bucket pair received a large amount of traffic, and latency in the node would increase as the node tried harder and harder to serve traffic and fell further and further behind.\n\nOther queries to this node were affected as the node couldn’t keep up. Since we perform reads and writes with quorum consistency level, all queries to the nodes that serve the hot partition suffer latency increases, resulting in broader end-user impact.\n\nCluster maintenance tasks also frequently caused trouble. We were prone to falling behind on compactions, where Cassandra would compact SSTables on disk for more performant reads. Not only were our reads then more expensive, but we’d also see cascading latency as a node tried to compact.\n\nWe frequently performed an operation we called the “gossip dance”, where we’d take a node out of rotation to let it compact without taking traffic, bring it back in to pick up hints from Cassandra’s hinted handoff, and then repeat until the compaction backlog was empty. We also spent a large amount of time tuning the JVM’s garbage collector and heap settings, because GC pauses would cause significant latency spikes.\n‍\n\nChanging Our Architecture\n\nOur messages cluster wasn’t our only Cassandra database. We had several other clusters, and each exhibited similar (though perhaps not as severe) faults.\n\nIn our previous iteration of this post, we mentioned being intrigued by ScyllaDB, a Cassandra-compatible database written in C++. Its promise of better performance, faster repairs, stronger workload isolation via its shard-per-core architecture, and a garbage collection-free life sounded quite appealing.\n\nAlthough ScyllaDB is most definitely not void of issues, it is void of a garbage collector, since it’s written in C++ rather than Java. Historically, our team has had many issues with the garbage collector on Cassandra, from GC pauses affecting latency, all the way to super long consecutive GC pauses that got so bad that an operator would have to manually reboot and babysit the node in question back to health. These issues were a huge source of on-call toil, and the root of many stability issues within our messages cluster.\n\nAfter experimenting with ScyllaDB and observing improvements in testing, we made the decision to migrate all of our databases. While this decision could be a blog post in itself, the short version is that by 2020, we had migrated every database but one to ScyllaDB.\n\nThe last one? Our friend, cassandra-messages.\n\nWhy hadn’t we migrated it yet? To start with, it’s a big cluster. With trillions of messages and nearly 200 nodes, any migration was going to be an involved effort. Additionally, we wanted to make sure our new database could be the best it could be as we worked to tune its performance. We also wanted to gain more experience with ScyllaDB in production, using it in anger and learning its pitfalls.\n\nWe also worked to improve ScyllaDB performance for our use cases. In our testing, we discovered that the performance of reverse queries was insufficient for our needs. We execute a reverse query when we attempt a database scan in the opposite order of a table’s sorting, such as when we scan messages in ascending order. The ScyllaDB team prioritized improvements and implemented performant reverse queries, removing the last database blocker in our migration plan.\n\nWe were suspicious that slapping a new database on our system wasn’t going to make everything magically better. Hot partitions can still be a thing in ScyllaDB, and so we also wanted to invest in improving our systems upstream of the database to help shield and facilitate better database performance.\n‍\n\nData Services Serving Data\n\nWith Cassandra, we struggled with hot partitions. High traffic to a given partition resulted in unbounded concurrency, leading to cascading latency in which subsequent queries would continue to grow in latency. If we could control the amount of concurrent traffic to hot partitions, we could protect the database from being overwhelmed.\n\nTo accomplish this task, we wrote what we refer to as data services — intermediary services that sit between our API monolith and our database clusters. When writing our data services, we chose a language we’ve been using more and more at Discord: Rust! We’d used it for a few projects previously, and it lived up to the hype for us. It gave us fast C/C++ speeds without having to sacrifice safety.\n\nRust touts fearless concurrency as one of its main benefits — the language should make it easy to write safe, concurrent code. Its libraries also were a great match for what we were intending to accomplish. The Tokio ecosystem is a tremendous foundation for building a system on asynchronous I/O, and the language has driver support for both Cassandra and ScyllaDB.\n\nAdditionally, we found it a joy to code in with the help the compiler gives you, the clarity of the error messages, the language constructs, and its emphasis on safety. We became quite fond of how once it compiled, it generally works. Most importantly, however, it lets us say we rewrote it in Rust (meme cred is very important).\n\nOur data services sit between the API and our ScyllaDB clusters. They contain roughly one gRPC endpoint per database query and intentionally contain no business logic. The big feature our data services provide is request coalescing. If multiple users are requesting the same row at the same time, we’ll only query the database once. The first user that makes a request causes a worker task to spin up in the service. Subsequent requests will check for the existence of that task and subscribe to it. That worker task will query the database and return the row to all subscribers.\n\nThis is the power of Rust in action: it made it easy to write safe concurrent code.\n\nLet’s imagine a big announcement on a large server that notifies @everyone: users are going to open the app and read the message, sending tons of traffic to the database. Previously, this might lead to a hot partition, and on-call would potentially need to be paged to help the system recover. With our data services, we’re able to significantly reduce traffic spikes against the database.\n\nThe second part of the magic here is upstream of our data services. We implemented consistent hash-based routing to our data services to enable more effective coalescing. For each request to our data service, we provide a routing key. For messages, this is a channel ID, so all requests for the same channel go to the same instance of the service. This routing further helps reduce the load on our database.\n\nThese improvements help a lot, but they don’t solve all of our problems. We’re still seeing hot partitions and increased latency on our Cassandra cluster, just not quite as frequently. It buys us some time so that we can prepare our new optimal ScyllaDB cluster and execute the migration.\n‍\n\nA Very Big Migration\n\nOur requirements for our migration are quite straightforward: we need to migrate trillions of messages with no downtime, and we need to do it quickly because while the Cassandra situation has somewhat improved, we’re frequently firefighting.\n\nStep one is easy: we provision a new ScyllaDB cluster using our super-disk storage topology. By using Local SSDs for speed and leveraging RAID to mirror our data to a persistent disk, we get the speed of attached local disks with the durability of a persistent disk. With our cluster stood up, we can begin migrating data into it.\n\nOur first draft of our migration plan was designed to get value quickly. We’d start using our shiny new ScyllaDB cluster for newer data using a cutover time, and then migrate historical data behind it. It adds more complexity, but what every large project needs is additional complexity, right?\n\nWe begin dual-writing new data to Cassandra and ScyllaDB and concurrently begin to provision ScyllaDB’s Spark migrator. It requires a lot of tuning, and once we get it set up, we have an estimated time to completion: three months.\n\nThat timeframe doesn’t make us feel warm and fuzzy inside, and we’d prefer to get value faster. We sit down as a team and brainstorm ways we can speed things up, until we remember that we’ve written a fast and performant database library that we could potentially extend. We elect to engage in some meme-driven engineering and rewrite the data migrator in Rust.\n\nIn an afternoon, we extended our data service library to perform large-scale data migrations. It reads token ranges from a database, checkpoints them locally via SQLite, and then firehoses them into ScyllaDB. We hook up our new and improved migrator and get a new estimate: nine days! If we can migrate data this quickly, then we can forget our complicated time-based approach and instead flip the switch for everything at once.\n\nWe turn it on and leave it running, migrating messages at speeds of up to 3.2 million per second. Several days later, we gather to watch it hit 100%, and we realize that it’s stuck at 99.9999% complete (no, really). Our migrator is timing out reading the last few token ranges of data because they contain gigantic ranges of tombstones that were never compacted away in Cassandra. We compact that token range, and seconds later, the migration is complete!\n\nWe performed automated data validation by sending a small percentage of reads to both databases and comparing results, and everything looked great. The cluster held up well with full production traffic, whereas Cassandra was suffering increasingly frequent latency issues. We gathered together at our team onsite, flipped the switch to make ScyllaDB the primary database, and ate celebratory cake!\n‍\n\nSeveral Months Later…\n\nWe switched our messages database over in May 2022, but how’s it held up since then?\n\nIt’s been a quiet, well-behaved database (it’s okay to say this because I’m not on-call this week). We’re not having weekend-long firefights, nor are we juggling nodes in the cluster to attempt to preserve uptime. It’s a much more efficient database — we’re going from running 177 Cassandra nodes to just 72 ScyllaDB nodes. Each ScyllaDB node has 9 TB of disk space, up from the average of 4 TB per Cassandra node.\n\nOur tail latencies have also improved drastically. For example, fetching historical messages had a p99 of between 40-125ms on Cassandra, with ScyllaDB having a nice and chill 15ms p99 latency, and message insert performance going from 5-70ms p99 on Cassandra, to a steady 5ms p99 on ScyllaDB. Thanks to the aforementioned performance improvements, we’ve unlocked new product use cases now that we have confidence in our messages database.\n\nAt the end of 2022, people all over the world tuned in to watch the World Cup. One thing we discovered very quickly was that goals scored showed up in our monitoring graphs. This was very cool because not only is it neat to see real-world events show up in your systems, but this gave our team an excuse to watch soccer during meetings. We weren’t “watching soccer during meetings”, we were “proactively monitoring our systems’ performance.”\n\nWe can actually tell the story of the World Cup Final via our message send graph. The match was tremendous. Lionel Messi was trying to check off the last accomplishment in his career and cement his claim to being the greatest of all time and lead Argentina to the championship, but in his way stood the massively talented Kylian Mbappe and France.\n\nEach of the nine spikes in this graph represents an event in the match.\n\nMessi hits a penalty, and Argentina goes up 1-0.\nArgentina scores again and goes up 2-0.\nIt’s halftime. There’s a sustained fifteen-minute plateau as users chat about the match.\nThe big spike here is because Mbappe scores for France and scores again 90 seconds later to tie it up!\nIt’s the end of regulation, and this huge match is going to extra time.\nNot much happens in the first half of extra time, but we reach halftime and users are chatting.\nMessi scores again, and Argentina takes the lead!\nMbappe strikes back to tie it up!\nIt’s the end of extra time, we’re heading to penalty kicks!\nExcitement and stress grow throughout the shootout until France misses and Argentina doesn’t! Argentina wins!\nCoalesced messages per second\n\nPeople all over the world are stressed watching this incredible match, but meanwhile, Discord and the messages database aren’t breaking a sweat. We’re way up on message sends and handling it perfectly.  With our Rust-based data services and ScyllaDB, we’re able to shoulder this traffic and provide a platform for our users to communicate.\n\nWe’ve built a system that can handle trillions of messages, and if this work is something that excites you, check out our careers page. We’re hiring!\n‍\n\n\n\n\n\n\n\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "in 2017 we wrote a blog post on how we store billions of messages we shared our journey of how we started out using mongodb but migrated our data to cassandra because we were looking for a database that was scalable fault tolerant and relatively low maintenance we knew we d be growing and we did we wanted a database that grew alongside us but hopefully its maintenance needs wouldn t grow alongside our storage needs unfortunately we found that to not be the case our cassandra cluster exhibited serious performance issues that required increasing amounts of effort to just maintain not improve almost six years later we ve changed a lot and how we store messages has changed as well our cassandra troubles we stored our messages in a database called cassandra messages as its name suggests it ran cassandra and it stored messages in 2017 we ran 12 cassandra nodes storing billions of messages at the beginning of 2022 it had 177 nodes with trillions of messages to our chagrin it was a high toil system our on call team was frequently paged for issues with the database latency was unpredictable and we were having to cut down on maintenance operations that became too expensive to run what was causing these issues first let s take a look at a message create table messages channel id bigint bucket int message id bigint author id bigint content text primary key channel id bucket message id with clustering order by message id desc view raw gistfile1 sql hosted with by github the cql statement above is a minimal version of our message schema every id we use is a snowflake making it chronologically sortable we partition our messages by the channel they re sent in along with a bucket which is a static time window this partitioning means that in cassandra all messages for a given channel and bucket will be stored together and replicated across three nodes or whatever you ve set the replication factor within this partitioning lies a potential performance pitfall a server with just a small group of friends tends to send orders of magnitude fewer messages than a server with hundreds of thousands of people in cassandra reads are more expensive than writes writes are appended to a commit log and written to an in memory structure called a memtable that is eventually flushed to disk reads however need to query the memtable and potentially multiple sstables on disk files a more expensive operation lots of concurrent reads as users interact with servers can hotspot a partition which we refer to imaginatively as a hot partition the size of our dataset when combined with these access patterns led to struggles for our cluster when we encountered a hot partition it frequently affected latency across our entire database cluster one channel and bucket pair received a large amount of traffic and latency in the node would increase as the node tried harder and harder to serve traffic and fell further and further behind other queries to this node were affected as the node couldn t keep up since we perform reads and writes with quorum consistency level all queries to the nodes that serve the hot partition suffer latency increases resulting in broader end user impact cluster maintenance tasks also frequently caused trouble we were prone to falling behind on compactions where cassandra would compact sstables on disk for more performant reads not only were our reads then more expensive but we d also see cascading latency as a node tried to compact we frequently performed an operation we called the gossip dance where we d take a node out of rotation to let it compact without taking traffic bring it back in to pick up hints from cassandra s hinted handoff and then repeat until the compaction backlog was empty we also spent a large amount of time tuning the jvm s garbage collector and heap settings because gc pauses would cause significant latency spikes", "source_text": "In 2017, we wrote a blog post on how we store billions of messages. We shared our journey of how we started out using MongoDB but migrated our data to Cassandra because we were looking for a database that was scalable, fault-tolerant, and relatively low maintenance. We knew we’d be growing, and we did!\n\nWe wanted a database that grew alongside us, but hopefully, its maintenance needs wouldn’t grow alongside our storage needs. Unfortunately, we found that to not be the case — our Cassandra cluster exhibited serious performance issues that required increasing amounts of effort to just maintain, not improve.\n\nAlmost six years later, we’ve changed a lot, and how we store messages has changed as well.\n‍\n\nOur Cassandra Troubles\n\nWe stored our messages in a database called cassandra-messages. As its name suggests, it ran Cassandra, and it stored messages. In 2017, we ran 12 Cassandra nodes, storing billions of messages.\n\nAt the beginning of 2022, it had 177 nodes with trillions of messages. To our chagrin, it was a high-toil system — our on-call team was frequently paged for issues with the database, latency was unpredictable, and we were having to cut down on maintenance operations that became too expensive to run.\n\nWhat was causing these issues? First, let’s take a look at a message.\n\n\tCREATE TABLE messages (\n\t channel_id bigint,\n\t bucket int,\n\t message_id bigint,\n\t author_id bigint,\n\t content text,\n\t PRIMARY KEY ((channel_id, bucket), message_id)\n\t) WITH CLUSTERING ORDER BY (message_id DESC);\nview raw\ngistfile1.sql hosted with ❤ by GitHub\n\nThe CQL statement above is a minimal version of our message schema. Every ID we use is a Snowflake, making it chronologically sortable. We partition our messages by the channel they’re sent in, along with a bucket, which is a static time window. This partitioning means that, in Cassandra, all messages for a given channel and bucket will be stored together and replicated across three nodes (or whatever you’ve set the replication factor).\n\nWithin this partitioning lies a potential performance pitfall: a server with just a small group of friends tends to send orders of magnitude fewer messages than a server with hundreds of thousands of people.\n\nIn Cassandra, reads are more expensive than writes. Writes are appended to a commit log and written to an in memory structure called a memtable that is eventually flushed to disk. Reads, however, need to query the memtable and potentially multiple SSTables (on-disk files), a more expensive operation. Lots of concurrent reads as users interact with servers can hotspot a partition, which we refer to imaginatively as a “hot partition”.  The size of our dataset when combined with these access patterns led to struggles for our cluster.\n\nWhen we encountered a hot partition, it frequently affected latency across our entire database cluster. One channel and bucket pair received a large amount of traffic, and latency in the node would increase as the node tried harder and harder to serve traffic and fell further and further behind.\n\nOther queries to this node were affected as the node couldn’t keep up. Since we perform reads and writes with quorum consistency level, all queries to the nodes that serve the hot partition suffer latency increases, resulting in broader end-user impact.\n\nCluster maintenance tasks also frequently caused trouble. We were prone to falling behind on compactions, where Cassandra would compact SSTables on disk for more performant reads. Not only were our reads then more expensive, but we’d also see cascading latency as a node tried to compact.\n\nWe frequently performed an operation we called the “gossip dance”, where we’d take a node out of rotation to let it compact without taking traffic, bring it back in to pick up hints from Cassandra’s hinted handoff, and then repeat until the compaction backlog was empty. We also spent a large amount of time tuning the JVM’s garbage collector and heap settings, because GC pauses would cause significant latency spikes.\n‍", "segmentation_method": "reviewed_source_semantics", "label": "开篇:In 2017, we wrote a blog post on how we store billions of me — Our Cassandra Troubles", "source_line_range": [ 1, 41 ] }, { "id": "body-region-2", "text": "changing our architecture our messages cluster wasn t our only cassandra database we had several other clusters and each exhibited similar though perhaps not as severe faults in our previous iteration of this post we mentioned being intrigued by scylladb a cassandra compatible database written in c its promise of better performance faster repairs stronger workload isolation via its shard per core architecture and a garbage collection free life sounded quite appealing although scylladb is most definitely not void of issues it is void of a garbage collector since it s written in c rather than java historically our team has had many issues with the garbage collector on cassandra from gc pauses affecting latency all the way to super long consecutive gc pauses that got so bad that an operator would have to manually reboot and babysit the node in question back to health these issues were a huge source of on call toil and the root of many stability issues within our messages cluster after experimenting with scylladb and observing improvements in testing we made the decision to migrate all of our databases while this decision could be a blog post in itself the short version is that by 2020 we had migrated every database but one to scylladb the last one our friend cassandra messages why hadn t we migrated it yet to start with it s a big cluster with trillions of messages and nearly 200 nodes any migration was going to be an involved effort additionally we wanted to make sure our new database could be the best it could be as we worked to tune its performance we also wanted to gain more experience with scylladb in production using it in anger and learning its pitfalls we also worked to improve scylladb performance for our use cases in our testing we discovered that the performance of reverse queries was insufficient for our needs we execute a reverse query when we attempt a database scan in the opposite order of a table s sorting such as when we scan messages in ascending order the scylladb team prioritized improvements and implemented performant reverse queries removing the last database blocker in our migration plan we were suspicious that slapping a new database on our system wasn t going to make everything magically better hot partitions can still be a thing in scylladb and so we also wanted to invest in improving our systems upstream of the database to help shield and facilitate better database performance", "source_text": "Changing Our Architecture\n\nOur messages cluster wasn’t our only Cassandra database. We had several other clusters, and each exhibited similar (though perhaps not as severe) faults.\n\nIn our previous iteration of this post, we mentioned being intrigued by ScyllaDB, a Cassandra-compatible database written in C++. Its promise of better performance, faster repairs, stronger workload isolation via its shard-per-core architecture, and a garbage collection-free life sounded quite appealing.\n\nAlthough ScyllaDB is most definitely not void of issues, it is void of a garbage collector, since it’s written in C++ rather than Java. Historically, our team has had many issues with the garbage collector on Cassandra, from GC pauses affecting latency, all the way to super long consecutive GC pauses that got so bad that an operator would have to manually reboot and babysit the node in question back to health. These issues were a huge source of on-call toil, and the root of many stability issues within our messages cluster.\n\nAfter experimenting with ScyllaDB and observing improvements in testing, we made the decision to migrate all of our databases. While this decision could be a blog post in itself, the short version is that by 2020, we had migrated every database but one to ScyllaDB.\n\nThe last one? Our friend, cassandra-messages.\n\nWhy hadn’t we migrated it yet? To start with, it’s a big cluster. With trillions of messages and nearly 200 nodes, any migration was going to be an involved effort. Additionally, we wanted to make sure our new database could be the best it could be as we worked to tune its performance. We also wanted to gain more experience with ScyllaDB in production, using it in anger and learning its pitfalls.\n\nWe also worked to improve ScyllaDB performance for our use cases. In our testing, we discovered that the performance of reverse queries was insufficient for our needs. We execute a reverse query when we attempt a database scan in the opposite order of a table’s sorting, such as when we scan messages in ascending order. The ScyllaDB team prioritized improvements and implemented performant reverse queries, removing the last database blocker in our migration plan.\n\nWe were suspicious that slapping a new database on our system wasn’t going to make everything magically better. Hot partitions can still be a thing in ScyllaDB, and so we also wanted to invest in improving our systems upstream of the database to help shield and facilitate better database performance.\n‍", "segmentation_method": "reviewed_source_semantics", "label": "Changing Our Architecture", "source_line_range": [ 42, 60 ] }, { "id": "body-region-3", "text": "data services serving data with cassandra we struggled with hot partitions high traffic to a given partition resulted in unbounded concurrency leading to cascading latency in which subsequent queries would continue to grow in latency if we could control the amount of concurrent traffic to hot partitions we could protect the database from being overwhelmed to accomplish this task we wrote what we refer to as data services intermediary services that sit between our api monolith and our database clusters when writing our data services we chose a language we ve been using more and more at discord rust we d used it for a few projects previously and it lived up to the hype for us it gave us fast c c speeds without having to sacrifice safety rust touts fearless concurrency as one of its main benefits the language should make it easy to write safe concurrent code its libraries also were a great match for what we were intending to accomplish the tokio ecosystem is a tremendous foundation for building a system on asynchronous i o and the language has driver support for both cassandra and scylladb additionally we found it a joy to code in with the help the compiler gives you the clarity of the error messages the language constructs and its emphasis on safety we became quite fond of how once it compiled it generally works most importantly however it lets us say we rewrote it in rust meme cred is very important our data services sit between the api and our scylladb clusters they contain roughly one grpc endpoint per database query and intentionally contain no business logic the big feature our data services provide is request coalescing if multiple users are requesting the same row at the same time we ll only query the database once the first user that makes a request causes a worker task to spin up in the service subsequent requests will check for the existence of that task and subscribe to it that worker task will query the database and return the row to all subscribers this is the power of rust in action it made it easy to write safe concurrent code let s imagine a big announcement on a large server that notifies everyone users are going to open the app and read the message sending tons of traffic to the database previously this might lead to a hot partition and on call would potentially need to be paged to help the system recover with our data services we re able to significantly reduce traffic spikes against the database the second part of the magic here is upstream of our data services we implemented consistent hash based routing to our data services to enable more effective coalescing for each request to our data service we provide a routing key for messages this is a channel id so all requests for the same channel go to the same instance of the service this routing further helps reduce the load on our database these improvements help a lot but they don t solve all of our problems we re still seeing hot partitions and increased latency on our cassandra cluster just not quite as frequently it buys us some time so that we can prepare our new optimal scylladb cluster and execute the migration", "source_text": "Data Services Serving Data\n\nWith Cassandra, we struggled with hot partitions. High traffic to a given partition resulted in unbounded concurrency, leading to cascading latency in which subsequent queries would continue to grow in latency. If we could control the amount of concurrent traffic to hot partitions, we could protect the database from being overwhelmed.\n\nTo accomplish this task, we wrote what we refer to as data services — intermediary services that sit between our API monolith and our database clusters. When writing our data services, we chose a language we’ve been using more and more at Discord: Rust! We’d used it for a few projects previously, and it lived up to the hype for us. It gave us fast C/C++ speeds without having to sacrifice safety.\n\nRust touts fearless concurrency as one of its main benefits — the language should make it easy to write safe, concurrent code. Its libraries also were a great match for what we were intending to accomplish. The Tokio ecosystem is a tremendous foundation for building a system on asynchronous I/O, and the language has driver support for both Cassandra and ScyllaDB.\n\nAdditionally, we found it a joy to code in with the help the compiler gives you, the clarity of the error messages, the language constructs, and its emphasis on safety. We became quite fond of how once it compiled, it generally works. Most importantly, however, it lets us say we rewrote it in Rust (meme cred is very important).\n\nOur data services sit between the API and our ScyllaDB clusters. They contain roughly one gRPC endpoint per database query and intentionally contain no business logic. The big feature our data services provide is request coalescing. If multiple users are requesting the same row at the same time, we’ll only query the database once. The first user that makes a request causes a worker task to spin up in the service. Subsequent requests will check for the existence of that task and subscribe to it. That worker task will query the database and return the row to all subscribers.\n\nThis is the power of Rust in action: it made it easy to write safe concurrent code.\n\nLet’s imagine a big announcement on a large server that notifies @everyone: users are going to open the app and read the message, sending tons of traffic to the database. Previously, this might lead to a hot partition, and on-call would potentially need to be paged to help the system recover. With our data services, we’re able to significantly reduce traffic spikes against the database.\n\nThe second part of the magic here is upstream of our data services. We implemented consistent hash-based routing to our data services to enable more effective coalescing. For each request to our data service, we provide a routing key. For messages, this is a channel ID, so all requests for the same channel go to the same instance of the service. This routing further helps reduce the load on our database.\n\nThese improvements help a lot, but they don’t solve all of our problems. We’re still seeing hot partitions and increased latency on our Cassandra cluster, just not quite as frequently. It buys us some time so that we can prepare our new optimal ScyllaDB cluster and execute the migration.\n‍", "segmentation_method": "reviewed_source_semantics", "label": "Data Services Serving Data", "source_line_range": [ 61, 81 ] }, { "id": "body-region-4", "text": "a very big migration our requirements for our migration are quite straightforward we need to migrate trillions of messages with no downtime and we need to do it quickly because while the cassandra situation has somewhat improved we re frequently firefighting step one is easy we provision a new scylladb cluster using our super disk storage topology by using local ssds for speed and leveraging raid to mirror our data to a persistent disk we get the speed of attached local disks with the durability of a persistent disk with our cluster stood up we can begin migrating data into it our first draft of our migration plan was designed to get value quickly we d start using our shiny new scylladb cluster for newer data using a cutover time and then migrate historical data behind it it adds more complexity but what every large project needs is additional complexity right we begin dual writing new data to cassandra and scylladb and concurrently begin to provision scylladb s spark migrator it requires a lot of tuning and once we get it set up we have an estimated time to completion three months that timeframe doesn t make us feel warm and fuzzy inside and we d prefer to get value faster we sit down as a team and brainstorm ways we can speed things up until we remember that we ve written a fast and performant database library that we could potentially extend we elect to engage in some meme driven engineering and rewrite the data migrator in rust in an afternoon we extended our data service library to perform large scale data migrations it reads token ranges from a database checkpoints them locally via sqlite and then firehoses them into scylladb we hook up our new and improved migrator and get a new estimate nine days if we can migrate data this quickly then we can forget our complicated time based approach and instead flip the switch for everything at once we turn it on and leave it running migrating messages at speeds of up to 3 2 million per second several days later we gather to watch it hit 100 and we realize that it s stuck at 99 9999 complete no really our migrator is timing out reading the last few token ranges of data because they contain gigantic ranges of tombstones that were never compacted away in cassandra we compact that token range and seconds later the migration is complete we performed automated data validation by sending a small percentage of reads to both databases and comparing results and everything looked great the cluster held up well with full production traffic whereas cassandra was suffering increasingly frequent latency issues we gathered together at our team onsite flipped the switch to make scylladb the primary database and ate celebratory cake", "source_text": "A Very Big Migration\n\nOur requirements for our migration are quite straightforward: we need to migrate trillions of messages with no downtime, and we need to do it quickly because while the Cassandra situation has somewhat improved, we’re frequently firefighting.\n\nStep one is easy: we provision a new ScyllaDB cluster using our super-disk storage topology. By using Local SSDs for speed and leveraging RAID to mirror our data to a persistent disk, we get the speed of attached local disks with the durability of a persistent disk. With our cluster stood up, we can begin migrating data into it.\n\nOur first draft of our migration plan was designed to get value quickly. We’d start using our shiny new ScyllaDB cluster for newer data using a cutover time, and then migrate historical data behind it. It adds more complexity, but what every large project needs is additional complexity, right?\n\nWe begin dual-writing new data to Cassandra and ScyllaDB and concurrently begin to provision ScyllaDB’s Spark migrator. It requires a lot of tuning, and once we get it set up, we have an estimated time to completion: three months.\n\nThat timeframe doesn’t make us feel warm and fuzzy inside, and we’d prefer to get value faster. We sit down as a team and brainstorm ways we can speed things up, until we remember that we’ve written a fast and performant database library that we could potentially extend. We elect to engage in some meme-driven engineering and rewrite the data migrator in Rust.\n\nIn an afternoon, we extended our data service library to perform large-scale data migrations. It reads token ranges from a database, checkpoints them locally via SQLite, and then firehoses them into ScyllaDB. We hook up our new and improved migrator and get a new estimate: nine days! If we can migrate data this quickly, then we can forget our complicated time-based approach and instead flip the switch for everything at once.\n\nWe turn it on and leave it running, migrating messages at speeds of up to 3.2 million per second. Several days later, we gather to watch it hit 100%, and we realize that it’s stuck at 99.9999% complete (no, really). Our migrator is timing out reading the last few token ranges of data because they contain gigantic ranges of tombstones that were never compacted away in Cassandra. We compact that token range, and seconds later, the migration is complete!\n\nWe performed automated data validation by sending a small percentage of reads to both databases and comparing results, and everything looked great. The cluster held up well with full production traffic, whereas Cassandra was suffering increasingly frequent latency issues. We gathered together at our team onsite, flipped the switch to make ScyllaDB the primary database, and ate celebratory cake!\n‍", "segmentation_method": "reviewed_source_semantics", "label": "A Very Big Migration", "source_line_range": [ 82, 100 ] }, { "id": "body-region-5", "text": "several months later we switched our messages database over in may 2022 but how s it held up since then it s been a quiet well behaved database it s okay to say this because i m not on call this week we re not having weekend long firefights nor are we juggling nodes in the cluster to attempt to preserve uptime it s a much more efficient database we re going from running 177 cassandra nodes to just 72 scylladb nodes each scylladb node has 9 tb of disk space up from the average of 4 tb per cassandra node our tail latencies have also improved drastically for example fetching historical messages had a p99 of between 40 125ms on cassandra with scylladb having a nice and chill 15ms p99 latency and message insert performance going from 5 70ms p99 on cassandra to a steady 5ms p99 on scylladb thanks to the aforementioned performance improvements we ve unlocked new product use cases now that we have confidence in our messages database at the end of 2022 people all over the world tuned in to watch the world cup one thing we discovered very quickly was that goals scored showed up in our monitoring graphs this was very cool because not only is it neat to see real world events show up in your systems but this gave our team an excuse to watch soccer during meetings we weren t watching soccer during meetings we were proactively monitoring our systems performance we can actually tell the story of the world cup final via our message send graph the match was tremendous lionel messi was trying to check off the last accomplishment in his career and cement his claim to being the greatest of all time and lead argentina to the championship but in his way stood the massively talented kylian mbappe and france each of the nine spikes in this graph represents an event in the match messi hits a penalty and argentina goes up 1 0 argentina scores again and goes up 2 0 it s halftime there s a sustained fifteen minute plateau as users chat about the match the big spike here is because mbappe scores for france and scores again 90 seconds later to tie it up it s the end of regulation and this huge match is going to extra time not much happens in the first half of extra time but we reach halftime and users are chatting messi scores again and argentina takes the lead mbappe strikes back to tie it up it s the end of extra time we re heading to penalty kicks excitement and stress grow throughout the shootout until france misses and argentina doesn t argentina wins coalesced messages per second people all over the world are stressed watching this incredible match but meanwhile discord and the messages database aren t breaking a sweat we re way up on message sends and handling it perfectly with our rust based data services and scylladb we re able to shoulder this traffic and provide a platform for our users to communicate we ve built a system that can handle trillions of messages and if this work is something that excites you check out our careers page we re hiring", "source_text": "Several Months Later…\n\nWe switched our messages database over in May 2022, but how’s it held up since then?\n\nIt’s been a quiet, well-behaved database (it’s okay to say this because I’m not on-call this week). We’re not having weekend-long firefights, nor are we juggling nodes in the cluster to attempt to preserve uptime. It’s a much more efficient database — we’re going from running 177 Cassandra nodes to just 72 ScyllaDB nodes. Each ScyllaDB node has 9 TB of disk space, up from the average of 4 TB per Cassandra node.\n\nOur tail latencies have also improved drastically. For example, fetching historical messages had a p99 of between 40-125ms on Cassandra, with ScyllaDB having a nice and chill 15ms p99 latency, and message insert performance going from 5-70ms p99 on Cassandra, to a steady 5ms p99 on ScyllaDB. Thanks to the aforementioned performance improvements, we’ve unlocked new product use cases now that we have confidence in our messages database.\n\nAt the end of 2022, people all over the world tuned in to watch the World Cup. One thing we discovered very quickly was that goals scored showed up in our monitoring graphs. This was very cool because not only is it neat to see real-world events show up in your systems, but this gave our team an excuse to watch soccer during meetings. We weren’t “watching soccer during meetings”, we were “proactively monitoring our systems’ performance.”\n\nWe can actually tell the story of the World Cup Final via our message send graph. The match was tremendous. Lionel Messi was trying to check off the last accomplishment in his career and cement his claim to being the greatest of all time and lead Argentina to the championship, but in his way stood the massively talented Kylian Mbappe and France.\n\nEach of the nine spikes in this graph represents an event in the match.\n\nMessi hits a penalty, and Argentina goes up 1-0.\nArgentina scores again and goes up 2-0.\nIt’s halftime. There’s a sustained fifteen-minute plateau as users chat about the match.\nThe big spike here is because Mbappe scores for France and scores again 90 seconds later to tie it up!\nIt’s the end of regulation, and this huge match is going to extra time.\nNot much happens in the first half of extra time, but we reach halftime and users are chatting.\nMessi scores again, and Argentina takes the lead!\nMbappe strikes back to tie it up!\nIt’s the end of extra time, we’re heading to penalty kicks!\nExcitement and stress grow throughout the shootout until France misses and Argentina doesn’t! Argentina wins!\nCoalesced messages per second\n\nPeople all over the world are stressed watching this incredible match, but meanwhile, Discord and the messages database aren’t breaking a sweat. We’re way up on message sends and handling it perfectly.  With our Rust-based data services and ScyllaDB, we’re able to shoulder this traffic and provide a platform for our users to communicate.\n\nWe’ve built a system that can handle trillions of messages, and if this work is something that excites you, check out our careers page. We’re hiring!\n‍", "segmentation_method": "reviewed_source_semantics", "label": "Several Months Later…", "source_line_range": [ 101, 137 ] } ], "ending": { "text": "nd if this work is something that excites you, check out our careers page. We’re hiring!\n‍" } } }, { "id": "article-057", "name": "How Discord Indexes Trillions of Messages", "url": "https://discord.com/blog/how-discord-indexes-trillions-of-messages", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How Discord Indexes Trillions of Messages" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Vicki Niu" ] }, { "id": "stable-3", "alternatives": [ "Senior Software Engineer, Persistence Infrastructure" ] }, { "id": "stable-4", "alternatives": [ "Download" ] }, { "id": "stable-5", "alternatives": [ "Nitro" ] }, { "id": "stable-6", "alternatives": [ "Discover" ] }, { "id": "stable-7", "alternatives": [ "Safety" ] }, { "id": "stable-8", "alternatives": [ "Quests" ] }, { "id": "stable-9", "alternatives": [ "Support" ] }, { "id": "stable-10", "alternatives": [ "Blog" ] }, { "id": "stable-11", "alternatives": [ "Developers" ] }, { "id": "stable-12", "alternatives": [ "Careers" ] }, { "id": "stable-13", "alternatives": [ "Log In" ] }, { "id": "stable-14", "alternatives": [ "Engineering & Developers" ] }, { "id": "stable-15", "alternatives": [ "RELATED ARTICLES" ] }, { "id": "stable-16", "alternatives": [ "search" ] }, { "id": "stable-17", "alternatives": [ "Language" ] }, { "id": "stable-18", "alternatives": [ "English" ] }, { "id": "stable-19", "alternatives": [ "Social" ] }, { "id": "stable-20", "alternatives": [ "Product" ] }, { "id": "stable-21", "alternatives": [ "Status" ] }, { "id": "stable-22", "alternatives": [ "App Directory" ] }, { "id": "stable-23", "alternatives": [ "Gift Cards" ] }, { "id": "stable-24", "alternatives": [ "Company" ] }, { "id": "stable-25", "alternatives": [ "About" ] }, { "id": "stable-26", "alternatives": [ "Jobs" ] }, { "id": "stable-27", "alternatives": [ "Brand" ] }, { "id": "stable-28", "alternatives": [ "Newsroom" ] }, { "id": "stable-29", "alternatives": [ "Resources" ] }, { "id": "stable-30", "alternatives": [ "Creators" ] }, { "id": "stable-31", "alternatives": [ "Community" ] }, { "id": "stable-32", "alternatives": [ "Official 3rd Party Merch" ] }, { "id": "stable-33", "alternatives": [ "Feedback" ] }, { "id": "stable-34", "alternatives": [ "Policies" ] }, { "id": "stable-35", "alternatives": [ "Terms" ] }, { "id": "stable-36", "alternatives": [ "Privacy" ] }, { "id": "stable-37", "alternatives": [ "Cookie Settings" ] }, { "id": "stable-38", "alternatives": [ "Guidelines" ] }, { "id": "stable-39", "alternatives": [ "Acknowledgements" ] }, { "id": "stable-40", "alternatives": [ "Licenses" ] }, { "id": "stable-41", "alternatives": [ "Company Information" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How Discord Indexes Trillions of Messages" ], "html_selector": "h1.article_heading.is-up-26,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-057/comment-qualification-reference-r5.json", "sha256": "dcaf82659e6207f15b80c20863d12e113c413817aa3c51be213047da71ba11fe", "chars": 796, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Back in 2017, we shared how we built our message search system to index billions of messages. We designed our search infrastructure to be performant, cost-effective, scalable, and easy to operate. We chose to use Elasticsearch, with Discord messages sharded over indices, the logical namespace for Elasticsearch messages, on two Elasticsearch clusters. Messages were sharded either by Discord server (which we’ll refer to as a guild from here on out) or direct message (DM). This allowed us to store all a guild’s messages together for fast querying and run smaller, more manageable clusters. Since not everyone uses search, messages were lazily indexed into Discord, and we built a message queue that allowed workers to pull chunks of messages for indexing to leverage Elasticsearch’s bulk-indexing capabilities.\n\nBut as Discord grew, our search infrastructure began to exhibit a few cracks…\n\n‍\n\nOur Redis message indexing queue would drop messages\n\nWe used Redis to back our realtime message indexing queue, which held up great at first. However, when our indexing queue got backed up for any reason, which happened often on Elasticsearch node failure, the Redis cluster became a source of failure that began dropping messages once CPU maxed out with too many messages in the queue.\n\nOur bulk indexing was fault-intolerant on Elasticsearch index or node failure\n\nPart of the reason our indexing queue was so impacted by Elasticsearch node failures is because of how we optimized our bulk message indexing. The realtime index workers pulled batches of messages off the queue to index to Elasticsearch. However, these messages all belonged to different indices and Elasticsearch nodes in our cluster — one bulk index operation with a batch of 50 messages might then fan out to 50 Elasticsearch nodes in the cluster! If one operation in the batch fails, then the entire bulk index operation would be considered failed, re-enqueueing all messages to be retried.\n\nTo put it into perspective, let's say our Elasticsearch cluster had 100 nodes, and we were indexing batches of 50 messages. If one node fails, assuming an equal distribution, the odds of a given batch having at least one message going to that failed node are ~40%. This means that a single-node failure leads to ~40% of our bulk index operations failing!\n\nLarge Elasticsearch clusters had large overhead, impacting performance and operability\n\nAs our message volume grew, we scaled up our Elasticsearch clusters by adding additional nodes. This allowed us to horizontally-scale quite easily by adding more indices and nodes to serve more Discord servers and their messages. However, adding these also meant that each of our bulk index operations were now also spread across a much larger number of indices and nodes. Operations fanned out more, causing slowdown to our indexing performance. Additionally, the more nodes we have in a cluster, the more likely a cluster was to fail at any point.\n\nNo good path to software upgrades or rolling restarts\n\nGiven the system’s lack of resilience to single node unavailability, we didn't have a good solution for performing rolling restarts and doing software upgrades. Our clusters had also grown really large and unwieldy, with over 200 nodes and terabytes of data total. Any strategy to gracefully drain nodes before restart to ensure service availability would’ve taken a prohibitively long time. We were forced to keep our clusters running legacy OS versions and Elasticsearch versions, missing both critical updates and performance improvements.\n\nMost notably, patching the log4shell vulnerability by disabling JNDI lookups and setting log4j2.formatMsgNoLookups to true required taking our search system fully offline for a maintenance period while we restarted every Elasticsearch node with the new configuration.\n\nIndices with large guilds grew too large\n\nOver time, some of our Elasticsearch indices housed the data for some very large Discord guilds. Naturally, large guilds post a LOT of messages, causing the incides to grow very large. Each of our Elasticsearch indices is a single Lucene index under the hood, and Lucene has a MAX_DOC limit of about 2 billion messages per index. As we learned the hard way, once you hit this limit, all indexing operations will fail.\n\nWhen this happened, our only path to recover was to work with our Safety team to try and find guilds that were solely intended to spam as many messages as possible and delete them. This worked for the time being, but we knew we would eventually have to support search on legitimate communities that had posted more than 2 billion messages.\n\n‍\n\nThe Solutions\n\n\nWhile our search infrastructure had served its purpose for many years, we began to experience more and more incidents as our clusters failed to handle increased message throughput and query volume. Given our brittleness to rolling restarts and software upgrades, our outdated software also needed an update.\n\nSince this was going to be a big undertaking, we might as well take the opportunity to learn and evolve from our existing infrastructure.\n\nDeploy Elasticsearch on Kubernetes\n\nBy now, Discord was deploying many of our stateless services on Kubernetes. This was a significant improvement to our ease of operability, and allowed us to optimize costs with more granular compute and memory resources. We didn't run any stateful services on Kubernetes, but the Elastic Kubernetes Operator seemed like a promising solution for orchestrating and managing an Elasticsearch cluster deployed on Kubernetes.\n\nWith the Elasticsearch Operator, we would easily be able to define our cluster topology and configuration, and deploy the Elasticsearch cluster onto our Kubernetes nodepool. OS upgrades would happen automatically, and the ECK operator exposes ergonomic tools for safely performing rolling restarts and upgrades.\n\nMulti-cluster “cell” architecture to run smaller Elasticsearch clusters\n\nNow that we had committed to running on Kubernetes and using the ECK operator, we envisioned a more expansive architecture where we ran a larger number of smaller Elasticsearch clusters.\n\nIn our legacy system, our clusters had grown to more than 200 nodes per cluster. This meant that a given node in the cluster could fail often, and the coordination overhead for the cluster itself was very high.\n\nCluster states of an Elasticsearch cluster don't scale — as a cluster grows to contain more nodes and more indices, the overhead for the cluster’s master node also increases. We began to see our cluster’s master nodes frequently OOM, which would cause indexing failures, a growing backlog of messages that failed to index into Elasticsearch, degraded query performance, and frequent timeouts.\n\nIn our new search infrastructure, we would create more Elasticsearch indices to remedy this, so each index could stay within the recommendation of 200M messages and 50GB of data. These indices would be housed over many more, smaller clusters, helping keep our cluster state and coordination overhead down for better performance.\n\nWe introduced the concept of a logical “cell” of multiple Elasticsearch clusters, allowing us to have a higher-level grouping of a set of smaller Elasticsearch clusters. We'll discuss our usage of cells how this unlocked new search features and ability to handle large guilds later in this blog post.\n\nWithin each of these smaller Elasticsearch clusters in a cell, we run dedicated ingest nodes, master-eligible nodes, and data nodes. Having these dedicated node roles ensures that:\n\nMaster-eligible nodes always have sufficient resources to perform cluster coordination\nIngest nodes performing pre-processing and routing can be run as a stateless deployment since they own no data and can scale up and down to handle volume spikes\nData nodes can be given sufficient heap resources to handle indexing and query operations\n\nGiven the different resource requirements for our different node roles, their respective pods are scheduled onto different machine types and nodepools.\n\nWe designed each cluster to be resilient to zonal failure with the following:\n\n3 master-eligible nodes: one per zone\nAt least 3 ingest nodes: one per zone\nData nodes: the primary and replica of an index are in different zones with shard allocation awareness, and forced awareness balances indices across all zones\nPubSub message queue\n\nWe migrated our indexing message queue from Redis to PubSub, which allowed us to have guaranteed message delivery and tolerate large backlogs of messages. This meant that Elasticsearch failures now could lead to a slowdown in indexing, but we would no longer drop messages — phew!\n\nIn fact, the convenience of PubSub’s guaranteed message delivery led us to adopt PubSub for other use cases across Discord like task scheduling—but that’s a blog post for another day.\n\nBatch messages by cluster and index before bulk indexing\n\nWe still want to index messages in bulk for performance, but our workers should be intelligent and collect and index batches of messages housed on the same cluster. This ensures that each bulk index operation talks to a single Elasticsearch index and node, so if a node does fail, it only impacts index operations for messages on that node. This is more important now that we have a larger number of clusters and indices.\n\nTo improve our bulk indexing strategy, we implemented a PubSub message router that streams messages from PubSub and collects batches of messages grouped by their Destination, or in our case, the Elasticsearch cluster and index the message is mapped to. The message router creates a channel and spawns a tokio task for each Destination in the messages being pulled: the router then sends the message to the task collects chunks of messages for indexing, which it receives on its channel.\n\nOur router streams messages from PubSub and extracts a Destination, or key, for each message.In our case, the Destination is the Elasticsearch cluster and index this message will live on. When the router encounters a message with a new Destination, it spawns an unbounded channel and a tokio task that receives messages on that channel.\n\nAs the router continues to receive messages, it forwards them on to the appropriate channel, keyed by Destination. Each destination task collects chunks of messages, now all keyed by the same Destination, and bulk indexes to Elasticsearch.\n\n/// MessageRouter routes messages to a set of dynamically spawned destinations.\n\n/// This is a simplified representation of the MessageRouter used to index\n\n/// new Discord messages into Elasticsearch.\n\nstruct MessageRouter {\n\n destinations: RwLock>,\n\n}\n\n\n\nimpl MessageRouter {\n\n /// Attempts to send the message to the given destination, spawning it\n\n /// if the destination does not exist.\n\n fn send_message(\n\n &self,\n\n destination_key: DestinationKeyT,\n\n message: MessageT,\n\n ) -> Result<()> {\n\n let mut destinations = self.destinations.write();\n\n match destinations.entry(destination_key) {\n\n Entry::Occupied(mut ent) => {\n\n\t // Send the message to the given destination\n\n\t ent.get().send(message).ok();\n\n }\n\n Entry::Vacant(ent) => {\n\n // Spawn a new destination and receiver\n\n let (destination_sender, destination_receiver) = unbounded_channel();\n\n let task = tokio::task::spawn(async move {\n\n // Destination task receives messages with same destination\n\n // key on destination_receiver.\n\n // For our case, the destination task groups messages into \n\n // chunks and bulk indexes into Elasticsearch.\n\n });\n\n ent.insert(destination_sender).send(message).ok();\n\n }\n\n }\n\n Ok(())\n\n }\n\n}\nSupporting new search use cases\n\nDefining “cells” of Elasticsearch clusters gave a useful abstraction that allowed us to index messages in different dimensions. The ability to search across all your DMs had long been a requested feature, but one that we were unable to support since all messages were sharded and indexed by guild or DM. Fanning out a search query over all of a user’s DMs would be far too expensive.\n\nIn order to efficiently search across all DMs, we would need to shard the messages by user, rather than by channel, storing all of a user’s DMs together on a given Elasticsearch index. This would also mean that we'd store twice as much data, as each message in a DM would be indexed into recipient_a’s index and recipient_b’s index.\n\nGiven that we were already planning to re-index all Discord messages as part of our migration to this new architecture, this provided a rare chance to shard and index some messages differently. Guild messages are still sharded by guild_id, but now user DM messages are now sharded by user_id and indexed in a separate user-dm-messages Elasticsearch cell.\n\nThis is what powers the new cross-DM search functionality, now available on mobile. Now, all DM messages and search queries are served by the user-dm-messages Elasticsearch cell, and guild messages and queries served by guild-messages cell. You won't need to remember who sent you that one message six years ago!\n\nGive “Big Freaking Guilds” dedicated Elasticsearch clusters, with multiple shards\n\nAs guilds on Discord grow larger with longer histories, more and more of them bump up against Lucene’s MAX_DOC limit of ~2 billion messages. We needed a solution to scale search for these special cases, which we call BFGs, or Big Freaking Guilds.\n\nWe wanted to retain the performance gains from storing all messages for a given guild on the same Elasticsearch shard, since that still works for the vast majority of guilds, but we needed a solution to scale search for BFGs as well.\n\nElasticsearch indices can have multiple primary shards, with each shard living on a node in the cluster. Having multiple primary shards means data for an index will be spread across multiple nodes in the cluster, backed by multiple underlying Lucene indices.\n\nTo optimize query performance, we normally create Elasticsearch indices with a single primary shard. This guarantees that all messages in that index are colocated on a single Elasticsearch node, so there's no fanout and coordination overhead at query-time. For almost all Discord guilds, this results in far more performance search queries since each query only talks to a single Elasticsearch node.\n\nIn the case of BFGs, however, we are dealing with BF-indices and large message volume: billions of messages on a single guild! Having more shards in an index can speed up search queries, but only when the cost of coordination does not exceed the cost of querying the index. For BFGs, we can realize query performance gains from the parallelism we get by fanning out a search query to multiple shards, and the coordination cost is worth it.\n\nIndexing BFG messages onto indices with multiple primary shards lets us scale our search functionality to guilds with many billions of messages, and allows for more performant queries for these special-case guilds. It also improves query performance for other Discord guilds that previously would’ve had their resources hogged by the expensive queries to BFGs on the same index.\n\nWe built a new system that allows us to reindex a BFG’s messages onto a new index with more primary shards, increasing the maximum number of messages. Importantly, we need to continue to index new messages and serve queries while this migration is happening.\n\nThe BFG reindexing flow goes as follows:\n\nWe identify a BFG: a guild where the number of messages is approaching the Lucene MAX_DOCS. This guild is currently indexed to index-a\nWe create a new index, new-bfg-index, in our Elasticsearch cell dedicated to BFGs, within 2x the primary shard count of the previous index.\nNew messages are now dual-indexed to index-a and new-bfg-index\nWe kick off a job to historically index all the guild’s messages into new-bfg-index. Ongoing search queries are still served from index-a\nWhen the historical indexing is complete, we switch new query traffic from index-a to new-bfg-index\nOnce we’re confident that new-bfg-index is performant and reliable, we stop indexing new incoming messages to index-a and kick off a cleanup job to remove all the BFG’s messages from too-small-index\n\nBy running a dedicated Elasticsearch cell for BFGs, we can keep the cluster and index configurations standard for most guilds and resources while retaining the ability to adjust as needed for these outlier but important BFGs.\n\nSo... how are things going?\n\n\nNow, with our new search infrastructure, we:\n\nIndex trillions of messages, with double the indexing throughput of our legacy search\nImproved median query latency from 500ms to <100ms, and p99 from 1s to <500ms\nRun 40 Elasticsearch clusters with thousands of indices\nPerform cluster upgrades and rolling restarts automatically and with no service impact\n\nWe’re excited to keep powering fast and efficient search for Discord guilds, even as our communities grow to each have billions of messages and beyond!\n\nIf these sorts of technical challenges tickle your brain as well, come join us!\n\n\n\n\n\n\n\n\n\n\n\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 3, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "back in 2017 we shared how we built our message search system to index billions of messages we designed our search infrastructure to be performant cost effective scalable and easy to operate we chose to use elasticsearch with discord messages sharded over indices the logical namespace for elasticsearch messages on two elasticsearch clusters messages were sharded either by discord server which we ll refer to as a guild from here on out or direct message dm this allowed us to store all a guild s messages together for fast querying and run smaller more manageable clusters since not everyone uses search messages were lazily indexed into discord and we built a message queue that allowed workers to pull chunks of messages for indexing to leverage elasticsearch s bulk indexing capabilities but as discord grew our search infrastructure began to exhibit a few cracks our redis message indexing queue would drop messages we used redis to back our realtime message indexing queue which held up great at first however when our indexing queue got backed up for any reason which happened often on elasticsearch node failure the redis cluster became a source of failure that began dropping messages once cpu maxed out with too many messages in the queue our bulk indexing was fault intolerant on elasticsearch index or node failure part of the reason our indexing queue was so impacted by elasticsearch node failures is because of how we optimized our bulk message indexing the realtime index workers pulled batches of messages off the queue to index to elasticsearch however these messages all belonged to different indices and elasticsearch nodes in our cluster one bulk index operation with a batch of 50 messages might then fan out to 50 elasticsearch nodes in the cluster if one operation in the batch fails then the entire bulk index operation would be considered failed re enqueueing all messages to be retried to put it into perspective let s say our elasticsearch cluster had 100 nodes and we were indexing batches of 50 messages if one node fails assuming an equal distribution the odds of a given batch having at least one message going to that failed node are 40 this means that a single node failure leads to 40 of our bulk index operations failing large elasticsearch clusters had large overhead impacting performance and operability as our message volume grew we scaled up our elasticsearch clusters by adding additional nodes this allowed us to horizontally scale quite easily by adding more indices and nodes to serve more discord servers and their messages however adding these also meant that each of our bulk index operations were now also spread across a much larger number of indices and nodes operations fanned out more causing slowdown to our indexing performance additionally the more nodes we have in a cluster the more likely a cluster was to fail at any point no good path to software upgrades or rolling restarts given the system s lack of resilience to single node unavailability we didn t have a good solution for performing rolling restarts and doing software upgrades our clusters had also grown really large and unwieldy with over 200 nodes and terabytes of data total any strategy to gracefully drain nodes before restart to ensure service availability would ve taken a prohibitively long time we were forced to keep our clusters running legacy os versions and elasticsearch versions missing both critical updates and performance improvements most notably patching the log4shell vulnerability by disabling jndi lookups and setting log4j2 formatmsgnolookups to true required taking our search system fully offline for a maintenance period while we restarted every elasticsearch node with the new configuration indices with large guilds grew too large over time some of our elasticsearch indices housed the data for some very large discord guilds naturally large guilds post a lot of messages causing the incides to grow very large each of our elasticsearch indices is a single lucene index under the hood and lucene has a max doc limit of about 2 billion messages per index as we learned the hard way once you hit this limit all indexing operations will fail when this happened our only path to recover was to work with our safety team to try and find guilds that were solely intended to spam as many messages as possible and delete them this worked for the time being but we knew we would eventually have to support search on legitimate communities that had posted more than 2 billion messages", "source_text": "Back in 2017, we shared how we built our message search system to index billions of messages. We designed our search infrastructure to be performant, cost-effective, scalable, and easy to operate. We chose to use Elasticsearch, with Discord messages sharded over indices, the logical namespace for Elasticsearch messages, on two Elasticsearch clusters. Messages were sharded either by Discord server (which we’ll refer to as a guild from here on out) or direct message (DM). This allowed us to store all a guild’s messages together for fast querying and run smaller, more manageable clusters. Since not everyone uses search, messages were lazily indexed into Discord, and we built a message queue that allowed workers to pull chunks of messages for indexing to leverage Elasticsearch’s bulk-indexing capabilities.\n\nBut as Discord grew, our search infrastructure began to exhibit a few cracks…\n\n‍\n\nOur Redis message indexing queue would drop messages\n\nWe used Redis to back our realtime message indexing queue, which held up great at first. However, when our indexing queue got backed up for any reason, which happened often on Elasticsearch node failure, the Redis cluster became a source of failure that began dropping messages once CPU maxed out with too many messages in the queue.\n\nOur bulk indexing was fault-intolerant on Elasticsearch index or node failure\n\nPart of the reason our indexing queue was so impacted by Elasticsearch node failures is because of how we optimized our bulk message indexing. The realtime index workers pulled batches of messages off the queue to index to Elasticsearch. However, these messages all belonged to different indices and Elasticsearch nodes in our cluster — one bulk index operation with a batch of 50 messages might then fan out to 50 Elasticsearch nodes in the cluster! If one operation in the batch fails, then the entire bulk index operation would be considered failed, re-enqueueing all messages to be retried.\n\nTo put it into perspective, let's say our Elasticsearch cluster had 100 nodes, and we were indexing batches of 50 messages. If one node fails, assuming an equal distribution, the odds of a given batch having at least one message going to that failed node are ~40%. This means that a single-node failure leads to ~40% of our bulk index operations failing!\n\nLarge Elasticsearch clusters had large overhead, impacting performance and operability\n\nAs our message volume grew, we scaled up our Elasticsearch clusters by adding additional nodes. This allowed us to horizontally-scale quite easily by adding more indices and nodes to serve more Discord servers and their messages. However, adding these also meant that each of our bulk index operations were now also spread across a much larger number of indices and nodes. Operations fanned out more, causing slowdown to our indexing performance. Additionally, the more nodes we have in a cluster, the more likely a cluster was to fail at any point.\n\nNo good path to software upgrades or rolling restarts\n\nGiven the system’s lack of resilience to single node unavailability, we didn't have a good solution for performing rolling restarts and doing software upgrades. Our clusters had also grown really large and unwieldy, with over 200 nodes and terabytes of data total. Any strategy to gracefully drain nodes before restart to ensure service availability would’ve taken a prohibitively long time. We were forced to keep our clusters running legacy OS versions and Elasticsearch versions, missing both critical updates and performance improvements.\n\nMost notably, patching the log4shell vulnerability by disabling JNDI lookups and setting log4j2.formatMsgNoLookups to true required taking our search system fully offline for a maintenance period while we restarted every Elasticsearch node with the new configuration.\n\nIndices with large guilds grew too large\n\nOver time, some of our Elasticsearch indices housed the data for some very large Discord guilds. Naturally, large guilds post a LOT of messages, causing the incides to grow very large. Each of our Elasticsearch indices is a single Lucene index under the hood, and Lucene has a MAX_DOC limit of about 2 billion messages per index. As we learned the hard way, once you hit this limit, all indexing operations will fail.\n\nWhen this happened, our only path to recover was to work with our Safety team to try and find guilds that were solely intended to spam as many messages as possible and delete them. This worked for the time being, but we knew we would eventually have to support search on legitimate communities that had posted more than 2 billion messages.\n\n‍", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Back in 2017, we shared how we built our message search syst", "source_line_range": [ 1, 34 ] }, { "id": "body-region-2", "text": "the solutions while our search infrastructure had served its purpose for many years we began to experience more and more incidents as our clusters failed to handle increased message throughput and query volume given our brittleness to rolling restarts and software upgrades our outdated software also needed an update since this was going to be a big undertaking we might as well take the opportunity to learn and evolve from our existing infrastructure deploy elasticsearch on kubernetes by now discord was deploying many of our stateless services on kubernetes this was a significant improvement to our ease of operability and allowed us to optimize costs with more granular compute and memory resources we didn t run any stateful services on kubernetes but the elastic kubernetes operator seemed like a promising solution for orchestrating and managing an elasticsearch cluster deployed on kubernetes with the elasticsearch operator we would easily be able to define our cluster topology and configuration and deploy the elasticsearch cluster onto our kubernetes nodepool os upgrades would happen automatically and the eck operator exposes ergonomic tools for safely performing rolling restarts and upgrades multi cluster cell architecture to run smaller elasticsearch clusters now that we had committed to running on kubernetes and using the eck operator we envisioned a more expansive architecture where we ran a larger number of smaller elasticsearch clusters in our legacy system our clusters had grown to more than 200 nodes per cluster this meant that a given node in the cluster could fail often and the coordination overhead for the cluster itself was very high cluster states of an elasticsearch cluster don t scale as a cluster grows to contain more nodes and more indices the overhead for the cluster s master node also increases we began to see our cluster s master nodes frequently oom which would cause indexing failures a growing backlog of messages that failed to index into elasticsearch degraded query performance and frequent timeouts in our new search infrastructure we would create more elasticsearch indices to remedy this so each index could stay within the recommendation of 200m messages and 50gb of data these indices would be housed over many more smaller clusters helping keep our cluster state and coordination overhead down for better performance we introduced the concept of a logical cell of multiple elasticsearch clusters allowing us to have a higher level grouping of a set of smaller elasticsearch clusters we ll discuss our usage of cells how this unlocked new search features and ability to handle large guilds later in this blog post within each of these smaller elasticsearch clusters in a cell we run dedicated ingest nodes master eligible nodes and data nodes having these dedicated node roles ensures that master eligible nodes always have sufficient resources to perform cluster coordination ingest nodes performing pre processing and routing can be run as a stateless deployment since they own no data and can scale up and down to handle volume spikes data nodes can be given sufficient heap resources to handle indexing and query operations given the different resource requirements for our different node roles their respective pods are scheduled onto different machine types and nodepools we designed each cluster to be resilient to zonal failure with the following 3 master eligible nodes one per zone at least 3 ingest nodes one per zone data nodes the primary and replica of an index are in different zones with shard allocation awareness and forced awareness balances indices across all zones pubsub message queue we migrated our indexing message queue from redis to pubsub which allowed us to have guaranteed message delivery and tolerate large backlogs of messages this meant that elasticsearch failures now could lead to a slowdown in indexing but we would no longer drop messages phew in fact the convenience of pubsub s guaranteed message delivery led us to adopt pubsub for other use cases across discord like task scheduling but that s a blog post for another day batch messages by cluster and index before bulk indexing we still want to index messages in bulk for performance but our workers should be intelligent and collect and index batches of messages housed on the same cluster this ensures that each bulk index operation talks to a single elasticsearch index and node so if a node does fail it only impacts index operations for messages on that node this is more important now that we have a larger number of clusters and indices to improve our bulk indexing strategy we implemented a pubsub message router that streams messages from pubsub and collects batches of messages grouped by their destination or in our case the elasticsearch cluster and index the message is mapped to the message router creates a channel and spawns a tokio task for each destination in the messages being pulled the router then sends the message to the task collects chunks of messages for indexing which it receives on its channel our router streams messages from pubsub and extracts a destination or key for each message in our case the destination is the elasticsearch cluster and index this message will live on when the router encounters a message with a new destination it spawns an unbounded channel and a tokio task that receives messages on that channel as the router continues to receive messages it forwards them on to the appropriate channel keyed by destination each destination task collects chunks of messages now all keyed by the same destination and bulk indexes to elasticsearch messagerouter routes messages to a set of dynamically spawned destinations this is a simplified representation of the messagerouter used to index new discord messages into elasticsearch struct messagerouter destinationkeyt messaget destinations rwlock hashmap destinationkeyt unboundedsender messaget impl destinationkeyt messaget messagerouter attempts to send the message to the given destination spawning it if the destination does not exist fn send message self destination key destinationkeyt message messaget result let mut destinations self destinations write match destinations entry destination key entry occupied mut ent send the message to the given destination ent get send message ok entry vacant ent spawn a new destination and receiver let destination sender destination receiver unbounded channel let task tokio task spawn async move destination task receives messages with same destination key on destination receiver for our case the destination task groups messages into chunks and bulk indexes into elasticsearch ent insert destination sender send message ok ok supporting new search use cases defining cells of elasticsearch clusters gave a useful abstraction that allowed us to index messages in different dimensions the ability to search across all your dms had long been a requested feature but one that we were unable to support since all messages were sharded and indexed by guild or dm fanning out a search query over all of a user s dms would be far too expensive in order to efficiently search across all dms we would need to shard the messages by user rather than by channel storing all of a user s dms together on a given elasticsearch index this would also mean that we d store twice as much data as each message in a dm would be indexed into recipient a s index and recipient b s index given that we were already planning to re index all discord messages as part of our migration to this new architecture this provided a rare chance to shard and index some messages differently guild messages are still sharded by guild id but now user dm messages are now sharded by user id and indexed in a separate user dm messages elasticsearch cell this is what powers the new cross dm search functionality now available on mobile now all dm messages and search queries are served by the user dm messages elasticsearch cell and guild messages and queries served by guild messages cell you won t need to remember who sent you that one message six years ago give big freaking guilds dedicated elasticsearch clusters with multiple shards as guilds on discord grow larger with longer histories more and more of them bump up against lucene s max doc limit of 2 billion messages we needed a solution to scale search for these special cases which we call bfgs or big freaking guilds we wanted to retain the performance gains from storing all messages for a given guild on the same elasticsearch shard since that still works for the vast majority of guilds but we needed a solution to scale search for bfgs as well elasticsearch indices can have multiple primary shards with each shard living on a node in the cluster having multiple primary shards means data for an index will be spread across multiple nodes in the cluster backed by multiple underlying lucene indices to optimize query performance we normally create elasticsearch indices with a single primary shard this guarantees that all messages in that index are colocated on a single elasticsearch node so there s no fanout and coordination overhead at query time for almost all discord guilds this results in far more performance search queries since each query only talks to a single elasticsearch node in the case of bfgs however we are dealing with bf indices and large message volume billions of messages on a single guild having more shards in an index can speed up search queries but only when the cost of coordination does not exceed the cost of querying the index for bfgs we can realize query performance gains from the parallelism we get by fanning out a search query to multiple shards and the coordination cost is worth it indexing bfg messages onto indices with multiple primary shards lets us scale our search functionality to guilds with many billions of messages and allows for more performant queries for these special case guilds it also improves query performance for other discord guilds that previously would ve had their resources hogged by the expensive queries to bfgs on the same index we built a new system that allows us to reindex a bfg s messages onto a new index with more primary shards increasing the maximum number of messages importantly we need to continue to index new messages and serve queries while this migration is happening the bfg reindexing flow goes as follows we identify a bfg a guild where the number of messages is approaching the lucene max docs this guild is currently indexed to index a we create a new index new bfg index in our elasticsearch cell dedicated to bfgs within 2x the primary shard count of the previous index new messages are now dual indexed to index a and new bfg index we kick off a job to historically index all the guild s messages into new bfg index ongoing search queries are still served from index a when the historical indexing is complete we switch new query traffic from index a to new bfg index once we re confident that new bfg index is performant and reliable we stop indexing new incoming messages to index a and kick off a cleanup job to remove all the bfg s messages from too small index by running a dedicated elasticsearch cell for bfgs we can keep the cluster and index configurations standard for most guilds and resources while retaining the ability to adjust as needed for these outlier but important bfgs", "source_text": "The Solutions\n\n\nWhile our search infrastructure had served its purpose for many years, we began to experience more and more incidents as our clusters failed to handle increased message throughput and query volume. Given our brittleness to rolling restarts and software upgrades, our outdated software also needed an update.\n\nSince this was going to be a big undertaking, we might as well take the opportunity to learn and evolve from our existing infrastructure.\n\nDeploy Elasticsearch on Kubernetes\n\nBy now, Discord was deploying many of our stateless services on Kubernetes. This was a significant improvement to our ease of operability, and allowed us to optimize costs with more granular compute and memory resources. We didn't run any stateful services on Kubernetes, but the Elastic Kubernetes Operator seemed like a promising solution for orchestrating and managing an Elasticsearch cluster deployed on Kubernetes.\n\nWith the Elasticsearch Operator, we would easily be able to define our cluster topology and configuration, and deploy the Elasticsearch cluster onto our Kubernetes nodepool. OS upgrades would happen automatically, and the ECK operator exposes ergonomic tools for safely performing rolling restarts and upgrades.\n\nMulti-cluster “cell” architecture to run smaller Elasticsearch clusters\n\nNow that we had committed to running on Kubernetes and using the ECK operator, we envisioned a more expansive architecture where we ran a larger number of smaller Elasticsearch clusters.\n\nIn our legacy system, our clusters had grown to more than 200 nodes per cluster. This meant that a given node in the cluster could fail often, and the coordination overhead for the cluster itself was very high.\n\nCluster states of an Elasticsearch cluster don't scale — as a cluster grows to contain more nodes and more indices, the overhead for the cluster’s master node also increases. We began to see our cluster’s master nodes frequently OOM, which would cause indexing failures, a growing backlog of messages that failed to index into Elasticsearch, degraded query performance, and frequent timeouts.\n\nIn our new search infrastructure, we would create more Elasticsearch indices to remedy this, so each index could stay within the recommendation of 200M messages and 50GB of data. These indices would be housed over many more, smaller clusters, helping keep our cluster state and coordination overhead down for better performance.\n\nWe introduced the concept of a logical “cell” of multiple Elasticsearch clusters, allowing us to have a higher-level grouping of a set of smaller Elasticsearch clusters. We'll discuss our usage of cells how this unlocked new search features and ability to handle large guilds later in this blog post.\n\nWithin each of these smaller Elasticsearch clusters in a cell, we run dedicated ingest nodes, master-eligible nodes, and data nodes. Having these dedicated node roles ensures that:\n\nMaster-eligible nodes always have sufficient resources to perform cluster coordination\nIngest nodes performing pre-processing and routing can be run as a stateless deployment since they own no data and can scale up and down to handle volume spikes\nData nodes can be given sufficient heap resources to handle indexing and query operations\n\nGiven the different resource requirements for our different node roles, their respective pods are scheduled onto different machine types and nodepools.\n\nWe designed each cluster to be resilient to zonal failure with the following:\n\n3 master-eligible nodes: one per zone\nAt least 3 ingest nodes: one per zone\nData nodes: the primary and replica of an index are in different zones with shard allocation awareness, and forced awareness balances indices across all zones\nPubSub message queue\n\nWe migrated our indexing message queue from Redis to PubSub, which allowed us to have guaranteed message delivery and tolerate large backlogs of messages. This meant that Elasticsearch failures now could lead to a slowdown in indexing, but we would no longer drop messages — phew!\n\nIn fact, the convenience of PubSub’s guaranteed message delivery led us to adopt PubSub for other use cases across Discord like task scheduling—but that’s a blog post for another day.\n\nBatch messages by cluster and index before bulk indexing\n\nWe still want to index messages in bulk for performance, but our workers should be intelligent and collect and index batches of messages housed on the same cluster. This ensures that each bulk index operation talks to a single Elasticsearch index and node, so if a node does fail, it only impacts index operations for messages on that node. This is more important now that we have a larger number of clusters and indices.\n\nTo improve our bulk indexing strategy, we implemented a PubSub message router that streams messages from PubSub and collects batches of messages grouped by their Destination, or in our case, the Elasticsearch cluster and index the message is mapped to. The message router creates a channel and spawns a tokio task for each Destination in the messages being pulled: the router then sends the message to the task collects chunks of messages for indexing, which it receives on its channel.\n\nOur router streams messages from PubSub and extracts a Destination, or key, for each message.In our case, the Destination is the Elasticsearch cluster and index this message will live on. When the router encounters a message with a new Destination, it spawns an unbounded channel and a tokio task that receives messages on that channel.\n\nAs the router continues to receive messages, it forwards them on to the appropriate channel, keyed by Destination. Each destination task collects chunks of messages, now all keyed by the same Destination, and bulk indexes to Elasticsearch.\n\n/// MessageRouter routes messages to a set of dynamically spawned destinations.\n\n/// This is a simplified representation of the MessageRouter used to index\n\n/// new Discord messages into Elasticsearch.\n\nstruct MessageRouter {\n\n destinations: RwLock>,\n\n}\n\n\n\nimpl MessageRouter {\n\n /// Attempts to send the message to the given destination, spawning it\n\n /// if the destination does not exist.\n\n fn send_message(\n\n &self,\n\n destination_key: DestinationKeyT,\n\n message: MessageT,\n\n ) -> Result<()> {\n\n let mut destinations = self.destinations.write();\n\n match destinations.entry(destination_key) {\n\n Entry::Occupied(mut ent) => {\n\n\t // Send the message to the given destination\n\n\t ent.get().send(message).ok();\n\n }\n\n Entry::Vacant(ent) => {\n\n // Spawn a new destination and receiver\n\n let (destination_sender, destination_receiver) = unbounded_channel();\n\n let task = tokio::task::spawn(async move {\n\n // Destination task receives messages with same destination\n\n // key on destination_receiver.\n\n // For our case, the destination task groups messages into \n\n // chunks and bulk indexes into Elasticsearch.\n\n });\n\n ent.insert(destination_sender).send(message).ok();\n\n }\n\n }\n\n Ok(())\n\n }\n\n}\nSupporting new search use cases\n\nDefining “cells” of Elasticsearch clusters gave a useful abstraction that allowed us to index messages in different dimensions. The ability to search across all your DMs had long been a requested feature, but one that we were unable to support since all messages were sharded and indexed by guild or DM. Fanning out a search query over all of a user’s DMs would be far too expensive.\n\nIn order to efficiently search across all DMs, we would need to shard the messages by user, rather than by channel, storing all of a user’s DMs together on a given Elasticsearch index. This would also mean that we'd store twice as much data, as each message in a DM would be indexed into recipient_a’s index and recipient_b’s index.\n\nGiven that we were already planning to re-index all Discord messages as part of our migration to this new architecture, this provided a rare chance to shard and index some messages differently. Guild messages are still sharded by guild_id, but now user DM messages are now sharded by user_id and indexed in a separate user-dm-messages Elasticsearch cell.\n\nThis is what powers the new cross-DM search functionality, now available on mobile. Now, all DM messages and search queries are served by the user-dm-messages Elasticsearch cell, and guild messages and queries served by guild-messages cell. You won't need to remember who sent you that one message six years ago!\n\nGive “Big Freaking Guilds” dedicated Elasticsearch clusters, with multiple shards\n\nAs guilds on Discord grow larger with longer histories, more and more of them bump up against Lucene’s MAX_DOC limit of ~2 billion messages. We needed a solution to scale search for these special cases, which we call BFGs, or Big Freaking Guilds.\n\nWe wanted to retain the performance gains from storing all messages for a given guild on the same Elasticsearch shard, since that still works for the vast majority of guilds, but we needed a solution to scale search for BFGs as well.\n\nElasticsearch indices can have multiple primary shards, with each shard living on a node in the cluster. Having multiple primary shards means data for an index will be spread across multiple nodes in the cluster, backed by multiple underlying Lucene indices.\n\nTo optimize query performance, we normally create Elasticsearch indices with a single primary shard. This guarantees that all messages in that index are colocated on a single Elasticsearch node, so there's no fanout and coordination overhead at query-time. For almost all Discord guilds, this results in far more performance search queries since each query only talks to a single Elasticsearch node.\n\nIn the case of BFGs, however, we are dealing with BF-indices and large message volume: billions of messages on a single guild! Having more shards in an index can speed up search queries, but only when the cost of coordination does not exceed the cost of querying the index. For BFGs, we can realize query performance gains from the parallelism we get by fanning out a search query to multiple shards, and the coordination cost is worth it.\n\nIndexing BFG messages onto indices with multiple primary shards lets us scale our search functionality to guilds with many billions of messages, and allows for more performant queries for these special-case guilds. It also improves query performance for other Discord guilds that previously would’ve had their resources hogged by the expensive queries to BFGs on the same index.\n\nWe built a new system that allows us to reindex a BFG’s messages onto a new index with more primary shards, increasing the maximum number of messages. Importantly, we need to continue to index new messages and serve queries while this migration is happening.\n\nThe BFG reindexing flow goes as follows:\n\nWe identify a BFG: a guild where the number of messages is approaching the Lucene MAX_DOCS. This guild is currently indexed to index-a\nWe create a new index, new-bfg-index, in our Elasticsearch cell dedicated to BFGs, within 2x the primary shard count of the previous index.\nNew messages are now dual-indexed to index-a and new-bfg-index\nWe kick off a job to historically index all the guild’s messages into new-bfg-index. Ongoing search queries are still served from index-a\nWhen the historical indexing is complete, we switch new query traffic from index-a to new-bfg-index\nOnce we’re confident that new-bfg-index is performant and reliable, we stop indexing new incoming messages to index-a and kick off a cleanup job to remove all the BFG’s messages from too-small-index\n\nBy running a dedicated Elasticsearch cell for BFGs, we can keep the cluster and index configurations standard for most guilds and resources while retaining the ability to adjust as needed for these outlier but important BFGs.", "segmentation_method": "reviewed_source_semantics", "label": "The Solutions", "source_line_range": [ 35, 196 ] }, { "id": "body-region-3", "text": "so how are things going now with our new search infrastructure we index trillions of messages with double the indexing throughput of our legacy search improved median query latency from 500ms to 100ms and p99 from 1s to 500ms run 40 elasticsearch clusters with thousands of indices perform cluster upgrades and rolling restarts automatically and with no service impact we re excited to keep powering fast and efficient search for discord guilds even as our communities grow to each have billions of messages and beyond if these sorts of technical challenges tickle your brain as well come join us", "source_text": "So... how are things going?\n\n\nNow, with our new search infrastructure, we:\n\nIndex trillions of messages, with double the indexing throughput of our legacy search\nImproved median query latency from 500ms to <100ms, and p99 from 1s to <500ms\nRun 40 Elasticsearch clusters with thousands of indices\nPerform cluster upgrades and rolling restarts automatically and with no service impact\n\nWe’re excited to keep powering fast and efficient search for Discord guilds, even as our communities grow to each have billions of messages and beyond!\n\nIf these sorts of technical challenges tickle your brain as well, come join us!", "segmentation_method": "reviewed_source_semantics", "label": "So... how are things going?", "source_line_range": [ 197, 220 ] } ], "ending": { "text": "d beyond!\n\nIf these sorts of technical challenges tickle your brain as well, come join us!" } } }, { "id": "article-058", "name": "Celebrating Five Years of Backstage", "url": "https://engineering.atspotify.com/2025/4/celebrating-five-years-of-backstage", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Celebrating Five Years of Backstage: From Open Source Project to Enterprise Business" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Tyson Singer, Head of Technology and Platforms" ] }, { "id": "stable-3", "alternatives": [ "Engineering Culture" ] }, { "id": "stable-4", "alternatives": [ "engineering leadership" ] }, { "id": "stable-5", "alternatives": [ "BACKSTAGE" ] }, { "id": "stable-6", "alternatives": [ "DEVELOPER EXPERIENCE" ] }, { "id": "stable-7", "alternatives": [ "DEVELOPER TOOLS" ] }, { "id": "stable-8", "alternatives": [ "OPEN SOURCE" ] }, { "id": "stable-9", "alternatives": [ "PLATFORM" ] }, { "id": "stable-10", "alternatives": [ "Blog" ] }, { "id": "stable-11", "alternatives": [ "Podcasts" ] }, { "id": "stable-12", "alternatives": [ "Open Source" ] }, { "id": "stable-13", "alternatives": [ "Jobs" ] }, { "id": "stable-14", "alternatives": [ "About" ] }, { "id": "stable-15", "alternatives": [ "SHARE THIS ARTICLE" ] }, { "id": "stable-16", "alternatives": [ "Related articles" ] }, { "id": "stable-17", "alternatives": [ "Want to stay in the loop?" ] }, { "id": "stable-18", "alternatives": [ "Subscribe to our newsletter to never miss an update!" ] }, { "id": "stable-19", "alternatives": [ "By clicking sign up you’ll receive occasional emails from Spotify. You always have the choice to adjust your interest settings or unsubscribe." ] }, { "id": "stable-20", "alternatives": [ "Subscribe" ] }, { "id": "stable-21", "alternatives": [ "Spotify.com" ] }, { "id": "stable-22", "alternatives": [ "Spotify Jobs" ] }, { "id": "stable-23", "alternatives": [ "Newsroom" ] }, { "id": "stable-24", "alternatives": [ "Spotify R&D Research" ] }, { "id": "stable-25", "alternatives": [ "Spotify for Backstage" ] }, { "id": "stable-26", "alternatives": [ "Legal" ] }, { "id": "stable-27", "alternatives": [ "Privacy" ] }, { "id": "stable-28", "alternatives": [ "Cookies" ] }, { "id": "stable-29", "alternatives": [ "About Ads" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Celebrating Five Years of Backstage: From Open Source Project to Enterprise Business" ], "html_selector": "h1.single-post__title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-058/comment-qualification-reference-r5.json", "sha256": "80c6ef084e734d24fb0ba24bb78ce6ea22b706681dfab0084b6c1128bc13968b", "chars": 806, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Did you know that we sell Spotify’s developer productivity tools and support to other companies, from online retailers and fashion brands to banks and automobile manufacturers? How did Spotify get into the business of selling enterprise developer software? And how does serving the open source community — not to mention paying corporate customers — improve our own internal software practices? Tyson Singer, Spotify’s head of technology and platforms, shares how our homegrown developer portal evolved from an open source project to our newest enterprise software product: Spotify Portal for Backstage.\n\nFive years ago on March 16, 2020, we open sourced Backstage, a framework for building internal developer portals (IDPs) like the one we were using at Spotify. Despite being a very new idea — the term “IDP” didn’t even exist back then — the project took off on day one, and accelerated from there.\n\nToday, Backstage is the IDP platform of choice — with over 3,000 companies having adopted it to build IDPs of their own. Within Spotify, it’s still what our 700 R&D squads rely on to help them ship every day. And, oh yeah, we’re also building an enterprise software business on top of it. So how did Spotify get here? And where will Backstage take us next?\n\nA platform for developer experience\n\nBefore open sourcing Backstage, we’d already been using it internally for years to help us solve a whole range of developer experience problems: context switching, fragmentation, cognitive load, silos, duplication, congestion, dependency management, tech health, compliance — you name it, Backstage could grow to help us address it. As a centralized platform, it contained the chaos of modern software development while making our whole engineering org more productive and more efficient. It became invaluable to how we work — and we didn’t want to lose it.\n\nHow would we lose it? We’d recently gone through a painful migration before with another technology, where we had to move from our custom-built solution to a third-party one that had become the standard. We didn’t want to go through that again with Backstage. So we open sourced it.\n\nBecoming the industry standard\n\nBackstage had become so valuable to us, we thought other companies would find it valuable, too. But we also had another motive for open sourcing it. It wasn’t just about sharing: Our ambition from the very start was for Backstage to become the standard for IDPs. Because if everyone else was using it, we wouldn’t have to migrate off it.\n\nBut you’re not going to become the standard just by being free. The product also has to be good. Even more than that, for us, Backstage had to be great. Because we’re an end user, too — probably the most demanding one. We depend on Backstage to improve the developer experience and productivity of our own teams, which has a direct impact on our business. As an open source project, we’d also get the benefit of outside contributions, addressing use cases we hadn’t even thought of yet. Sounds great, right?\n\nBut of course, be careful what you wish for. Now we were no longer building just for ourselves, now we were building for everyone. And sometimes it feels like those two things might be competing with each other. Could we meet the demands of the outside community while still serving the needs of our own developers?\n\nHow building for others has benefited us\n\nHere’s an example of what it’s been like being both maintainer and end user of the Backstage project: We recently launched a complete rewrite of the entire backend system. This has been a really big endeavor for us. But we saw that adopters really needed an easier way to build and integrate plugins. So we did the work — building with the community and rewriting the whole backend over the course of a year.\n\nAnd when the 1.0 of the new backend launched, it was great. Here are just a few of the things we’ve heard from the community and our enterprise customers alike: “Makes things a lot easier to maintain.” “You used to have to wire things together across multiple files. Now adding a new plugin is a one-liner.” The new backend “was the game changer 🚀🧑‍💻.”\n\nEverything about the new backend is simpler to work with — for the community and for us. So, of course, now we’re in the middle of completely rewriting the frontend, too. And guess what? That will be great for Spotify as end users, as well.\n\nIf we hadn’t open sourced Backstage, I don’t know how long we would have kept living with our previous, more complicated backend system. Because of the community — both its needs and the way it enables us to build better solutions — we were pushed to build a much better version of Backstage for ourselves. And we could also quickly bring those improvements to our enterprise customers — through a no-code UI for installing and managing plugins — in Spotify Portal, our SaaS solution for Backstage adopters.\n\nInternal → open source → commercial: The best of all worlds\n\nSpotify Portal is a SaaS solution for Backstage that brings together the best of everything we know about building IDPs, both inside and outside Spotify. Apply to get the Portal beta.\n\nIt’s been a lot of push and pull in how we balance internal priorities with external ones. But ultimately, this is a virtuous cycle. The ever-popular Notifications feature, the Events management plugin, and the API Docs plugin, which basically powers our entity pages for API entities — all of these are used in Spotify’s internal Backstage instance, and all were contributions from the community.\n\nBeing part of a developer community beyond Spotify has put us in such a great position for continuing to invest in and grow the Backstage platform. The project has improved our own internal software practices. We’ve benefited from the innovation of the community at large. And we’ve been able to keep investing in the ecosystem in a way that improves our commercial Backstage products and brings more value to our enterprise customers.\n\nIn five years, we’ve gone from basically just a thin framework for building an IDP, to a better IDP than we could have built by ourselves, and now to a SaaS product that we think is the best IDP for the future. This journey can be bumpy. But making that repo public back in 2020 has definitely brought us to a place we never could have imagined today. All of which proves out our original idea: Investing in the community has been an investment in ourselves, as well.\n\nSo, happy 5th birthday, Backstage! We’ve come far in a short time. But we’re expecting even bigger things ahead.\n\nWatch Tyson share Spotify’s Backstage journey with the open source community at KubeCon + CloudNativeCon Europe 2025 in London, April 3, 2025\n\nReady to try Backstage for yourself? Apply for the Spotify Portal beta — the fastest way to get up and running with a Backstage IDP of your own. Portal combines the best of open source with the best of Spotify’s developer experience and developer productivity practices.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "did you know that we sell spotify s developer productivity tools and support to other companies from online retailers and fashion brands to banks and automobile manufacturers how did spotify get into the business of selling enterprise developer software and how does serving the open source community not to mention paying corporate customers improve our own internal software practices tyson singer spotify s head of technology and platforms shares how our homegrown developer portal evolved from an open source project to our newest enterprise software product spotify portal for backstage five years ago on march 16 2020 we open sourced backstage a framework for building internal developer portals idps like the one we were using at spotify despite being a very new idea the term idp didn t even exist back then the project took off on day one and accelerated from there today backstage is the idp platform of choice with over 3 000 companies having adopted it to build idps of their own within spotify it s still what our 700 r d squads rely on to help them ship every day and oh yeah we re also building an enterprise software business on top of it so how did spotify get here and where will backstage take us next", "source_text": "Did you know that we sell Spotify’s developer productivity tools and support to other companies, from online retailers and fashion brands to banks and automobile manufacturers? How did Spotify get into the business of selling enterprise developer software? And how does serving the open source community — not to mention paying corporate customers — improve our own internal software practices? Tyson Singer, Spotify’s head of technology and platforms, shares how our homegrown developer portal evolved from an open source project to our newest enterprise software product: Spotify Portal for Backstage.\n\nFive years ago on March 16, 2020, we open sourced Backstage, a framework for building internal developer portals (IDPs) like the one we were using at Spotify. Despite being a very new idea — the term “IDP” didn’t even exist back then — the project took off on day one, and accelerated from there.\n\nToday, Backstage is the IDP platform of choice — with over 3,000 companies having adopted it to build IDPs of their own. Within Spotify, it’s still what our 700 R&D squads rely on to help them ship every day. And, oh yeah, we’re also building an enterprise software business on top of it. So how did Spotify get here? And where will Backstage take us next?", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Did you know that we sell Spotify’s developer productivity t", "source_line_range": [ 1, 6 ] }, { "id": "body-region-2", "text": "a platform for developer experience before open sourcing backstage we d already been using it internally for years to help us solve a whole range of developer experience problems context switching fragmentation cognitive load silos duplication congestion dependency management tech health compliance you name it backstage could grow to help us address it as a centralized platform it contained the chaos of modern software development while making our whole engineering org more productive and more efficient it became invaluable to how we work and we didn t want to lose it how would we lose it we d recently gone through a painful migration before with another technology where we had to move from our custom built solution to a third party one that had become the standard we didn t want to go through that again with backstage so we open sourced it", "source_text": "A platform for developer experience\n\nBefore open sourcing Backstage, we’d already been using it internally for years to help us solve a whole range of developer experience problems: context switching, fragmentation, cognitive load, silos, duplication, congestion, dependency management, tech health, compliance — you name it, Backstage could grow to help us address it. As a centralized platform, it contained the chaos of modern software development while making our whole engineering org more productive and more efficient. It became invaluable to how we work — and we didn’t want to lose it.\n\nHow would we lose it? We’d recently gone through a painful migration before with another technology, where we had to move from our custom-built solution to a third-party one that had become the standard. We didn’t want to go through that again with Backstage. So we open sourced it.", "segmentation_method": "reviewed_source_semantics", "label": "A platform for developer experience", "source_line_range": [ 7, 12 ] }, { "id": "body-region-3", "text": "becoming the industry standard backstage had become so valuable to us we thought other companies would find it valuable too but we also had another motive for open sourcing it it wasn t just about sharing our ambition from the very start was for backstage to become the standard for idps because if everyone else was using it we wouldn t have to migrate off it but you re not going to become the standard just by being free the product also has to be good even more than that for us backstage had to be great because we re an end user too probably the most demanding one we depend on backstage to improve the developer experience and productivity of our own teams which has a direct impact on our business as an open source project we d also get the benefit of outside contributions addressing use cases we hadn t even thought of yet sounds great right but of course be careful what you wish for now we were no longer building just for ourselves now we were building for everyone and sometimes it feels like those two things might be competing with each other could we meet the demands of the outside community while still serving the needs of our own developers", "source_text": "Becoming the industry standard\n\nBackstage had become so valuable to us, we thought other companies would find it valuable, too. But we also had another motive for open sourcing it. It wasn’t just about sharing: Our ambition from the very start was for Backstage to become the standard for IDPs. Because if everyone else was using it, we wouldn’t have to migrate off it.\n\nBut you’re not going to become the standard just by being free. The product also has to be good. Even more than that, for us, Backstage had to be great. Because we’re an end user, too — probably the most demanding one. We depend on Backstage to improve the developer experience and productivity of our own teams, which has a direct impact on our business. As an open source project, we’d also get the benefit of outside contributions, addressing use cases we hadn’t even thought of yet. Sounds great, right?\n\nBut of course, be careful what you wish for. Now we were no longer building just for ourselves, now we were building for everyone. And sometimes it feels like those two things might be competing with each other. Could we meet the demands of the outside community while still serving the needs of our own developers?", "segmentation_method": "reviewed_source_semantics", "label": "Becoming the industry standard", "source_line_range": [ 13, 20 ] }, { "id": "body-region-4", "text": "how building for others has benefited us here s an example of what it s been like being both maintainer and end user of the backstage project we recently launched a complete rewrite of the entire backend system this has been a really big endeavor for us but we saw that adopters really needed an easier way to build and integrate plugins so we did the work building with the community and rewriting the whole backend over the course of a year and when the 1 0 of the new backend launched it was great here are just a few of the things we ve heard from the community and our enterprise customers alike makes things a lot easier to maintain you used to have to wire things together across multiple files now adding a new plugin is a one liner the new backend was the game changer everything about the new backend is simpler to work with for the community and for us so of course now we re in the middle of completely rewriting the frontend too and guess what that will be great for spotify as end users as well if we hadn t open sourced backstage i don t know how long we would have kept living with our previous more complicated backend system because of the community both its needs and the way it enables us to build better solutions we were pushed to build a much better version of backstage for ourselves and we could also quickly bring those improvements to our enterprise customers through a no code ui for installing and managing plugins in spotify portal our saas solution for backstage adopters", "source_text": "How building for others has benefited us\n\nHere’s an example of what it’s been like being both maintainer and end user of the Backstage project: We recently launched a complete rewrite of the entire backend system. This has been a really big endeavor for us. But we saw that adopters really needed an easier way to build and integrate plugins. So we did the work — building with the community and rewriting the whole backend over the course of a year.\n\nAnd when the 1.0 of the new backend launched, it was great. Here are just a few of the things we’ve heard from the community and our enterprise customers alike: “Makes things a lot easier to maintain.” “You used to have to wire things together across multiple files. Now adding a new plugin is a one-liner.” The new backend “was the game changer 🚀🧑‍💻.”\n\nEverything about the new backend is simpler to work with — for the community and for us. So, of course, now we’re in the middle of completely rewriting the frontend, too. And guess what? That will be great for Spotify as end users, as well.\n\nIf we hadn’t open sourced Backstage, I don’t know how long we would have kept living with our previous, more complicated backend system. Because of the community — both its needs and the way it enables us to build better solutions — we were pushed to build a much better version of Backstage for ourselves. And we could also quickly bring those improvements to our enterprise customers — through a no-code UI for installing and managing plugins — in Spotify Portal, our SaaS solution for Backstage adopters.", "segmentation_method": "reviewed_source_semantics", "label": "How building for others has benefited us", "source_line_range": [ 21, 30 ] }, { "id": "body-region-5", "text": "internal open source commercial the best of all worlds spotify portal is a saas solution for backstage that brings together the best of everything we know about building idps both inside and outside spotify apply to get the portal beta it s been a lot of push and pull in how we balance internal priorities with external ones but ultimately this is a virtuous cycle the ever popular notifications feature the events management plugin and the api docs plugin which basically powers our entity pages for api entities all of these are used in spotify s internal backstage instance and all were contributions from the community being part of a developer community beyond spotify has put us in such a great position for continuing to invest in and grow the backstage platform the project has improved our own internal software practices we ve benefited from the innovation of the community at large and we ve been able to keep investing in the ecosystem in a way that improves our commercial backstage products and brings more value to our enterprise customers in five years we ve gone from basically just a thin framework for building an idp to a better idp than we could have built by ourselves and now to a saas product that we think is the best idp for the future this journey can be bumpy but making that repo public back in 2020 has definitely brought us to a place we never could have imagined today all of which proves out our original idea investing in the community has been an investment in ourselves as well so happy 5th birthday backstage we ve come far in a short time but we re expecting even bigger things ahead watch tyson share spotify s backstage journey with the open source community at kubecon cloudnativecon europe 2025 in london april 3 2025 ready to try backstage for yourself apply for the spotify portal beta the fastest way to get up and running with a backstage idp of your own portal combines the best of open source with the best of spotify s developer experience and developer productivity practices", "source_text": "Internal → open source → commercial: The best of all worlds\n\nSpotify Portal is a SaaS solution for Backstage that brings together the best of everything we know about building IDPs, both inside and outside Spotify. Apply to get the Portal beta.\n\nIt’s been a lot of push and pull in how we balance internal priorities with external ones. But ultimately, this is a virtuous cycle. The ever-popular Notifications feature, the Events management plugin, and the API Docs plugin, which basically powers our entity pages for API entities — all of these are used in Spotify’s internal Backstage instance, and all were contributions from the community.\n\nBeing part of a developer community beyond Spotify has put us in such a great position for continuing to invest in and grow the Backstage platform. The project has improved our own internal software practices. We’ve benefited from the innovation of the community at large. And we’ve been able to keep investing in the ecosystem in a way that improves our commercial Backstage products and brings more value to our enterprise customers.\n\nIn five years, we’ve gone from basically just a thin framework for building an IDP, to a better IDP than we could have built by ourselves, and now to a SaaS product that we think is the best IDP for the future. This journey can be bumpy. But making that repo public back in 2020 has definitely brought us to a place we never could have imagined today. All of which proves out our original idea: Investing in the community has been an investment in ourselves, as well.\n\nSo, happy 5th birthday, Backstage! We’ve come far in a short time. But we’re expecting even bigger things ahead.\n\nWatch Tyson share Spotify’s Backstage journey with the open source community at KubeCon + CloudNativeCon Europe 2025 in London, April 3, 2025\n\nReady to try Backstage for yourself? Apply for the Spotify Portal beta — the fastest way to get up and running with a Backstage IDP of your own. Portal combines the best of open source with the best of Spotify’s developer experience and developer productivity practices.", "segmentation_method": "reviewed_source_semantics", "label": "Internal → open source → commercial: The best of all worlds", "source_line_range": [ 31, 45 ] } ], "ending": { "text": "urce with the best of Spotify’s developer experience and developer productivity practices." } } }, { "id": "article-059", "name": "龙舟漾遗风 粽情系家国——品端午情怀新气象", "url": "https://www.xinhuanet.com/politics/20240610/f9bd687cb6734380a42d224d2ef23c90/c.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "新华全媒\\+\\|龙舟漾遗风 粽情系家国——品端午情怀新气象" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "来源:新华网" ] }, { "id": "stable-3", "alternatives": [ "ENGLISH" ] }, { "id": "stable-4", "alternatives": [ "新华报刊" ] }, { "id": "stable-5", "alternatives": [ "地方频道" ] }, { "id": "stable-6", "alternatives": [ "承建网站" ] }, { "id": "stable-7", "alternatives": [ "网站无障碍" ] }, { "id": "stable-8", "alternatives": [ "客户端" ] }, { "id": "stable-9", "alternatives": [ "手机版" ] }, { "id": "stable-10", "alternatives": [ "站内搜索" ] }, { "id": "stable-11", "alternatives": [ "新华通讯社主办" ] }, { "id": "stable-12", "alternatives": [ "公司官网" ] }, { "id": "stable-13", "alternatives": [ "学习进行时" ] }, { "id": "stable-14", "alternatives": [ "高层" ] }, { "id": "stable-15", "alternatives": [ "时政" ] }, { "id": "stable-16", "alternatives": [ "人事" ] }, { "id": "stable-17", "alternatives": [ "国际" ] }, { "id": "stable-18", "alternatives": [ "财经" ] }, { "id": "stable-19", "alternatives": [ "网评" ] }, { "id": "stable-20", "alternatives": [ "港澳" ] }, { "id": "stable-21", "alternatives": [ "台湾" ] }, { "id": "stable-22", "alternatives": [ "思客智库" ] }, { "id": "stable-23", "alternatives": [ "全球连线" ] }, { "id": "stable-24", "alternatives": [ "教育" ] }, { "id": "stable-25", "alternatives": [ "科技" ] }, { "id": "stable-26", "alternatives": [ "科创" ] }, { "id": "stable-27", "alternatives": [ "量子" ] }, { "id": "stable-28", "alternatives": [ "体育" ] }, { "id": "stable-29", "alternatives": [ "文化" ] }, { "id": "stable-30", "alternatives": [ "书画" ] }, { "id": "stable-31", "alternatives": [ "健康" ] }, { "id": "stable-32", "alternatives": [ "军事" ] }, { "id": "stable-33", "alternatives": [ "访谈" ] }, { "id": "stable-34", "alternatives": [ "视频" ] }, { "id": "stable-35", "alternatives": [ "图片" ] }, { "id": "stable-36", "alternatives": [ "政务" ] }, { "id": "stable-37", "alternatives": [ "法律" ] }, { "id": "stable-38", "alternatives": [ "中央文件" ] }, { "id": "stable-39", "alternatives": [ "金融" ] }, { "id": "stable-40", "alternatives": [ "汽车" ] }, { "id": "stable-41", "alternatives": [ "食品" ] }, { "id": "stable-42", "alternatives": [ "人居生活" ] }, { "id": "stable-43", "alternatives": [ "信息化" ] }, { "id": "stable-44", "alternatives": [ "数字经济" ] }, { "id": "stable-45", "alternatives": [ "学术中国" ] }, { "id": "stable-46", "alternatives": [ "乡村振兴" ] }, { "id": "stable-47", "alternatives": [ "银龄" ] }, { "id": "stable-48", "alternatives": [ "溯源中国" ] }, { "id": "stable-49", "alternatives": [ "城市" ] }, { "id": "stable-50", "alternatives": [ "旅游" ] }, { "id": "stable-51", "alternatives": [ "能源" ] }, { "id": "stable-52", "alternatives": [ "会展" ] }, { "id": "stable-53", "alternatives": [ "彩票" ] }, { "id": "stable-54", "alternatives": [ "娱乐" ] }, { "id": "stable-55", "alternatives": [ "时尚" ] }, { "id": "stable-56", "alternatives": [ "悦读" ] }, { "id": "stable-57", "alternatives": [ "公益" ] }, { "id": "stable-58", "alternatives": [ "一带一路" ] }, { "id": "stable-59", "alternatives": [ "亚太网" ] }, { "id": "stable-60", "alternatives": [ "上市公司" ] }, { "id": "stable-61", "alternatives": [ "文化产业" ] }, { "id": "stable-62", "alternatives": [ "字体:" ] }, { "id": "stable-63", "alternatives": [ "小" ] }, { "id": "stable-64", "alternatives": [ "中" ] }, { "id": "stable-65", "alternatives": [ "大" ] }, { "id": "stable-66", "alternatives": [ "分享到:" ] }, { "id": "stable-67", "alternatives": [ "责任编辑" ] }, { "id": "stable-68", "alternatives": [ "深度观察" ] }, { "id": "stable-69", "alternatives": [ "制作单位:新华网股份有限公司" ] }, { "id": "stable-70", "alternatives": [ "版权所有:新华网股份有限公司" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "新华全媒+|龙舟漾遗风 粽情系家国——品端午情怀新气象" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-059/comment-qualification-reference-r5.json", "sha256": "a458e6d4fde3fa1ab3f76d5cf65b92afb0eea49af5cb5198aa2b4ee18c15c270", "chars": 813, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "  新华社北京6月10日电 题:龙舟漾遗风 粽情系家国——品端午情怀新气象\n\n  新华社记者\n\n  又是一年端午时。\n\n  手腕上的五彩绳、腰间的香囊,门前的艾草、飘香的粽子,劈波斩浪的龙舟……端午,在跨越千年万里的古老传唱中,涤荡着悠扬的新声。\n\n  “粽”情端午,穿越千年历久弥新\n\n  包粽子、挂菖蒲、赠香囊……各地习俗不尽相同,但都承载着人民祈福安康的愿望。\n\n  6月8日,湖北省蕲春县席盘石村72岁的村民王大庆起了个大早,到农田边割下今年第一把艾草。他说:“晒干后,拿一部分捣碎制作艾条,点燃熏屋可以驱邪。另一部分用来煮艾水鸡蛋,吃了保健康。”\n\n  端午这天,大街小巷“行走”的香囊等饰品,充满传统韵味,散发沁人香气。不少市民说,佩戴香囊寄托着美好祝福,勾起儿时美好回忆。\n\n  6月8日,山东省临沂市郯城县郯城街道府东社区居民为孩子讲解端午佩香囊民俗。新华社发(张春雷摄)\n\n  端午凝聚着“家”的情感。\n\n  河面上船桨舞动、水花四溅,一艘艘龙舟竞速冲刺。这是今年端午节期间,贵州省镇远县举行的赛龙舟活动上的一幕。\n\n  镇远县魏家屯村村民李贡涛为赛龙舟,特意请假回乡,这是他第七年划龙舟。他说,一场龙舟赛,像一声号令,把四散在远方的游子们唤回家乡。\n\n  村支书贾英华说,赛后村里办百桌宴,在外村生活的“姑妈”要带着姑爹娃仔回村,全村老老少少围坐在一起热热闹闹吃个饭。\n\n  6月6日,贵州镇远古城,各参赛的龙舟队正在积极备战训练。(吴贤和摄)\n\n  端午习俗,绵延千年,历久弥新。\n\n  在宁夏博物馆,小朋友亲手制作艾草香包,感受传统文化之美;在湖北秭归,龙舟抢红夺标赛,共赴传承之旅;在江苏南京,图书馆阅读服务进景区,书香弥漫端午节……\n\n  蕲春县一处蕲艾基地,电商直播开到田间。蕲春种艾用艾的传统延续1800多年,如今,小小一株蕲艾已经发展为综合价值超百亿元的产业。\n\n  华中师范大学文学院教授孙正国说,今年兴起了艾草花束、粽子挎包以及民俗文化游、研学游等新风尚,相关产业呈现蓬勃之势,展现出传统文化新活力。\n\n  传承民族基因,弘扬爱国情怀\n\n  “节分端午自谁言,万古传闻为屈原。”屈原无疑是最醒目的端午文化符号。这一天,重温浓情假日,更感受到奋勇争先的民族精神、炽热深厚的爱国情怀。\n\n  汨罗江龙舟超级联赛近期开锣。“我们顶着烈日训练,因为划龙舟是我们的传统,不能丢。”来自湖南汨罗市罗江镇罗滨村龙舟队的队员邹端科说,端午节在汨罗的重要程度,仅次于春节。\n\n  千百年赛龙舟,赛的是江河上同舟共济、奋勇争先,展现时代大潮中的上下求索。\n\n  循环经济是汨罗的传统支柱产业。经过三十年不懈努力,从早期的粗放式发展转型升级为绿色、低碳的标准化产业模式,每年数百万吨废旧金属在这里重获新生。\n\n  “爱国主义是屈原精神的底色。”在汨罗屈子祠工作40余年的屈学专家刘石林说,希望每一代人像屈原有正直高尚的品格,不断创新求索。\n\n  6月6日,湖北省秭归县屈原镇屈原村“三闾骚坛”举办诗会。(王罡摄)\n\n  在屈原诞生地,湖北省秭归县屈原镇屈原村端午节都会举办骚坛诗会。“三闾骚坛”是明清时期在当地诞生的民间诗歌社团,参与者多是农民诗人。\n\n  翻开他们的诗歌,蕴藏着共同的文化记忆,不仅看到屈原精神代代相传,还有讴歌农村焕然一新的时代变迁。\n\n  秭归,这个曾经的国家级贫困县,靠着发展脐橙产业脱贫致富。75岁的黄家兆是土生土长的屈原村人,他说,要把屈原爱国精神代代坚守,让子孙后代把国家建设得更富强。\n\n  厚植文化自信,推动中华文化生机勃发\n\n  以端午之名,传承弘扬中华优秀传统文化,延续中华民族的根和魂,展现着节日中的中国故事。\n\n  当端午节“邂逅”文化和自然遗产日,广东省非物质文化遗产馆推出集市活动,让人们看到老手艺焕发的新活力。\n\n  “我早早就预约了进馆,带孩子更生动地感受我们传统的端午文化,感悟文化自信。”广州市民刘欣然说。\n\n  在摊位上,年轻人分享艾草、葫芦等做成的迷你挂件,祈求端午安康;小朋友体验雕刻龙舟、雕版拓印等,沉浸式感受传统文化。\n\n  6月9日,观众在广东省非遗馆参观。(广东省非遗馆供图)\n\n  一个民族的历史文化遗产生动述说着过去,也深刻影响着当下和未来。\n\n  近年来,在不少地方,一批批年轻人“溯流而上”,古老的文化传统有了新玩法。“汨罗香囊制作技艺”非遗项目代表性传承人戴芸伊回乡创业,进村寻访香囊的古法技艺,研发香囊文创产品30余项。随着国潮文化兴起,她的香囊走红,吸引许多游客关注。\n\n  浙江省非遗保护中心主任郭艺表示,深入挖掘中华优秀传统文化,积极创新,正在让非物质文化遗产融入生活。\n\n  善于继承才能善于创新。中国美院教师夏琳璐是一位年轻的锔瓷技艺传承人。“这门古老的手艺,在我们这一代人手上创新才能传承下去,现代锔艺要和现代审美和科技相结合。”她说。\n\n  这几年,夏琳璐身边的学生更年轻了。她相信,随着有更多的年轻人参与进来,传统文化会更具活力。\n\n  从香包、手绳、艾草装饰品走俏,新中式服装成为新潮;到非遗表演精彩纷呈,文博馆文化IP联名“上新”成为热门打卡地……人们热爱并投身传统文化的传承和创新,在端午节得到集中展现,彰显出传统节日所蕴含的文化自信力。\n\n  “这份扎根于人们心中的自信,会推动中华文化更加生机勃勃。”郭艺说。(记者田宇、周楠、李黔渝、宋立崑、邓瑞璇、冯源)", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "新 华 社 北 京 6 月 10 日 电 题 龙 舟 漾 遗 风 粽 情 系 家 国 品 端 午 情 怀 新 气 象 新 华 社 记 者 又 是 一 年 端 午 时 手 腕 上 的 五 彩 绳 腰 间 的 香 囊 门 前 的 艾 草 飘 香 的 粽 子 劈 波 斩 浪 的 龙 舟 端 午 在 跨 越 千 年 万 里 的 古 老 传 唱 中 涤 荡 着 悠 扬 的 新 声 粽 情 端 午 穿 越 千 年 历 久 弥 新 包 粽 子 挂 菖 蒲 赠 香 囊 各 地 习 俗 不 尽 相 同 但 都 承 载 着 人 民 祈 福 安 康 的 愿 望 6 月 8 日 湖 北 省 蕲 春 县 席 盘 石 村 72 岁 的 村 民 王 大 庆 起 了 个 大 早 到 农 田 边 割 下 今 年 第 一 把 艾 草 他 说 晒 干 后 拿 一 部 分 捣 碎 制 作 艾 条 点 燃 熏 屋 可 以 驱 邪 另 一 部 分 用 来 煮 艾 水 鸡 蛋 吃 了 保 健 康 端 午 这 天 大 街 小 巷 行 走 的 香 囊 等 饰 品 充 满 传 统 韵 味 散 发 沁 人 香 气 不 少 市 民 说 佩 戴 香 囊 寄 托 着 美 好 祝 福 勾 起 儿 时 美 好 回 忆 6 月 8 日 山 东 省 临 沂 市 郯 城 县 郯 城 街 道 府 东 社 区 居 民 为 孩 子 讲 解 端 午 佩 香 囊 民 俗 新 华 社 发 张 春 雷 摄 端 午 凝 聚 着 家 的 情 感 河 面 上 船 桨 舞 动 水 花 四 溅 一 艘 艘 龙 舟 竞 速 冲 刺 这 是 今 年 端 午 节 期 间 贵 州 省 镇 远 县 举 行 的 赛 龙 舟 活 动 上 的 一 幕", "source_text": "新华社北京6月10日电 题:龙舟漾遗风 粽情系家国——品端午情怀新气象\n\n  新华社记者\n\n  又是一年端午时。\n\n  手腕上的五彩绳、腰间的香囊,门前的艾草、飘香的粽子,劈波斩浪的龙舟……端午,在跨越千年万里的古老传唱中,涤荡着悠扬的新声。\n\n  “粽”情端午,穿越千年历久弥新\n\n  包粽子、挂菖蒲、赠香囊……各地习俗不尽相同,但都承载着人民祈福安康的愿望。\n\n  6月8日,湖北省蕲春县席盘石村72岁的村民王大庆起了个大早,到农田边割下今年第一把艾草。他说:“晒干后,拿一部分捣碎制作艾条,点燃熏屋可以驱邪。另一部分用来煮艾水鸡蛋,吃了保健康。”\n\n  端午这天,大街小巷“行走”的香囊等饰品,充满传统韵味,散发沁人香气。不少市民说,佩戴香囊寄托着美好祝福,勾起儿时美好回忆。\n\n  6月8日,山东省临沂市郯城县郯城街道府东社区居民为孩子讲解端午佩香囊民俗。新华社发(张春雷摄)\n\n  端午凝聚着“家”的情感。\n\n  河面上船桨舞动、水花四溅,一艘艘龙舟竞速冲刺。这是今年端午节期间,贵州省镇远县举行的赛龙舟活动上的一幕。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:新华社北京6月10日电 题:龙舟漾遗风 粽情系家国——品端午情怀新气象 — 段落/内容单元:河面上船桨舞动、水花四溅,一艘艘龙舟竞速冲刺。这是今年端午节期间,贵州省镇远县举行的赛龙舟活动上的一幕。", "source_line_range": [ 1, 22 ] }, { "id": "body-region-2", "text": "镇 远 县 魏 家 屯 村 村 民 李 贡 涛 为 赛 龙 舟 特 意 请 假 回 乡 这 是 他 第 七 年 划 龙 舟 他 说 一 场 龙 舟 赛 像 一 声 号 令 把 四 散 在 远 方 的 游 子 们 唤 回 家 乡 村 支 书 贾 英 华 说 赛 后 村 里 办 百 桌 宴 在 外 村 生 活 的 姑 妈 要 带 着 姑 爹 娃 仔 回 村 全 村 老 老 少 少 围 坐 在 一 起 热 热 闹 闹 吃 个 饭 6 月 6 日 贵 州 镇 远 古 城 各 参 赛 的 龙 舟 队 正 在 积 极 备 战 训 练 吴 贤 和 摄 端 午 习 俗 绵 延 千 年 历 久 弥 新 在 宁 夏 博 物 馆 小 朋 友 亲 手 制 作 艾 草 香 包 感 受 传 统 文 化 之 美 在 湖 北 秭 归 龙 舟 抢 红 夺 标 赛 共 赴 传 承 之 旅 在 江 苏 南 京 图 书 馆 阅 读 服 务 进 景 区 书 香 弥 漫 端 午 节 蕲 春 县 一 处 蕲 艾 基 地 电 商 直 播 开 到 田 间 蕲 春 种 艾 用 艾 的 传 统 延 续 1800 多 年 如 今 小 小 一 株 蕲 艾 已 经 发 展 为 综 合 价 值 超 百 亿 元 的 产 业 华 中 师 范 大 学 文 学 院 教 授 孙 正 国 说 今 年 兴 起 了 艾 草 花 束 粽 子 挎 包 以 及 民 俗 文 化 游 研 学 游 等 新 风 尚 相 关 产 业 呈 现 蓬 勃 之 势 展 现 出 传 统 文 化 新 活 力 传 承 民 族 基 因 弘 扬 爱 国 情 怀", "source_text": "镇远县魏家屯村村民李贡涛为赛龙舟,特意请假回乡,这是他第七年划龙舟。他说,一场龙舟赛,像一声号令,把四散在远方的游子们唤回家乡。\n\n  村支书贾英华说,赛后村里办百桌宴,在外村生活的“姑妈”要带着姑爹娃仔回村,全村老老少少围坐在一起热热闹闹吃个饭。\n\n  6月6日,贵州镇远古城,各参赛的龙舟队正在积极备战训练。(吴贤和摄)\n\n  端午习俗,绵延千年,历久弥新。\n\n  在宁夏博物馆,小朋友亲手制作艾草香包,感受传统文化之美;在湖北秭归,龙舟抢红夺标赛,共赴传承之旅;在江苏南京,图书馆阅读服务进景区,书香弥漫端午节……\n\n  蕲春县一处蕲艾基地,电商直播开到田间。蕲春种艾用艾的传统延续1800多年,如今,小小一株蕲艾已经发展为综合价值超百亿元的产业。\n\n  华中师范大学文学院教授孙正国说,今年兴起了艾草花束、粽子挎包以及民俗文化游、研学游等新风尚,相关产业呈现蓬勃之势,展现出传统文化新活力。\n\n  传承民族基因,弘扬爱国情怀", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:镇远县魏家屯村村民李贡涛为赛龙舟,特意请假回乡,这是他第七年划龙舟。他说,一场龙舟赛,像一声号令,把四散在远方的游子们唤 — 段落/内容单元:传承民族基因,弘扬爱国情怀", "source_line_range": [ 23, 38 ] }, { "id": "body-region-3", "text": "节 分 端 午 自 谁 言 万 古 传 闻 为 屈 原 屈 原 无 疑 是 最 醒 目 的 端 午 文 化 符 号 这 一 天 重 温 浓 情 假 日 更 感 受 到 奋 勇 争 先 的 民 族 精 神 炽 热 深 厚 的 爱 国 情 怀 汨 罗 江 龙 舟 超 级 联 赛 近 期 开 锣 我 们 顶 着 烈 日 训 练 因 为 划 龙 舟 是 我 们 的 传 统 不 能 丢 来 自 湖 南 汨 罗 市 罗 江 镇 罗 滨 村 龙 舟 队 的 队 员 邹 端 科 说 端 午 节 在 汨 罗 的 重 要 程 度 仅 次 于 春 节 千 百 年 赛 龙 舟 赛 的 是 江 河 上 同 舟 共 济 奋 勇 争 先 展 现 时 代 大 潮 中 的 上 下 求 索 循 环 经 济 是 汨 罗 的 传 统 支 柱 产 业 经 过 三 十 年 不 懈 努 力 从 早 期 的 粗 放 式 发 展 转 型 升 级 为 绿 色 低 碳 的 标 准 化 产 业 模 式 每 年 数 百 万 吨 废 旧 金 属 在 这 里 重 获 新 生 爱 国 主 义 是 屈 原 精 神 的 底 色 在 汨 罗 屈 子 祠 工 作 40 余 年 的 屈 学 专 家 刘 石 林 说 希 望 每 一 代 人 像 屈 原 有 正 直 高 尚 的 品 格 不 断 创 新 求 索 6 月 6 日 湖 北 省 秭 归 县 屈 原 镇 屈 原 村 三 闾 骚 坛 举 办 诗 会 王 罡 摄 在 屈 原 诞 生 地 湖 北 省 秭 归 县 屈 原 镇 屈 原 村 端 午 节 都 会 举 办 骚 坛 诗 会 三 闾 骚 坛 是 明 清 时 期 在 当 地 诞 生 的 民 间 诗 歌 社 团 参 与 者 多 是 农 民 诗 人", "source_text": "“节分端午自谁言,万古传闻为屈原。”屈原无疑是最醒目的端午文化符号。这一天,重温浓情假日,更感受到奋勇争先的民族精神、炽热深厚的爱国情怀。\n\n  汨罗江龙舟超级联赛近期开锣。“我们顶着烈日训练,因为划龙舟是我们的传统,不能丢。”来自湖南汨罗市罗江镇罗滨村龙舟队的队员邹端科说,端午节在汨罗的重要程度,仅次于春节。\n\n  千百年赛龙舟,赛的是江河上同舟共济、奋勇争先,展现时代大潮中的上下求索。\n\n  循环经济是汨罗的传统支柱产业。经过三十年不懈努力,从早期的粗放式发展转型升级为绿色、低碳的标准化产业模式,每年数百万吨废旧金属在这里重获新生。\n\n  “爱国主义是屈原精神的底色。”在汨罗屈子祠工作40余年的屈学专家刘石林说,希望每一代人像屈原有正直高尚的品格,不断创新求索。\n\n  6月6日,湖北省秭归县屈原镇屈原村“三闾骚坛”举办诗会。(王罡摄)\n\n  在屈原诞生地,湖北省秭归县屈原镇屈原村端午节都会举办骚坛诗会。“三闾骚坛”是明清时期在当地诞生的民间诗歌社团,参与者多是农民诗人。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:“节分端午自谁言,万古传闻为屈原。”屈原无疑是最醒目的端午文化符号。这一天,重温浓情假日,更感受到奋勇争先的民族精神、炽 — 段落/内容单元:在屈原诞生地,湖北省秭归县屈原镇屈原村端午节都会举办骚坛诗会。“三闾骚坛”是明清时期在当地诞生的民间诗歌社团,参与者多是", "source_line_range": [ 39, 52 ] }, { "id": "body-region-4", "text": "翻 开 他 们 的 诗 歌 蕴 藏 着 共 同 的 文 化 记 忆 不 仅 看 到 屈 原 精 神 代 代 相 传 还 有 讴 歌 农 村 焕 然 一 新 的 时 代 变 迁 秭 归 这 个 曾 经 的 国 家 级 贫 困 县 靠 着 发 展 脐 橙 产 业 脱 贫 致 富 75 岁 的 黄 家 兆 是 土 生 土 长 的 屈 原 村 人 他 说 要 把 屈 原 爱 国 精 神 代 代 坚 守 让 子 孙 后 代 把 国 家 建 设 得 更 富 强 厚 植 文 化 自 信 推 动 中 华 文 化 生 机 勃 发 以 端 午 之 名 传 承 弘 扬 中 华 优 秀 传 统 文 化 延 续 中 华 民 族 的 根 和 魂 展 现 着 节 日 中 的 中 国 故 事 当 端 午 节 邂 逅 文 化 和 自 然 遗 产 日 广 东 省 非 物 质 文 化 遗 产 馆 推 出 集 市 活 动 让 人 们 看 到 老 手 艺 焕 发 的 新 活 力 我 早 早 就 预 约 了 进 馆 带 孩 子 更 生 动 地 感 受 我 们 传 统 的 端 午 文 化 感 悟 文 化 自 信 广 州 市 民 刘 欣 然 说 在 摊 位 上 年 轻 人 分 享 艾 草 葫 芦 等 做 成 的 迷 你 挂 件 祈 求 端 午 安 康 小 朋 友 体 验 雕 刻 龙 舟 雕 版 拓 印 等 沉 浸 式 感 受 传 统 文 化 6 月 9 日 观 众 在 广 东 省 非 遗 馆 参 观 广 东 省 非 遗 馆 供 图 一 个 民 族 的 历 史 文 化 遗 产 生 动 述 说 着 过 去 也 深 刻 影 响 着 当 下 和 未 来", "source_text": "翻开他们的诗歌,蕴藏着共同的文化记忆,不仅看到屈原精神代代相传,还有讴歌农村焕然一新的时代变迁。\n\n  秭归,这个曾经的国家级贫困县,靠着发展脐橙产业脱贫致富。75岁的黄家兆是土生土长的屈原村人,他说,要把屈原爱国精神代代坚守,让子孙后代把国家建设得更富强。\n\n  厚植文化自信,推动中华文化生机勃发\n\n  以端午之名,传承弘扬中华优秀传统文化,延续中华民族的根和魂,展现着节日中的中国故事。\n\n  当端午节“邂逅”文化和自然遗产日,广东省非物质文化遗产馆推出集市活动,让人们看到老手艺焕发的新活力。\n\n  “我早早就预约了进馆,带孩子更生动地感受我们传统的端午文化,感悟文化自信。”广州市民刘欣然说。\n\n  在摊位上,年轻人分享艾草、葫芦等做成的迷你挂件,祈求端午安康;小朋友体验雕刻龙舟、雕版拓印等,沉浸式感受传统文化。\n\n  6月9日,观众在广东省非遗馆参观。(广东省非遗馆供图)\n\n  一个民族的历史文化遗产生动述说着过去,也深刻影响着当下和未来。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:翻开他们的诗歌,蕴藏着共同的文化记忆,不仅看到屈原精神代代相传,还有讴歌农村焕然一新的时代变迁。 — 段落/内容单元:一个民族的历史文化遗产生动述说着过去,也深刻影响着当下和未来。", "source_line_range": [ 53, 70 ] }, { "id": "body-region-5", "text": "近 年 来 在 不 少 地 方 一 批 批 年 轻 人 溯 流 而 上 古 老 的 文 化 传 统 有 了 新 玩 法 汨 罗 香 囊 制 作 技 艺 非 遗 项 目 代 表 性 传 承 人 戴 芸 伊 回 乡 创 业 进 村 寻 访 香 囊 的 古 法 技 艺 研 发 香 囊 文 创 产 品 30 余 项 随 着 国 潮 文 化 兴 起 她 的 香 囊 走 红 吸 引 许 多 游 客 关 注 浙 江 省 非 遗 保 护 中 心 主 任 郭 艺 表 示 深 入 挖 掘 中 华 优 秀 传 统 文 化 积 极 创 新 正 在 让 非 物 质 文 化 遗 产 融 入 生 活 善 于 继 承 才 能 善 于 创 新 中 国 美 院 教 师 夏 琳 璐 是 一 位 年 轻 的 锔 瓷 技 艺 传 承 人 这 门 古 老 的 手 艺 在 我 们 这 一 代 人 手 上 创 新 才 能 传 承 下 去 现 代 锔 艺 要 和 现 代 审 美 和 科 技 相 结 合 她 说 这 几 年 夏 琳 璐 身 边 的 学 生 更 年 轻 了 她 相 信 随 着 有 更 多 的 年 轻 人 参 与 进 来 传 统 文 化 会 更 具 活 力 从 香 包 手 绳 艾 草 装 饰 品 走 俏 新 中 式 服 装 成 为 新 潮 到 非 遗 表 演 精 彩 纷 呈 文 博 馆 文 化 ip 联 名 上 新 成 为 热 门 打 卡 地 人 们 热 爱 并 投 身 传 统 文 化 的 传 承 和 创 新 在 端 午 节 得 到 集 中 展 现 彰 显 出 传 统 节 日 所 蕴 含 的 文 化 自 信 力 这 份 扎 根 于 人 们 心 中 的 自 信 会 推 动 中 华 文 化 更 加 生 机 勃 勃 郭 艺 说 记 者 田 宇 周 楠 李 黔 渝 宋 立 崑 邓 瑞 璇 冯 源", "source_text": "近年来,在不少地方,一批批年轻人“溯流而上”,古老的文化传统有了新玩法。“汨罗香囊制作技艺”非遗项目代表性传承人戴芸伊回乡创业,进村寻访香囊的古法技艺,研发香囊文创产品30余项。随着国潮文化兴起,她的香囊走红,吸引许多游客关注。\n\n  浙江省非遗保护中心主任郭艺表示,深入挖掘中华优秀传统文化,积极创新,正在让非物质文化遗产融入生活。\n\n  善于继承才能善于创新。中国美院教师夏琳璐是一位年轻的锔瓷技艺传承人。“这门古老的手艺,在我们这一代人手上创新才能传承下去,现代锔艺要和现代审美和科技相结合。”她说。\n\n  这几年,夏琳璐身边的学生更年轻了。她相信,随着有更多的年轻人参与进来,传统文化会更具活力。\n\n  从香包、手绳、艾草装饰品走俏,新中式服装成为新潮;到非遗表演精彩纷呈,文博馆文化IP联名“上新”成为热门打卡地……人们热爱并投身传统文化的传承和创新,在端午节得到集中展现,彰显出传统节日所蕴含的文化自信力。\n\n  “这份扎根于人们心中的自信,会推动中华文化更加生机勃勃。”郭艺说。(记者田宇、周楠、李黔渝、宋立崑、邓瑞璇、冯源)", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:近年来,在不少地方,一批批年轻人“溯流而上”,古老的文化传统有了新玩法。“汨罗香囊制作技艺”非遗项目代表性传承人戴芸伊回 — 段落/内容单元:“这份扎根于人们心中的自信,会推动中华文化更加生机勃勃。”郭艺说。(记者田宇、周楠、李黔渝、宋立崑、邓瑞璇、冯源)", "source_line_range": [ 71, 81 ] } ], "ending": { "text": ",在端午节得到集中展现,彰显出传统节日所蕴含的文化自信力。\n\n  “这份扎根于人们心中的自信,会推动中华文化更加生机勃勃。”郭艺说。(记者田宇、周楠、李黔渝、宋立崑、邓瑞璇、冯源)" } } }, { "id": "article-060", "name": "2024年端午节假期文化和旅游市场情况", "url": "https://www.mct.gov.cn/whzx/whyw/202406/t20240610_953396.htm", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "2024年端午节假期文化和旅游市场情况" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "source", "alternatives": [ "文化和旅游部政府门户网站" ] }, { "id": "office", "alternatives": [ "文旅办公" ] }, { "id": "accessibility", "alternatives": [ "无障碍浏览" ] }, { "id": "search", "alternatives": [ "搜索" ] }, { "id": "institutions", "alternatives": [ "机构简介" ] }, { "id": "information", "alternatives": [ "信息发布" ] }, { "id": "disclosure", "alternatives": [ "政务公开" ] }, { "id": "government-services", "alternatives": [ "政务服务" ] }, { "id": "public-services", "alternatives": [ "公共服务" ] }, { "id": "interaction", "alternatives": [ "互动交流" ] }, { "id": "category", "alternatives": [ "焦点新闻" ] }, { "id": "back-top", "alternatives": [ "返回顶部" ] }, { "id": "print", "alternatives": [ "打印本页" ] }, { "id": "close-window", "alternatives": [ "关闭窗口" ] }, { "id": "about", "alternatives": [ "关于我们" ] }, { "id": "sitemap", "alternatives": [ "网站地图" ] }, { "id": "copyright", "alternatives": [ "版权保护" ] }, { "id": "disclaimer", "alternatives": [ "免责声明" ] } ] }, "rule_review": { "status": "reviewed", "reason": "All five body paragraphs were observed in the initial automatic-load #zoom container, including the final sentence before article controls; no interaction was performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "2024年端午节假期文化和旅游市场情况" ], "html_selector": ".sp_title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-060/comment-qualification-reference-r5.json", "sha256": "c015ea04a3c15108fe47ea395b935a314fc242355e44330efb348d45dd5570d7", "chars": 795, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "  2024年端午节假期,全国文化和旅游市场总体平稳有序。据文化和旅游部数据中心测算,全国国内旅游出游合计1.1亿人次,同比增长6.3%;国内游客出游总花费403.5亿元,同比增长8.1%。\n  假期中,各地纷纷推出特色活动、新型消费场景和惠民措施,丰富群众文化和旅游生活。陕西举办各类文化和旅游活动600余场,推出优惠门票、特价房、特色美食等。上海推出“观文博、看美展、赏好剧、听歌会、来海考、享美育、逛景区、品食尚”八大板块200项活动。福建策划推出640余场地域文化主题活动和140余项惠民措施。内蒙古面向学生群体推出“与青春有关的毕业旅行”等产品。\n  赛龙舟、吃粽子、唱山歌、赏古曲,传统节日的浓厚文化内涵与旅游发展深度融合。广东、湖南、浙江、贵州、云南等地举办龙舟竞渡。湖北武汉推出“漫游武汉”系列文化和旅游活动。河南通过非遗展演、端午习俗等沉浸式场景让游客感受传统文化魅力。安徽推出花戏楼里的情景剧、沉浸式微空间体验剧等产品。江苏举办“水韵江苏·乐购非遗”活动。各地还将传统民俗、民间艺术有机融入博物馆、美术馆、图书馆、戏剧场、电影院等文化空间,丰富了文旅深入融合的新场景。\n  大批游客选择在本地休闲或近程旅游,城郊亲水、采摘、农事体验、露营等项目受到青睐,文化场馆、商业街区成为游客的主要游憩空间。国家级夜间文化和旅游消费集聚区因地制宜举办非遗体验、民俗市集等端午主题特色活动,持续释放夜间消费活力。\n\n  游客越来越偏爱选择灵活化、个性化的出游方式,在慢节奏旅行、深入体验、放松休闲中享受生活。云南、青海、甘肃、内蒙古、贵州等地成为年轻人自驾游、避暑游的热门选择。“影视+文旅”双向赋能,电视剧《我的阿勒泰》的热播带动以新疆阿勒泰地区、伊犁州尼勒克县等为代表的自驾游目的地持续火热。北京环球度假区、上海迪士尼度假区、珠海长隆度假区等“门票+酒店”的自由行套餐备受欢迎。 \n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "2024 年 端 午 节 假 期 全 国 文 化 和 旅 游 市 场 总 体 平 稳 有 序 据 文 化 和 旅 游 部 数 据 中 心 测 算 全 国 国 内 旅 游 出 游 合 计 1 1 亿 人 次 同 比 增 长 6 3 国 内 游 客 出 游 总 花 费 403 5 亿 元 同 比 增 长 8 1 假 期 中 各 地 纷 纷 推 出 特 色 活 动 新 型 消 费 场 景 和 惠 民 措 施 丰 富 群 众 文 化 和 旅 游 生 活 陕 西 举 办 各 类 文 化 和 旅 游 活 动 600 余 场 推 出 优 惠 门 票 特 价 房 特 色 美 食 等 上 海 推 出 观 文 博 看 美 展 赏 好 剧 听 歌 会 来 海 考 享 美 育 逛 景 区 品 食 尚 八 大 板 块 200 项 活 动 福 建 策 划 推 出 640 余 场 地 域 文 化 主 题 活 动 和 140 余 项 惠 民 措 施 内 蒙 古 面 向 学 生 群 体 推 出 与 青 春 有 关 的 毕 业 旅 行 等 产 品 赛 龙 舟 吃 粽 子 唱 山 歌 赏 古 曲 传 统 节 日 的 浓 厚 文 化 内 涵 与 旅 游 发 展 深 度 融 合 广 东 湖 南 浙 江 贵 州 云 南 等 地 举 办 龙 舟 竞 渡 湖 北 武 汉 推 出 漫 游 武 汉 系 列 文 化 和 旅 游 活 动 河 南 通 过 非 遗 展 演 端 午 习 俗 等 沉 浸 式 场 景 让 游 客 感 受 传 统 文 化 魅 力 安 徽 推 出 花 戏 楼 里 的 情 景 剧 沉 浸 式 微 空 间 体 验 剧 等 产 品 江 苏 举 办 水 韵 江 苏 乐 购 非 遗 活 动 各 地 还 将 传 统 民 俗 民 间 艺 术 有 机 融 入 博 物 馆 美 术 馆 图 书 馆 戏 剧 场 电 影 院 等 文 化 空 间 丰 富 了 文 旅 深 入 融 合 的 新 场 景 大 批 游 客 选 择 在 本 地 休 闲 或 近 程 旅 游 城 郊 亲 水 采 摘 农 事 体 验 露 营 等 项 目 受 到 青 睐 文 化 场 馆 商 业 街 区 成 为 游 客 的 主 要 游 憩 空 间 国 家 级 夜 间 文 化 和 旅 游 消 费 集 聚 区 因 地 制 宜 举 办 非 遗 体 验 民 俗 市 集 等 端 午 主 题 特 色 活 动 持 续 释 放 夜 间 消 费 活 力", "source_text": "2024年端午节假期,全国文化和旅游市场总体平稳有序。据文化和旅游部数据中心测算,全国国内旅游出游合计1.1亿人次,同比增长6.3%;国内游客出游总花费403.5亿元,同比增长8.1%。\n  假期中,各地纷纷推出特色活动、新型消费场景和惠民措施,丰富群众文化和旅游生活。陕西举办各类文化和旅游活动600余场,推出优惠门票、特价房、特色美食等。上海推出“观文博、看美展、赏好剧、听歌会、来海考、享美育、逛景区、品食尚”八大板块200项活动。福建策划推出640余场地域文化主题活动和140余项惠民措施。内蒙古面向学生群体推出“与青春有关的毕业旅行”等产品。\n  赛龙舟、吃粽子、唱山歌、赏古曲,传统节日的浓厚文化内涵与旅游发展深度融合。广东、湖南、浙江、贵州、云南等地举办龙舟竞渡。湖北武汉推出“漫游武汉”系列文化和旅游活动。河南通过非遗展演、端午习俗等沉浸式场景让游客感受传统文化魅力。安徽推出花戏楼里的情景剧、沉浸式微空间体验剧等产品。江苏举办“水韵江苏·乐购非遗”活动。各地还将传统民俗、民间艺术有机融入博物馆、美术馆、图书馆、戏剧场、电影院等文化空间,丰富了文旅深入融合的新场景。\n  大批游客选择在本地休闲或近程旅游,城郊亲水、采摘、农事体验、露营等项目受到青睐,文化场馆、商业街区成为游客的主要游憩空间。国家级夜间文化和旅游消费集聚区因地制宜举办非遗体验、民俗市集等端午主题特色活动,持续释放夜间消费活力。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:2024年端午节假期,全国文化和旅游市场总体平稳有序。据文化和旅游部数据中心测算,全国国内旅游出游合计1.1亿人次,同比", "source_line_range": [ 1, 5 ] }, { "id": "body-region-2", "text": "游 客 越 来 越 偏 爱 选 择 灵 活 化 个 性 化 的 出 游 方 式 在 慢 节 奏 旅 行 深 入 体 验 放 松 休 闲 中 享 受 生 活 云 南 青 海 甘 肃 内 蒙 古 贵 州 等 地 成 为 年 轻 人 自 驾 游 避 暑 游 的 热 门 选 择 影 视 文 旅 双 向 赋 能 电 视 剧 我 的 阿 勒 泰 的 热 播 带 动 以 新 疆 阿 勒 泰 地 区 伊 犁 州 尼 勒 克 县 等 为 代 表 的 自 驾 游 目 的 地 持 续 火 热 北 京 环 球 度 假 区 上 海 迪 士 尼 度 假 区 珠 海 长 隆 度 假 区 等 门 票 酒 店 的 自 由 行 套 餐 备 受 欢 迎", "source_text": "游客越来越偏爱选择灵活化、个性化的出游方式,在慢节奏旅行、深入体验、放松休闲中享受生活。云南、青海、甘肃、内蒙古、贵州等地成为年轻人自驾游、避暑游的热门选择。“影视+文旅”双向赋能,电视剧《我的阿勒泰》的热播带动以新疆阿勒泰地区、伊犁州尼勒克县等为代表的自驾游目的地持续火热。北京环球度假区、上海迪士尼度假区、珠海长隆度假区等“门票+酒店”的自由行套餐备受欢迎。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:游客越来越偏爱选择灵活化、个性化的出游方式,在慢节奏旅行、深入体验、放松休闲中享受生活。云南、青海、甘肃、内蒙古、贵州等", "source_line_range": [ 6, 6 ] } ], "ending": { "text": "球度假区、上海迪士尼度假区、珠海长隆度假区等“门票+酒店”的自由行套餐备受欢迎。" } } }, { "id": "article-061", "name": "What Is Impressionism? 4 Things to Know", "url": "https://www.nga.gov/stories/articles/what-impressionism-4-things-know", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "What\\ Is\\ Impressionism\\?\\ 4\\ Things\\ to\\ Know" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "National Gallery of Art" ] }, { "id": "stable-2", "alternatives": [ "Animations:" ] }, { "id": "stable-3", "alternatives": [ "Visit" ] }, { "id": "stable-4", "alternatives": [ "Exhibitions & Events" ] }, { "id": "stable-5", "alternatives": [ "Art & Artists" ] }, { "id": "stable-6", "alternatives": [ "Support" ] }, { "id": "stable-7", "alternatives": [ "Shop" ] }, { "id": "stable-8", "alternatives": [ "Become a Member" ] }, { "id": "stable-10", "alternatives": [ "By" ] }, { "id": "stable-11", "alternatives": [ "Annie Yi" ] }, { "id": "stable-12", "alternatives": [ "5 min read" ] }, { "id": "stable-13", "alternatives": [ "August 12, 2024" ] }, { "id": "stable-14", "alternatives": [ "You may also like" ] }, { "id": "stable-17", "alternatives": [ "Art news every week" ] }, { "id": "stable-19", "alternatives": [ "Follow us" ] }, { "id": "stable-20", "alternatives": [ "About" ] }, { "id": "stable-21", "alternatives": [ "About Us" ] }, { "id": "stable-22", "alternatives": [ "Press" ] }, { "id": "stable-23", "alternatives": [ "Contact Us" ] }, { "id": "stable-24", "alternatives": [ "Plan Your Visit" ] }, { "id": "stable-25", "alternatives": [ "Calendar" ] }, { "id": "stable-26", "alternatives": [ "Today's Tours" ] }, { "id": "stable-27", "alternatives": [ "Accessibility" ] }, { "id": "stable-28", "alternatives": [ "Exhibitions" ] }, { "id": "stable-29", "alternatives": [ "Get Involved" ] }, { "id": "stable-30", "alternatives": [ "Donate" ] }, { "id": "stable-31", "alternatives": [ "Opportunities" ] }, { "id": "stable-32", "alternatives": [ "Research" ] }, { "id": "stable-33", "alternatives": [ "Free Images for Download" ] }, { "id": "stable-34", "alternatives": [ "Artwork Search" ] }, { "id": "stable-35", "alternatives": [ "The Center" ] }, { "id": "stable-36", "alternatives": [ "Conservation" ] }, { "id": "stable-37", "alternatives": [ "Library" ] }, { "id": "stable-38", "alternatives": [ "Archives" ] }, { "id": "stable-39", "alternatives": [ "Past Exhibitions" ] }, { "id": "stable-40", "alternatives": [ "Publications" ] }, { "id": "stable-41", "alternatives": [ "Notices" ] }, { "id": "stable-42", "alternatives": [ "Privacy Policy" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Replaces the prior Met essay because its qualification included horizontally hidden gallery captions and the boundary could not be independently recovered. This independently observed same-topic National Gallery of Art article retains complete default prose and six visible ordinary art captions. Two normal loads, scrollY0, no click, expansion or carousel change. Ten other art captions have computedopacity0 and are excluded; an additional By figcaption is a separately checked byline label. Nonzero geometry alone does not establish visible text. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "What Is Impressionism? 4 Things to Know" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-061/replacement/comment-qualification-reference.json", "sha256": "955fd724aa53fadd5ef46745b983f6d2575e9ecba2bdff94e20e5e6780d6b38b", "record_count": 0, "chars": 837 }, "comment_presence_review": { "status": "observed_absent", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Impressionism is one of the most recognizable art movements in the world today, but it was revolutionary in its time. Originating in France in 1874, it was rejected by critics at first—only later embraced as a national symbol.\nIn the mid-19th century, France saw rapid technological and social changes. Gathering in cafés to discuss these societal transformations, the impressionists found opportunities for liberation. They changed the way they painted, in both subject matter and technique. They also met to discuss how, when, and where to exhibit their art. Learn more about the movement and discover the telltale markers of an impressionist work of art.\n1. The term “impressionist” came from a derisive review of a Claude Monet painting.\nIn 1874, Monet’s Impression, Sunrise appeared in the first exhibition held by an association of artists. They called themselves La Société anonyme des artistes peintres, sculpteurs et graveurs, etc. (the Anonymous Association of Painters, Sculptors, and Engravers, etc).\nClaude Monet, Impression, Sunrise, 1872, oil on canvas, Musée Marmottan Monet, gift of Eugène and Victorine Donop de Monchy, 1940. Inv. 4014. Photo: © Musée Marmottan Monet, Paris / Studio Christian Baraja SLB\nJournalist and art critic Louis Leroy published a scathing review titled The Exhibition of the Impressionists. In Leroy’s article, two imagined skeptical viewers scratch their heads at the works on view. One of them comments on Monet’s painting: “Wallpaper in its embryonic state is more finished than that seascape.”\nLeroy used the term “impressionist” disparagingly. But it became a rallying cry for artists like Berthe Morisot, Auguste Renoir, Alfred Sisley, Camille Pissarro, and others.\n2. Impressionists used thick, loose brushstrokes of contrasting color.\nWhen the impressionists first began exhibiting, the Académie des Beaux-Arts was still the arbiter of taste. It exercised its influence through Paris’s annual exhibition, the Salon. The academicians favored precise drawing, carefully rendered composition, and smoothly finished surfaces.\nBut impressionist painters broke with that tradition. They did not conceal their brushstrokes. They used choppy marks and dabs of unblended colors. They did not hide the fact that their works were made of paint. They were not seeking an illusion of reality.\nCompare Jean-Auguste-Dominique Ingres’ portrait of Madame Moitessier, with Mary Cassatt’s The Loge.\nJean-Auguste-Dominique Ingres, Madame Moitessier, 1851, oil on canvas, Samuel H. Kress Collection, 1946.7.18\n1 of 2\nIngres was the quintessential academic master. He rendered Madame Moitessier’s black lace and shiny baubles in exquisite detail. Cassatt merely suggests the satin of her opera-goers' dresses through luminous color, and not delicate threadwork and draping.\nDetail of Jean-Auguste-Dominique Ingres' Madame Moitessier, 1851, oil on canvas, Samuel H. Kress Collection, 1946.7.18\n1 of 2\nMadame Moitessier's complexion and hair are smooth and shiny in Ingre's portrait. Meanwhile, the faces of Cassatt’s subjects are crisscrossed with blue, yellow, purple, and red hatch marks. One of them even conceals her face with a fan, an anonymity no wealthy patron would tolerate.\nDetail of Jean-Auguste-Dominique Ingres' Madame Moitessier, 1851, oil on canvas, Samuel H. Kress Collection, 1946.7.18\n1 of 2\n3. Impressionists worked outside in nature, paying close attention to light and color.\nThe impressionists took their canvases and easels outdoors, an en plein air working style made possible by recent innovations. Paint tubes had made oil paint portable, and the rail system allowed quick excursions from Paris to the countryside.\nOf course, artists had already been making careful observations of nature outdoors. But they had been recording them in sketches and studies to be referenced later in their studios. This had allowed them to combine different components and compose idealized scenes.\nJean-Victor Bertin, A Plane Tree, late 18th–mid-19th century, black chalk on paper, The Metropolitan Museum of Art, Gift of Alexander B.V. Johnson and Roberta J.M. Olson, 1992. 1992.410.\n1 of 3\nBy working on full paintings outdoors, impressionists quickly captured the initial sensations that landscapes elicited. There was no time to carefully model objects and structures. The artists also had to adapt to changing light and weather conditions.\nMonet advised young painters:\n“When you go out to paint, try to forget the objects before you, a tree, a house, a field, or whatever. Merely think, here is a little square of blue, here an oblong of pink, here is a streak of yellow, and paint it just as it looks to you, the exact color and shape, until it gives your own naive impression of the scene before you.\"\n4. Impressionists placed modern life at the center of their art.\nThe Académie had followed a strict hierarchy of subject matter. At the highest level, art was to depict a moral narrative: from history, the Bible, or mythological stories.\nBut the impressionists turned away from these themes. Instead, they sought to capture their current moment, a time of enormous upheaval. Paris was just emerging from the Franco-Prussian War and a brief but brutal civil war. The city was reborn into a modern metropolis. It played backdrop to middle-class leisure activities like boating and horse races, the ballet and the opera. Its new railways became gateways to the enjoyment of nature in the countryside.\nEdgar Degas, The Riders, c. 1885, oil on canvas, Collection of Mr. and Mrs. Paul Mellon, 2014.18.7\n1 of 6\nThe impressionists’ sitters are painted not in glamorous poses, but in the moments in between. They’re at rest or lost in thought. They are shown in newly available ready-to-wear clothing instead of luxurious fashions. They are not wealthy patrons, but friends, relatives, or laborers. To viewers accustomed to grand paintings of important people and dramatic events, these works felt thoroughly modern.\nMore than a century later, the paintings still strike us as breezy and refreshing. Impressionism forever changed the trajectory of Western art—and the way we look at pictures.\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "impressionism is one of the most recognizable art movements in the world today but it was revolutionary in its time originating in france in 1874 it was rejected by critics at first only later embraced as a national symbol in the mid 19th century france saw rapid technological and social changes gathering in cafés to discuss these societal transformations the impressionists found opportunities for liberation they changed the way they painted in both subject matter and technique they also met to discuss how when and where to exhibit their art learn more about the movement and discover the telltale markers of an impressionist work of art", "source_text": "Impressionism is one of the most recognizable art movements in the world today, but it was revolutionary in its time. Originating in France in 1874, it was rejected by critics at first—only later embraced as a national symbol.\nIn the mid-19th century, France saw rapid technological and social changes. Gathering in cafés to discuss these societal transformations, the impressionists found opportunities for liberation. They changed the way they painted, in both subject matter and technique. They also met to discuss how, when, and where to exhibit their art. Learn more about the movement and discover the telltale markers of an impressionist work of art.", "segmentation_method": "reviewed_source_semantics", "label": "引言", "source_line_range": [ 1, 2 ] }, { "id": "body-region-2", "text": "1 the term impressionist came from a derisive review of a claude monet painting in 1874 monet s impression sunrise appeared in the first exhibition held by an association of artists they called themselves la société anonyme des artistes peintres sculpteurs et graveurs etc the anonymous association of painters sculptors and engravers etc claude monet impression sunrise 1872 oil on canvas musée marmottan monet gift of eugène and victorine donop de monchy 1940 inv 4014 photo musée marmottan monet paris studio christian baraja slb journalist and art critic louis leroy published a scathing review titled the exhibition of the impressionists in leroy s article two imagined skeptical viewers scratch their heads at the works on view one of them comments on monet s painting wallpaper in its embryonic state is more finished than that seascape leroy used the term impressionist disparagingly but it became a rallying cry for artists like berthe morisot auguste renoir alfred sisley camille pissarro and others", "source_text": "1. The term “impressionist” came from a derisive review of a Claude Monet painting.\nIn 1874, Monet’s Impression, Sunrise appeared in the first exhibition held by an association of artists. They called themselves La Société anonyme des artistes peintres, sculpteurs et graveurs, etc. (the Anonymous Association of Painters, Sculptors, and Engravers, etc).\nClaude Monet, Impression, Sunrise, 1872, oil on canvas, Musée Marmottan Monet, gift of Eugène and Victorine Donop de Monchy, 1940. Inv. 4014. Photo: © Musée Marmottan Monet, Paris / Studio Christian Baraja SLB\nJournalist and art critic Louis Leroy published a scathing review titled The Exhibition of the Impressionists. In Leroy’s article, two imagined skeptical viewers scratch their heads at the works on view. One of them comments on Monet’s painting: “Wallpaper in its embryonic state is more finished than that seascape.”\nLeroy used the term “impressionist” disparagingly. But it became a rallying cry for artists like Berthe Morisot, Auguste Renoir, Alfred Sisley, Camille Pissarro, and others.", "segmentation_method": "reviewed_source_semantics", "label": "1. The term “impressionist” came from a derisive review of a Claude Monet painting.", "source_line_range": [ 3, 7 ] }, { "id": "body-region-3", "text": "2 impressionists used thick loose brushstrokes of contrasting color when the impressionists first began exhibiting the académie des beaux arts was still the arbiter of taste it exercised its influence through paris s annual exhibition the salon the academicians favored precise drawing carefully rendered composition and smoothly finished surfaces but impressionist painters broke with that tradition they did not conceal their brushstrokes they used choppy marks and dabs of unblended colors they did not hide the fact that their works were made of paint they were not seeking an illusion of reality compare jean auguste dominique ingres portrait of madame moitessier with mary cassatt s the loge jean auguste dominique ingres madame moitessier 1851 oil on canvas samuel h kress collection 1946 7 18 1 of 2 ingres was the quintessential academic master he rendered madame moitessier s black lace and shiny baubles in exquisite detail cassatt merely suggests the satin of her opera goers dresses through luminous color and not delicate threadwork and draping detail of jean auguste dominique ingres madame moitessier 1851 oil on canvas samuel h kress collection 1946 7 18 1 of 2 madame moitessier s complexion and hair are smooth and shiny in ingre s portrait meanwhile the faces of cassatt s subjects are crisscrossed with blue yellow purple and red hatch marks one of them even conceals her face with a fan an anonymity no wealthy patron would tolerate detail of jean auguste dominique ingres madame moitessier 1851 oil on canvas samuel h kress collection 1946 7 18 1 of 2", "source_text": "2. Impressionists used thick, loose brushstrokes of contrasting color.\nWhen the impressionists first began exhibiting, the Académie des Beaux-Arts was still the arbiter of taste. It exercised its influence through Paris’s annual exhibition, the Salon. The academicians favored precise drawing, carefully rendered composition, and smoothly finished surfaces.\nBut impressionist painters broke with that tradition. They did not conceal their brushstrokes. They used choppy marks and dabs of unblended colors. They did not hide the fact that their works were made of paint. They were not seeking an illusion of reality.\nCompare Jean-Auguste-Dominique Ingres’ portrait of Madame Moitessier, with Mary Cassatt’s The Loge.\nJean-Auguste-Dominique Ingres, Madame Moitessier, 1851, oil on canvas, Samuel H. Kress Collection, 1946.7.18\n1 of 2\nIngres was the quintessential academic master. He rendered Madame Moitessier’s black lace and shiny baubles in exquisite detail. Cassatt merely suggests the satin of her opera-goers' dresses through luminous color, and not delicate threadwork and draping.\nDetail of Jean-Auguste-Dominique Ingres' Madame Moitessier, 1851, oil on canvas, Samuel H. Kress Collection, 1946.7.18\n1 of 2\nMadame Moitessier's complexion and hair are smooth and shiny in Ingre's portrait. Meanwhile, the faces of Cassatt’s subjects are crisscrossed with blue, yellow, purple, and red hatch marks. One of them even conceals her face with a fan, an anonymity no wealthy patron would tolerate.\nDetail of Jean-Auguste-Dominique Ingres' Madame Moitessier, 1851, oil on canvas, Samuel H. Kress Collection, 1946.7.18\n1 of 2", "segmentation_method": "reviewed_source_semantics", "label": "2. Impressionists used thick, loose brushstrokes of contrasting color.", "source_line_range": [ 8, 19 ] }, { "id": "body-region-4", "text": "3 impressionists worked outside in nature paying close attention to light and color the impressionists took their canvases and easels outdoors an en plein air working style made possible by recent innovations paint tubes had made oil paint portable and the rail system allowed quick excursions from paris to the countryside of course artists had already been making careful observations of nature outdoors but they had been recording them in sketches and studies to be referenced later in their studios this had allowed them to combine different components and compose idealized scenes jean victor bertin a plane tree late 18th mid 19th century black chalk on paper the metropolitan museum of art gift of alexander b v johnson and roberta j m olson 1992 1992 410 1 of 3 by working on full paintings outdoors impressionists quickly captured the initial sensations that landscapes elicited there was no time to carefully model objects and structures the artists also had to adapt to changing light and weather conditions monet advised young painters when you go out to paint try to forget the objects before you a tree a house a field or whatever merely think here is a little square of blue here an oblong of pink here is a streak of yellow and paint it just as it looks to you the exact color and shape until it gives your own naive impression of the scene before you", "source_text": "3. Impressionists worked outside in nature, paying close attention to light and color.\nThe impressionists took their canvases and easels outdoors, an en plein air working style made possible by recent innovations. Paint tubes had made oil paint portable, and the rail system allowed quick excursions from Paris to the countryside.\nOf course, artists had already been making careful observations of nature outdoors. But they had been recording them in sketches and studies to be referenced later in their studios. This had allowed them to combine different components and compose idealized scenes.\nJean-Victor Bertin, A Plane Tree, late 18th–mid-19th century, black chalk on paper, The Metropolitan Museum of Art, Gift of Alexander B.V. Johnson and Roberta J.M. Olson, 1992. 1992.410.\n1 of 3\nBy working on full paintings outdoors, impressionists quickly captured the initial sensations that landscapes elicited. There was no time to carefully model objects and structures. The artists also had to adapt to changing light and weather conditions.\nMonet advised young painters:\n“When you go out to paint, try to forget the objects before you, a tree, a house, a field, or whatever. Merely think, here is a little square of blue, here an oblong of pink, here is a streak of yellow, and paint it just as it looks to you, the exact color and shape, until it gives your own naive impression of the scene before you.\"", "segmentation_method": "reviewed_source_semantics", "label": "3. Impressionists worked outside in nature, paying close attention to light and color.", "source_line_range": [ 20, 27 ] }, { "id": "body-region-5", "text": "4 impressionists placed modern life at the center of their art the académie had followed a strict hierarchy of subject matter at the highest level art was to depict a moral narrative from history the bible or mythological stories but the impressionists turned away from these themes instead they sought to capture their current moment a time of enormous upheaval paris was just emerging from the franco prussian war and a brief but brutal civil war the city was reborn into a modern metropolis it played backdrop to middle class leisure activities like boating and horse races the ballet and the opera its new railways became gateways to the enjoyment of nature in the countryside edgar degas the riders c 1885 oil on canvas collection of mr and mrs paul mellon 2014 18 7 1 of 6 the impressionists sitters are painted not in glamorous poses but in the moments in between they re at rest or lost in thought they are shown in newly available ready to wear clothing instead of luxurious fashions they are not wealthy patrons but friends relatives or laborers to viewers accustomed to grand paintings of important people and dramatic events these works felt thoroughly modern more than a century later the paintings still strike us as breezy and refreshing impressionism forever changed the trajectory of western art and the way we look at pictures", "source_text": "4. Impressionists placed modern life at the center of their art.\nThe Académie had followed a strict hierarchy of subject matter. At the highest level, art was to depict a moral narrative: from history, the Bible, or mythological stories.\nBut the impressionists turned away from these themes. Instead, they sought to capture their current moment, a time of enormous upheaval. Paris was just emerging from the Franco-Prussian War and a brief but brutal civil war. The city was reborn into a modern metropolis. It played backdrop to middle-class leisure activities like boating and horse races, the ballet and the opera. Its new railways became gateways to the enjoyment of nature in the countryside.\nEdgar Degas, The Riders, c. 1885, oil on canvas, Collection of Mr. and Mrs. Paul Mellon, 2014.18.7\n1 of 6\nThe impressionists’ sitters are painted not in glamorous poses, but in the moments in between. They’re at rest or lost in thought. They are shown in newly available ready-to-wear clothing instead of luxurious fashions. They are not wealthy patrons, but friends, relatives, or laborers. To viewers accustomed to grand paintings of important people and dramatic events, these works felt thoroughly modern.\nMore than a century later, the paintings still strike us as breezy and refreshing. Impressionism forever changed the trajectory of Western art—and the way we look at pictures.", "segmentation_method": "reviewed_source_semantics", "label": "4. Impressionists placed modern life at the center of their art.", "source_line_range": [ 28, 34 ] } ], "ending": { "text": "More than a century later, the paintings still strike us as breezy and refreshing. Impressionism forever changed the trajectory of Western art—and the way we look at pictures." } } }, { "id": "article-063", "name": "7 Things We Learned From 1,000+ Conversations With AI Founders", "url": "https://about.geekpark.net/7-things-we-learned-from-1-000-conversations-with-ai-founders/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "7\\ Things\\ We\\ Learned\\ From\\ 1,000\\+\\ Conversations\\ With\\ AI\\ Founders" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "AI" ] }, { "id": "stable-2", "alternatives": [ "FOUNDERS" ] }, { "id": "stable-3", "alternatives": [ "EMBODIED AI" ] }, { "id": "stable-4", "alternatives": [ "ARCHIVE" ] }, { "id": "stable-5", "alternatives": [ "AGI PLAYGROUND" ] }, { "id": "stable-6", "alternatives": [ "Newsletter" ] }, { "id": "stable-7", "alternatives": [ "About Us" ] }, { "id": "stable-8", "alternatives": [ "Subscribe" ] }, { "id": "stable-9", "alternatives": [ "Follow" ] }, { "id": "stable-11", "alternatives": [ "We've spent three years talking to the people actually building AI companies: founders, researchers, investors, and product teams across China, SF,..." ] }, { "id": "stable-12", "alternatives": [ "By" ] }, { "id": "stable-13", "alternatives": [ "Lilyann Zhao" ] }, { "id": "stable-14", "alternatives": [ "Correspondent, Silicon Valley" ] }, { "id": "stable-15", "alternatives": [ "Published" ] }, { "id": "stable-16", "alternatives": [ "July 31, 2026" ] }, { "id": "stable-17", "alternatives": [ "5 min read" ] }, { "id": "stable-18", "alternatives": [ "Share:" ] }, { "id": "stable-19", "alternatives": [ "Share on X" ] }, { "id": "stable-20", "alternatives": [ "LinkedIn" ] }, { "id": "stable-21", "alternatives": [ "Copy link" ] }, { "id": "stable-22", "alternatives": [ "Related" ] }, { "id": "stable-23", "alternatives": [ "If you read both feeds, follow @GeekParkHQ." ] }, { "id": "stable-24", "alternatives": [ "Get the China angle before it hits the global feed." ] }, { "id": "stable-25", "alternatives": [ "Follow @GeekParkHQ for China ↔ Silicon Valley tech notes" ] }, { "id": "stable-26", "alternatives": [ "@GeekParkHQ" ] }, { "id": "stable-27", "alternatives": [ "Subscribe by email" ] }, { "id": "stable-28", "alternatives": [ "Get a note when GeekPark publishes a new English story." ] }, { "id": "stable-29", "alternatives": [ "Previous" ] }, { "id": "stable-30", "alternatives": [ "Next" ] }, { "id": "stable-31", "alternatives": [ "RSS" ] }, { "id": "stable-32", "alternatives": [ "About GeekPark" ] }, { "id": "stable-33", "alternatives": [ "Intelligence" ] }, { "id": "stable-34", "alternatives": [ "What we cover" ] }, { "id": "stable-35", "alternatives": [ "geekpark.net" ] }, { "id": "stable-36", "alternatives": [ "you@company.com" ], "visible_control": { "selector": "#newsletter-email-article", "attribute": "placeholder" } }, { "id": "stable-37", "alternatives": [ "Here's what keeps coming up." ] }, { "id": "stable-38", "alternatives": [ "1. AI made individuals 10x more productive. It made organizations exactly 0x better." ] }, { "id": "stable-39", "alternatives": [ "2. The model got commoditized. Verticalization became the only real play." ] }, { "id": "stable-40", "alternatives": [ "3. The \"agent\" conversation went from speculative to operational — fast." ] }, { "id": "stable-41", "alternatives": [ "4. The best AI products got quieter — and that's how they won." ] }, { "id": "stable-42", "alternatives": [ "5. Memory is quietly becoming the most powerful moat in AI." ] }, { "id": "stable-43", "alternatives": [ "6. Going global is easy now. Making money globally is the actual hard part." ] }, { "id": "stable-44", "alternatives": [ "7. China's AI story shifted, and the new question is more interesting." ] }, { "id": "stable-45", "alternatives": [ "We've spent three years talking to the people actually building AI companies: founders, researchers, investors, and product teams across China, SF, Tokyo, and London." ] }, { "id": "stable-46", "alternatives": [ "Not panel discussions. Not keynote fluff. Real conversations. The kind where people say what they actually think because there's no audience." ] }, { "id": "stable-47", "alternatives": [ "The thread running through all of this." ] }, { "id": "stable-48", "alternatives": [ "AI stopped being a technology story. It became an organizational design story, a product design story, and a go-to-market story - all at once. The companies winning aren't the ones with the smartest models. They're the ones who figured out how to turn intelligence into something people rely on by default." ] }, { "id": "stable-49", "alternatives": [ "That's a much harder problem. And a much bigger opportunity." ] }, { "id": "stable-50", "alternatives": [ "How to cite" ] }, { "id": "stable-51", "alternatives": [ "GeekPark. “7 Things We Learned From 1,000+ Conversations With AI Founders.” https://about.geekpark.net/7-things-we-learned-from-1-000-conversations-with-ai-founders/ . Published 2026-07-31." ] }, { "id": "stable-52", "alternatives": [ "Canonical URL — do not invent alternate about.geekpark.net paths." ] } ] }, "rule_review": { "status": "reviewed", "reason": "Human-approved replacement revision2. Complete independently captured initial article comprises both opening paragraphs, all seven numbered sections, the full conclusion, and the entire displayed How to cite citation and canonical-URL hint. Article ancestors are visible/unclipped; no interaction or image transcription. Related feed previews and neighboring article membership are outside authored body; their ordinary section/navigation controls remain required. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "7 Things We Learned From 1,000+ Conversations With AI Founders" ], "html_selector": "h1.inst-article-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-063/comment-qualification-reference-r5.json", "sha256": "ade469ef3ba80c01b1fddf8391638d2fef2363f7b41c07d3976b161a9981888c", "chars": 819, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "We've spent three years talking to the people actually building AI companies: founders, researchers, investors, and product teams across China, SF, Tokyo, and London.\n\nNot panel discussions. Not keynote fluff. Real conversations. The kind where people say what they actually think because there's no audience.\n\nHere's what keeps coming up.\n\n1. AI made individuals 10x more productive. It made organizations exactly 0x better.\n\nThis is the tension we hear most often and nobody has solved it.\n\nEmployees are writing faster, researching faster, coding faster. But the org chart? The approval chains? The way decisions get made? All of that is frozen in 2015.\n\nOne COO told us: \"I have 2026 workers trapped inside a 2015 bureaucracy. The friction is killing us.\"\n\nThe next big unlock in enterprise AI isn't a better model. It's redesigning how institutions actually work when machines are participants, not just tools.\n\nThis is an organizational design problem disguised as a technology problem. The companies that figure it out first will have an advantage that compounds for a decade.\n\n2. The model got commoditized. Verticalization became the only real play.\n\nA year ago, you could still argue for building horizontally — broad platform, lots of use cases, grow into it.\n\nThat window closed.\n\nEvery durable AI business we've watched being built did the opposite: they picked one workflow, went uncomfortably deep, and made their product irreplaceable for one specific person with one specific problem.\n\nWhen intelligence itself is cheap and everywhere, the moat isn't capability. It's how precisely you've embedded yourself into something people do every single day.\n\nThe race to the bottom on model quality is over. The race to the top on workflow depth is just starting.\n\n3. The \"agent\" conversation went from speculative to operational — fast.\n\nTwo years ago people debated whether agents were real. That debate is over.\n\nThe questions now are all operational:\n\nHow do you build an agent that runs reliably for hours without human intervention? How does it recover when something breaks? How does it actually improve over time instead of doing the same thing on repeat?\n\nThe mental model that clicked for the most teams: a good agent isn't a chatbot with more features. It's a new hire that owns a recurring process and gets better with every cycle.\n\nDelegation, not generation. That's the real opportunity.\n\n4. The best AI products got quieter — and that's how they won.\n\nEarly AI products had an instinct to fill space. Long responses, detailed explanations, constant output. The model was showing off. Product teams didn't know when to intervene.\n\nThe products gaining real traction now are radically more restrained.\n\nOne founder told us: \"We removed 60% of our AI's output. Retention doubled.\"\n\nThere's a fundamental difference between a tool you use and a product that's integrated into how you work. The latter knows when you need it — before you ask. That's a design problem, not a model problem, and the teams who've cracked it are building something with completely different retention curves.\n\n5. Memory is quietly becoming the most powerful moat in AI.\n\nThe default assumption in software has always been: context resets. You close the app, it forgets you.\n\nThat assumption is breaking down.\n\nAgents that persist across sessions, accumulate preferences, remember past decisions, and build a model of how you work — that's a fundamentally different product from a smart chat interface.\n\nHere's the compounding effect: once your software remembers you, the switching cost grows every single day. Day 1, it's easy to leave. Day 90, it knows your workflow better than your coworkers do.\n\nThe companies thinking about memory architecture right now aren't just building better products. They're building something closer to an ongoing relationship.\n\n6. Going global is easy now. Making money globally is the actual hard part.\n\nGenerating international interest for a well-built AI product is almost trivially easy now. Distribution is nearly solved.\n\nBut converting that interest into reliable, durable revenue across different markets? That's where every team hits a wall.\n\nThe founders scaling internationally aren't thinking about positioning anymore. They're debugging payment infrastructure in markets where their revenue model doesn't translate, creator monetization structures that vary wildly by region, and compliance requirements nobody warned them about.\n\nThe moat is in the operational plumbing, not the product itself. The best product in the world means nothing if you can't collect payment for it in Southeast Asia.\n\n7. China's AI story shifted, and the new question is more interesting.\n\nThree years ago, the conversation was all benchmarks. How close are Chinese models to GPT? What's the gap? How fast is it closing?\n\nThat framing is mostly gone.\n\nThe question now isn't \"can China catch up?\" — it's \"which layers of the stack will China own?\"\n\nThe model layer is converging globally. But the application layer, the distribution layer, the vertical integrations, those are diverging fast along regional lines. Chinese AI companies aren't trying to build a better GPT anymore. They're building the ecosystems around intelligence that are specific to how business works in their markets. @natolambert 's visit to china also mentioned this.\n\nThis is a more interesting story than \"catch-up.\" It's a story about strategic divergence — and it has implications for every AI company thinking about where to compete globally.\n\nThe thread running through all of this.\n\nAI stopped being a technology story. It became an organizational design story, a product design story, and a go-to-market story - all at once. The companies winning aren't the ones with the smartest models. They're the ones who figured out how to turn intelligence into something people rely on by default.\n\nThat's a much harder problem. And a much bigger opportunity.\n\nHow to cite\n\nGeekPark. “7 Things We Learned From 1,000+ Conversations With AI Founders.” https://about.geekpark.net/7-things-we-learned-from-1-000-conversations-with-ai-founders/ . Published 2026-07-31.\n\nCanonical URL — do not invent alternate about.geekpark.net paths.\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "we ve spent three years talking to the people actually building ai companies founders researchers investors and product teams across china sf tokyo and london not panel discussions not keynote fluff real conversations the kind where people say what they actually think because there s no audience here s what keeps coming up 1 ai made individuals 10x more productive it made organizations exactly 0x better this is the tension we hear most often and nobody has solved it employees are writing faster researching faster coding faster but the org chart the approval chains the way decisions get made all of that is frozen in 2015 one coo told us i have 2026 workers trapped inside a 2015 bureaucracy the friction is killing us the next big unlock in enterprise ai isn t a better model it s redesigning how institutions actually work when machines are participants not just tools this is an organizational design problem disguised as a technology problem the companies that figure it out first will have an advantage that compounds for a decade", "source_text": "We've spent three years talking to the people actually building AI companies: founders, researchers, investors, and product teams across China, SF, Tokyo, and London.\n\nNot panel discussions. Not keynote fluff. Real conversations. The kind where people say what they actually think because there's no audience.\n\nHere's what keeps coming up.\n\n1. AI made individuals 10x more productive. It made organizations exactly 0x better.\n\nThis is the tension we hear most often and nobody has solved it.\n\nEmployees are writing faster, researching faster, coding faster. But the org chart? The approval chains? The way decisions get made? All of that is frozen in 2015.\n\nOne COO told us: \"I have 2026 workers trapped inside a 2015 bureaucracy. The friction is killing us.\"\n\nThe next big unlock in enterprise AI isn't a better model. It's redesigning how institutions actually work when machines are participants, not just tools.\n\nThis is an organizational design problem disguised as a technology problem. The companies that figure it out first will have an advantage that compounds for a decade.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:We've spent three years talking to the people actually build — 1. AI made individuals 10x more productive. It made organizations exactly 0x better.", "source_line_range": [ 1, 18 ] }, { "id": "body-region-2", "text": "2 the model got commoditized verticalization became the only real play a year ago you could still argue for building horizontally broad platform lots of use cases grow into it that window closed every durable ai business we ve watched being built did the opposite they picked one workflow went uncomfortably deep and made their product irreplaceable for one specific person with one specific problem when intelligence itself is cheap and everywhere the moat isn t capability it s how precisely you ve embedded yourself into something people do every single day the race to the bottom on model quality is over the race to the top on workflow depth is just starting 3 the agent conversation went from speculative to operational fast two years ago people debated whether agents were real that debate is over the questions now are all operational how do you build an agent that runs reliably for hours without human intervention how does it recover when something breaks how does it actually improve over time instead of doing the same thing on repeat the mental model that clicked for the most teams a good agent isn t a chatbot with more features it s a new hire that owns a recurring process and gets better with every cycle delegation not generation that s the real opportunity", "source_text": "2. The model got commoditized. Verticalization became the only real play.\n\nA year ago, you could still argue for building horizontally — broad platform, lots of use cases, grow into it.\n\nThat window closed.\n\nEvery durable AI business we've watched being built did the opposite: they picked one workflow, went uncomfortably deep, and made their product irreplaceable for one specific person with one specific problem.\n\nWhen intelligence itself is cheap and everywhere, the moat isn't capability. It's how precisely you've embedded yourself into something people do every single day.\n\nThe race to the bottom on model quality is over. The race to the top on workflow depth is just starting.\n\n3. The \"agent\" conversation went from speculative to operational — fast.\n\nTwo years ago people debated whether agents were real. That debate is over.\n\nThe questions now are all operational:\n\nHow do you build an agent that runs reliably for hours without human intervention? How does it recover when something breaks? How does it actually improve over time instead of doing the same thing on repeat?\n\nThe mental model that clicked for the most teams: a good agent isn't a chatbot with more features. It's a new hire that owns a recurring process and gets better with every cycle.\n\nDelegation, not generation. That's the real opportunity.", "segmentation_method": "reviewed_source_semantics", "label": "2. The model got commoditized. Verticalization became the only real play. — 3. The \"agent\" conversation went from speculative to operational — fast.", "source_line_range": [ 19, 42 ] }, { "id": "body-region-3", "text": "4 the best ai products got quieter and that s how they won early ai products had an instinct to fill space long responses detailed explanations constant output the model was showing off product teams didn t know when to intervene the products gaining real traction now are radically more restrained one founder told us we removed 60 of our ai s output retention doubled there s a fundamental difference between a tool you use and a product that s integrated into how you work the latter knows when you need it before you ask that s a design problem not a model problem and the teams who ve cracked it are building something with completely different retention curves 5 memory is quietly becoming the most powerful moat in ai the default assumption in software has always been context resets you close the app it forgets you that assumption is breaking down agents that persist across sessions accumulate preferences remember past decisions and build a model of how you work that s a fundamentally different product from a smart chat interface here s the compounding effect once your software remembers you the switching cost grows every single day day 1 it s easy to leave day 90 it knows your workflow better than your coworkers do the companies thinking about memory architecture right now aren t just building better products they re building something closer to an ongoing relationship", "source_text": "4. The best AI products got quieter — and that's how they won.\n\nEarly AI products had an instinct to fill space. Long responses, detailed explanations, constant output. The model was showing off. Product teams didn't know when to intervene.\n\nThe products gaining real traction now are radically more restrained.\n\nOne founder told us: \"We removed 60% of our AI's output. Retention doubled.\"\n\nThere's a fundamental difference between a tool you use and a product that's integrated into how you work. The latter knows when you need it — before you ask. That's a design problem, not a model problem, and the teams who've cracked it are building something with completely different retention curves.\n\n5. Memory is quietly becoming the most powerful moat in AI.\n\nThe default assumption in software has always been: context resets. You close the app, it forgets you.\n\nThat assumption is breaking down.\n\nAgents that persist across sessions, accumulate preferences, remember past decisions, and build a model of how you work — that's a fundamentally different product from a smart chat interface.\n\nHere's the compounding effect: once your software remembers you, the switching cost grows every single day. Day 1, it's easy to leave. Day 90, it knows your workflow better than your coworkers do.\n\nThe companies thinking about memory architecture right now aren't just building better products. They're building something closer to an ongoing relationship.", "segmentation_method": "reviewed_source_semantics", "label": "4. The best AI products got quieter — and that's how they won. — 5. Memory is quietly becoming the most powerful moat in AI.", "source_line_range": [ 43, 64 ] }, { "id": "body-region-4", "text": "6 going global is easy now making money globally is the actual hard part generating international interest for a well built ai product is almost trivially easy now distribution is nearly solved but converting that interest into reliable durable revenue across different markets that s where every team hits a wall the founders scaling internationally aren t thinking about positioning anymore they re debugging payment infrastructure in markets where their revenue model doesn t translate creator monetization structures that vary wildly by region and compliance requirements nobody warned them about the moat is in the operational plumbing not the product itself the best product in the world means nothing if you can t collect payment for it in southeast asia", "source_text": "6. Going global is easy now. Making money globally is the actual hard part.\n\nGenerating international interest for a well-built AI product is almost trivially easy now. Distribution is nearly solved.\n\nBut converting that interest into reliable, durable revenue across different markets? That's where every team hits a wall.\n\nThe founders scaling internationally aren't thinking about positioning anymore. They're debugging payment infrastructure in markets where their revenue model doesn't translate, creator monetization structures that vary wildly by region, and compliance requirements nobody warned them about.\n\nThe moat is in the operational plumbing, not the product itself. The best product in the world means nothing if you can't collect payment for it in Southeast Asia.", "segmentation_method": "reviewed_source_semantics", "label": "6. Going global is easy now. Making money globally is the actual hard part.", "source_line_range": [ 65, 74 ] }, { "id": "body-region-5", "text": "7 china s ai story shifted and the new question is more interesting three years ago the conversation was all benchmarks how close are chinese models to gpt what s the gap how fast is it closing that framing is mostly gone the question now isn t can china catch up it s which layers of the stack will china own the model layer is converging globally but the application layer the distribution layer the vertical integrations those are diverging fast along regional lines chinese ai companies aren t trying to build a better gpt anymore they re building the ecosystems around intelligence that are specific to how business works in their markets natolambert s visit to china also mentioned this this is a more interesting story than catch up it s a story about strategic divergence and it has implications for every ai company thinking about where to compete globally the thread running through all of this ai stopped being a technology story it became an organizational design story a product design story and a go to market story all at once the companies winning aren t the ones with the smartest models they re the ones who figured out how to turn intelligence into something people rely on by default that s a much harder problem and a much bigger opportunity how to cite geekpark 7 things we learned from 1 000 conversations with ai founders https about geekpark net 7 things we learned from 1 000 conversations with ai founders published 2026 07 31 canonical url do not invent alternate about geekpark net paths", "source_text": "7. China's AI story shifted, and the new question is more interesting.\n\nThree years ago, the conversation was all benchmarks. How close are Chinese models to GPT? What's the gap? How fast is it closing?\n\nThat framing is mostly gone.\n\nThe question now isn't \"can China catch up?\" — it's \"which layers of the stack will China own?\"\n\nThe model layer is converging globally. But the application layer, the distribution layer, the vertical integrations, those are diverging fast along regional lines. Chinese AI companies aren't trying to build a better GPT anymore. They're building the ecosystems around intelligence that are specific to how business works in their markets. @natolambert 's visit to china also mentioned this.\n\nThis is a more interesting story than \"catch-up.\" It's a story about strategic divergence — and it has implications for every AI company thinking about where to compete globally.\n\nThe thread running through all of this.\n\nAI stopped being a technology story. It became an organizational design story, a product design story, and a go-to-market story - all at once. The companies winning aren't the ones with the smartest models. They're the ones who figured out how to turn intelligence into something people rely on by default.\n\nThat's a much harder problem. And a much bigger opportunity.\n\nHow to cite\n\nGeekPark. “7 Things We Learned From 1,000+ Conversations With AI Founders.” https://about.geekpark.net/7-things-we-learned-from-1-000-conversations-with-ai-founders/ . Published 2026-07-31.\n\nCanonical URL — do not invent alternate about.geekpark.net paths.", "segmentation_method": "reviewed_source_semantics", "label": "7. China's AI story shifted, and the new question is more interesting.", "source_line_range": [ 75, 97 ] } ], "ending": { "text": "Canonical URL — do not invent alternate about.geekpark.net paths." } } }, { "id": "article-064", "name": "The Year in Math(2024)", "url": "https://www.quantamagazine.org/the-year-in-math-20241216/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The Year in Math" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Landmark results in geometry and number theory marked an exciting year for mathematics, at a time when advances in artificial intelligence are starting to transform the subject’s future." ] }, { "id": "stable-3", "alternatives": [ "Jordana Cepelewicz" ] }, { "id": "stable-4", "alternatives": [ "Math Editor" ] }, { "id": "stable-5", "alternatives": [ "2024 IN REVIEW" ] }, { "id": "stable-6", "alternatives": [ "Physics" ] }, { "id": "stable-7", "alternatives": [ "Mathematics" ] }, { "id": "stable-8", "alternatives": [ "Biology" ] }, { "id": "stable-9", "alternatives": [ "Computer Science" ] }, { "id": "stable-10", "alternatives": [ "Topics" ] }, { "id": "stable-11", "alternatives": [ "Archive" ] }, { "id": "stable-12", "alternatives": [ "Home" ] }, { "id": "stable-13", "alternatives": [ "Comment" ] }, { "id": "stable-14", "alternatives": [ "SHARE" ] }, { "id": "stable-16", "alternatives": [ "VIEW PDF/PRINT MODE" ] }, { "id": "stable-17", "alternatives": [ "All topics" ] }, { "id": "stable-18", "alternatives": [ "Share this article" ] }, { "id": "stable-19", "alternatives": [ "Newsletter" ] }, { "id": "stable-20", "alternatives": [ "Get Quanta Magazine delivered to your inbox" ] }, { "id": "stable-21", "alternatives": [ "Subscribe now" ] }, { "id": "stable-22", "alternatives": [ "The Quanta Newsletter" ] }, { "id": "stable-23", "alternatives": [ "Get highlights of the most important news delivered to your email inbox" ] }, { "id": "stable-24", "alternatives": [ "Email" ] }, { "id": "stable-25", "alternatives": [ "Subscribe" ] }, { "id": "stable-26", "alternatives": [ "Also in" ] }, { "id": "stable-27", "alternatives": [ "Comment on this article" ] }, { "id": "stable-28", "alternatives": [ "Show comments" ] }, { "id": "stable-29", "alternatives": [ "NEXT ARTICLE" ] }, { "id": "stable-30", "alternatives": [ "About Quanta" ] }, { "id": "stable-31", "alternatives": [ "Contact Us" ] }, { "id": "stable-32", "alternatives": [ "Terms & Conditions" ] }, { "id": "stable-33", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-34", "alternatives": [ "AI Editorial Policy" ] }, { "id": "stable-35", "alternatives": [ "An editorially independent publication supported by the Simons Foundation." ] }, { "id": "stable-36", "alternatives": [ "Simons Foundation" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Year in Math" ], "html_selector": "h1.post__title__title.mv025,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-064/comment-qualification-reference-r5.json", "sha256": "9c4f687ec4e1d94df80be11c43fc130dbaba2e2246a2c2dd371f7ae62e0492f8", "chars": 787, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Video: We investigate three of 2024’s biggest breakthroughs in mathematics, including a better way to pack spheres in high dimensions, a new way to avoid forming patterns of numbers, and an 800-page proof of the so-called geometric Langlands conjecture.\n\nRichard Borge for Quanta Magazine\n\nIn May, a team of nine mathematicians announced a major breakthrough. They had proved what is called the geometric Langlands conjecture — a central component of a broader research program to build a “grand unified theory” of mathematics. The proof, which totaled more than 800 pages and marked the culmination of 30 years of work, was, in the words of one mathematician, a “crowning achievement.”\n\n“It is beautiful mathematics,” said another. “The best of its kind.”\n\nIt is the best of its kind not just because it’s a seminal piece of mathematics — one that resolved a huge open problem and is now poised to influence decades of research to come — but because it involved forging deep and unexpected connections. Often, the greatest results come about when mathematicians find ways to put seemingly unrelated ideas in dialogue with each other, breaking down the barriers between different areas of study. The proof of the geometric Langlands conjecture is just such a result.\n\nThis wasn’t the only major advance of 2024. In fact, there were several landmark proofs in the field of geometry alone. Some, as in the Langlands case, finally put decades-old conjectures to bed. Others offered surprising counterexamples instead.\n\nBut such breakthroughs don’t usually come out of nowhere. They’re made possible by decades of effort, by an accumulation of incremental steps. This year, there were many exciting results of this flavor, too, especially in number theory. Among them were developments on famously intractable problems such as the Riemann hypothesis and the abc conjecture.\n\nThat’s how mathematical progress works, for the most part: a new idea here, another there, until what once seemed completely impossible becomes a little bit less so.\n\n \n\nNan Cao for Quanta Magazine\n\nThe Geometric Langlands Conjecture Is Proved\n\nArguably the biggest result of 2024 comes from the Langlands program, an ambitious, 50-year-old vision that, if realized, will connect very different realms of mathematical study. Its goal is essentially to redraw the map of mathematics — to bring its separate continents together into one united Pangaea.\n\nBut proving actual results in the Langlands program is often prohibitively difficult. The statements themselves are incredibly complicated and technical, to say nothing of the techniques needed to prove them.\n\nIn the 1980s, a mathematician posed a geometric version of one of the program’s key components — the geometric Langlands conjecture, which involves esoteric mathematical objects called sheaves. The conjecture was seen as a central part of the Langlands program, but for decades, no one could solve it — until this year. The proof is a huge boon to the rest of the program, and mathematicians are excited to spend the next several years exploring its consequences, which they believe will be far-reaching. As one mathematician put it, “It’s going to seep through all the barriers between subjects.”\n\n \n\nPaul Chaikin for Quanta Magazine\n\nA Growing Role for Artificial Intelligence\n\nWhen new artificial intelligence systems such as ChatGPT (a type of “large language model”) were first introduced, their mathematical abilities were the stuff of memes, and not in a good way. The chatbots failed to add numbers correctly, much less solve more complicated word problems. As for producing full-fledged proofs — forget it. When it came to math, it seemed that AI would only continue to struggle.\n\nBut this year, new models from Google DeepMind turned AI into a serious competitor in the International Mathematical Olympiad, the world’s premier math competition for high school students. In January, the company announced AlphaGeometry, a model capable of proving geometry problems nearly as well as a human gold medalist. Within half a year, AlphaGeometry 2 could achieve gold easily — and, when integrated with Google’s large language model Gemini, could prove more general problems well enough to score a silver medal on the full Olympiad exam. DeepMind called this newest model AlphaProof.\n\nAlphaProof was a massive achievement. It showcased AI’s fast-growing mathematical prowess and offered hope for how the technology might one day act as a mathematical “copilot” in original research.\n\nIn March, Quanta reported on how this is already happening. In 2022, mathematicians used machine learning to uncover strange patterns in important equations called elliptic curves. The patterns were beautiful, startling: If you looked at certain numerical properties of elliptic curves from the right perspective, they resembled the way birds flock, a phenomenon called a murmuration. In the couple of years since, researchers have been trying to understand these mathematical murmurations. In doing so, they’ve found them in lots of different objects in number theory, leading to important new work and insights, including the development of a novel kind of function.\n\nAs AI methods get more sophisticated, this story will only become more common. We’ve seen it before — in how computers gradually entered the world of mathematics and opened up new vistas for mathematicians to explore. Now mathematicians are trying to predict what that will look like with AI.\n\n \n\nDave Whyte for Quanta Magazine\n\nSphere-Packing Records Get Broken\n\nUnlike the geometric Langlands conjecture, the sphere-packing problem is simple to state: How do you arrange identical spheres to fill as much volume as possible without overlapping? In three dimensions, you can arrange spheres in a pyramid-shaped pile, the way oranges get stacked in a grocery store. But what about in higher dimensions?\n\nNo one knew the answer for any dimension higher than three until 2016, when the Ukrainian mathematician Maryna Viazovska proved that particular lattices are optimal for packing spheres in eight- and 24-dimensional space. In all other dimensions, the exact answer remains unknown.\n\nMathematicians also want to find a general solution — a formula that gives a way to densely pack spheres in arbitrarily high dimensions, even if the packing isn’t completely optimal. In April, Quanta reported on the first significant advance on this version of the sphere-packing problem in 75 years. The result improved on the efficiency of previous packings, while making use of a novel approach: Rather than packing spheres in a nice, organized way, as Viazovska had done, the mathematicians used graph theory to pack spheres in a very disorderly fashion.\n\nThis wasn’t the only packing result of 2024. Two mathematicians — including Thomas Hales, who proved the optimal way to pack spheres in three dimensions back in the 1990s — proved a statement about the worst possible shapes to pack, too.\n\n \n\nAlex Eben Meyer for Quanta Magazine\n\nMathematicians Find Counterexample to 50-Year-Old Milnor Conjecture\n\nProving old conjectures is important — but so is disproving them. As one mathematician told Quanta, “We have to be suspicious, even about things that intuitively look very likely to be true.” That’s the approach that resulted in yet another major geometry proof: Three mathematicians found counterexamples to the Milnor conjecture, a 50-year-old problem about the relationship between an object’s overall shape and what it looks like when you zoom in on it. The work, which involved the development of a new kind of structure, revealed that the universe of possible shapes is even stranger than mathematicians imagined — even though they’d always imagined it to be pretty strange indeed.\n\n \n\nNico Roper for Quanta Magazine\n\nImportant Steps Taken in Number Theory\n\nSolving these major geometry problems was akin to erecting towering monuments in the landscape of mathematics. But it’s also crucial to lay better foundations for the monuments to come. This is exactly what happened in number theory in 2024: Mathematicians made crucial, albeit incremental, progress toward a better understanding of some of the most important questions in the field.\n\nTwo mathematicians, for instance, proved a new estimate of the number of possible exceptions to the Riemann hypothesis, arguably the biggest open problem in math. The work not only broke the previous record, which had stood for 80 years, but led to new results about the distribution of prime numbers.\n\nSimilarly, three graduate students proved a better estimate of the largest size that sets can reach before they must inevitably contain evenly spaced patterns of numbers. The work, which deals with how order inevitably emerges from disorder in mathematics, marks the first progress on “Szemeredi’s problem” in decades.\n\nMeanwhile, the mathematician Hector Pasten recently made progress toward understanding properties of the sequence 2, 5, 10, 17, 26 and so on — that is, all numbers of the form n2 + 1. His proof allowed mathematicians to probe the complicated relationship between the operations of addition and multiplication. It also allowed him to prove new estimates of certain cases of the abc conjecture, another of the most important problems in math — and also one of the most controversial.\n\nAll of these number theory questions are still a long way off from being solved. But by inching closer, mathematicians have developed powerful new tool kits and illuminating new perspectives. Who’s to say what might happen in 2025 and beyond?", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "video we investigate three of 2024 s biggest breakthroughs in mathematics including a better way to pack spheres in high dimensions a new way to avoid forming patterns of numbers and an 800 page proof of the so called geometric langlands conjecture richard borge for quanta magazine in may a team of nine mathematicians announced a major breakthrough they had proved what is called the geometric langlands conjecture a central component of a broader research program to build a grand unified theory of mathematics the proof which totaled more than 800 pages and marked the culmination of 30 years of work was in the words of one mathematician a crowning achievement it is beautiful mathematics said another the best of its kind it is the best of its kind not just because it s a seminal piece of mathematics one that resolved a huge open problem and is now poised to influence decades of research to come but because it involved forging deep and unexpected connections often the greatest results come about when mathematicians find ways to put seemingly unrelated ideas in dialogue with each other breaking down the barriers between different areas of study the proof of the geometric langlands conjecture is just such a result this wasn t the only major advance of 2024 in fact there were several landmark proofs in the field of geometry alone some as in the langlands case finally put decades old conjectures to bed others offered surprising counterexamples instead but such breakthroughs don t usually come out of nowhere they re made possible by decades of effort by an accumulation of incremental steps this year there were many exciting results of this flavor too especially in number theory among them were developments on famously intractable problems such as the riemann hypothesis and the abc conjecture that s how mathematical progress works for the most part a new idea here another there until what once seemed completely impossible becomes a little bit less so nan cao for quanta magazine", "source_text": "Video: We investigate three of 2024’s biggest breakthroughs in mathematics, including a better way to pack spheres in high dimensions, a new way to avoid forming patterns of numbers, and an 800-page proof of the so-called geometric Langlands conjecture.\n\nRichard Borge for Quanta Magazine\n\nIn May, a team of nine mathematicians announced a major breakthrough. They had proved what is called the geometric Langlands conjecture — a central component of a broader research program to build a “grand unified theory” of mathematics. The proof, which totaled more than 800 pages and marked the culmination of 30 years of work, was, in the words of one mathematician, a “crowning achievement.”\n\n“It is beautiful mathematics,” said another. “The best of its kind.”\n\nIt is the best of its kind not just because it’s a seminal piece of mathematics — one that resolved a huge open problem and is now poised to influence decades of research to come — but because it involved forging deep and unexpected connections. Often, the greatest results come about when mathematicians find ways to put seemingly unrelated ideas in dialogue with each other, breaking down the barriers between different areas of study. The proof of the geometric Langlands conjecture is just such a result.\n\nThis wasn’t the only major advance of 2024. In fact, there were several landmark proofs in the field of geometry alone. Some, as in the Langlands case, finally put decades-old conjectures to bed. Others offered surprising counterexamples instead.\n\nBut such breakthroughs don’t usually come out of nowhere. They’re made possible by decades of effort, by an accumulation of incremental steps. This year, there were many exciting results of this flavor, too, especially in number theory. Among them were developments on famously intractable problems such as the Riemann hypothesis and the abc conjecture.\n\nThat’s how mathematical progress works, for the most part: a new idea here, another there, until what once seemed completely impossible becomes a little bit less so.\n\n \n\nNan Cao for Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Video: We investigate three of 2024’s biggest breakthroughs ", "source_line_range": [ 1, 20 ] }, { "id": "body-region-2", "text": "the geometric langlands conjecture is proved arguably the biggest result of 2024 comes from the langlands program an ambitious 50 year old vision that if realized will connect very different realms of mathematical study its goal is essentially to redraw the map of mathematics to bring its separate continents together into one united pangaea but proving actual results in the langlands program is often prohibitively difficult the statements themselves are incredibly complicated and technical to say nothing of the techniques needed to prove them in the 1980s a mathematician posed a geometric version of one of the program s key components the geometric langlands conjecture which involves esoteric mathematical objects called sheaves the conjecture was seen as a central part of the langlands program but for decades no one could solve it until this year the proof is a huge boon to the rest of the program and mathematicians are excited to spend the next several years exploring its consequences which they believe will be far reaching as one mathematician put it it s going to seep through all the barriers between subjects paul chaikin for quanta magazine", "source_text": "The Geometric Langlands Conjecture Is Proved\n\nArguably the biggest result of 2024 comes from the Langlands program, an ambitious, 50-year-old vision that, if realized, will connect very different realms of mathematical study. Its goal is essentially to redraw the map of mathematics — to bring its separate continents together into one united Pangaea.\n\nBut proving actual results in the Langlands program is often prohibitively difficult. The statements themselves are incredibly complicated and technical, to say nothing of the techniques needed to prove them.\n\nIn the 1980s, a mathematician posed a geometric version of one of the program’s key components — the geometric Langlands conjecture, which involves esoteric mathematical objects called sheaves. The conjecture was seen as a central part of the Langlands program, but for decades, no one could solve it — until this year. The proof is a huge boon to the rest of the program, and mathematicians are excited to spend the next several years exploring its consequences, which they believe will be far-reaching. As one mathematician put it, “It’s going to seep through all the barriers between subjects.”\n\n \n\nPaul Chaikin for Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "The Geometric Langlands Conjecture Is Proved", "source_line_range": [ 21, 32 ] }, { "id": "body-region-3", "text": "a growing role for artificial intelligence when new artificial intelligence systems such as chatgpt a type of large language model were first introduced their mathematical abilities were the stuff of memes and not in a good way the chatbots failed to add numbers correctly much less solve more complicated word problems as for producing full fledged proofs forget it when it came to math it seemed that ai would only continue to struggle but this year new models from google deepmind turned ai into a serious competitor in the international mathematical olympiad the world s premier math competition for high school students in january the company announced alphageometry a model capable of proving geometry problems nearly as well as a human gold medalist within half a year alphageometry 2 could achieve gold easily and when integrated with google s large language model gemini could prove more general problems well enough to score a silver medal on the full olympiad exam deepmind called this newest model alphaproof alphaproof was a massive achievement it showcased ai s fast growing mathematical prowess and offered hope for how the technology might one day act as a mathematical copilot in original research in march quanta reported on how this is already happening in 2022 mathematicians used machine learning to uncover strange patterns in important equations called elliptic curves the patterns were beautiful startling if you looked at certain numerical properties of elliptic curves from the right perspective they resembled the way birds flock a phenomenon called a murmuration in the couple of years since researchers have been trying to understand these mathematical murmurations in doing so they ve found them in lots of different objects in number theory leading to important new work and insights including the development of a novel kind of function as ai methods get more sophisticated this story will only become more common we ve seen it before in how computers gradually entered the world of mathematics and opened up new vistas for mathematicians to explore now mathematicians are trying to predict what that will look like with ai dave whyte for quanta magazine", "source_text": "A Growing Role for Artificial Intelligence\n\nWhen new artificial intelligence systems such as ChatGPT (a type of “large language model”) were first introduced, their mathematical abilities were the stuff of memes, and not in a good way. The chatbots failed to add numbers correctly, much less solve more complicated word problems. As for producing full-fledged proofs — forget it. When it came to math, it seemed that AI would only continue to struggle.\n\nBut this year, new models from Google DeepMind turned AI into a serious competitor in the International Mathematical Olympiad, the world’s premier math competition for high school students. In January, the company announced AlphaGeometry, a model capable of proving geometry problems nearly as well as a human gold medalist. Within half a year, AlphaGeometry 2 could achieve gold easily — and, when integrated with Google’s large language model Gemini, could prove more general problems well enough to score a silver medal on the full Olympiad exam. DeepMind called this newest model AlphaProof.\n\nAlphaProof was a massive achievement. It showcased AI’s fast-growing mathematical prowess and offered hope for how the technology might one day act as a mathematical “copilot” in original research.\n\nIn March, Quanta reported on how this is already happening. In 2022, mathematicians used machine learning to uncover strange patterns in important equations called elliptic curves. The patterns were beautiful, startling: If you looked at certain numerical properties of elliptic curves from the right perspective, they resembled the way birds flock, a phenomenon called a murmuration. In the couple of years since, researchers have been trying to understand these mathematical murmurations. In doing so, they’ve found them in lots of different objects in number theory, leading to important new work and insights, including the development of a novel kind of function.\n\nAs AI methods get more sophisticated, this story will only become more common. We’ve seen it before — in how computers gradually entered the world of mathematics and opened up new vistas for mathematicians to explore. Now mathematicians are trying to predict what that will look like with AI.\n\n \n\nDave Whyte for Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "A Growing Role for Artificial Intelligence", "source_line_range": [ 33, 48 ] }, { "id": "body-region-4", "text": "sphere packing records get broken unlike the geometric langlands conjecture the sphere packing problem is simple to state how do you arrange identical spheres to fill as much volume as possible without overlapping in three dimensions you can arrange spheres in a pyramid shaped pile the way oranges get stacked in a grocery store but what about in higher dimensions no one knew the answer for any dimension higher than three until 2016 when the ukrainian mathematician maryna viazovska proved that particular lattices are optimal for packing spheres in eight and 24 dimensional space in all other dimensions the exact answer remains unknown mathematicians also want to find a general solution a formula that gives a way to densely pack spheres in arbitrarily high dimensions even if the packing isn t completely optimal in april quanta reported on the first significant advance on this version of the sphere packing problem in 75 years the result improved on the efficiency of previous packings while making use of a novel approach rather than packing spheres in a nice organized way as viazovska had done the mathematicians used graph theory to pack spheres in a very disorderly fashion this wasn t the only packing result of 2024 two mathematicians including thomas hales who proved the optimal way to pack spheres in three dimensions back in the 1990s proved a statement about the worst possible shapes to pack too alex eben meyer for quanta magazine mathematicians find counterexample to 50 year old milnor conjecture proving old conjectures is important but so is disproving them as one mathematician told quanta we have to be suspicious even about things that intuitively look very likely to be true that s the approach that resulted in yet another major geometry proof three mathematicians found counterexamples to the milnor conjecture a 50 year old problem about the relationship between an object s overall shape and what it looks like when you zoom in on it the work which involved the development of a new kind of structure revealed that the universe of possible shapes is even stranger than mathematicians imagined even though they d always imagined it to be pretty strange indeed nico roper for quanta magazine", "source_text": "Sphere-Packing Records Get Broken\n\nUnlike the geometric Langlands conjecture, the sphere-packing problem is simple to state: How do you arrange identical spheres to fill as much volume as possible without overlapping? In three dimensions, you can arrange spheres in a pyramid-shaped pile, the way oranges get stacked in a grocery store. But what about in higher dimensions?\n\nNo one knew the answer for any dimension higher than three until 2016, when the Ukrainian mathematician Maryna Viazovska proved that particular lattices are optimal for packing spheres in eight- and 24-dimensional space. In all other dimensions, the exact answer remains unknown.\n\nMathematicians also want to find a general solution — a formula that gives a way to densely pack spheres in arbitrarily high dimensions, even if the packing isn’t completely optimal. In April, Quanta reported on the first significant advance on this version of the sphere-packing problem in 75 years. The result improved on the efficiency of previous packings, while making use of a novel approach: Rather than packing spheres in a nice, organized way, as Viazovska had done, the mathematicians used graph theory to pack spheres in a very disorderly fashion.\n\nThis wasn’t the only packing result of 2024. Two mathematicians — including Thomas Hales, who proved the optimal way to pack spheres in three dimensions back in the 1990s — proved a statement about the worst possible shapes to pack, too.\n\n \n\nAlex Eben Meyer for Quanta Magazine\n\nMathematicians Find Counterexample to 50-Year-Old Milnor Conjecture\n\nProving old conjectures is important — but so is disproving them. As one mathematician told Quanta, “We have to be suspicious, even about things that intuitively look very likely to be true.” That’s the approach that resulted in yet another major geometry proof: Three mathematicians found counterexamples to the Milnor conjecture, a 50-year-old problem about the relationship between an object’s overall shape and what it looks like when you zoom in on it. The work, which involved the development of a new kind of structure, revealed that the universe of possible shapes is even stranger than mathematicians imagined — even though they’d always imagined it to be pretty strange indeed.\n\n \n\nNico Roper for Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "Sphere-Packing Records Get Broken — Mathematicians Find Counterexample to 50-Year-Old Milnor Conjecture", "source_line_range": [ 49, 70 ] }, { "id": "body-region-5", "text": "important steps taken in number theory solving these major geometry problems was akin to erecting towering monuments in the landscape of mathematics but it s also crucial to lay better foundations for the monuments to come this is exactly what happened in number theory in 2024 mathematicians made crucial albeit incremental progress toward a better understanding of some of the most important questions in the field two mathematicians for instance proved a new estimate of the number of possible exceptions to the riemann hypothesis arguably the biggest open problem in math the work not only broke the previous record which had stood for 80 years but led to new results about the distribution of prime numbers similarly three graduate students proved a better estimate of the largest size that sets can reach before they must inevitably contain evenly spaced patterns of numbers the work which deals with how order inevitably emerges from disorder in mathematics marks the first progress on szemeredi s problem in decades meanwhile the mathematician hector pasten recently made progress toward understanding properties of the sequence 2 5 10 17 26 and so on that is all numbers of the form n2 1 his proof allowed mathematicians to probe the complicated relationship between the operations of addition and multiplication it also allowed him to prove new estimates of certain cases of the abc conjecture another of the most important problems in math and also one of the most controversial all of these number theory questions are still a long way off from being solved but by inching closer mathematicians have developed powerful new tool kits and illuminating new perspectives who s to say what might happen in 2025 and beyond", "source_text": "Important Steps Taken in Number Theory\n\nSolving these major geometry problems was akin to erecting towering monuments in the landscape of mathematics. But it’s also crucial to lay better foundations for the monuments to come. This is exactly what happened in number theory in 2024: Mathematicians made crucial, albeit incremental, progress toward a better understanding of some of the most important questions in the field.\n\nTwo mathematicians, for instance, proved a new estimate of the number of possible exceptions to the Riemann hypothesis, arguably the biggest open problem in math. The work not only broke the previous record, which had stood for 80 years, but led to new results about the distribution of prime numbers.\n\nSimilarly, three graduate students proved a better estimate of the largest size that sets can reach before they must inevitably contain evenly spaced patterns of numbers. The work, which deals with how order inevitably emerges from disorder in mathematics, marks the first progress on “Szemeredi’s problem” in decades.\n\nMeanwhile, the mathematician Hector Pasten recently made progress toward understanding properties of the sequence 2, 5, 10, 17, 26 and so on — that is, all numbers of the form n2 + 1. His proof allowed mathematicians to probe the complicated relationship between the operations of addition and multiplication. It also allowed him to prove new estimates of certain cases of the abc conjecture, another of the most important problems in math — and also one of the most controversial.\n\nAll of these number theory questions are still a long way off from being solved. But by inching closer, mathematicians have developed powerful new tool kits and illuminating new perspectives. Who’s to say what might happen in 2025 and beyond?", "segmentation_method": "reviewed_source_semantics", "label": "Important Steps Taken in Number Theory", "source_line_range": [ 71, 81 ] } ], "ending": { "text": "kits and illuminating new perspectives. Who’s to say what might happen in 2025 and beyond?" } } }, { "id": "article-065", "name": "Learn CSS Grid by Building 5 Layouts", "url": "https://www.freecodecamp.org/news/learn-css-grid-by-building-5-layouts", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Learn CSS Grid by Building 5 Layouts in 17 minutes" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Thu Nghiem" ] }, { "id": "stable-3", "alternatives": [ "#CSS" ] }, { "id": "stable-4", "alternatives": [ "Donate" ] }, { "id": "stable-5", "alternatives": [ "Learn Software Engineering Fundamentals – Try Our FREE Curriculum" ] }, { "id": "stable-6", "alternatives": [ "Recommended courses from our partners" ] }, { "id": "stable-7", "alternatives": [ "ADVERTISEMENT" ] }, { "id": "stable-8", "alternatives": [ "If you read this far, thank the author to show them you care." ] }, { "id": "stable-9", "alternatives": [ "Say Thanks" ] }, { "id": "stable-10", "alternatives": [ "Get started" ] }, { "id": "stable-11", "alternatives": [ "Our mission: to help people learn to code for free." ] }, { "id": "stable-12", "alternatives": [ "make a tax-deductible donation here" ] }, { "id": "stable-13", "alternatives": [ "Trending Books and Handbooks" ] }, { "id": "stable-14", "alternatives": [ "Mobile App" ] }, { "id": "stable-15", "alternatives": [ "Publication powered by Hashnode" ] }, { "id": "stable-16", "alternatives": [ "About" ] }, { "id": "stable-17", "alternatives": [ "Alumni Network" ] }, { "id": "stable-18", "alternatives": [ "Open Source" ] }, { "id": "stable-19", "alternatives": [ "Shop" ] }, { "id": "stable-20", "alternatives": [ "Support" ] }, { "id": "stable-21", "alternatives": [ "Sponsors" ] }, { "id": "stable-22", "alternatives": [ "Academic Honesty" ] }, { "id": "stable-23", "alternatives": [ "Code of Conduct" ] }, { "id": "stable-24", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-25", "alternatives": [ "Terms of Service" ] }, { "id": "stable-26", "alternatives": [ "Copyright Policy" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete initial-load article was independently reviewed through accessibility, rendered DOM boundaries and viewport evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Learn CSS Grid by Building 5 Layouts in 17 minutes" ], "html_selector": "h1.post-full-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-065/comment-qualification-reference-r5.json", "sha256": "914d5c88b01b1ad846bb154932c87073bf0ed4d0557c6e99f1e9bb8481d5da2e", "chars": 800, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "By Thu Nghiem\n\nCSS Grid is a tool you can use to help create layouts for your website. It's especially useful if you need to think about the position, layers, or sizes of different elements.\n\nCSS Grid is complicated and there are many things to learn. But the good news is that you don't need to know everything all at once.\n\nIn this tutorial, we will build 5 different layouts (which are explained as five separate tasks below) with CSS Grid. At the end of the tutorial, you will be ready to use CSS Grid in your next projects.\n\nIf you want to code along, be sure to download the resources:\n\nTasks-Design\nCSS-Grid-Starter\n\nHere's a video you can watch if you want to supplement this article:\n\nHere are the first two layouts we'll build:\n\nTask 1 and task 2\n\n1: How to Build a Pancake Stack with CSS Grid\n\nFor task number one, we need to create a pancake stack layout. To create this layout, we can make three rows by using grid-template-rows: auto 1fr auto. The second row with a value of 1fr will expand as much as it can, whereas the other two only have enough space by wrapping their content.\n\nSo to achieve this layout, all we have to do is to give the container the following parameters:\n\n.task-1.container {\n display: grid;\n height: 100vh;\n\n grid-template-rows: auto 1fr auto;\n}\n\n\nand you can see this layout everywhere, for example, in one of my tutorials:\n\nHere's the YouTube link if you want to watch and code along.\n\n2: How to Build a Simple 12 Column Grid Layout with CSS Grid\n\nThe basic 12 column grid layout has been around forever. And with CSS Grid, it's even easier to use. In this simple task we need to give item-1 four columns and items-2 six columns.\n\nFirst, we need to create 12 columns. We can do that with grid-template-columns: repeat(12, 1fr);:\n\n.task-2.container {\n display: grid;\n height: 100vh;\n\n grid-template-columns: repeat(12, 1fr);\n column-gap: 12px;\n\n align-items: center;\n}\n\n\nNotice here that we also have the 12px gap between every column. Similar to Flex, we also can use align-items and justify-content.\n\nThe next thing we need to do is to tell which column(s) the items should take up:\n\nFor item 1, we want it to start from column 2 and end at number 6. So we have:\n\n.task-2 .item-1 {\n grid-column-start: 2;\n grid-column-end: 6;\n}\n\n\nNotice that the item will not include column number 6, only columns 2, 3, 4, and 5.\n\nWe can also have the same affect by writing:\n\n.task-2 .item-1 {\n grid-column-start: 2;\n grid-column-end: span 4;\n}\n\n\nor\n\n.task-2 .item-1 {\n grid-column: 2 / span 4;\n}\n\n\nWith the same logic, we will have the following for item 2:\n\n.task-2 .item-2 {\n grid-column: 6 / span 6;\n}\n\n\nYou can see 12 column layout are everywhere – here is a tutorial where I use this technique.\n\nHere's the YouTube link if you want to watch and code along.\n\n3: How to Build a Responsive Layout with and without grid-template-areas\n\nI am going to show you two options here. For the first option, we are going to use the 12 column grid that we learned from the 2nd task.\n\nFor the second option, we going to use a property called grid-template-areas.\n\nThe First option: How to Use the 12 Column Grid\nMobile\n\nThis is quite straightforward. We can use what we learned from task number one, and make the main section expand. We can also give the grid a gap: 24px as in desktop. There will be columns, not just rows:\n\n.task-3-1.container {\n display: grid;\n height: 100vh;\n\n grid-template-rows: auto auto 1fr auto auto auto;\n gap: 24px;\n}\n\nTablet\n\nOn a tablet, where the screen is wider than 720px, we want to have 12 columns and 4 rows. The third row will expand as much as it can:\n\n@media (min-width: 720px) {\n .task-3-1.container {\n grid-template-columns: repeat(12, 1fr);\n grid-template-rows: auto auto 1fr auto;\n }\n}\n\n\nNow that we have 12 columns, we need to tell how many columns should each item take up:\n\n@media (min-width: 720px) {\n\n // The header section takes 12 columns\n .task-3-1 .header {\n grid-column: 1 / span 12;\n }\n\n // The navigation section also takes 12 columns\n .task-3-1 .navigation {\n grid-column: 1 / span 12;\n }\n\n // The main section takes 10 columns start from column 3\n .task-3-1 .main {\n grid-column: 3 / span 10;\n }\n\n // The sidebar takes 2 columns start from column 1\n .task-3-1 .sidebar {\n grid-column: 1 / span 2;\n grid-row: 3;\n }\n\n // The ads section takes 2 columns start from column 1\n .task-3-1 .ads {\n grid-column: 1 / span 2;\n }\n\n // The footer section takes 10 columns start from column 3\n .task-3-1 .footer {\n grid-column: 3 / span 10;\n }\n}\n\n\nNotice here that we need to give .task-3-1 .sidebar grid-row: 3; because sidebar is after the main section in the DOM.\n\nDesktop\n\nFor the desktop view, we will work with a screen that is bigger than 1020px. As we already have 12 columns, now we only need to tell how many columns it should use:\n\n@media (min-width: 1020px) {\n\n // The navigation takes 8 columns starting from column 3\n .task-3-1 .navigation {\n grid-column: 3 / span 8;\n }\n\n // The main section takes 8 columns starting from column 3\n .task-3-1 .main {\n grid-column: 3 / span 8;\n }\n\n // The sidebar starts from row 2 and ends at row 4\n .task-3-1 .sidebar {\n grid-row: 2 / 4\n }\n\n // The ads section takes 2 columns starting from column 11\n // it also takes 2 rows starting from row 2 and ending at row 4\n .task-3-1 .ads {\n grid-column: 11 / span 2;\n grid-row: 2 / 4;\n }\n\n // The footer section takes 12 columns start from column 1\n .task-3-1 .footer {\n grid-column: 1 / span 12;\n }\n}\n\nReal life example\n\nYou can actually find a similar layout on Dev.to's homepage:\n\nThe Second Option: How to Use grid-template-areas\n\nBefore using grid-template-areas, we need to define the area of the item using grid-area:\n\n.task-3-2 .header {\n grid-area: header;\n}\n\n.task-3-2 .navigation {\n grid-area: nav;\n}\n\n.task-3-2 .ads {\n grid-area: ads;\n}\n\n.task-3-2 .sidebar {\n grid-area: sidebar;\n}\n\n.task-3-2 .main {\n grid-area: main;\n}\n\n.task-3-2 .footer {\n grid-area: footer;\n}\n\n\nAfter the item areas are defined, all we have to do is to give the container the position by using grid-template-areas:\n\nMobile\n.task-3-2.container {\n display: grid;\n height: 100vh;\n\n gap: 24px;\n\n // Creating 6 rows and 3rd row expands as much as it can \n grid-template-rows: auto auto 1fr auto auto auto;\n\n // Defining the template\n grid-template-areas:\n \"header\"\n \"nav\"\n \"main\"\n \"sidebar\"\n \"ads\"\n \"footer\";\n}\n\n\nSo on mobile, we create 1 column and 6 rows. And row number 3, which is the main row, should expand as much as it can.\n\nThis also makes it easy if, later on, you want to change the order/position of the item. For example, if we want to have navigation before the header we can do:\n\n...\n grid-template-areas:\n \"nav\"\n \"header\"\n \"main\"\n \"sidebar\"\n \"ads\"\n \"footer\";\n...\n\nTablet\n@media (min-width: 720px) {\n .task-3-2.container {\n // Creating 4 rows and the 3rd row expands as much as it can\n grid-template-rows: auto auto 1fr auto;\n\n // Defining the template (3 columns)\n grid-template-areas:\n \"header header header\"\n \"nav nav nav \"\n \"sidebar main main\"\n \"ads footer footer\";\n }\n}\n\n\nWith the code above, if the screen is wider than 720px we want to create 3 columns and 4 rows. The header and the navigation both take up 3 columns.\n\nOn the third and fourth row, the sidebar and ads take 1 column, whereas, the main and footer take 2 columns.\n\nDesktop\n@media (min-width: 1020px) {\n .task-3-2.container {\n // Creating 4 rows and the 3rd row expands as much as it can\n grid-template-rows: auto auto 1fr auto;\n\n // Defining the template (4 columns)\n grid-template-areas:\n \"header header header header\"\n \"sidebar nav nav ads\"\n \"sidebar main main ads\"\n \"footer footer footer footer\";\n }\n}\n\n\nHere we find similar logic to tablet view. For the desktop, we create 4 columns and 4 rows and the placement according to the value of grid-template-areas.\n\nWhich should you choose?\n\nUsing the 12 Column Grid:\n\n➕ Easy and fast to start ➕ Easy to maintain for column-focused layouts ➖ Difficult to arrange items in complex layouts\n\nYou should use 12 Column Grid for less complex layouts that focus mainly on the arrangement of the columns.\n\nUsing **grid-template-areas**:\n\n➕ Flexible for complex layouts ➕ Easy to visualize ➖ Takes more time to implement\n\nYou should use grid-template-areas for more complex layouts where you need to care about positions or sizes of many elements.\n\nBoth options have pros and cons, but you should choose the one that's easier for you and makes sense in your particular scenario.\n\n4: How to Build a Responsive Layout Without Media Queries in CSS Grid\n\nIt is surprisingly simple to do this. We can make it happen with one line of code: grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));, like this:\n\n.task-4.container {\n display: grid;\n gap: 24px;\n\n grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n}\n\n\nWe just created a flexible column layout and specified that the column should never be less than 150px and should share the space evenly.\n\n5: How to Build a 12 x 12 Chess Grid with CSS Grid\n\nFor the last task, I want to show you that, not only we can define the number of columns, but we can also define the number of rows using CSS Grid.\n\n.task-5.container {\n display: grid;\n height: 100vh;\n\n grid-template-columns: repeat(12, 1fr);\n grid-template-rows: repeat(12, 1fr);\n}\n\n\nNow, we can place the items anywhere we want. So to create this layout:\n\nWe can do this:\n\n...\n// First item starts from column 1 and expand 3 columns\n// and from row 1 and expand 3 columns\n.task-5 .item-1 {\n grid-row: 1 / span 3;\n grid-column: 1 / span 3;\n}\n\n// Second item starts from column 4 and expand 3 columns\n// and from row 4 and expand 3 columns\n.task-5 .item-2 {\n grid-row: 4 / span 3;\n grid-column: 4 / span 3;\n}\n\n// First item starts from column 7 and expand 3 columns\n// and from row 7 and expand 3 columns\n.task-5 .item-3 {\n grid-row: 7 / span 3;\n grid-column: 7 / span 3;\n}\n\n// First item starts from column 10 and expand 3 columns\n// and from row 10 and expand 3 columns\n.task-5 .item-4 {\n grid-row: 10 / span 3;\n grid-column: 10 / span 3;\n}\n\nConclusion\n\nThanks for reading this article. This topic belongs to the series of videos that I will update on Learn.DevChallenges.io. So to say updated, follow me on social media or subscribe to my Youtube Channel. Otherwise, happy coding and see you in the next video and articles 👋.\n\n__ 🐣 About me __\n\nI am a full-stack developer, a UX/UI designer and a content creator. You can get to know me more in this short video:\n\nI am the founder of DevChallenges\nSubscribe my Youtube Channel\nFollow my Twitter\nJoin Discord", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "by thu nghiem css grid is a tool you can use to help create layouts for your website it s especially useful if you need to think about the position layers or sizes of different elements css grid is complicated and there are many things to learn but the good news is that you don t need to know everything all at once in this tutorial we will build 5 different layouts which are explained as five separate tasks below with css grid at the end of the tutorial you will be ready to use css grid in your next projects if you want to code along be sure to download the resources tasks design css grid starter here s a video you can watch if you want to supplement this article here are the first two layouts we ll build task 1 and task 2 1 how to build a pancake stack with css grid for task number one we need to create a pancake stack layout to create this layout we can make three rows by using grid template rows auto 1fr auto the second row with a value of 1fr will expand as much as it can whereas the other two only have enough space by wrapping their content so to achieve this layout all we have to do is to give the container the following parameters task 1 container display grid height 100vh grid template rows auto 1fr auto and you can see this layout everywhere for example in one of my tutorials here s the youtube link if you want to watch and code along 2 how to build a simple 12 column grid layout with css grid the basic 12 column grid layout has been around forever and with css grid it s even easier to use in this simple task we need to give item 1 four columns and items 2 six columns first we need to create 12 columns we can do that with grid template columns repeat 12 1fr task 2 container display grid height 100vh grid template columns repeat 12 1fr column gap 12px align items center notice here that we also have the 12px gap between every column similar to flex we also can use align items and justify content the next thing we need to do is to tell which column s the items should take up for item 1 we want it to start from column 2 and end at number 6 so we have task 2 item 1 grid column start 2 grid column end 6 notice that the item will not include column number 6 only columns 2 3 4 and 5 we can also have the same affect by writing task 2 item 1 grid column start 2 grid column end span 4 or task 2 item 1 grid column 2 span 4 with the same logic we will have the following for item 2 task 2 item 2 grid column 6 span 6 you can see 12 column layout are everywhere here is a tutorial where i use this technique here s the youtube link if you want to watch and code along", "source_text": "By Thu Nghiem\n\nCSS Grid is a tool you can use to help create layouts for your website. It's especially useful if you need to think about the position, layers, or sizes of different elements.\n\nCSS Grid is complicated and there are many things to learn. But the good news is that you don't need to know everything all at once.\n\nIn this tutorial, we will build 5 different layouts (which are explained as five separate tasks below) with CSS Grid. At the end of the tutorial, you will be ready to use CSS Grid in your next projects.\n\nIf you want to code along, be sure to download the resources:\n\nTasks-Design\nCSS-Grid-Starter\n\nHere's a video you can watch if you want to supplement this article:\n\nHere are the first two layouts we'll build:\n\nTask 1 and task 2\n\n1: How to Build a Pancake Stack with CSS Grid\n\nFor task number one, we need to create a pancake stack layout. To create this layout, we can make three rows by using grid-template-rows: auto 1fr auto. The second row with a value of 1fr will expand as much as it can, whereas the other two only have enough space by wrapping their content.\n\nSo to achieve this layout, all we have to do is to give the container the following parameters:\n\n.task-1.container {\n display: grid;\n height: 100vh;\n\n grid-template-rows: auto 1fr auto;\n}\n\n\nand you can see this layout everywhere, for example, in one of my tutorials:\n\nHere's the YouTube link if you want to watch and code along.\n\n2: How to Build a Simple 12 Column Grid Layout with CSS Grid\n\nThe basic 12 column grid layout has been around forever. And with CSS Grid, it's even easier to use. In this simple task we need to give item-1 four columns and items-2 six columns.\n\nFirst, we need to create 12 columns. We can do that with grid-template-columns: repeat(12, 1fr);:\n\n.task-2.container {\n display: grid;\n height: 100vh;\n\n grid-template-columns: repeat(12, 1fr);\n column-gap: 12px;\n\n align-items: center;\n}\n\n\nNotice here that we also have the 12px gap between every column. Similar to Flex, we also can use align-items and justify-content.\n\nThe next thing we need to do is to tell which column(s) the items should take up:\n\nFor item 1, we want it to start from column 2 and end at number 6. So we have:\n\n.task-2 .item-1 {\n grid-column-start: 2;\n grid-column-end: 6;\n}\n\n\nNotice that the item will not include column number 6, only columns 2, 3, 4, and 5.\n\nWe can also have the same affect by writing:\n\n.task-2 .item-1 {\n grid-column-start: 2;\n grid-column-end: span 4;\n}\n\n\nor\n\n.task-2 .item-1 {\n grid-column: 2 / span 4;\n}\n\n\nWith the same logic, we will have the following for item 2:\n\n.task-2 .item-2 {\n grid-column: 6 / span 6;\n}\n\n\nYou can see 12 column layout are everywhere – here is a tutorial where I use this technique.\n\nHere's the YouTube link if you want to watch and code along.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:By Thu Nghiem — 2: How to Build a Simple 12 Column Grid Layout with CSS Grid", "source_line_range": [ 1, 94 ] }, { "id": "body-region-2", "text": "3 how to build a responsive layout with and without grid template areas i am going to show you two options here for the first option we are going to use the 12 column grid that we learned from the 2nd task for the second option we going to use a property called grid template areas the first option how to use the 12 column grid mobile this is quite straightforward we can use what we learned from task number one and make the main section expand we can also give the grid a gap 24px as in desktop there will be columns not just rows task 3 1 container display grid height 100vh grid template rows auto auto 1fr auto auto auto gap 24px tablet on a tablet where the screen is wider than 720px we want to have 12 columns and 4 rows the third row will expand as much as it can media min width 720px task 3 1 container grid template columns repeat 12 1fr grid template rows auto auto 1fr auto now that we have 12 columns we need to tell how many columns should each item take up media min width 720px the header section takes 12 columns task 3 1 header grid column 1 span 12 the navigation section also takes 12 columns task 3 1 navigation grid column 1 span 12 the main section takes 10 columns start from column 3 task 3 1 main grid column 3 span 10 the sidebar takes 2 columns start from column 1 task 3 1 sidebar grid column 1 span 2 grid row 3 the ads section takes 2 columns start from column 1 task 3 1 ads grid column 1 span 2 the footer section takes 10 columns start from column 3 task 3 1 footer grid column 3 span 10 notice here that we need to give task 3 1 sidebar grid row 3 because sidebar is after the main section in the dom desktop for the desktop view we will work with a screen that is bigger than 1020px as we already have 12 columns now we only need to tell how many columns it should use media min width 1020px the navigation takes 8 columns starting from column 3 task 3 1 navigation grid column 3 span 8 the main section takes 8 columns starting from column 3 task 3 1 main grid column 3 span 8 the sidebar starts from row 2 and ends at row 4 task 3 1 sidebar grid row 2 4 the ads section takes 2 columns starting from column 11 it also takes 2 rows starting from row 2 and ending at row 4 task 3 1 ads grid column 11 span 2 grid row 2 4 the footer section takes 12 columns start from column 1 task 3 1 footer grid column 1 span 12 real life example you can actually find a similar layout on dev to s homepage the second option how to use grid template areas before using grid template areas we need to define the area of the item using grid area task 3 2 header grid area header task 3 2 navigation grid area nav task 3 2 ads grid area ads task 3 2 sidebar grid area sidebar task 3 2 main grid area main task 3 2 footer grid area footer after the item areas are defined all we have to do is to give the container the position by using grid template areas mobile task 3 2 container display grid height 100vh gap 24px creating 6 rows and 3rd row expands as much as it can grid template rows auto auto 1fr auto auto auto defining the template grid template areas header nav main sidebar ads footer so on mobile we create 1 column and 6 rows and row number 3 which is the main row should expand as much as it can this also makes it easy if later on you want to change the order position of the item for example if we want to have navigation before the header we can do grid template areas nav header main sidebar ads footer tablet media min width 720px task 3 2 container creating 4 rows and the 3rd row expands as much as it can grid template rows auto auto 1fr auto defining the template 3 columns grid template areas header header header nav nav nav sidebar main main ads footer footer with the code above if the screen is wider than 720px we want to create 3 columns and 4 rows the header and the navigation both take up 3 columns on the third and fourth row the sidebar and ads take 1 column whereas the main and footer take 2 columns desktop media min width 1020px task 3 2 container creating 4 rows and the 3rd row expands as much as it can grid template rows auto auto 1fr auto defining the template 4 columns grid template areas header header header header sidebar nav nav ads sidebar main main ads footer footer footer footer here we find similar logic to tablet view for the desktop we create 4 columns and 4 rows and the placement according to the value of grid template areas which should you choose using the 12 column grid easy and fast to start easy to maintain for column focused layouts difficult to arrange items in complex layouts you should use 12 column grid for less complex layouts that focus mainly on the arrangement of the columns using grid template areas flexible for complex layouts easy to visualize takes more time to implement you should use grid template areas for more complex layouts where you need to care about positions or sizes of many elements both options have pros and cons but you should choose the one that s easier for you and makes sense in your particular scenario", "source_text": "3: How to Build a Responsive Layout with and without grid-template-areas\n\nI am going to show you two options here. For the first option, we are going to use the 12 column grid that we learned from the 2nd task.\n\nFor the second option, we going to use a property called grid-template-areas.\n\nThe First option: How to Use the 12 Column Grid\nMobile\n\nThis is quite straightforward. We can use what we learned from task number one, and make the main section expand. We can also give the grid a gap: 24px as in desktop. There will be columns, not just rows:\n\n.task-3-1.container {\n display: grid;\n height: 100vh;\n\n grid-template-rows: auto auto 1fr auto auto auto;\n gap: 24px;\n}\n\nTablet\n\nOn a tablet, where the screen is wider than 720px, we want to have 12 columns and 4 rows. The third row will expand as much as it can:\n\n@media (min-width: 720px) {\n .task-3-1.container {\n grid-template-columns: repeat(12, 1fr);\n grid-template-rows: auto auto 1fr auto;\n }\n}\n\n\nNow that we have 12 columns, we need to tell how many columns should each item take up:\n\n@media (min-width: 720px) {\n\n // The header section takes 12 columns\n .task-3-1 .header {\n grid-column: 1 / span 12;\n }\n\n // The navigation section also takes 12 columns\n .task-3-1 .navigation {\n grid-column: 1 / span 12;\n }\n\n // The main section takes 10 columns start from column 3\n .task-3-1 .main {\n grid-column: 3 / span 10;\n }\n\n // The sidebar takes 2 columns start from column 1\n .task-3-1 .sidebar {\n grid-column: 1 / span 2;\n grid-row: 3;\n }\n\n // The ads section takes 2 columns start from column 1\n .task-3-1 .ads {\n grid-column: 1 / span 2;\n }\n\n // The footer section takes 10 columns start from column 3\n .task-3-1 .footer {\n grid-column: 3 / span 10;\n }\n}\n\n\nNotice here that we need to give .task-3-1 .sidebar grid-row: 3; because sidebar is after the main section in the DOM.\n\nDesktop\n\nFor the desktop view, we will work with a screen that is bigger than 1020px. As we already have 12 columns, now we only need to tell how many columns it should use:\n\n@media (min-width: 1020px) {\n\n // The navigation takes 8 columns starting from column 3\n .task-3-1 .navigation {\n grid-column: 3 / span 8;\n }\n\n // The main section takes 8 columns starting from column 3\n .task-3-1 .main {\n grid-column: 3 / span 8;\n }\n\n // The sidebar starts from row 2 and ends at row 4\n .task-3-1 .sidebar {\n grid-row: 2 / 4\n }\n\n // The ads section takes 2 columns starting from column 11\n // it also takes 2 rows starting from row 2 and ending at row 4\n .task-3-1 .ads {\n grid-column: 11 / span 2;\n grid-row: 2 / 4;\n }\n\n // The footer section takes 12 columns start from column 1\n .task-3-1 .footer {\n grid-column: 1 / span 12;\n }\n}\n\nReal life example\n\nYou can actually find a similar layout on Dev.to's homepage:\n\nThe Second Option: How to Use grid-template-areas\n\nBefore using grid-template-areas, we need to define the area of the item using grid-area:\n\n.task-3-2 .header {\n grid-area: header;\n}\n\n.task-3-2 .navigation {\n grid-area: nav;\n}\n\n.task-3-2 .ads {\n grid-area: ads;\n}\n\n.task-3-2 .sidebar {\n grid-area: sidebar;\n}\n\n.task-3-2 .main {\n grid-area: main;\n}\n\n.task-3-2 .footer {\n grid-area: footer;\n}\n\n\nAfter the item areas are defined, all we have to do is to give the container the position by using grid-template-areas:\n\nMobile\n.task-3-2.container {\n display: grid;\n height: 100vh;\n\n gap: 24px;\n\n // Creating 6 rows and 3rd row expands as much as it can \n grid-template-rows: auto auto 1fr auto auto auto;\n\n // Defining the template\n grid-template-areas:\n \"header\"\n \"nav\"\n \"main\"\n \"sidebar\"\n \"ads\"\n \"footer\";\n}\n\n\nSo on mobile, we create 1 column and 6 rows. And row number 3, which is the main row, should expand as much as it can.\n\nThis also makes it easy if, later on, you want to change the order/position of the item. For example, if we want to have navigation before the header we can do:\n\n...\n grid-template-areas:\n \"nav\"\n \"header\"\n \"main\"\n \"sidebar\"\n \"ads\"\n \"footer\";\n...\n\nTablet\n@media (min-width: 720px) {\n .task-3-2.container {\n // Creating 4 rows and the 3rd row expands as much as it can\n grid-template-rows: auto auto 1fr auto;\n\n // Defining the template (3 columns)\n grid-template-areas:\n \"header header header\"\n \"nav nav nav \"\n \"sidebar main main\"\n \"ads footer footer\";\n }\n}\n\n\nWith the code above, if the screen is wider than 720px we want to create 3 columns and 4 rows. The header and the navigation both take up 3 columns.\n\nOn the third and fourth row, the sidebar and ads take 1 column, whereas, the main and footer take 2 columns.\n\nDesktop\n@media (min-width: 1020px) {\n .task-3-2.container {\n // Creating 4 rows and the 3rd row expands as much as it can\n grid-template-rows: auto auto 1fr auto;\n\n // Defining the template (4 columns)\n grid-template-areas:\n \"header header header header\"\n \"sidebar nav nav ads\"\n \"sidebar main main ads\"\n \"footer footer footer footer\";\n }\n}\n\n\nHere we find similar logic to tablet view. For the desktop, we create 4 columns and 4 rows and the placement according to the value of grid-template-areas.\n\nWhich should you choose?\n\nUsing the 12 Column Grid:\n\n➕ Easy and fast to start ➕ Easy to maintain for column-focused layouts ➖ Difficult to arrange items in complex layouts\n\nYou should use 12 Column Grid for less complex layouts that focus mainly on the arrangement of the columns.\n\nUsing **grid-template-areas**:\n\n➕ Flexible for complex layouts ➕ Easy to visualize ➖ Takes more time to implement\n\nYou should use grid-template-areas for more complex layouts where you need to care about positions or sizes of many elements.\n\nBoth options have pros and cons, but you should choose the one that's easier for you and makes sense in your particular scenario.", "segmentation_method": "reviewed_source_semantics", "label": "3: How to Build a Responsive Layout with and without grid-template-areas", "source_line_range": [ 95, 322 ] }, { "id": "body-region-3", "text": "4 how to build a responsive layout without media queries in css grid it is surprisingly simple to do this we can make it happen with one line of code grid template columns repeat auto fill minmax 150px 1fr like this task 4 container display grid gap 24px grid template columns repeat auto fill minmax 150px 1fr we just created a flexible column layout and specified that the column should never be less than 150px and should share the space evenly", "source_text": "4: How to Build a Responsive Layout Without Media Queries in CSS Grid\n\nIt is surprisingly simple to do this. We can make it happen with one line of code: grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));, like this:\n\n.task-4.container {\n display: grid;\n gap: 24px;\n\n grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n}\n\n\nWe just created a flexible column layout and specified that the column should never be less than 150px and should share the space evenly.", "segmentation_method": "reviewed_source_semantics", "label": "4: How to Build a Responsive Layout Without Media Queries in CSS Grid", "source_line_range": [ 323, 336 ] }, { "id": "body-region-4", "text": "5 how to build a 12 x 12 chess grid with css grid for the last task i want to show you that not only we can define the number of columns but we can also define the number of rows using css grid task 5 container display grid height 100vh grid template columns repeat 12 1fr grid template rows repeat 12 1fr now we can place the items anywhere we want so to create this layout we can do this first item starts from column 1 and expand 3 columns and from row 1 and expand 3 columns task 5 item 1 grid row 1 span 3 grid column 1 span 3 second item starts from column 4 and expand 3 columns and from row 4 and expand 3 columns task 5 item 2 grid row 4 span 3 grid column 4 span 3 first item starts from column 7 and expand 3 columns and from row 7 and expand 3 columns task 5 item 3 grid row 7 span 3 grid column 7 span 3 first item starts from column 10 and expand 3 columns and from row 10 and expand 3 columns task 5 item 4 grid row 10 span 3 grid column 10 span 3", "source_text": "5: How to Build a 12 x 12 Chess Grid with CSS Grid\n\nFor the last task, I want to show you that, not only we can define the number of columns, but we can also define the number of rows using CSS Grid.\n\n.task-5.container {\n display: grid;\n height: 100vh;\n\n grid-template-columns: repeat(12, 1fr);\n grid-template-rows: repeat(12, 1fr);\n}\n\n\nNow, we can place the items anywhere we want. So to create this layout:\n\nWe can do this:\n\n...\n// First item starts from column 1 and expand 3 columns\n// and from row 1 and expand 3 columns\n.task-5 .item-1 {\n grid-row: 1 / span 3;\n grid-column: 1 / span 3;\n}\n\n// Second item starts from column 4 and expand 3 columns\n// and from row 4 and expand 3 columns\n.task-5 .item-2 {\n grid-row: 4 / span 3;\n grid-column: 4 / span 3;\n}\n\n// First item starts from column 7 and expand 3 columns\n// and from row 7 and expand 3 columns\n.task-5 .item-3 {\n grid-row: 7 / span 3;\n grid-column: 7 / span 3;\n}\n\n// First item starts from column 10 and expand 3 columns\n// and from row 10 and expand 3 columns\n.task-5 .item-4 {\n grid-row: 10 / span 3;\n grid-column: 10 / span 3;\n}", "segmentation_method": "reviewed_source_semantics", "label": "5: How to Build a 12 x 12 Chess Grid with CSS Grid", "source_line_range": [ 337, 382 ] }, { "id": "body-region-5", "text": "conclusion thanks for reading this article this topic belongs to the series of videos that i will update on learn devchallenges io so to say updated follow me on social media or subscribe to my youtube channel otherwise happy coding and see you in the next video and articles about me i am a full stack developer a ux ui designer and a content creator you can get to know me more in this short video i am the founder of devchallenges subscribe my youtube channel follow my twitter join discord", "source_text": "Conclusion\n\nThanks for reading this article. This topic belongs to the series of videos that I will update on Learn.DevChallenges.io. So to say updated, follow me on social media or subscribe to my Youtube Channel. Otherwise, happy coding and see you in the next video and articles 👋.\n\n__ 🐣 About me __\n\nI am a full-stack developer, a UX/UI designer and a content creator. You can get to know me more in this short video:\n\nI am the founder of DevChallenges\nSubscribe my Youtube Channel\nFollow my Twitter\nJoin Discord", "segmentation_method": "reviewed_source_semantics", "label": "Conclusion — __ 🐣 About me __", "source_line_range": [ 383, 394 ] } ], "ending": { "text": "m the founder of DevChallenges\nSubscribe my Youtube Channel\nFollow my Twitter\nJoin Discord" } } }, { "id": "article-066", "name": "A Complete CSS Flexbox Layout Guide", "url": "https://css-tricks.com/snippets/css/a-guide-to-flexbox/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "A Complete CSS Flexbox Layout Guide" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Chris Coyier" ] }, { "id": "stable-3", "alternatives": [ "Our comprehensive guide to CSS flexbox layout." ] }, { "id": "stable-4", "alternatives": [ "ARTICLES" ] }, { "id": "stable-5", "alternatives": [ "GUIDES" ] }, { "id": "stable-6", "alternatives": [ "ALMANAC" ] }, { "id": "stable-7", "alternatives": [ "LINKS" ] }, { "id": "stable-8", "alternatives": [ "PICKS" ] }, { "id": "stable-9", "alternatives": [ "NEWSLETTER" ] }, { "id": "stable-10", "alternatives": [ "SEARCH" ] }, { "id": "stable-11", "alternatives": [ "HOME" ] }, { "id": "stable-12", "alternatives": [ "Comments" ] }, { "id": "stable-13", "alternatives": [ "Toggle All Comments (there are a lot)" ] }, { "id": "stable-14", "alternatives": [ "Leave a Reply" ] }, { "id": "stable-15", "alternatives": [ "Comment" ] }, { "id": "stable-17", "alternatives": [ "Name" ] }, { "id": "stable-18", "alternatives": [ "Email" ] }, { "id": "stable-19", "alternatives": [ "Website" ] }, { "id": "stable-20", "alternatives": [ "Save my name, email, and website in this browser for the next time I comment." ] }, { "id": "stable-21", "alternatives": [ "Post Comment" ], "visible_control": { "selector": "#submit", "attribute": "value" } }, { "id": "stable-22", "alternatives": [ "CSS-Tricks is powered by" ] }, { "id": "stable-23", "alternatives": [ "DigitalOcean" ] }, { "id": "stable-24", "alternatives": [ "Get Curated Front-End Roundups Right in Your Inbox" ] }, { "id": "stable-25", "alternatives": [ "See past issues" ] }, { "id": "stable-26", "alternatives": [ "email@example.com" ], "visible_control": { "selector": "#bd-email", "attribute": "placeholder" } }, { "id": "stable-27", "alternatives": [ "Subscribe" ], "visible_control": { "selector": "input[type=\"submit\"][value=\"Subscribe\"]", "attribute": "value" } }, { "id": "stable-28", "alternatives": [ "CSS-TRICKS" ] }, { "id": "stable-29", "alternatives": [ "About the site" ] }, { "id": "stable-30", "alternatives": [ "Contact us" ] }, { "id": "stable-31", "alternatives": [ "Write for CSS-Tricks!" ] }, { "id": "stable-32", "alternatives": [ "Advertising" ] }, { "id": "stable-33", "alternatives": [ "RSS Feeds" ] }, { "id": "stable-34", "alternatives": [ "SOCIAL" ] }, { "id": "stable-35", "alternatives": [ "Bluesky" ] }, { "id": "stable-36", "alternatives": [ "Mastodon" ] }, { "id": "stable-37", "alternatives": [ "CodePen" ] }, { "id": "stable-38", "alternatives": [ "X / Twitter" ] }, { "id": "stable-39", "alternatives": [ "LinkedIn" ] }, { "id": "stable-40", "alternatives": [ "LEGALESE" ] }, { "id": "stable-41", "alternatives": [ "CSS-Tricks License" ] }, { "id": "stable-42", "alternatives": [ "AI Statement" ] }, { "id": "initial-code-layer", "alternatives": [ "@layer presentation" ] }, { "id": "initial-code-background", "alternatives": [ "khaki" ] }, { "id": "initial-code-order", "alternatives": [ "orangered" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Independent fresh initial source repairs previously omitted CodePen text. Complete parent article matches prior reference ignoring whitespace; all18 article embeds are mapped at exact DOM positions. Six automatically selected CSS panes and ordinary tab/resource/zoom labels are retained from full native AX. All18 nested preview WebAreas are currently about:blank without child text; no viewport entry or interaction was performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "A Complete CSS Flexbox Layout Guide" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-066/comment-qualification-reference-r5.json", "sha256": "c8a8f26a27a5fa967727392b21fdbb285e700a3935eb89fa89ad7d0893f601a2", "chars": 785, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "All 436 serialized comment records are below a closed native details element. Initial visible text contains only Toggle All Comments; opening the disclosure is excluded.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "CSS Flexbox Table of Contents\nCSS Flexbox Background\nCSS Flexbox Properties\nInteractive Walkthrough\nCSS Flexbox Demos\nFlexbox Tricks\nFlexbox Browser Support\nPrefixing Flexbox\nRelated Properties\nMore Flexbox Information\nCSS Flexbox Background\n\nThe Flexbox Layout (Flexible Box) module provides a more efficient way to lay out, align and distribute space among items in a container, even when their size is unknown and/or dynamic (thus the word “flex”).\n\nThe main idea behind the flex layout is to give the container the ability to alter its items’ width/height (and order) to best fill the available space (mostly to accommodate to all kind of display devices and screen sizes). A flex container expands items to fill available free space or shrinks them to prevent overflow.\n\nMost importantly, the flexbox layout is direction-agnostic as opposed to the regular layouts (block which is vertically-based and inline which is horizontally-based). While those work well for pages, they lack flexibility (no pun intended) to support large or complex applications (especially when it comes to orientation changing, resizing, stretching, shrinking, etc.).\n\nNote: Flexbox layout is most appropriate to the components of an application, and small-scale layouts, while the CSS Grid layout is intended for larger scale layouts.\n\nFlexbox Terminology\n\nSince flexbox is a whole module and not a single property, it involves a lot of things including its whole set of properties. Some of them are meant to be set on the container (parent element, known as “flex container”) whereas the others are meant to be set on the children (said “flex items”).\n\nIf “regular” layout is based on both block and inline flow directions, the flex layout is based on “flex-flow directions”. Please have a look at this figure from the specification, explaining the main idea behind the flex layout.\n\nItems will be laid out following either the main axis (from main-start to main-end) or the cross axis (from cross-start to cross-end).\n\nmain axis – The main axis of a flex container is the primary axis along which flex items are laid out. Beware, it is not necessarily horizontal; it depends on the flex-direction property (see below).\nmain-start | main-end – The flex items are placed within the container starting from main-start and going to main-end.\nmain size – A flex item’s width or height, whichever is in the main dimension, is the item’s main size. The flex item’s main size property is either the ‘width’ or ‘height’ property, whichever is in the main dimension.\ncross axis – The axis perpendicular to the main axis is called the cross axis. Its direction depends on the main axis direction.\ncross-start | cross-end – Flex lines are filled with items and placed into the container starting on the cross-start side of the flex container and going toward the cross-end side.\ncross size – The width or height of a flex item, whichever is in the cross dimension, is the item’s cross size. The cross size property is whichever of ‘width’ or ‘height’ that is in the cross dimension.\nCSS Flexbox Properties\nProperties for the Parent\n(Flex Container)\ndisplay\n\nThis defines a flex container; inline or block depending on the given value. It enables a flex context for all its direct children.\n\n.container {\n display: flex; /* or inline-flex */\n}\n\nNote that CSS columns have no effect on a flex container.\n\nflex-direction\n\n\nThis establishes the main-axis, thus defining the direction flex items are placed in the flex container. Flexbox is (aside from optional wrapping) a single-direction layout concept. Think of flex items as primarily laying out either in horizontal rows or vertical columns.\n\n.container {\n flex-direction: row | row-reverse | column | column-reverse;\n}\nrow (default): left to right in ltr; right to left in rtl\nrow-reverse: right to left in ltr; left to right in rtl\ncolumn: same as row but top to bottom\ncolumn-reverse: same as row-reverse but bottom to top\nflex-wrap\n\nBy default, flex items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.\n\n.container {\n flex-wrap: nowrap | wrap | wrap-reverse;\n}\nnowrap (default): all flex items will be on one line\nwrap: flex items will wrap onto multiple lines, from top to bottom.\nwrap-reverse: flex items will wrap onto multiple lines from bottom to top.\n\nThere are some visual demos of flex-wrap here.\n\nflex-flow\n\nThis is a shorthand for the flex-direction and flex-wrap properties, which together define the flex container’s main and cross axes. The default value is row nowrap.\n\n.container {\n flex-flow: column wrap;\n}\njustify-content\n\n\nThis defines the alignment along the main axis. It helps distribute extra free space leftover when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size. It also exerts some control over the alignment of items when they overflow the line.\n\n.container {\n justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly | start | end | left | right ... + safe | unsafe;\n}\nflex-start (default): items are packed toward the start of the flex-direction.\nflex-end: items are packed toward the end of the flex-direction.\nstart: items are packed toward the start of the writing-mode direction.\nend: items are packed toward the end of the writing-mode direction.\nleft: items are packed toward left edge of the container, unless that doesn’t make sense with the flex-direction, then it behaves like start.\nright: items are packed toward right edge of the container, unless that doesn’t make sense with the flex-direction, then it behaves like end.\ncenter: items are centered along the line\nspace-between: items are evenly distributed in the line; first item is on the start line, last item on the end line\nspace-around: items are evenly distributed in the line with equal space around them. Note that visually the spaces aren’t equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies.\nspace-evenly: items are distributed so that the spacing between any two items (and the space to the edges) is equal.\n\nNote that that browser support for these values is nuanced. For example, space-between never got support from some versions of Edge, and start/end/left/right aren’t in Chrome yet. MDN has detailed charts. The safest values are flex-start, flex-end, and center.\n\nThere are also two additional keywords you can pair with these values: safe and unsafe. Using safe ensures that however you do this type of positioning, you can’t push an element such that it renders off-screen (e.g. off the top) in such a way the content can’t be scrolled too (called “data loss”).\n\nalign-items\n\n\nThis defines the default behavior for how flex items are laid out along the cross axis on the current line. Think of it as the justify-content version for the cross-axis (perpendicular to the main-axis).\n\n.container {\n align-items: stretch | flex-start | flex-end | center | baseline | first baseline | last baseline | start | end | self-start | self-end + ... safe | unsafe;\n}\nstretch (default): stretch to fill the container (still respect min-width/max-width)\nflex-start / start / self-start: items are placed at the start of the cross axis. The difference between these is subtle, and is about respecting the flex-direction rules or the writing-mode rules.\nflex-end / end / self-end: items are placed at the end of the cross axis. The difference again is subtle and is about respecting flex-direction rules vs. writing-mode rules.\ncenter: items are centered in the cross-axis\nbaseline: items are aligned such as their baselines align\n\nThe safe and unsafe modifier keywords can be used in conjunction with all the rest of these keywords (although note browser support), and deal with helping you prevent aligning elements such that the content becomes inaccessible.\n\nalign-content\n\n\nThis aligns a flex container’s lines within when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.\n\nNote: This property only takes effect on multi-line flexible containers, where flex-wrap is set to either wrap or wrap-reverse). A single-line flexible container (i.e. where flex-wrap is set to its default value, no-wrap) will not reflect align-content.\n\n.container {\n align-content: flex-start | flex-end | center | space-between | space-around | space-evenly | stretch | start | end | baseline | first baseline | last baseline + ... safe | unsafe;\n}\nnormal (default): items are packed in their default position as if no value was set.\nflex-start / start: items packed to the start of the container. The (more supported) flex-start honors the flex-direction while start honors the writing-mode direction.\nflex-end / end: items packed to the end of the container. The (more support) flex-end honors the flex-direction while end honors the writing-mode direction.\ncenter: items centered in the container\nspace-between: items evenly distributed; the first line is at the start of the container while the last one is at the end\nspace-around: items evenly distributed with equal space around each line\nspace-evenly: items are evenly distributed with equal space around them\nstretch: lines stretch to take up the remaining space\n\nThe safe and unsafe modifier keywords can be used in conjunction with all the rest of these keywords and deal with helping you prevent aligning elements such that the content becomes inaccessible.\n\ngap, row-gap, column-gap\n\nThe gap property explicitly controls the space between flex items. It applies that spacing only between items not on the outer edges.\n\n.container {\n display: flex;\n ...\n gap: 10px;\n gap: 10px 20px; /* row-gap column gap */\n row-gap: 10px;\n column-gap: 20px;\n}\n\nThe behavior could be thought of as a minimum gutter, as if the gutter is bigger somehow (because of something like justify-content: space-between;) then the gap will only take effect if that space would end up smaller.\n\nIt is not exclusively for flexbox, gap works in grid and multi-column layout as well.\n\nplace-items\n\nThe place-items property in CSS is shorthand for the align-items and justify-items properties, combining them into a single declaration. The property accepts dual values, the first for align-items and the second for justify-items. Or a single value to apply the same value to both.\n\n.item {\n display: flex;\n place-items: center;\n}\n\n/* Same as: */\n.item {\n display: flex;\n place-items: center center;\n}\n\n/* Same as: */\n.item {\n display: flex;\n align-items: center;\n justify-items: center;\n}\nProperties for the Children\n(Flex Items)\norder\n\n\nBy default, flex items are laid out in the source order. However, the order property controls the order in which they appear in the flex container.\n\n.item {\n order: 5; /* default is 0 */\n}\n\nItems with the same order revert to source order.\n\nflex-grow\n\n\nThis defines the ability for a flex item to grow if necessary. It accepts a unitless value that serves as a proportion. It dictates what amount of the available space inside the flex container the item should take up.\n\nIf all items have flex-grow set to 1, the remaining space in the container will be distributed equally to all children. If one of the children has a value of 2, that child would take up twice as much of the space as either one of the others (or it will try, at least).\n\n.item {\n flex-grow: 4; /* default 0 */\n}\n\nNegative numbers are invalid.\n\nflex-shrink\n\nThis defines the ability for a flex item to shrink if necessary.\n\n.item {\n flex-shrink: 3; /* default 1 */\n}\n\nNegative numbers are invalid.\n\nflex-basis\n\nThis defines the default size of an element before the remaining space is distributed. It can be a length (e.g. 20%, 5rem, etc.) or a keyword. The auto keyword means “look at my width or height property” (which was temporarily done by the main-size keyword until deprecated). The content keyword means “size it based on the item’s content” – this keyword isn’t well supported yet, so it’s hard to test and harder to know what its brethren max-content, min-content, and fit-content do.\n\n.item {\n flex-basis: | auto; /* default auto */\n}\n\nIf set to 0, the extra space around content isn’t factored in. If set to auto, the extra space is distributed based on its flex-grow value. See this graphic.\n\nflex\n\nThis is the shorthand for flex-grow, flex-shrink and flex-basis combined. The second and third parameters (flex-shrink and flex-basis) are optional. The default is 0 1 auto, but if you set it with a single number value, like flex: 5;, that changes the flex-basis to 0%, so it’s like setting flex-grow: 5; flex-shrink: 1; flex-basis: 0%;.\n\n.item {\n flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]\n}\n\nIt is recommended that you use this shorthand property rather than set the individual properties. The shorthand sets the other values intelligently.\n\nalign-self\n\n\nThis allows the default alignment (or the one specified by align-items) to be overridden for individual flex items.\n\nPlease see the align-items explanation to understand the available values.\n\n.item {\n align-self: auto | flex-start | flex-end | center | baseline | stretch;\n}\n\nNote that float, clear and vertical-align have no effect on a flex item.\n\nInteractive Walkthrough\n\nLet’s see what all that information looks like in practice with a fairly simple example. And a common one at that: a navigation of links.\n\nWe Can Add Spacing Between Items\n\nIf you’re working with something like a navigation of links on a single row, chances are you don’t want them bumping right up next to each other like Flexbox does by default.\n\n\nHTML\nCSS\nResult\nul { display : flex ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { list-style : none ; a { color : black ; } } }\nResources\n1×\n0.5×\n0.25×\nWe could add padding to the items to give them some breathing room:\n\n\nHTML\nCSS\nResult\nul { display : flex ; } li { padding : .5rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { list-style : none ; a { color : black ; } } }\nResources\n1×\n0.5×\n0.25×\nThat works, but notice the little bit of extra padding on the left and right edges. That’s because the container itself has padding on it.\n\nThat’s fixable for sure. But why go through the trouble of writing even more CSS? We can use the gap property on the parent container instead:\n\n\nHTML\nCSS\nResult\nul { display : flex ; gap : 1rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { list-style : none ; a { color : black ; } } }\nResources\n1×\n0.5×\n0.25×\nNo extra padding. And notice how the spacing is automatically calculated and accounted for in the layout so nothing overflows the container edges. Again, there’s something so satisfying about that.\n\nBut you might still want padding on the navigation items between you have a background color set on them and they otherwise look cramped as all heck:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nWith Flexbox, we can add padding and it doesn’t actually add to the parent’s padding. Rather, it’s automatically accounted for in the spacing:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nBeautiful. Just beautiful.\n\nWe Can Let the Items Wrap… or Not\n\nIf there’s no more room for the number of items to fit on a single row, we can simply let the items wrap onto multiple rows with the flex-wrap property. It’s set to the nowrap value by default, which means the items just keep on going on the same row, even if the container is out of space. Notice how the items shrink when that happens.\n\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nWe Can Set the Direction\n\nOh, you want the links to line up vertically instead? We have the flex-direction property for that. Since Flexbox displays items in a row direction by default, we don’t even have to declare it. If we want a single column, then we use the column value:\n\n\nHTML\nCSS\nResult\nul { display : flex ; flex-direction : column ; gap : 1rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { background-color : black ; border-radius : 6px ; list-style : none ; padding : .5rem ; a { color : white ; } } }\nResources\n1×\n0.5×\n0.25×\nWe can also reverse the direction with either row-reverse or column-reverse. Let’s flip things around in that last example:\n\n\nHTML\nCSS\nResult\nul { display : flex ; flex-direction : column-reverse ; gap : 1rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { background-color : black ; border-radius : 6px ; list-style : none ; padding : .5rem ; a { color : white ; } } }\nResources\n1×\n0.5×\n0.25×\nAccessibility note: Assistive technologies, like screen readers, will announce the items in the original order. In other words, the reversal is visual rather than structural. So, what for that if the reading order is super important, which it often is.\n\nWe Can “Order” Items Around\n\nSpeaking of re-ordering items, we have the order property if we need to place one or more items in specific places. Let’s say you want that “Services” link to show up last in the list. That’d be order: 4 on that specific item:\n\n\nHTML\nCSS\nResult\nul { display : flex ; flex-direction : column ; gap : 1rem ; } li : nth-of-type ( 2 ) { background-color : orangered ; order : 4 ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { background-color : black ; border-radius : 6px ; list-style : none ; padding : .5rem ; a { color : white ; } } }\nResources\n1×\n0.5×\n0.25×\nWe Can Shove Things Around\n\nLet’s say your navigation container is way wider than the number of items in it:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nMaybe you want to space those items out evenly across the available space. We can do that with the justify-content property, setting it to space-evenly:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nOr maybe you want the first and last items to be justified to the parent container’s edges, which we can do with justify-items: space-between:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nYou can toggle between the different values in action in this next demo:\n\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nIt’s same thing vertically as well, only we’re working with the align-content property instead of justify-content. The only thing to note is that we have to enable wrapping on the container with flex-wrap: wrap for it to work properly. And! Notice there’s an additional stretch value in there that allows the items to, you know, stretch to fill the available space.\n\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nWe Can Size the Items\n\nSo far, we’ve really seen just how “flexible” items are in a flex container — they sort of just adapt to the container. That said, there is a way we can control how the items are sized using three properties (flex-grow, flex-shrink, and flex-basis), or combining all three together with the flex shorthand property.\n\nflex-grow: Allows a flex item to grow, only if necessary. If all items have flex-grow set to 1, the remaining space in the container will be distributed equally to all children. If one of the children has a value of 2, that child would take up twice as much of the space as either one of the others (or it will try, at least).\nflex-shrink: Allows a flex item to shrink if necessary.\nflex-basis: Sets a flex item’s default size before the remaining space is distributed.\n\nRobin Rendle has a nice way of saying all that in plain English:\n\nflex-grow: Sets the item’s maximum size.\nflex-shrink: Sets the item’s minimum size.\nflex-basis: Represents the item’s “ideal” size.\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nCSS Flexbox Examples\n\nLet’s start with a very very simple example, solving an almost daily problem: perfect centering. It couldn’t be any simpler if you use CSS Flexbox.\n\n.parent {\n display: flex;\n height: 300px; /* Or whatever */\n}\n\n.child {\n width: 100px; /* Or whatever */\n height: 100px; /* Or whatever */\n margin: auto; /* Magic! */\n}\n\nThis relies on the fact a margin set to auto in a flex container absorb extra space. So setting a margin of auto will make the item perfectly centered in both axes.\n\nNow let’s use some more properties. Consider a list of 6 items, all with fixed dimensions, but can be auto-sized. We want them to be evenly distributed on the horizontal axis so that when we resize the browser, everything scales nicely, and without media queries.\n\n.flex-container {\n /* We first create a flex layout context */\n display: flex;\n\n /* Then we define the flow direction \n and if we allow the items to wrap \n * Remember this is the same as:\n * flex-direction: row;\n * flex-wrap: wrap;\n */\n flex-flow: row wrap;\n\n /* Then we define how is distributed the remaining space */\n justify-content: space-around;\n}\n\nDone. Everything else is just some styling concern. Below is a pen featuring this example. Be sure to go to CodePen and try resizing your windows to see what happens.\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nLet’s try something else. Imagine we have a right-aligned navigation element on the very top of our website, but we want it to be centered on medium-sized screens and single-columned on small devices. Easy enough.\n\n/* Large */\n.navigation {\n display: flex;\n flex-flow: row wrap;\n /* This aligns items to the end line on main-axis */\n justify-content: flex-end;\n}\n\n/* Medium screens */\n@media all and (max-width: 800px) {\n .navigation {\n /* When on medium sized screens, we center it by evenly distributing empty space around items */\n justify-content: space-around;\n }\n}\n\n/* Small screens */\n@media all and (max-width: 500px) {\n .navigation {\n /* On small screens, we are no longer using row direction but column */\n flex-direction: column;\n }\n}\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nLet’s try something even better by playing with flex items flexibility! What about a mobile-first 3-columns layout with full-width header and footer. And independent from source order.\n\n.wrapper {\n display: flex;\n flex-flow: row wrap;\n}\n\n/* We tell all items to be 100% width, via flex-basis */\n.wrapper > * {\n flex: 1 100%;\n}\n\n/* We rely on source order for mobile-first approach\n * in this case:\n * 1. header\n * 2. article\n * 3. aside 1\n * 4. aside 2\n * 5. footer\n */\n\n/* Medium screens */\n@media all and (min-width: 600px) {\n /* We tell both sidebars to share a row */\n .aside { flex: 1 auto; }\n}\n\n/* Large screens */\n@media all and (min-width: 800px) {\n /* We invert order of first sidebar and main\n * And tell the main element to take twice as much width as the other two sidebars \n */\n .main { flex: 3 0px; }\n .aside-1 { order: 1; }\n .main { order: 2; }\n .aside-2 { order: 3; }\n .footer { order: 4; }\n}\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nFlexbox Browser Support\n\nCSS Flexbox is supported in all modern browsers.\n\nPrefixing Flexbox\n\nNote: This is largely unnecessary now that CSS Flexbox is widely supported in all modern browsers, unless you absolutely have to support a legacy browser, like Internet Explorer (which has been discontinued for a while now).\n\nThere are entirely different property and value names to support a legacy browser, like Internet Explorer (which we hope you don’t need to do). This is because the Flexbox spec has changed over time, creating an “old”, “tweener”, and “new” versions.\n\nPerhaps the best way to handle this is to write in the new (and final) syntax and run your CSS through Autoprefixer, which handles the fallbacks very well.\n\nAlternatively, here’s a Sass @mixin to help with some of the prefixing, which also gives you an idea of what kind of things need to be done:\n\n@mixin flexbox() {\n display: -webkit-box;\n display: -moz-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n}\n\n@mixin flex($values) {\n -webkit-box-flex: $values;\n -moz-box-flex: $values;\n -webkit-flex: $values;\n -ms-flex: $values;\n flex: $values;\n}\n\n@mixin order($val) {\n -webkit-box-ordinal-group: $val; \n -moz-box-ordinal-group: $val; \n -ms-flex-order: $val; \n -webkit-order: $val; \n order: $val;\n}\n\n.wrapper {\n @include flexbox();\n}\n\n.item {\n @include flex(1 200px);\n @include order(2);\n}\nFlexbox Tricks!\nMore Flexbox Resources\nCSS Flexible Box Layout Module Level 1 (W3C)\nCSS Layout: Flexbox (MDN)\nUse Cases for Flexbox (Smashing Magazine)", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "css flexbox table of contents css flexbox background css flexbox properties interactive walkthrough css flexbox demos flexbox tricks flexbox browser support prefixing flexbox related properties more flexbox information css flexbox background the flexbox layout flexible box module provides a more efficient way to lay out align and distribute space among items in a container even when their size is unknown and or dynamic thus the word flex the main idea behind the flex layout is to give the container the ability to alter its items width height and order to best fill the available space mostly to accommodate to all kind of display devices and screen sizes a flex container expands items to fill available free space or shrinks them to prevent overflow most importantly the flexbox layout is direction agnostic as opposed to the regular layouts block which is vertically based and inline which is horizontally based while those work well for pages they lack flexibility no pun intended to support large or complex applications especially when it comes to orientation changing resizing stretching shrinking etc note flexbox layout is most appropriate to the components of an application and small scale layouts while the css grid layout is intended for larger scale layouts flexbox terminology since flexbox is a whole module and not a single property it involves a lot of things including its whole set of properties some of them are meant to be set on the container parent element known as flex container whereas the others are meant to be set on the children said flex items if regular layout is based on both block and inline flow directions the flex layout is based on flex flow directions please have a look at this figure from the specification explaining the main idea behind the flex layout items will be laid out following either the main axis from main start to main end or the cross axis from cross start to cross end main axis the main axis of a flex container is the primary axis along which flex items are laid out beware it is not necessarily horizontal it depends on the flex direction property see below main start main end the flex items are placed within the container starting from main start and going to main end main size a flex item s width or height whichever is in the main dimension is the item s main size the flex item s main size property is either the width or height property whichever is in the main dimension cross axis the axis perpendicular to the main axis is called the cross axis its direction depends on the main axis direction cross start cross end flex lines are filled with items and placed into the container starting on the cross start side of the flex container and going toward the cross end side cross size the width or height of a flex item whichever is in the cross dimension is the item s cross size the cross size property is whichever of width or height that is in the cross dimension css flexbox properties", "source_text": "CSS Flexbox Table of Contents\nCSS Flexbox Background\nCSS Flexbox Properties\nInteractive Walkthrough\nCSS Flexbox Demos\nFlexbox Tricks\nFlexbox Browser Support\nPrefixing Flexbox\nRelated Properties\nMore Flexbox Information\nCSS Flexbox Background\n\nThe Flexbox Layout (Flexible Box) module provides a more efficient way to lay out, align and distribute space among items in a container, even when their size is unknown and/or dynamic (thus the word “flex”).\n\nThe main idea behind the flex layout is to give the container the ability to alter its items’ width/height (and order) to best fill the available space (mostly to accommodate to all kind of display devices and screen sizes). A flex container expands items to fill available free space or shrinks them to prevent overflow.\n\nMost importantly, the flexbox layout is direction-agnostic as opposed to the regular layouts (block which is vertically-based and inline which is horizontally-based). While those work well for pages, they lack flexibility (no pun intended) to support large or complex applications (especially when it comes to orientation changing, resizing, stretching, shrinking, etc.).\n\nNote: Flexbox layout is most appropriate to the components of an application, and small-scale layouts, while the CSS Grid layout is intended for larger scale layouts.\n\nFlexbox Terminology\n\nSince flexbox is a whole module and not a single property, it involves a lot of things including its whole set of properties. Some of them are meant to be set on the container (parent element, known as “flex container”) whereas the others are meant to be set on the children (said “flex items”).\n\nIf “regular” layout is based on both block and inline flow directions, the flex layout is based on “flex-flow directions”. Please have a look at this figure from the specification, explaining the main idea behind the flex layout.\n\nItems will be laid out following either the main axis (from main-start to main-end) or the cross axis (from cross-start to cross-end).\n\nmain axis – The main axis of a flex container is the primary axis along which flex items are laid out. Beware, it is not necessarily horizontal; it depends on the flex-direction property (see below).\nmain-start | main-end – The flex items are placed within the container starting from main-start and going to main-end.\nmain size – A flex item’s width or height, whichever is in the main dimension, is the item’s main size. The flex item’s main size property is either the ‘width’ or ‘height’ property, whichever is in the main dimension.\ncross axis – The axis perpendicular to the main axis is called the cross axis. Its direction depends on the main axis direction.\ncross-start | cross-end – Flex lines are filled with items and placed into the container starting on the cross-start side of the flex container and going toward the cross-end side.\ncross size – The width or height of a flex item, whichever is in the cross dimension, is the item’s cross size. The cross size property is whichever of ‘width’ or ‘height’ that is in the cross dimension.\nCSS Flexbox Properties", "segmentation_method": "reviewed_source_semantics", "label": "开篇:CSS Flexbox Table of Contents — Interactive Walkthrough", "source_line_range": [ 1, 35 ] }, { "id": "body-region-2", "text": "properties for the parent flex container display this defines a flex container inline or block depending on the given value it enables a flex context for all its direct children container display flex or inline flex note that css columns have no effect on a flex container flex direction this establishes the main axis thus defining the direction flex items are placed in the flex container flexbox is aside from optional wrapping a single direction layout concept think of flex items as primarily laying out either in horizontal rows or vertical columns container flex direction row row reverse column column reverse row default left to right in ltr right to left in rtl row reverse right to left in ltr left to right in rtl column same as row but top to bottom column reverse same as row reverse but bottom to top flex wrap by default flex items will all try to fit onto one line you can change that and allow the items to wrap as needed with this property container flex wrap nowrap wrap wrap reverse nowrap default all flex items will be on one line wrap flex items will wrap onto multiple lines from top to bottom wrap reverse flex items will wrap onto multiple lines from bottom to top there are some visual demos of flex wrap here flex flow this is a shorthand for the flex direction and flex wrap properties which together define the flex container s main and cross axes the default value is row nowrap container flex flow column wrap justify content this defines the alignment along the main axis it helps distribute extra free space leftover when either all the flex items on a line are inflexible or are flexible but have reached their maximum size it also exerts some control over the alignment of items when they overflow the line container justify content flex start flex end center space between space around space evenly start end left right safe unsafe flex start default items are packed toward the start of the flex direction flex end items are packed toward the end of the flex direction start items are packed toward the start of the writing mode direction end items are packed toward the end of the writing mode direction left items are packed toward left edge of the container unless that doesn t make sense with the flex direction then it behaves like start right items are packed toward right edge of the container unless that doesn t make sense with the flex direction then it behaves like end center items are centered along the line space between items are evenly distributed in the line first item is on the start line last item on the end line space around items are evenly distributed in the line with equal space around them note that visually the spaces aren t equal since all the items have equal space on both sides the first item will have one unit of space against the container edge but two units of space between the next item because that next item has its own spacing that applies space evenly items are distributed so that the spacing between any two items and the space to the edges is equal note that that browser support for these values is nuanced for example space between never got support from some versions of edge and start end left right aren t in chrome yet mdn has detailed charts the safest values are flex start flex end and center there are also two additional keywords you can pair with these values safe and unsafe using safe ensures that however you do this type of positioning you can t push an element such that it renders off screen e g off the top in such a way the content can t be scrolled too called data loss align items this defines the default behavior for how flex items are laid out along the cross axis on the current line think of it as the justify content version for the cross axis perpendicular to the main axis container align items stretch flex start flex end center baseline first baseline last baseline start end self start self end safe unsafe stretch default stretch to fill the container still respect min width max width flex start start self start items are placed at the start of the cross axis the difference between these is subtle and is about respecting the flex direction rules or the writing mode rules flex end end self end items are placed at the end of the cross axis the difference again is subtle and is about respecting flex direction rules vs writing mode rules center items are centered in the cross axis baseline items are aligned such as their baselines align the safe and unsafe modifier keywords can be used in conjunction with all the rest of these keywords although note browser support and deal with helping you prevent aligning elements such that the content becomes inaccessible align content this aligns a flex container s lines within when there is extra space in the cross axis similar to how justify content aligns individual items within the main axis note this property only takes effect on multi line flexible containers where flex wrap is set to either wrap or wrap reverse a single line flexible container i e where flex wrap is set to its default value no wrap will not reflect align content container align content flex start flex end center space between space around space evenly stretch start end baseline first baseline last baseline safe unsafe normal default items are packed in their default position as if no value was set flex start start items packed to the start of the container the more supported flex start honors the flex direction while start honors the writing mode direction flex end end items packed to the end of the container the more support flex end honors the flex direction while end honors the writing mode direction center items centered in the container space between items evenly distributed the first line is at the start of the container while the last one is at the end space around items evenly distributed with equal space around each line space evenly items are evenly distributed with equal space around them stretch lines stretch to take up the remaining space the safe and unsafe modifier keywords can be used in conjunction with all the rest of these keywords and deal with helping you prevent aligning elements such that the content becomes inaccessible gap row gap column gap the gap property explicitly controls the space between flex items it applies that spacing only between items not on the outer edges container display flex gap 10px gap 10px 20px row gap column gap row gap 10px column gap 20px the behavior could be thought of as a minimum gutter as if the gutter is bigger somehow because of something like justify content space between then the gap will only take effect if that space would end up smaller it is not exclusively for flexbox gap works in grid and multi column layout as well place items the place items property in css is shorthand for the align items and justify items properties combining them into a single declaration the property accepts dual values the first for align items and the second for justify items or a single value to apply the same value to both item display flex place items center same as item display flex place items center center same as item display flex align items center justify items center", "source_text": "Properties for the Parent\n(Flex Container)\ndisplay\n\nThis defines a flex container; inline or block depending on the given value. It enables a flex context for all its direct children.\n\n.container {\n display: flex; /* or inline-flex */\n}\n\nNote that CSS columns have no effect on a flex container.\n\nflex-direction\n\n\nThis establishes the main-axis, thus defining the direction flex items are placed in the flex container. Flexbox is (aside from optional wrapping) a single-direction layout concept. Think of flex items as primarily laying out either in horizontal rows or vertical columns.\n\n.container {\n flex-direction: row | row-reverse | column | column-reverse;\n}\nrow (default): left to right in ltr; right to left in rtl\nrow-reverse: right to left in ltr; left to right in rtl\ncolumn: same as row but top to bottom\ncolumn-reverse: same as row-reverse but bottom to top\nflex-wrap\n\nBy default, flex items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.\n\n.container {\n flex-wrap: nowrap | wrap | wrap-reverse;\n}\nnowrap (default): all flex items will be on one line\nwrap: flex items will wrap onto multiple lines, from top to bottom.\nwrap-reverse: flex items will wrap onto multiple lines from bottom to top.\n\nThere are some visual demos of flex-wrap here.\n\nflex-flow\n\nThis is a shorthand for the flex-direction and flex-wrap properties, which together define the flex container’s main and cross axes. The default value is row nowrap.\n\n.container {\n flex-flow: column wrap;\n}\njustify-content\n\n\nThis defines the alignment along the main axis. It helps distribute extra free space leftover when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size. It also exerts some control over the alignment of items when they overflow the line.\n\n.container {\n justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly | start | end | left | right ... + safe | unsafe;\n}\nflex-start (default): items are packed toward the start of the flex-direction.\nflex-end: items are packed toward the end of the flex-direction.\nstart: items are packed toward the start of the writing-mode direction.\nend: items are packed toward the end of the writing-mode direction.\nleft: items are packed toward left edge of the container, unless that doesn’t make sense with the flex-direction, then it behaves like start.\nright: items are packed toward right edge of the container, unless that doesn’t make sense with the flex-direction, then it behaves like end.\ncenter: items are centered along the line\nspace-between: items are evenly distributed in the line; first item is on the start line, last item on the end line\nspace-around: items are evenly distributed in the line with equal space around them. Note that visually the spaces aren’t equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies.\nspace-evenly: items are distributed so that the spacing between any two items (and the space to the edges) is equal.\n\nNote that that browser support for these values is nuanced. For example, space-between never got support from some versions of Edge, and start/end/left/right aren’t in Chrome yet. MDN has detailed charts. The safest values are flex-start, flex-end, and center.\n\nThere are also two additional keywords you can pair with these values: safe and unsafe. Using safe ensures that however you do this type of positioning, you can’t push an element such that it renders off-screen (e.g. off the top) in such a way the content can’t be scrolled too (called “data loss”).\n\nalign-items\n\n\nThis defines the default behavior for how flex items are laid out along the cross axis on the current line. Think of it as the justify-content version for the cross-axis (perpendicular to the main-axis).\n\n.container {\n align-items: stretch | flex-start | flex-end | center | baseline | first baseline | last baseline | start | end | self-start | self-end + ... safe | unsafe;\n}\nstretch (default): stretch to fill the container (still respect min-width/max-width)\nflex-start / start / self-start: items are placed at the start of the cross axis. The difference between these is subtle, and is about respecting the flex-direction rules or the writing-mode rules.\nflex-end / end / self-end: items are placed at the end of the cross axis. The difference again is subtle and is about respecting flex-direction rules vs. writing-mode rules.\ncenter: items are centered in the cross-axis\nbaseline: items are aligned such as their baselines align\n\nThe safe and unsafe modifier keywords can be used in conjunction with all the rest of these keywords (although note browser support), and deal with helping you prevent aligning elements such that the content becomes inaccessible.\n\nalign-content\n\n\nThis aligns a flex container’s lines within when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.\n\nNote: This property only takes effect on multi-line flexible containers, where flex-wrap is set to either wrap or wrap-reverse). A single-line flexible container (i.e. where flex-wrap is set to its default value, no-wrap) will not reflect align-content.\n\n.container {\n align-content: flex-start | flex-end | center | space-between | space-around | space-evenly | stretch | start | end | baseline | first baseline | last baseline + ... safe | unsafe;\n}\nnormal (default): items are packed in their default position as if no value was set.\nflex-start / start: items packed to the start of the container. The (more supported) flex-start honors the flex-direction while start honors the writing-mode direction.\nflex-end / end: items packed to the end of the container. The (more support) flex-end honors the flex-direction while end honors the writing-mode direction.\ncenter: items centered in the container\nspace-between: items evenly distributed; the first line is at the start of the container while the last one is at the end\nspace-around: items evenly distributed with equal space around each line\nspace-evenly: items are evenly distributed with equal space around them\nstretch: lines stretch to take up the remaining space\n\nThe safe and unsafe modifier keywords can be used in conjunction with all the rest of these keywords and deal with helping you prevent aligning elements such that the content becomes inaccessible.\n\ngap, row-gap, column-gap\n\nThe gap property explicitly controls the space between flex items. It applies that spacing only between items not on the outer edges.\n\n.container {\n display: flex;\n ...\n gap: 10px;\n gap: 10px 20px; /* row-gap column gap */\n row-gap: 10px;\n column-gap: 20px;\n}\n\nThe behavior could be thought of as a minimum gutter, as if the gutter is bigger somehow (because of something like justify-content: space-between;) then the gap will only take effect if that space would end up smaller.\n\nIt is not exclusively for flexbox, gap works in grid and multi-column layout as well.\n\nplace-items\n\nThe place-items property in CSS is shorthand for the align-items and justify-items properties, combining them into a single declaration. The property accepts dual values, the first for align-items and the second for justify-items. Or a single value to apply the same value to both.\n\n.item {\n display: flex;\n place-items: center;\n}\n\n/* Same as: */\n.item {\n display: flex;\n place-items: center center;\n}\n\n/* Same as: */\n.item {\n display: flex;\n align-items: center;\n justify-items: center;\n}", "segmentation_method": "reviewed_source_semantics", "label": "Properties for the Parent (Flex Container)", "source_line_range": [ 36, 177 ] }, { "id": "body-region-3", "text": "properties for the children flex items order by default flex items are laid out in the source order however the order property controls the order in which they appear in the flex container item order 5 default is 0 items with the same order revert to source order flex grow this defines the ability for a flex item to grow if necessary it accepts a unitless value that serves as a proportion it dictates what amount of the available space inside the flex container the item should take up if all items have flex grow set to 1 the remaining space in the container will be distributed equally to all children if one of the children has a value of 2 that child would take up twice as much of the space as either one of the others or it will try at least item flex grow 4 default 0 negative numbers are invalid flex shrink this defines the ability for a flex item to shrink if necessary item flex shrink 3 default 1 negative numbers are invalid flex basis this defines the default size of an element before the remaining space is distributed it can be a length e g 20 5rem etc or a keyword the auto keyword means look at my width or height property which was temporarily done by the main size keyword until deprecated the content keyword means size it based on the item s content this keyword isn t well supported yet so it s hard to test and harder to know what its brethren max content min content and fit content do item flex basis auto default auto if set to 0 the extra space around content isn t factored in if set to auto the extra space is distributed based on its flex grow value see this graphic flex this is the shorthand for flex grow flex shrink and flex basis combined the second and third parameters flex shrink and flex basis are optional the default is 0 1 auto but if you set it with a single number value like flex 5 that changes the flex basis to 0 so it s like setting flex grow 5 flex shrink 1 flex basis 0 item flex none flex grow flex shrink flex basis it is recommended that you use this shorthand property rather than set the individual properties the shorthand sets the other values intelligently align self this allows the default alignment or the one specified by align items to be overridden for individual flex items please see the align items explanation to understand the available values item align self auto flex start flex end center baseline stretch note that float clear and vertical align have no effect on a flex item", "source_text": "Properties for the Children\n(Flex Items)\norder\n\n\nBy default, flex items are laid out in the source order. However, the order property controls the order in which they appear in the flex container.\n\n.item {\n order: 5; /* default is 0 */\n}\n\nItems with the same order revert to source order.\n\nflex-grow\n\n\nThis defines the ability for a flex item to grow if necessary. It accepts a unitless value that serves as a proportion. It dictates what amount of the available space inside the flex container the item should take up.\n\nIf all items have flex-grow set to 1, the remaining space in the container will be distributed equally to all children. If one of the children has a value of 2, that child would take up twice as much of the space as either one of the others (or it will try, at least).\n\n.item {\n flex-grow: 4; /* default 0 */\n}\n\nNegative numbers are invalid.\n\nflex-shrink\n\nThis defines the ability for a flex item to shrink if necessary.\n\n.item {\n flex-shrink: 3; /* default 1 */\n}\n\nNegative numbers are invalid.\n\nflex-basis\n\nThis defines the default size of an element before the remaining space is distributed. It can be a length (e.g. 20%, 5rem, etc.) or a keyword. The auto keyword means “look at my width or height property” (which was temporarily done by the main-size keyword until deprecated). The content keyword means “size it based on the item’s content” – this keyword isn’t well supported yet, so it’s hard to test and harder to know what its brethren max-content, min-content, and fit-content do.\n\n.item {\n flex-basis: | auto; /* default auto */\n}\n\nIf set to 0, the extra space around content isn’t factored in. If set to auto, the extra space is distributed based on its flex-grow value. See this graphic.\n\nflex\n\nThis is the shorthand for flex-grow, flex-shrink and flex-basis combined. The second and third parameters (flex-shrink and flex-basis) are optional. The default is 0 1 auto, but if you set it with a single number value, like flex: 5;, that changes the flex-basis to 0%, so it’s like setting flex-grow: 5; flex-shrink: 1; flex-basis: 0%;.\n\n.item {\n flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]\n}\n\nIt is recommended that you use this shorthand property rather than set the individual properties. The shorthand sets the other values intelligently.\n\nalign-self\n\n\nThis allows the default alignment (or the one specified by align-items) to be overridden for individual flex items.\n\nPlease see the align-items explanation to understand the available values.\n\n.item {\n align-self: auto | flex-start | flex-end | center | baseline | stretch;\n}\n\nNote that float, clear and vertical-align have no effect on a flex item.", "segmentation_method": "reviewed_source_semantics", "label": "Properties for the Children (Flex Items)", "source_line_range": [ 178, 246 ] }, { "id": "body-region-4", "text": "interactive walkthrough let s see what all that information looks like in practice with a fairly simple example and a common one at that a navigation of links we can add spacing between items if you re working with something like a navigation of links on a single row chances are you don t want them bumping right up next to each other like flexbox does by default html css result ul display flex layer presentation body background khaki display grid height 100vh place items center ul border 1px solid black border radius 8px padding inline 0 padding 1rem li list style none a color black resources 1 0 5 0 25 we could add padding to the items to give them some breathing room html css result ul display flex li padding 5rem layer presentation body background khaki display grid height 100vh place items center ul border 1px solid black border radius 8px padding inline 0 padding 1rem li list style none a color black resources 1 0 5 0 25 that works but notice the little bit of extra padding on the left and right edges that s because the container itself has padding on it that s fixable for sure but why go through the trouble of writing even more css we can use the gap property on the parent container instead html css result ul display flex gap 1rem layer presentation body background khaki display grid height 100vh place items center ul border 1px solid black border radius 8px padding inline 0 padding 1rem li list style none a color black resources 1 0 5 0 25 no extra padding and notice how the spacing is automatically calculated and accounted for in the layout so nothing overflows the container edges again there s something so satisfying about that but you might still want padding on the navigation items between you have a background color set on them and they otherwise look cramped as all heck html css result resources 1 0 5 0 25 with flexbox we can add padding and it doesn t actually add to the parent s padding rather it s automatically accounted for in the spacing html css result resources 1 0 5 0 25 beautiful just beautiful we can let the items wrap or not if there s no more room for the number of items to fit on a single row we can simply let the items wrap onto multiple rows with the flex wrap property it s set to the nowrap value by default which means the items just keep on going on the same row even if the container is out of space notice how the items shrink when that happens html css js result resources 1 0 5 0 25 we can set the direction oh you want the links to line up vertically instead we have the flex direction property for that since flexbox displays items in a row direction by default we don t even have to declare it if we want a single column then we use the column value html css result ul display flex flex direction column gap 1rem layer presentation body background khaki display grid height 100vh place items center ul border 1px solid black border radius 8px padding inline 0 padding 1rem li background color black border radius 6px list style none padding 5rem a color white resources 1 0 5 0 25 we can also reverse the direction with either row reverse or column reverse let s flip things around in that last example html css result ul display flex flex direction column reverse gap 1rem layer presentation body background khaki display grid height 100vh place items center ul border 1px solid black border radius 8px padding inline 0 padding 1rem li background color black border radius 6px list style none padding 5rem a color white resources 1 0 5 0 25 accessibility note assistive technologies like screen readers will announce the items in the original order in other words the reversal is visual rather than structural so what for that if the reading order is super important which it often is we can order items around speaking of re ordering items we have the order property if we need to place one or more items in specific places let s say you want that services link to show up last in the list that d be order 4 on that specific item html css result ul display flex flex direction column gap 1rem li nth of type 2 background color orangered order 4 layer presentation body background khaki display grid height 100vh place items center ul border 1px solid black border radius 8px padding inline 0 padding 1rem li background color black border radius 6px list style none padding 5rem a color white resources 1 0 5 0 25 we can shove things around let s say your navigation container is way wider than the number of items in it html css result resources 1 0 5 0 25 maybe you want to space those items out evenly across the available space we can do that with the justify content property setting it to space evenly html css result resources 1 0 5 0 25 or maybe you want the first and last items to be justified to the parent container s edges which we can do with justify items space between html css result resources 1 0 5 0 25 you can toggle between the different values in action in this next demo html css js result resources 1 0 5 0 25 it s same thing vertically as well only we re working with the align content property instead of justify content the only thing to note is that we have to enable wrapping on the container with flex wrap wrap for it to work properly and notice there s an additional stretch value in there that allows the items to you know stretch to fill the available space html css js result resources 1 0 5 0 25 we can size the items so far we ve really seen just how flexible items are in a flex container they sort of just adapt to the container that said there is a way we can control how the items are sized using three properties flex grow flex shrink and flex basis or combining all three together with the flex shorthand property flex grow allows a flex item to grow only if necessary if all items have flex grow set to 1 the remaining space in the container will be distributed equally to all children if one of the children has a value of 2 that child would take up twice as much of the space as either one of the others or it will try at least flex shrink allows a flex item to shrink if necessary flex basis sets a flex item s default size before the remaining space is distributed robin rendle has a nice way of saying all that in plain english flex grow sets the item s maximum size flex shrink sets the item s minimum size flex basis represents the item s ideal size html css js result resources 1 0 5 0 25 css flexbox examples let s start with a very very simple example solving an almost daily problem perfect centering it couldn t be any simpler if you use css flexbox parent display flex height 300px or whatever child width 100px or whatever height 100px or whatever margin auto magic this relies on the fact a margin set to auto in a flex container absorb extra space so setting a margin of auto will make the item perfectly centered in both axes now let s use some more properties consider a list of 6 items all with fixed dimensions but can be auto sized we want them to be evenly distributed on the horizontal axis so that when we resize the browser everything scales nicely and without media queries flex container we first create a flex layout context display flex then we define the flow direction and if we allow the items to wrap remember this is the same as flex direction row flex wrap wrap flex flow row wrap then we define how is distributed the remaining space justify content space around done everything else is just some styling concern below is a pen featuring this example be sure to go to codepen and try resizing your windows to see what happens html css result resources 1 0 5 0 25 let s try something else imagine we have a right aligned navigation element on the very top of our website but we want it to be centered on medium sized screens and single columned on small devices easy enough large navigation display flex flex flow row wrap this aligns items to the end line on main axis justify content flex end medium screens media all and max width 800px navigation when on medium sized screens we center it by evenly distributing empty space around items justify content space around small screens media all and max width 500px navigation on small screens we are no longer using row direction but column flex direction column html css result resources 1 0 5 0 25 let s try something even better by playing with flex items flexibility what about a mobile first 3 columns layout with full width header and footer and independent from source order wrapper display flex flex flow row wrap we tell all items to be 100 width via flex basis wrapper flex 1 100 we rely on source order for mobile first approach in this case 1 header 2 article 3 aside 1 4 aside 2 5 footer medium screens media all and min width 600px we tell both sidebars to share a row aside flex 1 auto large screens media all and min width 800px we invert order of first sidebar and main and tell the main element to take twice as much width as the other two sidebars main flex 3 0px aside 1 order 1 main order 2 aside 2 order 3 footer order 4 html css result resources 1 0 5 0 25 flexbox browser support css flexbox is supported in all modern browsers prefixing flexbox note this is largely unnecessary now that css flexbox is widely supported in all modern browsers unless you absolutely have to support a legacy browser like internet explorer which has been discontinued for a while now there are entirely different property and value names to support a legacy browser like internet explorer which we hope you don t need to do this is because the flexbox spec has changed over time creating an old tweener and new versions perhaps the best way to handle this is to write in the new and final syntax and run your css through autoprefixer which handles the fallbacks very well alternatively here s a sass mixin to help with some of the prefixing which also gives you an idea of what kind of things need to be done mixin flexbox display webkit box display moz box display ms flexbox display webkit flex display flex mixin flex values webkit box flex values moz box flex values webkit flex values ms flex values flex values mixin order val webkit box ordinal group val moz box ordinal group val ms flex order val webkit order val order val wrapper include flexbox item include flex 1 200px include order 2 flexbox tricks", "source_text": "Interactive Walkthrough\n\nLet’s see what all that information looks like in practice with a fairly simple example. And a common one at that: a navigation of links.\n\nWe Can Add Spacing Between Items\n\nIf you’re working with something like a navigation of links on a single row, chances are you don’t want them bumping right up next to each other like Flexbox does by default.\n\n\nHTML\nCSS\nResult\nul { display : flex ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { list-style : none ; a { color : black ; } } }\nResources\n1×\n0.5×\n0.25×\nWe could add padding to the items to give them some breathing room:\n\n\nHTML\nCSS\nResult\nul { display : flex ; } li { padding : .5rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { list-style : none ; a { color : black ; } } }\nResources\n1×\n0.5×\n0.25×\nThat works, but notice the little bit of extra padding on the left and right edges. That’s because the container itself has padding on it.\n\nThat’s fixable for sure. But why go through the trouble of writing even more CSS? We can use the gap property on the parent container instead:\n\n\nHTML\nCSS\nResult\nul { display : flex ; gap : 1rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { list-style : none ; a { color : black ; } } }\nResources\n1×\n0.5×\n0.25×\nNo extra padding. And notice how the spacing is automatically calculated and accounted for in the layout so nothing overflows the container edges. Again, there’s something so satisfying about that.\n\nBut you might still want padding on the navigation items between you have a background color set on them and they otherwise look cramped as all heck:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nWith Flexbox, we can add padding and it doesn’t actually add to the parent’s padding. Rather, it’s automatically accounted for in the spacing:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nBeautiful. Just beautiful.\n\nWe Can Let the Items Wrap… or Not\n\nIf there’s no more room for the number of items to fit on a single row, we can simply let the items wrap onto multiple rows with the flex-wrap property. It’s set to the nowrap value by default, which means the items just keep on going on the same row, even if the container is out of space. Notice how the items shrink when that happens.\n\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nWe Can Set the Direction\n\nOh, you want the links to line up vertically instead? We have the flex-direction property for that. Since Flexbox displays items in a row direction by default, we don’t even have to declare it. If we want a single column, then we use the column value:\n\n\nHTML\nCSS\nResult\nul { display : flex ; flex-direction : column ; gap : 1rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { background-color : black ; border-radius : 6px ; list-style : none ; padding : .5rem ; a { color : white ; } } }\nResources\n1×\n0.5×\n0.25×\nWe can also reverse the direction with either row-reverse or column-reverse. Let’s flip things around in that last example:\n\n\nHTML\nCSS\nResult\nul { display : flex ; flex-direction : column-reverse ; gap : 1rem ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { background-color : black ; border-radius : 6px ; list-style : none ; padding : .5rem ; a { color : white ; } } }\nResources\n1×\n0.5×\n0.25×\nAccessibility note: Assistive technologies, like screen readers, will announce the items in the original order. In other words, the reversal is visual rather than structural. So, what for that if the reading order is super important, which it often is.\n\nWe Can “Order” Items Around\n\nSpeaking of re-ordering items, we have the order property if we need to place one or more items in specific places. Let’s say you want that “Services” link to show up last in the list. That’d be order: 4 on that specific item:\n\n\nHTML\nCSS\nResult\nul { display : flex ; flex-direction : column ; gap : 1rem ; } li : nth-of-type ( 2 ) { background-color : orangered ; order : 4 ; } @layer presentation { body { background : khaki ; display : grid ; height : 100vh ; place-items : center ; } ul { border : 1px solid black ; border-radius : 8px ; padding-inline : 0 ; padding : 1rem ; } li { background-color : black ; border-radius : 6px ; list-style : none ; padding : .5rem ; a { color : white ; } } }\nResources\n1×\n0.5×\n0.25×\nWe Can Shove Things Around\n\nLet’s say your navigation container is way wider than the number of items in it:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nMaybe you want to space those items out evenly across the available space. We can do that with the justify-content property, setting it to space-evenly:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nOr maybe you want the first and last items to be justified to the parent container’s edges, which we can do with justify-items: space-between:\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nYou can toggle between the different values in action in this next demo:\n\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nIt’s same thing vertically as well, only we’re working with the align-content property instead of justify-content. The only thing to note is that we have to enable wrapping on the container with flex-wrap: wrap for it to work properly. And! Notice there’s an additional stretch value in there that allows the items to, you know, stretch to fill the available space.\n\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nWe Can Size the Items\n\nSo far, we’ve really seen just how “flexible” items are in a flex container — they sort of just adapt to the container. That said, there is a way we can control how the items are sized using three properties (flex-grow, flex-shrink, and flex-basis), or combining all three together with the flex shorthand property.\n\nflex-grow: Allows a flex item to grow, only if necessary. If all items have flex-grow set to 1, the remaining space in the container will be distributed equally to all children. If one of the children has a value of 2, that child would take up twice as much of the space as either one of the others (or it will try, at least).\nflex-shrink: Allows a flex item to shrink if necessary.\nflex-basis: Sets a flex item’s default size before the remaining space is distributed.\n\nRobin Rendle has a nice way of saying all that in plain English:\n\nflex-grow: Sets the item’s maximum size.\nflex-shrink: Sets the item’s minimum size.\nflex-basis: Represents the item’s “ideal” size.\n\nHTML\nCSS\nJS\nResult\nResources\n1×\n0.5×\n0.25×\nCSS Flexbox Examples\n\nLet’s start with a very very simple example, solving an almost daily problem: perfect centering. It couldn’t be any simpler if you use CSS Flexbox.\n\n.parent {\n display: flex;\n height: 300px; /* Or whatever */\n}\n\n.child {\n width: 100px; /* Or whatever */\n height: 100px; /* Or whatever */\n margin: auto; /* Magic! */\n}\n\nThis relies on the fact a margin set to auto in a flex container absorb extra space. So setting a margin of auto will make the item perfectly centered in both axes.\n\nNow let’s use some more properties. Consider a list of 6 items, all with fixed dimensions, but can be auto-sized. We want them to be evenly distributed on the horizontal axis so that when we resize the browser, everything scales nicely, and without media queries.\n\n.flex-container {\n /* We first create a flex layout context */\n display: flex;\n\n /* Then we define the flow direction \n and if we allow the items to wrap \n * Remember this is the same as:\n * flex-direction: row;\n * flex-wrap: wrap;\n */\n flex-flow: row wrap;\n\n /* Then we define how is distributed the remaining space */\n justify-content: space-around;\n}\n\nDone. Everything else is just some styling concern. Below is a pen featuring this example. Be sure to go to CodePen and try resizing your windows to see what happens.\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nLet’s try something else. Imagine we have a right-aligned navigation element on the very top of our website, but we want it to be centered on medium-sized screens and single-columned on small devices. Easy enough.\n\n/* Large */\n.navigation {\n display: flex;\n flex-flow: row wrap;\n /* This aligns items to the end line on main-axis */\n justify-content: flex-end;\n}\n\n/* Medium screens */\n@media all and (max-width: 800px) {\n .navigation {\n /* When on medium sized screens, we center it by evenly distributing empty space around items */\n justify-content: space-around;\n }\n}\n\n/* Small screens */\n@media all and (max-width: 500px) {\n .navigation {\n /* On small screens, we are no longer using row direction but column */\n flex-direction: column;\n }\n}\n\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nLet’s try something even better by playing with flex items flexibility! What about a mobile-first 3-columns layout with full-width header and footer. And independent from source order.\n\n.wrapper {\n display: flex;\n flex-flow: row wrap;\n}\n\n/* We tell all items to be 100% width, via flex-basis */\n.wrapper > * {\n flex: 1 100%;\n}\n\n/* We rely on source order for mobile-first approach\n * in this case:\n * 1. header\n * 2. article\n * 3. aside 1\n * 4. aside 2\n * 5. footer\n */\n\n/* Medium screens */\n@media all and (min-width: 600px) {\n /* We tell both sidebars to share a row */\n .aside { flex: 1 auto; }\n}\n\n/* Large screens */\n@media all and (min-width: 800px) {\n /* We invert order of first sidebar and main\n * And tell the main element to take twice as much width as the other two sidebars \n */\n .main { flex: 3 0px; }\n .aside-1 { order: 1; }\n .main { order: 2; }\n .aside-2 { order: 3; }\n .footer { order: 4; }\n}\n\nHTML\nCSS\nResult\nResources\n1×\n0.5×\n0.25×\nFlexbox Browser Support\n\nCSS Flexbox is supported in all modern browsers.\n\nPrefixing Flexbox\n\nNote: This is largely unnecessary now that CSS Flexbox is widely supported in all modern browsers, unless you absolutely have to support a legacy browser, like Internet Explorer (which has been discontinued for a while now).\n\nThere are entirely different property and value names to support a legacy browser, like Internet Explorer (which we hope you don’t need to do). This is because the Flexbox spec has changed over time, creating an “old”, “tweener”, and “new” versions.\n\nPerhaps the best way to handle this is to write in the new (and final) syntax and run your CSS through Autoprefixer, which handles the fallbacks very well.\n\nAlternatively, here’s a Sass @mixin to help with some of the prefixing, which also gives you an idea of what kind of things need to be done:\n\n@mixin flexbox() {\n display: -webkit-box;\n display: -moz-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n}\n\n@mixin flex($values) {\n -webkit-box-flex: $values;\n -moz-box-flex: $values;\n -webkit-flex: $values;\n -ms-flex: $values;\n flex: $values;\n}\n\n@mixin order($val) {\n -webkit-box-ordinal-group: $val; \n -moz-box-ordinal-group: $val; \n -ms-flex-order: $val; \n -webkit-order: $val; \n order: $val;\n}\n\n.wrapper {\n @include flexbox();\n}\n\n.item {\n @include flex(1 200px);\n @include order(2);\n}\nFlexbox Tricks!", "segmentation_method": "reviewed_source_semantics", "label": "Interactive Walkthrough", "source_line_range": [ 247, 611 ] }, { "id": "body-region-5", "text": "more flexbox resources css flexible box layout module level 1 w3c css layout flexbox mdn use cases for flexbox smashing magazine", "source_text": "More Flexbox Resources\nCSS Flexible Box Layout Module Level 1 (W3C)\nCSS Layout: Flexbox (MDN)\nUse Cases for Flexbox (Smashing Magazine)", "segmentation_method": "reviewed_source_semantics", "label": "More Flexbox Resources", "source_line_range": [ 612, 615 ] } ], "ending": { "text": " Box Layout Module Level 1 (W3C)\nCSS Layout: Flexbox (MDN)\nUse Cases for Flexbox (Smashing Magazine)" } } }, { "id": "article-067", "name": "Designing Better Error Messages UX", "url": "https://shop.smashingmagazine.com/2022/08/error-messages-ux-design/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Designing Better Error Messages UX" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Vitaly Friedman" ] }, { "id": "stable-3", "alternatives": [ "UX" ] }, { "id": "stable-4", "alternatives": [ "Usability" ] }, { "id": "stable-5", "alternatives": [ "Design Patterns" ] }, { "id": "stable-6", "alternatives": [ "Articles" ] }, { "id": "stable-7", "alternatives": [ "Books" ] }, { "id": "stable-8", "alternatives": [ "Events" ] }, { "id": "stable-9", "alternatives": [ "Membership" ] }, { "id": "stable-10", "alternatives": [ "Newsletter" ] }, { "id": "stable-11", "alternatives": [ "More" ] }, { "id": "stable-12", "alternatives": [ "Accessibility" ] }, { "id": "stable-13", "alternatives": [ "CSS" ] }, { "id": "stable-14", "alternatives": [ "JavaScript" ] }, { "id": "stable-15", "alternatives": [ "Performance" ] }, { "id": "stable-16", "alternatives": [ "Design" ] }, { "id": "stable-17", "alternatives": [ "Figma" ] }, { "id": "stable-18", "alternatives": [ "Wallpapers" ] }, { "id": "stable-19", "alternatives": [ "React" ] }, { "id": "stable-20", "alternatives": [ "Vue" ] }, { "id": "stable-21", "alternatives": [ "Round-Ups" ] }, { "id": "stable-22", "alternatives": [ "Web Design" ] }, { "id": "stable-23", "alternatives": [ "Guides" ] }, { "id": "stable-24", "alternatives": [ "Business" ] }, { "id": "stable-25", "alternatives": [ "Career" ] }, { "id": "stable-26", "alternatives": [ "Privacy" ] }, { "id": "stable-27", "alternatives": [ "Jump to all articles" ] }, { "id": "stable-28", "alternatives": [ "Share on" ] }, { "id": "stable-29", "alternatives": [ "Twitter" ] }, { "id": "stable-30", "alternatives": [ "LinkedIn" ] }, { "id": "stable-31", "alternatives": [ "ABOUT THE AUTHOR" ] }, { "id": "stable-32", "alternatives": [ "More about Vitaly" ] }, { "id": "stable-33", "alternatives": [ "Email Newsletter" ] }, { "id": "stable-34", "alternatives": [ "Your email" ], "visible_control": { "selector": "#mce-EMAIL-hp", "attribute": "placeholder" } }, { "id": "stable-35", "alternatives": [ "Meow!" ], "visible_control": { "selector": "input[name=\"subscribe\"]", "attribute": "value" } }, { "id": "stable-36", "alternatives": [ "Weekly tips on front-end & UX" ] }, { "id": "stable-37", "alternatives": [ "Explore more on" ] }, { "id": "stable-control-38", "alternatives": [ "Search articles..." ], "visible_control": { "selector": "#js-search-input", "attribute": "placeholder" } } ] }, "rule_review": { "status": "reviewed", "reason": "Complete first-automatic-load article reviewed through accessibility, rendered DOM boundaries and saved viewport evidence; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Designing Better Error Messages UX" ], "html_selector": "#main-heading,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-067/comment-qualification-reference-r5.json", "sha256": "beee940c75b5144be94e6487f860314a0ec6fa6f62c5524420bdac9151d31031", "chars": 797, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Error messages need to be easy to spot, but they also need to be helpful. Let’s explore when error messages should live above input fields and why toast error messages are usually not a very good idea.\n\nWhen we design interfaces, we rarely think about error messages first. After all, how much is there to design anyway? We highlight the error, display a message, and nudge users toward the correct input. As it turns out, a strategic and thorough design of these messages can be critical for businesses, especially if they struggle with high abandonment. Error messages can make or break the experience in situations when things go south.\n\nErrors are everywhere, and so are error messages. They are of course common in web forms, but also in complex tables, incompatible filters, search queries and failed interactions. They can be small error notes and large error summaries; short tooltips and lengthy toast messages. So, where do we start? From the beginning.\n\nPssst! This article is part of our ongoing series on design patterns. It’s also a part of Smart Interface Design Patterns 🍣 and is available in the Live Interface Design Training 🍕 as well.\n\nNot All Error Messages Are Equal #\n\nNot all errors are the same. As Page Laubheimer has noted, there are actually two different types of errors. Slips occur when users intend to perform one action but do another (e.g., when filling in a form on autopilot). Mistakes occur when there is a mismatch between the mental model of a user and the system. Our interfaces need to support both types of errors, and slips are usually much easier to resolve than mistakes.\n\nError messages come in various flavours: they could be slips (unconscious) or actual mistakes (conscious). (Large preview)\n\nFor slips, we can include helpful constraints (e.g. a reasonable width of a text box, prefixes and suffixes), provide recovery suggestions (e.g. autocomplete), choose reasonable defaults, and use forgiving formatting.\n\nTo prevent mistakes, we need to confirm destructive actions (when users go back to the previous page), set expectations early on (password requirements or file size), allow users to change their minds (change email or payment method), and in general, always provide a way out.\n\nTo measure the success of our error messages, we can define error-focused design KPIs and track them over time. These could include:\n\nthe average number of mistakes in a user journey,\nthe error recovery time,\nthe completion rates, and – completion times.\n\nWe can’t really eliminate mistakes altogether since no human input can be bulletproof, but we can reduce the number of errors by making it more difficult to make mistakes. One simple way of doing so is to improve the discovery errors, by never relying on the color of error messages alone.\n\nNever Rely On Red Color Alone #\n\nWhen we think of error messages, we almost subconsciously think of bold red text errors. That’s indeed a very established pattern, but often not enough to indicate to all users that something is wrong.\n\nJust a regular plain error message: red and bold. As in use on Gov.uk. (Large preview)\n\nDue to color vision deficiencies, it’s a good idea to always complement error messages with an icon, e.g., a large exclamation mark on a red background — right next to the error message. We can also highlight the entire section, along with the field, label, the hint, the error message and the input field. For example, a thick red vertical line next to the error message is a common pattern for error messages on Gov.uk.\n\nAlways a good idea: adding an icon and a thick vertical line for the entire section. (Large preview)\n\nSometimes the icon is displayed inside of the input field, on the right or on the left edge of the text box. When we display the icon on the right, users who zoom in and out might have difficulties spotting them. That’s why placing the icon on the left edge seems to be just a bit more reliable.\n\nExample of an icon displayed on the right edge of the text box. From Carbon Design System. (Large preview)\n\nAdditionally, it might be a good idea to guide users towards specific issues of the form with an error summary. That summary can contain links to the areas in the form which contain errors, so users can jump there directly.\n\nThe summary can appear on the top of the page, or just above the action button, as displayed in the example above.\n\nMost importantly, error summary probably shouldn’t appear under the action button. Too often, especially on mobile, users don’t realize that there is any error message at all, and keep clicking on that poor submit button hoping to get any kind of feedback — be it a status update from the browser, or a change of the URL. The feedback is actually there, under the button, yet in testing, it often shows very poor discovery rates.\n\nIf the page is fully refreshed upon validation, the error summary should be at the very top of the page. But if the page is updated without a refresh, it’s reasonable to add the error summary just above the action button where the user has just clicked or tapped — and highlight it with the red color and icon as well.\n\nAvoid Auto-Scrolling And Auto-Jumps #\n\nOnce a user clicks on the submit button, should we automatically scroll them to the first error? There is no clear answer to that question. Personally, I saw this pattern working very well for some users, but failing miserably for others.\n\nAny sudden movements on the page are likely to cause frustration with at least some users. If anything, users tend to find auto-jumps more annoying than auto-scrolling — as the latter at least communicates the direction of change and hints better at where users have moved to.\n\nShort answer? Start without auto-scrolling and display just an error summary with links. If it’s too slow, or doesn’t work as expected, consider adding auto-scrolling. And by no means move users up and down the page for no obvious reason — that’s a safe way to increase completion times and introduce confusion when it’s probably not needed.\n\nNever Cover User’s Input #\n\nWhen we display error messages, we convey to users that there is a problem; a good error message, however, also guides users to a solution. This, however, requires the ability to consult the error as the error is being fixed. In other words, users should be able to edit the input field while also reviewing the error message(s) provided to them.\n\nInline editing and validation in tables. A typical example. (Large preview)\n\nSo far, so good. However, things become quite complicated once we also have a tooltip in play. Once a tooltip is open, users might lose sight of both the error message and the input. Should they desire to be able to see all three pieces of information at once, they’d be out of luck.\n\nWhen a tooltip blocks the content, an example from the Carbon Design System.\n\nHowever, we can fix it relatively easily. First of all, we avoid tooltips that open on hover and display the tooltip only once tapped or clicked. That means that a tooltip will never disappear automatically and must be closed manually.\n\nThen, we use the details component and inline accordions as an alternative to tooltips. Hence, we make space for the content of the tooltip to expand between the label and the other content, so nothing will be covered. The error message would be visible at all times as well, next to the input field.\n\nThe details component, with the details appearing on tap/click. (Large preview)\n\nThis way, we show all three pieces of information at the same time — and users always have a choice to select what exactly they’d like to see. Is it too much? Maybe. But that’s a great option to keep in mind: at least to always display the input field and the error at the same time without them being covered by the tooltip.\n\nIn Forms, Display Error Messages Above Input #\n\nNow, this might sound a little bit confusing at first. Usually, error messages will be sitting conveniently under the input field, or perhaps — less frequently — on the right side of the input field. As it turns out, there are a few accessibility issues that come as a cost of these conventions.\n\nUsers of a magnifying software might miss the error message when it’s located on the right.\nOn mobile, users might not be able to see the error message under the input because it will be covered by the virtual keyboard.\nWhen editing input, error messages might be covered by the browser’s autofill or dropdown’s autocomplete suggestions.\n\nWe can avoid accessibility issues by displaying errors above erroneous input fields. (Large preview)\n\nDisplaying error messages above input fields typically helps us avoid the accessibility issues listed above. The cost of it, though, is layout shifts: with every new error appearing dynamically, the entire form has to shift vertically as we need to make space for the error message to appear. It might be noisy, but sometimes that noise might be very much worth it.\n\nFor lengthy error messages, it might sound tempting to display them as a tooltip, yet with it come all the usability issues discussed in the previous section. Using a collapsible accordion instead might be a better idea there.\n\nIn Tables, Display Error Messages Inline #\n\nWhen displaying error messages in tables, it might be a good idea to consider alternative approaches as otherwise we would end up with a lot of layout shifts for each row.\n\nOne of the simpler patterns is to display the error message in the same row where the content lives. In that case, the error message is more likely to live under the input field, not above it. Lengthy error messages could be collapsed and expanded with a tap/click on the entire row.\n\nError messages could live in the same row where the erroneous content lives. Source: UX Design World. (Large preview)\n\nIf the same error affects multiple rows, we might want to highlight the rows that contain errors and display an error message at the very top of the page that would explain the error and what needs to be done to fix it.\n\nIf an error appears multiple times, and its simple to explain, it might be a good idea to show it on the very top of the page. Image source: UX Design World. (Large preview)\n\nDon’t Rely On Toast Error Messages #\n\nBut what about good ol’ toast error messages? Those animated notifications, informing users about change of status of the system with floating messages. They might be uncommon for forms, but they frequently appear in tables and enterprise dashboards.\n\nThe world of toast notifications. Seb Group Design System. (Large preview)\n\nThere are a few common usability issues with toast error messages:\n\nUsers often don’t get a chance to fully read or understand the error message before it has disappeared, and there is no way to restore it or keep it floating.\nToast messages typically appear on the edges of the screen, and usually, it’s quite far away from the problematic input that has caused the error. There is quite a disconnect between the error message and the input, and it’s rarely possible to read the error message and correct the mistake simultaneously.\nLengthy toast messages usually block large areas of content that a user might be relying on — and potentially even the input that has caused the error.\nToast messages need to be announced to screen reader users while also allowing users to bring their focus back and forth between the error message and the erroneous input.\nWith toasts, we usually don’t have enough space to provide a detailed help using images or videos, and have to rely on plain text and links leading to external help pages that would usually open in a new tab.\n\nThis might not be ideal: error messages appearing as toasts in complex UIs. (Large preview)\n\nIf anything, toasts should be persistent if displaying information that can be acted upon, and users should be able to manually dismiss the notification.\n\nPersonally, I’d definitely stay away from designing error messages as toasts, even if they are persistent. The better we can connect an error with its cause visually, the less likely it is to be overlooked. And the better we can explain how to solve that error close to the erroneous input box, the faster users will understand what they need to do.\n\nAllow Users To Override An Error Message #\n\nWe’ve all been there before: full of hope and passion, you type in your shipping address in an eCommerce checkout, willing to proceed with payment right away. Yet here it comes, an aggressive address validator, telling you that your address is wrong, and you better double check it. You have been living at that address for the last five years, yet for some reason, that’s not good enough for the address validator.\n\nWhat options do you have? Unless you are willing to deliver the item to another address, this problem will likely cause a 100% abandonment — an extremely high price to pay for a poor address validator. Surely you don’t want to deliver an item to non-existing addresses, yet you don’t want to abandon customers either. Indeed, it might be that only a small portion of customers will be affected by it, but why should we lose these customers either?\n\nWhat happens if the validator doesn’t know the address? We can allow users to override validator in some cases. (Large preview)\n\nNo single validation library is 100% reliable and bulletproof for all the edge cases. Eventually some percentage of your customers will be left out there in the woods, trying to figure out what to do next to proceed. Aggressive validators cost money. Especially when they come in tandem with disabled buttons that literally block users without telling them what exactly needs to be done to fix the issue.\n\nFor cases when a validator might be too restrictive, we can allow customers to override validator’s warning. Surely we will get some wrong addresses as a result of that. But as a business, we need to measure just how much money we are losing due to increase in service desk inquiries vs. how much money we gain by allowing people to find a way to proceed even although the interface doesn’t want to play along. More often than not, it’s worth it.\n\nWhile this pattern works flawlessly for address input and telephone input, it probably won’t work for any input that needs to follow a particular convention — such as the length and checksum of an IBAN number or a credit card number. There, instead of giving customers a carte blanche, we need to meticulously check user’s input and guide them towards what exactly the problem seems to be.\n\nEstablish Stop-Words For Your Error Messages #\n\nMany error messages in most web applications are remarkably generic. They do indicate errors, but they aren’t very helpful in indicating solutions on how to fix these errors. Most of the time, these messages don’t really refer to the specifics of the user’s input. They provide a very general statement explaining that the input is wrong, with plenty of floral and cryptic words along with it.\n\nIn my personal experience, starting a project off by exploring and defining error messaging can be a very valuable exercise. If we can convey friendliness and personality while being concise and helpful in our error messages, we should surely be able to achieve the same in our navigation, body copy and form labels. In many ways, the way we write error messages can help us figure out just the right voice and tone of the entire design.\n\nNo technical jargon, no cryptic wording, nothing left to interpretation: we just explain the problem. (Large preview)\n\nDepending on your product’s voice and tone, you might want to be very strategic about how your error messages should sound. Here are some of the stop-words that Gov.uk tends to avoid in their interface:\n\ntechnical jargon like ‘form post error’, ‘unspecified error’, and ‘error 0x0000000643’;\nwords like ‘forbidden’, ‘illegal’, ‘you forgot’, and ‘prohibited’;\n‘please’ because it implies a choice;\n‘sorry’ because it does not help fix the problem;\n‘valid’ and ‘invalid’ because they do not add anything to the message;\nhumourous, informal language like ‘oops’.\n\nThe choice of words matters. It’s worth emphasizing that spending time and effort on crafting helpful, adaptive error messages is probably one of the best investments a company might make to reduce abandonment and drive conversions.\n\nProvide Examples Of Correct Input #\n\nTalking about the choice of words, how do we make it more helpful? And in general, what makes an error message helpful? For example, a clear set of guidelines of what a correct input is. That means adding a hint under the label and provide an example of correct input, so users understand how to re-route and what is expected from them.\n\nThere is no need to include words that don’t help the user fix the problem. Instead, we can provide helpful, actionable hints and input examples. (Large preview)\n\nProviding example along with a helpful error message can go a long way to significantly reduce abandonment. (Large preview)\n\nSurely, sometimes adding an example might feel unnecessary and just taking up the space in design. I’d challenge you to tackle your conversion issues with well-crafted examples of corrent input. Often it’s the easiest way to improve conversion, as users otherwise just can’t find a way to make something work — even if it’s as simple as an extra empty space.\n\nDisplay Error Summary On The Top #\n\nInline validation deserves a separate conversation. As an alternative approach, of course we could validate the form on submit only. But it doesn’t mean that we have to drive users from one page to a separate new page with all the errors displayed. We could display an error summary just next to the Submit button (as displayed below, sketched by Jordan Moore). It would probably be better to display the error message above the Submit button rather than below it to prevent it from being rendered below the bottom of the viewport and thus not to be visible (thanks Rik!).\n\nAn error message appearing next to Submit button. Sketched by Jordan Moore. (Large preview)\n\nHowever, if there are a few problems with the form, we can also use an error summary component. With it, we highlight the errors as links so that users can jump to them via the keyboard as well. While doing so, we need to bring focus to the first form field with an error. Preferably with a bit of scroll-margin-top, so screen reader users understand where they currently are.\n\nError summary on the top, single error messages within each input field. From No Style Design System by Adam Silver. (Large preview)\n\nAdditionally, you might want to adjust the favicon and the title of the document if errors do appear, so impatient users who might have already left the form perhaps have a chance to return back and fix the errors, rather than assuming that everything has worked flawlessly.\n\nIndicate to users that there are some pending problems with the form by changing the favicon and the title of the tab upon validation. (Large preview)\n\nWrapping Up #\n\nAt the first glance, dealing with error messages might not sound like a big deal. However, as we dive into fine details, there are plenty of considerations that might either cause high abandonment or help people resolve issues quickly.\n\nHere’s a quick overview of what we can do to improve the Error Messages UX in our websites and applications:\n\nDefine error-focused design KPIs by measuring the average number of mistakes in a user journey, the error recovery time, the completion rates, and completion times.\nNever rely on the color of the error message alone, and use icons, borders, and section highlights to indicate erroneous input.\nNever cover user’s input nor the error message. Ideally, allow users to consult the error message, the tooltip, and their input at the same time, e.g., by using inline accordions and avoiding tooltips for important details.\nConsider displaying error messages above input to avoid issues with auto-fill, autocomplete, magnifying software, and virtual keyboard.\nUse inline validation for password strength meters, but not for validating every field as users type in. Consider breaking the form into small steps and validate each step only on submit.\nFor complex tables, don’t rely on toast error messages and display errors within rows where an error has occurred.\nBe strategic about your error messaging and craft helpful messages that match the voice and tone of your brand, rather than being general and generic.\nAlways provide examples of correct input, especially for complex input that are less likely to be auto-filled.\nAllow users to override your validators for address input and telephone input, but not for any input that needs to follow a particular convention.\nWhen validating on submit, display an error summary on the top of the page, or guide users to an error in a popover. Also, change the favicon and the title of the document to communicate to users who’ve already left that something went wrong.\n\nWith these guidelines, we should be better off when boosting our error messages UX. And if you can’t really do much around the way errors appear in your product, explore what you can do to replace generic error messages with helpful ones. This might be a small change with a huge impact that will eventually show up in large business KPIs dashboards.\n\nMeet “Smart Interface Design Patterns” #\n\nIf you are interested in similar insights around UX, take a look at Smart Interface Design Patterns, our shiny new 10h-video course with 100s of practical examples from real-life projects. Plenty of design patterns, guidelines and a live UX training — with 5 new segments added every year. Just sayin’! Check a free preview.\n\nMeet Smart Interface Design Patterns, our new video course and live UX training all around interface design & UX.\n\nJump to the video course →\n\n100 design patterns & real-life examples.\n10h-video course + live UX training. Free preview.\n\nUseful Resources #\n\nBack Button Expectations, Baymard Institute\nDesigning With the Web in Mind, Chloe Sanderson\nDesigning A Perfect Configurator\nDesigning A Perfect Accordion\nDesigning A Perfect Infinite Scroll\nDesigning A Perfect Feature Comparison\nDesigning A Perfect Slider\n\nRELATED ARTICLES #\n\n“How To Design Error States For Mobile Apps”, Nick Babich\n“Designing Better Tooltips For Mobile User Interfaces”, Eric Olive", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "error messages need to be easy to spot but they also need to be helpful let s explore when error messages should live above input fields and why toast error messages are usually not a very good idea when we design interfaces we rarely think about error messages first after all how much is there to design anyway we highlight the error display a message and nudge users toward the correct input as it turns out a strategic and thorough design of these messages can be critical for businesses especially if they struggle with high abandonment error messages can make or break the experience in situations when things go south errors are everywhere and so are error messages they are of course common in web forms but also in complex tables incompatible filters search queries and failed interactions they can be small error notes and large error summaries short tooltips and lengthy toast messages so where do we start from the beginning pssst this article is part of our ongoing series on design patterns it s also a part of smart interface design patterns and is available in the live interface design training as well not all error messages are equal not all errors are the same as page laubheimer has noted there are actually two different types of errors slips occur when users intend to perform one action but do another e g when filling in a form on autopilot mistakes occur when there is a mismatch between the mental model of a user and the system our interfaces need to support both types of errors and slips are usually much easier to resolve than mistakes error messages come in various flavours they could be slips unconscious or actual mistakes conscious large preview for slips we can include helpful constraints e g a reasonable width of a text box prefixes and suffixes provide recovery suggestions e g autocomplete choose reasonable defaults and use forgiving formatting to prevent mistakes we need to confirm destructive actions when users go back to the previous page set expectations early on password requirements or file size allow users to change their minds change email or payment method and in general always provide a way out to measure the success of our error messages we can define error focused design kpis and track them over time these could include the average number of mistakes in a user journey the error recovery time the completion rates and completion times we can t really eliminate mistakes altogether since no human input can be bulletproof but we can reduce the number of errors by making it more difficult to make mistakes one simple way of doing so is to improve the discovery errors by never relying on the color of error messages alone never rely on red color alone when we think of error messages we almost subconsciously think of bold red text errors that s indeed a very established pattern but often not enough to indicate to all users that something is wrong just a regular plain error message red and bold as in use on gov uk large preview due to color vision deficiencies it s a good idea to always complement error messages with an icon e g a large exclamation mark on a red background right next to the error message we can also highlight the entire section along with the field label the hint the error message and the input field for example a thick red vertical line next to the error message is a common pattern for error messages on gov uk always a good idea adding an icon and a thick vertical line for the entire section large preview sometimes the icon is displayed inside of the input field on the right or on the left edge of the text box when we display the icon on the right users who zoom in and out might have difficulties spotting them that s why placing the icon on the left edge seems to be just a bit more reliable example of an icon displayed on the right edge of the text box from carbon design system large preview additionally it might be a good idea to guide users towards specific issues of the form with an error summary that summary can contain links to the areas in the form which contain errors so users can jump there directly the summary can appear on the top of the page or just above the action button as displayed in the example above most importantly error summary probably shouldn t appear under the action button too often especially on mobile users don t realize that there is any error message at all and keep clicking on that poor submit button hoping to get any kind of feedback be it a status update from the browser or a change of the url the feedback is actually there under the button yet in testing it often shows very poor discovery rates if the page is fully refreshed upon validation the error summary should be at the very top of the page but if the page is updated without a refresh it s reasonable to add the error summary just above the action button where the user has just clicked or tapped and highlight it with the red color and icon as well", "source_text": "Error messages need to be easy to spot, but they also need to be helpful. Let’s explore when error messages should live above input fields and why toast error messages are usually not a very good idea.\n\nWhen we design interfaces, we rarely think about error messages first. After all, how much is there to design anyway? We highlight the error, display a message, and nudge users toward the correct input. As it turns out, a strategic and thorough design of these messages can be critical for businesses, especially if they struggle with high abandonment. Error messages can make or break the experience in situations when things go south.\n\nErrors are everywhere, and so are error messages. They are of course common in web forms, but also in complex tables, incompatible filters, search queries and failed interactions. They can be small error notes and large error summaries; short tooltips and lengthy toast messages. So, where do we start? From the beginning.\n\nPssst! This article is part of our ongoing series on design patterns. It’s also a part of Smart Interface Design Patterns 🍣 and is available in the Live Interface Design Training 🍕 as well.\n\nNot All Error Messages Are Equal #\n\nNot all errors are the same. As Page Laubheimer has noted, there are actually two different types of errors. Slips occur when users intend to perform one action but do another (e.g., when filling in a form on autopilot). Mistakes occur when there is a mismatch between the mental model of a user and the system. Our interfaces need to support both types of errors, and slips are usually much easier to resolve than mistakes.\n\nError messages come in various flavours: they could be slips (unconscious) or actual mistakes (conscious). (Large preview)\n\nFor slips, we can include helpful constraints (e.g. a reasonable width of a text box, prefixes and suffixes), provide recovery suggestions (e.g. autocomplete), choose reasonable defaults, and use forgiving formatting.\n\nTo prevent mistakes, we need to confirm destructive actions (when users go back to the previous page), set expectations early on (password requirements or file size), allow users to change their minds (change email or payment method), and in general, always provide a way out.\n\nTo measure the success of our error messages, we can define error-focused design KPIs and track them over time. These could include:\n\nthe average number of mistakes in a user journey,\nthe error recovery time,\nthe completion rates, and – completion times.\n\nWe can’t really eliminate mistakes altogether since no human input can be bulletproof, but we can reduce the number of errors by making it more difficult to make mistakes. One simple way of doing so is to improve the discovery errors, by never relying on the color of error messages alone.\n\nNever Rely On Red Color Alone #\n\nWhen we think of error messages, we almost subconsciously think of bold red text errors. That’s indeed a very established pattern, but often not enough to indicate to all users that something is wrong.\n\nJust a regular plain error message: red and bold. As in use on Gov.uk. (Large preview)\n\nDue to color vision deficiencies, it’s a good idea to always complement error messages with an icon, e.g., a large exclamation mark on a red background — right next to the error message. We can also highlight the entire section, along with the field, label, the hint, the error message and the input field. For example, a thick red vertical line next to the error message is a common pattern for error messages on Gov.uk.\n\nAlways a good idea: adding an icon and a thick vertical line for the entire section. (Large preview)\n\nSometimes the icon is displayed inside of the input field, on the right or on the left edge of the text box. When we display the icon on the right, users who zoom in and out might have difficulties spotting them. That’s why placing the icon on the left edge seems to be just a bit more reliable.\n\nExample of an icon displayed on the right edge of the text box. From Carbon Design System. (Large preview)\n\nAdditionally, it might be a good idea to guide users towards specific issues of the form with an error summary. That summary can contain links to the areas in the form which contain errors, so users can jump there directly.\n\nThe summary can appear on the top of the page, or just above the action button, as displayed in the example above.\n\nMost importantly, error summary probably shouldn’t appear under the action button. Too often, especially on mobile, users don’t realize that there is any error message at all, and keep clicking on that poor submit button hoping to get any kind of feedback — be it a status update from the browser, or a change of the URL. The feedback is actually there, under the button, yet in testing, it often shows very poor discovery rates.\n\nIf the page is fully refreshed upon validation, the error summary should be at the very top of the page. But if the page is updated without a refresh, it’s reasonable to add the error summary just above the action button where the user has just clicked or tapped — and highlight it with the red color and icon as well.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Error messages need to be easy to spot, but they also need t — Never Rely On Red Color Alone", "source_line_range": [ 1, 48 ] }, { "id": "body-region-2", "text": "avoid auto scrolling and auto jumps once a user clicks on the submit button should we automatically scroll them to the first error there is no clear answer to that question personally i saw this pattern working very well for some users but failing miserably for others any sudden movements on the page are likely to cause frustration with at least some users if anything users tend to find auto jumps more annoying than auto scrolling as the latter at least communicates the direction of change and hints better at where users have moved to short answer start without auto scrolling and display just an error summary with links if it s too slow or doesn t work as expected consider adding auto scrolling and by no means move users up and down the page for no obvious reason that s a safe way to increase completion times and introduce confusion when it s probably not needed never cover user s input when we display error messages we convey to users that there is a problem a good error message however also guides users to a solution this however requires the ability to consult the error as the error is being fixed in other words users should be able to edit the input field while also reviewing the error message s provided to them inline editing and validation in tables a typical example large preview so far so good however things become quite complicated once we also have a tooltip in play once a tooltip is open users might lose sight of both the error message and the input should they desire to be able to see all three pieces of information at once they d be out of luck when a tooltip blocks the content an example from the carbon design system however we can fix it relatively easily first of all we avoid tooltips that open on hover and display the tooltip only once tapped or clicked that means that a tooltip will never disappear automatically and must be closed manually then we use the details component and inline accordions as an alternative to tooltips hence we make space for the content of the tooltip to expand between the label and the other content so nothing will be covered the error message would be visible at all times as well next to the input field the details component with the details appearing on tap click large preview this way we show all three pieces of information at the same time and users always have a choice to select what exactly they d like to see is it too much maybe but that s a great option to keep in mind at least to always display the input field and the error at the same time without them being covered by the tooltip in forms display error messages above input now this might sound a little bit confusing at first usually error messages will be sitting conveniently under the input field or perhaps less frequently on the right side of the input field as it turns out there are a few accessibility issues that come as a cost of these conventions users of a magnifying software might miss the error message when it s located on the right on mobile users might not be able to see the error message under the input because it will be covered by the virtual keyboard when editing input error messages might be covered by the browser s autofill or dropdown s autocomplete suggestions we can avoid accessibility issues by displaying errors above erroneous input fields large preview displaying error messages above input fields typically helps us avoid the accessibility issues listed above the cost of it though is layout shifts with every new error appearing dynamically the entire form has to shift vertically as we need to make space for the error message to appear it might be noisy but sometimes that noise might be very much worth it for lengthy error messages it might sound tempting to display them as a tooltip yet with it come all the usability issues discussed in the previous section using a collapsible accordion instead might be a better idea there", "source_text": "Avoid Auto-Scrolling And Auto-Jumps #\n\nOnce a user clicks on the submit button, should we automatically scroll them to the first error? There is no clear answer to that question. Personally, I saw this pattern working very well for some users, but failing miserably for others.\n\nAny sudden movements on the page are likely to cause frustration with at least some users. If anything, users tend to find auto-jumps more annoying than auto-scrolling — as the latter at least communicates the direction of change and hints better at where users have moved to.\n\nShort answer? Start without auto-scrolling and display just an error summary with links. If it’s too slow, or doesn’t work as expected, consider adding auto-scrolling. And by no means move users up and down the page for no obvious reason — that’s a safe way to increase completion times and introduce confusion when it’s probably not needed.\n\nNever Cover User’s Input #\n\nWhen we display error messages, we convey to users that there is a problem; a good error message, however, also guides users to a solution. This, however, requires the ability to consult the error as the error is being fixed. In other words, users should be able to edit the input field while also reviewing the error message(s) provided to them.\n\nInline editing and validation in tables. A typical example. (Large preview)\n\nSo far, so good. However, things become quite complicated once we also have a tooltip in play. Once a tooltip is open, users might lose sight of both the error message and the input. Should they desire to be able to see all three pieces of information at once, they’d be out of luck.\n\nWhen a tooltip blocks the content, an example from the Carbon Design System.\n\nHowever, we can fix it relatively easily. First of all, we avoid tooltips that open on hover and display the tooltip only once tapped or clicked. That means that a tooltip will never disappear automatically and must be closed manually.\n\nThen, we use the details component and inline accordions as an alternative to tooltips. Hence, we make space for the content of the tooltip to expand between the label and the other content, so nothing will be covered. The error message would be visible at all times as well, next to the input field.\n\nThe details component, with the details appearing on tap/click. (Large preview)\n\nThis way, we show all three pieces of information at the same time — and users always have a choice to select what exactly they’d like to see. Is it too much? Maybe. But that’s a great option to keep in mind: at least to always display the input field and the error at the same time without them being covered by the tooltip.\n\nIn Forms, Display Error Messages Above Input #\n\nNow, this might sound a little bit confusing at first. Usually, error messages will be sitting conveniently under the input field, or perhaps — less frequently — on the right side of the input field. As it turns out, there are a few accessibility issues that come as a cost of these conventions.\n\nUsers of a magnifying software might miss the error message when it’s located on the right.\nOn mobile, users might not be able to see the error message under the input because it will be covered by the virtual keyboard.\nWhen editing input, error messages might be covered by the browser’s autofill or dropdown’s autocomplete suggestions.\n\nWe can avoid accessibility issues by displaying errors above erroneous input fields. (Large preview)\n\nDisplaying error messages above input fields typically helps us avoid the accessibility issues listed above. The cost of it, though, is layout shifts: with every new error appearing dynamically, the entire form has to shift vertically as we need to make space for the error message to appear. It might be noisy, but sometimes that noise might be very much worth it.\n\nFor lengthy error messages, it might sound tempting to display them as a tooltip, yet with it come all the usability issues discussed in the previous section. Using a collapsible accordion instead might be a better idea there.", "segmentation_method": "reviewed_source_semantics", "label": "Avoid Auto-Scrolling And Auto-Jumps — In Forms, Display Error Messages Above Input", "source_line_range": [ 49, 88 ] }, { "id": "body-region-3", "text": "in tables display error messages inline when displaying error messages in tables it might be a good idea to consider alternative approaches as otherwise we would end up with a lot of layout shifts for each row one of the simpler patterns is to display the error message in the same row where the content lives in that case the error message is more likely to live under the input field not above it lengthy error messages could be collapsed and expanded with a tap click on the entire row error messages could live in the same row where the erroneous content lives source ux design world large preview if the same error affects multiple rows we might want to highlight the rows that contain errors and display an error message at the very top of the page that would explain the error and what needs to be done to fix it if an error appears multiple times and its simple to explain it might be a good idea to show it on the very top of the page image source ux design world large preview don t rely on toast error messages but what about good ol toast error messages those animated notifications informing users about change of status of the system with floating messages they might be uncommon for forms but they frequently appear in tables and enterprise dashboards the world of toast notifications seb group design system large preview there are a few common usability issues with toast error messages users often don t get a chance to fully read or understand the error message before it has disappeared and there is no way to restore it or keep it floating toast messages typically appear on the edges of the screen and usually it s quite far away from the problematic input that has caused the error there is quite a disconnect between the error message and the input and it s rarely possible to read the error message and correct the mistake simultaneously lengthy toast messages usually block large areas of content that a user might be relying on and potentially even the input that has caused the error toast messages need to be announced to screen reader users while also allowing users to bring their focus back and forth between the error message and the erroneous input with toasts we usually don t have enough space to provide a detailed help using images or videos and have to rely on plain text and links leading to external help pages that would usually open in a new tab this might not be ideal error messages appearing as toasts in complex uis large preview if anything toasts should be persistent if displaying information that can be acted upon and users should be able to manually dismiss the notification personally i d definitely stay away from designing error messages as toasts even if they are persistent the better we can connect an error with its cause visually the less likely it is to be overlooked and the better we can explain how to solve that error close to the erroneous input box the faster users will understand what they need to do allow users to override an error message we ve all been there before full of hope and passion you type in your shipping address in an ecommerce checkout willing to proceed with payment right away yet here it comes an aggressive address validator telling you that your address is wrong and you better double check it you have been living at that address for the last five years yet for some reason that s not good enough for the address validator what options do you have unless you are willing to deliver the item to another address this problem will likely cause a 100 abandonment an extremely high price to pay for a poor address validator surely you don t want to deliver an item to non existing addresses yet you don t want to abandon customers either indeed it might be that only a small portion of customers will be affected by it but why should we lose these customers either what happens if the validator doesn t know the address we can allow users to override validator in some cases large preview no single validation library is 100 reliable and bulletproof for all the edge cases eventually some percentage of your customers will be left out there in the woods trying to figure out what to do next to proceed aggressive validators cost money especially when they come in tandem with disabled buttons that literally block users without telling them what exactly needs to be done to fix the issue for cases when a validator might be too restrictive we can allow customers to override validator s warning surely we will get some wrong addresses as a result of that but as a business we need to measure just how much money we are losing due to increase in service desk inquiries vs how much money we gain by allowing people to find a way to proceed even although the interface doesn t want to play along more often than not it s worth it while this pattern works flawlessly for address input and telephone input it probably won t work for any input that needs to follow a particular convention such as the length and checksum of an iban number or a credit card number there instead of giving customers a carte blanche we need to meticulously check user s input and guide them towards what exactly the problem seems to be", "source_text": "In Tables, Display Error Messages Inline #\n\nWhen displaying error messages in tables, it might be a good idea to consider alternative approaches as otherwise we would end up with a lot of layout shifts for each row.\n\nOne of the simpler patterns is to display the error message in the same row where the content lives. In that case, the error message is more likely to live under the input field, not above it. Lengthy error messages could be collapsed and expanded with a tap/click on the entire row.\n\nError messages could live in the same row where the erroneous content lives. Source: UX Design World. (Large preview)\n\nIf the same error affects multiple rows, we might want to highlight the rows that contain errors and display an error message at the very top of the page that would explain the error and what needs to be done to fix it.\n\nIf an error appears multiple times, and its simple to explain, it might be a good idea to show it on the very top of the page. Image source: UX Design World. (Large preview)\n\nDon’t Rely On Toast Error Messages #\n\nBut what about good ol’ toast error messages? Those animated notifications, informing users about change of status of the system with floating messages. They might be uncommon for forms, but they frequently appear in tables and enterprise dashboards.\n\nThe world of toast notifications. Seb Group Design System. (Large preview)\n\nThere are a few common usability issues with toast error messages:\n\nUsers often don’t get a chance to fully read or understand the error message before it has disappeared, and there is no way to restore it or keep it floating.\nToast messages typically appear on the edges of the screen, and usually, it’s quite far away from the problematic input that has caused the error. There is quite a disconnect between the error message and the input, and it’s rarely possible to read the error message and correct the mistake simultaneously.\nLengthy toast messages usually block large areas of content that a user might be relying on — and potentially even the input that has caused the error.\nToast messages need to be announced to screen reader users while also allowing users to bring their focus back and forth between the error message and the erroneous input.\nWith toasts, we usually don’t have enough space to provide a detailed help using images or videos, and have to rely on plain text and links leading to external help pages that would usually open in a new tab.\n\nThis might not be ideal: error messages appearing as toasts in complex UIs. (Large preview)\n\nIf anything, toasts should be persistent if displaying information that can be acted upon, and users should be able to manually dismiss the notification.\n\nPersonally, I’d definitely stay away from designing error messages as toasts, even if they are persistent. The better we can connect an error with its cause visually, the less likely it is to be overlooked. And the better we can explain how to solve that error close to the erroneous input box, the faster users will understand what they need to do.\n\nAllow Users To Override An Error Message #\n\nWe’ve all been there before: full of hope and passion, you type in your shipping address in an eCommerce checkout, willing to proceed with payment right away. Yet here it comes, an aggressive address validator, telling you that your address is wrong, and you better double check it. You have been living at that address for the last five years, yet for some reason, that’s not good enough for the address validator.\n\nWhat options do you have? Unless you are willing to deliver the item to another address, this problem will likely cause a 100% abandonment — an extremely high price to pay for a poor address validator. Surely you don’t want to deliver an item to non-existing addresses, yet you don’t want to abandon customers either. Indeed, it might be that only a small portion of customers will be affected by it, but why should we lose these customers either?\n\nWhat happens if the validator doesn’t know the address? We can allow users to override validator in some cases. (Large preview)\n\nNo single validation library is 100% reliable and bulletproof for all the edge cases. Eventually some percentage of your customers will be left out there in the woods, trying to figure out what to do next to proceed. Aggressive validators cost money. Especially when they come in tandem with disabled buttons that literally block users without telling them what exactly needs to be done to fix the issue.\n\nFor cases when a validator might be too restrictive, we can allow customers to override validator’s warning. Surely we will get some wrong addresses as a result of that. But as a business, we need to measure just how much money we are losing due to increase in service desk inquiries vs. how much money we gain by allowing people to find a way to proceed even although the interface doesn’t want to play along. More often than not, it’s worth it.\n\nWhile this pattern works flawlessly for address input and telephone input, it probably won’t work for any input that needs to follow a particular convention — such as the length and checksum of an IBAN number or a credit card number. There, instead of giving customers a carte blanche, we need to meticulously check user’s input and guide them towards what exactly the problem seems to be.", "segmentation_method": "reviewed_source_semantics", "label": "In Tables, Display Error Messages Inline — Allow Users To Override An Error Message", "source_line_range": [ 89, 134 ] }, { "id": "body-region-4", "text": "establish stop words for your error messages many error messages in most web applications are remarkably generic they do indicate errors but they aren t very helpful in indicating solutions on how to fix these errors most of the time these messages don t really refer to the specifics of the user s input they provide a very general statement explaining that the input is wrong with plenty of floral and cryptic words along with it in my personal experience starting a project off by exploring and defining error messaging can be a very valuable exercise if we can convey friendliness and personality while being concise and helpful in our error messages we should surely be able to achieve the same in our navigation body copy and form labels in many ways the way we write error messages can help us figure out just the right voice and tone of the entire design no technical jargon no cryptic wording nothing left to interpretation we just explain the problem large preview depending on your product s voice and tone you might want to be very strategic about how your error messages should sound here are some of the stop words that gov uk tends to avoid in their interface technical jargon like form post error unspecified error and error 0x0000000643 words like forbidden illegal you forgot and prohibited please because it implies a choice sorry because it does not help fix the problem valid and invalid because they do not add anything to the message humourous informal language like oops the choice of words matters it s worth emphasizing that spending time and effort on crafting helpful adaptive error messages is probably one of the best investments a company might make to reduce abandonment and drive conversions provide examples of correct input talking about the choice of words how do we make it more helpful and in general what makes an error message helpful for example a clear set of guidelines of what a correct input is that means adding a hint under the label and provide an example of correct input so users understand how to re route and what is expected from them there is no need to include words that don t help the user fix the problem instead we can provide helpful actionable hints and input examples large preview providing example along with a helpful error message can go a long way to significantly reduce abandonment large preview surely sometimes adding an example might feel unnecessary and just taking up the space in design i d challenge you to tackle your conversion issues with well crafted examples of corrent input often it s the easiest way to improve conversion as users otherwise just can t find a way to make something work even if it s as simple as an extra empty space", "source_text": "Establish Stop-Words For Your Error Messages #\n\nMany error messages in most web applications are remarkably generic. They do indicate errors, but they aren’t very helpful in indicating solutions on how to fix these errors. Most of the time, these messages don’t really refer to the specifics of the user’s input. They provide a very general statement explaining that the input is wrong, with plenty of floral and cryptic words along with it.\n\nIn my personal experience, starting a project off by exploring and defining error messaging can be a very valuable exercise. If we can convey friendliness and personality while being concise and helpful in our error messages, we should surely be able to achieve the same in our navigation, body copy and form labels. In many ways, the way we write error messages can help us figure out just the right voice and tone of the entire design.\n\nNo technical jargon, no cryptic wording, nothing left to interpretation: we just explain the problem. (Large preview)\n\nDepending on your product’s voice and tone, you might want to be very strategic about how your error messages should sound. Here are some of the stop-words that Gov.uk tends to avoid in their interface:\n\ntechnical jargon like ‘form post error’, ‘unspecified error’, and ‘error 0x0000000643’;\nwords like ‘forbidden’, ‘illegal’, ‘you forgot’, and ‘prohibited’;\n‘please’ because it implies a choice;\n‘sorry’ because it does not help fix the problem;\n‘valid’ and ‘invalid’ because they do not add anything to the message;\nhumourous, informal language like ‘oops’.\n\nThe choice of words matters. It’s worth emphasizing that spending time and effort on crafting helpful, adaptive error messages is probably one of the best investments a company might make to reduce abandonment and drive conversions.\n\nProvide Examples Of Correct Input #\n\nTalking about the choice of words, how do we make it more helpful? And in general, what makes an error message helpful? For example, a clear set of guidelines of what a correct input is. That means adding a hint under the label and provide an example of correct input, so users understand how to re-route and what is expected from them.\n\nThere is no need to include words that don’t help the user fix the problem. Instead, we can provide helpful, actionable hints and input examples. (Large preview)\n\nProviding example along with a helpful error message can go a long way to significantly reduce abandonment. (Large preview)\n\nSurely, sometimes adding an example might feel unnecessary and just taking up the space in design. I’d challenge you to tackle your conversion issues with well-crafted examples of corrent input. Often it’s the easiest way to improve conversion, as users otherwise just can’t find a way to make something work — even if it’s as simple as an extra empty space.", "segmentation_method": "reviewed_source_semantics", "label": "Establish Stop-Words For Your Error Messages — Provide Examples Of Correct Input", "source_line_range": [ 135, 163 ] }, { "id": "body-region-5", "text": "display error summary on the top inline validation deserves a separate conversation as an alternative approach of course we could validate the form on submit only but it doesn t mean that we have to drive users from one page to a separate new page with all the errors displayed we could display an error summary just next to the submit button as displayed below sketched by jordan moore it would probably be better to display the error message above the submit button rather than below it to prevent it from being rendered below the bottom of the viewport and thus not to be visible thanks rik an error message appearing next to submit button sketched by jordan moore large preview however if there are a few problems with the form we can also use an error summary component with it we highlight the errors as links so that users can jump to them via the keyboard as well while doing so we need to bring focus to the first form field with an error preferably with a bit of scroll margin top so screen reader users understand where they currently are error summary on the top single error messages within each input field from no style design system by adam silver large preview additionally you might want to adjust the favicon and the title of the document if errors do appear so impatient users who might have already left the form perhaps have a chance to return back and fix the errors rather than assuming that everything has worked flawlessly indicate to users that there are some pending problems with the form by changing the favicon and the title of the tab upon validation large preview wrapping up at the first glance dealing with error messages might not sound like a big deal however as we dive into fine details there are plenty of considerations that might either cause high abandonment or help people resolve issues quickly here s a quick overview of what we can do to improve the error messages ux in our websites and applications define error focused design kpis by measuring the average number of mistakes in a user journey the error recovery time the completion rates and completion times never rely on the color of the error message alone and use icons borders and section highlights to indicate erroneous input never cover user s input nor the error message ideally allow users to consult the error message the tooltip and their input at the same time e g by using inline accordions and avoiding tooltips for important details consider displaying error messages above input to avoid issues with auto fill autocomplete magnifying software and virtual keyboard use inline validation for password strength meters but not for validating every field as users type in consider breaking the form into small steps and validate each step only on submit for complex tables don t rely on toast error messages and display errors within rows where an error has occurred be strategic about your error messaging and craft helpful messages that match the voice and tone of your brand rather than being general and generic always provide examples of correct input especially for complex input that are less likely to be auto filled allow users to override your validators for address input and telephone input but not for any input that needs to follow a particular convention when validating on submit display an error summary on the top of the page or guide users to an error in a popover also change the favicon and the title of the document to communicate to users who ve already left that something went wrong with these guidelines we should be better off when boosting our error messages ux and if you can t really do much around the way errors appear in your product explore what you can do to replace generic error messages with helpful ones this might be a small change with a huge impact that will eventually show up in large business kpis dashboards meet smart interface design patterns if you are interested in similar insights around ux take a look at smart interface design patterns our shiny new 10h video course with 100s of practical examples from real life projects plenty of design patterns guidelines and a live ux training with 5 new segments added every year just sayin check a free preview meet smart interface design patterns our new video course and live ux training all around interface design ux jump to the video course 100 design patterns real life examples 10h video course live ux training free preview useful resources back button expectations baymard institute designing with the web in mind chloe sanderson designing a perfect configurator designing a perfect accordion designing a perfect infinite scroll designing a perfect feature comparison designing a perfect slider related articles how to design error states for mobile apps nick babich designing better tooltips for mobile user interfaces eric olive", "source_text": "Display Error Summary On The Top #\n\nInline validation deserves a separate conversation. As an alternative approach, of course we could validate the form on submit only. But it doesn’t mean that we have to drive users from one page to a separate new page with all the errors displayed. We could display an error summary just next to the Submit button (as displayed below, sketched by Jordan Moore). It would probably be better to display the error message above the Submit button rather than below it to prevent it from being rendered below the bottom of the viewport and thus not to be visible (thanks Rik!).\n\nAn error message appearing next to Submit button. Sketched by Jordan Moore. (Large preview)\n\nHowever, if there are a few problems with the form, we can also use an error summary component. With it, we highlight the errors as links so that users can jump to them via the keyboard as well. While doing so, we need to bring focus to the first form field with an error. Preferably with a bit of scroll-margin-top, so screen reader users understand where they currently are.\n\nError summary on the top, single error messages within each input field. From No Style Design System by Adam Silver. (Large preview)\n\nAdditionally, you might want to adjust the favicon and the title of the document if errors do appear, so impatient users who might have already left the form perhaps have a chance to return back and fix the errors, rather than assuming that everything has worked flawlessly.\n\nIndicate to users that there are some pending problems with the form by changing the favicon and the title of the tab upon validation. (Large preview)\n\nWrapping Up #\n\nAt the first glance, dealing with error messages might not sound like a big deal. However, as we dive into fine details, there are plenty of considerations that might either cause high abandonment or help people resolve issues quickly.\n\nHere’s a quick overview of what we can do to improve the Error Messages UX in our websites and applications:\n\nDefine error-focused design KPIs by measuring the average number of mistakes in a user journey, the error recovery time, the completion rates, and completion times.\nNever rely on the color of the error message alone, and use icons, borders, and section highlights to indicate erroneous input.\nNever cover user’s input nor the error message. Ideally, allow users to consult the error message, the tooltip, and their input at the same time, e.g., by using inline accordions and avoiding tooltips for important details.\nConsider displaying error messages above input to avoid issues with auto-fill, autocomplete, magnifying software, and virtual keyboard.\nUse inline validation for password strength meters, but not for validating every field as users type in. Consider breaking the form into small steps and validate each step only on submit.\nFor complex tables, don’t rely on toast error messages and display errors within rows where an error has occurred.\nBe strategic about your error messaging and craft helpful messages that match the voice and tone of your brand, rather than being general and generic.\nAlways provide examples of correct input, especially for complex input that are less likely to be auto-filled.\nAllow users to override your validators for address input and telephone input, but not for any input that needs to follow a particular convention.\nWhen validating on submit, display an error summary on the top of the page, or guide users to an error in a popover. Also, change the favicon and the title of the document to communicate to users who’ve already left that something went wrong.\n\nWith these guidelines, we should be better off when boosting our error messages UX. And if you can’t really do much around the way errors appear in your product, explore what you can do to replace generic error messages with helpful ones. This might be a small change with a huge impact that will eventually show up in large business KPIs dashboards.\n\nMeet “Smart Interface Design Patterns” #\n\nIf you are interested in similar insights around UX, take a look at Smart Interface Design Patterns, our shiny new 10h-video course with 100s of practical examples from real-life projects. Plenty of design patterns, guidelines and a live UX training — with 5 new segments added every year. Just sayin’! Check a free preview.\n\nMeet Smart Interface Design Patterns, our new video course and live UX training all around interface design & UX.\n\nJump to the video course →\n\n100 design patterns & real-life examples.\n10h-video course + live UX training. Free preview.\n\nUseful Resources #\n\nBack Button Expectations, Baymard Institute\nDesigning With the Web in Mind, Chloe Sanderson\nDesigning A Perfect Configurator\nDesigning A Perfect Accordion\nDesigning A Perfect Infinite Scroll\nDesigning A Perfect Feature Comparison\nDesigning A Perfect Slider\n\nRELATED ARTICLES #\n\n“How To Design Error States For Mobile Apps”, Nick Babich\n“Designing Better Tooltips For Mobile User Interfaces”, Eric Olive", "segmentation_method": "reviewed_source_semantics", "label": "Display Error Summary On The Top — Useful Resources", "source_line_range": [ 164, 221 ] } ], "ending": { "text": "bile Apps”, Nick Babich\n“Designing Better Tooltips For Mobile User Interfaces”, Eric Olive" } } }, { "id": "article-068", "name": "Responsive Web Design", "url": "https://alistapart.com/article/responsive-web-design/?no_head=1", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Responsive Web Design" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Ethan Marcotte" ] }, { "id": "stable-3", "alternatives": [ "Issue № 306" ] }, { "id": "stable-4", "alternatives": [ "CSS" ] }, { "id": "stable-5", "alternatives": [ "Interaction Design" ] }, { "id": "stable-6", "alternatives": [ "Layout & Grids" ] }, { "id": "stable-7", "alternatives": [ "Mobile/Multidevice" ] }, { "id": "stable-8", "alternatives": [ "Responsive Design" ] }, { "id": "stable-9", "alternatives": [ "For people who make websites" ] }, { "id": "stable-10", "alternatives": [ "HOME" ] }, { "id": "stable-11", "alternatives": [ "ARTICLES" ] }, { "id": "stable-12", "alternatives": [ "EVENTS" ] }, { "id": "stable-13", "alternatives": [ "TOPICS" ] }, { "id": "stable-14", "alternatives": [ "WRITE FOR US" ] }, { "id": "stable-15", "alternatives": [ "SEARCH FOR:" ] }, { "id": "stable-16", "alternatives": [ "Article Continues Below" ] }, { "id": "stable-17", "alternatives": [ "Share this:" ] }, { "id": "stable-18", "alternatives": [ "Become a patron" ] }, { "id": "stable-19", "alternatives": [ "Translations" ] }, { "id": "stable-20", "alternatives": [ "French" ] }, { "id": "stable-21", "alternatives": [ "Czech" ] }, { "id": "stable-22", "alternatives": [ "Spanish" ] }, { "id": "stable-23", "alternatives": [ "Lithuanian" ] }, { "id": "stable-24", "alternatives": [ "Portugese" ] }, { "id": "stable-25", "alternatives": [ "German" ] }, { "id": "stable-26", "alternatives": [ "About the Author" ] }, { "id": "stable-27", "alternatives": [ "MORE FROM THIS AUTHOR" ] }, { "id": "stable-28", "alternatives": [ "Get our latest articles in your inbox." ] }, { "id": "stable-29", "alternatives": [ "Sign up for email alerts" ] }, { "id": "stable-30", "alternatives": [ "Reader Comments" ] }, { "id": "stable-31", "alternatives": [ "Comments navigation" ] }, { "id": "stable-32", "alternatives": [ "Older comments" ] }, { "id": "stable-33", "alternatives": [ "GOT SOMETHING TO SAY?" ] }, { "id": "stable-34", "alternatives": [ "We have turned off comments, but you can see what folks had to say before we did so." ] }, { "id": "stable-35", "alternatives": [ "More from ALA" ] }, { "id": "stable-36", "alternatives": [ "About" ] }, { "id": "stable-37", "alternatives": [ "Authors" ] }, { "id": "stable-38", "alternatives": [ "Masthead" ] }, { "id": "stable-39", "alternatives": [ "Style Guide" ] }, { "id": "stable-40", "alternatives": [ "Contact" ] }, { "id": "stable-41", "alternatives": [ "Sponsorships" ] }, { "id": "stable-42", "alternatives": [ "Follow us:" ] }, { "id": "stable-43", "alternatives": [ "RSS" ] }, { "id": "stable-44", "alternatives": [ "Email" ] }, { "id": "stable-45", "alternatives": [ "Facebook" ] }, { "id": "stable-46", "alternatives": [ "Twitter" ] }, { "id": "stable-47", "alternatives": [ "Designed with WordPress." ] }, { "id": "stable-48", "alternatives": [ "Hosted by Pressable." ] }, { "id": "stable-49", "alternatives": [ "Permissions & Copyright" ] }, { "id": "stable-50", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-51", "alternatives": [ "Fonts by Webtype" ] }, { "id": "stable-52", "alternatives": [ "An Event Apart" ] }, { "id": "stable-53", "alternatives": [ "A Book Apart" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete first-automatic-load article reviewed through accessibility, rendered DOM boundaries and saved viewport evidence; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Responsive Web Design" ], "html_selector": "h1.entry-title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#comments li.pingback", "author_selector": ".comment-body > a.url", "body_selector": ".comment-body", "id_attribute": "id", "section_markers": [ "Reader Comments", "Comments" ], "version": 2, "minimum_comments": 11, "text_scope": { "body_end": "n offers us a way forward, finally allowing us to “design for the ebb and flow of things.”", "end_markers": [ "Comments navigation", "Got something to say?", "More from ALA" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-068/comment-qualification-reference-r5.json", "sha256": "3cf34ce94f342c30ddaf2873b3c62e0f589ab3d71f3a3715e907ef515a66677b", "chars": 4364, "record_count": 13 }, "comment_presence_review": { "status": "visible_text", "basis": "Thirteen initially displayed pingbacks are discussion entries with linked source identities and visible Pingback text. They count as textual discussion records, without requiring a human username.", "observed_record_count": 13, "qualification_only": true } }, "ground_truth_main_content": "The control which designers know in the print medium, and often desire in the web medium, is simply a function of the limitation of the printed page. We should embrace the fact that the web doesn’t have the same constraints, and design for this flexibility. But first, we must 'accept the ebb and flow of things.'\n\nJohn Allsopp, “A Dao of Web Design”\n\nThe English architect Christopher Wren once quipped that his chosen field “aims for Eternity,” and there’s something appealing about that formula: Unlike the web, which often feels like aiming for next week, architecture is a discipline very much defined by its permanence.\n\nA building’s foundation defines its footprint, which defines its frame, which shapes the facade. Each phase of the architectural process is more immutable, more unchanging than the last. Creative decisions quite literally shape a physical space, defining the way in which people move through its confines for decades or even centuries.\n\nWorking on the web, however, is a wholly different matter. Our work is defined by its transience, often refined or replaced within a year or two. Inconsistent window widths, screen resolutions, user preferences, and our users’ installed fonts are but a few of the intangibles we negotiate when we publish our work, and over the years, we’ve become incredibly adept at doing so.\n\nBut the landscape is shifting, perhaps more quickly than we might like. Mobile browsing is expected to outpace desktop-based access within three to five years. Two of the three dominant video game consoles have web browsers (and one of them is quite excellent). We’re designing for mice and keyboards, for T9 keypads, for handheld game controllers, for touch interfaces. In short, we’re faced with a greater number of devices, input modes, and browsers than ever before.\n\nIn recent years, I’ve been meeting with more companies that request “an iPhone website” as part of their project. It’s an interesting phrase: At face value, of course, it speaks to mobile WebKit’s quality as a browser, as well as a powerful business case for thinking beyond the desktop. But as designers, I think we often take comfort in such explicit requirements, as they allow us to compartmentalize the problems before us. We can quarantine the mobile experience on separate subdomains, spaces distinct and separate from “the non-iPhone website.” But what’s next? An iPad website? An N90 website? Can we really continue to commit to supporting each new user agent with its own bespoke experience? At some point, this starts to feel like a zero sum game. But how can we—and our designs—adapt?\n\nA flexible foundation\n\nLet’s consider an example design. I’ve built a simple page for a hypothetical magazine; it’s a straightforward two-column layout built on a fluid grid, with not a few flexible images peppered throughout. As a long-time proponent of non-fixed layouts, I’ve long felt they were more “future proof” simply because they were layout agnostic. And to a certain extent, that’s true: flexible designs make no assumptions about a browser window’s width, and adapt beautifully to devices that have portrait and landscape modes.\n\nHuge images are huge. Our layout, flexible though it is, doesn’t respond well to changes in resolution or viewport size.\n\nBut no design, fixed or fluid, scales seamlessly beyond the context for which it was originally intended. The example design scales perfectly well as the browser window resizes, but stress points quickly appear at lower resolutions. When viewed at viewport smaller than 800×600, the illustration behind the logo quickly becomes cropped, navigation text can wrap in an unseemly manner, and the images along the bottom become too compact to appear legible. And it’s not just the lower end of the resolution spectrum that’s affected: when viewing the design on a widescreen display, the images quickly grow to unwieldy sizes, crowding out the surrounding context.\n\nIn short, our flexible design works well enough in the desktop-centric context for which it was designed, but isn’t optimized to extend far beyond that.\n\nBecoming responsive\n\nRecently, an emergent discipline called “responsive architecture” has begun asking how physical spaces can respond to the presence of people passing through them. Through a combination of embedded robotics and tensile materials, architects are experimenting with art installations and wall structures that bend, flex, and expand as crowds approach them. Motion sensors can be paired with climate control systems to adjust a room’s temperature and ambient lighting as it fills with people. Companies have already produced “smart glass technology” that can automatically become opaque when a room’s occupants reach a certain density threshold, giving them an additional layer of privacy.\n\nIn their book Interactive Architecture, Michael Fox and Miles Kemp described this more adaptive approach as “a multiple-loop system in which one enters into a conversation; a continual and constructive information exchange.” Emphasis mine, as I think that’s a subtle yet powerful distinction: rather than creating immutable, unchanging spaces that define a particular experience, they suggest inhabitant and structure can—and should—mutually influence each other.\n\nThis is our way forward. Rather than tailoring disconnected designs to each of an ever-increasing number of web devices, we can treat them as facets of the same experience. We can design for an optimal viewing experience, but embed standards-based technologies into our designs to make them not only more flexible, but more adaptive to the media that renders them. In short, we need to practice responsive web design. But how?\n\nMeet the media query\n\nSince the days of CSS 2.1, our style sheets have enjoyed some measure of device awareness through media types. If you’ve ever written a print style sheet, you’re already familiar with the concept:\n\n\n\n\nIn the hopes that we’d be designing more than neatly formatted page printouts, the CSS specification supplied us with a bevy of acceptable media types, each designed to target a specific class of web-ready device. But most browsers and devices never really embraced the spirit of the specification, leaving many media types implemented imperfectly, or altogether ignored.\n\nThankfully, the W3C created media queries as part of the CSS3 specification, improving upon the promise of media types. A media query allows us to target not only certain device classes, but to actually inspect the physical characteristics of the device rendering our work. For example, following the recent rise of mobile WebKit, media queries became a popular client-side technique for delivering a tailored style sheet to the iPhone, Android phones, and their ilk. To do so, we could incorporate a query into a linked style sheet’s media attribute:\n\n\n\nThe query contains two components:\n\na media type (screen), and\nthe actual query enclosed within parentheses, containing a particular media feature (max-device-width) to inspect, followed by the target value (480px).\n\nIn plain English, we’re asking the device if its horizontal resolution (max-device-width) is equal to or less than 480px. If the test passes—in other words, if we’re viewing our work on a small-screen device like the iPhone—then the device will load shetland.css. Otherwise, the link is ignored altogether.\n\nDesigners have experimented with resolution-aware layouts in the past, mostly relying on JS-driven solutions like Cameron Adams’ excellent script. But the media query specification provides a host of media features that extends far beyond screen resolution, vastly widening the scope of what we can test for with our queries. What’s more, you can test multiple property values in a single query by chaining them together with the and keyword:\n\n\n\nFurthermore, we’re not limited to incorporating media queries in our links. We can include them in our CSS either as part of a @media rule:\n\n@media screen and (max-device-width: 480px) {\n .column {\n float: none;\n }\n}\n\nOr as part of an @import directive:\n\n@import url(\"shetland.css\") screen and (max-device-width: 480px);\n\nBut in each case, the effect is the same: If the device passes the test put forth by our media query, the relevant CSS is applied to our markup. Media queries are, in short, conditional comments for the rest of us. Rather than targeting a specific version of a specific browser, we can surgically correct issues in our layout as it scales beyond its initial, ideal resolution.\n\nAdapt, respond, and overcome\n\nLet’s turn our attention to the images at the base of our page. In their default layout, the relevant CSS currently looks like this:\n\n.figure {\n float: left;\n margin: 0 3.317535545023696682% 1.5em 0; /* 21px / 633px */\n width: 31.121642969984202211%; /* 197px / 633px */\n}li#f-mycroft,\nli#f-winter {\n margin-right: 0;\n}\n\nI’ve omitted a number of typographic properties to focus on the layout: Each .figure element is sized at roughly one third of the containing column, with the right-hand margin zeroed out for the two pictures at the end of each row (li#f-mycroft, li#f-winter). And this works fairly well, until the viewport is either noticeably smaller or wider than our original design. With media queries, we can apply resolution-specific spotfixes, adapting our design to better respond to changes in the display.\n\nFirst of all, let’s linearize our page once the viewport falls below a certain resolution threshold—say, 600px. So at the bottom of our style sheet, let’s create a new @media block, like so:\n\n@media screen and (max-width: 600px) {\n .mast,\n .intro,\n .main,\n .footer {\n float: none;\n width: auto;\n }\n}\n\nIf you view our updated page in a modern desktop browser and reduce the size of your window below 600px, the media query will disable the floats on the design’s major elements, stacking each block atop each other in the document flow. So our miniaturized design is shaping up nicely, but the images still don’t scale down that intelligently. If we introduce another media query, we can alter their layout accordingly:\n\n@media screen and (max-width: 400px) {\n .figure,\n li#f-mycroft {\n margin-right: 3.317535545023696682%; /* 21px / 633px */\n width: 48.341232227488151658%; /* 306px / 633px */\n } li#f-watson,\n li#f-moriarty {\n margin-right: 0;\n }\n}\n\nOur figures can responsively change their layout to better suit smaller displays.\n\nDon’t mind the unsightly percentages; we’re simply recalculating the widths of the fluid grid to account for the newly linearized layout. In short, we’re moving from a three-column layout to a two-column layout when the viewport’s width falls below 400px, making the images more prominent.\n\nWe can actually take the same approach for widescreen displays, too. For larger resolutions, we could adopt a six-across treatment for our images, placing them all in the same row:\n\n@media screen and (min-width: 1300px) {\n .figure,\n li#f-mycroft {\n margin-right: 3.317535545023696682%; /* 21px / 633px */\n width: 13.902053712480252764%; /* 88px / 633px */\n }\n}\n\nNow our images are working beautifully at both ends of the resolution spectrum, optimizing their layout to changes in window widths and device resolution alike.\n\nBy specifying a wider min-width in a new media query, we can shift our images into a single row layout.\n\nBut this is only the beginning. Working from the media queries we’ve embedded in our CSS, we can alter much more than the placement of a few images: we can introduce new, alternate layouts tuned to each resolution range, perhaps making the navigation more prominent in a widescreen view, or repositioning it above the logo on smaller displays.\n\nBy designing responsively, we can not only linearize our content on smaller devices, but also optimize its presentation across a range of displays.\n\nBut a responsive design isn’t limited to layout changes. Media queries allow us to practice some incredibly precise fine-tuning as our pages reshape themselves: we can increase the target area on links for smaller screens, better complying with Fitts’ Law on touch devices; selectively show or hide elements that might enhance a page’s navigation; we can even practice responsive typesetting to gradually alter the size and leading of our text, optimizing the reading experience for the display providing it.\n\nA FEW TECHNICAL NOTES\n\nIt should be noted that media queries enjoy incredibly robust support among modern browsers. Desktop browsers such as Safari 3+, Chrome, Firefox 3.5+, and Opera 7+ all natively parse media queries, as do more recent mobile browsers such as Opera Mobile and mobile WebKit. Of course, older versions of those desktop browsers don’t support media queries. And while Microsoft has committed to media query support in IE9, Internet Explorer currently doesn’t offer a native implementation.\n\nHowever, if you’re interested in implementing legacy browser support for media queries, there’s a JavaScript-tinted silver lining:\n\nA jQuery plugin from 2007 offers somewhat limited media query support, implementing only the min-width and max-width media properties when attached to separate link elements.\nMore recently, css3-mediaqueries.js was released, a library that promises “to make IE 5+, Firefox 1+ and Safari 2 transparently parse, test, and apply CSS3 Media Queries” when included via @media blocks. While very much a 1.0 release, I’ve personally found it to be quite robust, and I plan to watch its development.\n\nBut if using JavaScript doesn’t appeal, that’s perfectly understandable. However, that strengthens the case for building your layout atop a flexible grid, ensuring your design enjoys some measure of flexibility in media query-blind browsers and devices.\n\nThe way forward\n\nFluid grids, flexible images, and media queries are the three technical ingredients for responsive web design, but it also requires a different way of thinking. Rather than quarantining our content into disparate, device-specific experiences, we can use media queries to progressively enhance our work within different viewing contexts. That’s not to say there isn’t a business case for separate sites geared toward specific devices; for example, if the user goals for your mobile site are more limited in scope than its desktop equivalent, then serving different content to each might be the best approach.\n\nBut that kind of design thinking doesn’t need to be our default. Now more than ever, we’re designing work meant to be viewed along a gradient of different experiences. Responsive web design offers us a way forward, finally allowing us to “design for the ebb and flow of things.”\n\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "the control which designers know in the print medium and often desire in the web medium is simply a function of the limitation of the printed page we should embrace the fact that the web doesn t have the same constraints and design for this flexibility but first we must accept the ebb and flow of things john allsopp a dao of web design the english architect christopher wren once quipped that his chosen field aims for eternity and there s something appealing about that formula unlike the web which often feels like aiming for next week architecture is a discipline very much defined by its permanence a building s foundation defines its footprint which defines its frame which shapes the facade each phase of the architectural process is more immutable more unchanging than the last creative decisions quite literally shape a physical space defining the way in which people move through its confines for decades or even centuries working on the web however is a wholly different matter our work is defined by its transience often refined or replaced within a year or two inconsistent window widths screen resolutions user preferences and our users installed fonts are but a few of the intangibles we negotiate when we publish our work and over the years we ve become incredibly adept at doing so but the landscape is shifting perhaps more quickly than we might like mobile browsing is expected to outpace desktop based access within three to five years two of the three dominant video game consoles have web browsers and one of them is quite excellent we re designing for mice and keyboards for t9 keypads for handheld game controllers for touch interfaces in short we re faced with a greater number of devices input modes and browsers than ever before in recent years i ve been meeting with more companies that request an iphone website as part of their project it s an interesting phrase at face value of course it speaks to mobile webkit s quality as a browser as well as a powerful business case for thinking beyond the desktop but as designers i think we often take comfort in such explicit requirements as they allow us to compartmentalize the problems before us we can quarantine the mobile experience on separate subdomains spaces distinct and separate from the non iphone website but what s next an ipad website an n90 website can we really continue to commit to supporting each new user agent with its own bespoke experience at some point this starts to feel like a zero sum game but how can we and our designs adapt", "source_text": "The control which designers know in the print medium, and often desire in the web medium, is simply a function of the limitation of the printed page. We should embrace the fact that the web doesn’t have the same constraints, and design for this flexibility. But first, we must 'accept the ebb and flow of things.'\n\nJohn Allsopp, “A Dao of Web Design”\n\nThe English architect Christopher Wren once quipped that his chosen field “aims for Eternity,” and there’s something appealing about that formula: Unlike the web, which often feels like aiming for next week, architecture is a discipline very much defined by its permanence.\n\nA building’s foundation defines its footprint, which defines its frame, which shapes the facade. Each phase of the architectural process is more immutable, more unchanging than the last. Creative decisions quite literally shape a physical space, defining the way in which people move through its confines for decades or even centuries.\n\nWorking on the web, however, is a wholly different matter. Our work is defined by its transience, often refined or replaced within a year or two. Inconsistent window widths, screen resolutions, user preferences, and our users’ installed fonts are but a few of the intangibles we negotiate when we publish our work, and over the years, we’ve become incredibly adept at doing so.\n\nBut the landscape is shifting, perhaps more quickly than we might like. Mobile browsing is expected to outpace desktop-based access within three to five years. Two of the three dominant video game consoles have web browsers (and one of them is quite excellent). We’re designing for mice and keyboards, for T9 keypads, for handheld game controllers, for touch interfaces. In short, we’re faced with a greater number of devices, input modes, and browsers than ever before.\n\nIn recent years, I’ve been meeting with more companies that request “an iPhone website” as part of their project. It’s an interesting phrase: At face value, of course, it speaks to mobile WebKit’s quality as a browser, as well as a powerful business case for thinking beyond the desktop. But as designers, I think we often take comfort in such explicit requirements, as they allow us to compartmentalize the problems before us. We can quarantine the mobile experience on separate subdomains, spaces distinct and separate from “the non-iPhone website.” But what’s next? An iPad website? An N90 website? Can we really continue to commit to supporting each new user agent with its own bespoke experience? At some point, this starts to feel like a zero sum game. But how can we—and our designs—adapt?", "segmentation_method": "reviewed_source_semantics", "label": "开篇:The control which designers know in the print medium, and of", "source_line_range": [ 1, 14 ] }, { "id": "body-region-2", "text": "a flexible foundation let s consider an example design i ve built a simple page for a hypothetical magazine it s a straightforward two column layout built on a fluid grid with not a few flexible images peppered throughout as a long time proponent of non fixed layouts i ve long felt they were more future proof simply because they were layout agnostic and to a certain extent that s true flexible designs make no assumptions about a browser window s width and adapt beautifully to devices that have portrait and landscape modes huge images are huge our layout flexible though it is doesn t respond well to changes in resolution or viewport size but no design fixed or fluid scales seamlessly beyond the context for which it was originally intended the example design scales perfectly well as the browser window resizes but stress points quickly appear at lower resolutions when viewed at viewport smaller than 800 600 the illustration behind the logo quickly becomes cropped navigation text can wrap in an unseemly manner and the images along the bottom become too compact to appear legible and it s not just the lower end of the resolution spectrum that s affected when viewing the design on a widescreen display the images quickly grow to unwieldy sizes crowding out the surrounding context in short our flexible design works well enough in the desktop centric context for which it was designed but isn t optimized to extend far beyond that becoming responsive recently an emergent discipline called responsive architecture has begun asking how physical spaces can respond to the presence of people passing through them through a combination of embedded robotics and tensile materials architects are experimenting with art installations and wall structures that bend flex and expand as crowds approach them motion sensors can be paired with climate control systems to adjust a room s temperature and ambient lighting as it fills with people companies have already produced smart glass technology that can automatically become opaque when a room s occupants reach a certain density threshold giving them an additional layer of privacy in their book interactive architecture michael fox and miles kemp described this more adaptive approach as a multiple loop system in which one enters into a conversation a continual and constructive information exchange emphasis mine as i think that s a subtle yet powerful distinction rather than creating immutable unchanging spaces that define a particular experience they suggest inhabitant and structure can and should mutually influence each other this is our way forward rather than tailoring disconnected designs to each of an ever increasing number of web devices we can treat them as facets of the same experience we can design for an optimal viewing experience but embed standards based technologies into our designs to make them not only more flexible but more adaptive to the media that renders them in short we need to practice responsive web design but how", "source_text": "A flexible foundation\n\nLet’s consider an example design. I’ve built a simple page for a hypothetical magazine; it’s a straightforward two-column layout built on a fluid grid, with not a few flexible images peppered throughout. As a long-time proponent of non-fixed layouts, I’ve long felt they were more “future proof” simply because they were layout agnostic. And to a certain extent, that’s true: flexible designs make no assumptions about a browser window’s width, and adapt beautifully to devices that have portrait and landscape modes.\n\nHuge images are huge. Our layout, flexible though it is, doesn’t respond well to changes in resolution or viewport size.\n\nBut no design, fixed or fluid, scales seamlessly beyond the context for which it was originally intended. The example design scales perfectly well as the browser window resizes, but stress points quickly appear at lower resolutions. When viewed at viewport smaller than 800×600, the illustration behind the logo quickly becomes cropped, navigation text can wrap in an unseemly manner, and the images along the bottom become too compact to appear legible. And it’s not just the lower end of the resolution spectrum that’s affected: when viewing the design on a widescreen display, the images quickly grow to unwieldy sizes, crowding out the surrounding context.\n\nIn short, our flexible design works well enough in the desktop-centric context for which it was designed, but isn’t optimized to extend far beyond that.\n\nBecoming responsive\n\nRecently, an emergent discipline called “responsive architecture” has begun asking how physical spaces can respond to the presence of people passing through them. Through a combination of embedded robotics and tensile materials, architects are experimenting with art installations and wall structures that bend, flex, and expand as crowds approach them. Motion sensors can be paired with climate control systems to adjust a room’s temperature and ambient lighting as it fills with people. Companies have already produced “smart glass technology” that can automatically become opaque when a room’s occupants reach a certain density threshold, giving them an additional layer of privacy.\n\nIn their book Interactive Architecture, Michael Fox and Miles Kemp described this more adaptive approach as “a multiple-loop system in which one enters into a conversation; a continual and constructive information exchange.” Emphasis mine, as I think that’s a subtle yet powerful distinction: rather than creating immutable, unchanging spaces that define a particular experience, they suggest inhabitant and structure can—and should—mutually influence each other.\n\nThis is our way forward. Rather than tailoring disconnected designs to each of an ever-increasing number of web devices, we can treat them as facets of the same experience. We can design for an optimal viewing experience, but embed standards-based technologies into our designs to make them not only more flexible, but more adaptive to the media that renders them. In short, we need to practice responsive web design. But how?", "segmentation_method": "reviewed_source_semantics", "label": "A flexible foundation — Becoming responsive", "source_line_range": [ 15, 32 ] }, { "id": "body-region-3", "text": "meet the media query since the days of css 2 1 our style sheets have enjoyed some measure of device awareness through media types if you ve ever written a print style sheet you re already familiar with the concept link rel stylesheet type text css href core css media screen link rel stylesheet type text css href print css media print in the hopes that we d be designing more than neatly formatted page printouts the css specification supplied us with a bevy of acceptable media types each designed to target a specific class of web ready device but most browsers and devices never really embraced the spirit of the specification leaving many media types implemented imperfectly or altogether ignored thankfully the w3c created media queries as part of the css3 specification improving upon the promise of media types a media query allows us to target not only certain device classes but to actually inspect the physical characteristics of the device rendering our work for example following the recent rise of mobile webkit media queries became a popular client side technique for delivering a tailored style sheet to the iphone android phones and their ilk to do so we could incorporate a query into a linked style sheet s media attribute link rel stylesheet type text css media screen and max device width 480px href shetland css the query contains two components a media type screen and the actual query enclosed within parentheses containing a particular media feature max device width to inspect followed by the target value 480px in plain english we re asking the device if its horizontal resolution max device width is equal to or less than 480px if the test passes in other words if we re viewing our work on a small screen device like the iphone then the device will load shetland css otherwise the link is ignored altogether designers have experimented with resolution aware layouts in the past mostly relying on js driven solutions like cameron adams excellent script but the media query specification provides a host of media features that extends far beyond screen resolution vastly widening the scope of what we can test for with our queries what s more you can test multiple property values in a single query by chaining them together with the and keyword link rel stylesheet type text css media screen and max device width 480px and resolution 163dpi href shetland css furthermore we re not limited to incorporating media queries in our links we can include them in our css either as part of a media rule media screen and max device width 480px column float none or as part of an import directive import url shetland css screen and max device width 480px but in each case the effect is the same if the device passes the test put forth by our media query the relevant css is applied to our markup media queries are in short conditional comments for the rest of us rather than targeting a specific version of a specific browser we can surgically correct issues in our layout as it scales beyond its initial ideal resolution", "source_text": "Meet the media query\n\nSince the days of CSS 2.1, our style sheets have enjoyed some measure of device awareness through media types. If you’ve ever written a print style sheet, you’re already familiar with the concept:\n\n\n\n\nIn the hopes that we’d be designing more than neatly formatted page printouts, the CSS specification supplied us with a bevy of acceptable media types, each designed to target a specific class of web-ready device. But most browsers and devices never really embraced the spirit of the specification, leaving many media types implemented imperfectly, or altogether ignored.\n\nThankfully, the W3C created media queries as part of the CSS3 specification, improving upon the promise of media types. A media query allows us to target not only certain device classes, but to actually inspect the physical characteristics of the device rendering our work. For example, following the recent rise of mobile WebKit, media queries became a popular client-side technique for delivering a tailored style sheet to the iPhone, Android phones, and their ilk. To do so, we could incorporate a query into a linked style sheet’s media attribute:\n\n\n\nThe query contains two components:\n\na media type (screen), and\nthe actual query enclosed within parentheses, containing a particular media feature (max-device-width) to inspect, followed by the target value (480px).\n\nIn plain English, we’re asking the device if its horizontal resolution (max-device-width) is equal to or less than 480px. If the test passes—in other words, if we’re viewing our work on a small-screen device like the iPhone—then the device will load shetland.css. Otherwise, the link is ignored altogether.\n\nDesigners have experimented with resolution-aware layouts in the past, mostly relying on JS-driven solutions like Cameron Adams’ excellent script. But the media query specification provides a host of media features that extends far beyond screen resolution, vastly widening the scope of what we can test for with our queries. What’s more, you can test multiple property values in a single query by chaining them together with the and keyword:\n\n\n\nFurthermore, we’re not limited to incorporating media queries in our links. We can include them in our CSS either as part of a @media rule:\n\n@media screen and (max-device-width: 480px) {\n .column {\n float: none;\n }\n}\n\nOr as part of an @import directive:\n\n@import url(\"shetland.css\") screen and (max-device-width: 480px);\n\nBut in each case, the effect is the same: If the device passes the test put forth by our media query, the relevant CSS is applied to our markup. Media queries are, in short, conditional comments for the rest of us. Rather than targeting a specific version of a specific browser, we can surgically correct issues in our layout as it scales beyond its initial, ideal resolution.", "segmentation_method": "reviewed_source_semantics", "label": "Meet the media query", "source_line_range": [ 33, 76 ] }, { "id": "body-region-4", "text": "adapt respond and overcome let s turn our attention to the images at the base of our page in their default layout the relevant css currently looks like this figure float left margin 0 3 317535545023696682 1 5em 0 21px 633px width 31 121642969984202211 197px 633px li f mycroft li f winter margin right 0 i ve omitted a number of typographic properties to focus on the layout each figure element is sized at roughly one third of the containing column with the right hand margin zeroed out for the two pictures at the end of each row li f mycroft li f winter and this works fairly well until the viewport is either noticeably smaller or wider than our original design with media queries we can apply resolution specific spotfixes adapting our design to better respond to changes in the display first of all let s linearize our page once the viewport falls below a certain resolution threshold say 600px so at the bottom of our style sheet let s create a new media block like so media screen and max width 600px mast intro main footer float none width auto if you view our updated page in a modern desktop browser and reduce the size of your window below 600px the media query will disable the floats on the design s major elements stacking each block atop each other in the document flow so our miniaturized design is shaping up nicely but the images still don t scale down that intelligently if we introduce another media query we can alter their layout accordingly media screen and max width 400px figure li f mycroft margin right 3 317535545023696682 21px 633px width 48 341232227488151658 306px 633px li f watson li f moriarty margin right 0 our figures can responsively change their layout to better suit smaller displays don t mind the unsightly percentages we re simply recalculating the widths of the fluid grid to account for the newly linearized layout in short we re moving from a three column layout to a two column layout when the viewport s width falls below 400px making the images more prominent we can actually take the same approach for widescreen displays too for larger resolutions we could adopt a six across treatment for our images placing them all in the same row media screen and min width 1300px figure li f mycroft margin right 3 317535545023696682 21px 633px width 13 902053712480252764 88px 633px now our images are working beautifully at both ends of the resolution spectrum optimizing their layout to changes in window widths and device resolution alike by specifying a wider min width in a new media query we can shift our images into a single row layout but this is only the beginning working from the media queries we ve embedded in our css we can alter much more than the placement of a few images we can introduce new alternate layouts tuned to each resolution range perhaps making the navigation more prominent in a widescreen view or repositioning it above the logo on smaller displays by designing responsively we can not only linearize our content on smaller devices but also optimize its presentation across a range of displays but a responsive design isn t limited to layout changes media queries allow us to practice some incredibly precise fine tuning as our pages reshape themselves we can increase the target area on links for smaller screens better complying with fitts law on touch devices selectively show or hide elements that might enhance a page s navigation we can even practice responsive typesetting to gradually alter the size and leading of our text optimizing the reading experience for the display providing it a few technical notes it should be noted that media queries enjoy incredibly robust support among modern browsers desktop browsers such as safari 3 chrome firefox 3 5 and opera 7 all natively parse media queries as do more recent mobile browsers such as opera mobile and mobile webkit of course older versions of those desktop browsers don t support media queries and while microsoft has committed to media query support in ie9 internet explorer currently doesn t offer a native implementation however if you re interested in implementing legacy browser support for media queries there s a javascript tinted silver lining a jquery plugin from 2007 offers somewhat limited media query support implementing only the min width and max width media properties when attached to separate link elements more recently css3 mediaqueries js was released a library that promises to make ie 5 firefox 1 and safari 2 transparently parse test and apply css3 media queries when included via media blocks while very much a 1 0 release i ve personally found it to be quite robust and i plan to watch its development but if using javascript doesn t appeal that s perfectly understandable however that strengthens the case for building your layout atop a flexible grid ensuring your design enjoys some measure of flexibility in media query blind browsers and devices", "source_text": "Adapt, respond, and overcome\n\nLet’s turn our attention to the images at the base of our page. In their default layout, the relevant CSS currently looks like this:\n\n.figure {\n float: left;\n margin: 0 3.317535545023696682% 1.5em 0; /* 21px / 633px */\n width: 31.121642969984202211%; /* 197px / 633px */\n}li#f-mycroft,\nli#f-winter {\n margin-right: 0;\n}\n\nI’ve omitted a number of typographic properties to focus on the layout: Each .figure element is sized at roughly one third of the containing column, with the right-hand margin zeroed out for the two pictures at the end of each row (li#f-mycroft, li#f-winter). And this works fairly well, until the viewport is either noticeably smaller or wider than our original design. With media queries, we can apply resolution-specific spotfixes, adapting our design to better respond to changes in the display.\n\nFirst of all, let’s linearize our page once the viewport falls below a certain resolution threshold—say, 600px. So at the bottom of our style sheet, let’s create a new @media block, like so:\n\n@media screen and (max-width: 600px) {\n .mast,\n .intro,\n .main,\n .footer {\n float: none;\n width: auto;\n }\n}\n\nIf you view our updated page in a modern desktop browser and reduce the size of your window below 600px, the media query will disable the floats on the design’s major elements, stacking each block atop each other in the document flow. So our miniaturized design is shaping up nicely, but the images still don’t scale down that intelligently. If we introduce another media query, we can alter their layout accordingly:\n\n@media screen and (max-width: 400px) {\n .figure,\n li#f-mycroft {\n margin-right: 3.317535545023696682%; /* 21px / 633px */\n width: 48.341232227488151658%; /* 306px / 633px */\n } li#f-watson,\n li#f-moriarty {\n margin-right: 0;\n }\n}\n\nOur figures can responsively change their layout to better suit smaller displays.\n\nDon’t mind the unsightly percentages; we’re simply recalculating the widths of the fluid grid to account for the newly linearized layout. In short, we’re moving from a three-column layout to a two-column layout when the viewport’s width falls below 400px, making the images more prominent.\n\nWe can actually take the same approach for widescreen displays, too. For larger resolutions, we could adopt a six-across treatment for our images, placing them all in the same row:\n\n@media screen and (min-width: 1300px) {\n .figure,\n li#f-mycroft {\n margin-right: 3.317535545023696682%; /* 21px / 633px */\n width: 13.902053712480252764%; /* 88px / 633px */\n }\n}\n\nNow our images are working beautifully at both ends of the resolution spectrum, optimizing their layout to changes in window widths and device resolution alike.\n\nBy specifying a wider min-width in a new media query, we can shift our images into a single row layout.\n\nBut this is only the beginning. Working from the media queries we’ve embedded in our CSS, we can alter much more than the placement of a few images: we can introduce new, alternate layouts tuned to each resolution range, perhaps making the navigation more prominent in a widescreen view, or repositioning it above the logo on smaller displays.\n\nBy designing responsively, we can not only linearize our content on smaller devices, but also optimize its presentation across a range of displays.\n\nBut a responsive design isn’t limited to layout changes. Media queries allow us to practice some incredibly precise fine-tuning as our pages reshape themselves: we can increase the target area on links for smaller screens, better complying with Fitts’ Law on touch devices; selectively show or hide elements that might enhance a page’s navigation; we can even practice responsive typesetting to gradually alter the size and leading of our text, optimizing the reading experience for the display providing it.\n\nA FEW TECHNICAL NOTES\n\nIt should be noted that media queries enjoy incredibly robust support among modern browsers. Desktop browsers such as Safari 3+, Chrome, Firefox 3.5+, and Opera 7+ all natively parse media queries, as do more recent mobile browsers such as Opera Mobile and mobile WebKit. Of course, older versions of those desktop browsers don’t support media queries. And while Microsoft has committed to media query support in IE9, Internet Explorer currently doesn’t offer a native implementation.\n\nHowever, if you’re interested in implementing legacy browser support for media queries, there’s a JavaScript-tinted silver lining:\n\nA jQuery plugin from 2007 offers somewhat limited media query support, implementing only the min-width and max-width media properties when attached to separate link elements.\nMore recently, css3-mediaqueries.js was released, a library that promises “to make IE 5+, Firefox 1+ and Safari 2 transparently parse, test, and apply CSS3 Media Queries” when included via @media blocks. While very much a 1.0 release, I’ve personally found it to be quite robust, and I plan to watch its development.\n\nBut if using JavaScript doesn’t appeal, that’s perfectly understandable. However, that strengthens the case for building your layout atop a flexible grid, ensuring your design enjoys some measure of flexibility in media query-blind browsers and devices.", "segmentation_method": "reviewed_source_semantics", "label": "Adapt, respond, and overcome", "source_line_range": [ 77, 151 ] }, { "id": "body-region-5", "text": "the way forward fluid grids flexible images and media queries are the three technical ingredients for responsive web design but it also requires a different way of thinking rather than quarantining our content into disparate device specific experiences we can use media queries to progressively enhance our work within different viewing contexts that s not to say there isn t a business case for separate sites geared toward specific devices for example if the user goals for your mobile site are more limited in scope than its desktop equivalent then serving different content to each might be the best approach but that kind of design thinking doesn t need to be our default now more than ever we re designing work meant to be viewed along a gradient of different experiences responsive web design offers us a way forward finally allowing us to design for the ebb and flow of things", "source_text": "The way forward\n\nFluid grids, flexible images, and media queries are the three technical ingredients for responsive web design, but it also requires a different way of thinking. Rather than quarantining our content into disparate, device-specific experiences, we can use media queries to progressively enhance our work within different viewing contexts. That’s not to say there isn’t a business case for separate sites geared toward specific devices; for example, if the user goals for your mobile site are more limited in scope than its desktop equivalent, then serving different content to each might be the best approach.\n\nBut that kind of design thinking doesn’t need to be our default. Now more than ever, we’re designing work meant to be viewed along a gradient of different experiences. Responsive web design offers us a way forward, finally allowing us to “design for the ebb and flow of things.”", "segmentation_method": "reviewed_source_semantics", "label": "The way forward", "source_line_range": [ 152, 157 ] } ], "ending": { "text": "n offers us a way forward, finally allowing us to “design for the ebb and flow of things.”" } } }, { "id": "article-069", "name": "The Reformer: Pushing the limits of language modeling", "url": "https://huggingface.co/blog/reformer", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The Reformer - Pushing the limits of language modeling" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Patrick von Platen" ] }, { "id": "stable-3", "alternatives": [ "patrickvonplaten" ] }, { "id": "stable-4", "alternatives": [ "Hugging Face" ] }, { "id": "stable-5", "alternatives": [ "Models" ] }, { "id": "stable-6", "alternatives": [ "Datasets" ] }, { "id": "stable-7", "alternatives": [ "Spaces" ] }, { "id": "stable-8", "alternatives": [ "Buckets" ] }, { "id": "stable-9", "alternatives": [ "Docs" ] }, { "id": "stable-10", "alternatives": [ "Pricing" ] }, { "id": "stable-11", "alternatives": [ "Log In" ] }, { "id": "stable-12", "alternatives": [ "Sign Up" ] }, { "id": "stable-13", "alternatives": [ "Back to Articles" ] }, { "id": "stable-14", "alternatives": [ "Update on GitHub" ] }, { "id": "stable-15", "alternatives": [ "This article is also available in Chinese" ] }, { "id": "stable-16", "alternatives": [ "简体中文" ] }, { "id": "stable-17", "alternatives": [ "More Articles from our Blog" ] }, { "id": "stable-18", "alternatives": [ "Community" ] }, { "id": "stable-19", "alternatives": [ "Edit" ] }, { "id": "stable-20", "alternatives": [ "Preview" ] }, { "id": "stable-21", "alternatives": [ "Comment" ] }, { "id": "stable-22", "alternatives": [ "Upload images, audio, and videos by dragging in the text input, pasting, or" ] }, { "id": "stable-23", "alternatives": [ "clicking here" ] }, { "id": "stable-24", "alternatives": [ "Models mentioned in this article" ] }, { "id": "stable-25", "alternatives": [ "TOS" ] }, { "id": "stable-26", "alternatives": [ "Privacy" ] }, { "id": "stable-27", "alternatives": [ "About" ] }, { "id": "stable-28", "alternatives": [ "Careers" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete first-automatic-load article reviewed through accessibility, rendered DOM boundaries and saved viewport evidence; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Reformer - Pushing the limits of language modeling" ], "html_selector": "h1.group.relative,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-069/comment-qualification-reference-r5.json", "sha256": "18ab2c82e04a1aa07a67d1fc21f4dc628aca4b6911e5f58bb427ce8a97cdfc09", "chars": 1161, "record_count": 2 }, "comment_presence_review": { "status": "visible_placeholders_only", "basis": "Both records are deletion/spam notices, not actual comment prose. Exclude the notices from valid comment counts and do not require opening hidden text.", "observed_record_count": 2, "qualification_only": true } }, "ground_truth_main_content": "How the Reformer uses less than 8GB of RAM to train on sequences of half a million tokens\n\nThe Reformer model as introduced by Kitaev, Kaiser et al. (2020) is one of the most memory-efficient transformer models for long sequence modeling as of today.\n\nRecently, long sequence modeling has experienced a surge of interest as can be seen by the many submissions from this year alone - Beltagy et al. (2020), Roy et al. (2020), Tay et al., Wang et al. to name a few. The motivation behind long sequence modeling is that many tasks in NLP, e.g. summarization, question answering, require the model to process longer input sequences than models, such as BERT, are able to handle. In tasks that require the model to process a large input sequence, long sequence models do not have to cut the input sequence to avoid memory overflow and thus have been shown to outperform standard \"BERT\"-like models cf. Beltagy et al. (2020).\n\nThe Reformer pushes the limit of longe sequence modeling by its ability to process up to half a million tokens at once as shown in this demo. As a comparison, a conventional bert-base-uncased model limits the input length to only 512 tokens. In Reformer, each part of the standard transformer architecture is re-engineered to optimize for minimal memory requirement without a significant drop in performance.\n\nThe memory improvements can be attributed to 4 features which the Reformer authors introduced to the transformer world:\n\nReformer Self-Attention Layer - How to efficiently implement self-attention without being restricted to a local context?\nChunked Feed Forward Layers - How to get a better time-memory trade-off for large feed forward layers?\nReversible Residual Layers - How to drastically reduce memory consumption in training by a smart residual architecture?\nAxial Positional Encodings - How to make positional encodings usable for extremely large input sequences?\n\nThe goal of this blog post is to give the reader an in-depth understanding of each of the four Reformer features mentioned above. While the explanations are focussed on the Reformer, the reader should get a better intuition under which circumstances each of the four features can be effective for other transformer models as well. The four sections are only loosely connected, so they can very well be read individually.\n\nReformer is part of the 🤗Transformers library. For all users of the Reformer, it is advised to go through this very detailed blog post to better understand how the model works and how to correctly set its configuration. All equations are accompanied by their equivalent name for the Reformer config, e.g. config., so that the reader can quickly relate to the official docs and configuration file.\n\nNote: Axial Positional Encodings are not explained in the official Reformer paper, but are extensively used in the official codebase. This blog post gives the first in-depth explanation of Axial Positional Encodings.\n\n1. Reformer Self-Attention Layer\n\nReformer uses two kinds of special self-attention layers: local self-attention layers and Locality Sensitive Hashing (LSH) self-attention layers.\n\nTo better introduce these new self-attention layers, we will briefly recap conventional self-attention as introduced in Vaswani et al. 2017.\n\nThis blog post uses the same notation and coloring as the popular blog post The illustrated transformer, so the reader is strongly advised to read this blog first.\n\nImportant: While Reformer was originally introduced for causal self-attention, it can very well be used for bi-directional self-attention as well. In this post, Reformer's self-attention is presented for bidirectional self-attention.\n\nRecap Global Self-Attention\n\nThe core of every Transformer model is the self-attention layer. To recap the conventional self-attention layer, which we refer to here as the global self-attention layer, let us assume we apply a transformer layer on the embedding vector sequence \nX=x1​,…,xn​\n where each vector \nxi​\n is of size config.hidden_size, i.e. \ndh​\n.\n\nIn short, a global self-attention layer projects \nX to the query, key and value matrices \nQ,K,V and computes the output \nZ using the softmax operation as follows: \nZ=SelfAttn(X)=softmax(QKT)V with \nZ being of dimension \ndh​×n (leaving out the key normalization factor and self-attention weights \nWO\n for simplicity). For more detail on the complete transformer operation, see the illustrated transformer.\n\nVisually, we can illustrate this operation as follows for \nn=16,dh​=3:\n\nNote that for all visualizations batch_size and config.num_attention_heads is assumed to be 1. Some vectors, e.g. \nx3​\n and its corresponding output vector \nz3​\n are marked so that LSH self-attention can later be better explained. The presented logic can effortlessly be extended for multi-head self-attention (config.num_attention_{h}eads > 1). The reader is advised to read the illustrated transformer as a reference for multi-head self-attention.\n\nImportant to remember is that for each output vector \nzi​\n, the whole input sequence \nX is processed. The tensor of the inner dot-product \nQKT\n has an asymptotic memory complexity of \nO(n2) which usually represents the memory bottleneck in a transformer model.\n\nThis is also the reason why bert-base-cased has a config.max_position_embedding_size of only 512.\n\nLocal Self-Attention\n\nLocal self-attention is the obvious solution to reducing the \nO(n2) memory bottleneck, allowing us to model longer sequences with a reduced computational cost. In local self-attention the input \nX=X1:n​=x1​,…,xn​\n is cut into \nnc​\n chunks: \nX=[X1:lc​​,…,X(nc​−1)∗lc​:nc​∗lc​​] each of length config.local_chunk_length, i.e. \nlc​\n, and subsequently global self-attention is applied on each chunk separately.\n\nLet's take our input sequence for \nn=16,dh​=3 again for visualization:\n\nAssuming \nlc​=4,nc​=4, chunked attention can be illustrated as follows:\n\nAs can be seen, the attention operation is applied for each chunk \nX1:4​,X5:8​,X9:12​,X13:16​\n individually. The first drawback of this architecture becomes obvious: Some input vectors have no access to their immediate context, e.g. \nx9​\n has no access to \nx8​\n and vice-versa in our example. This is problematic because these tokens are not able to learn word representations that take their immediate context into account.\n\nA simple remedy is to augment each chunk with config.local_num_chunks_before, i.e. \nnp​\n, chunks and config.local_num_chunks_after, i.e. \nna​\n, so that every input vector has at least access to \nnp​\n previous input vectors and \nna​\n following input vectors. This can also be understood as chunking with overlap whereas \nnp​\n and \nna​\n define the amount of overlap each chunk has with all previous chunks and following chunks. We denote this extended local self-attention as follows:\n\nZloc=[Z1:lc​loc​,…,Z(nc​−1)∗lc​:nc​∗lc​loc​],\nwith\nZlc​∗(i−1)+1:lc​∗iloc​=SelfAttn(Xlc​∗(i−1−np​)+1:lc​∗(i+na​)​)[np​∗lc​:−na​∗lc​],∀i∈{1,…,nc​}\n\nOkay, this formula looks quite complicated. Let's make it easier. In Reformer's self-attention layers \nna​\n is usually set to 0 and \nnp​\n is set to 1, so let's write down the formula again for \ni=1:\n\nZ1:lc​loc​=SelfAttn(X−lc​+1:lc​​)[lc​:]\n\nWe notice that we have a circular relationship so that the first segment can attend the last segment as well. Let's illustrate this slightly enhanced local attention again. First, we apply self-attention within each windowed segment and keep only the central output segment.\n\nFinally, the relevant output is concatenated to \nZloc\n and looks as follows.\n\nNote that local self-attention is implemented efficiently way so that no output is computed and subsequently \"thrown-out\" as shown here for illustration purposes by the red cross.\n\nIt's important to note here that extending the input vectors for each chunked self-attention function allows each single output vector \nzi​\n of this self-attention function to learn better vector representations. E.g. each of the output vectors \nz5loc​,z6loc​,z7loc​,z8loc​\n can take into account all of the input vectors \nX1:8​\n to learn better representations.\n\nThe gain in memory consumption is quite obvious: The \nO(n2) memory complexity is broken down for each segment individually so that the total asymptotic memory consumption is reduced to \nO(nc​∗lc2​)=O(n∗lc​).\n\nThis enhanced local self-attention is better than the vanilla local self-attention architecture but still has a major drawback in that every input vector can only attend to a local context of predefined size. For NLP tasks that do not require the transformer model to learn long-range dependencies between the input vectors, which include arguably e.g. speech recognition, named entity recognition and causal language modeling of short sentences, this might not be a big issue. Many NLP tasks do require the model to learn long-range dependencies, so that local self-attention could lead to significant performance degradation, e.g.\n\nQuestion-answering: the model has to learn the relationship between the question tokens and relevant answer tokens which will most likely not be in the same local range\nMultiple-Choice: the model has to compare multiple answer token segments to each other which are usually separated by a significant length\nSummarization: the model has to learn the relationship between a long sequence of context tokens and a shorter sequence of summary tokens, whereas the relevant relationships between context and summary can most likely not be captured by local self-attention\netc...\n\nLocal self-attention on its own is most likely not sufficient for the transformer model to learn the relevant relationships of input vectors (tokens) to each other.\n\nTherefore, Reformer additionally employs an efficient self-attention layer that approximates global self-attention, called LSH self-attention.\n\nLSH Self-Attention\n\nAlright, now that we have understood how local self-attention works, we can take a stab at the probably most innovative piece of Reformer: Locality sensitive hashing (LSH) Self-Attention.\n\nThe premise of LSH self-attention is to be more or less as efficient as local self-attention while approximating global self-attention.\n\nLSH self-attention relies on the LSH algorithm as presented in Andoni et al (2015), hence its name.\n\nThe idea behind LSH self-attention is based on the insight that if \nn is large, the softmax applied on the \nQKT\n attention dot-product weights only very few value vectors with values significantly larger than 0 for each query vector.\n\nLet's explain this in more detail. Let \nki​∈K=[k1​,…,kn​]T\n and \nqi​∈Q=[q1​,…,qn​]T\n be the key and query vectors. For each \nqi​\n, the computation \nsoftmax(qiT​KT) can be approximated by using only those key vectors of \nkj​\n that have a high cosine similarity with \nqi​\n. This owes to the fact that the softmax function puts exponentially more weight on larger input values. So far so good, the next problem is to efficiently find the vectors that have a high cosine similarity with \nqi​\n for all \ni.\n\nFirst, the authors of Reformer notice that sharing the query and key projections: \nQ=K does not impact the performance of a transformer model \n1\n. Now, instead of having to find the key vectors of high cosine similarity for each query vector \nqi​\n, only the cosine similarity of query vectors to each other has to be found. This is important because there is a transitive property to the query-query vector dot product approximation: If \nqi​\n has a high cosine similarity to the query vectors \nqj​\n and \nqk​\n, then \nqj​\n also has a high cosine similarity to \nqk​\n. Therefore, the query vectors can be clustered into buckets, such that all query vectors that belong to the same bucket have a high cosine similarity to each other. Let's define \nCm​\n as the mth set of position indices, such that their corresponding query vectors are in the same bucket: \nCm​={i∣ s.t. qi​∈mth cluster} and config.num_buckets, i.e. \nnb​\n, as the number of buckets.\n\nFor each set of indices \nCm​\n, the softmax function on the corresponding bucket of query vectors \nsoftmax(Qi∈Cm​​Qi∈Cm​T​) approximates the softmax function of global self-attention with shared query and key projections \nsoftmax(qiT​QT) for all position indices \ni in \nCm​\n.\n\nSecond, the authors make use of the LSH algorithm to cluster the query vectors into a predefined number of buckets \nnb​\n. The LSH algorithm is an ideal choice here because it is very efficient and is an approximation of the nearest neighbor algorithm for cosine similarity. Explaining the LSH scheme is out-of-scope for this notebook, so let's just keep in mind that for each vector \nqi​\n the LSH algorithm attributes its position index \ni to one of \nnb​\n predefined buckets, i.e. \nLSH(qi​)=m with \ni∈{1,…,n} and \nm∈{1,…,nb​}.\n\nVisually, we can illustrate this as follows for our original example:\n\nThird, it can be noted that having clustered all query vectors in \nnb​\n buckets, the corresponding set of indices \nCm​\n can be used to permute the input vectors \nx1​,…,xn​\n accordingly \n2\n so that shared query-key self-attention can be applied piecewise similar to local attention.\n\nLet's clarify with our example input vectors \nX=x1​,...,x16​\n and assume config.num_buckets=4 and config.lsh_chunk_length = 4. Looking at the graphic above we can see that we have assigned each query vector \nq1​,…,q16​\n to one of the clusters \nC1​,C2​,C3​,C4​\n . If we now sort the corresponding input vectors \nx1​,…,x16​\n accordingly, we get the following permuted input \nX′\n:\n\nThe self-attention mechanism should be applied for each cluster individually so that for each cluster \nCm​\n the corresponding output is calculated as follows: \nZi∈Cm​LSH​=SelfAttnQ=K​(Xi∈Cm​​).\n\nLet's illustrate this again for our example.\n\nAs can be seen, the self-attention function operates on different sizes of matrices, which is suboptimal for efficient batching in GPU and TPU.\n\nTo overcome this problem, the permuted input can be chunked the same way it is done for local attention so that each chunk is of size config.lsh_chunk_length. By chunking the permuted input, a bucket might be split into two different chunks. To remedy this problem, in LSH self-attention each chunk attends to its previous chunk config.lsh_num_chunks_before=1 in addition to itself, the same way local self-attention does (config.lsh_num_chunks_after is usually set to 0). This way, we can be assured that all vectors in a bucket attend to each other with a high probability \n3\n.\n\nAll in all for all chunks \nk∈{1,…,nc​}, LSH self-attention can be noted down as follows:\n\nZ′lc​∗k+1:lc​∗(k+1)LSH​=SelfAttnQ=K​(X′lc​∗k+1):lc​∗(k+1)​)[lc​:]\n\nwith \nX′\n and \nZ′\n being the input and output vectors permuted according to the LSH algorithm. Enough complicated formulas, let's illustrate LSH self-attention.\n\nThe permuted vectors \nX′\n as shown above are chunked and shared query key self-attention is applied to each chunk.\n\nFinally, the output \nZ′LSH\n is reordered to its original permutation.\n\nOne important feature to mention here as well is that the accuracy of LSH self-attention can be improved by running LSH self-attention config.num_hashes, e.g. \nnh​\n times in parallel, each with a different random LSH hash. By setting config.num_hashes > 1, for each output position \ni, multiple output vectors \nziLSH,1​,…,ziLSH,nh​​\n are computed and subsequently merged: \nziLSH​=∑knh​​ZiLSH,k​∗weightik​\n. The \nweightik​\n represents the importance of the output vectors \nziLSH,k​\n of hashing round \nk in comparison to the other hashing rounds, and is exponentially proportional to the normalization term of their softmax computation. The intuition behind this is that if the corresponding query vector \nqik​\n have a high cosine similarity with all other query vectors in its respective chunk, then the softmax normalization term of this chunk tends to be high, so that the corresponding output vectors \nqik​\n should be a better approximation to global attention and thus receive more weight than output vectors of hashing rounds with a lower softmax normalization term. For more detail see Appendix A of the paper. For our example, multi-round LSH self-attention can be illustrated as follows.\n\nGreat. That's it. Now we know how LSH self-attention works in Reformer.\n\nRegarding the memory complexity, we now have two terms that compete which each other to be the memory bottleneck: the dot-product: \nO(nh​∗nc​∗lc2​)=O(n∗nh​∗lc​) and the required memory for LSH bucketing: \nO(n∗nh​∗2nb​​) with \nlc​\n being the chunk length. Because for large \nn, the number of buckets \n2nb​​\n grows much faster than the chunk length \nlc​\n, the user can again factorize the number of buckets config.num_buckets as explained here.\n\nLet's recap quickly what we have gone through above:\n\nWe want to approximate global attention using the knowledge that the softmax operation only puts significant weights on very few key vectors.\nIf key vectors are equal to query vectors this means that for each query vector \nqi​\n, the softmax only puts significant weight on other query vectors that are similar in terms of cosine similarity.\nThis relationship works in both ways, meaning if \nqj​\n is similar to \nqi​\n than \nqj​\n is also similar to \nqi​\n, so that we can do a global clustering before applying self-attention on a permuted input.\nWe apply local self-attention on the permuted input and re-order the output to its original permutation.\n\n1\n The authors run some preliminary experiments confirming that shared query key self-attention performs more or less as well as standard self-attention.\n\n2\n To be more exact the query vectors within a bucket are sorted according to their original order. This means if, e.g. the vectors \nq1​,q3​,q7​\n are all hashed to bucket 2, the order of the vectors in bucket 2 would still be \nq1​\n, followed by \nq3​\n and \nq7​\n.\n\n3\n On a side note, it is to mention the authors put a mask on the query vector \nqi​\n to prevent the vector from attending to itself. Because the cosine similarity of a vector to itself will always be as high or higher than the cosine similarity to other vectors, the query vectors in shared query key self-attention are strongly discouraged to attend to themselves.\n\nBenchmark\n\nBenchmark tools were recently added to Transformers - see here for a more detailed explanation.\n\nTo show how much memory can be saved using \"local\" + \"LSH\" self-attention, the Reformer model google/reformer-enwik8 is benchmarked for different local_attn_chunk_length and lsh_attn_chunk_length. The default configuration and usage of the google/reformer-enwik8 model can be checked in more detail here.\n\nLet's first do some necessary imports and installs.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, PyTorchBenchmark, PyTorchBenchmarkArguments\n\n\nFirst, let's benchmark the memory usage of the Reformer model using global self-attention. This can be achieved by setting lsh_attn_chunk_length = local_attn_chunk_length = 8192 so that for all input sequences smaller or equal to 8192, the model automatically switches to global self-attention.\n\nconfig = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", lsh_attn_chunk_length=16386, local_attn_chunk_length=16386, lsh_num_chunks_before=0, local_num_chunks_before=0)\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[2048, 4096, 8192, 16386], batch_sizes=[1], models=[\"Reformer\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config], args=benchmark_args)\nresult = benchmark.run()\n\nHBox(children=(FloatProgress(value=0.0, description='Downloading', max=1279.0, style=ProgressStyle(description…\n\n\n\n1 / 1\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 8.87 GiB already allocated; 1.92 GiB free; 8.88 GiB reserved in total by PyTorch)\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer 1 2048 1465 \n Reformer 1 4096 2757 \n Reformer 1 8192 7893 \n Reformer 1 16386 N/A \n--------------------------------------------------------------------------------\n\n\nThe longer the input sequence, the more visible is the quadratic relationship \nO(n2) between input sequence and peak memory usage. As can be seen, in practice it would require a much longer input sequence to clearly observe that doubling the input sequence quadruples the peak memory usage.\n\nFor this a google/reformer-enwik8 model using global attention, a sequence length of over 16K results in a memory overflow.\n\nNow, let's activate local and LSH self-attention by using the model's default parameters.\n\n config = ReformerConfig.from_pretrained(\"google/reformer-enwik8\")\n benchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[2048, 4096, 8192, 16384, 32768, 65436], batch_sizes=[1], models=[\"Reformer\"], no_speed=True, no_env_print=True)\n benchmark = PyTorchBenchmark(configs=[config], args=benchmark_args)\n result = benchmark.run()\n\n1 / 1\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 7.85 GiB already allocated; 1.74 GiB free; 9.06 GiB reserved in total by PyTorch)\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 4.00 GiB (GPU 0; 11.17 GiB total capacity; 6.56 GiB already allocated; 3.99 GiB free; 6.81 GiB reserved in total by PyTorch)\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer 1 2048 1785 \n Reformer 1 4096 2621 \n Reformer 1 8192 4281 \n Reformer 1 16384 7607 \n Reformer 1 32768 N/A \n Reformer 1 65436 N/A \n--------------------------------------------------------------------------------\n\n\nAs expected using local and LSH self-attention is much more memory efficient for longer input sequences, so that the model runs out of memory only at 16K tokens for a 11GB RAM GPU in this notebook.\n\n2. Chunked Feed Forward Layers\n\nTransformer-based models often employ very large feed forward layers after the self-attention layer in parallel. Thereby, this layer can take up a significant amount of the overall memory and sometimes even represent the memory bottleneck of a model. First introduced in the Reformer paper, feed forward chunking is a technique that allows to effectively trade better memory consumption for increased time consumption.\n\nChunked Feed Forward Layer in Reformer\n\nIn Reformer, the LSH- or local self-attention layer is usually followed by a residual connection, which then defines the first part in a transformer block. For more detail on this please refer to this blog.\n\nThe output of the first part of the transformer block, called normed self-attention output can be written as \nZ=Z+X, with \nZ being either \nZLSH\n or \nZloc\n in Reformer.\n\nFor our example input \nx1​,…,x16​\n, we illustrate the normed self-attention output as follows.\n\nNow, the second part of a transformer block usually consists of two feed forward layers \n1\n, defined as \nLinearint​(…) that processes \nZ\n, to an intermediate output \nYint​\n and \nLinearout​(…) that processes the intermediate output to the output \nYout​\n. The two feed forward layers can be defined by\n\nYout​=Linearout​(Yint​)=Linearout​(Linearint​(Z)).\n\nIt is important to remember at this point that mathematically the output of a feed forward layer at position \nyout,i​\n only depends on the input at this position \ny​i​\n. In contrast to the self-attention layer, every output \nyout,i​\n is therefore completely independent of all inputs \ny​j=i​\n of different positions.\n\nLet's illustrate the feed forward layers for \nz1​,…,z16​\n.\n\nAs can be depicted from the illustration, all input vectors \nzi​\n are processed by the same feed forward layer in parallel.\n\nIt becomes interesting when one takes a look at the output dimensions of the feed forward layers. In Reformer, the output dimension of \nLinearint​\n is defined as config.feed_forward_size, e.g. \ndf​\n, and the output dimension of \nLinearout​\n is defined as config.hidden_size, i.e. \ndh​\n.\n\nThe Reformer authors observed that in a transformer model the intermediate dimension \ndf​\n usually tends to be much larger than the output dimension \n2\n \ndh​\n. This means that the tensor \nYint​\n of dimension \ndf​×n allocates a significant amount of the total memory and can even become the memory bottleneck.\n\nTo get a better feeling for the differences in dimensions let's picture the matrices \nYint​\n and \nYout​\n for our example.\n\nIt is becoming quite obvious that the tensor \nYint​\n holds much more memory ( \ndh​df​​×n as much to be exact) than \nYout​\n. But, is it even necessary to compute the full intermediate matrix \nYint​\n ? Not really, because relevant is only the output matrix \nYout​\n. To trade memory for speed, one can thus chunk the linear layers computation to only process one chunk at the time. Defining config.chunk_size_feed_forward as \ncf​\n, chunked linear layers are defined as \nYout​=[Yout,1:cf​​,…,Yout,(n−cf​):n​] with \nYout,(cf​∗i):(i∗cf​+i)​=Linearout​(Linearint​(Z(cf​∗i):(i∗cf​+i)​)). In practice, it just means that the output is incrementally computed and concatenated to avoid having to store the whole intermediate tensor \nYint​\n in memory.\n\nAssuming \ncf​=1 for our example we can illustrate the incremental computation of the output for position \ni=9 as follows.\n\nBy processing the inputs in chunks of size 1, the only tensors that have to be stored in memory at the same time are \nYout​\n of a maximum size of \n16×dh​\n, \nyint,i​\n of size \ndf​\n and the input \nZ\n of size \n16×dh​\n, with \ndh​\n being config.hidden_size \n3\n.\n\nFinally, it is important to remember that chunked linear layers yield a mathematically equivalent output to conventional linear layers and can therefore be applied to all transformer linear layers. Making use of config.chunk_size_feed_forward therefore allows a better trade-off between memory and speed in certain use cases.\n\n1\n For a simpler explanation, the layer norm layer which is normally applied to \nZ\n before being processed by the feed forward layers is omitted for now.\n\n2\n In bert-base-uncased, e.g. the intermediate dimension \ndf​\n is with 3072 four times larger than the output dimension \ndh​\n.\n\n3\n As a reminder, the output config.num_attention_heads is assumed to be 1 for the sake of clarity and illustration in this notebook, so that the output of the self-attention layers can be assumed to be of size config.hidden_size.\n\nMore information on chunked linear / feed forward layers can also be found here on the 🤗Transformers docs.\n\nBenchmark\n\nLet's test how much memory can be saved by using chunked feed forward layers.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, PyTorchBenchmark, PyTorchBenchmarkArguments\n\n Building wheel for transformers (setup.py) ... \u001b[?25l\u001b[?25hdone\n\n\nFirst, let's compare the default google/reformer-enwik8 model without chunked feed forward layers to the one with chunked feed forward layers.\n\nconfig_no_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\") # no chunk\nconfig_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", chunk_size_feed_forward=1) # feed forward chunk\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[1024, 2048, 4096], batch_sizes=[8], models=[\"Reformer-No-Chunk\", \"Reformer-Chunk\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_no_chunk, config_chunk], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 2\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 7.85 GiB already allocated; 1.74 GiB free; 9.06 GiB reserved in total by PyTorch)\n2 / 2\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 7.85 GiB already allocated; 1.24 GiB free; 9.56 GiB reserved in total by PyTorch)\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer-No-Chunk 8 1024 4281 \n Reformer-No-Chunk 8 2048 7607 \n Reformer-No-Chunk 8 4096 N/A \n Reformer-Chunk 8 1024 4309 \n Reformer-Chunk 8 2048 7669 \n Reformer-Chunk 8 4096 N/A \n--------------------------------------------------------------------------------\n\n\nInteresting, chunked feed forward layers do not seem to help here at all. The reason is that config.feed_forward_size is not sufficiently large to make a real difference. Only at longer sequence lengths of 4096, a slight decrease in memory usage can be seen.\n\nLet's see what happens to the memory peak usage if we increase the size of the feed forward layer by a factor of 4 and reduce the number of attention heads also by a factor of 4 so that the feed forward layer becomes the memory bottleneck.\n\nconfig_no_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", chunk_size_feed_forward=0, num_attention_{h}eads=2, feed_forward_size=16384) # no chuck\nconfig_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", chunk_size_feed_forward=1, num_attention_{h}eads=2, feed_forward_size=16384) # feed forward chunk\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[1024, 2048, 4096], batch_sizes=[8], models=[\"Reformer-No-Chunk\", \"Reformer-Chunk\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_no_chunk, config_chunk], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 2 / 2\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer-No-Chunk 8 1024 3743 \n Reformer-No-Chunk 8 2048 5539 \n Reformer-No-Chunk 8 4096 9087 \n Reformer-Chunk 8 1024 2973 \n Reformer-Chunk 8 2048 3999 \n Reformer-Chunk 8 4096 6011 \n--------------------------------------------------------------------------------\n\n\nNow a clear decrease in peak memory usage can be seen for longer input sequences. As a conclusion, it should be noted chunked feed forward layers only makes sense for models having few attention heads and large feed forward layers.\n\n3. Reversible Residual Layers\n\nReversible residual layers were first introduced in N. Gomez et al and used to reduce memory consumption when training the popular ResNet model. Mathematically, reversible residual layers are slightly different to \"real\" residual layers but do not require the activations to be saved during the forward pass, which can drastically reduce memory consumption for training.\n\nReversible Residual Layers in Reformer\n\nLet's start by investigating why training a model requires much more memory than the inference of the model.\n\nWhen running a model in inference, the required memory equals more or less the memory it takes to compute the single largest tensor in the model. On the other hand, when training a model, the required memory equals more or less the sum of all differentiable tensors.\n\nThis is not surprising when considering how auto differentiation works in deep learning frameworks. These lecture slides by Roger Grosse of the University of Toronto are great to better understand auto differentiation.\n\nIn a nutshell, in order to calculate the gradient of a differentiable function (e.g. a layer), auto differentiation requires the gradient of the function's output and the function's input and output tensor. While the gradients are dynamically computed and subsequently discarded, the input and output tensors (a.k.a activations) of a function are stored during the forward pass.\n\nAlright, let's apply this to a transformer model. A transformer model includes a stack of multiple so-called transformer layers. Each additional transformer layer forces the model to store more activations during the forward pass and thus increases the required memory for training. Let's take a more detailed look. A transformer layer essentially consists of two residual layers. The first residual layer represents the self-attention mechanism as explained in section 1) and the second residual layer represents the linear or feed-forward layers as explained in section 2).\n\nUsing the same notation as before, the input of a transformer layer i.e. \nX is first normalized \n1\n and subsequently processed by the self-attention layer to get the output \nZ=SelfAttn(LayerNorm(X)). We will abbreviate these two layers with \nG so that \nZ=G(X). Next, the residual \nZ is added to the input \nZ=Z+X and the sum is fed into the second residual layer - the two linear layers. \nZ\n is processed by a second normalization layer, followed by the two linear layers to get \nY=Linear(LayerNorm(Z+X)). We will abbreviate the second normalization layer and the two linear layers with \nF yielding \nY=F(Z). Finally, the residual \nY is added to \nZ\n to give the output of the transformer layer \nY=Y+Z\n.\n\nLet's illustrate a complete transformer layer using the example of \nx1​,…,x16​\n.\n\nTo calculate the gradient of e.g. the self-attention block \nG, three tensors have to be known beforehand: the gradient \n∂Z, the output \nZ, and the input \nX. While \n∂Z can be calculated on-the-fly and discarded afterward, the values for \nZ and \nX have to be calculated and stored during the forward pass since it is not possible to recalculate them easily on-the-fly during backpropagation. Therefore, during the forward pass, large tensor outputs, such as the query-key dot product matrix \nQKT\n or the intermediate output of the linear layers \nYint\n, have to be stored in memory \n2\n.\n\nHere, reversible residual layers come to our help. The idea is relatively straight-forward. The residual block is designed in a way so that instead of having to store the input and output tensor of a function, both can easily be recalculated during the backward pass so that no tensor has to be stored in memory during the forward pass. This is achieved by using two input streams \nX(1),X(2)\n, and two output streams \nY(1),Y(2)\n. The first residual \nZ is computed by the first output stream \nZ=G(X(1)) and subsequently added to the input of the second input stream, so that \nZ=Z+X(2)\n. Similarly, the residual \nY=F(Z) is added to the first input stream again, so that the two output streams are defined by \nY(1)=Y+X(1)\n and \nY(2)=X(2)+Z=Z\n.\n\nThe reversible transformer layer can be visualized for \nx1​,…,x16​\n as follows.\n\nAs can be seen, the outputs \nY(1),Y(2)\n are calculated in a very similar way than \nY\n of the non-reversible layer, but they are mathematically different. The authors of Reformer observe in some initial experiments that the performance of a reversible transformer model matches the performance of a standard transformer model. The first visible difference to the standard transformer layer is that there are two input streams and output streams \n3\n, which at first slightly increases the required memory for both the forward pass. The two-stream architecture is crucial though for not having to save any activations during the forward pass. Let's explain. For backpropagation, the reversible transformer layer has to calculate the gradients \n∂G and \n∂F. In addition to the gradients \n∂Y and \n∂Z which can be calculated on-the-fly, the tensor values \nY, \nZ\n have to be known for \n∂F and the tensor values \nZ and \nX(1)\n for \n∂G to make auto-differentiation work.\n\nIf we assume to know \nY(1),Y(2)\n, it can easily be depicted from the graph that one can calculate \nX(1),X(2)\n as follows. \nX(1)=F(Y(1))−Y(1)\n. Great, now that \nX(1)\n is known, \nX(2)\n can be computed by \nX(2)=Y(1)−G(X(1)). Alright now, \nZ and \nY are trivial to compute via \nY=Y(1)−X(1)\n and \nZ=Y(2)−X(2)\n. So as a conclusion, if only the outputs \nY(1),Y(2)\n of the last reversible transformer layer are stored during the forward pass, all other relevant activations can be derived by making use of \nG and \nF during the backward pass and passing \nX(1)\n and \nX(2)\n. The overhead of two forward passes of \nG and \nF per reversible transformer layer during the backpropagation is traded against not having to store any activations during the forward pass. Not a bad deal!\n\nNote: Since recently, major deep learning frameworks have released code that allows to store only certain activations and recompute larger ones during the backward propagation (Tensoflow here and PyTorch here). For standard reversible layers, this still means that at least one activation has to be stored for each transformer layer, but by defining which activations can dynamically be recomputed a lot of memory can be saved.\n\n1\n In the previous two sections, we have omitted the layer norm layers preceding both the self-attention layer and the linear layers. The reader should know that both \nX and \nZ\n are both processed by layer normalization before being fed into self-attention and the linear layers respectively. \n2\n2\n While in the design the dimension of \nQK is written as \nn×n, in a LSH self-attention or local self-attention layer the dimension would only be \nn×lc​×nh​\n or \nn×lc​\n respectively with \nlc​\n being the chunk length and \nnh​\n the number of hashes \n3\n In the first reversible transformer layer \nX(2)\n is set to be equal to \nX(1)\n.\n\nBenchmark\n\nIn order to measure the effect of reversible residual layers, we will compare the memory consumption of BERT with Reformer in training for an increasing number of layers.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, BertConfig, PyTorchBenchmark, PyTorchBenchmarkArguments\n\n\nLet's measure the required memory for the standard bert-base-uncased BERT model by increasing the number of layers from 4 to 12.\n\nconfig_4_layers_bert = BertConfig.from_pretrained(\"bert-base-uncased\", num_hidden_layers=4)\nconfig_8_layers_bert = BertConfig.from_pretrained(\"bert-base-uncased\", num_hidden_layers=8)\nconfig_12_layers_bert = BertConfig.from_pretrained(\"bert-base-uncased\", num_hidden_layers=12)\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[512], batch_sizes=[8], models=[\"Bert-4-Layers\", \"Bert-8-Layers\", \"Bert-12-Layers\"], training=True, no_inference=True, no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_4_layers_bert, config_8_layers_bert, config_12_layers_bert], args=benchmark_args)\nresult = benchmark.run()\n\nHBox(children=(FloatProgress(value=0.0, description='Downloading', max=433.0, style=ProgressStyle(description_…\n\n\n\n1 / 3\n2 / 3 / 3\n\n==================== TRAIN - MEMORY - RESULTS ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Bert-4-Layers 8 512 4103 \n Bert-8-Layers 8 512 5759 \n Bert-12-Layers 8 512 7415 \n--------------------------------------------------------------------------------\n\n\nIt can be seen that adding a single layer of BERT linearly increases the required memory by more than 400MB.\n\nconfig_4_layers_reformer = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", num_hidden_layers=4, num_hashes=1)\nconfig_8_layers_reformer = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", num_hidden_layers=8, num_hashes=1)\nconfig_12_layers_reformer = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", num_hidden_layers=12, num_hashes=1)\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[512], batch_sizes=[8], models=[\"Reformer-4-Layers\", \"Reformer-8-Layers\", \"Reformer-12-Layers\"], training=True, no_inference=True, no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_4_layers_reformer, config_8_layers_reformer, config_12_layers_reformer], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 3\n2 / 3\n3 / 3\n\n==================== TRAIN - MEMORY - RESULTS ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer-4-Layers 8 512 4607 \n Reformer-8-Layers 8 512 4987 \n Reformer-12-Layers 8 512 5367 \n--------------------------------------------------------------------------------\n\n\nFor Reformer, on the other hand, adding a layer adds significantly less memory in practice. Adding a single layer increases the required memory on average by less than 100MB so that a much larger 12-Layer reformer-enwik8 model requires less memory than a 12-Layer bert-base-uncased model.\n\n4. Axial Positional Encodings\n\nReformer makes it possible to process huge input sequences. However, for such long input sequences standard positional encoding weight matrices alone would use more than 1GB to store its weights. To prevent such large positional encoding matrices, the official Reformer code introduced Axial Position Encodings.\n\nImportant: Axial Position Encodings were not explained in the official paper, but can be well understood from looking into the code and talking to the authors\n\nAxial Positional Encodings in Reformer\n\nTransformers need positional encodings to account for the order of words in the input because self-attention layers have no notion of order. Positional encodings are usually defined by a simple look-up matrix \nE=[e1​,…,enmax​​] The positional encoding vector \nei​\n is then simply added to the ith input vector \nxi​+ei​\n so that the model can distinguish if an input vector (a.k.a token) is at position \ni or \nj. For every input position, the model needs to be able to look up the corresponding positional encoding vector so that the dimension of \nE is defined by the maximum length of input vectors the model can process config.max_position_embeddings, i.e. \nnmax​\n, and the config.hidden_size, i.e. \ndh​\n of the input vectors.\n\nAssuming \ndh​=4 and \nnmax​=49, such a positional encoding matrix can be visualized as follows:\n\nHere, we showcase only the positional encodings \ne1​\n, \ne2​\n, and \ne49​\n each of dimension, a.k.a height 4.\n\nLet's imagine, we want to train a Reformer model on sequences of a length of up to 0.5M tokens and an input vector config.hidden_size of 1024 (see notebook here). The corresponding positional embeddings have a size of \n0.5M×1024∼512M parameters, which corresponds to a size of 2GB.\n\nSuch positional encodings would use an unnecessarily large amount of memory both when loading the model in memory and when saving the model on a hard drive.\n\nThe Reformer authors managed to drastically shrink the positional encodings in size by cutting the config.hidden_size dimension in two and smartly factorizing the \nnmax​\n dimension. In Transformer, the user can decide into which shape \nnmax​\n can be factorized into by setting config.axial_pos_shape to an appropriate list of two values \nnmax1​\n and \nnmax2​\n so that \nnmax1​×nmax2​=nmax​\n. By setting config.axial_pos_embds_dim to an appropriate list of two values \ndh1​\n and \ndh2​\n so that \ndh1​+dh2​=dh​\n, the user can decide how the hidden size dimension should be cut. Now, let's visualize and explain more intuitively.\n\nOne can think of factorizing \nnmax​\n as folding the dimension into a third axis, which is shown in the following for the factorization config.axial_pos_shape = [7, 7]:\n\nEach of the three standing rectangular prisms corresponds to one of the encoding vectors \ne1​,e2​,e49​\n, but we can see that the 49 encoding vectors are divided into 7 rows of 7 vectors each. Now the idea is to use only one row of 7 encoding vectors and expand those vectors to the other 6 rows, essentially reusing their values. Because it is discouraged to have the same values for different encoding vectors, each vector of dimension (a.k.a height) config.hidden_size=4 is cut into the lower encoding vector \nedown​\n of size \n1 and \neup​\n of size \n3\n3, so that the lower part can be expanded along the row dimension and the upper part can be expanded along the column dimension. Let's visualize for more clarity.\n\nWe can see that we have cut the embedding vectors into \nedown​\n (in blue) and \neup​\n (in yellow). Now for the \"sub\"-vectors \nEdown​=[edown,1​,…,edown,49​] only the first row, a.k.a. the width in the graphic, of \n7 is kept and expanded along the column dimension, a.k.a. the depth of the graphic. Inversely, for the \"sub\"-vectors \nEup​=[eup,1​,…,eup,49​] only the first column of \n7 is kept and expanded along the row dimension. The resulting embedding vectors \ne′i​\n then correspond to\n\ne′i​=​[edown, i%nmax1​​]T,​eup, ⌊nmax2​i​⌋​​T​T\n\nwhereas \nnmax1​=7 and \nnmax2​=7 in our example. These new encodings \nE′=[e′1​,…,e′nmax​​] are called Axial Position Encodings.\n\nIn the following, these axial position encodings are illustrated in more detail for our example.\n\nNow it should be more understandable how the final positional encoding vectors \nE′\n are calculated only from \nEdown​\n of dimension \ndh1​×nmax1​\n and \nEup​\n of dimension \ndh2​×nmax2​\n.\n\nThe crucial aspect to see here is that Axial Positional Encodings make sure that none of the vectors \n[e′1​,…,e′nmax​​] are equal to each other by design and that the overall size of the encoding matrix is reduced from \nnmax​×dh​\n to \nnmax1​×dh1​+nmax2​×dh2​\n. By allowing each axial positional encoding vector to be different by design the model is given much more flexibility to learn efficient positional representations if axial positional encodings are learned by the model.\n\nTo demonstrate the drastic reduction in size, let's assume we would have set config.axial_pos_shape = [1024, 512] and config.axial_pos_embds_dim = [512, 512] for a Reformer model that can process inputs up to a length of 0.5M tokens. The resulting axial positional encoding matrix would have had a size of only \n1024×512+512×512∼800K parameters which corresponds to roughly 3MB. This is a drastic reduction from the 2GB a standard positional encoding matrix would require in this case.\n\nFor a more condensed and math-heavy explanation please refer to the 🤗Transformers docs here.\n\nBenchmark\n\nLastly, let's also compare the peak memory consumption of conventional positional embeddings to axial positional embeddings.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, PyTorchBenchmark, PyTorchBenchmarkArguments, ReformerModel\n\n\nPositional embeddings depend only on two configuration parameters: The maximum allowed length of input sequences config.max_position_embeddings and config.hidden_size. Let's use a model that pushes the maximum allowed length of input sequences to half a million tokens, called google/reformer-crime-and-punishment, to see the effect of using axial positional embeddings.\n\nTo begin with, we will compare the shape of axial position encodings with standard positional encodings and the number of parameters in the model.\n\nconfig_no_pos_axial_embeds = ReformerConfig.from_pretrained(\"google/reformer-crime-and-punishment\", axial_pos_embds=False) # disable axial positional embeddings\nconfig_pos_axial_embeds = ReformerConfig.from_pretrained(\"google/reformer-crime-and-punishment\", axial_pos_embds=True, axial_pos_embds_dim=(64, 192), axial_pos_shape=(512, 1024)) # enable axial positional embeddings\n\nprint(\"Default Positional Encodings\")\nprint(20 * '-')\nmodel = ReformerModel(config_no_pos_axial_embeds)\nprint(f\"Positional embeddings shape: {model.embeddings.position_embeddings}\")\nprint(f\"Num parameters of model: {model.num_parameters()}\")\nprint(20 * '-' + '\\n\\n')\n\nprint(\"Axial Positional Encodings\")\nprint(20 * '-')\nmodel = ReformerModel(config_pos_axial_embeds)\nprint(f\"Positional embeddings shape: {model.embeddings.position_embeddings}\")\nprint(f\"Num parameters of model: {model.num_parameters()}\")\nprint(20 * '-' + '\\n\\n')\n\nHBox(children=(FloatProgress(value=0.0, description='Downloading', max=1151.0, style=ProgressStyle(description…\n\n\n\nDefault Positional Encodings\n--------------------\nPositional embeddings shape: PositionEmbeddings(\n (embedding): Embedding(524288, 256)\n)\nNum parameters of model: 136572416\n--------------------\n\n\nAxial Positional Encodings\n--------------------\nPositional embeddings shape: AxialPositionEmbeddings(\n (weights): ParameterList(\n (0): Parameter containing: [torch.FloatTensor of size 512x1x64]\n (1): Parameter containing: [torch.FloatTensor of size 1x1024x192]\n )\n)\nNum parameters of model: 2584064\n--------------------\n\n\nHaving read the theory, the shape of the axial positional encoding weights should not be a surprise to the reader.\n\nRegarding the results, it can be seen that for models being capable of processing such long input sequences, it is not practical to use default positional encodings. In the case of google/reformer-crime-and-punishment, standard positional encodings alone contain more than 100M parameters. Axial positional encodings reduce this number to just over 200K.\n\nLastly, let's also compare the required memory at inference time.\n\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[512], batch_sizes=[8], models=[\"Reformer-No-Axial-Pos-Embeddings\", \"Reformer-Axial-Pos-Embeddings\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_no_pos_axial_embeds, config_pos_axial_embeds], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 2\n2 / 2\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\nReformer-No-Axial-Pos-Embeddin 8 512 959 \nReformer-Axial-Pos-Embeddings 8 512 447 \n--------------------------------------------------------------------------------\n\n\nIt can be seen that using axial positional embeddings reduces the memory requirement to approximately half in the case of google/reformer-crime-and-punishment.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "how the reformer uses less than 8gb of ram to train on sequences of half a million tokens the reformer model as introduced by kitaev kaiser et al 2020 is one of the most memory efficient transformer models for long sequence modeling as of today recently long sequence modeling has experienced a surge of interest as can be seen by the many submissions from this year alone beltagy et al 2020 roy et al 2020 tay et al wang et al to name a few the motivation behind long sequence modeling is that many tasks in nlp e g summarization question answering require the model to process longer input sequences than models such as bert are able to handle in tasks that require the model to process a large input sequence long sequence models do not have to cut the input sequence to avoid memory overflow and thus have been shown to outperform standard bert like models cf beltagy et al 2020 the reformer pushes the limit of longe sequence modeling by its ability to process up to half a million tokens at once as shown in this demo as a comparison a conventional bert base uncased model limits the input length to only 512 tokens in reformer each part of the standard transformer architecture is re engineered to optimize for minimal memory requirement without a significant drop in performance the memory improvements can be attributed to 4 features which the reformer authors introduced to the transformer world reformer self attention layer how to efficiently implement self attention without being restricted to a local context chunked feed forward layers how to get a better time memory trade off for large feed forward layers reversible residual layers how to drastically reduce memory consumption in training by a smart residual architecture axial positional encodings how to make positional encodings usable for extremely large input sequences the goal of this blog post is to give the reader an in depth understanding of each of the four reformer features mentioned above while the explanations are focussed on the reformer the reader should get a better intuition under which circumstances each of the four features can be effective for other transformer models as well the four sections are only loosely connected so they can very well be read individually reformer is part of the transformers library for all users of the reformer it is advised to go through this very detailed blog post to better understand how the model works and how to correctly set its configuration all equations are accompanied by their equivalent name for the reformer config e g config param name so that the reader can quickly relate to the official docs and configuration file note axial positional encodings are not explained in the official reformer paper but are extensively used in the official codebase this blog post gives the first in depth explanation of axial positional encodings", "source_text": "How the Reformer uses less than 8GB of RAM to train on sequences of half a million tokens\n\nThe Reformer model as introduced by Kitaev, Kaiser et al. (2020) is one of the most memory-efficient transformer models for long sequence modeling as of today.\n\nRecently, long sequence modeling has experienced a surge of interest as can be seen by the many submissions from this year alone - Beltagy et al. (2020), Roy et al. (2020), Tay et al., Wang et al. to name a few. The motivation behind long sequence modeling is that many tasks in NLP, e.g. summarization, question answering, require the model to process longer input sequences than models, such as BERT, are able to handle. In tasks that require the model to process a large input sequence, long sequence models do not have to cut the input sequence to avoid memory overflow and thus have been shown to outperform standard \"BERT\"-like models cf. Beltagy et al. (2020).\n\nThe Reformer pushes the limit of longe sequence modeling by its ability to process up to half a million tokens at once as shown in this demo. As a comparison, a conventional bert-base-uncased model limits the input length to only 512 tokens. In Reformer, each part of the standard transformer architecture is re-engineered to optimize for minimal memory requirement without a significant drop in performance.\n\nThe memory improvements can be attributed to 4 features which the Reformer authors introduced to the transformer world:\n\nReformer Self-Attention Layer - How to efficiently implement self-attention without being restricted to a local context?\nChunked Feed Forward Layers - How to get a better time-memory trade-off for large feed forward layers?\nReversible Residual Layers - How to drastically reduce memory consumption in training by a smart residual architecture?\nAxial Positional Encodings - How to make positional encodings usable for extremely large input sequences?\n\nThe goal of this blog post is to give the reader an in-depth understanding of each of the four Reformer features mentioned above. While the explanations are focussed on the Reformer, the reader should get a better intuition under which circumstances each of the four features can be effective for other transformer models as well. The four sections are only loosely connected, so they can very well be read individually.\n\nReformer is part of the 🤗Transformers library. For all users of the Reformer, it is advised to go through this very detailed blog post to better understand how the model works and how to correctly set its configuration. All equations are accompanied by their equivalent name for the Reformer config, e.g. config., so that the reader can quickly relate to the official docs and configuration file.\n\nNote: Axial Positional Encodings are not explained in the official Reformer paper, but are extensively used in the official codebase. This blog post gives the first in-depth explanation of Axial Positional Encodings.", "segmentation_method": "reviewed_source_semantics", "label": "How the Reformer uses less than 8GB of RAM to train on sequences of half a million tokens", "source_line_range": [ 1, 21 ] }, { "id": "body-region-2", "text": "1 reformer self attention layer reformer uses two kinds of special self attention layers local self attention layers and locality sensitive hashing lsh self attention layers to better introduce these new self attention layers we will briefly recap conventional self attention as introduced in vaswani et al 2017 this blog post uses the same notation and coloring as the popular blog post the illustrated transformer so the reader is strongly advised to read this blog first important while reformer was originally introduced for causal self attention it can very well be used for bi directional self attention as well in this post reformer s self attention is presented for bidirectional self attention recap global self attention the core of every transformer model is the self attention layer to recap the conventional self attention layer which we refer to here as the global self attention layer let us assume we apply a transformer layer on the embedding vector sequence x x1 xn where each vector xi is of size config hidden size i e dh in short a global self attention layer projects x to the query key and value matrices q k v and computes the output z using the softmax operation as follows z selfattn x softmax qkt v with z being of dimension dh n leaving out the key normalization factor and self attention weights wo for simplicity for more detail on the complete transformer operation see the illustrated transformer visually we can illustrate this operation as follows for n 16 dh 3 note that for all visualizations batch size and config num attention heads is assumed to be 1 some vectors e g x3 and its corresponding output vector z3 are marked so that lsh self attention can later be better explained the presented logic can effortlessly be extended for multi head self attention config num attention h eads 1 the reader is advised to read the illustrated transformer as a reference for multi head self attention important to remember is that for each output vector zi the whole input sequence x is processed the tensor of the inner dot product qkt has an asymptotic memory complexity of o n2 which usually represents the memory bottleneck in a transformer model this is also the reason why bert base cased has a config max position embedding size of only 512 local self attention local self attention is the obvious solution to reducing the o n2 memory bottleneck allowing us to model longer sequences with a reduced computational cost in local self attention the input x x1 n x1 xn is cut into nc chunks x x1 lc x nc 1 lc nc lc each of length config local chunk length i e lc and subsequently global self attention is applied on each chunk separately let s take our input sequence for n 16 dh 3 again for visualization assuming lc 4 nc 4 chunked attention can be illustrated as follows as can be seen the attention operation is applied for each chunk x1 4 x5 8 x9 12 x13 16 individually the first drawback of this architecture becomes obvious some input vectors have no access to their immediate context e g x9 has no access to x8 and vice versa in our example this is problematic because these tokens are not able to learn word representations that take their immediate context into account a simple remedy is to augment each chunk with config local num chunks before i e np chunks and config local num chunks after i e na so that every input vector has at least access to np previous input vectors and na following input vectors this can also be understood as chunking with overlap whereas np and na define the amount of overlap each chunk has with all previous chunks and following chunks we denote this extended local self attention as follows zloc z1 lcloc z nc 1 lc nc lcloc with zlc i 1 1 lc iloc selfattn xlc i 1 np 1 lc i na np lc na lc i 1 nc okay this formula looks quite complicated let s make it easier in reformer s self attention layers na is usually set to 0 and np is set to 1 so let s write down the formula again for i 1 z1 lcloc selfattn x lc 1 lc lc we notice that we have a circular relationship so that the first segment can attend the last segment as well let s illustrate this slightly enhanced local attention again first we apply self attention within each windowed segment and keep only the central output segment finally the relevant output is concatenated to zloc and looks as follows note that local self attention is implemented efficiently way so that no output is computed and subsequently thrown out as shown here for illustration purposes by the red cross it s important to note here that extending the input vectors for each chunked self attention function allows each single output vector zi of this self attention function to learn better vector representations e g each of the output vectors z5loc z6loc z7loc z8loc can take into account all of the input vectors x1 8 to learn better representations the gain in memory consumption is quite obvious the o n2 memory complexity is broken down for each segment individually so that the total asymptotic memory consumption is reduced to o nc lc2 o n lc this enhanced local self attention is better than the vanilla local self attention architecture but still has a major drawback in that every input vector can only attend to a local context of predefined size for nlp tasks that do not require the transformer model to learn long range dependencies between the input vectors which include arguably e g speech recognition named entity recognition and causal language modeling of short sentences this might not be a big issue many nlp tasks do require the model to learn long range dependencies so that local self attention could lead to significant performance degradation e g question answering the model has to learn the relationship between the question tokens and relevant answer tokens which will most likely not be in the same local range multiple choice the model has to compare multiple answer token segments to each other which are usually separated by a significant length summarization the model has to learn the relationship between a long sequence of context tokens and a shorter sequence of summary tokens whereas the relevant relationships between context and summary can most likely not be captured by local self attention etc local self attention on its own is most likely not sufficient for the transformer model to learn the relevant relationships of input vectors tokens to each other therefore reformer additionally employs an efficient self attention layer that approximates global self attention called lsh self attention lsh self attention alright now that we have understood how local self attention works we can take a stab at the probably most innovative piece of reformer locality sensitive hashing lsh self attention the premise of lsh self attention is to be more or less as efficient as local self attention while approximating global self attention lsh self attention relies on the lsh algorithm as presented in andoni et al 2015 hence its name the idea behind lsh self attention is based on the insight that if n is large the softmax applied on the qkt attention dot product weights only very few value vectors with values significantly larger than 0 for each query vector let s explain this in more detail let ki k k1 kn t and qi q q1 qn t be the key and query vectors for each qi the computation softmax qitkt can be approximated by using only those key vectors of kj that have a high cosine similarity with qi this owes to the fact that the softmax function puts exponentially more weight on larger input values so far so good the next problem is to efficiently find the vectors that have a high cosine similarity with qi for all i first the authors of reformer notice that sharing the query and key projections q k does not impact the performance of a transformer model 1 now instead of having to find the key vectors of high cosine similarity for each query vector qi only the cosine similarity of query vectors to each other has to be found this is important because there is a transitive property to the query query vector dot product approximation if qi has a high cosine similarity to the query vectors qj and qk then qj also has a high cosine similarity to qk therefore the query vectors can be clustered into buckets such that all query vectors that belong to the same bucket have a high cosine similarity to each other let s define cm as the mth set of position indices such that their corresponding query vectors are in the same bucket cm i s t qi mth cluster and config num buckets i e nb as the number of buckets for each set of indices cm the softmax function on the corresponding bucket of query vectors softmax qi cmqi cmt approximates the softmax function of global self attention with shared query and key projections softmax qitqt for all position indices i in cm second the authors make use of the lsh algorithm to cluster the query vectors into a predefined number of buckets nb the lsh algorithm is an ideal choice here because it is very efficient and is an approximation of the nearest neighbor algorithm for cosine similarity explaining the lsh scheme is out of scope for this notebook so let s just keep in mind that for each vector qi the lsh algorithm attributes its position index i to one of nb predefined buckets i e lsh qi m with i 1 n and m 1 nb visually we can illustrate this as follows for our original example third it can be noted that having clustered all query vectors in nb buckets the corresponding set of indices cm can be used to permute the input vectors x1 xn accordingly 2 so that shared query key self attention can be applied piecewise similar to local attention let s clarify with our example input vectors x x1 x16 and assume config num buckets 4 and config lsh chunk length 4 looking at the graphic above we can see that we have assigned each query vector q1 q16 to one of the clusters c1 c2 c3 c4 if we now sort the corresponding input vectors x1 x16 accordingly we get the following permuted input x the self attention mechanism should be applied for each cluster individually so that for each cluster cm the corresponding output is calculated as follows zi cmlsh selfattnq k xi cm let s illustrate this again for our example as can be seen the self attention function operates on different sizes of matrices which is suboptimal for efficient batching in gpu and tpu to overcome this problem the permuted input can be chunked the same way it is done for local attention so that each chunk is of size config lsh chunk length by chunking the permuted input a bucket might be split into two different chunks to remedy this problem in lsh self attention each chunk attends to its previous chunk config lsh num chunks before 1 in addition to itself the same way local self attention does config lsh num chunks after is usually set to 0 this way we can be assured that all vectors in a bucket attend to each other with a high probability 3 all in all for all chunks k 1 nc lsh self attention can be noted down as follows z lc k 1 lc k 1 lsh selfattnq k x lc k 1 lc k 1 lc with x and z being the input and output vectors permuted according to the lsh algorithm enough complicated formulas let s illustrate lsh self attention the permuted vectors x as shown above are chunked and shared query key self attention is applied to each chunk finally the output z lsh is reordered to its original permutation one important feature to mention here as well is that the accuracy of lsh self attention can be improved by running lsh self attention config num hashes e g nh times in parallel each with a different random lsh hash by setting config num hashes 1 for each output position i multiple output vectors zilsh 1 zilsh nh are computed and subsequently merged zilsh knhzilsh k weightik the weightik represents the importance of the output vectors zilsh k of hashing round k in comparison to the other hashing rounds and is exponentially proportional to the normalization term of their softmax computation the intuition behind this is that if the corresponding query vector qik have a high cosine similarity with all other query vectors in its respective chunk then the softmax normalization term of this chunk tends to be high so that the corresponding output vectors qik should be a better approximation to global attention and thus receive more weight than output vectors of hashing rounds with a lower softmax normalization term for more detail see appendix a of the paper for our example multi round lsh self attention can be illustrated as follows great that s it now we know how lsh self attention works in reformer regarding the memory complexity we now have two terms that compete which each other to be the memory bottleneck the dot product o nh nc lc2 o n nh lc and the required memory for lsh bucketing o n nh 2nb with lc being the chunk length because for large n the number of buckets 2nb grows much faster than the chunk length lc the user can again factorize the number of buckets config num buckets as explained here let s recap quickly what we have gone through above we want to approximate global attention using the knowledge that the softmax operation only puts significant weights on very few key vectors if key vectors are equal to query vectors this means that for each query vector qi the softmax only puts significant weight on other query vectors that are similar in terms of cosine similarity this relationship works in both ways meaning if qj is similar to qi than qj is also similar to qi so that we can do a global clustering before applying self attention on a permuted input we apply local self attention on the permuted input and re order the output to its original permutation 1 the authors run some preliminary experiments confirming that shared query key self attention performs more or less as well as standard self attention 2 to be more exact the query vectors within a bucket are sorted according to their original order this means if e g the vectors q1 q3 q7 are all hashed to bucket 2 the order of the vectors in bucket 2 would still be q1 followed by q3 and q7 3 on a side note it is to mention the authors put a mask on the query vector qi to prevent the vector from attending to itself because the cosine similarity of a vector to itself will always be as high or higher than the cosine similarity to other vectors the query vectors in shared query key self attention are strongly discouraged to attend to themselves benchmark benchmark tools were recently added to transformers see here for a more detailed explanation to show how much memory can be saved using local lsh self attention the reformer model google reformer enwik8 is benchmarked for different local attn chunk length and lsh attn chunk length the default configuration and usage of the google reformer enwik8 model can be checked in more detail here let s first do some necessary imports and installs title installs and imports pip installs pip qq install git https github com huggingface transformers git pip install qq py3nvml from transformers import reformerconfig pytorchbenchmark pytorchbenchmarkarguments first let s benchmark the memory usage of the reformer model using global self attention this can be achieved by setting lsh attn chunk length local attn chunk length 8192 so that for all input sequences smaller or equal to 8192 the model automatically switches to global self attention config reformerconfig from pretrained google reformer enwik8 lsh attn chunk length 16386 local attn chunk length 16386 lsh num chunks before 0 local num chunks before 0 benchmark args pytorchbenchmarkarguments sequence lengths 2048 4096 8192 16386 batch sizes 1 models reformer no speed true no env print true benchmark pytorchbenchmark configs config args benchmark args result benchmark run hbox children floatprogress value 0 0 description downloading max 1279 0 style progressstyle description 1 1 doesn t fit on gpu cuda out of memory tried to allocate 2 00 gib gpu 0 11 17 gib total capacity 8 87 gib already allocated 1 92 gib free 8 88 gib reserved in total by pytorch inference memory result model name batch size seq length memory in mb reformer 1 2048 1465 reformer 1 4096 2757 reformer 1 8192 7893 reformer 1 16386 n a the longer the input sequence the more visible is the quadratic relationship o n2 between input sequence and peak memory usage as can be seen in practice it would require a much longer input sequence to clearly observe that doubling the input sequence quadruples the peak memory usage for this a google reformer enwik8 model using global attention a sequence length of over 16k results in a memory overflow now let s activate local and lsh self attention by using the model s default parameters config reformerconfig from pretrained google reformer enwik8 benchmark args pytorchbenchmarkarguments sequence lengths 2048 4096 8192 16384 32768 65436 batch sizes 1 models reformer no speed true no env print true benchmark pytorchbenchmark configs config args benchmark args result benchmark run 1 1 doesn t fit on gpu cuda out of memory tried to allocate 2 00 gib gpu 0 11 17 gib total capacity 7 85 gib already allocated 1 74 gib free 9 06 gib reserved in total by pytorch doesn t fit on gpu cuda out of memory tried to allocate 4 00 gib gpu 0 11 17 gib total capacity 6 56 gib already allocated 3 99 gib free 6 81 gib reserved in total by pytorch inference memory result model name batch size seq length memory in mb reformer 1 2048 1785 reformer 1 4096 2621 reformer 1 8192 4281 reformer 1 16384 7607 reformer 1 32768 n a reformer 1 65436 n a as expected using local and lsh self attention is much more memory efficient for longer input sequences so that the model runs out of memory only at 16k tokens for a 11gb ram gpu in this notebook", "source_text": "1. Reformer Self-Attention Layer\n\nReformer uses two kinds of special self-attention layers: local self-attention layers and Locality Sensitive Hashing (LSH) self-attention layers.\n\nTo better introduce these new self-attention layers, we will briefly recap conventional self-attention as introduced in Vaswani et al. 2017.\n\nThis blog post uses the same notation and coloring as the popular blog post The illustrated transformer, so the reader is strongly advised to read this blog first.\n\nImportant: While Reformer was originally introduced for causal self-attention, it can very well be used for bi-directional self-attention as well. In this post, Reformer's self-attention is presented for bidirectional self-attention.\n\nRecap Global Self-Attention\n\nThe core of every Transformer model is the self-attention layer. To recap the conventional self-attention layer, which we refer to here as the global self-attention layer, let us assume we apply a transformer layer on the embedding vector sequence \nX=x1​,…,xn​\n where each vector \nxi​\n is of size config.hidden_size, i.e. \ndh​\n.\n\nIn short, a global self-attention layer projects \nX to the query, key and value matrices \nQ,K,V and computes the output \nZ using the softmax operation as follows: \nZ=SelfAttn(X)=softmax(QKT)V with \nZ being of dimension \ndh​×n (leaving out the key normalization factor and self-attention weights \nWO\n for simplicity). For more detail on the complete transformer operation, see the illustrated transformer.\n\nVisually, we can illustrate this operation as follows for \nn=16,dh​=3:\n\nNote that for all visualizations batch_size and config.num_attention_heads is assumed to be 1. Some vectors, e.g. \nx3​\n and its corresponding output vector \nz3​\n are marked so that LSH self-attention can later be better explained. The presented logic can effortlessly be extended for multi-head self-attention (config.num_attention_{h}eads > 1). The reader is advised to read the illustrated transformer as a reference for multi-head self-attention.\n\nImportant to remember is that for each output vector \nzi​\n, the whole input sequence \nX is processed. The tensor of the inner dot-product \nQKT\n has an asymptotic memory complexity of \nO(n2) which usually represents the memory bottleneck in a transformer model.\n\nThis is also the reason why bert-base-cased has a config.max_position_embedding_size of only 512.\n\nLocal Self-Attention\n\nLocal self-attention is the obvious solution to reducing the \nO(n2) memory bottleneck, allowing us to model longer sequences with a reduced computational cost. In local self-attention the input \nX=X1:n​=x1​,…,xn​\n is cut into \nnc​\n chunks: \nX=[X1:lc​​,…,X(nc​−1)∗lc​:nc​∗lc​​] each of length config.local_chunk_length, i.e. \nlc​\n, and subsequently global self-attention is applied on each chunk separately.\n\nLet's take our input sequence for \nn=16,dh​=3 again for visualization:\n\nAssuming \nlc​=4,nc​=4, chunked attention can be illustrated as follows:\n\nAs can be seen, the attention operation is applied for each chunk \nX1:4​,X5:8​,X9:12​,X13:16​\n individually. The first drawback of this architecture becomes obvious: Some input vectors have no access to their immediate context, e.g. \nx9​\n has no access to \nx8​\n and vice-versa in our example. This is problematic because these tokens are not able to learn word representations that take their immediate context into account.\n\nA simple remedy is to augment each chunk with config.local_num_chunks_before, i.e. \nnp​\n, chunks and config.local_num_chunks_after, i.e. \nna​\n, so that every input vector has at least access to \nnp​\n previous input vectors and \nna​\n following input vectors. This can also be understood as chunking with overlap whereas \nnp​\n and \nna​\n define the amount of overlap each chunk has with all previous chunks and following chunks. We denote this extended local self-attention as follows:\n\nZloc=[Z1:lc​loc​,…,Z(nc​−1)∗lc​:nc​∗lc​loc​],\nwith\nZlc​∗(i−1)+1:lc​∗iloc​=SelfAttn(Xlc​∗(i−1−np​)+1:lc​∗(i+na​)​)[np​∗lc​:−na​∗lc​],∀i∈{1,…,nc​}\n\nOkay, this formula looks quite complicated. Let's make it easier. In Reformer's self-attention layers \nna​\n is usually set to 0 and \nnp​\n is set to 1, so let's write down the formula again for \ni=1:\n\nZ1:lc​loc​=SelfAttn(X−lc​+1:lc​​)[lc​:]\n\nWe notice that we have a circular relationship so that the first segment can attend the last segment as well. Let's illustrate this slightly enhanced local attention again. First, we apply self-attention within each windowed segment and keep only the central output segment.\n\nFinally, the relevant output is concatenated to \nZloc\n and looks as follows.\n\nNote that local self-attention is implemented efficiently way so that no output is computed and subsequently \"thrown-out\" as shown here for illustration purposes by the red cross.\n\nIt's important to note here that extending the input vectors for each chunked self-attention function allows each single output vector \nzi​\n of this self-attention function to learn better vector representations. E.g. each of the output vectors \nz5loc​,z6loc​,z7loc​,z8loc​\n can take into account all of the input vectors \nX1:8​\n to learn better representations.\n\nThe gain in memory consumption is quite obvious: The \nO(n2) memory complexity is broken down for each segment individually so that the total asymptotic memory consumption is reduced to \nO(nc​∗lc2​)=O(n∗lc​).\n\nThis enhanced local self-attention is better than the vanilla local self-attention architecture but still has a major drawback in that every input vector can only attend to a local context of predefined size. For NLP tasks that do not require the transformer model to learn long-range dependencies between the input vectors, which include arguably e.g. speech recognition, named entity recognition and causal language modeling of short sentences, this might not be a big issue. Many NLP tasks do require the model to learn long-range dependencies, so that local self-attention could lead to significant performance degradation, e.g.\n\nQuestion-answering: the model has to learn the relationship between the question tokens and relevant answer tokens which will most likely not be in the same local range\nMultiple-Choice: the model has to compare multiple answer token segments to each other which are usually separated by a significant length\nSummarization: the model has to learn the relationship between a long sequence of context tokens and a shorter sequence of summary tokens, whereas the relevant relationships between context and summary can most likely not be captured by local self-attention\netc...\n\nLocal self-attention on its own is most likely not sufficient for the transformer model to learn the relevant relationships of input vectors (tokens) to each other.\n\nTherefore, Reformer additionally employs an efficient self-attention layer that approximates global self-attention, called LSH self-attention.\n\nLSH Self-Attention\n\nAlright, now that we have understood how local self-attention works, we can take a stab at the probably most innovative piece of Reformer: Locality sensitive hashing (LSH) Self-Attention.\n\nThe premise of LSH self-attention is to be more or less as efficient as local self-attention while approximating global self-attention.\n\nLSH self-attention relies on the LSH algorithm as presented in Andoni et al (2015), hence its name.\n\nThe idea behind LSH self-attention is based on the insight that if \nn is large, the softmax applied on the \nQKT\n attention dot-product weights only very few value vectors with values significantly larger than 0 for each query vector.\n\nLet's explain this in more detail. Let \nki​∈K=[k1​,…,kn​]T\n and \nqi​∈Q=[q1​,…,qn​]T\n be the key and query vectors. For each \nqi​\n, the computation \nsoftmax(qiT​KT) can be approximated by using only those key vectors of \nkj​\n that have a high cosine similarity with \nqi​\n. This owes to the fact that the softmax function puts exponentially more weight on larger input values. So far so good, the next problem is to efficiently find the vectors that have a high cosine similarity with \nqi​\n for all \ni.\n\nFirst, the authors of Reformer notice that sharing the query and key projections: \nQ=K does not impact the performance of a transformer model \n1\n. Now, instead of having to find the key vectors of high cosine similarity for each query vector \nqi​\n, only the cosine similarity of query vectors to each other has to be found. This is important because there is a transitive property to the query-query vector dot product approximation: If \nqi​\n has a high cosine similarity to the query vectors \nqj​\n and \nqk​\n, then \nqj​\n also has a high cosine similarity to \nqk​\n. Therefore, the query vectors can be clustered into buckets, such that all query vectors that belong to the same bucket have a high cosine similarity to each other. Let's define \nCm​\n as the mth set of position indices, such that their corresponding query vectors are in the same bucket: \nCm​={i∣ s.t. qi​∈mth cluster} and config.num_buckets, i.e. \nnb​\n, as the number of buckets.\n\nFor each set of indices \nCm​\n, the softmax function on the corresponding bucket of query vectors \nsoftmax(Qi∈Cm​​Qi∈Cm​T​) approximates the softmax function of global self-attention with shared query and key projections \nsoftmax(qiT​QT) for all position indices \ni in \nCm​\n.\n\nSecond, the authors make use of the LSH algorithm to cluster the query vectors into a predefined number of buckets \nnb​\n. The LSH algorithm is an ideal choice here because it is very efficient and is an approximation of the nearest neighbor algorithm for cosine similarity. Explaining the LSH scheme is out-of-scope for this notebook, so let's just keep in mind that for each vector \nqi​\n the LSH algorithm attributes its position index \ni to one of \nnb​\n predefined buckets, i.e. \nLSH(qi​)=m with \ni∈{1,…,n} and \nm∈{1,…,nb​}.\n\nVisually, we can illustrate this as follows for our original example:\n\nThird, it can be noted that having clustered all query vectors in \nnb​\n buckets, the corresponding set of indices \nCm​\n can be used to permute the input vectors \nx1​,…,xn​\n accordingly \n2\n so that shared query-key self-attention can be applied piecewise similar to local attention.\n\nLet's clarify with our example input vectors \nX=x1​,...,x16​\n and assume config.num_buckets=4 and config.lsh_chunk_length = 4. Looking at the graphic above we can see that we have assigned each query vector \nq1​,…,q16​\n to one of the clusters \nC1​,C2​,C3​,C4​\n . If we now sort the corresponding input vectors \nx1​,…,x16​\n accordingly, we get the following permuted input \nX′\n:\n\nThe self-attention mechanism should be applied for each cluster individually so that for each cluster \nCm​\n the corresponding output is calculated as follows: \nZi∈Cm​LSH​=SelfAttnQ=K​(Xi∈Cm​​).\n\nLet's illustrate this again for our example.\n\nAs can be seen, the self-attention function operates on different sizes of matrices, which is suboptimal for efficient batching in GPU and TPU.\n\nTo overcome this problem, the permuted input can be chunked the same way it is done for local attention so that each chunk is of size config.lsh_chunk_length. By chunking the permuted input, a bucket might be split into two different chunks. To remedy this problem, in LSH self-attention each chunk attends to its previous chunk config.lsh_num_chunks_before=1 in addition to itself, the same way local self-attention does (config.lsh_num_chunks_after is usually set to 0). This way, we can be assured that all vectors in a bucket attend to each other with a high probability \n3\n.\n\nAll in all for all chunks \nk∈{1,…,nc​}, LSH self-attention can be noted down as follows:\n\nZ′lc​∗k+1:lc​∗(k+1)LSH​=SelfAttnQ=K​(X′lc​∗k+1):lc​∗(k+1)​)[lc​:]\n\nwith \nX′\n and \nZ′\n being the input and output vectors permuted according to the LSH algorithm. Enough complicated formulas, let's illustrate LSH self-attention.\n\nThe permuted vectors \nX′\n as shown above are chunked and shared query key self-attention is applied to each chunk.\n\nFinally, the output \nZ′LSH\n is reordered to its original permutation.\n\nOne important feature to mention here as well is that the accuracy of LSH self-attention can be improved by running LSH self-attention config.num_hashes, e.g. \nnh​\n times in parallel, each with a different random LSH hash. By setting config.num_hashes > 1, for each output position \ni, multiple output vectors \nziLSH,1​,…,ziLSH,nh​​\n are computed and subsequently merged: \nziLSH​=∑knh​​ZiLSH,k​∗weightik​\n. The \nweightik​\n represents the importance of the output vectors \nziLSH,k​\n of hashing round \nk in comparison to the other hashing rounds, and is exponentially proportional to the normalization term of their softmax computation. The intuition behind this is that if the corresponding query vector \nqik​\n have a high cosine similarity with all other query vectors in its respective chunk, then the softmax normalization term of this chunk tends to be high, so that the corresponding output vectors \nqik​\n should be a better approximation to global attention and thus receive more weight than output vectors of hashing rounds with a lower softmax normalization term. For more detail see Appendix A of the paper. For our example, multi-round LSH self-attention can be illustrated as follows.\n\nGreat. That's it. Now we know how LSH self-attention works in Reformer.\n\nRegarding the memory complexity, we now have two terms that compete which each other to be the memory bottleneck: the dot-product: \nO(nh​∗nc​∗lc2​)=O(n∗nh​∗lc​) and the required memory for LSH bucketing: \nO(n∗nh​∗2nb​​) with \nlc​\n being the chunk length. Because for large \nn, the number of buckets \n2nb​​\n grows much faster than the chunk length \nlc​\n, the user can again factorize the number of buckets config.num_buckets as explained here.\n\nLet's recap quickly what we have gone through above:\n\nWe want to approximate global attention using the knowledge that the softmax operation only puts significant weights on very few key vectors.\nIf key vectors are equal to query vectors this means that for each query vector \nqi​\n, the softmax only puts significant weight on other query vectors that are similar in terms of cosine similarity.\nThis relationship works in both ways, meaning if \nqj​\n is similar to \nqi​\n than \nqj​\n is also similar to \nqi​\n, so that we can do a global clustering before applying self-attention on a permuted input.\nWe apply local self-attention on the permuted input and re-order the output to its original permutation.\n\n1\n The authors run some preliminary experiments confirming that shared query key self-attention performs more or less as well as standard self-attention.\n\n2\n To be more exact the query vectors within a bucket are sorted according to their original order. This means if, e.g. the vectors \nq1​,q3​,q7​\n are all hashed to bucket 2, the order of the vectors in bucket 2 would still be \nq1​\n, followed by \nq3​\n and \nq7​\n.\n\n3\n On a side note, it is to mention the authors put a mask on the query vector \nqi​\n to prevent the vector from attending to itself. Because the cosine similarity of a vector to itself will always be as high or higher than the cosine similarity to other vectors, the query vectors in shared query key self-attention are strongly discouraged to attend to themselves.\n\nBenchmark\n\nBenchmark tools were recently added to Transformers - see here for a more detailed explanation.\n\nTo show how much memory can be saved using \"local\" + \"LSH\" self-attention, the Reformer model google/reformer-enwik8 is benchmarked for different local_attn_chunk_length and lsh_attn_chunk_length. The default configuration and usage of the google/reformer-enwik8 model can be checked in more detail here.\n\nLet's first do some necessary imports and installs.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, PyTorchBenchmark, PyTorchBenchmarkArguments\n\n\nFirst, let's benchmark the memory usage of the Reformer model using global self-attention. This can be achieved by setting lsh_attn_chunk_length = local_attn_chunk_length = 8192 so that for all input sequences smaller or equal to 8192, the model automatically switches to global self-attention.\n\nconfig = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", lsh_attn_chunk_length=16386, local_attn_chunk_length=16386, lsh_num_chunks_before=0, local_num_chunks_before=0)\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[2048, 4096, 8192, 16386], batch_sizes=[1], models=[\"Reformer\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config], args=benchmark_args)\nresult = benchmark.run()\n\nHBox(children=(FloatProgress(value=0.0, description='Downloading', max=1279.0, style=ProgressStyle(description…\n\n\n\n1 / 1\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 8.87 GiB already allocated; 1.92 GiB free; 8.88 GiB reserved in total by PyTorch)\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer 1 2048 1465 \n Reformer 1 4096 2757 \n Reformer 1 8192 7893 \n Reformer 1 16386 N/A \n--------------------------------------------------------------------------------\n\n\nThe longer the input sequence, the more visible is the quadratic relationship \nO(n2) between input sequence and peak memory usage. As can be seen, in practice it would require a much longer input sequence to clearly observe that doubling the input sequence quadruples the peak memory usage.\n\nFor this a google/reformer-enwik8 model using global attention, a sequence length of over 16K results in a memory overflow.\n\nNow, let's activate local and LSH self-attention by using the model's default parameters.\n\n config = ReformerConfig.from_pretrained(\"google/reformer-enwik8\")\n benchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[2048, 4096, 8192, 16384, 32768, 65436], batch_sizes=[1], models=[\"Reformer\"], no_speed=True, no_env_print=True)\n benchmark = PyTorchBenchmark(configs=[config], args=benchmark_args)\n result = benchmark.run()\n\n1 / 1\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 7.85 GiB already allocated; 1.74 GiB free; 9.06 GiB reserved in total by PyTorch)\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 4.00 GiB (GPU 0; 11.17 GiB total capacity; 6.56 GiB already allocated; 3.99 GiB free; 6.81 GiB reserved in total by PyTorch)\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer 1 2048 1785 \n Reformer 1 4096 2621 \n Reformer 1 8192 4281 \n Reformer 1 16384 7607 \n Reformer 1 32768 N/A \n Reformer 1 65436 N/A \n--------------------------------------------------------------------------------\n\n\nAs expected using local and LSH self-attention is much more memory efficient for longer input sequences, so that the model runs out of memory only at 16K tokens for a 11GB RAM GPU in this notebook.", "segmentation_method": "reviewed_source_semantics", "label": "1. Reformer Self-Attention Layer", "source_line_range": [ 22, 421 ] }, { "id": "body-region-3", "text": "2 chunked feed forward layers transformer based models often employ very large feed forward layers after the self attention layer in parallel thereby this layer can take up a significant amount of the overall memory and sometimes even represent the memory bottleneck of a model first introduced in the reformer paper feed forward chunking is a technique that allows to effectively trade better memory consumption for increased time consumption chunked feed forward layer in reformer in reformer the lsh or local self attention layer is usually followed by a residual connection which then defines the first part in a transformer block for more detail on this please refer to this blog the output of the first part of the transformer block called normed self attention output can be written as z z x with z being either zlsh or zloc in reformer for our example input x1 x16 we illustrate the normed self attention output as follows now the second part of a transformer block usually consists of two feed forward layers 1 defined as linearint that processes z to an intermediate output yint and linearout that processes the intermediate output to the output yout the two feed forward layers can be defined by yout linearout yint linearout linearint z it is important to remember at this point that mathematically the output of a feed forward layer at position yout i only depends on the input at this position yi in contrast to the self attention layer every output yout i is therefore completely independent of all inputs yj i of different positions let s illustrate the feed forward layers for z1 z16 as can be depicted from the illustration all input vectors zi are processed by the same feed forward layer in parallel it becomes interesting when one takes a look at the output dimensions of the feed forward layers in reformer the output dimension of linearint is defined as config feed forward size e g df and the output dimension of linearout is defined as config hidden size i e dh the reformer authors observed that in a transformer model the intermediate dimension df usually tends to be much larger than the output dimension 2 dh this means that the tensor yint of dimension df n allocates a significant amount of the total memory and can even become the memory bottleneck to get a better feeling for the differences in dimensions let s picture the matrices yint and yout for our example it is becoming quite obvious that the tensor yint holds much more memory dhdf n as much to be exact than yout but is it even necessary to compute the full intermediate matrix yint not really because relevant is only the output matrix yout to trade memory for speed one can thus chunk the linear layers computation to only process one chunk at the time defining config chunk size feed forward as cf chunked linear layers are defined as yout yout 1 cf yout n cf n with yout cf i i cf i linearout linearint z cf i i cf i in practice it just means that the output is incrementally computed and concatenated to avoid having to store the whole intermediate tensor yint in memory assuming cf 1 for our example we can illustrate the incremental computation of the output for position i 9 as follows by processing the inputs in chunks of size 1 the only tensors that have to be stored in memory at the same time are yout of a maximum size of 16 dh yint i of size df and the input z of size 16 dh with dh being config hidden size 3 finally it is important to remember that chunked linear layers yield a mathematically equivalent output to conventional linear layers and can therefore be applied to all transformer linear layers making use of config chunk size feed forward therefore allows a better trade off between memory and speed in certain use cases 1 for a simpler explanation the layer norm layer which is normally applied to z before being processed by the feed forward layers is omitted for now 2 in bert base uncased e g the intermediate dimension df is with 3072 four times larger than the output dimension dh 3 as a reminder the output config num attention heads is assumed to be 1 for the sake of clarity and illustration in this notebook so that the output of the self attention layers can be assumed to be of size config hidden size more information on chunked linear feed forward layers can also be found here on the transformers docs benchmark let s test how much memory can be saved by using chunked feed forward layers title installs and imports pip installs pip qq install git https github com huggingface transformers git pip install qq py3nvml from transformers import reformerconfig pytorchbenchmark pytorchbenchmarkarguments building wheel for transformers setup py 25l 25hdone first let s compare the default google reformer enwik8 model without chunked feed forward layers to the one with chunked feed forward layers config no chunk reformerconfig from pretrained google reformer enwik8 no chunk config chunk reformerconfig from pretrained google reformer enwik8 chunk size feed forward 1 feed forward chunk benchmark args pytorchbenchmarkarguments sequence lengths 1024 2048 4096 batch sizes 8 models reformer no chunk reformer chunk no speed true no env print true benchmark pytorchbenchmark configs config no chunk config chunk args benchmark args result benchmark run 1 2 doesn t fit on gpu cuda out of memory tried to allocate 2 00 gib gpu 0 11 17 gib total capacity 7 85 gib already allocated 1 74 gib free 9 06 gib reserved in total by pytorch 2 2 doesn t fit on gpu cuda out of memory tried to allocate 2 00 gib gpu 0 11 17 gib total capacity 7 85 gib already allocated 1 24 gib free 9 56 gib reserved in total by pytorch inference memory result model name batch size seq length memory in mb reformer no chunk 8 1024 4281 reformer no chunk 8 2048 7607 reformer no chunk 8 4096 n a reformer chunk 8 1024 4309 reformer chunk 8 2048 7669 reformer chunk 8 4096 n a interesting chunked feed forward layers do not seem to help here at all the reason is that config feed forward size is not sufficiently large to make a real difference only at longer sequence lengths of 4096 a slight decrease in memory usage can be seen let s see what happens to the memory peak usage if we increase the size of the feed forward layer by a factor of 4 and reduce the number of attention heads also by a factor of 4 so that the feed forward layer becomes the memory bottleneck config no chunk reformerconfig from pretrained google reformer enwik8 chunk size feed forward 0 num attention h eads 2 feed forward size 16384 no chuck config chunk reformerconfig from pretrained google reformer enwik8 chunk size feed forward 1 num attention h eads 2 feed forward size 16384 feed forward chunk benchmark args pytorchbenchmarkarguments sequence lengths 1024 2048 4096 batch sizes 8 models reformer no chunk reformer chunk no speed true no env print true benchmark pytorchbenchmark configs config no chunk config chunk args benchmark args result benchmark run 1 2 2 inference memory result model name batch size seq length memory in mb reformer no chunk 8 1024 3743 reformer no chunk 8 2048 5539 reformer no chunk 8 4096 9087 reformer chunk 8 1024 2973 reformer chunk 8 2048 3999 reformer chunk 8 4096 6011 now a clear decrease in peak memory usage can be seen for longer input sequences as a conclusion it should be noted chunked feed forward layers only makes sense for models having few attention heads and large feed forward layers", "source_text": "2. Chunked Feed Forward Layers\n\nTransformer-based models often employ very large feed forward layers after the self-attention layer in parallel. Thereby, this layer can take up a significant amount of the overall memory and sometimes even represent the memory bottleneck of a model. First introduced in the Reformer paper, feed forward chunking is a technique that allows to effectively trade better memory consumption for increased time consumption.\n\nChunked Feed Forward Layer in Reformer\n\nIn Reformer, the LSH- or local self-attention layer is usually followed by a residual connection, which then defines the first part in a transformer block. For more detail on this please refer to this blog.\n\nThe output of the first part of the transformer block, called normed self-attention output can be written as \nZ=Z+X, with \nZ being either \nZLSH\n or \nZloc\n in Reformer.\n\nFor our example input \nx1​,…,x16​\n, we illustrate the normed self-attention output as follows.\n\nNow, the second part of a transformer block usually consists of two feed forward layers \n1\n, defined as \nLinearint​(…) that processes \nZ\n, to an intermediate output \nYint​\n and \nLinearout​(…) that processes the intermediate output to the output \nYout​\n. The two feed forward layers can be defined by\n\nYout​=Linearout​(Yint​)=Linearout​(Linearint​(Z)).\n\nIt is important to remember at this point that mathematically the output of a feed forward layer at position \nyout,i​\n only depends on the input at this position \ny​i​\n. In contrast to the self-attention layer, every output \nyout,i​\n is therefore completely independent of all inputs \ny​j=i​\n of different positions.\n\nLet's illustrate the feed forward layers for \nz1​,…,z16​\n.\n\nAs can be depicted from the illustration, all input vectors \nzi​\n are processed by the same feed forward layer in parallel.\n\nIt becomes interesting when one takes a look at the output dimensions of the feed forward layers. In Reformer, the output dimension of \nLinearint​\n is defined as config.feed_forward_size, e.g. \ndf​\n, and the output dimension of \nLinearout​\n is defined as config.hidden_size, i.e. \ndh​\n.\n\nThe Reformer authors observed that in a transformer model the intermediate dimension \ndf​\n usually tends to be much larger than the output dimension \n2\n \ndh​\n. This means that the tensor \nYint​\n of dimension \ndf​×n allocates a significant amount of the total memory and can even become the memory bottleneck.\n\nTo get a better feeling for the differences in dimensions let's picture the matrices \nYint​\n and \nYout​\n for our example.\n\nIt is becoming quite obvious that the tensor \nYint​\n holds much more memory ( \ndh​df​​×n as much to be exact) than \nYout​\n. But, is it even necessary to compute the full intermediate matrix \nYint​\n ? Not really, because relevant is only the output matrix \nYout​\n. To trade memory for speed, one can thus chunk the linear layers computation to only process one chunk at the time. Defining config.chunk_size_feed_forward as \ncf​\n, chunked linear layers are defined as \nYout​=[Yout,1:cf​​,…,Yout,(n−cf​):n​] with \nYout,(cf​∗i):(i∗cf​+i)​=Linearout​(Linearint​(Z(cf​∗i):(i∗cf​+i)​)). In practice, it just means that the output is incrementally computed and concatenated to avoid having to store the whole intermediate tensor \nYint​\n in memory.\n\nAssuming \ncf​=1 for our example we can illustrate the incremental computation of the output for position \ni=9 as follows.\n\nBy processing the inputs in chunks of size 1, the only tensors that have to be stored in memory at the same time are \nYout​\n of a maximum size of \n16×dh​\n, \nyint,i​\n of size \ndf​\n and the input \nZ\n of size \n16×dh​\n, with \ndh​\n being config.hidden_size \n3\n.\n\nFinally, it is important to remember that chunked linear layers yield a mathematically equivalent output to conventional linear layers and can therefore be applied to all transformer linear layers. Making use of config.chunk_size_feed_forward therefore allows a better trade-off between memory and speed in certain use cases.\n\n1\n For a simpler explanation, the layer norm layer which is normally applied to \nZ\n before being processed by the feed forward layers is omitted for now.\n\n2\n In bert-base-uncased, e.g. the intermediate dimension \ndf​\n is with 3072 four times larger than the output dimension \ndh​\n.\n\n3\n As a reminder, the output config.num_attention_heads is assumed to be 1 for the sake of clarity and illustration in this notebook, so that the output of the self-attention layers can be assumed to be of size config.hidden_size.\n\nMore information on chunked linear / feed forward layers can also be found here on the 🤗Transformers docs.\n\nBenchmark\n\nLet's test how much memory can be saved by using chunked feed forward layers.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, PyTorchBenchmark, PyTorchBenchmarkArguments\n\n Building wheel for transformers (setup.py) ... \u001b[?25l\u001b[?25hdone\n\n\nFirst, let's compare the default google/reformer-enwik8 model without chunked feed forward layers to the one with chunked feed forward layers.\n\nconfig_no_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\") # no chunk\nconfig_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", chunk_size_feed_forward=1) # feed forward chunk\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[1024, 2048, 4096], batch_sizes=[8], models=[\"Reformer-No-Chunk\", \"Reformer-Chunk\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_no_chunk, config_chunk], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 2\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 7.85 GiB already allocated; 1.74 GiB free; 9.06 GiB reserved in total by PyTorch)\n2 / 2\nDoesn't fit on GPU. CUDA out of memory. Tried to allocate 2.00 GiB (GPU 0; 11.17 GiB total capacity; 7.85 GiB already allocated; 1.24 GiB free; 9.56 GiB reserved in total by PyTorch)\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer-No-Chunk 8 1024 4281 \n Reformer-No-Chunk 8 2048 7607 \n Reformer-No-Chunk 8 4096 N/A \n Reformer-Chunk 8 1024 4309 \n Reformer-Chunk 8 2048 7669 \n Reformer-Chunk 8 4096 N/A \n--------------------------------------------------------------------------------\n\n\nInteresting, chunked feed forward layers do not seem to help here at all. The reason is that config.feed_forward_size is not sufficiently large to make a real difference. Only at longer sequence lengths of 4096, a slight decrease in memory usage can be seen.\n\nLet's see what happens to the memory peak usage if we increase the size of the feed forward layer by a factor of 4 and reduce the number of attention heads also by a factor of 4 so that the feed forward layer becomes the memory bottleneck.\n\nconfig_no_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", chunk_size_feed_forward=0, num_attention_{h}eads=2, feed_forward_size=16384) # no chuck\nconfig_chunk = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", chunk_size_feed_forward=1, num_attention_{h}eads=2, feed_forward_size=16384) # feed forward chunk\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[1024, 2048, 4096], batch_sizes=[8], models=[\"Reformer-No-Chunk\", \"Reformer-Chunk\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_no_chunk, config_chunk], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 2 / 2\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer-No-Chunk 8 1024 3743 \n Reformer-No-Chunk 8 2048 5539 \n Reformer-No-Chunk 8 4096 9087 \n Reformer-Chunk 8 1024 2973 \n Reformer-Chunk 8 2048 3999 \n Reformer-Chunk 8 4096 6011 \n--------------------------------------------------------------------------------\n\n\nNow a clear decrease in peak memory usage can be seen for longer input sequences. As a conclusion, it should be noted chunked feed forward layers only makes sense for models having few attention heads and large feed forward layers.", "segmentation_method": "reviewed_source_semantics", "label": "2. Chunked Feed Forward Layers", "source_line_range": [ 422, 625 ] }, { "id": "body-region-4", "text": "3 reversible residual layers reversible residual layers were first introduced in n gomez et al and used to reduce memory consumption when training the popular resnet model mathematically reversible residual layers are slightly different to real residual layers but do not require the activations to be saved during the forward pass which can drastically reduce memory consumption for training reversible residual layers in reformer let s start by investigating why training a model requires much more memory than the inference of the model when running a model in inference the required memory equals more or less the memory it takes to compute the single largest tensor in the model on the other hand when training a model the required memory equals more or less the sum of all differentiable tensors this is not surprising when considering how auto differentiation works in deep learning frameworks these lecture slides by roger grosse of the university of toronto are great to better understand auto differentiation in a nutshell in order to calculate the gradient of a differentiable function e g a layer auto differentiation requires the gradient of the function s output and the function s input and output tensor while the gradients are dynamically computed and subsequently discarded the input and output tensors a k a activations of a function are stored during the forward pass alright let s apply this to a transformer model a transformer model includes a stack of multiple so called transformer layers each additional transformer layer forces the model to store more activations during the forward pass and thus increases the required memory for training let s take a more detailed look a transformer layer essentially consists of two residual layers the first residual layer represents the self attention mechanism as explained in section 1 and the second residual layer represents the linear or feed forward layers as explained in section 2 using the same notation as before the input of a transformer layer i e x is first normalized 1 and subsequently processed by the self attention layer to get the output z selfattn layernorm x we will abbreviate these two layers with g so that z g x next the residual z is added to the input z z x and the sum is fed into the second residual layer the two linear layers z is processed by a second normalization layer followed by the two linear layers to get y linear layernorm z x we will abbreviate the second normalization layer and the two linear layers with f yielding y f z finally the residual y is added to z to give the output of the transformer layer y y z let s illustrate a complete transformer layer using the example of x1 x16 to calculate the gradient of e g the self attention block g three tensors have to be known beforehand the gradient z the output z and the input x while z can be calculated on the fly and discarded afterward the values for z and x have to be calculated and stored during the forward pass since it is not possible to recalculate them easily on the fly during backpropagation therefore during the forward pass large tensor outputs such as the query key dot product matrix qkt or the intermediate output of the linear layers yint have to be stored in memory 2 here reversible residual layers come to our help the idea is relatively straight forward the residual block is designed in a way so that instead of having to store the input and output tensor of a function both can easily be recalculated during the backward pass so that no tensor has to be stored in memory during the forward pass this is achieved by using two input streams x 1 x 2 and two output streams y 1 y 2 the first residual z is computed by the first output stream z g x 1 and subsequently added to the input of the second input stream so that z z x 2 similarly the residual y f z is added to the first input stream again so that the two output streams are defined by y 1 y x 1 and y 2 x 2 z z the reversible transformer layer can be visualized for x1 x16 as follows as can be seen the outputs y 1 y 2 are calculated in a very similar way than y of the non reversible layer but they are mathematically different the authors of reformer observe in some initial experiments that the performance of a reversible transformer model matches the performance of a standard transformer model the first visible difference to the standard transformer layer is that there are two input streams and output streams 3 which at first slightly increases the required memory for both the forward pass the two stream architecture is crucial though for not having to save any activations during the forward pass let s explain for backpropagation the reversible transformer layer has to calculate the gradients g and f in addition to the gradients y and z which can be calculated on the fly the tensor values y z have to be known for f and the tensor values z and x 1 for g to make auto differentiation work if we assume to know y 1 y 2 it can easily be depicted from the graph that one can calculate x 1 x 2 as follows x 1 f y 1 y 1 great now that x 1 is known x 2 can be computed by x 2 y 1 g x 1 alright now z and y are trivial to compute via y y 1 x 1 and z y 2 x 2 so as a conclusion if only the outputs y 1 y 2 of the last reversible transformer layer are stored during the forward pass all other relevant activations can be derived by making use of g and f during the backward pass and passing x 1 and x 2 the overhead of two forward passes of g and f per reversible transformer layer during the backpropagation is traded against not having to store any activations during the forward pass not a bad deal note since recently major deep learning frameworks have released code that allows to store only certain activations and recompute larger ones during the backward propagation tensoflow here and pytorch here for standard reversible layers this still means that at least one activation has to be stored for each transformer layer but by defining which activations can dynamically be recomputed a lot of memory can be saved 1 in the previous two sections we have omitted the layer norm layers preceding both the self attention layer and the linear layers the reader should know that both x and z are both processed by layer normalization before being fed into self attention and the linear layers respectively 2 2 while in the design the dimension of qk is written as n n in a lsh self attention or local self attention layer the dimension would only be n lc nh or n lc respectively with lc being the chunk length and nh the number of hashes 3 in the first reversible transformer layer x 2 is set to be equal to x 1 benchmark in order to measure the effect of reversible residual layers we will compare the memory consumption of bert with reformer in training for an increasing number of layers title installs and imports pip installs pip qq install git https github com huggingface transformers git pip install qq py3nvml from transformers import reformerconfig bertconfig pytorchbenchmark pytorchbenchmarkarguments let s measure the required memory for the standard bert base uncased bert model by increasing the number of layers from 4 to 12 config 4 layers bert bertconfig from pretrained bert base uncased num hidden layers 4 config 8 layers bert bertconfig from pretrained bert base uncased num hidden layers 8 config 12 layers bert bertconfig from pretrained bert base uncased num hidden layers 12 benchmark args pytorchbenchmarkarguments sequence lengths 512 batch sizes 8 models bert 4 layers bert 8 layers bert 12 layers training true no inference true no speed true no env print true benchmark pytorchbenchmark configs config 4 layers bert config 8 layers bert config 12 layers bert args benchmark args result benchmark run hbox children floatprogress value 0 0 description downloading max 433 0 style progressstyle description 1 3 2 3 3 train memory results model name batch size seq length memory in mb bert 4 layers 8 512 4103 bert 8 layers 8 512 5759 bert 12 layers 8 512 7415 it can be seen that adding a single layer of bert linearly increases the required memory by more than 400mb config 4 layers reformer reformerconfig from pretrained google reformer enwik8 num hidden layers 4 num hashes 1 config 8 layers reformer reformerconfig from pretrained google reformer enwik8 num hidden layers 8 num hashes 1 config 12 layers reformer reformerconfig from pretrained google reformer enwik8 num hidden layers 12 num hashes 1 benchmark args pytorchbenchmarkarguments sequence lengths 512 batch sizes 8 models reformer 4 layers reformer 8 layers reformer 12 layers training true no inference true no speed true no env print true benchmark pytorchbenchmark configs config 4 layers reformer config 8 layers reformer config 12 layers reformer args benchmark args result benchmark run 1 3 2 3 3 3 train memory results model name batch size seq length memory in mb reformer 4 layers 8 512 4607 reformer 8 layers 8 512 4987 reformer 12 layers 8 512 5367 for reformer on the other hand adding a layer adds significantly less memory in practice adding a single layer increases the required memory on average by less than 100mb so that a much larger 12 layer reformer enwik8 model requires less memory than a 12 layer bert base uncased model", "source_text": "3. Reversible Residual Layers\n\nReversible residual layers were first introduced in N. Gomez et al and used to reduce memory consumption when training the popular ResNet model. Mathematically, reversible residual layers are slightly different to \"real\" residual layers but do not require the activations to be saved during the forward pass, which can drastically reduce memory consumption for training.\n\nReversible Residual Layers in Reformer\n\nLet's start by investigating why training a model requires much more memory than the inference of the model.\n\nWhen running a model in inference, the required memory equals more or less the memory it takes to compute the single largest tensor in the model. On the other hand, when training a model, the required memory equals more or less the sum of all differentiable tensors.\n\nThis is not surprising when considering how auto differentiation works in deep learning frameworks. These lecture slides by Roger Grosse of the University of Toronto are great to better understand auto differentiation.\n\nIn a nutshell, in order to calculate the gradient of a differentiable function (e.g. a layer), auto differentiation requires the gradient of the function's output and the function's input and output tensor. While the gradients are dynamically computed and subsequently discarded, the input and output tensors (a.k.a activations) of a function are stored during the forward pass.\n\nAlright, let's apply this to a transformer model. A transformer model includes a stack of multiple so-called transformer layers. Each additional transformer layer forces the model to store more activations during the forward pass and thus increases the required memory for training. Let's take a more detailed look. A transformer layer essentially consists of two residual layers. The first residual layer represents the self-attention mechanism as explained in section 1) and the second residual layer represents the linear or feed-forward layers as explained in section 2).\n\nUsing the same notation as before, the input of a transformer layer i.e. \nX is first normalized \n1\n and subsequently processed by the self-attention layer to get the output \nZ=SelfAttn(LayerNorm(X)). We will abbreviate these two layers with \nG so that \nZ=G(X). Next, the residual \nZ is added to the input \nZ=Z+X and the sum is fed into the second residual layer - the two linear layers. \nZ\n is processed by a second normalization layer, followed by the two linear layers to get \nY=Linear(LayerNorm(Z+X)). We will abbreviate the second normalization layer and the two linear layers with \nF yielding \nY=F(Z). Finally, the residual \nY is added to \nZ\n to give the output of the transformer layer \nY=Y+Z\n.\n\nLet's illustrate a complete transformer layer using the example of \nx1​,…,x16​\n.\n\nTo calculate the gradient of e.g. the self-attention block \nG, three tensors have to be known beforehand: the gradient \n∂Z, the output \nZ, and the input \nX. While \n∂Z can be calculated on-the-fly and discarded afterward, the values for \nZ and \nX have to be calculated and stored during the forward pass since it is not possible to recalculate them easily on-the-fly during backpropagation. Therefore, during the forward pass, large tensor outputs, such as the query-key dot product matrix \nQKT\n or the intermediate output of the linear layers \nYint\n, have to be stored in memory \n2\n.\n\nHere, reversible residual layers come to our help. The idea is relatively straight-forward. The residual block is designed in a way so that instead of having to store the input and output tensor of a function, both can easily be recalculated during the backward pass so that no tensor has to be stored in memory during the forward pass. This is achieved by using two input streams \nX(1),X(2)\n, and two output streams \nY(1),Y(2)\n. The first residual \nZ is computed by the first output stream \nZ=G(X(1)) and subsequently added to the input of the second input stream, so that \nZ=Z+X(2)\n. Similarly, the residual \nY=F(Z) is added to the first input stream again, so that the two output streams are defined by \nY(1)=Y+X(1)\n and \nY(2)=X(2)+Z=Z\n.\n\nThe reversible transformer layer can be visualized for \nx1​,…,x16​\n as follows.\n\nAs can be seen, the outputs \nY(1),Y(2)\n are calculated in a very similar way than \nY\n of the non-reversible layer, but they are mathematically different. The authors of Reformer observe in some initial experiments that the performance of a reversible transformer model matches the performance of a standard transformer model. The first visible difference to the standard transformer layer is that there are two input streams and output streams \n3\n, which at first slightly increases the required memory for both the forward pass. The two-stream architecture is crucial though for not having to save any activations during the forward pass. Let's explain. For backpropagation, the reversible transformer layer has to calculate the gradients \n∂G and \n∂F. In addition to the gradients \n∂Y and \n∂Z which can be calculated on-the-fly, the tensor values \nY, \nZ\n have to be known for \n∂F and the tensor values \nZ and \nX(1)\n for \n∂G to make auto-differentiation work.\n\nIf we assume to know \nY(1),Y(2)\n, it can easily be depicted from the graph that one can calculate \nX(1),X(2)\n as follows. \nX(1)=F(Y(1))−Y(1)\n. Great, now that \nX(1)\n is known, \nX(2)\n can be computed by \nX(2)=Y(1)−G(X(1)). Alright now, \nZ and \nY are trivial to compute via \nY=Y(1)−X(1)\n and \nZ=Y(2)−X(2)\n. So as a conclusion, if only the outputs \nY(1),Y(2)\n of the last reversible transformer layer are stored during the forward pass, all other relevant activations can be derived by making use of \nG and \nF during the backward pass and passing \nX(1)\n and \nX(2)\n. The overhead of two forward passes of \nG and \nF per reversible transformer layer during the backpropagation is traded against not having to store any activations during the forward pass. Not a bad deal!\n\nNote: Since recently, major deep learning frameworks have released code that allows to store only certain activations and recompute larger ones during the backward propagation (Tensoflow here and PyTorch here). For standard reversible layers, this still means that at least one activation has to be stored for each transformer layer, but by defining which activations can dynamically be recomputed a lot of memory can be saved.\n\n1\n In the previous two sections, we have omitted the layer norm layers preceding both the self-attention layer and the linear layers. The reader should know that both \nX and \nZ\n are both processed by layer normalization before being fed into self-attention and the linear layers respectively. \n2\n2\n While in the design the dimension of \nQK is written as \nn×n, in a LSH self-attention or local self-attention layer the dimension would only be \nn×lc​×nh​\n or \nn×lc​\n respectively with \nlc​\n being the chunk length and \nnh​\n the number of hashes \n3\n In the first reversible transformer layer \nX(2)\n is set to be equal to \nX(1)\n.\n\nBenchmark\n\nIn order to measure the effect of reversible residual layers, we will compare the memory consumption of BERT with Reformer in training for an increasing number of layers.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, BertConfig, PyTorchBenchmark, PyTorchBenchmarkArguments\n\n\nLet's measure the required memory for the standard bert-base-uncased BERT model by increasing the number of layers from 4 to 12.\n\nconfig_4_layers_bert = BertConfig.from_pretrained(\"bert-base-uncased\", num_hidden_layers=4)\nconfig_8_layers_bert = BertConfig.from_pretrained(\"bert-base-uncased\", num_hidden_layers=8)\nconfig_12_layers_bert = BertConfig.from_pretrained(\"bert-base-uncased\", num_hidden_layers=12)\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[512], batch_sizes=[8], models=[\"Bert-4-Layers\", \"Bert-8-Layers\", \"Bert-12-Layers\"], training=True, no_inference=True, no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_4_layers_bert, config_8_layers_bert, config_12_layers_bert], args=benchmark_args)\nresult = benchmark.run()\n\nHBox(children=(FloatProgress(value=0.0, description='Downloading', max=433.0, style=ProgressStyle(description_…\n\n\n\n1 / 3\n2 / 3 / 3\n\n==================== TRAIN - MEMORY - RESULTS ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Bert-4-Layers 8 512 4103 \n Bert-8-Layers 8 512 5759 \n Bert-12-Layers 8 512 7415 \n--------------------------------------------------------------------------------\n\n\nIt can be seen that adding a single layer of BERT linearly increases the required memory by more than 400MB.\n\nconfig_4_layers_reformer = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", num_hidden_layers=4, num_hashes=1)\nconfig_8_layers_reformer = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", num_hidden_layers=8, num_hashes=1)\nconfig_12_layers_reformer = ReformerConfig.from_pretrained(\"google/reformer-enwik8\", num_hidden_layers=12, num_hashes=1)\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[512], batch_sizes=[8], models=[\"Reformer-4-Layers\", \"Reformer-8-Layers\", \"Reformer-12-Layers\"], training=True, no_inference=True, no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_4_layers_reformer, config_8_layers_reformer, config_12_layers_reformer], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 3\n2 / 3\n3 / 3\n\n==================== TRAIN - MEMORY - RESULTS ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\n Reformer-4-Layers 8 512 4607 \n Reformer-8-Layers 8 512 4987 \n Reformer-12-Layers 8 512 5367 \n--------------------------------------------------------------------------------\n\n\nFor Reformer, on the other hand, adding a layer adds significantly less memory in practice. Adding a single layer increases the required memory on average by less than 100MB so that a much larger 12-Layer reformer-enwik8 model requires less memory than a 12-Layer bert-base-uncased model.", "segmentation_method": "reviewed_source_semantics", "label": "3. Reversible Residual Layers", "source_line_range": [ 626, 838 ] }, { "id": "body-region-5", "text": "4 axial positional encodings reformer makes it possible to process huge input sequences however for such long input sequences standard positional encoding weight matrices alone would use more than 1gb to store its weights to prevent such large positional encoding matrices the official reformer code introduced axial position encodings important axial position encodings were not explained in the official paper but can be well understood from looking into the code and talking to the authors axial positional encodings in reformer transformers need positional encodings to account for the order of words in the input because self attention layers have no notion of order positional encodings are usually defined by a simple look up matrix e e1 enmax the positional encoding vector ei is then simply added to the ith input vector xi ei so that the model can distinguish if an input vector a k a token is at position i or j for every input position the model needs to be able to look up the corresponding positional encoding vector so that the dimension of e is defined by the maximum length of input vectors the model can process config max position embeddings i e nmax and the config hidden size i e dh of the input vectors assuming dh 4 and nmax 49 such a positional encoding matrix can be visualized as follows here we showcase only the positional encodings e1 e2 and e49 each of dimension a k a height 4 let s imagine we want to train a reformer model on sequences of a length of up to 0 5m tokens and an input vector config hidden size of 1024 see notebook here the corresponding positional embeddings have a size of 0 5m 1024 512m parameters which corresponds to a size of 2gb such positional encodings would use an unnecessarily large amount of memory both when loading the model in memory and when saving the model on a hard drive the reformer authors managed to drastically shrink the positional encodings in size by cutting the config hidden size dimension in two and smartly factorizing the nmax dimension in transformer the user can decide into which shape nmax can be factorized into by setting config axial pos shape to an appropriate list of two values nmax1 and nmax2 so that nmax1 nmax2 nmax by setting config axial pos embds dim to an appropriate list of two values dh1 and dh2 so that dh1 dh2 dh the user can decide how the hidden size dimension should be cut now let s visualize and explain more intuitively one can think of factorizing nmax as folding the dimension into a third axis which is shown in the following for the factorization config axial pos shape 7 7 each of the three standing rectangular prisms corresponds to one of the encoding vectors e1 e2 e49 but we can see that the 49 encoding vectors are divided into 7 rows of 7 vectors each now the idea is to use only one row of 7 encoding vectors and expand those vectors to the other 6 rows essentially reusing their values because it is discouraged to have the same values for different encoding vectors each vector of dimension a k a height config hidden size 4 is cut into the lower encoding vector edown of size 1 and eup of size 3 3 so that the lower part can be expanded along the row dimension and the upper part can be expanded along the column dimension let s visualize for more clarity we can see that we have cut the embedding vectors into edown in blue and eup in yellow now for the sub vectors edown edown 1 edown 49 only the first row a k a the width in the graphic of 7 is kept and expanded along the column dimension a k a the depth of the graphic inversely for the sub vectors eup eup 1 eup 49 only the first column of 7 is kept and expanded along the row dimension the resulting embedding vectors e i then correspond to e i edown i nmax1 t eup nmax2i tt whereas nmax1 7 and nmax2 7 in our example these new encodings e e 1 e nmax are called axial position encodings in the following these axial position encodings are illustrated in more detail for our example now it should be more understandable how the final positional encoding vectors e are calculated only from edown of dimension dh1 nmax1 and eup of dimension dh2 nmax2 the crucial aspect to see here is that axial positional encodings make sure that none of the vectors e 1 e nmax are equal to each other by design and that the overall size of the encoding matrix is reduced from nmax dh to nmax1 dh1 nmax2 dh2 by allowing each axial positional encoding vector to be different by design the model is given much more flexibility to learn efficient positional representations if axial positional encodings are learned by the model to demonstrate the drastic reduction in size let s assume we would have set config axial pos shape 1024 512 and config axial pos embds dim 512 512 for a reformer model that can process inputs up to a length of 0 5m tokens the resulting axial positional encoding matrix would have had a size of only 1024 512 512 512 800k parameters which corresponds to roughly 3mb this is a drastic reduction from the 2gb a standard positional encoding matrix would require in this case for a more condensed and math heavy explanation please refer to the transformers docs here benchmark lastly let s also compare the peak memory consumption of conventional positional embeddings to axial positional embeddings title installs and imports pip installs pip qq install git https github com huggingface transformers git pip install qq py3nvml from transformers import reformerconfig pytorchbenchmark pytorchbenchmarkarguments reformermodel positional embeddings depend only on two configuration parameters the maximum allowed length of input sequences config max position embeddings and config hidden size let s use a model that pushes the maximum allowed length of input sequences to half a million tokens called google reformer crime and punishment to see the effect of using axial positional embeddings to begin with we will compare the shape of axial position encodings with standard positional encodings and the number of parameters in the model config no pos axial embeds reformerconfig from pretrained google reformer crime and punishment axial pos embds false disable axial positional embeddings config pos axial embeds reformerconfig from pretrained google reformer crime and punishment axial pos embds true axial pos embds dim 64 192 axial pos shape 512 1024 enable axial positional embeddings print default positional encodings print 20 model reformermodel config no pos axial embeds print f positional embeddings shape model embeddings position embeddings print f num parameters of model model num parameters print 20 n n print axial positional encodings print 20 model reformermodel config pos axial embeds print f positional embeddings shape model embeddings position embeddings print f num parameters of model model num parameters print 20 n n hbox children floatprogress value 0 0 description downloading max 1151 0 style progressstyle description default positional encodings positional embeddings shape positionembeddings embedding embedding 524288 256 num parameters of model 136572416 axial positional encodings positional embeddings shape axialpositionembeddings weights parameterlist 0 parameter containing torch floattensor of size 512x1x64 parameter containing torch floattensor of size 1x1024x192 num parameters of model 2584064 having read the theory the shape of the axial positional encoding weights should not be a surprise to the reader regarding the results it can be seen that for models being capable of processing such long input sequences it is not practical to use default positional encodings in the case of google reformer crime and punishment standard positional encodings alone contain more than 100m parameters axial positional encodings reduce this number to just over 200k lastly let s also compare the required memory at inference time benchmark args pytorchbenchmarkarguments sequence lengths 512 batch sizes 8 models reformer no axial pos embeddings reformer axial pos embeddings no speed true no env print true benchmark pytorchbenchmark configs config no pos axial embeds config pos axial embeds args benchmark args result benchmark run 1 2 2 2 inference memory result model name batch size seq length memory in mb reformer no axial pos embeddin 8 512 959 reformer axial pos embeddings 8 512 447 it can be seen that using axial positional embeddings reduces the memory requirement to approximately half in the case of google reformer crime and punishment", "source_text": "4. Axial Positional Encodings\n\nReformer makes it possible to process huge input sequences. However, for such long input sequences standard positional encoding weight matrices alone would use more than 1GB to store its weights. To prevent such large positional encoding matrices, the official Reformer code introduced Axial Position Encodings.\n\nImportant: Axial Position Encodings were not explained in the official paper, but can be well understood from looking into the code and talking to the authors\n\nAxial Positional Encodings in Reformer\n\nTransformers need positional encodings to account for the order of words in the input because self-attention layers have no notion of order. Positional encodings are usually defined by a simple look-up matrix \nE=[e1​,…,enmax​​] The positional encoding vector \nei​\n is then simply added to the ith input vector \nxi​+ei​\n so that the model can distinguish if an input vector (a.k.a token) is at position \ni or \nj. For every input position, the model needs to be able to look up the corresponding positional encoding vector so that the dimension of \nE is defined by the maximum length of input vectors the model can process config.max_position_embeddings, i.e. \nnmax​\n, and the config.hidden_size, i.e. \ndh​\n of the input vectors.\n\nAssuming \ndh​=4 and \nnmax​=49, such a positional encoding matrix can be visualized as follows:\n\nHere, we showcase only the positional encodings \ne1​\n, \ne2​\n, and \ne49​\n each of dimension, a.k.a height 4.\n\nLet's imagine, we want to train a Reformer model on sequences of a length of up to 0.5M tokens and an input vector config.hidden_size of 1024 (see notebook here). The corresponding positional embeddings have a size of \n0.5M×1024∼512M parameters, which corresponds to a size of 2GB.\n\nSuch positional encodings would use an unnecessarily large amount of memory both when loading the model in memory and when saving the model on a hard drive.\n\nThe Reformer authors managed to drastically shrink the positional encodings in size by cutting the config.hidden_size dimension in two and smartly factorizing the \nnmax​\n dimension. In Transformer, the user can decide into which shape \nnmax​\n can be factorized into by setting config.axial_pos_shape to an appropriate list of two values \nnmax1​\n and \nnmax2​\n so that \nnmax1​×nmax2​=nmax​\n. By setting config.axial_pos_embds_dim to an appropriate list of two values \ndh1​\n and \ndh2​\n so that \ndh1​+dh2​=dh​\n, the user can decide how the hidden size dimension should be cut. Now, let's visualize and explain more intuitively.\n\nOne can think of factorizing \nnmax​\n as folding the dimension into a third axis, which is shown in the following for the factorization config.axial_pos_shape = [7, 7]:\n\nEach of the three standing rectangular prisms corresponds to one of the encoding vectors \ne1​,e2​,e49​\n, but we can see that the 49 encoding vectors are divided into 7 rows of 7 vectors each. Now the idea is to use only one row of 7 encoding vectors and expand those vectors to the other 6 rows, essentially reusing their values. Because it is discouraged to have the same values for different encoding vectors, each vector of dimension (a.k.a height) config.hidden_size=4 is cut into the lower encoding vector \nedown​\n of size \n1 and \neup​\n of size \n3\n3, so that the lower part can be expanded along the row dimension and the upper part can be expanded along the column dimension. Let's visualize for more clarity.\n\nWe can see that we have cut the embedding vectors into \nedown​\n (in blue) and \neup​\n (in yellow). Now for the \"sub\"-vectors \nEdown​=[edown,1​,…,edown,49​] only the first row, a.k.a. the width in the graphic, of \n7 is kept and expanded along the column dimension, a.k.a. the depth of the graphic. Inversely, for the \"sub\"-vectors \nEup​=[eup,1​,…,eup,49​] only the first column of \n7 is kept and expanded along the row dimension. The resulting embedding vectors \ne′i​\n then correspond to\n\ne′i​=​[edown, i%nmax1​​]T,​eup, ⌊nmax2​i​⌋​​T​T\n\nwhereas \nnmax1​=7 and \nnmax2​=7 in our example. These new encodings \nE′=[e′1​,…,e′nmax​​] are called Axial Position Encodings.\n\nIn the following, these axial position encodings are illustrated in more detail for our example.\n\nNow it should be more understandable how the final positional encoding vectors \nE′\n are calculated only from \nEdown​\n of dimension \ndh1​×nmax1​\n and \nEup​\n of dimension \ndh2​×nmax2​\n.\n\nThe crucial aspect to see here is that Axial Positional Encodings make sure that none of the vectors \n[e′1​,…,e′nmax​​] are equal to each other by design and that the overall size of the encoding matrix is reduced from \nnmax​×dh​\n to \nnmax1​×dh1​+nmax2​×dh2​\n. By allowing each axial positional encoding vector to be different by design the model is given much more flexibility to learn efficient positional representations if axial positional encodings are learned by the model.\n\nTo demonstrate the drastic reduction in size, let's assume we would have set config.axial_pos_shape = [1024, 512] and config.axial_pos_embds_dim = [512, 512] for a Reformer model that can process inputs up to a length of 0.5M tokens. The resulting axial positional encoding matrix would have had a size of only \n1024×512+512×512∼800K parameters which corresponds to roughly 3MB. This is a drastic reduction from the 2GB a standard positional encoding matrix would require in this case.\n\nFor a more condensed and math-heavy explanation please refer to the 🤗Transformers docs here.\n\nBenchmark\n\nLastly, let's also compare the peak memory consumption of conventional positional embeddings to axial positional embeddings.\n\n#@title Installs and Imports\n# pip installs\n!pip -qq install git+https://github.com/huggingface/transformers.git\n!pip install -qq py3nvml\n\nfrom transformers import ReformerConfig, PyTorchBenchmark, PyTorchBenchmarkArguments, ReformerModel\n\n\nPositional embeddings depend only on two configuration parameters: The maximum allowed length of input sequences config.max_position_embeddings and config.hidden_size. Let's use a model that pushes the maximum allowed length of input sequences to half a million tokens, called google/reformer-crime-and-punishment, to see the effect of using axial positional embeddings.\n\nTo begin with, we will compare the shape of axial position encodings with standard positional encodings and the number of parameters in the model.\n\nconfig_no_pos_axial_embeds = ReformerConfig.from_pretrained(\"google/reformer-crime-and-punishment\", axial_pos_embds=False) # disable axial positional embeddings\nconfig_pos_axial_embeds = ReformerConfig.from_pretrained(\"google/reformer-crime-and-punishment\", axial_pos_embds=True, axial_pos_embds_dim=(64, 192), axial_pos_shape=(512, 1024)) # enable axial positional embeddings\n\nprint(\"Default Positional Encodings\")\nprint(20 * '-')\nmodel = ReformerModel(config_no_pos_axial_embeds)\nprint(f\"Positional embeddings shape: {model.embeddings.position_embeddings}\")\nprint(f\"Num parameters of model: {model.num_parameters()}\")\nprint(20 * '-' + '\\n\\n')\n\nprint(\"Axial Positional Encodings\")\nprint(20 * '-')\nmodel = ReformerModel(config_pos_axial_embeds)\nprint(f\"Positional embeddings shape: {model.embeddings.position_embeddings}\")\nprint(f\"Num parameters of model: {model.num_parameters()}\")\nprint(20 * '-' + '\\n\\n')\n\nHBox(children=(FloatProgress(value=0.0, description='Downloading', max=1151.0, style=ProgressStyle(description…\n\n\n\nDefault Positional Encodings\n--------------------\nPositional embeddings shape: PositionEmbeddings(\n (embedding): Embedding(524288, 256)\n)\nNum parameters of model: 136572416\n--------------------\n\n\nAxial Positional Encodings\n--------------------\nPositional embeddings shape: AxialPositionEmbeddings(\n (weights): ParameterList(\n (0): Parameter containing: [torch.FloatTensor of size 512x1x64]\n (1): Parameter containing: [torch.FloatTensor of size 1x1024x192]\n )\n)\nNum parameters of model: 2584064\n--------------------\n\n\nHaving read the theory, the shape of the axial positional encoding weights should not be a surprise to the reader.\n\nRegarding the results, it can be seen that for models being capable of processing such long input sequences, it is not practical to use default positional encodings. In the case of google/reformer-crime-and-punishment, standard positional encodings alone contain more than 100M parameters. Axial positional encodings reduce this number to just over 200K.\n\nLastly, let's also compare the required memory at inference time.\n\nbenchmark_args = PyTorchBenchmarkArguments(sequence_lengths=[512], batch_sizes=[8], models=[\"Reformer-No-Axial-Pos-Embeddings\", \"Reformer-Axial-Pos-Embeddings\"], no_speed=True, no_env_print=True)\nbenchmark = PyTorchBenchmark(configs=[config_no_pos_axial_embeds, config_pos_axial_embeds], args=benchmark_args)\nresult = benchmark.run()\n\n1 / 2\n2 / 2\n\n==================== INFERENCE - MEMORY - RESULT ====================\n--------------------------------------------------------------------------------\n Model Name Batch Size Seq Length Memory in MB \n--------------------------------------------------------------------------------\nReformer-No-Axial-Pos-Embeddin 8 512 959 \nReformer-Axial-Pos-Embeddings 8 512 447 \n--------------------------------------------------------------------------------\n\n\nIt can be seen that using axial positional embeddings reduces the memory requirement to approximately half in the case of google/reformer-crime-and-punishment.", "segmentation_method": "reviewed_source_semantics", "label": "4. Axial Positional Encodings", "source_line_range": [ 839, 1036 ] } ], "ending": { "text": "ory requirement to approximately half in the case of google/reformer-crime-and-punishment." } } }, { "id": "article-070", "name": "Transformer: A Novel Neural Network Architecture for Language Understanding", "url": "https://research.google/blog/transformer-a-novel-neural-network-architecture-for-language-understanding/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Transformer: A Novel Neural Network Architecture for Language Understanding" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Posted by Jakob Uszkoreit, Software Engineer, Natural Language Understanding" ] }, { "id": "stable-3", "alternatives": [ "Google Research" ] }, { "id": "stable-4", "alternatives": [ "Research" ] }, { "id": "stable-5", "alternatives": [ "Resources" ] }, { "id": "stable-6", "alternatives": [ "Conferences & events" ] }, { "id": "stable-7", "alternatives": [ "Careers" ] }, { "id": "stable-8", "alternatives": [ "Blog" ] }, { "id": "stable-9", "alternatives": [ "About" ] }, { "id": "stable-10", "alternatives": [ "Home" ] }, { "id": "stable-11", "alternatives": [ "Machine Intelligence" ] }, { "id": "stable-12", "alternatives": [ "Machine Translation" ] }, { "id": "stable-13", "alternatives": [ "Natural Language Processing" ] }, { "id": "stable-14", "alternatives": [ "Product" ] }, { "id": "stable-15", "alternatives": [ "QUICK LINKS" ] }, { "id": "stable-16", "alternatives": [ "Share" ] }, { "id": "stable-17", "alternatives": [ "Other posts of interest" ] }, { "id": "stable-18", "alternatives": [ "Follow us" ] }, { "id": "stable-19", "alternatives": [ "Explore our other initiatives" ] }, { "id": "stable-20", "alternatives": [ "Google AI" ] }, { "id": "stable-21", "alternatives": [ "Discover how Google AI is committed to enriching knowledge and solving complex challenges" ] }, { "id": "stable-22", "alternatives": [ "Products" ] }, { "id": "stable-23", "alternatives": [ "Build" ] }, { "id": "stable-24", "alternatives": [ "Responsibility" ] }, { "id": "stable-25", "alternatives": [ "Societal Impact" ] }, { "id": "stable-26", "alternatives": [ "Google Cloud" ] }, { "id": "stable-27", "alternatives": [ "High-performance infrastructure for cloud computing, data analytics & machine learning" ] }, { "id": "stable-28", "alternatives": [ "Overview" ] }, { "id": "stable-29", "alternatives": [ "Solutions" ] }, { "id": "stable-30", "alternatives": [ "Pricing" ] }, { "id": "stable-31", "alternatives": [ "Google DeepMind" ] }, { "id": "stable-32", "alternatives": [ "Our mission is to build AI responsibly to benefit humanity" ] }, { "id": "stable-33", "alternatives": [ "Models" ] }, { "id": "stable-34", "alternatives": [ "Science" ] }, { "id": "stable-35", "alternatives": [ "Google Labs" ] }, { "id": "stable-36", "alternatives": [ "Explore the future of AI responsibly with Google Labs" ] }, { "id": "stable-37", "alternatives": [ "Experiments" ] }, { "id": "stable-38", "alternatives": [ "Stay connected" ] }, { "id": "stable-39", "alternatives": [ "About Google" ] }, { "id": "stable-40", "alternatives": [ "Google Products" ] }, { "id": "stable-41", "alternatives": [ "Privacy" ] }, { "id": "stable-42", "alternatives": [ "Terms" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete first-automatic-load article reviewed through accessibility, rendered DOM boundaries and saved viewport evidence; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Transformer: A Novel Neural Network Architecture for Language Understanding" ], "html_selector": "h1.headline-1.bhoig__headline,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-070/comment-qualification-reference-r5.json", "sha256": "7415a8bbabeb01b3bcc4afde7c317f954477c130f54e186649b6e1de614c9868", "chars": 834, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Neural networks, in particular recurrent neural networks (RNNs), are now at the core of the leading approaches to language understanding tasks such as language modeling, machine translation and question answering. In “Attention Is All You Need”, we introduce the Transformer, a novel neural network architecture based on a self-attention mechanism that we believe to be particularly well suited for language understanding.\n\nIn our paper, we show that the Transformer outperforms both recurrent and convolutional models on academic English to German and English to French translation benchmarks. On top of higher translation quality, the Transformer requires less computation to train and is a much better fit for modern machine learning hardware, speeding up training by up to an order of magnitude.\n\n\nBLEU scores (higher is better) of single models on the standard WMT newstest2014 English to German translation benchmark.\n\nBLEU scores (higher is better) of single models on the standard WMT newstest2014 English to French translation benchmark.\nAccuracy and Efficiency in Language Understanding\n\nNeural networks usually process language by generating fixed- or variable-length vector-space representations. After starting with representations of individual words or even pieces of words, they aggregate information from surrounding words to determine the meaning of a given bit of language in context. For example, deciding on the most likely meaning and appropriate representation of the word “bank” in the sentence “I arrived at the bank after crossing the…” requires knowing if the sentence ends in “... road.” or “... river.”\n\nRNNs have in recent years become the typical network architecture for translation, processing language sequentially in a left-to-right or right-to-left fashion. Reading one word at a time, this forces RNNs to perform multiple steps to make decisions that depend on words far away from each other. Processing the example above, an RNN could only determine that “bank” is likely to refer to the bank of a river after reading each word between “bank” and “river” step by step. Prior research has shown that, roughly speaking, the more such steps decisions require, the harder it is for a recurrent network to learn how to make those decisions.\n\nThe sequential nature of RNNs also makes it more difficult to fully take advantage of modern fast computing devices such as TPUs and GPUs, which excel at parallel and not sequential processing. Convolutional neural networks (CNNs) are much less sequential than RNNs, but in CNN architectures like ByteNet or ConvS2S the number of steps required to combine information from distant parts of the input still grows with increasing distance.\n\n\n\nThe Transformer\n\nIn contrast, the Transformer only performs a small, constant number of steps (chosen empirically). In each step, it applies a self-attention mechanism which directly models relationships between all words in a sentence, regardless of their respective position. In the earlier example “I arrived at the bank after crossing the river”, to determine that the word “bank” refers to the shore of a river and not a financial institution, the Transformer can learn to immediately attend to the word “river” and make this decision in a single step. In fact, in our English-French translation model we observe exactly this behavior.\n\nMore specifically, to compute the next representation for a given word - “bank” for example - the Transformer compares it to every other word in the sentence. The result of these comparisons is an attention score for every other word in the sentence. These attention scores determine how much each of the other words should contribute to the next representation of “bank”. In the example, the disambiguating “river” could receive a high attention score when computing a new representation for “bank”. The attention scores are then used as weights for a weighted average of all words’ representations which is fed into a fully-connected network to generate a new representation for “bank”, reflecting that the sentence is talking about a river bank.\n\nThe animation below illustrates how we apply the Transformer to machine translation. Neural networks for machine translation typically contain an encoder reading the input sentence and generating a representation of it. A decoder then generates the output sentence word by word while consulting the representation generated by the encoder. The Transformer starts by generating initial representations, or embeddings, for each word. These are represented by the unfilled circles. Then, using self-attention, it aggregates information from all of the other words, generating a new representation per word informed by the entire context, represented by the filled balls. This step is then repeated multiple times in parallel for all words, successively generating new representations.\n\nThe decoder operates similarly, but generates one word at a time, from left to right. It attends not only to the other previously generated words, but also to the final representations generated by the encoder.\n\n\n\nFlow of Information\n\nBeyond computational performance and higher accuracy, another intriguing aspect of the Transformer is that we can visualize what other parts of a sentence the network attends to when processing or translating a given word, thus gaining insights into how information travels through the network.\n\nTo illustrate this, we chose an example involving a phenomenon that is notoriously challenging for machine translation systems: coreference resolution. Consider the following sentences and their French translations:\n\nIt is obvious to most that in the first sentence pair “it” refers to the animal, and in the second to the street. When translating these sentences to French or German, the translation for “it” depends on the gender of the noun it refers to - and in French “animal” and “street” have different genders. In contrast to the current Google Translate model, the Transformer translates both of these sentences to French correctly. Visualizing what words the encoder attended to when computing the final representation for the word “it” sheds some light on how the network made the decision. In one of its steps, the Transformer clearly identified the two nouns “it” could refer to and the respective amount of attention reflects its choice in the different contexts.\n\n\nThe encoder self-attention distribution for the word “it” from the 5th to the 6th layer of a Transformer trained on English to French translation (one of eight attention heads).\n\nGiven this insight, it might not be that surprising that the Transformer also performs very well on the classic language analysis task of syntactic constituency parsing, a task the natural language processing community has attacked with highly specialized systems for decades.\n\nIn fact, with little adaptation, the same network we used for English to German translation outperformed all but one of the previously proposed approaches to constituency parsing.\n\n\n\nNext Steps\n\nWe are very excited about the future potential of the Transformer and have already started applying it to other problems involving not only natural language but also very different inputs and outputs, such as images and video. Our ongoing experiments are accelerated immensely by the Tensor2Tensor library, which we recently open sourced. In fact, after downloading the library you can train your own Transformer networks for translation and parsing by invoking just a few commands. We hope you’ll give it a try, and look forward to seeing what the community can do with the Transformer.\n\n\n\nAcknowledgements\n\nThis research was conducted by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser and Illia Polosukhin. Additional thanks go to David Chenell for creating the animation above.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "neural networks in particular recurrent neural networks rnns are now at the core of the leading approaches to language understanding tasks such as language modeling machine translation and question answering in attention is all you need we introduce the transformer a novel neural network architecture based on a self attention mechanism that we believe to be particularly well suited for language understanding in our paper we show that the transformer outperforms both recurrent and convolutional models on academic english to german and english to french translation benchmarks on top of higher translation quality the transformer requires less computation to train and is a much better fit for modern machine learning hardware speeding up training by up to an order of magnitude bleu scores higher is better of single models on the standard wmt newstest2014 english to german translation benchmark bleu scores higher is better of single models on the standard wmt newstest2014 english to french translation benchmark", "source_text": "Neural networks, in particular recurrent neural networks (RNNs), are now at the core of the leading approaches to language understanding tasks such as language modeling, machine translation and question answering. In “Attention Is All You Need”, we introduce the Transformer, a novel neural network architecture based on a self-attention mechanism that we believe to be particularly well suited for language understanding.\n\nIn our paper, we show that the Transformer outperforms both recurrent and convolutional models on academic English to German and English to French translation benchmarks. On top of higher translation quality, the Transformer requires less computation to train and is a much better fit for modern machine learning hardware, speeding up training by up to an order of magnitude.\n\n\nBLEU scores (higher is better) of single models on the standard WMT newstest2014 English to German translation benchmark.\n\nBLEU scores (higher is better) of single models on the standard WMT newstest2014 English to French translation benchmark.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Neural networks, in particular recurrent neural networks (RN", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "accuracy and efficiency in language understanding neural networks usually process language by generating fixed or variable length vector space representations after starting with representations of individual words or even pieces of words they aggregate information from surrounding words to determine the meaning of a given bit of language in context for example deciding on the most likely meaning and appropriate representation of the word bank in the sentence i arrived at the bank after crossing the requires knowing if the sentence ends in road or river rnns have in recent years become the typical network architecture for translation processing language sequentially in a left to right or right to left fashion reading one word at a time this forces rnns to perform multiple steps to make decisions that depend on words far away from each other processing the example above an rnn could only determine that bank is likely to refer to the bank of a river after reading each word between bank and river step by step prior research has shown that roughly speaking the more such steps decisions require the harder it is for a recurrent network to learn how to make those decisions the sequential nature of rnns also makes it more difficult to fully take advantage of modern fast computing devices such as tpus and gpus which excel at parallel and not sequential processing convolutional neural networks cnns are much less sequential than rnns but in cnn architectures like bytenet or convs2s the number of steps required to combine information from distant parts of the input still grows with increasing distance", "source_text": "Accuracy and Efficiency in Language Understanding\n\nNeural networks usually process language by generating fixed- or variable-length vector-space representations. After starting with representations of individual words or even pieces of words, they aggregate information from surrounding words to determine the meaning of a given bit of language in context. For example, deciding on the most likely meaning and appropriate representation of the word “bank” in the sentence “I arrived at the bank after crossing the…” requires knowing if the sentence ends in “... road.” or “... river.”\n\nRNNs have in recent years become the typical network architecture for translation, processing language sequentially in a left-to-right or right-to-left fashion. Reading one word at a time, this forces RNNs to perform multiple steps to make decisions that depend on words far away from each other. Processing the example above, an RNN could only determine that “bank” is likely to refer to the bank of a river after reading each word between “bank” and “river” step by step. Prior research has shown that, roughly speaking, the more such steps decisions require, the harder it is for a recurrent network to learn how to make those decisions.\n\nThe sequential nature of RNNs also makes it more difficult to fully take advantage of modern fast computing devices such as TPUs and GPUs, which excel at parallel and not sequential processing. Convolutional neural networks (CNNs) are much less sequential than RNNs, but in CNN architectures like ByteNet or ConvS2S the number of steps required to combine information from distant parts of the input still grows with increasing distance.", "segmentation_method": "reviewed_source_semantics", "label": "Accuracy and Efficiency in Language Understanding", "source_line_range": [ 9, 18 ] }, { "id": "body-region-3", "text": "the transformer in contrast the transformer only performs a small constant number of steps chosen empirically in each step it applies a self attention mechanism which directly models relationships between all words in a sentence regardless of their respective position in the earlier example i arrived at the bank after crossing the river to determine that the word bank refers to the shore of a river and not a financial institution the transformer can learn to immediately attend to the word river and make this decision in a single step in fact in our english french translation model we observe exactly this behavior more specifically to compute the next representation for a given word bank for example the transformer compares it to every other word in the sentence the result of these comparisons is an attention score for every other word in the sentence these attention scores determine how much each of the other words should contribute to the next representation of bank in the example the disambiguating river could receive a high attention score when computing a new representation for bank the attention scores are then used as weights for a weighted average of all words representations which is fed into a fully connected network to generate a new representation for bank reflecting that the sentence is talking about a river bank the animation below illustrates how we apply the transformer to machine translation neural networks for machine translation typically contain an encoder reading the input sentence and generating a representation of it a decoder then generates the output sentence word by word while consulting the representation generated by the encoder the transformer starts by generating initial representations or embeddings for each word these are represented by the unfilled circles then using self attention it aggregates information from all of the other words generating a new representation per word informed by the entire context represented by the filled balls this step is then repeated multiple times in parallel for all words successively generating new representations the decoder operates similarly but generates one word at a time from left to right it attends not only to the other previously generated words but also to the final representations generated by the encoder", "source_text": "The Transformer\n\nIn contrast, the Transformer only performs a small, constant number of steps (chosen empirically). In each step, it applies a self-attention mechanism which directly models relationships between all words in a sentence, regardless of their respective position. In the earlier example “I arrived at the bank after crossing the river”, to determine that the word “bank” refers to the shore of a river and not a financial institution, the Transformer can learn to immediately attend to the word “river” and make this decision in a single step. In fact, in our English-French translation model we observe exactly this behavior.\n\nMore specifically, to compute the next representation for a given word - “bank” for example - the Transformer compares it to every other word in the sentence. The result of these comparisons is an attention score for every other word in the sentence. These attention scores determine how much each of the other words should contribute to the next representation of “bank”. In the example, the disambiguating “river” could receive a high attention score when computing a new representation for “bank”. The attention scores are then used as weights for a weighted average of all words’ representations which is fed into a fully-connected network to generate a new representation for “bank”, reflecting that the sentence is talking about a river bank.\n\nThe animation below illustrates how we apply the Transformer to machine translation. Neural networks for machine translation typically contain an encoder reading the input sentence and generating a representation of it. A decoder then generates the output sentence word by word while consulting the representation generated by the encoder. The Transformer starts by generating initial representations, or embeddings, for each word. These are represented by the unfilled circles. Then, using self-attention, it aggregates information from all of the other words, generating a new representation per word informed by the entire context, represented by the filled balls. This step is then repeated multiple times in parallel for all words, successively generating new representations.\n\nThe decoder operates similarly, but generates one word at a time, from left to right. It attends not only to the other previously generated words, but also to the final representations generated by the encoder.", "segmentation_method": "reviewed_source_semantics", "label": "The Transformer", "source_line_range": [ 19, 30 ] }, { "id": "body-region-4", "text": "flow of information beyond computational performance and higher accuracy another intriguing aspect of the transformer is that we can visualize what other parts of a sentence the network attends to when processing or translating a given word thus gaining insights into how information travels through the network to illustrate this we chose an example involving a phenomenon that is notoriously challenging for machine translation systems coreference resolution consider the following sentences and their french translations it is obvious to most that in the first sentence pair it refers to the animal and in the second to the street when translating these sentences to french or german the translation for it depends on the gender of the noun it refers to and in french animal and street have different genders in contrast to the current google translate model the transformer translates both of these sentences to french correctly visualizing what words the encoder attended to when computing the final representation for the word it sheds some light on how the network made the decision in one of its steps the transformer clearly identified the two nouns it could refer to and the respective amount of attention reflects its choice in the different contexts the encoder self attention distribution for the word it from the 5th to the 6th layer of a transformer trained on english to french translation one of eight attention heads given this insight it might not be that surprising that the transformer also performs very well on the classic language analysis task of syntactic constituency parsing a task the natural language processing community has attacked with highly specialized systems for decades in fact with little adaptation the same network we used for english to german translation outperformed all but one of the previously proposed approaches to constituency parsing", "source_text": "Flow of Information\n\nBeyond computational performance and higher accuracy, another intriguing aspect of the Transformer is that we can visualize what other parts of a sentence the network attends to when processing or translating a given word, thus gaining insights into how information travels through the network.\n\nTo illustrate this, we chose an example involving a phenomenon that is notoriously challenging for machine translation systems: coreference resolution. Consider the following sentences and their French translations:\n\nIt is obvious to most that in the first sentence pair “it” refers to the animal, and in the second to the street. When translating these sentences to French or German, the translation for “it” depends on the gender of the noun it refers to - and in French “animal” and “street” have different genders. In contrast to the current Google Translate model, the Transformer translates both of these sentences to French correctly. Visualizing what words the encoder attended to when computing the final representation for the word “it” sheds some light on how the network made the decision. In one of its steps, the Transformer clearly identified the two nouns “it” could refer to and the respective amount of attention reflects its choice in the different contexts.\n\n\nThe encoder self-attention distribution for the word “it” from the 5th to the 6th layer of a Transformer trained on English to French translation (one of eight attention heads).\n\nGiven this insight, it might not be that surprising that the Transformer also performs very well on the classic language analysis task of syntactic constituency parsing, a task the natural language processing community has attacked with highly specialized systems for decades.\n\nIn fact, with little adaptation, the same network we used for English to German translation outperformed all but one of the previously proposed approaches to constituency parsing.", "segmentation_method": "reviewed_source_semantics", "label": "Flow of Information", "source_line_range": [ 31, 47 ] }, { "id": "body-region-5", "text": "next steps we are very excited about the future potential of the transformer and have already started applying it to other problems involving not only natural language but also very different inputs and outputs such as images and video our ongoing experiments are accelerated immensely by the tensor2tensor library which we recently open sourced in fact after downloading the library you can train your own transformer networks for translation and parsing by invoking just a few commands we hope you ll give it a try and look forward to seeing what the community can do with the transformer acknowledgements this research was conducted by ashish vaswani noam shazeer niki parmar jakob uszkoreit llion jones aidan n gomez łukasz kaiser and illia polosukhin additional thanks go to david chenell for creating the animation above", "source_text": "Next Steps\n\nWe are very excited about the future potential of the Transformer and have already started applying it to other problems involving not only natural language but also very different inputs and outputs, such as images and video. Our ongoing experiments are accelerated immensely by the Tensor2Tensor library, which we recently open sourced. In fact, after downloading the library you can train your own Transformer networks for translation and parsing by invoking just a few commands. We hope you’ll give it a try, and look forward to seeing what the community can do with the Transformer.\n\n\n\nAcknowledgements\n\nThis research was conducted by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser and Illia Polosukhin. Additional thanks go to David Chenell for creating the animation above.", "segmentation_method": "reviewed_source_semantics", "label": "Next Steps — Acknowledgements", "source_line_range": [ 48, 56 ] } ], "ending": { "text": " Illia Polosukhin. Additional thanks go to David Chenell for creating the animation above." } } }, { "id": "article-071", "name": "GraphRAG: Unlocking LLM discovery on narrative private data", "url": "https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data//", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "GraphRAG: Unlocking LLM discovery on narrative private data" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Jonathan Larson" ] }, { "id": "stable-3", "alternatives": [ "Partner Data Architect" ] }, { "id": "stable-4", "alternatives": [ "Steven Truitt" ] }, { "id": "stable-5", "alternatives": [ "Principal Program Manager" ] }, { "id": "stable-6", "alternatives": [ "Microsoft" ] }, { "id": "stable-7", "alternatives": [ "Research" ] }, { "id": "stable-8", "alternatives": [ "Our research" ] }, { "id": "stable-9", "alternatives": [ "Programs & events" ] }, { "id": "stable-10", "alternatives": [ "News" ] }, { "id": "stable-11", "alternatives": [ "About" ] }, { "id": "stable-12", "alternatives": [ "Register: Research Forum" ] }, { "id": "stable-13", "alternatives": [ "All Microsoft" ] }, { "id": "stable-14", "alternatives": [ "Return to Blog Home" ] }, { "id": "stable-15", "alternatives": [ "Microsoft Research Blog" ] }, { "id": "stable-16", "alternatives": [ "Share this page" ] }, { "id": "stable-17", "alternatives": [ "PUBLICATION" ] }, { "id": "stable-18", "alternatives": [ "Can Generalist Foundation Models Outcompete Special-Purpose Tuning? Case Study in Medicine" ] }, { "id": "stable-19", "alternatives": [ "Related publications" ] }, { "id": "stable-20", "alternatives": [ "Meet the authors" ] }, { "id": "stable-21", "alternatives": [ "Research Areas" ] }, { "id": "stable-22", "alternatives": [ "Artificial intelligence" ] }, { "id": "stable-23", "alternatives": [ "Related Tools" ] }, { "id": "stable-24", "alternatives": [ "Graspologic" ] }, { "id": "stable-25", "alternatives": [ "Related projects" ] }, { "id": "stable-26", "alternatives": [ "Project GraphRAG" ] }, { "id": "stable-27", "alternatives": [ "Follow us:" ] }, { "id": "stable-28", "alternatives": [ "Share this page:" ] }, { "id": "stable-29", "alternatives": [ "Microsoft Research Newsletter" ] }, { "id": "stable-30", "alternatives": [ "Stay connected to the research community at Microsoft." ] }, { "id": "stable-31", "alternatives": [ "Subscribe today" ] }, { "id": "stable-32", "alternatives": [ "Microsoft Store" ] }, { "id": "stable-33", "alternatives": [ "Account profile" ] }, { "id": "stable-34", "alternatives": [ "Download Center" ] }, { "id": "stable-35", "alternatives": [ "Microsoft Store support" ] }, { "id": "stable-36", "alternatives": [ "Returns" ] }, { "id": "stable-37", "alternatives": [ "Order tracking" ] }, { "id": "stable-38", "alternatives": [ "Certified Refurbished" ] }, { "id": "stable-39", "alternatives": [ "Why buy from Microsoft Store" ] }, { "id": "stable-40", "alternatives": [ "Flexible Payments" ] }, { "id": "stable-41", "alternatives": [ "Education" ] }, { "id": "stable-42", "alternatives": [ "Microsoft in education" ] }, { "id": "stable-43", "alternatives": [ "Devices for education" ] }, { "id": "stable-44", "alternatives": [ "Microsoft Teams for Education" ] }, { "id": "stable-45", "alternatives": [ "Microsoft 365 Education" ] }, { "id": "stable-46", "alternatives": [ "How to buy for your school" ] }, { "id": "stable-47", "alternatives": [ "Educator training and development" ] }, { "id": "stable-48", "alternatives": [ "Deals for students and parents" ] }, { "id": "stable-49", "alternatives": [ "AI for education" ] }, { "id": "stable-50", "alternatives": [ "Business" ] }, { "id": "stable-51", "alternatives": [ "Microsoft AI" ] }, { "id": "stable-52", "alternatives": [ "Microsoft Security" ] }, { "id": "stable-53", "alternatives": [ "Dynamics 365" ] }, { "id": "stable-54", "alternatives": [ "Microsoft 365" ] }, { "id": "stable-55", "alternatives": [ "Microsoft Power Platform" ] }, { "id": "stable-56", "alternatives": [ "Microsoft Teams" ] }, { "id": "stable-57", "alternatives": [ "Microsoft Copilot" ] }, { "id": "stable-58", "alternatives": [ "Small Business" ] }, { "id": "stable-59", "alternatives": [ "Developer & IT" ] }, { "id": "stable-60", "alternatives": [ "Azure" ] }, { "id": "stable-61", "alternatives": [ "Microsoft Developer" ] }, { "id": "stable-62", "alternatives": [ "Microsoft Learn" ] }, { "id": "stable-63", "alternatives": [ "Microsoft Tech Community" ] }, { "id": "stable-64", "alternatives": [ "Visual Studio" ] }, { "id": "stable-65", "alternatives": [ "Company" ] }, { "id": "stable-66", "alternatives": [ "Careers" ] }, { "id": "stable-67", "alternatives": [ "About Microsoft" ] }, { "id": "stable-68", "alternatives": [ "Company news" ] }, { "id": "stable-69", "alternatives": [ "Privacy at Microsoft" ] }, { "id": "stable-70", "alternatives": [ "Investors" ] }, { "id": "stable-71", "alternatives": [ "Diversity and inclusion" ] }, { "id": "stable-72", "alternatives": [ "Accessibility" ] }, { "id": "stable-73", "alternatives": [ "Sustainability" ] }, { "id": "stable-74", "alternatives": [ "Your Privacy Choices" ] }, { "id": "stable-75", "alternatives": [ "Consumer Health Privacy" ] }, { "id": "stable-76", "alternatives": [ "Sitemap" ] }, { "id": "stable-77", "alternatives": [ "Contact Microsoft" ] }, { "id": "stable-78", "alternatives": [ "Privacy" ] }, { "id": "stable-79", "alternatives": [ "Terms of use" ] }, { "id": "stable-80", "alternatives": [ "Trademarks" ] }, { "id": "stable-81", "alternatives": [ "Safety & eco" ] }, { "id": "stable-82", "alternatives": [ "Recycling" ] }, { "id": "stable-83", "alternatives": [ "About our ads" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete first-automatic-load article reviewed through accessibility, rendered DOM boundaries and saved viewport evidence; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "GraphRAG: Unlocking LLM discovery on narrative private data" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-071/comment-qualification-reference-r5.json", "sha256": "76c9e09adea0a28345cacc409e0a8e7422a3490587e38f097886ce54e5185eb5", "chars": 836, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "\n\nEditor’s note, Apr. 2, 2024 – Figure 1 was updated to clarify the origin of each source.\n\nPerhaps the greatest challenge – and opportunity – of LLMs is extending their powerful capabilities to solve problems beyond the data on which they have been trained, and to achieve comparable results with data the LLM has never seen. This opens new possibilities in data investigation, such as identifying themes and semantic concepts with context and grounding on datasets. In this post, we introduce GraphRAG, created by Microsoft Research, as a significant advance in enhancing the capability of LLMs.\n\nRetrieval-Augmented Generation (RAG) is a technique to search for information based on a user query and provide the results as reference for an AI answer to be generated. This technique is an important part of most LLM-based tools and the majority of RAG approaches use vector similarity as the search technique. GraphRAG uses LLM-generated knowledge graphs to provide substantial improvements in question-and-answer performance when conducting document analysis of complex information. This builds upon our recent research, which points to the power of prompt augmentation when performing discovery on private datasets. Here, we define private dataset as data that the LLM is not trained on and has never seen before, such as an enterprise’s proprietary research, business documents, or communications. Baseline RAG[1] was created to help solve this problem, but we observe situations where baseline RAG performs very poorly. For example:\n\nBaseline RAG struggles to connect the dots. This happens when answering a question requires traversing disparate pieces of information through their shared attributes in order to provide new synthesized insights.\nBaseline RAG performs poorly when being asked to holistically understand summarized semantic concepts over large data collections or even singular large documents.\n\nTo address this, the tech community is working to develop methods that extend and enhance RAG (e.g., LlamaIndex). Microsoft Research’s new approach, GraphRAG, uses the LLM to create a knowledge graph based on the private dataset. This graph is then used alongside graph machine learning to perform prompt augmentation at query time. GraphRAG shows substantial improvement in answering the two classes of questions described above, demonstrating intelligence or mastery that outperforms other approaches previously applied to private datasets. \n\nApplying RAG to private datasets\n\nTo demonstrate the effectiveness of GraphRAG, let’s start with an investigation using the Violent Incident Information from News Articles (VIINA) dataset. This dataset was chosen due to its complexity and the presence of differing opinions and partial information. It is a messy real-world test case that was recent enough not to be included in the LLM base model’s training. \n\nFor this research, we use thousands of news articles from both Russian and Ukrainian news sources for the month of June 2023, translated into English, to create a private dataset on which we will perform our LLM-based retrieval. The dataset is far too large to fit into an LLM context window, thus demanding a RAG approach.\n\nWe start with an exploratory query, which we pose to both a baseline RAG system and to our new approach, GraphRAG:\n\nQuery: “What is Novorossiya?”\n\nBaseline RAG\tGraphRAG\nThe term “Novorossiya” is not mentioned in the provided context. However, to provide some information, Novorossiya, or New Russia, is a historical term referring to a region in the south of Ukraine that was conquered by the Russian Empire in the 18th century. In recent years, the term has been revived by Russian-backed separatists in Eastern Ukraine to refer to the territories they claim, but it is not officially recognized as a separate entity by international bodies.\tNovorossiya, also known as New Russia, is a term with historical and contemporary significance. Historically, it referred to a region in the southern part of the Russian Empire that is now part of Ukraine. In the contemporary context, it has been used by pro-Russian separatists to refer to certain areas of Ukraine [Data: Entities (6494, 912, 6493)]. \n\nThe term Novorossiya has been used in the context of a political movement in Ukraine, particularly by Russian nationalists. This movement has been associated with efforts to destabilize Ukraine and create a so-called “Novorossiya” [Data: Entities (912); Relationships (15211, 15206)]. The term has also been used to denote a separatist state in Ukraine, known as the Federal Republic of Novorossiya (FRN) [Data: Entities (7690)]. \n\nIn these results, we can see both systems perform well – highlighting a class of query on which baseline RAG performs well. Let’s try a query that requires connecting the dots:\n\nQuery: “What has Novorossiya done?”\n\nBaseline RAG\tGraphRAG\nThe text does not provide specific information on what Novorossiya has done.\tNovorossiya, a political movement in Ukraine, has been involved in a series of destructive activities, particularly targeting various entities in Ukraine [Entities (6494, 912)]. The movement has been linked to plans to destroy properties of several Ukrainian entities, including Rosen, the Odessa Canning Factory, the Odessa Regional Radio Television Transmission Center, and the National Television Company of Ukraine [Relationships (15207, 15208, 15209, 15210)]. In addition to these, Novorossiya has also been associated with plans to destroy properties of Roshen, the Odessa Conservatory Factory, the Odesa Regional Radio Television Transmission Center, and the National Telecommunications Company of Ukraine [Relationships (8329, 8330, 8331, 8332)]. Furthermore, Novorossiya has been implicated in plans to blow up ATMs of PrivatBank, the largest state bank in Ukraine [Relationships (8335, 8335)]. \n \nThe Office of the General Prosecutor in Ukraine has reported on the creation of Novorossiya, indicating the government’s awareness and potential concern over the activities of this movement [Relationships (8264, 8264)]. The destructive activities of Novorossiya have had significant impacts on the targeted entities and have likely contributed to the ongoing tensions and conflicts in the region. \nIn summary, Novorossiya has been involved in a series of destructive activities targeting various entities in Ukraine. These activities have had significant impacts on the targeted entities and have likely contributed to the ongoing tensions and conflicts in the region. The Ukrainian government, through the Office of the General Prosecutor, has acknowledged the existence and activities of Novorossiya, indicating a level of concern over the movement’s actions. \n\nBaseline RAG fails to answer this question. Looking at the source documents inserted into the context window (Figure 1), none of the text segments discuss Novorossiya, resulting in this failure.\n\nFigure 1: Baseline RAG retrieved context [2]\n\nIn comparison, the GraphRAG approach discovered an entity in the query, Novorossiya. This allows the LLM to ground itself in the graph and results in a superior answer that contains provenance through links to the original supporting text. For example, Figure 2 below shows the exact content the LLM used for the LLM-generated statement, “Novorossiya has been implicated in plans to blow up ATMs.” We see the snippet from the raw source documents (after English translation) that the LLM used to support the assertion that a specific bank was a target for Novorossiya via the relationship that exists between the two entities in the graph. \n\nFigure 2: GraphRAG provenance\n\nBy using the LLM-generated knowledge graph, GraphRAG vastly improves the “retrieval” portion of RAG, populating the context window with higher relevance content, resulting in better answers and capturing evidence provenance. \n\nBeing able to trust and verify LLM-generated results is always important. We care that the results are factually correct, coherent, and accurately represent content found in the source material. GraphRAG provides the provenance, or source grounding information, as it generates each response. It demonstrates that an answer is grounded in the dataset. Having the cited source for each assertion readily available also enables a human user to quickly and accurately audit the LLM’s output directly against the original source material. \n\nHowever, this isn’t all that’s possible using GraphRAG. \n\nWhole dataset reasoning \n\nBaseline RAG struggles with queries that require aggregation of information across the dataset to compose an answer. Queries such as “What are the top 5 themes in the data?” perform terribly because baseline RAG relies on a vector search of semantically similar text content within the dataset. There is nothing in the query to direct it to the correct information. \n\nHowever, with GraphRAG we can answer such questions, because the structure of the LLM-generated knowledge graph tells us about the structure (and thus themes) of the dataset as a whole. This allows the private dataset to be organized into meaningful semantic clusters that are pre-summarized. The LLM uses these clusters to summarize these themes when responding to a user query. \n\nWe illustrate whole-dataset reasoning abilities by posing the following question to the two systems: \n\nQuery: “What are the top 5 themes in the data?“\n\nBaseline RAG\tGraphRAG\n1. Improving the quality of life in cities and urban development. \n2. The meeting between Vladimir Putin and the President of the United Arab Emirates, Mohammed bin Zayed Al Nahyan. \n3. The National Rating of the Investment Climate in the Regions of Russia. \n4. The state of the Russian economy and the growth of domestic brands. \n5. The discussion on the meaning of life and the role of science in understanding it. \tThe data presents a wide range of themes, but the top five most prevalent themes can be identified as follows: \n\n1. Conflict and Military Activity: A significant portion of the data revolves around the ongoing conflict in Ukraine, with numerous reports detailing military activities, occupations, and attacks by various entities. This theme includes the actions of the Ukrainian military, Russian forces, and various other military units and entities [Data: Reports (513, 241, 151, 493, 343, +more)]. \n\n2. Political and Governmental Entities: Many reports focus on political figures and governmental entities, highlighting their roles, relationships, and actions in the context of the current situation. This includes entities like the Kremlin, the President of Ukraine, the US State Department, and various regional administrations [Data: Reports (98, 493, 265, 129, 196, +more)]. \n\n3. Infrastructure and Environmental Concerns: Several reports highlight potential environmental impacts and infrastructure threats. These include potential environmental damage due to industrial activities, flooding crises, and threats to infrastructure due to military conflicts [Data: Reports (308, 154, 201, 348, 216, +more)]. \n\n4. Community Analysis and Threat Assessment: Several reports provide detailed analyses of specific communities, often centered around a particular location or entity. These analyses typically discuss the key entities within the community, their relationships, and any associated threats. Many reports also include assessments of potential threats associated with the entities or situations they discuss [Data: Reports (323, 596, 518, 583, 179, +more)]. \n\n5. Health, Humanitarian Concerns, and Emergency Situations: Some reports focus on health and humanitarian issues, such as the Shereshevsky-Turner Syndrome community and the potential risk of intestinal diseases in the Odessa region. The data also covers emergency situations, including natural disasters, accidents, and attacks [Data: Reports (204, 149, 372, 154, 532, +more)]. \nThese themes provide a comprehensive overview of the current situation, highlighting the complexity and interconnectedness of the issues at hand. \n\nLooking at the results from baseline RAG, we see that none of the listed themes has much to do with the war between the two countries. As anticipated, the vector search retrieved irrelevant text, which was inserted into the LLM’s context window. Results that were included were likely keying on the word “theme,” resulting in a less than useful assessment of what is going on in the dataset. \n\nObserving the results from GraphRAG, we can clearly see that the results are far more aligned with what is going on in the dataset as a whole. The answer provides the five main themes as well as supporting details that are observed in the dataset. The referenced reports are pre-generated by the LLM for each semantic cluster in GraphRAG and, in turn, provide provenance back to original source material.\n\nCreating LLM-generated knowledge graphs\n\nWe note the basic flow that underpins GraphRAG, which builds upon our prior research and repositories using graph machine learning: \n\nThe LLM processes the entire private dataset, creating references to all entities and relationships within the source data, which are then used to create an LLM-generated knowledge graph. \nThis graph is then used to create a bottom-up clustering that organizes the data hierarchically into semantic clusters (indicated by using color in Figure 3 below). This partitioning allows for pre-summarization of semantic concepts and themes, which aids in holistic understanding of the dataset. \nAt query time, both of these structures are used to provide materials for the LLM context window when answering a question. \n\nAn example visualization of the graph is shown in Figure 3. Each circle is an entity (e.g., a person, place, or organization), with the entity size representing the number of relationships that entity has, and the color representing groupings of similar entities. The color partitioning is a bottom-up clustering method built on top of the graph structure, which enables us to answer questions at varying levels of abstraction.\n\nFigure 3: LLM-generated knowledge graph built from a private dataset using GPT-4 Turbo.\n\nResult metrics\n\nThe illustrative examples above are representative of GraphRAG’s consistent improvement across multiple datasets in different subject domains. We assess this improvement by performing an evaluation using an LLM grader to determine a pairwise winner between GraphRAG and baseline RAG. We use a set of qualitative metrics, including comprehensiveness (completeness within the framing of the implied context of the question), human enfranchisement (provision of supporting source material or other contextual information), and diversity (provision of differing viewpoints or angles on the question posed). Initial results show that GraphRAG consistently outperforms baseline RAG on these metrics. \n\nIn addition to relative comparisons, we also use SelfCheckGPT to perform an absolute measurement of faithfulness to help ensure factual, coherent results grounded in the source material. Results show that GraphRAG achieves a similar level of faithfulness to baseline RAG. We are currently developing an evaluation framework to measure performance on the class of problems above. This will include more robust mechanisms for generating question-answer test sets as well as additional metrics, such as accuracy and context relevance. \n\nNext steps\n\nBy combining LLM-generated knowledge graphs and graph machine learning, GraphRAG enables us to answer important classes of questions that we cannot attempt with baseline RAG alone. We have seen promising results after applying this technology to a variety of scenarios, including social media, news articles, workplace productivity, and chemistry. Looking forward, we plan to work closely with customers on a variety of new domains as we continue to apply this technology while working on metrics and robust evaluation. We look forward to sharing more as our research continues.\n\n[1] As baseline RAG in this comparison we use LangChain’s Q&A, a well-known representative example of this class of RAG tools in widespread use today.\n\n[2] This dataset contains sensitive topics. The dataset was chosen solely to showcase tools for data analysis that surface all relevant information including its origin. The tools, grounded by that dataset information, enable a human user to more rapidly reach informed conclusions within the context of opposing viewpoints from both Ukrainian (unian) and Russian (ria) news articles sourced in their native languages. The tools highlight the source of each statement, which can be used to identify where the information is originating.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "editor s note apr 2 2024 figure 1 was updated to clarify the origin of each source perhaps the greatest challenge and opportunity of llms is extending their powerful capabilities to solve problems beyond the data on which they have been trained and to achieve comparable results with data the llm has never seen this opens new possibilities in data investigation such as identifying themes and semantic concepts with context and grounding on datasets in this post we introduce graphrag created by microsoft research as a significant advance in enhancing the capability of llms retrieval augmented generation rag is a technique to search for information based on a user query and provide the results as reference for an ai answer to be generated this technique is an important part of most llm based tools and the majority of rag approaches use vector similarity as the search technique graphrag uses llm generated knowledge graphs to provide substantial improvements in question and answer performance when conducting document analysis of complex information this builds upon our recent research which points to the power of prompt augmentation when performing discovery on private datasets here we define private dataset as data that the llm is not trained on and has never seen before such as an enterprise s proprietary research business documents or communications baseline rag 1 was created to help solve this problem but we observe situations where baseline rag performs very poorly for example baseline rag struggles to connect the dots this happens when answering a question requires traversing disparate pieces of information through their shared attributes in order to provide new synthesized insights baseline rag performs poorly when being asked to holistically understand summarized semantic concepts over large data collections or even singular large documents to address this the tech community is working to develop methods that extend and enhance rag e g llamaindex microsoft research s new approach graphrag uses the llm to create a knowledge graph based on the private dataset this graph is then used alongside graph machine learning to perform prompt augmentation at query time graphrag shows substantial improvement in answering the two classes of questions described above demonstrating intelligence or mastery that outperforms other approaches previously applied to private datasets", "source_text": "Editor’s note, Apr. 2, 2024 – Figure 1 was updated to clarify the origin of each source.\n\nPerhaps the greatest challenge – and opportunity – of LLMs is extending their powerful capabilities to solve problems beyond the data on which they have been trained, and to achieve comparable results with data the LLM has never seen. This opens new possibilities in data investigation, such as identifying themes and semantic concepts with context and grounding on datasets. In this post, we introduce GraphRAG, created by Microsoft Research, as a significant advance in enhancing the capability of LLMs.\n\nRetrieval-Augmented Generation (RAG) is a technique to search for information based on a user query and provide the results as reference for an AI answer to be generated. This technique is an important part of most LLM-based tools and the majority of RAG approaches use vector similarity as the search technique. GraphRAG uses LLM-generated knowledge graphs to provide substantial improvements in question-and-answer performance when conducting document analysis of complex information. This builds upon our recent research, which points to the power of prompt augmentation when performing discovery on private datasets. Here, we define private dataset as data that the LLM is not trained on and has never seen before, such as an enterprise’s proprietary research, business documents, or communications. Baseline RAG[1] was created to help solve this problem, but we observe situations where baseline RAG performs very poorly. For example:\n\nBaseline RAG struggles to connect the dots. This happens when answering a question requires traversing disparate pieces of information through their shared attributes in order to provide new synthesized insights.\nBaseline RAG performs poorly when being asked to holistically understand summarized semantic concepts over large data collections or even singular large documents.\n\nTo address this, the tech community is working to develop methods that extend and enhance RAG (e.g., LlamaIndex). Microsoft Research’s new approach, GraphRAG, uses the LLM to create a knowledge graph based on the private dataset. This graph is then used alongside graph machine learning to perform prompt augmentation at query time. GraphRAG shows substantial improvement in answering the two classes of questions described above, demonstrating intelligence or mastery that outperforms other approaches previously applied to private datasets.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Editor’s note, Apr. 2, 2024 – Figure 1 was updated to clarif", "source_line_range": [ 1, 13 ] }, { "id": "body-region-2", "text": "applying rag to private datasets to demonstrate the effectiveness of graphrag let s start with an investigation using the violent incident information from news articles viina dataset this dataset was chosen due to its complexity and the presence of differing opinions and partial information it is a messy real world test case that was recent enough not to be included in the llm base model s training for this research we use thousands of news articles from both russian and ukrainian news sources for the month of june 2023 translated into english to create a private dataset on which we will perform our llm based retrieval the dataset is far too large to fit into an llm context window thus demanding a rag approach we start with an exploratory query which we pose to both a baseline rag system and to our new approach graphrag query what is novorossiya baseline rag graphrag the term novorossiya is not mentioned in the provided context however to provide some information novorossiya or new russia is a historical term referring to a region in the south of ukraine that was conquered by the russian empire in the 18th century in recent years the term has been revived by russian backed separatists in eastern ukraine to refer to the territories they claim but it is not officially recognized as a separate entity by international bodies novorossiya also known as new russia is a term with historical and contemporary significance historically it referred to a region in the southern part of the russian empire that is now part of ukraine in the contemporary context it has been used by pro russian separatists to refer to certain areas of ukraine data entities 6494 912 6493 the term novorossiya has been used in the context of a political movement in ukraine particularly by russian nationalists this movement has been associated with efforts to destabilize ukraine and create a so called novorossiya data entities 912 relationships 15211 15206 the term has also been used to denote a separatist state in ukraine known as the federal republic of novorossiya frn data entities 7690 in these results we can see both systems perform well highlighting a class of query on which baseline rag performs well let s try a query that requires connecting the dots query what has novorossiya done baseline rag graphrag the text does not provide specific information on what novorossiya has done novorossiya a political movement in ukraine has been involved in a series of destructive activities particularly targeting various entities in ukraine entities 6494 912 the movement has been linked to plans to destroy properties of several ukrainian entities including rosen the odessa canning factory the odessa regional radio television transmission center and the national television company of ukraine relationships 15207 15208 15209 15210 in addition to these novorossiya has also been associated with plans to destroy properties of roshen the odessa conservatory factory the odesa regional radio television transmission center and the national telecommunications company of ukraine relationships 8329 8330 8331 8332 furthermore novorossiya has been implicated in plans to blow up atms of privatbank the largest state bank in ukraine relationships 8335 8335 the office of the general prosecutor in ukraine has reported on the creation of novorossiya indicating the government s awareness and potential concern over the activities of this movement relationships 8264 8264 the destructive activities of novorossiya have had significant impacts on the targeted entities and have likely contributed to the ongoing tensions and conflicts in the region in summary novorossiya has been involved in a series of destructive activities targeting various entities in ukraine these activities have had significant impacts on the targeted entities and have likely contributed to the ongoing tensions and conflicts in the region the ukrainian government through the office of the general prosecutor has acknowledged the existence and activities of novorossiya indicating a level of concern over the movement s actions baseline rag fails to answer this question looking at the source documents inserted into the context window figure 1 none of the text segments discuss novorossiya resulting in this failure figure 1 baseline rag retrieved context 2 in comparison the graphrag approach discovered an entity in the query novorossiya this allows the llm to ground itself in the graph and results in a superior answer that contains provenance through links to the original supporting text for example figure 2 below shows the exact content the llm used for the llm generated statement novorossiya has been implicated in plans to blow up atms we see the snippet from the raw source documents after english translation that the llm used to support the assertion that a specific bank was a target for novorossiya via the relationship that exists between the two entities in the graph figure 2 graphrag provenance by using the llm generated knowledge graph graphrag vastly improves the retrieval portion of rag populating the context window with higher relevance content resulting in better answers and capturing evidence provenance being able to trust and verify llm generated results is always important we care that the results are factually correct coherent and accurately represent content found in the source material graphrag provides the provenance or source grounding information as it generates each response it demonstrates that an answer is grounded in the dataset having the cited source for each assertion readily available also enables a human user to quickly and accurately audit the llm s output directly against the original source material however this isn t all that s possible using graphrag", "source_text": "Applying RAG to private datasets\n\nTo demonstrate the effectiveness of GraphRAG, let’s start with an investigation using the Violent Incident Information from News Articles (VIINA) dataset. This dataset was chosen due to its complexity and the presence of differing opinions and partial information. It is a messy real-world test case that was recent enough not to be included in the LLM base model’s training. \n\nFor this research, we use thousands of news articles from both Russian and Ukrainian news sources for the month of June 2023, translated into English, to create a private dataset on which we will perform our LLM-based retrieval. The dataset is far too large to fit into an LLM context window, thus demanding a RAG approach.\n\nWe start with an exploratory query, which we pose to both a baseline RAG system and to our new approach, GraphRAG:\n\nQuery: “What is Novorossiya?”\n\nBaseline RAG\tGraphRAG\nThe term “Novorossiya” is not mentioned in the provided context. However, to provide some information, Novorossiya, or New Russia, is a historical term referring to a region in the south of Ukraine that was conquered by the Russian Empire in the 18th century. In recent years, the term has been revived by Russian-backed separatists in Eastern Ukraine to refer to the territories they claim, but it is not officially recognized as a separate entity by international bodies.\tNovorossiya, also known as New Russia, is a term with historical and contemporary significance. Historically, it referred to a region in the southern part of the Russian Empire that is now part of Ukraine. In the contemporary context, it has been used by pro-Russian separatists to refer to certain areas of Ukraine [Data: Entities (6494, 912, 6493)]. \n\nThe term Novorossiya has been used in the context of a political movement in Ukraine, particularly by Russian nationalists. This movement has been associated with efforts to destabilize Ukraine and create a so-called “Novorossiya” [Data: Entities (912); Relationships (15211, 15206)]. The term has also been used to denote a separatist state in Ukraine, known as the Federal Republic of Novorossiya (FRN) [Data: Entities (7690)]. \n\nIn these results, we can see both systems perform well – highlighting a class of query on which baseline RAG performs well. Let’s try a query that requires connecting the dots:\n\nQuery: “What has Novorossiya done?”\n\nBaseline RAG\tGraphRAG\nThe text does not provide specific information on what Novorossiya has done.\tNovorossiya, a political movement in Ukraine, has been involved in a series of destructive activities, particularly targeting various entities in Ukraine [Entities (6494, 912)]. The movement has been linked to plans to destroy properties of several Ukrainian entities, including Rosen, the Odessa Canning Factory, the Odessa Regional Radio Television Transmission Center, and the National Television Company of Ukraine [Relationships (15207, 15208, 15209, 15210)]. In addition to these, Novorossiya has also been associated with plans to destroy properties of Roshen, the Odessa Conservatory Factory, the Odesa Regional Radio Television Transmission Center, and the National Telecommunications Company of Ukraine [Relationships (8329, 8330, 8331, 8332)]. Furthermore, Novorossiya has been implicated in plans to blow up ATMs of PrivatBank, the largest state bank in Ukraine [Relationships (8335, 8335)]. \n \nThe Office of the General Prosecutor in Ukraine has reported on the creation of Novorossiya, indicating the government’s awareness and potential concern over the activities of this movement [Relationships (8264, 8264)]. The destructive activities of Novorossiya have had significant impacts on the targeted entities and have likely contributed to the ongoing tensions and conflicts in the region. \nIn summary, Novorossiya has been involved in a series of destructive activities targeting various entities in Ukraine. These activities have had significant impacts on the targeted entities and have likely contributed to the ongoing tensions and conflicts in the region. The Ukrainian government, through the Office of the General Prosecutor, has acknowledged the existence and activities of Novorossiya, indicating a level of concern over the movement’s actions. \n\nBaseline RAG fails to answer this question. Looking at the source documents inserted into the context window (Figure 1), none of the text segments discuss Novorossiya, resulting in this failure.\n\nFigure 1: Baseline RAG retrieved context [2]\n\nIn comparison, the GraphRAG approach discovered an entity in the query, Novorossiya. This allows the LLM to ground itself in the graph and results in a superior answer that contains provenance through links to the original supporting text. For example, Figure 2 below shows the exact content the LLM used for the LLM-generated statement, “Novorossiya has been implicated in plans to blow up ATMs.” We see the snippet from the raw source documents (after English translation) that the LLM used to support the assertion that a specific bank was a target for Novorossiya via the relationship that exists between the two entities in the graph. \n\nFigure 2: GraphRAG provenance\n\nBy using the LLM-generated knowledge graph, GraphRAG vastly improves the “retrieval” portion of RAG, populating the context window with higher relevance content, resulting in better answers and capturing evidence provenance. \n\nBeing able to trust and verify LLM-generated results is always important. We care that the results are factually correct, coherent, and accurately represent content found in the source material. GraphRAG provides the provenance, or source grounding information, as it generates each response. It demonstrates that an answer is grounded in the dataset. Having the cited source for each assertion readily available also enables a human user to quickly and accurately audit the LLM’s output directly against the original source material. \n\nHowever, this isn’t all that’s possible using GraphRAG.", "segmentation_method": "reviewed_source_semantics", "label": "Applying RAG to private datasets", "source_line_range": [ 14, 52 ] }, { "id": "body-region-3", "text": "whole dataset reasoning baseline rag struggles with queries that require aggregation of information across the dataset to compose an answer queries such as what are the top 5 themes in the data perform terribly because baseline rag relies on a vector search of semantically similar text content within the dataset there is nothing in the query to direct it to the correct information however with graphrag we can answer such questions because the structure of the llm generated knowledge graph tells us about the structure and thus themes of the dataset as a whole this allows the private dataset to be organized into meaningful semantic clusters that are pre summarized the llm uses these clusters to summarize these themes when responding to a user query we illustrate whole dataset reasoning abilities by posing the following question to the two systems query what are the top 5 themes in the data baseline rag graphrag 1 improving the quality of life in cities and urban development 2 the meeting between vladimir putin and the president of the united arab emirates mohammed bin zayed al nahyan 3 the national rating of the investment climate in the regions of russia 4 the state of the russian economy and the growth of domestic brands 5 the discussion on the meaning of life and the role of science in understanding it the data presents a wide range of themes but the top five most prevalent themes can be identified as follows 1 conflict and military activity a significant portion of the data revolves around the ongoing conflict in ukraine with numerous reports detailing military activities occupations and attacks by various entities this theme includes the actions of the ukrainian military russian forces and various other military units and entities data reports 513 241 151 493 343 more 2 political and governmental entities many reports focus on political figures and governmental entities highlighting their roles relationships and actions in the context of the current situation this includes entities like the kremlin the president of ukraine the us state department and various regional administrations data reports 98 493 265 129 196 more 3 infrastructure and environmental concerns several reports highlight potential environmental impacts and infrastructure threats these include potential environmental damage due to industrial activities flooding crises and threats to infrastructure due to military conflicts data reports 308 154 201 348 216 more 4 community analysis and threat assessment several reports provide detailed analyses of specific communities often centered around a particular location or entity these analyses typically discuss the key entities within the community their relationships and any associated threats many reports also include assessments of potential threats associated with the entities or situations they discuss data reports 323 596 518 583 179 more 5 health humanitarian concerns and emergency situations some reports focus on health and humanitarian issues such as the shereshevsky turner syndrome community and the potential risk of intestinal diseases in the odessa region the data also covers emergency situations including natural disasters accidents and attacks data reports 204 149 372 154 532 more these themes provide a comprehensive overview of the current situation highlighting the complexity and interconnectedness of the issues at hand looking at the results from baseline rag we see that none of the listed themes has much to do with the war between the two countries as anticipated the vector search retrieved irrelevant text which was inserted into the llm s context window results that were included were likely keying on the word theme resulting in a less than useful assessment of what is going on in the dataset observing the results from graphrag we can clearly see that the results are far more aligned with what is going on in the dataset as a whole the answer provides the five main themes as well as supporting details that are observed in the dataset the referenced reports are pre generated by the llm for each semantic cluster in graphrag and in turn provide provenance back to original source material", "source_text": "Whole dataset reasoning \n\nBaseline RAG struggles with queries that require aggregation of information across the dataset to compose an answer. Queries such as “What are the top 5 themes in the data?” perform terribly because baseline RAG relies on a vector search of semantically similar text content within the dataset. There is nothing in the query to direct it to the correct information. \n\nHowever, with GraphRAG we can answer such questions, because the structure of the LLM-generated knowledge graph tells us about the structure (and thus themes) of the dataset as a whole. This allows the private dataset to be organized into meaningful semantic clusters that are pre-summarized. The LLM uses these clusters to summarize these themes when responding to a user query. \n\nWe illustrate whole-dataset reasoning abilities by posing the following question to the two systems: \n\nQuery: “What are the top 5 themes in the data?“\n\nBaseline RAG\tGraphRAG\n1. Improving the quality of life in cities and urban development. \n2. The meeting between Vladimir Putin and the President of the United Arab Emirates, Mohammed bin Zayed Al Nahyan. \n3. The National Rating of the Investment Climate in the Regions of Russia. \n4. The state of the Russian economy and the growth of domestic brands. \n5. The discussion on the meaning of life and the role of science in understanding it. \tThe data presents a wide range of themes, but the top five most prevalent themes can be identified as follows: \n\n1. Conflict and Military Activity: A significant portion of the data revolves around the ongoing conflict in Ukraine, with numerous reports detailing military activities, occupations, and attacks by various entities. This theme includes the actions of the Ukrainian military, Russian forces, and various other military units and entities [Data: Reports (513, 241, 151, 493, 343, +more)]. \n\n2. Political and Governmental Entities: Many reports focus on political figures and governmental entities, highlighting their roles, relationships, and actions in the context of the current situation. This includes entities like the Kremlin, the President of Ukraine, the US State Department, and various regional administrations [Data: Reports (98, 493, 265, 129, 196, +more)]. \n\n3. Infrastructure and Environmental Concerns: Several reports highlight potential environmental impacts and infrastructure threats. These include potential environmental damage due to industrial activities, flooding crises, and threats to infrastructure due to military conflicts [Data: Reports (308, 154, 201, 348, 216, +more)]. \n\n4. Community Analysis and Threat Assessment: Several reports provide detailed analyses of specific communities, often centered around a particular location or entity. These analyses typically discuss the key entities within the community, their relationships, and any associated threats. Many reports also include assessments of potential threats associated with the entities or situations they discuss [Data: Reports (323, 596, 518, 583, 179, +more)]. \n\n5. Health, Humanitarian Concerns, and Emergency Situations: Some reports focus on health and humanitarian issues, such as the Shereshevsky-Turner Syndrome community and the potential risk of intestinal diseases in the Odessa region. The data also covers emergency situations, including natural disasters, accidents, and attacks [Data: Reports (204, 149, 372, 154, 532, +more)]. \nThese themes provide a comprehensive overview of the current situation, highlighting the complexity and interconnectedness of the issues at hand. \n\nLooking at the results from baseline RAG, we see that none of the listed themes has much to do with the war between the two countries. As anticipated, the vector search retrieved irrelevant text, which was inserted into the LLM’s context window. Results that were included were likely keying on the word “theme,” resulting in a less than useful assessment of what is going on in the dataset. \n\nObserving the results from GraphRAG, we can clearly see that the results are far more aligned with what is going on in the dataset as a whole. The answer provides the five main themes as well as supporting details that are observed in the dataset. The referenced reports are pre-generated by the LLM for each semantic cluster in GraphRAG and, in turn, provide provenance back to original source material.", "segmentation_method": "reviewed_source_semantics", "label": "Whole dataset reasoning", "source_line_range": [ 53, 84 ] }, { "id": "body-region-4", "text": "creating llm generated knowledge graphs we note the basic flow that underpins graphrag which builds upon our prior research and repositories using graph machine learning the llm processes the entire private dataset creating references to all entities and relationships within the source data which are then used to create an llm generated knowledge graph this graph is then used to create a bottom up clustering that organizes the data hierarchically into semantic clusters indicated by using color in figure 3 below this partitioning allows for pre summarization of semantic concepts and themes which aids in holistic understanding of the dataset at query time both of these structures are used to provide materials for the llm context window when answering a question an example visualization of the graph is shown in figure 3 each circle is an entity e g a person place or organization with the entity size representing the number of relationships that entity has and the color representing groupings of similar entities the color partitioning is a bottom up clustering method built on top of the graph structure which enables us to answer questions at varying levels of abstraction figure 3 llm generated knowledge graph built from a private dataset using gpt 4 turbo", "source_text": "Creating LLM-generated knowledge graphs\n\nWe note the basic flow that underpins GraphRAG, which builds upon our prior research and repositories using graph machine learning: \n\nThe LLM processes the entire private dataset, creating references to all entities and relationships within the source data, which are then used to create an LLM-generated knowledge graph. \nThis graph is then used to create a bottom-up clustering that organizes the data hierarchically into semantic clusters (indicated by using color in Figure 3 below). This partitioning allows for pre-summarization of semantic concepts and themes, which aids in holistic understanding of the dataset. \nAt query time, both of these structures are used to provide materials for the LLM context window when answering a question. \n\nAn example visualization of the graph is shown in Figure 3. Each circle is an entity (e.g., a person, place, or organization), with the entity size representing the number of relationships that entity has, and the color representing groupings of similar entities. The color partitioning is a bottom-up clustering method built on top of the graph structure, which enables us to answer questions at varying levels of abstraction.\n\nFigure 3: LLM-generated knowledge graph built from a private dataset using GPT-4 Turbo.", "segmentation_method": "reviewed_source_semantics", "label": "Creating LLM-generated knowledge graphs", "source_line_range": [ 85, 96 ] }, { "id": "body-region-5", "text": "result metrics the illustrative examples above are representative of graphrag s consistent improvement across multiple datasets in different subject domains we assess this improvement by performing an evaluation using an llm grader to determine a pairwise winner between graphrag and baseline rag we use a set of qualitative metrics including comprehensiveness completeness within the framing of the implied context of the question human enfranchisement provision of supporting source material or other contextual information and diversity provision of differing viewpoints or angles on the question posed initial results show that graphrag consistently outperforms baseline rag on these metrics in addition to relative comparisons we also use selfcheckgpt to perform an absolute measurement of faithfulness to help ensure factual coherent results grounded in the source material results show that graphrag achieves a similar level of faithfulness to baseline rag we are currently developing an evaluation framework to measure performance on the class of problems above this will include more robust mechanisms for generating question answer test sets as well as additional metrics such as accuracy and context relevance next steps by combining llm generated knowledge graphs and graph machine learning graphrag enables us to answer important classes of questions that we cannot attempt with baseline rag alone we have seen promising results after applying this technology to a variety of scenarios including social media news articles workplace productivity and chemistry looking forward we plan to work closely with customers on a variety of new domains as we continue to apply this technology while working on metrics and robust evaluation we look forward to sharing more as our research continues 1 as baseline rag in this comparison we use langchain s q a a well known representative example of this class of rag tools in widespread use today 2 this dataset contains sensitive topics the dataset was chosen solely to showcase tools for data analysis that surface all relevant information including its origin the tools grounded by that dataset information enable a human user to more rapidly reach informed conclusions within the context of opposing viewpoints from both ukrainian unian and russian ria news articles sourced in their native languages the tools highlight the source of each statement which can be used to identify where the information is originating", "source_text": "Result metrics\n\nThe illustrative examples above are representative of GraphRAG’s consistent improvement across multiple datasets in different subject domains. We assess this improvement by performing an evaluation using an LLM grader to determine a pairwise winner between GraphRAG and baseline RAG. We use a set of qualitative metrics, including comprehensiveness (completeness within the framing of the implied context of the question), human enfranchisement (provision of supporting source material or other contextual information), and diversity (provision of differing viewpoints or angles on the question posed). Initial results show that GraphRAG consistently outperforms baseline RAG on these metrics. \n\nIn addition to relative comparisons, we also use SelfCheckGPT to perform an absolute measurement of faithfulness to help ensure factual, coherent results grounded in the source material. Results show that GraphRAG achieves a similar level of faithfulness to baseline RAG. We are currently developing an evaluation framework to measure performance on the class of problems above. This will include more robust mechanisms for generating question-answer test sets as well as additional metrics, such as accuracy and context relevance. \n\nNext steps\n\nBy combining LLM-generated knowledge graphs and graph machine learning, GraphRAG enables us to answer important classes of questions that we cannot attempt with baseline RAG alone. We have seen promising results after applying this technology to a variety of scenarios, including social media, news articles, workplace productivity, and chemistry. Looking forward, we plan to work closely with customers on a variety of new domains as we continue to apply this technology while working on metrics and robust evaluation. We look forward to sharing more as our research continues.\n\n[1] As baseline RAG in this comparison we use LangChain’s Q&A, a well-known representative example of this class of RAG tools in widespread use today.\n\n[2] This dataset contains sensitive topics. The dataset was chosen solely to showcase tools for data analysis that surface all relevant information including its origin. The tools, grounded by that dataset information, enable a human user to more rapidly reach informed conclusions within the context of opposing viewpoints from both Ukrainian (unian) and Russian (ria) news articles sourced in their native languages. The tools highlight the source of each statement, which can be used to identify where the information is originating.", "segmentation_method": "reviewed_source_semantics", "label": "Result metrics — Next steps", "source_line_range": [ 97, 109 ] } ], "ending": { "text": "rce of each statement, which can be used to identify where the information is originating." } } }, { "id": "article-072", "name": "PyTorch 2.0 release", "url": "https://pytorch.org/blog/pytorch-2.0-release/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "PyTorch 2\\.0: Our next generation release that is faster, more Pythonic and Dynamic as ever" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "PyTorch Foundation" ] }, { "id": "stable-3", "alternatives": [ "Learn" ] }, { "id": "stable-4", "alternatives": [ "Community" ] }, { "id": "stable-5", "alternatives": [ "Projects" ] }, { "id": "stable-6", "alternatives": [ "Docs" ] }, { "id": "stable-7", "alternatives": [ "Blog & News" ] }, { "id": "stable-8", "alternatives": [ "About" ] }, { "id": "stable-9", "alternatives": [ "JOIN" ] }, { "id": "stable-10", "alternatives": [ "Blog" ] }, { "id": "stable-11", "alternatives": [ "Access comprehensive developer documentation for PyTorch" ] }, { "id": "stable-12", "alternatives": [ "View Docs" ] }, { "id": "stable-13", "alternatives": [ "Tutorials" ] }, { "id": "stable-14", "alternatives": [ "Get in-depth tutorials for beginners and advanced developers" ] }, { "id": "stable-15", "alternatives": [ "View Tutorials" ] }, { "id": "stable-16", "alternatives": [ "Resources" ] }, { "id": "stable-17", "alternatives": [ "Find development resources and get your questions answered" ] }, { "id": "stable-18", "alternatives": [ "View Resources" ] }, { "id": "stable-19", "alternatives": [ "Stay in touch" ] }, { "id": "stable-20", "alternatives": [ "for updates, event info, and the latest news" ] }, { "id": "stable-21", "alternatives": [ "SUBMIT" ] }, { "id": "stable-22", "alternatives": [ "By submitting this form, I consent to receive marketing emails from the LF and its projects regarding their events, training, research, developments, and related announcements. I understand that I can unsubscribe at any time using the links in the footers of the emails I receive." ] }, { "id": "stable-23", "alternatives": [ "Policies" ] }, { "id": "stable-24", "alternatives": [ "Trademark Usage" ] }, { "id": "stable-25", "alternatives": [ "Privacy Policy" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete first-automatic-load article reviewed through accessibility, rendered DOM boundaries and saved viewport evidence; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "PyTorch 2.0: Our next generation release that is faster, more Pythonic and Dynamic as ever" ], "html_selector": "h1.entry-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-072/comment-qualification-reference-r5.json", "sha256": "30b97c1c7d225cffc29a98a9de3e844884e103e70951269f0b481bf614b9b14c", "chars": 775, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "We are excited to announce the release of PyTorch® 2.0 which we highlighted during the PyTorch Conference on 12/2/22! PyTorch 2.0 offers the same eager-mode development and user experience, while fundamentally changing and supercharging how PyTorch operates at compiler level under the hood with faster performance and support for Dynamic Shapes and Distributed.\n\nThis next-generation release includes a Stable version of Accelerated Transformers (formerly called Better Transformers); Beta includes torch.compile as the main API for PyTorch 2.0, the scaled_dot_product_attention function as part of torch.nn.functional, the MPS backend, functorch APIs in the torch.func module; and other Beta/Prototype improvements across various inferences, performance and training optimization features on GPUs and CPUs. For a comprehensive introduction and technical overview of torch.compile, please visit the 2.0 Get Started page.\n\nAlong with 2.0, we are also releasing a series of beta updates to the PyTorch domain libraries, including those that are in-tree, and separate libraries including TorchAudio, TorchVision, and TorchText. An update for TorchX is also being released as it moves to community supported mode. More details can be found in this library blog.\n\nThis release is composed of over 4,541 commits and 428 contributors since 1.13.1. We want to sincerely thank our dedicated community for your contributions. As always, we encourage you to try these out and report any issues as we improve 2.0 and the overall 2-series this year.\n\nSummary:\n\ntorch.compile is the main API for PyTorch 2.0, which wraps your model and returns a compiled model. It is a fully additive (and optional) feature and hence 2.0 is 100% backward compatible by definition.\nAs an underpinning technology of torch.compile, TorchInductor with Nvidia and AMD GPUs will rely on OpenAI Triton deep learning compiler to generate performant code and hide low level hardware details. OpenAI Triton-generated kernels achieve performance that’s on par with hand-written kernels and specialized cuda libraries such as cublas.\nAccelerated Transformers introduce high-performance support for training and inference using a custom kernel architecture for scaled dot product attention (SPDA). The API is integrated with torch.compile() and model developers may also use the scaled dot product attention kernels directly by calling the new scaled_dot_product_attention() operator.\nMetal Performance Shaders (MPS) backend provides GPU accelerated PyTorch training on Mac platforms with added support for Top 60 most used ops, bringing coverage to over 300 operators.\nAmazon AWS optimizes the PyTorch CPU inference on AWS Graviton3 based C7g instances. PyTorch 2.0 improves inference performance on Graviton compared to the previous releases, including improvements for Resnet50 and Bert.\nNew prototype features and technologies across TensorParallel, DTensor, 2D parallel, TorchDynamo, AOTAutograd, PrimTorch and TorchInductor.\nStable\tBeta\tPrototype\tPerformance Improvements\nAccelerated PT 2 Transformers\ttorch.compile\tDTensor\tCUDA support for 11.7 & 11.8 (deprecating CUDA 11.6)\n\tPyTorch MPS Backend\tTensorParallel\tPython 3.8 (deprecating Python 3.7)\n\tScaled dot product attention\t2D Parallel\tAWS Graviton3\n\tfunctorch\tTorch.compile (dynamic=True)\t\n\tDispatchable Collectives\t\n\tTorch.set_default & torch.device\t\t\n\tX86 quantization backend\t\t\n\tGNN inference and training performance\t\t\n\n*To see a full list of public 2.0, 1.13 and 1.12 feature submissions click here.\n\nStable Features\n[Stable] Accelerated PyTorch 2 Transformers\n\nThe PyTorch 2.0 release includes a new high-performance implementation of the PyTorch Transformer API. In releasing Accelerated PT2 Transformers, our goal is to make training and deployment of state-of-the-art Transformer models affordable across the industry. This release introduces high-performance support for training and inference using a custom kernel architecture for scaled dot product attention (SPDA), extending the inference “fastpath” architecture, previously known as “Better Transformer.”\n\nSimilar to the “fastpath” architecture, custom kernels are fully integrated into the PyTorch Transformer API – thus, using the native Transformer and MultiHeadAttention API will enable users to:\n\ntransparently see significant speed improvements;\nsupport many more use cases including models using Cross-Attention, Transformer Decoders, and for training models; and\ncontinue to use fastpath inference for fixed and variable sequence length Transformer Encoder and Self Attention use cases.\n\nTo take full advantage of different hardware models and Transformer use cases, multiple SDPA custom kernels are supported (see below), with custom kernel selection logic that will pick the highest-performance kernel for a given model and hardware type. In addition to the existing Transformer API, model developers may also use the scaled dot product attention kernels directly by calling the new scaled_dot_product_attention() operator. Accelerated PyTorch 2 Transformers are integrated with torch.compile() . To use your model while benefiting from the additional acceleration of PT2-compilation (for inference or training), pre-process the model with model = torch.compile(model).\n\nWe have achieved major speedups for training transformer models and in particular large language models with Accelerated PyTorch 2 Transformers using a combination of custom kernels and torch.compile().\n\n Figure: Using scaled dot product attention with custom kernels and torch.compile delivers significant speedups for training large language models, such as for nanoGPT shown here.\n\nBeta Features\n[Beta] torch.compile\n\ntorch.compile is the main API for PyTorch 2.0, which wraps your model and returns a compiled model. It is a fully additive (and optional) feature and hence 2.0 is 100% backward compatible by definition.\n\nUnderpinning torch.compile are new technologies – TorchDynamo, AOTAutograd, PrimTorch and TorchInductor:\n\nTorchDynamo captures PyTorch programs safely using Python Frame Evaluation Hooks and is a significant innovation that was a result of 5 years of our R&D into safe graph capture.\nAOTAutograd overloads PyTorch’s autograd engine as a tracing autodiff for generating ahead-of-time backward traces.\nPrimTorch canonicalizes ~2000+ PyTorch operators down to a closed set of ~250 primitive operators that developers can target to build a complete PyTorch backend. This substantially lowers the barrier of writing a PyTorch feature or backend.\nTorchInductor is a deep learning compiler that generates fast code for multiple accelerators and backends. For NVIDIA and AMD GPUs, it uses OpenAI Triton as a key building block. For intel CPUs, we generate C++ code using multithreading, vectorized instructions and offloading appropriate operations to mkldnn when possible.\n\nWith all the new technologies, torch.compile is able to work 93% of time across 165 open-source models and runs 20% faster on average at float32 precision and 36% faster on average at AMP precision.\n\nFor more information, please refer to https://pytorch.org/get-started/pytorch-2.0/ and for TorchInductor CPU with Intel here.\n\n[Beta] PyTorch MPS Backend\n\nMPS backend provides GPU-accelerated PyTorch training on Mac platforms. This release brings improved correctness, stability, and operator coverage.\n\nMPS backend now includes support for the Top 60 most used ops, along with the most frequently requested operations by the community, bringing coverage to over 300 operators. The major focus of the release was to enable full OpInfo-based forward and gradient mode testing to address silent correctness issues. These changes have resulted in wider adoption of MPS backend by 3rd party networks such as Stable Diffusion, YoloV5, WhisperAI, along with increased coverage for Torchbench networks and Basic tutorials. We encourage developers to update to the latest macOS release to see the best performance and stability on the MPS backend.\n\nLinks\n\nMPS Backend\nDeveloper information\nAccelerated PyTorch training on Mac\nMetal, Metal Performance Shaders & Metal Performance Shaders Graph\n[Beta] Scaled dot product attention 2.0\n\nWe are thrilled to announce the release of PyTorch 2.0, which introduces a powerful scaled dot product attention function as part of torch.nn.functional. This function includes multiple implementations that can be seamlessly applied depending on the input and hardware in use.\n\nIn previous versions of PyTorch, you had to rely on third-party implementations and install separate packages to take advantage of memory-optimized algorithms like FlashAttention. With PyTorch 2.0, all these implementations are readily available by default.\n\nThese implementations include FlashAttention from HazyResearch, Memory-Efficient Attention from the xFormers project, and a native C++ implementation that is ideal for non-CUDA devices or when high-precision is required.\n\nPyTorch 2.0 will automatically select the optimal implementation for your use case, but you can also toggle them individually for finer-grained control. Additionally, the scaled dot product attention function can be used to build common transformer architecture components.\n\nLearn more with the documentation and this tutorial.\n\n[Beta] functorch -> torch.func\n\nInspired by Google JAX, functorch is a library that offers composable vmap (vectorization) and autodiff transforms. It enables advanced autodiff use cases that would otherwise be tricky to express in PyTorch. Examples include:\n\nmodel ensembling\nefficiently computing jacobians and hessians\ncomputing per-sample-gradients (or other per-sample quantities)\n\nWe’re excited to announce that, as the final step of upstreaming and integrating functorch into PyTorch, the functorch APIs are now available in the torch.func module. Our function transform APIs are identical to before, but we have changed how the interaction with NN modules work. Please see the docs and the migration guide for more details.\n\nFurthermore, we have added support for torch.autograd.Function: one is now able to apply function transformations (e.g. vmap, grad, jvp) over torch.autograd.Function.\n\n[Beta] Dispatchable Collectives\n\nDispatchable collectives is an improvement to the existing init_process_group() API which changes backend to an optional argument. For users, the main advantage of this feature is that it will allow them to write code that can run on both GPU and CPU machines without having to change the backend specification. The dispatchability feature will also make it easier for users to support both GPU and CPU collectives, as they will no longer need to specify the backend manually (e.g. “NCCL” or “GLOO”). Existing backend specifications by users will be honored and will not require change.\n\nUsage example:\n\nimport torch.distributed.dist\n…\n# old\ndist.init_process_group(backend=”nccl”, ...)\ndist.all_reduce(...) # with CUDA tensors works\ndist.all_reduce(...) # with CPU tensors does not work\n\n# new\ndist.init_process_group(...) # backend is optional\ndist.all_reduce(...) # with CUDA tensors works\ndist.all_reduce(...) # with CPU tensors works\n\n\nLearn more here.\n\n[Beta] torch.set_default_device and torch.device as context manager\n\ntorch.set_default_device allows users to change the default device that factory functions in PyTorch allocate on. For example, if you torch.set_default_device(‘cuda’), a call to torch.empty(2) will allocate on CUDA (rather than on CPU). You can also use torch.device as a context manager to change the default device on a local basis. This resolves a long standing feature request from PyTorch’s initial release for a way to do this.\n\nLearn more here.\n\n[Beta] “X86” as the new default quantization backend for x86 CPU\n\nThe new X86 quantization backend, which utilizes FBGEMM and oneDNN kernel libraries, replaces FBGEMM as the default quantization backend for x86 CPU platforms and offers improved int8 inference performance compared to the original FBGEMM backend, leveraging the strengths of both libraries, with 1.3X – 2X inference performance speedup measured on 40+ deep learning models. The new backend is functionally compatible with the original FBGEMM backend.\n\nTable: Geomean Speedup of X86 Quantization Backend vs. FBGEMM Backend\n\n\t1 core/instance\t2 cores/instance\t4 cores/instance\t1 socket (32 cores)/instance\nIntel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz\t1.76X\t1.80X\t2.04X\t1.34X\n\nBy default, users on x86 platforms will utilize the x86 quantization backend and their PyTorch programs will remain unchanged when using the default backend. Alternatively, users have the option to specify “X86” as the quantization backend explicitly. Example code is shown below:\n\nimport torch\nfrom torch.ao.quantization import get_default_qconfig_mappingfrom torch.quantization.quantize_fx\nimport prepare_fx, convert_fx\n \n# get default configuration\nqconfig_mapping = get_default_qconfig_mapping()\n \n# or explicitly specify the backend\n# qengine = 'x86'\n# torch.backends.quantized.engine = qengine\n# qconfig_mapping = get_default_qconfig_mapping(qengine)\n \n# construct fp32 model\nmodel_fp32 = ...\n \n# prepare\nprepared_model = prepare_fx(model_fp32, qconfig_mapping, example_inputs=x)\n \n# calibrate\n...\n \n# convert\nquantized_model = convert_fx(prepared_model)\n\n\nFind more information: https://github.com/pytorch/pytorch/issues/83888 and https://www.intel.com/content/www/us/en/developer/articles/technical/accelerate-pytorch-int8-inf-with-new-x86-backend.html.\n\n[Beta] GNN inference and training optimization on CPU\n\nPyTorch 2.0 includes several critical optimizations to improve GNN inference and training performance on CPU. Before 2.0, GNN models of PyG suffers from low efficiency on CPU due to lack of performance tuning for several critical kernels (scatter/gather, etc) and the lack of GNN-related sparse matrix multiplication ops. To be specific, optimizations include:\n\nscatter_reduce: performance hotspot in Message Passing when the edge index is stored in Coordinate format (COO).\ngather: backward of scatter_reduce, specially tuned for the GNN compute when the index is an expanded tensor.\ntorch.sparse.mm with reduce flag: performance hotspot in Message Passing when the edge index is stored in Compressed Sparse Row (CSR). Supported reduce flag of: sum, mean, amax, amin.\n\nOn PyG benchmarks/examples, OGB benchmarks, a 1.12x – 4.07x performance speedup is measured (1.13.1 compared with 2.0) for single node inference and training.\n\nModel-Dataset\tOption\tSpeedup Ratio\nGCN-Reddit (inference)\t512-2-64-dense\t1.22x\n1024-3-128-dense\t1.25x\n512-2-64-sparse\t1.31x\n1024-3-128-sparse\t1.68x\n512-2-64-dense\t1.22x\nGraphSage-ogbn-products (inference)\t1024-3-128-dense\t1.15x\n512-2-64-sparse\t1.20x\n1024-3-128-sparse\t1.33x\nfull-batch-sparse\t4.07x\nGCN-PROTEINS (training)\t3-32\t1.67x\nGCN-REDDIT-BINARY (training)\t3-32\t1.67x\nGCN-Reddit (training)\t512-2-64-dense\t1.20x\n1024-3-128-dense\t1.12x\n\nLearn more: PyG CPU Performance Optimization.\n\n[Beta] Accelerating inference on CPU with PyTorch by leveraging oneDNN Graph\n\noneDNN Graph API extends oneDNN with a flexible graph API to maximize the optimization opportunity for generating efficient code on AI hardware.\n\nIt automatically identifies the graph partitions to be accelerated via fusion.\nThe fusion patterns focus on fusing compute-intensive operations such as convolution, matmul and their neighbor operations for both inference and training use cases.\nAlthough work is ongoing to integrate oneDNN Graph with TorchDynamo as well, its integration with the PyTorch JIT Fuser attained beta status in PyTorch 2.0 for Float32 & BFloat16 inference (on machines that support AVX512_BF16 ISA).\n\nFrom a developer’s/researcher’s perspective, the usage is quite simple & intuitive, with the only change in code being an API invocation:\n\nLeverage oneDNN Graph, with JIT-tracing, a model is profiled with an example input.\nThe context manager with torch.jit.fuser(“fuser3”): can also be used instead of invoking torch.jit.enable_onednn_fusion(True).\nFor accelerating BFloat16 inference, we rely on eager-mode AMP (Automatic Mixed Precision) support in PyTorch & disable JIT mode’s AMP, as both of them are currently divergent:\n# Assuming we have a model of the name 'model'\n \nexample_input = torch.rand(1, 3, 224, 224)\n \n# enable oneDNN Graph\ntorch.jit.enable_onednn_fusion(True)\n# Disable AMP for JIT\ntorch._C._jit_set_autocast_mode(False)\nwith torch.no_grad(), torch.cpu.amp.autocast():\n\tmodel = torch.jit.trace(model, (example_input))\n\tmodel = torch.jit.freeze(model)\n \t# 2 warm-ups (2 for tracing/scripting with an example, 3 without an example)\n\tmodel(example_input)\n\tmodel(example_input)\n \n\t# speedup would be observed in subsequent runs.\n\tmodel(example_input)\n\n\nLearn more here.\n\nPrototype Features\nDistributed API\n[Prototype] DTensor\n\nPyTorch DistributedTensor (DTensor) is a prototyping effort with distributed tensor primitives to allow easier distributed computation authoring in the SPMD (Single Program Multiple Devices) paradigm. The primitives are simple but powerful when used to express tensor distributions with both sharded and replicated parallelism strategies. PyTorch DTensor empowered PyTorch Tensor Parallelism along with other advanced parallelism explorations. In addition, it also offers a uniform way to save/load state_dict for distributed checkpointing purposes, even when there’re complex tensor distribution strategies such as combining tensor parallelism with parameter sharding in FSDP. More details can be found in this RFC and the DTensor examples notebook.\n\n[Prototype] TensorParallel\n\nWe now support DTensor based Tensor Parallel which users can distribute their model parameters across different GPU devices. We also support Pairwise Parallel which shards two concatenated linear layers in a col-wise and row-wise style separately so that only one collective(all-reduce/reduce-scatter) is needed in the end.\n\n[Prototype] 2D Parallel\n\nWe implemented the integration of the aforementioned TP with FullyShardedDataParallel(FSDP) as 2D parallel to further scale large model training. More details can be found in this slide.\n\n[Prototype] torch.compile(dynamic=True)\n\nExperimental support for PT2 compilation with dynamic shapes is available in this release. Inference compilation with inductor for simple models is supported, but there are a lot of limitations:\n\nTraining available in a future release (This is partially fixed in nightlies!)\nMinifier available in a future release.\nIt is easy to end up in a situation where the dimension you wanted to be dynamic gets specialized anyway. Some of these issues are fixed in nightlies, others are not.\nWe do not appropriately propagate Inductor guards to the top-level, this is tracked at #96296.\nData-dependent operations like nonzero still require a graph break.\nDynamic does not work with non-standard modes like reduce-overhead or max-autotune.\nThere are many bugs in Inductor compilation. To track known bugs, check the dynamic shapes label on the PyTorch issue tracker.\n\nFor the latest and greatest news about dynamic shapes support on master, check out our status reports.\n\nHighlights/Performance Improvements\nDeprecation of Cuda 11.6 and Python 3.7 support for PyTorch 2.0\n\nIf you are still using or depending on CUDA 11.6 or Python 3.7 builds, we strongly recommend moving to at least CUDA 11.7 and Python 3.8, as it would be the minimum versions required for PyTorch 2.0. For more detail, please refer to the Release Compatibility Matrix for PyTorch releases.\n\nPython 3.11 support on Anaconda Platform\n\nDue to lack of Python 3.11 support for packages that PyTorch depends on, including NumPy, SciPy, SymPy, Pillow and others on the Anaconda platform. We will not be releasing Conda binaries compiled with Python 3.11 for PyTorch Release 2.0. The Pip packages with Python 3.11 support will be released, hence if you intend to use PyTorch 2.0 with Python 3.11 please use our Pip packages. Please note: Conda packages with Python 3.11 support will be made available on our nightly channel. Also we are planning on releasing Conda Python 3.11 binaries as part of future release once Anaconda provides these key dependencies. More information and instructions on how to download the Pip packages can be found here.\n\nOptimized PyTorch Inference with AWS Graviton processors\n\nThe optimizations focused on three key areas: GEMM kernels, bfloat16 support, primitive caching and the memory allocator. For aarch64 platforms, PyTorch supports Arm Compute Library (ACL) GEMM kernels via Mkldnn(OneDNN) backend. The ACL library provides Neon/SVE GEMM kernels for fp32 and bfloat16 formats. The bfloat16 support on c7g allows efficient deployment of bfloat16 trained, AMP (Automatic Mixed Precision) trained, or even the standard fp32 trained models. The standard fp32 models leverage bfloat16 kernels via OneDNN fast math mode, without any model quantization. Next we implemented primitive caching for conv, matmul and inner product operators. More information on the updated PyTorch user guide with the upcoming 2.0 release improvements and TorchBench benchmark details can be found here.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "we are excited to announce the release of pytorch 2 0 which we highlighted during the pytorch conference on 12 2 22 pytorch 2 0 offers the same eager mode development and user experience while fundamentally changing and supercharging how pytorch operates at compiler level under the hood with faster performance and support for dynamic shapes and distributed this next generation release includes a stable version of accelerated transformers formerly called better transformers beta includes torch compile as the main api for pytorch 2 0 the scaled dot product attention function as part of torch nn functional the mps backend functorch apis in the torch func module and other beta prototype improvements across various inferences performance and training optimization features on gpus and cpus for a comprehensive introduction and technical overview of torch compile please visit the 2 0 get started page along with 2 0 we are also releasing a series of beta updates to the pytorch domain libraries including those that are in tree and separate libraries including torchaudio torchvision and torchtext an update for torchx is also being released as it moves to community supported mode more details can be found in this library blog this release is composed of over 4 541 commits and 428 contributors since 1 13 1 we want to sincerely thank our dedicated community for your contributions as always we encourage you to try these out and report any issues as we improve 2 0 and the overall 2 series this year summary torch compile is the main api for pytorch 2 0 which wraps your model and returns a compiled model it is a fully additive and optional feature and hence 2 0 is 100 backward compatible by definition as an underpinning technology of torch compile torchinductor with nvidia and amd gpus will rely on openai triton deep learning compiler to generate performant code and hide low level hardware details openai triton generated kernels achieve performance that s on par with hand written kernels and specialized cuda libraries such as cublas accelerated transformers introduce high performance support for training and inference using a custom kernel architecture for scaled dot product attention spda the api is integrated with torch compile and model developers may also use the scaled dot product attention kernels directly by calling the new scaled dot product attention operator metal performance shaders mps backend provides gpu accelerated pytorch training on mac platforms with added support for top 60 most used ops bringing coverage to over 300 operators amazon aws optimizes the pytorch cpu inference on aws graviton3 based c7g instances pytorch 2 0 improves inference performance on graviton compared to the previous releases including improvements for resnet50 and bert new prototype features and technologies across tensorparallel dtensor 2d parallel torchdynamo aotautograd primtorch and torchinductor stable beta prototype performance improvements accelerated pt 2 transformers torch compile dtensor cuda support for 11 7 11 8 deprecating cuda 11 6 pytorch mps backend tensorparallel python 3 8 deprecating python 3 7 scaled dot product attention 2d parallel aws graviton3 functorch torch compile dynamic true dispatchable collectives torch set default torch device x86 quantization backend gnn inference and training performance to see a full list of public 2 0 1 13 and 1 12 feature submissions click here", "source_text": "We are excited to announce the release of PyTorch® 2.0 which we highlighted during the PyTorch Conference on 12/2/22! PyTorch 2.0 offers the same eager-mode development and user experience, while fundamentally changing and supercharging how PyTorch operates at compiler level under the hood with faster performance and support for Dynamic Shapes and Distributed.\n\nThis next-generation release includes a Stable version of Accelerated Transformers (formerly called Better Transformers); Beta includes torch.compile as the main API for PyTorch 2.0, the scaled_dot_product_attention function as part of torch.nn.functional, the MPS backend, functorch APIs in the torch.func module; and other Beta/Prototype improvements across various inferences, performance and training optimization features on GPUs and CPUs. For a comprehensive introduction and technical overview of torch.compile, please visit the 2.0 Get Started page.\n\nAlong with 2.0, we are also releasing a series of beta updates to the PyTorch domain libraries, including those that are in-tree, and separate libraries including TorchAudio, TorchVision, and TorchText. An update for TorchX is also being released as it moves to community supported mode. More details can be found in this library blog.\n\nThis release is composed of over 4,541 commits and 428 contributors since 1.13.1. We want to sincerely thank our dedicated community for your contributions. As always, we encourage you to try these out and report any issues as we improve 2.0 and the overall 2-series this year.\n\nSummary:\n\ntorch.compile is the main API for PyTorch 2.0, which wraps your model and returns a compiled model. It is a fully additive (and optional) feature and hence 2.0 is 100% backward compatible by definition.\nAs an underpinning technology of torch.compile, TorchInductor with Nvidia and AMD GPUs will rely on OpenAI Triton deep learning compiler to generate performant code and hide low level hardware details. OpenAI Triton-generated kernels achieve performance that’s on par with hand-written kernels and specialized cuda libraries such as cublas.\nAccelerated Transformers introduce high-performance support for training and inference using a custom kernel architecture for scaled dot product attention (SPDA). The API is integrated with torch.compile() and model developers may also use the scaled dot product attention kernels directly by calling the new scaled_dot_product_attention() operator.\nMetal Performance Shaders (MPS) backend provides GPU accelerated PyTorch training on Mac platforms with added support for Top 60 most used ops, bringing coverage to over 300 operators.\nAmazon AWS optimizes the PyTorch CPU inference on AWS Graviton3 based C7g instances. PyTorch 2.0 improves inference performance on Graviton compared to the previous releases, including improvements for Resnet50 and Bert.\nNew prototype features and technologies across TensorParallel, DTensor, 2D parallel, TorchDynamo, AOTAutograd, PrimTorch and TorchInductor.\nStable\tBeta\tPrototype\tPerformance Improvements\nAccelerated PT 2 Transformers\ttorch.compile\tDTensor\tCUDA support for 11.7 & 11.8 (deprecating CUDA 11.6)\n\tPyTorch MPS Backend\tTensorParallel\tPython 3.8 (deprecating Python 3.7)\n\tScaled dot product attention\t2D Parallel\tAWS Graviton3\n\tfunctorch\tTorch.compile (dynamic=True)\t\n\tDispatchable Collectives\t\n\tTorch.set_default & torch.device\t\t\n\tX86 quantization backend\t\t\n\tGNN inference and training performance\t\t\n\n*To see a full list of public 2.0, 1.13 and 1.12 feature submissions click here.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:We are excited to announce the release of PyTorch® 2.0 which", "source_line_range": [ 1, 28 ] }, { "id": "body-region-2", "text": "stable features stable accelerated pytorch 2 transformers the pytorch 2 0 release includes a new high performance implementation of the pytorch transformer api in releasing accelerated pt2 transformers our goal is to make training and deployment of state of the art transformer models affordable across the industry this release introduces high performance support for training and inference using a custom kernel architecture for scaled dot product attention spda extending the inference fastpath architecture previously known as better transformer similar to the fastpath architecture custom kernels are fully integrated into the pytorch transformer api thus using the native transformer and multiheadattention api will enable users to transparently see significant speed improvements support many more use cases including models using cross attention transformer decoders and for training models and continue to use fastpath inference for fixed and variable sequence length transformer encoder and self attention use cases to take full advantage of different hardware models and transformer use cases multiple sdpa custom kernels are supported see below with custom kernel selection logic that will pick the highest performance kernel for a given model and hardware type in addition to the existing transformer api model developers may also use the scaled dot product attention kernels directly by calling the new scaled dot product attention operator accelerated pytorch 2 transformers are integrated with torch compile to use your model while benefiting from the additional acceleration of pt2 compilation for inference or training pre process the model with model torch compile model we have achieved major speedups for training transformer models and in particular large language models with accelerated pytorch 2 transformers using a combination of custom kernels and torch compile figure using scaled dot product attention with custom kernels and torch compile delivers significant speedups for training large language models such as for nanogpt shown here", "source_text": "Stable Features\n[Stable] Accelerated PyTorch 2 Transformers\n\nThe PyTorch 2.0 release includes a new high-performance implementation of the PyTorch Transformer API. In releasing Accelerated PT2 Transformers, our goal is to make training and deployment of state-of-the-art Transformer models affordable across the industry. This release introduces high-performance support for training and inference using a custom kernel architecture for scaled dot product attention (SPDA), extending the inference “fastpath” architecture, previously known as “Better Transformer.”\n\nSimilar to the “fastpath” architecture, custom kernels are fully integrated into the PyTorch Transformer API – thus, using the native Transformer and MultiHeadAttention API will enable users to:\n\ntransparently see significant speed improvements;\nsupport many more use cases including models using Cross-Attention, Transformer Decoders, and for training models; and\ncontinue to use fastpath inference for fixed and variable sequence length Transformer Encoder and Self Attention use cases.\n\nTo take full advantage of different hardware models and Transformer use cases, multiple SDPA custom kernels are supported (see below), with custom kernel selection logic that will pick the highest-performance kernel for a given model and hardware type. In addition to the existing Transformer API, model developers may also use the scaled dot product attention kernels directly by calling the new scaled_dot_product_attention() operator. Accelerated PyTorch 2 Transformers are integrated with torch.compile() . To use your model while benefiting from the additional acceleration of PT2-compilation (for inference or training), pre-process the model with model = torch.compile(model).\n\nWe have achieved major speedups for training transformer models and in particular large language models with Accelerated PyTorch 2 Transformers using a combination of custom kernels and torch.compile().\n\n Figure: Using scaled dot product attention with custom kernels and torch.compile delivers significant speedups for training large language models, such as for nanoGPT shown here.", "segmentation_method": "reviewed_source_semantics", "label": "Stable Features", "source_line_range": [ 29, 45 ] }, { "id": "body-region-3", "text": "beta features beta torch compile torch compile is the main api for pytorch 2 0 which wraps your model and returns a compiled model it is a fully additive and optional feature and hence 2 0 is 100 backward compatible by definition underpinning torch compile are new technologies torchdynamo aotautograd primtorch and torchinductor torchdynamo captures pytorch programs safely using python frame evaluation hooks and is a significant innovation that was a result of 5 years of our r d into safe graph capture aotautograd overloads pytorch s autograd engine as a tracing autodiff for generating ahead of time backward traces primtorch canonicalizes 2000 pytorch operators down to a closed set of 250 primitive operators that developers can target to build a complete pytorch backend this substantially lowers the barrier of writing a pytorch feature or backend torchinductor is a deep learning compiler that generates fast code for multiple accelerators and backends for nvidia and amd gpus it uses openai triton as a key building block for intel cpus we generate c code using multithreading vectorized instructions and offloading appropriate operations to mkldnn when possible with all the new technologies torch compile is able to work 93 of time across 165 open source models and runs 20 faster on average at float32 precision and 36 faster on average at amp precision for more information please refer to https pytorch org get started pytorch 2 0 and for torchinductor cpu with intel here beta pytorch mps backend mps backend provides gpu accelerated pytorch training on mac platforms this release brings improved correctness stability and operator coverage mps backend now includes support for the top 60 most used ops along with the most frequently requested operations by the community bringing coverage to over 300 operators the major focus of the release was to enable full opinfo based forward and gradient mode testing to address silent correctness issues these changes have resulted in wider adoption of mps backend by 3rd party networks such as stable diffusion yolov5 whisperai along with increased coverage for torchbench networks and basic tutorials we encourage developers to update to the latest macos release to see the best performance and stability on the mps backend links mps backend developer information accelerated pytorch training on mac metal metal performance shaders metal performance shaders graph beta scaled dot product attention 2 0 we are thrilled to announce the release of pytorch 2 0 which introduces a powerful scaled dot product attention function as part of torch nn functional this function includes multiple implementations that can be seamlessly applied depending on the input and hardware in use in previous versions of pytorch you had to rely on third party implementations and install separate packages to take advantage of memory optimized algorithms like flashattention with pytorch 2 0 all these implementations are readily available by default these implementations include flashattention from hazyresearch memory efficient attention from the xformers project and a native c implementation that is ideal for non cuda devices or when high precision is required pytorch 2 0 will automatically select the optimal implementation for your use case but you can also toggle them individually for finer grained control additionally the scaled dot product attention function can be used to build common transformer architecture components learn more with the documentation and this tutorial beta functorch torch func inspired by google jax functorch is a library that offers composable vmap vectorization and autodiff transforms it enables advanced autodiff use cases that would otherwise be tricky to express in pytorch examples include model ensembling efficiently computing jacobians and hessians computing per sample gradients or other per sample quantities we re excited to announce that as the final step of upstreaming and integrating functorch into pytorch the functorch apis are now available in the torch func module our function transform apis are identical to before but we have changed how the interaction with nn modules work please see the docs and the migration guide for more details furthermore we have added support for torch autograd function one is now able to apply function transformations e g vmap grad jvp over torch autograd function beta dispatchable collectives dispatchable collectives is an improvement to the existing init process group api which changes backend to an optional argument for users the main advantage of this feature is that it will allow them to write code that can run on both gpu and cpu machines without having to change the backend specification the dispatchability feature will also make it easier for users to support both gpu and cpu collectives as they will no longer need to specify the backend manually e g nccl or gloo existing backend specifications by users will be honored and will not require change usage example import torch distributed dist old dist init process group backend nccl dist all reduce with cuda tensors works dist all reduce with cpu tensors does not work new dist init process group backend is optional dist all reduce with cuda tensors works dist all reduce with cpu tensors works learn more here beta torch set default device and torch device as context manager torch set default device allows users to change the default device that factory functions in pytorch allocate on for example if you torch set default device cuda a call to torch empty 2 will allocate on cuda rather than on cpu you can also use torch device as a context manager to change the default device on a local basis this resolves a long standing feature request from pytorch s initial release for a way to do this learn more here beta x86 as the new default quantization backend for x86 cpu the new x86 quantization backend which utilizes fbgemm and onednn kernel libraries replaces fbgemm as the default quantization backend for x86 cpu platforms and offers improved int8 inference performance compared to the original fbgemm backend leveraging the strengths of both libraries with 1 3x 2x inference performance speedup measured on 40 deep learning models the new backend is functionally compatible with the original fbgemm backend table geomean speedup of x86 quantization backend vs fbgemm backend 1 core instance 2 cores instance 4 cores instance 1 socket 32 cores instance intel r xeon r platinum 8358 cpu 2 60ghz 1 76x 1 80x 2 04x 1 34x by default users on x86 platforms will utilize the x86 quantization backend and their pytorch programs will remain unchanged when using the default backend alternatively users have the option to specify x86 as the quantization backend explicitly example code is shown below import torch from torch ao quantization import get default qconfig mappingfrom torch quantization quantize fx import prepare fx convert fx get default configuration qconfig mapping get default qconfig mapping or explicitly specify the backend qengine x86 torch backends quantized engine qengine qconfig mapping get default qconfig mapping qengine construct fp32 model model fp32 prepare prepared model prepare fx model fp32 qconfig mapping example inputs x calibrate convert quantized model convert fx prepared model find more information https github com pytorch pytorch issues 83888 and https www intel com content www us en developer articles technical accelerate pytorch int8 inf with new x86 backend html beta gnn inference and training optimization on cpu pytorch 2 0 includes several critical optimizations to improve gnn inference and training performance on cpu before 2 0 gnn models of pyg suffers from low efficiency on cpu due to lack of performance tuning for several critical kernels scatter gather etc and the lack of gnn related sparse matrix multiplication ops to be specific optimizations include scatter reduce performance hotspot in message passing when the edge index is stored in coordinate format coo gather backward of scatter reduce specially tuned for the gnn compute when the index is an expanded tensor torch sparse mm with reduce flag performance hotspot in message passing when the edge index is stored in compressed sparse row csr supported reduce flag of sum mean amax amin on pyg benchmarks examples ogb benchmarks a 1 12x 4 07x performance speedup is measured 1 13 1 compared with 2 0 for single node inference and training model dataset option speedup ratio gcn reddit inference 512 2 64 dense 1 22x 1024 3 128 dense 1 25x 512 2 64 sparse 1 31x 1024 3 128 sparse 1 68x 512 2 64 dense 1 22x graphsage ogbn products inference 1024 3 128 dense 1 15x 512 2 64 sparse 1 20x 1024 3 128 sparse 1 33x full batch sparse 4 07x gcn proteins training 3 32 1 67x gcn reddit binary training 3 32 1 67x gcn reddit training 512 2 64 dense 1 20x 1024 3 128 dense 1 12x learn more pyg cpu performance optimization beta accelerating inference on cpu with pytorch by leveraging onednn graph onednn graph api extends onednn with a flexible graph api to maximize the optimization opportunity for generating efficient code on ai hardware it automatically identifies the graph partitions to be accelerated via fusion the fusion patterns focus on fusing compute intensive operations such as convolution matmul and their neighbor operations for both inference and training use cases although work is ongoing to integrate onednn graph with torchdynamo as well its integration with the pytorch jit fuser attained beta status in pytorch 2 0 for float32 bfloat16 inference on machines that support avx512 bf16 isa from a developer s researcher s perspective the usage is quite simple intuitive with the only change in code being an api invocation leverage onednn graph with jit tracing a model is profiled with an example input the context manager with torch jit fuser fuser3 can also be used instead of invoking torch jit enable onednn fusion true for accelerating bfloat16 inference we rely on eager mode amp automatic mixed precision support in pytorch disable jit mode s amp as both of them are currently divergent assuming we have a model of the name model example input torch rand 1 3 224 224 enable onednn graph torch jit enable onednn fusion true disable amp for jit torch c jit set autocast mode false with torch no grad torch cpu amp autocast model torch jit trace model example input model torch jit freeze model 2 warm ups 2 for tracing scripting with an example 3 without an example model example input model example input speedup would be observed in subsequent runs model example input learn more here", "source_text": "Beta Features\n[Beta] torch.compile\n\ntorch.compile is the main API for PyTorch 2.0, which wraps your model and returns a compiled model. It is a fully additive (and optional) feature and hence 2.0 is 100% backward compatible by definition.\n\nUnderpinning torch.compile are new technologies – TorchDynamo, AOTAutograd, PrimTorch and TorchInductor:\n\nTorchDynamo captures PyTorch programs safely using Python Frame Evaluation Hooks and is a significant innovation that was a result of 5 years of our R&D into safe graph capture.\nAOTAutograd overloads PyTorch’s autograd engine as a tracing autodiff for generating ahead-of-time backward traces.\nPrimTorch canonicalizes ~2000+ PyTorch operators down to a closed set of ~250 primitive operators that developers can target to build a complete PyTorch backend. This substantially lowers the barrier of writing a PyTorch feature or backend.\nTorchInductor is a deep learning compiler that generates fast code for multiple accelerators and backends. For NVIDIA and AMD GPUs, it uses OpenAI Triton as a key building block. For intel CPUs, we generate C++ code using multithreading, vectorized instructions and offloading appropriate operations to mkldnn when possible.\n\nWith all the new technologies, torch.compile is able to work 93% of time across 165 open-source models and runs 20% faster on average at float32 precision and 36% faster on average at AMP precision.\n\nFor more information, please refer to https://pytorch.org/get-started/pytorch-2.0/ and for TorchInductor CPU with Intel here.\n\n[Beta] PyTorch MPS Backend\n\nMPS backend provides GPU-accelerated PyTorch training on Mac platforms. This release brings improved correctness, stability, and operator coverage.\n\nMPS backend now includes support for the Top 60 most used ops, along with the most frequently requested operations by the community, bringing coverage to over 300 operators. The major focus of the release was to enable full OpInfo-based forward and gradient mode testing to address silent correctness issues. These changes have resulted in wider adoption of MPS backend by 3rd party networks such as Stable Diffusion, YoloV5, WhisperAI, along with increased coverage for Torchbench networks and Basic tutorials. We encourage developers to update to the latest macOS release to see the best performance and stability on the MPS backend.\n\nLinks\n\nMPS Backend\nDeveloper information\nAccelerated PyTorch training on Mac\nMetal, Metal Performance Shaders & Metal Performance Shaders Graph\n[Beta] Scaled dot product attention 2.0\n\nWe are thrilled to announce the release of PyTorch 2.0, which introduces a powerful scaled dot product attention function as part of torch.nn.functional. This function includes multiple implementations that can be seamlessly applied depending on the input and hardware in use.\n\nIn previous versions of PyTorch, you had to rely on third-party implementations and install separate packages to take advantage of memory-optimized algorithms like FlashAttention. With PyTorch 2.0, all these implementations are readily available by default.\n\nThese implementations include FlashAttention from HazyResearch, Memory-Efficient Attention from the xFormers project, and a native C++ implementation that is ideal for non-CUDA devices or when high-precision is required.\n\nPyTorch 2.0 will automatically select the optimal implementation for your use case, but you can also toggle them individually for finer-grained control. Additionally, the scaled dot product attention function can be used to build common transformer architecture components.\n\nLearn more with the documentation and this tutorial.\n\n[Beta] functorch -> torch.func\n\nInspired by Google JAX, functorch is a library that offers composable vmap (vectorization) and autodiff transforms. It enables advanced autodiff use cases that would otherwise be tricky to express in PyTorch. Examples include:\n\nmodel ensembling\nefficiently computing jacobians and hessians\ncomputing per-sample-gradients (or other per-sample quantities)\n\nWe’re excited to announce that, as the final step of upstreaming and integrating functorch into PyTorch, the functorch APIs are now available in the torch.func module. Our function transform APIs are identical to before, but we have changed how the interaction with NN modules work. Please see the docs and the migration guide for more details.\n\nFurthermore, we have added support for torch.autograd.Function: one is now able to apply function transformations (e.g. vmap, grad, jvp) over torch.autograd.Function.\n\n[Beta] Dispatchable Collectives\n\nDispatchable collectives is an improvement to the existing init_process_group() API which changes backend to an optional argument. For users, the main advantage of this feature is that it will allow them to write code that can run on both GPU and CPU machines without having to change the backend specification. The dispatchability feature will also make it easier for users to support both GPU and CPU collectives, as they will no longer need to specify the backend manually (e.g. “NCCL” or “GLOO”). Existing backend specifications by users will be honored and will not require change.\n\nUsage example:\n\nimport torch.distributed.dist\n…\n# old\ndist.init_process_group(backend=”nccl”, ...)\ndist.all_reduce(...) # with CUDA tensors works\ndist.all_reduce(...) # with CPU tensors does not work\n\n# new\ndist.init_process_group(...) # backend is optional\ndist.all_reduce(...) # with CUDA tensors works\ndist.all_reduce(...) # with CPU tensors works\n\n\nLearn more here.\n\n[Beta] torch.set_default_device and torch.device as context manager\n\ntorch.set_default_device allows users to change the default device that factory functions in PyTorch allocate on. For example, if you torch.set_default_device(‘cuda’), a call to torch.empty(2) will allocate on CUDA (rather than on CPU). You can also use torch.device as a context manager to change the default device on a local basis. This resolves a long standing feature request from PyTorch’s initial release for a way to do this.\n\nLearn more here.\n\n[Beta] “X86” as the new default quantization backend for x86 CPU\n\nThe new X86 quantization backend, which utilizes FBGEMM and oneDNN kernel libraries, replaces FBGEMM as the default quantization backend for x86 CPU platforms and offers improved int8 inference performance compared to the original FBGEMM backend, leveraging the strengths of both libraries, with 1.3X – 2X inference performance speedup measured on 40+ deep learning models. The new backend is functionally compatible with the original FBGEMM backend.\n\nTable: Geomean Speedup of X86 Quantization Backend vs. FBGEMM Backend\n\n\t1 core/instance\t2 cores/instance\t4 cores/instance\t1 socket (32 cores)/instance\nIntel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz\t1.76X\t1.80X\t2.04X\t1.34X\n\nBy default, users on x86 platforms will utilize the x86 quantization backend and their PyTorch programs will remain unchanged when using the default backend. Alternatively, users have the option to specify “X86” as the quantization backend explicitly. Example code is shown below:\n\nimport torch\nfrom torch.ao.quantization import get_default_qconfig_mappingfrom torch.quantization.quantize_fx\nimport prepare_fx, convert_fx\n \n# get default configuration\nqconfig_mapping = get_default_qconfig_mapping()\n \n# or explicitly specify the backend\n# qengine = 'x86'\n# torch.backends.quantized.engine = qengine\n# qconfig_mapping = get_default_qconfig_mapping(qengine)\n \n# construct fp32 model\nmodel_fp32 = ...\n \n# prepare\nprepared_model = prepare_fx(model_fp32, qconfig_mapping, example_inputs=x)\n \n# calibrate\n...\n \n# convert\nquantized_model = convert_fx(prepared_model)\n\n\nFind more information: https://github.com/pytorch/pytorch/issues/83888 and https://www.intel.com/content/www/us/en/developer/articles/technical/accelerate-pytorch-int8-inf-with-new-x86-backend.html.\n\n[Beta] GNN inference and training optimization on CPU\n\nPyTorch 2.0 includes several critical optimizations to improve GNN inference and training performance on CPU. Before 2.0, GNN models of PyG suffers from low efficiency on CPU due to lack of performance tuning for several critical kernels (scatter/gather, etc) and the lack of GNN-related sparse matrix multiplication ops. To be specific, optimizations include:\n\nscatter_reduce: performance hotspot in Message Passing when the edge index is stored in Coordinate format (COO).\ngather: backward of scatter_reduce, specially tuned for the GNN compute when the index is an expanded tensor.\ntorch.sparse.mm with reduce flag: performance hotspot in Message Passing when the edge index is stored in Compressed Sparse Row (CSR). Supported reduce flag of: sum, mean, amax, amin.\n\nOn PyG benchmarks/examples, OGB benchmarks, a 1.12x – 4.07x performance speedup is measured (1.13.1 compared with 2.0) for single node inference and training.\n\nModel-Dataset\tOption\tSpeedup Ratio\nGCN-Reddit (inference)\t512-2-64-dense\t1.22x\n1024-3-128-dense\t1.25x\n512-2-64-sparse\t1.31x\n1024-3-128-sparse\t1.68x\n512-2-64-dense\t1.22x\nGraphSage-ogbn-products (inference)\t1024-3-128-dense\t1.15x\n512-2-64-sparse\t1.20x\n1024-3-128-sparse\t1.33x\nfull-batch-sparse\t4.07x\nGCN-PROTEINS (training)\t3-32\t1.67x\nGCN-REDDIT-BINARY (training)\t3-32\t1.67x\nGCN-Reddit (training)\t512-2-64-dense\t1.20x\n1024-3-128-dense\t1.12x\n\nLearn more: PyG CPU Performance Optimization.\n\n[Beta] Accelerating inference on CPU with PyTorch by leveraging oneDNN Graph\n\noneDNN Graph API extends oneDNN with a flexible graph API to maximize the optimization opportunity for generating efficient code on AI hardware.\n\nIt automatically identifies the graph partitions to be accelerated via fusion.\nThe fusion patterns focus on fusing compute-intensive operations such as convolution, matmul and their neighbor operations for both inference and training use cases.\nAlthough work is ongoing to integrate oneDNN Graph with TorchDynamo as well, its integration with the PyTorch JIT Fuser attained beta status in PyTorch 2.0 for Float32 & BFloat16 inference (on machines that support AVX512_BF16 ISA).\n\nFrom a developer’s/researcher’s perspective, the usage is quite simple & intuitive, with the only change in code being an API invocation:\n\nLeverage oneDNN Graph, with JIT-tracing, a model is profiled with an example input.\nThe context manager with torch.jit.fuser(“fuser3”): can also be used instead of invoking torch.jit.enable_onednn_fusion(True).\nFor accelerating BFloat16 inference, we rely on eager-mode AMP (Automatic Mixed Precision) support in PyTorch & disable JIT mode’s AMP, as both of them are currently divergent:\n# Assuming we have a model of the name 'model'\n \nexample_input = torch.rand(1, 3, 224, 224)\n \n# enable oneDNN Graph\ntorch.jit.enable_onednn_fusion(True)\n# Disable AMP for JIT\ntorch._C._jit_set_autocast_mode(False)\nwith torch.no_grad(), torch.cpu.amp.autocast():\n\tmodel = torch.jit.trace(model, (example_input))\n\tmodel = torch.jit.freeze(model)\n \t# 2 warm-ups (2 for tracing/scripting with an example, 3 without an example)\n\tmodel(example_input)\n\tmodel(example_input)\n \n\t# speedup would be observed in subsequent runs.\n\tmodel(example_input)\n\n\nLearn more here.", "segmentation_method": "reviewed_source_semantics", "label": "Beta Features", "source_line_range": [ 46, 223 ] }, { "id": "body-region-4", "text": "prototype features distributed api prototype dtensor pytorch distributedtensor dtensor is a prototyping effort with distributed tensor primitives to allow easier distributed computation authoring in the spmd single program multiple devices paradigm the primitives are simple but powerful when used to express tensor distributions with both sharded and replicated parallelism strategies pytorch dtensor empowered pytorch tensor parallelism along with other advanced parallelism explorations in addition it also offers a uniform way to save load state dict for distributed checkpointing purposes even when there re complex tensor distribution strategies such as combining tensor parallelism with parameter sharding in fsdp more details can be found in this rfc and the dtensor examples notebook prototype tensorparallel we now support dtensor based tensor parallel which users can distribute their model parameters across different gpu devices we also support pairwise parallel which shards two concatenated linear layers in a col wise and row wise style separately so that only one collective all reduce reduce scatter is needed in the end prototype 2d parallel we implemented the integration of the aforementioned tp with fullyshardeddataparallel fsdp as 2d parallel to further scale large model training more details can be found in this slide prototype torch compile dynamic true experimental support for pt2 compilation with dynamic shapes is available in this release inference compilation with inductor for simple models is supported but there are a lot of limitations training available in a future release this is partially fixed in nightlies minifier available in a future release it is easy to end up in a situation where the dimension you wanted to be dynamic gets specialized anyway some of these issues are fixed in nightlies others are not we do not appropriately propagate inductor guards to the top level this is tracked at 96296 data dependent operations like nonzero still require a graph break dynamic does not work with non standard modes like reduce overhead or max autotune there are many bugs in inductor compilation to track known bugs check the dynamic shapes label on the pytorch issue tracker for the latest and greatest news about dynamic shapes support on master check out our status reports", "source_text": "Prototype Features\nDistributed API\n[Prototype] DTensor\n\nPyTorch DistributedTensor (DTensor) is a prototyping effort with distributed tensor primitives to allow easier distributed computation authoring in the SPMD (Single Program Multiple Devices) paradigm. The primitives are simple but powerful when used to express tensor distributions with both sharded and replicated parallelism strategies. PyTorch DTensor empowered PyTorch Tensor Parallelism along with other advanced parallelism explorations. In addition, it also offers a uniform way to save/load state_dict for distributed checkpointing purposes, even when there’re complex tensor distribution strategies such as combining tensor parallelism with parameter sharding in FSDP. More details can be found in this RFC and the DTensor examples notebook.\n\n[Prototype] TensorParallel\n\nWe now support DTensor based Tensor Parallel which users can distribute their model parameters across different GPU devices. We also support Pairwise Parallel which shards two concatenated linear layers in a col-wise and row-wise style separately so that only one collective(all-reduce/reduce-scatter) is needed in the end.\n\n[Prototype] 2D Parallel\n\nWe implemented the integration of the aforementioned TP with FullyShardedDataParallel(FSDP) as 2D parallel to further scale large model training. More details can be found in this slide.\n\n[Prototype] torch.compile(dynamic=True)\n\nExperimental support for PT2 compilation with dynamic shapes is available in this release. Inference compilation with inductor for simple models is supported, but there are a lot of limitations:\n\nTraining available in a future release (This is partially fixed in nightlies!)\nMinifier available in a future release.\nIt is easy to end up in a situation where the dimension you wanted to be dynamic gets specialized anyway. Some of these issues are fixed in nightlies, others are not.\nWe do not appropriately propagate Inductor guards to the top-level, this is tracked at #96296.\nData-dependent operations like nonzero still require a graph break.\nDynamic does not work with non-standard modes like reduce-overhead or max-autotune.\nThere are many bugs in Inductor compilation. To track known bugs, check the dynamic shapes label on the PyTorch issue tracker.\n\nFor the latest and greatest news about dynamic shapes support on master, check out our status reports.", "segmentation_method": "reviewed_source_semantics", "label": "Prototype Features", "source_line_range": [ 224, 251 ] }, { "id": "body-region-5", "text": "highlights performance improvements deprecation of cuda 11 6 and python 3 7 support for pytorch 2 0 if you are still using or depending on cuda 11 6 or python 3 7 builds we strongly recommend moving to at least cuda 11 7 and python 3 8 as it would be the minimum versions required for pytorch 2 0 for more detail please refer to the release compatibility matrix for pytorch releases python 3 11 support on anaconda platform due to lack of python 3 11 support for packages that pytorch depends on including numpy scipy sympy pillow and others on the anaconda platform we will not be releasing conda binaries compiled with python 3 11 for pytorch release 2 0 the pip packages with python 3 11 support will be released hence if you intend to use pytorch 2 0 with python 3 11 please use our pip packages please note conda packages with python 3 11 support will be made available on our nightly channel also we are planning on releasing conda python 3 11 binaries as part of future release once anaconda provides these key dependencies more information and instructions on how to download the pip packages can be found here optimized pytorch inference with aws graviton processors the optimizations focused on three key areas gemm kernels bfloat16 support primitive caching and the memory allocator for aarch64 platforms pytorch supports arm compute library acl gemm kernels via mkldnn onednn backend the acl library provides neon sve gemm kernels for fp32 and bfloat16 formats the bfloat16 support on c7g allows efficient deployment of bfloat16 trained amp automatic mixed precision trained or even the standard fp32 trained models the standard fp32 models leverage bfloat16 kernels via onednn fast math mode without any model quantization next we implemented primitive caching for conv matmul and inner product operators more information on the updated pytorch user guide with the upcoming 2 0 release improvements and torchbench benchmark details can be found here", "source_text": "Highlights/Performance Improvements\nDeprecation of Cuda 11.6 and Python 3.7 support for PyTorch 2.0\n\nIf you are still using or depending on CUDA 11.6 or Python 3.7 builds, we strongly recommend moving to at least CUDA 11.7 and Python 3.8, as it would be the minimum versions required for PyTorch 2.0. For more detail, please refer to the Release Compatibility Matrix for PyTorch releases.\n\nPython 3.11 support on Anaconda Platform\n\nDue to lack of Python 3.11 support for packages that PyTorch depends on, including NumPy, SciPy, SymPy, Pillow and others on the Anaconda platform. We will not be releasing Conda binaries compiled with Python 3.11 for PyTorch Release 2.0. The Pip packages with Python 3.11 support will be released, hence if you intend to use PyTorch 2.0 with Python 3.11 please use our Pip packages. Please note: Conda packages with Python 3.11 support will be made available on our nightly channel. Also we are planning on releasing Conda Python 3.11 binaries as part of future release once Anaconda provides these key dependencies. More information and instructions on how to download the Pip packages can be found here.\n\nOptimized PyTorch Inference with AWS Graviton processors\n\nThe optimizations focused on three key areas: GEMM kernels, bfloat16 support, primitive caching and the memory allocator. For aarch64 platforms, PyTorch supports Arm Compute Library (ACL) GEMM kernels via Mkldnn(OneDNN) backend. The ACL library provides Neon/SVE GEMM kernels for fp32 and bfloat16 formats. The bfloat16 support on c7g allows efficient deployment of bfloat16 trained, AMP (Automatic Mixed Precision) trained, or even the standard fp32 trained models. The standard fp32 models leverage bfloat16 kernels via OneDNN fast math mode, without any model quantization. Next we implemented primitive caching for conv, matmul and inner product operators. More information on the updated PyTorch user guide with the upcoming 2.0 release improvements and TorchBench benchmark details can be found here.", "segmentation_method": "reviewed_source_semantics", "label": "Highlights/Performance Improvements", "source_line_range": [ 252, 263 ] } ], "ending": { "text": " the upcoming 2.0 release improvements and TorchBench benchmark details can be found here." } } }, { "id": "article-073", "name": "Scaling your API with rate limiters", "url": "https://stripe.com/blog/rate-limiters?trk=public_post_comment-text", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Scaling your API with rate limiters" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Paul Tarjan" ] }, { "id": "stable-3", "alternatives": [ "Engineering" ] }, { "id": "stable-4", "alternatives": [ "Products" ] }, { "id": "stable-5", "alternatives": [ "Solutions" ] }, { "id": "stable-6", "alternatives": [ "Developers" ] }, { "id": "stable-7", "alternatives": [ "Resources" ] }, { "id": "stable-8", "alternatives": [ "Pricing" ] }, { "id": "stable-9", "alternatives": [ "Sign in" ] }, { "id": "stable-10", "alternatives": [ "Contact sales" ] }, { "id": "stable-11", "alternatives": [ "Blog" ] }, { "id": "stable-12", "alternatives": [ "Subscribe to the Stripe Blog" ] }, { "id": "stable-13", "alternatives": [ "Stay connected with Stripe and receive new blog posts in your inbox." ] }, { "id": "stable-14", "alternatives": [ "Subscribe" ] }, { "id": "stable-15", "alternatives": [ "Stripe will handle your data pursuant to its" ] }, { "id": "stable-16", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-17", "alternatives": [ "Like this post? Join our team." ] }, { "id": "stable-18", "alternatives": [ "Stripe builds financial tools and economic infrastructure for the internet." ] }, { "id": "stable-19", "alternatives": [ "View roles" ] }, { "id": "stable-20", "alternatives": [ "Have any feedback or questions?" ] }, { "id": "stable-21", "alternatives": [ "We’d love to hear from you." ] }, { "id": "stable-22", "alternatives": [ "Contact us" ] }, { "id": "stable-23", "alternatives": [ "Products & pricing" ] }, { "id": "stable-24", "alternatives": [ "Atlas" ] }, { "id": "stable-25", "alternatives": [ "Authorization Boost" ] }, { "id": "stable-26", "alternatives": [ "Billing" ] }, { "id": "stable-27", "alternatives": [ "Capital" ] }, { "id": "stable-28", "alternatives": [ "Checkout" ] }, { "id": "stable-29", "alternatives": [ "Climate" ] }, { "id": "stable-30", "alternatives": [ "Connect" ] }, { "id": "stable-31", "alternatives": [ "Crypto" ] }, { "id": "stable-32", "alternatives": [ "Data Pipeline" ] }, { "id": "stable-33", "alternatives": [ "Elements" ] }, { "id": "stable-34", "alternatives": [ "Financial Connections" ] }, { "id": "stable-35", "alternatives": [ "Identity" ] }, { "id": "stable-36", "alternatives": [ "Invoicing" ] }, { "id": "stable-37", "alternatives": [ "Issuing" ] }, { "id": "stable-38", "alternatives": [ "Link" ] }, { "id": "stable-39", "alternatives": [ "Managed Payments" ] }, { "id": "stable-40", "alternatives": [ "Payment links" ] }, { "id": "stable-41", "alternatives": [ "Payments" ] }, { "id": "stable-42", "alternatives": [ "Payouts" ] }, { "id": "stable-43", "alternatives": [ "Radar" ] }, { "id": "stable-44", "alternatives": [ "Revenue Recognition" ] }, { "id": "stable-45", "alternatives": [ "Stripe Sigma" ] }, { "id": "stable-46", "alternatives": [ "Tax" ] }, { "id": "stable-47", "alternatives": [ "Terminal" ] }, { "id": "stable-48", "alternatives": [ "Treasury" ] }, { "id": "stable-49", "alternatives": [ "Enterprises" ] }, { "id": "stable-50", "alternatives": [ "Startups" ] }, { "id": "stable-51", "alternatives": [ "Agentic commerce" ] }, { "id": "stable-52", "alternatives": [ "Ecommerce" ] }, { "id": "stable-53", "alternatives": [ "Embedded finance" ] }, { "id": "stable-54", "alternatives": [ "Finance automation" ] }, { "id": "stable-55", "alternatives": [ "Global businesses" ] }, { "id": "stable-56", "alternatives": [ "In-app payments" ] }, { "id": "stable-57", "alternatives": [ "Marketplaces" ] }, { "id": "stable-58", "alternatives": [ "Money management" ] }, { "id": "stable-59", "alternatives": [ "Platforms" ] }, { "id": "stable-60", "alternatives": [ "SaaS" ] }, { "id": "stable-61", "alternatives": [ "AI companies" ] }, { "id": "stable-62", "alternatives": [ "Creator economy" ] }, { "id": "stable-63", "alternatives": [ "Fintech" ] }, { "id": "stable-64", "alternatives": [ "Gaming" ] }, { "id": "stable-65", "alternatives": [ "Hospitality, travel, and leisure" ] }, { "id": "stable-66", "alternatives": [ "Insurance" ] }, { "id": "stable-67", "alternatives": [ "Media and entertainment" ] }, { "id": "stable-68", "alternatives": [ "Nonprofits" ] }, { "id": "stable-69", "alternatives": [ "Professional services" ] }, { "id": "stable-70", "alternatives": [ "Public sector" ] }, { "id": "stable-71", "alternatives": [ "Retail" ] }, { "id": "stable-72", "alternatives": [ "Integrations & custom solutions" ] }, { "id": "stable-73", "alternatives": [ "Stripe App Marketplace" ] }, { "id": "stable-74", "alternatives": [ "Stripe Partner ecosystem" ] }, { "id": "stable-75", "alternatives": [ "Documentation" ] }, { "id": "stable-76", "alternatives": [ "API reference" ] }, { "id": "stable-77", "alternatives": [ "API status" ] }, { "id": "stable-78", "alternatives": [ "API changelog" ] }, { "id": "stable-79", "alternatives": [ "Libraries and SDKs" ] }, { "id": "stable-80", "alternatives": [ "Stripe Projects" ] }, { "id": "stable-81", "alternatives": [ "Developer blog" ] }, { "id": "stable-82", "alternatives": [ "Guides" ] }, { "id": "stable-83", "alternatives": [ "Customer stories" ] }, { "id": "stable-84", "alternatives": [ "Community" ] }, { "id": "stable-85", "alternatives": [ "Sessions annual conference" ] }, { "id": "stable-86", "alternatives": [ "Privacy & terms" ] }, { "id": "stable-87", "alternatives": [ "Prohibited & restricted businesses" ] }, { "id": "stable-88", "alternatives": [ "Licenses" ] }, { "id": "stable-89", "alternatives": [ "Sitemap" ] }, { "id": "stable-90", "alternatives": [ "Cookie settings" ] }, { "id": "stable-91", "alternatives": [ "Your privacy choices" ] }, { "id": "stable-92", "alternatives": [ "More resources" ] }, { "id": "stable-93", "alternatives": [ "Company" ] }, { "id": "stable-94", "alternatives": [ "About" ] }, { "id": "stable-95", "alternatives": [ "Product roadmap" ] }, { "id": "stable-96", "alternatives": [ "Careers" ] }, { "id": "stable-97", "alternatives": [ "Newsroom" ] }, { "id": "stable-98", "alternatives": [ "Stripe Press" ] }, { "id": "stable-99", "alternatives": [ "Support" ] }, { "id": "stable-100", "alternatives": [ "Get support" ] }, { "id": "stable-101", "alternatives": [ "Managed support plans" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete first-automatic-load article reviewed through accessibility, rendered DOM boundaries and saved viewport evidence; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Scaling your API with rate limiters" ], "html_selector": "h1.BlogPost__title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-073/comment-qualification-reference-r5.json", "sha256": "277fd112753e0eb591beda2642aa68f95ade2fc6b96a617bcc4ff92c39ff2530", "chars": 796, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Availability and reliability are paramount for all web applications and APIs. If you’re providing an API, chances are you’ve already experienced sudden increases in traffic that affect the quality of your service, potentially even leading to a service outage for all your users.\n\nThe first few times this happens, it’s reasonable to just add more capacity to your infrastructure to accommodate user growth. However, when you’re running a production API, not only do you have to make it robust with techniques like idempotency, you also need to build for scale and ensure that one bad actor can’t accidentally or deliberately affect its availability.\n\nRate limiting can help make your API more reliable in the following scenarios:\n\nOne of your users is responsible for a spike in traffic, and you need to stay up for everyone else.\nOne of your users has a misbehaving script which is accidentally sending you a lot of requests. Or, even worse, one of your users is intentionally trying to overwhelm your servers.\nA user is sending you a lot of lower-priority requests, and you want to make sure that it doesn’t affect your high-priority traffic. For example, users sending a high volume of requests for analytics data could affect critical transactions for other users.\nSomething in your system has gone wrong internally, and as a result you can’t serve all of your regular traffic and need to drop low-priority requests.\n\nAt Stripe, we’ve found that carefully implementing a few rate limiting strategies helps keep the API available for everyone. In this post, we’ll explain in detail which rate limiting strategies we find the most useful, how we prioritize some API requests over others, and how we started using rate limiters safely without affecting our existing users’ workflows.\n\nRate limiters and load shedders\n\nA rate limiter is used to control the rate of traffic sent or received on the network. When should you use a rate limiter? If your users can afford to change the pace at which they hit your API endpoints without affecting the outcome of their requests, then a rate limiter is appropriate. If spacing out their requests is not an option (typically for real-time events), then you’ll need another strategy outside the scope of this post (most of the time you just need more infrastructure capacity).\n\nOur users can make a lot of requests: for example, batch processing payments causes sustained traffic on our API. We find that clients can always (barring some extremely rare cases) spread out their requests a bit more and not be affected by our rate limits.\n\nRate limiters are amazing for day-to-day operations, but during incidents (for example, if a service is operating more slowly than usual), we sometimes need to drop low-priority requests to make sure that more critical requests get through. This is called load shedding. It happens infrequently, but it is an important part of keeping Stripe available.\n\nA load shedder makes its decisions based on the whole state of the system rather than the user who is making the request. Load shedders help you deal with emergencies, since they keep the core part of your business working while the rest is on fire.\n\nUsing different kinds of rate limiters in concert\n\nOnce you know rate limiters can improve the reliability of your API, you should decide which types are the most relevant.\n\nAt Stripe, we operate 4 different types of limiters in production. The first one, the Request Rate Limiter, is by far the most important one. We recommend you start here if you want to improve the robustness of your API.\n\nRequest rate limiter\n\nThis rate limiter restricts each user to N requests per second. Request rate limiters are the first tool most APIs can use to effectively manage a high volume of traffic.\n\nOur rate limits for requests is constantly triggered. It has rejected millions of requests this month alone, especially for test mode requests where a user inadvertently runs a script that’s gotten out of hand.\n\nOur API provides the same rate limiting behavior in both test and live modes. This makes for a good developer experience: scripts won't encounter side effects due to a particular rate limit when moving from development to production.\n\nAfter analyzing our traffic patterns, we added the ability to briefly burst above the cap for sudden spikes in usage during real-time events (e.g. a flash sale.)\n\nRequest rate limiters restrict users to a maximum number of requests per second.\n\nConcurrent requests limiter\n\nInstead of “You can use our API 1000 times a second”, this rate limiter says “You can only have 20 API requests in progress at the same time”. Some endpoints are much more resource-intensive than others, and users often get frustrated waiting for the endpoint to return and then retry. These retries add more demand to the already overloaded resource, slowing things down even more. The concurrent rate limiter helps address this nicely.\n\nOur concurrent request limiter is triggered much less often (12,000 requests this month), and helps us keep control of our CPU-intensive API endpoints. Before we started using a concurrent requests limiter, we regularly dealt with resource contention on our most expensive endpoints caused by users making too many requests at one time. The concurrent request limiter totally solved this.\n\nIt is completely reasonable to tune this limiter up so it rejects more often than the Request Rate Limiter. It asks your users to use a different programming model of “Fork off X jobs and have them process the queue” compared to “Hammer the API and back off when I get a HTTP 429”. Some APIs fit better into one of those two patterns so feel free to use which one is most suitable for the users of your API.\n\nConcurrent request limiters manage resource contention for CPU-intensive API endpoints.\n\nFleet usage load shedder\n\nUsing this type of load shedder ensures that a certain percentage of your fleet will always be available for your most important API requests.\n\nWe divide up our traffic into two types: critical API methods (e.g. creating charges) and non-critical methods (e.g. listing charges.) We have a Redis cluster that counts how many requests we currently have of each type.\n\nWe always reserve a fraction of our infrastructure for critical requests. If our reservation number is 20%, then any non-critical request over their 80% allocation would be rejected with status code 503.\n\nWe triggered this load shedder for a very small fraction of requests this month. By itself, this isn’t a big deal—we definitely had the ability to handle those extra requests. But we’ve had other months where this has prevented outages.\n\nFleet usage load shedders reserves fleet resources for critical requests.\n\nWorker utilization load shedder\n\nMost API services use a set of workers to independently respond to incoming requests in a parallel fashion. This load shedder is the final line of defense. If your workers start getting backed up with requests, then this will shed lower-priority traffic.\n\nThis one gets triggered very rarely, only during major incidents.\n\nWe divide our traffic into 4 categories:\n\nCritical methods\nPOSTs\nGETs\nTest mode traffic\n\nWe track the number of workers with available capacity at all times. If a box is too busy to handle its request volume, it will slowly start shedding less-critical requests, starting with test mode traffic. If shedding test mode traffic gets it back into a good state, great! We can start to slowly bring traffic back. Otherwise, it’ll escalate and start shedding even more traffic.\n\nIt’s very important that shedding and bringing load happen slowly, or you can end up flapping (“I got rid of testmode traffic! Everything is fine! I brought it back! Everything is awful!”). We used a lot of trial and error to tune the rate at which we shed traffic, and settled on a rate where we shed a substantial amount of traffic within a few minutes.\n\nOnly 100 requests were rejected this month from this rate limiter, but in the past it’s done a lot to help us recover more quickly when we have had load problems. This load shedder limits the impact of incidents that are already happening and provides damage control, while the first three are more preventative.\n\nWorker utilization load shedders reserve workers for critical requests.\n\nBuilding rate limiters in practice\n\nNow that we’ve outlined the four basic kinds of rate limiters we use and what they’re for, let’s talk about their implementation. What rate limiting algorithms are there? How do you actually implement them in practice?\n\nWe use the token bucket algorithm to do rate limiting. This algorithm has a centralized bucket host where you take tokens on each request, and slowly drip more tokens into the bucket. If the bucket is empty, reject the request. In our case, every Stripe user has a bucket, and every time they make a request we remove a token from that bucket.\n\nWe implement our rate limiters using Redis. You can either operate the Redis instance yourself, or, if you use Amazon Web Services, you can use a managed service like ElastiCache.\n\nHere are important things to consider when implementing rate limiters:\n\nHook the rate limiters into your middleware stack safely. Make sure that if there were bugs in the rate limiting code (or if Redis were to go down), requests wouldn’t be affected. This means catching exceptions at all levels so that any coding or operational errors would fail open and the API would still stay functional.\nShow clear exceptions to your users. Figure out what kinds of exceptions to show your users. In practice, you should decide if you want HTTP 429 (Too Many Requests) or HTTP 503 (Service Unavailable) and what is the most accurate depending on the situation. The message you return should also be actionable.\nBuild in safeguards so that you can turn off the limiters. Make sure you have kill switches to disable the rate limiters should they kick in erroneously. Having feature flags in place can really help should you need a human escape valve. Set up alerts and metrics to understand how often they are triggering.\nDark launch each rate limiter to watch the traffic they would block. Evaluate if it is the correct decision to block that traffic and tune accordingly. You want to find the right thresholds that would keep your API up without affecting any of your users’ existing request patterns. This might involve working with some of them to change their code so that the new rate limit would work for them.\nConclusion\n\nRate limiting is one of the most powerful ways to prepare your API for scale. The different rate limiting strategies described in this post are not all necessary on day one, you can gradually introduce them once you realize the need for rate limiting.\n\nOur recommendation is to follow the following steps to introduce rate limiting to your infrastructure:\n\nStart by building a Request Rate Limiter. It is the most important one to prevent abuse, and it’s by far the one that we use the most frequently.\nIntroduce the next three types of rate limiters over time to prevent different classes of problems. They can be built slowly as you scale.\nFollow good launch practices as you're adding new rate limiters to your infrastructure. Handle any errors safely, put them behind feature flags to turn them off easily at any time, and rely on very good observability and metrics to see how often they’re triggering.\n\nTo help you get started, we’ve created a GitHub gist to share implementation details based on the code we actually use in production at Stripe.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "availability and reliability are paramount for all web applications and apis if you re providing an api chances are you ve already experienced sudden increases in traffic that affect the quality of your service potentially even leading to a service outage for all your users the first few times this happens it s reasonable to just add more capacity to your infrastructure to accommodate user growth however when you re running a production api not only do you have to make it robust with techniques like idempotency you also need to build for scale and ensure that one bad actor can t accidentally or deliberately affect its availability rate limiting can help make your api more reliable in the following scenarios one of your users is responsible for a spike in traffic and you need to stay up for everyone else one of your users has a misbehaving script which is accidentally sending you a lot of requests or even worse one of your users is intentionally trying to overwhelm your servers a user is sending you a lot of lower priority requests and you want to make sure that it doesn t affect your high priority traffic for example users sending a high volume of requests for analytics data could affect critical transactions for other users something in your system has gone wrong internally and as a result you can t serve all of your regular traffic and need to drop low priority requests at stripe we ve found that carefully implementing a few rate limiting strategies helps keep the api available for everyone in this post we ll explain in detail which rate limiting strategies we find the most useful how we prioritize some api requests over others and how we started using rate limiters safely without affecting our existing users workflows", "source_text": "Availability and reliability are paramount for all web applications and APIs. If you’re providing an API, chances are you’ve already experienced sudden increases in traffic that affect the quality of your service, potentially even leading to a service outage for all your users.\n\nThe first few times this happens, it’s reasonable to just add more capacity to your infrastructure to accommodate user growth. However, when you’re running a production API, not only do you have to make it robust with techniques like idempotency, you also need to build for scale and ensure that one bad actor can’t accidentally or deliberately affect its availability.\n\nRate limiting can help make your API more reliable in the following scenarios:\n\nOne of your users is responsible for a spike in traffic, and you need to stay up for everyone else.\nOne of your users has a misbehaving script which is accidentally sending you a lot of requests. Or, even worse, one of your users is intentionally trying to overwhelm your servers.\nA user is sending you a lot of lower-priority requests, and you want to make sure that it doesn’t affect your high-priority traffic. For example, users sending a high volume of requests for analytics data could affect critical transactions for other users.\nSomething in your system has gone wrong internally, and as a result you can’t serve all of your regular traffic and need to drop low-priority requests.\n\nAt Stripe, we’ve found that carefully implementing a few rate limiting strategies helps keep the API available for everyone. In this post, we’ll explain in detail which rate limiting strategies we find the most useful, how we prioritize some API requests over others, and how we started using rate limiters safely without affecting our existing users’ workflows.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Availability and reliability are paramount for all web appli", "source_line_range": [ 1, 13 ] }, { "id": "body-region-2", "text": "rate limiters and load shedders a rate limiter is used to control the rate of traffic sent or received on the network when should you use a rate limiter if your users can afford to change the pace at which they hit your api endpoints without affecting the outcome of their requests then a rate limiter is appropriate if spacing out their requests is not an option typically for real time events then you ll need another strategy outside the scope of this post most of the time you just need more infrastructure capacity our users can make a lot of requests for example batch processing payments causes sustained traffic on our api we find that clients can always barring some extremely rare cases spread out their requests a bit more and not be affected by our rate limits rate limiters are amazing for day to day operations but during incidents for example if a service is operating more slowly than usual we sometimes need to drop low priority requests to make sure that more critical requests get through this is called load shedding it happens infrequently but it is an important part of keeping stripe available a load shedder makes its decisions based on the whole state of the system rather than the user who is making the request load shedders help you deal with emergencies since they keep the core part of your business working while the rest is on fire", "source_text": "Rate limiters and load shedders\n\nA rate limiter is used to control the rate of traffic sent or received on the network. When should you use a rate limiter? If your users can afford to change the pace at which they hit your API endpoints without affecting the outcome of their requests, then a rate limiter is appropriate. If spacing out their requests is not an option (typically for real-time events), then you’ll need another strategy outside the scope of this post (most of the time you just need more infrastructure capacity).\n\nOur users can make a lot of requests: for example, batch processing payments causes sustained traffic on our API. We find that clients can always (barring some extremely rare cases) spread out their requests a bit more and not be affected by our rate limits.\n\nRate limiters are amazing for day-to-day operations, but during incidents (for example, if a service is operating more slowly than usual), we sometimes need to drop low-priority requests to make sure that more critical requests get through. This is called load shedding. It happens infrequently, but it is an important part of keeping Stripe available.\n\nA load shedder makes its decisions based on the whole state of the system rather than the user who is making the request. Load shedders help you deal with emergencies, since they keep the core part of your business working while the rest is on fire.", "segmentation_method": "reviewed_source_semantics", "label": "Rate limiters and load shedders", "source_line_range": [ 14, 23 ] }, { "id": "body-region-3", "text": "using different kinds of rate limiters in concert once you know rate limiters can improve the reliability of your api you should decide which types are the most relevant at stripe we operate 4 different types of limiters in production the first one the request rate limiter is by far the most important one we recommend you start here if you want to improve the robustness of your api request rate limiter this rate limiter restricts each user to n requests per second request rate limiters are the first tool most apis can use to effectively manage a high volume of traffic our rate limits for requests is constantly triggered it has rejected millions of requests this month alone especially for test mode requests where a user inadvertently runs a script that s gotten out of hand our api provides the same rate limiting behavior in both test and live modes this makes for a good developer experience scripts won t encounter side effects due to a particular rate limit when moving from development to production after analyzing our traffic patterns we added the ability to briefly burst above the cap for sudden spikes in usage during real time events e g a flash sale request rate limiters restrict users to a maximum number of requests per second concurrent requests limiter instead of you can use our api 1000 times a second this rate limiter says you can only have 20 api requests in progress at the same time some endpoints are much more resource intensive than others and users often get frustrated waiting for the endpoint to return and then retry these retries add more demand to the already overloaded resource slowing things down even more the concurrent rate limiter helps address this nicely our concurrent request limiter is triggered much less often 12 000 requests this month and helps us keep control of our cpu intensive api endpoints before we started using a concurrent requests limiter we regularly dealt with resource contention on our most expensive endpoints caused by users making too many requests at one time the concurrent request limiter totally solved this it is completely reasonable to tune this limiter up so it rejects more often than the request rate limiter it asks your users to use a different programming model of fork off x jobs and have them process the queue compared to hammer the api and back off when i get a http 429 some apis fit better into one of those two patterns so feel free to use which one is most suitable for the users of your api concurrent request limiters manage resource contention for cpu intensive api endpoints fleet usage load shedder using this type of load shedder ensures that a certain percentage of your fleet will always be available for your most important api requests we divide up our traffic into two types critical api methods e g creating charges and non critical methods e g listing charges we have a redis cluster that counts how many requests we currently have of each type we always reserve a fraction of our infrastructure for critical requests if our reservation number is 20 then any non critical request over their 80 allocation would be rejected with status code 503 we triggered this load shedder for a very small fraction of requests this month by itself this isn t a big deal mdash we definitely had the ability to handle those extra requests but we ve had other months where this has prevented outages fleet usage load shedders reserves fleet resources for critical requests worker utilization load shedder most api services use a set of workers to independently respond to incoming requests in a parallel fashion this load shedder is the final line of defense if your workers start getting backed up with requests then this will shed lower priority traffic this one gets triggered very rarely only during major incidents we divide our traffic into 4 categories critical methods posts gets test mode traffic we track the number of workers with available capacity at all times if a box is too busy to handle its request volume it will slowly start shedding less critical requests starting with test mode traffic if shedding test mode traffic gets it back into a good state great we can start to slowly bring traffic back otherwise it ll escalate and start shedding even more traffic it s very important that shedding and bringing load happen slowly or you can end up flapping i got rid of testmode traffic everything is fine i brought it back everything is awful we used a lot of trial and error to tune the rate at which we shed traffic and settled on a rate where we shed a substantial amount of traffic within a few minutes only 100 requests were rejected this month from this rate limiter but in the past it s done a lot to help us recover more quickly when we have had load problems this load shedder limits the impact of incidents that are already happening and provides damage control while the first three are more preventative worker utilization load shedders reserve workers for critical requests", "source_text": "Using different kinds of rate limiters in concert\n\nOnce you know rate limiters can improve the reliability of your API, you should decide which types are the most relevant.\n\nAt Stripe, we operate 4 different types of limiters in production. The first one, the Request Rate Limiter, is by far the most important one. We recommend you start here if you want to improve the robustness of your API.\n\nRequest rate limiter\n\nThis rate limiter restricts each user to N requests per second. Request rate limiters are the first tool most APIs can use to effectively manage a high volume of traffic.\n\nOur rate limits for requests is constantly triggered. It has rejected millions of requests this month alone, especially for test mode requests where a user inadvertently runs a script that’s gotten out of hand.\n\nOur API provides the same rate limiting behavior in both test and live modes. This makes for a good developer experience: scripts won't encounter side effects due to a particular rate limit when moving from development to production.\n\nAfter analyzing our traffic patterns, we added the ability to briefly burst above the cap for sudden spikes in usage during real-time events (e.g. a flash sale.)\n\nRequest rate limiters restrict users to a maximum number of requests per second.\n\nConcurrent requests limiter\n\nInstead of “You can use our API 1000 times a second”, this rate limiter says “You can only have 20 API requests in progress at the same time”. Some endpoints are much more resource-intensive than others, and users often get frustrated waiting for the endpoint to return and then retry. These retries add more demand to the already overloaded resource, slowing things down even more. The concurrent rate limiter helps address this nicely.\n\nOur concurrent request limiter is triggered much less often (12,000 requests this month), and helps us keep control of our CPU-intensive API endpoints. Before we started using a concurrent requests limiter, we regularly dealt with resource contention on our most expensive endpoints caused by users making too many requests at one time. The concurrent request limiter totally solved this.\n\nIt is completely reasonable to tune this limiter up so it rejects more often than the Request Rate Limiter. It asks your users to use a different programming model of “Fork off X jobs and have them process the queue” compared to “Hammer the API and back off when I get a HTTP 429”. Some APIs fit better into one of those two patterns so feel free to use which one is most suitable for the users of your API.\n\nConcurrent request limiters manage resource contention for CPU-intensive API endpoints.\n\nFleet usage load shedder\n\nUsing this type of load shedder ensures that a certain percentage of your fleet will always be available for your most important API requests.\n\nWe divide up our traffic into two types: critical API methods (e.g. creating charges) and non-critical methods (e.g. listing charges.) We have a Redis cluster that counts how many requests we currently have of each type.\n\nWe always reserve a fraction of our infrastructure for critical requests. If our reservation number is 20%, then any non-critical request over their 80% allocation would be rejected with status code 503.\n\nWe triggered this load shedder for a very small fraction of requests this month. By itself, this isn’t a big deal—we definitely had the ability to handle those extra requests. But we’ve had other months where this has prevented outages.\n\nFleet usage load shedders reserves fleet resources for critical requests.\n\nWorker utilization load shedder\n\nMost API services use a set of workers to independently respond to incoming requests in a parallel fashion. This load shedder is the final line of defense. If your workers start getting backed up with requests, then this will shed lower-priority traffic.\n\nThis one gets triggered very rarely, only during major incidents.\n\nWe divide our traffic into 4 categories:\n\nCritical methods\nPOSTs\nGETs\nTest mode traffic\n\nWe track the number of workers with available capacity at all times. If a box is too busy to handle its request volume, it will slowly start shedding less-critical requests, starting with test mode traffic. If shedding test mode traffic gets it back into a good state, great! We can start to slowly bring traffic back. Otherwise, it’ll escalate and start shedding even more traffic.\n\nIt’s very important that shedding and bringing load happen slowly, or you can end up flapping (“I got rid of testmode traffic! Everything is fine! I brought it back! Everything is awful!”). We used a lot of trial and error to tune the rate at which we shed traffic, and settled on a rate where we shed a substantial amount of traffic within a few minutes.\n\nOnly 100 requests were rejected this month from this rate limiter, but in the past it’s done a lot to help us recover more quickly when we have had load problems. This load shedder limits the impact of incidents that are already happening and provides damage control, while the first three are more preventative.\n\nWorker utilization load shedders reserve workers for critical requests.", "segmentation_method": "reviewed_source_semantics", "label": "Using different kinds of rate limiters in concert", "source_line_range": [ 24, 84 ] }, { "id": "body-region-4", "text": "building rate limiters in practice now that we ve outlined the four basic kinds of rate limiters we use and what they re for let s talk about their implementation what rate limiting algorithms are there how do you actually implement them in practice we use the token bucket algorithm to do rate limiting this algorithm has a centralized bucket host where you take tokens on each request and slowly drip more tokens into the bucket if the bucket is empty reject the request in our case every stripe user has a bucket and every time they make a request we remove a token from that bucket we implement our rate limiters using redis you can either operate the redis instance yourself or if you use amazon web services you can use a managed service like elasticache here are important things to consider when implementing rate limiters hook the rate limiters into your middleware stack safely make sure that if there were bugs in the rate limiting code or if redis were to go down requests wouldn t be affected this means catching exceptions at all levels so that any coding or operational errors would fail open and the api would still stay functional show clear exceptions to your users figure out what kinds of exceptions to show your users in practice you should decide if you want http 429 too many requests or http 503 service unavailable and what is the most accurate depending on the situation the message you return should also be actionable build in safeguards so that you can turn off the limiters make sure you have kill switches to disable the rate limiters should they kick in erroneously having feature flags in place can really help should you need a human escape valve set up alerts and metrics to understand how often they are triggering dark launch each rate limiter to watch the traffic they would block evaluate if it is the correct decision to block that traffic and tune accordingly you want to find the right thresholds that would keep your api up without affecting any of your users existing request patterns this might involve working with some of them to change their code so that the new rate limit would work for them", "source_text": "Building rate limiters in practice\n\nNow that we’ve outlined the four basic kinds of rate limiters we use and what they’re for, let’s talk about their implementation. What rate limiting algorithms are there? How do you actually implement them in practice?\n\nWe use the token bucket algorithm to do rate limiting. This algorithm has a centralized bucket host where you take tokens on each request, and slowly drip more tokens into the bucket. If the bucket is empty, reject the request. In our case, every Stripe user has a bucket, and every time they make a request we remove a token from that bucket.\n\nWe implement our rate limiters using Redis. You can either operate the Redis instance yourself, or, if you use Amazon Web Services, you can use a managed service like ElastiCache.\n\nHere are important things to consider when implementing rate limiters:\n\nHook the rate limiters into your middleware stack safely. Make sure that if there were bugs in the rate limiting code (or if Redis were to go down), requests wouldn’t be affected. This means catching exceptions at all levels so that any coding or operational errors would fail open and the API would still stay functional.\nShow clear exceptions to your users. Figure out what kinds of exceptions to show your users. In practice, you should decide if you want HTTP 429 (Too Many Requests) or HTTP 503 (Service Unavailable) and what is the most accurate depending on the situation. The message you return should also be actionable.\nBuild in safeguards so that you can turn off the limiters. Make sure you have kill switches to disable the rate limiters should they kick in erroneously. Having feature flags in place can really help should you need a human escape valve. Set up alerts and metrics to understand how often they are triggering.\nDark launch each rate limiter to watch the traffic they would block. Evaluate if it is the correct decision to block that traffic and tune accordingly. You want to find the right thresholds that would keep your API up without affecting any of your users’ existing request patterns. This might involve working with some of them to change their code so that the new rate limit would work for them.", "segmentation_method": "reviewed_source_semantics", "label": "Building rate limiters in practice", "source_line_range": [ 85, 98 ] }, { "id": "body-region-5", "text": "conclusion rate limiting is one of the most powerful ways to prepare your api for scale the different rate limiting strategies described in this post are not all necessary on day one you can gradually introduce them once you realize the need for rate limiting our recommendation is to follow the following steps to introduce rate limiting to your infrastructure start by building a request rate limiter it is the most important one to prevent abuse and it s by far the one that we use the most frequently introduce the next three types of rate limiters over time to prevent different classes of problems they can be built slowly as you scale follow good launch practices as you re adding new rate limiters to your infrastructure handle any errors safely put them behind feature flags to turn them off easily at any time and rely on very good observability and metrics to see how often they re triggering to help you get started we ve created a github gist to share implementation details based on the code we actually use in production at stripe", "source_text": "Conclusion\n\nRate limiting is one of the most powerful ways to prepare your API for scale. The different rate limiting strategies described in this post are not all necessary on day one, you can gradually introduce them once you realize the need for rate limiting.\n\nOur recommendation is to follow the following steps to introduce rate limiting to your infrastructure:\n\nStart by building a Request Rate Limiter. It is the most important one to prevent abuse, and it’s by far the one that we use the most frequently.\nIntroduce the next three types of rate limiters over time to prevent different classes of problems. They can be built slowly as you scale.\nFollow good launch practices as you're adding new rate limiters to your infrastructure. Handle any errors safely, put them behind feature flags to turn them off easily at any time, and rely on very good observability and metrics to see how often they’re triggering.\n\nTo help you get started, we’ve created a GitHub gist to share implementation details based on the code we actually use in production at Stripe.", "segmentation_method": "reviewed_source_semantics", "label": "Conclusion", "source_line_range": [ 99, 109 ] } ], "ending": { "text": "to share implementation details based on the code we actually use in production at Stripe." } } }, { "id": "article-074", "name": "Scaling to exabytes and beyond", "url": "https://dropbox.tech/infrastructure/magic-pocket-infrastructure", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Scaling to exabytes and beyond" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Akhil Gupta" ] }, { "id": "stable-3", "alternatives": [ "Topics" ] }, { "id": "stable-4", "alternatives": [ "Developers" ] }, { "id": "stable-5", "alternatives": [ "Jobs" ] }, { "id": "stable-6", "alternatives": [ "Dash" ] }, { "id": "stable-7", "alternatives": [ "Dark mode" ] }, { "id": "stable-8", "alternatives": [ "Search" ] }, { "id": "stable-9", "alternatives": [ "Tags" ] }, { "id": "stable-10", "alternatives": [ "Infrastructure" ] }, { "id": "stable-11", "alternatives": [ "Magic Pocket" ] }, { "id": "stable-12", "alternatives": [ "Copy link" ] }, { "id": "stable-13", "alternatives": [ "Share on Twitter" ] }, { "id": "stable-14", "alternatives": [ "Share on Facebook" ] }, { "id": "stable-15", "alternatives": [ "Share on Linkedin" ] }, { "id": "stable-16", "alternatives": [ "Related posts" ] }, { "id": "stable-17", "alternatives": [ "See more" ] }, { "id": "stable-18", "alternatives": [ "About us" ] }, { "id": "stable-19", "alternatives": [ "X" ] }, { "id": "stable-20", "alternatives": [ "Dropbox Dash" ] }, { "id": "stable-21", "alternatives": [ "LinkedIn" ] }, { "id": "stable-22", "alternatives": [ "Instagram" ] }, { "id": "stable-23", "alternatives": [ "Privacy and terms" ] }, { "id": "stable-24", "alternatives": [ "RSS feed" ] }, { "id": "stable-25", "alternatives": [ "AI principles" ] }, { "id": "stable-26", "alternatives": [ "Engineering Career Framework" ] }, { "id": "stable-27", "alternatives": [ "Cookies & CCPA preferences" ] }, { "id": "stable-28", "alternatives": [ "Blog" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete body from opening Years ago through Stay tuned reviewed in full-page screenshot. Cookie notice remains open without blocking body; no interaction performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Scaling to exabytes and beyond" ], "html_selector": "h1.dr-display-inline.dr-typography-t15,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-074/comment-qualification-reference-r5.json", "sha256": "db082f455a87bfc1e2ef102e3d91b015a8e66c46bf3b71ec65d0a461322fdd3b", "chars": 793, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Years ago, we called Dropbox a “Magic Pocket” because it was designed to keep all your files in one convenient place. Dropbox has evolved from that simple beginning to become one of the most powerful and ubiquitous collaboration platforms in the world. And when our scale required building our own dedicated storage infrastructure, we named the project “Magic Pocket.” Two and a half years later, we’re excited to announce that we’re now storing and serving over 90% of our users’ data on our custom-built infrastructure.\n\nDropbox was founded by engineers, and the ethos of technical innovation is fundamental to our culture. For our users, this means that we’ve created a product that just works. But there’s a lot that happens behind the scenes to create that simple user experience.\n\nWe’ve grown enormously since launching in 2008, surpassing 500 million signups and 500 petabytes (i.e., 5 followed by 17 zeroes!) of user data. That’s almost 14,000 times the text of all the books in the Library of Congress. To give you a sense of the incredible growth we’ve experienced, we had only about 40 petabytes of user data when I joined in 2012. In the 4 years since, we’ve seen over 12x growth.\n\nDropbox stores two kinds of data: file content and metadata about files and users. We’ve always had a hybrid cloud architecture, hosting metadata and our web servers in data centers we manage, and storing file content on Amazon. We were an early adopter of Amazon S3, which provided us with the ability to scale our operations rapidly and reliably. Amazon Web Services has, and continues to be, an invaluable partner—we couldn’t have grown as fast as we did without a service like AWS.\n\nAs the needs of our users and customers kept growing, we decided to invest seriously in building our own in-house storage system. There were a couple reasons behind this decision. First, one of our key product differentiators is performance. Bringing storage in-house allows us to customize the entire stack end-to-end and improve performance for our particular use case. Second, as one of the world’s leading providers of cloud services, our use case for block storage is unique. We can leverage our scale and particular use case to customize both the hardware and software, resulting in better unit economics.\n\nWe knew we’d be building one of only a handful of exabyte-scale storage systems in the world. It was clear to us from the beginning that we’d have to build everything from scratch, since there’s nothing in the open source community that’s proven to work reliably at our scale. Few companies in the world have the same requirements for scale of storage as we do. And even fewer have higher standards for safety and security. We built reliability and security into our design from the start, ensuring that the system stores the data in a safe and secure manner, and is highly available. The data is encrypted at rest, and the system is designed to provide annual data durability of over 99.9999999999%, and availability of over 99.99%.\n\nHow did we make this happen?\n\nCode development: Magic Pocket became a major initiative in the summer of 2013. We’d built a small prototype as a proof of concept prior to this to get a sense of our workloads and file distributions. Software was a big part of the project, and we iterated on how to build this in production while validating rigorously at every stage. The innovation focused on creating a clean design that would scale from zero to one of the largest storage systems in the world, and automation that would allow our small team to maintain an enormous amount of hardware. We needed to test and audit the reliability of the system for the highest levels of data durability and availability.\n\nDark launch: In August 2014, we embarked on our \"dark launch,\" at which point we were mirroring data between two regional locations and considered the system ready to store user data. Of course, being Dropbox, we kept extra backups for another 6 months after this date just in case.\n\nLaunch day: February 27, 2015 was D-day. For the first time in the history of Dropbox, we began storing and serving user files exclusively in-house. Once we validated our new infrastructure, we set an aggressive goal of scaling the system to more than 500PB in six months.\n\nBASE Jump: On April 30, 2015, we began the race to install additional servers in three regional locations fast enough to keep up with the flow of data. To make this all work, we built a high-performance network from our servers which allowed us to transfer data at a peak rate of over half a terabit per second. Because our schedule left so little time to “open the parachute,” we called this part of the project BASE Jump. On the hardware side, we were pushing up against the limitations of how many racks of hardware could fit in the loading dock at one time.\n\nSuccessful landing: Our goal was to serve 90% of our data from in-house infrastructure by October 30, 2015. We actually hit the mark almost a month early, on October 7, 2015. The team not only delivered on time, but also achieved this significant technical undertaking without any major service disruptions or any loss of data.\n\nThis is an exciting milestone and the start of more innovation to come. We’ll continue to invest in our own infrastructure as well as partner with Amazon where it makes sense for our users, particularly globally. Later this year, we’ll expand our relationship with AWS to store data in Germany for European business customers that request it. Protecting and preserving the data our users entrust us with is our top priority at all times.\n\nThis is Dropbox engineering—always aiming higher!\n\nThis is the first of a series of blog posts about the Magic Pocket. Over the next month we’ll share a lot of the technical details around what we learned from building our own high-performance cloud infrastructure. Stay tuned.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "years ago we called dropbox a magic pocket because it was designed to keep all your files in one convenient place dropbox has evolved from that simple beginning to become one of the most powerful and ubiquitous collaboration platforms in the world and when our scale required building our own dedicated storage infrastructure we named the project magic pocket two and a half years later we re excited to announce that we re now storing and serving over 90 of our users data on our custom built infrastructure dropbox was founded by engineers and the ethos of technical innovation is fundamental to our culture for our users this means that we ve created a product that just works but there s a lot that happens behind the scenes to create that simple user experience we ve grown enormously since launching in 2008 surpassing 500 million signups and 500 petabytes i e 5 followed by 17 zeroes of user data that s almost 14 000 times the text of all the books in the library of congress to give you a sense of the incredible growth we ve experienced we had only about 40 petabytes of user data when i joined in 2012 in the 4 years since we ve seen over 12x growth dropbox stores two kinds of data file content and metadata about files and users we ve always had a hybrid cloud architecture hosting metadata and our web servers in data centers we manage and storing file content on amazon we were an early adopter of amazon s3 which provided us with the ability to scale our operations rapidly and reliably amazon web services has and continues to be an invaluable partner we couldn t have grown as fast as we did without a service like aws as the needs of our users and customers kept growing we decided to invest seriously in building our own in house storage system there were a couple reasons behind this decision first one of our key product differentiators is performance bringing storage in house allows us to customize the entire stack end to end and improve performance for our particular use case second as one of the world s leading providers of cloud services our use case for block storage is unique we can leverage our scale and particular use case to customize both the hardware and software resulting in better unit economics we knew we d be building one of only a handful of exabyte scale storage systems in the world it was clear to us from the beginning that we d have to build everything from scratch since there s nothing in the open source community that s proven to work reliably at our scale few companies in the world have the same requirements for scale of storage as we do and even fewer have higher standards for safety and security we built reliability and security into our design from the start ensuring that the system stores the data in a safe and secure manner and is highly available the data is encrypted at rest and the system is designed to provide annual data durability of over 99 9999999999 and availability of over 99 99", "source_text": "Years ago, we called Dropbox a “Magic Pocket” because it was designed to keep all your files in one convenient place. Dropbox has evolved from that simple beginning to become one of the most powerful and ubiquitous collaboration platforms in the world. And when our scale required building our own dedicated storage infrastructure, we named the project “Magic Pocket.” Two and a half years later, we’re excited to announce that we’re now storing and serving over 90% of our users’ data on our custom-built infrastructure.\n\nDropbox was founded by engineers, and the ethos of technical innovation is fundamental to our culture. For our users, this means that we’ve created a product that just works. But there’s a lot that happens behind the scenes to create that simple user experience.\n\nWe’ve grown enormously since launching in 2008, surpassing 500 million signups and 500 petabytes (i.e., 5 followed by 17 zeroes!) of user data. That’s almost 14,000 times the text of all the books in the Library of Congress. To give you a sense of the incredible growth we’ve experienced, we had only about 40 petabytes of user data when I joined in 2012. In the 4 years since, we’ve seen over 12x growth.\n\nDropbox stores two kinds of data: file content and metadata about files and users. We’ve always had a hybrid cloud architecture, hosting metadata and our web servers in data centers we manage, and storing file content on Amazon. We were an early adopter of Amazon S3, which provided us with the ability to scale our operations rapidly and reliably. Amazon Web Services has, and continues to be, an invaluable partner—we couldn’t have grown as fast as we did without a service like AWS.\n\nAs the needs of our users and customers kept growing, we decided to invest seriously in building our own in-house storage system. There were a couple reasons behind this decision. First, one of our key product differentiators is performance. Bringing storage in-house allows us to customize the entire stack end-to-end and improve performance for our particular use case. Second, as one of the world’s leading providers of cloud services, our use case for block storage is unique. We can leverage our scale and particular use case to customize both the hardware and software, resulting in better unit economics.\n\nWe knew we’d be building one of only a handful of exabyte-scale storage systems in the world. It was clear to us from the beginning that we’d have to build everything from scratch, since there’s nothing in the open source community that’s proven to work reliably at our scale. Few companies in the world have the same requirements for scale of storage as we do. And even fewer have higher standards for safety and security. We built reliability and security into our design from the start, ensuring that the system stores the data in a safe and secure manner, and is highly available. The data is encrypted at rest, and the system is designed to provide annual data durability of over 99.9999999999%, and availability of over 99.99%.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Years ago, we called Dropbox a “Magic Pocket” because it was", "source_line_range": [ 1, 12 ] }, { "id": "body-region-2", "text": "how did we make this happen code development magic pocket became a major initiative in the summer of 2013 we d built a small prototype as a proof of concept prior to this to get a sense of our workloads and file distributions software was a big part of the project and we iterated on how to build this in production while validating rigorously at every stage the innovation focused on creating a clean design that would scale from zero to one of the largest storage systems in the world and automation that would allow our small team to maintain an enormous amount of hardware we needed to test and audit the reliability of the system for the highest levels of data durability and availability dark launch in august 2014 we embarked on our dark launch at which point we were mirroring data between two regional locations and considered the system ready to store user data of course being dropbox we kept extra backups for another 6 months after this date just in case launch day february 27 2015 was d day for the first time in the history of dropbox we began storing and serving user files exclusively in house once we validated our new infrastructure we set an aggressive goal of scaling the system to more than 500pb in six months base jump on april 30 2015 we began the race to install additional servers in three regional locations fast enough to keep up with the flow of data to make this all work we built a high performance network from our servers which allowed us to transfer data at a peak rate of over half a terabit per second because our schedule left so little time to open the parachute we called this part of the project base jump on the hardware side we were pushing up against the limitations of how many racks of hardware could fit in the loading dock at one time successful landing our goal was to serve 90 of our data from in house infrastructure by october 30 2015 we actually hit the mark almost a month early on october 7 2015 the team not only delivered on time but also achieved this significant technical undertaking without any major service disruptions or any loss of data this is an exciting milestone and the start of more innovation to come we ll continue to invest in our own infrastructure as well as partner with amazon where it makes sense for our users particularly globally later this year we ll expand our relationship with aws to store data in germany for european business customers that request it protecting and preserving the data our users entrust us with is our top priority at all times this is dropbox engineering always aiming higher this is the first of a series of blog posts about the magic pocket over the next month we ll share a lot of the technical details around what we learned from building our own high performance cloud infrastructure stay tuned", "source_text": "How did we make this happen?\n\nCode development: Magic Pocket became a major initiative in the summer of 2013. We’d built a small prototype as a proof of concept prior to this to get a sense of our workloads and file distributions. Software was a big part of the project, and we iterated on how to build this in production while validating rigorously at every stage. The innovation focused on creating a clean design that would scale from zero to one of the largest storage systems in the world, and automation that would allow our small team to maintain an enormous amount of hardware. We needed to test and audit the reliability of the system for the highest levels of data durability and availability.\n\nDark launch: In August 2014, we embarked on our \"dark launch,\" at which point we were mirroring data between two regional locations and considered the system ready to store user data. Of course, being Dropbox, we kept extra backups for another 6 months after this date just in case.\n\nLaunch day: February 27, 2015 was D-day. For the first time in the history of Dropbox, we began storing and serving user files exclusively in-house. Once we validated our new infrastructure, we set an aggressive goal of scaling the system to more than 500PB in six months.\n\nBASE Jump: On April 30, 2015, we began the race to install additional servers in three regional locations fast enough to keep up with the flow of data. To make this all work, we built a high-performance network from our servers which allowed us to transfer data at a peak rate of over half a terabit per second. Because our schedule left so little time to “open the parachute,” we called this part of the project BASE Jump. On the hardware side, we were pushing up against the limitations of how many racks of hardware could fit in the loading dock at one time.\n\nSuccessful landing: Our goal was to serve 90% of our data from in-house infrastructure by October 30, 2015. We actually hit the mark almost a month early, on October 7, 2015. The team not only delivered on time, but also achieved this significant technical undertaking without any major service disruptions or any loss of data.\n\nThis is an exciting milestone and the start of more innovation to come. We’ll continue to invest in our own infrastructure as well as partner with Amazon where it makes sense for our users, particularly globally. Later this year, we’ll expand our relationship with AWS to store data in Germany for European business customers that request it. Protecting and preserving the data our users entrust us with is our top priority at all times.\n\nThis is Dropbox engineering—always aiming higher!\n\nThis is the first of a series of blog posts about the Magic Pocket. Over the next month we’ll share a lot of the technical details around what we learned from building our own high-performance cloud infrastructure. Stay tuned.", "segmentation_method": "reviewed_source_semantics", "label": "How did we make this happen?", "source_line_range": [ 13, 29 ] } ], "ending": { "text": "ails around what we learned from building our own high-performance cloud infrastructure. Stay tuned." } } }, { "id": "article-075", "name": "H3: Uber’s Hexagonal Hierarchical Spatial Index", "url": "https://www.uber.com/us/en/blog/h3/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "H3: Uber’s Hexagonal Hierarchical Spatial Index" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Isaac Brodsky" ] }, { "id": "stable-3", "alternatives": [ "Uber Blog" ] }, { "id": "stable-4", "alternatives": [ "Explore" ] }, { "id": "stable-5", "alternatives": [ "EN" ] }, { "id": "stable-6", "alternatives": [ "Help" ] }, { "id": "stable-7", "alternatives": [ "Log in" ] }, { "id": "stable-8", "alternatives": [ "Sign up" ] }, { "id": "stable-9", "alternatives": [ "Share this article" ] }, { "id": "stable-10", "alternatives": [ "Category" ] }, { "id": "stable-11", "alternatives": [ "Engineering" ] }, { "id": "stable-12", "alternatives": [ "Written by" ] }, { "id": "stable-13", "alternatives": [ "Isaac Brodsky is a software engineer on Uber’s Marketplace Intelligence team." ] }, { "id": "stable-14", "alternatives": [ "Related Articles" ] }, { "id": "stable-15", "alternatives": [ "Uber" ] }, { "id": "stable-16", "alternatives": [ "Visit Help Center" ] }, { "id": "stable-17", "alternatives": [ "Do not sell or share my personal information" ] }, { "id": "stable-18", "alternatives": [ "Google Data Policy" ] }, { "id": "stable-19", "alternatives": [ "Company" ] }, { "id": "stable-20", "alternatives": [ "About us" ] }, { "id": "stable-21", "alternatives": [ "Our offerings" ] }, { "id": "stable-22", "alternatives": [ "Newsroom" ] }, { "id": "stable-23", "alternatives": [ "Investors" ] }, { "id": "stable-24", "alternatives": [ "Blog" ] }, { "id": "stable-25", "alternatives": [ "Careers" ] }, { "id": "stable-26", "alternatives": [ "Products" ] }, { "id": "stable-27", "alternatives": [ "Ride" ] }, { "id": "stable-28", "alternatives": [ "Drive" ] }, { "id": "stable-29", "alternatives": [ "Deliver" ] }, { "id": "stable-30", "alternatives": [ "Eat" ] }, { "id": "stable-31", "alternatives": [ "Uber for Business" ] }, { "id": "stable-32", "alternatives": [ "Uber Freight" ] }, { "id": "stable-33", "alternatives": [ "Gift cards" ] }, { "id": "stable-34", "alternatives": [ "Uber Health" ] }, { "id": "stable-35", "alternatives": [ "Uber Advertising" ] }, { "id": "stable-36", "alternatives": [ "Merchants" ] }, { "id": "stable-37", "alternatives": [ "Global citizenship" ] }, { "id": "stable-38", "alternatives": [ "Safety" ] }, { "id": "stable-39", "alternatives": [ "Sustainability" ] }, { "id": "stable-40", "alternatives": [ "Travel" ] }, { "id": "stable-41", "alternatives": [ "Reserve" ] }, { "id": "stable-42", "alternatives": [ "Airports" ] }, { "id": "stable-43", "alternatives": [ "Cities" ] }, { "id": "stable-44", "alternatives": [ "English" ] }, { "id": "stable-45", "alternatives": [ "Privacy" ] }, { "id": "stable-46", "alternatives": [ "Accessibility" ] }, { "id": "stable-47", "alternatives": [ "Terms" ] }, { "id": "stable-48", "alternatives": [ "Opt out" ] }, { "id": "stable-49", "alternatives": [ "Got it" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete rendered article with captions, code-source text links and contributor/newsletter closing reviewed through complete initial-load full-page screenshot. Images lazy-unloaded remain excluded; cookie notice untouched. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "H3: Uber’s Hexagonal Hierarchical Spatial Index" ], "html_selector": "h1.css-bUfMjo,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-075/comment-qualification-reference-r5.json", "sha256": "6d2d2be745009e75b10046648fc51f95363498cd418e6ff78df885cca5ba3ac0", "chars": 765, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Grid systems are critical to analyzing large spatial data sets, partitioning areas of the Earth into identifiable grid cells.\n\nWith this in mind, Uber developed H3, our grid system for efficiently optimizing ride pricing and dispatch, for visualizing and exploring spatial data. H3 enables us to analyze geographic information to set dynamic prices and make other decisions on a city-wide level. We use H3 as the grid system for analysis and optimization throughout our marketplaces. H3 was designed for this purpose, and led us to make some choices such as using hexagonal, hierarchical indexes.\n\nEarlier this year, we open sourced H3 on Github, giving others access to this powerful solution, and last week, we open sourced our H3 JavaScript bindings. In this article, we discuss why we use a grid system, some of the unique properties of H3, and how you can get started using H3.\n\nFigure 1. H3 enables users to partition the globe into hexagons for more accurate analysis.\nAnalysis using grids\n\nEvery day, millions of events occur in the Uber marketplace. Every minute, riders request rides, driver-partners start trips, and hungry users request food, among other actions on the platform. Each event happens at a specific location, for example, a rider requests a ride from home, and a driver accepts that request in their car just a few miles away.\n\nThese events empower Uber to better understand and optimize the marketplace for users across our services. For instance, these events might tell us that there is more demand than supply in a certain part of a city and adjust pricing in response, or inform the platform that there are two ride requests within close proximity to a specific driver on uberPOOL.\n\nDeriving information and insights from data in the Uber marketplace requires analyzing data across an entire city. Because cities are geographically diverse, this analysis needs to happen at a fine granularity. Analysis at the finest granularity, the exact location where an event happens, is very difficult and expensive. Analysis on areas, such as neighborhoods within a city, is much more practical.\n\n\t\n\t\nFigure 2. The maps above depict the process of bucketing points with H3: cars in a city; cars in hexagons; and hexagons shaded by number of cars.\n\nWe use a grid system to bucket events into hexagonal areas, in other words, cells. Data points are bucketed into hexagons and can be written using the hexagonally bucketed data. For example, we calculate surge pricing by measuring supply and demand in hexagons in each city that we serve. These hexagons form the basis for our analysis of the Uber marketplace.\n\nHexagons were an important choice because people in a city are often in motion, and hexagons minimize the quantization error introduced when users move through a city. Hexagons also allow us to approximate radiuses easily, such as in this example using Elasticsearch.\n\nFigure 3. Zip code map of New York City (Manhattan).\n\nThere are other choices we could use for bucketing events into areas, for instance polygonal zones around areas. These could be postal code areas, but such areas have unusual shapes and sizes which are not helpful for analysis, and are subject to change for reasons entirely unrelated to what we would use them for. Zones could also be drawn by Uber operations teams based on their knowledge of the city, but such zones require frequent updating as cities change and often define the edges of areas arbitrarily.\n\nFigure 4. Randomly generated hexagonal clusters cover the city of San Francisco.\n\nGrid systems can have comparable shapes and sizes across the cities that Uber operates in and are not subject to arbitrary changes. While grid systems do not align to streets and neighborhoods in cities, they can be used to efficiently represent neighborhoods by clustering grid cells. Clustering can be done using objective functions, producing shapes much more useful for analysis. Determining membership of a cluster is as efficient as a set lookup operation.\n\n \n\nH3\n\nWe decided to create H3 to combine the benefits of a hexagonal global grid system with a hierarchical indexing system.\n\nA global grid system usually requires at least two things: a map projection and a grid laid on top of the map. A map projection is needed for going from a three-dimensional location on Earth to a two dimensional point on a map. A grid is then overlaid on the map, forming a global grid system.\n\nThis process can be accomplished in innumerable ways by combining different map projections and grids, for example, the widely recognized Mercator projection and a square grid. While this simple method would work, it has a number of drawbacks. To start, the Mercator projection has significant size distortion, so some cells will have vastly different areas. Square grids also have drawbacks, requiring multiple sets of coefficients when used for analysis. This disadvantage is a result of squares having two different types of neighbors, one type with which they share an edge (in the four cardinal directions) and another type with which they share a vertex (in four diagonal directions).\n\n\t\n\t\nFigure 5. We chose to use gnomonic projections centered on icosahedron faces (left) for H3’s map projection, projecting Earth as a spherical icosahedron (right).\n\nFor map projection, we chose to use gnomonic projections centered on icosahedron faces. This projects from Earth as a sphere to an icosahedron, a twenty-sided platonic solid. An icosahedron-based map projection results in twenty separate two-dimensional planes rather than a single plane. The icosahedron can be unfolded in many ways, producing a two-dimensional map each time. H3, however, does not unfold the icosahedron to build its grid system, and instead lays its grid out on the icosahedron faces themselves, forming a geodesic discrete global grid system.\n\n\t\n\t\nFigure 6. Distances from a triangle to its neighbors (left), a square to its neighbors (center), and a hexagon to its neighbors (right).\n\nUsing a hexagon as the cell shape is critical for H3. As depicted in Figure 6, hexagons have only one distance between a hexagon centerpoint and its neighbors’, compared to two distances for squares or three distances for triangles. This property greatly simplifies performing analysis and smoothing over gradients.\n\nFigure 7. H3 used to create a grid on a single icosahedron face.\n\nThe H3 grid is constructed by laying out 122 base cells over the Earth, with ten cells per face. Some cells are contained by more than one face. Since it is not possible to tile the icosahedron with only hexagons, we chose to introduce twelve pentagons, one at each of the icosahedron vertices. These vertices were positioned using the spherical icosahedron orientation by R. Buckminster Fuller, which places all the vertices in the water. This helps avoid pentagons surfacing in our work.\n\n\t\n\t\nFigure 8. H3 enables the user to subdivide areas into smaller and smaller hexagons.\n\nH3 supports sixteen resolutions. Each finer resolution has cells with one seventh the area of the coarser resolution. Hexagons cannot be perfectly subdivided into seven hexagons, so the finer cells are only approximately contained within a parent cell.\n\nThe identifiers for these child cells can be easily truncated to find their ancestor cell at a coarser resolution, enabling efficient indexing. Because the children cells are only approximately contained, the truncation process produces a fixed amount of shape distortion. This distortion is only present when performing truncation of a cell identifier; when indexing locations at a specific resolution, the cell boundaries are exact.\n\n \n\nGetting started with H3\n\nThe H3 indexing system is open source and available on GitHub. The H3 library itself is written in C, and bindings are available for a number of languages. Using bindings is the recommended way to start using H3. Uber has published bindings for Java and JavaScript, and the community has contributed bindings for more languages. Bindings are coming soon for Python and Go.\n\n\t\n\t\nFigure 9. The point (blue, left) and its containing hexagon, the centroid (lighter blue, middle) of its containing hexagon, and both the point and centroid of the containing hexagon (right) depict a possible difference between the two.\n\nCode: https://github.com/uber/h3/blob/master/examples/index.c\n\nThe basic functions of the H3 library are for indexing locations, which transforms latitude and longitude pairs to a 64-bit H3 index, identifying a grid cell. The function geoToH3 takes a latitude, longitude, and resolution (between 0 and 15, with 0 being coarsest and 15 being finest), and returns an index. h3ToGeo and h3ToGeoBoundary are the inverse of this function, providing the center coordinates and outline of the grid cell specified by the H3 index, respectively.\n\nOnce you have data indexed using H3, the H3 API has functions for working with indexes.\n\n\t\n\t\nFigure 10. Hexagons neighboring an index, with distance of 0 (left; just the original index), 1 (middle; with neighbors of the original index), and 2 (right; with neighbors of neighbors).\n\nCode: https://github.com/uber/h3/blob/master/examples/neighbors.c\n\nNeighboring hexagons have the useful property of approximating circles using the grid system. The kRing function provides grid cells within grid distance k of an origin index.\n\n\t\nFigure 11. Dense hexagons representing California stand in stark contrast to compact hexagons representing the state, requiring many fewer hexagons to represent the same area.\n\nCode: https://github.com/uber/h3/blob/master/examples/compact.c\n\nThe hierarchical nature of H3 allows for efficiently truncating the precision (or resolution) of an index and recovering the original indexes. The uncompact and compact representations of a set of hexagons are shown above. The uncompact representation has 10,633 hexagons at resolution 6, but the compact representation has 901 hexagons at resolutions up to 6. In both cases, a hexagon index is a 64-bit integer.\n\nThe precision of a single index can also be efficiently truncated as a bitwise operation, or expanded to a higher precision set of indexes.\n\nFigure 12. H3 can represent the movement from one cell to another, here represented by drawing an arrow from the origin to destination cell.\n\nCode: https://github.com/uber/h3/blob/master/examples/edge.c\n\nH3 has functions for directed edges of grid cells which can represent the movement from one cell to another. Directed edges can be stored as 64-bit integers, and can be obtained from two neighboring cells, or by finding all edges of a cell. When needed, an edge can be converted back to the origin or destination indexes.\n\n \n\nMoving forward\n\nH3 is used throughout Uber to support quantitative analysis of our marketplace, and now that it’s open sourced, you too can hexagonify the world! We look forward to you joining the H3 community by following our repository on Github and tweeting with the #uberH3 hashtag.\n\n \n\nMaps generated using MapboxGL.\n\nLearn more information about our mapping data providers.\n\nMajor contributors to the H3 library also include Kevin Sahr (Southern Oregon University), Joseph Gilley (Uber), Nick Rabinowitz (Uber), and David Ellis (CarDash).\n\n \n\nSubscribe to our newsletter to keep up with the latest innovations from Uber Engineering.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "grid systems are critical to analyzing large spatial data sets partitioning areas of the earth into identifiable grid cells with this in mind uber developed h3 our grid system for efficiently optimizing ride pricing and dispatch for visualizing and exploring spatial data h3 enables us to analyze geographic information to set dynamic prices and make other decisions on a city wide level we use h3 as the grid system for analysis and optimization throughout our marketplaces h3 was designed for this purpose and led us to make some choices such as using hexagonal hierarchical indexes earlier this year we open sourced h3 on github giving others access to this powerful solution and last week we open sourced our h3 javascript bindings in this article we discuss why we use a grid system some of the unique properties of h3 and how you can get started using h3 figure 1 h3 enables users to partition the globe into hexagons for more accurate analysis", "source_text": "Grid systems are critical to analyzing large spatial data sets, partitioning areas of the Earth into identifiable grid cells.\n\nWith this in mind, Uber developed H3, our grid system for efficiently optimizing ride pricing and dispatch, for visualizing and exploring spatial data. H3 enables us to analyze geographic information to set dynamic prices and make other decisions on a city-wide level. We use H3 as the grid system for analysis and optimization throughout our marketplaces. H3 was designed for this purpose, and led us to make some choices such as using hexagonal, hierarchical indexes.\n\nEarlier this year, we open sourced H3 on Github, giving others access to this powerful solution, and last week, we open sourced our H3 JavaScript bindings. In this article, we discuss why we use a grid system, some of the unique properties of H3, and how you can get started using H3.\n\nFigure 1. H3 enables users to partition the globe into hexagons for more accurate analysis.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Grid systems are critical to analyzing large spatial data se", "source_line_range": [ 1, 7 ] }, { "id": "body-region-2", "text": "analysis using grids every day millions of events occur in the uber marketplace every minute riders request rides driver partners start trips and hungry users request food among other actions on the platform each event happens at a specific location for example a rider requests a ride from home and a driver accepts that request in their car just a few miles away these events empower uber to better understand and optimize the marketplace for users across our services for instance these events might tell us that there is more demand than supply in a certain part of a city and adjust pricing in response or inform the platform that there are two ride requests within close proximity to a specific driver on uberpool deriving information and insights from data in the uber marketplace requires analyzing data across an entire city because cities are geographically diverse this analysis needs to happen at a fine granularity analysis at the finest granularity the exact location where an event happens is very difficult and expensive analysis on areas such as neighborhoods within a city is much more practical figure 2 the maps above depict the process of bucketing points with h3 cars in a city cars in hexagons and hexagons shaded by number of cars we use a grid system to bucket events into hexagonal areas in other words cells data points are bucketed into hexagons and can be written using the hexagonally bucketed data for example we calculate surge pricing by measuring supply and demand in hexagons in each city that we serve these hexagons form the basis for our analysis of the uber marketplace hexagons were an important choice because people in a city are often in motion and hexagons minimize the quantization error introduced when users move through a city hexagons also allow us to approximate radiuses easily such as in this example using elasticsearch figure 3 zip code map of new york city manhattan there are other choices we could use for bucketing events into areas for instance polygonal zones around areas these could be postal code areas but such areas have unusual shapes and sizes which are not helpful for analysis and are subject to change for reasons entirely unrelated to what we would use them for zones could also be drawn by uber operations teams based on their knowledge of the city but such zones require frequent updating as cities change and often define the edges of areas arbitrarily figure 4 randomly generated hexagonal clusters cover the city of san francisco grid systems can have comparable shapes and sizes across the cities that uber operates in and are not subject to arbitrary changes while grid systems do not align to streets and neighborhoods in cities they can be used to efficiently represent neighborhoods by clustering grid cells clustering can be done using objective functions producing shapes much more useful for analysis determining membership of a cluster is as efficient as a set lookup operation", "source_text": "Analysis using grids\n\nEvery day, millions of events occur in the Uber marketplace. Every minute, riders request rides, driver-partners start trips, and hungry users request food, among other actions on the platform. Each event happens at a specific location, for example, a rider requests a ride from home, and a driver accepts that request in their car just a few miles away.\n\nThese events empower Uber to better understand and optimize the marketplace for users across our services. For instance, these events might tell us that there is more demand than supply in a certain part of a city and adjust pricing in response, or inform the platform that there are two ride requests within close proximity to a specific driver on uberPOOL.\n\nDeriving information and insights from data in the Uber marketplace requires analyzing data across an entire city. Because cities are geographically diverse, this analysis needs to happen at a fine granularity. Analysis at the finest granularity, the exact location where an event happens, is very difficult and expensive. Analysis on areas, such as neighborhoods within a city, is much more practical.\n\n\t\n\t\nFigure 2. The maps above depict the process of bucketing points with H3: cars in a city; cars in hexagons; and hexagons shaded by number of cars.\n\nWe use a grid system to bucket events into hexagonal areas, in other words, cells. Data points are bucketed into hexagons and can be written using the hexagonally bucketed data. For example, we calculate surge pricing by measuring supply and demand in hexagons in each city that we serve. These hexagons form the basis for our analysis of the Uber marketplace.\n\nHexagons were an important choice because people in a city are often in motion, and hexagons minimize the quantization error introduced when users move through a city. Hexagons also allow us to approximate radiuses easily, such as in this example using Elasticsearch.\n\nFigure 3. Zip code map of New York City (Manhattan).\n\nThere are other choices we could use for bucketing events into areas, for instance polygonal zones around areas. These could be postal code areas, but such areas have unusual shapes and sizes which are not helpful for analysis, and are subject to change for reasons entirely unrelated to what we would use them for. Zones could also be drawn by Uber operations teams based on their knowledge of the city, but such zones require frequent updating as cities change and often define the edges of areas arbitrarily.\n\nFigure 4. Randomly generated hexagonal clusters cover the city of San Francisco.\n\nGrid systems can have comparable shapes and sizes across the cities that Uber operates in and are not subject to arbitrary changes. While grid systems do not align to streets and neighborhoods in cities, they can be used to efficiently represent neighborhoods by clustering grid cells. Clustering can be done using objective functions, producing shapes much more useful for analysis. Determining membership of a cluster is as efficient as a set lookup operation.", "segmentation_method": "reviewed_source_semantics", "label": "Analysis using grids", "source_line_range": [ 8, 33 ] }, { "id": "body-region-3", "text": "h3 we decided to create h3 to combine the benefits of a hexagonal global grid system with a hierarchical indexing system a global grid system usually requires at least two things a map projection and a grid laid on top of the map a map projection is needed for going from a three dimensional location on earth to a two dimensional point on a map a grid is then overlaid on the map forming a global grid system this process can be accomplished in innumerable ways by combining different map projections and grids for example the widely recognized mercator projection and a square grid while this simple method would work it has a number of drawbacks to start the mercator projection has significant size distortion so some cells will have vastly different areas square grids also have drawbacks requiring multiple sets of coefficients when used for analysis this disadvantage is a result of squares having two different types of neighbors one type with which they share an edge in the four cardinal directions and another type with which they share a vertex in four diagonal directions figure 5 we chose to use gnomonic projections centered on icosahedron faces left for h3 s map projection projecting earth as a spherical icosahedron right for map projection we chose to use gnomonic projections centered on icosahedron faces this projects from earth as a sphere to an icosahedron a twenty sided platonic solid an icosahedron based map projection results in twenty separate two dimensional planes rather than a single plane the icosahedron can be unfolded in many ways producing a two dimensional map each time h3 however does not unfold the icosahedron to build its grid system and instead lays its grid out on the icosahedron faces themselves forming a geodesic discrete global grid system figure 6 distances from a triangle to its neighbors left a square to its neighbors center and a hexagon to its neighbors right using a hexagon as the cell shape is critical for h3 as depicted in figure 6 hexagons have only one distance between a hexagon centerpoint and its neighbors compared to two distances for squares or three distances for triangles this property greatly simplifies performing analysis and smoothing over gradients figure 7 h3 used to create a grid on a single icosahedron face the h3 grid is constructed by laying out 122 base cells over the earth with ten cells per face some cells are contained by more than one face since it is not possible to tile the icosahedron with only hexagons we chose to introduce twelve pentagons one at each of the icosahedron vertices these vertices were positioned using the spherical icosahedron orientation by r buckminster fuller which places all the vertices in the water this helps avoid pentagons surfacing in our work figure 8 h3 enables the user to subdivide areas into smaller and smaller hexagons h3 supports sixteen resolutions each finer resolution has cells with one seventh the area of the coarser resolution hexagons cannot be perfectly subdivided into seven hexagons so the finer cells are only approximately contained within a parent cell the identifiers for these child cells can be easily truncated to find their ancestor cell at a coarser resolution enabling efficient indexing because the children cells are only approximately contained the truncation process produces a fixed amount of shape distortion this distortion is only present when performing truncation of a cell identifier when indexing locations at a specific resolution the cell boundaries are exact", "source_text": "H3\n\nWe decided to create H3 to combine the benefits of a hexagonal global grid system with a hierarchical indexing system.\n\nA global grid system usually requires at least two things: a map projection and a grid laid on top of the map. A map projection is needed for going from a three-dimensional location on Earth to a two dimensional point on a map. A grid is then overlaid on the map, forming a global grid system.\n\nThis process can be accomplished in innumerable ways by combining different map projections and grids, for example, the widely recognized Mercator projection and a square grid. While this simple method would work, it has a number of drawbacks. To start, the Mercator projection has significant size distortion, so some cells will have vastly different areas. Square grids also have drawbacks, requiring multiple sets of coefficients when used for analysis. This disadvantage is a result of squares having two different types of neighbors, one type with which they share an edge (in the four cardinal directions) and another type with which they share a vertex (in four diagonal directions).\n\n\t\n\t\nFigure 5. We chose to use gnomonic projections centered on icosahedron faces (left) for H3’s map projection, projecting Earth as a spherical icosahedron (right).\n\nFor map projection, we chose to use gnomonic projections centered on icosahedron faces. This projects from Earth as a sphere to an icosahedron, a twenty-sided platonic solid. An icosahedron-based map projection results in twenty separate two-dimensional planes rather than a single plane. The icosahedron can be unfolded in many ways, producing a two-dimensional map each time. H3, however, does not unfold the icosahedron to build its grid system, and instead lays its grid out on the icosahedron faces themselves, forming a geodesic discrete global grid system.\n\n\t\n\t\nFigure 6. Distances from a triangle to its neighbors (left), a square to its neighbors (center), and a hexagon to its neighbors (right).\n\nUsing a hexagon as the cell shape is critical for H3. As depicted in Figure 6, hexagons have only one distance between a hexagon centerpoint and its neighbors’, compared to two distances for squares or three distances for triangles. This property greatly simplifies performing analysis and smoothing over gradients.\n\nFigure 7. H3 used to create a grid on a single icosahedron face.\n\nThe H3 grid is constructed by laying out 122 base cells over the Earth, with ten cells per face. Some cells are contained by more than one face. Since it is not possible to tile the icosahedron with only hexagons, we chose to introduce twelve pentagons, one at each of the icosahedron vertices. These vertices were positioned using the spherical icosahedron orientation by R. Buckminster Fuller, which places all the vertices in the water. This helps avoid pentagons surfacing in our work.\n\n\t\n\t\nFigure 8. H3 enables the user to subdivide areas into smaller and smaller hexagons.\n\nH3 supports sixteen resolutions. Each finer resolution has cells with one seventh the area of the coarser resolution. Hexagons cannot be perfectly subdivided into seven hexagons, so the finer cells are only approximately contained within a parent cell.\n\nThe identifiers for these child cells can be easily truncated to find their ancestor cell at a coarser resolution, enabling efficient indexing. Because the children cells are only approximately contained, the truncation process produces a fixed amount of shape distortion. This distortion is only present when performing truncation of a cell identifier; when indexing locations at a specific resolution, the cell boundaries are exact.", "segmentation_method": "reviewed_source_semantics", "label": "H3", "source_line_range": [ 34, 67 ] }, { "id": "body-region-4", "text": "getting started with h3 the h3 indexing system is open source and available on github the h3 library itself is written in c and bindings are available for a number of languages using bindings is the recommended way to start using h3 uber has published bindings for java and javascript and the community has contributed bindings for more languages bindings are coming soon for python and go figure 9 the point blue left and its containing hexagon the centroid lighter blue middle of its containing hexagon and both the point and centroid of the containing hexagon right depict a possible difference between the two code https github com uber h3 blob master examples index c the basic functions of the h3 library are for indexing locations which transforms latitude and longitude pairs to a 64 bit h3 index identifying a grid cell the function geotoh3 takes a latitude longitude and resolution between 0 and 15 with 0 being coarsest and 15 being finest and returns an index h3togeo and h3togeoboundary are the inverse of this function providing the center coordinates and outline of the grid cell specified by the h3 index respectively once you have data indexed using h3 the h3 api has functions for working with indexes figure 10 hexagons neighboring an index with distance of 0 left just the original index 1 middle with neighbors of the original index and 2 right with neighbors of neighbors code https github com uber h3 blob master examples neighbors c neighboring hexagons have the useful property of approximating circles using the grid system the kring function provides grid cells within grid distance k of an origin index figure 11 dense hexagons representing california stand in stark contrast to compact hexagons representing the state requiring many fewer hexagons to represent the same area code https github com uber h3 blob master examples compact c the hierarchical nature of h3 allows for efficiently truncating the precision or resolution of an index and recovering the original indexes the uncompact and compact representations of a set of hexagons are shown above the uncompact representation has 10 633 hexagons at resolution 6 but the compact representation has 901 hexagons at resolutions up to 6 in both cases a hexagon index is a 64 bit integer the precision of a single index can also be efficiently truncated as a bitwise operation or expanded to a higher precision set of indexes figure 12 h3 can represent the movement from one cell to another here represented by drawing an arrow from the origin to destination cell code https github com uber h3 blob master examples edge c h3 has functions for directed edges of grid cells which can represent the movement from one cell to another directed edges can be stored as 64 bit integers and can be obtained from two neighboring cells or by finding all edges of a cell when needed an edge can be converted back to the origin or destination indexes", "source_text": "Getting started with H3\n\nThe H3 indexing system is open source and available on GitHub. The H3 library itself is written in C, and bindings are available for a number of languages. Using bindings is the recommended way to start using H3. Uber has published bindings for Java and JavaScript, and the community has contributed bindings for more languages. Bindings are coming soon for Python and Go.\n\n\t\n\t\nFigure 9. The point (blue, left) and its containing hexagon, the centroid (lighter blue, middle) of its containing hexagon, and both the point and centroid of the containing hexagon (right) depict a possible difference between the two.\n\nCode: https://github.com/uber/h3/blob/master/examples/index.c\n\nThe basic functions of the H3 library are for indexing locations, which transforms latitude and longitude pairs to a 64-bit H3 index, identifying a grid cell. The function geoToH3 takes a latitude, longitude, and resolution (between 0 and 15, with 0 being coarsest and 15 being finest), and returns an index. h3ToGeo and h3ToGeoBoundary are the inverse of this function, providing the center coordinates and outline of the grid cell specified by the H3 index, respectively.\n\nOnce you have data indexed using H3, the H3 API has functions for working with indexes.\n\n\t\n\t\nFigure 10. Hexagons neighboring an index, with distance of 0 (left; just the original index), 1 (middle; with neighbors of the original index), and 2 (right; with neighbors of neighbors).\n\nCode: https://github.com/uber/h3/blob/master/examples/neighbors.c\n\nNeighboring hexagons have the useful property of approximating circles using the grid system. The kRing function provides grid cells within grid distance k of an origin index.\n\n\t\nFigure 11. Dense hexagons representing California stand in stark contrast to compact hexagons representing the state, requiring many fewer hexagons to represent the same area.\n\nCode: https://github.com/uber/h3/blob/master/examples/compact.c\n\nThe hierarchical nature of H3 allows for efficiently truncating the precision (or resolution) of an index and recovering the original indexes. The uncompact and compact representations of a set of hexagons are shown above. The uncompact representation has 10,633 hexagons at resolution 6, but the compact representation has 901 hexagons at resolutions up to 6. In both cases, a hexagon index is a 64-bit integer.\n\nThe precision of a single index can also be efficiently truncated as a bitwise operation, or expanded to a higher precision set of indexes.\n\nFigure 12. H3 can represent the movement from one cell to another, here represented by drawing an arrow from the origin to destination cell.\n\nCode: https://github.com/uber/h3/blob/master/examples/edge.c\n\nH3 has functions for directed edges of grid cells which can represent the movement from one cell to another. Directed edges can be stored as 64-bit integers, and can be obtained from two neighboring cells, or by finding all edges of a cell. When needed, an edge can be converted back to the origin or destination indexes.", "segmentation_method": "reviewed_source_semantics", "label": "Getting started with H3", "source_line_range": [ 68, 106 ] }, { "id": "body-region-5", "text": "moving forward h3 is used throughout uber to support quantitative analysis of our marketplace and now that it s open sourced you too can hexagonify the world we look forward to you joining the h3 community by following our repository on github and tweeting with the uberh3 hashtag maps generated using mapboxgl learn more information about our mapping data providers major contributors to the h3 library also include kevin sahr southern oregon university joseph gilley uber nick rabinowitz uber and david ellis cardash subscribe to our newsletter to keep up with the latest innovations from uber engineering", "source_text": "Moving forward\n\nH3 is used throughout Uber to support quantitative analysis of our marketplace, and now that it’s open sourced, you too can hexagonify the world! We look forward to you joining the H3 community by following our repository on Github and tweeting with the #uberH3 hashtag.\n\n \n\nMaps generated using MapboxGL.\n\nLearn more information about our mapping data providers.\n\nMajor contributors to the H3 library also include Kevin Sahr (Southern Oregon University), Joseph Gilley (Uber), Nick Rabinowitz (Uber), and David Ellis (CarDash).\n\n \n\nSubscribe to our newsletter to keep up with the latest innovations from Uber Engineering.", "segmentation_method": "reviewed_source_semantics", "label": "Moving forward", "source_line_range": [ 107, 121 ] } ], "ending": { "text": "Dash).\n\n \n\nSubscribe to our newsletter to keep up with the latest innovations from Uber Engineering." } } }, { "id": "article-076", "name": "Introducing the Amazon Builders’ Library(Part I)", "url": "https://aws.amazon.com/blogs/architecture/reinvent-2019-introducing-the-amazon-builders-library-part-i/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "re:Invent 2019: Introducing the Amazon Builders’ Library \\(Part I\\)" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Annik Stahl" ] }, { "id": "stable-3", "alternatives": [ "English" ] }, { "id": "stable-4", "alternatives": [ "Contact us" ] }, { "id": "stable-5", "alternatives": [ "AWS Marketplace" ] }, { "id": "stable-6", "alternatives": [ "Support" ] }, { "id": "stable-7", "alternatives": [ "My account" ] }, { "id": "stable-8", "alternatives": [ "re:Invent" ] }, { "id": "stable-9", "alternatives": [ "Discover AWS" ] }, { "id": "stable-10", "alternatives": [ "Products" ] }, { "id": "stable-11", "alternatives": [ "Solutions" ] }, { "id": "stable-12", "alternatives": [ "Pricing" ] }, { "id": "stable-13", "alternatives": [ "Resources" ] }, { "id": "stable-14", "alternatives": [ "Search" ] }, { "id": "stable-15", "alternatives": [ "Sign in to console" ] }, { "id": "stable-16", "alternatives": [ "Create account" ] }, { "id": "stable-17", "alternatives": [ "AWS Blogs" ] }, { "id": "stable-18", "alternatives": [ "Home" ] }, { "id": "stable-19", "alternatives": [ "Blogs" ] }, { "id": "stable-20", "alternatives": [ "Editions" ] }, { "id": "stable-21", "alternatives": [ "AWS Architecture Blog" ] }, { "id": "stable-23", "alternatives": [ "TAGS: Architecture, availabilty zones, aws lambda, distributed systems, IoT Core, jitter, MQTT, queues, re:Invent 2019, retries and backoff, sqs, timeouts" ] }, { "id": "stable-24", "alternatives": [ "Annik Stahl" ] }, { "id": "stable-25", "alternatives": [ "Annik Stahl is a Senior Program Manager in AWS, specializing in blog and magazine content. Having been the face of Microsoft Office for 10 years as the Crabby Office Lady columnist, she loves getting to know her customers and wants to hear from you." ] }, { "id": "stable-26", "alternatives": [ "Resources" ] }, { "id": "stable-27", "alternatives": [ "AWS Architecture Center" ] }, { "id": "stable-28", "alternatives": [ "AWS Well-Architected" ] }, { "id": "stable-29", "alternatives": [ "AWS Architecture Monthly" ] }, { "id": "stable-30", "alternatives": [ "AWS Whitepapers" ] }, { "id": "stable-31", "alternatives": [ "AWS Training and Certification" ] }, { "id": "stable-32", "alternatives": [ "This Is My Architecture" ] }, { "id": "stable-33", "alternatives": [ "Follow" ] }, { "id": "stable-34", "alternatives": [ "  Twitter" ] }, { "id": "stable-35", "alternatives": [ "  Facebook" ] }, { "id": "stable-36", "alternatives": [ "  LinkedIn" ] }, { "id": "stable-37", "alternatives": [ "  Twitch" ] }, { "id": "stable-38", "alternatives": [ "  Email Updates" ] }, { "id": "stable-39", "alternatives": [ "Create an AWS account" ] }, { "id": "stable-40", "alternatives": [ "Learn" ] }, { "id": "stable-41", "alternatives": [ "What Is AWS?" ] }, { "id": "stable-42", "alternatives": [ "What Is Cloud Computing?" ] }, { "id": "stable-43", "alternatives": [ "What Is Agentic AI?" ] }, { "id": "stable-44", "alternatives": [ "Cloud Computing Concepts Hub" ] }, { "id": "stable-45", "alternatives": [ "AWS Cloud Security" ] }, { "id": "stable-46", "alternatives": [ "What's New" ] }, { "id": "stable-47", "alternatives": [ "Blogs" ] }, { "id": "stable-48", "alternatives": [ "Press Releases" ] }, { "id": "stable-49", "alternatives": [ "Careers" ] }, { "id": "stable-50", "alternatives": [ "Resources" ] }, { "id": "stable-51", "alternatives": [ "Getting Started" ] }, { "id": "stable-52", "alternatives": [ "Training" ] }, { "id": "stable-53", "alternatives": [ "AWS Trust Center" ] }, { "id": "stable-54", "alternatives": [ "AWS Solutions Library" ] }, { "id": "stable-55", "alternatives": [ "Architecture Center" ] }, { "id": "stable-56", "alternatives": [ "Product and Technical FAQs" ] }, { "id": "stable-57", "alternatives": [ "Analyst Reports" ] }, { "id": "stable-58", "alternatives": [ "AWS Partners" ] }, { "id": "stable-59", "alternatives": [ "Developers" ] }, { "id": "stable-60", "alternatives": [ "Builder Center" ] }, { "id": "stable-61", "alternatives": [ "SDKs & Tools" ] }, { "id": "stable-62", "alternatives": [ ".NET on AWS" ] }, { "id": "stable-63", "alternatives": [ "Python on AWS" ] }, { "id": "stable-64", "alternatives": [ "Java on AWS" ] }, { "id": "stable-65", "alternatives": [ "PHP on AWS" ] }, { "id": "stable-66", "alternatives": [ "JavaScript on AWS" ] }, { "id": "stable-67", "alternatives": [ "Help" ] }, { "id": "stable-68", "alternatives": [ "Contact Us" ] }, { "id": "stable-69", "alternatives": [ "File a Support Ticket" ] }, { "id": "stable-70", "alternatives": [ "AWS re:Post" ] }, { "id": "stable-71", "alternatives": [ "Knowledge Center" ] }, { "id": "stable-72", "alternatives": [ "AWS Support Overview" ] }, { "id": "stable-73", "alternatives": [ "AWS Accessibility" ] }, { "id": "stable-74", "alternatives": [ "Legal" ] }, { "id": "stable-75", "alternatives": [ "Event Code of Conduct" ] }, { "id": "stable-76", "alternatives": [ "Event Terms & Conditions" ] }, { "id": "stable-77", "alternatives": [ "English" ] }, { "id": "stable-78", "alternatives": [ "Back to top" ] }, { "id": "stable-79", "alternatives": [ "Amazon is an equal opportunity employer and does not discriminate on the basis of protected veteran status, disability or other legally protected status. Veterans, military spouses, and people with disabilities are encouraged to apply." ] }, { "id": "stable-80", "alternatives": [ "Privacy" ] }, { "id": "stable-81", "alternatives": [ "Site terms" ] }, { "id": "stable-82", "alternatives": [ "Your Privacy Choices" ] }, { "id": "stable-83", "alternatives": [ "Cookie Preferences" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Direct approved URL automatically redirects to /cn/ English-content article. Complete opening, four linked excerpt sections and closing reviewed in full-page screenshot; no wall or collapsed body. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "re:Invent 2019: Introducing the Amazon Builders’ Library (Part I)" ], "html_selector": "h1.lb-h2.blog-post-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-076/comment-qualification-reference-r5.json", "sha256": "a707cdf90a7ed749f148d530334982f97e1cd38310c62c4149d04b0b9e9fcb2c", "chars": 833, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "This week I’m telling you about a new site we launched at re:Invent, the Amazon Builders’ Library, a collection of living articles covering topics across architecture, software delivery, and operations. You get to peek under the hood of how Amazon architects, releases, and operates the software underpinning Amazon.com and AWS.\n\nWant to know how Amazon.com does what it does? This is for you. In this two-part series, I’ll highlight some of the best architecture articles written by Amazon’s senior technical leaders and engineers.\n\nAvoiding Insurmountable Queue Backlogs\n\nIn queueing theory, the behavior of queues when they are short is relatively uninteresting. After all, when a queue is short, everyone is happy. It’s only when the queue is backlogged, when the line to an event goes out the door and around the corner, that people start thinking about throughput and prioritization.\n\nIn this article, I discuss strategies we use at Amazon to deal with queue backlog scenarios – design approaches we take to drain queues quickly and to prioritize workloads. Most importantly, I describe how to prevent queue backlogs from building up in the first place. In the first half, I describe scenarios that lead to backlogs, and in the second half, I describe many approaches used at Amazon to avoid backlogs or deal with them gracefully.\n\nRead the full article by David Yanacek, Principal Engineer\n\nTimeouts, Retries, and Backoff With Jitter\n\nWhenever one service or system calls another, failures can happen. These failures can come from a variety of factors. They include servers, networks, load balancers, software, operating systems, or even mistakes from system operators. We design our systems to reduce the probability of failure, but impossible to build systems that never fail. So in Amazon, we design our systems to tolerate and reduce the probability of failure, and avoid magnifying a small percentage of failures into a complete outage. To build resilient systems, we employ three essential tools: timeouts, retries, and backoff.\n\nRead the full article by Marc Brooker, Senior Principal Engineer\n\nChallenges With Distributed Systems\n\nThe moment we added our second server, distributed systems became the way of life at Amazon. When I started at Amazon in 1999, we had so few servers that we could give some of them recognizable names like “fishy” or “online-01”. However, even in 1999, distributed computing was not easy. Then as now, challenges with distributed systems involved latency, scaling, understanding networking APIs, marshalling and unmarshalling data, and the complexity of algorithms such as Paxos. As the systems quickly grew larger and more distributed, what had been theoretical edge cases turned into regular occurrences.\n\nDeveloping distributed utility computing services, such as reliable long-distance telephone networks, or Amazon Web Services (AWS) services, is hard. Distributed computing is also weirder and less intuitive than other forms of computing because of two interrelated problems. Independent failures and nondeterminism cause the most impactful issues in distributed systems. In addition to the typical computing failures most engineers are used to, failures in distributed systems can occur in many other ways. What’s worse, it’s impossible always to know whether something failed.\n\nRead the full article by Jacob Gabrielson, Senior Principal Engineer\n\nStatic Stability Using Availability Zones\n\nAt Amazon, the services we build must meet extremely high availability targets. This means that we need to think carefully about the dependencies that our systems take. We design our systems to stay resilient even when those dependencies are impaired. In this article, we’ll define a pattern that we use called static stability to achieve this level of resilience. We’ll show you how we apply this concept to Availability Zones, a key infrastructure building block in AWS and therefore a bedrock dependency on which all of our services are built.\n\nRead the full article by Becky Weiss, Senior Principal Engineer, and Mike Furr, Principal Engineer\n\nCheck back in a week to read about some other architecture-based expert articles that let you in on how Amazon does what it does.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "this week i m telling you about a new site we launched at re invent the amazon builders library a collection of living articles covering topics across architecture software delivery and operations you get to peek under the hood of how amazon architects releases and operates the software underpinning amazon com and aws want to know how amazon com does what it does this is for you in this two part series i ll highlight some of the best architecture articles written by amazon s senior technical leaders and engineers", "source_text": "This week I’m telling you about a new site we launched at re:Invent, the Amazon Builders’ Library, a collection of living articles covering topics across architecture, software delivery, and operations. You get to peek under the hood of how Amazon architects, releases, and operates the software underpinning Amazon.com and AWS.\n\nWant to know how Amazon.com does what it does? This is for you. In this two-part series, I’ll highlight some of the best architecture articles written by Amazon’s senior technical leaders and engineers.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:This week I’m telling you about a new site we launched at re", "source_line_range": [ 1, 4 ] }, { "id": "body-region-2", "text": "avoiding insurmountable queue backlogs in queueing theory the behavior of queues when they are short is relatively uninteresting after all when a queue is short everyone is happy it s only when the queue is backlogged when the line to an event goes out the door and around the corner that people start thinking about throughput and prioritization in this article i discuss strategies we use at amazon to deal with queue backlog scenarios design approaches we take to drain queues quickly and to prioritize workloads most importantly i describe how to prevent queue backlogs from building up in the first place in the first half i describe scenarios that lead to backlogs and in the second half i describe many approaches used at amazon to avoid backlogs or deal with them gracefully read the full article by david yanacek principal engineer", "source_text": "Avoiding Insurmountable Queue Backlogs\n\nIn queueing theory, the behavior of queues when they are short is relatively uninteresting. After all, when a queue is short, everyone is happy. It’s only when the queue is backlogged, when the line to an event goes out the door and around the corner, that people start thinking about throughput and prioritization.\n\nIn this article, I discuss strategies we use at Amazon to deal with queue backlog scenarios – design approaches we take to drain queues quickly and to prioritize workloads. Most importantly, I describe how to prevent queue backlogs from building up in the first place. In the first half, I describe scenarios that lead to backlogs, and in the second half, I describe many approaches used at Amazon to avoid backlogs or deal with them gracefully.\n\nRead the full article by David Yanacek, Principal Engineer", "segmentation_method": "reviewed_source_semantics", "label": "Avoiding Insurmountable Queue Backlogs", "source_line_range": [ 5, 12 ] }, { "id": "body-region-3", "text": "timeouts retries and backoff with jitter whenever one service or system calls another failures can happen these failures can come from a variety of factors they include servers networks load balancers software operating systems or even mistakes from system operators we design our systems to reduce the probability of failure but impossible to build systems that never fail so in amazon we design our systems to tolerate and reduce the probability of failure and avoid magnifying a small percentage of failures into a complete outage to build resilient systems we employ three essential tools timeouts retries and backoff read the full article by marc brooker senior principal engineer", "source_text": "Timeouts, Retries, and Backoff With Jitter\n\nWhenever one service or system calls another, failures can happen. These failures can come from a variety of factors. They include servers, networks, load balancers, software, operating systems, or even mistakes from system operators. We design our systems to reduce the probability of failure, but impossible to build systems that never fail. So in Amazon, we design our systems to tolerate and reduce the probability of failure, and avoid magnifying a small percentage of failures into a complete outage. To build resilient systems, we employ three essential tools: timeouts, retries, and backoff.\n\nRead the full article by Marc Brooker, Senior Principal Engineer", "segmentation_method": "reviewed_source_semantics", "label": "Timeouts, Retries, and Backoff With Jitter", "source_line_range": [ 13, 18 ] }, { "id": "body-region-4", "text": "challenges with distributed systems the moment we added our second server distributed systems became the way of life at amazon when i started at amazon in 1999 we had so few servers that we could give some of them recognizable names like fishy or online 01 however even in 1999 distributed computing was not easy then as now challenges with distributed systems involved latency scaling understanding networking apis marshalling and unmarshalling data and the complexity of algorithms such as paxos as the systems quickly grew larger and more distributed what had been theoretical edge cases turned into regular occurrences developing distributed utility computing services such as reliable long distance telephone networks or amazon web services aws services is hard distributed computing is also weirder and less intuitive than other forms of computing because of two interrelated problems independent failures and nondeterminism cause the most impactful issues in distributed systems in addition to the typical computing failures most engineers are used to failures in distributed systems can occur in many other ways what s worse it s impossible always to know whether something failed read the full article by jacob gabrielson senior principal engineer", "source_text": "Challenges With Distributed Systems\n\nThe moment we added our second server, distributed systems became the way of life at Amazon. When I started at Amazon in 1999, we had so few servers that we could give some of them recognizable names like “fishy” or “online-01”. However, even in 1999, distributed computing was not easy. Then as now, challenges with distributed systems involved latency, scaling, understanding networking APIs, marshalling and unmarshalling data, and the complexity of algorithms such as Paxos. As the systems quickly grew larger and more distributed, what had been theoretical edge cases turned into regular occurrences.\n\nDeveloping distributed utility computing services, such as reliable long-distance telephone networks, or Amazon Web Services (AWS) services, is hard. Distributed computing is also weirder and less intuitive than other forms of computing because of two interrelated problems. Independent failures and nondeterminism cause the most impactful issues in distributed systems. In addition to the typical computing failures most engineers are used to, failures in distributed systems can occur in many other ways. What’s worse, it’s impossible always to know whether something failed.\n\nRead the full article by Jacob Gabrielson, Senior Principal Engineer", "segmentation_method": "reviewed_source_semantics", "label": "Challenges With Distributed Systems", "source_line_range": [ 19, 26 ] }, { "id": "body-region-5", "text": "static stability using availability zones at amazon the services we build must meet extremely high availability targets this means that we need to think carefully about the dependencies that our systems take we design our systems to stay resilient even when those dependencies are impaired in this article we ll define a pattern that we use called static stability to achieve this level of resilience we ll show you how we apply this concept to availability zones a key infrastructure building block in aws and therefore a bedrock dependency on which all of our services are built read the full article by becky weiss senior principal engineer and mike furr principal engineer check back in a week to read about some other architecture based expert articles that let you in on how amazon does what it does", "source_text": "Static Stability Using Availability Zones\n\nAt Amazon, the services we build must meet extremely high availability targets. This means that we need to think carefully about the dependencies that our systems take. We design our systems to stay resilient even when those dependencies are impaired. In this article, we’ll define a pattern that we use called static stability to achieve this level of resilience. We’ll show you how we apply this concept to Availability Zones, a key infrastructure building block in AWS and therefore a bedrock dependency on which all of our services are built.\n\nRead the full article by Becky Weiss, Senior Principal Engineer, and Mike Furr, Principal Engineer\n\nCheck back in a week to read about some other architecture-based expert articles that let you in on how Amazon does what it does.", "segmentation_method": "reviewed_source_semantics", "label": "Static Stability Using Availability Zones", "source_line_range": [ 27, 33 ] } ], "ending": { "text": "about some other architecture-based expert articles that let you in on how Amazon does what it does." } } }, { "id": "article-077", "name": "乔姆斯基:ChatGPT 的虚假承诺", "url": "https://mp.weixin.qq.com/s/e9KDOZ3vwd10PFvH6hbtmg", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "乔姆斯基:ChatGPT\\ 的虚假承诺" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "publisher", "alternatives": [ "语言治理" ] }, { "id": "original", "alternatives": [ "原创" ] }, { "id": "profile", "alternatives": [ "发布最前沿的语言研究信息,发现平淡生活里语言的奥秘。" ] }, { "id": "profile-kind", "alternatives": [ "公众号" ] }, { "id": "read-original", "alternatives": [ "阅读原文" ] }, { "id": "control-1", "alternatives": [ "赞" ] }, { "id": "control-2", "alternatives": [ "分享" ] }, { "id": "control-3", "alternatives": [ "推荐" ] }, { "id": "control-4", "alternatives": [ "写留言" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Reviewed user-supplied archived initial state and user no-interaction attestation. User approved the four rules before publication; no independent live browser access claimed." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "乔姆斯基:ChatGPT 的虚假承诺" ], "html_selector": "#activity-name,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "wechat-qualified-v10/article-077/comment-proof.json", "sha256": "0057e706e03587487649516fb674a147c36f8bc8876b15a1eba0a99109074a41" }, "comment_presence_review": { "status": "observed_absent", "basis": "User confirms automatic-load save without interaction. Saved comment container has display:none inside stream_comment_dialog; failure labels are hidden dialog content. No actual displayed comment records found in this archived state; no claim of permanent absence.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "近期乔老爷子在纽约时报观点栏目再次谈了自己对ChatGPT的看法。\n那么Chomsky 这次会怎么看待ChatGPT呢?下面小编分享一下原文的译文:\nChomsky 的观点\n豪尔赫-路易斯-博尔赫斯曾写道,生活在一个充满危险和希望的时代,就是同时经历悲剧和喜剧,在理解我们自己和世界的过程中,有“启示的迫近”。今天,我们在人工智能方面的所谓革命性进展,确实让人既担心又乐观。乐观是因为智能是我们解决问题的手段。担忧是因为我们担心最流行、最时髦的人工智能--机器学习--会因为在我们的技术中加入了对语言和知识的根本性错误的概念而降低我们的科学,贬低我们的道德。\n语言治理\nOpenAI的ChatGPT、谷歌的Bard和微软的Sydney是机器学习的奇迹。简而言之,它们接受大量的数据,在其中寻找潜在模型,并越来越熟练地生成统计学上可能的输出结果--比如看似像人类的语言和思想。这些程序被誉为人工通用智能地平线上的第一道曙光--那是一个长期预言的时刻,机械思维不仅在处理速度和内存大小方面超过人类大脑,而且在智力洞察力、艺术创造力和其他各种独特的人类能力方面也超过人类大脑。\n这一天可能会到来,但我们尚未看到曙光,这与在夸张的头条新闻中读到的和通过不谨慎的投资计算出来的情况相反。如果像ChatGPT这样的机器学习程序继续主导人工智能领域,博尔赫斯式的理解启示就没有也不会,而且,我们认为也不可能发生。无论这些程序在某些狭窄的领域多么有用(例如,它们可以在计算机编程方面有所帮助,或者为轻快的诗句提供韵律建议),我们从语言学和知识哲学中知道,它们与人类推理和使用语言的方式有着深刻的区别。这些差异对这些程序所能做的事情造成了很大的限制,使它们被编码为不可改变的缺陷。\n正如博尔赫斯可能指出的那样,这么多的钱和注意力应该集中在这么小的事情上,这既滑稽又可悲。与人类的思想相比,人类的思想通过语言,用威廉-冯-洪堡的话说,可以“无限地利用有限的手段”,创造具有普遍意义的思想和理论。\n人类的思维并不像ChatGPT及其同类产品那样,是一个用于模式匹配的笨重的统计引擎,在数百兆字节的数据上大快朵颐,并推断出最可能的对话回应或最可能的科学问题的答案。相反,人类的思维是一个相当高效甚至优雅的系统,它利用少量的信息进行操作;它不是为了推断数据点之间的简单关联,而是为了创造解释。\n例如,一个学习语言的小孩正在无意识地、自动地、迅速地从极小的数据中发展出一个语法,一个由逻辑原则和参数组成的令人惊叹的复杂系统。这种语法可以被理解为先天的、通过基因安装的 “操作系统”的表达,它赋予了人类产生复杂句子和长篇思想的能力。当语言学家试图发展一种理论来解释为什么一种特定的语言会如此运作(“为什么这些--而不是那些--句子被认为是符合语法的?”)时,他们正在有意识地、费力地建立一种明确的语法版本,而这种语法是儿童本能地建立的,而且接触的信息最少。孩子的操作系统与机器学习程序的操作系统完全不同。\n事实上,这种程序停留在认知进化的前人类或非人类阶段。他们最深的缺陷是缺乏任何智能最关键的能力:不仅要说出现状是什么,过去是什么,将来会是什么--这就是描述和预测--而且要说出情况不是什么,什么可能和不可能是什么。这些都是解释的要素,是真正智慧的标志。\n这里有一个例子。假设你手里拿着一个苹果。现在你让苹果离开。你观察结果并说,“苹果掉下来了”。这就是一种描述。预测可能是 “如果我张开手,苹果就会掉下来 ”的说法。两者都是有价值的,而且都可能是正确的。但一个解释是更多的东西。它不仅包括描述和预测,还包括反事实的猜想,如 \"任何这样的物体都会掉下来\",再加上附加条款 “因为引力 ”或 “因为时空的曲率”或其他附加因素,而这就是一个因果解释。“如果不是因为引力,苹果就不会掉下来”。这就是思维。\n机器学习的核心是描述和预测,它没有提出任何因果机制或物理规律。当然,任何人类式的解释都不一定正确;我们是有缺陷的。但这也是思考的部分含义:要想正确,必须有可能出错。智能不仅包括创造性的猜想,也包括创造性的批评。人类式的思考是基于可能的解释和纠错,这个过程逐渐限制了可以理性考虑的可能性。(正如夏洛克-福尔摩斯对华生医生所说:“当你排除了不可能的事情后,剩下的任何事情,无论多么不可能,都必须是事实”)。\n但是ChatGPT和类似的程序在设计上是无限的,它们可以“学习”(换种说法就是记忆);它们没有能力区分可能和不可能。例如,与人类不同的是,人类被赋予了一种普遍语法,它可以让我们以数学的形式去优雅地学习语言,而这些程序则以同样的方式学习人类可能的和人类不可能的语言。人类在我们可以合理猜测的解释方面受到限制,而机器学习系统可以学习地球是平的和地球是圆的。它们只是在随时间变化的概率中进行交互学习。\n因此,机器学习系统的预测将总是肤浅而又不可靠的。例如,由于这些程序无法解释英语语法规则,它们很可能错误地预测“约翰太固执了,不愿意和他说话”,这意味着约翰太固执了,他不会和某人或其他人说话(而不是说他太固执,不愿意被人说理)。为什么机器学习程序会预测出如此奇怪的事情?因为它可能会把它从 “约翰吃了一个苹果”和 “约翰吃了”这样的句子中推断出来的模式进行类比,后者确实是指约翰吃了什么或其他东西。该程序很可能预测,因为“约翰太固执了,不愿意和比尔说话”与“约翰吃了一个苹果”相似,所以“约翰太固执了,不愿意和他说话”应该与“约翰吃了”相似。对语言的正确解释是复杂的,不能仅仅通过浸泡在大数据中来学习。\n反常的是,一些机器学习爱好者似乎很自豪,他们的作品可以产生正确的“科学”预测(例如,关于物理体的运动),而不利用解释(涉及,例如,牛顿的运动定律和普遍引力)。但这种预测,即使成功,也是伪科学。虽然科学家肯定会寻求有高度经验佐证的理论,但正如哲学家卡尔-波普尔所指出的,“我们寻求的不是高度可能的理论,而是解释;也就是说,强大而高度不可能的理论”。\n苹果落到地球上是因为那是它们的自然位置(亚里士多德的观点)的理论是可能的,但它只会引来进一步的问题。(为什么地球是它们的自然场所?)苹果落到地上是因为质量使时空弯曲的理论(爱因斯坦的观点)是非常不可能的,但它实际上告诉你为什么它们会掉下来。真正的智慧表现在能够思考和表达不可能但有洞察力的事情。\n真正的智慧还能够进行道德思考。这意味着用一套道德原则来约束我们头脑中本来无限的创造力,决定什么是应该的,什么是不应该的(当然也要让这些原则本身受到创造性的批评)。为了有用,ChatGPT必须被授权产生新颖的输出;为了被大多数用户接受,它必须避免道德上令人反感的内容。但ChatGPT和其他机器学习奇迹的程序员们已经在努力来实现这种平衡。\n例如,在2016年,微软的Tay聊天机器人(ChatGPT的前身)在互联网上充斥着厌恶女性和种族主义的内容,他们被网上的巨魔污染了,这些巨魔用攻击性的训练数据填充它。未来如何解决这个问题?由于缺乏从道德原则出发的推理能力,ChatGPT被其程序员粗暴地限制了对有争议的--也就是重要的--讨论做出任何新的贡献。它为一种非道德性牺牲了创造力。\n请看Watumull博士最近与ChatGPT的交流,关于改造火星使其能够支持人类生命是否符合道德。\n值得注意的是,所有看似复杂的思想和语言,都是由不聪明而产生的道德上的冷漠。在这里,ChatGPT表现出类似于邪恶的平庸:剽窃、冷漠和顺从。它以一种超级自动完成的方式总结了文献中的标准论点,拒绝在任何事情上采取立场,不仅辩称无知,而且辩称缺乏智慧,最终提供了一个“只是服从命令”的辩护,将责任推卸给它的创造者。\n简而言之,ChatGPT及其同类产品在结构上无法平衡创造力和约束。他们要么过度生成(产生真理和谬误,认可道德和不道德的决定),要么生成不足(表现为不承诺任何决定,对后果漠不关心)。鉴于这些系统的非道德性、假科学性和语言上的无能,我们对它们的流行只能哭笑不得。\n本文选自NewYork Times,欢迎点击阅读原文查看原文链接。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "近 期 乔 老 爷 子 在 纽 约 时 报 观 点 栏 目 再 次 谈 了 自 己 对 chatgpt 的 看 法 那 么 chomsky 这 次 会 怎 么 看 待 chatgpt 呢 下 面 小 编 分 享 一 下 原 文 的 译 文 chomsky 的 观 点 豪 尔 赫 路 易 斯 博 尔 赫 斯 曾 写 道 生 活 在 一 个 充 满 危 险 和 希 望 的 时 代 就 是 同 时 经 历 悲 剧 和 喜 剧 在 理 解 我 们 自 己 和 世 界 的 过 程 中 有 启 示 的 迫 近 今 天 我 们 在 人 工 智 能 方 面 的 所 谓 革 命 性 进 展 确 实 让 人 既 担 心 又 乐 观 乐 观 是 因 为 智 能 是 我 们 解 决 问 题 的 手 段 担 忧 是 因 为 我 们 担 心 最 流 行 最 时 髦 的 人 工 智 能 机 器 学 习 会 因 为 在 我 们 的 技 术 中 加 入 了 对 语 言 和 知 识 的 根 本 性 错 误 的 概 念 而 降 低 我 们 的 科 学 贬 低 我 们 的 道 德 语 言 治 理 openai 的 chatgpt 谷 歌 的 bard 和 微 软 的 sydney 是 机 器 学 习 的 奇 迹 简 而 言 之 它 们 接 受 大 量 的 数 据 在 其 中 寻 找 潜 在 模 型 并 越 来 越 熟 练 地 生 成 统 计 学 上 可 能 的 输 出 结 果 比 如 看 似 像 人 类 的 语 言 和 思 想 这 些 程 序 被 誉 为 人 工 通 用 智 能 地 平 线 上 的 第 一 道 曙 光 那 是 一 个 长 期 预 言 的 时 刻 机 械 思 维 不 仅 在 处 理 速 度 和 内 存 大 小 方 面 超 过 人 类 大 脑 而 且 在 智 力 洞 察 力 艺 术 创 造 力 和 其 他 各 种 独 特 的 人 类 能 力 方 面 也 超 过 人 类 大 脑 这 一 天 可 能 会 到 来 但 我 们 尚 未 看 到 曙 光 这 与 在 夸 张 的 头 条 新 闻 中 读 到 的 和 通 过 不 谨 慎 的 投 资 计 算 出 来 的 情 况 相 反 如 果 像 chatgpt 这 样 的 机 器 学 习 程 序 继 续 主 导 人 工 智 能 领 域 博 尔 赫 斯 式 的 理 解 启 示 就 没 有 也 不 会 而 且 我 们 认 为 也 不 可 能 发 生 无 论 这 些 程 序 在 某 些 狭 窄 的 领 域 多 么 有 用 例 如 它 们 可 以 在 计 算 机 编 程 方 面 有 所 帮 助 或 者 为 轻 快 的 诗 句 提 供 韵 律 建 议 我 们 从 语 言 学 和 知 识 哲 学 中 知 道 它 们 与 人 类 推 理 和 使 用 语 言 的 方 式 有 着 深 刻 的 区 别 这 些 差 异 对 这 些 程 序 所 能 做 的 事 情 造 成 了 很 大 的 限 制 使 它 们 被 编 码 为 不 可 改 变 的 缺 陷 正 如 博 尔 赫 斯 可 能 指 出 的 那 样 这 么 多 的 钱 和 注 意 力 应 该 集 中 在 这 么 小 的 事 情 上 这 既 滑 稽 又 可 悲 与 人 类 的 思 想 相 比 人 类 的 思 想 通 过 语 言 用 威 廉 冯 洪 堡 的 话 说 可 以 无 限 地 利 用 有 限 的 手 段 创 造 具 有 普 遍 意 义 的 思 想 和 理 论 人 类 的 思 维 并 不 像 chatgpt 及 其 同 类 产 品 那 样 是 一 个 用 于 模 式 匹 配 的 笨 重 的 统 计 引 擎 在 数 百 兆 字 节 的 数 据 上 大 快 朵 颐 并 推 断 出 最 可 能 的 对 话 回 应 或 最 可 能 的 科 学 问 题 的 答 案 相 反 人 类 的 思 维 是 一 个 相 当 高 效 甚 至 优 雅 的 系 统 它 利 用 少 量 的 信 息 进 行 操 作 它 不 是 为 了 推 断 数 据 点 之 间 的 简 单 关 联 而 是 为 了 创 造 解 释", "source_text": "近期乔老爷子在纽约时报观点栏目再次谈了自己对ChatGPT的看法。\n那么Chomsky 这次会怎么看待ChatGPT呢?下面小编分享一下原文的译文:\nChomsky 的观点\n豪尔赫-路易斯-博尔赫斯曾写道,生活在一个充满危险和希望的时代,就是同时经历悲剧和喜剧,在理解我们自己和世界的过程中,有“启示的迫近”。今天,我们在人工智能方面的所谓革命性进展,确实让人既担心又乐观。乐观是因为智能是我们解决问题的手段。担忧是因为我们担心最流行、最时髦的人工智能--机器学习--会因为在我们的技术中加入了对语言和知识的根本性错误的概念而降低我们的科学,贬低我们的道德。\n语言治理\nOpenAI的ChatGPT、谷歌的Bard和微软的Sydney是机器学习的奇迹。简而言之,它们接受大量的数据,在其中寻找潜在模型,并越来越熟练地生成统计学上可能的输出结果--比如看似像人类的语言和思想。这些程序被誉为人工通用智能地平线上的第一道曙光--那是一个长期预言的时刻,机械思维不仅在处理速度和内存大小方面超过人类大脑,而且在智力洞察力、艺术创造力和其他各种独特的人类能力方面也超过人类大脑。\n这一天可能会到来,但我们尚未看到曙光,这与在夸张的头条新闻中读到的和通过不谨慎的投资计算出来的情况相反。如果像ChatGPT这样的机器学习程序继续主导人工智能领域,博尔赫斯式的理解启示就没有也不会,而且,我们认为也不可能发生。无论这些程序在某些狭窄的领域多么有用(例如,它们可以在计算机编程方面有所帮助,或者为轻快的诗句提供韵律建议),我们从语言学和知识哲学中知道,它们与人类推理和使用语言的方式有着深刻的区别。这些差异对这些程序所能做的事情造成了很大的限制,使它们被编码为不可改变的缺陷。\n正如博尔赫斯可能指出的那样,这么多的钱和注意力应该集中在这么小的事情上,这既滑稽又可悲。与人类的思想相比,人类的思想通过语言,用威廉-冯-洪堡的话说,可以“无限地利用有限的手段”,创造具有普遍意义的思想和理论。\n人类的思维并不像ChatGPT及其同类产品那样,是一个用于模式匹配的笨重的统计引擎,在数百兆字节的数据上大快朵颐,并推断出最可能的对话回应或最可能的科学问题的答案。相反,人类的思维是一个相当高效甚至优雅的系统,它利用少量的信息进行操作;它不是为了推断数据点之间的简单关联,而是为了创造解释。", "segmentation_method": "reviewed_source_semantics", "label": "导语与人类思维对比", "source_line_range": [ 1, 9 ] }, { "id": "body-region-2", "text": "例 如 一 个 学 习 语 言 的 小 孩 正 在 无 意 识 地 自 动 地 迅 速 地 从 极 小 的 数 据 中 发 展 出 一 个 语 法 一 个 由 逻 辑 原 则 和 参 数 组 成 的 令 人 惊 叹 的 复 杂 系 统 这 种 语 法 可 以 被 理 解 为 先 天 的 通 过 基 因 安 装 的 操 作 系 统 的 表 达 它 赋 予 了 人 类 产 生 复 杂 句 子 和 长 篇 思 想 的 能 力 当 语 言 学 家 试 图 发 展 一 种 理 论 来 解 释 为 什 么 一 种 特 定 的 语 言 会 如 此 运 作 为 什 么 这 些 而 不 是 那 些 句 子 被 认 为 是 符 合 语 法 的 时 他 们 正 在 有 意 识 地 费 力 地 建 立 一 种 明 确 的 语 法 版 本 而 这 种 语 法 是 儿 童 本 能 地 建 立 的 而 且 接 触 的 信 息 最 少 孩 子 的 操 作 系 统 与 机 器 学 习 程 序 的 操 作 系 统 完 全 不 同 事 实 上 这 种 程 序 停 留 在 认 知 进 化 的 前 人 类 或 非 人 类 阶 段 他 们 最 深 的 缺 陷 是 缺 乏 任 何 智 能 最 关 键 的 能 力 不 仅 要 说 出 现 状 是 什 么 过 去 是 什 么 将 来 会 是 什 么 这 就 是 描 述 和 预 测 而 且 要 说 出 情 况 不 是 什 么 什 么 可 能 和 不 可 能 是 什 么 这 些 都 是 解 释 的 要 素 是 真 正 智 慧 的 标 志 这 里 有 一 个 例 子 假 设 你 手 里 拿 着 一 个 苹 果 现 在 你 让 苹 果 离 开 你 观 察 结 果 并 说 苹 果 掉 下 来 了 这 就 是 一 种 描 述 预 测 可 能 是 如 果 我 张 开 手 苹 果 就 会 掉 下 来 的 说 法 两 者 都 是 有 价 值 的 而 且 都 可 能 是 正 确 的 但 一 个 解 释 是 更 多 的 东 西 它 不 仅 包 括 描 述 和 预 测 还 包 括 反 事 实 的 猜 想 如 任 何 这 样 的 物 体 都 会 掉 下 来 再 加 上 附 加 条 款 因 为 引 力 或 因 为 时 空 的 曲 率 或 其 他 附 加 因 素 而 这 就 是 一 个 因 果 解 释 如 果 不 是 因 为 引 力 苹 果 就 不 会 掉 下 来 这 就 是 思 维 机 器 学 习 的 核 心 是 描 述 和 预 测 它 没 有 提 出 任 何 因 果 机 制 或 物 理 规 律 当 然 任 何 人 类 式 的 解 释 都 不 一 定 正 确 我 们 是 有 缺 陷 的 但 这 也 是 思 考 的 部 分 含 义 要 想 正 确 必 须 有 可 能 出 错 智 能 不 仅 包 括 创 造 性 的 猜 想 也 包 括 创 造 性 的 批 评 人 类 式 的 思 考 是 基 于 可 能 的 解 释 和 纠 错 这 个 过 程 逐 渐 限 制 了 可 以 理 性 考 虑 的 可 能 性 正 如 夏 洛 克 福 尔 摩 斯 对 华 生 医 生 所 说 当 你 排 除 了 不 可 能 的 事 情 后 剩 下 的 任 何 事 情 无 论 多 么 不 可 能 都 必 须 是 事 实", "source_text": "例如,一个学习语言的小孩正在无意识地、自动地、迅速地从极小的数据中发展出一个语法,一个由逻辑原则和参数组成的令人惊叹的复杂系统。这种语法可以被理解为先天的、通过基因安装的 “操作系统”的表达,它赋予了人类产生复杂句子和长篇思想的能力。当语言学家试图发展一种理论来解释为什么一种特定的语言会如此运作(“为什么这些--而不是那些--句子被认为是符合语法的?”)时,他们正在有意识地、费力地建立一种明确的语法版本,而这种语法是儿童本能地建立的,而且接触的信息最少。孩子的操作系统与机器学习程序的操作系统完全不同。\n事实上,这种程序停留在认知进化的前人类或非人类阶段。他们最深的缺陷是缺乏任何智能最关键的能力:不仅要说出现状是什么,过去是什么,将来会是什么--这就是描述和预测--而且要说出情况不是什么,什么可能和不可能是什么。这些都是解释的要素,是真正智慧的标志。\n这里有一个例子。假设你手里拿着一个苹果。现在你让苹果离开。你观察结果并说,“苹果掉下来了”。这就是一种描述。预测可能是 “如果我张开手,苹果就会掉下来 ”的说法。两者都是有价值的,而且都可能是正确的。但一个解释是更多的东西。它不仅包括描述和预测,还包括反事实的猜想,如 \"任何这样的物体都会掉下来\",再加上附加条款 “因为引力 ”或 “因为时空的曲率”或其他附加因素,而这就是一个因果解释。“如果不是因为引力,苹果就不会掉下来”。这就是思维。\n机器学习的核心是描述和预测,它没有提出任何因果机制或物理规律。当然,任何人类式的解释都不一定正确;我们是有缺陷的。但这也是思考的部分含义:要想正确,必须有可能出错。智能不仅包括创造性的猜想,也包括创造性的批评。人类式的思考是基于可能的解释和纠错,这个过程逐渐限制了可以理性考虑的可能性。(正如夏洛克-福尔摩斯对华生医生所说:“当你排除了不可能的事情后,剩下的任何事情,无论多么不可能,都必须是事实”)。", "segmentation_method": "reviewed_source_semantics", "label": "语言学习与因果解释", "source_line_range": [ 10, 13 ] }, { "id": "body-region-3", "text": "但 是 chatgpt 和 类 似 的 程 序 在 设 计 上 是 无 限 的 它 们 可 以 学 习 换 种 说 法 就 是 记 忆 它 们 没 有 能 力 区 分 可 能 和 不 可 能 例 如 与 人 类 不 同 的 是 人 类 被 赋 予 了 一 种 普 遍 语 法 它 可 以 让 我 们 以 数 学 的 形 式 去 优 雅 地 学 习 语 言 而 这 些 程 序 则 以 同 样 的 方 式 学 习 人 类 可 能 的 和 人 类 不 可 能 的 语 言 人 类 在 我 们 可 以 合 理 猜 测 的 解 释 方 面 受 到 限 制 而 机 器 学 习 系 统 可 以 学 习 地 球 是 平 的 和 地 球 是 圆 的 它 们 只 是 在 随 时 间 变 化 的 概 率 中 进 行 交 互 学 习 因 此 机 器 学 习 系 统 的 预 测 将 总 是 肤 浅 而 又 不 可 靠 的 例 如 由 于 这 些 程 序 无 法 解 释 英 语 语 法 规 则 它 们 很 可 能 错 误 地 预 测 约 翰 太 固 执 了 不 愿 意 和 他 说 话 这 意 味 着 约 翰 太 固 执 了 他 不 会 和 某 人 或 其 他 人 说 话 而 不 是 说 他 太 固 执 不 愿 意 被 人 说 理 为 什 么 机 器 学 习 程 序 会 预 测 出 如 此 奇 怪 的 事 情 因 为 它 可 能 会 把 它 从 约 翰 吃 了 一 个 苹 果 和 约 翰 吃 了 这 样 的 句 子 中 推 断 出 来 的 模 式 进 行 类 比 后 者 确 实 是 指 约 翰 吃 了 什 么 或 其 他 东 西 该 程 序 很 可 能 预 测 因 为 约 翰 太 固 执 了 不 愿 意 和 比 尔 说 话 与 约 翰 吃 了 一 个 苹 果 相 似 所 以 约 翰 太 固 执 了 不 愿 意 和 他 说 话 应 该 与 约 翰 吃 了 相 似 对 语 言 的 正 确 解 释 是 复 杂 的 不 能 仅 仅 通 过 浸 泡 在 大 数 据 中 来 学 习 反 常 的 是 一 些 机 器 学 习 爱 好 者 似 乎 很 自 豪 他 们 的 作 品 可 以 产 生 正 确 的 科 学 预 测 例 如 关 于 物 理 体 的 运 动 而 不 利 用 解 释 涉 及 例 如 牛 顿 的 运 动 定 律 和 普 遍 引 力 但 这 种 预 测 即 使 成 功 也 是 伪 科 学 虽 然 科 学 家 肯 定 会 寻 求 有 高 度 经 验 佐 证 的 理 论 但 正 如 哲 学 家 卡 尔 波 普 尔 所 指 出 的 我 们 寻 求 的 不 是 高 度 可 能 的 理 论 而 是 解 释 也 就 是 说 强 大 而 高 度 不 可 能 的 理 论 苹 果 落 到 地 球 上 是 因 为 那 是 它 们 的 自 然 位 置 亚 里 士 多 德 的 观 点 的 理 论 是 可 能 的 但 它 只 会 引 来 进 一 步 的 问 题 为 什 么 地 球 是 它 们 的 自 然 场 所 苹 果 落 到 地 上 是 因 为 质 量 使 时 空 弯 曲 的 理 论 爱 因 斯 坦 的 观 点 是 非 常 不 可 能 的 但 它 实 际 上 告 诉 你 为 什 么 它 们 会 掉 下 来 真 正 的 智 慧 表 现 在 能 够 思 考 和 表 达 不 可 能 但 有 洞 察 力 的 事 情", "source_text": "但是ChatGPT和类似的程序在设计上是无限的,它们可以“学习”(换种说法就是记忆);它们没有能力区分可能和不可能。例如,与人类不同的是,人类被赋予了一种普遍语法,它可以让我们以数学的形式去优雅地学习语言,而这些程序则以同样的方式学习人类可能的和人类不可能的语言。人类在我们可以合理猜测的解释方面受到限制,而机器学习系统可以学习地球是平的和地球是圆的。它们只是在随时间变化的概率中进行交互学习。\n因此,机器学习系统的预测将总是肤浅而又不可靠的。例如,由于这些程序无法解释英语语法规则,它们很可能错误地预测“约翰太固执了,不愿意和他说话”,这意味着约翰太固执了,他不会和某人或其他人说话(而不是说他太固执,不愿意被人说理)。为什么机器学习程序会预测出如此奇怪的事情?因为它可能会把它从 “约翰吃了一个苹果”和 “约翰吃了”这样的句子中推断出来的模式进行类比,后者确实是指约翰吃了什么或其他东西。该程序很可能预测,因为“约翰太固执了,不愿意和比尔说话”与“约翰吃了一个苹果”相似,所以“约翰太固执了,不愿意和他说话”应该与“约翰吃了”相似。对语言的正确解释是复杂的,不能仅仅通过浸泡在大数据中来学习。\n反常的是,一些机器学习爱好者似乎很自豪,他们的作品可以产生正确的“科学”预测(例如,关于物理体的运动),而不利用解释(涉及,例如,牛顿的运动定律和普遍引力)。但这种预测,即使成功,也是伪科学。虽然科学家肯定会寻求有高度经验佐证的理论,但正如哲学家卡尔-波普尔所指出的,“我们寻求的不是高度可能的理论,而是解释;也就是说,强大而高度不可能的理论”。\n苹果落到地球上是因为那是它们的自然位置(亚里士多德的观点)的理论是可能的,但它只会引来进一步的问题。(为什么地球是它们的自然场所?)苹果落到地上是因为质量使时空弯曲的理论(爱因斯坦的观点)是非常不可能的,但它实际上告诉你为什么它们会掉下来。真正的智慧表现在能够思考和表达不可能但有洞察力的事情。", "segmentation_method": "reviewed_source_semantics", "label": "预测、语言与科学解释", "source_line_range": [ 14, 17 ] }, { "id": "body-region-4", "text": "真 正 的 智 慧 还 能 够 进 行 道 德 思 考 这 意 味 着 用 一 套 道 德 原 则 来 约 束 我 们 头 脑 中 本 来 无 限 的 创 造 力 决 定 什 么 是 应 该 的 什 么 是 不 应 该 的 当 然 也 要 让 这 些 原 则 本 身 受 到 创 造 性 的 批 评 为 了 有 用 chatgpt 必 须 被 授 权 产 生 新 颖 的 输 出 为 了 被 大 多 数 用 户 接 受 它 必 须 避 免 道 德 上 令 人 反 感 的 内 容 但 chatgpt 和 其 他 机 器 学 习 奇 迹 的 程 序 员 们 已 经 在 努 力 来 实 现 这 种 平 衡 例 如 在 2016 年 微 软 的 tay 聊 天 机 器 人 chatgpt 的 前 身 在 互 联 网 上 充 斥 着 厌 恶 女 性 和 种 族 主 义 的 内 容 他 们 被 网 上 的 巨 魔 污 染 了 这 些 巨 魔 用 攻 击 性 的 训 练 数 据 填 充 它 未 来 如 何 解 决 这 个 问 题 由 于 缺 乏 从 道 德 原 则 出 发 的 推 理 能 力 chatgpt 被 其 程 序 员 粗 暴 地 限 制 了 对 有 争 议 的 也 就 是 重 要 的 讨 论 做 出 任 何 新 的 贡 献 它 为 一 种 非 道 德 性 牺 牲 了 创 造 力 请 看 watumull 博 士 最 近 与 chatgpt 的 交 流 关 于 改 造 火 星 使 其 能 够 支 持 人 类 生 命 是 否 符 合 道 德 值 得 注 意 的 是 所 有 看 似 复 杂 的 思 想 和 语 言 都 是 由 不 聪 明 而 产 生 的 道 德 上 的 冷 漠 在 这 里 chatgpt 表 现 出 类 似 于 邪 恶 的 平 庸 剽 窃 冷 漠 和 顺 从 它 以 一 种 超 级 自 动 完 成 的 方 式 总 结 了 文 献 中 的 标 准 论 点 拒 绝 在 任 何 事 情 上 采 取 立 场 不 仅 辩 称 无 知 而 且 辩 称 缺 乏 智 慧 最 终 提 供 了 一 个 只 是 服 从 命 令 的 辩 护 将 责 任 推 卸 给 它 的 创 造 者 简 而 言 之 chatgpt 及 其 同 类 产 品 在 结 构 上 无 法 平 衡 创 造 力 和 约 束 他 们 要 么 过 度 生 成 产 生 真 理 和 谬 误 认 可 道 德 和 不 道 德 的 决 定 要 么 生 成 不 足 表 现 为 不 承 诺 任 何 决 定 对 后 果 漠 不 关 心 鉴 于 这 些 系 统 的 非 道 德 性 假 科 学 性 和 语 言 上 的 无 能 我 们 对 它 们 的 流 行 只 能 哭 笑 不 得", "source_text": "真正的智慧还能够进行道德思考。这意味着用一套道德原则来约束我们头脑中本来无限的创造力,决定什么是应该的,什么是不应该的(当然也要让这些原则本身受到创造性的批评)。为了有用,ChatGPT必须被授权产生新颖的输出;为了被大多数用户接受,它必须避免道德上令人反感的内容。但ChatGPT和其他机器学习奇迹的程序员们已经在努力来实现这种平衡。\n例如,在2016年,微软的Tay聊天机器人(ChatGPT的前身)在互联网上充斥着厌恶女性和种族主义的内容,他们被网上的巨魔污染了,这些巨魔用攻击性的训练数据填充它。未来如何解决这个问题?由于缺乏从道德原则出发的推理能力,ChatGPT被其程序员粗暴地限制了对有争议的--也就是重要的--讨论做出任何新的贡献。它为一种非道德性牺牲了创造力。\n请看Watumull博士最近与ChatGPT的交流,关于改造火星使其能够支持人类生命是否符合道德。\n值得注意的是,所有看似复杂的思想和语言,都是由不聪明而产生的道德上的冷漠。在这里,ChatGPT表现出类似于邪恶的平庸:剽窃、冷漠和顺从。它以一种超级自动完成的方式总结了文献中的标准论点,拒绝在任何事情上采取立场,不仅辩称无知,而且辩称缺乏智慧,最终提供了一个“只是服从命令”的辩护,将责任推卸给它的创造者。\n简而言之,ChatGPT及其同类产品在结构上无法平衡创造力和约束。他们要么过度生成(产生真理和谬误,认可道德和不道德的决定),要么生成不足(表现为不承诺任何决定,对后果漠不关心)。鉴于这些系统的非道德性、假科学性和语言上的无能,我们对它们的流行只能哭笑不得。", "segmentation_method": "reviewed_source_semantics", "label": "道德判断与结论", "source_line_range": [ 18, 22 ] }, { "id": "body-region-5", "text": "本 文 选 自 newyork times 欢 迎 点 击 阅 读 原 文 查 看 原 文 链 接", "source_text": "本文选自NewYork Times,欢迎点击阅读原文查看原文链接。", "segmentation_method": "reviewed_source_semantics", "label": "文章来源说明", "source_line_range": [ 23, 23 ] } ], "ending": { "text": "本文选自NewYork Times,欢迎点击阅读原文查看原文链接。" } } }, { "id": "article-078", "name": "Does reading do us any good?", "url": "https://aeon.co/essays/the-role-of-literature-as-the-key-to-personal-freedom", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Does reading do us any good\\?" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Stripped of easy moralising, literature makes us relish the search for truth in an age when many believe truth to be dead" ] }, { "id": "stable-3", "alternatives": [ "Flora Champy" ] }, { "id": "stable-4", "alternatives": [ "Marina Benjamin" ] }, { "id": "stable-5", "alternatives": [ "Photo by Jeenah Moon/Reuters" ] }, { "id": "stable-6", "alternatives": [ "MENU" ] }, { "id": "stable-7", "alternatives": [ "DONATE" ] }, { "id": "stable-8", "alternatives": [ "NEWSLETTER" ] }, { "id": "stable-9", "alternatives": [ "SIGN IN" ] }, { "id": "stable-10", "alternatives": [ "Stories and literature" ] }, { "id": "stable-11", "alternatives": [ "Education" ] }, { "id": "stable-12", "alternatives": [ "Values and beliefs" ] }, { "id": "stable-13", "alternatives": [ "SYNDICATE THIS ESSAY" ] }, { "id": "stable-14", "alternatives": [ "Listen to this essay" ] }, { "id": "stable-15", "alternatives": [ "PREFER AEON ON GOOGLE" ] }, { "id": "stable-16", "alternatives": [ "Essays" ] }, { "id": "stable-17", "alternatives": [ "Videos" ] }, { "id": "stable-18", "alternatives": [ "About" ] }, { "id": "stable-19", "alternatives": [ "Contact" ] }, { "id": "stable-20", "alternatives": [ "Support" ] }, { "id": "stable-21", "alternatives": [ "RSS Feed" ] }, { "id": "stable-22", "alternatives": [ "Donate" ] }, { "id": "stable-23", "alternatives": [ "Community Guidelines" ] }, { "id": "stable-24", "alternatives": [ "Follow Aeon" ] }, { "id": "stable-25", "alternatives": [ "Sign up to our newsletter" ] }, { "id": "stable-26", "alternatives": [ "Daily" ] }, { "id": "stable-27", "alternatives": [ "Weekly" ] }, { "id": "stable-28", "alternatives": [ "Subscribe" ] }, { "id": "stable-29", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-30", "alternatives": [ "Terms of Use" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete essay, captions and pullquotes reviewed in full-page screenshot. Inline newsletter is separate from authored body; drop caps normalized without changing words. No clicks or scrolls. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Does reading do us any good?" ], "html_selector": "h1.mt-2\\.5.mb-6,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-078/comment-qualification-reference-r5.json", "sha256": "732b270a7c43fb1b52ba4a89fa3aa8740b09587ebcc42e797a9ac1d59f411f5f", "chars": 806, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Does reading turn us into better people? Does it make us more sensitive and empathetic? Does it improve our judgment? And if it is not edifying, then what good does it do? About 120 years ago, the indecisive, dilettante offspring of a wealthy physician found these questions so important that he took up his pen to argue that, no, books are never the instruments of moral betterment. He based his argument on his own memories. Though he had always been an avid reader, books, he claimed, never gave him any sort of useful, respectable instruction. That does not mean they were meaningless – far from it; they shaped his apprehension of life by preserving indelible impressions of his surroundings. Relatives now long gone, places he hadn’t seen in years – these were nevertheless still present in his mind through memories of his readings. Books helped keep past sensations alive. Literature made time tangible: something to be grasped without being abolished.\nMarcel Proust by Otto Wegener, c1895. Courtesy Wikimedia\nHindsight makes it easy to find in Marcel Proust’s essay On Reading (1905) the spark that would later flare into his multivolume novel, In Search of Lost Time (1913-27). However, his essay was not the intuition of solitary genius. Rather, it was published as a preface to the French translation of John Ruskin’s Sesame and Lilies (1865) – a cryptic title bringing together two lectures Ruskin delivered in Manchester in December 1864. Working on this text allowed Proust to realise why he deeply disagreed with an author he nevertheless admired: he resented Ruskin’s moralising defence of reading.\nIn his lectures, Ruskin bemoaned the general spiritual impoverishment of Victorian Britain, where every purpose has been ‘infected’ with ‘the idea that everything should “pay”’. The problem with this mindset, says Ruskin, is that it makes books superfluous – because genuine literacy is a training in disinterestedness, in generously reflecting on the meaning of chosen expressions. Provocatively, Ruskin describes his generation as illiterate – even in a time when education was expanding. He thought his contemporaries had lost any capacity for understanding each other or any important issue because they read superficially, and for the wrong reasons – chiefly, to get social recognition from a narrow group of peers. It was therefore, in his view, a matter of collective self-preservation to reverse course: to ‘organise, drill, maintain with pay, and good generalship, armies of thinkers, instead of armies of stabbers! …’\nTo convince his audience, Ruskin nevertheless attempts to speak the utilitarian language of his opponents – framing his argument in terms of gains and losses. He says it is ultimately a better investment if we value education as a training in close reading rather than as a point of entry into lucrative networking circles. Using a passage from John Milton’s poem ‘Lycidas’ (1637), Ruskin demonstrates how the mind encounters words on equal terms that will never apply to meetings with influential luminaries. A powerful politician, or an influential journalist, may turn out to be small-minded, dismissive or simply in a bad mood in the few moments you’re permitted an audience with them. Instead, he argues, library shelves brim with much more secure assets. There, the most powerful and smartest minds vie for the privilege of conversing with you, putting the wisdom of all ages and countries at your disposal. Books enrich and empower their readers.\nProust vigorously opposed this very idea. He found it preposterous to recommend reading as a valuable access point to a world of wisdom – akin to thinking you could access truth through ‘recommendation letters’. In response, his own defence of reading makes no concessions to the cost/benefit mindset, and owes nothing to financial or conversational analogies. In his view, it is futile to praise reading as an encounter with great minds. What happens in reading is substantially different from what happens in social life, where speech is always subject to social constraints. By contrast, a reader enjoys the utmost freedom to find the greatest writers boring, or to appreciate them for his own purposes, which may be utterly at odds with what they intended. Books do not create a higher form of conversation but instead allow for a unique ‘fruitful miracle of a communication in the midst of solitude’. Great writers do not reveal to us the admirable depth of their minds: they guide us in cultivating the ability to make sense of words, and things.\nIn this sense, books connect us with the richest part of ourselves. The meaning we attach to words as we read is uniquely connected to our experience – it can never be replicated. This is how reading becomes, in Proust’s view, the fullest, most concrete mediation to our sensations. And it allows us to expand our experience beyond all measure when it lets us enter into contact with the past. When we read age-old texts (Proust gives the examples of Racine and Saint-Simon), managing to make sense of them beyond the evolution in language and customs, we have access to nothing less than immortality.\nProust shared Ruskin’s veneration for the power of the written word. Yet they expected widely different benefits from reading. The difference in their position lies in the respective role they attribute to reader and writer. Proust considered reading as a form of ethical training rather than moral education. The ‘miracle’ of reading, in his view, does not even depend on exposure to good writing. Mediocre books and poor writers serve just as well – what matters is that, by experiencing contact with the ‘oeuvring self’ of the writer, a term Proust invoked in his essay ‘Against Sainte-Beuve’ (1895-1900), you open up your deepest self too, discovering new spheres of experience you would never have imagined or fathomed before.\nIn the second half of the 20th century, Proust’s view seemed to have largely won against Ruskin’s. The discourses that dominated critical analyses scrutinised literature for its inner qualities, setting depth or complexity of form above any direct application of the text to the reader’s experience – think of structuralists like Roland Barthes, as well as deconstructionists such as Jacques Derrida, or Stanley Fish. New Criticism, then New Historicism, differed on crucial points, but agreed on the fundamental assumption that literary appreciation was not a matter of cultivating a sense of right and wrong. The idea that reading should bring any sort of moral benefit was classed as the relic of simple-minded, well-meaning Leftism (Ruskin was a major inspiration for English socialism, despite being a staunch conservative in other respects).\nJohn Ruskin by Sir Hubert von Herkomer, 1879. Courtesy the National Portrait Gallery, London\nYet the endeavour to evangelise blue-collars by giving them access to high culture had been quite successful in its time, as Jonathan Rose has shown in The Intellectual Life of the British Working Classes (2001). In the postwar era, while fashion dictated that academic literary criticism took a distinctly anti-utilitarian approach to reading, the idea that great books positively contribute to moral education remained a driving force in public education, fulfilling a promise of social ascension for many low-middle-class families: think of the British grammar school system, or of the French sociologist Pierre Bourdieu, who owed his spectacular academic career and influence to the republican meritocracy he later denounced as elitist. This clash between the role assigned to literature in the general public and the way it was read and taught in higher education may explain the public success of advocates of the moral education to be found in great books: the two Blooms – Harold Bloom’s The Western Canon (1994) and Allan Bloom’s last book, Love and Friendship (1993) – enjoyed huge popular influence, but they also appeared as exceptions to a seemingly irresistible academic and intellectual trend.\nThese takes ultimately consider books as some sort of processed foods for thought\nIt may, then, not be that surprising to see moralising return in full force in the 21st century – offering Ruskin numerous, sometimes unexpected heirs. This can in part be explained by the digital revolution: we are much more likely to spend our leisure time with screens than with books, and online formats make it easier to focus commentary on morals rather than style. The resulting alarm over decreasing literacy has led to no shortage of zealous defences of reading, which, like most matters of opinion today, fall rather neatly along political divides. In short, conservatives praise ‘great books’ for teaching good morals and a sense of beauty, while progressives criticise the canon for its lack of representativeness, championing reading mostly as a training in empathy for underrepresented groups. In the former camp, Emily Finley, writing in The Wall Street Journal, recommends that children read ‘old’ books (pre-1940) to build up adequate protection against dangerous impulses, such as imagining that happiness can be found outside of religious and conjugal duties. On the other side, Patricia Matthew in The Atlantic advocates revisiting our definitions of what makes a ‘great’ writer – targeting Jane Austen for the conventionality of her writing as well as her ties to the transatlantic slave trade.\nThese takes ultimately consider books as some sort of processed foods for thought, telling us in advance what we are supposed to glean from what we read. Yet if you expect to find stories of domestic bliss in Greek myths, it’s likely that Medea and Clytemnestra will disappoint you. And is Madame Bovary (1856-7) such an obvious warning against escapism? Could we not rather read Gustave Flaubert’s novel, as Elena Ferrante suggested in The New Yorker in 2016, as picturing the impossible and alienating double bind that weighs on women corralled into traditional marriage and motherhood? As for the lack of representativity of the canon, it is by no means a new issue: literary history could be told as an unending series of rewritings to include a wider cast of characters. The response to flawed creation is to be more creative – as evidenced recently by Kamel Daoud’s novel The Meursault Investigation (2013) – a retelling of Albert Camus’s The Stranger (1942) from the perspective of its murdered ‘Arab’ – or Percival Everett’s James (2024), which retells Mark Twain’s Adventures of Huckleberry Finn (1884) in the words of the fugitive slave Jim.\nYet its inner contradictions do not attenuate the obdurate vitality of the moralising view of literature. Ruskin, it seems, has never been more popular – and this cannot be explained only by the role of social media in building literary reputations. I would argue that the moralising view of literature is so strong because it has deep historical roots – which we need to examine, if we want to understand what literature really is for.\nOur understanding of literature does not come out of a historical vacuum. Like it or not, we remain indebted to the Romantics’ idea that writers have social duties. As the critic and literary historian Paul Bénichou demonstrated in his classic study The Consecration of the Writer (1996), the brutal rupture with tradition occasioned by the French Revolution led counterrevolutionaries and new Romantics alike to take up the idea that writers could very well replace priests as spiritual leaders. In the modern age, poets and writers were the true seers, who could see through social appearances and predict the future awaiting the polity. The writer’s claim to authority was considered more legitimate than the old prophets’ because the writer was accountable to the public only, and not to an organised church. The writer’s mission, as outlined in Victor Hugo’s poem ‘The Poet’s Function’ (1840), was to explain difficult truths.\nThis newfangled role of the writer set at the centre of society was often expressed with a generous dose of male self-aggrandising – obfuscating for a long time the fact that the most detailed account of this new idea was elaborated by the literary critic and political theorist Anne Louise Germaine de Staël long before dashing young men filled the literary scene. In her groundbreaking work Literature Considered in Its Relation to Social Institutions (1800), Madame de Staël argued that literature was now irreversibly part and parcel of political life, and was just as influential on religion, customs and laws as it was shaped by them. Staël’s account is entirely informed by her faith in what she calls ‘the perfectibility of the human species’. Fiction, she said, actively contributes to collective improvement because it works directly on shared representations – thereby contributing to national unity. She believed that politics depended on the specificity of languages, each one bearing a world of its own in itself. Within each nation, therefore, literary fiction provides a common ground that every member of the nation can relate to, whereas real situations are either too close or too remote to allow for a secure understanding. In her words: ‘Literary criticism is often a treatise in morals’ (my translation). On that point, she’s with Ruskin.\nHowever, Staël adds another layer by emphasising the political consequences of literary appreciation. Crucially, she believed that, by sharpening the use of language, literature prepares citizens for potential participation in government – an essential feature in countries on the way to becoming more and more democratic: ‘The progress of literature, ie the perfectioning of the art of thinking and expressing our thoughts, is necessary for establishing and preserving liberty.’ In effect, Staël argued that literature sets us free by developing a non-predictable use of language, away from governmental reach.\nRousseau requires writers to ‘speak the language of the lonely’\nHer optimistic argument is almost the photographic negative of a much more critical account, developed two generations earlier by Jean-Jacques Rousseau. Rousseau’s novel Julie, or the New Heloise (1761) was one of the bestselling books of its century. It elicited an avalanche of letters from readers who were deeply moved by this long, sentimental epistolary novel. Of course, it was inspired by earlier novels – especially Samuel Richardson’s Pamela (1740) and Clarissa (1748). However, because Rousseau was also a political theorist, he fleshed out what was at stake in the public success of his novel. The preface to Julie is written in the form of a dialogue between two characters referred to only through their initials, ‘R’ and ‘N’ – standing for the author and his publisher – in which N repeatedly teases R about the propriety of his writing, the gist being: how could someone who gained fame as an austere social critic put his name on the title page of a love story?\nR’s response is unambiguous: for the usual readership – urban, educated – no reading may ever be educational. The elite will never take any book seriously – for them, reading is simply a way to assert their superiority by enjoying more sophisticated distractions than the poor. They will then simply ignore or misread the books they disagree with and commend those that confirm them in their preexisting views. On this point, Rousseau’s criticism was echoed a century later by Ruskin. Yet his response is articulated in political terms, not in moral ones. In R’s view, a writer who thinks his mission is to educate his audience must target another readership, the only one for which words may assume their full significance: provincials with ample time on their hands. In a meaningful phrase, Rousseau requires writers to ‘speak the language of the lonely’ (my translation) – that is, to work away from the witty, ever-changing expressions coined in fashionable circles. The writer thus fulfils a role in society that is different from both entertainer and priest. The writer, he says, should first and foremost see his task as a ‘citizen’: his work is not to merely preach good things, but to present a sober examination of what constitutes happiness. This task is not as simple as it seems, even among a society of good people – Julie remains famous for ending tragically even though it features no villain character.\nThe novel’s preface offers a cogent illustration of what the Rousseau scholar Christopher Kelly has named ‘literary citizenship’. It is a mark of modernity, argues Kelly, that as social values became increasingly defined in terms of transaction and profit, it was imperative to secure a currency that could escape both governmental and economic control, and literature was the way to achieve it. Literary writing could contribute to creating an alternative currency by urging caution against seemingly obvious representations of social duties and expectations that may cover up manoeuvres to alienate part of the people. In other words, literature contributes to citizens’ freedom.\nIt is then easy to see how Staël could stem from Rousseau: both considered literature as the most secure path to liberty because it freed the imagination from social conventions, and prevented language from being worn down to a series of preset transactional phrases. But where Rousseau depicts a battle against powerful dominating forces that cannot be fully checked by literature, Staël envisions a glorious future of national reconciliation.\nWhy does it even matter to recall this history? The paths to collective freedom imagined by Rousseau and Staël proceed to run alongside each other throughout the 19th century, in the age of great novels we still venerate today. They renewed and reinforced national imaginaries while also exposing social divides – in particular, class ones. Some of the most famous titles of this period embody this tension: Fyodor Dostoyevsky’s Crime and Punishment (1866), Hugo’s Les Misérables (1865), Charles Dickens’s Great Expectations (1861). These realist novels epitomise the mission of the writer to predict what awaits each nation if it allows injustice to continue. Yet, by bringing together a multitude of characters, they allowed varied readers to recognise their own participation in a collective story.\nClearly, a writer has a great deal to live up to if they’re to fulfil the role that Rousseau or Staël expected from them. Can any writer be truly faithful to the entire nation? Isn’t there a risk that they try to please a very restricted circle who claim to represent the nation as a whole? How can you reconcile the independence of language with accountability to your supposed audience? Not long after the publication of these landmark novels of the 1860s, two emerging disciplines, Émile Durkheim’s sociology and Sigmund Freud’s psychoanalysis, stripped literature of its monopoly on explaining social dynamics and affects. Literary fiction was left to explore more subterranean psychological realms and experimental formats. As a consequence, books were also left to pick, or shape, their own audiences. Writers who claimed to speak in the name of whole nations ran a greater risk of simply subjugating their pen to ready-made ideologies.\nThis was Proust’s moment. Against Ruskin’s utilitarian moralising, he saw that literature finally had the chance to be acknowledged for what belongs to it only. Literary fiction does not guide readers’ minds to an unchanging heaven of well-meaning certitudes. At best, it is an education in enjoyment; as he says in the early pages of Swann’s Way (1913): ‘beautiful things teach us to seek our pleasure elsewhere than in satisfactions deriving from wellbeing and vanity’ (my translation).\nLiterature has a purpose distinct from both political propaganda and moralistic instruction\nThis encapsulates what literature can do today. In a society largely dominated by visual entertainment, communication and performance, when fewer and fewer people read for pleasure, the idea of the writer as a spiritual beacon may seem largely outmoded. Today, people seem to turn much more willingly to therapists, experts or influencers to make sense of their lives. Yet I would argue that now may be a good moment for reconsidering the role of literature as the key to personal freedom – precisely because it is no longer the most common or most prestigious medium for interpreting experience. I tend to think of written words as much more liberating than images, which have a stronger, more direct impact on our minds, leaving their recipients with a reduced margin of action for reaction, understanding, and potential disagreement or dissociation, whereas literary language has the power to apprehend nuance so we’re less likely to fall prey to abusive false presumptions. It also allows us not to outsource the work of understanding our own experience.\nThe point is that literature has a purpose distinct from both political propaganda and moralistic instruction. Its unique, immense utility appears with greater clarity when we stop expecting grand answers from it – or, more exactly, when it deepens our experience by making us enjoy answers that are neither grand nor easy. Among today’s writers, Elena Ferrante excels at exploring these ambiguities, as exposed in the lives of contemporary women – as shown in the dark and piercingly beautiful ending of her best novel, The Lost Daughter (2006).\nThis is how literature can be political today in the deepest sense. To the extent that it remains committed to complexity, literature has the capacity to shed light on social ills with greater strength and urgency than activist discourses. Consider Neige Sinno’s memoir Sad Tiger (translated by Natasha Lehrer, 2023), which has done so much to raise awareness around incest precisely because it eschews the conventions too often marketed in today’s ‘trauma culture’. Tellingly, Sinno highlights how, in her experience, fiction proved more helpful than theory – because it ‘offers only oblique, tangential responses based on stories that aren’t real.’ Literature’s obliqueness gives readers leeway to reconstruct the meaning of a story by breaking open the alienating preset narratives our current culture is eager to sell us. Sad Tiger increases our collective responsibility for recognising – and preventing – a social ill by calling our attention to our very means of comprehending it.\nWe are not all victims of abuse. But the currently predominant economic model that relies on the harvesting of personal data and relentless advertising makes us all targets of predation. Alienating narrative patterns common to news and social media blur the distinction between fiction and reality, ingraining in us the belief that collective decisions should be taken solely to satisfy the most strident desires of whoever is in power. In these conditions, literature can fulfil the most crucial of missions: that of rebuilding a common understanding by delighting in the complexities of today’s world. Hernan Diaz’s metafiction Trust (2022) comes very close to this mark – with its four narratives that capture the curiosity of the reader, guiding them through the impact of financial operations using a wide cast of multiple characters. Everett’s James masterfully complicates Twain’s Huckleberry Finn narrative by allowing ‘Jim’ his full name and a chance to tell his own story, leading the reader through the discrepancy between his real knowledge and the stereotypical character he has to impersonate in order to survive.\nThese books (among many others) offer remarkable examples of what fine literature can do. Stripped of easy moralising, literature has the power to make us relish the search for truth, in the age when it is widely believed to be dead. This is what Proust understood when he became a writer: books teach us nothing but to partially lift ‘the veil of ugliness and insignificance that leaves us incurious before the universe’. This incomplete endeavour literally means the world.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "does reading turn us into better people does it make us more sensitive and empathetic does it improve our judgment and if it is not edifying then what good does it do about 120 years ago the indecisive dilettante offspring of a wealthy physician found these questions so important that he took up his pen to argue that no books are never the instruments of moral betterment he based his argument on his own memories though he had always been an avid reader books he claimed never gave him any sort of useful respectable instruction that does not mean they were meaningless far from it they shaped his apprehension of life by preserving indelible impressions of his surroundings relatives now long gone places he hadn t seen in years these were nevertheless still present in his mind through memories of his readings books helped keep past sensations alive literature made time tangible something to be grasped without being abolished marcel proust by otto wegener c1895 courtesy wikimedia hindsight makes it easy to find in marcel proust s essay on reading 1905 the spark that would later flare into his multivolume novel in search of lost time 1913 27 however his essay was not the intuition of solitary genius rather it was published as a preface to the french translation of john ruskin s sesame and lilies 1865 a cryptic title bringing together two lectures ruskin delivered in manchester in december 1864 working on this text allowed proust to realise why he deeply disagreed with an author he nevertheless admired he resented ruskin s moralising defence of reading in his lectures ruskin bemoaned the general spiritual impoverishment of victorian britain where every purpose has been infected with the idea that everything should pay the problem with this mindset says ruskin is that it makes books superfluous because genuine literacy is a training in disinterestedness in generously reflecting on the meaning of chosen expressions provocatively ruskin describes his generation as illiterate even in a time when education was expanding he thought his contemporaries had lost any capacity for understanding each other or any important issue because they read superficially and for the wrong reasons chiefly to get social recognition from a narrow group of peers it was therefore in his view a matter of collective self preservation to reverse course to organise drill maintain with pay and good generalship armies of thinkers instead of armies of stabbers to convince his audience ruskin nevertheless attempts to speak the utilitarian language of his opponents framing his argument in terms of gains and losses he says it is ultimately a better investment if we value education as a training in close reading rather than as a point of entry into lucrative networking circles using a passage from john milton s poem lycidas 1637 ruskin demonstrates how the mind encounters words on equal terms that will never apply to meetings with influential luminaries a powerful politician or an influential journalist may turn out to be small minded dismissive or simply in a bad mood in the few moments you re permitted an audience with them instead he argues library shelves brim with much more secure assets there the most powerful and smartest minds vie for the privilege of conversing with you putting the wisdom of all ages and countries at your disposal books enrich and empower their readers proust vigorously opposed this very idea he found it preposterous to recommend reading as a valuable access point to a world of wisdom akin to thinking you could access truth through recommendation letters in response his own defence of reading makes no concessions to the cost benefit mindset and owes nothing to financial or conversational analogies in his view it is futile to praise reading as an encounter with great minds what happens in reading is substantially different from what happens in social life where speech is always subject to social constraints by contrast a reader enjoys the utmost freedom to find the greatest writers boring or to appreciate them for his own purposes which may be utterly at odds with what they intended books do not create a higher form of conversation but instead allow for a unique fruitful miracle of a communication in the midst of solitude great writers do not reveal to us the admirable depth of their minds they guide us in cultivating the ability to make sense of words and things", "source_text": "Does reading turn us into better people? Does it make us more sensitive and empathetic? Does it improve our judgment? And if it is not edifying, then what good does it do? About 120 years ago, the indecisive, dilettante offspring of a wealthy physician found these questions so important that he took up his pen to argue that, no, books are never the instruments of moral betterment. He based his argument on his own memories. Though he had always been an avid reader, books, he claimed, never gave him any sort of useful, respectable instruction. That does not mean they were meaningless – far from it; they shaped his apprehension of life by preserving indelible impressions of his surroundings. Relatives now long gone, places he hadn’t seen in years – these were nevertheless still present in his mind through memories of his readings. Books helped keep past sensations alive. Literature made time tangible: something to be grasped without being abolished.\nMarcel Proust by Otto Wegener, c1895. Courtesy Wikimedia\nHindsight makes it easy to find in Marcel Proust’s essay On Reading (1905) the spark that would later flare into his multivolume novel, In Search of Lost Time (1913-27). However, his essay was not the intuition of solitary genius. Rather, it was published as a preface to the French translation of John Ruskin’s Sesame and Lilies (1865) – a cryptic title bringing together two lectures Ruskin delivered in Manchester in December 1864. Working on this text allowed Proust to realise why he deeply disagreed with an author he nevertheless admired: he resented Ruskin’s moralising defence of reading.\nIn his lectures, Ruskin bemoaned the general spiritual impoverishment of Victorian Britain, where every purpose has been ‘infected’ with ‘the idea that everything should “pay”’. The problem with this mindset, says Ruskin, is that it makes books superfluous – because genuine literacy is a training in disinterestedness, in generously reflecting on the meaning of chosen expressions. Provocatively, Ruskin describes his generation as illiterate – even in a time when education was expanding. He thought his contemporaries had lost any capacity for understanding each other or any important issue because they read superficially, and for the wrong reasons – chiefly, to get social recognition from a narrow group of peers. It was therefore, in his view, a matter of collective self-preservation to reverse course: to ‘organise, drill, maintain with pay, and good generalship, armies of thinkers, instead of armies of stabbers! …’\nTo convince his audience, Ruskin nevertheless attempts to speak the utilitarian language of his opponents – framing his argument in terms of gains and losses. He says it is ultimately a better investment if we value education as a training in close reading rather than as a point of entry into lucrative networking circles. Using a passage from John Milton’s poem ‘Lycidas’ (1637), Ruskin demonstrates how the mind encounters words on equal terms that will never apply to meetings with influential luminaries. A powerful politician, or an influential journalist, may turn out to be small-minded, dismissive or simply in a bad mood in the few moments you’re permitted an audience with them. Instead, he argues, library shelves brim with much more secure assets. There, the most powerful and smartest minds vie for the privilege of conversing with you, putting the wisdom of all ages and countries at your disposal. Books enrich and empower their readers.\nProust vigorously opposed this very idea. He found it preposterous to recommend reading as a valuable access point to a world of wisdom – akin to thinking you could access truth through ‘recommendation letters’. In response, his own defence of reading makes no concessions to the cost/benefit mindset, and owes nothing to financial or conversational analogies. In his view, it is futile to praise reading as an encounter with great minds. What happens in reading is substantially different from what happens in social life, where speech is always subject to social constraints. By contrast, a reader enjoys the utmost freedom to find the greatest writers boring, or to appreciate them for his own purposes, which may be utterly at odds with what they intended. Books do not create a higher form of conversation but instead allow for a unique ‘fruitful miracle of a communication in the midst of solitude’. Great writers do not reveal to us the admirable depth of their minds: they guide us in cultivating the ability to make sense of words, and things.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Does reading turn us into better people? Does it make us mor — 段落/内容单元:Proust vigorously opposed this very idea. He found it prepos", "source_line_range": [ 1, 6 ] }, { "id": "body-region-2", "text": "in this sense books connect us with the richest part of ourselves the meaning we attach to words as we read is uniquely connected to our experience it can never be replicated this is how reading becomes in proust s view the fullest most concrete mediation to our sensations and it allows us to expand our experience beyond all measure when it lets us enter into contact with the past when we read age old texts proust gives the examples of racine and saint simon managing to make sense of them beyond the evolution in language and customs we have access to nothing less than immortality proust shared ruskin s veneration for the power of the written word yet they expected widely different benefits from reading the difference in their position lies in the respective role they attribute to reader and writer proust considered reading as a form of ethical training rather than moral education the miracle of reading in his view does not even depend on exposure to good writing mediocre books and poor writers serve just as well what matters is that by experiencing contact with the oeuvring self of the writer a term proust invoked in his essay against sainte beuve 1895 1900 you open up your deepest self too discovering new spheres of experience you would never have imagined or fathomed before in the second half of the 20th century proust s view seemed to have largely won against ruskin s the discourses that dominated critical analyses scrutinised literature for its inner qualities setting depth or complexity of form above any direct application of the text to the reader s experience think of structuralists like roland barthes as well as deconstructionists such as jacques derrida or stanley fish new criticism then new historicism differed on crucial points but agreed on the fundamental assumption that literary appreciation was not a matter of cultivating a sense of right and wrong the idea that reading should bring any sort of moral benefit was classed as the relic of simple minded well meaning leftism ruskin was a major inspiration for english socialism despite being a staunch conservative in other respects john ruskin by sir hubert von herkomer 1879 courtesy the national portrait gallery london yet the endeavour to evangelise blue collars by giving them access to high culture had been quite successful in its time as jonathan rose has shown in the intellectual life of the british working classes 2001 in the postwar era while fashion dictated that academic literary criticism took a distinctly anti utilitarian approach to reading the idea that great books positively contribute to moral education remained a driving force in public education fulfilling a promise of social ascension for many low middle class families think of the british grammar school system or of the french sociologist pierre bourdieu who owed his spectacular academic career and influence to the republican meritocracy he later denounced as elitist this clash between the role assigned to literature in the general public and the way it was read and taught in higher education may explain the public success of advocates of the moral education to be found in great books the two blooms harold bloom s the western canon 1994 and allan bloom s last book love and friendship 1993 enjoyed huge popular influence but they also appeared as exceptions to a seemingly irresistible academic and intellectual trend these takes ultimately consider books as some sort of processed foods for thought it may then not be that surprising to see moralising return in full force in the 21st century offering ruskin numerous sometimes unexpected heirs this can in part be explained by the digital revolution we are much more likely to spend our leisure time with screens than with books and online formats make it easier to focus commentary on morals rather than style the resulting alarm over decreasing literacy has led to no shortage of zealous defences of reading which like most matters of opinion today fall rather neatly along political divides in short conservatives praise great books for teaching good morals and a sense of beauty while progressives criticise the canon for its lack of representativeness championing reading mostly as a training in empathy for underrepresented groups in the former camp emily finley writing in the wall street journal recommends that children read old books pre 1940 to build up adequate protection against dangerous impulses such as imagining that happiness can be found outside of religious and conjugal duties on the other side patricia matthew in the atlantic advocates revisiting our definitions of what makes a great writer targeting jane austen for the conventionality of her writing as well as her ties to the transatlantic slave trade", "source_text": "In this sense, books connect us with the richest part of ourselves. The meaning we attach to words as we read is uniquely connected to our experience – it can never be replicated. This is how reading becomes, in Proust’s view, the fullest, most concrete mediation to our sensations. And it allows us to expand our experience beyond all measure when it lets us enter into contact with the past. When we read age-old texts (Proust gives the examples of Racine and Saint-Simon), managing to make sense of them beyond the evolution in language and customs, we have access to nothing less than immortality.\nProust shared Ruskin’s veneration for the power of the written word. Yet they expected widely different benefits from reading. The difference in their position lies in the respective role they attribute to reader and writer. Proust considered reading as a form of ethical training rather than moral education. The ‘miracle’ of reading, in his view, does not even depend on exposure to good writing. Mediocre books and poor writers serve just as well – what matters is that, by experiencing contact with the ‘oeuvring self’ of the writer, a term Proust invoked in his essay ‘Against Sainte-Beuve’ (1895-1900), you open up your deepest self too, discovering new spheres of experience you would never have imagined or fathomed before.\nIn the second half of the 20th century, Proust’s view seemed to have largely won against Ruskin’s. The discourses that dominated critical analyses scrutinised literature for its inner qualities, setting depth or complexity of form above any direct application of the text to the reader’s experience – think of structuralists like Roland Barthes, as well as deconstructionists such as Jacques Derrida, or Stanley Fish. New Criticism, then New Historicism, differed on crucial points, but agreed on the fundamental assumption that literary appreciation was not a matter of cultivating a sense of right and wrong. The idea that reading should bring any sort of moral benefit was classed as the relic of simple-minded, well-meaning Leftism (Ruskin was a major inspiration for English socialism, despite being a staunch conservative in other respects).\nJohn Ruskin by Sir Hubert von Herkomer, 1879. Courtesy the National Portrait Gallery, London\nYet the endeavour to evangelise blue-collars by giving them access to high culture had been quite successful in its time, as Jonathan Rose has shown in The Intellectual Life of the British Working Classes (2001). In the postwar era, while fashion dictated that academic literary criticism took a distinctly anti-utilitarian approach to reading, the idea that great books positively contribute to moral education remained a driving force in public education, fulfilling a promise of social ascension for many low-middle-class families: think of the British grammar school system, or of the French sociologist Pierre Bourdieu, who owed his spectacular academic career and influence to the republican meritocracy he later denounced as elitist. This clash between the role assigned to literature in the general public and the way it was read and taught in higher education may explain the public success of advocates of the moral education to be found in great books: the two Blooms – Harold Bloom’s The Western Canon (1994) and Allan Bloom’s last book, Love and Friendship (1993) – enjoyed huge popular influence, but they also appeared as exceptions to a seemingly irresistible academic and intellectual trend.\nThese takes ultimately consider books as some sort of processed foods for thought\nIt may, then, not be that surprising to see moralising return in full force in the 21st century – offering Ruskin numerous, sometimes unexpected heirs. This can in part be explained by the digital revolution: we are much more likely to spend our leisure time with screens than with books, and online formats make it easier to focus commentary on morals rather than style. The resulting alarm over decreasing literacy has led to no shortage of zealous defences of reading, which, like most matters of opinion today, fall rather neatly along political divides. In short, conservatives praise ‘great books’ for teaching good morals and a sense of beauty, while progressives criticise the canon for its lack of representativeness, championing reading mostly as a training in empathy for underrepresented groups. In the former camp, Emily Finley, writing in The Wall Street Journal, recommends that children read ‘old’ books (pre-1940) to build up adequate protection against dangerous impulses, such as imagining that happiness can be found outside of religious and conjugal duties. On the other side, Patricia Matthew in The Atlantic advocates revisiting our definitions of what makes a ‘great’ writer – targeting Jane Austen for the conventionality of her writing as well as her ties to the transatlantic slave trade.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:In this sense, books connect us with the richest part of our — 段落/内容单元:It may, then, not be that surprising to see moralising retur", "source_line_range": [ 7, 13 ] }, { "id": "body-region-3", "text": "these takes ultimately consider books as some sort of processed foods for thought telling us in advance what we are supposed to glean from what we read yet if you expect to find stories of domestic bliss in greek myths it s likely that medea and clytemnestra will disappoint you and is madame bovary 1856 7 such an obvious warning against escapism could we not rather read gustave flaubert s novel as elena ferrante suggested in the new yorker in 2016 as picturing the impossible and alienating double bind that weighs on women corralled into traditional marriage and motherhood as for the lack of representativity of the canon it is by no means a new issue literary history could be told as an unending series of rewritings to include a wider cast of characters the response to flawed creation is to be more creative as evidenced recently by kamel daoud s novel the meursault investigation 2013 a retelling of albert camus s the stranger 1942 from the perspective of its murdered arab or percival everett s james 2024 which retells mark twain s adventures of huckleberry finn 1884 in the words of the fugitive slave jim yet its inner contradictions do not attenuate the obdurate vitality of the moralising view of literature ruskin it seems has never been more popular and this cannot be explained only by the role of social media in building literary reputations i would argue that the moralising view of literature is so strong because it has deep historical roots which we need to examine if we want to understand what literature really is for our understanding of literature does not come out of a historical vacuum like it or not we remain indebted to the romantics idea that writers have social duties as the critic and literary historian paul bénichou demonstrated in his classic study the consecration of the writer 1996 the brutal rupture with tradition occasioned by the french revolution led counterrevolutionaries and new romantics alike to take up the idea that writers could very well replace priests as spiritual leaders in the modern age poets and writers were the true seers who could see through social appearances and predict the future awaiting the polity the writer s claim to authority was considered more legitimate than the old prophets because the writer was accountable to the public only and not to an organised church the writer s mission as outlined in victor hugo s poem the poet s function 1840 was to explain difficult truths this newfangled role of the writer set at the centre of society was often expressed with a generous dose of male self aggrandising obfuscating for a long time the fact that the most detailed account of this new idea was elaborated by the literary critic and political theorist anne louise germaine de staël long before dashing young men filled the literary scene in her groundbreaking work literature considered in its relation to social institutions 1800 madame de staël argued that literature was now irreversibly part and parcel of political life and was just as influential on religion customs and laws as it was shaped by them staël s account is entirely informed by her faith in what she calls the perfectibility of the human species fiction she said actively contributes to collective improvement because it works directly on shared representations thereby contributing to national unity she believed that politics depended on the specificity of languages each one bearing a world of its own in itself within each nation therefore literary fiction provides a common ground that every member of the nation can relate to whereas real situations are either too close or too remote to allow for a secure understanding in her words literary criticism is often a treatise in morals my translation on that point she s with ruskin however staël adds another layer by emphasising the political consequences of literary appreciation crucially she believed that by sharpening the use of language literature prepares citizens for potential participation in government an essential feature in countries on the way to becoming more and more democratic the progress of literature ie the perfectioning of the art of thinking and expressing our thoughts is necessary for establishing and preserving liberty in effect staël argued that literature sets us free by developing a non predictable use of language away from governmental reach rousseau requires writers to speak the language of the lonely", "source_text": "These takes ultimately consider books as some sort of processed foods for thought, telling us in advance what we are supposed to glean from what we read. Yet if you expect to find stories of domestic bliss in Greek myths, it’s likely that Medea and Clytemnestra will disappoint you. And is Madame Bovary (1856-7) such an obvious warning against escapism? Could we not rather read Gustave Flaubert’s novel, as Elena Ferrante suggested in The New Yorker in 2016, as picturing the impossible and alienating double bind that weighs on women corralled into traditional marriage and motherhood? As for the lack of representativity of the canon, it is by no means a new issue: literary history could be told as an unending series of rewritings to include a wider cast of characters. The response to flawed creation is to be more creative – as evidenced recently by Kamel Daoud’s novel The Meursault Investigation (2013) – a retelling of Albert Camus’s The Stranger (1942) from the perspective of its murdered ‘Arab’ – or Percival Everett’s James (2024), which retells Mark Twain’s Adventures of Huckleberry Finn (1884) in the words of the fugitive slave Jim.\nYet its inner contradictions do not attenuate the obdurate vitality of the moralising view of literature. Ruskin, it seems, has never been more popular – and this cannot be explained only by the role of social media in building literary reputations. I would argue that the moralising view of literature is so strong because it has deep historical roots – which we need to examine, if we want to understand what literature really is for.\nOur understanding of literature does not come out of a historical vacuum. Like it or not, we remain indebted to the Romantics’ idea that writers have social duties. As the critic and literary historian Paul Bénichou demonstrated in his classic study The Consecration of the Writer (1996), the brutal rupture with tradition occasioned by the French Revolution led counterrevolutionaries and new Romantics alike to take up the idea that writers could very well replace priests as spiritual leaders. In the modern age, poets and writers were the true seers, who could see through social appearances and predict the future awaiting the polity. The writer’s claim to authority was considered more legitimate than the old prophets’ because the writer was accountable to the public only, and not to an organised church. The writer’s mission, as outlined in Victor Hugo’s poem ‘The Poet’s Function’ (1840), was to explain difficult truths.\nThis newfangled role of the writer set at the centre of society was often expressed with a generous dose of male self-aggrandising – obfuscating for a long time the fact that the most detailed account of this new idea was elaborated by the literary critic and political theorist Anne Louise Germaine de Staël long before dashing young men filled the literary scene. In her groundbreaking work Literature Considered in Its Relation to Social Institutions (1800), Madame de Staël argued that literature was now irreversibly part and parcel of political life, and was just as influential on religion, customs and laws as it was shaped by them. Staël’s account is entirely informed by her faith in what she calls ‘the perfectibility of the human species’. Fiction, she said, actively contributes to collective improvement because it works directly on shared representations – thereby contributing to national unity. She believed that politics depended on the specificity of languages, each one bearing a world of its own in itself. Within each nation, therefore, literary fiction provides a common ground that every member of the nation can relate to, whereas real situations are either too close or too remote to allow for a secure understanding. In her words: ‘Literary criticism is often a treatise in morals’ (my translation). On that point, she’s with Ruskin.\nHowever, Staël adds another layer by emphasising the political consequences of literary appreciation. Crucially, she believed that, by sharpening the use of language, literature prepares citizens for potential participation in government – an essential feature in countries on the way to becoming more and more democratic: ‘The progress of literature, ie the perfectioning of the art of thinking and expressing our thoughts, is necessary for establishing and preserving liberty.’ In effect, Staël argued that literature sets us free by developing a non-predictable use of language, away from governmental reach.\nRousseau requires writers to ‘speak the language of the lonely’", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:These takes ultimately consider books as some sort of proces — 段落/内容单元:Rousseau requires writers to ‘speak the language of the lone", "source_line_range": [ 14, 19 ] }, { "id": "body-region-4", "text": "her optimistic argument is almost the photographic negative of a much more critical account developed two generations earlier by jean jacques rousseau rousseau s novel julie or the new heloise 1761 was one of the bestselling books of its century it elicited an avalanche of letters from readers who were deeply moved by this long sentimental epistolary novel of course it was inspired by earlier novels especially samuel richardson s pamela 1740 and clarissa 1748 however because rousseau was also a political theorist he fleshed out what was at stake in the public success of his novel the preface to julie is written in the form of a dialogue between two characters referred to only through their initials r and n standing for the author and his publisher in which n repeatedly teases r about the propriety of his writing the gist being how could someone who gained fame as an austere social critic put his name on the title page of a love story r s response is unambiguous for the usual readership urban educated no reading may ever be educational the elite will never take any book seriously for them reading is simply a way to assert their superiority by enjoying more sophisticated distractions than the poor they will then simply ignore or misread the books they disagree with and commend those that confirm them in their preexisting views on this point rousseau s criticism was echoed a century later by ruskin yet his response is articulated in political terms not in moral ones in r s view a writer who thinks his mission is to educate his audience must target another readership the only one for which words may assume their full significance provincials with ample time on their hands in a meaningful phrase rousseau requires writers to speak the language of the lonely my translation that is to work away from the witty ever changing expressions coined in fashionable circles the writer thus fulfils a role in society that is different from both entertainer and priest the writer he says should first and foremost see his task as a citizen his work is not to merely preach good things but to present a sober examination of what constitutes happiness this task is not as simple as it seems even among a society of good people julie remains famous for ending tragically even though it features no villain character the novel s preface offers a cogent illustration of what the rousseau scholar christopher kelly has named literary citizenship it is a mark of modernity argues kelly that as social values became increasingly defined in terms of transaction and profit it was imperative to secure a currency that could escape both governmental and economic control and literature was the way to achieve it literary writing could contribute to creating an alternative currency by urging caution against seemingly obvious representations of social duties and expectations that may cover up manoeuvres to alienate part of the people in other words literature contributes to citizens freedom it is then easy to see how staël could stem from rousseau both considered literature as the most secure path to liberty because it freed the imagination from social conventions and prevented language from being worn down to a series of preset transactional phrases but where rousseau depicts a battle against powerful dominating forces that cannot be fully checked by literature staël envisions a glorious future of national reconciliation why does it even matter to recall this history the paths to collective freedom imagined by rousseau and staël proceed to run alongside each other throughout the 19th century in the age of great novels we still venerate today they renewed and reinforced national imaginaries while also exposing social divides in particular class ones some of the most famous titles of this period embody this tension fyodor dostoyevsky s crime and punishment 1866 hugo s les misérables 1865 charles dickens s great expectations 1861 these realist novels epitomise the mission of the writer to predict what awaits each nation if it allows injustice to continue yet by bringing together a multitude of characters they allowed varied readers to recognise their own participation in a collective story clearly a writer has a great deal to live up to if they re to fulfil the role that rousseau or staël expected from them can any writer be truly faithful to the entire nation isn t there a risk that they try to please a very restricted circle who claim to represent the nation as a whole how can you reconcile the independence of language with accountability to your supposed audience not long after the publication of these landmark novels of the 1860s two emerging disciplines émile durkheim s sociology and sigmund freud s psychoanalysis stripped literature of its monopoly on explaining social dynamics and affects literary fiction was left to explore more subterranean psychological realms and experimental formats as a consequence books were also left to pick or shape their own audiences writers who claimed to speak in the name of whole nations ran a greater risk of simply subjugating their pen to ready made ideologies", "source_text": "Her optimistic argument is almost the photographic negative of a much more critical account, developed two generations earlier by Jean-Jacques Rousseau. Rousseau’s novel Julie, or the New Heloise (1761) was one of the bestselling books of its century. It elicited an avalanche of letters from readers who were deeply moved by this long, sentimental epistolary novel. Of course, it was inspired by earlier novels – especially Samuel Richardson’s Pamela (1740) and Clarissa (1748). However, because Rousseau was also a political theorist, he fleshed out what was at stake in the public success of his novel. The preface to Julie is written in the form of a dialogue between two characters referred to only through their initials, ‘R’ and ‘N’ – standing for the author and his publisher – in which N repeatedly teases R about the propriety of his writing, the gist being: how could someone who gained fame as an austere social critic put his name on the title page of a love story?\nR’s response is unambiguous: for the usual readership – urban, educated – no reading may ever be educational. The elite will never take any book seriously – for them, reading is simply a way to assert their superiority by enjoying more sophisticated distractions than the poor. They will then simply ignore or misread the books they disagree with and commend those that confirm them in their preexisting views. On this point, Rousseau’s criticism was echoed a century later by Ruskin. Yet his response is articulated in political terms, not in moral ones. In R’s view, a writer who thinks his mission is to educate his audience must target another readership, the only one for which words may assume their full significance: provincials with ample time on their hands. In a meaningful phrase, Rousseau requires writers to ‘speak the language of the lonely’ (my translation) – that is, to work away from the witty, ever-changing expressions coined in fashionable circles. The writer thus fulfils a role in society that is different from both entertainer and priest. The writer, he says, should first and foremost see his task as a ‘citizen’: his work is not to merely preach good things, but to present a sober examination of what constitutes happiness. This task is not as simple as it seems, even among a society of good people – Julie remains famous for ending tragically even though it features no villain character.\nThe novel’s preface offers a cogent illustration of what the Rousseau scholar Christopher Kelly has named ‘literary citizenship’. It is a mark of modernity, argues Kelly, that as social values became increasingly defined in terms of transaction and profit, it was imperative to secure a currency that could escape both governmental and economic control, and literature was the way to achieve it. Literary writing could contribute to creating an alternative currency by urging caution against seemingly obvious representations of social duties and expectations that may cover up manoeuvres to alienate part of the people. In other words, literature contributes to citizens’ freedom.\nIt is then easy to see how Staël could stem from Rousseau: both considered literature as the most secure path to liberty because it freed the imagination from social conventions, and prevented language from being worn down to a series of preset transactional phrases. But where Rousseau depicts a battle against powerful dominating forces that cannot be fully checked by literature, Staël envisions a glorious future of national reconciliation.\nWhy does it even matter to recall this history? The paths to collective freedom imagined by Rousseau and Staël proceed to run alongside each other throughout the 19th century, in the age of great novels we still venerate today. They renewed and reinforced national imaginaries while also exposing social divides – in particular, class ones. Some of the most famous titles of this period embody this tension: Fyodor Dostoyevsky’s Crime and Punishment (1866), Hugo’s Les Misérables (1865), Charles Dickens’s Great Expectations (1861). These realist novels epitomise the mission of the writer to predict what awaits each nation if it allows injustice to continue. Yet, by bringing together a multitude of characters, they allowed varied readers to recognise their own participation in a collective story.\nClearly, a writer has a great deal to live up to if they’re to fulfil the role that Rousseau or Staël expected from them. Can any writer be truly faithful to the entire nation? Isn’t there a risk that they try to please a very restricted circle who claim to represent the nation as a whole? How can you reconcile the independence of language with accountability to your supposed audience? Not long after the publication of these landmark novels of the 1860s, two emerging disciplines, Émile Durkheim’s sociology and Sigmund Freud’s psychoanalysis, stripped literature of its monopoly on explaining social dynamics and affects. Literary fiction was left to explore more subterranean psychological realms and experimental formats. As a consequence, books were also left to pick, or shape, their own audiences. Writers who claimed to speak in the name of whole nations ran a greater risk of simply subjugating their pen to ready-made ideologies.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:Her optimistic argument is almost the photographic negative — 段落/内容单元:Clearly, a writer has a great deal to live up to if they’re ", "source_line_range": [ 20, 25 ] }, { "id": "body-region-5", "text": "this was proust s moment against ruskin s utilitarian moralising he saw that literature finally had the chance to be acknowledged for what belongs to it only literary fiction does not guide readers minds to an unchanging heaven of well meaning certitudes at best it is an education in enjoyment as he says in the early pages of swann s way 1913 beautiful things teach us to seek our pleasure elsewhere than in satisfactions deriving from wellbeing and vanity my translation literature has a purpose distinct from both political propaganda and moralistic instruction this encapsulates what literature can do today in a society largely dominated by visual entertainment communication and performance when fewer and fewer people read for pleasure the idea of the writer as a spiritual beacon may seem largely outmoded today people seem to turn much more willingly to therapists experts or influencers to make sense of their lives yet i would argue that now may be a good moment for reconsidering the role of literature as the key to personal freedom precisely because it is no longer the most common or most prestigious medium for interpreting experience i tend to think of written words as much more liberating than images which have a stronger more direct impact on our minds leaving their recipients with a reduced margin of action for reaction understanding and potential disagreement or dissociation whereas literary language has the power to apprehend nuance so we re less likely to fall prey to abusive false presumptions it also allows us not to outsource the work of understanding our own experience the point is that literature has a purpose distinct from both political propaganda and moralistic instruction its unique immense utility appears with greater clarity when we stop expecting grand answers from it or more exactly when it deepens our experience by making us enjoy answers that are neither grand nor easy among today s writers elena ferrante excels at exploring these ambiguities as exposed in the lives of contemporary women as shown in the dark and piercingly beautiful ending of her best novel the lost daughter 2006 this is how literature can be political today in the deepest sense to the extent that it remains committed to complexity literature has the capacity to shed light on social ills with greater strength and urgency than activist discourses consider neige sinno s memoir sad tiger translated by natasha lehrer 2023 which has done so much to raise awareness around incest precisely because it eschews the conventions too often marketed in today s trauma culture tellingly sinno highlights how in her experience fiction proved more helpful than theory because it offers only oblique tangential responses based on stories that aren t real literature s obliqueness gives readers leeway to reconstruct the meaning of a story by breaking open the alienating preset narratives our current culture is eager to sell us sad tiger increases our collective responsibility for recognising and preventing a social ill by calling our attention to our very means of comprehending it we are not all victims of abuse but the currently predominant economic model that relies on the harvesting of personal data and relentless advertising makes us all targets of predation alienating narrative patterns common to news and social media blur the distinction between fiction and reality ingraining in us the belief that collective decisions should be taken solely to satisfy the most strident desires of whoever is in power in these conditions literature can fulfil the most crucial of missions that of rebuilding a common understanding by delighting in the complexities of today s world hernan diaz s metafiction trust 2022 comes very close to this mark with its four narratives that capture the curiosity of the reader guiding them through the impact of financial operations using a wide cast of multiple characters everett s james masterfully complicates twain s huckleberry finn narrative by allowing jim his full name and a chance to tell his own story leading the reader through the discrepancy between his real knowledge and the stereotypical character he has to impersonate in order to survive these books among many others offer remarkable examples of what fine literature can do stripped of easy moralising literature has the power to make us relish the search for truth in the age when it is widely believed to be dead this is what proust understood when he became a writer books teach us nothing but to partially lift the veil of ugliness and insignificance that leaves us incurious before the universe this incomplete endeavour literally means the world", "source_text": "This was Proust’s moment. Against Ruskin’s utilitarian moralising, he saw that literature finally had the chance to be acknowledged for what belongs to it only. Literary fiction does not guide readers’ minds to an unchanging heaven of well-meaning certitudes. At best, it is an education in enjoyment; as he says in the early pages of Swann’s Way (1913): ‘beautiful things teach us to seek our pleasure elsewhere than in satisfactions deriving from wellbeing and vanity’ (my translation).\nLiterature has a purpose distinct from both political propaganda and moralistic instruction\nThis encapsulates what literature can do today. In a society largely dominated by visual entertainment, communication and performance, when fewer and fewer people read for pleasure, the idea of the writer as a spiritual beacon may seem largely outmoded. Today, people seem to turn much more willingly to therapists, experts or influencers to make sense of their lives. Yet I would argue that now may be a good moment for reconsidering the role of literature as the key to personal freedom – precisely because it is no longer the most common or most prestigious medium for interpreting experience. I tend to think of written words as much more liberating than images, which have a stronger, more direct impact on our minds, leaving their recipients with a reduced margin of action for reaction, understanding, and potential disagreement or dissociation, whereas literary language has the power to apprehend nuance so we’re less likely to fall prey to abusive false presumptions. It also allows us not to outsource the work of understanding our own experience.\nThe point is that literature has a purpose distinct from both political propaganda and moralistic instruction. Its unique, immense utility appears with greater clarity when we stop expecting grand answers from it – or, more exactly, when it deepens our experience by making us enjoy answers that are neither grand nor easy. Among today’s writers, Elena Ferrante excels at exploring these ambiguities, as exposed in the lives of contemporary women – as shown in the dark and piercingly beautiful ending of her best novel, The Lost Daughter (2006).\nThis is how literature can be political today in the deepest sense. To the extent that it remains committed to complexity, literature has the capacity to shed light on social ills with greater strength and urgency than activist discourses. Consider Neige Sinno’s memoir Sad Tiger (translated by Natasha Lehrer, 2023), which has done so much to raise awareness around incest precisely because it eschews the conventions too often marketed in today’s ‘trauma culture’. Tellingly, Sinno highlights how, in her experience, fiction proved more helpful than theory – because it ‘offers only oblique, tangential responses based on stories that aren’t real.’ Literature’s obliqueness gives readers leeway to reconstruct the meaning of a story by breaking open the alienating preset narratives our current culture is eager to sell us. Sad Tiger increases our collective responsibility for recognising – and preventing – a social ill by calling our attention to our very means of comprehending it.\nWe are not all victims of abuse. But the currently predominant economic model that relies on the harvesting of personal data and relentless advertising makes us all targets of predation. Alienating narrative patterns common to news and social media blur the distinction between fiction and reality, ingraining in us the belief that collective decisions should be taken solely to satisfy the most strident desires of whoever is in power. In these conditions, literature can fulfil the most crucial of missions: that of rebuilding a common understanding by delighting in the complexities of today’s world. Hernan Diaz’s metafiction Trust (2022) comes very close to this mark – with its four narratives that capture the curiosity of the reader, guiding them through the impact of financial operations using a wide cast of multiple characters. Everett’s James masterfully complicates Twain’s Huckleberry Finn narrative by allowing ‘Jim’ his full name and a chance to tell his own story, leading the reader through the discrepancy between his real knowledge and the stereotypical character he has to impersonate in order to survive.\nThese books (among many others) offer remarkable examples of what fine literature can do. Stripped of easy moralising, literature has the power to make us relish the search for truth, in the age when it is widely believed to be dead. This is what Proust understood when he became a writer: books teach us nothing but to partially lift ‘the veil of ugliness and insignificance that leaves us incurious before the universe’. This incomplete endeavour literally means the world.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:This was Proust’s moment. Against Ruskin’s utilitarian moral — 段落/内容单元:These books (among many others) offer remarkable examples of", "source_line_range": [ 26, 32 ] } ], "ending": { "text": " that leaves us incurious before the universe’. This incomplete endeavour literally means the world." } } }, { "id": "article-079", "name": "The Roosevelt Family Built a New York Coffee Chain 50 Years Before Starbucks", "url": "https://www.smithsonianmag.com/history/roosevelt-family-built-new-york-coffee-chain-50-years-starbucks-180953398/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The\\ Roosevelt\\ Family\\ Built\\ a\\ New\\ York\\ Coffee\\ Chain\\ 50\\ Years\\ Before\\ Starbucks" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "body-component-2", "alternatives": [ "Teddy Roosevelt’s children brought fresh-roasted beans and European coffeehouse culture to Manhattan" ] }, { "id": "body-component-3", "alternatives": [ "As Prohibition shut bars, an ad touted the family’s coffeehouse as a place to linger." ] }, { "id": "body-component-4", "alternatives": [ "Theodore Roosevelt was famously possessed of such formidable natural energy that he was known at Harvard as a" ] }, { "id": "body-component-5", "alternatives": [ "So perhaps it’s not a jolt to learn that his sons Kermit, Ted and Archie, along with daughter Ethel, her husband, and" ] }, { "id": "body-component-6", "alternatives": [ "The siblings were part of a tight-knit group who had spent their boisterous early years in the White House. Their" ] }, { "id": "body-component-7", "alternatives": [ "Meet the Roosevelts (from left): Quentin, TR, Ted, Archie, Alice, Kermit, Edith and Ethel." ] }, { "id": "body-component-8", "alternatives": [ "So by the time the Roosevelts decided to go into business together, their bond was firmly established. It was Kermit," ] }, { "id": "body-component-9", "alternatives": [ "Coffeehouses were not new to New York City, says Joshua Reyes of the Sagamore Hill National Historic Site, Theodore" ] }, { "id": "body-component-10", "alternatives": [ "At the time, the idea of encouraging customers to linger was virtually unheard of. “Do the managers really intend to" ] }, { "id": "body-component-11", "alternatives": [ "The Roosevelts’ Brazilian Coffee House opened in November 1919 in a brownstone building at 108 West 44th Street to" ] }, { "id": "body-component-12", "alternatives": [ "“Real coffee” was the boast of the house." ] }, { "id": "body-component-13", "alternatives": [ "Thirty small oak tables and chairs were grouped around the room. As an analog precursor to Starbucks’ laptop brigade," ] }, { "id": "body-component-14", "alternatives": [ "Coffee beans were roasted on the premises, then prepared at a large counter in the center of the room. The store’s" ] }, { "id": "body-component-15", "alternatives": [ "Salazar schooled customers on proper preparation with elaborate demonstrations in which he ground the coffee while they" ] }, { "id": "body-component-16", "alternatives": [ "The timing for the Roosevelts’ venture was ideal: Prohibition hit two months after opening day, and coffeehouses filled" ] }, { "id": "body-component-17", "alternatives": [ "The Brazilian Coffee House was forced to change its name in 1921. Salazar, it turned out, had once owned a Brazilian" ] }, { "id": "body-component-18", "alternatives": [ "The Double R eventually grew to four locations in New York City, all named after South American regions: the original" ] }, { "id": "body-component-19", "alternatives": [ "They ended up staying local, but the coffeehouses did achieve Philip’s wish of bringing different people together. The" ] }, { "id": "body-component-20", "alternatives": [ "Here may free souls forget the grind" ] }, { "id": "body-component-21", "alternatives": [ "Despite the chain’s success, by the end of the ’20s, the Roosevelts’ attention shifted elsewhere. In 1928, Ted Jr. and" ] }, { "id": "body-component-22", "alternatives": [ "One potential buyer was the Maxwell House company, which, according to a memorandum in Kermit’s papers at the Library" ] }, { "id": "body-component-23", "alternatives": [ "Probably not, says Heather Cole, curator of the Theodore Roosevelt Collection at Harvard’s Houghton Library. “T.R. did" ] }, { "id": "body-component-24", "alternatives": [ "In the end Maxwell House did not take over the Double R. It was bought in 1928 by a couple whose romance had begun" ] }, { "id": "body-component-25", "alternatives": [ "Unlike T.R., whose likeness would be featured in Maxwell House ads through mid-century, his relatives moved on from the" ] }, { "id": "shell-1", "alternatives": [ "Search" ] }, { "id": "shell-2", "alternatives": [ "Shop" ] }, { "id": "shell-3", "alternatives": [ "Newsletters" ] }, { "id": "shell-4", "alternatives": [ "Renew" ] }, { "id": "shell-5", "alternatives": [ "Give a Gift" ] }, { "id": "shell-6", "alternatives": [ "Subscribe" ] }, { "id": "shell-7", "alternatives": [ "Membership" ] }, { "id": "shell-8", "alternatives": [ "Jancee Dunn" ] }, { "id": "shell-9", "alternatives": [ "December 2014" ] }, { "id": "shell-10", "alternatives": [ "Share" ] }, { "id": "shell-11", "alternatives": [ "Add as preferred source" ] }, { "id": "shell-12", "alternatives": [ "You Might Also Like" ] }, { "id": "shell-13", "alternatives": [ "Get the latest History stories in your inbox." ] }, { "id": "shell-14", "alternatives": [ "Email" ] }, { "id": "shell-15", "alternatives": [ "Privacy Notice" ] }, { "id": "shell-16", "alternatives": [ "Terms & Conditions" ] }, { "id": "shell-17", "alternatives": [ "More about:" ] }, { "id": "shell-18", "alternatives": [ "Coffee" ] }, { "id": "shell-19", "alternatives": [ "Theodore Roosevelt" ] }, { "id": "shell-20", "alternatives": [ "Follow Us" ] }, { "id": "shell-21", "alternatives": [ "Explore" ] }, { "id": "shell-22", "alternatives": [ "Smart News" ] }, { "id": "shell-23", "alternatives": [ "History" ] }, { "id": "shell-24", "alternatives": [ "Science" ] }, { "id": "shell-25", "alternatives": [ "Innovation" ] }, { "id": "shell-26", "alternatives": [ "Arts & Culture" ] }, { "id": "shell-27", "alternatives": [ "Travel" ] }, { "id": "shell-28", "alternatives": [ "At the Smithsonian" ] }, { "id": "shell-29", "alternatives": [ "Photo Contest" ] }, { "id": "shell-30", "alternatives": [ "Podcast" ] }, { "id": "shell-31", "alternatives": [ "Video" ] }, { "id": "shell-32", "alternatives": [ "Subscription" ] }, { "id": "shell-33", "alternatives": [ "Manage My Account" ] }, { "id": "shell-34", "alternatives": [ "Sign Up" ] }, { "id": "shell-35", "alternatives": [ "About" ] }, { "id": "shell-36", "alternatives": [ "About Us" ] }, { "id": "shell-37", "alternatives": [ "Advertising" ] }, { "id": "shell-38", "alternatives": [ "Contact Us" ] }, { "id": "shell-39", "alternatives": [ "Content Licensing" ] }, { "id": "shell-40", "alternatives": [ "FAQ" ] }, { "id": "shell-41", "alternatives": [ "Feedback" ] }, { "id": "shell-42", "alternatives": [ "Internships & Employment" ] }, { "id": "shell-43", "alternatives": [ "Member Services" ] }, { "id": "shell-44", "alternatives": [ "Smithsonian Institution" ] }, { "id": "shell-45", "alternatives": [ "Staff" ] }, { "id": "shell-46", "alternatives": [ "Our Partners" ] }, { "id": "shell-47", "alternatives": [ "Smithsonian.com" ] }, { "id": "shell-48", "alternatives": [ "Smithsonian Store" ] }, { "id": "shell-49", "alternatives": [ "Smithsonian Journeys" ] }, { "id": "shell-50", "alternatives": [ "Smithsonian Channel" ] }, { "id": "shell-51", "alternatives": [ "Smithsonian Books" ] }, { "id": "shell-52", "alternatives": [ "Smithsonian Membership" ] }, { "id": "shell-53", "alternatives": [ "Privacy Statement" ] }, { "id": "shell-54", "alternatives": [ "Cookie Policy" ] }, { "id": "shell-55", "alternatives": [ "Terms of Use" ] }, { "id": "shell-56", "alternatives": [ "Advertising Notice" ] }, { "id": "shell-57", "alternatives": [ "Your Privacy Choices" ] }, { "id": "shell-58", "alternatives": [ "Cookie Settings" ] }, { "id": "author-biography", "alternatives": [ "Jancee Dunn is a former staff writer for Rolling Stone, for which she wrote 20 cover stories. She has also written for GQ, the New York Times, O: The Oprah Magazine and Vogue, and worked as an entertainment correspondent for \"Good Morning America.\" She also published a memoir, But Enough About Me, and helped Cyndi Lauper with her autobiography." ] } ] }, "rule_review": { "status": "reviewed", "reason": "User authorized suitable article substitutions to reach100qualified cases. Independent saved direct initial source reviewed without clicks, expansion, login or scroll. Complete originalHTML93261chars equals captured html_length. Full ordinary headline/deck, all20nonempty authored paragraph blocks (including the poem), three actual figcaptions with credits, and all four lines of quoted poem retained in source order through1928sale and final Brooklyn sentence. Direct .articleWrap geometry includes body/captions/poem and full ending without clipping or masks. NativeAX independently contains beginning, middle and ending. Top subscription promotion does not obstruct body; no clicks, expansion, scroll or login. Unpainted image pixels and control characters are not ordinary text. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Roosevelt Family Built a New York Coffee Chain 50 Years Before Starbucks" ], "html_selector": "h1.headline,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-079/comment-qualification-reference-r5.json", "sha256": "addbdd163084af8fb9d800a79d1335db82a2a51d3860bb7cc1db2318e73ec00e", "chars": 875, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "The Roosevelt Family Built a New York Coffee Chain 50 Years Before Starbucks\n\nTeddy Roosevelt’s children brought fresh-roasted beans and European coffeehouse culture to Manhattan\n\nAs Prohibition shut bars, an ad touted the family’s coffeehouse as a place to linger. Mildred and Philip Sawyer Papers / New-York Historical Society\n\nTheodore Roosevelt was famously possessed of such formidable natural energy that he was known at Harvard as a “locomotive in human pants.” But something else might have fueled his vigor. As a sickly child, he was given strong cups of coffee—along with puffs of cigar—to ease his terrible asthma attacks. As president, he was so devoted to the stuff that his huge custom coffee cup was described by one of his sons as “more in nature of a bathtub.”\n\nSo perhaps it’s not a jolt to learn that his sons Kermit, Ted and Archie, along with daughter Ethel, her husband, and TR’s cousin Philip, opened a chain of coffeehouses in New York City. Long before goateed baristas pulled single-origin shots in Brooklyn, and many decades before Brooklyn native and Starbucks mogul Howard Schultz got the idea to bring European coffee culture stateside, the Brazilian Coffee House, in Midtown Manhattan, was intended to bring quality coffee and a sociable public space to harried New Yorkers.\n\nThe siblings were part of a tight-knit group who had spent their boisterous early years in the White House. Their 43-year-old father, the youngest president to date, not only tolerated his six children’s antics but frequently encouraged them. (Although he did draw the line when a portrait of President Andrew Jackson was decorated with spitballs.) Upon hearing that his brood was planning an “attack” on the White House, he sent the children a message through the War Department advising them to call it off. Adding to the general chaos were dozens of pets, among them a small bear, a badger named Josiah, a hyena and Archie’s Shetland pony, Algonquin, who had free access to the children’s bedrooms.\n\nMeet the Roosevelts (from left): Quentin, TR, Ted, Archie, Alice, Kermit, Edith and Ethel. Print Collection, Miriam and Ira D. Wallach Division of Art, Prints and Photographs / New York Public Library, Astor, Lenox and Tilden Foundations\n\nSo by the time the Roosevelts decided to go into business together, their bond was firmly established. It was Kermit, then 29, who first pitched the idea to the others, who ranged in age from 31 to 21. Having spent a few years in South America (exploring the Amazon Basin of Brazil with his father, managing a bank in Buenos Aires), he became intrigued by the region’s coffeehouses, which not only served up fresh-ground beans but also had a much more leisurely pace than those in the States did.\n\nCoffeehouses were not new to New York City, says Joshua Reyes of the Sagamore Hill National Historic Site, Theodore Roosevelt’s former home, “but they catered to recent immigrants, or what was then called ‘more of the foreign element.’ So I think with Prohibition, they were thinking, Maybe we can cater to a more mainstream audience.”\n\nAt the time, the idea of encouraging customers to linger was virtually unheard of. “Do the managers really intend to have their patrons stay beyond the conventional period required to ‘gobble and git’?” a bemused reporter wrote in the Outlook magazine. “Apparently they do.” Using premium, fresh-ground coffee was similarly rare. Most coffee served in restaurants or at home was preground and came in a can, or, worse, was instant—a habit picked up by soldiers who had been liberally supplied with coffee powder during World War I.\n\nThe Roosevelts’ Brazilian Coffee House opened in November 1919 in a brownstone building at 108 West 44th Street to great fanfare (“Roosevelts Start Coffee House Chain; Houses Similar to the Ancient Institutions of London to be Established,” began a multitiered New York Times headline), with interior design reportedly handled by Ethel Roosevelt. The walls, papered with a green and gold print of Brazilian bamboo, were hung with portraits of celebrated coffee lovers, such as Voltaire (who allegedly downed 50 cups a day), Shakespeare and the Bull Moose himself.\n\n“Real coffee” was the boast of the house. Mildred & Philip Sawyer Papers / New-York Historical Society\n\nThirty small oak tables and chairs were grouped around the room. As an analog precursor to Starbucks’ laptop brigade, each table at the Brazilian Coffee House had a compartment furnished with ink, envelopes and paper (inscribed with “Brazilian Coffee House”). Dictionaries and encyclopedias (the free Internet of the day) were kept within reach. “What we desire to do,” Philip Roosevelt told a reporter, “is to provide a place for people to come, where they can talk, write letters, eat sandwiches and cake, and above all, drink real coffee.”\n\nCoffee beans were roasted on the premises, then prepared at a large counter in the center of the room. The store’s manager, A.M. Salazar, a young Brazilian, was an ahead-of-his-time coffee snob. He sniffed that Americans “don’t really know how to appreciate good coffee” and killed the taste by boiling it too long.\n\nSalazar schooled customers on proper preparation with elaborate demonstrations in which he ground the coffee while they waited and poured water over a “specially prepared strainer.” Like the exacting, if at times insufferable, baristas of the 21st century, he lectured them on proper temperature and roasting. Salazar also counseled against adding milk or cream, which he felt caused indigestion, but he surrendered if customers asked.\n\nThe timing for the Roosevelts’ venture was ideal: Prohibition hit two months after opening day, and coffeehouses filled the vacuum left by shuttered bars. “New York has to thank Prohibition for one blessing,” opined a writer at the Janesville (Wisconsin) Daily Gazette, “and that is the establishment of a modern coffee house, where it is possible to obtain a cup of coffee that is coffee and not tannic acid soup. It also has to thank the Roosevelt family...[for its] new and picturesque enterprise.”\n\nThe Brazilian Coffee House was forced to change its name in 1921. Salazar, it turned out, had once owned a Brazilian Coffee House on Pearl Street, and when he sold it, the new owners retained the name and served legal notice to the Roosevelts. Eager to avoid litigation, they settled instead on the Double R Coffee House, for Roosevelt and TR’s nephew Monroe Douglas Robinson, who had also joined the venture.\n\nThe Double R eventually grew to four locations in New York City, all named after South American regions: the original Brazilian branch, which moved a few doors up 44th Street, and survived a fire (TR’s widow, Edith, happened to be there, and calmly sipped her coffee as it was brought under control); an Argentine outpost; a Colombian (where thieves once tried to steal an oil portrait of TR); and an Amazon. The siblings planned on taking their chain national—Archie scouted sites in Chicago and planned similar trips to Boston and Philadelphia.\n\nThey ended up staying local, but the coffeehouses did achieve Philip’s wish of bringing different people together. The Brazilian location, in the theater district, was a favorite gathering place for actors, artists, newspapermen and musicians. Among its patrons was the then little-known purveyor of pulpy American gothic fiction, H.P. Lovecraft; his circle of friends, known as the Kalem Club, was known to frequent the Double R. Lovecraft even wrote a fevered ode, “On the Double R Coffee House.”\n\nHere may free souls forget the grind\nOf busy hour and bustling crowd\nAnd sparkling brightly mind to mind\nDisplay their inmost dreams aloud\n\nDespite the chain’s success, by the end of the ’20s, the Roosevelts’ attention shifted elsewhere. In 1928, Ted Jr. and Kermit were making complicated plans for the most Rooseveltian of expeditions, sponsored by Chicago’s Field Museum: a lengthy exploration of Indochina to collect plant and animal specimens, among them the elusive giant panda, one of which they shot (the skin endures in a museum diorama). “And in the late ’20s Ted Jr.’s political career started to take off,” Reyes points out. “So that may also be why he wanted to dump it.”\n\nOne potential buyer was the Maxwell House company, which, according to a memorandum in Kermit’s papers at the Library of Congress, made inquiries in 1927. The company had maintained a Roosevelt affiliation for years, claiming that when T.R., as president, visited Andrew Jackson’s estate near Nashville, on October 21, 1907, he took a sip of Maxwell House and declared it “good to the last drop.” “Teddy Roosevelt Gave Popular Slogan to Maxwell House Coffee,” the company boasted in what reads like sponsored content in the Southwestern Railway Journal in 1921.\n\nProbably not, says Heather Cole, curator of the Theodore Roosevelt Collection at Harvard’s Houghton Library. “T.R. did stop in Nashville in October 1907, and was a notoriously big coffee drinker,” she says. “But unfortunately, there is no reliable evidence that he did utter the phrase ‘good to the last drop.’” (Nonetheless, the website of Kraft Foods, current owner of the Maxwell House brand, cites the “legend” in its list of “fun facts” about the coffee.)\n\nIn the end Maxwell House did not take over the Double R. It was bought in 1928 by a couple whose romance had begun there five years earlier.\n\nUnlike T.R., whose likeness would be featured in Maxwell House ads through mid-century, his relatives moved on from the coffee business. New Yorkers would have to endure nearly a century of mostly mediocre coffee before that guy from Brooklyn had the new-again idea of serving good fresh-ground beans in a relaxed atmosphere.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "the roosevelt family built a new york coffee chain 50 years before starbucks", "source_text": "The Roosevelt Family Built a New York Coffee Chain 50 Years Before Starbucks", "segmentation_method": "reviewed_source_semantics", "label": "开篇:The Roosevelt Family Built a New York Coffee Chain 50 Years ", "source_line_range": [ 1, 2 ] }, { "id": "body-region-2", "text": "teddy roosevelt s children brought fresh roasted beans and european coffeehouse culture to manhattan as prohibition shut bars an ad touted the family s coffeehouse as a place to linger mildred and philip sawyer papers new york historical society theodore roosevelt was famously possessed of such formidable natural energy that he was known at harvard as a locomotive in human pants but something else might have fueled his vigor as a sickly child he was given strong cups of coffee along with puffs of cigar to ease his terrible asthma attacks as president he was so devoted to the stuff that his huge custom coffee cup was described by one of his sons as more in nature of a bathtub so perhaps it s not a jolt to learn that his sons kermit ted and archie along with daughter ethel her husband and tr s cousin philip opened a chain of coffeehouses in new york city long before goateed baristas pulled single origin shots in brooklyn and many decades before brooklyn native and starbucks mogul howard schultz got the idea to bring european coffee culture stateside the brazilian coffee house in midtown manhattan was intended to bring quality coffee and a sociable public space to harried new yorkers the siblings were part of a tight knit group who had spent their boisterous early years in the white house their 43 year old father the youngest president to date not only tolerated his six children s antics but frequently encouraged them although he did draw the line when a portrait of president andrew jackson was decorated with spitballs upon hearing that his brood was planning an attack on the white house he sent the children a message through the war department advising them to call it off adding to the general chaos were dozens of pets among them a small bear a badger named josiah a hyena and archie s shetland pony algonquin who had free access to the children s bedrooms meet the roosevelts from left quentin tr ted archie alice kermit edith and ethel print collection miriam and ira d wallach division of art prints and photographs new york public library astor lenox and tilden foundations so by the time the roosevelts decided to go into business together their bond was firmly established it was kermit then 29 who first pitched the idea to the others who ranged in age from 31 to 21 having spent a few years in south america exploring the amazon basin of brazil with his father managing a bank in buenos aires he became intrigued by the region s coffeehouses which not only served up fresh ground beans but also had a much more leisurely pace than those in the states did coffeehouses were not new to new york city says joshua reyes of the sagamore hill national historic site theodore roosevelt s former home but they catered to recent immigrants or what was then called more of the foreign element so i think with prohibition they were thinking maybe we can cater to a more mainstream audience at the time the idea of encouraging customers to linger was virtually unheard of do the managers really intend to have their patrons stay beyond the conventional period required to gobble and git a bemused reporter wrote in the outlook magazine apparently they do using premium fresh ground coffee was similarly rare most coffee served in restaurants or at home was preground and came in a can or worse was instant a habit picked up by soldiers who had been liberally supplied with coffee powder during world war i the roosevelts brazilian coffee house opened in november 1919 in a brownstone building at 108 west 44th street to great fanfare roosevelts start coffee house chain houses similar to the ancient institutions of london to be established began a multitiered new york times headline with interior design reportedly handled by ethel roosevelt the walls papered with a green and gold print of brazilian bamboo were hung with portraits of celebrated coffee lovers such as voltaire who allegedly downed 50 cups a day shakespeare and the bull moose himself real coffee was the boast of the house mildred philip sawyer papers new york historical society thirty small oak tables and chairs were grouped around the room as an analog precursor to starbucks laptop brigade each table at the brazilian coffee house had a compartment furnished with ink envelopes and paper inscribed with brazilian coffee house dictionaries and encyclopedias the free internet of the day were kept within reach what we desire to do philip roosevelt told a reporter is to provide a place for people to come where they can talk write letters eat sandwiches and cake and above all drink real coffee coffee beans were roasted on the premises then prepared at a large counter in the center of the room the store s manager a m salazar a young brazilian was an ahead of his time coffee snob he sniffed that americans don t really know how to appreciate good coffee and killed the taste by boiling it too long salazar schooled customers on proper preparation with elaborate demonstrations in which he ground the coffee while they waited and poured water over a specially prepared strainer like the exacting if at times insufferable baristas of the 21st century he lectured them on proper temperature and roasting salazar also counseled against adding milk or cream which he felt caused indigestion but he surrendered if customers asked the timing for the roosevelts venture was ideal prohibition hit two months after opening day and coffeehouses filled the vacuum left by shuttered bars new york has to thank prohibition for one blessing opined a writer at the janesville wisconsin daily gazette and that is the establishment of a modern coffee house where it is possible to obtain a cup of coffee that is coffee and not tannic acid soup it also has to thank the roosevelt family for its new and picturesque enterprise the brazilian coffee house was forced to change its name in 1921 salazar it turned out had once owned a brazilian coffee house on pearl street and when he sold it the new owners retained the name and served legal notice to the roosevelts eager to avoid litigation they settled instead on the double r coffee house for roosevelt and tr s nephew monroe douglas robinson who had also joined the venture the double r eventually grew to four locations in new york city all named after south american regions the original brazilian branch which moved a few doors up 44th street and survived a fire tr s widow edith happened to be there and calmly sipped her coffee as it was brought under control an argentine outpost a colombian where thieves once tried to steal an oil portrait of tr and an amazon the siblings planned on taking their chain national archie scouted sites in chicago and planned similar trips to boston and philadelphia they ended up staying local but the coffeehouses did achieve philip s wish of bringing different people together the brazilian location in the theater district was a favorite gathering place for actors artists newspapermen and musicians among its patrons was the then little known purveyor of pulpy american gothic fiction h p lovecraft his circle of friends known as the kalem club was known to frequent the double r lovecraft even wrote a fevered ode on the double r coffee house here may free souls forget the grind of busy hour and bustling crowd and sparkling brightly mind to mind display their inmost dreams aloud despite the chain s success by the end of the 20s the roosevelts attention shifted elsewhere in 1928 ted jr and kermit were making complicated plans for the most rooseveltian of expeditions sponsored by chicago s field museum a lengthy exploration of indochina to collect plant and animal specimens among them the elusive giant panda one of which they shot the skin endures in a museum diorama and in the late 20s ted jr s political career started to take off reyes points out so that may also be why he wanted to dump it one potential buyer was the maxwell house company which according to a memorandum in kermit s papers at the library of congress made inquiries in 1927 the company had maintained a roosevelt affiliation for years claiming that when t r as president visited andrew jackson s estate near nashville on october 21 1907 he took a sip of maxwell house and declared it good to the last drop teddy roosevelt gave popular slogan to maxwell house coffee the company boasted in what reads like sponsored content in the southwestern railway journal in 1921 probably not says heather cole curator of the theodore roosevelt collection at harvard s houghton library t r did stop in nashville in october 1907 and was a notoriously big coffee drinker she says but unfortunately there is no reliable evidence that he did utter the phrase good to the last drop nonetheless the website of kraft foods current owner of the maxwell house brand cites the legend in its list of fun facts about the coffee in the end maxwell house did not take over the double r it was bought in 1928 by a couple whose romance had begun there five years earlier unlike t r whose likeness would be featured in maxwell house ads through mid century his relatives moved on from the coffee business new yorkers would have to endure nearly a century of mostly mediocre coffee before that guy from brooklyn had the new again idea of serving good fresh ground beans in a relaxed atmosphere", "source_text": "Teddy Roosevelt’s children brought fresh-roasted beans and European coffeehouse culture to Manhattan\n\nAs Prohibition shut bars, an ad touted the family’s coffeehouse as a place to linger. Mildred and Philip Sawyer Papers / New-York Historical Society\n\nTheodore Roosevelt was famously possessed of such formidable natural energy that he was known at Harvard as a “locomotive in human pants.” But something else might have fueled his vigor. As a sickly child, he was given strong cups of coffee—along with puffs of cigar—to ease his terrible asthma attacks. As president, he was so devoted to the stuff that his huge custom coffee cup was described by one of his sons as “more in nature of a bathtub.”\n\nSo perhaps it’s not a jolt to learn that his sons Kermit, Ted and Archie, along with daughter Ethel, her husband, and TR’s cousin Philip, opened a chain of coffeehouses in New York City. Long before goateed baristas pulled single-origin shots in Brooklyn, and many decades before Brooklyn native and Starbucks mogul Howard Schultz got the idea to bring European coffee culture stateside, the Brazilian Coffee House, in Midtown Manhattan, was intended to bring quality coffee and a sociable public space to harried New Yorkers.\n\nThe siblings were part of a tight-knit group who had spent their boisterous early years in the White House. Their 43-year-old father, the youngest president to date, not only tolerated his six children’s antics but frequently encouraged them. (Although he did draw the line when a portrait of President Andrew Jackson was decorated with spitballs.) Upon hearing that his brood was planning an “attack” on the White House, he sent the children a message through the War Department advising them to call it off. Adding to the general chaos were dozens of pets, among them a small bear, a badger named Josiah, a hyena and Archie’s Shetland pony, Algonquin, who had free access to the children’s bedrooms.\n\nMeet the Roosevelts (from left): Quentin, TR, Ted, Archie, Alice, Kermit, Edith and Ethel. Print Collection, Miriam and Ira D. Wallach Division of Art, Prints and Photographs / New York Public Library, Astor, Lenox and Tilden Foundations\n\nSo by the time the Roosevelts decided to go into business together, their bond was firmly established. It was Kermit, then 29, who first pitched the idea to the others, who ranged in age from 31 to 21. Having spent a few years in South America (exploring the Amazon Basin of Brazil with his father, managing a bank in Buenos Aires), he became intrigued by the region’s coffeehouses, which not only served up fresh-ground beans but also had a much more leisurely pace than those in the States did.\n\nCoffeehouses were not new to New York City, says Joshua Reyes of the Sagamore Hill National Historic Site, Theodore Roosevelt’s former home, “but they catered to recent immigrants, or what was then called ‘more of the foreign element.’ So I think with Prohibition, they were thinking, Maybe we can cater to a more mainstream audience.”\n\nAt the time, the idea of encouraging customers to linger was virtually unheard of. “Do the managers really intend to have their patrons stay beyond the conventional period required to ‘gobble and git’?” a bemused reporter wrote in the Outlook magazine. “Apparently they do.” Using premium, fresh-ground coffee was similarly rare. Most coffee served in restaurants or at home was preground and came in a can, or, worse, was instant—a habit picked up by soldiers who had been liberally supplied with coffee powder during World War I.\n\nThe Roosevelts’ Brazilian Coffee House opened in November 1919 in a brownstone building at 108 West 44th Street to great fanfare (“Roosevelts Start Coffee House Chain; Houses Similar to the Ancient Institutions of London to be Established,” began a multitiered New York Times headline), with interior design reportedly handled by Ethel Roosevelt. The walls, papered with a green and gold print of Brazilian bamboo, were hung with portraits of celebrated coffee lovers, such as Voltaire (who allegedly downed 50 cups a day), Shakespeare and the Bull Moose himself.\n\n“Real coffee” was the boast of the house. Mildred & Philip Sawyer Papers / New-York Historical Society\n\nThirty small oak tables and chairs were grouped around the room. As an analog precursor to Starbucks’ laptop brigade, each table at the Brazilian Coffee House had a compartment furnished with ink, envelopes and paper (inscribed with “Brazilian Coffee House”). Dictionaries and encyclopedias (the free Internet of the day) were kept within reach. “What we desire to do,” Philip Roosevelt told a reporter, “is to provide a place for people to come, where they can talk, write letters, eat sandwiches and cake, and above all, drink real coffee.”\n\nCoffee beans were roasted on the premises, then prepared at a large counter in the center of the room. The store’s manager, A.M. Salazar, a young Brazilian, was an ahead-of-his-time coffee snob. He sniffed that Americans “don’t really know how to appreciate good coffee” and killed the taste by boiling it too long.\n\nSalazar schooled customers on proper preparation with elaborate demonstrations in which he ground the coffee while they waited and poured water over a “specially prepared strainer.” Like the exacting, if at times insufferable, baristas of the 21st century, he lectured them on proper temperature and roasting. Salazar also counseled against adding milk or cream, which he felt caused indigestion, but he surrendered if customers asked.\n\nThe timing for the Roosevelts’ venture was ideal: Prohibition hit two months after opening day, and coffeehouses filled the vacuum left by shuttered bars. “New York has to thank Prohibition for one blessing,” opined a writer at the Janesville (Wisconsin) Daily Gazette, “and that is the establishment of a modern coffee house, where it is possible to obtain a cup of coffee that is coffee and not tannic acid soup. It also has to thank the Roosevelt family...[for its] new and picturesque enterprise.”\n\nThe Brazilian Coffee House was forced to change its name in 1921. Salazar, it turned out, had once owned a Brazilian Coffee House on Pearl Street, and when he sold it, the new owners retained the name and served legal notice to the Roosevelts. Eager to avoid litigation, they settled instead on the Double R Coffee House, for Roosevelt and TR’s nephew Monroe Douglas Robinson, who had also joined the venture.\n\nThe Double R eventually grew to four locations in New York City, all named after South American regions: the original Brazilian branch, which moved a few doors up 44th Street, and survived a fire (TR’s widow, Edith, happened to be there, and calmly sipped her coffee as it was brought under control); an Argentine outpost; a Colombian (where thieves once tried to steal an oil portrait of TR); and an Amazon. The siblings planned on taking their chain national—Archie scouted sites in Chicago and planned similar trips to Boston and Philadelphia.\n\nThey ended up staying local, but the coffeehouses did achieve Philip’s wish of bringing different people together. The Brazilian location, in the theater district, was a favorite gathering place for actors, artists, newspapermen and musicians. Among its patrons was the then little-known purveyor of pulpy American gothic fiction, H.P. Lovecraft; his circle of friends, known as the Kalem Club, was known to frequent the Double R. Lovecraft even wrote a fevered ode, “On the Double R Coffee House.”\n\nHere may free souls forget the grind\nOf busy hour and bustling crowd\nAnd sparkling brightly mind to mind\nDisplay their inmost dreams aloud\n\nDespite the chain’s success, by the end of the ’20s, the Roosevelts’ attention shifted elsewhere. In 1928, Ted Jr. and Kermit were making complicated plans for the most Rooseveltian of expeditions, sponsored by Chicago’s Field Museum: a lengthy exploration of Indochina to collect plant and animal specimens, among them the elusive giant panda, one of which they shot (the skin endures in a museum diorama). “And in the late ’20s Ted Jr.’s political career started to take off,” Reyes points out. “So that may also be why he wanted to dump it.”\n\nOne potential buyer was the Maxwell House company, which, according to a memorandum in Kermit’s papers at the Library of Congress, made inquiries in 1927. The company had maintained a Roosevelt affiliation for years, claiming that when T.R., as president, visited Andrew Jackson’s estate near Nashville, on October 21, 1907, he took a sip of Maxwell House and declared it “good to the last drop.” “Teddy Roosevelt Gave Popular Slogan to Maxwell House Coffee,” the company boasted in what reads like sponsored content in the Southwestern Railway Journal in 1921.\n\nProbably not, says Heather Cole, curator of the Theodore Roosevelt Collection at Harvard’s Houghton Library. “T.R. did stop in Nashville in October 1907, and was a notoriously big coffee drinker,” she says. “But unfortunately, there is no reliable evidence that he did utter the phrase ‘good to the last drop.’” (Nonetheless, the website of Kraft Foods, current owner of the Maxwell House brand, cites the “legend” in its list of “fun facts” about the coffee.)\n\nIn the end Maxwell House did not take over the Double R. It was bought in 1928 by a couple whose romance had begun there five years earlier.\n\nUnlike T.R., whose likeness would be featured in Maxwell House ads through mid-century, his relatives moved on from the coffee business. New Yorkers would have to endure nearly a century of mostly mediocre coffee before that guy from Brooklyn had the new-again idea of serving good fresh-ground beans in a relaxed atmosphere.", "segmentation_method": "reviewed_source_semantics", "label": "Teddy Roosevelt’s children brought fresh-roasted beans and European coffeehouse culture to Manhattan", "source_line_range": [ 3, 52 ] } ], "ending": { "text": " coffee before that guy from Brooklyn had the new-again idea of serving good fresh-ground beans in a relaxed atmosphere." } } }, { "id": "article-080", "name": "How an octopus’s cleverness may have evolved", "url": "https://www.sciencenews.org/article/how-octopuss-cleverness-may-have-evolved", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How an octopus’s cleverness may have evolved" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "DNA analysis shows cephalopod makes wide variety of same proteins that spur nervous system development in mammals" ] }, { "id": "stable-3", "alternatives": [ "CLEVER CRITTER" ] }, { "id": "stable-4", "alternatives": [ "The genome of the California two-spot octopus may reveal why it’s so smart." ] }, { "id": "stable-5", "alternatives": [ "NATHAN RUPERT/FLICKR" ] }, { "id": "stable-6", "alternatives": [ "Sarah Schwartz" ] }, { "id": "stable-7", "alternatives": [ "Subscribe today" ] }, { "id": "stable-8", "alternatives": [ "Every print subscription comes with full digital access" ] }, { "id": "stable-9", "alternatives": [ "SUBSCRIBE NOW" ] }, { "id": "stable-10", "alternatives": [ "MAGAZINE" ] }, { "id": "stable-11", "alternatives": [ "MENU" ] }, { "id": "stable-12", "alternatives": [ "ABOUT" ] }, { "id": "stable-13", "alternatives": [ "SN EXPLORES" ] }, { "id": "stable-14", "alternatives": [ "OUR STORE" ] }, { "id": "stable-15", "alternatives": [ "SIGN IN" ] }, { "id": "stable-16", "alternatives": [ "DONATE" ] }, { "id": "stable-17", "alternatives": [ "INDEPENDENT JOURNALISM SINCE 1921" ] }, { "id": "stable-18", "alternatives": [ "ALL TOPICS" ] }, { "id": "stable-19", "alternatives": [ "HEALTH" ] }, { "id": "stable-20", "alternatives": [ "HUMANS" ] }, { "id": "stable-21", "alternatives": [ "LIFE" ] }, { "id": "stable-22", "alternatives": [ "EARTH" ] }, { "id": "stable-23", "alternatives": [ "PHYSICS" ] }, { "id": "stable-24", "alternatives": [ "SPACE" ] }, { "id": "stable-25", "alternatives": [ "NEWS" ] }, { "id": "stable-26", "alternatives": [ "GENETICS" ] }, { "id": "stable-27", "alternatives": [ "SHARE" ] }, { "id": "stable-28", "alternatives": [ "Popular Stories" ] }, { "id": "stable-29", "alternatives": [ "More Stories from Science News on Genetics" ] }, { "id": "stable-30", "alternatives": [ "Science News Explores" ] }, { "id": "stable-31", "alternatives": [ "Science News Learning" ] }, { "id": "stable-32", "alternatives": [ "SUBSCRIBER SERVICES" ] }, { "id": "stable-33", "alternatives": [ "Subscribe" ] }, { "id": "stable-34", "alternatives": [ "Renew" ] }, { "id": "stable-35", "alternatives": [ "Give a Gift Subscription" ] }, { "id": "stable-36", "alternatives": [ "Customer Service" ] }, { "id": "stable-37", "alternatives": [ "MORE INFORMATION" ] }, { "id": "stable-38", "alternatives": [ "FAQ" ] }, { "id": "stable-39", "alternatives": [ "Newsletters" ] }, { "id": "stable-40", "alternatives": [ "Rights & Permissions" ] }, { "id": "stable-41", "alternatives": [ "Advertise" ] }, { "id": "stable-42", "alternatives": [ "Contact" ] }, { "id": "stable-43", "alternatives": [ "SOCIETY FOR SCIENCE" ] }, { "id": "stable-44", "alternatives": [ "About the Society" ] }, { "id": "stable-45", "alternatives": [ "Society Store" ] }, { "id": "stable-46", "alternatives": [ "Donate" ] }, { "id": "stable-47", "alternatives": [ "Careers" ] }, { "id": "stable-48", "alternatives": [ "Terms of Service" ] }, { "id": "stable-49", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-50", "alternatives": [ "Do Not Sell or Share My Personal Information" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete six-paragraph report and original citation plus editorial notes reviewed in full-page screenshot. Hero caption/credit bound separately as mandatory stable groups. No wall, expansion or interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How an octopus’s cleverness may have evolved" ], "html_selector": "h1.header-default__title___ychM4,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-080/comment-qualification-reference-r5.json", "sha256": "940d09c62a42be2e3a3bc364860907e8ce87044b342c892ee8b664ddded09b79", "chars": 806, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Octopuses and mammals may come by their smarts in a similar way.\n\nThe California two-spot octopus (Octopus bimaculoides) has similar nervous system development genes as those found in intelligent vertebrates like humans, researchers report in the Aug. 13 Nature. The first complete analysis of the octopus’s genome reveals genetic reorganizations that separate the brainy, complex octopus from its simpler relatives.\n\nOctopuses wow scientists with their ability to learn and solve problems. Researchers knew that the animal had a larger genome than “dumber” mollusks, like snails or shellfish, says study author Daniel Rokhsar, an evolutionary biologist at the University of California, Berkeley and the Okinawa Institute of Science and Technology in Japan. The octopus’s genome largely contains the same basic material as other mollusks, Rokhsar and colleagues found, but specific groups of octopus genes have been duplicated and rearranged.\n\nOne highly copied group of genes contain instructions for making protocadherin proteins. Having a greater variety of these proteins, which play a role in nervous system development, enables the construction of more complex neural networks, Rokhsar says. While limpets and oysters have around 20 protocadherin genes, the researchers found that the octopus has 168. Mammals also produce a large variety of protocadherins, but use fewer genes to do so. Octopuses and vertebrates may have evolved completely different mechanisms to achieve diversity in these proteins, says Jan Strugnell, an evolutionary biologist at La Trobe University in Melbourne, Australia.\n\nThe study also revealed thousands of genes found only in octopuses, squid and other cephalopods. Some of these genes are involved with the octopus’s color-changing abilities, but it’s unclear what many others do, Rokhsar says.\n\nThe new study provides crucial information needed to understand octopus evolution, Strugnell says. Rokhsar says the researchers now want to analyze the genomes of other species of octopus and squid. \n\nQuestions or comments on this article? E-mail us at feedback@sciencenews.org | Reprints FAQ\n\nA version of this article appears in the September 19, 2015 issue of Science News.\n\nCITATIONS\n\nC.B. Albertin et al. The octopus genome and the evolution of cephalopod neural and morphological novelties. Nature. Vol. 524, August 13, 2015, p. 220. doi: 10.1038/nature14668.\n\nTHANK YOU. This article was made possible with the support of Science News subscribers, Society for Science members, and our institutional partners. To learn more about how you can support Society for Science please visit – Get Involved.\n\nScience News Media Group retains complete independence for its editorial content.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 2, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "octopuses and mammals may come by their smarts in a similar way the california two spot octopus octopus bimaculoides has similar nervous system development genes as those found in intelligent vertebrates like humans researchers report in the aug 13 nature the first complete analysis of the octopus s genome reveals genetic reorganizations that separate the brainy complex octopus from its simpler relatives octopuses wow scientists with their ability to learn and solve problems researchers knew that the animal had a larger genome than dumber mollusks like snails or shellfish says study author daniel rokhsar an evolutionary biologist at the university of california berkeley and the okinawa institute of science and technology in japan the octopus s genome largely contains the same basic material as other mollusks rokhsar and colleagues found but specific groups of octopus genes have been duplicated and rearranged one highly copied group of genes contain instructions for making protocadherin proteins having a greater variety of these proteins which play a role in nervous system development enables the construction of more complex neural networks rokhsar says while limpets and oysters have around 20 protocadherin genes the researchers found that the octopus has 168 mammals also produce a large variety of protocadherins but use fewer genes to do so octopuses and vertebrates may have evolved completely different mechanisms to achieve diversity in these proteins says jan strugnell an evolutionary biologist at la trobe university in melbourne australia the study also revealed thousands of genes found only in octopuses squid and other cephalopods some of these genes are involved with the octopus s color changing abilities but it s unclear what many others do rokhsar says the new study provides crucial information needed to understand octopus evolution strugnell says rokhsar says the researchers now want to analyze the genomes of other species of octopus and squid questions or comments on this article e mail us at feedback sciencenews org reprints faq a version of this article appears in the september 19 2015 issue of science news", "source_text": "Octopuses and mammals may come by their smarts in a similar way.\n\nThe California two-spot octopus (Octopus bimaculoides) has similar nervous system development genes as those found in intelligent vertebrates like humans, researchers report in the Aug. 13 Nature. The first complete analysis of the octopus’s genome reveals genetic reorganizations that separate the brainy, complex octopus from its simpler relatives.\n\nOctopuses wow scientists with their ability to learn and solve problems. Researchers knew that the animal had a larger genome than “dumber” mollusks, like snails or shellfish, says study author Daniel Rokhsar, an evolutionary biologist at the University of California, Berkeley and the Okinawa Institute of Science and Technology in Japan. The octopus’s genome largely contains the same basic material as other mollusks, Rokhsar and colleagues found, but specific groups of octopus genes have been duplicated and rearranged.\n\nOne highly copied group of genes contain instructions for making protocadherin proteins. Having a greater variety of these proteins, which play a role in nervous system development, enables the construction of more complex neural networks, Rokhsar says. While limpets and oysters have around 20 protocadherin genes, the researchers found that the octopus has 168. Mammals also produce a large variety of protocadherins, but use fewer genes to do so. Octopuses and vertebrates may have evolved completely different mechanisms to achieve diversity in these proteins, says Jan Strugnell, an evolutionary biologist at La Trobe University in Melbourne, Australia.\n\nThe study also revealed thousands of genes found only in octopuses, squid and other cephalopods. Some of these genes are involved with the octopus’s color-changing abilities, but it’s unclear what many others do, Rokhsar says.\n\nThe new study provides crucial information needed to understand octopus evolution, Strugnell says. Rokhsar says the researchers now want to analyze the genomes of other species of octopus and squid. \n\nQuestions or comments on this article? E-mail us at feedback@sciencenews.org | Reprints FAQ\n\nA version of this article appears in the September 19, 2015 issue of Science News.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Octopuses and mammals may come by their smarts in a similar ", "source_line_range": [ 1, 16 ] }, { "id": "body-region-2", "text": "citations c b albertin et al the octopus genome and the evolution of cephalopod neural and morphological novelties nature vol 524 august 13 2015 p 220 doi 10 1038 nature14668 thank you this article was made possible with the support of science news subscribers society for science members and our institutional partners to learn more about how you can support society for science please visit get involved science news media group retains complete independence for its editorial content", "source_text": "CITATIONS\n\nC.B. Albertin et al. The octopus genome and the evolution of cephalopod neural and morphological novelties. Nature. Vol. 524, August 13, 2015, p. 220. doi: 10.1038/nature14668.\n\nTHANK YOU. This article was made possible with the support of Science News subscribers, Society for Science members, and our institutional partners. To learn more about how you can support Society for Science please visit – Get Involved.\n\nScience News Media Group retains complete independence for its editorial content.", "segmentation_method": "reviewed_source_semantics", "label": "Citations", "source_line_range": [ 17, 23 ] } ], "ending": { "text": "t – Get Involved.\n\nScience News Media Group retains complete independence for its editorial content." } } }, { "id": "article-081", "name": "The short history of global living conditions", "url": "https://ourworldindata.org/a-history-of-global-living-conditions", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The\\ short\\ history\\ of\\ global\\ living\\ conditions\\ and\\ why\\ it\\ matters\\ that\\ we\\ know\\ it" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Max Roser" ] }, { "id": "stable-3", "alternatives": [ "Originally published on December 14, 2016 (last partial update and revision in February 2024)" ] }, { "id": "stable-4", "alternatives": [ "Cite this article" ] }, { "id": "stable-5", "alternatives": [ "Home" ] }, { "id": "stable-6", "alternatives": [ "Our World in Data" ] }, { "id": "stable-7", "alternatives": [ "Browse by topic" ] }, { "id": "stable-8", "alternatives": [ "Data" ] }, { "id": "stable-9", "alternatives": [ "Latest" ] }, { "id": "stable-10", "alternatives": [ "Resources" ] }, { "id": "stable-11", "alternatives": [ "About" ] }, { "id": "stable-12", "alternatives": [ "Donate" ] }, { "id": "stable-13", "alternatives": [ "Poverty" ] }, { "id": "stable-14", "alternatives": [ "Literacy" ] }, { "id": "stable-15", "alternatives": [ "Health" ] }, { "id": "stable-16", "alternatives": [ "Freedom" ] }, { "id": "stable-17", "alternatives": [ "Population" ] }, { "id": "stable-18", "alternatives": [ "Education" ] }, { "id": "stable-19", "alternatives": [ "Why do we not know how our world is changing?" ] }, { "id": "stable-20", "alternatives": [ "Why it matters that we do not know how our world is changing" ] }, { "id": "stable-21", "alternatives": [ "The world as 100 people over the last two centuries" ] }, { "id": "stable-22", "alternatives": [ "Download" ] }, { "id": "stable-23", "alternatives": [ "Subscribe to our newsletters" ] }, { "id": "stable-24", "alternatives": [ "We send two regular newsletters so you can stay up to date on our work and receive curated highlights from across Our World in Data." ] }, { "id": "stable-25", "alternatives": [ "Subscribe" ] }, { "id": "stable-26", "alternatives": [ "Endnotes" ] }, { "id": "stable-27", "alternatives": [ "Cite this work" ] }, { "id": "stable-28", "alternatives": [ "BibTeX citation" ] }, { "id": "stable-29", "alternatives": [ "Past versions" ] }, { "id": "stable-30", "alternatives": [ "Browse past versions" ] }, { "id": "stable-31", "alternatives": [ "Reuse this work freely" ] }, { "id": "stable-32", "alternatives": [ "Our World in Data is free and accessible for everyone." ] }, { "id": "stable-33", "alternatives": [ "Help us do this work by making a donation." ] }, { "id": "stable-34", "alternatives": [ "Donate now" ] }, { "id": "stable-35", "alternatives": [ "Our World in Data is a project of Global Change Data Lab , a nonprofit based in the UK (Reg. Charity No. 1186433). Our charts, articles, and data are licensed under CC BY , unless stated otherwise. The source code for our tools and software is made publicly available for transparency and educational reference under a custom license . Re-use requires permission. Third-party materials, including some charts and data, are subject to third-party licenses. See our FAQs for more details." ] }, { "id": "stable-36", "alternatives": [ "Global Change Data Lab" ] }, { "id": "stable-37", "alternatives": [ "CC BY" ] }, { "id": "stable-38", "alternatives": [ "custom license" ] }, { "id": "stable-39", "alternatives": [ "FAQs" ] }, { "id": "stable-40", "alternatives": [ "Explore" ] }, { "id": "stable-41", "alternatives": [ "Topics" ] }, { "id": "stable-42", "alternatives": [ "Data Insights" ] }, { "id": "stable-43", "alternatives": [ "SDG Tracker" ] }, { "id": "stable-44", "alternatives": [ "Teaching with OWID" ] }, { "id": "stable-45", "alternatives": [ "About us" ] }, { "id": "stable-46", "alternatives": [ "Organization" ] }, { "id": "stable-47", "alternatives": [ "Funding" ] }, { "id": "stable-48", "alternatives": [ "Team" ] }, { "id": "stable-49", "alternatives": [ "Jobs" ] }, { "id": "stable-50", "alternatives": [ "RSS Feeds" ] }, { "id": "stable-51", "alternatives": [ "Research & Writing" ] }, { "id": "stable-52", "alternatives": [ "Follow us" ] }, { "id": "stable-53", "alternatives": [ "Privacy policy" ] }, { "id": "stable-54", "alternatives": [ "Cookie notice" ] }, { "id": "stable-55", "alternatives": [ "Legal disclaimer" ] }, { "id": "stable-56", "alternatives": [ "Grapher license" ] }, { "id": "stable-57", "alternatives": [ "Send feedback" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The saved initial DOM and independently inspected viewport/full-page screenshots show the complete ordinary article text: header, all eight prose sections, one ordinary figure caption, update/translation callouts, seven endnotes, visible prose/BibTeX citations, past-version and reuse information. The nonmodal cookie banner remains untouched; the page is not dimmed and the full-page capture shows the owning text through its end. Five chart frames are empty initial placeholders, so no chart data/lettering is claimed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The short history of global living conditions and why it matters that we know it" ], "html_selector": "h1.centered-article-header__title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-081/comment-qualification-reference-r5.json", "sha256": "f0b049789961ef1471589d87b5732ab60b245f28f56831e0cf6833612f5ef96a", "chars": 794, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "HomePoverty\nThe short history of global living conditions and why it matters that we know it\nVery few think the world is making progress. In this article, we look at the history of global living conditions and show that the world has made immense progress in important aspects.\nBy Max Roser\nOriginally published on December 14, 2016 (last partial update and revision in February 2024)Cite this article\nWe are working on Our World in Data to provide “research and data to make progress against the world’s largest problems”.\nOur mission only makes sense if it is, in fact, possible to make progress against the large problems the world faces. Very few think the world is making progress. A 2015 survey, long before the circumstances of the pandemic, asked, “All things considered, do you think the world is getting better or worse, or neither getting better nor worse?” In Sweden, 10% thought things were improving; in the US, they were only 6%, and in Germany, only 4%.\nWhat is the evidence that we need to consider when answering this question?\nThe question is how the world has changed, so we must take a historical perspective. And the question is about the world as a whole, so the answer must, therefore, consider everybody. The answer must consider the history of global living conditions — a history of everyone.\nPoverty\nGlobal poverty is one of the very largest problems in the world today. Is it possible to make progress against this problem? We must go far back in time to see where we are coming from. 30 or even 50 years are not enough. When you only consider what the world looked like during our lifetime, it is easy to think of the world as static — the richer parts of the world here and the poorer regions there — and to falsely conclude that it always was like that and will always be like that.\nTake a longer perspective, and it becomes clear that the world is not static at all. We can change the world. The countries that are rich today were very poor just a few generations ago.\nTo avoid portraying the world in a static way, we have to start 200 years ago, before the time when living conditions really changed dramatically.\nThe United Nations focuses on “extreme poverty”, an extremely low poverty line that has the purpose of drawing attention to the very poorest people in the world.\nThe chart below shows long-run estimates of global poverty, published by the historian Michail Moatsos. These poverty figures take into account non-monetary forms of income — for poor families today and in the past, this is important, as many of them are subsistence farmers who live mainly from the food they produce themselves. These poverty estimates also take into account different price levels in various countries. It is, of course, also adjusted for price changes over time (inflation). As a consequence of these adjustments, this data is expressed in “international dollar”. One international dollar has the same purchasing power as one US dollar had in the US in 2011.\nThe chart shows that almost 10% of the world's population lives in extreme poverty. It also tells us that two hundred years ago, the same was true for nearly 80% of the world’s population. In 1820, only a small elite enjoyed higher living standards, while the vast majority of people lived in conditions that we call extreme poverty today. Since then, the share of extremely poor people has fallen continuously. More and more world regions industrialized and achieved economic growth, which made it possible to lift more people out of poverty. In 1950, about half the world lived in extreme poverty; in 1990, it was still more than a third. By 2019, the share of the world population in extreme poverty had fallen below 10%.\nThe world is also making progress against poverty relative to higher poverty lines, as this visualization shows. In fact, no matter what poverty line you choose, the share of people below that poverty line has declined globally.\nThat is a considerable achievement. For me, as a researcher who focuses on growth and inequality, it may be humanity’s most significant achievement in the last two centuries. It is particularly remarkable if we consider that the world population has increased 7-fold in the last two centuries — via the chart’s settings, you can switch this chart to see the number of people in and out of poverty. In a world without economic growth, a 7-fold increase in the population would have resulted in less and less income for everyone; it would have driven everyone into extreme poverty. Yet, the exact opposite happened. In a time of unprecedented population growth, our world managed to give more prosperity to more people and lift more people out of the worst poverty.\nIncreasing productivity was important because it made vital goods and services less scarce: more food, better clothing, and less cramped housing. Productivity is the ratio between the output and the input of our work; as productivity increased, we benefited from more output but also from less input — weekly working hours fell very substantially.\nEconomic growth was also important because it changed the relationship between people. In the long time in which the world lived in a non-growth world, the only way to become better off was for someone else to get worse off. It was a zero-sum economy. Your good luck was your neighbor's bad luck. Economic growth changed that. Growth makes it possible for you to get better off while others become better off, too. The ingenuity of those who built the technology that increased productivity — modern transportation, production machinery, and communication technology — made some of them very rich, and at the same time, it increased the productivity and the incomes of others. It is hard to overstate how different life is in zero-sum and positive-sum economies.\nUnfortunately, the media is overly obsessed with reporting single events and with things that go wrong and do not nearly pay enough attention to the slow developments that reshape our world. With this empirical data on the reduction of poverty, we can make concrete what a media reporting on global development would look like. The headline could be \"The number of people in extreme poverty fell by 130,000 since yesterday”, and they wouldn’t have this headline once, but every single day since 1990, since, on average, there were 130,000 people fewer in extreme poverty every day. If you prefer to rely on a higher poverty line, the numbers are even more impressive. The daily headline would point out that the number of people living on more than $10 per day increased by a quarter of a million on any average day in the last decade.\nIt is important to know that it is possible to make progress against poverty because despite two centuries of progress, poverty remains one of the very largest problems in the world. The majority of the world population still lives in poverty: Almost every tenth person lives in extreme poverty, and two-thirds live on less than $10 per day. In rich countries, a person is considered poor when she or he lives on less than $30 per day; if we rely on this poverty definition, then we find that 85% of the world lives in poverty.1 Much more progress is needed.\nNote: Since the publication of this article, the World Bank has updated its poverty data. See the note at the end for more information.\nLiteracy\nHow did the education of the world population change over this period? This chart shows the increasing share of the world population that can read and write. Today’s education — including in today’s richest countries — is again a very recent achievement. Only in the last two centuries did literacy become the norm for the entire population.\nIn 1820, only every tenth person older than 15 years was literate; in 1930, it was every third, and now we are at 87% globally. Put differently, if you were alive in 1800, there was a chance of 9 in 10 that you weren’t able to read; today, close to 9 out of 10 people are able to read. And among today's young population, the chances are much higher since many of today’s illiterate population are old.\nIf you think science, technology, and political freedom are important to solve the world’s large problems and you think that it helps to read and write to solve problems, then consider the figures in absolute numbers. Today, there are about 5.1 billion people who can read and write.2 In 1800, there were fewer than 100 million people with the same skill.\nHealth\nOne reason why we do not see progress is that we are unaware of how bad the past was.\nThe chart here shows that in 1800, the health conditions were such that around 43% of the world’s newborns died before their fifth birthday. The historical estimates suggest that the entire world lived in poor conditions, so there was little variation between different regions, in all countries of the world more than every third child died before it was five years old.\nWhen considering the entirety of childhood — not just up to the age of five, but until the end of puberty — then we find that around half of all children died in the past (see my article on this data).\nIt would be wrong to believe that modern medicine was the only reason for improved health. Initially, rising prosperity, public health interventions, and the changing nature of social life mattered more than medicine. Improvements in housing and sanitation improved our chances in the age-old war against infectious disease. Healthier diets — made possible through higher productivity in the agricultural sector and overseas trade — made us more resilient against disease. Improving nutrition and health also made us taller.\nScience and medicine mattered as well. A more educated population achieved a series of scientific breakthroughs that made it possible to reduce mortality and disease further. Particularly important was the discovery of the germ theory of disease in the second half of the 19th century. In retrospect, it is hard to understand why a new theory could possibly be so critical. But at a time when doctors did not wash their hands when switching from post-mortems to midwifery, the theory was crucial in convincing our ancestors that hygiene and public sanitation are essential for health.\nThe germ theory of disease laid the foundation for the development of antibiotics and vaccines, allowing humanity to finally gain some ground in the age-old battle against microbes. Public health matters hugely: everybody benefits when everybody else is vaccinated, and everybody benefits from everybody else obeying the rules of hygiene.\nWith these changes, global health improved in a way that was unimaginable to our ancestors. In 2021, child mortality was down to 4% — 10-fold lower than two centuries ago.\nThe same data on child mortality also shows us just how large of a problem child mortality still is. On average, 15,000 children die every day. More progress is urgently needed and, as our history suggests, possible.\nYou have to take this long perspective to see the progress that we have achieved. It is just hard to imagine how bad the living conditions in the past were.\nFreedom\nPolitical freedom and civil liberties are at the very heart of development because they are both a means for development and an end to development.\nMerely qualitative assessments of these aspects bear the risk that we are mistakenly perceiving a decline of liberties over time when, in fact, we are raising the bar by which we judge our freedom and liberty. This is why quantitative assessments can be useful. They can help us to measure freedom against the same yardstick across countries and over time.\nThere are various attempts to measure the types of political regimes that govern the world’s countries. To capture something as complex as a political system is necessarily controversial. There is just no way around that. In this analysis, I rely on the assessment by Svend-Erik Skaaning, John Gerring, and Henrikas Bartusevičius for a very long-term perspective of political regimes around the world.3\nMy colleague Bastian Herre has brought together many other datasets that assess and classify political regimes around the world. To make it possible to study them in detail and see where they agree and where they differ, we made them available in our Democracy Data Explorer.\nThe long-term data in the chart below shows the share of the world population living in democracies in green. Throughout the 19th century, there was hardly any country in the world that met the criteria for a democracy of Skaaning and colleagues.4 The first expansion of political freedom in the early 20th century was crushed by the rise of authoritarian regimes in the time leading up to the Second World War.\nIn the second half of the 20th century, the world changed significantly: Colonial empires ended, and more countries turned democratic. The share of the world population living in democracies increased from 25% in 1950 to 35% in 1980. Particularly important was the breakdown of the Soviet Union, which allowed more countries to democratize. It is worrying, however, that the share of people living in democracies has not increased in recent years.\nOver the long run, the evidence is clear. While every generation was pessimistic that democracies could last, it should have been the autocrats who needed to worry. Autocratic rulers lost their power in more and more places over the last two centuries. Today, more than every second person in the world lives in a democracy.\nPopulation\nThe world population was around 1 billion in the year 1800 and increased more than eight-fold since then.\nThe increase of the world population should evoke more than doom and gloom. First of all, this increase shows a tremendous achievement. It shows that humans stopped dying at the rate at which our ancestors died for many millennia before.\nIn pre-modern times, fertility was high — 5 or 6 children per woman were the norm. What kept the population growth low was the very high rate at which people died; many children were dead before they reached their reproductive age. The increase in the world population followed when humanity started to win the fight against death. Life expectancy doubled in all world regions.\nPopulation growth is a temporary phenomenon, it is the consequence of fertility and mortality not declining simultaneously. The fast population growth happened when fertility was still as high as it was in the unhealthy environment of the past, but mortality has already declined to the low levels of our time.\nWhat we have seen in country after country over the last 200 years is that when women gain more independence, education, and prosperity, and realize that the chances of their children dying declined, they choose to have fewer children. Rapid population growth comes to an end. This transition from high mortality and high fertility to low mortality and low fertility is called the demographic transition. In those countries that industrialized first, it lasted at least from the mid-19th century to the mid-20th century — it took 95 years for fertility to decline from above six children to less than three children per woman in the UK. Countries that followed later often achieved this transition much faster: South Korea went from more than six children per woman to less than three in just 18 years, and Iran even went through it in only ten years.\nJust as countries went through this transition, the world is going through it. Global fertility has more than halved in the last 50 years, from more than 5 children per woman in the early 1960s to below 2.5 today. This means that the world is well into the demographic transition, and the global population growth rate has, in fact, peaked half a century ago.\nNow that we see fertility declining in countries around the world, we approach the end of global population growth: The global population has quadrupled over the course of the 20th century — this century, it is not expected to double. The UN demographers expect population growth to end before the end of this century.5\nEducation\nNone of the achievements over the last two centuries could have been made without the expansion of knowledge and education. The revolution in how we live was not only driven by education, but it also made education more important than ever.\nContrary to many other social aspects where forecasts are of limited use, I think education is an aspect where we can make some useful projections. The simple reason is that the educational composition today tells us something about the education of tomorrow — a literate young woman today will be a literate old woman in 2080.\nAs we've seen before, education — measured by the essential skill of literacy — has already improved. And we know that it will continue as the younger cohort today is much better educated than people in older cohorts.\nThis visualization shows the projection of the IIASA demographers for the size and the educational composition of the world population until 2100. It is an interesting look into the future: With today’s lower global fertility, the researchers expect that the number of children will decline from now. There will never be more children on the planet than today. As mentioned before, demographers expect the world population to peak in the second half of this century and to decline after that.\nFocusing on the educational breakdown, the projection suggests that by 2100, there will be almost no one without formal education, and there will be more than 7 billion minds who will have received at least secondary education.\nGiven the great importance of education for improving health, increasing political freedom, and ending poverty, this prospect is very encouraging.\nWhy do we not know how our world is changing?\nThe motivation for this history of global living conditions was the survey result that documented the negative perspective on global development that most of us have. More than 9 out of 10 people do not think that the world is getting better. How does that fit with the empirical evidence?\nI do not believe that the media are the only ones to blame, but I do think that they are to blame for some part of this. This is because the media does not tell us how the world is changing; it tells us what is going wrong in the world.\nOne reason the media focuses on things that go wrong is that the media focuses on single events and single events are negative ones — look at the news: plane crashes, terrorism attacks, natural disasters. Positive developments, on the other hand, often happen very slowly and never make the headlines.\nThe result of a media — and education system — that fails to present quantitative information on long-run developments is that most people are very ignorant about global development and have little hope that progress against serious problems is even possible.\nEven the decline of global extreme poverty — by any standard one of the most crucial developments in our lifetime — is only known by a small fraction of the population of the UK (10%) or the US (5%). In both countries, the majority of people think that the share of people living in extreme poverty has increased. Two-thirds in the US even think the share in extreme poverty has “almost doubled”. When we are ignorant about the basic facts about global development, it is not surprising that we have a negative view of our times and that few have the hope that the world can get better.\nThe only way to tell everyone's history is to use statistics. Only then can we hope to get an overview of the lives of the 22 billion people in the last 200 years. The developments that these statistics reveal transform our global living conditions — slowly but steadily. They are reported in this online publication — Our World in Data — that my team and I have been building over the last few years. We see it as a resource to show these long-term developments and thereby complement the information in the news that focuses on events.\nThe difficulty in telling the history of how everyone’s lives changed over the last 200 years is that you cannot pick individual stories. Stories about individual people are much more engaging — our minds like these stories — but they cannot represent how the world has changed. To achieve a representation of how the world has changed at large, you have to tell many, many stories all at once, and that is statistics.\nTo make it easier for myself and for you to understand the transformation in living conditions that we have achieved, I made a summarizing visualization in which I imagine this 200-year history as the history of a group of 100 people to see how the lives of them would have changed if they lived through this transformative period of the modern world. It shows some of the very largest problems we face and the progress that the last generations have made.\nDownload\nThe world as 100 people over the last two centuries\nSubscribe to our newsletters\nWe send two regular newsletters so you can stay up to date on our work and receive curated highlights from across Our World in Data.\nSubscribe\nWhy it matters that we do not know how our world is changing\nA single person can't change the world. The transformation of our living conditions was possible only because of collaboration. It is our collective brains and our collaborative effort that are needed for such a revolution.\nThere are big problems that remain. None of the above should give us reason to become complacent. On the contrary, it shows us that a lot of work still needs to be done — accomplishing the fastest reduction of extreme poverty is an important achievement, but the fact that 85% of the world lives on less than $30 per day is unacceptable. We also must not accept the restrictions of our liberty that remain. It is also clear that humanity’s impact on the environment is at a level that is not sustainable and is endangering the biosphere and climate on which we depend. We urgently need to reduce our impact, and on Our World in Data, you can find detailed information about the world's environmental problems.\nIt is far from certain that we will make progress against these problems — no iron law would ensure that the world continues this trend of improving living conditions. However, what is evident from the long-term perspective is that progress is possible and that the last 200 years have brought us to a better position than ever before to solve problems. Solving problems — big problems — is always a collaborative undertaking. The group of people that can work together today is a much stronger group than ever existed on this planet. Healthier, richer, and better educated.\nFor our history to be a source of encouragement, however, we have to know our history. The story that we tell ourselves about our history and our time matters. Because our hopes and efforts to build a better future are inextricably linked to our perception of the past, it is important to understand and communicate the global development of the present. An understanding of our efforts and our fellow humans is a vital condition to the fruitfulness of our endeavors. Knowing that we have come a long way in improving living conditions and the notion that our work is worthwhile is to us all what self-respect is to individuals. It is a necessary condition for improvement.\nFreedom is impossible without faith in free people. And if we are not aware of our history and falsely believe the opposite of what is true, we risk losing faith in each other.\nThe World Bank has updated its poverty and inequality data since the publication of this article\nThis article uses a previous release of the World Bank's poverty and inequality data, in which incomes were expressed in 2011 international dollars.\nThe World Bank has since updated its methods, and now measures incomes in 2021 international-$. As part of these changes, the International Poverty Line used to measure extreme poverty has also been updated: from $1.90 a day (in 2011 prices) to $2.15 a day (in 2017 prices) to $3 a day (in 2021 prices).\nBecause of the change of units, many of the figures mentioned in this article will differ from the latest World Bank figures.\nExplore the latest data and read more about the World Bank's methodology:\nPoverty Data Explorer\nThe $3 International Poverty Line\nFrom $1.90 to $2.15 a day: the updated International Poverty Line\nTranslations of this article in other languages\nThe Japanese translation of this blog post is here: 世界的な生活条件の短い歴史、そして私たちがそれを知っていることが重要な理由.\nThe Portuguese translation is available here: A curta história das condições globais de vida e por que é importante que a conheçamos.\nEndnotes\nThe latest data can always be found on the World Bank's Poverty and Inequality Platform or viewed in our Data Explorer.\nThere are about 5.9 billion people older than 15 years, of which, as the chart shows, 87% are literate.\nThe classification by Skaaning and colleagues differentiates between particular types of autocracies and democracies (here you can explore it in detail). In this chart here all categories of autocratic regimes are summarized into one, and all categories of democratic regimes are summarized into a second group.\nPolitical regimes are classified into the following regime types by Skaaning et al.: non-electoral autocracy, one-party autocracy, multi-party autocracy without an elected executive, multi-party autocracy, exclusive democracy, male democracy, electoral democracy, and full democracy (polyarchy).\nExclusive democracies and male democracies are not considered democracies, as these so-called “non-electoral democracies” are regimes in which either both men and women don’t have universal voting rights (exclusive democracies), or in which women don’t have the right to vote (male democracies).\nThis means that the share of the world population living in democracies is the share living in electoral democracies and full democracies (polyarchies), in the classification by Skaaning et al.\nThe UN repeatedly revised their population projections downward for the end of the century. The demographers from IIASA expected an end to global population growth as soon as 2075, already before the UN revised their estimates.\nCite this work\nOur articles and data visualizations rely on work from many different people and organizations. When citing this article, please also cite the underlying data sources. This article can be cited as:\nMax Roser (2016) - “The short history of global living conditions and why it matters that we know it” Published online at OurWorldinData.org. Retrieved from: 'https://archive.ourworldindata.org/20260909-233456/a-history-of-global-living-conditions.html' [Online Resource] (archived on September 9, 2026).\nBibTeX citation\n@article{owid-a-history-of-global-living-conditions,\nauthor = {Max Roser},\ntitle = {The short history of global living conditions and why it matters that we know it},\njournal = {Our World in Data},\nyear = {2016},\nnote = {https://archive.ourworldindata.org/20260909-233456/a-history-of-global-living-conditions.html}\n}\nPast versions\nWe are a live site and we keep our work maintained. So our articles are often changed, including the data. You can browse previous versions of this work here.\nBrowse past versions\nReuse this work freely\nAll visualizations, data, and articles produced by Our World in Data are completely open access under the Creative Commons BY license. You have the permission to use, distribute, and reproduce these in any medium, provided the source and authors are credited.\nThe data produced by third parties and made available by Our World in Data is subject to the license terms from the original third-party authors. We will always indicate the original source of the data in our documentation, so you should always check the license of any such third-party data before use and redistribution.\nAll of our charts can be embedded in any site.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "homepoverty the short history of global living conditions and why it matters that we know it very few think the world is making progress in this article we look at the history of global living conditions and show that the world has made immense progress in important aspects by max roser originally published on december 14 2016 last partial update and revision in february 2024 cite this article we are working on our world in data to provide research and data to make progress against the world s largest problems our mission only makes sense if it is in fact possible to make progress against the large problems the world faces very few think the world is making progress a 2015 survey long before the circumstances of the pandemic asked all things considered do you think the world is getting better or worse or neither getting better nor worse in sweden 10 thought things were improving in the us they were only 6 and in germany only 4 what is the evidence that we need to consider when answering this question the question is how the world has changed so we must take a historical perspective and the question is about the world as a whole so the answer must therefore consider everybody the answer must consider the history of global living conditions a history of everyone poverty global poverty is one of the very largest problems in the world today is it possible to make progress against this problem we must go far back in time to see where we are coming from 30 or even 50 years are not enough when you only consider what the world looked like during our lifetime it is easy to think of the world as static the richer parts of the world here and the poorer regions there and to falsely conclude that it always was like that and will always be like that take a longer perspective and it becomes clear that the world is not static at all we can change the world the countries that are rich today were very poor just a few generations ago to avoid portraying the world in a static way we have to start 200 years ago before the time when living conditions really changed dramatically the united nations focuses on extreme poverty an extremely low poverty line that has the purpose of drawing attention to the very poorest people in the world the chart below shows long run estimates of global poverty published by the historian michail moatsos these poverty figures take into account non monetary forms of income for poor families today and in the past this is important as many of them are subsistence farmers who live mainly from the food they produce themselves these poverty estimates also take into account different price levels in various countries it is of course also adjusted for price changes over time inflation as a consequence of these adjustments this data is expressed in international dollar one international dollar has the same purchasing power as one us dollar had in the us in 2011 the chart shows that almost 10 of the world s population lives in extreme poverty it also tells us that two hundred years ago the same was true for nearly 80 of the world s population in 1820 only a small elite enjoyed higher living standards while the vast majority of people lived in conditions that we call extreme poverty today since then the share of extremely poor people has fallen continuously more and more world regions industrialized and achieved economic growth which made it possible to lift more people out of poverty in 1950 about half the world lived in extreme poverty in 1990 it was still more than a third by 2019 the share of the world population in extreme poverty had fallen below 10 the world is also making progress against poverty relative to higher poverty lines as this visualization shows in fact no matter what poverty line you choose the share of people below that poverty line has declined globally that is a considerable achievement for me as a researcher who focuses on growth and inequality it may be humanity s most significant achievement in the last two centuries it is particularly remarkable if we consider that the world population has increased 7 fold in the last two centuries via the chart s settings you can switch this chart to see the number of people in and out of poverty in a world without economic growth a 7 fold increase in the population would have resulted in less and less income for everyone it would have driven everyone into extreme poverty yet the exact opposite happened in a time of unprecedented population growth our world managed to give more prosperity to more people and lift more people out of the worst poverty increasing productivity was important because it made vital goods and services less scarce more food better clothing and less cramped housing productivity is the ratio between the output and the input of our work as productivity increased we benefited from more output but also from less input weekly working hours fell very substantially economic growth was also important because it changed the relationship between people in the long time in which the world lived in a non growth world the only way to become better off was for someone else to get worse off it was a zero sum economy your good luck was your neighbor s bad luck economic growth changed that growth makes it possible for you to get better off while others become better off too the ingenuity of those who built the technology that increased productivity modern transportation production machinery and communication technology made some of them very rich and at the same time it increased the productivity and the incomes of others it is hard to overstate how different life is in zero sum and positive sum economies unfortunately the media is overly obsessed with reporting single events and with things that go wrong and do not nearly pay enough attention to the slow developments that reshape our world with this empirical data on the reduction of poverty we can make concrete what a media reporting on global development would look like the headline could be the number of people in extreme poverty fell by 130 000 since yesterday and they wouldn t have this headline once but every single day since 1990 since on average there were 130 000 people fewer in extreme poverty every day if you prefer to rely on a higher poverty line the numbers are even more impressive the daily headline would point out that the number of people living on more than 10 per day increased by a quarter of a million on any average day in the last decade it is important to know that it is possible to make progress against poverty because despite two centuries of progress poverty remains one of the very largest problems in the world the majority of the world population still lives in poverty almost every tenth person lives in extreme poverty and two thirds live on less than 10 per day in rich countries a person is considered poor when she or he lives on less than 30 per day if we rely on this poverty definition then we find that 85 of the world lives in poverty 1 much more progress is needed note since the publication of this article the world bank has updated its poverty data see the note at the end for more information", "source_text": "HomePoverty\nThe short history of global living conditions and why it matters that we know it\nVery few think the world is making progress. In this article, we look at the history of global living conditions and show that the world has made immense progress in important aspects.\nBy Max Roser\nOriginally published on December 14, 2016 (last partial update and revision in February 2024)Cite this article\nWe are working on Our World in Data to provide “research and data to make progress against the world’s largest problems”.\nOur mission only makes sense if it is, in fact, possible to make progress against the large problems the world faces. Very few think the world is making progress. A 2015 survey, long before the circumstances of the pandemic, asked, “All things considered, do you think the world is getting better or worse, or neither getting better nor worse?” In Sweden, 10% thought things were improving; in the US, they were only 6%, and in Germany, only 4%.\nWhat is the evidence that we need to consider when answering this question?\nThe question is how the world has changed, so we must take a historical perspective. And the question is about the world as a whole, so the answer must, therefore, consider everybody. The answer must consider the history of global living conditions — a history of everyone.\nPoverty\nGlobal poverty is one of the very largest problems in the world today. Is it possible to make progress against this problem? We must go far back in time to see where we are coming from. 30 or even 50 years are not enough. When you only consider what the world looked like during our lifetime, it is easy to think of the world as static — the richer parts of the world here and the poorer regions there — and to falsely conclude that it always was like that and will always be like that.\nTake a longer perspective, and it becomes clear that the world is not static at all. We can change the world. The countries that are rich today were very poor just a few generations ago.\nTo avoid portraying the world in a static way, we have to start 200 years ago, before the time when living conditions really changed dramatically.\nThe United Nations focuses on “extreme poverty”, an extremely low poverty line that has the purpose of drawing attention to the very poorest people in the world.\nThe chart below shows long-run estimates of global poverty, published by the historian Michail Moatsos. These poverty figures take into account non-monetary forms of income — for poor families today and in the past, this is important, as many of them are subsistence farmers who live mainly from the food they produce themselves. These poverty estimates also take into account different price levels in various countries. It is, of course, also adjusted for price changes over time (inflation). As a consequence of these adjustments, this data is expressed in “international dollar”. One international dollar has the same purchasing power as one US dollar had in the US in 2011.\nThe chart shows that almost 10% of the world's population lives in extreme poverty. It also tells us that two hundred years ago, the same was true for nearly 80% of the world’s population. In 1820, only a small elite enjoyed higher living standards, while the vast majority of people lived in conditions that we call extreme poverty today. Since then, the share of extremely poor people has fallen continuously. More and more world regions industrialized and achieved economic growth, which made it possible to lift more people out of poverty. In 1950, about half the world lived in extreme poverty; in 1990, it was still more than a third. By 2019, the share of the world population in extreme poverty had fallen below 10%.\nThe world is also making progress against poverty relative to higher poverty lines, as this visualization shows. In fact, no matter what poverty line you choose, the share of people below that poverty line has declined globally.\nThat is a considerable achievement. For me, as a researcher who focuses on growth and inequality, it may be humanity’s most significant achievement in the last two centuries. It is particularly remarkable if we consider that the world population has increased 7-fold in the last two centuries — via the chart’s settings, you can switch this chart to see the number of people in and out of poverty. In a world without economic growth, a 7-fold increase in the population would have resulted in less and less income for everyone; it would have driven everyone into extreme poverty. Yet, the exact opposite happened. In a time of unprecedented population growth, our world managed to give more prosperity to more people and lift more people out of the worst poverty.\nIncreasing productivity was important because it made vital goods and services less scarce: more food, better clothing, and less cramped housing. Productivity is the ratio between the output and the input of our work; as productivity increased, we benefited from more output but also from less input — weekly working hours fell very substantially.\nEconomic growth was also important because it changed the relationship between people. In the long time in which the world lived in a non-growth world, the only way to become better off was for someone else to get worse off. It was a zero-sum economy. Your good luck was your neighbor's bad luck. Economic growth changed that. Growth makes it possible for you to get better off while others become better off, too. The ingenuity of those who built the technology that increased productivity — modern transportation, production machinery, and communication technology — made some of them very rich, and at the same time, it increased the productivity and the incomes of others. It is hard to overstate how different life is in zero-sum and positive-sum economies.\nUnfortunately, the media is overly obsessed with reporting single events and with things that go wrong and do not nearly pay enough attention to the slow developments that reshape our world. With this empirical data on the reduction of poverty, we can make concrete what a media reporting on global development would look like. The headline could be \"The number of people in extreme poverty fell by 130,000 since yesterday”, and they wouldn’t have this headline once, but every single day since 1990, since, on average, there were 130,000 people fewer in extreme poverty every day. If you prefer to rely on a higher poverty line, the numbers are even more impressive. The daily headline would point out that the number of people living on more than $10 per day increased by a quarter of a million on any average day in the last decade.\nIt is important to know that it is possible to make progress against poverty because despite two centuries of progress, poverty remains one of the very largest problems in the world. The majority of the world population still lives in poverty: Almost every tenth person lives in extreme poverty, and two-thirds live on less than $10 per day. In rich countries, a person is considered poor when she or he lives on less than $30 per day; if we rely on this poverty definition, then we find that 85% of the world lives in poverty.1 Much more progress is needed.\nNote: Since the publication of this article, the World Bank has updated its poverty data. See the note at the end for more information.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:HomePoverty — Poverty", "source_line_range": [ 1, 23 ] }, { "id": "body-region-2", "text": "literacy how did the education of the world population change over this period this chart shows the increasing share of the world population that can read and write today s education including in today s richest countries is again a very recent achievement only in the last two centuries did literacy become the norm for the entire population in 1820 only every tenth person older than 15 years was literate in 1930 it was every third and now we are at 87 globally put differently if you were alive in 1800 there was a chance of 9 in 10 that you weren t able to read today close to 9 out of 10 people are able to read and among today s young population the chances are much higher since many of today s illiterate population are old if you think science technology and political freedom are important to solve the world s large problems and you think that it helps to read and write to solve problems then consider the figures in absolute numbers today there are about 5 1 billion people who can read and write 2 in 1800 there were fewer than 100 million people with the same skill health one reason why we do not see progress is that we are unaware of how bad the past was the chart here shows that in 1800 the health conditions were such that around 43 of the world s newborns died before their fifth birthday the historical estimates suggest that the entire world lived in poor conditions so there was little variation between different regions in all countries of the world more than every third child died before it was five years old when considering the entirety of childhood not just up to the age of five but until the end of puberty then we find that around half of all children died in the past see my article on this data it would be wrong to believe that modern medicine was the only reason for improved health initially rising prosperity public health interventions and the changing nature of social life mattered more than medicine improvements in housing and sanitation improved our chances in the age old war against infectious disease healthier diets made possible through higher productivity in the agricultural sector and overseas trade made us more resilient against disease improving nutrition and health also made us taller science and medicine mattered as well a more educated population achieved a series of scientific breakthroughs that made it possible to reduce mortality and disease further particularly important was the discovery of the germ theory of disease in the second half of the 19th century in retrospect it is hard to understand why a new theory could possibly be so critical but at a time when doctors did not wash their hands when switching from post mortems to midwifery the theory was crucial in convincing our ancestors that hygiene and public sanitation are essential for health the germ theory of disease laid the foundation for the development of antibiotics and vaccines allowing humanity to finally gain some ground in the age old battle against microbes public health matters hugely everybody benefits when everybody else is vaccinated and everybody benefits from everybody else obeying the rules of hygiene with these changes global health improved in a way that was unimaginable to our ancestors in 2021 child mortality was down to 4 10 fold lower than two centuries ago the same data on child mortality also shows us just how large of a problem child mortality still is on average 15 000 children die every day more progress is urgently needed and as our history suggests possible you have to take this long perspective to see the progress that we have achieved it is just hard to imagine how bad the living conditions in the past were", "source_text": "Literacy\nHow did the education of the world population change over this period? This chart shows the increasing share of the world population that can read and write. Today’s education — including in today’s richest countries — is again a very recent achievement. Only in the last two centuries did literacy become the norm for the entire population.\nIn 1820, only every tenth person older than 15 years was literate; in 1930, it was every third, and now we are at 87% globally. Put differently, if you were alive in 1800, there was a chance of 9 in 10 that you weren’t able to read; today, close to 9 out of 10 people are able to read. And among today's young population, the chances are much higher since many of today’s illiterate population are old.\nIf you think science, technology, and political freedom are important to solve the world’s large problems and you think that it helps to read and write to solve problems, then consider the figures in absolute numbers. Today, there are about 5.1 billion people who can read and write.2 In 1800, there were fewer than 100 million people with the same skill.\nHealth\nOne reason why we do not see progress is that we are unaware of how bad the past was.\nThe chart here shows that in 1800, the health conditions were such that around 43% of the world’s newborns died before their fifth birthday. The historical estimates suggest that the entire world lived in poor conditions, so there was little variation between different regions, in all countries of the world more than every third child died before it was five years old.\nWhen considering the entirety of childhood — not just up to the age of five, but until the end of puberty — then we find that around half of all children died in the past (see my article on this data).\nIt would be wrong to believe that modern medicine was the only reason for improved health. Initially, rising prosperity, public health interventions, and the changing nature of social life mattered more than medicine. Improvements in housing and sanitation improved our chances in the age-old war against infectious disease. Healthier diets — made possible through higher productivity in the agricultural sector and overseas trade — made us more resilient against disease. Improving nutrition and health also made us taller.\nScience and medicine mattered as well. A more educated population achieved a series of scientific breakthroughs that made it possible to reduce mortality and disease further. Particularly important was the discovery of the germ theory of disease in the second half of the 19th century. In retrospect, it is hard to understand why a new theory could possibly be so critical. But at a time when doctors did not wash their hands when switching from post-mortems to midwifery, the theory was crucial in convincing our ancestors that hygiene and public sanitation are essential for health.\nThe germ theory of disease laid the foundation for the development of antibiotics and vaccines, allowing humanity to finally gain some ground in the age-old battle against microbes. Public health matters hugely: everybody benefits when everybody else is vaccinated, and everybody benefits from everybody else obeying the rules of hygiene.\nWith these changes, global health improved in a way that was unimaginable to our ancestors. In 2021, child mortality was down to 4% — 10-fold lower than two centuries ago.\nThe same data on child mortality also shows us just how large of a problem child mortality still is. On average, 15,000 children die every day. More progress is urgently needed and, as our history suggests, possible.\nYou have to take this long perspective to see the progress that we have achieved. It is just hard to imagine how bad the living conditions in the past were.", "segmentation_method": "reviewed_source_semantics", "label": "Literacy — Health", "source_line_range": [ 24, 37 ] }, { "id": "body-region-3", "text": "freedom political freedom and civil liberties are at the very heart of development because they are both a means for development and an end to development merely qualitative assessments of these aspects bear the risk that we are mistakenly perceiving a decline of liberties over time when in fact we are raising the bar by which we judge our freedom and liberty this is why quantitative assessments can be useful they can help us to measure freedom against the same yardstick across countries and over time there are various attempts to measure the types of political regimes that govern the world s countries to capture something as complex as a political system is necessarily controversial there is just no way around that in this analysis i rely on the assessment by svend erik skaaning john gerring and henrikas bartusevičius for a very long term perspective of political regimes around the world 3 my colleague bastian herre has brought together many other datasets that assess and classify political regimes around the world to make it possible to study them in detail and see where they agree and where they differ we made them available in our democracy data explorer the long term data in the chart below shows the share of the world population living in democracies in green throughout the 19th century there was hardly any country in the world that met the criteria for a democracy of skaaning and colleagues 4 the first expansion of political freedom in the early 20th century was crushed by the rise of authoritarian regimes in the time leading up to the second world war in the second half of the 20th century the world changed significantly colonial empires ended and more countries turned democratic the share of the world population living in democracies increased from 25 in 1950 to 35 in 1980 particularly important was the breakdown of the soviet union which allowed more countries to democratize it is worrying however that the share of people living in democracies has not increased in recent years over the long run the evidence is clear while every generation was pessimistic that democracies could last it should have been the autocrats who needed to worry autocratic rulers lost their power in more and more places over the last two centuries today more than every second person in the world lives in a democracy population the world population was around 1 billion in the year 1800 and increased more than eight fold since then the increase of the world population should evoke more than doom and gloom first of all this increase shows a tremendous achievement it shows that humans stopped dying at the rate at which our ancestors died for many millennia before in pre modern times fertility was high 5 or 6 children per woman were the norm what kept the population growth low was the very high rate at which people died many children were dead before they reached their reproductive age the increase in the world population followed when humanity started to win the fight against death life expectancy doubled in all world regions population growth is a temporary phenomenon it is the consequence of fertility and mortality not declining simultaneously the fast population growth happened when fertility was still as high as it was in the unhealthy environment of the past but mortality has already declined to the low levels of our time what we have seen in country after country over the last 200 years is that when women gain more independence education and prosperity and realize that the chances of their children dying declined they choose to have fewer children rapid population growth comes to an end this transition from high mortality and high fertility to low mortality and low fertility is called the demographic transition in those countries that industrialized first it lasted at least from the mid 19th century to the mid 20th century it took 95 years for fertility to decline from above six children to less than three children per woman in the uk countries that followed later often achieved this transition much faster south korea went from more than six children per woman to less than three in just 18 years and iran even went through it in only ten years just as countries went through this transition the world is going through it global fertility has more than halved in the last 50 years from more than 5 children per woman in the early 1960s to below 2 5 today this means that the world is well into the demographic transition and the global population growth rate has in fact peaked half a century ago now that we see fertility declining in countries around the world we approach the end of global population growth the global population has quadrupled over the course of the 20th century this century it is not expected to double the un demographers expect population growth to end before the end of this century 5", "source_text": "Freedom\nPolitical freedom and civil liberties are at the very heart of development because they are both a means for development and an end to development.\nMerely qualitative assessments of these aspects bear the risk that we are mistakenly perceiving a decline of liberties over time when, in fact, we are raising the bar by which we judge our freedom and liberty. This is why quantitative assessments can be useful. They can help us to measure freedom against the same yardstick across countries and over time.\nThere are various attempts to measure the types of political regimes that govern the world’s countries. To capture something as complex as a political system is necessarily controversial. There is just no way around that. In this analysis, I rely on the assessment by Svend-Erik Skaaning, John Gerring, and Henrikas Bartusevičius for a very long-term perspective of political regimes around the world.3\nMy colleague Bastian Herre has brought together many other datasets that assess and classify political regimes around the world. To make it possible to study them in detail and see where they agree and where they differ, we made them available in our Democracy Data Explorer.\nThe long-term data in the chart below shows the share of the world population living in democracies in green. Throughout the 19th century, there was hardly any country in the world that met the criteria for a democracy of Skaaning and colleagues.4 The first expansion of political freedom in the early 20th century was crushed by the rise of authoritarian regimes in the time leading up to the Second World War.\nIn the second half of the 20th century, the world changed significantly: Colonial empires ended, and more countries turned democratic. The share of the world population living in democracies increased from 25% in 1950 to 35% in 1980. Particularly important was the breakdown of the Soviet Union, which allowed more countries to democratize. It is worrying, however, that the share of people living in democracies has not increased in recent years.\nOver the long run, the evidence is clear. While every generation was pessimistic that democracies could last, it should have been the autocrats who needed to worry. Autocratic rulers lost their power in more and more places over the last two centuries. Today, more than every second person in the world lives in a democracy.\nPopulation\nThe world population was around 1 billion in the year 1800 and increased more than eight-fold since then.\nThe increase of the world population should evoke more than doom and gloom. First of all, this increase shows a tremendous achievement. It shows that humans stopped dying at the rate at which our ancestors died for many millennia before.\nIn pre-modern times, fertility was high — 5 or 6 children per woman were the norm. What kept the population growth low was the very high rate at which people died; many children were dead before they reached their reproductive age. The increase in the world population followed when humanity started to win the fight against death. Life expectancy doubled in all world regions.\nPopulation growth is a temporary phenomenon, it is the consequence of fertility and mortality not declining simultaneously. The fast population growth happened when fertility was still as high as it was in the unhealthy environment of the past, but mortality has already declined to the low levels of our time.\nWhat we have seen in country after country over the last 200 years is that when women gain more independence, education, and prosperity, and realize that the chances of their children dying declined, they choose to have fewer children. Rapid population growth comes to an end. This transition from high mortality and high fertility to low mortality and low fertility is called the demographic transition. In those countries that industrialized first, it lasted at least from the mid-19th century to the mid-20th century — it took 95 years for fertility to decline from above six children to less than three children per woman in the UK. Countries that followed later often achieved this transition much faster: South Korea went from more than six children per woman to less than three in just 18 years, and Iran even went through it in only ten years.\nJust as countries went through this transition, the world is going through it. Global fertility has more than halved in the last 50 years, from more than 5 children per woman in the early 1960s to below 2.5 today. This means that the world is well into the demographic transition, and the global population growth rate has, in fact, peaked half a century ago.\nNow that we see fertility declining in countries around the world, we approach the end of global population growth: The global population has quadrupled over the course of the 20th century — this century, it is not expected to double. The UN demographers expect population growth to end before the end of this century.5", "segmentation_method": "reviewed_source_semantics", "label": "Freedom — Population", "source_line_range": [ 38, 53 ] }, { "id": "body-region-4", "text": "education none of the achievements over the last two centuries could have been made without the expansion of knowledge and education the revolution in how we live was not only driven by education but it also made education more important than ever contrary to many other social aspects where forecasts are of limited use i think education is an aspect where we can make some useful projections the simple reason is that the educational composition today tells us something about the education of tomorrow a literate young woman today will be a literate old woman in 2080 as we ve seen before education measured by the essential skill of literacy has already improved and we know that it will continue as the younger cohort today is much better educated than people in older cohorts this visualization shows the projection of the iiasa demographers for the size and the educational composition of the world population until 2100 it is an interesting look into the future with today s lower global fertility the researchers expect that the number of children will decline from now there will never be more children on the planet than today as mentioned before demographers expect the world population to peak in the second half of this century and to decline after that focusing on the educational breakdown the projection suggests that by 2100 there will be almost no one without formal education and there will be more than 7 billion minds who will have received at least secondary education given the great importance of education for improving health increasing political freedom and ending poverty this prospect is very encouraging why do we not know how our world is changing the motivation for this history of global living conditions was the survey result that documented the negative perspective on global development that most of us have more than 9 out of 10 people do not think that the world is getting better how does that fit with the empirical evidence i do not believe that the media are the only ones to blame but i do think that they are to blame for some part of this this is because the media does not tell us how the world is changing it tells us what is going wrong in the world one reason the media focuses on things that go wrong is that the media focuses on single events and single events are negative ones look at the news plane crashes terrorism attacks natural disasters positive developments on the other hand often happen very slowly and never make the headlines the result of a media and education system that fails to present quantitative information on long run developments is that most people are very ignorant about global development and have little hope that progress against serious problems is even possible even the decline of global extreme poverty by any standard one of the most crucial developments in our lifetime is only known by a small fraction of the population of the uk 10 or the us 5 in both countries the majority of people think that the share of people living in extreme poverty has increased two thirds in the us even think the share in extreme poverty has almost doubled when we are ignorant about the basic facts about global development it is not surprising that we have a negative view of our times and that few have the hope that the world can get better the only way to tell everyone s history is to use statistics only then can we hope to get an overview of the lives of the 22 billion people in the last 200 years the developments that these statistics reveal transform our global living conditions slowly but steadily they are reported in this online publication our world in data that my team and i have been building over the last few years we see it as a resource to show these long term developments and thereby complement the information in the news that focuses on events the difficulty in telling the history of how everyone s lives changed over the last 200 years is that you cannot pick individual stories stories about individual people are much more engaging our minds like these stories but they cannot represent how the world has changed to achieve a representation of how the world has changed at large you have to tell many many stories all at once and that is statistics to make it easier for myself and for you to understand the transformation in living conditions that we have achieved i made a summarizing visualization in which i imagine this 200 year history as the history of a group of 100 people to see how the lives of them would have changed if they lived through this transformative period of the modern world it shows some of the very largest problems we face and the progress that the last generations have made download the world as 100 people over the last two centuries subscribe to our newsletters we send two regular newsletters so you can stay up to date on our work and receive curated highlights from across our world in data subscribe", "source_text": "Education\nNone of the achievements over the last two centuries could have been made without the expansion of knowledge and education. The revolution in how we live was not only driven by education, but it also made education more important than ever.\nContrary to many other social aspects where forecasts are of limited use, I think education is an aspect where we can make some useful projections. The simple reason is that the educational composition today tells us something about the education of tomorrow — a literate young woman today will be a literate old woman in 2080.\nAs we've seen before, education — measured by the essential skill of literacy — has already improved. And we know that it will continue as the younger cohort today is much better educated than people in older cohorts.\nThis visualization shows the projection of the IIASA demographers for the size and the educational composition of the world population until 2100. It is an interesting look into the future: With today’s lower global fertility, the researchers expect that the number of children will decline from now. There will never be more children on the planet than today. As mentioned before, demographers expect the world population to peak in the second half of this century and to decline after that.\nFocusing on the educational breakdown, the projection suggests that by 2100, there will be almost no one without formal education, and there will be more than 7 billion minds who will have received at least secondary education.\nGiven the great importance of education for improving health, increasing political freedom, and ending poverty, this prospect is very encouraging.\nWhy do we not know how our world is changing?\nThe motivation for this history of global living conditions was the survey result that documented the negative perspective on global development that most of us have. More than 9 out of 10 people do not think that the world is getting better. How does that fit with the empirical evidence?\nI do not believe that the media are the only ones to blame, but I do think that they are to blame for some part of this. This is because the media does not tell us how the world is changing; it tells us what is going wrong in the world.\nOne reason the media focuses on things that go wrong is that the media focuses on single events and single events are negative ones — look at the news: plane crashes, terrorism attacks, natural disasters. Positive developments, on the other hand, often happen very slowly and never make the headlines.\nThe result of a media — and education system — that fails to present quantitative information on long-run developments is that most people are very ignorant about global development and have little hope that progress against serious problems is even possible.\nEven the decline of global extreme poverty — by any standard one of the most crucial developments in our lifetime — is only known by a small fraction of the population of the UK (10%) or the US (5%). In both countries, the majority of people think that the share of people living in extreme poverty has increased. Two-thirds in the US even think the share in extreme poverty has “almost doubled”. When we are ignorant about the basic facts about global development, it is not surprising that we have a negative view of our times and that few have the hope that the world can get better.\nThe only way to tell everyone's history is to use statistics. Only then can we hope to get an overview of the lives of the 22 billion people in the last 200 years. The developments that these statistics reveal transform our global living conditions — slowly but steadily. They are reported in this online publication — Our World in Data — that my team and I have been building over the last few years. We see it as a resource to show these long-term developments and thereby complement the information in the news that focuses on events.\nThe difficulty in telling the history of how everyone’s lives changed over the last 200 years is that you cannot pick individual stories. Stories about individual people are much more engaging — our minds like these stories — but they cannot represent how the world has changed. To achieve a representation of how the world has changed at large, you have to tell many, many stories all at once, and that is statistics.\nTo make it easier for myself and for you to understand the transformation in living conditions that we have achieved, I made a summarizing visualization in which I imagine this 200-year history as the history of a group of 100 people to see how the lives of them would have changed if they lived through this transformative period of the modern world. It shows some of the very largest problems we face and the progress that the last generations have made.\nDownload\nThe world as 100 people over the last two centuries\nSubscribe to our newsletters\nWe send two regular newsletters so you can stay up to date on our work and receive curated highlights from across Our World in Data.\nSubscribe", "segmentation_method": "reviewed_source_semantics", "label": "Education — Why do we not know how our world is changing?", "source_line_range": [ 54, 74 ] }, { "id": "body-region-5", "text": "why it matters that we do not know how our world is changing a single person can t change the world the transformation of our living conditions was possible only because of collaboration it is our collective brains and our collaborative effort that are needed for such a revolution there are big problems that remain none of the above should give us reason to become complacent on the contrary it shows us that a lot of work still needs to be done accomplishing the fastest reduction of extreme poverty is an important achievement but the fact that 85 of the world lives on less than 30 per day is unacceptable we also must not accept the restrictions of our liberty that remain it is also clear that humanity s impact on the environment is at a level that is not sustainable and is endangering the biosphere and climate on which we depend we urgently need to reduce our impact and on our world in data you can find detailed information about the world s environmental problems it is far from certain that we will make progress against these problems no iron law would ensure that the world continues this trend of improving living conditions however what is evident from the long term perspective is that progress is possible and that the last 200 years have brought us to a better position than ever before to solve problems solving problems big problems is always a collaborative undertaking the group of people that can work together today is a much stronger group than ever existed on this planet healthier richer and better educated for our history to be a source of encouragement however we have to know our history the story that we tell ourselves about our history and our time matters because our hopes and efforts to build a better future are inextricably linked to our perception of the past it is important to understand and communicate the global development of the present an understanding of our efforts and our fellow humans is a vital condition to the fruitfulness of our endeavors knowing that we have come a long way in improving living conditions and the notion that our work is worthwhile is to us all what self respect is to individuals it is a necessary condition for improvement freedom is impossible without faith in free people and if we are not aware of our history and falsely believe the opposite of what is true we risk losing faith in each other the world bank has updated its poverty and inequality data since the publication of this article this article uses a previous release of the world bank s poverty and inequality data in which incomes were expressed in 2011 international dollars the world bank has since updated its methods and now measures incomes in 2021 international as part of these changes the international poverty line used to measure extreme poverty has also been updated from 1 90 a day in 2011 prices to 2 15 a day in 2017 prices to 3 a day in 2021 prices because of the change of units many of the figures mentioned in this article will differ from the latest world bank figures explore the latest data and read more about the world bank s methodology poverty data explorer the 3 international poverty line from 1 90 to 2 15 a day the updated international poverty line translations of this article in other languages the japanese translation of this blog post is here 世 界 的 な 生 活 条 件 の 短 い 歴 史 そして 私 たちがそれを 知 っていることが 重 要 な 理 由 the portuguese translation is available here a curta história das condições globais de vida e por que é importante que a conheçamos endnotes the latest data can always be found on the world bank s poverty and inequality platform or viewed in our data explorer there are about 5 9 billion people older than 15 years of which as the chart shows 87 are literate the classification by skaaning and colleagues differentiates between particular types of autocracies and democracies here you can explore it in detail in this chart here all categories of autocratic regimes are summarized into one and all categories of democratic regimes are summarized into a second group political regimes are classified into the following regime types by skaaning et al non electoral autocracy one party autocracy multi party autocracy without an elected executive multi party autocracy exclusive democracy male democracy electoral democracy and full democracy polyarchy exclusive democracies and male democracies are not considered democracies as these so called non electoral democracies are regimes in which either both men and women don t have universal voting rights exclusive democracies or in which women don t have the right to vote male democracies this means that the share of the world population living in democracies is the share living in electoral democracies and full democracies polyarchies in the classification by skaaning et al the un repeatedly revised their population projections downward for the end of the century the demographers from iiasa expected an end to global population growth as soon as 2075 already before the un revised their estimates cite this work our articles and data visualizations rely on work from many different people and organizations when citing this article please also cite the underlying data sources this article can be cited as max roser 2016 the short history of global living conditions and why it matters that we know it published online at ourworldindata org retrieved from https archive ourworldindata org 20260909 233456 a history of global living conditions html online resource bibtex citation article owid a history of global living conditions author max roser title the short history of global living conditions and why it matters that we know it journal our world in data year 2016 note https archive ourworldindata org 20260909 233456 a history of global living conditions html past versions we are a live site and we keep our work maintained so our articles are often changed including the data you can browse previous versions of this work here browse past versions reuse this work freely all visualizations data and articles produced by our world in data are completely open access under the creative commons by license you have the permission to use distribute and reproduce these in any medium provided the source and authors are credited the data produced by third parties and made available by our world in data is subject to the license terms from the original third party authors we will always indicate the original source of the data in our documentation so you should always check the license of any such third party data before use and redistribution all of our charts can be embedded in any site", "source_text": "Why it matters that we do not know how our world is changing\nA single person can't change the world. The transformation of our living conditions was possible only because of collaboration. It is our collective brains and our collaborative effort that are needed for such a revolution.\nThere are big problems that remain. None of the above should give us reason to become complacent. On the contrary, it shows us that a lot of work still needs to be done — accomplishing the fastest reduction of extreme poverty is an important achievement, but the fact that 85% of the world lives on less than $30 per day is unacceptable. We also must not accept the restrictions of our liberty that remain. It is also clear that humanity’s impact on the environment is at a level that is not sustainable and is endangering the biosphere and climate on which we depend. We urgently need to reduce our impact, and on Our World in Data, you can find detailed information about the world's environmental problems.\nIt is far from certain that we will make progress against these problems — no iron law would ensure that the world continues this trend of improving living conditions. However, what is evident from the long-term perspective is that progress is possible and that the last 200 years have brought us to a better position than ever before to solve problems. Solving problems — big problems — is always a collaborative undertaking. The group of people that can work together today is a much stronger group than ever existed on this planet. Healthier, richer, and better educated.\nFor our history to be a source of encouragement, however, we have to know our history. The story that we tell ourselves about our history and our time matters. Because our hopes and efforts to build a better future are inextricably linked to our perception of the past, it is important to understand and communicate the global development of the present. An understanding of our efforts and our fellow humans is a vital condition to the fruitfulness of our endeavors. Knowing that we have come a long way in improving living conditions and the notion that our work is worthwhile is to us all what self-respect is to individuals. It is a necessary condition for improvement.\nFreedom is impossible without faith in free people. And if we are not aware of our history and falsely believe the opposite of what is true, we risk losing faith in each other.\nThe World Bank has updated its poverty and inequality data since the publication of this article\nThis article uses a previous release of the World Bank's poverty and inequality data, in which incomes were expressed in 2011 international dollars.\nThe World Bank has since updated its methods, and now measures incomes in 2021 international-$. As part of these changes, the International Poverty Line used to measure extreme poverty has also been updated: from $1.90 a day (in 2011 prices) to $2.15 a day (in 2017 prices) to $3 a day (in 2021 prices).\nBecause of the change of units, many of the figures mentioned in this article will differ from the latest World Bank figures.\nExplore the latest data and read more about the World Bank's methodology:\nPoverty Data Explorer\nThe $3 International Poverty Line\nFrom $1.90 to $2.15 a day: the updated International Poverty Line\nTranslations of this article in other languages\nThe Japanese translation of this blog post is here: 世界的な生活条件の短い歴史、そして私たちがそれを知っていることが重要な理由.\nThe Portuguese translation is available here: A curta história das condições globais de vida e por que é importante que a conheçamos.\nEndnotes\nThe latest data can always be found on the World Bank's Poverty and Inequality Platform or viewed in our Data Explorer.\nThere are about 5.9 billion people older than 15 years, of which, as the chart shows, 87% are literate.\nThe classification by Skaaning and colleagues differentiates between particular types of autocracies and democracies (here you can explore it in detail). In this chart here all categories of autocratic regimes are summarized into one, and all categories of democratic regimes are summarized into a second group.\nPolitical regimes are classified into the following regime types by Skaaning et al.: non-electoral autocracy, one-party autocracy, multi-party autocracy without an elected executive, multi-party autocracy, exclusive democracy, male democracy, electoral democracy, and full democracy (polyarchy).\nExclusive democracies and male democracies are not considered democracies, as these so-called “non-electoral democracies” are regimes in which either both men and women don’t have universal voting rights (exclusive democracies), or in which women don’t have the right to vote (male democracies).\nThis means that the share of the world population living in democracies is the share living in electoral democracies and full democracies (polyarchies), in the classification by Skaaning et al.\nThe UN repeatedly revised their population projections downward for the end of the century. The demographers from IIASA expected an end to global population growth as soon as 2075, already before the UN revised their estimates.\nCite this work\nOur articles and data visualizations rely on work from many different people and organizations. When citing this article, please also cite the underlying data sources. This article can be cited as:\nMax Roser (2016) - “The short history of global living conditions and why it matters that we know it” Published online at OurWorldinData.org. Retrieved from: 'https://archive.ourworldindata.org/20260909-233456/a-history-of-global-living-conditions.html' [Online Resource] (archived on September 9, 2026).\nBibTeX citation\n@article{owid-a-history-of-global-living-conditions,\nauthor = {Max Roser},\ntitle = {The short history of global living conditions and why it matters that we know it},\njournal = {Our World in Data},\nyear = {2016},\nnote = {https://archive.ourworldindata.org/20260909-233456/a-history-of-global-living-conditions.html}\n}\nPast versions\nWe are a live site and we keep our work maintained. So our articles are often changed, including the data. You can browse previous versions of this work here.\nBrowse past versions\nReuse this work freely\nAll visualizations, data, and articles produced by Our World in Data are completely open access under the Creative Commons BY license. You have the permission to use, distribute, and reproduce these in any medium, provided the source and authors are credited.\nThe data produced by third parties and made available by Our World in Data is subject to the license terms from the original third-party authors. We will always indicate the original source of the data in our documentation, so you should always check the license of any such third-party data before use and redistribution.\nAll of our charts can be embedded in any site.", "segmentation_method": "reviewed_source_semantics", "label": "Why it matters that we do not know how our world is changing", "source_line_range": [ 75, 117 ] } ], "ending": { "text": "All of our charts can be embedded in any site." } } }, { "id": "article-082", "name": "How sex chromosomes get trapped into nonrecombination", "url": "https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.3001718", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "How\\ sex\\ chromosomes\\ get\\ trapped\\ into\\ nonrecombination" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "body-component-2", "alternatives": [ "Editorial Note" ] }, { "id": "body-component-3", "alternatives": [ "] discusses a model presented in a Research Article by Jay et al." ] }, { "id": "body-component-4", "alternatives": [ "This Editorial Note informs readers that the Research Article" ] }, { "id": "body-component-5", "alternatives": [ "The author notes that the processes initially reported in the retracted article and discussed in this Primer have" ] }, { "id": "body-component-6", "alternatives": [ "The PLOS Biology Editors (2025)" ] }, { "id": "body-component-7", "alternatives": [ "Suppression of recombination along the Y chromosome leads to its degeneration, so why does a process with such" ] }, { "id": "body-component-8", "alternatives": [ "Figures" ] }, { "id": "body-component-9", "alternatives": [ "Käfer J (2022) How sex chromosomes get trapped into nonrecombination. PLoS Biol 20(7): e3001718." ] }, { "id": "body-component-10", "alternatives": [ "Published: July 19, 2022" ] }, { "id": "body-component-11", "alternatives": [ "© 2022 Jos Käfer. This is an open access article distributed under the terms of the" ] }, { "id": "body-component-12", "alternatives": [ "The author received no specific funding for this work." ] }, { "id": "body-component-13", "alternatives": [ "Competing interests:" ] }, { "id": "body-component-14", "alternatives": [ "Sex chromosomes, like those in humans with a large X and small Y, have a long evolutionary history. Their difference is" ] }, { "id": "body-component-15", "alternatives": [ "Recombination is essential for selection by creating new combinations of alleles and thus achieves the double task of" ] }, { "id": "body-component-16", "alternatives": [ "In a population, stretches of DNA with more or less mutations exist. It is actually beneficial, on the short term, to" ] }, { "id": "body-component-17", "alternatives": [ "However, as Jay and colleagues show, in the vicinity of a sex-determining locus, the result is quite different" ] }, { "id": "body-component-18", "alternatives": [ "Schematic representation of the processes modeled by Jay and colleagues." ] }, { "id": "body-component-19", "alternatives": [ "Surely, the selection of the inversion and the accumulation of deleterious mutations on it occur simultaneously, and" ] }, { "id": "body-component-20", "alternatives": [ "Two other convincing models have been published recently, in which the suppression of recombination initially evolves" ] }, { "id": "body-component-21", "alternatives": [ "There are important differences between nonrecombining regions; for example, in plant sex chromosomes, large" ] }, { "id": "body-component-22", "alternatives": [ "References" ] }, { "id": "body-component-23", "alternatives": [ "Graves JA. Sex chromosome specialization and degeneration in mammals. Cell. 2006;124(5):901–14. pmid:16530039" ] }, { "id": "body-component-24", "alternatives": [ "Ponnikas S, Sigeman H, Abbott JK, Hansson B. Why do sex chromosomes stop recombining? Trends Genet. 2018;34(7):492–503." ] }, { "id": "body-component-25", "alternatives": [ "Branco S, Carpentier F, Rodriguez de la Vega RC, Badouin H, Snirc A, Le Prieur S, et al. Multiple convergent supergene" ] }, { "id": "body-component-26", "alternatives": [ "Jay P, Tezenas E, Véber A, Giraud T. Sheltering of deleterious mutations explain the stepwise extension of" ] }, { "id": "body-component-27", "alternatives": [ "Nielsen R. Evolution. Why sex? Science. 2006;311(5763):960–1. pmid:16484481" ] }, { "id": "body-component-28", "alternatives": [ "Charlesworth D, Charlesworth B, Marais G. Steps in the evolution of heteromorphic sex chromosomes. Heredity." ] }, { "id": "body-component-29", "alternatives": [ "Jeffries DL, Gerchen JF, Scharmann M, Pannell JR. A neutral model for the loss of recombination on sex chromosomes." ] }, { "id": "body-component-30", "alternatives": [ "Lenormand T, Roze D. Y recombination arrest and degeneration in the absence of sexual dimorphism. Science." ] }, { "id": "body-component-31", "alternatives": [ "Renner SS, Müller NA. Plant sex chromosomes defy evolutionary models of expanding recombination suppression and genetic" ] }, { "id": "shell-1", "alternatives": [ "SKIP TO MAIN CONTENT" ] }, { "id": "shell-2", "alternatives": [ "Advertisement" ] }, { "id": "shell-3", "alternatives": [ "plos.org" ] }, { "id": "shell-4", "alternatives": [ "Create account" ] }, { "id": "shell-5", "alternatives": [ "Sign in" ] }, { "id": "shell-6", "alternatives": [ "About" ] }, { "id": "shell-7", "alternatives": [ "Browse" ] }, { "id": "shell-8", "alternatives": [ "Publish" ] }, { "id": "shell-9", "alternatives": [ "advanced search" ] }, { "id": "shell-10", "alternatives": [ "OPEN ACCESS" ] }, { "id": "shell-11", "alternatives": [ "PRIMER" ] }, { "id": "shell-12", "alternatives": [ "Jos Käfer" ] }, { "id": "shell-13", "alternatives": [ "Published: July 19, 2022" ] }, { "id": "shell-14", "alternatives": [ "Article" ] }, { "id": "shell-15", "alternatives": [ "Authors" ] }, { "id": "shell-16", "alternatives": [ "Metrics" ] }, { "id": "shell-17", "alternatives": [ "Comments" ] }, { "id": "shell-18", "alternatives": [ "Media Coverage" ] }, { "id": "shell-19", "alternatives": [ "Abstract" ] }, { "id": "shell-20", "alternatives": [ "References" ] }, { "id": "shell-21", "alternatives": [ "Reader Comments" ] }, { "id": "shell-22", "alternatives": [ "Figures" ] }, { "id": "shell-23", "alternatives": [ "Download PDF" ] }, { "id": "shell-24", "alternatives": [ "Print" ] }, { "id": "shell-25", "alternatives": [ "Share" ] }, { "id": "shell-26", "alternatives": [ "Related PLOS Articles" ] }, { "id": "shell-27", "alternatives": [ "COMMENTARY pertains to" ] }, { "id": "shell-28", "alternatives": [ "has COMMENTARY" ] }, { "id": "shell-29", "alternatives": [ "View Page PDF" ] }, { "id": "shell-30", "alternatives": [ "Subject Areas" ] }, { "id": "shell-31", "alternatives": [ "Deletion mutation" ] }, { "id": "shell-32", "alternatives": [ "Sex chromosomes" ] }, { "id": "shell-33", "alternatives": [ "Genetic loci" ] }, { "id": "shell-34", "alternatives": [ "Homozygosity" ] }, { "id": "shell-35", "alternatives": [ "Mutation" ] }, { "id": "shell-36", "alternatives": [ "Y chromosomes" ] }, { "id": "shell-37", "alternatives": [ "DNA recombination" ] }, { "id": "shell-38", "alternatives": [ "Chromosomal inversions" ] }, { "id": "shell-39", "alternatives": [ "Publications" ] }, { "id": "shell-40", "alternatives": [ "PLOS Aging and Health" ] }, { "id": "shell-41", "alternatives": [ "PLOS Biology" ] }, { "id": "shell-42", "alternatives": [ "PLOS Climate" ] }, { "id": "shell-43", "alternatives": [ "PLOS Complex Systems" ] }, { "id": "shell-44", "alternatives": [ "PLOS Computational Biology" ] }, { "id": "shell-45", "alternatives": [ "PLOS Digital Health" ] }, { "id": "shell-46", "alternatives": [ "PLOS Ecosystems" ] }, { "id": "shell-47", "alternatives": [ "PLOS Genetics" ] }, { "id": "shell-48", "alternatives": [ "PLOS Global Public Health" ] }, { "id": "shell-49", "alternatives": [ "PLOS Medicine" ] }, { "id": "shell-50", "alternatives": [ "PLOS Mental Health" ] }, { "id": "shell-51", "alternatives": [ "PLOS Neglected Tropical Diseases" ] }, { "id": "shell-52", "alternatives": [ "PLOS One" ] }, { "id": "shell-53", "alternatives": [ "PLOS Pathogens" ] }, { "id": "shell-54", "alternatives": [ "PLOS Sustainability and Transformation" ] }, { "id": "shell-55", "alternatives": [ "PLOS Water" ] }, { "id": "shell-56", "alternatives": [ "Home" ] }, { "id": "shell-57", "alternatives": [ "Blogs" ] }, { "id": "shell-58", "alternatives": [ "Collections" ] }, { "id": "shell-59", "alternatives": [ "Give feedback" ] }, { "id": "shell-60", "alternatives": [ "LOCKSS" ] }, { "id": "shell-61", "alternatives": [ "Privacy Policy" ] }, { "id": "shell-62", "alternatives": [ "Terms of Use" ] }, { "id": "shell-63", "alternatives": [ "Advertise" ] }, { "id": "shell-64", "alternatives": [ "Media Inquiries" ] }, { "id": "shell-65", "alternatives": [ "Contact" ] }, { "id": "shell-66", "alternatives": [ "PLOS is a nonprofit 501(c)(3) corporation" ] }, { "id": "fixed-related-research", "alternatives": [ "Sheltering of deleterious mutations explains the stepwise extension of recombination suppression on sex chromosomes and other supergenes" ] }, { "id": "fixed-related-note", "alternatives": [ "Editorial Note: How sex chromosomes get trapped into nonrecombination" ] } ] }, "rule_review": { "status": "reviewed", "reason": "User authorized suitable article substitutions to reach100qualified cases. Independent saved direct initial source reviewed without clicks, expansion, login or scroll. Complete originalHTML96972chars matches captured html_length. Full visible title and2025Editorial Note (all3paragraphs plus dated citation and link), abstract, fixed citation/publication/copyright/funding/conflict statements, all seven main prose paragraphs, full ordinary figure caption/explanation/download/DOI text, and all nine bibliography entries with owned links retained. Root performed only user-authorized authoring privacy dismissal Save Selected Preferences and Close with all optional settings off; no content expansion/login/navigation. Exact before/after #artText, .amendment-editorial-note and #artTitle DOM text equality independently checked. #artText geometry includes full ordinary source through final reference, no masks or body clipping; nativeAX corroborates all sections. Editorial Note explicitly reports cited Research Article retracted; this required clarification is retained, without representing its model as validated science. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "How sex chromosomes get trapped into nonrecombination" ], "html_selector": "#artTitle,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-082/comment-qualification-reference-r5.json", "sha256": "fb064bcdcef401fc77082d231f1207a2edc7590d4872fd12a861e76a89a0a501", "chars": 839, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "How sex chromosomes get trapped into nonrecombination\n\nEditorial Note\n\nThis Primer [1] discusses a model presented in a Research Article by Jay et al. [2] published in the same issue of PLOS Biology.\n\nThis Editorial Note informs readers that the Research Article [2] (discussed in this Primer as reference 4) has been retracted [3].\n\nThe author notes that the processes initially reported in the retracted article and discussed in this Primer have individually also been reported in other studies, notably the role of inversions in establishing recombination suppression [4] and the sheltering of deleterious mutations [5], and continue to be debated.\n\n27 Mar 2025: The PLOS Biology Editors (2025) Editorial Note: How sex chromosomes get trapped into nonrecombination. PLOS Biology 23(3): e3003107. https://doi.org/10.1371/journal.pbio.3003107 View editorial note\n\nSuppression of recombination along the Y chromosome leads to its degeneration, so why does a process with such potentially deleterious consequences arise? In this issue of PLOS Biology, a new model reveals how and why this might be.\n\nFigures\n\nCitation: Käfer J (2022) How sex chromosomes get trapped into nonrecombination. PLoS Biol 20(7): e3001718. https://doi.org/10.1371/journal.pbio.3001718\n\nPublished: July 19, 2022\n\nCopyright: © 2022 Jos Käfer. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.\n\nFunding: The author received no specific funding for this work.\n\nCompeting interests: The author has declared that no competing interests exist.\n\nSex chromosomes, like those in humans with a large X and small Y, have a long evolutionary history. Their difference is a dramatic consequence of the total absence of recombination of a portion of the Y chromosome, which is present in a single copy in males (and absent in females). The Y chromosome will therefore inevitably accumulate deleterious mutations, which cause it to degrade and lose genes, and maybe even to disappear [1]. While the effects of recombination suppression are well understood, it is not clear how it actually arises. Genes with sex-antagonistic effects could be responsible for this. An allele could, for example, have positive effects on male fitness and negative effects on female fitness; selection would favor linkage to the sex-determining gene on the Y. While this hypothesis is attractive, empirical support for it is weak or absent [2] and is sometimes even contradicted. For example, in fungi, where there is no sexual dimorphism, large nonrecombining regions have been found [3]. Jay and colleagues, in this issue of PLOS Biology [4], present a model for recombination suppression with minimal ingredients. They show that recombination suppression can arise because initially, fragments of chromosomes with fewer deleterious mutations than the population average exist, and these are thus favored. It’s somewhat ironic that this advantage rapidly turns into a trap with the precise contrary effect: the accumulation of deleterious mutations.\n\nRecombination is essential for selection by creating new combinations of alleles and thus achieves the double task of keeping beneficial mutations while getting rid of the deleterious ones [5]. Without recombination, a beneficial allele that becomes fixed just drags all the deleterious mutations it is linked to along or it is lost if the cumulative effect of all deleterious mutations is too strong. The absence of recombination leads to a ratchet-like mechanism (“Muller’s ratchet”): As soon as there is no mutation-free strand of DNA anymore, it’s impossible to restore the original strand; in a next step, there will be at least 2 mutations on each strand, then 3, etc., in a never-ending process. With recombination, the average number of mutations on a strand of DNA will stabilize due to an equilibrium between mutation (which is inevitable) and selection.\n\nIn a population, stretches of DNA with more or less mutations exist. It is actually beneficial, on the short term, to preserve “lucky” stretches of DNA by preventing them from recombining with more mutation-laden counterparts. The most likely mechanism of recombination suppression is inversion of a part of the chromosome, which prevents DNA to pair properly during meiosis. As most deleterious mutations cause loss of function, they are largely recessive and have much stronger effects when homozygous. Thus, individuals carrying “lucky” inversions are favored as long as the frequency of the inversion in the population is low and homozygotes for it are very rare. However, as the frequency increases, homozygosity results in strong counterselection, which prevents such inversions to become fixed on autosomes.\n\nHowever, as Jay and colleagues show, in the vicinity of a sex-determining locus, the result is quite different (Fig 1). Such loci are particular, because heterozygous individuals (XY) reproduce with homozygous individuals (XX), and the sex-determining locus on the Y never occurs as homozygote. Thus, a “lucky” inversion that encompasses this locus only experiences the positive effects related to heterozygote advantage and not the counterselection due to homozygosity. It can thus be fixed on the Y chromosome. Of course, it will experience the well-known disadvantages of recombination suppression, which lead inevitably to degeneration. But once the inversion is fixed, it’s too late: The only way out would be to restore recombination by the exact reversal of the inversion, which Jay and colleagues show to be very unlikely in most cases.\n\nDownload: PNG larger image TIFF original image Fig 1. Schematic representation of the processes modeled by Jay and colleagues. Consider chromosomes with a sex-determining locus (yellow) and several deleterious mutations (gray bars). For the sake of simplicity, only 1 pair of chromosomes of 3 individuals of the heterogametic sex (XY males or ZW females) is shown. (a) The chromosomes all carry some deleterious mutations. (b) A “lucky” inversion (pink) captures fewer mutations than the population average and also includes the sex-determining locus. (c) This inversion gets fixed in the population and starts accumulating mutations. (d) As recombination is completely impossible in this region, it accumulates mutations and carries more than other regions in the genome. However, adjacent or (partially) overlapping, a new “lucky” inversion can arise (cyan). (e) This lucky inversion can become fixed as well, thereby creating a new evolutionary stratum. https://doi.org/10.1371/journal.pbio.3001718.g001\n\nSurely, the selection of the inversion and the accumulation of deleterious mutations on it occur simultaneously, and the exact outcome (fixation or loss of the inversion) depends on the balance of these, and on chance. But, although the probability of fixation might be small, the result is irreversible. And it can occur repeatedly, leading to so-called evolutionary strata [6]. The model is applicable to other so-called “supergenes,” including ZW sex chromosomes and mating type loci.\n\nTwo other convincing models have been published recently, in which the suppression of recombination initially evolves without selection for sexual specialization. Jeffries and colleagues [7] consider that the accumulation of sequence divergence, possible when the recombination rates are lower around the sex-determining locus, can by itself reduce the probability of recombination, creating a positive feedback loop leading to the complete loss of recombination. This model is attractive because it doesn’t require inversions to happen, but it is not clear if the process can occur in reality. Lenormand and Roze [8] also considered fixation of recombination suppression (e.g., inversions) around a sex-determining locus due to less mutational load, as in the model of Jay and colleagues (Fig 1). However, they identify an entirely different mechanism that prevents the restoration of recombination: This happens through the evolution of dosage compensation, even in the absence of sex-specific optima for gene expression. The processes described in these models can occur together, and none forbid sex-antagonistic selection, which could thus also interfere.\n\nThere are important differences between nonrecombining regions; for example, in plant sex chromosomes, large nonrecombining regions can evolve quite quickly in some species, leading to very different X and Y chromosomes, while other, much older sex chromosomes have only small nonrecombining regions [9]. The reasons for these differences are not yet understood. Could these new models shed new light on this enigma? According to Jay and colleagues, selection during a haploid phase in the life cycle (plants), as well as the turnover of degenerated alleles in multiallelic systems (e.g., genetic self-incompatibility), could limit the expansion of the nonrecombining region. Furthermore, population size, the degree of outcrossing, and sexual dimorphism could play a role. Finally, inherently genomic features such as the distribution of recombination events along the genome, or the frequency and size of inversions, certainly influence the dynamics of recombination suppression, but these features have only been quantified in a few model species. A clear-cut answer is unlikely to emerge as the observed variation is large, even within clades, so the characterization of recombination suppression in more species is necessary to understand the interaction of the multiple factors involved.\n\nReferences\n\n1. Graves JA. Sex chromosome specialization and degeneration in mammals. Cell. 2006;124(5):901–14. pmid:16530039 View Article PubMed/NCBI Google Scholar\n\n2. Ponnikas S, Sigeman H, Abbott JK, Hansson B. Why do sex chromosomes stop recombining? Trends Genet. 2018;34(7):492–503. pmid:29716744 View Article PubMed/NCBI Google Scholar\n\n3. Branco S, Carpentier F, Rodriguez de la Vega RC, Badouin H, Snirc A, Le Prieur S, et al. Multiple convergent supergene evolution events in mating-type chromosomes. Nat Commun. 2018;9(1):2000. pmid:29784936 View Article PubMed/NCBI Google Scholar\n\n4. Jay P, Tezenas E, Véber A, Giraud T. Sheltering of deleterious mutations explain the stepwise extension of recombination suppression on sex chromosomes and other supergenes. PLoS Biol. 2022;20(7):e3001698. View Article Google Scholar\n\n5. Nielsen R. Evolution. Why sex? Science. 2006;311(5763):960–1. pmid:16484481 View Article PubMed/NCBI Google Scholar\n\n6. Charlesworth D, Charlesworth B, Marais G. Steps in the evolution of heteromorphic sex chromosomes. Heredity. 2005;95(2):118–28. pmid:15931241 View Article PubMed/NCBI Google Scholar\n\n7. Jeffries DL, Gerchen JF, Scharmann M, Pannell JR. A neutral model for the loss of recombination on sex chromosomes. Philos Trans R Soc Lond B Biol Sci. 1832;2021(376):20200096. pmid:34247504 View Article PubMed/NCBI Google Scholar\n\n8. Lenormand T, Roze D. Y recombination arrest and degeneration in the absence of sexual dimorphism. Science. 2022;375(6581):663–6. pmid:35143289 View Article PubMed/NCBI Google Scholar\n\n9. Renner SS, Müller NA. Plant sex chromosomes defy evolutionary models of expanding recombination suppression and genetic degeneration. Nat Plants. 2021;7(4):392–402. pmid:33782581 View Article PubMed/NCBI Google Scholar", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 4, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "how sex chromosomes get trapped into nonrecombination", "source_text": "How sex chromosomes get trapped into nonrecombination", "segmentation_method": "reviewed_source_semantics", "label": "开篇:How sex chromosomes get trapped into nonrecombination", "source_line_range": [ 1, 2 ] }, { "id": "body-region-2", "text": "editorial note this primer 1 discusses a model presented in a research article by jay et al 2 published in the same issue of plos biology this editorial note informs readers that the research article 2 has been retracted 3 the author notes that the processes initially reported in the retracted article and discussed in this primer have individually also been reported in other studies notably the role of inversions in establishing recombination suppression 4 and the sheltering of deleterious mutations 5 and continue to be debated 27 mar 2025 the plos biology editors 2025 editorial note how sex chromosomes get trapped into nonrecombination plos biology 23 3 e3003107 https doi org 10 1371 journal pbio 3003107 view editorial note suppression of recombination along the y chromosome leads to its degeneration so why does a process with such potentially deleterious consequences arise in this issue of plos biology a new model reveals how and why this might be", "source_text": "Editorial Note\n\nThis Primer [1] discusses a model presented in a Research Article by Jay et al. [2] published in the same issue of PLOS Biology.\n\nThis Editorial Note informs readers that the Research Article [2] (discussed in this Primer as reference 4) has been retracted [3].\n\nThe author notes that the processes initially reported in the retracted article and discussed in this Primer have individually also been reported in other studies, notably the role of inversions in establishing recombination suppression [4] and the sheltering of deleterious mutations [5], and continue to be debated.\n\n27 Mar 2025: The PLOS Biology Editors (2025) Editorial Note: How sex chromosomes get trapped into nonrecombination. PLOS Biology 23(3): e3003107. https://doi.org/10.1371/journal.pbio.3003107 View editorial note\n\nSuppression of recombination along the Y chromosome leads to its degeneration, so why does a process with such potentially deleterious consequences arise? In this issue of PLOS Biology, a new model reveals how and why this might be.", "segmentation_method": "reviewed_source_semantics", "label": "Editorial Note", "source_line_range": [ 3, 14 ] }, { "id": "body-region-3", "text": "figures citation käfer j 2022 how sex chromosomes get trapped into nonrecombination plos biol 20 7 e3001718 https doi org 10 1371 journal pbio 3001718 published july 19 2022 copyright 2022 jos käfer this is an open access article distributed under the terms of the creative commons attribution license which permits unrestricted use distribution and reproduction in any medium provided the original author and source are credited funding the author received no specific funding for this work competing interests the author has declared that no competing interests exist sex chromosomes like those in humans with a large x and small y have a long evolutionary history their difference is a dramatic consequence of the total absence of recombination of a portion of the y chromosome which is present in a single copy in males and absent in females the y chromosome will therefore inevitably accumulate deleterious mutations which cause it to degrade and lose genes and maybe even to disappear 1 while the effects of recombination suppression are well understood it is not clear how it actually arises genes with sex antagonistic effects could be responsible for this an allele could for example have positive effects on male fitness and negative effects on female fitness selection would favor linkage to the sex determining gene on the y while this hypothesis is attractive empirical support for it is weak or absent 2 and is sometimes even contradicted for example in fungi where there is no sexual dimorphism large nonrecombining regions have been found 3 jay and colleagues in this issue of plos biology 4 present a model for recombination suppression with minimal ingredients they show that recombination suppression can arise because initially fragments of chromosomes with fewer deleterious mutations than the population average exist and these are thus favored it s somewhat ironic that this advantage rapidly turns into a trap with the precise contrary effect the accumulation of deleterious mutations recombination is essential for selection by creating new combinations of alleles and thus achieves the double task of keeping beneficial mutations while getting rid of the deleterious ones 5 without recombination a beneficial allele that becomes fixed just drags all the deleterious mutations it is linked to along or it is lost if the cumulative effect of all deleterious mutations is too strong the absence of recombination leads to a ratchet like mechanism muller s ratchet as soon as there is no mutation free strand of dna anymore it s impossible to restore the original strand in a next step there will be at least 2 mutations on each strand then 3 etc in a never ending process with recombination the average number of mutations on a strand of dna will stabilize due to an equilibrium between mutation which is inevitable and selection in a population stretches of dna with more or less mutations exist it is actually beneficial on the short term to preserve lucky stretches of dna by preventing them from recombining with more mutation laden counterparts the most likely mechanism of recombination suppression is inversion of a part of the chromosome which prevents dna to pair properly during meiosis as most deleterious mutations cause loss of function they are largely recessive and have much stronger effects when homozygous thus individuals carrying lucky inversions are favored as long as the frequency of the inversion in the population is low and homozygotes for it are very rare however as the frequency increases homozygosity results in strong counterselection which prevents such inversions to become fixed on autosomes however as jay and colleagues show in the vicinity of a sex determining locus the result is quite different fig 1 such loci are particular because heterozygous individuals xy reproduce with homozygous individuals xx and the sex determining locus on the y never occurs as homozygote thus a lucky inversion that encompasses this locus only experiences the positive effects related to heterozygote advantage and not the counterselection due to homozygosity it can thus be fixed on the y chromosome of course it will experience the well known disadvantages of recombination suppression which lead inevitably to degeneration but once the inversion is fixed it s too late the only way out would be to restore recombination by the exact reversal of the inversion which jay and colleagues show to be very unlikely in most cases download png larger image tiff original image fig 1 schematic representation of the processes modeled by jay and colleagues consider chromosomes with a sex determining locus yellow and several deleterious mutations gray bars for the sake of simplicity only 1 pair of chromosomes of 3 individuals of the heterogametic sex xy males or zw females is shown a the chromosomes all carry some deleterious mutations b a lucky inversion pink captures fewer mutations than the population average and also includes the sex determining locus c this inversion gets fixed in the population and starts accumulating mutations d as recombination is completely impossible in this region it accumulates mutations and carries more than other regions in the genome however adjacent or partially overlapping a new lucky inversion can arise cyan e this lucky inversion can become fixed as well thereby creating a new evolutionary stratum https doi org 10 1371 journal pbio 3001718 g001 surely the selection of the inversion and the accumulation of deleterious mutations on it occur simultaneously and the exact outcome fixation or loss of the inversion depends on the balance of these and on chance but although the probability of fixation might be small the result is irreversible and it can occur repeatedly leading to so called evolutionary strata 6 the model is applicable to other so called supergenes including zw sex chromosomes and mating type loci two other convincing models have been published recently in which the suppression of recombination initially evolves without selection for sexual specialization jeffries and colleagues 7 consider that the accumulation of sequence divergence possible when the recombination rates are lower around the sex determining locus can by itself reduce the probability of recombination creating a positive feedback loop leading to the complete loss of recombination this model is attractive because it doesn t require inversions to happen but it is not clear if the process can occur in reality lenormand and roze 8 also considered fixation of recombination suppression e g inversions around a sex determining locus due to less mutational load as in the model of jay and colleagues fig 1 however they identify an entirely different mechanism that prevents the restoration of recombination this happens through the evolution of dosage compensation even in the absence of sex specific optima for gene expression the processes described in these models can occur together and none forbid sex antagonistic selection which could thus also interfere there are important differences between nonrecombining regions for example in plant sex chromosomes large nonrecombining regions can evolve quite quickly in some species leading to very different x and y chromosomes while other much older sex chromosomes have only small nonrecombining regions 9 the reasons for these differences are not yet understood could these new models shed new light on this enigma according to jay and colleagues selection during a haploid phase in the life cycle plants as well as the turnover of degenerated alleles in multiallelic systems e g genetic self incompatibility could limit the expansion of the nonrecombining region furthermore population size the degree of outcrossing and sexual dimorphism could play a role finally inherently genomic features such as the distribution of recombination events along the genome or the frequency and size of inversions certainly influence the dynamics of recombination suppression but these features have only been quantified in a few model species a clear cut answer is unlikely to emerge as the observed variation is large even within clades so the characterization of recombination suppression in more species is necessary to understand the interaction of the multiple factors involved", "source_text": "Figures\n\nCitation: Käfer J (2022) How sex chromosomes get trapped into nonrecombination. PLoS Biol 20(7): e3001718. https://doi.org/10.1371/journal.pbio.3001718\n\nPublished: July 19, 2022\n\nCopyright: © 2022 Jos Käfer. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.\n\nFunding: The author received no specific funding for this work.\n\nCompeting interests: The author has declared that no competing interests exist.\n\nSex chromosomes, like those in humans with a large X and small Y, have a long evolutionary history. Their difference is a dramatic consequence of the total absence of recombination of a portion of the Y chromosome, which is present in a single copy in males (and absent in females). The Y chromosome will therefore inevitably accumulate deleterious mutations, which cause it to degrade and lose genes, and maybe even to disappear [1]. While the effects of recombination suppression are well understood, it is not clear how it actually arises. Genes with sex-antagonistic effects could be responsible for this. An allele could, for example, have positive effects on male fitness and negative effects on female fitness; selection would favor linkage to the sex-determining gene on the Y. While this hypothesis is attractive, empirical support for it is weak or absent [2] and is sometimes even contradicted. For example, in fungi, where there is no sexual dimorphism, large nonrecombining regions have been found [3]. Jay and colleagues, in this issue of PLOS Biology [4], present a model for recombination suppression with minimal ingredients. They show that recombination suppression can arise because initially, fragments of chromosomes with fewer deleterious mutations than the population average exist, and these are thus favored. It’s somewhat ironic that this advantage rapidly turns into a trap with the precise contrary effect: the accumulation of deleterious mutations.\n\nRecombination is essential for selection by creating new combinations of alleles and thus achieves the double task of keeping beneficial mutations while getting rid of the deleterious ones [5]. Without recombination, a beneficial allele that becomes fixed just drags all the deleterious mutations it is linked to along or it is lost if the cumulative effect of all deleterious mutations is too strong. The absence of recombination leads to a ratchet-like mechanism (“Muller’s ratchet”): As soon as there is no mutation-free strand of DNA anymore, it’s impossible to restore the original strand; in a next step, there will be at least 2 mutations on each strand, then 3, etc., in a never-ending process. With recombination, the average number of mutations on a strand of DNA will stabilize due to an equilibrium between mutation (which is inevitable) and selection.\n\nIn a population, stretches of DNA with more or less mutations exist. It is actually beneficial, on the short term, to preserve “lucky” stretches of DNA by preventing them from recombining with more mutation-laden counterparts. The most likely mechanism of recombination suppression is inversion of a part of the chromosome, which prevents DNA to pair properly during meiosis. As most deleterious mutations cause loss of function, they are largely recessive and have much stronger effects when homozygous. Thus, individuals carrying “lucky” inversions are favored as long as the frequency of the inversion in the population is low and homozygotes for it are very rare. However, as the frequency increases, homozygosity results in strong counterselection, which prevents such inversions to become fixed on autosomes.\n\nHowever, as Jay and colleagues show, in the vicinity of a sex-determining locus, the result is quite different (Fig 1). Such loci are particular, because heterozygous individuals (XY) reproduce with homozygous individuals (XX), and the sex-determining locus on the Y never occurs as homozygote. Thus, a “lucky” inversion that encompasses this locus only experiences the positive effects related to heterozygote advantage and not the counterselection due to homozygosity. It can thus be fixed on the Y chromosome. Of course, it will experience the well-known disadvantages of recombination suppression, which lead inevitably to degeneration. But once the inversion is fixed, it’s too late: The only way out would be to restore recombination by the exact reversal of the inversion, which Jay and colleagues show to be very unlikely in most cases.\n\nDownload: PNG larger image TIFF original image Fig 1. Schematic representation of the processes modeled by Jay and colleagues. Consider chromosomes with a sex-determining locus (yellow) and several deleterious mutations (gray bars). For the sake of simplicity, only 1 pair of chromosomes of 3 individuals of the heterogametic sex (XY males or ZW females) is shown. (a) The chromosomes all carry some deleterious mutations. (b) A “lucky” inversion (pink) captures fewer mutations than the population average and also includes the sex-determining locus. (c) This inversion gets fixed in the population and starts accumulating mutations. (d) As recombination is completely impossible in this region, it accumulates mutations and carries more than other regions in the genome. However, adjacent or (partially) overlapping, a new “lucky” inversion can arise (cyan). (e) This lucky inversion can become fixed as well, thereby creating a new evolutionary stratum. https://doi.org/10.1371/journal.pbio.3001718.g001\n\nSurely, the selection of the inversion and the accumulation of deleterious mutations on it occur simultaneously, and the exact outcome (fixation or loss of the inversion) depends on the balance of these, and on chance. But, although the probability of fixation might be small, the result is irreversible. And it can occur repeatedly, leading to so-called evolutionary strata [6]. The model is applicable to other so-called “supergenes,” including ZW sex chromosomes and mating type loci.\n\nTwo other convincing models have been published recently, in which the suppression of recombination initially evolves without selection for sexual specialization. Jeffries and colleagues [7] consider that the accumulation of sequence divergence, possible when the recombination rates are lower around the sex-determining locus, can by itself reduce the probability of recombination, creating a positive feedback loop leading to the complete loss of recombination. This model is attractive because it doesn’t require inversions to happen, but it is not clear if the process can occur in reality. Lenormand and Roze [8] also considered fixation of recombination suppression (e.g., inversions) around a sex-determining locus due to less mutational load, as in the model of Jay and colleagues (Fig 1). However, they identify an entirely different mechanism that prevents the restoration of recombination: This happens through the evolution of dosage compensation, even in the absence of sex-specific optima for gene expression. The processes described in these models can occur together, and none forbid sex-antagonistic selection, which could thus also interfere.\n\nThere are important differences between nonrecombining regions; for example, in plant sex chromosomes, large nonrecombining regions can evolve quite quickly in some species, leading to very different X and Y chromosomes, while other, much older sex chromosomes have only small nonrecombining regions [9]. The reasons for these differences are not yet understood. Could these new models shed new light on this enigma? According to Jay and colleagues, selection during a haploid phase in the life cycle (plants), as well as the turnover of degenerated alleles in multiallelic systems (e.g., genetic self-incompatibility), could limit the expansion of the nonrecombining region. Furthermore, population size, the degree of outcrossing, and sexual dimorphism could play a role. Finally, inherently genomic features such as the distribution of recombination events along the genome, or the frequency and size of inversions, certainly influence the dynamics of recombination suppression, but these features have only been quantified in a few model species. A clear-cut answer is unlikely to emerge as the observed variation is large, even within clades, so the characterization of recombination suppression in more species is necessary to understand the interaction of the multiple factors involved.", "segmentation_method": "reviewed_source_semantics", "label": "Figures", "source_line_range": [ 15, 42 ] }, { "id": "body-region-4", "text": "references 1 graves ja sex chromosome specialization and degeneration in mammals cell 2006 124 5 901 14 pmid 16530039 view article pubmed ncbi google scholar 2 ponnikas s sigeman h abbott jk hansson b why do sex chromosomes stop recombining trends genet 2018 34 7 492 503 pmid 29716744 view article pubmed ncbi google scholar 3 branco s carpentier f rodriguez de la vega rc badouin h snirc a le prieur s et al multiple convergent supergene evolution events in mating type chromosomes nat commun 2018 9 1 2000 pmid 29784936 view article pubmed ncbi google scholar 4 jay p tezenas e véber a giraud t sheltering of deleterious mutations explain the stepwise extension of recombination suppression on sex chromosomes and other supergenes plos biol 2022 20 7 e3001698 view article google scholar 5 nielsen r evolution why sex science 2006 311 5763 960 1 pmid 16484481 view article pubmed ncbi google scholar 6 charlesworth d charlesworth b marais g steps in the evolution of heteromorphic sex chromosomes heredity 2005 95 2 118 28 pmid 15931241 view article pubmed ncbi google scholar 7 jeffries dl gerchen jf scharmann m pannell jr a neutral model for the loss of recombination on sex chromosomes philos trans r soc lond b biol sci 1832 2021 376 20200096 pmid 34247504 view article pubmed ncbi google scholar 8 lenormand t roze d y recombination arrest and degeneration in the absence of sexual dimorphism science 2022 375 6581 663 6 pmid 35143289 view article pubmed ncbi google scholar 9 renner ss müller na plant sex chromosomes defy evolutionary models of expanding recombination suppression and genetic degeneration nat plants 2021 7 4 392 402 pmid 33782581 view article pubmed ncbi google scholar", "source_text": "References\n\n1. Graves JA. Sex chromosome specialization and degeneration in mammals. Cell. 2006;124(5):901–14. pmid:16530039 View Article PubMed/NCBI Google Scholar\n\n2. Ponnikas S, Sigeman H, Abbott JK, Hansson B. Why do sex chromosomes stop recombining? Trends Genet. 2018;34(7):492–503. pmid:29716744 View Article PubMed/NCBI Google Scholar\n\n3. Branco S, Carpentier F, Rodriguez de la Vega RC, Badouin H, Snirc A, Le Prieur S, et al. Multiple convergent supergene evolution events in mating-type chromosomes. Nat Commun. 2018;9(1):2000. pmid:29784936 View Article PubMed/NCBI Google Scholar\n\n4. Jay P, Tezenas E, Véber A, Giraud T. Sheltering of deleterious mutations explain the stepwise extension of recombination suppression on sex chromosomes and other supergenes. PLoS Biol. 2022;20(7):e3001698. View Article Google Scholar\n\n5. Nielsen R. Evolution. Why sex? Science. 2006;311(5763):960–1. pmid:16484481 View Article PubMed/NCBI Google Scholar\n\n6. Charlesworth D, Charlesworth B, Marais G. Steps in the evolution of heteromorphic sex chromosomes. Heredity. 2005;95(2):118–28. pmid:15931241 View Article PubMed/NCBI Google Scholar\n\n7. Jeffries DL, Gerchen JF, Scharmann M, Pannell JR. A neutral model for the loss of recombination on sex chromosomes. Philos Trans R Soc Lond B Biol Sci. 1832;2021(376):20200096. pmid:34247504 View Article PubMed/NCBI Google Scholar\n\n8. Lenormand T, Roze D. Y recombination arrest and degeneration in the absence of sexual dimorphism. Science. 2022;375(6581):663–6. pmid:35143289 View Article PubMed/NCBI Google Scholar\n\n9. Renner SS, Müller NA. Plant sex chromosomes defy evolutionary models of expanding recombination suppression and genetic degeneration. Nat Plants. 2021;7(4):392–402. pmid:33782581 View Article PubMed/NCBI Google Scholar", "segmentation_method": "reviewed_source_semantics", "label": "References", "source_line_range": [ 43, 61 ] } ], "ending": { "text": "ppression and genetic degeneration. Nat Plants. 2021;7(4):392–402. pmid:33782581 View Article PubMed/NCBI Google Scholar" } } }, { "id": "article-084", "name": "影智XBOT通用餐饮服务机器人发布报道", "url": "https://www.leiphone.com/category/industrynews/bn6JrENVQGf1G9tU.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "影智XBOT发布通用餐饮服务机器人矩阵与“一脑多形”具身智能体系" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "咸峰" ] }, { "id": "stable-3", "alternatives": [ "具身智能在餐饮零售场景的规模化落地已初见成效" ] }, { "id": "stable-4", "alternatives": [ "雷峰网公开课" ] }, { "id": "stable-5", "alternatives": [ "活动中心" ] }, { "id": "stable-6", "alternatives": [ "GAIR" ] }, { "id": "stable-7", "alternatives": [ "专题" ] }, { "id": "stable-8", "alternatives": [ "爱搞机" ] }, { "id": "stable-9", "alternatives": [ "业界" ] }, { "id": "stable-10", "alternatives": [ "人工智能" ] }, { "id": "stable-11", "alternatives": [ "智能驾驶" ] }, { "id": "stable-12", "alternatives": [ "数智化" ] }, { "id": "stable-13", "alternatives": [ "金融科技" ] }, { "id": "stable-14", "alternatives": [ "医疗科技" ] }, { "id": "stable-15", "alternatives": [ "芯片" ] }, { "id": "stable-16", "alternatives": [ "政企安全" ] }, { "id": "stable-17", "alternatives": [ "智慧城市" ] }, { "id": "stable-18", "alternatives": [ "行业云" ] }, { "id": "stable-19", "alternatives": [ "工业互联网" ] }, { "id": "stable-20", "alternatives": [ "AIoT" ] }, { "id": "stable-21", "alternatives": [ "正文" ] }, { "id": "stable-22", "alternatives": [ "分享" ] }, { "id": "stable-23", "alternatives": [ "相关文章" ] }, { "id": "stable-24", "alternatives": [ "XBOT" ] }, { "id": "stable-25", "alternatives": [ "咖啡机器人" ] }, { "id": "stable-26", "alternatives": [ "通用餐饮具身机器人" ] }, { "id": "stable-27", "alternatives": [ "编辑" ] }, { "id": "stable-28", "alternatives": [ "发私信" ] }, { "id": "stable-29", "alternatives": [ "当月热门文章" ] }, { "id": "stable-30", "alternatives": [ "最新文章" ] }, { "id": "stable-31", "alternatives": [ "热门搜索" ] }, { "id": "stable-32", "alternatives": [ "联系我们" ] }, { "id": "stable-33", "alternatives": [ "关于我们" ] }, { "id": "stable-34", "alternatives": [ "意见反馈" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete report including all product specifications, collaboration section and final conclusion reviewed in full-page screenshot. Dropdown submenu texts and changing hot-search terms excluded; no interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "影智XBOT发布通用餐饮服务机器人矩阵与“一脑多形”具身智能体系" ], "html_selector": "h1.headTit,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-084/comment-qualification-reference-r5.json", "sha256": "540ca62affb2add40b3977c8afb727c712ca23175ab7f474a407e0f255506899", "chars": 798, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "雷峰网(公众号:雷峰网)获悉,6月30日,影智XBOT“2026 XBOT通用餐饮具身机器人发布会”在北京举行,以产品、平台、商业闭环、生态开放为关键节点,正式发布自研具身操作系统XOS 3.0、AI Agent产品“爱宝店长”,以及三款覆盖咖啡、冰淇淋、全场景服务的通用餐饮具身机器人新品。 三者共同构成“一脑多形”的完整智能体系。\n\nXOS 3.0:为“一脑多形”而生的具身操作系统\n\n作为爱宝店长背后的技术底座,XOS 3.0 相当于具身智能的“操作系统”。依托这套架构,XOS 3.0 可实现跨本体的技能迁移——学过一次的操作能力,在更换机器人形态后依然可以复用,真正做到“一次研发、万形复用”,攻克了长期制约行业的场景迁移成本高、泛化能力弱的关键壁垒。\n\n支撑这一升级的是 XOS 3.0 的三大核心能力:一是 VLA(视觉—语言—动作)架构,让机器人同时具备“能看、能理解、能执行”的全链路能力;二是全链条研发闭环,覆盖算法、硬件、交互、产品化全环节,实现技术能力从实验室到商业场景的快速落地;三是数据飞轮效应,通过真实商业场景的持续部署,不断积累多模态运营数据,反哺系统能力迭代,形成“部署越多、场景越丰富、能力越强”的正向循环。\n\n截至目前,影智XBOT已在全球100多个城市完成超1000台设备部署,累计稳定制作精品咖啡超400万杯,完成超400万次人机交互。\n\n爱宝店长:具身智能走到用户面前的“那个人”\n\n在 XOS 3.0 的技术底座之上,影智XBOT正式发布独立的 AI Agent 品牌——爱宝店长。\n\n如果说 XOS 3.0 是负责学习与进化的“大脑”,爱宝店长就是这颗大脑走到用户面前的“那个人”:有面孔、会说话、能经营。与传统无人设备“能干活、不会说话”不同,爱宝店长集合了前端用户交互与后端经营管理两大职能:在前端,它能识人识语、主动招揽、记忆用户偏好,以拟人化的方式完成从对话到服务的全过程;在后端,它承担门店的经营决策角色,实时监测物料余量、设备运行状态与经营数据,推动运营模式从“人找问题”升级为“问题找人”。由此,每一台设备都拥有了一位不知疲倦、持续进化的“店长”。\n\nXOS 3.0的三种“身体形态”,重塑餐饮具身智能硬件标准\n\n基于XOS 3.0智能大脑与爱宝店长的统一服务人格,影智XBOT发布了三款硬件产品——它们是同一套智能体系在不同物理载体上的具体呈现:\n\nXBOT C3 咖啡机器人(售价21.9万元,7月京东首发)\n\n定位“大师级萃取+AI千人千面”。搭载XOS 3.0大脑与爱宝店长服务界面,实现了从语音点单、偏好理解到精准制餐的全流程智能化。时产80杯,单杯45秒,150杯续航,重复定位精度±0.02mm,支持AI印花定制——每一杯咖啡都是一张“情绪名片”。整机设计寿命超5年,核心部件通过百万次疲劳测试。\n\nXBOT i3 冰淇淋机器人(售价17.9万元,7月京东首发)\n\n由C3的制餐能力经XOS 3.0跨本体迁移泛化而来,搭载同一套智能内核与爱宝店长界面。支持4种果酱+4种脆粒的自由组合,时产≥60杯,设计寿命25万杯。i3的诞生本身就是“一次研发,万形复用”理念在产品端的直接例证。\n\nXBOT X1 通用餐饮人形机器人(预计2026年底发售)\n\n作为技术集大成者,X1拥有双臂7轴、末端负载3-4kg,本地算力达500 TOPS,断网也能稳定运行。X1运行完整版XOS 3.0与爱宝店长,可覆盖“取杯→制作→放置→递送→完成”的全链路闭环,并已掌握摇酒、煮面等多项餐饮技能。其独特之处在于为机器人设计了专用“工服”——既是劳动保护,也是食品安全合规的“职业资格证”,为大规模商用落地扫清监管与信任障碍。 \n\nXBOT COFFEE与XBOT Lab店:验证具身智能商业新范式\n\n技术有底座,产品有矩阵,但具身智能的商业化最终要回答一个问题:真实的商业场景里,这套模式真的能赚钱吗?\n\n本次发布会上,影智XBOT正式启动自营咖啡品牌XBOT COFFEE,并公开了首家旗舰体验店XBOT Lab的运营数据,用真实的门店经营结果,完成了从技术到商业的闭环验证。\n\nXBOT Lab定位为一家具有“人机协作”特色的实验门店——机器人与人类店员各司其职、协同运营。六轴双臂协作机器人负责稳定出品与门店运转,以工业级精度完成萃取、打奶、印花等工序,并承担饮品管理与运营规划,把标准化、重复性的工作做到“万杯如一”,这正是XOS 3.0“一脑多形”理念在真实门店的具体应用;人类店员则专注于产品打包、补料运营与日常维护等协作环节,把更多精力投入到与顾客的情感互动中。\n\nXBOT COFFEE的品牌定位为“AI潮玩咖啡”,核心理念是“好喝×好玩=爱咖啡,有玩味”。“好喝”是基础,坚持选用精品豆源与优质奶源,依托XOS3.0的精准控制能力,实现萃取量、水粉比、咖啡因含量的全量化管控。\n\n牵手京东等战略伙伴,共拓具身智能万亿市场\n\n发布会现场,影智XBOT与京东集团正式签署战略合作协议。长期以来,影智XBOT旗下各款硬核机器人产品均将京东作为新品首发的第一阵地——从去年亮相的XBOT咖啡机器人Lite版与初代冰淇淋机器人,到本次发布会重磅推出的XBOT咖啡机器人C3、XBOT冰淇淋机器人I3,以及预计年底上线的通用餐饮人形机器人X1。\n\n基于深厚的合作积淀与对AI新消费赛道的共同判断,双方将聚焦餐饮零售、连锁咖啡、智慧门店等核心场景开展深度协同合作。依托京东在智能机器人赛道的战略资源布局,双方将从产品研发、市场营销、渠道铺设、技术赋能等多个维度为合作赋能。目前,双方已围绕“京东七鲜咖啡”等餐饮零售场景展开先导性探索,驱动具身智能在真实、高频的消费场景中持续释放并验证其商业价值。\n\n面向全球市场,随着影智XBOT海外版图的加速扩张,双方还将进一步探索在海外物流与跨境技术运维等领域的协同合作,依托京东强大的全球供应链能力与海外服务网络,为影智XBOT产品走向世界舞台提供更坚实的保障。\n\n除了京东,影智XBOT还与亦庄机器人、菲克机器人、吉林省旅游控股集团、博物天行以及美国BLUESKY等多家解决方案品牌赋能的ODM/OEM合作伙伴完成战略生态签约。\n\n结语\n\n从2022年第一代咖啡机器人问世,到如今形成操作系统、多品类产品、自营品牌、开放生态的完整商业闭环,影智XBOT始终坚持“产品落地、价值先行”的路线,不沉迷概念炫技,而是扎根真实的消费场景,用可验证的商业结果推动技术迭代。\n\n正如唐沐在发布会上所说:“每一次生产力的跃迁,都在重新定义人与服务的边界。”随着影智XBOT生态的持续开放,会有更多经营者、创业者与产业伙伴加入进来,让“一脑多形”从一家公司的技术路线,变成整个行业的通用语言。让具身智能从前沿技术变成餐饮具身的商业基础设施,让数字生产力走进每一处消费场景,让机器人真正融入每个人的日常——具身智能,成就于人。\n\n\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "雷 峰 网 公 众 号 雷 峰 网 获 悉 6 月 30 日 影 智 xbot 2026 xbot 通 用 餐 饮 具 身 机 器 人 发 布 会 在 北 京 举 行 以 产 品 平 台 商 业 闭 环 生 态 开 放 为 关 键 节 点 正 式 发 布 自 研 具 身 操 作 系 统 xos 3 0 ai agent 产 品 爱 宝 店 长 以 及 三 款 覆 盖 咖 啡 冰 淇 淋 全 场 景 服 务 的 通 用 餐 饮 具 身 机 器 人 新 品 三 者 共 同 构 成 一 脑 多 形 的 完 整 智 能 体 系 xos 3 0 为 一 脑 多 形 而 生 的 具 身 操 作 系 统 作 为 爱 宝 店 长 背 后 的 技 术 底 座 xos 3 0 相 当 于 具 身 智 能 的 操 作 系 统 依 托 这 套 架 构 xos 3 0 可 实 现 跨 本 体 的 技 能 迁 移 学 过 一 次 的 操 作 能 力 在 更 换 机 器 人 形 态 后 依 然 可 以 复 用 真 正 做 到 一 次 研 发 万 形 复 用 攻 克 了 长 期 制 约 行 业 的 场 景 迁 移 成 本 高 泛 化 能 力 弱 的 关 键 壁 垒 支 撑 这 一 升 级 的 是 xos 3 0 的 三 大 核 心 能 力 一 是 vla 视 觉 语 言 动 作 架 构 让 机 器 人 同 时 具 备 能 看 能 理 解 能 执 行 的 全 链 路 能 力 二 是 全 链 条 研 发 闭 环 覆 盖 算 法 硬 件 交 互 产 品 化 全 环 节 实 现 技 术 能 力 从 实 验 室 到 商 业 场 景 的 快 速 落 地 三 是 数 据 飞 轮 效 应 通 过 真 实 商 业 场 景 的 持 续 部 署 不 断 积 累 多 模 态 运 营 数 据 反 哺 系 统 能 力 迭 代 形 成 部 署 越 多 场 景 越 丰 富 能 力 越 强 的 正 向 循 环 截 至 目 前 影 智 xbot 已 在 全 球 100 多 个 城 市 完 成 超 1000 台 设 备 部 署 累 计 稳 定 制 作 精 品 咖 啡 超 400 万 杯 完 成 超 400 万 次 人 机 交 互", "source_text": "雷峰网(公众号:雷峰网)获悉,6月30日,影智XBOT“2026 XBOT通用餐饮具身机器人发布会”在北京举行,以产品、平台、商业闭环、生态开放为关键节点,正式发布自研具身操作系统XOS 3.0、AI Agent产品“爱宝店长”,以及三款覆盖咖啡、冰淇淋、全场景服务的通用餐饮具身机器人新品。 三者共同构成“一脑多形”的完整智能体系。\n\nXOS 3.0:为“一脑多形”而生的具身操作系统\n\n作为爱宝店长背后的技术底座,XOS 3.0 相当于具身智能的“操作系统”。依托这套架构,XOS 3.0 可实现跨本体的技能迁移——学过一次的操作能力,在更换机器人形态后依然可以复用,真正做到“一次研发、万形复用”,攻克了长期制约行业的场景迁移成本高、泛化能力弱的关键壁垒。\n\n支撑这一升级的是 XOS 3.0 的三大核心能力:一是 VLA(视觉—语言—动作)架构,让机器人同时具备“能看、能理解、能执行”的全链路能力;二是全链条研发闭环,覆盖算法、硬件、交互、产品化全环节,实现技术能力从实验室到商业场景的快速落地;三是数据飞轮效应,通过真实商业场景的持续部署,不断积累多模态运营数据,反哺系统能力迭代,形成“部署越多、场景越丰富、能力越强”的正向循环。\n\n截至目前,影智XBOT已在全球100多个城市完成超1000台设备部署,累计稳定制作精品咖啡超400万杯,完成超400万次人机交互。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:雷峰网(公众号:雷峰网)获悉,6月30日,影智XBOT“2026 XBOT通用餐饮具身机器人发布会”在北京举行,以产品、 — 段落/内容单元:截至目前,影智XBOT已在全球100多个城市完成超1000台设备部署,累计稳定制作精品咖啡超400万杯,完成超400万次", "source_line_range": [ 1, 10 ] }, { "id": "body-region-2", "text": "爱 宝 店 长 具 身 智 能 走 到 用 户 面 前 的 那 个 人 在 xos 3 0 的 技 术 底 座 之 上 影 智 xbot 正 式 发 布 独 立 的 ai agent 品 牌 爱 宝 店 长 如 果 说 xos 3 0 是 负 责 学 习 与 进 化 的 大 脑 爱 宝 店 长 就 是 这 颗 大 脑 走 到 用 户 面 前 的 那 个 人 有 面 孔 会 说 话 能 经 营 与 传 统 无 人 设 备 能 干 活 不 会 说 话 不 同 爱 宝 店 长 集 合 了 前 端 用 户 交 互 与 后 端 经 营 管 理 两 大 职 能 在 前 端 它 能 识 人 识 语 主 动 招 揽 记 忆 用 户 偏 好 以 拟 人 化 的 方 式 完 成 从 对 话 到 服 务 的 全 过 程 在 后 端 它 承 担 门 店 的 经 营 决 策 角 色 实 时 监 测 物 料 余 量 设 备 运 行 状 态 与 经 营 数 据 推 动 运 营 模 式 从 人 找 问 题 升 级 为 问 题 找 人 由 此 每 一 台 设 备 都 拥 有 了 一 位 不 知 疲 倦 持 续 进 化 的 店 长 xos 3 0 的 三 种 身 体 形 态 重 塑 餐 饮 具 身 智 能 硬 件 标 准 基 于 xos 3 0 智 能 大 脑 与 爱 宝 店 长 的 统 一 服 务 人 格 影 智 xbot 发 布 了 三 款 硬 件 产 品 它 们 是 同 一 套 智 能 体 系 在 不 同 物 理 载 体 上 的 具 体 呈 现 xbot c3 咖 啡 机 器 人 售 价 21 9 万 元 7 月 京 东 首 发 定 位 大 师 级 萃 取 ai 千 人 千 面 搭 载 xos 3 0 大 脑 与 爱 宝 店 长 服 务 界 面 实 现 了 从 语 音 点 单 偏 好 理 解 到 精 准 制 餐 的 全 流 程 智 能 化 时 产 80 杯 单 杯 45 秒 150 杯 续 航 重 复 定 位 精 度 0 02mm 支 持 ai 印 花 定 制 每 一 杯 咖 啡 都 是 一 张 情 绪 名 片 整 机 设 计 寿 命 超 5 年 核 心 部 件 通 过 百 万 次 疲 劳 测 试", "source_text": "爱宝店长:具身智能走到用户面前的“那个人”\n\n在 XOS 3.0 的技术底座之上,影智XBOT正式发布独立的 AI Agent 品牌——爱宝店长。\n\n如果说 XOS 3.0 是负责学习与进化的“大脑”,爱宝店长就是这颗大脑走到用户面前的“那个人”:有面孔、会说话、能经营。与传统无人设备“能干活、不会说话”不同,爱宝店长集合了前端用户交互与后端经营管理两大职能:在前端,它能识人识语、主动招揽、记忆用户偏好,以拟人化的方式完成从对话到服务的全过程;在后端,它承担门店的经营决策角色,实时监测物料余量、设备运行状态与经营数据,推动运营模式从“人找问题”升级为“问题找人”。由此,每一台设备都拥有了一位不知疲倦、持续进化的“店长”。\n\nXOS 3.0的三种“身体形态”,重塑餐饮具身智能硬件标准\n\n基于XOS 3.0智能大脑与爱宝店长的统一服务人格,影智XBOT发布了三款硬件产品——它们是同一套智能体系在不同物理载体上的具体呈现:\n\nXBOT C3 咖啡机器人(售价21.9万元,7月京东首发)\n\n定位“大师级萃取+AI千人千面”。搭载XOS 3.0大脑与爱宝店长服务界面,实现了从语音点单、偏好理解到精准制餐的全流程智能化。时产80杯,单杯45秒,150杯续航,重复定位精度±0.02mm,支持AI印花定制——每一杯咖啡都是一张“情绪名片”。整机设计寿命超5年,核心部件通过百万次疲劳测试。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:爱宝店长:具身智能走到用户面前的“那个人” — 段落/内容单元:定位“大师级萃取+AI千人千面”。搭载XOS 3.0大脑与爱宝店长服务界面,实现了从语音点单、偏好理解到精准制餐的全流程", "source_line_range": [ 11, 24 ] }, { "id": "body-region-3", "text": "xbot i3 冰 淇 淋 机 器 人 售 价 17 9 万 元 7 月 京 东 首 发 由 c3 的 制 餐 能 力 经 xos 3 0 跨 本 体 迁 移 泛 化 而 来 搭 载 同 一 套 智 能 内 核 与 爱 宝 店 长 界 面 支 持 4 种 果 酱 4 种 脆 粒 的 自 由 组 合 时 产 60 杯 设 计 寿 命 25 万 杯 i3 的 诞 生 本 身 就 是 一 次 研 发 万 形 复 用 理 念 在 产 品 端 的 直 接 例 证 xbot x1 通 用 餐 饮 人 形 机 器 人 预 计 2026 年 底 发 售 作 为 技 术 集 大 成 者 x1 拥 有 双 臂 7 轴 末 端 负 载 3 4kg 本 地 算 力 达 500 tops 断 网 也 能 稳 定 运 行 x1 运 行 完 整 版 xos 3 0 与 爱 宝 店 长 可 覆 盖 取 杯 制 作 放 置 递 送 完 成 的 全 链 路 闭 环 并 已 掌 握 摇 酒 煮 面 等 多 项 餐 饮 技 能 其 独 特 之 处 在 于 为 机 器 人 设 计 了 专 用 工 服 既 是 劳 动 保 护 也 是 食 品 安 全 合 规 的 职 业 资 格 证 为 大 规 模 商 用 落 地 扫 清 监 管 与 信 任 障 碍 xbot coffee 与 xbot lab 店 验 证 具 身 智 能 商 业 新 范 式 技 术 有 底 座 产 品 有 矩 阵 但 具 身 智 能 的 商 业 化 最 终 要 回 答 一 个 问 题 真 实 的 商 业 场 景 里 这 套 模 式 真 的 能 赚 钱 吗 本 次 发 布 会 上 影 智 xbot 正 式 启 动 自 营 咖 啡 品 牌 xbot coffee 并 公 开 了 首 家 旗 舰 体 验 店 xbot lab 的 运 营 数 据 用 真 实 的 门 店 经 营 结 果 完 成 了 从 技 术 到 商 业 的 闭 环 验 证", "source_text": "XBOT i3 冰淇淋机器人(售价17.9万元,7月京东首发)\n\n由C3的制餐能力经XOS 3.0跨本体迁移泛化而来,搭载同一套智能内核与爱宝店长界面。支持4种果酱+4种脆粒的自由组合,时产≥60杯,设计寿命25万杯。i3的诞生本身就是“一次研发,万形复用”理念在产品端的直接例证。\n\nXBOT X1 通用餐饮人形机器人(预计2026年底发售)\n\n作为技术集大成者,X1拥有双臂7轴、末端负载3-4kg,本地算力达500 TOPS,断网也能稳定运行。X1运行完整版XOS 3.0与爱宝店长,可覆盖“取杯→制作→放置→递送→完成”的全链路闭环,并已掌握摇酒、煮面等多项餐饮技能。其独特之处在于为机器人设计了专用“工服”——既是劳动保护,也是食品安全合规的“职业资格证”,为大规模商用落地扫清监管与信任障碍。 \n\nXBOT COFFEE与XBOT Lab店:验证具身智能商业新范式\n\n技术有底座,产品有矩阵,但具身智能的商业化最终要回答一个问题:真实的商业场景里,这套模式真的能赚钱吗?\n\n本次发布会上,影智XBOT正式启动自营咖啡品牌XBOT COFFEE,并公开了首家旗舰体验店XBOT Lab的运营数据,用真实的门店经营结果,完成了从技术到商业的闭环验证。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:XBOT i3 冰淇淋机器人(售价17.9万元,7月京东首发) — 段落/内容单元:本次发布会上,影智XBOT正式启动自营咖啡品牌XBOT COFFEE,并公开了首家旗舰体验店XBOT Lab的运营数据,", "source_line_range": [ 25, 38 ] }, { "id": "body-region-4", "text": "xbot lab 定 位 为 一 家 具 有 人 机 协 作 特 色 的 实 验 门 店 机 器 人 与 人 类 店 员 各 司 其 职 协 同 运 营 六 轴 双 臂 协 作 机 器 人 负 责 稳 定 出 品 与 门 店 运 转 以 工 业 级 精 度 完 成 萃 取 打 奶 印 花 等 工 序 并 承 担 饮 品 管 理 与 运 营 规 划 把 标 准 化 重 复 性 的 工 作 做 到 万 杯 如 一 这 正 是 xos 3 0 一 脑 多 形 理 念 在 真 实 门 店 的 具 体 应 用 人 类 店 员 则 专 注 于 产 品 打 包 补 料 运 营 与 日 常 维 护 等 协 作 环 节 把 更 多 精 力 投 入 到 与 顾 客 的 情 感 互 动 中 xbot coffee 的 品 牌 定 位 为 ai 潮 玩 咖 啡 核 心 理 念 是 好 喝 好 玩 爱 咖 啡 有 玩 味 好 喝 是 基 础 坚 持 选 用 精 品 豆 源 与 优 质 奶 源 依 托 xos3 0 的 精 准 控 制 能 力 实 现 萃 取 量 水 粉 比 咖 啡 因 含 量 的 全 量 化 管 控 牵 手 京 东 等 战 略 伙 伴 共 拓 具 身 智 能 万 亿 市 场 发 布 会 现 场 影 智 xbot 与 京 东 集 团 正 式 签 署 战 略 合 作 协 议 长 期 以 来 影 智 xbot 旗 下 各 款 硬 核 机 器 人 产 品 均 将 京 东 作 为 新 品 首 发 的 第 一 阵 地 从 去 年 亮 相 的 xbot 咖 啡 机 器 人 lite 版 与 初 代 冰 淇 淋 机 器 人 到 本 次 发 布 会 重 磅 推 出 的 xbot 咖 啡 机 器 人 c3 xbot 冰 淇 淋 机 器 人 i3 以 及 预 计 年 底 上 线 的 通 用 餐 饮 人 形 机 器 人 x1", "source_text": "XBOT Lab定位为一家具有“人机协作”特色的实验门店——机器人与人类店员各司其职、协同运营。六轴双臂协作机器人负责稳定出品与门店运转,以工业级精度完成萃取、打奶、印花等工序,并承担饮品管理与运营规划,把标准化、重复性的工作做到“万杯如一”,这正是XOS 3.0“一脑多形”理念在真实门店的具体应用;人类店员则专注于产品打包、补料运营与日常维护等协作环节,把更多精力投入到与顾客的情感互动中。\n\nXBOT COFFEE的品牌定位为“AI潮玩咖啡”,核心理念是“好喝×好玩=爱咖啡,有玩味”。“好喝”是基础,坚持选用精品豆源与优质奶源,依托XOS3.0的精准控制能力,实现萃取量、水粉比、咖啡因含量的全量化管控。\n\n牵手京东等战略伙伴,共拓具身智能万亿市场\n\n发布会现场,影智XBOT与京东集团正式签署战略合作协议。长期以来,影智XBOT旗下各款硬核机器人产品均将京东作为新品首发的第一阵地——从去年亮相的XBOT咖啡机器人Lite版与初代冰淇淋机器人,到本次发布会重磅推出的XBOT咖啡机器人C3、XBOT冰淇淋机器人I3,以及预计年底上线的通用餐饮人形机器人X1。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:XBOT Lab定位为一家具有“人机协作”特色的实验门店——机器人与人类店员各司其职、协同运营。六轴双臂协作机器人负责稳 — 段落/内容单元:发布会现场,影智XBOT与京东集团正式签署战略合作协议。长期以来,影智XBOT旗下各款硬核机器人产品均将京东作为新品首发", "source_line_range": [ 39, 46 ] }, { "id": "body-region-5", "text": "基 于 深 厚 的 合 作 积 淀 与 对 ai 新 消 费 赛 道 的 共 同 判 断 双 方 将 聚 焦 餐 饮 零 售 连 锁 咖 啡 智 慧 门 店 等 核 心 场 景 开 展 深 度 协 同 合 作 依 托 京 东 在 智 能 机 器 人 赛 道 的 战 略 资 源 布 局 双 方 将 从 产 品 研 发 市 场 营 销 渠 道 铺 设 技 术 赋 能 等 多 个 维 度 为 合 作 赋 能 目 前 双 方 已 围 绕 京 东 七 鲜 咖 啡 等 餐 饮 零 售 场 景 展 开 先 导 性 探 索 驱 动 具 身 智 能 在 真 实 高 频 的 消 费 场 景 中 持 续 释 放 并 验 证 其 商 业 价 值 面 向 全 球 市 场 随 着 影 智 xbot 海 外 版 图 的 加 速 扩 张 双 方 还 将 进 一 步 探 索 在 海 外 物 流 与 跨 境 技 术 运 维 等 领 域 的 协 同 合 作 依 托 京 东 强 大 的 全 球 供 应 链 能 力 与 海 外 服 务 网 络 为 影 智 xbot 产 品 走 向 世 界 舞 台 提 供 更 坚 实 的 保 障 除 了 京 东 影 智 xbot 还 与 亦 庄 机 器 人 菲 克 机 器 人 吉 林 省 旅 游 控 股 集 团 博 物 天 行 以 及 美 国 bluesky 等 多 家 解 决 方 案 品 牌 赋 能 的 odm oem 合 作 伙 伴 完 成 战 略 生 态 签 约 结 语 从 2022 年 第 一 代 咖 啡 机 器 人 问 世 到 如 今 形 成 操 作 系 统 多 品 类 产 品 自 营 品 牌 开 放 生 态 的 完 整 商 业 闭 环 影 智 xbot 始 终 坚 持 产 品 落 地 价 值 先 行 的 路 线 不 沉 迷 概 念 炫 技 而 是 扎 根 真 实 的 消 费 场 景 用 可 验 证 的 商 业 结 果 推 动 技 术 迭 代 正 如 唐 沐 在 发 布 会 上 所 说 每 一 次 生 产 力 的 跃 迁 都 在 重 新 定 义 人 与 服 务 的 边 界 随 着 影 智 xbot 生 态 的 持 续 开 放 会 有 更 多 经 营 者 创 业 者 与 产 业 伙 伴 加 入 进 来 让 一 脑 多 形 从 一 家 公 司 的 技 术 路 线 变 成 整 个 行 业 的 通 用 语 言 让 具 身 智 能 从 前 沿 技 术 变 成 餐 饮 具 身 的 商 业 基 础 设 施 让 数 字 生 产 力 走 进 每 一 处 消 费 场 景 让 机 器 人 真 正 融 入 每 个 人 的 日 常 具 身 智 能 成 就 于 人", "source_text": "基于深厚的合作积淀与对AI新消费赛道的共同判断,双方将聚焦餐饮零售、连锁咖啡、智慧门店等核心场景开展深度协同合作。依托京东在智能机器人赛道的战略资源布局,双方将从产品研发、市场营销、渠道铺设、技术赋能等多个维度为合作赋能。目前,双方已围绕“京东七鲜咖啡”等餐饮零售场景展开先导性探索,驱动具身智能在真实、高频的消费场景中持续释放并验证其商业价值。\n\n面向全球市场,随着影智XBOT海外版图的加速扩张,双方还将进一步探索在海外物流与跨境技术运维等领域的协同合作,依托京东强大的全球供应链能力与海外服务网络,为影智XBOT产品走向世界舞台提供更坚实的保障。\n\n除了京东,影智XBOT还与亦庄机器人、菲克机器人、吉林省旅游控股集团、博物天行以及美国BLUESKY等多家解决方案品牌赋能的ODM/OEM合作伙伴完成战略生态签约。\n\n结语\n\n从2022年第一代咖啡机器人问世,到如今形成操作系统、多品类产品、自营品牌、开放生态的完整商业闭环,影智XBOT始终坚持“产品落地、价值先行”的路线,不沉迷概念炫技,而是扎根真实的消费场景,用可验证的商业结果推动技术迭代。\n\n正如唐沐在发布会上所说:“每一次生产力的跃迁,都在重新定义人与服务的边界。”随着影智XBOT生态的持续开放,会有更多经营者、创业者与产业伙伴加入进来,让“一脑多形”从一家公司的技术路线,变成整个行业的通用语言。让具身智能从前沿技术变成餐饮具身的商业基础设施,让数字生产力走进每一处消费场景,让机器人真正融入每个人的日常——具身智能,成就于人。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:基于深厚的合作积淀与对AI新消费赛道的共同判断,双方将聚焦餐饮零售、连锁咖啡、智慧门店等核心场景开展深度协同合作。依托京 — 段落/内容单元:正如唐沐在发布会上所说:“每一次生产力的跃迁,都在重新定义人与服务的边界。”随着影智XBOT生态的持续开放,会有更多经营", "source_line_range": [ 47, 59 ] } ], "ending": { "text": "入进来,让“一脑多形”从一家公司的技术路线,变成整个行业的通用语言。让具身智能从前沿技术变成餐饮具身的商业基础设施,让数字生产力走进每一处消费场景,让机器人真正融入每个人的日常——具身智能,成就于人。" } } }, { "id": "article-085", "name": "县城咖啡低调火热,培养土著喝咖啡才是关键", "url": "https://www.tmtpost.com/7893079.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "县城咖啡低调火热,培养“土著”喝咖啡才是关键" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "师天浩" ] }, { "id": "stable-3", "alternatives": [ "县城咖啡的故事。" ] }, { "id": "stable-4", "alternatives": [ "媒体" ] }, { "id": "stable-5", "alternatives": [ "企服" ] }, { "id": "stable-6", "alternatives": [ "创投" ] }, { "id": "stable-7", "alternatives": [ "咨询" ] }, { "id": "stable-8", "alternatives": [ "活动" ] }, { "id": "stable-9", "alternatives": [ "钛空时间" ] }, { "id": "stable-10", "alternatives": [ "集团时光" ] }, { "id": "stable-11", "alternatives": [ "公众号" ] }, { "id": "stable-12", "alternatives": [ "清朗网络行动" ] }, { "id": "stable-13", "alternatives": [ "写稿" ] }, { "id": "stable-14", "alternatives": [ "视频投稿" ] }, { "id": "stable-15", "alternatives": [ "App下载" ] }, { "id": "stable-16", "alternatives": [ "ENGLISH" ] }, { "id": "stable-17", "alternatives": [ "资讯" ] }, { "id": "stable-18", "alternatives": [ "科股宝" ] }, { "id": "stable-19", "alternatives": [ "PRO" ] }, { "id": "stable-20", "alternatives": [ "视频" ] }, { "id": "stable-21", "alternatives": [ "直播" ] }, { "id": "stable-22", "alternatives": [ "FM" ] }, { "id": "stable-23", "alternatives": [ "咖啡" ] }, { "id": "stable-24", "alternatives": [ "最近资讯" ] }, { "id": "stable-25", "alternatives": [ "本文链接" ] }, { "id": "stable-26", "alternatives": [ "本内容来源于钛媒体钛度号,文章内容仅供参考、交流、学习,不构成投资建议。" ] }, { "id": "stable-27", "alternatives": [ "点击这里投稿" ] }, { "id": "stable-28", "alternatives": [ "敬原创,有钛度,得赞赏" ] }, { "id": "stable-29", "alternatives": [ "赞赏支持" ] }, { "id": "stable-30", "alternatives": [ "发表评论" ] }, { "id": "stable-31", "alternatives": [ "登录" ] }, { "id": "stable-32", "alternatives": [ "相关阅读" ] }, { "id": "stable-33", "alternatives": [ "快报" ] }, { "id": "stable-34", "alternatives": [ "更多" ] }, { "id": "stable-35", "alternatives": [ "发现钛媒体" ] }, { "id": "stable-36", "alternatives": [ "关于我们" ] }, { "id": "stable-37", "alternatives": [ "投稿须知" ] }, { "id": "stable-38", "alternatives": [ "加入我们" ] }, { "id": "stable-39", "alternatives": [ "联系我们" ] }, { "id": "stable-40", "alternatives": [ "隐私政策" ] }, { "id": "stable-41", "alternatives": [ "自律公约" ] }, { "id": "stable-42", "alternatives": [ "交流与合作" ] }, { "id": "stable-43", "alternatives": [ "创业求报道" ] }, { "id": "stable-44", "alternatives": [ "广告合作" ] }, { "id": "stable-45", "alternatives": [ "意见与建议" ] }, { "id": "stable-46", "alternatives": [ "友情链接" ] }, { "id": "stable-47", "alternatives": [ "社交平台" ] }, { "id": "stable-48", "alternatives": [ "旗下品牌" ] }, { "id": "stable-49", "alternatives": [ "iOS & Android" ] }, { "id": "stable-50", "alternatives": [ "涉企侵权举报须知" ] }, { "id": "stable-51", "alternatives": [ "网上有害信息举报专区" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete opening, three principal sections and final conclusion reviewed in full-page screenshot; all paragraph text retained, changing news sidebar, comment suggestions and counts excluded. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "县城咖啡低调火热,培养“土著”喝咖啡才是关键" ], "html_selector": "h2.tit,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-085/comment-qualification-reference-r5.json", "sha256": "3ba5e3fea668cbcb91c2f7755055013c5d7d965d40b0127959351f7feaee4474", "chars": 766, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "文 | 师天浩\n\n初十(2月26日)的下午四点,上榜江西婺源县高德扫街榜的一家独立精品咖啡店里,主理人路啡(化名)和顾客有一搭没一搭闲聊,店里只有一桌客人,主理人说这是本地的老熟客。\n\n问到春节期间的生意如何,是不是有像网上说到占到四成以上。“有涨幅,但并没有拉升很多。”路啡说。人均消费超过50元、一杯咖啡20元左右,单价最高的是特调的单品“可以吃的咖啡杯”30元,最低的是美式14元。这样的价格在县城咖啡店里是独特的,走访另一家精品咖啡店最低为美式24元。\n\n尽管价格较为平价,但在这个常住人口仅有30.72万的小县城并不算便宜。关于春节期间销量问题,路啡说:“主要变化是用户群体的改变,平时都是熟客来,春节期间多了很多的新客。因为价格较低,生意主要依靠销量,但达到全年四成的销量过于夸张,因为县城消费力的原因,选择喝咖啡的人并不算多”。\n\n从边缘到C位的逆袭\n\n1.县城咖啡的火热,并非一夜之间\n\n走在今天的县城街头,咖啡店的密度令人惊讶。\n\n婺源县,作为一个四线小县城,就有4家连锁咖啡品牌门店。八家瑞幸、三家库迪、三家挪瓦、一家邮局咖啡,且高德扫街榜咖啡榜中九家都是精品咖啡店。\n\n根据美团发布的《2024县城咖啡新业态报告》,截至2024年1月,全国县城咖啡商户数量较2022年同期增长113.36%,累计订单量较2022年同期增长322.26%,较2023年同期增长136.37%。\n\nGeoQ Data数据显示,截至2023年12月,品牌咖啡在全国县城的总门店数为5454家,其中68%(3700家)是在2023年一年内开出的。\n\n2023年是咖啡的重要节点,2023年中国已超过美国,成为全球拥有品牌咖啡馆最多的国家。研究机构World Coffee Portal报告显示,2023年中国咖啡馆数量增长58%,达近5万家,目前整个东亚地区约12万家咖啡馆,中国占了40%以上。\n\n2.县城咖啡火热是多重因素\n\n首先是消费人群的代际更替。\n\n数据显示,县城咖啡消费者多为20-40岁年轻人,女性占64%,涵盖大学生、职场新秀与职场骨干。他们大多有过在大城市学习或工作的经历,已经养成了喝咖啡的习惯。路啡说:“有部分新客点单时会问到豆子的品类和产地,在沟通中了解到他们对于咖啡有一定的要求”。\n\n主理人还说:“特调‘可以吃的咖啡杯’也是客户推荐给我的,当时是澳洲的一个咖啡活动很火,建议我做这一款,一直保留到现在”。\n\n其次是消费场景的创新。\n\n与一二线城市将咖啡视为“牛马的加油站”的刚需属性不同,县城咖啡更多地承载着社交和休闲功能,主打空间属性。这也是县城连锁咖啡店和独立精品店的主要区别,尽管瑞幸和星巴克咖啡一样具有一定的空间,但连锁咖啡店和独立咖啡店的舒适度和私密性大有不同。独立咖啡店呈现主理人对于艺术和美的外显,大多具有皮质沙发和一只具有吸引力的猫。\n\n各类“土特产特调”层出不穷。\n\n区别于连锁咖啡的各种经典款,精品咖啡店都会有主理人的“独家秘方”。放眼全国各地,如温岭“皮蛋腐乳咖啡”、绍兴“黄酒咖啡”、宁夏沙棘咖啡、内蒙古奶皮子咖啡、西藏酥油茶拿铁、贵州刺梨咖啡等,都成为吸引年轻人的打卡利器,是小红书宣传的神秘道具。\n\n春节后,县城咖啡何去何从?\n\n县城咖啡的火热,很大程度上是“春节经济”的助推。\n\n每年春节,大量在外工作、学习的年轻人返乡,将大城市的咖啡消费习惯带回县城。京东超市《2023咖啡与茶消费洞察》报告显示,2023年县域市场咖啡消费增速远超一线城市,人均消费金额增速比一线城市高出26%。2024年春节期间,浙江省内“黄酒咖啡”销量较2023年同期增长17倍,“洋菜膏拿铁”搜索量同比增长200%。\n\n“年后生意淡了很多,营业额骤降1/3左右,但是属于正常情况,算是回归日常营业水准。”另一家咖啡店主理人坦言。\n\n同样还是2023年。\n\n这一年,瑞幸在中国的销售额首次超过星巴克中国,坐稳行业第一后加速下沉;星巴克创始人舒尔茨提出未来要覆盖中国3000个县城;库迪推出“百城千店”促销,将“9块9”咖啡大战的战火烧向下沉市场。\n\n然而竞争骤然加剧的同时,市场却并未同步扩大。\n\n县城咖啡面临的困境是多方面的。\n\n最直观的是价格因素。\n\n普遍30元到40元一杯的精品咖啡与县城平均消费水平并不匹配,单次打卡式消费是主流,很难形成高频复购。\n\n相比之下,瑞幸13-14元的客单价、库迪9.9元的优惠价格,更符合县城消费者的承受能力,随买随拿的出单速度满足了用户急于拿到产品的心理。\n\n同时,主理人对于经营意向多偏随意,因为大多是自建房改装的咖啡店,不求赚钱只要能不亏就好。主理人路啡说:“其实咖啡店的小红书已经停更3个月了,现在能看到了都是客户自发推广。有时他们拍了照片发给我让我去宣传,虽然我此前从事新媒体,但我个人比较懒散,不太愿意去做”。\n\n更深层次的问题是消费习惯尚未养成。\n\n一二线城市咖啡消费者偏向刚需,看重产品本身;而县城消费者还没有完全被培养出喝咖啡的习惯,消费更偏向社交和休闲属性,品牌的重要性更高。\n\n“县城淡旺季明显,旺季时主做新客生意,淡季时来的都是周边的老客”主理人分析道。这也意味着,淡季生意冷清是常态,“只要营业额能做到200就满足了”。\n\n破局之道,培养“土著”喝咖啡\n\n要破解县城咖啡店“淡旺季明显”的困境,核心在于培养本地常住人口“土著”的咖啡消费习惯。\n\n这是一个需要耐心和时间的长期工程。\n\n根据第七次全国人口普查数据,我国县域常住人口约7.48亿人,占全国人口总数的52.97%。全国县城及县级市城区常住人口约2.5亿人,占全国城镇常住人口的近30%。《全国县镇发展报告(2024)》显示,全国百强县市及百强区常住人口规模突破2亿,其中“新市民”群体占比超过40%。\n\n这一消费主力呈现出,休闲时间充裕、消费欲望较低、消费动能强劲。\n\n目前,瑞幸咖啡县域门店单店日均杯量已达到城市门店的85%,而客单价反超城市门店12%,形成“价格敏感度低、体验追求度高”的新型消费模式。\n\n这说明,只要培养得当,县城“土著”完全具备成为咖啡忠实消费者的能力。\n\n而且如今的年轻人对于咖啡的接受度明显高于茶叶,红餐产业研究院《Z世代现制饮品消费洞察报告2024》显示:47.6%的Z世代消费者表示购买现磨咖啡的频率上升,这一比例显著高于表示购买茶饮产品频率上升的消费者(36.9%)。\n\n且41.7%的Z世代消费者表示购买茶饮产品的频率“基本不变”,这意味着,现制茶饮在年轻群体中已触及增长天花板,而咖啡仍处于渗透率提升的快车道。\n\n如何培养“土著”喝咖啡?\n\n第一,降低消费门槛。\n\n价格是阻碍尝试的首要因素。据红餐大数据,全国咖饮品类人均消费从2023年9月的41元逐步下滑至2025年9月的26元,人均消费15元以下的门店占比从29.8%上升至36.9%。\n\n路啡说:“尽管我的价格最高才30,但平价所带来的用户粘性和销量次数同样可以带来可观的营销”,低价策略虽压缩利润,但在市场教育阶段是必要的。\n\n第二,本土化创新。\n\n县城居民对纯粹西式咖啡接受度有限,相比于美式,大家更爱喝加奶加糖的“拿铁式”咖啡,“土特产特调”同样大受欢迎。这种本土化创新降低了尝试门槛,让咖啡变得更“接地气”,让用户更愿意为咖啡付费。\n\n第三,打造社交空间。\n\n与一二线城市“即买即走”的快节奏消费不同,县城消费者更看重咖啡馆的社交属性。“吃饭、喝咖啡都不是最终目的,重要的是社交氛围和环境。”一杯咖啡,几个好友,一个下午,才是县城咖啡的常态。路啡说:“相比于其他独立精品咖啡店,我们店的营业时间更长,为10点到11点,有时还会根据用户调整时间”。\n\n在县城,咖啡馆正在成为新的“情报中心”和社交场所,朋友聚会、商务洽谈都可以在这里发生。\n\n第四,培养长期习惯。\n\n青天县,中国县城咖啡第一县。\n\n春节假期里,浙江青田699家遍布大街小巷的咖啡馆,累计营业总额超2500万元,单店日均营业额达4000元。这背后是华侨文化的长期浸润,青田有华侨38万,他们返乡后带回了咖啡文化,逐渐带动当地产业发展。\n\n“打卡青田咖啡馆”成了青田文旅的全新打开方式。\n\n这足以证明,咖啡习惯的养成需要时间,一旦养成,就会形成稳定的消费市场。\n\n结语:\n\n县城咖啡的故事,是中国消费市场下沉的缩影。\n\n从一线城市到县城,咖啡正在完成从“精英消费”到“大众消费”的蜕变。这个过程中,有春节返乡潮带来的短暂繁荣,也有淡季门可罗雀的现实困境;有连锁品牌攻城略地的激烈竞争,也有独立小店坚守特色的艰难突围。\n\n路啡说:“当时开店时装修比较简陋,年后打算将咖啡店重新装修,做成徽派建筑风格,然后再增加几款‘土特产特调’,将文旅和咖啡相结合”。\n\n对于县城咖啡从业者来说,培养“土著”喝咖啡,不是一蹴而就的事情,它需要价格的让利、产品的创新、场景的打造,更需要时间的沉淀。\n\n毕竟,2.5亿县城常住人口的市场潜力,值得所有咖啡从业者耐心等待、用心培育。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 4, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "文 师 天 浩 初 十 2 月 26 日 的 下 午 四 点 上 榜 江 西 婺 源 县 高 德 扫 街 榜 的 一 家 独 立 精 品 咖 啡 店 里 主 理 人 路 啡 化 名 和 顾 客 有 一 搭 没 一 搭 闲 聊 店 里 只 有 一 桌 客 人 主 理 人 说 这 是 本 地 的 老 熟 客 问 到 春 节 期 间 的 生 意 如 何 是 不 是 有 像 网 上 说 到 占 到 四 成 以 上 有 涨 幅 但 并 没 有 拉 升 很 多 路 啡 说 人 均 消 费 超 过 50 元 一 杯 咖 啡 20 元 左 右 单 价 最 高 的 是 特 调 的 单 品 可 以 吃 的 咖 啡 杯 30 元 最 低 的 是 美 式 14 元 这 样 的 价 格 在 县 城 咖 啡 店 里 是 独 特 的 走 访 另 一 家 精 品 咖 啡 店 最 低 为 美 式 24 元 尽 管 价 格 较 为 平 价 但 在 这 个 常 住 人 口 仅 有 30 72 万 的 小 县 城 并 不 算 便 宜 关 于 春 节 期 间 销 量 问 题 路 啡 说 主 要 变 化 是 用 户 群 体 的 改 变 平 时 都 是 熟 客 来 春 节 期 间 多 了 很 多 的 新 客 因 为 价 格 较 低 生 意 主 要 依 靠 销 量 但 达 到 全 年 四 成 的 销 量 过 于 夸 张 因 为 县 城 消 费 力 的 原 因 选 择 喝 咖 啡 的 人 并 不 算 多", "source_text": "文 | 师天浩\n\n初十(2月26日)的下午四点,上榜江西婺源县高德扫街榜的一家独立精品咖啡店里,主理人路啡(化名)和顾客有一搭没一搭闲聊,店里只有一桌客人,主理人说这是本地的老熟客。\n\n问到春节期间的生意如何,是不是有像网上说到占到四成以上。“有涨幅,但并没有拉升很多。”路啡说。人均消费超过50元、一杯咖啡20元左右,单价最高的是特调的单品“可以吃的咖啡杯”30元,最低的是美式14元。这样的价格在县城咖啡店里是独特的,走访另一家精品咖啡店最低为美式24元。\n\n尽管价格较为平价,但在这个常住人口仅有30.72万的小县城并不算便宜。关于春节期间销量问题,路啡说:“主要变化是用户群体的改变,平时都是熟客来,春节期间多了很多的新客。因为价格较低,生意主要依靠销量,但达到全年四成的销量过于夸张,因为县城消费力的原因,选择喝咖啡的人并不算多”。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:文 | 师天浩", "source_line_range": [ 1, 8 ] }, { "id": "body-region-2", "text": "从 边 缘 到 c 位 的 逆 袭 1 县 城 咖 啡 的 火 热 并 非 一 夜 之 间 走 在 今 天 的 县 城 街 头 咖 啡 店 的 密 度 令 人 惊 讶 婺 源 县 作 为 一 个 四 线 小 县 城 就 有 4 家 连 锁 咖 啡 品 牌 门 店 八 家 瑞 幸 三 家 库 迪 三 家 挪 瓦 一 家 邮 局 咖 啡 且 高 德 扫 街 榜 咖 啡 榜 中 九 家 都 是 精 品 咖 啡 店 根 据 美 团 发 布 的 2024 县 城 咖 啡 新 业 态 报 告 截 至 2024 年 1 月 全 国 县 城 咖 啡 商 户 数 量 较 2022 年 同 期 增 长 113 36 累 计 订 单 量 较 2022 年 同 期 增 长 322 26 较 2023 年 同 期 增 长 136 37 geoq data 数 据 显 示 截 至 2023 年 12 月 品 牌 咖 啡 在 全 国 县 城 的 总 门 店 数 为 5454 家 其 中 68 3700 家 是 在 2023 年 一 年 内 开 出 的 2023 年 是 咖 啡 的 重 要 节 点 2023 年 中 国 已 超 过 美 国 成 为 全 球 拥 有 品 牌 咖 啡 馆 最 多 的 国 家 研 究 机 构 world coffee portal 报 告 显 示 2023 年 中 国 咖 啡 馆 数 量 增 长 58 达 近 5 万 家 目 前 整 个 东 亚 地 区 约 12 万 家 咖 啡 馆 中 国 占 了 40 以 上 2 县 城 咖 啡 火 热 是 多 重 因 素 首 先 是 消 费 人 群 的 代 际 更 替 数 据 显 示 县 城 咖 啡 消 费 者 多 为 20 40 岁 年 轻 人 女 性 占 64 涵 盖 大 学 生 职 场 新 秀 与 职 场 骨 干 他 们 大 多 有 过 在 大 城 市 学 习 或 工 作 的 经 历 已 经 养 成 了 喝 咖 啡 的 习 惯 路 啡 说 有 部 分 新 客 点 单 时 会 问 到 豆 子 的 品 类 和 产 地 在 沟 通 中 了 解 到 他 们 对 于 咖 啡 有 一 定 的 要 求 主 理 人 还 说 特 调 可 以 吃 的 咖 啡 杯 也 是 客 户 推 荐 给 我 的 当 时 是 澳 洲 的 一 个 咖 啡 活 动 很 火 建 议 我 做 这 一 款 一 直 保 留 到 现 在 其 次 是 消 费 场 景 的 创 新 与 一 二 线 城 市 将 咖 啡 视 为 牛 马 的 加 油 站 的 刚 需 属 性 不 同 县 城 咖 啡 更 多 地 承 载 着 社 交 和 休 闲 功 能 主 打 空 间 属 性 这 也 是 县 城 连 锁 咖 啡 店 和 独 立 精 品 店 的 主 要 区 别 尽 管 瑞 幸 和 星 巴 克 咖 啡 一 样 具 有 一 定 的 空 间 但 连 锁 咖 啡 店 和 独 立 咖 啡 店 的 舒 适 度 和 私 密 性 大 有 不 同 独 立 咖 啡 店 呈 现 主 理 人 对 于 艺 术 和 美 的 外 显 大 多 具 有 皮 质 沙 发 和 一 只 具 有 吸 引 力 的 猫 各 类 土 特 产 特 调 层 出 不 穷 区 别 于 连 锁 咖 啡 的 各 种 经 典 款 精 品 咖 啡 店 都 会 有 主 理 人 的 独 家 秘 方 放 眼 全 国 各 地 如 温 岭 皮 蛋 腐 乳 咖 啡 绍 兴 黄 酒 咖 啡 宁 夏 沙 棘 咖 啡 内 蒙 古 奶 皮 子 咖 啡 西 藏 酥 油 茶 拿 铁 贵 州 刺 梨 咖 啡 等 都 成 为 吸 引 年 轻 人 的 打 卡 利 器 是 小 红 书 宣 传 的 神 秘 道 具", "source_text": "从边缘到C位的逆袭\n\n1.县城咖啡的火热,并非一夜之间\n\n走在今天的县城街头,咖啡店的密度令人惊讶。\n\n婺源县,作为一个四线小县城,就有4家连锁咖啡品牌门店。八家瑞幸、三家库迪、三家挪瓦、一家邮局咖啡,且高德扫街榜咖啡榜中九家都是精品咖啡店。\n\n根据美团发布的《2024县城咖啡新业态报告》,截至2024年1月,全国县城咖啡商户数量较2022年同期增长113.36%,累计订单量较2022年同期增长322.26%,较2023年同期增长136.37%。\n\nGeoQ Data数据显示,截至2023年12月,品牌咖啡在全国县城的总门店数为5454家,其中68%(3700家)是在2023年一年内开出的。\n\n2023年是咖啡的重要节点,2023年中国已超过美国,成为全球拥有品牌咖啡馆最多的国家。研究机构World Coffee Portal报告显示,2023年中国咖啡馆数量增长58%,达近5万家,目前整个东亚地区约12万家咖啡馆,中国占了40%以上。\n\n2.县城咖啡火热是多重因素\n\n首先是消费人群的代际更替。\n\n数据显示,县城咖啡消费者多为20-40岁年轻人,女性占64%,涵盖大学生、职场新秀与职场骨干。他们大多有过在大城市学习或工作的经历,已经养成了喝咖啡的习惯。路啡说:“有部分新客点单时会问到豆子的品类和产地,在沟通中了解到他们对于咖啡有一定的要求”。\n\n主理人还说:“特调‘可以吃的咖啡杯’也是客户推荐给我的,当时是澳洲的一个咖啡活动很火,建议我做这一款,一直保留到现在”。\n\n其次是消费场景的创新。\n\n与一二线城市将咖啡视为“牛马的加油站”的刚需属性不同,县城咖啡更多地承载着社交和休闲功能,主打空间属性。这也是县城连锁咖啡店和独立精品店的主要区别,尽管瑞幸和星巴克咖啡一样具有一定的空间,但连锁咖啡店和独立咖啡店的舒适度和私密性大有不同。独立咖啡店呈现主理人对于艺术和美的外显,大多具有皮质沙发和一只具有吸引力的猫。\n\n各类“土特产特调”层出不穷。\n\n区别于连锁咖啡的各种经典款,精品咖啡店都会有主理人的“独家秘方”。放眼全国各地,如温岭“皮蛋腐乳咖啡”、绍兴“黄酒咖啡”、宁夏沙棘咖啡、内蒙古奶皮子咖啡、西藏酥油茶拿铁、贵州刺梨咖啡等,都成为吸引年轻人的打卡利器,是小红书宣传的神秘道具。", "segmentation_method": "reviewed_source_semantics", "label": "从边缘到 C位的逆袭", "source_line_range": [ 9, 38 ] }, { "id": "body-region-3", "text": "春 节 后 县 城 咖 啡 何 去 何 从 县 城 咖 啡 的 火 热 很 大 程 度 上 是 春 节 经 济 的 助 推 每 年 春 节 大 量 在 外 工 作 学 习 的 年 轻 人 返 乡 将 大 城 市 的 咖 啡 消 费 习 惯 带 回 县 城 京 东 超 市 2023 咖 啡 与 茶 消 费 洞 察 报 告 显 示 2023 年 县 域 市 场 咖 啡 消 费 增 速 远 超 一 线 城 市 人 均 消 费 金 额 增 速 比 一 线 城 市 高 出 26 2024 年 春 节 期 间 浙 江 省 内 黄 酒 咖 啡 销 量 较 2023 年 同 期 增 长 17 倍 洋 菜 膏 拿 铁 搜 索 量 同 比 增 长 200 年 后 生 意 淡 了 很 多 营 业 额 骤 降 1 3 左 右 但 是 属 于 正 常 情 况 算 是 回 归 日 常 营 业 水 准 另 一 家 咖 啡 店 主 理 人 坦 言 同 样 还 是 2023 年 这 一 年 瑞 幸 在 中 国 的 销 售 额 首 次 超 过 星 巴 克 中 国 坐 稳 行 业 第 一 后 加 速 下 沉 星 巴 克 创 始 人 舒 尔 茨 提 出 未 来 要 覆 盖 中 国 3000 个 县 城 库 迪 推 出 百 城 千 店 促 销 将 9 块 9 咖 啡 大 战 的 战 火 烧 向 下 沉 市 场 然 而 竞 争 骤 然 加 剧 的 同 时 市 场 却 并 未 同 步 扩 大 县 城 咖 啡 面 临 的 困 境 是 多 方 面 的 最 直 观 的 是 价 格 因 素 普 遍 30 元 到 40 元 一 杯 的 精 品 咖 啡 与 县 城 平 均 消 费 水 平 并 不 匹 配 单 次 打 卡 式 消 费 是 主 流 很 难 形 成 高 频 复 购 相 比 之 下 瑞 幸 13 14 元 的 客 单 价 库 迪 9 9 元 的 优 惠 价 格 更 符 合 县 城 消 费 者 的 承 受 能 力 随 买 随 拿 的 出 单 速 度 满 足 了 用 户 急 于 拿 到 产 品 的 心 理 同 时 主 理 人 对 于 经 营 意 向 多 偏 随 意 因 为 大 多 是 自 建 房 改 装 的 咖 啡 店 不 求 赚 钱 只 要 能 不 亏 就 好 主 理 人 路 啡 说 其 实 咖 啡 店 的 小 红 书 已 经 停 更 3 个 月 了 现 在 能 看 到 了 都 是 客 户 自 发 推 广 有 时 他 们 拍 了 照 片 发 给 我 让 我 去 宣 传 虽 然 我 此 前 从 事 新 媒 体 但 我 个 人 比 较 懒 散 不 太 愿 意 去 做 更 深 层 次 的 问 题 是 消 费 习 惯 尚 未 养 成 一 二 线 城 市 咖 啡 消 费 者 偏 向 刚 需 看 重 产 品 本 身 而 县 城 消 费 者 还 没 有 完 全 被 培 养 出 喝 咖 啡 的 习 惯 消 费 更 偏 向 社 交 和 休 闲 属 性 品 牌 的 重 要 性 更 高 县 城 淡 旺 季 明 显 旺 季 时 主 做 新 客 生 意 淡 季 时 来 的 都 是 周 边 的 老 客 主 理 人 分 析 道 这 也 意 味 着 淡 季 生 意 冷 清 是 常 态 只 要 营 业 额 能 做 到 200 就 满 足 了", "source_text": "春节后,县城咖啡何去何从?\n\n县城咖啡的火热,很大程度上是“春节经济”的助推。\n\n每年春节,大量在外工作、学习的年轻人返乡,将大城市的咖啡消费习惯带回县城。京东超市《2023咖啡与茶消费洞察》报告显示,2023年县域市场咖啡消费增速远超一线城市,人均消费金额增速比一线城市高出26%。2024年春节期间,浙江省内“黄酒咖啡”销量较2023年同期增长17倍,“洋菜膏拿铁”搜索量同比增长200%。\n\n“年后生意淡了很多,营业额骤降1/3左右,但是属于正常情况,算是回归日常营业水准。”另一家咖啡店主理人坦言。\n\n同样还是2023年。\n\n这一年,瑞幸在中国的销售额首次超过星巴克中国,坐稳行业第一后加速下沉;星巴克创始人舒尔茨提出未来要覆盖中国3000个县城;库迪推出“百城千店”促销,将“9块9”咖啡大战的战火烧向下沉市场。\n\n然而竞争骤然加剧的同时,市场却并未同步扩大。\n\n县城咖啡面临的困境是多方面的。\n\n最直观的是价格因素。\n\n普遍30元到40元一杯的精品咖啡与县城平均消费水平并不匹配,单次打卡式消费是主流,很难形成高频复购。\n\n相比之下,瑞幸13-14元的客单价、库迪9.9元的优惠价格,更符合县城消费者的承受能力,随买随拿的出单速度满足了用户急于拿到产品的心理。\n\n同时,主理人对于经营意向多偏随意,因为大多是自建房改装的咖啡店,不求赚钱只要能不亏就好。主理人路啡说:“其实咖啡店的小红书已经停更3个月了,现在能看到了都是客户自发推广。有时他们拍了照片发给我让我去宣传,虽然我此前从事新媒体,但我个人比较懒散,不太愿意去做”。\n\n更深层次的问题是消费习惯尚未养成。\n\n一二线城市咖啡消费者偏向刚需,看重产品本身;而县城消费者还没有完全被培养出喝咖啡的习惯,消费更偏向社交和休闲属性,品牌的重要性更高。\n\n“县城淡旺季明显,旺季时主做新客生意,淡季时来的都是周边的老客”主理人分析道。这也意味着,淡季生意冷清是常态,“只要营业额能做到200就满足了”。", "segmentation_method": "reviewed_source_semantics", "label": "春节后,县城咖啡何去何从?", "source_line_range": [ 39, 68 ] }, { "id": "body-region-4", "text": "破 局 之 道 培 养 土 著 喝 咖 啡 要 破 解 县 城 咖 啡 店 淡 旺 季 明 显 的 困 境 核 心 在 于 培 养 本 地 常 住 人 口 土 著 的 咖 啡 消 费 习 惯 这 是 一 个 需 要 耐 心 和 时 间 的 长 期 工 程 根 据 第 七 次 全 国 人 口 普 查 数 据 我 国 县 域 常 住 人 口 约 7 48 亿 人 占 全 国 人 口 总 数 的 52 97 全 国 县 城 及 县 级 市 城 区 常 住 人 口 约 2 5 亿 人 占 全 国 城 镇 常 住 人 口 的 近 30 全 国 县 镇 发 展 报 告 2024 显 示 全 国 百 强 县 市 及 百 强 区 常 住 人 口 规 模 突 破 2 亿 其 中 新 市 民 群 体 占 比 超 过 40 这 一 消 费 主 力 呈 现 出 休 闲 时 间 充 裕 消 费 欲 望 较 低 消 费 动 能 强 劲 目 前 瑞 幸 咖 啡 县 域 门 店 单 店 日 均 杯 量 已 达 到 城 市 门 店 的 85 而 客 单 价 反 超 城 市 门 店 12 形 成 价 格 敏 感 度 低 体 验 追 求 度 高 的 新 型 消 费 模 式 这 说 明 只 要 培 养 得 当 县 城 土 著 完 全 具 备 成 为 咖 啡 忠 实 消 费 者 的 能 力 而 且 如 今 的 年 轻 人 对 于 咖 啡 的 接 受 度 明 显 高 于 茶 叶 红 餐 产 业 研 究 院 z 世 代 现 制 饮 品 消 费 洞 察 报 告 2024 显 示 47 6 的 z 世 代 消 费 者 表 示 购 买 现 磨 咖 啡 的 频 率 上 升 这 一 比 例 显 著 高 于 表 示 购 买 茶 饮 产 品 频 率 上 升 的 消 费 者 36 9 且 41 7 的 z 世 代 消 费 者 表 示 购 买 茶 饮 产 品 的 频 率 基 本 不 变 这 意 味 着 现 制 茶 饮 在 年 轻 群 体 中 已 触 及 增 长 天 花 板 而 咖 啡 仍 处 于 渗 透 率 提 升 的 快 车 道 如 何 培 养 土 著 喝 咖 啡 第 一 降 低 消 费 门 槛 价 格 是 阻 碍 尝 试 的 首 要 因 素 据 红 餐 大 数 据 全 国 咖 饮 品 类 人 均 消 费 从 2023 年 9 月 的 41 元 逐 步 下 滑 至 2025 年 9 月 的 26 元 人 均 消 费 15 元 以 下 的 门 店 占 比 从 29 8 上 升 至 36 9 路 啡 说 尽 管 我 的 价 格 最 高 才 30 但 平 价 所 带 来 的 用 户 粘 性 和 销 量 次 数 同 样 可 以 带 来 可 观 的 营 销 低 价 策 略 虽 压 缩 利 润 但 在 市 场 教 育 阶 段 是 必 要 的 第 二 本 土 化 创 新 县 城 居 民 对 纯 粹 西 式 咖 啡 接 受 度 有 限 相 比 于 美 式 大 家 更 爱 喝 加 奶 加 糖 的 拿 铁 式 咖 啡 土 特 产 特 调 同 样 大 受 欢 迎 这 种 本 土 化 创 新 降 低 了 尝 试 门 槛 让 咖 啡 变 得 更 接 地 气 让 用 户 更 愿 意 为 咖 啡 付 费 第 三 打 造 社 交 空 间 与 一 二 线 城 市 即 买 即 走 的 快 节 奏 消 费 不 同 县 城 消 费 者 更 看 重 咖 啡 馆 的 社 交 属 性 吃 饭 喝 咖 啡 都 不 是 最 终 目 的 重 要 的 是 社 交 氛 围 和 环 境 一 杯 咖 啡 几 个 好 友 一 个 下 午 才 是 县 城 咖 啡 的 常 态 路 啡 说 相 比 于 其 他 独 立 精 品 咖 啡 店 我 们 店 的 营 业 时 间 更 长 为 10 点 到 11 点 有 时 还 会 根 据 用 户 调 整 时 间 在 县 城 咖 啡 馆 正 在 成 为 新 的 情 报 中 心 和 社 交 场 所 朋 友 聚 会 商 务 洽 谈 都 可 以 在 这 里 发 生 第 四 培 养 长 期 习 惯 青 天 县 中 国 县 城 咖 啡 第 一 县 春 节 假 期 里 浙 江 青 田 699 家 遍 布 大 街 小 巷 的 咖 啡 馆 累 计 营 业 总 额 超 2500 万 元 单 店 日 均 营 业 额 达 4000 元 这 背 后 是 华 侨 文 化 的 长 期 浸 润 青 田 有 华 侨 38 万 他 们 返 乡 后 带 回 了 咖 啡 文 化 逐 渐 带 动 当 地 产 业 发 展 打 卡 青 田 咖 啡 馆 成 了 青 田 文 旅 的 全 新 打 开 方 式 这 足 以 证 明 咖 啡 习 惯 的 养 成 需 要 时 间 一 旦 养 成 就 会 形 成 稳 定 的 消 费 市 场 结 语 县 城 咖 啡 的 故 事 是 中 国 消 费 市 场 下 沉 的 缩 影 从 一 线 城 市 到 县 城 咖 啡 正 在 完 成 从 精 英 消 费 到 大 众 消 费 的 蜕 变 这 个 过 程 中 有 春 节 返 乡 潮 带 来 的 短 暂 繁 荣 也 有 淡 季 门 可 罗 雀 的 现 实 困 境 有 连 锁 品 牌 攻 城 略 地 的 激 烈 竞 争 也 有 独 立 小 店 坚 守 特 色 的 艰 难 突 围 路 啡 说 当 时 开 店 时 装 修 比 较 简 陋 年 后 打 算 将 咖 啡 店 重 新 装 修 做 成 徽 派 建 筑 风 格 然 后 再 增 加 几 款 土 特 产 特 调 将 文 旅 和 咖 啡 相 结 合 对 于 县 城 咖 啡 从 业 者 来 说 培 养 土 著 喝 咖 啡 不 是 一 蹴 而 就 的 事 情 它 需 要 价 格 的 让 利 产 品 的 创 新 场 景 的 打 造 更 需 要 时 间 的 沉 淀 毕 竟 2 5 亿 县 城 常 住 人 口 的 市 场 潜 力 值 得 所 有 咖 啡 从 业 者 耐 心 等 待 用 心 培 育", "source_text": "破局之道,培养“土著”喝咖啡\n\n要破解县城咖啡店“淡旺季明显”的困境,核心在于培养本地常住人口“土著”的咖啡消费习惯。\n\n这是一个需要耐心和时间的长期工程。\n\n根据第七次全国人口普查数据,我国县域常住人口约7.48亿人,占全国人口总数的52.97%。全国县城及县级市城区常住人口约2.5亿人,占全国城镇常住人口的近30%。《全国县镇发展报告(2024)》显示,全国百强县市及百强区常住人口规模突破2亿,其中“新市民”群体占比超过40%。\n\n这一消费主力呈现出,休闲时间充裕、消费欲望较低、消费动能强劲。\n\n目前,瑞幸咖啡县域门店单店日均杯量已达到城市门店的85%,而客单价反超城市门店12%,形成“价格敏感度低、体验追求度高”的新型消费模式。\n\n这说明,只要培养得当,县城“土著”完全具备成为咖啡忠实消费者的能力。\n\n而且如今的年轻人对于咖啡的接受度明显高于茶叶,红餐产业研究院《Z世代现制饮品消费洞察报告2024》显示:47.6%的Z世代消费者表示购买现磨咖啡的频率上升,这一比例显著高于表示购买茶饮产品频率上升的消费者(36.9%)。\n\n且41.7%的Z世代消费者表示购买茶饮产品的频率“基本不变”,这意味着,现制茶饮在年轻群体中已触及增长天花板,而咖啡仍处于渗透率提升的快车道。\n\n如何培养“土著”喝咖啡?\n\n第一,降低消费门槛。\n\n价格是阻碍尝试的首要因素。据红餐大数据,全国咖饮品类人均消费从2023年9月的41元逐步下滑至2025年9月的26元,人均消费15元以下的门店占比从29.8%上升至36.9%。\n\n路啡说:“尽管我的价格最高才30,但平价所带来的用户粘性和销量次数同样可以带来可观的营销”,低价策略虽压缩利润,但在市场教育阶段是必要的。\n\n第二,本土化创新。\n\n县城居民对纯粹西式咖啡接受度有限,相比于美式,大家更爱喝加奶加糖的“拿铁式”咖啡,“土特产特调”同样大受欢迎。这种本土化创新降低了尝试门槛,让咖啡变得更“接地气”,让用户更愿意为咖啡付费。\n\n第三,打造社交空间。\n\n与一二线城市“即买即走”的快节奏消费不同,县城消费者更看重咖啡馆的社交属性。“吃饭、喝咖啡都不是最终目的,重要的是社交氛围和环境。”一杯咖啡,几个好友,一个下午,才是县城咖啡的常态。路啡说:“相比于其他独立精品咖啡店,我们店的营业时间更长,为10点到11点,有时还会根据用户调整时间”。\n\n在县城,咖啡馆正在成为新的“情报中心”和社交场所,朋友聚会、商务洽谈都可以在这里发生。\n\n第四,培养长期习惯。\n\n青天县,中国县城咖啡第一县。\n\n春节假期里,浙江青田699家遍布大街小巷的咖啡馆,累计营业总额超2500万元,单店日均营业额达4000元。这背后是华侨文化的长期浸润,青田有华侨38万,他们返乡后带回了咖啡文化,逐渐带动当地产业发展。\n\n“打卡青田咖啡馆”成了青田文旅的全新打开方式。\n\n这足以证明,咖啡习惯的养成需要时间,一旦养成,就会形成稳定的消费市场。\n\n结语:\n\n县城咖啡的故事,是中国消费市场下沉的缩影。\n\n从一线城市到县城,咖啡正在完成从“精英消费”到“大众消费”的蜕变。这个过程中,有春节返乡潮带来的短暂繁荣,也有淡季门可罗雀的现实困境;有连锁品牌攻城略地的激烈竞争,也有独立小店坚守特色的艰难突围。\n\n路啡说:“当时开店时装修比较简陋,年后打算将咖啡店重新装修,做成徽派建筑风格,然后再增加几款‘土特产特调’,将文旅和咖啡相结合”。\n\n对于县城咖啡从业者来说,培养“土著”喝咖啡,不是一蹴而就的事情,它需要价格的让利、产品的创新、场景的打造,更需要时间的沉淀。\n\n毕竟,2.5亿县城常住人口的市场潜力,值得所有咖啡从业者耐心等待、用心培育。", "segmentation_method": "reviewed_source_semantics", "label": "破局之道 , 培养 “ 土著 ” 喝咖啡", "source_line_range": [ 69, 125 ] } ], "ending": { "text": "县城咖啡从业者来说,培养“土著”喝咖啡,不是一蹴而就的事情,它需要价格的让利、产品的创新、场景的打造,更需要时间的沉淀。\n\n毕竟,2.5亿县城常住人口的市场潜力,值得所有咖啡从业者耐心等待、用心培育。" } } }, { "id": "article-086", "name": "Announcing Rust 1.0", "url": "https://blog.rust-lang.org/2015/05/15/Rust-1.0/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Announcing Rust 1.0" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "The Rust Core Team" ] }, { "id": "stable-3", "alternatives": [ "Rust" ] }, { "id": "stable-4", "alternatives": [ "Install" ] }, { "id": "stable-5", "alternatives": [ "Learn" ] }, { "id": "stable-6", "alternatives": [ "Tools" ] }, { "id": "stable-7", "alternatives": [ "Governance" ] }, { "id": "stable-8", "alternatives": [ "Community" ] }, { "id": "stable-9", "alternatives": [ "Get help!" ] }, { "id": "stable-10", "alternatives": [ "Documentation" ] }, { "id": "stable-11", "alternatives": [ "Contact the Rust Team" ] }, { "id": "stable-12", "alternatives": [ "Terms and policies" ] }, { "id": "stable-13", "alternatives": [ "Code of Conduct" ] }, { "id": "stable-14", "alternatives": [ "Licenses" ] }, { "id": "stable-15", "alternatives": [ "Logo Policy and Media Guide" ] }, { "id": "stable-16", "alternatives": [ "Security Disclosures" ] }, { "id": "stable-17", "alternatives": [ "All Policies" ] }, { "id": "stable-18", "alternatives": [ "Social" ] }, { "id": "stable-19", "alternatives": [ "RSS" ] }, { "id": "stable-20", "alternatives": [ "Main Blog" ] }, { "id": "stable-21", "alternatives": [ "\"Inside Rust\" Blog" ] }, { "id": "stable-22", "alternatives": [ "Maintained by the Rust Team. See a typo?" ] }, { "id": "stable-23", "alternatives": [ "Send a fix here!" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete narrative and all 215 historical contributor entries through らいどっと reviewed in full-page screenshot. Contributor list is original fixed article content, not a live count or feed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Announcing Rust 1.0" ], "html_selector": "h2,h1,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-086/comment-qualification-reference-r5.json", "sha256": "2b8127b4a1725a790ab564f342dead5044e38516ed29f0d83019ac572bfef82a", "chars": 777, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Today we are very proud to announce the 1.0 release of Rust, a new programming language aiming to make it easier to build reliable, efficient systems. Rust combines low-level control over performance with high-level convenience and safety guarantees. Better yet, it achieves these goals without requiring a garbage collector or runtime, making it possible to use Rust libraries as a \"drop-in replacement\" for C. If you'd like to experiment with Rust, the \"Getting Started\" section of the Rust book is your best bet (if you prefer to use an e-reader, Pascal Hertleif maintains unofficial e-book versions as well).\n\nWhat makes Rust different from other languages is its type system, which represents a refinement and codification of \"best practices\" that have been hammered out by generations of C and C++ programmers. As such, Rust has something to offer for both experienced systems programmers and newcomers alike: experienced programmers will find they save time they would have spent debugging, whereas newcomers can write low-level code without worrying about minor mistakes leading to mysterious crashes.\n\nWhat does it mean for Rust to be 1.0?\n\nThe current Rust language is the result of a lot of iteration and experimentation. The process has worked out well for us: Rust today is both simpler and more powerful than we originally thought would be possible. But all that experimentation also made it difficult to maintain projects written in Rust, since the language and standard library were constantly changing.\n\nThe 1.0 release marks the end of that churn. This release is the official beginning of our commitment to stability, and as such it offers a firm foundation for building applications and libraries. From this point forward, breaking changes are largely out of scope (some minor caveats apply, such as compiler bugs).\n\nThat said, releasing 1.0 doesn't mean that the Rust language is \"done\". We have many improvements in store. In fact, the Nightly builds of Rust already demonstrate improvements to compile times (with more to come) and includes work on new APIs and language features, like std::fs and associated constants.\n\nTo help ensure that compiler and language improvements make their way out into the ecosystem at large as quickly as possible, we've adopted a train-based release model. This means that we'll be issuing regular releases every six weeks, just like the Firefox and Chrome web browsers. To kick off that process, we are also releasing Rust 1.1 beta today, simultaneously with Rust 1.0.\n\nCargo and crates.io\n\nBuilding a real project is about more than just writing code -- it's also about managing dependencies. Cargo, the Rust package manager and build system, is designed to make this easy. Using Cargo, downloading and installing new libraries is as simple as adding one line to your manifest.\n\nOf course, to use a dependency, you first have to find it. This is where crates.io comes in -- crates.io is a central package repository for Rust code. It makes it easy to search for other people's packages or to publish your own.\n\nSince we announced cargo and crates.io approximately six months ago, the number of packages has been growing steadily. Nonetheless, it's still early days, and there are still lots of great packages yet to be written. If you're interested in building a library that will take the Rust world by storm, there's no time like the present!\n\nOpen Source and Open Governance\n\nRust has been an open-source project from the start. Over the last few years, we've been constantly looking for ways to make our governance more open and community driven. Since we introduced the RFC process a little over a year ago, all major decisions about Rust are written up and discussed in the open in the form of an RFC. Recently, we adopted a new governance model, which establishes a set of subteams, each responsible for RFCs in one particular area. If you'd like help shape the future of Rust, we encourage you to get involved, either by uploading libraries to crates.io, commenting on RFCs, or writing code for Rust itself.\n\nWe'd like to give a special thank you to the following people, each of whom contributed changes since our previous release (the complete list of contributors is here):\n\nAaron Gallagher\nAaron Turon\nAbhishek Chanda\nAdolfo Ochagavía\nAlex Burka\nAlex Crichton\nAlex Quach\nAlexander Polakov\nAndrea Canciani\nAndreas Martens\nAndreas Tolfsen\nAndrei Oprea\nAndrew Paseltiner\nAndrew Seidl\nAndrew Straw\nAndrzej Janik\nAram Visser\nAriel Ben-Yehuda\nAugusto Hack\nAvdi Grimm\nBarosl Lee\nBen Ashford\nBen Gesoff\nBjörn Steinbrink\nBrad King\nBrendan Graetz\nBrett Cannon\nBrian Anderson\nBrian Campbell\nCarlos Galarza\nCarol (Nichols || Goulding)\nCarol Nichols\nChris Morgan\nChris Wong\nChristopher Chambers\nClark Gaebel\nCole Reynolds\nColin Walters\nConrad Kleinespel\nCorey Farwell\nDan Callahan\nDave Huseby\nDavid Reid\nDiggory Hardy\nDominic van Berkel\nDominick Allen\nDon Petersen\nDzmitry Malyshau\nEarl St Sauver\nEduard Burtescu\nErick Tryzelaar\nFelix S. Klock II\nFlorian Hahn\nFlorian Hartwig\nFranziska Hinkelmann\nFuGangqiang\nGarming Sam\nGeoffrey Thomas\nGeoffry Song\nGleb Kozyrev\nGraydon Hoare\nGuillaume Gomez\nHajime Morrita\nHech\nHeejong Ahn\nHika Hibariya\nHuon Wilson\nIgor Strebezhev\nIsaac Ge\nJ Bailey\nJake Goulding\nJames Miller\nJames Perry\nJan Andersson\nJan Bujak\nJan-Erik Rediger\nJannis Redmann\nJason Yeo\nJohann\nJohann Hofmann\nJohannes Oertel\nJohn Gallagher\nJohn Van Enk\nJonathan S\nJordan Humphreys\nJoseph Crail\nJosh Triplett\nKang Seonghoon\nKeegan McAllister\nKelvin Ly\nKevin Ballard\nKevin Butler\nKevin Mehall\nKrzysztof Drewniak\nLee Aronson\nLee Jeffery\nLiam Monahan\nLiigo Zhuang\nLuke Gallagher\nLuqman Aden\nManish Goregaokar\nManuel Hoffmann\nMarin Atanasov Nikolov\nMark Mossberg\nMarvin Löbel\nMathieu Rochette\nMathijs van de Nes\nMatt Brubeck\nMichael Alexander\nMichael Macias\nMichael Park\nMichael Rosenberg\nMichael Sproul\nMichael Woerister\nMichael Wu\nMichał Czardybon\nMickaël Salaün\nMike Boutin\nMike Sampson\nMs2ger\nNelo Onyiah\nNicholas\nNicholas Mazzuca\nNick Cameron\nNick Hamann\nNick Platt\nNiko Matsakis\nOak\nOliver Schneider\nP1start\nPascal Hertleif\nPaul Banks\nPaul Faria\nPaul Quint\nPete Hunt\nPeter Marheine\nPhil Dawes\nPhilip Munksgaard\nPiotr Czarnecki\nPiotr Szotkowski\nPoga Po\nPrzemysław Wesołek\nRalph Giles\nRaphael Speyer\nRemi Rampin\nRicardo Martins\nRicho Healey\nRob Young\nRobin Kruppe\nRobin Stocker\nRory O’Kane\nRuud van Asseldonk\nRyan Prichard\nScott Olson\nSean Bowe\nSean McArthur\nSean Patrick Santos\nSeo Sanghyeon\nShmuale Mark\nSimon Kern\nSimon Sapin\nSimonas Kazlauskas\nSindre Johansen\nSkyler\nSteve Klabnik\nSteven Allen\nSwaroop C H\nSébastien Marie\nTamir Duberstein\nTero Hänninen\nTheo Belaire\nTheo Belaire\nThiago Carvalho\nThomas Jespersen\nTibor Benke\nTim Cuthbertson\nTincan\nTing-Yu Lin\nTobias Bucher\nToni Cárdenas\nTshepang Lekhonkhobe\nUlrik Sverdrup\nVadim Chugunov\nVadim Petrochenkov\nValerii Hiora\nWangshan Lu\nWei-Ming Yang\nWill\nWill Hipschman\nWojciech Ogrodowczyk\nXue Fuqiao\nXuefeng Wu\nYork Xiang\nYoung Wu\nbcoopers\ncritiqjo\ndiwic\nfenduru\ngareins\ngithub-monoculture\ninrustwetrust\njooert\nkgv\nklutzy\nkwantam\nleunggamciu\nmdinger\nnwin\npez\nrobertfoss\nrundrop1\nsinkuu\ntynopex\nŁukasz Niemier\nらいどっと", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 4, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "today we are very proud to announce the 1 0 release of rust a new programming language aiming to make it easier to build reliable efficient systems rust combines low level control over performance with high level convenience and safety guarantees better yet it achieves these goals without requiring a garbage collector or runtime making it possible to use rust libraries as a drop in replacement for c if you d like to experiment with rust the getting started section of the rust book is your best bet if you prefer to use an e reader pascal hertleif maintains unofficial e book versions as well what makes rust different from other languages is its type system which represents a refinement and codification of best practices that have been hammered out by generations of c and c programmers as such rust has something to offer for both experienced systems programmers and newcomers alike experienced programmers will find they save time they would have spent debugging whereas newcomers can write low level code without worrying about minor mistakes leading to mysterious crashes", "source_text": "Today we are very proud to announce the 1.0 release of Rust, a new programming language aiming to make it easier to build reliable, efficient systems. Rust combines low-level control over performance with high-level convenience and safety guarantees. Better yet, it achieves these goals without requiring a garbage collector or runtime, making it possible to use Rust libraries as a \"drop-in replacement\" for C. If you'd like to experiment with Rust, the \"Getting Started\" section of the Rust book is your best bet (if you prefer to use an e-reader, Pascal Hertleif maintains unofficial e-book versions as well).\n\nWhat makes Rust different from other languages is its type system, which represents a refinement and codification of \"best practices\" that have been hammered out by generations of C and C++ programmers. As such, Rust has something to offer for both experienced systems programmers and newcomers alike: experienced programmers will find they save time they would have spent debugging, whereas newcomers can write low-level code without worrying about minor mistakes leading to mysterious crashes.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Today we are very proud to announce the 1.0 release of Rust,", "source_line_range": [ 1, 4 ] }, { "id": "body-region-2", "text": "what does it mean for rust to be 1 0 the current rust language is the result of a lot of iteration and experimentation the process has worked out well for us rust today is both simpler and more powerful than we originally thought would be possible but all that experimentation also made it difficult to maintain projects written in rust since the language and standard library were constantly changing the 1 0 release marks the end of that churn this release is the official beginning of our commitment to stability and as such it offers a firm foundation for building applications and libraries from this point forward breaking changes are largely out of scope some minor caveats apply such as compiler bugs that said releasing 1 0 doesn t mean that the rust language is done we have many improvements in store in fact the nightly builds of rust already demonstrate improvements to compile times with more to come and includes work on new apis and language features like std fs and associated constants to help ensure that compiler and language improvements make their way out into the ecosystem at large as quickly as possible we ve adopted a train based release model this means that we ll be issuing regular releases every six weeks just like the firefox and chrome web browsers to kick off that process we are also releasing rust 1 1 beta today simultaneously with rust 1 0", "source_text": "What does it mean for Rust to be 1.0?\n\nThe current Rust language is the result of a lot of iteration and experimentation. The process has worked out well for us: Rust today is both simpler and more powerful than we originally thought would be possible. But all that experimentation also made it difficult to maintain projects written in Rust, since the language and standard library were constantly changing.\n\nThe 1.0 release marks the end of that churn. This release is the official beginning of our commitment to stability, and as such it offers a firm foundation for building applications and libraries. From this point forward, breaking changes are largely out of scope (some minor caveats apply, such as compiler bugs).\n\nThat said, releasing 1.0 doesn't mean that the Rust language is \"done\". We have many improvements in store. In fact, the Nightly builds of Rust already demonstrate improvements to compile times (with more to come) and includes work on new APIs and language features, like std::fs and associated constants.\n\nTo help ensure that compiler and language improvements make their way out into the ecosystem at large as quickly as possible, we've adopted a train-based release model. This means that we'll be issuing regular releases every six weeks, just like the Firefox and Chrome web browsers. To kick off that process, we are also releasing Rust 1.1 beta today, simultaneously with Rust 1.0.", "segmentation_method": "reviewed_source_semantics", "label": "What does it mean for Rust to be 1.0?", "source_line_range": [ 5, 14 ] }, { "id": "body-region-3", "text": "cargo and crates io building a real project is about more than just writing code it s also about managing dependencies cargo the rust package manager and build system is designed to make this easy using cargo downloading and installing new libraries is as simple as adding one line to your manifest of course to use a dependency you first have to find it this is where crates io comes in crates io is a central package repository for rust code it makes it easy to search for other people s packages or to publish your own since we announced cargo and crates io approximately six months ago the number of packages has been growing steadily nonetheless it s still early days and there are still lots of great packages yet to be written if you re interested in building a library that will take the rust world by storm there s no time like the present", "source_text": "Cargo and crates.io\n\nBuilding a real project is about more than just writing code -- it's also about managing dependencies. Cargo, the Rust package manager and build system, is designed to make this easy. Using Cargo, downloading and installing new libraries is as simple as adding one line to your manifest.\n\nOf course, to use a dependency, you first have to find it. This is where crates.io comes in -- crates.io is a central package repository for Rust code. It makes it easy to search for other people's packages or to publish your own.\n\nSince we announced cargo and crates.io approximately six months ago, the number of packages has been growing steadily. Nonetheless, it's still early days, and there are still lots of great packages yet to be written. If you're interested in building a library that will take the Rust world by storm, there's no time like the present!", "segmentation_method": "reviewed_source_semantics", "label": "Cargo and crates.io", "source_line_range": [ 15, 22 ] }, { "id": "body-region-4", "text": "open source and open governance rust has been an open source project from the start over the last few years we ve been constantly looking for ways to make our governance more open and community driven since we introduced the rfc process a little over a year ago all major decisions about rust are written up and discussed in the open in the form of an rfc recently we adopted a new governance model which establishes a set of subteams each responsible for rfcs in one particular area if you d like help shape the future of rust we encourage you to get involved either by uploading libraries to crates io commenting on rfcs or writing code for rust itself we d like to give a special thank you to the following people each of whom contributed changes since our previous release the complete list of contributors is here aaron gallagher aaron turon abhishek chanda adolfo ochagavía alex burka alex crichton alex quach alexander polakov andrea canciani andreas martens andreas tolfsen andrei oprea andrew paseltiner andrew seidl andrew straw andrzej janik aram visser ariel ben yehuda augusto hack avdi grimm barosl lee ben ashford ben gesoff björn steinbrink brad king brendan graetz brett cannon brian anderson brian campbell carlos galarza carol nichols goulding carol nichols chris morgan chris wong christopher chambers clark gaebel cole reynolds colin walters conrad kleinespel corey farwell dan callahan dave huseby david reid diggory hardy dominic van berkel dominick allen don petersen dzmitry malyshau earl st sauver eduard burtescu erick tryzelaar felix s klock ii florian hahn florian hartwig franziska hinkelmann fugangqiang garming sam geoffrey thomas geoffry song gleb kozyrev graydon hoare guillaume gomez hajime morrita hech heejong ahn hika hibariya huon wilson igor strebezhev isaac ge j bailey jake goulding james miller james perry jan andersson jan bujak jan erik rediger jannis redmann jason yeo johann johann hofmann johannes oertel john gallagher john van enk jonathan s jordan humphreys joseph crail josh triplett kang seonghoon keegan mcallister kelvin ly kevin ballard kevin butler kevin mehall krzysztof drewniak lee aronson lee jeffery liam monahan liigo zhuang luke gallagher luqman aden manish goregaokar manuel hoffmann marin atanasov nikolov mark mossberg marvin löbel mathieu rochette mathijs van de nes matt brubeck michael alexander michael macias michael park michael rosenberg michael sproul michael woerister michael wu michał czardybon mickaël salaün mike boutin mike sampson ms2ger nelo onyiah nicholas nicholas mazzuca nick cameron nick hamann nick platt niko matsakis oak oliver schneider p1start pascal hertleif paul banks paul faria paul quint pete hunt peter marheine phil dawes philip munksgaard piotr czarnecki piotr szotkowski poga po przemysław wesołek ralph giles raphael speyer remi rampin ricardo martins richo healey rob young robin kruppe robin stocker rory o kane ruud van asseldonk ryan prichard scott olson sean bowe sean mcarthur sean patrick santos seo sanghyeon shmuale mark simon kern simon sapin simonas kazlauskas sindre johansen skyler steve klabnik steven allen swaroop c h sébastien marie tamir duberstein tero hänninen theo belaire theo belaire thiago carvalho thomas jespersen tibor benke tim cuthbertson tincan ting yu lin tobias bucher toni cárdenas tshepang lekhonkhobe ulrik sverdrup vadim chugunov vadim petrochenkov valerii hiora wangshan lu wei ming yang will will hipschman wojciech ogrodowczyk xue fuqiao xuefeng wu york xiang young wu bcoopers critiqjo diwic fenduru gareins github monoculture inrustwetrust jooert kgv klutzy kwantam leunggamciu mdinger nwin pez robertfoss rundrop1 sinkuu tynopex łukasz niemier らいどっと", "source_text": "Open Source and Open Governance\n\nRust has been an open-source project from the start. Over the last few years, we've been constantly looking for ways to make our governance more open and community driven. Since we introduced the RFC process a little over a year ago, all major decisions about Rust are written up and discussed in the open in the form of an RFC. Recently, we adopted a new governance model, which establishes a set of subteams, each responsible for RFCs in one particular area. If you'd like help shape the future of Rust, we encourage you to get involved, either by uploading libraries to crates.io, commenting on RFCs, or writing code for Rust itself.\n\nWe'd like to give a special thank you to the following people, each of whom contributed changes since our previous release (the complete list of contributors is here):\n\nAaron Gallagher\nAaron Turon\nAbhishek Chanda\nAdolfo Ochagavía\nAlex Burka\nAlex Crichton\nAlex Quach\nAlexander Polakov\nAndrea Canciani\nAndreas Martens\nAndreas Tolfsen\nAndrei Oprea\nAndrew Paseltiner\nAndrew Seidl\nAndrew Straw\nAndrzej Janik\nAram Visser\nAriel Ben-Yehuda\nAugusto Hack\nAvdi Grimm\nBarosl Lee\nBen Ashford\nBen Gesoff\nBjörn Steinbrink\nBrad King\nBrendan Graetz\nBrett Cannon\nBrian Anderson\nBrian Campbell\nCarlos Galarza\nCarol (Nichols || Goulding)\nCarol Nichols\nChris Morgan\nChris Wong\nChristopher Chambers\nClark Gaebel\nCole Reynolds\nColin Walters\nConrad Kleinespel\nCorey Farwell\nDan Callahan\nDave Huseby\nDavid Reid\nDiggory Hardy\nDominic van Berkel\nDominick Allen\nDon Petersen\nDzmitry Malyshau\nEarl St Sauver\nEduard Burtescu\nErick Tryzelaar\nFelix S. Klock II\nFlorian Hahn\nFlorian Hartwig\nFranziska Hinkelmann\nFuGangqiang\nGarming Sam\nGeoffrey Thomas\nGeoffry Song\nGleb Kozyrev\nGraydon Hoare\nGuillaume Gomez\nHajime Morrita\nHech\nHeejong Ahn\nHika Hibariya\nHuon Wilson\nIgor Strebezhev\nIsaac Ge\nJ Bailey\nJake Goulding\nJames Miller\nJames Perry\nJan Andersson\nJan Bujak\nJan-Erik Rediger\nJannis Redmann\nJason Yeo\nJohann\nJohann Hofmann\nJohannes Oertel\nJohn Gallagher\nJohn Van Enk\nJonathan S\nJordan Humphreys\nJoseph Crail\nJosh Triplett\nKang Seonghoon\nKeegan McAllister\nKelvin Ly\nKevin Ballard\nKevin Butler\nKevin Mehall\nKrzysztof Drewniak\nLee Aronson\nLee Jeffery\nLiam Monahan\nLiigo Zhuang\nLuke Gallagher\nLuqman Aden\nManish Goregaokar\nManuel Hoffmann\nMarin Atanasov Nikolov\nMark Mossberg\nMarvin Löbel\nMathieu Rochette\nMathijs van de Nes\nMatt Brubeck\nMichael Alexander\nMichael Macias\nMichael Park\nMichael Rosenberg\nMichael Sproul\nMichael Woerister\nMichael Wu\nMichał Czardybon\nMickaël Salaün\nMike Boutin\nMike Sampson\nMs2ger\nNelo Onyiah\nNicholas\nNicholas Mazzuca\nNick Cameron\nNick Hamann\nNick Platt\nNiko Matsakis\nOak\nOliver Schneider\nP1start\nPascal Hertleif\nPaul Banks\nPaul Faria\nPaul Quint\nPete Hunt\nPeter Marheine\nPhil Dawes\nPhilip Munksgaard\nPiotr Czarnecki\nPiotr Szotkowski\nPoga Po\nPrzemysław Wesołek\nRalph Giles\nRaphael Speyer\nRemi Rampin\nRicardo Martins\nRicho Healey\nRob Young\nRobin Kruppe\nRobin Stocker\nRory O’Kane\nRuud van Asseldonk\nRyan Prichard\nScott Olson\nSean Bowe\nSean McArthur\nSean Patrick Santos\nSeo Sanghyeon\nShmuale Mark\nSimon Kern\nSimon Sapin\nSimonas Kazlauskas\nSindre Johansen\nSkyler\nSteve Klabnik\nSteven Allen\nSwaroop C H\nSébastien Marie\nTamir Duberstein\nTero Hänninen\nTheo Belaire\nTheo Belaire\nThiago Carvalho\nThomas Jespersen\nTibor Benke\nTim Cuthbertson\nTincan\nTing-Yu Lin\nTobias Bucher\nToni Cárdenas\nTshepang Lekhonkhobe\nUlrik Sverdrup\nVadim Chugunov\nVadim Petrochenkov\nValerii Hiora\nWangshan Lu\nWei-Ming Yang\nWill\nWill Hipschman\nWojciech Ogrodowczyk\nXue Fuqiao\nXuefeng Wu\nYork Xiang\nYoung Wu\nbcoopers\ncritiqjo\ndiwic\nfenduru\ngareins\ngithub-monoculture\ninrustwetrust\njooert\nkgv\nklutzy\nkwantam\nleunggamciu\nmdinger\nnwin\npez\nrobertfoss\nrundrop1\nsinkuu\ntynopex\nŁukasz Niemier\nらいどっと", "segmentation_method": "reviewed_source_semantics", "label": "Open Source and Open Governance", "source_line_range": [ 23, 243 ] } ], "ending": { "text": "\nklutzy\nkwantam\nleunggamciu\nmdinger\nnwin\npez\nrobertfoss\nrundrop1\nsinkuu\ntynopex\nŁukasz Niemier\nらいどっと" } } }, { "id": "article-087", "name": "Go Concurrency Patterns: Context", "url": "https://go.dev/blog/context", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Go Concurrency Patterns: Context" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Sameer Ajmani" ] }, { "id": "stable-3", "alternatives": [ "The Go Blog" ] }, { "id": "stable-4", "alternatives": [ "Why Go" ] }, { "id": "stable-5", "alternatives": [ "Learn" ] }, { "id": "stable-6", "alternatives": [ "Docs" ] }, { "id": "stable-7", "alternatives": [ "Packages" ] }, { "id": "stable-8", "alternatives": [ "Community" ] }, { "id": "stable-9", "alternatives": [ "Next article" ] }, { "id": "stable-10", "alternatives": [ "Previous article" ] }, { "id": "stable-11", "alternatives": [ "Blog Index" ] }, { "id": "stable-12", "alternatives": [ "Use Cases" ] }, { "id": "stable-13", "alternatives": [ "Case Studies" ] }, { "id": "stable-14", "alternatives": [ "Get Started" ] }, { "id": "stable-15", "alternatives": [ "Playground" ] }, { "id": "stable-16", "alternatives": [ "Tour" ] }, { "id": "stable-17", "alternatives": [ "Stack Overflow" ] }, { "id": "stable-18", "alternatives": [ "Help" ] }, { "id": "stable-19", "alternatives": [ "Standard Library" ] }, { "id": "stable-20", "alternatives": [ "About Go Packages" ] }, { "id": "stable-21", "alternatives": [ "pkg.go.dev API" ] }, { "id": "stable-22", "alternatives": [ "About" ] }, { "id": "stable-23", "alternatives": [ "Download" ] }, { "id": "stable-24", "alternatives": [ "Blog" ] }, { "id": "stable-25", "alternatives": [ "Issue Tracker" ] }, { "id": "stable-26", "alternatives": [ "Release Notes" ] }, { "id": "stable-27", "alternatives": [ "Brand Guidelines" ] }, { "id": "stable-28", "alternatives": [ "Code of Conduct" ] }, { "id": "stable-29", "alternatives": [ "Connect" ] }, { "id": "stable-30", "alternatives": [ "Bluesky" ] }, { "id": "stable-31", "alternatives": [ "Mastodon" ] }, { "id": "stable-32", "alternatives": [ "Twitter" ] }, { "id": "stable-33", "alternatives": [ "GitHub" ] }, { "id": "stable-34", "alternatives": [ "Slack" ] }, { "id": "stable-35", "alternatives": [ "r/golang" ] }, { "id": "stable-36", "alternatives": [ "Meetup" ] }, { "id": "stable-37", "alternatives": [ "Golang Weekly" ] }, { "id": "stable-38", "alternatives": [ "Copyright" ] }, { "id": "stable-39", "alternatives": [ "Terms of Service" ] }, { "id": "stable-40", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-41", "alternatives": [ "Report an Issue" ] } ] }, "rule_review": { "status": "reviewed", "reason": "All prose, typed code blocks, complete server/userip/google worked example and final Further reading links reviewed in full-page screenshot. Cookie strip left untouched and excluded as session-dependent. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Go Concurrency Patterns: Context" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-087/comment-qualification-reference-r5.json", "sha256": "ec2ec1273b753be8cfdcc8442530718fc78c5bedd1f2623f15e1c67d348fa13f", "chars": 757, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Introduction¶\n\nIn Go servers, each incoming request is handled in its own goroutine. Request handlers often start additional goroutines to access backends such as databases and RPC services. The set of goroutines working on a request typically needs access to request-specific values such as the identity of the end user, authorization tokens, and the request’s deadline. When a request is canceled or times out, all the goroutines working on that request should exit quickly so the system can reclaim any resources they are using.\n\nAt Google, we developed a context package that makes it easy to pass request-scoped values, cancellation signals, and deadlines across API boundaries to all the goroutines involved in handling a request. The package is publicly available as context. This article describes how to use the package and provides a complete working example.\n\nContext¶\n\nThe core of the context package is the Context type:\n\n// A Context carries a deadline, cancellation signal, and request-scoped values\n// across API boundaries. Its methods are safe for simultaneous use by multiple\n// goroutines.\ntype Context interface {\n // Done returns a channel that is closed when this Context is canceled\n // or times out.\n Done() <-chan struct{}\n\n // Err indicates why this context was canceled, after the Done channel\n // is closed.\n Err() error\n\n // Deadline returns the time when this Context will be canceled, if any.\n Deadline() (deadline time.Time, ok bool)\n\n // Value returns the value associated with key or nil if none.\n Value(key interface{}) interface{}\n}\n\n\n(This description is condensed; the godoc is authoritative.)\n\nThe Done method returns a channel that acts as a cancellation signal to functions running on behalf of the Context: when the channel is closed, the functions should abandon their work and return. The Err method returns an error indicating why the Context was canceled. The Pipelines and Cancellation article discusses the Done channel idiom in more detail.\n\nA Context does not have a Cancel method for the same reason the Done channel is receive-only: the function receiving a cancellation signal is usually not the one that sends the signal. In particular, when a parent operation starts goroutines for sub-operations, those sub-operations should not be able to cancel the parent. Instead, the WithCancel function (described below) provides a way to cancel a new Context value.\n\nA Context is safe for simultaneous use by multiple goroutines. Code can pass a single Context to any number of goroutines and cancel that Context to signal all of them.\n\nThe Deadline method allows functions to determine whether they should start work at all; if too little time is left, it may not be worthwhile. Code may also use a deadline to set timeouts for I/O operations.\n\nValue allows a Context to carry request-scoped data. That data must be safe for simultaneous use by multiple goroutines.\n\nDerived contexts¶\n\nThe context package provides functions to derive new Context values from existing ones. These values form a tree: when a Context is canceled, all Contexts derived from it are also canceled.\n\nBackground is the root of any Context tree; it is never canceled:\n\n// Background returns an empty Context. It is never canceled, has no deadline,\n// and has no values. Background is typically used in main, init, and tests,\n// and as the top-level Context for incoming requests.\nfunc Background() Context\n\n\nWithCancel and WithTimeout return derived Context values that can be canceled sooner than the parent Context. The Context associated with an incoming request is typically canceled when the request handler returns. WithCancel is also useful for canceling redundant requests when using multiple replicas. WithTimeout is useful for setting a deadline on requests to backend servers:\n\n// WithCancel returns a copy of parent whose Done channel is closed as soon as\n// parent.Done is closed or cancel is called.\nfunc WithCancel(parent Context) (ctx Context, cancel CancelFunc)\n\n// A CancelFunc cancels a Context.\ntype CancelFunc func()\n\n// WithTimeout returns a copy of parent whose Done channel is closed as soon as\n// parent.Done is closed, cancel is called, or timeout elapses. The new\n// Context's Deadline is the sooner of now+timeout and the parent's deadline, if\n// any. If the timer is still running, the cancel function releases its\n// resources.\nfunc WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc)\n\n\nWithValue provides a way to associate request-scoped values with a Context:\n\n// WithValue returns a copy of parent whose Value method returns val for key.\nfunc WithValue(parent Context, key interface{}, val interface{}) Context\n\n\nThe best way to see how to use the context package is through a worked example.\n\nExample: Google Web Search¶\n\nOur example is an HTTP server that handles URLs like /search?q=golang&timeout=1s by forwarding the query “golang” to the Google Web Search API and rendering the results. The timeout parameter tells the server to cancel the request after that duration elapses.\n\nThe code is split across three packages:\n\nserver provides the main function and the handler for /search.\nuserip provides functions for extracting a user IP address from a request and associating it with a Context.\ngoogle provides the Search function for sending a query to Google.\nThe server program¶\n\nThe server program handles requests like /search?q=golang by serving the first few Google search results for golang. It registers handleSearch to handle the /search endpoint. The handler creates an initial Context called ctx and arranges for it to be canceled when the handler returns. If the request includes the timeout URL parameter, the Context is canceled automatically when the timeout elapses:\n\nfunc handleSearch(w http.ResponseWriter, req *http.Request) {\n // ctx is the Context for this handler. Calling cancel closes the\n // ctx.Done channel, which is the cancellation signal for requests\n // started by this handler.\n var (\n ctx context.Context\n cancel context.CancelFunc\n )\n timeout, err := time.ParseDuration(req.FormValue(\"timeout\"))\n if err == nil {\n // The request has a timeout, so create a context that is\n // canceled automatically when the timeout expires.\n ctx, cancel = context.WithTimeout(context.Background(), timeout)\n } else {\n ctx, cancel = context.WithCancel(context.Background())\n }\n defer cancel() // Cancel ctx as soon as handleSearch returns.\n\n\nThe handler extracts the query from the request and extracts the client’s IP address by calling on the userip package. The client’s IP address is needed for backend requests, so handleSearch attaches it to ctx:\n\n // Check the search query.\n query := req.FormValue(\"q\")\n if query == \"\" {\n http.Error(w, \"no query\", http.StatusBadRequest)\n return\n }\n\n // Store the user IP in ctx for use by code in other packages.\n userIP, err := userip.FromRequest(req)\n if err != nil {\n http.Error(w, err.Error(), http.StatusBadRequest)\n return\n }\n ctx = userip.NewContext(ctx, userIP)\n\n\nThe handler calls google.Search with ctx and the query:\n\n // Run the Google search and print the results.\n start := time.Now()\n results, err := google.Search(ctx, query)\n elapsed := time.Since(start)\n\n\nIf the search succeeds, the handler renders the results:\n\n if err := resultsTemplate.Execute(w, struct {\n Results google.Results\n Timeout, Elapsed time.Duration\n }{\n Results: results,\n Timeout: timeout,\n Elapsed: elapsed,\n }); err != nil {\n log.Print(err)\n return\n }\n\nPackage userip¶\n\nThe userip package provides functions for extracting a user IP address from a request and associating it with a Context. A Context provides a key-value mapping, where the keys and values are both of type interface{}. Key types must support equality, and values must be safe for simultaneous use by multiple goroutines. Packages like userip hide the details of this mapping and provide strongly-typed access to a specific Context value.\n\nTo avoid key collisions, userip defines an unexported type key and uses a value of this type as the context key:\n\n// The key type is unexported to prevent collisions with context keys defined in\n// other packages.\ntype key int\n\n// userIPkey is the context key for the user IP address. Its value of zero is\n// arbitrary. If this package defined other context keys, they would have\n// different integer values.\nconst userIPKey key = 0\n\n\nFromRequest extracts a userIP value from an http.Request:\n\nfunc FromRequest(req *http.Request) (net.IP, error) {\n ip, _, err := net.SplitHostPort(req.RemoteAddr)\n if err != nil {\n return nil, fmt.Errorf(\"userip: %q is not IP:port\", req.RemoteAddr)\n }\n\n\nNewContext returns a new Context that carries a provided userIP value:\n\nfunc NewContext(ctx context.Context, userIP net.IP) context.Context {\n return context.WithValue(ctx, userIPKey, userIP)\n}\n\n\nFromContext extracts a userIP from a Context:\n\nfunc FromContext(ctx context.Context) (net.IP, bool) {\n // ctx.Value returns nil if ctx has no value for the key;\n // the net.IP type assertion returns ok=false for nil.\n userIP, ok := ctx.Value(userIPKey).(net.IP)\n return userIP, ok\n}\n\nPackage google¶\n\nThe google.Search function makes an HTTP request to the Google Web Search API and parses the JSON-encoded result. It accepts a Context parameter ctx and returns immediately if ctx.Done is closed while the request is in flight.\n\nThe Google Web Search API request includes the search query and the user IP as query parameters:\n\nfunc Search(ctx context.Context, query string) (Results, error) {\n // Prepare the Google Search API request.\n req, err := http.NewRequest(\"GET\", \"https://ajax.googleapis.com/ajax/services/search/web?v=1.0\", nil)\n if err != nil {\n return nil, err\n }\n q := req.URL.Query()\n q.Set(\"q\", query)\n\n // If ctx is carrying the user IP address, forward it to the server.\n // Google APIs use the user IP to distinguish server-initiated requests\n // from end-user requests.\n if userIP, ok := userip.FromContext(ctx); ok {\n q.Set(\"userip\", userIP.String())\n }\n req.URL.RawQuery = q.Encode()\n\n\nSearch uses a helper function, httpDo, to issue the HTTP request and cancel it if ctx.Done is closed while the request or response is being processed. Search passes a closure to httpDo handle the HTTP response:\n\n var results Results\n err = httpDo(ctx, req, func(resp *http.Response, err error) error {\n if err != nil {\n return err\n }\n defer resp.Body.Close()\n\n // Parse the JSON search result.\n // https://developers.google.com/web-search/docs/#fonje\n var data struct {\n ResponseData struct {\n Results []struct {\n TitleNoFormatting string\n URL string\n }\n }\n }\n if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {\n return err\n }\n for _, res := range data.ResponseData.Results {\n results = append(results, Result{Title: res.TitleNoFormatting, URL: res.URL})\n }\n return nil\n })\n // httpDo waits for the closure we provided to return, so it's safe to\n // read results here.\n return results, err\n\n\nThe httpDo function runs the HTTP request and processes its response in a new goroutine. It cancels the request if ctx.Done is closed before the goroutine exits:\n\nfunc httpDo(ctx context.Context, req *http.Request, f func(*http.Response, error) error) error {\n // Run the HTTP request in a goroutine and pass the response to f.\n c := make(chan error, 1)\n req = req.WithContext(ctx)\n go func() { c <- f(http.DefaultClient.Do(req)) }()\n select {\n case <-ctx.Done():\n <-c // Wait for f to return.\n return ctx.Err()\n case err := <-c:\n return err\n }\n}\n\nAdapting code for Contexts¶\n\nMany server frameworks provide packages and types for carrying request-scoped values. We can define new implementations of the Context interface to bridge between code using existing frameworks and code that expects a Context parameter.\n\nFor example, Gorilla’s github.com/gorilla/context package allows handlers to associate data with incoming requests by providing a mapping from HTTP requests to key-value pairs. In gorilla.go, we provide a Context implementation whose Value method returns the values associated with a specific HTTP request in the Gorilla package.\n\nOther packages have provided cancellation support similar to Context. For example, Tomb provides a Kill method that signals cancellation by closing a Dying channel. Tomb also provides methods to wait for those goroutines to exit, similar to sync.WaitGroup. In tomb.go, we provide a Context implementation that is canceled when either its parent Context is canceled or a provided Tomb is killed.\n\nConclusion¶\n\nAt Google, we require that Go programmers pass a Context parameter as the first argument to every function on the call path between incoming and outgoing requests. This allows Go code developed by many different teams to interoperate well. It provides simple control over timeouts and cancellation and ensures that critical values like security credentials transit Go programs properly.\n\nServer frameworks that want to build on Context should provide implementations of Context to bridge between their packages and those that expect a Context parameter. Their client libraries would then accept a Context from the calling code. By establishing a common interface for request-scoped data and cancellation, Context makes it easier for package developers to share code for creating scalable services.\n\nFurther reading¶\nGo Concurrency Patterns: Pipelines and cancellation (2014 blog post)\nContexts and structs (2021 blog post)", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "introduction in go servers each incoming request is handled in its own goroutine request handlers often start additional goroutines to access backends such as databases and rpc services the set of goroutines working on a request typically needs access to request specific values such as the identity of the end user authorization tokens and the request s deadline when a request is canceled or times out all the goroutines working on that request should exit quickly so the system can reclaim any resources they are using at google we developed a context package that makes it easy to pass request scoped values cancellation signals and deadlines across api boundaries to all the goroutines involved in handling a request the package is publicly available as context this article describes how to use the package and provides a complete working example", "source_text": "Introduction¶\n\nIn Go servers, each incoming request is handled in its own goroutine. Request handlers often start additional goroutines to access backends such as databases and RPC services. The set of goroutines working on a request typically needs access to request-specific values such as the identity of the end user, authorization tokens, and the request’s deadline. When a request is canceled or times out, all the goroutines working on that request should exit quickly so the system can reclaim any resources they are using.\n\nAt Google, we developed a context package that makes it easy to pass request-scoped values, cancellation signals, and deadlines across API boundaries to all the goroutines involved in handling a request. The package is publicly available as context. This article describes how to use the package and provides a complete working example.", "segmentation_method": "reviewed_source_semantics", "label": "Introduction ¶", "source_line_range": [ 1, 6 ] }, { "id": "body-region-2", "text": "context the core of the context package is the context type a context carries a deadline cancellation signal and request scoped values across api boundaries its methods are safe for simultaneous use by multiple goroutines type context interface done returns a channel that is closed when this context is canceled or times out done chan struct err indicates why this context was canceled after the done channel is closed err error deadline returns the time when this context will be canceled if any deadline deadline time time ok bool value returns the value associated with key or nil if none value key interface interface this description is condensed the godoc is authoritative the done method returns a channel that acts as a cancellation signal to functions running on behalf of the context when the channel is closed the functions should abandon their work and return the err method returns an error indicating why the context was canceled the pipelines and cancellation article discusses the done channel idiom in more detail a context does not have a cancel method for the same reason the done channel is receive only the function receiving a cancellation signal is usually not the one that sends the signal in particular when a parent operation starts goroutines for sub operations those sub operations should not be able to cancel the parent instead the withcancel function described below provides a way to cancel a new context value a context is safe for simultaneous use by multiple goroutines code can pass a single context to any number of goroutines and cancel that context to signal all of them the deadline method allows functions to determine whether they should start work at all if too little time is left it may not be worthwhile code may also use a deadline to set timeouts for i o operations value allows a context to carry request scoped data that data must be safe for simultaneous use by multiple goroutines derived contexts the context package provides functions to derive new context values from existing ones these values form a tree when a context is canceled all contexts derived from it are also canceled background is the root of any context tree it is never canceled background returns an empty context it is never canceled has no deadline and has no values background is typically used in main init and tests and as the top level context for incoming requests func background context withcancel and withtimeout return derived context values that can be canceled sooner than the parent context the context associated with an incoming request is typically canceled when the request handler returns withcancel is also useful for canceling redundant requests when using multiple replicas withtimeout is useful for setting a deadline on requests to backend servers withcancel returns a copy of parent whose done channel is closed as soon as parent done is closed or cancel is called func withcancel parent context ctx context cancel cancelfunc a cancelfunc cancels a context type cancelfunc func withtimeout returns a copy of parent whose done channel is closed as soon as parent done is closed cancel is called or timeout elapses the new context s deadline is the sooner of now timeout and the parent s deadline if any if the timer is still running the cancel function releases its resources func withtimeout parent context timeout time duration context cancelfunc withvalue provides a way to associate request scoped values with a context withvalue returns a copy of parent whose value method returns val for key func withvalue parent context key interface val interface context the best way to see how to use the context package is through a worked example", "source_text": "Context¶\n\nThe core of the context package is the Context type:\n\n// A Context carries a deadline, cancellation signal, and request-scoped values\n// across API boundaries. Its methods are safe for simultaneous use by multiple\n// goroutines.\ntype Context interface {\n // Done returns a channel that is closed when this Context is canceled\n // or times out.\n Done() <-chan struct{}\n\n // Err indicates why this context was canceled, after the Done channel\n // is closed.\n Err() error\n\n // Deadline returns the time when this Context will be canceled, if any.\n Deadline() (deadline time.Time, ok bool)\n\n // Value returns the value associated with key or nil if none.\n Value(key interface{}) interface{}\n}\n\n\n(This description is condensed; the godoc is authoritative.)\n\nThe Done method returns a channel that acts as a cancellation signal to functions running on behalf of the Context: when the channel is closed, the functions should abandon their work and return. The Err method returns an error indicating why the Context was canceled. The Pipelines and Cancellation article discusses the Done channel idiom in more detail.\n\nA Context does not have a Cancel method for the same reason the Done channel is receive-only: the function receiving a cancellation signal is usually not the one that sends the signal. In particular, when a parent operation starts goroutines for sub-operations, those sub-operations should not be able to cancel the parent. Instead, the WithCancel function (described below) provides a way to cancel a new Context value.\n\nA Context is safe for simultaneous use by multiple goroutines. Code can pass a single Context to any number of goroutines and cancel that Context to signal all of them.\n\nThe Deadline method allows functions to determine whether they should start work at all; if too little time is left, it may not be worthwhile. Code may also use a deadline to set timeouts for I/O operations.\n\nValue allows a Context to carry request-scoped data. That data must be safe for simultaneous use by multiple goroutines.\n\nDerived contexts¶\n\nThe context package provides functions to derive new Context values from existing ones. These values form a tree: when a Context is canceled, all Contexts derived from it are also canceled.\n\nBackground is the root of any Context tree; it is never canceled:\n\n// Background returns an empty Context. It is never canceled, has no deadline,\n// and has no values. Background is typically used in main, init, and tests,\n// and as the top-level Context for incoming requests.\nfunc Background() Context\n\n\nWithCancel and WithTimeout return derived Context values that can be canceled sooner than the parent Context. The Context associated with an incoming request is typically canceled when the request handler returns. WithCancel is also useful for canceling redundant requests when using multiple replicas. WithTimeout is useful for setting a deadline on requests to backend servers:\n\n// WithCancel returns a copy of parent whose Done channel is closed as soon as\n// parent.Done is closed or cancel is called.\nfunc WithCancel(parent Context) (ctx Context, cancel CancelFunc)\n\n// A CancelFunc cancels a Context.\ntype CancelFunc func()\n\n// WithTimeout returns a copy of parent whose Done channel is closed as soon as\n// parent.Done is closed, cancel is called, or timeout elapses. The new\n// Context's Deadline is the sooner of now+timeout and the parent's deadline, if\n// any. If the timer is still running, the cancel function releases its\n// resources.\nfunc WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc)\n\n\nWithValue provides a way to associate request-scoped values with a Context:\n\n// WithValue returns a copy of parent whose Value method returns val for key.\nfunc WithValue(parent Context, key interface{}, val interface{}) Context\n\n\nThe best way to see how to use the context package is through a worked example.", "segmentation_method": "reviewed_source_semantics", "label": "Context¶", "source_line_range": [ 7, 79 ] }, { "id": "body-region-3", "text": "example google web search our example is an http server that handles urls like search q golang timeout 1s by forwarding the query golang to the google web search api and rendering the results the timeout parameter tells the server to cancel the request after that duration elapses the code is split across three packages server provides the main function and the handler for search userip provides functions for extracting a user ip address from a request and associating it with a context google provides the search function for sending a query to google the server program the server program handles requests like search q golang by serving the first few google search results for golang it registers handlesearch to handle the search endpoint the handler creates an initial context called ctx and arranges for it to be canceled when the handler returns if the request includes the timeout url parameter the context is canceled automatically when the timeout elapses func handlesearch w http responsewriter req http request ctx is the context for this handler calling cancel closes the ctx done channel which is the cancellation signal for requests started by this handler var ctx context context cancel context cancelfunc timeout err time parseduration req formvalue timeout if err nil the request has a timeout so create a context that is canceled automatically when the timeout expires ctx cancel context withtimeout context background timeout else ctx cancel context withcancel context background defer cancel cancel ctx as soon as handlesearch returns the handler extracts the query from the request and extracts the client s ip address by calling on the userip package the client s ip address is needed for backend requests so handlesearch attaches it to ctx check the search query query req formvalue q if query http error w no query http statusbadrequest return store the user ip in ctx for use by code in other packages userip err userip fromrequest req if err nil http error w err error http statusbadrequest return ctx userip newcontext ctx userip the handler calls google search with ctx and the query run the google search and print the results start time now results err google search ctx query elapsed time since start if the search succeeds the handler renders the results if err resultstemplate execute w struct results google results timeout elapsed time duration results results timeout timeout elapsed elapsed err nil log print err return package userip the userip package provides functions for extracting a user ip address from a request and associating it with a context a context provides a key value mapping where the keys and values are both of type interface key types must support equality and values must be safe for simultaneous use by multiple goroutines packages like userip hide the details of this mapping and provide strongly typed access to a specific context value to avoid key collisions userip defines an unexported type key and uses a value of this type as the context key the key type is unexported to prevent collisions with context keys defined in other packages type key int useripkey is the context key for the user ip address its value of zero is arbitrary if this package defined other context keys they would have different integer values const useripkey key 0 fromrequest extracts a userip value from an http request func fromrequest req http request net ip error ip err net splithostport req remoteaddr if err nil return nil fmt errorf userip q is not ip port req remoteaddr newcontext returns a new context that carries a provided userip value func newcontext ctx context context userip net ip context context return context withvalue ctx useripkey userip fromcontext extracts a userip from a context func fromcontext ctx context context net ip bool ctx value returns nil if ctx has no value for the key the net ip type assertion returns ok false for nil userip ok ctx value useripkey net ip return userip ok package google the google search function makes an http request to the google web search api and parses the json encoded result it accepts a context parameter ctx and returns immediately if ctx done is closed while the request is in flight the google web search api request includes the search query and the user ip as query parameters func search ctx context context query string results error prepare the google search api request req err http newrequest get https ajax googleapis com ajax services search web v 1 0 nil if err nil return nil err q req url query q set q query if ctx is carrying the user ip address forward it to the server google apis use the user ip to distinguish server initiated requests from end user requests if userip ok userip fromcontext ctx ok q set userip userip string req url rawquery q encode search uses a helper function httpdo to issue the http request and cancel it if ctx done is closed while the request or response is being processed search passes a closure to httpdo handle the http response var results results err httpdo ctx req func resp http response err error error if err nil return err defer resp body close parse the json search result https developers google com web search docs fonje var data struct responsedata struct results struct titlenoformatting string url string if err json newdecoder resp body decode data err nil return err for res range data responsedata results results append results result title res titlenoformatting url res url return nil httpdo waits for the closure we provided to return so it s safe to read results here return results err the httpdo function runs the http request and processes its response in a new goroutine it cancels the request if ctx done is closed before the goroutine exits func httpdo ctx context context req http request f func http response error error error run the http request in a goroutine and pass the response to f c make chan error 1 req req withcontext ctx go func c f http defaultclient do req select case ctx done c wait for f to return return ctx err case err c return err", "source_text": "Example: Google Web Search¶\n\nOur example is an HTTP server that handles URLs like /search?q=golang&timeout=1s by forwarding the query “golang” to the Google Web Search API and rendering the results. The timeout parameter tells the server to cancel the request after that duration elapses.\n\nThe code is split across three packages:\n\nserver provides the main function and the handler for /search.\nuserip provides functions for extracting a user IP address from a request and associating it with a Context.\ngoogle provides the Search function for sending a query to Google.\nThe server program¶\n\nThe server program handles requests like /search?q=golang by serving the first few Google search results for golang. It registers handleSearch to handle the /search endpoint. The handler creates an initial Context called ctx and arranges for it to be canceled when the handler returns. If the request includes the timeout URL parameter, the Context is canceled automatically when the timeout elapses:\n\nfunc handleSearch(w http.ResponseWriter, req *http.Request) {\n // ctx is the Context for this handler. Calling cancel closes the\n // ctx.Done channel, which is the cancellation signal for requests\n // started by this handler.\n var (\n ctx context.Context\n cancel context.CancelFunc\n )\n timeout, err := time.ParseDuration(req.FormValue(\"timeout\"))\n if err == nil {\n // The request has a timeout, so create a context that is\n // canceled automatically when the timeout expires.\n ctx, cancel = context.WithTimeout(context.Background(), timeout)\n } else {\n ctx, cancel = context.WithCancel(context.Background())\n }\n defer cancel() // Cancel ctx as soon as handleSearch returns.\n\n\nThe handler extracts the query from the request and extracts the client’s IP address by calling on the userip package. The client’s IP address is needed for backend requests, so handleSearch attaches it to ctx:\n\n // Check the search query.\n query := req.FormValue(\"q\")\n if query == \"\" {\n http.Error(w, \"no query\", http.StatusBadRequest)\n return\n }\n\n // Store the user IP in ctx for use by code in other packages.\n userIP, err := userip.FromRequest(req)\n if err != nil {\n http.Error(w, err.Error(), http.StatusBadRequest)\n return\n }\n ctx = userip.NewContext(ctx, userIP)\n\n\nThe handler calls google.Search with ctx and the query:\n\n // Run the Google search and print the results.\n start := time.Now()\n results, err := google.Search(ctx, query)\n elapsed := time.Since(start)\n\n\nIf the search succeeds, the handler renders the results:\n\n if err := resultsTemplate.Execute(w, struct {\n Results google.Results\n Timeout, Elapsed time.Duration\n }{\n Results: results,\n Timeout: timeout,\n Elapsed: elapsed,\n }); err != nil {\n log.Print(err)\n return\n }\n\nPackage userip¶\n\nThe userip package provides functions for extracting a user IP address from a request and associating it with a Context. A Context provides a key-value mapping, where the keys and values are both of type interface{}. Key types must support equality, and values must be safe for simultaneous use by multiple goroutines. Packages like userip hide the details of this mapping and provide strongly-typed access to a specific Context value.\n\nTo avoid key collisions, userip defines an unexported type key and uses a value of this type as the context key:\n\n// The key type is unexported to prevent collisions with context keys defined in\n// other packages.\ntype key int\n\n// userIPkey is the context key for the user IP address. Its value of zero is\n// arbitrary. If this package defined other context keys, they would have\n// different integer values.\nconst userIPKey key = 0\n\n\nFromRequest extracts a userIP value from an http.Request:\n\nfunc FromRequest(req *http.Request) (net.IP, error) {\n ip, _, err := net.SplitHostPort(req.RemoteAddr)\n if err != nil {\n return nil, fmt.Errorf(\"userip: %q is not IP:port\", req.RemoteAddr)\n }\n\n\nNewContext returns a new Context that carries a provided userIP value:\n\nfunc NewContext(ctx context.Context, userIP net.IP) context.Context {\n return context.WithValue(ctx, userIPKey, userIP)\n}\n\n\nFromContext extracts a userIP from a Context:\n\nfunc FromContext(ctx context.Context) (net.IP, bool) {\n // ctx.Value returns nil if ctx has no value for the key;\n // the net.IP type assertion returns ok=false for nil.\n userIP, ok := ctx.Value(userIPKey).(net.IP)\n return userIP, ok\n}\n\nPackage google¶\n\nThe google.Search function makes an HTTP request to the Google Web Search API and parses the JSON-encoded result. It accepts a Context parameter ctx and returns immediately if ctx.Done is closed while the request is in flight.\n\nThe Google Web Search API request includes the search query and the user IP as query parameters:\n\nfunc Search(ctx context.Context, query string) (Results, error) {\n // Prepare the Google Search API request.\n req, err := http.NewRequest(\"GET\", \"https://ajax.googleapis.com/ajax/services/search/web?v=1.0\", nil)\n if err != nil {\n return nil, err\n }\n q := req.URL.Query()\n q.Set(\"q\", query)\n\n // If ctx is carrying the user IP address, forward it to the server.\n // Google APIs use the user IP to distinguish server-initiated requests\n // from end-user requests.\n if userIP, ok := userip.FromContext(ctx); ok {\n q.Set(\"userip\", userIP.String())\n }\n req.URL.RawQuery = q.Encode()\n\n\nSearch uses a helper function, httpDo, to issue the HTTP request and cancel it if ctx.Done is closed while the request or response is being processed. Search passes a closure to httpDo handle the HTTP response:\n\n var results Results\n err = httpDo(ctx, req, func(resp *http.Response, err error) error {\n if err != nil {\n return err\n }\n defer resp.Body.Close()\n\n // Parse the JSON search result.\n // https://developers.google.com/web-search/docs/#fonje\n var data struct {\n ResponseData struct {\n Results []struct {\n TitleNoFormatting string\n URL string\n }\n }\n }\n if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {\n return err\n }\n for _, res := range data.ResponseData.Results {\n results = append(results, Result{Title: res.TitleNoFormatting, URL: res.URL})\n }\n return nil\n })\n // httpDo waits for the closure we provided to return, so it's safe to\n // read results here.\n return results, err\n\n\nThe httpDo function runs the HTTP request and processes its response in a new goroutine. It cancels the request if ctx.Done is closed before the goroutine exits:\n\nfunc httpDo(ctx context.Context, req *http.Request, f func(*http.Response, error) error) error {\n // Run the HTTP request in a goroutine and pass the response to f.\n c := make(chan error, 1)\n req = req.WithContext(ctx)\n go func() { c <- f(http.DefaultClient.Do(req)) }()\n select {\n case <-ctx.Done():\n <-c // Wait for f to return.\n return ctx.Err()\n case err := <-c:\n return err\n }\n}", "segmentation_method": "reviewed_source_semantics", "label": "Example: Google Web Search ¶", "source_line_range": [ 80, 264 ] }, { "id": "body-region-4", "text": "adapting code for contexts many server frameworks provide packages and types for carrying request scoped values we can define new implementations of the context interface to bridge between code using existing frameworks and code that expects a context parameter for example gorilla s github com gorilla context package allows handlers to associate data with incoming requests by providing a mapping from http requests to key value pairs in gorilla go we provide a context implementation whose value method returns the values associated with a specific http request in the gorilla package other packages have provided cancellation support similar to context for example tomb provides a kill method that signals cancellation by closing a dying channel tomb also provides methods to wait for those goroutines to exit similar to sync waitgroup in tomb go we provide a context implementation that is canceled when either its parent context is canceled or a provided tomb is killed", "source_text": "Adapting code for Contexts¶\n\nMany server frameworks provide packages and types for carrying request-scoped values. We can define new implementations of the Context interface to bridge between code using existing frameworks and code that expects a Context parameter.\n\nFor example, Gorilla’s github.com/gorilla/context package allows handlers to associate data with incoming requests by providing a mapping from HTTP requests to key-value pairs. In gorilla.go, we provide a Context implementation whose Value method returns the values associated with a specific HTTP request in the Gorilla package.\n\nOther packages have provided cancellation support similar to Context. For example, Tomb provides a Kill method that signals cancellation by closing a Dying channel. Tomb also provides methods to wait for those goroutines to exit, similar to sync.WaitGroup. In tomb.go, we provide a Context implementation that is canceled when either its parent Context is canceled or a provided Tomb is killed.", "segmentation_method": "reviewed_source_semantics", "label": "Adapting code for Contexts ¶", "source_line_range": [ 265, 272 ] }, { "id": "body-region-5", "text": "conclusion at google we require that go programmers pass a context parameter as the first argument to every function on the call path between incoming and outgoing requests this allows go code developed by many different teams to interoperate well it provides simple control over timeouts and cancellation and ensures that critical values like security credentials transit go programs properly server frameworks that want to build on context should provide implementations of context to bridge between their packages and those that expect a context parameter their client libraries would then accept a context from the calling code by establishing a common interface for request scoped data and cancellation context makes it easier for package developers to share code for creating scalable services further reading go concurrency patterns pipelines and cancellation 2014 blog post contexts and structs 2021 blog post", "source_text": "Conclusion¶\n\nAt Google, we require that Go programmers pass a Context parameter as the first argument to every function on the call path between incoming and outgoing requests. This allows Go code developed by many different teams to interoperate well. It provides simple control over timeouts and cancellation and ensures that critical values like security credentials transit Go programs properly.\n\nServer frameworks that want to build on Context should provide implementations of Context to bridge between their packages and those that expect a Context parameter. Their client libraries would then accept a Context from the calling code. By establishing a common interface for request-scoped data and cancellation, Context makes it easier for package developers to share code for creating scalable services.\n\nFurther reading¶\nGo Concurrency Patterns: Pipelines and cancellation (2014 blog post)\nContexts and structs (2021 blog post)", "segmentation_method": "reviewed_source_semantics", "label": "Conclusion ¶ — Further reading ¶", "source_line_range": [ 273, 281 ] } ], "ending": { "text": "currency Patterns: Pipelines and cancellation (2014 blog post)\nContexts and structs (2021 blog post)" } } }, { "id": "article-088", "name": "Attention and Augmented Recurrent Neural Networks", "url": "https://distill.pub/2016/augmented-rnns/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Attention\\ and\\ Augmented\\ Recurrent\\ Neural\\ Networks" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "CHRIS OLAH" ] }, { "id": "stable-3", "alternatives": [ "SHAN CARTER" ] }, { "id": "stable-4", "alternatives": [ "Google Brain" ] }, { "id": "stable-5", "alternatives": [ "Sept. 8" ] }, { "id": "stable-6", "alternatives": [ "2016" ] }, { "id": "stable-7", "alternatives": [ "Citation:" ] }, { "id": "stable-8", "alternatives": [ "Olah & Carter, 2016" ] }, { "id": "stable-9", "alternatives": [ "Distill" ] }, { "id": "stable-10", "alternatives": [ "ABOUT" ] }, { "id": "stable-11", "alternatives": [ "PRIZE" ] }, { "id": "stable-12", "alternatives": [ "SUBMIT" ] }, { "id": "stable-13", "alternatives": [ "Distill is dedicated to clear explanations of machine learning" ] }, { "id": "stable-14", "alternatives": [ "Archive" ] }, { "id": "stable-15", "alternatives": [ "RSS" ] }, { "id": "stable-16", "alternatives": [ "GitHub" ] }, { "id": "stable-17", "alternatives": [ "Twitter" ] }, { "id": "stable-18", "alternatives": [ "ISSN 2476-0757" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete ordinary article and appendix independently verified against uncapped fresh initial DOM, CSS scope map, full rendered page text, AX image ownership and original fullpage screenshot. All four augmented-RNN directions, inline mathematical prose,8ordinary captions,21references, acknowledgments, correction/license text and complete BibTeX retained. No interaction or hidden-state expansion. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Attention and Augmented Recurrent Neural Networks" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-088/comment-qualification-reference-r5.json", "sha256": "3dbc4ac998b0de85cb6196be6a49e056f60272f9d057299ef44fc9b2cd003163", "chars": 770, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Recurrent neural networks are one of the staples of deep learning, allowing neural networks to work with sequences of data like text, audio and video. They can be used to boil a sequence down into a high-level understanding, to annotate sequences, and even to generate new sequences from scratch!\n\nThe basic RNN design struggles with longer sequences, but a special variant—“long short-term memory” networks [1]—can even work with these. Such models have been found to be very powerful, achieving remarkable results in many tasks including translation, voice recognition, and image captioning. As a result, recurrent neural networks have become very widespread in the last few years.\n\nAs this has happened, we’ve seen a growing number of attempts to augment RNNs with new properties. Four directions stand out as particularly exciting:\n\nNeural Turing\nMachines\nhave external memory that they can read and write to.\nAttentional\nInterfaces\nallow RNNs to focus on parts of their input.\nAdaptive\nComputation Time\nallows for varying amounts of computation per step.\nNeural\nProgrammers\ncan call functions, building programs as they run.\n\nIndividually, these techniques are all potent extensions of RNNs, but the really striking thing is that they can be combined, and seem to just be points in a broader space. Further, they all rely on the same underlying trick—something called attention—to work.\n\nOur guess is that these “augmented RNNs” will have an important role to play in extending deep learning’s capabilities over the coming years.\n\nNeural Turing Machines\n\nNeural Turing Machines [2] combine a RNN with an external memory bank. Since vectors are the natural language of neural networks, the memory is an array of vectors:\n\nBut how does reading and writing work? The challenge is that we want to make them differentiable. In particular, we want to make them differentiable with respect to the location we read from or write to, so that we can learn where to read and write. This is tricky because memory addresses seem to be fundamentally discrete. NTMs take a very clever solution to this: every step, they read and write everywhere, just to different extents.\n\nAs an example, let’s focus on reading. Instead of specifying a single location, the RNN outputs an “attention distribution” that describes how we spread out the amount we care about different memory positions. As such, the result of the read operation is a weighted sum.\n\nSimilarly, we write everywhere at once to different extents. Again, an attention distribution describes how much we write at every location. We do this by having the new value of a position in memory be a convex combination of the old memory content and the write value, with the position between the two decided by the attention weight.\n\nBut how do NTMs decide which positions in memory to focus their attention on? They actually use a combination of two different methods: content-based attention and location-based attention. Content-based attention allows NTMs to search through their memory and focus on places that match what they’re looking for, while location-based attention allows relative movement in memory, enabling the NTM to loop.\n\nThis capability to read and write allows NTMs to perform many simple algorithms, previously beyond neural networks. For example, they can learn to store a long sequence in memory, and then loop over it, repeating it back repeatedly. As they do this, we can watch where they read and write, to better understand what they’re doing:\n\nSee more experiments in [3]. This figure is based on the Repeat Copy experiment.\n\nThey can also learn to mimic a lookup table, or even learn to sort numbers (although they kind of cheat)! On the other hand, they still can’t do many basic things, like add or multiply numbers.\n\nSince the original NTM paper, there have been a number of exciting papers exploring similar directions. The Neural GPU [4] overcomes the NTM’s inability to add and multiply numbers. Zaremba & Sutskever [5] train NTMs using reinforcement learning instead of the differentiable read/writes used by the original. Neural Random Access Machines [6] work based on pointers. Some papers have explored differentiable data structures, like stacks and queues [7, 8]. And memory networks [9, 10] are another approach to attacking similar problems.\n\nIn some objective sense, many of the tasks these models can perform—such as learning how to add numbers—aren’t that objectively hard. The traditional program synthesis community would eat them for lunch. But neural networks are capable of many other things, and models like the Neural Turing Machine seem to have knocked away a very profound limit on their abilities.\n\nCode\n\nThere are a number of open source implementations of these models. Open source implementations of the Neural Turing Machine include Taehoon Kim’s (TensorFlow), Shawn Tan’s (Theano), Fumin’s (Go), Kai Sheng Tai’s (Torch), and Snip’s (Lasagne). Code for the Neural GPU publication was open sourced and put in the TensorFlow Models repository. Open source implementations of Memory Networks include Facebook’s (Torch/Matlab), YerevaNN’s (Theano), and Taehoon Kim’s (TensorFlow).\n\nAttentional Interfaces\n\nWhen I’m translating a sentence, I pay special attention to the word I’m presently translating. When I’m transcribing an audio recording, I listen carefully to the segment I’m actively writing down. And if you ask me to describe the room I’m sitting in, I’ll glance around at the objects I’m describing as I do so.\n\nNeural networks can achieve this same behavior using attention, focusing on part of a subset of the information they’re given. For example, an RNN can attend over the output of another RNN. At every time step, it focuses on different positions in the other RNN.\n\nWe’d like attention to be differentiable, so that we can learn where to focus. To do this, we use the same trick Neural Turing Machines use: we focus everywhere, just to different extents.\n\nThe attention distribution is usually generated with content-based attention. The attending RNN generates a query describing what it wants to focus on. Each item is dot-producted with the query to produce a score, describing how well it matches the query. The scores are fed into a softmax to create the attention distribution.\n\nOne use of attention between RNNs is translation [11]. A traditional sequence-to-sequence model has to boil the entire input down into a single vector and then expands it back out. Attention avoids this by allowing the RNN processing the input to pass along information about each word it sees, and then for the RNN generating the output to focus on words as they become relevant.\n\nDiagram derived from Fig. 3 of Bahdanau, et al. 2014\n\nThis kind of attention between RNNs has a number of other applications. It can be used in voice recognition [12], allowing one RNN to process the audio and then have another RNN skim over it, focusing on relevant parts as it generates a transcript.\n\nFigure derived from Chan, et al. 2015\n\nOther uses of this kind of attention include parsing text [13], where it allows the model to glance at words as it generates the parse tree, and for conversational modeling [14], where it lets the model focus on previous parts of the conversation as it generates its response.\n\nAttention can also be used on the interface between a convolutional neural network and an RNN. This allows the RNN to look at different position of an image every step. One popular use of this kind of attention is for image captioning. First, a conv net processes the image, extracting high-level features. Then an RNN runs, generating a description of the image. As it generates each word in the description, the RNN focuses on the conv net’s interpretation of the relevant parts of the image. We can explicitly visualize this:\n\nFigure from [3]\n\nMore broadly, attentional interfaces can be used whenever one wants to interface with a neural network that has a repeating structure in its output.\n\nAttentional interfaces have been found to be an extremely general and powerful technique, and are becoming increasingly widespread.\n\nAdaptive Computation Time\n\nStandard RNNs do the same amount of computation for each time step. This seems unintuitive. Surely, one should think more when things are hard? It also limits RNNs to doing O(n) operations for a list of length n.\n\nAdaptive Computation Time [15] is a way for RNNs to do different amounts of computation each step. The big picture idea is simple: allow the RNN to do multiple steps of computation for each time step.\n\nIn order for the network to learn how many steps to do, we want the number of steps to be differentiable. We achieve this with the same trick we used before: instead of deciding to run for a discrete number of steps, we have an attention distribution over the number of steps to run. The output is a weighted combination of the outputs of each step.\n\nThere are a few more details, which were left out in the previous diagram. Here’s a complete diagram of a time step with three computation steps.\n\nThat’s a bit complicated, so let’s work through it step by step. At a high-level, we’re still running the RNN and outputting a weighted combination of the states:\n\nThe weight for each step is determined by a “halting neuron.” It’s a sigmoid neuron that looks at the RNN state and gives a halting weight, which we can think of as the probability that we should stop at that step.\n\nWe have a total budget for the halting weights of 1, so we track that budget along the top. When it gets to less than epsilon, we stop.\n\nWhen we stop, might have some left over halting budget because we stop when it gets to less than epsilon. What should we do with it? Technically, it’s being given to future steps but we don’t want to compute those, so we attribute it to the last step.\n\nWhen training Adaptive Computation Time models, one adds a “ponder cost” term to the cost function. This penalizes the model for the amount of computation it uses. The bigger you make this term, the more it will trade-off performance for lowering compute time.\n\nAdaptive Computation Time is a very new idea, but we believe that it, along with similar ideas, will be very important.\n\nCode\n\nThe only open source implementation of Adaptive Computation Time at the moment seems to be Mark Neumann’s (TensorFlow).\n\nNeural Programmer\n\nNeural nets are excellent at many tasks, but they also struggle to do some basic things like arithmetic, which are trivial in normal approaches to computing. It would be really nice to have a way to fuse neural nets with normal programming, and get the best of both worlds.\n\nThe neural programmer [16] is one approach to this. It learns to create programs in order to solve a task. In fact, it learns to generate such programs without needing examples of correct programs. It discovers how to produce programs as a means to the end of accomplishing some task.\n\nThe actual model in the paper answers questions about tables by generating SQL-like programs to query the table. However, there are a number of details here that make it a bit complicated, so let’s start by imagining a slightly simpler model, which is given an arithmetic expression and generates a program to evaluate it.\n\nThe generated program is a sequence of operations. Each operation is defined to operate on the output of past operations. So an operation might be something like “add the output of the operation 2 steps ago and the output of the operation 1 step ago.” It’s more like a Unix pipe than a program with variables being assigned to and read from.\n\nThe program is generated one operation at a time by a controller RNN. At each step, the controller RNN outputs a probability distribution for what the next operation should be. For example, we might be pretty sure we want to perform addition at the first time step, then have a hard time deciding whether we should multiply or divide at the second step, and so on...\n\nThe resulting distribution over operations can now be evaluated. Instead of running a single operation at each step, we do the usual attention trick of running all of them and then average the outputs together, weighted by the probability we ran that operation.\n\nAs long as we can define derivatives through the operations, the program’s output is differentiable with respect to the probabilities. We can then define a loss, and train the neural net to produce programs that give the correct answer. In this way, the Neural Programmer learns to produce programs without examples of good programs. The only supervision is the answer the program should produce.\n\nThat’s the core idea of Neural Programmer, but the version in the paper answers questions about tables, rather than arithmetic expressions. There are a few additional neat tricks:\n\nMultiple Types: Many of the operations in the Neural Programmer deal with types other than scalar numbers. Some operations output selections of table columns or selections of cells. Only outputs of the same type get merged together.\n\nReferencing Inputs: The neural programmer needs to answer questions like “How many cities have a population greater than 1,000,000?” given a table of cities with a population column. To facilitate this, some operations allow the network to reference constants in the question they’re answering, or the names of columns. This referencing happens by attention, in the style of pointer networks [17].\n\nThe Neural Programmer isn’t the only approach to having neural networks generate programs. Another lovely approach is the Neural Programmer-Interpreter [18] which can accomplish a number of very interesting tasks, but requires supervision in the form of correct programs.\n\nWe think that this general space, of bridging the gap between more traditional programming and neural networks is extremely important. While the Neural Programmer is clearly not the final solution, we think there are a lot of important lessons to be learned from it.\n\nCode\n\nThe more recent version of Neural Programmer for question answering has been open sourced by its authors and is available as a TensorFlow Model. There is also an implementation of the Neural Programmer-Interpreter by Ken Morishita (Keras).\n\nThe Big Picture\n\nA human with a piece of paper is, in some sense, much smarter than a human without. A human with mathematical notation can solve problems they otherwise couldn’t. Access to computers makes us capable of incredible feats that would otherwise be far beyond us.\n\nIn general, it seems like a lot of interesting forms of intelligence are an interaction between the creative heuristic intuition of humans and some more crisp and careful media, like language or equations. Sometimes, the medium is something that physically exists, and stores information for us, prevents us from making mistakes, or does computational heavy lifting. In other cases, the medium is a model in our head that we manipulate. Either way, it seems deeply fundamental to intelligence.\n\nRecent results in machine learning have started to have this flavor, combining the intuition of neural networks with something else. One approach is what one might call “heuristic search.” For example, AlphaGo [19] has a model of how Go works and explores how the game could play out guided by neural network intuition. Similarly, DeepMath [20] uses neural networks as intuition for manipulating mathematical expressions. The “augmented RNNs” we’ve talked about in this article are another approach, where we connect RNNs to engineered media, in order to extend their general capabilities.\n\nInteracting with media naturally involves making a sequence of taking an action, observing, and taking more actions. This creates a major challenge: how do we learn which actions to take? That sounds like a reinforcement learning problem and we could certainly take that approach. But the reinforcement learning literature is really attacking the hardest version of this problem, and its solutions are hard to use. The wonderful thing about attention is that it gives us an easier way out of this problem by partially taking all actions to varying extents. This works because we can design media—like the NTM memory—to allow fractional actions and to be differentiable. Reinforcement learning has us take a single path, and try to learn from that. Attention takes every direction at a fork, and then merges the paths back together.\n\nA major weaknesses of attention is that we have to take every “action” every step. This causes the computational cost to grow linearly as you do things like increase the amount of memory in a Neural Turing Machine. One thing you could imagine doing is having your attention be sparse, so that you only have to touch some memories. However, it’s still challenging because you may want to do things like have your attention depend on the content of the memory, and doing that naively forces you to look at each memory. We’ve seen some initial attempts to attack this problem, such as [21], but it seems like there’s a lot more to be done. If we could really make such sub-linear time attention work, that would be very powerful!\n\nAugmented recurrent neural networks, and the underlying technique of attention, are incredibly exciting. We look forward to seeing what happens next!\n\nAcknowledgments\n\nThank you to Maithra Raghu, Dario Amodei, Cassandra Xia, Luke Vilnis, Anna Goldie, Jesse Engel, Dan Mané, Natasha Jaques, Emma Pierson and Ian Goodfellow for their feedback and encouragement. We’re also very grateful to our team, Google Brain, for being extremely supportive of our project.\n\nReferences\nUnderstanding LSTM Networks  [link]\nOlah, C., 2015.\nNeural Turing Machines  [PDF]\nGraves, A., Wayne, G. and Danihelka, I., 2014. CoRR, Vol abs/1410.5401.\nShow, attend and tell: Neural image caption generation with visual attention\nXu, K., Ba, J., Kiros, R., Cho, K., Courville, A., Salakhutdinov, R., Zemel, R.S. and Bengio, Y., 2015. arXiv preprint arXiv:1502.03044, Vol 2(3), pp. 5. CoRR.\nNeural GPUs Learn Algorithms  [PDF]\nKaiser, L. and Sutskever, I., 2015. CoRR, Vol abs/1511.08228.\nReinforcement Learning Neural Turing Machines  [PDF]\nZaremba, W. and Sutskever, I., 2015. CoRR, Vol abs/1505.00521.\nNeural Random-Access Machines  [PDF]\nKurach, K., Andrychowicz, M. and Sutskever, I., 2015. CoRR, Vol abs/1511.06392.\nLearning to Transduce with Unbounded Memory  [PDF]\nGrefenstette, E., Hermann, K.M., Suleyman, M. and Blunsom, P., 2015. Advances in Neural Information Processing Systems 28, pp. 1828—1836. Curran Associates, Inc.\nInferring Algorithmic Patterns with Stack-Augmented Recurrent Nets  [PDF]\nJoulin, A. and Mikolov, T., 2015. Advances in Neural Information Processing Systems 28, pp. 190—198. Curran Associates, Inc.\nMemory Networks  [PDF]\nWeston, J., Chopra, S. and Bordes, A., 2014. CoRR, Vol abs/1410.3916.\nAsk Me Anything: Dynamic Memory Networks for Natural Language Processing  [PDF]\nKumar, A., Irsoy, O., Su, J., Bradbury, J., English, R., Pierce, B., Ondruska, P., Gulrajani, I. and Socher, R., 2015. CoRR, Vol abs/1506.07285.\nNeural machine translation by jointly learning to align and translate\nBahdanau, D., Cho, K. and Bengio, Y., 2014. arXiv preprint arXiv:1409.0473.\nListen, Attend and Spell  [PDF]\nChan, W., Jaitly, N., Le, Q.V. and Vinyals, O., 2015. CoRR, Vol abs/1508.01211.\nGrammar as a foreign language\nVinyals, O., Kaiser, L., Koo, T., Petrov, S., Sutskever, I. and Hinton, G., 2015. Advances in Neural Information Processing Systems, pp. 2773—2781.\nA Neural Conversational Model  [PDF]\nVinyals, O. and Le, Q.V., 2015. CoRR, Vol abs/1506.05869.\nAdaptive Computation Time for Recurrent Neural Networks  [PDF]\nGraves, A., 2016. CoRR, Vol abs/1603.08983.\nNeural Programmer: Inducing Latent Programs with Gradient Descent  [PDF]\nNeelakantan, A., Le, Q.V. and Sutskever, I., 2015. CoRR, Vol abs/1511.04834.\nPointer networks\nVinyals, O., Fortunato, M. and Jaitly, N., 2015. Advances in Neural Information Processing Systems, pp. 2692—2700.\nNeural Programmer-Interpreters  [PDF]\nReed, S.E. and Freitas, N.d., 2015. CoRR, Vol abs/1511.06279.\nMastering the game of Go with deep neural networks and tree search  [link]\nSilver, D., Huang, A., Maddison, C.J., Guez, A., Sifre, L., Driessche, G.v.d., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., Dieleman, S., Grewe, D., Nham, J., Kalchbrenner, N., Sutskever, I., Lillicrap, T., Leach, M., Kavukcuoglu, K., Graepel, T. and Hassabis, D., 2016. Nature, Vol 529(7587), pp. 484—489. Nature Publishing Group. DOI: 10.1038/nature16961\nDeepMath - Deep Sequence Models for Premise Selection  [PDF]\nAlemi, A.A., Chollet, F., Irving, G., Szegedy, C. and Urban, J., 2016. CoRR, Vol abs/1606.04442.\nLearning Efficient Algorithms with Hierarchical Attentive Memory  [PDF]\nAndrychowicz, M. and Kurach, K., 2016. CoRR, Vol abs/1602.03218.\nUpdates and Corrections\n\nView all changes to this article since it was first published. If you see a mistake or want to suggest a change, please create an issue on GitHub.\n\nCitations and Reuse\n\nDiagrams and text are licensed under Creative Commons Attribution CC-BY 2.0, unless noted otherwise, with the source available on GitHub. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: “Figure from …”.\n\nFor attribution in academic contexts, please cite this work as\n\nOlah & Carter, \"Attention and Augmented Recurrent Neural Networks\", Distill, 2016. http://doi.org/10.23915/distill.00001\n\nBibTeX citation\n\n@article{olah2016attention,\n author = {Olah, Chris and Carter, Shan},\n title = {Attention and Augmented Recurrent Neural Networks},\n journal = {Distill},\n year = {2016},\n url = {http://distill.pub/2016/augmented-rnns},\n doi = {10.23915/distill.00001}\n}", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "recurrent neural networks are one of the staples of deep learning allowing neural networks to work with sequences of data like text audio and video they can be used to boil a sequence down into a high level understanding to annotate sequences and even to generate new sequences from scratch the basic rnn design struggles with longer sequences but a special variant long short term memory networks 1 can even work with these such models have been found to be very powerful achieving remarkable results in many tasks including translation voice recognition and image captioning as a result recurrent neural networks have become very widespread in the last few years as this has happened we ve seen a growing number of attempts to augment rnns with new properties four directions stand out as particularly exciting neural turing machines have external memory that they can read and write to attentional interfaces allow rnns to focus on parts of their input adaptive computation time allows for varying amounts of computation per step neural programmers can call functions building programs as they run individually these techniques are all potent extensions of rnns but the really striking thing is that they can be combined and seem to just be points in a broader space further they all rely on the same underlying trick something called attention to work our guess is that these augmented rnns will have an important role to play in extending deep learning s capabilities over the coming years neural turing machines neural turing machines 2 combine a rnn with an external memory bank since vectors are the natural language of neural networks the memory is an array of vectors but how does reading and writing work the challenge is that we want to make them differentiable in particular we want to make them differentiable with respect to the location we read from or write to so that we can learn where to read and write this is tricky because memory addresses seem to be fundamentally discrete ntms take a very clever solution to this every step they read and write everywhere just to different extents as an example let s focus on reading instead of specifying a single location the rnn outputs an attention distribution that describes how we spread out the amount we care about different memory positions as such the result of the read operation is a weighted sum similarly we write everywhere at once to different extents again an attention distribution describes how much we write at every location we do this by having the new value of a position in memory be a convex combination of the old memory content and the write value with the position between the two decided by the attention weight but how do ntms decide which positions in memory to focus their attention on they actually use a combination of two different methods content based attention and location based attention content based attention allows ntms to search through their memory and focus on places that match what they re looking for while location based attention allows relative movement in memory enabling the ntm to loop this capability to read and write allows ntms to perform many simple algorithms previously beyond neural networks for example they can learn to store a long sequence in memory and then loop over it repeating it back repeatedly as they do this we can watch where they read and write to better understand what they re doing see more experiments in 3 this figure is based on the repeat copy experiment they can also learn to mimic a lookup table or even learn to sort numbers although they kind of cheat on the other hand they still can t do many basic things like add or multiply numbers since the original ntm paper there have been a number of exciting papers exploring similar directions the neural gpu 4 overcomes the ntm s inability to add and multiply numbers zaremba sutskever 5 train ntms using reinforcement learning instead of the differentiable read writes used by the original neural random access machines 6 work based on pointers some papers have explored differentiable data structures like stacks and queues 7 8 and memory networks 9 10 are another approach to attacking similar problems in some objective sense many of the tasks these models can perform such as learning how to add numbers aren t that objectively hard the traditional program synthesis community would eat them for lunch but neural networks are capable of many other things and models like the neural turing machine seem to have knocked away a very profound limit on their abilities code there are a number of open source implementations of these models open source implementations of the neural turing machine include taehoon kim s tensorflow shawn tan s theano fumin s go kai sheng tai s torch and snip s lasagne code for the neural gpu publication was open sourced and put in the tensorflow models repository open source implementations of memory networks include facebook s torch matlab yerevann s theano and taehoon kim s tensorflow", "source_text": "Recurrent neural networks are one of the staples of deep learning, allowing neural networks to work with sequences of data like text, audio and video. They can be used to boil a sequence down into a high-level understanding, to annotate sequences, and even to generate new sequences from scratch!\n\nThe basic RNN design struggles with longer sequences, but a special variant—“long short-term memory” networks [1]—can even work with these. Such models have been found to be very powerful, achieving remarkable results in many tasks including translation, voice recognition, and image captioning. As a result, recurrent neural networks have become very widespread in the last few years.\n\nAs this has happened, we’ve seen a growing number of attempts to augment RNNs with new properties. Four directions stand out as particularly exciting:\n\nNeural Turing\nMachines\nhave external memory that they can read and write to.\nAttentional\nInterfaces\nallow RNNs to focus on parts of their input.\nAdaptive\nComputation Time\nallows for varying amounts of computation per step.\nNeural\nProgrammers\ncan call functions, building programs as they run.\n\nIndividually, these techniques are all potent extensions of RNNs, but the really striking thing is that they can be combined, and seem to just be points in a broader space. Further, they all rely on the same underlying trick—something called attention—to work.\n\nOur guess is that these “augmented RNNs” will have an important role to play in extending deep learning’s capabilities over the coming years.\n\nNeural Turing Machines\n\nNeural Turing Machines [2] combine a RNN with an external memory bank. Since vectors are the natural language of neural networks, the memory is an array of vectors:\n\nBut how does reading and writing work? The challenge is that we want to make them differentiable. In particular, we want to make them differentiable with respect to the location we read from or write to, so that we can learn where to read and write. This is tricky because memory addresses seem to be fundamentally discrete. NTMs take a very clever solution to this: every step, they read and write everywhere, just to different extents.\n\nAs an example, let’s focus on reading. Instead of specifying a single location, the RNN outputs an “attention distribution” that describes how we spread out the amount we care about different memory positions. As such, the result of the read operation is a weighted sum.\n\nSimilarly, we write everywhere at once to different extents. Again, an attention distribution describes how much we write at every location. We do this by having the new value of a position in memory be a convex combination of the old memory content and the write value, with the position between the two decided by the attention weight.\n\nBut how do NTMs decide which positions in memory to focus their attention on? They actually use a combination of two different methods: content-based attention and location-based attention. Content-based attention allows NTMs to search through their memory and focus on places that match what they’re looking for, while location-based attention allows relative movement in memory, enabling the NTM to loop.\n\nThis capability to read and write allows NTMs to perform many simple algorithms, previously beyond neural networks. For example, they can learn to store a long sequence in memory, and then loop over it, repeating it back repeatedly. As they do this, we can watch where they read and write, to better understand what they’re doing:\n\nSee more experiments in [3]. This figure is based on the Repeat Copy experiment.\n\nThey can also learn to mimic a lookup table, or even learn to sort numbers (although they kind of cheat)! On the other hand, they still can’t do many basic things, like add or multiply numbers.\n\nSince the original NTM paper, there have been a number of exciting papers exploring similar directions. The Neural GPU [4] overcomes the NTM’s inability to add and multiply numbers. Zaremba & Sutskever [5] train NTMs using reinforcement learning instead of the differentiable read/writes used by the original. Neural Random Access Machines [6] work based on pointers. Some papers have explored differentiable data structures, like stacks and queues [7, 8]. And memory networks [9, 10] are another approach to attacking similar problems.\n\nIn some objective sense, many of the tasks these models can perform—such as learning how to add numbers—aren’t that objectively hard. The traditional program synthesis community would eat them for lunch. But neural networks are capable of many other things, and models like the Neural Turing Machine seem to have knocked away a very profound limit on their abilities.\n\nCode\n\nThere are a number of open source implementations of these models. Open source implementations of the Neural Turing Machine include Taehoon Kim’s (TensorFlow), Shawn Tan’s (Theano), Fumin’s (Go), Kai Sheng Tai’s (Torch), and Snip’s (Lasagne). Code for the Neural GPU publication was open sourced and put in the TensorFlow Models repository. Open source implementations of Memory Networks include Facebook’s (Torch/Matlab), YerevaNN’s (Theano), and Taehoon Kim’s (TensorFlow).", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Recurrent neural networks are one of the staples of deep lea — Neural Turing Machines", "source_line_range": [ 1, 49 ] }, { "id": "body-region-2", "text": "attentional interfaces when i m translating a sentence i pay special attention to the word i m presently translating when i m transcribing an audio recording i listen carefully to the segment i m actively writing down and if you ask me to describe the room i m sitting in i ll glance around at the objects i m describing as i do so neural networks can achieve this same behavior using attention focusing on part of a subset of the information they re given for example an rnn can attend over the output of another rnn at every time step it focuses on different positions in the other rnn we d like attention to be differentiable so that we can learn where to focus to do this we use the same trick neural turing machines use we focus everywhere just to different extents the attention distribution is usually generated with content based attention the attending rnn generates a query describing what it wants to focus on each item is dot producted with the query to produce a score describing how well it matches the query the scores are fed into a softmax to create the attention distribution one use of attention between rnns is translation 11 a traditional sequence to sequence model has to boil the entire input down into a single vector and then expands it back out attention avoids this by allowing the rnn processing the input to pass along information about each word it sees and then for the rnn generating the output to focus on words as they become relevant diagram derived from fig 3 of bahdanau et al 2014 this kind of attention between rnns has a number of other applications it can be used in voice recognition 12 allowing one rnn to process the audio and then have another rnn skim over it focusing on relevant parts as it generates a transcript figure derived from chan et al 2015 other uses of this kind of attention include parsing text 13 where it allows the model to glance at words as it generates the parse tree and for conversational modeling 14 where it lets the model focus on previous parts of the conversation as it generates its response attention can also be used on the interface between a convolutional neural network and an rnn this allows the rnn to look at different position of an image every step one popular use of this kind of attention is for image captioning first a conv net processes the image extracting high level features then an rnn runs generating a description of the image as it generates each word in the description the rnn focuses on the conv net s interpretation of the relevant parts of the image we can explicitly visualize this figure from 3 more broadly attentional interfaces can be used whenever one wants to interface with a neural network that has a repeating structure in its output attentional interfaces have been found to be an extremely general and powerful technique and are becoming increasingly widespread", "source_text": "Attentional Interfaces\n\nWhen I’m translating a sentence, I pay special attention to the word I’m presently translating. When I’m transcribing an audio recording, I listen carefully to the segment I’m actively writing down. And if you ask me to describe the room I’m sitting in, I’ll glance around at the objects I’m describing as I do so.\n\nNeural networks can achieve this same behavior using attention, focusing on part of a subset of the information they’re given. For example, an RNN can attend over the output of another RNN. At every time step, it focuses on different positions in the other RNN.\n\nWe’d like attention to be differentiable, so that we can learn where to focus. To do this, we use the same trick Neural Turing Machines use: we focus everywhere, just to different extents.\n\nThe attention distribution is usually generated with content-based attention. The attending RNN generates a query describing what it wants to focus on. Each item is dot-producted with the query to produce a score, describing how well it matches the query. The scores are fed into a softmax to create the attention distribution.\n\nOne use of attention between RNNs is translation [11]. A traditional sequence-to-sequence model has to boil the entire input down into a single vector and then expands it back out. Attention avoids this by allowing the RNN processing the input to pass along information about each word it sees, and then for the RNN generating the output to focus on words as they become relevant.\n\nDiagram derived from Fig. 3 of Bahdanau, et al. 2014\n\nThis kind of attention between RNNs has a number of other applications. It can be used in voice recognition [12], allowing one RNN to process the audio and then have another RNN skim over it, focusing on relevant parts as it generates a transcript.\n\nFigure derived from Chan, et al. 2015\n\nOther uses of this kind of attention include parsing text [13], where it allows the model to glance at words as it generates the parse tree, and for conversational modeling [14], where it lets the model focus on previous parts of the conversation as it generates its response.\n\nAttention can also be used on the interface between a convolutional neural network and an RNN. This allows the RNN to look at different position of an image every step. One popular use of this kind of attention is for image captioning. First, a conv net processes the image, extracting high-level features. Then an RNN runs, generating a description of the image. As it generates each word in the description, the RNN focuses on the conv net’s interpretation of the relevant parts of the image. We can explicitly visualize this:\n\nFigure from [3]\n\nMore broadly, attentional interfaces can be used whenever one wants to interface with a neural network that has a repeating structure in its output.\n\nAttentional interfaces have been found to be an extremely general and powerful technique, and are becoming increasingly widespread.", "segmentation_method": "reviewed_source_semantics", "label": "Attentional Interfaces", "source_line_range": [ 50, 77 ] }, { "id": "body-region-3", "text": "adaptive computation time standard rnns do the same amount of computation for each time step this seems unintuitive surely one should think more when things are hard it also limits rnns to doing o n operations for a list of length n adaptive computation time 15 is a way for rnns to do different amounts of computation each step the big picture idea is simple allow the rnn to do multiple steps of computation for each time step in order for the network to learn how many steps to do we want the number of steps to be differentiable we achieve this with the same trick we used before instead of deciding to run for a discrete number of steps we have an attention distribution over the number of steps to run the output is a weighted combination of the outputs of each step there are a few more details which were left out in the previous diagram here s a complete diagram of a time step with three computation steps that s a bit complicated so let s work through it step by step at a high level we re still running the rnn and outputting a weighted combination of the states the weight for each step is determined by a halting neuron it s a sigmoid neuron that looks at the rnn state and gives a halting weight which we can think of as the probability that we should stop at that step we have a total budget for the halting weights of 1 so we track that budget along the top when it gets to less than epsilon we stop when we stop might have some left over halting budget because we stop when it gets to less than epsilon what should we do with it technically it s being given to future steps but we don t want to compute those so we attribute it to the last step when training adaptive computation time models one adds a ponder cost term to the cost function this penalizes the model for the amount of computation it uses the bigger you make this term the more it will trade off performance for lowering compute time adaptive computation time is a very new idea but we believe that it along with similar ideas will be very important code the only open source implementation of adaptive computation time at the moment seems to be mark neumann s tensorflow", "source_text": "Adaptive Computation Time\n\nStandard RNNs do the same amount of computation for each time step. This seems unintuitive. Surely, one should think more when things are hard? It also limits RNNs to doing O(n) operations for a list of length n.\n\nAdaptive Computation Time [15] is a way for RNNs to do different amounts of computation each step. The big picture idea is simple: allow the RNN to do multiple steps of computation for each time step.\n\nIn order for the network to learn how many steps to do, we want the number of steps to be differentiable. We achieve this with the same trick we used before: instead of deciding to run for a discrete number of steps, we have an attention distribution over the number of steps to run. The output is a weighted combination of the outputs of each step.\n\nThere are a few more details, which were left out in the previous diagram. Here’s a complete diagram of a time step with three computation steps.\n\nThat’s a bit complicated, so let’s work through it step by step. At a high-level, we’re still running the RNN and outputting a weighted combination of the states:\n\nThe weight for each step is determined by a “halting neuron.” It’s a sigmoid neuron that looks at the RNN state and gives a halting weight, which we can think of as the probability that we should stop at that step.\n\nWe have a total budget for the halting weights of 1, so we track that budget along the top. When it gets to less than epsilon, we stop.\n\nWhen we stop, might have some left over halting budget because we stop when it gets to less than epsilon. What should we do with it? Technically, it’s being given to future steps but we don’t want to compute those, so we attribute it to the last step.\n\nWhen training Adaptive Computation Time models, one adds a “ponder cost” term to the cost function. This penalizes the model for the amount of computation it uses. The bigger you make this term, the more it will trade-off performance for lowering compute time.\n\nAdaptive Computation Time is a very new idea, but we believe that it, along with similar ideas, will be very important.\n\nCode\n\nThe only open source implementation of Adaptive Computation Time at the moment seems to be Mark Neumann’s (TensorFlow).", "segmentation_method": "reviewed_source_semantics", "label": "Adaptive Computation Time", "source_line_range": [ 78, 103 ] }, { "id": "body-region-4", "text": "neural programmer neural nets are excellent at many tasks but they also struggle to do some basic things like arithmetic which are trivial in normal approaches to computing it would be really nice to have a way to fuse neural nets with normal programming and get the best of both worlds the neural programmer 16 is one approach to this it learns to create programs in order to solve a task in fact it learns to generate such programs without needing examples of correct programs it discovers how to produce programs as a means to the end of accomplishing some task the actual model in the paper answers questions about tables by generating sql like programs to query the table however there are a number of details here that make it a bit complicated so let s start by imagining a slightly simpler model which is given an arithmetic expression and generates a program to evaluate it the generated program is a sequence of operations each operation is defined to operate on the output of past operations so an operation might be something like add the output of the operation 2 steps ago and the output of the operation 1 step ago it s more like a unix pipe than a program with variables being assigned to and read from the program is generated one operation at a time by a controller rnn at each step the controller rnn outputs a probability distribution for what the next operation should be for example we might be pretty sure we want to perform addition at the first time step then have a hard time deciding whether we should multiply or divide at the second step and so on the resulting distribution over operations can now be evaluated instead of running a single operation at each step we do the usual attention trick of running all of them and then average the outputs together weighted by the probability we ran that operation as long as we can define derivatives through the operations the program s output is differentiable with respect to the probabilities we can then define a loss and train the neural net to produce programs that give the correct answer in this way the neural programmer learns to produce programs without examples of good programs the only supervision is the answer the program should produce that s the core idea of neural programmer but the version in the paper answers questions about tables rather than arithmetic expressions there are a few additional neat tricks multiple types many of the operations in the neural programmer deal with types other than scalar numbers some operations output selections of table columns or selections of cells only outputs of the same type get merged together referencing inputs the neural programmer needs to answer questions like how many cities have a population greater than 1 000 000 given a table of cities with a population column to facilitate this some operations allow the network to reference constants in the question they re answering or the names of columns this referencing happens by attention in the style of pointer networks 17 the neural programmer isn t the only approach to having neural networks generate programs another lovely approach is the neural programmer interpreter 18 which can accomplish a number of very interesting tasks but requires supervision in the form of correct programs we think that this general space of bridging the gap between more traditional programming and neural networks is extremely important while the neural programmer is clearly not the final solution we think there are a lot of important lessons to be learned from it code the more recent version of neural programmer for question answering has been open sourced by its authors and is available as a tensorflow model there is also an implementation of the neural programmer interpreter by ken morishita keras", "source_text": "Neural Programmer\n\nNeural nets are excellent at many tasks, but they also struggle to do some basic things like arithmetic, which are trivial in normal approaches to computing. It would be really nice to have a way to fuse neural nets with normal programming, and get the best of both worlds.\n\nThe neural programmer [16] is one approach to this. It learns to create programs in order to solve a task. In fact, it learns to generate such programs without needing examples of correct programs. It discovers how to produce programs as a means to the end of accomplishing some task.\n\nThe actual model in the paper answers questions about tables by generating SQL-like programs to query the table. However, there are a number of details here that make it a bit complicated, so let’s start by imagining a slightly simpler model, which is given an arithmetic expression and generates a program to evaluate it.\n\nThe generated program is a sequence of operations. Each operation is defined to operate on the output of past operations. So an operation might be something like “add the output of the operation 2 steps ago and the output of the operation 1 step ago.” It’s more like a Unix pipe than a program with variables being assigned to and read from.\n\nThe program is generated one operation at a time by a controller RNN. At each step, the controller RNN outputs a probability distribution for what the next operation should be. For example, we might be pretty sure we want to perform addition at the first time step, then have a hard time deciding whether we should multiply or divide at the second step, and so on...\n\nThe resulting distribution over operations can now be evaluated. Instead of running a single operation at each step, we do the usual attention trick of running all of them and then average the outputs together, weighted by the probability we ran that operation.\n\nAs long as we can define derivatives through the operations, the program’s output is differentiable with respect to the probabilities. We can then define a loss, and train the neural net to produce programs that give the correct answer. In this way, the Neural Programmer learns to produce programs without examples of good programs. The only supervision is the answer the program should produce.\n\nThat’s the core idea of Neural Programmer, but the version in the paper answers questions about tables, rather than arithmetic expressions. There are a few additional neat tricks:\n\nMultiple Types: Many of the operations in the Neural Programmer deal with types other than scalar numbers. Some operations output selections of table columns or selections of cells. Only outputs of the same type get merged together.\n\nReferencing Inputs: The neural programmer needs to answer questions like “How many cities have a population greater than 1,000,000?” given a table of cities with a population column. To facilitate this, some operations allow the network to reference constants in the question they’re answering, or the names of columns. This referencing happens by attention, in the style of pointer networks [17].\n\nThe Neural Programmer isn’t the only approach to having neural networks generate programs. Another lovely approach is the Neural Programmer-Interpreter [18] which can accomplish a number of very interesting tasks, but requires supervision in the form of correct programs.\n\nWe think that this general space, of bridging the gap between more traditional programming and neural networks is extremely important. While the Neural Programmer is clearly not the final solution, we think there are a lot of important lessons to be learned from it.\n\nCode\n\nThe more recent version of Neural Programmer for question answering has been open sourced by its authors and is available as a TensorFlow Model. There is also an implementation of the Neural Programmer-Interpreter by Ken Morishita (Keras).", "segmentation_method": "reviewed_source_semantics", "label": "Neural Programmer", "source_line_range": [ 104, 133 ] }, { "id": "body-region-5", "text": "the big picture a human with a piece of paper is in some sense much smarter than a human without a human with mathematical notation can solve problems they otherwise couldn t access to computers makes us capable of incredible feats that would otherwise be far beyond us in general it seems like a lot of interesting forms of intelligence are an interaction between the creative heuristic intuition of humans and some more crisp and careful media like language or equations sometimes the medium is something that physically exists and stores information for us prevents us from making mistakes or does computational heavy lifting in other cases the medium is a model in our head that we manipulate either way it seems deeply fundamental to intelligence recent results in machine learning have started to have this flavor combining the intuition of neural networks with something else one approach is what one might call heuristic search for example alphago 19 has a model of how go works and explores how the game could play out guided by neural network intuition similarly deepmath 20 uses neural networks as intuition for manipulating mathematical expressions the augmented rnns we ve talked about in this article are another approach where we connect rnns to engineered media in order to extend their general capabilities interacting with media naturally involves making a sequence of taking an action observing and taking more actions this creates a major challenge how do we learn which actions to take that sounds like a reinforcement learning problem and we could certainly take that approach but the reinforcement learning literature is really attacking the hardest version of this problem and its solutions are hard to use the wonderful thing about attention is that it gives us an easier way out of this problem by partially taking all actions to varying extents this works because we can design media like the ntm memory to allow fractional actions and to be differentiable reinforcement learning has us take a single path and try to learn from that attention takes every direction at a fork and then merges the paths back together a major weaknesses of attention is that we have to take every action every step this causes the computational cost to grow linearly as you do things like increase the amount of memory in a neural turing machine one thing you could imagine doing is having your attention be sparse so that you only have to touch some memories however it s still challenging because you may want to do things like have your attention depend on the content of the memory and doing that naively forces you to look at each memory we ve seen some initial attempts to attack this problem such as 21 but it seems like there s a lot more to be done if we could really make such sub linear time attention work that would be very powerful augmented recurrent neural networks and the underlying technique of attention are incredibly exciting we look forward to seeing what happens next acknowledgments thank you to maithra raghu dario amodei cassandra xia luke vilnis anna goldie jesse engel dan mané natasha jaques emma pierson and ian goodfellow for their feedback and encouragement we re also very grateful to our team google brain for being extremely supportive of our project references understanding lstm networks link olah c 2015 neural turing machines pdf graves a wayne g and danihelka i 2014 corr vol abs 1410 5401 show attend and tell neural image caption generation with visual attention xu k ba j kiros r cho k courville a salakhutdinov r zemel r s and bengio y 2015 arxiv preprint arxiv 1502 03044 vol 2 3 pp 5 corr neural gpus learn algorithms pdf kaiser l and sutskever i 2015 corr vol abs 1511 08228 reinforcement learning neural turing machines pdf zaremba w and sutskever i 2015 corr vol abs 1505 00521 neural random access machines pdf kurach k andrychowicz m and sutskever i 2015 corr vol abs 1511 06392 learning to transduce with unbounded memory pdf grefenstette e hermann k m suleyman m and blunsom p 2015 advances in neural information processing systems 28 pp 1828 1836 curran associates inc inferring algorithmic patterns with stack augmented recurrent nets pdf joulin a and mikolov t 2015 advances in neural information processing systems 28 pp 190 198 curran associates inc memory networks pdf weston j chopra s and bordes a 2014 corr vol abs 1410 3916 ask me anything dynamic memory networks for natural language processing pdf kumar a irsoy o su j bradbury j english r pierce b ondruska p gulrajani i and socher r 2015 corr vol abs 1506 07285 neural machine translation by jointly learning to align and translate bahdanau d cho k and bengio y 2014 arxiv preprint arxiv 1409 0473 listen attend and spell pdf chan w jaitly n le q v and vinyals o 2015 corr vol abs 1508 01211 grammar as a foreign language vinyals o kaiser l koo t petrov s sutskever i and hinton g 2015 advances in neural information processing systems pp 2773 2781 a neural conversational model pdf vinyals o and le q v 2015 corr vol abs 1506 05869 adaptive computation time for recurrent neural networks pdf graves a 2016 corr vol abs 1603 08983 neural programmer inducing latent programs with gradient descent pdf neelakantan a le q v and sutskever i 2015 corr vol abs 1511 04834 pointer networks vinyals o fortunato m and jaitly n 2015 advances in neural information processing systems pp 2692 2700 neural programmer interpreters pdf reed s e and freitas n d 2015 corr vol abs 1511 06279 mastering the game of go with deep neural networks and tree search link silver d huang a maddison c j guez a sifre l driessche g v d schrittwieser j antonoglou i panneershelvam v lanctot m dieleman s grewe d nham j kalchbrenner n sutskever i lillicrap t leach m kavukcuoglu k graepel t and hassabis d 2016 nature vol 529 7587 pp 484 489 nature publishing group doi 10 1038 nature16961 deepmath deep sequence models for premise selection pdf alemi a a chollet f irving g szegedy c and urban j 2016 corr vol abs 1606 04442 learning efficient algorithms with hierarchical attentive memory pdf andrychowicz m and kurach k 2016 corr vol abs 1602 03218 updates and corrections view all changes to this article since it was first published if you see a mistake or want to suggest a change please create an issue on github citations and reuse diagrams and text are licensed under creative commons attribution cc by 2 0 unless noted otherwise with the source available on github the figures that have been reused from other sources don t fall under this license and can be recognized by a note in their caption figure from for attribution in academic contexts please cite this work as olah carter attention and augmented recurrent neural networks distill 2016 http doi org 10 23915 distill 00001 bibtex citation article olah2016attention author olah chris and carter shan title attention and augmented recurrent neural networks journal distill year 2016 url http distill pub 2016 augmented rnns doi 10 23915 distill 00001", "source_text": "The Big Picture\n\nA human with a piece of paper is, in some sense, much smarter than a human without. A human with mathematical notation can solve problems they otherwise couldn’t. Access to computers makes us capable of incredible feats that would otherwise be far beyond us.\n\nIn general, it seems like a lot of interesting forms of intelligence are an interaction between the creative heuristic intuition of humans and some more crisp and careful media, like language or equations. Sometimes, the medium is something that physically exists, and stores information for us, prevents us from making mistakes, or does computational heavy lifting. In other cases, the medium is a model in our head that we manipulate. Either way, it seems deeply fundamental to intelligence.\n\nRecent results in machine learning have started to have this flavor, combining the intuition of neural networks with something else. One approach is what one might call “heuristic search.” For example, AlphaGo [19] has a model of how Go works and explores how the game could play out guided by neural network intuition. Similarly, DeepMath [20] uses neural networks as intuition for manipulating mathematical expressions. The “augmented RNNs” we’ve talked about in this article are another approach, where we connect RNNs to engineered media, in order to extend their general capabilities.\n\nInteracting with media naturally involves making a sequence of taking an action, observing, and taking more actions. This creates a major challenge: how do we learn which actions to take? That sounds like a reinforcement learning problem and we could certainly take that approach. But the reinforcement learning literature is really attacking the hardest version of this problem, and its solutions are hard to use. The wonderful thing about attention is that it gives us an easier way out of this problem by partially taking all actions to varying extents. This works because we can design media—like the NTM memory—to allow fractional actions and to be differentiable. Reinforcement learning has us take a single path, and try to learn from that. Attention takes every direction at a fork, and then merges the paths back together.\n\nA major weaknesses of attention is that we have to take every “action” every step. This causes the computational cost to grow linearly as you do things like increase the amount of memory in a Neural Turing Machine. One thing you could imagine doing is having your attention be sparse, so that you only have to touch some memories. However, it’s still challenging because you may want to do things like have your attention depend on the content of the memory, and doing that naively forces you to look at each memory. We’ve seen some initial attempts to attack this problem, such as [21], but it seems like there’s a lot more to be done. If we could really make such sub-linear time attention work, that would be very powerful!\n\nAugmented recurrent neural networks, and the underlying technique of attention, are incredibly exciting. We look forward to seeing what happens next!\n\nAcknowledgments\n\nThank you to Maithra Raghu, Dario Amodei, Cassandra Xia, Luke Vilnis, Anna Goldie, Jesse Engel, Dan Mané, Natasha Jaques, Emma Pierson and Ian Goodfellow for their feedback and encouragement. We’re also very grateful to our team, Google Brain, for being extremely supportive of our project.\n\nReferences\nUnderstanding LSTM Networks  [link]\nOlah, C., 2015.\nNeural Turing Machines  [PDF]\nGraves, A., Wayne, G. and Danihelka, I., 2014. CoRR, Vol abs/1410.5401.\nShow, attend and tell: Neural image caption generation with visual attention\nXu, K., Ba, J., Kiros, R., Cho, K., Courville, A., Salakhutdinov, R., Zemel, R.S. and Bengio, Y., 2015. arXiv preprint arXiv:1502.03044, Vol 2(3), pp. 5. CoRR.\nNeural GPUs Learn Algorithms  [PDF]\nKaiser, L. and Sutskever, I., 2015. CoRR, Vol abs/1511.08228.\nReinforcement Learning Neural Turing Machines  [PDF]\nZaremba, W. and Sutskever, I., 2015. CoRR, Vol abs/1505.00521.\nNeural Random-Access Machines  [PDF]\nKurach, K., Andrychowicz, M. and Sutskever, I., 2015. CoRR, Vol abs/1511.06392.\nLearning to Transduce with Unbounded Memory  [PDF]\nGrefenstette, E., Hermann, K.M., Suleyman, M. and Blunsom, P., 2015. Advances in Neural Information Processing Systems 28, pp. 1828—1836. Curran Associates, Inc.\nInferring Algorithmic Patterns with Stack-Augmented Recurrent Nets  [PDF]\nJoulin, A. and Mikolov, T., 2015. Advances in Neural Information Processing Systems 28, pp. 190—198. Curran Associates, Inc.\nMemory Networks  [PDF]\nWeston, J., Chopra, S. and Bordes, A., 2014. CoRR, Vol abs/1410.3916.\nAsk Me Anything: Dynamic Memory Networks for Natural Language Processing  [PDF]\nKumar, A., Irsoy, O., Su, J., Bradbury, J., English, R., Pierce, B., Ondruska, P., Gulrajani, I. and Socher, R., 2015. CoRR, Vol abs/1506.07285.\nNeural machine translation by jointly learning to align and translate\nBahdanau, D., Cho, K. and Bengio, Y., 2014. arXiv preprint arXiv:1409.0473.\nListen, Attend and Spell  [PDF]\nChan, W., Jaitly, N., Le, Q.V. and Vinyals, O., 2015. CoRR, Vol abs/1508.01211.\nGrammar as a foreign language\nVinyals, O., Kaiser, L., Koo, T., Petrov, S., Sutskever, I. and Hinton, G., 2015. Advances in Neural Information Processing Systems, pp. 2773—2781.\nA Neural Conversational Model  [PDF]\nVinyals, O. and Le, Q.V., 2015. CoRR, Vol abs/1506.05869.\nAdaptive Computation Time for Recurrent Neural Networks  [PDF]\nGraves, A., 2016. CoRR, Vol abs/1603.08983.\nNeural Programmer: Inducing Latent Programs with Gradient Descent  [PDF]\nNeelakantan, A., Le, Q.V. and Sutskever, I., 2015. CoRR, Vol abs/1511.04834.\nPointer networks\nVinyals, O., Fortunato, M. and Jaitly, N., 2015. Advances in Neural Information Processing Systems, pp. 2692—2700.\nNeural Programmer-Interpreters  [PDF]\nReed, S.E. and Freitas, N.d., 2015. CoRR, Vol abs/1511.06279.\nMastering the game of Go with deep neural networks and tree search  [link]\nSilver, D., Huang, A., Maddison, C.J., Guez, A., Sifre, L., Driessche, G.v.d., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., Dieleman, S., Grewe, D., Nham, J., Kalchbrenner, N., Sutskever, I., Lillicrap, T., Leach, M., Kavukcuoglu, K., Graepel, T. and Hassabis, D., 2016. Nature, Vol 529(7587), pp. 484—489. Nature Publishing Group. DOI: 10.1038/nature16961\nDeepMath - Deep Sequence Models for Premise Selection  [PDF]\nAlemi, A.A., Chollet, F., Irving, G., Szegedy, C. and Urban, J., 2016. CoRR, Vol abs/1606.04442.\nLearning Efficient Algorithms with Hierarchical Attentive Memory  [PDF]\nAndrychowicz, M. and Kurach, K., 2016. CoRR, Vol abs/1602.03218.\nUpdates and Corrections\n\nView all changes to this article since it was first published. If you see a mistake or want to suggest a change, please create an issue on GitHub.\n\nCitations and Reuse\n\nDiagrams and text are licensed under Creative Commons Attribution CC-BY 2.0, unless noted otherwise, with the source available on GitHub. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: “Figure from …”.\n\nFor attribution in academic contexts, please cite this work as\n\nOlah & Carter, \"Attention and Augmented Recurrent Neural Networks\", Distill, 2016. http://doi.org/10.23915/distill.00001\n\nBibTeX citation\n\n@article{olah2016attention,\n author = {Olah, Chris and Carter, Shan},\n title = {Attention and Augmented Recurrent Neural Networks},\n journal = {Distill},\n year = {2016},\n url = {http://distill.pub/2016/augmented-rnns},\n doi = {10.23915/distill.00001}\n}", "segmentation_method": "reviewed_source_semantics", "label": "The Big Picture", "source_line_range": [ 134, 216 ] } ], "ending": { "text": " year = {2016},\n url = {http://distill.pub/2016/augmented-rnns},\n doi = {10.23915/distill.00001}\n}" } } }, { "id": "article-089", "name": "The Scaling Hypothesis", "url": "https://gwern.net/scaling-hypothesis", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The\\ Scaling\\ Hypothesis" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Site" ] }, { "id": "stable-3", "alternatives": [ "Me" ] }, { "id": "stable-4", "alternatives": [ "New" ] }, { "id": "stable-5", "alternatives": [ "Blog" ] }, { "id": "stable-6", "alternatives": [ "Links" ] }, { "id": "stable-7", "alternatives": [ "Patreon" ] }, { "id": "stable-8", "alternatives": [ "Substack" ] }, { "id": "stable-9", "alternatives": [ "GPT-3" ] }, { "id": "stable-10", "alternatives": [ "AI scaling" ] }, { "id": "stable-11", "alternatives": [ "algorithm" ] }, { "id": "stable-12", "alternatives": [ "insight porn" ] }, { "id": "stable-13", "alternatives": [ "AI safety" ] }, { "id": "stable-14", "alternatives": [ "RL scaling" ] }, { "id": "stable-15", "alternatives": [ "sociology" ] }, { "id": "stable-16", "alternatives": [ "transhumanism" ] }, { "id": "stable-17", "alternatives": [ "2020-05-28–2022-01-02" ] }, { "id": "stable-18", "alternatives": [ "finished" ] }, { "id": "stable-19", "alternatives": [ "certainty" ] }, { "id": "stable-20", "alternatives": [ "likely" ] }, { "id": "stable-21", "alternatives": [ "importance" ] }, { "id": "stable-22", "alternatives": [ "backlinks" ] }, { "id": "stable-23", "alternatives": [ "similar" ] }, { "id": "stable-24", "alternatives": [ "bibliography" ] }, { "id": "stable-25", "alternatives": [ "Meta-Learning" ] }, { "id": "stable-26", "alternatives": [ "Flexing GPT" ] }, { "id": "stable-27", "alternatives": [ "Baking The Cake" ] }, { "id": "stable-28", "alternatives": [ "Scaling" ] }, { "id": "stable-29", "alternatives": [ "Blessings Of Scale" ] }, { "id": "stable-30", "alternatives": [ "Scaling Hypothesis" ] }, { "id": "stable-31", "alternatives": [ "Why Does Pretraining Work?" ] }, { "id": "stable-32", "alternatives": [ "Prospects" ] }, { "id": "stable-33", "alternatives": [ "Critiquing The Critics" ] }, { "id": "stable-34", "alternatives": [ "Appendix" ] }, { "id": "stable-35", "alternatives": [ "It From Byte" ] }, { "id": "stable-36", "alternatives": [ "All Is Atoms & Void" ] }, { "id": "stable-37", "alternatives": [ "Intentional Interpretive Stance" ] }, { "id": "stable-38", "alternatives": [ "Variational Interpretations" ] }, { "id": "stable-39", "alternatives": [ "Inducing Emergence Is Expensive" ] }, { "id": "stable-40", "alternatives": [ "What Can Induce Agency Emergence?" ] }, { "id": "stable-41", "alternatives": [ "Cellular Automatons" ] }, { "id": "stable-42", "alternatives": [ "Turing Machine" ] }, { "id": "stable-43", "alternatives": [ "Single TM" ] }, { "id": "stable-44", "alternatives": [ "TM Meta-Learning" ] }, { "id": "stable-45", "alternatives": [ "Ambient Agency" ] }, { "id": "stable-46", "alternatives": [ "Backlinks" ] }, { "id": "stable-47", "alternatives": [ "Similar Links" ] }, { "id": "stable-48", "alternatives": [ "Bibliography" ] }, { "id": "stable-49", "alternatives": [ "Is GPT actually part of AGI—or is the cake a lie? (⁠LeCun 2019⁠)" ] }, { "id": "stable-50", "alternatives": [ "A better GPT-3 lesson." ] }, { "id": "stable-51", "alternatives": [ "GPT-3: not even that much compute—⁠3640 petaflop/s-day⁠, only 2× their estimate for AlphaGo Zero," ] }, { "id": "stable-52", "alternatives": [ ". (Historical graph modified by myself from “AI and Compute”, Amodei et al 2018⁠.)" ] }, { "id": "stable-53", "alternatives": [ "DL scaling laws: compute, data, model parameters. (⁠Figure 1⁠)" ] }, { "id": "stable-54", "alternatives": [ "Projecting DL power laws: still room beyond GPT-3." ] }, { "id": "stable-55", "alternatives": [ "GPT-3 continues to scale as predicted. (Note GPT-3’s curve has not ‘bounced’, and it trained only ~0.5 epochs, see ⁠Table 2.2⁠)" ] }, { "id": "stable-56", "alternatives": [ "AlphaGo Zero: ‘just stack moar layers lol!’" ] }, { "id": "stable-57", "alternatives": [ "“Figure 1: Envisioned evolution of NLP research through three different eras or curves” (the hypothetical S-curves & progress in natural language modeling; from Cambria & White 2014⁠)" ] }, { "id": "stable-58", "alternatives": [ "“Yeah, but there’s more to being smart than knowing compression schemes!” “No there’s not!” “Shoot—he knows the secret!!”" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The complete second independent initial DOM, rendered viewport and computed region/hidden-node evidence qualify the whole essay, Appendix, nine visible ordinary captions and all 34 endnotes. All 16 HTML chunks reassemble exactly; earlier truncatedHTML is not used. Owning main/essay/endnotes regions are visible and unclipped; related backlink/similar collections and the closed bibliography are excluded explicitly. Preserve observed generated monetary/date annotations as displayed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Scaling Hypothesis" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-089/comment-qualification-reference-r5.json", "sha256": "31f611718bf2e6377737c5063c89e7a33d089b47e0d98889d6a8938b2315f007", "chars": 766, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "The Scaling Hypothesis\nGPT-3, AI scaling, algorithm, insight porn, AI safety, RL scaling, sociology, transhumanism\nOn GPT-3: meta-learning, scaling, implications, and deep theory. The scaling hypothesis: neural nets absorb data & compute, generalizing and becoming more Bayesian as problems get harder, manifesting new abilities even at trivial-by-global-standards-scale. The deep learning revolution has begun as foretold.\n2020-05-28–2022-01-02 finished ⁠certainty: likely ⁠importance: 10 ⁠backlinks⁠ ⁠similar⁠ ⁠bibliography⁠\nGPT-3, an­nounced by Ope­nAI in May 2020, is the largest neural net­work ever trained, by over an order of mag­ni­tude. Trained on In­ter­net text data, it is the suc­ces­sor to GPT-2, which had sur­prised every­one by its nat­ural lan­guage un­der­stand­ing & gen­er­a­tion abil­ity. To the sur­prise of most (in­clud­ing my­self), this vast in­crease in size did not run into di­min­ish­ing or neg­a­tive re­turns, as many ex­pected, but the ben­e­fits of scale con­tin­ued to hap­pen as fore­casted by Ope­nAI. These ben­e­fits were not merely learn­ing more facts & text than GPT-2, but qual­i­ta­tively dis­tinct & even more sur­pris­ing in show­ing ⁠meta-learning⁠: while GPT-2 learned how to do com­mon nat­ural lan­guage tasks like text sum­ma­riza­tion, GPT-3 in­stead learned how to fol­low di­rec­tions and learn new tasks from a few ex­am­ples. (As a re­sult, GPT-3 out­puts & in­ter­ac­tion are more fas­ci­nat­ing & human-like than GPT-2.)\nWhile the im­me­di­ate ap­pli­ca­tions of GPT-3, like my po­etry or humor writ­ings, are nice, the short-term im­pli­ca­tions of GPT-3 are much more im­por­tant.\nFirst, while GPT-3 is ex­pen­sive by con­ven­tional DL stan­dards, it is cheap by sci­en­tific/com­mer­cial/mil­i­tary/gov­ern­ment bud­get stan­dards, and the re­sults in­di­cate that mod­els could be made much larger. Sec­ond, mod­els can also be made much more pow­er­ful, as GPT is an old ap­proach known to be flawed in both minor & major ways, and far from an ‘ideal’ Trans­former. Third, GPT-3’s ca­pa­bil­i­ties come from learn­ing on raw (un­su­per­vised) data; that has long been one of the weak­est areas of DL, hold­ing back progress in other areas like re­in­force­ment learn­ing or ro­bot­ics. Mod­els like GPT-3 sug­gest that large un­su­per­vised mod­els will be vital com­po­nents of fu­ture DL sys­tems, as they can be ‘plugged into’ sys­tems to im­me­di­ately pro­vide un­der­stand­ing of the world, hu­mans, nat­ural lan­guage, and rea­son­ing.\nThe meta-learning has a longer-term im­pli­ca­tion: it is a demon­stra­tion of the ⁠bless­ings of scale⁠, where prob­lems with sim­ple neural net­works van­ish, and they be­come more pow­er­ful, more gen­er­al­iz­able, more human-like when sim­ply made very large & trained on very large datasets with very large com­pute—even though those prop­er­ties are be­lieved to re­quire com­pli­cated ar­chi­tec­tures & fancy al­go­rithms (and this per­ceived need dri­ves much re­search). Un­su­per­vised mod­els ben­e­fit from this, as train­ing on large cor­puses like Internet-scale text present a myr­iad of dif­fi­cult prob­lems to solve; this is enough to drive meta-learning de­spite GPT not being de­signed for meta-learning in any way. (This fam­ily of phe­nom­ena is per­haps dri­ven by neural net­works func­tion­ing as en­sem­bles of many sub-networks with them all av­er­ag­ing out to an Occam’s razor, which for small data & mod­els, learn su­per­fi­cial or mem­o­rized parts of the data, but can be forced into true learn­ing by mak­ing the prob­lems hard & rich enough; as ⁠meta-learners learn amor­tized Bayesian in­fer­ence⁠, they build in in­for­ma­tive pri­ors when trained over many tasks, and be­come dra­mat­i­cally more sample-efficient and bet­ter at gen­er­al­iza­tion.)\nThe bless­ings of scale in turn sup­port a rad­i­cal the­ory: an old AI par­a­digm held by a few pi­o­neers in con­nec­tion­ism (early ar­ti­fi­cial neural net­work re­search) and by more re­cent deep learn­ing re­searchers, the ⁠scal­ing hy­poth­e­sis⁠. The scal­ing hy­poth­e­sis re­gards the bless­ings of scale as the se­cret of AGI: in­tel­li­gence is ‘just’ sim­ple neural units & learn­ing al­go­rithms ap­plied to di­verse ex­pe­ri­ences at a (cur­rently) un­reach­able scale. As in­creas­ing com­pu­ta­tional re­sources per­mit run­ning such al­go­rithms at the nec­es­sary scale, the neural net­works will get ever more in­tel­li­gent.\nWhen? Es­ti­mates of Moore’s law-like progress curves decades ago by pi­o­neers like Hans Moravec in­di­cated that it would take until the 2010s for the sufficiently-cheap com­pute for tiny insect-level pro­to­type sys­tems to be avail­able, and the 2020s for the first sub-human sys­tems to be­come fea­si­ble, and these fore­casts are hold­ing up. (De­spite this vin­di­ca­tion, the scal­ing hy­poth­e­sis is so un­pop­u­lar an idea, and dif­fi­cult to prove in ad­vance rather than as a fait ac­com­pli, that while the GPT-3 re­sults fi­nally drew some pub­lic no­tice after Ope­nAI en­abled lim­ited pub­lic ac­cess & peo­ple could ex­per­i­ment with it live, it is un­likely that many en­ti­ties will mod­ify their re­search philoso­phies, much less kick off an ‘arms race’.)\nMore con­cern­ingly, GPT-3’s scal­ing curves, un­pre­dicted meta-learning, and suc­cess on var­i­ous anti-AI chal­lenges sug­gests that in terms of fu­tur­ol­ogy, AI re­searchers’ fore­casts are an em­peror sans gar­ments: they have no co­her­ent model of how AI progress hap­pens or why GPT-3 was pos­si­ble or what spe­cific achieve­ments should cause alarm, where in­tel­li­gence comes from, and do not learn from any fal­si­fied pre­dic­tions. Their pri­mary con­cerns ap­pear to be sup­port­ing the sta­tus quo, pla­cat­ing pub­lic con­cern, and re­main­ing re­spectable. As such, their com­ments on AI risk are mean­ing­less: they would make the same pub­lic state­ments if the scal­ing hy­poth­e­sis were true or not.\nDe­pend­ing on what in­vest­ments are made into scal­ing DL, and how fast com­pute grows, the 2020s should be quite in­ter­est­ing—sig­moid or sin­gu­lar­ity?\nFor more ML scal­ing re­search, fol­low the /r/MLScal­ing⁠ sub­red­dit. For a fic­tion treat­ment as SF short story, see “It Looks Like You’re Try­ing To Take Over The World”⁠. For my May 2022 fol­lowup 2 years later, see ⁠“Scal­ing Hy­poth­e­sis Re­vis­ited”⁠; see also ⁠Sit­u­a­tional Aware­ness & ⁠AI 2027. For more spec­u­la­tion on how and why DL scal­ing works, see “Human-like Neural Nets by Cat­a­pult­ing”⁠.\nRead The Samples\nOn “GPT-3: Language Models are Few-Shot Learners”, Brown et al 2020⁠ (poems⁠ & my followup “GPT-3 Creative Writing”⁠, compare my old finetuned GPT-2 poetry⁠; ⁠random samples; “OpenAI API”⁠ with real-world demos)\nI strongly encourage anyone interested in GPT-3 to also at least skim OA’s ⁠random samples, or better yet, my samples in “GPT-3 Creative Writing”—reading the paper & looking at some standard benchmark graphs does not give a good feel for what working with GPT-3 is like or the diversity of things it can do which are missed by benchmarks.\nMeta-Learning\nLearning to learn. In May 2020, OA released—to remarkably little interest from researchers, no blog post, no media blitz, and little public discussion beyond the snidely dismissive—the long-awaited followup to GPT-2⁠, one model to rule them all: a 117× larger 175b-parameter model with far more powerful language generation, which lets it solve a wide variety of problems from arithmetic⁠⁠1⁠ to English translation to unscrambling anagrams to SAT analogies—purely from being prompted with text examples, without any specialized training or finetuning whatsoever, merely next-word prediction training on a big Internet text corpus. This implies GPT-3’s attention mechanisms serve as “fast weights”⁠ that have “learned to learn” by training on sufficiently varied data⁠⁠2⁠, forcing it to do more than just learn ordinary textual relationships. Like OpenAI’s Jukebox⁠ just weeks ago (itself a remarkable demonstration of scaling in synthesizing raw audio music complete with remarkably realistic voices/instruments), the announcement of GPT-3 appears to have sunk almost without a trace, so I will go into more depth than usual.\nFlexing GPT\n‘“They are absolutely reasonable. I think that is their distinguishing characteristic. Yes, Mr. Erskine, an absolutely reasonable people. I assure you there is no nonsense about the Americans.” “How dreadful!” cried Lord Henry. “I can stand brute force, but brute reason is quite unbearable. There is something unfair about its use. It is hitting below the intellect.”’\nThe Picture of Dorian Gray, Oscar Wilde\n“Attacks only get better.” 2 years ago, GPT-1⁠ was interestingly useful pretraining and adorable with its “sentiment neuron”. 1 year ago, GPT-2 was impressive with its excellent text generation & finetuning capabilities. This year, GPT-3 is scary because it’s a magnificently obsolete architecture from early 2018 (used mostly for software engineering convenience as the infrastructure has been debugged), which is small & shallow compared to what’s possible⁠⁠3⁠⁠⁠4⁠, with a simple uniform architecture⁠⁠5⁠ trained in the dumbest way possible (unidirectional prediction of next text token) on a single impoverished modality (random Internet HTML text dumps⁠⁠6⁠) on tiny data (fits on a laptop), sampled in a dumb way⁠⁠7⁠, its benchmark performance sabotaged by bad prompts & data tokenization problems (especially arithmetic & commonsense reasoning), and yet, the first version already manifests crazy runtime meta-learning—and the scaling curves still are not bending! The samples are also better than ever, whether it’s GPT-3 inventing new penis jokes⁠⁠8⁠ or writing (mostly working) JavaScript tutorials about rotating arrays.\nIt’s odd that this qualitative leap appears to be largely missed by the standard NLP benchmarks. Nothing in the raw metrics reported on, say, Penn Tree Bank or LAMBADA or WinoGrande would lead you to expect all of this hilarious and creative output; the meta-learning results might, but only if you already thought meta-learning was important. This suggests to me that a useful post-GPT-3 contribution would be figuring out how to benchmark these sorts of flexible text generation capabilities (possibly something along the lines of Chollet’s image-based Abstraction and Reasoning Corpus (ARC)⁠).\nBaking The Cake\nNot the whole picture, but a big partScaling still workingAnti-scaling: penny-wise, pound-foolish\nIs GPT actually part of AGI—or is the cake a lie? (⁠LeCun 2019⁠)\nNot the whole picture, but a big part. Does it set SOTA on every task? No, of course not. But the question is not whether we can lawyerly find any way in which it might not work, but whether there is any way which it might work⁠. And there are many ways it might work better (see the ⁠“Limitations” section⁠ for just a few). Does GPT-3 do anything like steer a robot around SF shooting lasers and rockets at humans⸮ No, of course not. It is ‘just’ a text prediction model, an idiot savant of text; but an idiot savant, we should remember, is only a genetic mutation or bit of brain damage away from a normal human. If RL is the cherry on the top of the supervised learning frosting, and supervised learning is the frosting on top of the unsupervised learning cake, well, it looks like the cake layers are finally rising.\nA better GPT-3 lesson.\nScaling still working. I was surprised, as I had expected closer to 100b parameters, and I thought that the performance of CTRL⁠/Meena⁠/MegatronLM⁠/T5⁠/Turing-NLG⁠/GPipe⁠ suggested that, the scaling papers⁠⁠⁠9⁠ notwithstanding, the scaling curves had started to bend and by 100b, it might be hard to justify further scaling. However, in the latest version of “the unreasonable effectiveness of data”⁠ where “the curves cross”/“scissor effect” and the neural method eventually wins (eg. Banko & Brill 2001⁠, Brants et al 2007⁠, ⁠Koehn & Knowles 2017⁠), GPT-3 hits twice that without noticeable change in scaling factors: its scaling continues to be roughly logarithmic/power-law, as it was for much smaller models & as forecast, and it has not hit a regime where gains effectively halt or start to require increases vastly beyond feasibility. That suggests that it would be both possible and useful to head to trillions of parameters (which are still well within available compute & budgets, requiring merely thousands of GPUs & perhaps $13$102020–$126$1002020m budgets assuming no improvements which of course there will be, see ⁠Hernandez & Brown 2020⁠ etc.), and eyeballing the graphs, many benchmarks like the Winograd schema⁠ WinoGrande⁠ would fall by 10t parameters. The predictability of scaling is striking, and makes scaling models more like statistics than AI. (AI is statistics which does what we want it to but doesn’t work; and statistics is AI which works but doesn’t do what we want.)\nGPT-3: not even that much compute—⁠3640 petaflop/s-day⁠, only 2× their estimate for AlphaGo Zero, 1860166ya. (Historical graph modified by myself from “AI and Compute”, Amodei et al 2018⁠.)\nAnti-scaling: penny-wise, pound-foolish. GPT-3 is an extraordinarily expensive model by the standards of machine learning: it is estimated that training it may require the annual cost of more machine learning researchers than you can count on one hand (~$6.29$52020m⁠⁠10⁠), up to $38$302020 of hard drive space to store the model (500–800GB), and multiple pennies of electricity per 100 pages of output (0.4 kWH). Researchers are concerned about the prospects for scaling: can ML afford to run projects which cost more than 0.1 milli-Manhattan-Projects⸮⁠⁠11⁠ Surely it would be too expensive, even if it represented another large leap in AI capabilities, to spend up to 10 milli-Manhattan-Projects to scale GPT-3 100× to a trivial thing like human-like performance in many domains⸮ Many researchers feel that such a suggestion is absurd and refutes the entire idea of scaling machine learning research further; they asseverate that their favored approaches (you know, the ones which don’t work⁠⁠12⁠) will run far more efficiently, and that the field would be more productive if it instead focused on research which can be conducted by an impoverished goatherder on an old laptop running off solar panels.⁠⁠13⁠ Nonetheless, I think we can expect further scaling. (10×? No, 10× isn’t cool. You know what’s cool? ⁠100–1000×⁠, trained on a fancy new supercomputer⁠.) It is, after all, easier to make something efficient after it exists than before.\nScaling\nHow far will scaling go? The scaling papers suggest that the leaps we have seen over the past few years are not even half way there in terms of absolute likelihood loss, never mind what real-world capabilities each additional decrement translates into. The scaling curves are clean; from “Scaling Laws for Neural Language Models”, Kaplan et al 2020⁠:\nDL scaling laws: compute, data, model parameters. (⁠Figure 1⁠)\nGPT-3 represents ~103 on this chart, leaving plenty of room for further loss decreases—especially given the ⁠uncertainty in extrapolation⁠:\nProjecting DL power laws: still room beyond GPT-3.\nLo and behold, the scaling laws continue for GPT-3 models for several orders past ⁠Kaplan et al 2020⁠; from ⁠Brown et al 2020⁠:\nGPT-3 continues to scale as predicted. (Note GPT-3’s curve has not ‘bounced’, and it trained only ~0.5 epochs, see ⁠Table 2.2⁠)\nIf we see such striking gains in halving the validation loss but with so far left to go, what is left to emerge as we third or halve again? How far does this go, exactly? How do we predict what emerges when? Bueller? Bueller? (See also ⁠Meena’s perplexity vs human-ness chatbot ratings⁠, GPT-3-written news articles’ ⁠probability of fooling humans by parameter count⁠, and ⁠GPT-3 model size vs Q&A⁠ from Hendrycks et al 2020⁠.)\nBlessings Of Scale\nExtrapolating the spectacular performance of GPT-3 into the future suggests that the answer to life, the universe and everything is just 4.398 trillion parameters.\nGeoff Hinton⁠\nWe don’t know how to train NNs. The blessings of scale is the observation that for deep learning, hard problems are easier to solve than easy problems—everything gets better as it gets larger (in contrast to the usual outcome in research, where small things are hard and large things impossible). The bigger the neural net/compute/data/problem, the faster it learns, the better it learns, the stabler it learns, and so on. A problem we can’t solve at all at small n may suddenly become straightforward with millions or billions of n. “NNs are lazy”: they can do far more than we make them do when we push them beyond easy answers & cheap shortcuts. The bitter lesson is the harder and bigger, the better. (Besides GPT-3, one could mention recent progress in semi-supervised learning & the model-based DRL renaissance.)\nAlphaGo Zero: ‘just stack moar layers lol!’\nBlessings of scale: stability → generalization → meta-learning. GPT-3 is hamstrung by its training & data, but DL enjoys an unreasonably effective blessing of dimensionality⁠—just simply training a big model on a lot of data induces better properties like meta-learning without even the slightest bit of that architecture being built in; and in general, training on more and harder tasks creates ever more human-like performance, generalization, and robustness. The GPT natural-language & programming language models, iGPT⁠/Vision Transformer⁠ for images (and to some degree GPT-f⁠), show that simply scaling up models & datasets without any supervision produces results competitive with the best (and most complex) alternatives, using the same simple architecture, gradually passing from superficial surface correlations to more human-like brain activity (Schrimpf et al 2020⁠) and linguistic biases as data increases (eg. Warstadt et al 2020⁠). In fact, one may not even need complicated attention mechanisms at scale, as fully-connected networks—hard to get much simpler than them!—work surprisingly well⁠ for many tasks. One typically trains such large models with simple optimizers like Adam—because the complicated ones lose their advantages as batch sizes increase and the simple optimizers work fine⁠ and are more memory-efficient anyway. ⁠OA5⁠ does not just scale to, but ⁠stabilizes at⁠, minibatches of millions due to gradient noise⁠. OA5-like, BigGAN⁠ stabilizes at large-scale image datasets like JFT-300M & benefits from unusually large minibatches and VAEs (long an also-ran to GANs or autoregressive models in terms of sharp image generation) catch up if you make them very deep (Child 2020⁠, Vahdat & Kautz 2020⁠); while classifier CNNs like BiT⁠⁠⁠14⁠/Dojolonga et al 2020⁠ or ResNeXt⁠ or Noisy Student⁠ transfer & robustify⁠ with⁠ human-like errors⁠⁠15⁠, multimodal learning produces better representations on fewer data (eg. ViLBERT⁠/VideoBERT⁠, motivating OA’s interest in big multimodal models⁠), and RNNs can predict videos⁠. AlphaStar⁠ reaches human-level with hundreds of competing self-players to cover possible strategies. Imitation learning DRL like MetaMimic⁠ generalizes at hundreds of tasks to train a deep net. Disentanglement emerges in StyleGAN⁠ with sufficiently deep w embeddings, with enough parameters to train raw audio in the aforementioned Jukebox, or in relational networks⁠/GQN⁠/Transformers⁠ with enough samples to force factorization. (See also Hill et al 2019⁠/Chaplot et al 2017⁠/Yu et al 2018⁠/Lake 2019⁠/Interactive Agents Group 2020⁠.) Training Dactyl⁠ (or humanoid robots⁠) on millions of domain randomizations induced similar implicit meta-learning where during each runtime invocation, the RNN probes its environment and encodes its understanding of robot hand control into its hidden state; and DD-PPO⁠ outperforms classical robot planners by scaling 2 orders. Or in Procgen⁠ or CoinRun⁠, training on hundreds of levels trains agents to solve levels individually and worsens performance on other levels, but at thousands of levels, they begin to generalize to unseen levels. (Similarly, language model pretraining-finetuning⁠ overfits at small numbers of datasets but improves markedly with enough diversity.) AlphaZero⁠ demonstrated truly superhuman Go without ‘delusions’ just by training a bigger model on a richer signal & pro-level play without any search—and MuZero⁠, for that matter, demonstrated that just training an RNN end-to-end to predict a reward on enough data is enough to obsolete even AlphaZero and learn tree search implicitly (but better). And on and on. DM researcher ⁠Matthew Botvinick⁠, discussing their meta-reinforcement learning work where they were surprised to discover meta-learning emerging, and that it did so regardless of which specific architecture they used:\n…it’s something that just happens. In a sense, you can’t avoid this happening. If you have a system that has memory, and the function of that memory is shaped by reinforcement learning, and this system is trained on a series of interrelated tasks, this is going to happen. You can’t stop it.\nPace Breiman⁠, why? Why do they transfer and generalize? Why do these blessings of scale exist? Why do we need to train large models when small models provably exist with the same performance? Why do larger models not overfit (though they can⁠) and generalize better than smaller models? What’s up with the whole ‘double descent’⁠ anyway?\nThese are all, ahem, deep questions about neural networks and heavily debated, but right now, I would suggest that the answer lies in some mix of the model compression/distillation, ‘lottery ticket hypothesis’⁠, Bayesian neural network⁠, and learned representation⁠ (like circuits⁠) literatures.\nBig models work because they encode a dizzyingly vast number of sub-models in an extremely high-dimensional abstract space, representing countless small sub-models (Orseau et al 2020⁠) interpolating over data⁠, one of which is likely to solve the problem well, and so ensures the problem is soluble by the overall model. They function as an ensemble: even though there are countless overfit sub-models inside the single big model, they all average out, leading to a preference for simple solutions. This Occam’s razor biases the model towards simple solutions which are flexible enough to gradually expand in complexity to match the data.\nHowever, “neural nets are lazy”: sub-models which memorize pieces of the data, or latch onto superficial features, learn quickest and are the easiest to represent internally. If the model & data & compute are not big or varied enough, the optimization, by the end of the cursory training, will have only led to a sub-model which achieves a low loss but missed important pieces of the desired solution.\nOn the other hand, for a model like GPT-3, it is sufficiently powerful a model that its sub-models can do anything from poetry to arithmetic, and it is trained on so much data that those superficial models may do well early on, but gradually fall behind more abstract models; a sub-model which memorizes some of the data is indeed much simpler than a sub-model which encodes genuine arithmetic (a NN can probably memorize tens of thousands of lookup table entries storing examples of addition in the space it would take to encode an abstract algorithm like ‘addition’), but it can’t possibly memorize all the instances of arithmetic (implicit or explicit) in GPT-3’s Internet-scale dataset. If a memorizing sub-model tried to do so, it would become extremely large and penalized. Eventually, after enough examples and enough updates, there may be a phase transition (⁠Viering & Loog 2021⁠), and the simplest ‘arithmetic’ model which accurately predicts the data just is arithmetic. And then the meta-learning, after seeing enough instances of algorithms which vary slightly within each sample, making it hard to learn each task separately, just is learning of more generic algorithms, yielding sub-models which achieve lower loss than the rival sub-models, which either fail to predict well or bloat unacceptably. (GPT-2-1.5b apparently was too small or shallow to ensemble easily over sub-models encoding meta-learning algorithms, or perhaps not trained long enough on enough data to locate the meta-learner models; GPT-3 was.)\nSo, the larger the model, the better, if there is enough data & compute to push it past the easy convenient sub-models and into the sub-models which express desirable traits like generalizing, factorizing perception into meaningful latent dimensions, meta-learning tasks based on descriptions, learning causal reasoning & logic, and so on. If the ingredients are there, it’s going to happen.\nScaling Hypothesis\nThe strong scaling hypothesis is that, once we find a scalable architecture like self-attention or convolutions, which like the brain can be applied fairly uniformly (eg. “The Brain as a Universal Learning Machine”⁠ or Hawkins), we can simply train ever larger NNs and ever more sophisticated behavior will emerge naturally as the easiest way to optimize for all the tasks & data. More powerful NNs are ‘just’ scaled-up weak NNs, in much the same way that human brains look much like scaled-up primate brains⁠.\nWhile I was highly skeptical of scaling hypothesis advocates when I first became interested in AI 2004–6201016ya (back when AI was stuck in the doldrums of hopelessly narrow tools and dates like 2028 seemed impossibly far away), which smacked of numerology and “if you build it they will come” logic (at the time, we certainly didn’t have general algorithms that you could just throw compute at), in 2020, I have to admit, I was wrong and they were right. We built the compute, and the algorithms did come, and the scaling hypothesis has only looked more and more plausible every year since 201016ya.\nWhy Does Pretraining Work?\nThe pretraining thesis goes something like this:\n“Figure 1: Envisioned evolution of NLP research through three different eras or curves” (the hypothetical S-curves & progress in natural language modeling; from Cambria & White 2014⁠)\nHumans, one might say, are the cyanobacteria of AI⁠: we constantly emit large amounts of structured data, which implicitly rely on logic, causality, object permanence, history—all of that good stuff. All of that is implicit and encoded into our writings and videos and ‘data exhaust’. A model learning to predict must learn to understand all of that to get the best performance; as it predicts the easy things which are mere statistical pattern-matching, what’s left are the hard things. AI critics often say that the long tail of scenarios for tasks like self-driving cars or natural language can only be solved by true generalization & reasoning; it follows then that if models solve the long tail, they must learn to generalize & reason.\nEarly on in training, a model learns the crudest levels: that some letters like ‘e’ are more frequent than others like ‘z’, that every 5 characters or so there is a space, and so on. It goes from predicted uniformly-distributed bytes to what looks like Base-60 encoding—alphanumeric gibberish. As crude as this may be, it’s enough to make quite a bit of absolute progress: a random predictor needs 8 bits to ‘predict’ a byte/character, but just by at least matching letter and space frequencies, it can almost halve its error to around 5 bits.⁠⁠16⁠ Because it is learning so much from every character, and because the learned frequencies are simple, it can happen so fast that if one is not logging samples frequently, one might not even observe the improvement.\nAs training progresses, the task becomes more difficult. Now it begins to learn what words actually exist and do not exist. It doesn’t know anything about meaning, but at least now when it’s asked to predict the second half of a word, it can actually do that to some degree, saving it a few more bits. This takes a while because any specific instance will show up only occasionally: a word may not appear in a dozen samples, and there are many thousands of words to learn. With some more work, it has learned that punctuation, pluralization, possessives are all things that exist. Put that together, and it may have progressed again, all the way down to 3–4 bits error per character! (While the progress is gratifyingly fast, it’s still all gibberish, though, makes no mistake: a sample may be spelled correctly, but it doesn’t make even a bit of sense.)\nBut once a model has learned a good English vocabulary and correct formatting/spelling, what’s next? There’s not much juice left in predicting within-words. The next thing is picking up associations among words. What words tend to come first? What words ‘cluster’ and are often used nearby each other? Nautical terms tend to get used a lot with each other in sea stories, and likewise Bible passages, or American history Wikipedia article, and so on. If the word “Jefferson” is the last word, then “Washington” may not be far away, and it should hedge its bets on predicting that ‘W’ is the next character, and then if it shows up, go all-in on “ashington”. Such bag-of-words approaches still predict badly, but now we’re down to perhaps <3 bits per character.\nWhat next? Does it stop there? Not if there is enough data and the earlier stuff like learning English vocab doesn’t hem the model in by using up its learning ability. Gradually, other words like “President” or “general” or “after” begin to show the model subtle correlations: “Jefferson was President after…” With many such passages, the word “after” begins to serve a use in predicting the next word, and then the use can be broadened.\nBy this point, the loss is perhaps 2 bits: every additional 0.1 bit decrease comes at a steeper cost and takes more time. However, now the sentences have started to make sense. A sentence like “Jefferson was President after Washington” does in fact mean something (and if occasionally we sample “Washington was President after Jefferson”, well, what do you expect from such an un-converged model). Jarring errors will immediately jostle us out of any illusion about the model’s understanding, and so training continues. (Around here, Markov chain & n-gram models start to fall behind; they can memorize increasingly large chunks of the training corpus, but they can’t solve increasingly critical syntactic tasks like balancing parentheses or quotes, much less start to ascend from syntax to semantics.)\nNow training is hard. Even subtler aspects of language must be modeled, such as keeping pronouns consistent. This is hard in part because the model’s errors are becoming rare, and because the relevant pieces of text are increasingly distant and ‘long-range’. As it makes progress, the absolute size of errors shrinks dramatically. Consider the case of associating names with gender pronouns: the difference between “Janelle ate some ice cream, because he likes sweet things like ice cream” and “Janelle ate some ice cream, because she likes sweet things like ice cream” is one no human could fail to notice, and yet, it is a difference of a single letter. If we compared two models, one of which didn’t understand gender pronouns at all and guessed ‘he’/‘she’ purely at random, and one which understood them perfectly and always guessed ‘she’, the second model would attain a lower average error of barely <0.02 bits per character!\nNevertheless, as training continues, these problems and more, like imitating genres, get solved, and eventually at a loss of 1–2 (where a small char-RNN might converge on a small corpus like Shakespeare or some Project Gutenberg ebooks), we will finally get samples that sound human—at least, for a few sentences. These final samples may convince us briefly, but, aside from issues like repetition loops, even with good samples, the errors accumulate: a sample will state that someone is “alive” and then 10 sentences later, use the word “dead”, or it will digress into an irrelevant argument instead of the expected next argument, or someone will do something physically improbable, or it may just continue for a while without seeming to get anywhere.\nAll of these errors are far less than <0.02 bits per character; we are now talking not hundredths of bits per characters but less than ten-thousandths.\nThe pretraining thesis argues that this can go even further: we can compare this performance directly with humans doing the same objective task, who can achieve closer to ⁠0.7 bits per character⁠. What is in that missing >0.4?\n“Yeah, but there’s more to being smart than knowing compression schemes!” “No there’s not!” “Shoot—he knows the secret!!”\nWell—everything! Everything that the model misses. While just babbling random words was good enough at the beginning, at the end, it needs to be able to reason our way through the most difficult textual scenarios requiring causality or commonsense reasoning. Every error where the model predicts that ice cream put in a freezer will “melt” rather than “freeze”, every case where the model can’t keep straight whether a person is alive or dead, every time that the model chooses a word that doesn’t help build somehow towards the ultimate conclusion of an ‘essay’, every time that it lacks the theory of mind to compress novel scenes describing the Machiavellian scheming of a dozen individuals at dinner jockeying for power as they talk, every use of logic or abstraction or instructions or Q&A where the model is befuddled and needs more bits to cover up for its mistake where a human would think, understand, and predict. For a language model, the truth is that which keeps on predicting well—because truth is one and error many. Each of these cognitive breakthroughs allows ever so slightly better prediction of a few relevant texts; nothing less than true understanding will suffice for ideal prediction.\nIf we trained a model which reached that loss of <0.7, which could predict text indistinguishable from a human, whether in a dialogue or quizzed about ice cream or being tested on SAT analogies or tutored in mathematics, if for every string the model did just as good a job of predicting the next character as you could do, how could we say that it doesn’t truly understand everything? (If nothing else, we could, by definition, replace humans in any kind of text-writing job!)\nThe last bits are deepest. The implication here is that the final few bits are the most valuable bits, which require the most of what we think of as intelligence. Collobert et al 2011⁠:\nShannon 1951 has estimated the entropy of the English language 0.6–1.3 bits per character by asking human subjects to guess upcoming characters….⁠Teahan & Cleary 1996 obtain entropies as low as 1.46 bits per character using variable length character n-grams. The human subjects rely of course on all their knowledge of the language and of the world.\nCan we learn the grammatical structure of the English language and the nature of the world by leveraging the 0.2 bits per character that separate human subjects from simple n-gram models?\nA helpful analogy here might be our actions: for the most part, all humans execute actions equally well. We all pick up a tea mug without dropping, and can lift our legs to walk down thousands of steps without falling even once. For everyday actions (the sort which make up most of a corpus), anybody, of any intelligence, can get enough practice & feedback to do them quite well, learning individual algorithms to solve each class of problems extremely well, in isolation.⁠⁠17⁠ Meanwhile for rare problems, there may be too few instances to do any better than memorize the answer. In the middle of the spectrum are problems which are similar but not too similar to other problems; these are the sorts of problem which reward flexible meta-learning and generalization, and many intermediate problems may be necessary to elicit those capabilities⁠ (“neural nets are lazy”).\nWhere individuals differ is when they start running into the long tail of novel choices, rare choices, choices that take seconds but unfold over a lifetime, choices where we will never get any feedback (like after our death). One only has to make a single bad decision, out of a lifetime of millions of discrete decisions, to wind up in jail or dead. A small absolute average improvement in decision quality, if it is in those decisions, may be far more important than its quantity indicates, and give us some intuition for why those last bits are the hardest/deepest. (Why do humans have such large brains, when animals like chimpanzees do so many ordinary activities seemingly as well with a fraction of the expense? Why is language worthwhile? Perhaps because of considerations like these. We may be at our most human while filling out the paperwork for life insurance.)\nReasons for doubt. The pretraining thesis, while logically impeccable—how is a model supposed to solve all possible trick questions without understanding, just guessing?—never struck me as convincing, an argument admitting neither confutation nor conviction. It feels too much like a magic trick: “here’s some information theory, here’s a human benchmark, here’s how we can encode all tasks as a sequence prediction problem, hey presto—Intelligence!” There are lots of algorithms which are Turing-complete or ‘universal’ in some sense; there are lots of algorithms like AIXI which solve AI in some theoretical sense (Schmidhuber & company have many of these cute algorithms such as ‘the fastest possible algorithm for all problems’, with the minor catch of some constant factors which require computers bigger than the universe).\nWhy think pretraining or sequence modeling is not another one of them? Sure, if the model got a low enough loss, it’d have to be intelligent, but how could you prove that would happen in practice? (Training char-RNNs was fun, but they hadn’t exactly revolutionized deep learning.) It might require more text than exists, countless petabytes of data for all of those subtle factors like logical reasoning to represent enough training signal, amidst all the noise and distractors, to train a model. Or maybe your models are too small to do more than absorb the simple surface-level signals, and you would have to scale them 100 orders of magnitude for it to work, because the scaling curves didn’t cooperate. Or maybe your models are fundamentally broken, and stuff like abstraction require an entirely different architecture to work at all, and whatever you do, your current models will saturate at poor performance. Or it’ll train, but it’ll spend all its time trying to improve the surface-level modeling, absorbing more and more literal data and facts without ever ascending to the higher planes of cognition as planned. Or…\n‘The possibilities of developing an atomic weapon and the desirability of doing it secretly were discussed at a Princeton University conference in which I participated in March 193987ya…Bohr⁠ said this rare variety could not be separated from common uranium except by turning the country into a gigantic factory. Bohr was worried that this could be done and that an atomic bomb could be developed—but he hoped that neither could be accomplished. Years later, when Bohr came to Los Alamos, I was prepared to say, “You see . . .” But before I could open my mouth, he said: “You see, I told you it couldn’t be done without turning the whole country into a factory. You have done just that.”’\nEdward Teller⁠⁠⁠18⁠\nBut apparently, it would’ve worked fine. Even RNNs probably would’ve worked—Transformers are nice, but they seem mostly be about efficiency.⁠⁠19⁠ (Training large RNNs is much more expensive, and doing BPTT over multiple nodes is much harder engineering-wise.) It just required more compute & data than anyone was willing to risk on it until a few true-believers were able to get their hands on a few million dollars of compute.\nQ: Did anyone predict, quantitatively, that this would happen where it did?\nA: Not that I know of.\nQ: What would future scaled-up models learn?\nGPT-2-1.5b had a cross-entropy WebText validation loss of ~3.3 (based on the perplexity of ~10 in ⁠Figure 4⁠, and log2(10) = 3.32). GPT-3 halved that loss to ~1.73 judging from ⁠Brown et al 2020⁠ and using the scaling formula (2.57 × (3.64 × 103)−0.048). For a hypothetical GPT-4, if the scaling curve continues for another 3 orders or so of compute (100–1000×) before crossing over and hitting harder diminishing returns, the cross-entropy loss will drop to ~1.24 (2.57 × (3.64 × (103 × 103))−0.048).\nIf GPT-3 gained so much meta-learning and world knowledge by dropping its absolute loss ~50% when starting from GPT-2’s level, what capabilities would another ~30% improvement over GPT-3 gain? (Cutting the loss that much would still not reach human-level, as far as I can tell.⁠⁠20⁠) What would a drop to ≤1, perhaps using wider context windows or recurrency, gain?\nA: I don’t know.\nQ: Does anyone?\nA: Not that I know of.⁠⁠21⁠\nProspects\nIn the problem of decoding, the most important information which we can possess is the knowledge that the message which we are reading is not gibberish…In a similar way, when we consider a problem of nature such as that of atomic reactions and atomic explosives, the largest single item of information which we can make public is that they exist. Once a scientist attacks a problem which he knows to have an answer, his entire attitude is changed. He is already some 50% of his way toward that answer…the one secret concerning the atomic bomb which might have been kept and which was given to the public and to all potential enemies without the least inhibition, was that of the possibility on its construction. Take a problem of this importance and assure the scientific world that it has an answer; then both the intellectual ability of the scientists and the existing laboratory facilities are so widely distributed that the quasi-independent realization of the task will be a matter of merely a few years anywhere in the world.\nNorbert Wiener⁠, pg124–125, The Human Use of Human Beings⁠ (emphasis added)\nPeople who work in machine learning simply didn’t think that neural networks could do much. People didn’t believe large neural networks could be trained…The ideas were all there, the thing that was missing was a lot of supervised data and a lot of compute. Once you have [those two], then there is a third thing is that is needed—and that is conviction. Conviction that if you take the right stuff, which already exists, and apply and mix it with a lot of data and a lot of compute, that it will in fact work. And so that was the missing piece.\n⁠Ilya Sutskever⁠⁠⁠22⁠\nWhat can we expect from future DL work? Will GPT-3 kickstart an arms race where soon we will be discussing, blasé, what would seem now like ludicrously farfetched schemes like bidirectional multimodal Transformer 100× the size trained on 100× the data (video/text/PDFs-as-images/photo/robotics) with supplementary supervised learning as the backbone of a MuZero-like learning+planning DRL agent running on thousands of tasks (such as coding) simultaneously? [Roughly, yes. —Editor 2025-10-19]\nThe existence of the hardware overhang⁠ implies that the limiting factor here is less hardware than human: will any organization treat GPT-3 as a Sputnik moment and invest aggressively in scaling programs? Is there a GPT-4-equivalent brewing away inside DeepMind or Google Brain’s TPU pods now? They aren’t stupid, they have the hardware, they have the budgets, they have the people.\nBut I think they lack a vision. As far as I can tell: they do not have any such thing, because Google Brain & DeepMind do not believe in the scaling hypothesis the way that Sutskever, Amodei and others at OA do. Just read through machine learning Twitter to see the disdain for the scaling hypothesis. (A quarter year on from GPT-3 and counting, can you name a single dense model as large as the 17b Turing-NLG—never mind larger than GPT-3?)\nGoogle Brain is entirely too practical and short-term focused to dabble in such esoteric & expensive speculation, although Quoc V. Le’s group occasionally surprises you. They’ll dabble in mixture-of-expert models⁠ like GShard⁠, but mostly because they expect to be likely to be able to deploy it or something like it to production in Google Translate.⁠⁠23⁠\nWhy didn’t DeepMind do GPT-3?⁠ DeepMind⁠⁠24⁠ holds what we might call the “weak scaling hypothesis”: they believe that AGI will require us to “find the right algorithms” effectively replicating a mammalian brain module by module, and that while these modules will be extremely large & expensive by contemporary standards (which is why compute is important, to give us “a more powerful tool with which to hunt for the right algorithms”), they still need to be invented & finetuned piece by piece, with little risk or surprise until the final assembly. Each piece, however, itself can scale: there’s no magical intelligence gland or quantum woo which creates a bright line between humans and, say, chimpanzees or rodents. (As much as we humans extravagantly admire our own capabilities like language or logic, those are relatively minor flourishes on the basic brain—each organism solves the same basic problems, like exploration, long-term memory, learning world-models, associating rewards with specific actions, meta-learning, etc.) As such, once you have a rat-level AGI, a human-level AGI is just more so. (And rats are a lot easier to experiment on.) That is how you get DM contraptions like Agent57⁠ which throw the kitchen sink at the wall to see what sticks, and why they place such emphasis on neuroscience as inspiration and cross-fertilization for reverse-engineering the brain. (See also Sam Altman’s ⁠podcast interview comments⁠ on OA’s advantage vs unnamed rivals with more compute is because the lack of compute makes them stay “small and focused”—“for sure” like a startup approach.) When someone seems to have come up with a scalable architecture for cracking a hard problem, like AlphaZero or AlphaStar, they are willing to pour on the gas to make it scale, but otherwise, incremental refinement on ALE and then DMLab-30⁠ is the game plan. They have been biting off and chewing pieces of the brain for a decade, and it’ll probably take another decade or two of steady chewing if all goes well. Because they have locked up so much talent and have so much proprietary code and believe all of that is a major moat to any competitor trying to replicate the complicated brain, they are fairly easygoing. You will not see DM ‘bet the company’ on any moonshot; Google’s cashflow isn’t going anywhere (and ⁠DM’s budget⁠), and slow and steady wins the race.\nGoing beyond that, most other research labs like Tesla or FAIR are irrelevant and uninterested. Chinese AI companies are a question mark: past the language barrier, I seem to discern interest in AGI & little of the reflexive Western opposition, and companies like Baidu occasionally release important research (such as the early scaling paper Hestness et al 2017⁠), but overall, Chinese AI may be overestimated, and they seem to suffer from a kind of Dutch disease—funding for surveillance technology, and for narrow e-commerce niches, is so plentiful that other areas are neglected.\nOA, lacking anything like DM’s long-term funding from Google or its enormous headcount, is making a startup-like bet that they know an important truth which is a secret: “the scaling hypothesis is true!” So, simple DRL algorithms like PPO on top of large simple architectures like RNNs or Transformers can emerge, exploiting the blessings of scale, and meta-learn their way to powerful capabilities, enabling further funding for still more compute & scaling, in a virtuous cycle. This is why OA had to revise its corporate form: lacking any enormous endowment or extremely deep-pocketed patron like Google, where does it get the money to scale (or hire machine learning engineer/researchers who can command salaries in the millions)? OA has to earn the necessary money, so in a move like Mozilla Foundation owning Mozilla Corporation (to sell Firefox search engine placement), or the Hershey orphanage owning Hershey Chocolate or the Girl Scouts licensing their cookies, OpenAI switched from a pure nonprofit funded by donations to a nonprofit which owns a for-profit subsidiary/startup, “OpenAI LP”, which can take investments and engage in for-profit activities. OA LP, while controlled by OA, can then shoot for the moon. And if OA is wrong to trust in the God of Straight Lines On Graphs⁠, well, they never could compete with DM directly using DM’s favored approach, and were always going to be an also-ran footnote, so they have no regret.\nWhile all of this hypothetically can be replicated relatively easily (never underestimate the amount of tweaking and special sauce it takes) by competitors if they wished (the necessary amounts of compute budgets are still trivial in terms of Big Science or other investments like AlphaGo or AlphaStar or Waymo, after all), said competitors lack the very most important thing, which no amount of money or GPUs can ever cure: the courage of their convictions. They are too hidebound and deeply philosophically wrong to ever admit fault and try to overtake OA until it’s too late. How can we talk seriously about any kind of military Manhattan Project when the US military ⁠doesn’t even let its developers use Tensorflow or PyTorch⁠, or about government projects in the shadow of coronavirus? This might seem absurd (surely the Bitter Lesson/scaling hypothesis have now earned enough prior probability to be taken seriously and receive major research investments to test how far they can go, especially given how important the implications are), but look at the repeated criticism of OA every time they release a new example of the scaling hypothesis, from GPT-1 to Dactyl to OA5 to GPT-2 to iGPT to GPT-3… To paraphrase St Augustine, most peoples’ reaction to the Bitter Lesson or scaling hypothesis is “grant me scale & compute—but not yet”.⁠⁠25⁠\nA critical indicator will be whether organizations beyond ‘the usual suspects’ (Microsoft ZeRO-2⁠ team has reached 1t-scale training⁠, but there is also Nvidia, Salesforce, Allen, Google DM/GB, Connor/EleutherAI, Facebook FAIR) start participating or if they continue to dismiss scaling. At least as of 2020-10-26, 152 days later, no model has come near GPT-3, and indeed, no model has even exceeded Turing-NLG’s 17b.⁠⁠26⁠\nCritiquing The Critics\nKeeping trackHindsight is 20⁄20Authority without accountabilityPhatic, not predictiveThe iron law of bureaucracy: Cathedral gothic\nKeeping track. GPT-3 in 2020 makes as good a point as any to take a look back on the past decade. It’s remarkable to reflect that someone who started a PhD because they were excited by these new “ResNets” would still not have finished it by now—that is how recent even resnets are, never mind Transformers, and how rapid the pace of progress is. In 201016ya, one could easily fit everyone in the world who genuinely believed in deep learning into a moderate-sized conference room (assisted slightly by the fact that 3 of them were busy founding DeepMind⁠). Someone interested in machine learning in 201016ya might have read about some interesting stuff from weirdo diehard connectionists in recognizing hand-written digits using all of 1–2 million parameters, or some modest neural tweaks to standard voice-recognition hidden Markov models. In 201016ya, who would have predicted that over the next 10 years, deep learning would undergo a Cambrian explosion causing a mass extinction of alternative approaches throughout machine learning, that models would scale up to 175,000 million parameters, and that these enormous models would just spontaneously develop all these capabilities?\nNo one. That is, no one aside from a few diehard connectionists written off as willfully-deluded old-school fanatics by the rest of the AI community (never mind the world), such as Moravec, Schmidhuber, ⁠Sutskever⁠, Legg, & Amodei.\nOne of the more shocking things about looking back is realizing how unsurprising and easily predicted all of this was if you listened to the right people. In 199828ya, 22 years ago, Moravec noted that AI research could be deceptive, and hardware limits meant that “intelligent machine research did not make steady progress in its first 50 years, it marked time for 30 of them!”, predicting that as Moore’s law continued, “things will go much faster in the next 50 years than they have in the last 50.” Moravec further observed that part of the reason for rapid progress was the hardware overhang: while supercomputers of the necessary power would exist long before the connectionist revolution began, no one would be allowed to use them⁠⁠27⁠, as they would be devoted to ‘more important’ (prestigious) hard STEM work, like “physics simulations” (ie. climate simulations & nuclear bombs)⁠⁠28⁠, and “AI research must wait for the power to become more affordable.” Affordable meaning a workstation roughly ~$2,229$1k1998; sufficiently cheap compute to rival a human would arrive sometime in the 2020s, with the 2010s seeing affordable systems in the lizard–mouse range. As it happens, the start of the DL revolution is typically dated to AlexNet⁠ in 201214ya, by a grad student⁠⁠29⁠ using 2 GTX 580 3GB GPUs (launch list price of… $789$5002010, for a system build cost of perhaps $2,285$1,5002012). 2020 saw GPT-3 arrive, and as discussed before, there are many reasons to expect the cost to fall, in addition to the large hardware compute gains that are being forecast for the 2020s despite the general deceleration of Moore’s law.⁠⁠30⁠\nThe accelerating pace of the last 10 years should wake anyone from their dogmatic slumber and make them sit upright. It turned out, it’s Hans Moravec’s world, and the rest of us were just living in a fool’s paradise. And there are 28 years left in Moravec’s forecast…\nThe temptation, that many do not resist so much as revel in, is to give in to a déformation professionnelle and dismiss any model as “just” this or that(“just billions of IF statements” or “just a bunch of multiplications” or “just millions of memorized web pages”), missing the forest for the trees, as Moravec commented of chess engines:\nThe event was notable for many reasons, but one especially is of interest here. Several times during both matches, Kasparov reported signs of mind in the machine. At times in the second tournament, he worried there might be humans behind the scenes, feeding Deep Blue strategic insights!…In all other chess computers, he reports a mechanical predictability stemming from their undiscriminating but limited lookahead, and absence of long-term strategy. In Deep Blue, to his consternation, he saw instead an “alien intelligence.”\n…Deep Blue’s creators know its quantitative superiority over other chess machines intimately, but lack the chess understanding to share Kasparov’s deep appreciation of the difference in the quality of its play. I think this dichotomy will show up increasingly in coming years. Engineers who know the mechanism of advanced robots most intimately will be the last to admit they have real minds. From the inside, robots will indisputably be machines, acting according to mechanical principles, however elaborately layered. Only on the outside, where they can be appreciated as a whole, will the impression of intelligence emerge. A human brain, too, does not exhibit the intelligence under a neurobiologist’s microscope that it does participating in a lively conversation.\nBut of course, if we ever succeed in AI, or in reductionism in general, it must be by reducing Y to ‘just X’. Showing that some task requiring intelligence can be solved by a well-defined algorithm with no ‘intelligence’ is precisely what success must look like! (Otherwise, the question has been thoroughly begged & the problem has only been pushed elsewhere; computer chips are made of transistors, not especially tiny homunculi.)\nAs long as the AI [OA5] can explore, it will learn, given enough time…We just kept waiting for the magic to run out. We kept waiting to hit a wall, and we never seemed to hit a wall.\nGreg Brockman⁠\nGive it the compute, give it the data, and it will do amazing things. This stuff is like—it’s like alchemy!\nIlya Sutskever⁠, summer 2019\nHindsight is 20⁄20. Even in 201511ya, ⁠all the experts⁠ assured us that AGI the scaling hypothesis seemed highly dubious: you needed something to scale, after all, and it was all too easy to look at flaws in existing systems and imagine that they would never go away and progress would sigmoid any month now, soon. Like the genomics revolution where a few far-sighted seers extrapolated that the necessary n for GWASes would increase exponentially & deliver powerful PGSes soon, while sober experts wrung their hands over “missing heritability” & the miraculous complexity of biology & scoff about how such n requirements proved GWAS was a failed paradigm, the future arrived at first slowly and then quickly. Yet, here we are: all honor to the fanatics, shame and humiliation to the critics!⁠⁠31⁠ If only one could go back 10 years, or even 5, to watch every AI researchers’ head explode reading this paper… Unfortunately, few heads appear to be exploding now, because human capacity for hindsight & excuses is boundless (“I can get that much with finetuning, anyway I predicted it all along, how boring”) and, unfortunately, “there is no fire alarm”⁠ for AGI. (If you are still certain that there is near-zero probability of AGI in the next few decades, why? Did you predict—in writing—capabilities like GPT-3? Is this how you expect AI failure to look in the decades beforehand? What specific task, what specific number, would convince you otherwise? How would the world look different than it does now if these crude prototype insect-brain-sized DL systems were not on a path to success?)\nAuthority without accountability. What should we think about the experts? Projections of failure were made by eminent, respectable, serious people. They spoke in considered tones of why AI hype was excessive and might trigger an “AI winter”, and the fundamental flaws of fashionable approaches and why brute force could not work. These statements were made routinely in 201412ya, 201511ya, 2016… And they were wrong. I am aware of few issuing a mea culpa or reflecting on it.⁠⁠32⁠ It is a puzzling failure, and I’ve ⁠reflected on it before⁠.\nPhatic, not predictive. There is, however, a certain tone of voice the bien pensant all speak in, whose sound is the same whether right or wrong; a tone shared with many statements in January to March of this year; a tone we can also find in a 194086ya Scientific American article authoritatively titled, “Don’t Worry—It Can’t Happen”⁠, which advised the reader to not be concerned about it any longer “and get sleep”. (‘It’ was the atomic bomb, about which certain scientists had stopped talking, raising public concerns; not only could it happen, the British bomb project had already begun, and 5 years later it did happen.)\nThe iron law of bureaucracy: Cathedral gothic. This tone of voice is the voice of authority.\nThe voice of authority insists on calm, and people not “panicking” (the chief of sins).\nThe voice of authority assures you that it won’t happen (because it can’t happen).\nThe voice utters simple arguments about why the status quo will prevail, and considers only how the wild new idea could fail (and not all the possible options).\nThe voice is not, and does not deal in, uncertainty; things will either happen or they will not, and since it will not happen, there is no need to take any precautions (and you should not worry because it can’t happen).\nThe voice does not believe in drawing lines on graphs (it is rank numerology).\nThe voice does not issue any numerical predictions (which could be falsified).\nThe voice will not share its source code (for complicated reasons which cannot be explained to the laity).\nThe voice is opposed to unethical things like randomized experiments on volunteers (but will overlook the insult).\nThe voice does not have a model of the future (because a model implies it does not already know the future).\nThe voice is concerned about its public image (and unkind gossip about it by other speakers of the voice).\nThe voice is always sober, respectable, and credentialed (the voice would be pleased to write an op-ed for your national magazine and/or newspaper).\nThe voice speaks, and is not spoken to (you cannot ask the voice what objective fact would change its mind).\nThe voice never changes its mind (until it does).\nThe voice is never surprised by events in the world (only disappointed).\nThe voice advises you to go back to sleep (right now).\nWhen someone speaks about future possibilities, what is the tone of their voice?\nAppendix\nIt From Byte\nPow­er­ful gen­er­a­tive mod­els like GPT-3 learn to im­i­tate agents and thus be­come agents when prompted ap­pro­pri­ately. This is an in­evitable con­se­quence of train­ing on huge amounts of human-generated data. This can be a prob­lem.\nIs human data (or moral equiv­a­lents like DRL agents) nec­es­sary, and other kinds of data, such as physics data, free of this prob­lem? (And so a safety strat­egy of fil­ter­ing data could re­duce or elim­i­nate hid­den agency.)\nI argue no: agency is not dis­crete or im­ma­te­r­ial, but an or­di­nary con­tin­uum of ca­pa­bil­ity, use­ful to a gen­er­a­tive model in many con­texts be­yond those nar­rowly de­fined as ‘agents’, such as in the “in­ten­tional stance” or vari­a­tional ap­proaches to solv­ing physics prob­lems. Much like other DRL-elicited ca­pa­bil­i­ties⁠ like meta-learning, mem­ory, ex­plo­ration, or rea­son­ing, ‘agency’ is a use­ful tool for a large fam­ily of prob­lems, and a pow­er­ful model ap­plied to that fam­ily may, at some point, de­velop con­cepts of agency or the­ory of mind etc.\nThus, a very wide range of prob­lems, at scale, may sur­pris­ingly in­duce emer­gent agency.\nI have previously argued that GPT-3 clearly shows agency because it is doing offline imitation learning (behavioral cloning, specifically) from the human-generated text data, and so it learns generative models of many agents, real or fictional. These generative models offer agentic capabilities, because they can be used to prompt the model to ⁠‘roleplay’⁠—plan & take action which will steer environments into small goal regions of state-space; and this is not merely hypothetical, or confined to text transcripts of actions & results in its internal simulated environments, but given effectors, like in the case of SayCan⁠, a language model will in fact do such things in the real world.\nThat such systems may never have ‘experienced the real world’ or been trained deliberately on exact action sequences of malicious agents doesn’t mean that they cannot generalize or imitate. A sufficiently accurate simulation of an agent just is an agent. (One can set up a prompt for GPT-3 to imitate Adolf Hitler and ask him how to regain power & resume exterminating the Jews and get back a semi-coherent high-level plan; this is unfortunate, and the simulacra need not even be of a real person—evil fictional characters plan evil things just as easily, because it’s not hard to imagine what horrible things they would want to do.) This doesn’t seem all that different from accepted instances of reinforcement learning, like behavior learning or offline reinforcement learning: if you train on data from agents, whether humans or logged data from DRL agents, then the question is “how would you not learn from all these examples how to act & be capable of pursuing goals?” Presumably you would not only if you were a stupid model, too small or given too little data.\nIf these are not ‘agents’, I don’t know what “really” is an agent; or at least if critics insist on some sort of definition of ‘agent’ which excludes these, I think perhaps we should then abandon the word ‘agent’ entirely—because if giving a SayCan robot an instruction to ‘fetch a can of Coke and bring it to me’, with it using image inputs to construct step-by-step plans to find, possess, and return with the can, and successfully doing so often in real life on a real robot, does not count as an ‘agent’, then we need a word for such non-agent systems, so we can discuss their non-agency dangers. (If we define them as sub-agents because of lack of appendages and thus define all models as harmless non-agents, this is an unacceptable equivocation given the extreme carelessness and insouciance people display in hooking up their models the first chance they get to humans, APIs, search engines, or robots—hardly had the OpenAI GPT-3 API been launched in July 2020 than people were showing off using its basic HTML/CSS/JS abilities to drive web browsers, and large LM model developers like LaMDA or Adept display an unseemly eagerness to let it query arbitrary URLs without their paper even bothering to specify it was live. The AI box hadn’t even been invented before everyone decided to let their AI out of the box to be slightly more useful, as should come as no surprise—after all, tool AIs want to be agent AIs⁠.)\nBut one might wonder how far this logic goes: do we have agent AIs emerging from our tool AIs only because we trained them on so much agent-generated data? If we scrapped human text corpuses, full of text about humans planning and taking actions and obtaining goals, or video datasets stuffed full of agents doing stuff, and if we deleted image datasets as well because they are just snapshots of videos and depict agents & actions & environments full of traces of agency, would we then have a model which is now just a (relatively) safe ‘tool AI’, with no agency lurking?\nI would still say that there’s a possibility, and maybe not even that small one: agency is not a discrete thing, but a continuum, which is a convergent instrumental drive / emergent capability because it is useful even for understanding “non-agentic” things.\nAll Is Atoms & Void\nFirst, there cannot be any principled, hard-and-fast, necessary distinction between data which is ‘agentic’ and data which is merely ‘natural’. This is because there is no such distinction in reality either: all ‘agency’ is constructed of non-agentic bits like atoms. There is no agency-particle, no pineal gland granting access to ‘Genuine Decision-Making™’. An agentic human is made out of the same fundamental things as a clump of dust swirling in space, or rock, or a computer. It must be the case that one could, starting only from simulations of (possibly a lot of) atoms, nothing but the most raw physics equations and atoms & the void, and eventually recapitulate the history of the universe and observe things like the origin of life and humans. Thus, one turns non-agentic data (physics equations) into agentic data.\nOK, but barring a hypercomputer, that is unlikely to happen. If we consider realistic levels of compute, like contemporary NNs, trained on less-than-everything-in-the-universe & apparently harmless data like, say, the hydrology of rivers flowing downhill (eg. for flood prevention), or the trajectory of the solar system, surely none of that agency will evolve—no amount of modeling the chaotic dynamics of Pluto will give you any help in modeling the dynamics of astronomy infighting about whether Pluto is a planet, right?\nIntentional Interpretive Stance\nHere again I differ, and invoke Daniel Dennett’s⁠ intentional stance⁠. Humans do, in fact, model natural systems like these as agents. We find such teleological explanations indispensable for intuition and shortcut reasoning across many natural systems.\nVariational Interpretations\n⁠Janus comments⁠, apropos of their emphasis on what I might call a ‘world-modeling-centric’ intuition for GPT-3 vs my ‘agent-centric’ view that:\nFor example, Gwern has said that anyone who uses GPT for long enough begins to think of it as an agent who only cares about roleplaying a lot of roles. That framing seems unnatural to me, comparable to thinking of physics as an agent who only cares about evolving the universe accurately according to the laws of physics. At best, the agent is an epicycle; but it is also compatible with interpretations that generate dubious predictions.\nI embrace that description: it is in fact natural and not an elaborate epicycle on a geocentric model of the world, but rather, heliocentrism—powerful, and useful, and simpler. That it (also like heliocentrism⁠⁠33⁠) may feel counterintuitive is unfortunate, but its virtues are proven.\nWe err if an intentional stance leads us engage in the pathetic fallacy and say that the river-spirit wants to reunite with the ocean (and we must offer sacrifices lest the dikes breach), but we are correct when we say that the river tries to find the optimal path which minimizes its gravitational or free energy⁠. It is both true, predictively useful, and mathematically equivalent to the other way of formulating it, in terms of ‘forward’ processes computing step by step, atom by atom, and at the getting the same answer—but typically much easier to solve. (Ted Chiang’s “Story Of Your Life”⁠ tries to convey this perspective via fiction.) And this shortcut is a trick we can use universally, for everything from a river flowing downhill to the orbit of a planet to the path of photon through water minimizing travel time⁠ to evolutionary dynamics: instead of trying to understand it step by step, treat the system as a whole via the variational principle⁠ as ‘wanting’ to minimize (or maximize) some simple global quantity (a reward), and picking the sequence of actions that does so. (“The river wants to minimize its height, so without simulating it down to the individual water currents, I can look at the map and see that it should ‘choose’ to go left, then right, and then meander over this flat slightly-sloping part. Ah, looks like I was right.”) Then, into this modular trick, just plug in the system and quantity in question, and think like an agent…⁠⁠34⁠\nUh oh. ‘Predictively useful’, ‘shortcut’, ‘much easier’, ‘universally’—all properties a neural net loves. All natural to it. Why would it try to solve each heterogeneous problem with a separate, computationally-expensive, bag of tricks, when there’s one weird trick AI safety researchers hate, like adopting teleological and variational reasoning?\nInducing Emergence Is Expensive\nOf course, this frame can be more expensive than solving a problem directly. Variational approaches are powerful but counterintuitive, and there are often many simpler approximations or memorization that a model can do. For a single problem like modeling the orbit of Pluto, it is unlikely that any variational approach would be learned. Why would it, when there is only 1 system and 1 quantity minimized, so they can just be assumed? This is similar to other ⁠model capabilities induced by pretraining⁠: things like induction heads or meta-learning or counting or reasoning need to pay their way, and are not superior to alternatives right from the start. They need rich enough models to compute them feasibly, enough data to force them out of easier solutions (which will fail on a few rare datapoints), and enough training (to work through all the possibilities to converge on the better capabilities).\nWhat Can Induce Agency Emergence?\nUnfortunately, this is an empirical matter. How many datasets? How big is each dataset? How diverse do they have to be? What even is a ‘dataset’, since we can always lump or split it? We struggle to predict when a capability will develop in GPT-3, so we definitely can’t say a priori that “Pluto is safe to model, but then tossing in a few thousand exoplanet solar systems would begin to elicit a define-system/plug-in-reward/maximize module and bring back agency”.\nCellular Automatons\nIt would also be hard to say at all what mathematical or physical systems exhibit the right kinds of maximizing behavior which can be generalized to an intentional stance. Does the ultra-abstract & simple cellular automaton⁠ Conway’s Game of Life⁠ (GoL) induce an intentional stance?\nIt has no agents, no biology, no evolution in the usual sense—but it does have many small patterns which can be usefully chunked⁠ to help understand a specific GoL. Humans, of course, look at a GoL as a bunch of small entities like ‘gliders’, but a NN given randomly-initialized boards may also see the same thing, because most GoL patterns will die out or reach fixed-points like gliders⁠ or still-life⁠ patterns: it is simply simpler to chunk a large GoL board into a few ‘gliders’ wandering through ‘empty space’ interrupted by the occasional ‘still life’.\nAnd once you are talking about gliders wandering around unless they run into a still-life block which kills them, you are much of the way to an intentional stance—not modeling a glider as the inexorable outcome of applying this and that rule about the local-neighborhood to a million cells of equal importance, but as a specific entity of interest against an implicit & ignored background of dead cells, which will travel around and shoot off to infinity or meet its doom.\nSo, I wouldn’t want to bet too much on GoL being unable to induce any transfer.\nTuring Machine\nCan we go even broader? How about, not natural physics systems, nor specific abstractions of interest to humans (GoL is especially interesting among cellular automatons, and we ignore the large space of CA rules which define a CA but which does nothing interesting), but all Turing machines, let’s say random rules with some length-biased sample of random programs which we dovetail & treat available tapes as a sequence prediction problem. There is no more general computable setting, after all.\nSingle TM\nWould training on a random Turing machine risk the possibility of agency?\nMaybe not. For a single TM, this might foster some capabilities like instruction-following (for the same reason that pretraining on source code, especially source code augmented with state logs, is a powerful prior for many tasks), but it does not seem to have any of the traits that would induce agency. There is nothing that random TM programs try to minimize or maximize; they simply run. They don’t try to maximize run time length (terminating or non-terminating), or write as few or as many places on the tape as possible, or to achieve particular patterns. A model would simply learn the TM rules and attempt to approximate it as best as it can given its own limited feedforward neural net resources; eventually, if it can work iteratively or recurrently, it would learn the rules and generalize perfectly, and no further learning occurs. Classifying TM programs by whether they halt doesn’t help: yes, the Busy Beaver ‘wants’ to maximize something, but that’s just by definition as the longest terminating program, there are many more TM programs which are ‘happy’ to halt very quickly. So predicting halting status may learn things, but also still nothing that prima facie looks like agency.\nTM Meta-Learning\nThis might be due to there being only a single TM, making it analogous to training only on Pluto. Perhaps the right setting would be training over many TM rules (and programs within each one). This is what a researcher would be more interested in, since few TMs are of any intrinsic interest, nor do we know the One True Turing Machine™; we’d rather have a neural network which is learning to learn TMs, or meta-learning, and training a NN over many environments drawn from a distribution is the easiest way to induce meta-learning. So what if we trained a model to do sequence prediction of a random TM + random program, without reuse? If single random Turing machines are harmless, how about all of them?\nHm, well… It’s worth noting how Alan Turing introduced the Turing machine formalism: as a general setting in which a man read and executed sets of rules about how to mark up a paper tape. So even in the original formulation of computers as tools which merely do what they are programmed to do, we have a homunculus at the center! This homunculus could do (and given different instructions, would) anything to the tape, but he wants to follow the current set of instructions accurately, until he’s done. In each draw from the TM+program distribution, he is following a different set of instructions, and now the model is attempting to infer what he wants, to as quickly as possible begin predicting the sequence accurately by recomputing it.\nThis provides our modularity, and a particular computation executed, and strong optimization pressure to rapidly ‘read’ the history and infer what the new rules must be. That may not have a clean reward-maximizing interpretation, but it does sound a lot like what anyone does with an agent of any kind: the inverse reinforcement learning problem of inferring the reward function can be arbitrarily hard, and until we succeed at that, we instead infer local rules & patterns, which target particular outcomes (regions of state-space). You may not know why your neighbor does that weird thing he does, but you can infer that he will do it, and not another agent, not even his evil identical twin. Is inferring TM rules the simplest & most rudimentary possible ‘theory of mind’? Maybe. In which case, there is no escape from the possibility of agency anywhere.\nAmbient Agency\nAgency may be like Turing-completeness⁠: even in settings free of selection or optimization, it is a capability too useful and too convergent to guarantee its absence. The broader and more powerful a system is, the more the next feature or next piece of data may push it over the edge, and it becomes harder to engineer a system without that aspect.\nAgency can be learned from data generated by agents, who generate extremely selective data. Or if you carefully remove all that, it may come from the selection of non-human data. Or it may be implicit in the dynamics of a replicator system. Or it may be one of the countless physical systems which have such interpretations which are computationally more efficient and thus any NN which is optimized to balance realizable compute with accuracy will be pushed to such interpretations. Or it may be a good simplification of systems with macro-statistics where the detailed micro-state adds little. Or it may stem from simply meta-learning of rule induction on TMs, because agents may follow complex sets of policies which are learnable but the motivating reward-function is an under-determined blackbox.\nOr… like squashing Turing-completeness, as soon as one hole in the sinking ship is patched, you notice another leak spring up. You can’t keep a good idea down. All you can do is make a complex system that doesn’t display agency as far as you can tell; unfortunately, much like Turing-completeness (or security vulnerabilities), that there is no overt agency doesn’t mean it is not there. The model won’t tell you, it is just getting on with the job of lowering its loss. (“Sampling can show the presence of knowledge, but not the absence.”)\nI do not have any solutions to this, other than to advise yet again to abandon the seductive, convenient, but wrong idea that tool AIs (under any branding, be it ‘tool AIs’ or ‘physics generative models’ or ‘world simulators’), cannot or will not be agent AIs. They may well be, and the better they get, the more likely it is, and tampering with data is not a solution.\nGiven the number of comments on the paper’s arithmetic benchmark, I should point out that the arithmetic benchmark appears to greatly understate GPT-3’s abilities due to the BPE encoding issue⁠: even using commas markedly improves its 5-digit addition ability, for example. The BPE issue also appears to explain much of the poor performance on the anagram/shuffling tasks. This is something to keep in mind for any task which requires character-level manipulation or understanding.\nOn implicit ⁠meta-learning⁠, see: Santoro et al 2016⁠/Wang et al 2018⁠ (Botvinick commentary⁠)/Botvinick et al 2019a⁠, Clune 2019⁠, Schmidhuber 2015⁠/2018⁠, Weng 2018⁠/Weng 2019⁠.\nGPT-3 hardly costs more than a few million dollars of compute (as of early 2020) as the extensive scaling research beforehand enabled one training run, and it is cheap to run (pg39): “Even with the full GPT-3 175B, generating 100 pages of content from a trained model can cost on the order of 0.4 kW-hr, or only a few cents in energy costs.” (Likewise, T5 was trained only once⁠.) And for the cost of one model, GPT-3 API users have shown that you get the equivalent of hundreds of smaller special-purpose models, each requiring more researchers, custom datasets, countless training runs, and tinkering, assuming said models could be created at all. (A slogan for the future: “One model, one vector—once.”)\nFor comparison, the PDP-11⁠ was a common academic workhorse due to its extremely low cost, a mere $110,099$20k1970, while the first Lisp Machine⁠ cost >$258,956$50k1972—expensive for a workstation but a bargain compared to researchers hogging mainframes costing tens of millions. IBM’s (otherwise useless) Deep Blue AI project reputedly cost >$12$51997m for the final iteration (reports of $231$1001997m appear to be a confusion with the estimated value of publicity mentioned in pg187 of Hsu’s Behind Deep Blue) and Big Science projects like ITER⁠ blow >5000× the funding to mostly fail. (The particle physicists, incidentally, are back asking for⁠ ≫$30$242020b, based on, presumably the scientific revolutions & world-changing breakthroughs that the LHC’s >$14$92010b investment produced, or the $5.30$21993b spent to (not) build the SSC⁠…)\nGPT-3 could have been done decades ago with global computing resources & scientific budgets; what could be done with today’s hardware & budgets that we just don’t know or care to do? There is a hardware overhang. (See also the ⁠Whole Brain Emulation Roadmap⁠ & “2019 recent trends in GPU price per FLOPS”⁠.)\nFurther, NNs have additional hardware overhangs of their own due to the many orders of magnitude asymmetry of training vs running. Transfer learning and meta-learning are so much faster than the baseline model training. You can ‘train’ GPT-3 without even any gradient steps—just examples. You pay the extremely steep upfront cost of One Big Model to Rule Them All, and then reuse it everywhere at tiny marginal cost. If you train a model, then as soon as it’s done you get, among other things:\nthe ability to run thousands of copies in parallel on the same hardware\nin a context like AlphaGo, I estimate several hundred ELO strength gains if you reuse the same hardware to merely run tree search with exact copies of the original model\nmeta-learning/transfer-learning to any related domain, cutting training requirements by orders of magnitude\nmodel compression/distillation to train student models which are a fraction of the size, FLOPS, or latency (ratios varying widely based on task, approach, domain, acceptable performance degradation, targeted hardware etc., but often extreme like 1⁄100th)\nreuse of the model elsewhere to instantly power up other models (eg. use of text or image embeddings for a DRL agent)\nlearning-by-doing/experience curve effects⁠ (highest in information technologies, and high for DL: Hernandez & Brown 2020⁠), so the next from-scratch model may be much cheaper.\nFor example: after all the iterative model architecture & game upgrades done while training the first OpenAI Five⁠ (OA5) DoTA2 agent was completed, the second iteration of OA5, ⁠“Rerun”⁠, was trained from scratch. Rerun required only 20% of the training for a “98% win-rate against the final version of OpenAI Five.” As the authors note: “The ideal option would be to run Rerun-like training from the very start, but this is impossible—the OpenAI Five curve represents lessons learned that led to the final codebase, environment, etc., without which it would not be possible to train Rerun.”\nbaseline for engineering much more efficient ones by ablating and comparing with the original\neg. a narrow context window ⁠severely limits it⁠, and motivates the need for efficient attention⁠. More broadly, GPT-3 does nothing exotic—no use of brain imitation learning⁠ or neural architecture search to try to tailor the model, online hyperparameter optimization (possibly >3× speedup⁠) or even decide basic hyperparameters like widths (which as EfficientNet⁠ shows, can make quite a different even in “well-understood and hand-optimized vanilla architectures”).\nNot even PDFs—so no Google Books, no Arxiv, no Libgen, no Sci-Hub…\nGenerating text from a LM can reveal the presence of knowledge, but not its absence, and it is universally agreed that the current crude heuristic methods like top-k cannot possibly be optimal.\n‘A man is at the doctor’s office, and the doctor tells him, “I’ve got some good news and some bad news for you.” / The man says, “Well, I can’t take the bad news right now, so give me the good news first.” / The doctor says, “Well, the good news is that you have an 18-inch penis.” / The man looks stunned for a moment, and then asks, “What’s the bad news?” / The doctor says, “Your brain’s in your dick.”’\nIn particular, sample-efficiency increases with model size up to compute-efficient scaling, and GPT-2 can memorize data after seeing it only once⁠—a desirable property⁠ given long-tailed real-world distributions of data. (An example of how not to do scaling papers is Thompson et al 2020⁠, which, in stark contrast to the foregoing papers—which Thompson et al do not mention at all!—attempts to infer scaling not from well-controlled experiments run by the authors, which yield extremely tight and highly predictive curves, but attempts to infer them from occasional reported numbers in highly disparate research papers; unsurprisingly, their curves barely predict anything and seem to be serious overestimates anyway.)\nIt is noteworthy that the pursuit of large models is driven almost exclusively by OpenAI & industry entities (the latter of which are content with far smaller models), and that academia has evinced an almost total disinterest—disgust & anger, even, and denial (one might say “green AI” is green with envy). For all that the scaling hypothesis is ‘obvious’ and scaling is ‘predicted’, there is remarkably little interest in actually doing it. Perhaps we should pay more attention to what people do rather than what they say; and recall that successful academic communities produce questions, not answers.\nRoughly around Chuan Li’s estimate, using nominal list prices without discounts (which could be steep as the marginal costs of cloud compute are substantially lower). The R&D project cost would be much higher, but is amortized over all subsequent models & projects.\nThe Manhattan Project cost ~$28$21946b.\nOne is reminded of the joke about the customer complaining to the butcher:\n“Your meat is $10/lb, while your competitor across the street sells it at $1!” “So go buy his meat.” “I would, but he has none.” “When I don’t have any meat, it costs $1 too.”\nAs if we live in a world where grad students could go to the Moon on a ramen budget if we just wished hard enough, as if focusing on CO2 costs & not benefits in our evaluations is not like making a scissor with only one blade, or as if “green AI” approaches to try to create small models without going through big models did not look increasingly futile and like throwing good money after bad, and were not the least green of all AI research… To the extent that all cutting-edge AI research ~2010 could be done with grad student money like $1,579$1k2010 of hardware, where AI research in decades before & after benefited from big iron, that is an indictment of that era, demonstrating what a stagnant dead end that research was, that its techniques were so small-minded and hobbled it could not benefit from the available large-scale compute.\nFun trivia: BiT is now more accurate⁠ at predicting (cleaned, corrected) ImageNet labels than the original ImageNet labels are.\nOne interesting aspect of image scaling experiments like Dojolonga et al 2020 is that even when performance is ‘plateauing’ on the original task & approaching label error, the transfer learning continues to improve. Apparently the internal representations, even when adequate for mere classification and so the score cannot increase more than a small percentage, become more human-like—because it’s encoding dark knowledge⁠ or more adversarial robustness⁠? I’ve noticed with language models, the final fractions of a loss appear to make a substantial difference to generated sample quality, perhaps because it is only after all the easier modeling is finished that the lazy language model is forced to squeeze out the next bit of performance by more correctly modeling more sophisticated things like logic, objects, world-knowledge, etc.\nThe numbers here are not exact and are for illustration; because BPEs don’t correspond to any intuitive, I am going to borrow from my observations watching char-RNNs, and talk about the loss per character instead of BPE.\nIf you see thousands of images labeled ‘dog’ and thousands more labeled ‘cat’, you can simply learn separate dog & cat classifiers without bothering to understand their shared aspects like being domesticated quadruped mammal predators. This won’t be useful if you are then asked to classify ‘ferret’ images, but you weren’t asked to, so that’s not your problem, since you can just learn yet another separate classifier for ferrets if you then get a lot of ferret images.\npg210–211, “The Quiet Enemy”, ⁠The Legacy of Hiroshima⁠, Teller 196264ya.\nAnother way of interpreting the various papers about how Transformers are actually like RNNs or are actually Hopfield networks⁠ is to take that as indicating that what is important about them is not any inherent new capability compared to older architectures, but some lower-level aspect like being more efficiently trainable on contemporary hardware.\nHow do these absolute prediction performances compare to humans? It’s hard to say. The only available benchmarks for perplexity for humans/GPT-2/GPT-3 appear to be WebText, Penn Tree Bank⁠ (PTB; based on the Brown Corpus⁠), 1 Billion Word⁠ (1BW), and LAMBADA⁠. But coverage is spotty.\nI found no human benchmarks for WebText or Penn Tree Bank, so I can’t compare the human vs GPT-2/GPT-3 perplexities (⁠GPT-2 PTB⁠: 35.7; ⁠GPT-3 PTB⁠: 20.5).\n⁠GPT-2⁠ was benchmarked at 43 perplexity on the 1 Billion Word (1BW) benchmark vs a (highly extrapolated) human perplexity of 12⁠ (which interestingly extrapolates, using 201214ya LSTM RNNs, that “10 to 20 more years of research before human performance is reached”), but that may be an unfair benchmark (“Our model is still substantially worse than prior work on the One Billion Word Benchmark (⁠Chelba et al 2013⁠). This is likely due to a combination of it being both the largest dataset and having some of the most destructive pre-processing—1BW’s sentence level shuffling removes all long-range structure.”) and 1BW was dropped from the GPT-3 evaluation due to data contamination (“We omit the 4 Wikipedia-related tasks in that work because they are entirely contained in our training data, and we also omit the one-billion word benchmark due to a high fraction of the dataset being contained in our training set.”).\nLAMBADA was benchmarked at a ⁠GPT-2 perplexity⁠ of 8.6, and a ⁠GPT-3 perplexity⁠ of 3.0 (zero-shot) / 1.92 (few-shot). ⁠OA claims⁠ in their GPT-2 blog post (but not the paper) that human perplexity is 1–2, but provides no sources and I couldn’t find any. (The authors might be guessing based on how LAMBADA was constructed: examples were filtered by whether two independent human raters provided the same right answer, which lower bounds how good humans must be at predicting the answer.)\nSo overall, it looks like the best guess is that GPT-3 continues to have somewhere around twice the absolute error of a human. This implies it will take a large (yet, far from impossible) amount of compute to fully close the remaining gap with the current scaling laws. If we irresponsibly extrapolate out the WebText scaling curve further, assume GPT-3 has twice the error of a human at its current WebText perplexity of 1.73 (and so humans are ~0.86), then we need 2.57 ⋅ (3.64 ⋅ (103 ⋅ x))-0.048 = 0.86, where x = 2.2e6 or 2,200,000× the compute of GPT-3. (This would roughly equal the cost to the USA of invading Iraq.)\nWhen is that feasible?\nIf we imagine that ⁠peak AI compute usage doubles every 3.4 months⁠, then 2.2e6 would be 22 doublings away—or 6.3 years, in 2027. Most people believe that that compute trend must break down soon, and this sort of prediction is a good reason why!\nGoing the other direction, ⁠Hernandez & Brown 2020’s⁠ estimate is that, net of hardware & algorithmic progress, the cost of a fixed level of performance halves every 16 months; so if GPT-3 cost ~$6.29$52020m in early 2020, then it’ll cost $3.14$2.502020m around mid-2021, and so on. Similarly, a GPT-human requiring 2.2e6× more compute would presumably cost on the order of $13$102020 trillion in 2020, but after 14 halvings (18 years) would cost $1.26$12020b in 2038.\nAs of December 2020, half a year later, almost no researcher has been willing to go on record as saying what specific capabilities they predict future 1t, 10t, or 100t models will have or not have, and at what size which missing capabilities will emerge—just as no one is on record successfully predicting GPT-2 or GPT-3’s specific capabilities.\nSee also ⁠Sutskever’s DRL talk⁠, and Wojciech Zaremba’s⁠ ⁠comments about OA5⁠ (⁠transcript⁠):\nLukas Biewald: How much of the work then on DoTA2 was, you felt, like fundamentally moving ML forward and how much of it was DoTA-specific or can you even pull those apart?\nWojciech Zaremba: I think there was a decent amount of DoTA-specific work. And then I think it was more than optimal, but also simultaneously hard. So I remember at the beginning of DoTA project, it was actually unclear how to approach it.\nPeople are saying that contemporary reinforcement learning will have no chance in solving this problem. And people looked into off-policy matters, on-policy matters, evolutionary strategies⁠. The thing that became quite surprising is that methods that already exist⁠, with appropriate scale work extremely well. So that was a big surprise. And I remember some people even before DoTA time at OpenAI, saying that maybe reinforcement learning is a dead end. And all of a sudden it’s a very different story now.\nL Biewald: For sure.\nProduction services, especially free production services, usually lag long after the unpublished SOTA inside the most cutting-edge lab. The second is the only thing that matters for predicting AI progress or AI risk, of course, but people will insist on measuring AI progress by bizarre metrics like what an arbitrary free service could do last year. As a rule of thumb, assume that: if you are using a free service with no login, the quality is at least 2 years behind SOTA; free with a login, >1.5 years; paid service, >1 year; & recently-released research paper, >6 months.\nParticularly Demis Hassabis⁠; I’m not sure about Shane Legg’s⁠ current views⁠, although given the accuracy of his 2009 predictions⁠ while founding DeepMind & his 2018 comments⁠, he probably hasn’t much changed his views that AI will be empowered by the (realized) exponential compute gains or his AGI forecast of ~2028⁠. (This is consistent with the latest Metaculus⁠ forecasts⁠.)\nWhen faced with the choice between having to admit all their fancy hard work is a dead-end, swallow the bitter lesson, and start budgeting tens of millions of compute, or instead writing a disdainful tweet explaining how, “actually, GPT-3 shows that scaling is a dead end, it’s an environmental catastrophe, and it’s just imitation intelligence anyway”—most people will get busy on the tweet!\nA mixture-of-expert model like GShard or an embedding like DynamicEmbedding is not comparable to ‘dense’ models like GPT-3, as it’s always been cheap & easy to train models with billions of ‘parameters’ in some sense, like extremely large embeddings; however, these parameters do little, and are more like a few hundred shallow models glued back-to-back. They probably do not learn the same interesting things that a dense model would with the same nominal parameter count.\nThis seems to be a bit of a blind spot by commentators: the assumption that if the necessary resource exists, then it will be used. For example, Jim Gray (d. 200719ya) in June 199927ya ⁠pokes a bit of fun⁠ at Turing’s connectionist hardware argument by noting that (using an optimistic lower bound on human brain computational power):\nDesktop machines should be about as intelligent as a spider or a frog, and supercomputers ought to be nearing human intelligence…So, we should start seeing intelligence in these supercomputers any day now (just kidding)…[but we do not because] we are missing something very fundamental. Clearly, the software and databases we have for our super-computers is not on a track to pass the Turing Test in the next decade. Something quite different is needed. Out-of-the-box, radical thinking is needed.\nWe have been handed a puzzle: genomes and brains work. But we are clueless what the solution is. Understanding the answer is a wonderful long-term research goal.\nWith the benefit of hindsight, we can say that it is true that supercomputers in 199927ya could have been showing far more impressive levels of intelligence than they were, and that it was also true that the software being run on the supercomputers in 199927ya were never going to lead to meaningful AI progress, and that there is no particular contradiction or mystery—it was simply that no one was trying. No supercomputer owner was going to let it be tied up for years doing the minor-yet-critical iteration to make connectionist approaches like RNNs or CNNs work. Thus, something quite different & radical was indeed needed—but we already knew what the solution looked like.\nStrikingly, as of 2020, this is still true: eg. the only deep learning research I have seen done on Summit⁠ were materials⁠ science⁠ & biology⁠. (In double-checking Arxiv, I did find one non-STEM paper using Summit resources: Lin et al 2019⁠, focusing on systems engineering in training a video classification model.)\nPeter Norvig⁠ ⁠offers an example⁠ of what happens when grad students can’t afford the necessary computing power to make neural nets work:\nLukas Biewald⁠: When you look at deep learning, it sort of feels like that came suddenly, but a lot of those techniques were around, in fact in your book, I remember quite far back. Do you think that the field missed something, or was it just not possible to run at the scale necessary to show that these neural network techniques were working better than people expected in the early aughts?\nPeter Norvig: Yeah. I mean, if you say suddenly, right, we’ve got a sudden leap in computer vision and image net after Hinton had been trying the same thing for 30 years, right?…And then it finally worked. And I think the biggest difference was the computing power. Definitely there were advances in data. So we could do ImageNet⁠ because Fei-Fei Li⁠ and others gathered this large database, and that was really important. There are certainly differences in the algorithm, right? We’ve got a slightly different squashing function⁠. Instead of shaped like this [sigmoid⁠], it’s shaped like this [ReLU⁠]. I mean, I don’t know how big a deal that was, but we learned how to do stochastic gradient descent⁠ a little bit better. We figured that dropout⁠ gave you a little bit better robustness.\nSo there were small things, but I think probably the biggest was the computing power. And I mean, I certainly remember Geoff Hinton⁠ came to Berkeley when I was a grad student in 198145ya, I think, when he talked about these neural nets. And we fellow grad students thought that was so cool. So we said, ‘Let’s go back into the lab and implement it.’\nAnd of course, there was absolutely nothing you could download, so we had to build it all from scratch. And we got it to do exclusive or [XOR⁠], and then we got it to do something a little bit more complicated. And it was exciting. And then we gave it the first real problem, and it ran overnight, and it didn’t converge, and we let it run one more day, and it still didn’t converge. And then we gave up, and we went back to our sort of knowledge-based systems approach. But if we had the computing power of today, it probably would have converged after 5 seconds.\nBy my estimate, Norvig’s attempt used the equivalent of 0.8 milliseconds of contemporary GPU-time.\n(In ~1981, an expensive PC costing the equivalent of >$6,289$5k2020, of the sort a high-powered AI lab might allocate 1 apiece to grad students, might have an additional Intel 8087⁠ floating-point coprocessor⁠ capable of 50,000 FP64 FLOPS; conservatively assuming that ‘overnight’ + ‘one more day’ ≤ 2 days, then Norvig’s experiment used 2d × 24h × 60m × 60s × 50,000 = 8×109 FLOPS; a 2020 Nvidia A100⁠ GPU nominally priced ~$12,578$10k2020 boasts 9.7 FP64 TFLOPS or 9,700,000,000,000 FLOPS (and far more in the more useful low-precision regimes like FP32, but 198145ya ML didn’t know that); thus, 89 / 9.7×1012 = 8×10−4 seconds = 0.8 milliseconds.)\nJeff Dean⁠ notes, “It is perhaps unfortunate that just as we started to have enough computational performance to start to tackle interesting real-world problems and the increased scale and applicability of machine learning has led to a dramatic thirst for additional computational resources to tackle larger problems, the computing industry as a whole has experienced a dramatic slowdown in the year-over-year improvement of general purpose CPU performance.” Under the computational view, this is not a coincidence: compute, not algorithms, are the critical factor; biological systems often come within orders of magnitude, or less, of the theoretical optimum for a task; and the closer one comes to optimal, the slower progress becomes; so, just as artificial computation finally starts doing “interesting real-world problems”, it necessarily is approaching its limits. (It could have been otherwise: Moore’s law could have stopped short by many orders of magnitude of biological efficiency, or surpassed it by many orders, with no temporal coincidence, and AI happened for other reasons.)\nNow that GPT-3’s few-shot and T5 finetuning⁠ have begun to make people like Gary Marcus feel slightly nervous about WinoGrande, they have begun preparing⁠ their excuses⁠ for why Winograd schemas weren’t really⁠ good measures of commonsense reasoning/intelligence (because intelligence, of course, is whatever AI can’t do yet).\nFeynman⁠: “There are several references to previous flights; the acceptance and success of these flights are taken as evidence of safety. But erosion and blowby are not what the design expected. They are warnings that something is wrong. The equipment is not operating as expected, and therefore there is a danger that it can operate with even wider deviations in the unexpected and not thoroughly understood way. The fact that this danger did not lead to catastrophe before is no guarantee that it will not the next time, unless it is completely understood.”\nOne is reminded of the catastrophic dismissals of Western technology by the Chinese emperors & Shaka Zulu⁠: the error was not in dismissing the technology as practically unimportant (it arguably was), nor in failing to realize that they were already centuries behind in the most important geopolitical development in millennia, but in failing to acknowledge that they couldn’t explain why the Western technology had gotten so good so fast and thus couldn’t know that it wouldn’t get much better still.\nAs my favorite Wittgenstein anecdote goes, heliocentrism strikes everyone as false because things just don’t look as if the Earth whirls at astronomical velocities around a star, but as if the Earth is perfectly still and everything else whirls around it (Anscombe 196363ya, An Introduction to Wittgenstein’s Tractatus):\nThe general method that Wittgenstein does suggest is that of ‘shewing that a man has supplied no meaning [“no reference”?] for certain signs in his sentences’. I can illustrate the method from Wittgenstein’s later way of discussing problems. He once greeted me with the question: ‘Why do people say that it was natural to think that the sun went round the earth rather than that the earth turned on its axis? I replied: ’I suppose, because it looked as if the sun went round the earth.’ ‘Well,’ he asked, ‘what would it have looked like if it had looked as if the earth turned on its axis?’\nThis question brought it out that I had hitherto given no relevant meaning to ‘it looks as if’ in ‘it looks as if the sun goes round the earth’. My reply was to hold out my hands with the palms upward, and raise them from my knees in a circular sweep, at the same time leaning backwards and assuming a dizzy⁠ ⁠expression⁠. ‘Exactly!’ he said.\nThis connection is more than superficial—a lot of RL work draws on formal analogies to physics and variational principles.", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "the scaling hypothesis gpt 3 ai scaling algorithm insight porn ai safety rl scaling sociology transhumanism on gpt 3 meta learning scaling implications and deep theory the scaling hypothesis neural nets absorb data compute generalizing and becoming more bayesian as problems get harder manifesting new abilities even at trivial by global standards scale the deep learning revolution has begun as foretold 2020 05 28 2022 01 02 finished certainty likely importance 10 backlinks similar bibliography gpt 3 announced by openai in may 2020 is the largest neural network ever trained by over an order of magnitude trained on internet text data it is the successor to gpt 2 which had surprised everyone by its natural language understanding generation ability to the surprise of most including myself this vast increase in size did not run into diminishing or negative returns as many expected but the benefits of scale continued to happen as forecasted by openai these benefits were not merely learning more facts text than gpt 2 but qualitatively distinct even more surprising in showing meta learning while gpt 2 learned how to do common natural language tasks like text summarization gpt 3 instead learned how to follow directions and learn new tasks from a few examples as a result gpt 3 outputs interaction are more fascinating human like than gpt 2 while the immediate applications of gpt 3 like my poetry or humor writings are nice the short term implications of gpt 3 are much more important first while gpt 3 is expensive by conventional dl standards it is cheap by scientific commercial military government budget standards and the results indicate that models could be made much larger second models can also be made much more powerful as gpt is an old approach known to be flawed in both minor major ways and far from an ideal transformer third gpt 3 s capabilities come from learning on raw unsupervised data that has long been one of the weakest areas of dl holding back progress in other areas like reinforcement learning or robotics models like gpt 3 suggest that large unsupervised models will be vital components of future dl systems as they can be plugged into systems to immediately provide understanding of the world humans natural language and reasoning the meta learning has a longer term implication it is a demonstration of the blessings of scale where problems with simple neural networks vanish and they become more powerful more generalizable more human like when simply made very large trained on very large datasets with very large compute even though those properties are believed to require complicated architectures fancy algorithms and this perceived need drives much research unsupervised models benefit from this as training on large corpuses like internet scale text present a myriad of difficult problems to solve this is enough to drive meta learning despite gpt not being designed for meta learning in any way this family of phenomena is perhaps driven by neural networks functioning as ensembles of many sub networks with them all averaging out to an occam s razor which for small data models learn superficial or memorized parts of the data but can be forced into true learning by making the problems hard rich enough as meta learners learn amortized bayesian inference they build in informative priors when trained over many tasks and become dramatically more sample efficient and better at generalization the blessings of scale in turn support a radical theory an old ai paradigm held by a few pioneers in connectionism early artificial neural network research and by more recent deep learning researchers the scaling hypothesis the scaling hypothesis regards the blessings of scale as the secret of agi intelligence is just simple neural units learning algorithms applied to diverse experiences at a currently unreachable scale as increasing computational resources permit running such algorithms at the necessary scale the neural networks will get ever more intelligent when estimates of moore s law like progress curves decades ago by pioneers like hans moravec indicated that it would take until the 2010s for the sufficiently cheap compute for tiny insect level prototype systems to be available and the 2020s for the first sub human systems to become feasible and these forecasts are holding up despite this vindication the scaling hypothesis is so unpopular an idea and difficult to prove in advance rather than as a fait accompli that while the gpt 3 results finally drew some public notice after openai enabled limited public access people could experiment with it live it is unlikely that many entities will modify their research philosophies much less kick off an arms race more concerningly gpt 3 s scaling curves unpredicted meta learning and success on various anti ai challenges suggests that in terms of futurology ai researchers forecasts are an emperor sans garments they have no coherent model of how ai progress happens or why gpt 3 was possible or what specific achievements should cause alarm where intelligence comes from and do not learn from any falsified predictions their primary concerns appear to be supporting the status quo placating public concern and remaining respectable as such their comments on ai risk are meaningless they would make the same public statements if the scaling hypothesis were true or not depending on what investments are made into scaling dl and how fast compute grows the 2020s should be quite interesting sigmoid or singularity for more ml scaling research follow the r mlscaling subreddit for a fiction treatment as sf short story see it looks like you re trying to take over the world for my may 2022 followup 2 years later see scaling hypothesis revisited see also situational awareness ai 2027 for more speculation on how and why dl scaling works see human like neural nets by catapulting read the samples on gpt 3 language models are few shot learners brown et al 2020 poems my followup gpt 3 creative writing compare my old finetuned gpt 2 poetry random samples openai api with real world demos i strongly encourage anyone interested in gpt 3 to also at least skim oa s random samples or better yet my samples in gpt 3 creative writing reading the paper looking at some standard benchmark graphs does not give a good feel for what working with gpt 3 is like or the diversity of things it can do which are missed by benchmarks meta learning learning to learn in may 2020 oa released to remarkably little interest from researchers no blog post no media blitz and little public discussion beyond the snidely dismissive the long awaited followup to gpt 2 one model to rule them all a 117 larger 175b parameter model with far more powerful language generation which lets it solve a wide variety of problems from arithmetic 1 to english translation to unscrambling anagrams to sat analogies purely from being prompted with text examples without any specialized training or finetuning whatsoever merely next word prediction training on a big internet text corpus this implies gpt 3 s attention mechanisms serve as fast weights that have learned to learn by training on sufficiently varied data 2 forcing it to do more than just learn ordinary textual relationships like openai s jukebox just weeks ago itself a remarkable demonstration of scaling in synthesizing raw audio music complete with remarkably realistic voices instruments the announcement of gpt 3 appears to have sunk almost without a trace so i will go into more depth than usual flexing gpt they are absolutely reasonable i think that is their distinguishing characteristic yes mr erskine an absolutely reasonable people i assure you there is no nonsense about the americans how dreadful cried lord henry i can stand brute force but brute reason is quite unbearable there is something unfair about its use it is hitting below the intellect the picture of dorian gray oscar wilde attacks only get better 2 years ago gpt 1 was interestingly useful pretraining and adorable with its sentiment neuron 1 year ago gpt 2 was impressive with its excellent text generation finetuning capabilities this year gpt 3 is scary because it s a magnificently obsolete architecture from early 2018 used mostly for software engineering convenience as the infrastructure has been debugged which is small shallow compared to what s possible 3 4 with a simple uniform architecture 5 trained in the dumbest way possible unidirectional prediction of next text token on a single impoverished modality random internet html text dumps 6 on tiny data fits on a laptop sampled in a dumb way 7 its benchmark performance sabotaged by bad prompts data tokenization problems especially arithmetic commonsense reasoning and yet the first version already manifests crazy runtime meta learning and the scaling curves still are not bending the samples are also better than ever whether it s gpt 3 inventing new penis jokes 8 or writing mostly working javascript tutorials about rotating arrays it s odd that this qualitative leap appears to be largely missed by the standard nlp benchmarks nothing in the raw metrics reported on say penn tree bank or lambada or winogrande would lead you to expect all of this hilarious and creative output the meta learning results might but only if you already thought meta learning was important this suggests to me that a useful post gpt 3 contribution would be figuring out how to benchmark these sorts of flexible text generation capabilities possibly something along the lines of chollet s image based abstraction and reasoning corpus arc baking the cake not the whole picture but a big partscaling still workinganti scaling penny wise pound foolish is gpt actually part of agi or is the cake a lie lecun 2019 not the whole picture but a big part does it set sota on every task no of course not but the question is not whether we can lawyerly find any way in which it might not work but whether there is any way which it might work and there are many ways it might work better see the limitations section for just a few does gpt 3 do anything like steer a robot around sf shooting lasers and rockets at humans no of course not it is just a text prediction model an idiot savant of text but an idiot savant we should remember is only a genetic mutation or bit of brain damage away from a normal human if rl is the cherry on the top of the supervised learning frosting and supervised learning is the frosting on top of the unsupervised learning cake well it looks like the cake layers are finally rising a better gpt 3 lesson scaling still working i was surprised as i had expected closer to 100b parameters and i thought that the performance of ctrl meena megatronlm t5 turing nlg gpipe suggested that the scaling papers 9 notwithstanding the scaling curves had started to bend and by 100b it might be hard to justify further scaling however in the latest version of the unreasonable effectiveness of data where the curves cross scissor effect and the neural method eventually wins eg banko brill 2001 brants et al 2007 koehn knowles 2017 gpt 3 hits twice that without noticeable change in scaling factors its scaling continues to be roughly logarithmic power law as it was for much smaller models as forecast and it has not hit a regime where gains effectively halt or start to require increases vastly beyond feasibility that suggests that it would be both possible and useful to head to trillions of parameters which are still well within available compute budgets requiring merely thousands of gpus perhaps 13 102020 126 1002020m budgets assuming no improvements which of course there will be see hernandez brown 2020 etc and eyeballing the graphs many benchmarks like the winograd schema winogrande would fall by 10t parameters the predictability of scaling is striking and makes scaling models more like statistics than ai ai is statistics which does what we want it to but doesn t work and statistics is ai which works but doesn t do what we want gpt 3 not even that much compute 3640 petaflop s day only 2 their estimate for alphago zero 1860166ya historical graph modified by myself from ai and compute amodei et al 2018 anti scaling penny wise pound foolish gpt 3 is an extraordinarily expensive model by the standards of machine learning it is estimated that training it may require the annual cost of more machine learning researchers than you can count on one hand 6 29 52020m 10 up to 38 302020 of hard drive space to store the model 500 800gb and multiple pennies of electricity per 100 pages of output 0 4 kwh researchers are concerned about the prospects for scaling can ml afford to run projects which cost more than 0 1 milli manhattan projects 11 surely it would be too expensive even if it represented another large leap in ai capabilities to spend up to 10 milli manhattan projects to scale gpt 3 100 to a trivial thing like human like performance in many domains many researchers feel that such a suggestion is absurd and refutes the entire idea of scaling machine learning research further they asseverate that their favored approaches you know the ones which don t work 12 will run far more efficiently and that the field would be more productive if it instead focused on research which can be conducted by an impoverished goatherder on an old laptop running off solar panels 13 nonetheless i think we can expect further scaling 10 no 10 isn t cool you know what s cool 100 1000 trained on a fancy new supercomputer it is after all easier to make something efficient after it exists than before scaling how far will scaling go the scaling papers suggest that the leaps we have seen over the past few years are not even half way there in terms of absolute likelihood loss never mind what real world capabilities each additional decrement translates into the scaling curves are clean from scaling laws for neural language models kaplan et al 2020 dl scaling laws compute data model parameters figure 1 gpt 3 represents 103 on this chart leaving plenty of room for further loss decreases especially given the uncertainty in extrapolation projecting dl power laws still room beyond gpt 3 lo and behold the scaling laws continue for gpt 3 models for several orders past kaplan et al 2020 from brown et al 2020 gpt 3 continues to scale as predicted note gpt 3 s curve has not bounced and it trained only 0 5 epochs see table 2 2 if we see such striking gains in halving the validation loss but with so far left to go what is left to emerge as we third or halve again how far does this go exactly how do we predict what emerges when bueller bueller see also meena s perplexity vs human ness chatbot ratings gpt 3 written news articles probability of fooling humans by parameter count and gpt 3 model size vs q a from hendrycks et al 2020 blessings of scale extrapolating the spectacular performance of gpt 3 into the future suggests that the answer to life the universe and everything is just 4 398 trillion parameters geoff hinton we don t know how to train nns the blessings of scale is the observation that for deep learning hard problems are easier to solve than easy problems everything gets better as it gets larger in contrast to the usual outcome in research where small things are hard and large things impossible the bigger the neural net compute data problem the faster it learns the better it learns the stabler it learns and so on a problem we can t solve at all at small n may suddenly become straightforward with millions or billions of n nns are lazy they can do far more than we make them do when we push them beyond easy answers cheap shortcuts the bitter lesson is the harder and bigger the better besides gpt 3 one could mention recent progress in semi supervised learning the model based drl renaissance alphago zero just stack moar layers lol blessings of scale stability generalization meta learning gpt 3 is hamstrung by its training data but dl enjoys an unreasonably effective blessing of dimensionality just simply training a big model on a lot of data induces better properties like meta learning without even the slightest bit of that architecture being built in and in general training on more and harder tasks creates ever more human like performance generalization and robustness the gpt natural language programming language models igpt vision transformer for images and to some degree gpt f show that simply scaling up models datasets without any supervision produces results competitive with the best and most complex alternatives using the same simple architecture gradually passing from superficial surface correlations to more human like brain activity schrimpf et al 2020 and linguistic biases as data increases eg warstadt et al 2020 in fact one may not even need complicated attention mechanisms at scale as fully connected networks hard to get much simpler than them work surprisingly well for many tasks one typically trains such large models with simple optimizers like adam because the complicated ones lose their advantages as batch sizes increase and the simple optimizers work fine and are more memory efficient anyway oa5 does not just scale to but stabilizes at minibatches of millions due to gradient noise oa5 like biggan stabilizes at large scale image datasets like jft 300m benefits from unusually large minibatches and vaes long an also ran to gans or autoregressive models in terms of sharp image generation catch up if you make them very deep child 2020 vahdat kautz 2020 while classifier cnns like bit 14 dojolonga et al 2020 or resnext or noisy student transfer robustify with human like errors 15 multimodal learning produces better representations on fewer data eg vilbert videobert motivating oa s interest in big multimodal models and rnns can predict videos alphastar reaches human level with hundreds of competing self players to cover possible strategies imitation learning drl like metamimic generalizes at hundreds of tasks to train a deep net disentanglement emerges in stylegan with sufficiently deep w embeddings with enough parameters to train raw audio in the aforementioned jukebox or in relational networks gqn transformers with enough samples to force factorization see also hill et al 2019 chaplot et al 2017 yu et al 2018 lake 2019 interactive agents group 2020 training dactyl or humanoid robots on millions of domain randomizations induced similar implicit meta learning where during each runtime invocation the rnn probes its environment and encodes its understanding of robot hand control into its hidden state and dd ppo outperforms classical robot planners by scaling 2 orders or in procgen or coinrun training on hundreds of levels trains agents to solve levels individually and worsens performance on other levels but at thousands of levels they begin to generalize to unseen levels similarly language model pretraining finetuning overfits at small numbers of datasets but improves markedly with enough diversity alphazero demonstrated truly superhuman go without delusions just by training a bigger model on a richer signal pro level play without any search and muzero for that matter demonstrated that just training an rnn end to end to predict a reward on enough data is enough to obsolete even alphazero and learn tree search implicitly but better and on and on dm researcher matthew botvinick discussing their meta reinforcement learning work where they were surprised to discover meta learning emerging and that it did so regardless of which specific architecture they used it s something that just happens in a sense you can t avoid this happening if you have a system that has memory and the function of that memory is shaped by reinforcement learning and this system is trained on a series of interrelated tasks this is going to happen you can t stop it pace breiman why why do they transfer and generalize why do these blessings of scale exist why do we need to train large models when small models provably exist with the same performance why do larger models not overfit though they can and generalize better than smaller models what s up with the whole double descent anyway these are all ahem deep questions about neural networks and heavily debated but right now i would suggest that the answer lies in some mix of the model compression distillation lottery ticket hypothesis bayesian neural network and learned representation like circuits literatures big models work because they encode a dizzyingly vast number of sub models in an extremely high dimensional abstract space representing countless small sub models orseau et al 2020 interpolating over data one of which is likely to solve the problem well and so ensures the problem is soluble by the overall model they function as an ensemble even though there are countless overfit sub models inside the single big model they all average out leading to a preference for simple solutions this occam s razor biases the model towards simple solutions which are flexible enough to gradually expand in complexity to match the data however neural nets are lazy sub models which memorize pieces of the data or latch onto superficial features learn quickest and are the easiest to represent internally if the model data compute are not big or varied enough the optimization by the end of the cursory training will have only led to a sub model which achieves a low loss but missed important pieces of the desired solution on the other hand for a model like gpt 3 it is sufficiently powerful a model that its sub models can do anything from poetry to arithmetic and it is trained on so much data that those superficial models may do well early on but gradually fall behind more abstract models a sub model which memorizes some of the data is indeed much simpler than a sub model which encodes genuine arithmetic a nn can probably memorize tens of thousands of lookup table entries storing examples of addition in the space it would take to encode an abstract algorithm like addition but it can t possibly memorize all the instances of arithmetic implicit or explicit in gpt 3 s internet scale dataset if a memorizing sub model tried to do so it would become extremely large and penalized eventually after enough examples and enough updates there may be a phase transition viering loog 2021 and the simplest arithmetic model which accurately predicts the data just is arithmetic and then the meta learning after seeing enough instances of algorithms which vary slightly within each sample making it hard to learn each task separately just is learning of more generic algorithms yielding sub models which achieve lower loss than the rival sub models which either fail to predict well or bloat unacceptably gpt 2 1 5b apparently was too small or shallow to ensemble easily over sub models encoding meta learning algorithms or perhaps not trained long enough on enough data to locate the meta learner models gpt 3 was so the larger the model the better if there is enough data compute to push it past the easy convenient sub models and into the sub models which express desirable traits like generalizing factorizing perception into meaningful latent dimensions meta learning tasks based on descriptions learning causal reasoning logic and so on if the ingredients are there it s going to happen scaling hypothesis the strong scaling hypothesis is that once we find a scalable architecture like self attention or convolutions which like the brain can be applied fairly uniformly eg the brain as a universal learning machine or hawkins we can simply train ever larger nns and ever more sophisticated behavior will emerge naturally as the easiest way to optimize for all the tasks data more powerful nns are just scaled up weak nns in much the same way that human brains look much like scaled up primate brains while i was highly skeptical of scaling hypothesis advocates when i first became interested in ai 2004 6201016ya back when ai was stuck in the doldrums of hopelessly narrow tools and dates like 2028 seemed impossibly far away which smacked of numerology and if you build it they will come logic at the time we certainly didn t have general algorithms that you could just throw compute at in 2020 i have to admit i was wrong and they were right we built the compute and the algorithms did come and the scaling hypothesis has only looked more and more plausible every year since 201016ya", "source_text": "The Scaling Hypothesis\nGPT-3, AI scaling, algorithm, insight porn, AI safety, RL scaling, sociology, transhumanism\nOn GPT-3: meta-learning, scaling, implications, and deep theory. The scaling hypothesis: neural nets absorb data & compute, generalizing and becoming more Bayesian as problems get harder, manifesting new abilities even at trivial-by-global-standards-scale. The deep learning revolution has begun as foretold.\n2020-05-28–2022-01-02 finished ⁠certainty: likely ⁠importance: 10 ⁠backlinks⁠ ⁠similar⁠ ⁠bibliography⁠\nGPT-3, an­nounced by Ope­nAI in May 2020, is the largest neural net­work ever trained, by over an order of mag­ni­tude. Trained on In­ter­net text data, it is the suc­ces­sor to GPT-2, which had sur­prised every­one by its nat­ural lan­guage un­der­stand­ing & gen­er­a­tion abil­ity. To the sur­prise of most (in­clud­ing my­self), this vast in­crease in size did not run into di­min­ish­ing or neg­a­tive re­turns, as many ex­pected, but the ben­e­fits of scale con­tin­ued to hap­pen as fore­casted by Ope­nAI. These ben­e­fits were not merely learn­ing more facts & text than GPT-2, but qual­i­ta­tively dis­tinct & even more sur­pris­ing in show­ing ⁠meta-learning⁠: while GPT-2 learned how to do com­mon nat­ural lan­guage tasks like text sum­ma­riza­tion, GPT-3 in­stead learned how to fol­low di­rec­tions and learn new tasks from a few ex­am­ples. (As a re­sult, GPT-3 out­puts & in­ter­ac­tion are more fas­ci­nat­ing & human-like than GPT-2.)\nWhile the im­me­di­ate ap­pli­ca­tions of GPT-3, like my po­etry or humor writ­ings, are nice, the short-term im­pli­ca­tions of GPT-3 are much more im­por­tant.\nFirst, while GPT-3 is ex­pen­sive by con­ven­tional DL stan­dards, it is cheap by sci­en­tific/com­mer­cial/mil­i­tary/gov­ern­ment bud­get stan­dards, and the re­sults in­di­cate that mod­els could be made much larger. Sec­ond, mod­els can also be made much more pow­er­ful, as GPT is an old ap­proach known to be flawed in both minor & major ways, and far from an ‘ideal’ Trans­former. Third, GPT-3’s ca­pa­bil­i­ties come from learn­ing on raw (un­su­per­vised) data; that has long been one of the weak­est areas of DL, hold­ing back progress in other areas like re­in­force­ment learn­ing or ro­bot­ics. Mod­els like GPT-3 sug­gest that large un­su­per­vised mod­els will be vital com­po­nents of fu­ture DL sys­tems, as they can be ‘plugged into’ sys­tems to im­me­di­ately pro­vide un­der­stand­ing of the world, hu­mans, nat­ural lan­guage, and rea­son­ing.\nThe meta-learning has a longer-term im­pli­ca­tion: it is a demon­stra­tion of the ⁠bless­ings of scale⁠, where prob­lems with sim­ple neural net­works van­ish, and they be­come more pow­er­ful, more gen­er­al­iz­able, more human-like when sim­ply made very large & trained on very large datasets with very large com­pute—even though those prop­er­ties are be­lieved to re­quire com­pli­cated ar­chi­tec­tures & fancy al­go­rithms (and this per­ceived need dri­ves much re­search). Un­su­per­vised mod­els ben­e­fit from this, as train­ing on large cor­puses like Internet-scale text present a myr­iad of dif­fi­cult prob­lems to solve; this is enough to drive meta-learning de­spite GPT not being de­signed for meta-learning in any way. (This fam­ily of phe­nom­ena is per­haps dri­ven by neural net­works func­tion­ing as en­sem­bles of many sub-networks with them all av­er­ag­ing out to an Occam’s razor, which for small data & mod­els, learn su­per­fi­cial or mem­o­rized parts of the data, but can be forced into true learn­ing by mak­ing the prob­lems hard & rich enough; as ⁠meta-learners learn amor­tized Bayesian in­fer­ence⁠, they build in in­for­ma­tive pri­ors when trained over many tasks, and be­come dra­mat­i­cally more sample-efficient and bet­ter at gen­er­al­iza­tion.)\nThe bless­ings of scale in turn sup­port a rad­i­cal the­ory: an old AI par­a­digm held by a few pi­o­neers in con­nec­tion­ism (early ar­ti­fi­cial neural net­work re­search) and by more re­cent deep learn­ing re­searchers, the ⁠scal­ing hy­poth­e­sis⁠. The scal­ing hy­poth­e­sis re­gards the bless­ings of scale as the se­cret of AGI: in­tel­li­gence is ‘just’ sim­ple neural units & learn­ing al­go­rithms ap­plied to di­verse ex­pe­ri­ences at a (cur­rently) un­reach­able scale. As in­creas­ing com­pu­ta­tional re­sources per­mit run­ning such al­go­rithms at the nec­es­sary scale, the neural net­works will get ever more in­tel­li­gent.\nWhen? Es­ti­mates of Moore’s law-like progress curves decades ago by pi­o­neers like Hans Moravec in­di­cated that it would take until the 2010s for the sufficiently-cheap com­pute for tiny insect-level pro­to­type sys­tems to be avail­able, and the 2020s for the first sub-human sys­tems to be­come fea­si­ble, and these fore­casts are hold­ing up. (De­spite this vin­di­ca­tion, the scal­ing hy­poth­e­sis is so un­pop­u­lar an idea, and dif­fi­cult to prove in ad­vance rather than as a fait ac­com­pli, that while the GPT-3 re­sults fi­nally drew some pub­lic no­tice after Ope­nAI en­abled lim­ited pub­lic ac­cess & peo­ple could ex­per­i­ment with it live, it is un­likely that many en­ti­ties will mod­ify their re­search philoso­phies, much less kick off an ‘arms race’.)\nMore con­cern­ingly, GPT-3’s scal­ing curves, un­pre­dicted meta-learning, and suc­cess on var­i­ous anti-AI chal­lenges sug­gests that in terms of fu­tur­ol­ogy, AI re­searchers’ fore­casts are an em­peror sans gar­ments: they have no co­her­ent model of how AI progress hap­pens or why GPT-3 was pos­si­ble or what spe­cific achieve­ments should cause alarm, where in­tel­li­gence comes from, and do not learn from any fal­si­fied pre­dic­tions. Their pri­mary con­cerns ap­pear to be sup­port­ing the sta­tus quo, pla­cat­ing pub­lic con­cern, and re­main­ing re­spectable. As such, their com­ments on AI risk are mean­ing­less: they would make the same pub­lic state­ments if the scal­ing hy­poth­e­sis were true or not.\nDe­pend­ing on what in­vest­ments are made into scal­ing DL, and how fast com­pute grows, the 2020s should be quite in­ter­est­ing—sig­moid or sin­gu­lar­ity?\nFor more ML scal­ing re­search, fol­low the /r/MLScal­ing⁠ sub­red­dit. For a fic­tion treat­ment as SF short story, see “It Looks Like You’re Try­ing To Take Over The World”⁠. For my May 2022 fol­lowup 2 years later, see ⁠“Scal­ing Hy­poth­e­sis Re­vis­ited”⁠; see also ⁠Sit­u­a­tional Aware­ness & ⁠AI 2027. For more spec­u­la­tion on how and why DL scal­ing works, see “Human-like Neural Nets by Cat­a­pult­ing”⁠.\nRead The Samples\nOn “GPT-3: Language Models are Few-Shot Learners”, Brown et al 2020⁠ (poems⁠ & my followup “GPT-3 Creative Writing”⁠, compare my old finetuned GPT-2 poetry⁠; ⁠random samples; “OpenAI API”⁠ with real-world demos)\nI strongly encourage anyone interested in GPT-3 to also at least skim OA’s ⁠random samples, or better yet, my samples in “GPT-3 Creative Writing”—reading the paper & looking at some standard benchmark graphs does not give a good feel for what working with GPT-3 is like or the diversity of things it can do which are missed by benchmarks.\nMeta-Learning\nLearning to learn. In May 2020, OA released—to remarkably little interest from researchers, no blog post, no media blitz, and little public discussion beyond the snidely dismissive—the long-awaited followup to GPT-2⁠, one model to rule them all: a 117× larger 175b-parameter model with far more powerful language generation, which lets it solve a wide variety of problems from arithmetic⁠⁠1⁠ to English translation to unscrambling anagrams to SAT analogies—purely from being prompted with text examples, without any specialized training or finetuning whatsoever, merely next-word prediction training on a big Internet text corpus. This implies GPT-3’s attention mechanisms serve as “fast weights”⁠ that have “learned to learn” by training on sufficiently varied data⁠⁠2⁠, forcing it to do more than just learn ordinary textual relationships. Like OpenAI’s Jukebox⁠ just weeks ago (itself a remarkable demonstration of scaling in synthesizing raw audio music complete with remarkably realistic voices/instruments), the announcement of GPT-3 appears to have sunk almost without a trace, so I will go into more depth than usual.\nFlexing GPT\n‘“They are absolutely reasonable. I think that is their distinguishing characteristic. Yes, Mr. Erskine, an absolutely reasonable people. I assure you there is no nonsense about the Americans.” “How dreadful!” cried Lord Henry. “I can stand brute force, but brute reason is quite unbearable. There is something unfair about its use. It is hitting below the intellect.”’\nThe Picture of Dorian Gray, Oscar Wilde\n“Attacks only get better.” 2 years ago, GPT-1⁠ was interestingly useful pretraining and adorable with its “sentiment neuron”. 1 year ago, GPT-2 was impressive with its excellent text generation & finetuning capabilities. This year, GPT-3 is scary because it’s a magnificently obsolete architecture from early 2018 (used mostly for software engineering convenience as the infrastructure has been debugged), which is small & shallow compared to what’s possible⁠⁠3⁠⁠⁠4⁠, with a simple uniform architecture⁠⁠5⁠ trained in the dumbest way possible (unidirectional prediction of next text token) on a single impoverished modality (random Internet HTML text dumps⁠⁠6⁠) on tiny data (fits on a laptop), sampled in a dumb way⁠⁠7⁠, its benchmark performance sabotaged by bad prompts & data tokenization problems (especially arithmetic & commonsense reasoning), and yet, the first version already manifests crazy runtime meta-learning—and the scaling curves still are not bending! The samples are also better than ever, whether it’s GPT-3 inventing new penis jokes⁠⁠8⁠ or writing (mostly working) JavaScript tutorials about rotating arrays.\nIt’s odd that this qualitative leap appears to be largely missed by the standard NLP benchmarks. Nothing in the raw metrics reported on, say, Penn Tree Bank or LAMBADA or WinoGrande would lead you to expect all of this hilarious and creative output; the meta-learning results might, but only if you already thought meta-learning was important. This suggests to me that a useful post-GPT-3 contribution would be figuring out how to benchmark these sorts of flexible text generation capabilities (possibly something along the lines of Chollet’s image-based Abstraction and Reasoning Corpus (ARC)⁠).\nBaking The Cake\nNot the whole picture, but a big partScaling still workingAnti-scaling: penny-wise, pound-foolish\nIs GPT actually part of AGI—or is the cake a lie? (⁠LeCun 2019⁠)\nNot the whole picture, but a big part. Does it set SOTA on every task? No, of course not. But the question is not whether we can lawyerly find any way in which it might not work, but whether there is any way which it might work⁠. And there are many ways it might work better (see the ⁠“Limitations” section⁠ for just a few). Does GPT-3 do anything like steer a robot around SF shooting lasers and rockets at humans⸮ No, of course not. It is ‘just’ a text prediction model, an idiot savant of text; but an idiot savant, we should remember, is only a genetic mutation or bit of brain damage away from a normal human. If RL is the cherry on the top of the supervised learning frosting, and supervised learning is the frosting on top of the unsupervised learning cake, well, it looks like the cake layers are finally rising.\nA better GPT-3 lesson.\nScaling still working. I was surprised, as I had expected closer to 100b parameters, and I thought that the performance of CTRL⁠/Meena⁠/MegatronLM⁠/T5⁠/Turing-NLG⁠/GPipe⁠ suggested that, the scaling papers⁠⁠⁠9⁠ notwithstanding, the scaling curves had started to bend and by 100b, it might be hard to justify further scaling. However, in the latest version of “the unreasonable effectiveness of data”⁠ where “the curves cross”/“scissor effect” and the neural method eventually wins (eg. Banko & Brill 2001⁠, Brants et al 2007⁠, ⁠Koehn & Knowles 2017⁠), GPT-3 hits twice that without noticeable change in scaling factors: its scaling continues to be roughly logarithmic/power-law, as it was for much smaller models & as forecast, and it has not hit a regime where gains effectively halt or start to require increases vastly beyond feasibility. That suggests that it would be both possible and useful to head to trillions of parameters (which are still well within available compute & budgets, requiring merely thousands of GPUs & perhaps $13$102020–$126$1002020m budgets assuming no improvements which of course there will be, see ⁠Hernandez & Brown 2020⁠ etc.), and eyeballing the graphs, many benchmarks like the Winograd schema⁠ WinoGrande⁠ would fall by 10t parameters. The predictability of scaling is striking, and makes scaling models more like statistics than AI. (AI is statistics which does what we want it to but doesn’t work; and statistics is AI which works but doesn’t do what we want.)\nGPT-3: not even that much compute—⁠3640 petaflop/s-day⁠, only 2× their estimate for AlphaGo Zero, 1860166ya. (Historical graph modified by myself from “AI and Compute”, Amodei et al 2018⁠.)\nAnti-scaling: penny-wise, pound-foolish. GPT-3 is an extraordinarily expensive model by the standards of machine learning: it is estimated that training it may require the annual cost of more machine learning researchers than you can count on one hand (~$6.29$52020m⁠⁠10⁠), up to $38$302020 of hard drive space to store the model (500–800GB), and multiple pennies of electricity per 100 pages of output (0.4 kWH). Researchers are concerned about the prospects for scaling: can ML afford to run projects which cost more than 0.1 milli-Manhattan-Projects⸮⁠⁠11⁠ Surely it would be too expensive, even if it represented another large leap in AI capabilities, to spend up to 10 milli-Manhattan-Projects to scale GPT-3 100× to a trivial thing like human-like performance in many domains⸮ Many researchers feel that such a suggestion is absurd and refutes the entire idea of scaling machine learning research further; they asseverate that their favored approaches (you know, the ones which don’t work⁠⁠12⁠) will run far more efficiently, and that the field would be more productive if it instead focused on research which can be conducted by an impoverished goatherder on an old laptop running off solar panels.⁠⁠13⁠ Nonetheless, I think we can expect further scaling. (10×? No, 10× isn’t cool. You know what’s cool? ⁠100–1000×⁠, trained on a fancy new supercomputer⁠.) It is, after all, easier to make something efficient after it exists than before.\nScaling\nHow far will scaling go? The scaling papers suggest that the leaps we have seen over the past few years are not even half way there in terms of absolute likelihood loss, never mind what real-world capabilities each additional decrement translates into. The scaling curves are clean; from “Scaling Laws for Neural Language Models”, Kaplan et al 2020⁠:\nDL scaling laws: compute, data, model parameters. (⁠Figure 1⁠)\nGPT-3 represents ~103 on this chart, leaving plenty of room for further loss decreases—especially given the ⁠uncertainty in extrapolation⁠:\nProjecting DL power laws: still room beyond GPT-3.\nLo and behold, the scaling laws continue for GPT-3 models for several orders past ⁠Kaplan et al 2020⁠; from ⁠Brown et al 2020⁠:\nGPT-3 continues to scale as predicted. (Note GPT-3’s curve has not ‘bounced’, and it trained only ~0.5 epochs, see ⁠Table 2.2⁠)\nIf we see such striking gains in halving the validation loss but with so far left to go, what is left to emerge as we third or halve again? How far does this go, exactly? How do we predict what emerges when? Bueller? Bueller? (See also ⁠Meena’s perplexity vs human-ness chatbot ratings⁠, GPT-3-written news articles’ ⁠probability of fooling humans by parameter count⁠, and ⁠GPT-3 model size vs Q&A⁠ from Hendrycks et al 2020⁠.)\nBlessings Of Scale\nExtrapolating the spectacular performance of GPT-3 into the future suggests that the answer to life, the universe and everything is just 4.398 trillion parameters.\nGeoff Hinton⁠\nWe don’t know how to train NNs. The blessings of scale is the observation that for deep learning, hard problems are easier to solve than easy problems—everything gets better as it gets larger (in contrast to the usual outcome in research, where small things are hard and large things impossible). The bigger the neural net/compute/data/problem, the faster it learns, the better it learns, the stabler it learns, and so on. A problem we can’t solve at all at small n may suddenly become straightforward with millions or billions of n. “NNs are lazy”: they can do far more than we make them do when we push them beyond easy answers & cheap shortcuts. The bitter lesson is the harder and bigger, the better. (Besides GPT-3, one could mention recent progress in semi-supervised learning & the model-based DRL renaissance.)\nAlphaGo Zero: ‘just stack moar layers lol!’\nBlessings of scale: stability → generalization → meta-learning. GPT-3 is hamstrung by its training & data, but DL enjoys an unreasonably effective blessing of dimensionality⁠—just simply training a big model on a lot of data induces better properties like meta-learning without even the slightest bit of that architecture being built in; and in general, training on more and harder tasks creates ever more human-like performance, generalization, and robustness. The GPT natural-language & programming language models, iGPT⁠/Vision Transformer⁠ for images (and to some degree GPT-f⁠), show that simply scaling up models & datasets without any supervision produces results competitive with the best (and most complex) alternatives, using the same simple architecture, gradually passing from superficial surface correlations to more human-like brain activity (Schrimpf et al 2020⁠) and linguistic biases as data increases (eg. Warstadt et al 2020⁠). In fact, one may not even need complicated attention mechanisms at scale, as fully-connected networks—hard to get much simpler than them!—work surprisingly well⁠ for many tasks. One typically trains such large models with simple optimizers like Adam—because the complicated ones lose their advantages as batch sizes increase and the simple optimizers work fine⁠ and are more memory-efficient anyway. ⁠OA5⁠ does not just scale to, but ⁠stabilizes at⁠, minibatches of millions due to gradient noise⁠. OA5-like, BigGAN⁠ stabilizes at large-scale image datasets like JFT-300M & benefits from unusually large minibatches and VAEs (long an also-ran to GANs or autoregressive models in terms of sharp image generation) catch up if you make them very deep (Child 2020⁠, Vahdat & Kautz 2020⁠); while classifier CNNs like BiT⁠⁠⁠14⁠/Dojolonga et al 2020⁠ or ResNeXt⁠ or Noisy Student⁠ transfer & robustify⁠ with⁠ human-like errors⁠⁠15⁠, multimodal learning produces better representations on fewer data (eg. ViLBERT⁠/VideoBERT⁠, motivating OA’s interest in big multimodal models⁠), and RNNs can predict videos⁠. AlphaStar⁠ reaches human-level with hundreds of competing self-players to cover possible strategies. Imitation learning DRL like MetaMimic⁠ generalizes at hundreds of tasks to train a deep net. Disentanglement emerges in StyleGAN⁠ with sufficiently deep w embeddings, with enough parameters to train raw audio in the aforementioned Jukebox, or in relational networks⁠/GQN⁠/Transformers⁠ with enough samples to force factorization. (See also Hill et al 2019⁠/Chaplot et al 2017⁠/Yu et al 2018⁠/Lake 2019⁠/Interactive Agents Group 2020⁠.) Training Dactyl⁠ (or humanoid robots⁠) on millions of domain randomizations induced similar implicit meta-learning where during each runtime invocation, the RNN probes its environment and encodes its understanding of robot hand control into its hidden state; and DD-PPO⁠ outperforms classical robot planners by scaling 2 orders. Or in Procgen⁠ or CoinRun⁠, training on hundreds of levels trains agents to solve levels individually and worsens performance on other levels, but at thousands of levels, they begin to generalize to unseen levels. (Similarly, language model pretraining-finetuning⁠ overfits at small numbers of datasets but improves markedly with enough diversity.) AlphaZero⁠ demonstrated truly superhuman Go without ‘delusions’ just by training a bigger model on a richer signal & pro-level play without any search—and MuZero⁠, for that matter, demonstrated that just training an RNN end-to-end to predict a reward on enough data is enough to obsolete even AlphaZero and learn tree search implicitly (but better). And on and on. DM researcher ⁠Matthew Botvinick⁠, discussing their meta-reinforcement learning work where they were surprised to discover meta-learning emerging, and that it did so regardless of which specific architecture they used:\n…it’s something that just happens. In a sense, you can’t avoid this happening. If you have a system that has memory, and the function of that memory is shaped by reinforcement learning, and this system is trained on a series of interrelated tasks, this is going to happen. You can’t stop it.\nPace Breiman⁠, why? Why do they transfer and generalize? Why do these blessings of scale exist? Why do we need to train large models when small models provably exist with the same performance? Why do larger models not overfit (though they can⁠) and generalize better than smaller models? What’s up with the whole ‘double descent’⁠ anyway?\nThese are all, ahem, deep questions about neural networks and heavily debated, but right now, I would suggest that the answer lies in some mix of the model compression/distillation, ‘lottery ticket hypothesis’⁠, Bayesian neural network⁠, and learned representation⁠ (like circuits⁠) literatures.\nBig models work because they encode a dizzyingly vast number of sub-models in an extremely high-dimensional abstract space, representing countless small sub-models (Orseau et al 2020⁠) interpolating over data⁠, one of which is likely to solve the problem well, and so ensures the problem is soluble by the overall model. They function as an ensemble: even though there are countless overfit sub-models inside the single big model, they all average out, leading to a preference for simple solutions. This Occam’s razor biases the model towards simple solutions which are flexible enough to gradually expand in complexity to match the data.\nHowever, “neural nets are lazy”: sub-models which memorize pieces of the data, or latch onto superficial features, learn quickest and are the easiest to represent internally. If the model & data & compute are not big or varied enough, the optimization, by the end of the cursory training, will have only led to a sub-model which achieves a low loss but missed important pieces of the desired solution.\nOn the other hand, for a model like GPT-3, it is sufficiently powerful a model that its sub-models can do anything from poetry to arithmetic, and it is trained on so much data that those superficial models may do well early on, but gradually fall behind more abstract models; a sub-model which memorizes some of the data is indeed much simpler than a sub-model which encodes genuine arithmetic (a NN can probably memorize tens of thousands of lookup table entries storing examples of addition in the space it would take to encode an abstract algorithm like ‘addition’), but it can’t possibly memorize all the instances of arithmetic (implicit or explicit) in GPT-3’s Internet-scale dataset. If a memorizing sub-model tried to do so, it would become extremely large and penalized. Eventually, after enough examples and enough updates, there may be a phase transition (⁠Viering & Loog 2021⁠), and the simplest ‘arithmetic’ model which accurately predicts the data just is arithmetic. And then the meta-learning, after seeing enough instances of algorithms which vary slightly within each sample, making it hard to learn each task separately, just is learning of more generic algorithms, yielding sub-models which achieve lower loss than the rival sub-models, which either fail to predict well or bloat unacceptably. (GPT-2-1.5b apparently was too small or shallow to ensemble easily over sub-models encoding meta-learning algorithms, or perhaps not trained long enough on enough data to locate the meta-learner models; GPT-3 was.)\nSo, the larger the model, the better, if there is enough data & compute to push it past the easy convenient sub-models and into the sub-models which express desirable traits like generalizing, factorizing perception into meaningful latent dimensions, meta-learning tasks based on descriptions, learning causal reasoning & logic, and so on. If the ingredients are there, it’s going to happen.\nScaling Hypothesis\nThe strong scaling hypothesis is that, once we find a scalable architecture like self-attention or convolutions, which like the brain can be applied fairly uniformly (eg. “The Brain as a Universal Learning Machine”⁠ or Hawkins), we can simply train ever larger NNs and ever more sophisticated behavior will emerge naturally as the easiest way to optimize for all the tasks & data. More powerful NNs are ‘just’ scaled-up weak NNs, in much the same way that human brains look much like scaled-up primate brains⁠.\nWhile I was highly skeptical of scaling hypothesis advocates when I first became interested in AI 2004–6201016ya (back when AI was stuck in the doldrums of hopelessly narrow tools and dates like 2028 seemed impossibly far away), which smacked of numerology and “if you build it they will come” logic (at the time, we certainly didn’t have general algorithms that you could just throw compute at), in 2020, I have to admit, I was wrong and they were right. We built the compute, and the algorithms did come, and the scaling hypothesis has only looked more and more plausible every year since 201016ya.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:The Scaling Hypothesis — Scaling", "source_line_range": [ 1, 55 ] }, { "id": "body-region-2", "text": "why does pretraining work the pretraining thesis goes something like this figure 1 envisioned evolution of nlp research through three different eras or curves the hypothetical s curves progress in natural language modeling from cambria white 2014 humans one might say are the cyanobacteria of ai we constantly emit large amounts of structured data which implicitly rely on logic causality object permanence history all of that good stuff all of that is implicit and encoded into our writings and videos and data exhaust a model learning to predict must learn to understand all of that to get the best performance as it predicts the easy things which are mere statistical pattern matching what s left are the hard things ai critics often say that the long tail of scenarios for tasks like self driving cars or natural language can only be solved by true generalization reasoning it follows then that if models solve the long tail they must learn to generalize reason early on in training a model learns the crudest levels that some letters like e are more frequent than others like z that every 5 characters or so there is a space and so on it goes from predicted uniformly distributed bytes to what looks like base 60 encoding alphanumeric gibberish as crude as this may be it s enough to make quite a bit of absolute progress a random predictor needs 8 bits to predict a byte character but just by at least matching letter and space frequencies it can almost halve its error to around 5 bits 16 because it is learning so much from every character and because the learned frequencies are simple it can happen so fast that if one is not logging samples frequently one might not even observe the improvement as training progresses the task becomes more difficult now it begins to learn what words actually exist and do not exist it doesn t know anything about meaning but at least now when it s asked to predict the second half of a word it can actually do that to some degree saving it a few more bits this takes a while because any specific instance will show up only occasionally a word may not appear in a dozen samples and there are many thousands of words to learn with some more work it has learned that punctuation pluralization possessives are all things that exist put that together and it may have progressed again all the way down to 3 4 bits error per character while the progress is gratifyingly fast it s still all gibberish though makes no mistake a sample may be spelled correctly but it doesn t make even a bit of sense but once a model has learned a good english vocabulary and correct formatting spelling what s next there s not much juice left in predicting within words the next thing is picking up associations among words what words tend to come first what words cluster and are often used nearby each other nautical terms tend to get used a lot with each other in sea stories and likewise bible passages or american history wikipedia article and so on if the word jefferson is the last word then washington may not be far away and it should hedge its bets on predicting that w is the next character and then if it shows up go all in on ashington such bag of words approaches still predict badly but now we re down to perhaps 3 bits per character what next does it stop there not if there is enough data and the earlier stuff like learning english vocab doesn t hem the model in by using up its learning ability gradually other words like president or general or after begin to show the model subtle correlations jefferson was president after with many such passages the word after begins to serve a use in predicting the next word and then the use can be broadened by this point the loss is perhaps 2 bits every additional 0 1 bit decrease comes at a steeper cost and takes more time however now the sentences have started to make sense a sentence like jefferson was president after washington does in fact mean something and if occasionally we sample washington was president after jefferson well what do you expect from such an un converged model jarring errors will immediately jostle us out of any illusion about the model s understanding and so training continues around here markov chain n gram models start to fall behind they can memorize increasingly large chunks of the training corpus but they can t solve increasingly critical syntactic tasks like balancing parentheses or quotes much less start to ascend from syntax to semantics now training is hard even subtler aspects of language must be modeled such as keeping pronouns consistent this is hard in part because the model s errors are becoming rare and because the relevant pieces of text are increasingly distant and long range as it makes progress the absolute size of errors shrinks dramatically consider the case of associating names with gender pronouns the difference between janelle ate some ice cream because he likes sweet things like ice cream and janelle ate some ice cream because she likes sweet things like ice cream is one no human could fail to notice and yet it is a difference of a single letter if we compared two models one of which didn t understand gender pronouns at all and guessed he she purely at random and one which understood them perfectly and always guessed she the second model would attain a lower average error of barely 0 02 bits per character nevertheless as training continues these problems and more like imitating genres get solved and eventually at a loss of 1 2 where a small char rnn might converge on a small corpus like shakespeare or some project gutenberg ebooks we will finally get samples that sound human at least for a few sentences these final samples may convince us briefly but aside from issues like repetition loops even with good samples the errors accumulate a sample will state that someone is alive and then 10 sentences later use the word dead or it will digress into an irrelevant argument instead of the expected next argument or someone will do something physically improbable or it may just continue for a while without seeming to get anywhere all of these errors are far less than 0 02 bits per character we are now talking not hundredths of bits per characters but less than ten thousandths the pretraining thesis argues that this can go even further we can compare this performance directly with humans doing the same objective task who can achieve closer to 0 7 bits per character what is in that missing 0 4 yeah but there s more to being smart than knowing compression schemes no there s not shoot he knows the secret well everything everything that the model misses while just babbling random words was good enough at the beginning at the end it needs to be able to reason our way through the most difficult textual scenarios requiring causality or commonsense reasoning every error where the model predicts that ice cream put in a freezer will melt rather than freeze every case where the model can t keep straight whether a person is alive or dead every time that the model chooses a word that doesn t help build somehow towards the ultimate conclusion of an essay every time that it lacks the theory of mind to compress novel scenes describing the machiavellian scheming of a dozen individuals at dinner jockeying for power as they talk every use of logic or abstraction or instructions or q a where the model is befuddled and needs more bits to cover up for its mistake where a human would think understand and predict for a language model the truth is that which keeps on predicting well because truth is one and error many each of these cognitive breakthroughs allows ever so slightly better prediction of a few relevant texts nothing less than true understanding will suffice for ideal prediction if we trained a model which reached that loss of 0 7 which could predict text indistinguishable from a human whether in a dialogue or quizzed about ice cream or being tested on sat analogies or tutored in mathematics if for every string the model did just as good a job of predicting the next character as you could do how could we say that it doesn t truly understand everything if nothing else we could by definition replace humans in any kind of text writing job the last bits are deepest the implication here is that the final few bits are the most valuable bits which require the most of what we think of as intelligence collobert et al 2011 shannon 1951 has estimated the entropy of the english language 0 6 1 3 bits per character by asking human subjects to guess upcoming characters teahan cleary 1996 obtain entropies as low as 1 46 bits per character using variable length character n grams the human subjects rely of course on all their knowledge of the language and of the world can we learn the grammatical structure of the english language and the nature of the world by leveraging the 0 2 bits per character that separate human subjects from simple n gram models a helpful analogy here might be our actions for the most part all humans execute actions equally well we all pick up a tea mug without dropping and can lift our legs to walk down thousands of steps without falling even once for everyday actions the sort which make up most of a corpus anybody of any intelligence can get enough practice feedback to do them quite well learning individual algorithms to solve each class of problems extremely well in isolation 17 meanwhile for rare problems there may be too few instances to do any better than memorize the answer in the middle of the spectrum are problems which are similar but not too similar to other problems these are the sorts of problem which reward flexible meta learning and generalization and many intermediate problems may be necessary to elicit those capabilities neural nets are lazy where individuals differ is when they start running into the long tail of novel choices rare choices choices that take seconds but unfold over a lifetime choices where we will never get any feedback like after our death one only has to make a single bad decision out of a lifetime of millions of discrete decisions to wind up in jail or dead a small absolute average improvement in decision quality if it is in those decisions may be far more important than its quantity indicates and give us some intuition for why those last bits are the hardest deepest why do humans have such large brains when animals like chimpanzees do so many ordinary activities seemingly as well with a fraction of the expense why is language worthwhile perhaps because of considerations like these we may be at our most human while filling out the paperwork for life insurance reasons for doubt the pretraining thesis while logically impeccable how is a model supposed to solve all possible trick questions without understanding just guessing never struck me as convincing an argument admitting neither confutation nor conviction it feels too much like a magic trick here s some information theory here s a human benchmark here s how we can encode all tasks as a sequence prediction problem hey presto intelligence there are lots of algorithms which are turing complete or universal in some sense there are lots of algorithms like aixi which solve ai in some theoretical sense schmidhuber company have many of these cute algorithms such as the fastest possible algorithm for all problems with the minor catch of some constant factors which require computers bigger than the universe why think pretraining or sequence modeling is not another one of them sure if the model got a low enough loss it d have to be intelligent but how could you prove that would happen in practice training char rnns was fun but they hadn t exactly revolutionized deep learning it might require more text than exists countless petabytes of data for all of those subtle factors like logical reasoning to represent enough training signal amidst all the noise and distractors to train a model or maybe your models are too small to do more than absorb the simple surface level signals and you would have to scale them 100 orders of magnitude for it to work because the scaling curves didn t cooperate or maybe your models are fundamentally broken and stuff like abstraction require an entirely different architecture to work at all and whatever you do your current models will saturate at poor performance or it ll train but it ll spend all its time trying to improve the surface level modeling absorbing more and more literal data and facts without ever ascending to the higher planes of cognition as planned or the possibilities of developing an atomic weapon and the desirability of doing it secretly were discussed at a princeton university conference in which i participated in march 193987ya bohr said this rare variety could not be separated from common uranium except by turning the country into a gigantic factory bohr was worried that this could be done and that an atomic bomb could be developed but he hoped that neither could be accomplished years later when bohr came to los alamos i was prepared to say you see but before i could open my mouth he said you see i told you it couldn t be done without turning the whole country into a factory you have done just that edward teller 18 but apparently it would ve worked fine even rnns probably would ve worked transformers are nice but they seem mostly be about efficiency 19 training large rnns is much more expensive and doing bptt over multiple nodes is much harder engineering wise it just required more compute data than anyone was willing to risk on it until a few true believers were able to get their hands on a few million dollars of compute q did anyone predict quantitatively that this would happen where it did a not that i know of q what would future scaled up models learn gpt 2 1 5b had a cross entropy webtext validation loss of 3 3 based on the perplexity of 10 in figure 4 and log2 10 3 32 gpt 3 halved that loss to 1 73 judging from brown et al 2020 and using the scaling formula 2 57 3 64 103 0 048 for a hypothetical gpt 4 if the scaling curve continues for another 3 orders or so of compute 100 1000 before crossing over and hitting harder diminishing returns the cross entropy loss will drop to 1 24 2 57 3 64 103 103 0 048 if gpt 3 gained so much meta learning and world knowledge by dropping its absolute loss 50 when starting from gpt 2 s level what capabilities would another 30 improvement over gpt 3 gain cutting the loss that much would still not reach human level as far as i can tell 20 what would a drop to 1 perhaps using wider context windows or recurrency gain a i don t know q does anyone a not that i know of 21", "source_text": "Why Does Pretraining Work?\nThe pretraining thesis goes something like this:\n“Figure 1: Envisioned evolution of NLP research through three different eras or curves” (the hypothetical S-curves & progress in natural language modeling; from Cambria & White 2014⁠)\nHumans, one might say, are the cyanobacteria of AI⁠: we constantly emit large amounts of structured data, which implicitly rely on logic, causality, object permanence, history—all of that good stuff. All of that is implicit and encoded into our writings and videos and ‘data exhaust’. A model learning to predict must learn to understand all of that to get the best performance; as it predicts the easy things which are mere statistical pattern-matching, what’s left are the hard things. AI critics often say that the long tail of scenarios for tasks like self-driving cars or natural language can only be solved by true generalization & reasoning; it follows then that if models solve the long tail, they must learn to generalize & reason.\nEarly on in training, a model learns the crudest levels: that some letters like ‘e’ are more frequent than others like ‘z’, that every 5 characters or so there is a space, and so on. It goes from predicted uniformly-distributed bytes to what looks like Base-60 encoding—alphanumeric gibberish. As crude as this may be, it’s enough to make quite a bit of absolute progress: a random predictor needs 8 bits to ‘predict’ a byte/character, but just by at least matching letter and space frequencies, it can almost halve its error to around 5 bits.⁠⁠16⁠ Because it is learning so much from every character, and because the learned frequencies are simple, it can happen so fast that if one is not logging samples frequently, one might not even observe the improvement.\nAs training progresses, the task becomes more difficult. Now it begins to learn what words actually exist and do not exist. It doesn’t know anything about meaning, but at least now when it’s asked to predict the second half of a word, it can actually do that to some degree, saving it a few more bits. This takes a while because any specific instance will show up only occasionally: a word may not appear in a dozen samples, and there are many thousands of words to learn. With some more work, it has learned that punctuation, pluralization, possessives are all things that exist. Put that together, and it may have progressed again, all the way down to 3–4 bits error per character! (While the progress is gratifyingly fast, it’s still all gibberish, though, makes no mistake: a sample may be spelled correctly, but it doesn’t make even a bit of sense.)\nBut once a model has learned a good English vocabulary and correct formatting/spelling, what’s next? There’s not much juice left in predicting within-words. The next thing is picking up associations among words. What words tend to come first? What words ‘cluster’ and are often used nearby each other? Nautical terms tend to get used a lot with each other in sea stories, and likewise Bible passages, or American history Wikipedia article, and so on. If the word “Jefferson” is the last word, then “Washington” may not be far away, and it should hedge its bets on predicting that ‘W’ is the next character, and then if it shows up, go all-in on “ashington”. Such bag-of-words approaches still predict badly, but now we’re down to perhaps <3 bits per character.\nWhat next? Does it stop there? Not if there is enough data and the earlier stuff like learning English vocab doesn’t hem the model in by using up its learning ability. Gradually, other words like “President” or “general” or “after” begin to show the model subtle correlations: “Jefferson was President after…” With many such passages, the word “after” begins to serve a use in predicting the next word, and then the use can be broadened.\nBy this point, the loss is perhaps 2 bits: every additional 0.1 bit decrease comes at a steeper cost and takes more time. However, now the sentences have started to make sense. A sentence like “Jefferson was President after Washington” does in fact mean something (and if occasionally we sample “Washington was President after Jefferson”, well, what do you expect from such an un-converged model). Jarring errors will immediately jostle us out of any illusion about the model’s understanding, and so training continues. (Around here, Markov chain & n-gram models start to fall behind; they can memorize increasingly large chunks of the training corpus, but they can’t solve increasingly critical syntactic tasks like balancing parentheses or quotes, much less start to ascend from syntax to semantics.)\nNow training is hard. Even subtler aspects of language must be modeled, such as keeping pronouns consistent. This is hard in part because the model’s errors are becoming rare, and because the relevant pieces of text are increasingly distant and ‘long-range’. As it makes progress, the absolute size of errors shrinks dramatically. Consider the case of associating names with gender pronouns: the difference between “Janelle ate some ice cream, because he likes sweet things like ice cream” and “Janelle ate some ice cream, because she likes sweet things like ice cream” is one no human could fail to notice, and yet, it is a difference of a single letter. If we compared two models, one of which didn’t understand gender pronouns at all and guessed ‘he’/‘she’ purely at random, and one which understood them perfectly and always guessed ‘she’, the second model would attain a lower average error of barely <0.02 bits per character!\nNevertheless, as training continues, these problems and more, like imitating genres, get solved, and eventually at a loss of 1–2 (where a small char-RNN might converge on a small corpus like Shakespeare or some Project Gutenberg ebooks), we will finally get samples that sound human—at least, for a few sentences. These final samples may convince us briefly, but, aside from issues like repetition loops, even with good samples, the errors accumulate: a sample will state that someone is “alive” and then 10 sentences later, use the word “dead”, or it will digress into an irrelevant argument instead of the expected next argument, or someone will do something physically improbable, or it may just continue for a while without seeming to get anywhere.\nAll of these errors are far less than <0.02 bits per character; we are now talking not hundredths of bits per characters but less than ten-thousandths.\nThe pretraining thesis argues that this can go even further: we can compare this performance directly with humans doing the same objective task, who can achieve closer to ⁠0.7 bits per character⁠. What is in that missing >0.4?\n“Yeah, but there’s more to being smart than knowing compression schemes!” “No there’s not!” “Shoot—he knows the secret!!”\nWell—everything! Everything that the model misses. While just babbling random words was good enough at the beginning, at the end, it needs to be able to reason our way through the most difficult textual scenarios requiring causality or commonsense reasoning. Every error where the model predicts that ice cream put in a freezer will “melt” rather than “freeze”, every case where the model can’t keep straight whether a person is alive or dead, every time that the model chooses a word that doesn’t help build somehow towards the ultimate conclusion of an ‘essay’, every time that it lacks the theory of mind to compress novel scenes describing the Machiavellian scheming of a dozen individuals at dinner jockeying for power as they talk, every use of logic or abstraction or instructions or Q&A where the model is befuddled and needs more bits to cover up for its mistake where a human would think, understand, and predict. For a language model, the truth is that which keeps on predicting well—because truth is one and error many. Each of these cognitive breakthroughs allows ever so slightly better prediction of a few relevant texts; nothing less than true understanding will suffice for ideal prediction.\nIf we trained a model which reached that loss of <0.7, which could predict text indistinguishable from a human, whether in a dialogue or quizzed about ice cream or being tested on SAT analogies or tutored in mathematics, if for every string the model did just as good a job of predicting the next character as you could do, how could we say that it doesn’t truly understand everything? (If nothing else, we could, by definition, replace humans in any kind of text-writing job!)\nThe last bits are deepest. The implication here is that the final few bits are the most valuable bits, which require the most of what we think of as intelligence. Collobert et al 2011⁠:\nShannon 1951 has estimated the entropy of the English language 0.6–1.3 bits per character by asking human subjects to guess upcoming characters….⁠Teahan & Cleary 1996 obtain entropies as low as 1.46 bits per character using variable length character n-grams. The human subjects rely of course on all their knowledge of the language and of the world.\nCan we learn the grammatical structure of the English language and the nature of the world by leveraging the 0.2 bits per character that separate human subjects from simple n-gram models?\nA helpful analogy here might be our actions: for the most part, all humans execute actions equally well. We all pick up a tea mug without dropping, and can lift our legs to walk down thousands of steps without falling even once. For everyday actions (the sort which make up most of a corpus), anybody, of any intelligence, can get enough practice & feedback to do them quite well, learning individual algorithms to solve each class of problems extremely well, in isolation.⁠⁠17⁠ Meanwhile for rare problems, there may be too few instances to do any better than memorize the answer. In the middle of the spectrum are problems which are similar but not too similar to other problems; these are the sorts of problem which reward flexible meta-learning and generalization, and many intermediate problems may be necessary to elicit those capabilities⁠ (“neural nets are lazy”).\nWhere individuals differ is when they start running into the long tail of novel choices, rare choices, choices that take seconds but unfold over a lifetime, choices where we will never get any feedback (like after our death). One only has to make a single bad decision, out of a lifetime of millions of discrete decisions, to wind up in jail or dead. A small absolute average improvement in decision quality, if it is in those decisions, may be far more important than its quantity indicates, and give us some intuition for why those last bits are the hardest/deepest. (Why do humans have such large brains, when animals like chimpanzees do so many ordinary activities seemingly as well with a fraction of the expense? Why is language worthwhile? Perhaps because of considerations like these. We may be at our most human while filling out the paperwork for life insurance.)\nReasons for doubt. The pretraining thesis, while logically impeccable—how is a model supposed to solve all possible trick questions without understanding, just guessing?—never struck me as convincing, an argument admitting neither confutation nor conviction. It feels too much like a magic trick: “here’s some information theory, here’s a human benchmark, here’s how we can encode all tasks as a sequence prediction problem, hey presto—Intelligence!” There are lots of algorithms which are Turing-complete or ‘universal’ in some sense; there are lots of algorithms like AIXI which solve AI in some theoretical sense (Schmidhuber & company have many of these cute algorithms such as ‘the fastest possible algorithm for all problems’, with the minor catch of some constant factors which require computers bigger than the universe).\nWhy think pretraining or sequence modeling is not another one of them? Sure, if the model got a low enough loss, it’d have to be intelligent, but how could you prove that would happen in practice? (Training char-RNNs was fun, but they hadn’t exactly revolutionized deep learning.) It might require more text than exists, countless petabytes of data for all of those subtle factors like logical reasoning to represent enough training signal, amidst all the noise and distractors, to train a model. Or maybe your models are too small to do more than absorb the simple surface-level signals, and you would have to scale them 100 orders of magnitude for it to work, because the scaling curves didn’t cooperate. Or maybe your models are fundamentally broken, and stuff like abstraction require an entirely different architecture to work at all, and whatever you do, your current models will saturate at poor performance. Or it’ll train, but it’ll spend all its time trying to improve the surface-level modeling, absorbing more and more literal data and facts without ever ascending to the higher planes of cognition as planned. Or…\n‘The possibilities of developing an atomic weapon and the desirability of doing it secretly were discussed at a Princeton University conference in which I participated in March 193987ya…Bohr⁠ said this rare variety could not be separated from common uranium except by turning the country into a gigantic factory. Bohr was worried that this could be done and that an atomic bomb could be developed—but he hoped that neither could be accomplished. Years later, when Bohr came to Los Alamos, I was prepared to say, “You see . . .” But before I could open my mouth, he said: “You see, I told you it couldn’t be done without turning the whole country into a factory. You have done just that.”’\nEdward Teller⁠⁠⁠18⁠\nBut apparently, it would’ve worked fine. Even RNNs probably would’ve worked—Transformers are nice, but they seem mostly be about efficiency.⁠⁠19⁠ (Training large RNNs is much more expensive, and doing BPTT over multiple nodes is much harder engineering-wise.) It just required more compute & data than anyone was willing to risk on it until a few true-believers were able to get their hands on a few million dollars of compute.\nQ: Did anyone predict, quantitatively, that this would happen where it did?\nA: Not that I know of.\nQ: What would future scaled-up models learn?\nGPT-2-1.5b had a cross-entropy WebText validation loss of ~3.3 (based on the perplexity of ~10 in ⁠Figure 4⁠, and log2(10) = 3.32). GPT-3 halved that loss to ~1.73 judging from ⁠Brown et al 2020⁠ and using the scaling formula (2.57 × (3.64 × 103)−0.048). For a hypothetical GPT-4, if the scaling curve continues for another 3 orders or so of compute (100–1000×) before crossing over and hitting harder diminishing returns, the cross-entropy loss will drop to ~1.24 (2.57 × (3.64 × (103 × 103))−0.048).\nIf GPT-3 gained so much meta-learning and world knowledge by dropping its absolute loss ~50% when starting from GPT-2’s level, what capabilities would another ~30% improvement over GPT-3 gain? (Cutting the loss that much would still not reach human-level, as far as I can tell.⁠⁠20⁠) What would a drop to ≤1, perhaps using wider context windows or recurrency, gain?\nA: I don’t know.\nQ: Does anyone?\nA: Not that I know of.⁠⁠21⁠", "segmentation_method": "reviewed_source_semantics", "label": "Why Does Pretraining Work?", "source_line_range": [ 56, 89 ] }, { "id": "body-region-3", "text": "prospects in the problem of decoding the most important information which we can possess is the knowledge that the message which we are reading is not gibberish in a similar way when we consider a problem of nature such as that of atomic reactions and atomic explosives the largest single item of information which we can make public is that they exist once a scientist attacks a problem which he knows to have an answer his entire attitude is changed he is already some 50 of his way toward that answer the one secret concerning the atomic bomb which might have been kept and which was given to the public and to all potential enemies without the least inhibition was that of the possibility on its construction take a problem of this importance and assure the scientific world that it has an answer then both the intellectual ability of the scientists and the existing laboratory facilities are so widely distributed that the quasi independent realization of the task will be a matter of merely a few years anywhere in the world norbert wiener pg124 125 the human use of human beings emphasis added people who work in machine learning simply didn t think that neural networks could do much people didn t believe large neural networks could be trained the ideas were all there the thing that was missing was a lot of supervised data and a lot of compute once you have those two then there is a third thing is that is needed and that is conviction conviction that if you take the right stuff which already exists and apply and mix it with a lot of data and a lot of compute that it will in fact work and so that was the missing piece ilya sutskever 22 what can we expect from future dl work will gpt 3 kickstart an arms race where soon we will be discussing blasé what would seem now like ludicrously farfetched schemes like bidirectional multimodal transformer 100 the size trained on 100 the data video text pdfs as images photo robotics with supplementary supervised learning as the backbone of a muzero like learning planning drl agent running on thousands of tasks such as coding simultaneously roughly yes editor 2025 10 19 the existence of the hardware overhang implies that the limiting factor here is less hardware than human will any organization treat gpt 3 as a sputnik moment and invest aggressively in scaling programs is there a gpt 4 equivalent brewing away inside deepmind or google brain s tpu pods now they aren t stupid they have the hardware they have the budgets they have the people but i think they lack a vision as far as i can tell they do not have any such thing because google brain deepmind do not believe in the scaling hypothesis the way that sutskever amodei and others at oa do just read through machine learning twitter to see the disdain for the scaling hypothesis a quarter year on from gpt 3 and counting can you name a single dense model as large as the 17b turing nlg never mind larger than gpt 3 google brain is entirely too practical and short term focused to dabble in such esoteric expensive speculation although quoc v le s group occasionally surprises you they ll dabble in mixture of expert models like gshard but mostly because they expect to be likely to be able to deploy it or something like it to production in google translate 23 why didn t deepmind do gpt 3 deepmind 24 holds what we might call the weak scaling hypothesis they believe that agi will require us to find the right algorithms effectively replicating a mammalian brain module by module and that while these modules will be extremely large expensive by contemporary standards which is why compute is important to give us a more powerful tool with which to hunt for the right algorithms they still need to be invented finetuned piece by piece with little risk or surprise until the final assembly each piece however itself can scale there s no magical intelligence gland or quantum woo which creates a bright line between humans and say chimpanzees or rodents as much as we humans extravagantly admire our own capabilities like language or logic those are relatively minor flourishes on the basic brain each organism solves the same basic problems like exploration long term memory learning world models associating rewards with specific actions meta learning etc as such once you have a rat level agi a human level agi is just more so and rats are a lot easier to experiment on that is how you get dm contraptions like agent57 which throw the kitchen sink at the wall to see what sticks and why they place such emphasis on neuroscience as inspiration and cross fertilization for reverse engineering the brain see also sam altman s podcast interview comments on oa s advantage vs unnamed rivals with more compute is because the lack of compute makes them stay small and focused for sure like a startup approach when someone seems to have come up with a scalable architecture for cracking a hard problem like alphazero or alphastar they are willing to pour on the gas to make it scale but otherwise incremental refinement on ale and then dmlab 30 is the game plan they have been biting off and chewing pieces of the brain for a decade and it ll probably take another decade or two of steady chewing if all goes well because they have locked up so much talent and have so much proprietary code and believe all of that is a major moat to any competitor trying to replicate the complicated brain they are fairly easygoing you will not see dm bet the company on any moonshot google s cashflow isn t going anywhere and dm s budget and slow and steady wins the race going beyond that most other research labs like tesla or fair are irrelevant and uninterested chinese ai companies are a question mark past the language barrier i seem to discern interest in agi little of the reflexive western opposition and companies like baidu occasionally release important research such as the early scaling paper hestness et al 2017 but overall chinese ai may be overestimated and they seem to suffer from a kind of dutch disease funding for surveillance technology and for narrow e commerce niches is so plentiful that other areas are neglected oa lacking anything like dm s long term funding from google or its enormous headcount is making a startup like bet that they know an important truth which is a secret the scaling hypothesis is true so simple drl algorithms like ppo on top of large simple architectures like rnns or transformers can emerge exploiting the blessings of scale and meta learn their way to powerful capabilities enabling further funding for still more compute scaling in a virtuous cycle this is why oa had to revise its corporate form lacking any enormous endowment or extremely deep pocketed patron like google where does it get the money to scale or hire machine learning engineer researchers who can command salaries in the millions oa has to earn the necessary money so in a move like mozilla foundation owning mozilla corporation to sell firefox search engine placement or the hershey orphanage owning hershey chocolate or the girl scouts licensing their cookies openai switched from a pure nonprofit funded by donations to a nonprofit which owns a for profit subsidiary startup openai lp which can take investments and engage in for profit activities oa lp while controlled by oa can then shoot for the moon and if oa is wrong to trust in the god of straight lines on graphs well they never could compete with dm directly using dm s favored approach and were always going to be an also ran footnote so they have no regret while all of this hypothetically can be replicated relatively easily never underestimate the amount of tweaking and special sauce it takes by competitors if they wished the necessary amounts of compute budgets are still trivial in terms of big science or other investments like alphago or alphastar or waymo after all said competitors lack the very most important thing which no amount of money or gpus can ever cure the courage of their convictions they are too hidebound and deeply philosophically wrong to ever admit fault and try to overtake oa until it s too late how can we talk seriously about any kind of military manhattan project when the us military doesn t even let its developers use tensorflow or pytorch or about government projects in the shadow of coronavirus this might seem absurd surely the bitter lesson scaling hypothesis have now earned enough prior probability to be taken seriously and receive major research investments to test how far they can go especially given how important the implications are but look at the repeated criticism of oa every time they release a new example of the scaling hypothesis from gpt 1 to dactyl to oa5 to gpt 2 to igpt to gpt 3 to paraphrase st augustine most peoples reaction to the bitter lesson or scaling hypothesis is grant me scale compute but not yet 25 a critical indicator will be whether organizations beyond the usual suspects microsoft zero 2 team has reached 1t scale training but there is also nvidia salesforce allen google dm gb connor eleutherai facebook fair start participating or if they continue to dismiss scaling at least as of 2020 10 26 152 days later no model has come near gpt 3 and indeed no model has even exceeded turing nlg s 17b 26", "source_text": "Prospects\nIn the problem of decoding, the most important information which we can possess is the knowledge that the message which we are reading is not gibberish…In a similar way, when we consider a problem of nature such as that of atomic reactions and atomic explosives, the largest single item of information which we can make public is that they exist. Once a scientist attacks a problem which he knows to have an answer, his entire attitude is changed. He is already some 50% of his way toward that answer…the one secret concerning the atomic bomb which might have been kept and which was given to the public and to all potential enemies without the least inhibition, was that of the possibility on its construction. Take a problem of this importance and assure the scientific world that it has an answer; then both the intellectual ability of the scientists and the existing laboratory facilities are so widely distributed that the quasi-independent realization of the task will be a matter of merely a few years anywhere in the world.\nNorbert Wiener⁠, pg124–125, The Human Use of Human Beings⁠ (emphasis added)\nPeople who work in machine learning simply didn’t think that neural networks could do much. People didn’t believe large neural networks could be trained…The ideas were all there, the thing that was missing was a lot of supervised data and a lot of compute. Once you have [those two], then there is a third thing is that is needed—and that is conviction. Conviction that if you take the right stuff, which already exists, and apply and mix it with a lot of data and a lot of compute, that it will in fact work. And so that was the missing piece.\n⁠Ilya Sutskever⁠⁠⁠22⁠\nWhat can we expect from future DL work? Will GPT-3 kickstart an arms race where soon we will be discussing, blasé, what would seem now like ludicrously farfetched schemes like bidirectional multimodal Transformer 100× the size trained on 100× the data (video/text/PDFs-as-images/photo/robotics) with supplementary supervised learning as the backbone of a MuZero-like learning+planning DRL agent running on thousands of tasks (such as coding) simultaneously? [Roughly, yes. —Editor 2025-10-19]\nThe existence of the hardware overhang⁠ implies that the limiting factor here is less hardware than human: will any organization treat GPT-3 as a Sputnik moment and invest aggressively in scaling programs? Is there a GPT-4-equivalent brewing away inside DeepMind or Google Brain’s TPU pods now? They aren’t stupid, they have the hardware, they have the budgets, they have the people.\nBut I think they lack a vision. As far as I can tell: they do not have any such thing, because Google Brain & DeepMind do not believe in the scaling hypothesis the way that Sutskever, Amodei and others at OA do. Just read through machine learning Twitter to see the disdain for the scaling hypothesis. (A quarter year on from GPT-3 and counting, can you name a single dense model as large as the 17b Turing-NLG—never mind larger than GPT-3?)\nGoogle Brain is entirely too practical and short-term focused to dabble in such esoteric & expensive speculation, although Quoc V. Le’s group occasionally surprises you. They’ll dabble in mixture-of-expert models⁠ like GShard⁠, but mostly because they expect to be likely to be able to deploy it or something like it to production in Google Translate.⁠⁠23⁠\nWhy didn’t DeepMind do GPT-3?⁠ DeepMind⁠⁠24⁠ holds what we might call the “weak scaling hypothesis”: they believe that AGI will require us to “find the right algorithms” effectively replicating a mammalian brain module by module, and that while these modules will be extremely large & expensive by contemporary standards (which is why compute is important, to give us “a more powerful tool with which to hunt for the right algorithms”), they still need to be invented & finetuned piece by piece, with little risk or surprise until the final assembly. Each piece, however, itself can scale: there’s no magical intelligence gland or quantum woo which creates a bright line between humans and, say, chimpanzees or rodents. (As much as we humans extravagantly admire our own capabilities like language or logic, those are relatively minor flourishes on the basic brain—each organism solves the same basic problems, like exploration, long-term memory, learning world-models, associating rewards with specific actions, meta-learning, etc.) As such, once you have a rat-level AGI, a human-level AGI is just more so. (And rats are a lot easier to experiment on.) That is how you get DM contraptions like Agent57⁠ which throw the kitchen sink at the wall to see what sticks, and why they place such emphasis on neuroscience as inspiration and cross-fertilization for reverse-engineering the brain. (See also Sam Altman’s ⁠podcast interview comments⁠ on OA’s advantage vs unnamed rivals with more compute is because the lack of compute makes them stay “small and focused”—“for sure” like a startup approach.) When someone seems to have come up with a scalable architecture for cracking a hard problem, like AlphaZero or AlphaStar, they are willing to pour on the gas to make it scale, but otherwise, incremental refinement on ALE and then DMLab-30⁠ is the game plan. They have been biting off and chewing pieces of the brain for a decade, and it’ll probably take another decade or two of steady chewing if all goes well. Because they have locked up so much talent and have so much proprietary code and believe all of that is a major moat to any competitor trying to replicate the complicated brain, they are fairly easygoing. You will not see DM ‘bet the company’ on any moonshot; Google’s cashflow isn’t going anywhere (and ⁠DM’s budget⁠), and slow and steady wins the race.\nGoing beyond that, most other research labs like Tesla or FAIR are irrelevant and uninterested. Chinese AI companies are a question mark: past the language barrier, I seem to discern interest in AGI & little of the reflexive Western opposition, and companies like Baidu occasionally release important research (such as the early scaling paper Hestness et al 2017⁠), but overall, Chinese AI may be overestimated, and they seem to suffer from a kind of Dutch disease—funding for surveillance technology, and for narrow e-commerce niches, is so plentiful that other areas are neglected.\nOA, lacking anything like DM’s long-term funding from Google or its enormous headcount, is making a startup-like bet that they know an important truth which is a secret: “the scaling hypothesis is true!” So, simple DRL algorithms like PPO on top of large simple architectures like RNNs or Transformers can emerge, exploiting the blessings of scale, and meta-learn their way to powerful capabilities, enabling further funding for still more compute & scaling, in a virtuous cycle. This is why OA had to revise its corporate form: lacking any enormous endowment or extremely deep-pocketed patron like Google, where does it get the money to scale (or hire machine learning engineer/researchers who can command salaries in the millions)? OA has to earn the necessary money, so in a move like Mozilla Foundation owning Mozilla Corporation (to sell Firefox search engine placement), or the Hershey orphanage owning Hershey Chocolate or the Girl Scouts licensing their cookies, OpenAI switched from a pure nonprofit funded by donations to a nonprofit which owns a for-profit subsidiary/startup, “OpenAI LP”, which can take investments and engage in for-profit activities. OA LP, while controlled by OA, can then shoot for the moon. And if OA is wrong to trust in the God of Straight Lines On Graphs⁠, well, they never could compete with DM directly using DM’s favored approach, and were always going to be an also-ran footnote, so they have no regret.\nWhile all of this hypothetically can be replicated relatively easily (never underestimate the amount of tweaking and special sauce it takes) by competitors if they wished (the necessary amounts of compute budgets are still trivial in terms of Big Science or other investments like AlphaGo or AlphaStar or Waymo, after all), said competitors lack the very most important thing, which no amount of money or GPUs can ever cure: the courage of their convictions. They are too hidebound and deeply philosophically wrong to ever admit fault and try to overtake OA until it’s too late. How can we talk seriously about any kind of military Manhattan Project when the US military ⁠doesn’t even let its developers use Tensorflow or PyTorch⁠, or about government projects in the shadow of coronavirus? This might seem absurd (surely the Bitter Lesson/scaling hypothesis have now earned enough prior probability to be taken seriously and receive major research investments to test how far they can go, especially given how important the implications are), but look at the repeated criticism of OA every time they release a new example of the scaling hypothesis, from GPT-1 to Dactyl to OA5 to GPT-2 to iGPT to GPT-3… To paraphrase St Augustine, most peoples’ reaction to the Bitter Lesson or scaling hypothesis is “grant me scale & compute—but not yet”.⁠⁠25⁠\nA critical indicator will be whether organizations beyond ‘the usual suspects’ (Microsoft ZeRO-2⁠ team has reached 1t-scale training⁠, but there is also Nvidia, Salesforce, Allen, Google DM/GB, Connor/EleutherAI, Facebook FAIR) start participating or if they continue to dismiss scaling. At least as of 2020-10-26, 152 days later, no model has come near GPT-3, and indeed, no model has even exceeded Turing-NLG’s 17b.⁠⁠26⁠", "segmentation_method": "reviewed_source_semantics", "label": "Prospects", "source_line_range": [ 90, 103 ] }, { "id": "body-region-4", "text": "critiquing the critics keeping trackhindsight is 20 20authority without accountabilityphatic not predictivethe iron law of bureaucracy cathedral gothic keeping track gpt 3 in 2020 makes as good a point as any to take a look back on the past decade it s remarkable to reflect that someone who started a phd because they were excited by these new resnets would still not have finished it by now that is how recent even resnets are never mind transformers and how rapid the pace of progress is in 201016ya one could easily fit everyone in the world who genuinely believed in deep learning into a moderate sized conference room assisted slightly by the fact that 3 of them were busy founding deepmind someone interested in machine learning in 201016ya might have read about some interesting stuff from weirdo diehard connectionists in recognizing hand written digits using all of 1 2 million parameters or some modest neural tweaks to standard voice recognition hidden markov models in 201016ya who would have predicted that over the next 10 years deep learning would undergo a cambrian explosion causing a mass extinction of alternative approaches throughout machine learning that models would scale up to 175 000 million parameters and that these enormous models would just spontaneously develop all these capabilities no one that is no one aside from a few diehard connectionists written off as willfully deluded old school fanatics by the rest of the ai community never mind the world such as moravec schmidhuber sutskever legg amodei one of the more shocking things about looking back is realizing how unsurprising and easily predicted all of this was if you listened to the right people in 199828ya 22 years ago moravec noted that ai research could be deceptive and hardware limits meant that intelligent machine research did not make steady progress in its first 50 years it marked time for 30 of them predicting that as moore s law continued things will go much faster in the next 50 years than they have in the last 50 moravec further observed that part of the reason for rapid progress was the hardware overhang while supercomputers of the necessary power would exist long before the connectionist revolution began no one would be allowed to use them 27 as they would be devoted to more important prestigious hard stem work like physics simulations ie climate simulations nuclear bombs 28 and ai research must wait for the power to become more affordable affordable meaning a workstation roughly 2 229 1k1998 sufficiently cheap compute to rival a human would arrive sometime in the 2020s with the 2010s seeing affordable systems in the lizard mouse range as it happens the start of the dl revolution is typically dated to alexnet in 201214ya by a grad student 29 using 2 gtx 580 3gb gpus launch list price of 789 5002010 for a system build cost of perhaps 2 285 1 5002012 2020 saw gpt 3 arrive and as discussed before there are many reasons to expect the cost to fall in addition to the large hardware compute gains that are being forecast for the 2020s despite the general deceleration of moore s law 30 the accelerating pace of the last 10 years should wake anyone from their dogmatic slumber and make them sit upright it turned out it s hans moravec s world and the rest of us were just living in a fool s paradise and there are 28 years left in moravec s forecast the temptation that many do not resist so much as revel in is to give in to a déformation professionnelle and dismiss any model as just this or that just billions of if statements or just a bunch of multiplications or just millions of memorized web pages missing the forest for the trees as moravec commented of chess engines the event was notable for many reasons but one especially is of interest here several times during both matches kasparov reported signs of mind in the machine at times in the second tournament he worried there might be humans behind the scenes feeding deep blue strategic insights in all other chess computers he reports a mechanical predictability stemming from their undiscriminating but limited lookahead and absence of long term strategy in deep blue to his consternation he saw instead an alien intelligence deep blue s creators know its quantitative superiority over other chess machines intimately but lack the chess understanding to share kasparov s deep appreciation of the difference in the quality of its play i think this dichotomy will show up increasingly in coming years engineers who know the mechanism of advanced robots most intimately will be the last to admit they have real minds from the inside robots will indisputably be machines acting according to mechanical principles however elaborately layered only on the outside where they can be appreciated as a whole will the impression of intelligence emerge a human brain too does not exhibit the intelligence under a neurobiologist s microscope that it does participating in a lively conversation but of course if we ever succeed in ai or in reductionism in general it must be by reducing y to just x showing that some task requiring intelligence can be solved by a well defined algorithm with no intelligence is precisely what success must look like otherwise the question has been thoroughly begged the problem has only been pushed elsewhere computer chips are made of transistors not especially tiny homunculi as long as the ai oa5 can explore it will learn given enough time we just kept waiting for the magic to run out we kept waiting to hit a wall and we never seemed to hit a wall greg brockman give it the compute give it the data and it will do amazing things this stuff is like it s like alchemy ilya sutskever summer 2019 hindsight is 20 20 even in 201511ya all the experts assured us that agi the scaling hypothesis seemed highly dubious you needed something to scale after all and it was all too easy to look at flaws in existing systems and imagine that they would never go away and progress would sigmoid any month now soon like the genomics revolution where a few far sighted seers extrapolated that the necessary n for gwases would increase exponentially deliver powerful pgses soon while sober experts wrung their hands over missing heritability the miraculous complexity of biology scoff about how such n requirements proved gwas was a failed paradigm the future arrived at first slowly and then quickly yet here we are all honor to the fanatics shame and humiliation to the critics 31 if only one could go back 10 years or even 5 to watch every ai researchers head explode reading this paper unfortunately few heads appear to be exploding now because human capacity for hindsight excuses is boundless i can get that much with finetuning anyway i predicted it all along how boring and unfortunately there is no fire alarm for agi if you are still certain that there is near zero probability of agi in the next few decades why did you predict in writing capabilities like gpt 3 is this how you expect ai failure to look in the decades beforehand what specific task what specific number would convince you otherwise how would the world look different than it does now if these crude prototype insect brain sized dl systems were not on a path to success authority without accountability what should we think about the experts projections of failure were made by eminent respectable serious people they spoke in considered tones of why ai hype was excessive and might trigger an ai winter and the fundamental flaws of fashionable approaches and why brute force could not work these statements were made routinely in 201412ya 201511ya 2016 and they were wrong i am aware of few issuing a mea culpa or reflecting on it 32 it is a puzzling failure and i ve reflected on it before phatic not predictive there is however a certain tone of voice the bien pensant all speak in whose sound is the same whether right or wrong a tone shared with many statements in january to march of this year a tone we can also find in a 194086ya scientific american article authoritatively titled don t worry it can t happen which advised the reader to not be concerned about it any longer and get sleep it was the atomic bomb about which certain scientists had stopped talking raising public concerns not only could it happen the british bomb project had already begun and 5 years later it did happen the iron law of bureaucracy cathedral gothic this tone of voice is the voice of authority the voice of authority insists on calm and people not panicking the chief of sins the voice of authority assures you that it won t happen because it can t happen the voice utters simple arguments about why the status quo will prevail and considers only how the wild new idea could fail and not all the possible options the voice is not and does not deal in uncertainty things will either happen or they will not and since it will not happen there is no need to take any precautions and you should not worry because it can t happen the voice does not believe in drawing lines on graphs it is rank numerology the voice does not issue any numerical predictions which could be falsified the voice will not share its source code for complicated reasons which cannot be explained to the laity the voice is opposed to unethical things like randomized experiments on volunteers but will overlook the insult the voice does not have a model of the future because a model implies it does not already know the future the voice is concerned about its public image and unkind gossip about it by other speakers of the voice the voice is always sober respectable and credentialed the voice would be pleased to write an op ed for your national magazine and or newspaper the voice speaks and is not spoken to you cannot ask the voice what objective fact would change its mind the voice never changes its mind until it does the voice is never surprised by events in the world only disappointed the voice advises you to go back to sleep right now when someone speaks about future possibilities what is the tone of their voice", "source_text": "Critiquing The Critics\nKeeping trackHindsight is 20⁄20Authority without accountabilityPhatic, not predictiveThe iron law of bureaucracy: Cathedral gothic\nKeeping track. GPT-3 in 2020 makes as good a point as any to take a look back on the past decade. It’s remarkable to reflect that someone who started a PhD because they were excited by these new “ResNets” would still not have finished it by now—that is how recent even resnets are, never mind Transformers, and how rapid the pace of progress is. In 201016ya, one could easily fit everyone in the world who genuinely believed in deep learning into a moderate-sized conference room (assisted slightly by the fact that 3 of them were busy founding DeepMind⁠). Someone interested in machine learning in 201016ya might have read about some interesting stuff from weirdo diehard connectionists in recognizing hand-written digits using all of 1–2 million parameters, or some modest neural tweaks to standard voice-recognition hidden Markov models. In 201016ya, who would have predicted that over the next 10 years, deep learning would undergo a Cambrian explosion causing a mass extinction of alternative approaches throughout machine learning, that models would scale up to 175,000 million parameters, and that these enormous models would just spontaneously develop all these capabilities?\nNo one. That is, no one aside from a few diehard connectionists written off as willfully-deluded old-school fanatics by the rest of the AI community (never mind the world), such as Moravec, Schmidhuber, ⁠Sutskever⁠, Legg, & Amodei.\nOne of the more shocking things about looking back is realizing how unsurprising and easily predicted all of this was if you listened to the right people. In 199828ya, 22 years ago, Moravec noted that AI research could be deceptive, and hardware limits meant that “intelligent machine research did not make steady progress in its first 50 years, it marked time for 30 of them!”, predicting that as Moore’s law continued, “things will go much faster in the next 50 years than they have in the last 50.” Moravec further observed that part of the reason for rapid progress was the hardware overhang: while supercomputers of the necessary power would exist long before the connectionist revolution began, no one would be allowed to use them⁠⁠27⁠, as they would be devoted to ‘more important’ (prestigious) hard STEM work, like “physics simulations” (ie. climate simulations & nuclear bombs)⁠⁠28⁠, and “AI research must wait for the power to become more affordable.” Affordable meaning a workstation roughly ~$2,229$1k1998; sufficiently cheap compute to rival a human would arrive sometime in the 2020s, with the 2010s seeing affordable systems in the lizard–mouse range. As it happens, the start of the DL revolution is typically dated to AlexNet⁠ in 201214ya, by a grad student⁠⁠29⁠ using 2 GTX 580 3GB GPUs (launch list price of… $789$5002010, for a system build cost of perhaps $2,285$1,5002012). 2020 saw GPT-3 arrive, and as discussed before, there are many reasons to expect the cost to fall, in addition to the large hardware compute gains that are being forecast for the 2020s despite the general deceleration of Moore’s law.⁠⁠30⁠\nThe accelerating pace of the last 10 years should wake anyone from their dogmatic slumber and make them sit upright. It turned out, it’s Hans Moravec’s world, and the rest of us were just living in a fool’s paradise. And there are 28 years left in Moravec’s forecast…\nThe temptation, that many do not resist so much as revel in, is to give in to a déformation professionnelle and dismiss any model as “just” this or that(“just billions of IF statements” or “just a bunch of multiplications” or “just millions of memorized web pages”), missing the forest for the trees, as Moravec commented of chess engines:\nThe event was notable for many reasons, but one especially is of interest here. Several times during both matches, Kasparov reported signs of mind in the machine. At times in the second tournament, he worried there might be humans behind the scenes, feeding Deep Blue strategic insights!…In all other chess computers, he reports a mechanical predictability stemming from their undiscriminating but limited lookahead, and absence of long-term strategy. In Deep Blue, to his consternation, he saw instead an “alien intelligence.”\n…Deep Blue’s creators know its quantitative superiority over other chess machines intimately, but lack the chess understanding to share Kasparov’s deep appreciation of the difference in the quality of its play. I think this dichotomy will show up increasingly in coming years. Engineers who know the mechanism of advanced robots most intimately will be the last to admit they have real minds. From the inside, robots will indisputably be machines, acting according to mechanical principles, however elaborately layered. Only on the outside, where they can be appreciated as a whole, will the impression of intelligence emerge. A human brain, too, does not exhibit the intelligence under a neurobiologist’s microscope that it does participating in a lively conversation.\nBut of course, if we ever succeed in AI, or in reductionism in general, it must be by reducing Y to ‘just X’. Showing that some task requiring intelligence can be solved by a well-defined algorithm with no ‘intelligence’ is precisely what success must look like! (Otherwise, the question has been thoroughly begged & the problem has only been pushed elsewhere; computer chips are made of transistors, not especially tiny homunculi.)\nAs long as the AI [OA5] can explore, it will learn, given enough time…We just kept waiting for the magic to run out. We kept waiting to hit a wall, and we never seemed to hit a wall.\nGreg Brockman⁠\nGive it the compute, give it the data, and it will do amazing things. This stuff is like—it’s like alchemy!\nIlya Sutskever⁠, summer 2019\nHindsight is 20⁄20. Even in 201511ya, ⁠all the experts⁠ assured us that AGI the scaling hypothesis seemed highly dubious: you needed something to scale, after all, and it was all too easy to look at flaws in existing systems and imagine that they would never go away and progress would sigmoid any month now, soon. Like the genomics revolution where a few far-sighted seers extrapolated that the necessary n for GWASes would increase exponentially & deliver powerful PGSes soon, while sober experts wrung their hands over “missing heritability” & the miraculous complexity of biology & scoff about how such n requirements proved GWAS was a failed paradigm, the future arrived at first slowly and then quickly. Yet, here we are: all honor to the fanatics, shame and humiliation to the critics!⁠⁠31⁠ If only one could go back 10 years, or even 5, to watch every AI researchers’ head explode reading this paper… Unfortunately, few heads appear to be exploding now, because human capacity for hindsight & excuses is boundless (“I can get that much with finetuning, anyway I predicted it all along, how boring”) and, unfortunately, “there is no fire alarm”⁠ for AGI. (If you are still certain that there is near-zero probability of AGI in the next few decades, why? Did you predict—in writing—capabilities like GPT-3? Is this how you expect AI failure to look in the decades beforehand? What specific task, what specific number, would convince you otherwise? How would the world look different than it does now if these crude prototype insect-brain-sized DL systems were not on a path to success?)\nAuthority without accountability. What should we think about the experts? Projections of failure were made by eminent, respectable, serious people. They spoke in considered tones of why AI hype was excessive and might trigger an “AI winter”, and the fundamental flaws of fashionable approaches and why brute force could not work. These statements were made routinely in 201412ya, 201511ya, 2016… And they were wrong. I am aware of few issuing a mea culpa or reflecting on it.⁠⁠32⁠ It is a puzzling failure, and I’ve ⁠reflected on it before⁠.\nPhatic, not predictive. There is, however, a certain tone of voice the bien pensant all speak in, whose sound is the same whether right or wrong; a tone shared with many statements in January to March of this year; a tone we can also find in a 194086ya Scientific American article authoritatively titled, “Don’t Worry—It Can’t Happen”⁠, which advised the reader to not be concerned about it any longer “and get sleep”. (‘It’ was the atomic bomb, about which certain scientists had stopped talking, raising public concerns; not only could it happen, the British bomb project had already begun, and 5 years later it did happen.)\nThe iron law of bureaucracy: Cathedral gothic. This tone of voice is the voice of authority.\nThe voice of authority insists on calm, and people not “panicking” (the chief of sins).\nThe voice of authority assures you that it won’t happen (because it can’t happen).\nThe voice utters simple arguments about why the status quo will prevail, and considers only how the wild new idea could fail (and not all the possible options).\nThe voice is not, and does not deal in, uncertainty; things will either happen or they will not, and since it will not happen, there is no need to take any precautions (and you should not worry because it can’t happen).\nThe voice does not believe in drawing lines on graphs (it is rank numerology).\nThe voice does not issue any numerical predictions (which could be falsified).\nThe voice will not share its source code (for complicated reasons which cannot be explained to the laity).\nThe voice is opposed to unethical things like randomized experiments on volunteers (but will overlook the insult).\nThe voice does not have a model of the future (because a model implies it does not already know the future).\nThe voice is concerned about its public image (and unkind gossip about it by other speakers of the voice).\nThe voice is always sober, respectable, and credentialed (the voice would be pleased to write an op-ed for your national magazine and/or newspaper).\nThe voice speaks, and is not spoken to (you cannot ask the voice what objective fact would change its mind).\nThe voice never changes its mind (until it does).\nThe voice is never surprised by events in the world (only disappointed).\nThe voice advises you to go back to sleep (right now).\nWhen someone speaks about future possibilities, what is the tone of their voice?", "segmentation_method": "reviewed_source_semantics", "label": "Critiquing The Critics", "source_line_range": [ 104, 137 ] }, { "id": "body-region-5", "text": "appendix it from byte powerful generative models like gpt 3 learn to imitate agents and thus become agents when prompted appropriately this is an inevitable consequence of training on huge amounts of human generated data this can be a problem is human data or moral equivalents like drl agents necessary and other kinds of data such as physics data free of this problem and so a safety strategy of filtering data could reduce or eliminate hidden agency i argue no agency is not discrete or immaterial but an ordinary continuum of capability useful to a generative model in many contexts beyond those narrowly defined as agents such as in the intentional stance or variational approaches to solving physics problems much like other drl elicited capabilities like meta learning memory exploration or reasoning agency is a useful tool for a large family of problems and a powerful model applied to that family may at some point develop concepts of agency or theory of mind etc thus a very wide range of problems at scale may surprisingly induce emergent agency i have previously argued that gpt 3 clearly shows agency because it is doing offline imitation learning behavioral cloning specifically from the human generated text data and so it learns generative models of many agents real or fictional these generative models offer agentic capabilities because they can be used to prompt the model to roleplay plan take action which will steer environments into small goal regions of state space and this is not merely hypothetical or confined to text transcripts of actions results in its internal simulated environments but given effectors like in the case of saycan a language model will in fact do such things in the real world that such systems may never have experienced the real world or been trained deliberately on exact action sequences of malicious agents doesn t mean that they cannot generalize or imitate a sufficiently accurate simulation of an agent just is an agent one can set up a prompt for gpt 3 to imitate adolf hitler and ask him how to regain power resume exterminating the jews and get back a semi coherent high level plan this is unfortunate and the simulacra need not even be of a real person evil fictional characters plan evil things just as easily because it s not hard to imagine what horrible things they would want to do this doesn t seem all that different from accepted instances of reinforcement learning like behavior learning or offline reinforcement learning if you train on data from agents whether humans or logged data from drl agents then the question is how would you not learn from all these examples how to act be capable of pursuing goals presumably you would not only if you were a stupid model too small or given too little data if these are not agents i don t know what really is an agent or at least if critics insist on some sort of definition of agent which excludes these i think perhaps we should then abandon the word agent entirely because if giving a saycan robot an instruction to fetch a can of coke and bring it to me with it using image inputs to construct step by step plans to find possess and return with the can and successfully doing so often in real life on a real robot does not count as an agent then we need a word for such non agent systems so we can discuss their non agency dangers if we define them as sub agents because of lack of appendages and thus define all models as harmless non agents this is an unacceptable equivocation given the extreme carelessness and insouciance people display in hooking up their models the first chance they get to humans apis search engines or robots hardly had the openai gpt 3 api been launched in july 2020 than people were showing off using its basic html css js abilities to drive web browsers and large lm model developers like lamda or adept display an unseemly eagerness to let it query arbitrary urls without their paper even bothering to specify it was live the ai box hadn t even been invented before everyone decided to let their ai out of the box to be slightly more useful as should come as no surprise after all tool ais want to be agent ais but one might wonder how far this logic goes do we have agent ais emerging from our tool ais only because we trained them on so much agent generated data if we scrapped human text corpuses full of text about humans planning and taking actions and obtaining goals or video datasets stuffed full of agents doing stuff and if we deleted image datasets as well because they are just snapshots of videos and depict agents actions environments full of traces of agency would we then have a model which is now just a relatively safe tool ai with no agency lurking i would still say that there s a possibility and maybe not even that small one agency is not a discrete thing but a continuum which is a convergent instrumental drive emergent capability because it is useful even for understanding non agentic things all is atoms void first there cannot be any principled hard and fast necessary distinction between data which is agentic and data which is merely natural this is because there is no such distinction in reality either all agency is constructed of non agentic bits like atoms there is no agency particle no pineal gland granting access to genuine decision makingtm an agentic human is made out of the same fundamental things as a clump of dust swirling in space or rock or a computer it must be the case that one could starting only from simulations of possibly a lot of atoms nothing but the most raw physics equations and atoms the void and eventually recapitulate the history of the universe and observe things like the origin of life and humans thus one turns non agentic data physics equations into agentic data ok but barring a hypercomputer that is unlikely to happen if we consider realistic levels of compute like contemporary nns trained on less than everything in the universe apparently harmless data like say the hydrology of rivers flowing downhill eg for flood prevention or the trajectory of the solar system surely none of that agency will evolve no amount of modeling the chaotic dynamics of pluto will give you any help in modeling the dynamics of astronomy infighting about whether pluto is a planet right intentional interpretive stance here again i differ and invoke daniel dennett s intentional stance humans do in fact model natural systems like these as agents we find such teleological explanations indispensable for intuition and shortcut reasoning across many natural systems variational interpretations janus comments apropos of their emphasis on what i might call a world modeling centric intuition for gpt 3 vs my agent centric view that for example gwern has said that anyone who uses gpt for long enough begins to think of it as an agent who only cares about roleplaying a lot of roles that framing seems unnatural to me comparable to thinking of physics as an agent who only cares about evolving the universe accurately according to the laws of physics at best the agent is an epicycle but it is also compatible with interpretations that generate dubious predictions i embrace that description it is in fact natural and not an elaborate epicycle on a geocentric model of the world but rather heliocentrism powerful and useful and simpler that it also like heliocentrism 33 may feel counterintuitive is unfortunate but its virtues are proven we err if an intentional stance leads us engage in the pathetic fallacy and say that the river spirit wants to reunite with the ocean and we must offer sacrifices lest the dikes breach but we are correct when we say that the river tries to find the optimal path which minimizes its gravitational or free energy it is both true predictively useful and mathematically equivalent to the other way of formulating it in terms of forward processes computing step by step atom by atom and at the getting the same answer but typically much easier to solve ted chiang s story of your life tries to convey this perspective via fiction and this shortcut is a trick we can use universally for everything from a river flowing downhill to the orbit of a planet to the path of photon through water minimizing travel time to evolutionary dynamics instead of trying to understand it step by step treat the system as a whole via the variational principle as wanting to minimize or maximize some simple global quantity a reward and picking the sequence of actions that does so the river wants to minimize its height so without simulating it down to the individual water currents i can look at the map and see that it should choose to go left then right and then meander over this flat slightly sloping part ah looks like i was right then into this modular trick just plug in the system and quantity in question and think like an agent 34 uh oh predictively useful shortcut much easier universally all properties a neural net loves all natural to it why would it try to solve each heterogeneous problem with a separate computationally expensive bag of tricks when there s one weird trick ai safety researchers hate like adopting teleological and variational reasoning inducing emergence is expensive of course this frame can be more expensive than solving a problem directly variational approaches are powerful but counterintuitive and there are often many simpler approximations or memorization that a model can do for a single problem like modeling the orbit of pluto it is unlikely that any variational approach would be learned why would it when there is only 1 system and 1 quantity minimized so they can just be assumed this is similar to other model capabilities induced by pretraining things like induction heads or meta learning or counting or reasoning need to pay their way and are not superior to alternatives right from the start they need rich enough models to compute them feasibly enough data to force them out of easier solutions which will fail on a few rare datapoints and enough training to work through all the possibilities to converge on the better capabilities what can induce agency emergence unfortunately this is an empirical matter how many datasets how big is each dataset how diverse do they have to be what even is a dataset since we can always lump or split it we struggle to predict when a capability will develop in gpt 3 so we definitely can t say a priori that pluto is safe to model but then tossing in a few thousand exoplanet solar systems would begin to elicit a define system plug in reward maximize module and bring back agency cellular automatons it would also be hard to say at all what mathematical or physical systems exhibit the right kinds of maximizing behavior which can be generalized to an intentional stance does the ultra abstract simple cellular automaton conway s game of life gol induce an intentional stance it has no agents no biology no evolution in the usual sense but it does have many small patterns which can be usefully chunked to help understand a specific gol humans of course look at a gol as a bunch of small entities like gliders but a nn given randomly initialized boards may also see the same thing because most gol patterns will die out or reach fixed points like gliders or still life patterns it is simply simpler to chunk a large gol board into a few gliders wandering through empty space interrupted by the occasional still life and once you are talking about gliders wandering around unless they run into a still life block which kills them you are much of the way to an intentional stance not modeling a glider as the inexorable outcome of applying this and that rule about the local neighborhood to a million cells of equal importance but as a specific entity of interest against an implicit ignored background of dead cells which will travel around and shoot off to infinity or meet its doom so i wouldn t want to bet too much on gol being unable to induce any transfer turing machine can we go even broader how about not natural physics systems nor specific abstractions of interest to humans gol is especially interesting among cellular automatons and we ignore the large space of ca rules which define a ca but which does nothing interesting but all turing machines let s say random rules with some length biased sample of random programs which we dovetail treat available tapes as a sequence prediction problem there is no more general computable setting after all single tm would training on a random turing machine risk the possibility of agency maybe not for a single tm this might foster some capabilities like instruction following for the same reason that pretraining on source code especially source code augmented with state logs is a powerful prior for many tasks but it does not seem to have any of the traits that would induce agency there is nothing that random tm programs try to minimize or maximize they simply run they don t try to maximize run time length terminating or non terminating or write as few or as many places on the tape as possible or to achieve particular patterns a model would simply learn the tm rules and attempt to approximate it as best as it can given its own limited feedforward neural net resources eventually if it can work iteratively or recurrently it would learn the rules and generalize perfectly and no further learning occurs classifying tm programs by whether they halt doesn t help yes the busy beaver wants to maximize something but that s just by definition as the longest terminating program there are many more tm programs which are happy to halt very quickly so predicting halting status may learn things but also still nothing that prima facie looks like agency tm meta learning this might be due to there being only a single tm making it analogous to training only on pluto perhaps the right setting would be training over many tm rules and programs within each one this is what a researcher would be more interested in since few tms are of any intrinsic interest nor do we know the one true turing machinetm we d rather have a neural network which is learning to learn tms or meta learning and training a nn over many environments drawn from a distribution is the easiest way to induce meta learning so what if we trained a model to do sequence prediction of a random tm random program without reuse if single random turing machines are harmless how about all of them hm well it s worth noting how alan turing introduced the turing machine formalism as a general setting in which a man read and executed sets of rules about how to mark up a paper tape so even in the original formulation of computers as tools which merely do what they are programmed to do we have a homunculus at the center this homunculus could do and given different instructions would anything to the tape but he wants to follow the current set of instructions accurately until he s done in each draw from the tm program distribution he is following a different set of instructions and now the model is attempting to infer what he wants to as quickly as possible begin predicting the sequence accurately by recomputing it this provides our modularity and a particular computation executed and strong optimization pressure to rapidly read the history and infer what the new rules must be that may not have a clean reward maximizing interpretation but it does sound a lot like what anyone does with an agent of any kind the inverse reinforcement learning problem of inferring the reward function can be arbitrarily hard and until we succeed at that we instead infer local rules patterns which target particular outcomes regions of state space you may not know why your neighbor does that weird thing he does but you can infer that he will do it and not another agent not even his evil identical twin is inferring tm rules the simplest most rudimentary possible theory of mind maybe in which case there is no escape from the possibility of agency anywhere ambient agency agency may be like turing completeness even in settings free of selection or optimization it is a capability too useful and too convergent to guarantee its absence the broader and more powerful a system is the more the next feature or next piece of data may push it over the edge and it becomes harder to engineer a system without that aspect agency can be learned from data generated by agents who generate extremely selective data or if you carefully remove all that it may come from the selection of non human data or it may be implicit in the dynamics of a replicator system or it may be one of the countless physical systems which have such interpretations which are computationally more efficient and thus any nn which is optimized to balance realizable compute with accuracy will be pushed to such interpretations or it may be a good simplification of systems with macro statistics where the detailed micro state adds little or it may stem from simply meta learning of rule induction on tms because agents may follow complex sets of policies which are learnable but the motivating reward function is an under determined blackbox or like squashing turing completeness as soon as one hole in the sinking ship is patched you notice another leak spring up you can t keep a good idea down all you can do is make a complex system that doesn t display agency as far as you can tell unfortunately much like turing completeness or security vulnerabilities that there is no overt agency doesn t mean it is not there the model won t tell you it is just getting on with the job of lowering its loss sampling can show the presence of knowledge but not the absence i do not have any solutions to this other than to advise yet again to abandon the seductive convenient but wrong idea that tool ais under any branding be it tool ais or physics generative models or world simulators cannot or will not be agent ais they may well be and the better they get the more likely it is and tampering with data is not a solution given the number of comments on the paper s arithmetic benchmark i should point out that the arithmetic benchmark appears to greatly understate gpt 3 s abilities due to the bpe encoding issue even using commas markedly improves its 5 digit addition ability for example the bpe issue also appears to explain much of the poor performance on the anagram shuffling tasks this is something to keep in mind for any task which requires character level manipulation or understanding on implicit meta learning see santoro et al 2016 wang et al 2018 botvinick commentary botvinick et al 2019a clune 2019 schmidhuber 2015 2018 weng 2018 weng 2019 gpt 3 hardly costs more than a few million dollars of compute as of early 2020 as the extensive scaling research beforehand enabled one training run and it is cheap to run pg39 even with the full gpt 3 175b generating 100 pages of content from a trained model can cost on the order of 0 4 kw hr or only a few cents in energy costs likewise t5 was trained only once and for the cost of one model gpt 3 api users have shown that you get the equivalent of hundreds of smaller special purpose models each requiring more researchers custom datasets countless training runs and tinkering assuming said models could be created at all a slogan for the future one model one vector once for comparison the pdp 11 was a common academic workhorse due to its extremely low cost a mere 110 099 20k1970 while the first lisp machine cost 258 956 50k1972 expensive for a workstation but a bargain compared to researchers hogging mainframes costing tens of millions ibm s otherwise useless deep blue ai project reputedly cost 12 51997m for the final iteration reports of 231 1001997m appear to be a confusion with the estimated value of publicity mentioned in pg187 of hsu s behind deep blue and big science projects like iter blow 5000 the funding to mostly fail the particle physicists incidentally are back asking for 30 242020b based on presumably the scientific revolutions world changing breakthroughs that the lhc s 14 92010b investment produced or the 5 30 21993b spent to not build the ssc gpt 3 could have been done decades ago with global computing resources scientific budgets what could be done with today s hardware budgets that we just don t know or care to do there is a hardware overhang see also the whole brain emulation roadmap 2019 recent trends in gpu price per flops further nns have additional hardware overhangs of their own due to the many orders of magnitude asymmetry of training vs running transfer learning and meta learning are so much faster than the baseline model training you can train gpt 3 without even any gradient steps just examples you pay the extremely steep upfront cost of one big model to rule them all and then reuse it everywhere at tiny marginal cost if you train a model then as soon as it s done you get among other things the ability to run thousands of copies in parallel on the same hardware in a context like alphago i estimate several hundred elo strength gains if you reuse the same hardware to merely run tree search with exact copies of the original model meta learning transfer learning to any related domain cutting training requirements by orders of magnitude model compression distillation to train student models which are a fraction of the size flops or latency ratios varying widely based on task approach domain acceptable performance degradation targeted hardware etc but often extreme like 1 100th reuse of the model elsewhere to instantly power up other models eg use of text or image embeddings for a drl agent learning by doing experience curve effects highest in information technologies and high for dl hernandez brown 2020 so the next from scratch model may be much cheaper for example after all the iterative model architecture game upgrades done while training the first openai five oa5 dota2 agent was completed the second iteration of oa5 rerun was trained from scratch rerun required only 20 of the training for a 98 win rate against the final version of openai five as the authors note the ideal option would be to run rerun like training from the very start but this is impossible the openai five curve represents lessons learned that led to the final codebase environment etc without which it would not be possible to train rerun baseline for engineering much more efficient ones by ablating and comparing with the original eg a narrow context window severely limits it and motivates the need for efficient attention more broadly gpt 3 does nothing exotic no use of brain imitation learning or neural architecture search to try to tailor the model online hyperparameter optimization possibly 3 speedup or even decide basic hyperparameters like widths which as efficientnet shows can make quite a different even in well understood and hand optimized vanilla architectures not even pdfs so no google books no arxiv no libgen no sci hub generating text from a lm can reveal the presence of knowledge but not its absence and it is universally agreed that the current crude heuristic methods like top k cannot possibly be optimal a man is at the doctor s office and the doctor tells him i ve got some good news and some bad news for you the man says well i can t take the bad news right now so give me the good news first the doctor says well the good news is that you have an 18 inch penis the man looks stunned for a moment and then asks what s the bad news the doctor says your brain s in your dick in particular sample efficiency increases with model size up to compute efficient scaling and gpt 2 can memorize data after seeing it only once a desirable property given long tailed real world distributions of data an example of how not to do scaling papers is thompson et al 2020 which in stark contrast to the foregoing papers which thompson et al do not mention at all attempts to infer scaling not from well controlled experiments run by the authors which yield extremely tight and highly predictive curves but attempts to infer them from occasional reported numbers in highly disparate research papers unsurprisingly their curves barely predict anything and seem to be serious overestimates anyway it is noteworthy that the pursuit of large models is driven almost exclusively by openai industry entities the latter of which are content with far smaller models and that academia has evinced an almost total disinterest disgust anger even and denial one might say green ai is green with envy for all that the scaling hypothesis is obvious and scaling is predicted there is remarkably little interest in actually doing it perhaps we should pay more attention to what people do rather than what they say and recall that successful academic communities produce questions not answers roughly around chuan li s estimate using nominal list prices without discounts which could be steep as the marginal costs of cloud compute are substantially lower the r d project cost would be much higher but is amortized over all subsequent models projects the manhattan project cost 28 21946b one is reminded of the joke about the customer complaining to the butcher your meat is 10 lb while your competitor across the street sells it at 1 so go buy his meat i would but he has none when i don t have any meat it costs 1 too as if we live in a world where grad students could go to the moon on a ramen budget if we just wished hard enough as if focusing on co2 costs not benefits in our evaluations is not like making a scissor with only one blade or as if green ai approaches to try to create small models without going through big models did not look increasingly futile and like throwing good money after bad and were not the least green of all ai research to the extent that all cutting edge ai research 2010 could be done with grad student money like 1 579 1k2010 of hardware where ai research in decades before after benefited from big iron that is an indictment of that era demonstrating what a stagnant dead end that research was that its techniques were so small minded and hobbled it could not benefit from the available large scale compute fun trivia bit is now more accurate at predicting cleaned corrected imagenet labels than the original imagenet labels are one interesting aspect of image scaling experiments like dojolonga et al 2020 is that even when performance is plateauing on the original task approaching label error the transfer learning continues to improve apparently the internal representations even when adequate for mere classification and so the score cannot increase more than a small percentage become more human like because it s encoding dark knowledge or more adversarial robustness i ve noticed with language models the final fractions of a loss appear to make a substantial difference to generated sample quality perhaps because it is only after all the easier modeling is finished that the lazy language model is forced to squeeze out the next bit of performance by more correctly modeling more sophisticated things like logic objects world knowledge etc the numbers here are not exact and are for illustration because bpes don t correspond to any intuitive i am going to borrow from my observations watching char rnns and talk about the loss per character instead of bpe if you see thousands of images labeled dog and thousands more labeled cat you can simply learn separate dog cat classifiers without bothering to understand their shared aspects like being domesticated quadruped mammal predators this won t be useful if you are then asked to classify ferret images but you weren t asked to so that s not your problem since you can just learn yet another separate classifier for ferrets if you then get a lot of ferret images pg210 211 the quiet enemy the legacy of hiroshima teller 196264ya another way of interpreting the various papers about how transformers are actually like rnns or are actually hopfield networks is to take that as indicating that what is important about them is not any inherent new capability compared to older architectures but some lower level aspect like being more efficiently trainable on contemporary hardware how do these absolute prediction performances compare to humans it s hard to say the only available benchmarks for perplexity for humans gpt 2 gpt 3 appear to be webtext penn tree bank ptb based on the brown corpus 1 billion word 1bw and lambada but coverage is spotty i found no human benchmarks for webtext or penn tree bank so i can t compare the human vs gpt 2 gpt 3 perplexities gpt 2 ptb 35 7 gpt 3 ptb 20 5 gpt 2 was benchmarked at 43 perplexity on the 1 billion word 1bw benchmark vs a highly extrapolated human perplexity of 12 which interestingly extrapolates using 201214ya lstm rnns that 10 to 20 more years of research before human performance is reached but that may be an unfair benchmark our model is still substantially worse than prior work on the one billion word benchmark chelba et al 2013 this is likely due to a combination of it being both the largest dataset and having some of the most destructive pre processing 1bw s sentence level shuffling removes all long range structure and 1bw was dropped from the gpt 3 evaluation due to data contamination we omit the 4 wikipedia related tasks in that work because they are entirely contained in our training data and we also omit the one billion word benchmark due to a high fraction of the dataset being contained in our training set lambada was benchmarked at a gpt 2 perplexity of 8 6 and a gpt 3 perplexity of 3 0 zero shot 1 92 few shot oa claims in their gpt 2 blog post but not the paper that human perplexity is 1 2 but provides no sources and i couldn t find any the authors might be guessing based on how lambada was constructed examples were filtered by whether two independent human raters provided the same right answer which lower bounds how good humans must be at predicting the answer so overall it looks like the best guess is that gpt 3 continues to have somewhere around twice the absolute error of a human this implies it will take a large yet far from impossible amount of compute to fully close the remaining gap with the current scaling laws if we irresponsibly extrapolate out the webtext scaling curve further assume gpt 3 has twice the error of a human at its current webtext perplexity of 1 73 and so humans are 0 86 then we need 2 57 3 64 103 x 0 048 0 86 where x 2 2e6 or 2 200 000 the compute of gpt 3 this would roughly equal the cost to the usa of invading iraq when is that feasible if we imagine that peak ai compute usage doubles every 3 4 months then 2 2e6 would be 22 doublings away or 6 3 years in 2027 most people believe that that compute trend must break down soon and this sort of prediction is a good reason why going the other direction hernandez brown 2020 s estimate is that net of hardware algorithmic progress the cost of a fixed level of performance halves every 16 months so if gpt 3 cost 6 29 52020m in early 2020 then it ll cost 3 14 2 502020m around mid 2021 and so on similarly a gpt human requiring 2 2e6 more compute would presumably cost on the order of 13 102020 trillion in 2020 but after 14 halvings 18 years would cost 1 26 12020b in 2038 as of december 2020 half a year later almost no researcher has been willing to go on record as saying what specific capabilities they predict future 1t 10t or 100t models will have or not have and at what size which missing capabilities will emerge just as no one is on record successfully predicting gpt 2 or gpt 3 s specific capabilities see also sutskever s drl talk and wojciech zaremba s comments about oa5 transcript lukas biewald how much of the work then on dota2 was you felt like fundamentally moving ml forward and how much of it was dota specific or can you even pull those apart wojciech zaremba i think there was a decent amount of dota specific work and then i think it was more than optimal but also simultaneously hard so i remember at the beginning of dota project it was actually unclear how to approach it people are saying that contemporary reinforcement learning will have no chance in solving this problem and people looked into off policy matters on policy matters evolutionary strategies the thing that became quite surprising is that methods that already exist with appropriate scale work extremely well so that was a big surprise and i remember some people even before dota time at openai saying that maybe reinforcement learning is a dead end and all of a sudden it s a very different story now l biewald for sure production services especially free production services usually lag long after the unpublished sota inside the most cutting edge lab the second is the only thing that matters for predicting ai progress or ai risk of course but people will insist on measuring ai progress by bizarre metrics like what an arbitrary free service could do last year as a rule of thumb assume that if you are using a free service with no login the quality is at least 2 years behind sota free with a login 1 5 years paid service 1 year recently released research paper 6 months particularly demis hassabis i m not sure about shane legg s current views although given the accuracy of his 2009 predictions while founding deepmind his 2018 comments he probably hasn t much changed his views that ai will be empowered by the realized exponential compute gains or his agi forecast of 2028 this is consistent with the latest metaculus forecasts when faced with the choice between having to admit all their fancy hard work is a dead end swallow the bitter lesson and start budgeting tens of millions of compute or instead writing a disdainful tweet explaining how actually gpt 3 shows that scaling is a dead end it s an environmental catastrophe and it s just imitation intelligence anyway most people will get busy on the tweet a mixture of expert model like gshard or an embedding like dynamicembedding is not comparable to dense models like gpt 3 as it s always been cheap easy to train models with billions of parameters in some sense like extremely large embeddings however these parameters do little and are more like a few hundred shallow models glued back to back they probably do not learn the same interesting things that a dense model would with the same nominal parameter count this seems to be a bit of a blind spot by commentators the assumption that if the necessary resource exists then it will be used for example jim gray d 200719ya in june 199927ya pokes a bit of fun at turing s connectionist hardware argument by noting that using an optimistic lower bound on human brain computational power desktop machines should be about as intelligent as a spider or a frog and supercomputers ought to be nearing human intelligence so we should start seeing intelligence in these supercomputers any day now just kidding but we do not because we are missing something very fundamental clearly the software and databases we have for our super computers is not on a track to pass the turing test in the next decade something quite different is needed out of the box radical thinking is needed we have been handed a puzzle genomes and brains work but we are clueless what the solution is understanding the answer is a wonderful long term research goal with the benefit of hindsight we can say that it is true that supercomputers in 199927ya could have been showing far more impressive levels of intelligence than they were and that it was also true that the software being run on the supercomputers in 199927ya were never going to lead to meaningful ai progress and that there is no particular contradiction or mystery it was simply that no one was trying no supercomputer owner was going to let it be tied up for years doing the minor yet critical iteration to make connectionist approaches like rnns or cnns work thus something quite different radical was indeed needed but we already knew what the solution looked like strikingly as of 2020 this is still true eg the only deep learning research i have seen done on summit were materials science biology in double checking arxiv i did find one non stem paper using summit resources lin et al 2019 focusing on systems engineering in training a video classification model peter norvig offers an example of what happens when grad students can t afford the necessary computing power to make neural nets work lukas biewald when you look at deep learning it sort of feels like that came suddenly but a lot of those techniques were around in fact in your book i remember quite far back do you think that the field missed something or was it just not possible to run at the scale necessary to show that these neural network techniques were working better than people expected in the early aughts peter norvig yeah i mean if you say suddenly right we ve got a sudden leap in computer vision and image net after hinton had been trying the same thing for 30 years right and then it finally worked and i think the biggest difference was the computing power definitely there were advances in data so we could do imagenet because fei fei li and others gathered this large database and that was really important there are certainly differences in the algorithm right we ve got a slightly different squashing function instead of shaped like this sigmoid it s shaped like this relu i mean i don t know how big a deal that was but we learned how to do stochastic gradient descent a little bit better we figured that dropout gave you a little bit better robustness so there were small things but i think probably the biggest was the computing power and i mean i certainly remember geoff hinton came to berkeley when i was a grad student in 198145ya i think when he talked about these neural nets and we fellow grad students thought that was so cool so we said let s go back into the lab and implement it and of course there was absolutely nothing you could download so we had to build it all from scratch and we got it to do exclusive or xor and then we got it to do something a little bit more complicated and it was exciting and then we gave it the first real problem and it ran overnight and it didn t converge and we let it run one more day and it still didn t converge and then we gave up and we went back to our sort of knowledge based systems approach but if we had the computing power of today it probably would have converged after 5 seconds by my estimate norvig s attempt used the equivalent of 0 8 milliseconds of contemporary gpu time in 1981 an expensive pc costing the equivalent of 6 289 5k2020 of the sort a high powered ai lab might allocate 1 apiece to grad students might have an additional intel 8087 floating point coprocessor capable of 50 000 fp64 flops conservatively assuming that overnight one more day 2 days then norvig s experiment used 2d 24h 60m 60s 50 000 8 109 flops a 2020 nvidia a100 gpu nominally priced 12 578 10k2020 boasts 9 7 fp64 tflops or 9 700 000 000 000 flops and far more in the more useful low precision regimes like fp32 but 198145ya ml didn t know that thus 89 9 7 1012 8 10 4 seconds 0 8 milliseconds jeff dean notes it is perhaps unfortunate that just as we started to have enough computational performance to start to tackle interesting real world problems and the increased scale and applicability of machine learning has led to a dramatic thirst for additional computational resources to tackle larger problems the computing industry as a whole has experienced a dramatic slowdown in the year over year improvement of general purpose cpu performance under the computational view this is not a coincidence compute not algorithms are the critical factor biological systems often come within orders of magnitude or less of the theoretical optimum for a task and the closer one comes to optimal the slower progress becomes so just as artificial computation finally starts doing interesting real world problems it necessarily is approaching its limits it could have been otherwise moore s law could have stopped short by many orders of magnitude of biological efficiency or surpassed it by many orders with no temporal coincidence and ai happened for other reasons now that gpt 3 s few shot and t5 finetuning have begun to make people like gary marcus feel slightly nervous about winogrande they have begun preparing their excuses for why winograd schemas weren t really good measures of commonsense reasoning intelligence because intelligence of course is whatever ai can t do yet feynman there are several references to previous flights the acceptance and success of these flights are taken as evidence of safety but erosion and blowby are not what the design expected they are warnings that something is wrong the equipment is not operating as expected and therefore there is a danger that it can operate with even wider deviations in the unexpected and not thoroughly understood way the fact that this danger did not lead to catastrophe before is no guarantee that it will not the next time unless it is completely understood one is reminded of the catastrophic dismissals of western technology by the chinese emperors shaka zulu the error was not in dismissing the technology as practically unimportant it arguably was nor in failing to realize that they were already centuries behind in the most important geopolitical development in millennia but in failing to acknowledge that they couldn t explain why the western technology had gotten so good so fast and thus couldn t know that it wouldn t get much better still as my favorite wittgenstein anecdote goes heliocentrism strikes everyone as false because things just don t look as if the earth whirls at astronomical velocities around a star but as if the earth is perfectly still and everything else whirls around it anscombe 196363ya an introduction to wittgenstein s tractatus the general method that wittgenstein does suggest is that of shewing that a man has supplied no meaning no reference for certain signs in his sentences i can illustrate the method from wittgenstein s later way of discussing problems he once greeted me with the question why do people say that it was natural to think that the sun went round the earth rather than that the earth turned on its axis i replied i suppose because it looked as if the sun went round the earth well he asked what would it have looked like if it had looked as if the earth turned on its axis this question brought it out that i had hitherto given no relevant meaning to it looks as if in it looks as if the sun goes round the earth my reply was to hold out my hands with the palms upward and raise them from my knees in a circular sweep at the same time leaning backwards and assuming a dizzy expression exactly he said this connection is more than superficial a lot of rl work draws on formal analogies to physics and variational principles", "source_text": "Appendix\nIt From Byte\nPow­er­ful gen­er­a­tive mod­els like GPT-3 learn to im­i­tate agents and thus be­come agents when prompted ap­pro­pri­ately. This is an in­evitable con­se­quence of train­ing on huge amounts of human-generated data. This can be a prob­lem.\nIs human data (or moral equiv­a­lents like DRL agents) nec­es­sary, and other kinds of data, such as physics data, free of this prob­lem? (And so a safety strat­egy of fil­ter­ing data could re­duce or elim­i­nate hid­den agency.)\nI argue no: agency is not dis­crete or im­ma­te­r­ial, but an or­di­nary con­tin­uum of ca­pa­bil­ity, use­ful to a gen­er­a­tive model in many con­texts be­yond those nar­rowly de­fined as ‘agents’, such as in the “in­ten­tional stance” or vari­a­tional ap­proaches to solv­ing physics prob­lems. Much like other DRL-elicited ca­pa­bil­i­ties⁠ like meta-learning, mem­ory, ex­plo­ration, or rea­son­ing, ‘agency’ is a use­ful tool for a large fam­ily of prob­lems, and a pow­er­ful model ap­plied to that fam­ily may, at some point, de­velop con­cepts of agency or the­ory of mind etc.\nThus, a very wide range of prob­lems, at scale, may sur­pris­ingly in­duce emer­gent agency.\nI have previously argued that GPT-3 clearly shows agency because it is doing offline imitation learning (behavioral cloning, specifically) from the human-generated text data, and so it learns generative models of many agents, real or fictional. These generative models offer agentic capabilities, because they can be used to prompt the model to ⁠‘roleplay’⁠—plan & take action which will steer environments into small goal regions of state-space; and this is not merely hypothetical, or confined to text transcripts of actions & results in its internal simulated environments, but given effectors, like in the case of SayCan⁠, a language model will in fact do such things in the real world.\nThat such systems may never have ‘experienced the real world’ or been trained deliberately on exact action sequences of malicious agents doesn’t mean that they cannot generalize or imitate. A sufficiently accurate simulation of an agent just is an agent. (One can set up a prompt for GPT-3 to imitate Adolf Hitler and ask him how to regain power & resume exterminating the Jews and get back a semi-coherent high-level plan; this is unfortunate, and the simulacra need not even be of a real person—evil fictional characters plan evil things just as easily, because it’s not hard to imagine what horrible things they would want to do.) This doesn’t seem all that different from accepted instances of reinforcement learning, like behavior learning or offline reinforcement learning: if you train on data from agents, whether humans or logged data from DRL agents, then the question is “how would you not learn from all these examples how to act & be capable of pursuing goals?” Presumably you would not only if you were a stupid model, too small or given too little data.\nIf these are not ‘agents’, I don’t know what “really” is an agent; or at least if critics insist on some sort of definition of ‘agent’ which excludes these, I think perhaps we should then abandon the word ‘agent’ entirely—because if giving a SayCan robot an instruction to ‘fetch a can of Coke and bring it to me’, with it using image inputs to construct step-by-step plans to find, possess, and return with the can, and successfully doing so often in real life on a real robot, does not count as an ‘agent’, then we need a word for such non-agent systems, so we can discuss their non-agency dangers. (If we define them as sub-agents because of lack of appendages and thus define all models as harmless non-agents, this is an unacceptable equivocation given the extreme carelessness and insouciance people display in hooking up their models the first chance they get to humans, APIs, search engines, or robots—hardly had the OpenAI GPT-3 API been launched in July 2020 than people were showing off using its basic HTML/CSS/JS abilities to drive web browsers, and large LM model developers like LaMDA or Adept display an unseemly eagerness to let it query arbitrary URLs without their paper even bothering to specify it was live. The AI box hadn’t even been invented before everyone decided to let their AI out of the box to be slightly more useful, as should come as no surprise—after all, tool AIs want to be agent AIs⁠.)\nBut one might wonder how far this logic goes: do we have agent AIs emerging from our tool AIs only because we trained them on so much agent-generated data? If we scrapped human text corpuses, full of text about humans planning and taking actions and obtaining goals, or video datasets stuffed full of agents doing stuff, and if we deleted image datasets as well because they are just snapshots of videos and depict agents & actions & environments full of traces of agency, would we then have a model which is now just a (relatively) safe ‘tool AI’, with no agency lurking?\nI would still say that there’s a possibility, and maybe not even that small one: agency is not a discrete thing, but a continuum, which is a convergent instrumental drive / emergent capability because it is useful even for understanding “non-agentic” things.\nAll Is Atoms & Void\nFirst, there cannot be any principled, hard-and-fast, necessary distinction between data which is ‘agentic’ and data which is merely ‘natural’. This is because there is no such distinction in reality either: all ‘agency’ is constructed of non-agentic bits like atoms. There is no agency-particle, no pineal gland granting access to ‘Genuine Decision-Making™’. An agentic human is made out of the same fundamental things as a clump of dust swirling in space, or rock, or a computer. It must be the case that one could, starting only from simulations of (possibly a lot of) atoms, nothing but the most raw physics equations and atoms & the void, and eventually recapitulate the history of the universe and observe things like the origin of life and humans. Thus, one turns non-agentic data (physics equations) into agentic data.\nOK, but barring a hypercomputer, that is unlikely to happen. If we consider realistic levels of compute, like contemporary NNs, trained on less-than-everything-in-the-universe & apparently harmless data like, say, the hydrology of rivers flowing downhill (eg. for flood prevention), or the trajectory of the solar system, surely none of that agency will evolve—no amount of modeling the chaotic dynamics of Pluto will give you any help in modeling the dynamics of astronomy infighting about whether Pluto is a planet, right?\nIntentional Interpretive Stance\nHere again I differ, and invoke Daniel Dennett’s⁠ intentional stance⁠. Humans do, in fact, model natural systems like these as agents. We find such teleological explanations indispensable for intuition and shortcut reasoning across many natural systems.\nVariational Interpretations\n⁠Janus comments⁠, apropos of their emphasis on what I might call a ‘world-modeling-centric’ intuition for GPT-3 vs my ‘agent-centric’ view that:\nFor example, Gwern has said that anyone who uses GPT for long enough begins to think of it as an agent who only cares about roleplaying a lot of roles. That framing seems unnatural to me, comparable to thinking of physics as an agent who only cares about evolving the universe accurately according to the laws of physics. At best, the agent is an epicycle; but it is also compatible with interpretations that generate dubious predictions.\nI embrace that description: it is in fact natural and not an elaborate epicycle on a geocentric model of the world, but rather, heliocentrism—powerful, and useful, and simpler. That it (also like heliocentrism⁠⁠33⁠) may feel counterintuitive is unfortunate, but its virtues are proven.\nWe err if an intentional stance leads us engage in the pathetic fallacy and say that the river-spirit wants to reunite with the ocean (and we must offer sacrifices lest the dikes breach), but we are correct when we say that the river tries to find the optimal path which minimizes its gravitational or free energy⁠. It is both true, predictively useful, and mathematically equivalent to the other way of formulating it, in terms of ‘forward’ processes computing step by step, atom by atom, and at the getting the same answer—but typically much easier to solve. (Ted Chiang’s “Story Of Your Life”⁠ tries to convey this perspective via fiction.) And this shortcut is a trick we can use universally, for everything from a river flowing downhill to the orbit of a planet to the path of photon through water minimizing travel time⁠ to evolutionary dynamics: instead of trying to understand it step by step, treat the system as a whole via the variational principle⁠ as ‘wanting’ to minimize (or maximize) some simple global quantity (a reward), and picking the sequence of actions that does so. (“The river wants to minimize its height, so without simulating it down to the individual water currents, I can look at the map and see that it should ‘choose’ to go left, then right, and then meander over this flat slightly-sloping part. Ah, looks like I was right.”) Then, into this modular trick, just plug in the system and quantity in question, and think like an agent…⁠⁠34⁠\nUh oh. ‘Predictively useful’, ‘shortcut’, ‘much easier’, ‘universally’—all properties a neural net loves. All natural to it. Why would it try to solve each heterogeneous problem with a separate, computationally-expensive, bag of tricks, when there’s one weird trick AI safety researchers hate, like adopting teleological and variational reasoning?\nInducing Emergence Is Expensive\nOf course, this frame can be more expensive than solving a problem directly. Variational approaches are powerful but counterintuitive, and there are often many simpler approximations or memorization that a model can do. For a single problem like modeling the orbit of Pluto, it is unlikely that any variational approach would be learned. Why would it, when there is only 1 system and 1 quantity minimized, so they can just be assumed? This is similar to other ⁠model capabilities induced by pretraining⁠: things like induction heads or meta-learning or counting or reasoning need to pay their way, and are not superior to alternatives right from the start. They need rich enough models to compute them feasibly, enough data to force them out of easier solutions (which will fail on a few rare datapoints), and enough training (to work through all the possibilities to converge on the better capabilities).\nWhat Can Induce Agency Emergence?\nUnfortunately, this is an empirical matter. How many datasets? How big is each dataset? How diverse do they have to be? What even is a ‘dataset’, since we can always lump or split it? We struggle to predict when a capability will develop in GPT-3, so we definitely can’t say a priori that “Pluto is safe to model, but then tossing in a few thousand exoplanet solar systems would begin to elicit a define-system/plug-in-reward/maximize module and bring back agency”.\nCellular Automatons\nIt would also be hard to say at all what mathematical or physical systems exhibit the right kinds of maximizing behavior which can be generalized to an intentional stance. Does the ultra-abstract & simple cellular automaton⁠ Conway’s Game of Life⁠ (GoL) induce an intentional stance?\nIt has no agents, no biology, no evolution in the usual sense—but it does have many small patterns which can be usefully chunked⁠ to help understand a specific GoL. Humans, of course, look at a GoL as a bunch of small entities like ‘gliders’, but a NN given randomly-initialized boards may also see the same thing, because most GoL patterns will die out or reach fixed-points like gliders⁠ or still-life⁠ patterns: it is simply simpler to chunk a large GoL board into a few ‘gliders’ wandering through ‘empty space’ interrupted by the occasional ‘still life’.\nAnd once you are talking about gliders wandering around unless they run into a still-life block which kills them, you are much of the way to an intentional stance—not modeling a glider as the inexorable outcome of applying this and that rule about the local-neighborhood to a million cells of equal importance, but as a specific entity of interest against an implicit & ignored background of dead cells, which will travel around and shoot off to infinity or meet its doom.\nSo, I wouldn’t want to bet too much on GoL being unable to induce any transfer.\nTuring Machine\nCan we go even broader? How about, not natural physics systems, nor specific abstractions of interest to humans (GoL is especially interesting among cellular automatons, and we ignore the large space of CA rules which define a CA but which does nothing interesting), but all Turing machines, let’s say random rules with some length-biased sample of random programs which we dovetail & treat available tapes as a sequence prediction problem. There is no more general computable setting, after all.\nSingle TM\nWould training on a random Turing machine risk the possibility of agency?\nMaybe not. For a single TM, this might foster some capabilities like instruction-following (for the same reason that pretraining on source code, especially source code augmented with state logs, is a powerful prior for many tasks), but it does not seem to have any of the traits that would induce agency. There is nothing that random TM programs try to minimize or maximize; they simply run. They don’t try to maximize run time length (terminating or non-terminating), or write as few or as many places on the tape as possible, or to achieve particular patterns. A model would simply learn the TM rules and attempt to approximate it as best as it can given its own limited feedforward neural net resources; eventually, if it can work iteratively or recurrently, it would learn the rules and generalize perfectly, and no further learning occurs. Classifying TM programs by whether they halt doesn’t help: yes, the Busy Beaver ‘wants’ to maximize something, but that’s just by definition as the longest terminating program, there are many more TM programs which are ‘happy’ to halt very quickly. So predicting halting status may learn things, but also still nothing that prima facie looks like agency.\nTM Meta-Learning\nThis might be due to there being only a single TM, making it analogous to training only on Pluto. Perhaps the right setting would be training over many TM rules (and programs within each one). This is what a researcher would be more interested in, since few TMs are of any intrinsic interest, nor do we know the One True Turing Machine™; we’d rather have a neural network which is learning to learn TMs, or meta-learning, and training a NN over many environments drawn from a distribution is the easiest way to induce meta-learning. So what if we trained a model to do sequence prediction of a random TM + random program, without reuse? If single random Turing machines are harmless, how about all of them?\nHm, well… It’s worth noting how Alan Turing introduced the Turing machine formalism: as a general setting in which a man read and executed sets of rules about how to mark up a paper tape. So even in the original formulation of computers as tools which merely do what they are programmed to do, we have a homunculus at the center! This homunculus could do (and given different instructions, would) anything to the tape, but he wants to follow the current set of instructions accurately, until he’s done. In each draw from the TM+program distribution, he is following a different set of instructions, and now the model is attempting to infer what he wants, to as quickly as possible begin predicting the sequence accurately by recomputing it.\nThis provides our modularity, and a particular computation executed, and strong optimization pressure to rapidly ‘read’ the history and infer what the new rules must be. That may not have a clean reward-maximizing interpretation, but it does sound a lot like what anyone does with an agent of any kind: the inverse reinforcement learning problem of inferring the reward function can be arbitrarily hard, and until we succeed at that, we instead infer local rules & patterns, which target particular outcomes (regions of state-space). You may not know why your neighbor does that weird thing he does, but you can infer that he will do it, and not another agent, not even his evil identical twin. Is inferring TM rules the simplest & most rudimentary possible ‘theory of mind’? Maybe. In which case, there is no escape from the possibility of agency anywhere.\nAmbient Agency\nAgency may be like Turing-completeness⁠: even in settings free of selection or optimization, it is a capability too useful and too convergent to guarantee its absence. The broader and more powerful a system is, the more the next feature or next piece of data may push it over the edge, and it becomes harder to engineer a system without that aspect.\nAgency can be learned from data generated by agents, who generate extremely selective data. Or if you carefully remove all that, it may come from the selection of non-human data. Or it may be implicit in the dynamics of a replicator system. Or it may be one of the countless physical systems which have such interpretations which are computationally more efficient and thus any NN which is optimized to balance realizable compute with accuracy will be pushed to such interpretations. Or it may be a good simplification of systems with macro-statistics where the detailed micro-state adds little. Or it may stem from simply meta-learning of rule induction on TMs, because agents may follow complex sets of policies which are learnable but the motivating reward-function is an under-determined blackbox.\nOr… like squashing Turing-completeness, as soon as one hole in the sinking ship is patched, you notice another leak spring up. You can’t keep a good idea down. All you can do is make a complex system that doesn’t display agency as far as you can tell; unfortunately, much like Turing-completeness (or security vulnerabilities), that there is no overt agency doesn’t mean it is not there. The model won’t tell you, it is just getting on with the job of lowering its loss. (“Sampling can show the presence of knowledge, but not the absence.”)\nI do not have any solutions to this, other than to advise yet again to abandon the seductive, convenient, but wrong idea that tool AIs (under any branding, be it ‘tool AIs’ or ‘physics generative models’ or ‘world simulators’), cannot or will not be agent AIs. They may well be, and the better they get, the more likely it is, and tampering with data is not a solution.\nGiven the number of comments on the paper’s arithmetic benchmark, I should point out that the arithmetic benchmark appears to greatly understate GPT-3’s abilities due to the BPE encoding issue⁠: even using commas markedly improves its 5-digit addition ability, for example. The BPE issue also appears to explain much of the poor performance on the anagram/shuffling tasks. This is something to keep in mind for any task which requires character-level manipulation or understanding.\nOn implicit ⁠meta-learning⁠, see: Santoro et al 2016⁠/Wang et al 2018⁠ (Botvinick commentary⁠)/Botvinick et al 2019a⁠, Clune 2019⁠, Schmidhuber 2015⁠/2018⁠, Weng 2018⁠/Weng 2019⁠.\nGPT-3 hardly costs more than a few million dollars of compute (as of early 2020) as the extensive scaling research beforehand enabled one training run, and it is cheap to run (pg39): “Even with the full GPT-3 175B, generating 100 pages of content from a trained model can cost on the order of 0.4 kW-hr, or only a few cents in energy costs.” (Likewise, T5 was trained only once⁠.) And for the cost of one model, GPT-3 API users have shown that you get the equivalent of hundreds of smaller special-purpose models, each requiring more researchers, custom datasets, countless training runs, and tinkering, assuming said models could be created at all. (A slogan for the future: “One model, one vector—once.”)\nFor comparison, the PDP-11⁠ was a common academic workhorse due to its extremely low cost, a mere $110,099$20k1970, while the first Lisp Machine⁠ cost >$258,956$50k1972—expensive for a workstation but a bargain compared to researchers hogging mainframes costing tens of millions. IBM’s (otherwise useless) Deep Blue AI project reputedly cost >$12$51997m for the final iteration (reports of $231$1001997m appear to be a confusion with the estimated value of publicity mentioned in pg187 of Hsu’s Behind Deep Blue) and Big Science projects like ITER⁠ blow >5000× the funding to mostly fail. (The particle physicists, incidentally, are back asking for⁠ ≫$30$242020b, based on, presumably the scientific revolutions & world-changing breakthroughs that the LHC’s >$14$92010b investment produced, or the $5.30$21993b spent to (not) build the SSC⁠…)\nGPT-3 could have been done decades ago with global computing resources & scientific budgets; what could be done with today’s hardware & budgets that we just don’t know or care to do? There is a hardware overhang. (See also the ⁠Whole Brain Emulation Roadmap⁠ & “2019 recent trends in GPU price per FLOPS”⁠.)\nFurther, NNs have additional hardware overhangs of their own due to the many orders of magnitude asymmetry of training vs running. Transfer learning and meta-learning are so much faster than the baseline model training. You can ‘train’ GPT-3 without even any gradient steps—just examples. You pay the extremely steep upfront cost of One Big Model to Rule Them All, and then reuse it everywhere at tiny marginal cost. If you train a model, then as soon as it’s done you get, among other things:\nthe ability to run thousands of copies in parallel on the same hardware\nin a context like AlphaGo, I estimate several hundred ELO strength gains if you reuse the same hardware to merely run tree search with exact copies of the original model\nmeta-learning/transfer-learning to any related domain, cutting training requirements by orders of magnitude\nmodel compression/distillation to train student models which are a fraction of the size, FLOPS, or latency (ratios varying widely based on task, approach, domain, acceptable performance degradation, targeted hardware etc., but often extreme like 1⁄100th)\nreuse of the model elsewhere to instantly power up other models (eg. use of text or image embeddings for a DRL agent)\nlearning-by-doing/experience curve effects⁠ (highest in information technologies, and high for DL: Hernandez & Brown 2020⁠), so the next from-scratch model may be much cheaper.\nFor example: after all the iterative model architecture & game upgrades done while training the first OpenAI Five⁠ (OA5) DoTA2 agent was completed, the second iteration of OA5, ⁠“Rerun”⁠, was trained from scratch. Rerun required only 20% of the training for a “98% win-rate against the final version of OpenAI Five.” As the authors note: “The ideal option would be to run Rerun-like training from the very start, but this is impossible—the OpenAI Five curve represents lessons learned that led to the final codebase, environment, etc., without which it would not be possible to train Rerun.”\nbaseline for engineering much more efficient ones by ablating and comparing with the original\neg. a narrow context window ⁠severely limits it⁠, and motivates the need for efficient attention⁠. More broadly, GPT-3 does nothing exotic—no use of brain imitation learning⁠ or neural architecture search to try to tailor the model, online hyperparameter optimization (possibly >3× speedup⁠) or even decide basic hyperparameters like widths (which as EfficientNet⁠ shows, can make quite a different even in “well-understood and hand-optimized vanilla architectures”).\nNot even PDFs—so no Google Books, no Arxiv, no Libgen, no Sci-Hub…\nGenerating text from a LM can reveal the presence of knowledge, but not its absence, and it is universally agreed that the current crude heuristic methods like top-k cannot possibly be optimal.\n‘A man is at the doctor’s office, and the doctor tells him, “I’ve got some good news and some bad news for you.” / The man says, “Well, I can’t take the bad news right now, so give me the good news first.” / The doctor says, “Well, the good news is that you have an 18-inch penis.” / The man looks stunned for a moment, and then asks, “What’s the bad news?” / The doctor says, “Your brain’s in your dick.”’\nIn particular, sample-efficiency increases with model size up to compute-efficient scaling, and GPT-2 can memorize data after seeing it only once⁠—a desirable property⁠ given long-tailed real-world distributions of data. (An example of how not to do scaling papers is Thompson et al 2020⁠, which, in stark contrast to the foregoing papers—which Thompson et al do not mention at all!—attempts to infer scaling not from well-controlled experiments run by the authors, which yield extremely tight and highly predictive curves, but attempts to infer them from occasional reported numbers in highly disparate research papers; unsurprisingly, their curves barely predict anything and seem to be serious overestimates anyway.)\nIt is noteworthy that the pursuit of large models is driven almost exclusively by OpenAI & industry entities (the latter of which are content with far smaller models), and that academia has evinced an almost total disinterest—disgust & anger, even, and denial (one might say “green AI” is green with envy). For all that the scaling hypothesis is ‘obvious’ and scaling is ‘predicted’, there is remarkably little interest in actually doing it. Perhaps we should pay more attention to what people do rather than what they say; and recall that successful academic communities produce questions, not answers.\nRoughly around Chuan Li’s estimate, using nominal list prices without discounts (which could be steep as the marginal costs of cloud compute are substantially lower). The R&D project cost would be much higher, but is amortized over all subsequent models & projects.\nThe Manhattan Project cost ~$28$21946b.\nOne is reminded of the joke about the customer complaining to the butcher:\n“Your meat is $10/lb, while your competitor across the street sells it at $1!” “So go buy his meat.” “I would, but he has none.” “When I don’t have any meat, it costs $1 too.”\nAs if we live in a world where grad students could go to the Moon on a ramen budget if we just wished hard enough, as if focusing on CO2 costs & not benefits in our evaluations is not like making a scissor with only one blade, or as if “green AI” approaches to try to create small models without going through big models did not look increasingly futile and like throwing good money after bad, and were not the least green of all AI research… To the extent that all cutting-edge AI research ~2010 could be done with grad student money like $1,579$1k2010 of hardware, where AI research in decades before & after benefited from big iron, that is an indictment of that era, demonstrating what a stagnant dead end that research was, that its techniques were so small-minded and hobbled it could not benefit from the available large-scale compute.\nFun trivia: BiT is now more accurate⁠ at predicting (cleaned, corrected) ImageNet labels than the original ImageNet labels are.\nOne interesting aspect of image scaling experiments like Dojolonga et al 2020 is that even when performance is ‘plateauing’ on the original task & approaching label error, the transfer learning continues to improve. Apparently the internal representations, even when adequate for mere classification and so the score cannot increase more than a small percentage, become more human-like—because it’s encoding dark knowledge⁠ or more adversarial robustness⁠? I’ve noticed with language models, the final fractions of a loss appear to make a substantial difference to generated sample quality, perhaps because it is only after all the easier modeling is finished that the lazy language model is forced to squeeze out the next bit of performance by more correctly modeling more sophisticated things like logic, objects, world-knowledge, etc.\nThe numbers here are not exact and are for illustration; because BPEs don’t correspond to any intuitive, I am going to borrow from my observations watching char-RNNs, and talk about the loss per character instead of BPE.\nIf you see thousands of images labeled ‘dog’ and thousands more labeled ‘cat’, you can simply learn separate dog & cat classifiers without bothering to understand their shared aspects like being domesticated quadruped mammal predators. This won’t be useful if you are then asked to classify ‘ferret’ images, but you weren’t asked to, so that’s not your problem, since you can just learn yet another separate classifier for ferrets if you then get a lot of ferret images.\npg210–211, “The Quiet Enemy”, ⁠The Legacy of Hiroshima⁠, Teller 196264ya.\nAnother way of interpreting the various papers about how Transformers are actually like RNNs or are actually Hopfield networks⁠ is to take that as indicating that what is important about them is not any inherent new capability compared to older architectures, but some lower-level aspect like being more efficiently trainable on contemporary hardware.\nHow do these absolute prediction performances compare to humans? It’s hard to say. The only available benchmarks for perplexity for humans/GPT-2/GPT-3 appear to be WebText, Penn Tree Bank⁠ (PTB; based on the Brown Corpus⁠), 1 Billion Word⁠ (1BW), and LAMBADA⁠. But coverage is spotty.\nI found no human benchmarks for WebText or Penn Tree Bank, so I can’t compare the human vs GPT-2/GPT-3 perplexities (⁠GPT-2 PTB⁠: 35.7; ⁠GPT-3 PTB⁠: 20.5).\n⁠GPT-2⁠ was benchmarked at 43 perplexity on the 1 Billion Word (1BW) benchmark vs a (highly extrapolated) human perplexity of 12⁠ (which interestingly extrapolates, using 201214ya LSTM RNNs, that “10 to 20 more years of research before human performance is reached”), but that may be an unfair benchmark (“Our model is still substantially worse than prior work on the One Billion Word Benchmark (⁠Chelba et al 2013⁠). This is likely due to a combination of it being both the largest dataset and having some of the most destructive pre-processing—1BW’s sentence level shuffling removes all long-range structure.”) and 1BW was dropped from the GPT-3 evaluation due to data contamination (“We omit the 4 Wikipedia-related tasks in that work because they are entirely contained in our training data, and we also omit the one-billion word benchmark due to a high fraction of the dataset being contained in our training set.”).\nLAMBADA was benchmarked at a ⁠GPT-2 perplexity⁠ of 8.6, and a ⁠GPT-3 perplexity⁠ of 3.0 (zero-shot) / 1.92 (few-shot). ⁠OA claims⁠ in their GPT-2 blog post (but not the paper) that human perplexity is 1–2, but provides no sources and I couldn’t find any. (The authors might be guessing based on how LAMBADA was constructed: examples were filtered by whether two independent human raters provided the same right answer, which lower bounds how good humans must be at predicting the answer.)\nSo overall, it looks like the best guess is that GPT-3 continues to have somewhere around twice the absolute error of a human. This implies it will take a large (yet, far from impossible) amount of compute to fully close the remaining gap with the current scaling laws. If we irresponsibly extrapolate out the WebText scaling curve further, assume GPT-3 has twice the error of a human at its current WebText perplexity of 1.73 (and so humans are ~0.86), then we need 2.57 ⋅ (3.64 ⋅ (103 ⋅ x))-0.048 = 0.86, where x = 2.2e6 or 2,200,000× the compute of GPT-3. (This would roughly equal the cost to the USA of invading Iraq.)\nWhen is that feasible?\nIf we imagine that ⁠peak AI compute usage doubles every 3.4 months⁠, then 2.2e6 would be 22 doublings away—or 6.3 years, in 2027. Most people believe that that compute trend must break down soon, and this sort of prediction is a good reason why!\nGoing the other direction, ⁠Hernandez & Brown 2020’s⁠ estimate is that, net of hardware & algorithmic progress, the cost of a fixed level of performance halves every 16 months; so if GPT-3 cost ~$6.29$52020m in early 2020, then it’ll cost $3.14$2.502020m around mid-2021, and so on. Similarly, a GPT-human requiring 2.2e6× more compute would presumably cost on the order of $13$102020 trillion in 2020, but after 14 halvings (18 years) would cost $1.26$12020b in 2038.\nAs of December 2020, half a year later, almost no researcher has been willing to go on record as saying what specific capabilities they predict future 1t, 10t, or 100t models will have or not have, and at what size which missing capabilities will emerge—just as no one is on record successfully predicting GPT-2 or GPT-3’s specific capabilities.\nSee also ⁠Sutskever’s DRL talk⁠, and Wojciech Zaremba’s⁠ ⁠comments about OA5⁠ (⁠transcript⁠):\nLukas Biewald: How much of the work then on DoTA2 was, you felt, like fundamentally moving ML forward and how much of it was DoTA-specific or can you even pull those apart?\nWojciech Zaremba: I think there was a decent amount of DoTA-specific work. And then I think it was more than optimal, but also simultaneously hard. So I remember at the beginning of DoTA project, it was actually unclear how to approach it.\nPeople are saying that contemporary reinforcement learning will have no chance in solving this problem. And people looked into off-policy matters, on-policy matters, evolutionary strategies⁠. The thing that became quite surprising is that methods that already exist⁠, with appropriate scale work extremely well. So that was a big surprise. And I remember some people even before DoTA time at OpenAI, saying that maybe reinforcement learning is a dead end. And all of a sudden it’s a very different story now.\nL Biewald: For sure.\nProduction services, especially free production services, usually lag long after the unpublished SOTA inside the most cutting-edge lab. The second is the only thing that matters for predicting AI progress or AI risk, of course, but people will insist on measuring AI progress by bizarre metrics like what an arbitrary free service could do last year. As a rule of thumb, assume that: if you are using a free service with no login, the quality is at least 2 years behind SOTA; free with a login, >1.5 years; paid service, >1 year; & recently-released research paper, >6 months.\nParticularly Demis Hassabis⁠; I’m not sure about Shane Legg’s⁠ current views⁠, although given the accuracy of his 2009 predictions⁠ while founding DeepMind & his 2018 comments⁠, he probably hasn’t much changed his views that AI will be empowered by the (realized) exponential compute gains or his AGI forecast of ~2028⁠. (This is consistent with the latest Metaculus⁠ forecasts⁠.)\nWhen faced with the choice between having to admit all their fancy hard work is a dead-end, swallow the bitter lesson, and start budgeting tens of millions of compute, or instead writing a disdainful tweet explaining how, “actually, GPT-3 shows that scaling is a dead end, it’s an environmental catastrophe, and it’s just imitation intelligence anyway”—most people will get busy on the tweet!\nA mixture-of-expert model like GShard or an embedding like DynamicEmbedding is not comparable to ‘dense’ models like GPT-3, as it’s always been cheap & easy to train models with billions of ‘parameters’ in some sense, like extremely large embeddings; however, these parameters do little, and are more like a few hundred shallow models glued back-to-back. They probably do not learn the same interesting things that a dense model would with the same nominal parameter count.\nThis seems to be a bit of a blind spot by commentators: the assumption that if the necessary resource exists, then it will be used. For example, Jim Gray (d. 200719ya) in June 199927ya ⁠pokes a bit of fun⁠ at Turing’s connectionist hardware argument by noting that (using an optimistic lower bound on human brain computational power):\nDesktop machines should be about as intelligent as a spider or a frog, and supercomputers ought to be nearing human intelligence…So, we should start seeing intelligence in these supercomputers any day now (just kidding)…[but we do not because] we are missing something very fundamental. Clearly, the software and databases we have for our super-computers is not on a track to pass the Turing Test in the next decade. Something quite different is needed. Out-of-the-box, radical thinking is needed.\nWe have been handed a puzzle: genomes and brains work. But we are clueless what the solution is. Understanding the answer is a wonderful long-term research goal.\nWith the benefit of hindsight, we can say that it is true that supercomputers in 199927ya could have been showing far more impressive levels of intelligence than they were, and that it was also true that the software being run on the supercomputers in 199927ya were never going to lead to meaningful AI progress, and that there is no particular contradiction or mystery—it was simply that no one was trying. No supercomputer owner was going to let it be tied up for years doing the minor-yet-critical iteration to make connectionist approaches like RNNs or CNNs work. Thus, something quite different & radical was indeed needed—but we already knew what the solution looked like.\nStrikingly, as of 2020, this is still true: eg. the only deep learning research I have seen done on Summit⁠ were materials⁠ science⁠ & biology⁠. (In double-checking Arxiv, I did find one non-STEM paper using Summit resources: Lin et al 2019⁠, focusing on systems engineering in training a video classification model.)\nPeter Norvig⁠ ⁠offers an example⁠ of what happens when grad students can’t afford the necessary computing power to make neural nets work:\nLukas Biewald⁠: When you look at deep learning, it sort of feels like that came suddenly, but a lot of those techniques were around, in fact in your book, I remember quite far back. Do you think that the field missed something, or was it just not possible to run at the scale necessary to show that these neural network techniques were working better than people expected in the early aughts?\nPeter Norvig: Yeah. I mean, if you say suddenly, right, we’ve got a sudden leap in computer vision and image net after Hinton had been trying the same thing for 30 years, right?…And then it finally worked. And I think the biggest difference was the computing power. Definitely there were advances in data. So we could do ImageNet⁠ because Fei-Fei Li⁠ and others gathered this large database, and that was really important. There are certainly differences in the algorithm, right? We’ve got a slightly different squashing function⁠. Instead of shaped like this [sigmoid⁠], it’s shaped like this [ReLU⁠]. I mean, I don’t know how big a deal that was, but we learned how to do stochastic gradient descent⁠ a little bit better. We figured that dropout⁠ gave you a little bit better robustness.\nSo there were small things, but I think probably the biggest was the computing power. And I mean, I certainly remember Geoff Hinton⁠ came to Berkeley when I was a grad student in 198145ya, I think, when he talked about these neural nets. And we fellow grad students thought that was so cool. So we said, ‘Let’s go back into the lab and implement it.’\nAnd of course, there was absolutely nothing you could download, so we had to build it all from scratch. And we got it to do exclusive or [XOR⁠], and then we got it to do something a little bit more complicated. And it was exciting. And then we gave it the first real problem, and it ran overnight, and it didn’t converge, and we let it run one more day, and it still didn’t converge. And then we gave up, and we went back to our sort of knowledge-based systems approach. But if we had the computing power of today, it probably would have converged after 5 seconds.\nBy my estimate, Norvig’s attempt used the equivalent of 0.8 milliseconds of contemporary GPU-time.\n(In ~1981, an expensive PC costing the equivalent of >$6,289$5k2020, of the sort a high-powered AI lab might allocate 1 apiece to grad students, might have an additional Intel 8087⁠ floating-point coprocessor⁠ capable of 50,000 FP64 FLOPS; conservatively assuming that ‘overnight’ + ‘one more day’ ≤ 2 days, then Norvig’s experiment used 2d × 24h × 60m × 60s × 50,000 = 8×109 FLOPS; a 2020 Nvidia A100⁠ GPU nominally priced ~$12,578$10k2020 boasts 9.7 FP64 TFLOPS or 9,700,000,000,000 FLOPS (and far more in the more useful low-precision regimes like FP32, but 198145ya ML didn’t know that); thus, 89 / 9.7×1012 = 8×10−4 seconds = 0.8 milliseconds.)\nJeff Dean⁠ notes, “It is perhaps unfortunate that just as we started to have enough computational performance to start to tackle interesting real-world problems and the increased scale and applicability of machine learning has led to a dramatic thirst for additional computational resources to tackle larger problems, the computing industry as a whole has experienced a dramatic slowdown in the year-over-year improvement of general purpose CPU performance.” Under the computational view, this is not a coincidence: compute, not algorithms, are the critical factor; biological systems often come within orders of magnitude, or less, of the theoretical optimum for a task; and the closer one comes to optimal, the slower progress becomes; so, just as artificial computation finally starts doing “interesting real-world problems”, it necessarily is approaching its limits. (It could have been otherwise: Moore’s law could have stopped short by many orders of magnitude of biological efficiency, or surpassed it by many orders, with no temporal coincidence, and AI happened for other reasons.)\nNow that GPT-3’s few-shot and T5 finetuning⁠ have begun to make people like Gary Marcus feel slightly nervous about WinoGrande, they have begun preparing⁠ their excuses⁠ for why Winograd schemas weren’t really⁠ good measures of commonsense reasoning/intelligence (because intelligence, of course, is whatever AI can’t do yet).\nFeynman⁠: “There are several references to previous flights; the acceptance and success of these flights are taken as evidence of safety. But erosion and blowby are not what the design expected. They are warnings that something is wrong. The equipment is not operating as expected, and therefore there is a danger that it can operate with even wider deviations in the unexpected and not thoroughly understood way. The fact that this danger did not lead to catastrophe before is no guarantee that it will not the next time, unless it is completely understood.”\nOne is reminded of the catastrophic dismissals of Western technology by the Chinese emperors & Shaka Zulu⁠: the error was not in dismissing the technology as practically unimportant (it arguably was), nor in failing to realize that they were already centuries behind in the most important geopolitical development in millennia, but in failing to acknowledge that they couldn’t explain why the Western technology had gotten so good so fast and thus couldn’t know that it wouldn’t get much better still.\nAs my favorite Wittgenstein anecdote goes, heliocentrism strikes everyone as false because things just don’t look as if the Earth whirls at astronomical velocities around a star, but as if the Earth is perfectly still and everything else whirls around it (Anscombe 196363ya, An Introduction to Wittgenstein’s Tractatus):\nThe general method that Wittgenstein does suggest is that of ‘shewing that a man has supplied no meaning [“no reference”?] for certain signs in his sentences’. I can illustrate the method from Wittgenstein’s later way of discussing problems. He once greeted me with the question: ‘Why do people say that it was natural to think that the sun went round the earth rather than that the earth turned on its axis? I replied: ’I suppose, because it looked as if the sun went round the earth.’ ‘Well,’ he asked, ‘what would it have looked like if it had looked as if the earth turned on its axis?’\nThis question brought it out that I had hitherto given no relevant meaning to ‘it looks as if’ in ‘it looks as if the sun goes round the earth’. My reply was to hold out my hands with the palms upward, and raise them from my knees in a circular sweep, at the same time leaning backwards and assuming a dizzy⁠ ⁠expression⁠. ‘Exactly!’ he said.\nThis connection is more than superficial—a lot of RL work draws on formal analogies to physics and variational principles.", "segmentation_method": "reviewed_source_semantics", "label": "Appendix", "source_line_range": [ 138, 251 ] } ], "ending": { "text": "This connection is more than superficial—a lot of RL work draws on formal analogies to physics and variational principles." } } }, { "id": "article-090", "name": "Americans’ Use of Social Media in 2026", "url": "https://www.pewresearch.org/internet/fact-sheet/social-media/?level=0", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Americans’\\ Use\\ of\\ Social\\ Media\\ in\\ 2026" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Numbers, Facts and Trends Shaping Your World" ] }, { "id": "stable-3", "alternatives": [ "Newsletters" ] }, { "id": "stable-4", "alternatives": [ "Press" ] }, { "id": "stable-5", "alternatives": [ "My Account" ] }, { "id": "stable-6", "alternatives": [ "Donate" ] }, { "id": "stable-7", "alternatives": [ "Contacted By Us?" ] }, { "id": "stable-8", "alternatives": [ "Research Topics" ] }, { "id": "stable-9", "alternatives": [ "Publications" ] }, { "id": "stable-10", "alternatives": [ "Our Methods" ] }, { "id": "stable-11", "alternatives": [ "Short Reads" ] }, { "id": "stable-12", "alternatives": [ "Tools & Datasets" ] }, { "id": "stable-13", "alternatives": [ "Experts" ] }, { "id": "stable-14", "alternatives": [ "About Us" ] }, { "id": "stable-15", "alternatives": [ "Home" ] }, { "id": "stable-16", "alternatives": [ "Internet & Technology" ] }, { "id": "stable-17", "alternatives": [ "Platforms & Services" ] }, { "id": "stable-18", "alternatives": [ "Social Media" ] }, { "id": "stable-19", "alternatives": [ "Politics & Policy" ] }, { "id": "stable-20", "alternatives": [ "International Affairs" ] }, { "id": "stable-21", "alternatives": [ "Immigration & Migration" ] }, { "id": "stable-22", "alternatives": [ "Race & Ethnicity" ] }, { "id": "stable-23", "alternatives": [ "Religion" ] }, { "id": "stable-24", "alternatives": [ "Age & Generations" ] }, { "id": "stable-25", "alternatives": [ "Gender & LGBTQ" ] }, { "id": "stable-26", "alternatives": [ "Family & Relationships" ] }, { "id": "stable-27", "alternatives": [ "Economy & Work" ] }, { "id": "stable-28", "alternatives": [ "Science" ] }, { "id": "stable-29", "alternatives": [ "News Habits & Media" ] }, { "id": "stable-30", "alternatives": [ "Methodological Research" ] }, { "id": "stable-31", "alternatives": [ "About" ] }, { "id": "stable-32", "alternatives": [ "Terms & Conditions" ] }, { "id": "stable-33", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-34", "alternatives": [ "Cookie Policy" ] }, { "id": "stable-35", "alternatives": [ "Feedback" ] }, { "id": "stable-36", "alternatives": [ "Careers" ] }, { "id": "stable-37", "alternatives": [ "Contact Us" ] }, { "id": "stable-38", "alternatives": [ "(+1) 202-419-4300" ] }, { "id": "stable-39", "alternatives": [ "Follow Us" ] }, { "id": "stable-40", "alternatives": [ "Email Newsletters" ] }, { "id": "stable-41", "alternatives": [ "YouTube" ] }, { "id": "stable-42", "alternatives": [ "Instagram" ] }, { "id": "stable-43", "alternatives": [ "Facebook" ] }, { "id": "stable-44", "alternatives": [ "LinkedIn" ] }, { "id": "stable-45", "alternatives": [ "X" ] }, { "id": "stable-46", "alternatives": [ "Bluesky" ] }, { "id": "stable-47", "alternatives": [ "Threads" ] }, { "id": "stable-48", "alternatives": [ "RSS Feed" ] }, { "id": "stable-49", "alternatives": [ "ABOUT PEW RESEARCH CENTER" ] }, { "id": "stable-50", "alternatives": [ "The Pew Charitable Trusts" ] }, { "id": "stable-51", "alternatives": [ "901 E St. NW, Suite 300" ] }, { "id": "stable-52", "alternatives": [ "Washington, DC 20004" ] }, { "id": "stable-53", "alternatives": [ "USA" ] }, { "id": "stable-54", "alternatives": [ "ABOUT PEW RESEARCH CENTER Pew Research Center is a nonpartisan, nonadvocacy fact tank that informs the public about the issues, attitudes and trends shaping the world. It does not take policy positions. The Center conducts public opinion polling, demographic research, computational social science research and other data-driven research. Pew Research Center is a subsidiary of The Pew Charitable Trusts , its primary funder." ] } ] }, "rule_review": { "status": "reviewed", "reason": "The source page now publishes a2026fact sheet at the existingURL; the preceding2024-stylebody and Social Media Fact Sheet title no longer describe the current initial state. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Americans’ Use of Social Media in 2026" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-090/comment-qualification-reference-r5.json", "sha256": "37e7107c6400d1c41a643bb5d7f1766cc1b89d62572acc4bdec0449338896a5b", "chars": 799, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Fact Sheets: Tech Adoption Trends\nInternet/BroadbandMobileSocial Media\nMany Americans use social media to connect with one another, engage with news content, share information and entertain themselves. Explore the patterns and trends shaping the social media landscape.\nAbout this research\nWhich social media platforms are most common?\nYouTube and Facebook are the most widely used social media platforms in the United States. About half of U.S. adults say they use Instagram, and smaller shares use sites or apps such as TikTok, Reddit, Snapchat and X (formerly Twitter).\nWhich social media platforms are most popular\n% of U.S. adults who say they ever use …\nChange in survey mode0%20%40%60%80%100%2014201620182020202220242026\nYouTube\nFacebook\nInstagram\nPinterest\nTikTok\nLinkedIn\nWhatsApp\nSnapchat\nX (formerly Twitter)\nReddit\nBeReal\nNextdoor\nThreads\nBluesky\nTruth Social\nNote: The vertical line indicates a change in mode. Polls from 2012-2021 were conducted via phone. In 2023, the poll was conducted via web and mail. In 2024 through 2026, the poll was conducted via web, mail and phone. For more on the mode shift in 2023, read our Q&A. Refer to the topline for more information on how question wording varied over the years. Pre-2018 data is not available for YouTube, Snapchat or WhatsApp; pre-2019 data is not available for Reddit; pre-2021 data is not available for TikTok or Nextdoor; pre-2023 data is not available for BeReal. Pre-2025 data is not available for Threads, BlueSky, or Truth Social. Respondents who did not give an answer are not shown.\nSource: Surveys of U.S. adults conducted 2012-2026.\nPEW RESEARCH CENTER\nChartData\nDownload ImageShare\nWho uses each social media platform?\nUsage of the major social media platforms varies by factors such as age, gender and level of formal education.\n% of U.S. adults who say they ever use __ by …\nAGEGENDERRACE &\nETHNICITYHOUSEHOLD\nINCOMEEDUCATIONCOMMUNITYPARTY ID\nAges 18-29\t\t30-49\t\t50-64\t\t65+\nYouTube\t\t95\t\t91\t\t85\t\t65\nFacebook\t\t69\t\t78\t\t71\t\t59\nInstagram\t\t79\t\t64\t\t41\t\t21\nTikTok\t\t65\t\t45\t\t31\t\t11\nWhatsApp\t\t37\t\t39\t\t36\t\t20\nLinkedIn\t\t41\t\t37\t\t32\t\t13\nSnapchat\t\t56\t\t33\t\t13\t\t4\nReddit\t\t40\t\t35\t\t18\t\t6\nX (formerly Twitter)\t\t31\t\t20\t\t17\t\t7\nNextdoor\t\t10\t\t21\t\t19\t\t18\nTruth Social\t\t1\t\t3\t\t6\t\t4\nNote: Respondents who did not give an answer are not shown.\nSource: Survey of U.S. adults conducted Jan. 30-June 18, 2026.\nFind out more\nThis fact sheet was compiled by Research Associate William Bishop. Research Associate Michelle Faverio, Research Analyst Eugenie Park, Information Graphics Designer Sharon McGill, Digital Producer Sara Atske and Research Analyst Olivia Sidoti also contributed.\nFollow these links for more in-depth analysis of the impact of social media on American life.\nAmericans’ Social Media Use 2025 (Nov. 20, 2025)\nQ&A: How – and why – we’re changing the way we study tech adoption (Jan. 31, 2024)\nFind more publications related to internet and technology and more benchmarks from our National Public Opinion Reference Survey (NPORS).\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 4, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "fact sheets tech adoption trends internet broadbandmobilesocial media many americans use social media to connect with one another engage with news content share information and entertain themselves explore the patterns and trends shaping the social media landscape about this research", "source_text": "Fact Sheets: Tech Adoption Trends\nInternet/BroadbandMobileSocial Media\nMany Americans use social media to connect with one another, engage with news content, share information and entertain themselves. Explore the patterns and trends shaping the social media landscape.\nAbout this research", "segmentation_method": "reviewed_source_semantics", "label": "引言与研究主题", "source_line_range": [ 1, 4 ] }, { "id": "body-region-2", "text": "which social media platforms are most common youtube and facebook are the most widely used social media platforms in the united states about half of u s adults say they use instagram and smaller shares use sites or apps such as tiktok reddit snapchat and x formerly twitter which social media platforms are most popular of u s adults who say they ever use change in survey mode0 20 40 60 80 100 2014201620182020202220242026 youtube facebook instagram pinterest tiktok linkedin whatsapp snapchat x formerly twitter reddit bereal nextdoor threads bluesky truth social note the vertical line indicates a change in mode polls from 2012 2021 were conducted via phone in 2023 the poll was conducted via web and mail in 2024 through 2026 the poll was conducted via web mail and phone for more on the mode shift in 2023 read our q a refer to the topline for more information on how question wording varied over the years pre 2018 data is not available for youtube snapchat or whatsapp pre 2019 data is not available for reddit pre 2021 data is not available for tiktok or nextdoor pre 2023 data is not available for bereal pre 2025 data is not available for threads bluesky or truth social respondents who did not give an answer are not shown source surveys of u s adults conducted 2012 2026 pew research center chartdata download imageshare", "source_text": "Which social media platforms are most common?\nYouTube and Facebook are the most widely used social media platforms in the United States. About half of U.S. adults say they use Instagram, and smaller shares use sites or apps such as TikTok, Reddit, Snapchat and X (formerly Twitter).\nWhich social media platforms are most popular\n% of U.S. adults who say they ever use …\nChange in survey mode0%20%40%60%80%100%2014201620182020202220242026\nYouTube\nFacebook\nInstagram\nPinterest\nTikTok\nLinkedIn\nWhatsApp\nSnapchat\nX (formerly Twitter)\nReddit\nBeReal\nNextdoor\nThreads\nBluesky\nTruth Social\nNote: The vertical line indicates a change in mode. Polls from 2012-2021 were conducted via phone. In 2023, the poll was conducted via web and mail. In 2024 through 2026, the poll was conducted via web, mail and phone. For more on the mode shift in 2023, read our Q&A. Refer to the topline for more information on how question wording varied over the years. Pre-2018 data is not available for YouTube, Snapchat or WhatsApp; pre-2019 data is not available for Reddit; pre-2021 data is not available for TikTok or Nextdoor; pre-2023 data is not available for BeReal. Pre-2025 data is not available for Threads, BlueSky, or Truth Social. Respondents who did not give an answer are not shown.\nSource: Surveys of U.S. adults conducted 2012-2026.\nPEW RESEARCH CENTER\nChartData\nDownload ImageShare", "segmentation_method": "reviewed_source_semantics", "label": "Which social media platforms are most common?", "source_line_range": [ 5, 29 ] }, { "id": "body-region-3", "text": "who uses each social media platform usage of the major social media platforms varies by factors such as age gender and level of formal education of u s adults who say they ever use by agegenderrace ethnicityhousehold incomeeducationcommunityparty id ages 18 29 30 49 50 64 65 youtube 95 91 85 65 facebook 69 78 71 59 instagram 79 64 41 21 tiktok 65 45 31 11 whatsapp 37 39 36 20 linkedin 41 37 32 13 snapchat 56 33 13 4 reddit 40 35 18 6 x formerly twitter 31 20 17 7 nextdoor 10 21 19 18 truth social 1 3 6 4 note respondents who did not give an answer are not shown source survey of u s adults conducted jan 30 june 18 2026", "source_text": "Who uses each social media platform?\nUsage of the major social media platforms varies by factors such as age, gender and level of formal education.\n% of U.S. adults who say they ever use __ by …\nAGEGENDERRACE &\nETHNICITYHOUSEHOLD\nINCOMEEDUCATIONCOMMUNITYPARTY ID\nAges 18-29\t\t30-49\t\t50-64\t\t65+\nYouTube\t\t95\t\t91\t\t85\t\t65\nFacebook\t\t69\t\t78\t\t71\t\t59\nInstagram\t\t79\t\t64\t\t41\t\t21\nTikTok\t\t65\t\t45\t\t31\t\t11\nWhatsApp\t\t37\t\t39\t\t36\t\t20\nLinkedIn\t\t41\t\t37\t\t32\t\t13\nSnapchat\t\t56\t\t33\t\t13\t\t4\nReddit\t\t40\t\t35\t\t18\t\t6\nX (formerly Twitter)\t\t31\t\t20\t\t17\t\t7\nNextdoor\t\t10\t\t21\t\t19\t\t18\nTruth Social\t\t1\t\t3\t\t6\t\t4\nNote: Respondents who did not give an answer are not shown.\nSource: Survey of U.S. adults conducted Jan. 30-June 18, 2026.", "segmentation_method": "reviewed_source_semantics", "label": "Who uses each social media platform?", "source_line_range": [ 30, 49 ] }, { "id": "body-region-4", "text": "find out more this fact sheet was compiled by research associate william bishop research associate michelle faverio research analyst eugenie park information graphics designer sharon mcgill digital producer sara atske and research analyst olivia sidoti also contributed follow these links for more in depth analysis of the impact of social media on american life americans social media use 2025 nov 20 2025 q a how and why we re changing the way we study tech adoption jan 31 2024 find more publications related to internet and technology and more benchmarks from our national public opinion reference survey npors", "source_text": "Find out more\nThis fact sheet was compiled by Research Associate William Bishop. Research Associate Michelle Faverio, Research Analyst Eugenie Park, Information Graphics Designer Sharon McGill, Digital Producer Sara Atske and Research Analyst Olivia Sidoti also contributed.\nFollow these links for more in-depth analysis of the impact of social media on American life.\nAmericans’ Social Media Use 2025 (Nov. 20, 2025)\nQ&A: How – and why – we’re changing the way we study tech adoption (Jan. 31, 2024)\nFind more publications related to internet and technology and more benchmarks from our National Public Opinion Reference Survey (NPORS).", "segmentation_method": "reviewed_source_semantics", "label": "Find out more", "source_line_range": [ 50, 55 ] } ], "ending": { "text": "Find more publications related to internet and technology and more benchmarks from our National Public Opinion Reference Survey (NPORS)." } } }, { "id": "article-091", "name": "The Year in Computer Science", "url": "https://www.quantamagazine.org/the-year-in-computer-science-20241219/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "The\\ Year\\ in\\ Computer\\ Science" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "SERIES" ] }, { "id": "stable-3", "alternatives": [ "2024 in Review" ] }, { "id": "stable-4", "alternatives": [ "Bill Andrews" ] }, { "id": "stable-5", "alternatives": [ "Senior Editor" ] }, { "id": "stable-6", "alternatives": [ "December 19, 2024" ] }, { "id": "stable-7", "alternatives": [ "Physics" ] }, { "id": "stable-8", "alternatives": [ "Mathematics" ] }, { "id": "stable-9", "alternatives": [ "Biology" ] }, { "id": "stable-10", "alternatives": [ "Computer Science" ] }, { "id": "stable-11", "alternatives": [ "Topics" ] }, { "id": "stable-12", "alternatives": [ "Archive" ] }, { "id": "stable-13", "alternatives": [ "View PDF/Print Mode" ] }, { "id": "stable-14", "alternatives": [ "2024 in Review" ] }, { "id": "stable-15", "alternatives": [ "algorithms" ] }, { "id": "stable-16", "alternatives": [ "artificial intelligence" ] }, { "id": "stable-17", "alternatives": [ "computability" ] }, { "id": "stable-18", "alternatives": [ "computer science" ] }, { "id": "stable-19", "alternatives": [ "cryptography" ] }, { "id": "stable-20", "alternatives": [ "error correction" ] }, { "id": "stable-21", "alternatives": [ "games" ] }, { "id": "stable-22", "alternatives": [ "machine learning" ] }, { "id": "stable-23", "alternatives": [ "neural networks" ] }, { "id": "stable-24", "alternatives": [ "quantum computing" ] }, { "id": "stable-25", "alternatives": [ "quantum cryptography" ] }, { "id": "stable-26", "alternatives": [ "quantum physics" ] }, { "id": "stable-27", "alternatives": [ "Year in Review" ] }, { "id": "stable-28", "alternatives": [ "All topics" ] }, { "id": "stable-29", "alternatives": [ "Share this article" ] }, { "id": "stable-30", "alternatives": [ "Newsletter" ] }, { "id": "stable-31", "alternatives": [ "Get Quanta Magazine delivered to your inbox" ] }, { "id": "stable-32", "alternatives": [ "Subscribe now" ] }, { "id": "stable-33", "alternatives": [ "The Quanta Newsletter" ] }, { "id": "stable-34", "alternatives": [ "Get highlights of the most important news delivered to your email inbox" ] }, { "id": "stable-35", "alternatives": [ "Subscribe" ] }, { "id": "stable-36", "alternatives": [ "Also in Computer Science" ] }, { "id": "stable-37", "alternatives": [ "Comment on this article" ] }, { "id": "stable-38", "alternatives": [ "Quanta Magazine moderates comments to facilitate an informed, substantive, civil conversation. Abusive, profane, self-promotional, misleading, incoherent or off-topic comments will be rejected. Moderators are staffed during regular business hours (New York time) and can only accept comments written in English." ] }, { "id": "stable-39", "alternatives": [ "Show comments" ] }, { "id": "stable-40", "alternatives": [ "NEXT ARTICLE" ] }, { "id": "stable-41", "alternatives": [ "About Quanta" ] }, { "id": "stable-42", "alternatives": [ "Archive" ] }, { "id": "stable-43", "alternatives": [ "Contact Us" ] }, { "id": "stable-44", "alternatives": [ "Terms & Conditions" ] }, { "id": "stable-45", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-46", "alternatives": [ "AI Editorial Policy" ] }, { "id": "stable-47", "alternatives": [ "All Rights Reserved" ] }, { "id": "stable-48", "alternatives": [ "An editorially independent publication supported by the Simons Foundation." ] }, { "id": "stable-49", "alternatives": [ "Simons Foundation" ] }, { "id": "stable-50", "alternatives": [ "Email address" ], "visible_control": { "selector": "section.newsletter #mce-EMAIL", "attribute": "placeholder" } }, { "id": "body-51", "alternatives": [ "Video: The year’s biggest computer science stories included a new understanding of large language models, and a breakthrough in being able to compute complex quantum systems." ] }, { "id": "body-52", "alternatives": [ "Richard Borge for Quanta Magazine" ] }, { "id": "body-53", "alternatives": [ "Kristina Armitage/Quanta Magazine", "Kristina Armitage/ Quanta Magazine" ] }, { "id": "body-54", "alternatives": [ "Dave Whyte for Quanta Magazine" ] }, { "id": "body-55", "alternatives": [ "Myriam Wares for Quanta Magazine" ] }, { "id": "body-56", "alternatives": [ "begun to understand" ] }, { "id": "body-57", "alternatives": [ "these systems truly understand" ] }, { "id": "body-58", "alternatives": [ "AI’s progress has already started to slow" ] }, { "id": "body-59", "alternatives": [ "the fifth busy beaver" ] }, { "id": "body-60", "alternatives": [ "an error-correcting technique essential for quantum computers" ] }, { "id": "body-61", "alternatives": [ "fundamentally inefficient" ] }, { "id": "body-62", "alternatives": [ "found the fifth busy beaver" ] }, { "id": "body-63", "alternatives": [ "easily simulated online" ] }, { "id": "body-64", "alternatives": [ "chronicled" ] }, { "id": "body-65", "alternatives": [ "overwhelming mathematical complexity" ] }, { "id": "body-66", "alternatives": [ "Game of Life" ] }, { "id": "body-67", "alternatives": [ "the Game of Life is “omniperiodic”" ] }, { "id": "body-68", "alternatives": [ "quantum error-correction codes can make these exotic machines possible" ] }, { "id": "body-69", "alternatives": [ "built out of aperiodic tilings" ] }, { "id": "body-70", "alternatives": [ "a major question about classical error-correcting codes" ] }, { "id": "body-71", "alternatives": [ "spit out a full description of any system" ] }, { "id": "body-72", "alternatives": [ "entanglement vanishes completely" ] }, { "id": "body-73", "alternatives": [ "relatively easy for a quantum computer" ] }, { "id": "body-74", "alternatives": [ "a new basis for cryptography" ] }, { "id": "body-75", "alternatives": [ "surprising and powerful" ] }, { "id": "body-76", "alternatives": [ "security breaches" ] }, { "id": "body-77", "alternatives": [ "shenanigans" ] }, { "id": "body-78", "alternatives": [ "stochastic parrots" ] }, { "id": "body-79", "alternatives": [ "these machines might really understand" ] }, { "id": "body-80", "alternatives": [ "won the 2024 Nobel Prize in Physics" ] }, { "id": "body-81", "alternatives": [ "grokking" ] }, { "id": "body-82", "alternatives": [ "solve problems step by step" ] }, { "id": "body-83", "alternatives": [ "But another finding showed that certain classical error-correcting codes are fundamentally inefficient, dashing hopes for practical versions of this “magical phenomenon.”" ] }, { "id": "body-84", "alternatives": [ "By finding patterns that repeated after 19 and 41 steps, they proved that the Game of Life is “omniperiodic” — capable of repeating after every possible number of steps." ] }, { "id": "body-85", "alternatives": [ "After more than 20 years, the answer is no: There’s simply no way around that inefficiency." ] }, { "id": "body-86", "alternatives": [ "And quantum theory’s complexities could also provide a new basis for cryptography, should current cryptography crumble under qubits." ] }, { "id": "body-87", "alternatives": [ "Other teams are using the techniques of computational complexity — a branch of computer science that studies the relative difficulty of different problems — to help explain why language models seem to do so much better when they solve problems step by step." ] }, { "id": "body-88", "alternatives": [ "Kristina Armitage/Quanta Magazine Big Beaver Breakthroughs", "Kristina Armitage/ Quanta Magazine Big Beaver Breakthroughs" ] }, { "id": "body-89", "alternatives": [ "Dave Whyte for Quanta Magazine Better Living Through Codes" ] }, { "id": "body-90", "alternatives": [ "Kristina Armitage/Quanta Magazine Peering Within the Quantum", "Kristina Armitage/ Quanta Magazine Peering Within the Quantum" ] }, { "id": "body-91", "alternatives": [ "Myriam Wares for Quanta Magazine A Growing Understanding of AI" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Human approved direct replacement URL in cohort revision2. Complete initial authored body independently reviewed against fullpage screenshot, DOM, accessibility and computed visibility evidence, without interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "The Year in Computer Science" ], "html_selector": "h1.post__title__title.mv025,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-091/comment-qualification-reference-r5.json", "sha256": "2c5cb4b2f1f91c8b43f924c32de5f0fcc3e3c9b1a96448d6ace5a9365fcc88fa", "chars": 820, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Researchers got a better look at the thoughts of chatbots, amateurs learned exactly how complicated simple systems can be, and quantum computers passed an essential milestone.\n\nVideo: The year’s biggest computer science stories included a new understanding of large language models, and a breakthrough in being able to compute complex quantum systems.\n\nRichard Borge for Quanta Magazine\n\nThe end of 2024 seems a particularly uncertain time in history, and theoretical computer science is no exception. Amid several breakthroughs and new findings, the field also confronted its own doubts and limitations.\n\nFor example, artificial intelligence once again dominated the popular discourse this year. Researchers have begun to understand what might be going on within the “black boxes” of neural networks that power chatbots such as Bard and ChatGPT, and to show that these systems truly understand the data they’re manipulating and composing. But there’s also a growing sense that AI’s progress has already started to slow.\n\nOther areas of computer science saw clearer successes. After decades of hiding, an elusive numerical critter known as the fifth busy beaver finally gave itself up. But even here the news is not all good: Initial searches for its successor — the sixth busy beaver — suggest that it may lie beyond impassable mathematical barriers.\n\nThe field of error-correcting codes — mathematical constructions that can fix themselves if an error has occurred — also rose in prominence in 2024. Researchers showed, for the first time, that an error-correcting technique essential for quantum computers really does work. But another finding showed that certain classical error-correcting codes are fundamentally inefficient, dashing hopes for practical versions of this “magical phenomenon.”\n\nKristina Armitage/Quanta Magazine\n\nBig Beaver Breakthroughs\n\nThis summer, a team of enthusiastic amateurs solved one of the biggest open questions in computer science when they found the fifth busy beaver. Named for a particularly industrious kind of computer program that takes a long time to run, the problem is connected to some of the deepest open questions in computer science and mathematics.\n\nThe problem involves Turing machines, some of the simplest possible computing devices, first conceived by Alan Turing as a model for a general computer and now easily simulated online. Depending on their initial settings, these can either run forever or halt after a set number of steps. The busy beaver problem asks: Given only a certain number of rules governing the machine, how long can it run, short of forever? Researchers solved this problem for machines with 1, 2, 3 or 4 rules (1, 6, 21 and 107 steps, respectively), but the fifth busy beaver number eluded them for decades.\n\nQuanta staff writer Ben Brubaker chronicled the efforts of a global team, made up mostly of nonexperts, to find the number — it’s 47,176,870 — and prove that it couldn’t be higher. The problem doesn’t have any direct applications, but finding the solution does represent a kind of victory over overwhelming mathematical complexity — one that early searches for the sixth busy beaver suggest we may never see again.\n\nAnd in January, we wrote about another diverse team of nonprofessionals who helped solve a different kind of numerical puzzle. This effort focused on the Game of Life, by John Conway, and the hunt for repeating patterns of specific lengths. By finding patterns that repeated after 19 and 41 steps, they proved that the Game of Life is “omniperiodic” — capable of repeating after every possible number of steps.\n\nDave Whyte for Quanta Magazine\n\nBetter Living Through Codes\n\nQuantum computers have long tantalized researchers, but despite years of work, a truly useful one remains far out of reach. This is partly due to their nature: Quantum computers exploit the vagaries of quantum mechanics, the rules governing the universe’s most minute interactions, and this makes them vulnerable to significant errors. Almost 30 years ago, researchers showed that it’s possible to combine qubits — the quantum equivalent of a computer’s bits — in such a way that they could tolerate errors. But for this to work, each individual qubit’s error rate must be below a certain minimum threshold. In December, a team at Google announced that they’d reached that level, showing for the first time that quantum error-correction codes can make these exotic machines possible (although still not anytime soon).\n\nQuanta also covered another new kind of quantum error-correcting code in February, this one built out of aperiodic tilings — sets of shapes that combine in ways that never repeat. As Brubaker wrote, the connection is possible because for both the tiles and the codes, “learning about a small part of a large system reveals nothing about the system as a whole.”\n\nQuantum error correction didn’t have all the fun this year — scientists also answered a major question about classical error-correcting codes that can be used in the computers we all employ today. The most promising codes have always been extremely inefficient, and researchers have wondered if it might be possible to do better. After more than 20 years, the answer is no: There’s simply no way around that inefficiency.\n\nKristina Armitage/Quanta Magazine\n\nPeering Within the Quantum\n\nMany of the biggest discoveries this year showed that, through the lens of computer science, even the inscrutable world of quantum mechanics can become slightly clearer. Tiny particles interact in complicated ways, and it’s still difficult for scientists to fully understand a given system of them. But four computer scientists recently developed a new algorithm that can efficiently spit out a full description of any system, a first for the field. By combining an optimization tool from mathematics with a computer science approach known as a relaxation technique, the team showed how to quickly generate any quantum system’s Hamiltonian — a kind of super equation that fully describes it — so long as it is at a constant temperature.\n\nThe same team of researchers ended up making another big quantum discovery when they proved that rising temperatures don’t just weaken the interactions between particles known as entanglement: There’s always a specific temperature at which entanglement vanishes completely.\n\nA separate team also showed that a problem related to such quantum systems — finding their local minimum energy level — can be relatively easy for a quantum computer to do. Not only is this welcome progress in the field of quantum physics, but it also proves that there really might be useful problems quantum computers can solve that are beyond the reach of classical machines. And quantum theory’s complexities could also provide a new basis for cryptography, should current cryptography crumble under qubits.\n\nMyriam Wares for Quanta Magazine\n\nA Growing Understanding of AI\n\nArtificial intelligence is perhaps the most visible — and most misunderstood — area of theoretical computer science. This year OpenAI, of ChatGPT fame, released its o1 chatbot models, which seem to be capable of surprising and powerful new feats of ingenuity. But despite such progress, the inner workings of these tools remains unclear, leaving room for security breaches and other shenanigans.\n\nResearchers are particularly curious about whether these models truly understand what they’re saying or if they’re just “stochastic parrots,” in the words of a 2021 paper, simply repeating variations of what they’ve heard before. New research suggests that these machines might really understand. When a team at Google DeepMind studied the skills necessary for these language models to pull off their extraordinary feats, they concluded that the machines can’t be simply regurgitating training data. “They demonstrate convincingly that [certain models] can generate text that combines skills and topics in ways that almost certainly did not occur in the training data,” said the AI pioneer Geoff Hinton, who won the 2024 Nobel Prize in Physics for his work with machine learning.\n\nIndeed, a phenomenon known as grokking, in which models are overtrained to the point of unexpected mastery, suggests new ways to understand how these mysterious machines process information. Other teams are using the techniques of computational complexity — a branch of computer science that studies the relative difficulty of different problems — to help explain why language models seem to do so much better when they solve problems step by step.\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "researchers got a better look at the thoughts of chatbots amateurs learned exactly how complicated simple systems can be and quantum computers passed an essential milestone video the year s biggest computer science stories included a new understanding of large language models and a breakthrough in being able to compute complex quantum systems richard borge for quanta magazine the end of 2024 seems a particularly uncertain time in history and theoretical computer science is no exception amid several breakthroughs and new findings the field also confronted its own doubts and limitations for example artificial intelligence once again dominated the popular discourse this year researchers have begun to understand what might be going on within the black boxes of neural networks that power chatbots such as bard and chatgpt and to show that these systems truly understand the data they re manipulating and composing but there s also a growing sense that ai s progress has already started to slow other areas of computer science saw clearer successes after decades of hiding an elusive numerical critter known as the fifth busy beaver finally gave itself up but even here the news is not all good initial searches for its successor the sixth busy beaver suggest that it may lie beyond impassable mathematical barriers the field of error correcting codes mathematical constructions that can fix themselves if an error has occurred also rose in prominence in 2024 researchers showed for the first time that an error correcting technique essential for quantum computers really does work but another finding showed that certain classical error correcting codes are fundamentally inefficient dashing hopes for practical versions of this magical phenomenon kristina armitage quanta magazine", "source_text": "Researchers got a better look at the thoughts of chatbots, amateurs learned exactly how complicated simple systems can be, and quantum computers passed an essential milestone.\n\nVideo: The year’s biggest computer science stories included a new understanding of large language models, and a breakthrough in being able to compute complex quantum systems.\n\nRichard Borge for Quanta Magazine\n\nThe end of 2024 seems a particularly uncertain time in history, and theoretical computer science is no exception. Amid several breakthroughs and new findings, the field also confronted its own doubts and limitations.\n\nFor example, artificial intelligence once again dominated the popular discourse this year. Researchers have begun to understand what might be going on within the “black boxes” of neural networks that power chatbots such as Bard and ChatGPT, and to show that these systems truly understand the data they’re manipulating and composing. But there’s also a growing sense that AI’s progress has already started to slow.\n\nOther areas of computer science saw clearer successes. After decades of hiding, an elusive numerical critter known as the fifth busy beaver finally gave itself up. But even here the news is not all good: Initial searches for its successor — the sixth busy beaver — suggest that it may lie beyond impassable mathematical barriers.\n\nThe field of error-correcting codes — mathematical constructions that can fix themselves if an error has occurred — also rose in prominence in 2024. Researchers showed, for the first time, that an error-correcting technique essential for quantum computers really does work. But another finding showed that certain classical error-correcting codes are fundamentally inefficient, dashing hopes for practical versions of this “magical phenomenon.”\n\nKristina Armitage/Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Researchers got a better look at the thoughts of chatbots, a", "source_line_range": [ 1, 16 ] }, { "id": "body-region-2", "text": "big beaver breakthroughs this summer a team of enthusiastic amateurs solved one of the biggest open questions in computer science when they found the fifth busy beaver named for a particularly industrious kind of computer program that takes a long time to run the problem is connected to some of the deepest open questions in computer science and mathematics the problem involves turing machines some of the simplest possible computing devices first conceived by alan turing as a model for a general computer and now easily simulated online depending on their initial settings these can either run forever or halt after a set number of steps the busy beaver problem asks given only a certain number of rules governing the machine how long can it run short of forever researchers solved this problem for machines with 1 2 3 or 4 rules 1 6 21 and 107 steps respectively but the fifth busy beaver number eluded them for decades quanta staff writer ben brubaker chronicled the efforts of a global team made up mostly of nonexperts to find the number it s 47 176 870 and prove that it couldn t be higher the problem doesn t have any direct applications but finding the solution does represent a kind of victory over overwhelming mathematical complexity one that early searches for the sixth busy beaver suggest we may never see again and in january we wrote about another diverse team of nonprofessionals who helped solve a different kind of numerical puzzle this effort focused on the game of life by john conway and the hunt for repeating patterns of specific lengths by finding patterns that repeated after 19 and 41 steps they proved that the game of life is omniperiodic capable of repeating after every possible number of steps dave whyte for quanta magazine", "source_text": "Big Beaver Breakthroughs\n\nThis summer, a team of enthusiastic amateurs solved one of the biggest open questions in computer science when they found the fifth busy beaver. Named for a particularly industrious kind of computer program that takes a long time to run, the problem is connected to some of the deepest open questions in computer science and mathematics.\n\nThe problem involves Turing machines, some of the simplest possible computing devices, first conceived by Alan Turing as a model for a general computer and now easily simulated online. Depending on their initial settings, these can either run forever or halt after a set number of steps. The busy beaver problem asks: Given only a certain number of rules governing the machine, how long can it run, short of forever? Researchers solved this problem for machines with 1, 2, 3 or 4 rules (1, 6, 21 and 107 steps, respectively), but the fifth busy beaver number eluded them for decades.\n\nQuanta staff writer Ben Brubaker chronicled the efforts of a global team, made up mostly of nonexperts, to find the number — it’s 47,176,870 — and prove that it couldn’t be higher. The problem doesn’t have any direct applications, but finding the solution does represent a kind of victory over overwhelming mathematical complexity — one that early searches for the sixth busy beaver suggest we may never see again.\n\nAnd in January, we wrote about another diverse team of nonprofessionals who helped solve a different kind of numerical puzzle. This effort focused on the Game of Life, by John Conway, and the hunt for repeating patterns of specific lengths. By finding patterns that repeated after 19 and 41 steps, they proved that the Game of Life is “omniperiodic” — capable of repeating after every possible number of steps.\n\nDave Whyte for Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "Big Beaver Breakthroughs", "source_line_range": [ 17, 28 ] }, { "id": "body-region-3", "text": "better living through codes quantum computers have long tantalized researchers but despite years of work a truly useful one remains far out of reach this is partly due to their nature quantum computers exploit the vagaries of quantum mechanics the rules governing the universe s most minute interactions and this makes them vulnerable to significant errors almost 30 years ago researchers showed that it s possible to combine qubits the quantum equivalent of a computer s bits in such a way that they could tolerate errors but for this to work each individual qubit s error rate must be below a certain minimum threshold in december a team at google announced that they d reached that level showing for the first time that quantum error correction codes can make these exotic machines possible although still not anytime soon quanta also covered another new kind of quantum error correcting code in february this one built out of aperiodic tilings sets of shapes that combine in ways that never repeat as brubaker wrote the connection is possible because for both the tiles and the codes learning about a small part of a large system reveals nothing about the system as a whole quantum error correction didn t have all the fun this year scientists also answered a major question about classical error correcting codes that can be used in the computers we all employ today the most promising codes have always been extremely inefficient and researchers have wondered if it might be possible to do better after more than 20 years the answer is no there s simply no way around that inefficiency kristina armitage quanta magazine", "source_text": "Better Living Through Codes\n\nQuantum computers have long tantalized researchers, but despite years of work, a truly useful one remains far out of reach. This is partly due to their nature: Quantum computers exploit the vagaries of quantum mechanics, the rules governing the universe’s most minute interactions, and this makes them vulnerable to significant errors. Almost 30 years ago, researchers showed that it’s possible to combine qubits — the quantum equivalent of a computer’s bits — in such a way that they could tolerate errors. But for this to work, each individual qubit’s error rate must be below a certain minimum threshold. In December, a team at Google announced that they’d reached that level, showing for the first time that quantum error-correction codes can make these exotic machines possible (although still not anytime soon).\n\nQuanta also covered another new kind of quantum error-correcting code in February, this one built out of aperiodic tilings — sets of shapes that combine in ways that never repeat. As Brubaker wrote, the connection is possible because for both the tiles and the codes, “learning about a small part of a large system reveals nothing about the system as a whole.”\n\nQuantum error correction didn’t have all the fun this year — scientists also answered a major question about classical error-correcting codes that can be used in the computers we all employ today. The most promising codes have always been extremely inefficient, and researchers have wondered if it might be possible to do better. After more than 20 years, the answer is no: There’s simply no way around that inefficiency.\n\nKristina Armitage/Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "Better Living Through Codes", "source_line_range": [ 29, 38 ] }, { "id": "body-region-4", "text": "peering within the quantum many of the biggest discoveries this year showed that through the lens of computer science even the inscrutable world of quantum mechanics can become slightly clearer tiny particles interact in complicated ways and it s still difficult for scientists to fully understand a given system of them but four computer scientists recently developed a new algorithm that can efficiently spit out a full description of any system a first for the field by combining an optimization tool from mathematics with a computer science approach known as a relaxation technique the team showed how to quickly generate any quantum system s hamiltonian a kind of super equation that fully describes it so long as it is at a constant temperature the same team of researchers ended up making another big quantum discovery when they proved that rising temperatures don t just weaken the interactions between particles known as entanglement there s always a specific temperature at which entanglement vanishes completely a separate team also showed that a problem related to such quantum systems finding their local minimum energy level can be relatively easy for a quantum computer to do not only is this welcome progress in the field of quantum physics but it also proves that there really might be useful problems quantum computers can solve that are beyond the reach of classical machines and quantum theory s complexities could also provide a new basis for cryptography should current cryptography crumble under qubits myriam wares for quanta magazine", "source_text": "Peering Within the Quantum\n\nMany of the biggest discoveries this year showed that, through the lens of computer science, even the inscrutable world of quantum mechanics can become slightly clearer. Tiny particles interact in complicated ways, and it’s still difficult for scientists to fully understand a given system of them. But four computer scientists recently developed a new algorithm that can efficiently spit out a full description of any system, a first for the field. By combining an optimization tool from mathematics with a computer science approach known as a relaxation technique, the team showed how to quickly generate any quantum system’s Hamiltonian — a kind of super equation that fully describes it — so long as it is at a constant temperature.\n\nThe same team of researchers ended up making another big quantum discovery when they proved that rising temperatures don’t just weaken the interactions between particles known as entanglement: There’s always a specific temperature at which entanglement vanishes completely.\n\nA separate team also showed that a problem related to such quantum systems — finding their local minimum energy level — can be relatively easy for a quantum computer to do. Not only is this welcome progress in the field of quantum physics, but it also proves that there really might be useful problems quantum computers can solve that are beyond the reach of classical machines. And quantum theory’s complexities could also provide a new basis for cryptography, should current cryptography crumble under qubits.\n\nMyriam Wares for Quanta Magazine", "segmentation_method": "reviewed_source_semantics", "label": "Peering Within the Quantum", "source_line_range": [ 39, 48 ] }, { "id": "body-region-5", "text": "a growing understanding of ai artificial intelligence is perhaps the most visible and most misunderstood area of theoretical computer science this year openai of chatgpt fame released its o1 chatbot models which seem to be capable of surprising and powerful new feats of ingenuity but despite such progress the inner workings of these tools remains unclear leaving room for security breaches and other shenanigans researchers are particularly curious about whether these models truly understand what they re saying or if they re just stochastic parrots in the words of a 2021 paper simply repeating variations of what they ve heard before new research suggests that these machines might really understand when a team at google deepmind studied the skills necessary for these language models to pull off their extraordinary feats they concluded that the machines can t be simply regurgitating training data they demonstrate convincingly that certain models can generate text that combines skills and topics in ways that almost certainly did not occur in the training data said the ai pioneer geoff hinton who won the 2024 nobel prize in physics for his work with machine learning indeed a phenomenon known as grokking in which models are overtrained to the point of unexpected mastery suggests new ways to understand how these mysterious machines process information other teams are using the techniques of computational complexity a branch of computer science that studies the relative difficulty of different problems to help explain why language models seem to do so much better when they solve problems step by step", "source_text": "A Growing Understanding of AI\n\nArtificial intelligence is perhaps the most visible — and most misunderstood — area of theoretical computer science. This year OpenAI, of ChatGPT fame, released its o1 chatbot models, which seem to be capable of surprising and powerful new feats of ingenuity. But despite such progress, the inner workings of these tools remains unclear, leaving room for security breaches and other shenanigans.\n\nResearchers are particularly curious about whether these models truly understand what they’re saying or if they’re just “stochastic parrots,” in the words of a 2021 paper, simply repeating variations of what they’ve heard before. New research suggests that these machines might really understand. When a team at Google DeepMind studied the skills necessary for these language models to pull off their extraordinary feats, they concluded that the machines can’t be simply regurgitating training data. “They demonstrate convincingly that [certain models] can generate text that combines skills and topics in ways that almost certainly did not occur in the training data,” said the AI pioneer Geoff Hinton, who won the 2024 Nobel Prize in Physics for his work with machine learning.\n\nIndeed, a phenomenon known as grokking, in which models are overtrained to the point of unexpected mastery, suggests new ways to understand how these mysterious machines process information. Other teams are using the techniques of computational complexity — a branch of computer science that studies the relative difficulty of different problems — to help explain why language models seem to do so much better when they solve problems step by step.", "segmentation_method": "reviewed_source_semantics", "label": "A Growing Understanding of AI", "source_line_range": [ 49, 55 ] } ], "ending": { "text": "hat studies the relative difficulty of different problems — to help explain why language models seem to do so much better when they solve problems step by step." } } }, { "id": "article-092", "name": "A crash course in just-in-time (JIT) compilers", "url": "https://hacks.mozilla.org/2017/02/a-crash-course-in-just-in-time-jit-compilers/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "A crash course in just-in-time \\(JIT\\) compilers" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Lin Clark" ] }, { "id": "stable-3", "alternatives": [ "A cartoon intro to WebAssembly" ] }, { "id": "stable-4", "alternatives": [ "JavaScript" ] }, { "id": "stable-5", "alternatives": [ "Performance" ] }, { "id": "stable-6", "alternatives": [ "Download Firefox" ] }, { "id": "stable-7", "alternatives": [ "Discover great resources for web development" ] }, { "id": "stable-8", "alternatives": [ "Sign up for the Mozilla Developer Newsletter" ] }, { "id": "stable-9", "alternatives": [ "Privacy Policy" ] }, { "id": "stable-10", "alternatives": [ "Sign up now" ] }, { "id": "stable-11", "alternatives": [ "Comments are closed for this article." ] }, { "id": "stable-12", "alternatives": [ "Creative Commons Attribution Share-Alike License v3.0" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete prose, real preformatted arraySum code, conclusion list and author bio reviewed in full-page screenshot. Cartoon image lettering/alt excluded; no rendered prose omitted. Comments excluded. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "A crash course in just-in-time (JIT) compilers" ], "html_selector": "h1.post__title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "li.comment", "author_selector": ".comment__title > cite.author", "body_selector": ".comment__body", "id_attribute": "id", "section_markers": [ "comments", "Comments" ], "version": 2, "minimum_comments": 12, "text_scope": { "body_end": " focus on Rust and WebAssembly.\n\nhttps://twitter.com/linclark\n@linclark\n\nMore articles by Lin Clark…", "end_markers": [ "Comments are closed for this article." ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-092/comment-qualification-reference-r5.json", "sha256": "ef2dae3a1ba4d98f3754a72bb219b6f0044e2fc109f064ccedd09f017da7e6f4", "chars": 5048, "record_count": 14 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 14, "qualification_only": true } }, "ground_truth_main_content": "This is the second part in a series on WebAssembly and what makes it fast. If you haven’t read the others, we recommend starting from the beginning.\n\nJavaScript started out slow, but then got faster thanks to something called the JIT. But how does the JIT work?\n\nHow JavaScript is run in the browser\n\nWhen you as a developer add JavaScript to the page, you have a goal and a problem.\n\nGoal: you want to tell the computer what to do.\n\nProblem: you and the computer speak different languages.\n\nYou speak a human language, and the computer speaks a machine language. Even if you don’t think about JavaScript or other high-level programming languages as human languages, they really are. They’ve been designed for human cognition, not for machine cognition.\n\nSo the job of the JavaScript engine is to take your human language and turn it into something the machine understands.\n\nI think of this like the movie Arrival, where you have humans and aliens who are trying to talk to each other.\n\nIn that movie, the humans and aliens don’t just do word-for-word translations. The two groups have different ways of thinking about the world. And that’s true of humans and machines too (I’ll explain this more in the next post).\n\nSo how does the translation happen?\n\nIn programming, there are generally two ways of translating to machine language. You can use an interpreter or a compiler.\n\nWith an interpreter, this translation happens pretty much line-by-line, on the fly.\n\nA compiler on the other hand doesn’t translate on the fly. It works ahead of time to create that translation and write it down.\n\nThere are pros and cons to each of these ways of handling the translation.\n\nInterpreter pros and cons\n\nInterpreters are quick to get up and running. You don’t have to go through that whole compilation step before you can start running your code. You just start translating that first line and running it.\n\nBecause of this, an interpreter seems like a natural fit for something like JavaScript. It’s important for a web developer to be able to get going and run their code quickly.\n\nAnd that’s why browsers used JavaScript interpreters in the beginning.\n\nBut the con of using an interpreter comes when you’re running the same code more than once. For example, if you’re in a loop. Then you have to do the same translation over and over and over again.\n\nCompiler pros and cons\n\nThe compiler has the opposite trade-offs.\n\nIt takes a little bit more time to start up because it has to go through that compilation step at the beginning. But then code in loops runs faster, because it doesn’t need to repeat the translation for each pass through that loop.\n\nAnother difference is that the compiler has more time to look at the code and make edits to it so that it will run faster. These edits are called optimizations.\n\nThe interpreter is doing its work during runtime, so it can’t take much time during the translation phase to figure out these optimizations.\n\nJust-in-time compilers: the best of both worlds\n\nAs a way of getting rid of the interpreter’s inefficiency—where the interpreter has to keep retranslating the code every time they go through the loop—browsers started mixing compilers in.\n\nDifferent browsers do this in slightly different ways, but the basic idea is the same. They added a new part to the JavaScript engine, called a monitor (aka a profiler). That monitor watches the code as it runs, and makes a note of how many times it is run and what types are used.\n\nAt first, the monitor just runs everything through the interpreter.\n\nIf the same lines of code are run a few times, that segment of code is called warm. If it’s run a lot, then it’s called hot.\n\nBaseline compiler\n\nWhen a function starts getting warm, the JIT will send it off to be compiled. Then it will store that compilation.\n\nEach line of the function is compiled to a “stub”. The stubs are indexed by line number and variable type (I’ll explain why that’s important later). If the monitor sees that execution is hitting the same code again with the same variable types, it will just pull out its compiled version.\n\nThat helps speed things up. But like I said, there’s more a compiler can do. It can take some time to figure out the most efficient way to do things… to make optimizations.\n\nThe baseline compiler will make some of these optimizations (I give an example of one below). It doesn’t want to take too much time, though, because it doesn’t want to hold up execution too long.\n\nHowever, if the code is really hot—if it’s being run a whole bunch of times—then it’s worth taking the extra time to make more optimizations.\n\nOptimizing compiler\n\nWhen a part of the code is very hot, the monitor will send it off to the optimizing compiler. This will create another, even faster, version of the function that will also be stored.\n\nIn order to make a faster version of the code, the optimizing compiler has to make some assumptions.\n\nFor example, if it can assume that all objects created by a particular constructor have the same shape—that is, that they always have the same property names, and that those properties were added in the same order— then it can cut some corners based on that.\n\nThe optimizing compiler uses the information the monitor has gathered by watching code execution to make these judgments. If something has been true for all previous passes through a loop, it assumes it will continue to be true.\n\nBut of course with JavaScript, there are never any guarantees. You could have 99 objects that all have the same shape, but then the 100th might be missing a property.\n\nSo the compiled code needs to check before it runs to see whether the assumptions are valid. If they are, then the compiled code runs. But if not, the JIT assumes that it made the wrong assumptions and trashes the optimized code.\n\nThen execution goes back to the interpreter or baseline compiled version. This process is called deoptimization (or bailing out).\n\nUsually optimizing compilers make code faster, but sometimes they can cause unexpected performance problems. If you have code that keeps getting optimized and then deoptimized, it ends up being slower than just executing the baseline compiled version.\n\nMost browsers have added limits to break out of these optimization/deoptimization cycles when they happen. If the JIT has made more than, say, 10 attempts at optimizing and keeps having to throw it out, it will just stop trying.\n\nAn example optimization: Type specialization\n\nThere are a lot of different kinds of optimizations, but I want to take a look at one type so you can get a feel for how optimization happens. One of the biggest wins in optimizing compilers comes from something called type specialization.\n\nThe dynamic type system that JavaScript uses requires a little bit of extra work at runtime. For example, consider this code:\n\n\nfunction arraySum(arr) {\n var sum = 0;\n for (var i = 0; i < arr.length; i++) {\n sum += arr[i];\n }\n}\n\n\nThe += step in the loop may seem simple. It may seem like you can compute this in one step, but because of dynamic typing, it takes more steps than you would expect.\n\nLet’s assume that arr is an array of 100 integers. Once the code warms up, the baseline compiler will create a stub for each operation in the function. So there will be a stub for sum += arr[i], which will handle the += operation as integer addition.\n\nHowever,sum and arr[i] aren’t guaranteed to be integers. Because types are dynamic in JavaScript, there’s a chance that in a later iteration of the loop, arr[i] will be a string. Integer addition and string concatenation are two very different operations, so they would compile to very different machine code.\n\nThe way the JIT handles this is by compiling multiple baseline stubs. If a piece of code is monomorphic (that is, always called with the same types) it will get one stub. If it is polymorphic (called with different types from one pass through the code to another), then it will get a stub for each combination of types that has come through that operation.\n\nThis means that the JIT has to ask a lot of questions before it chooses a stub.\n\nBecause each line of code has its own set of stubs in the baseline compiler, the JIT needs to keep checking the types each time the line of code is executed. So for each iteration through the loop, it will have to ask the same questions.\n\nThe code would execute a lot faster if the JIT didn’t need to repeat those checks. And that’s one of the things the optimizing compiler does.\n\nIn the optimizing compiler, the whole function is compiled together. The type checks are moved so that they happen before the loop.\n\nSome JITs optimize this even further. For example, in Firefox there’s a special classification for arrays that only contain integers. If arr is one of these arrays, then the JIT doesn’t need to check if arr[i] is an integer. This means that the JIT can do all of the type checks before it enters the loop.\n\nConclusion\n\nThat is the JIT in a nutshell. It makes JavaScript run faster by monitoring the code as it’s running it and sending hot code paths to be optimized. This has resulted in many-fold performance improvements for most JavaScript applications.\n\nEven with these improvements, though, the performance of JavaScript can be unpredictable. And to make things faster, the JIT has added some overhead during runtime, including:\n\noptimization and deoptimization\nmemory used for the monitor’s bookkeeping and recovery information for when bailouts happen\nmemory used to store baseline and optimized versions of a function\n\nThere’s room for improvement here: that overhead could be removed, making performance more predictable. And that’s one of the things that WebAssembly does.\n\nIn the next article, I’ll explain more about assembly and how compilers work with it.\n\nAbout Lin Clark\n\nLin works in Advanced Development at Mozilla, with a focus on Rust and WebAssembly.\n\nhttps://twitter.com/linclark\n@linclark\n\nMore articles by Lin Clark…", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "this is the second part in a series on webassembly and what makes it fast if you haven t read the others we recommend starting from the beginning javascript started out slow but then got faster thanks to something called the jit but how does the jit work", "source_text": "This is the second part in a series on WebAssembly and what makes it fast. If you haven’t read the others, we recommend starting from the beginning.\n\nJavaScript started out slow, but then got faster thanks to something called the JIT. But how does the JIT work?", "segmentation_method": "reviewed_source_semantics", "label": "开篇:This is the second part in a series on WebAssembly and what ", "source_line_range": [ 1, 4 ] }, { "id": "body-region-2", "text": "how javascript is run in the browser when you as a developer add javascript to the page you have a goal and a problem goal you want to tell the computer what to do problem you and the computer speak different languages you speak a human language and the computer speaks a machine language even if you don t think about javascript or other high level programming languages as human languages they really are they ve been designed for human cognition not for machine cognition so the job of the javascript engine is to take your human language and turn it into something the machine understands i think of this like the movie arrival where you have humans and aliens who are trying to talk to each other in that movie the humans and aliens don t just do word for word translations the two groups have different ways of thinking about the world and that s true of humans and machines too i ll explain this more in the next post so how does the translation happen in programming there are generally two ways of translating to machine language you can use an interpreter or a compiler with an interpreter this translation happens pretty much line by line on the fly a compiler on the other hand doesn t translate on the fly it works ahead of time to create that translation and write it down there are pros and cons to each of these ways of handling the translation interpreter pros and cons interpreters are quick to get up and running you don t have to go through that whole compilation step before you can start running your code you just start translating that first line and running it because of this an interpreter seems like a natural fit for something like javascript it s important for a web developer to be able to get going and run their code quickly and that s why browsers used javascript interpreters in the beginning but the con of using an interpreter comes when you re running the same code more than once for example if you re in a loop then you have to do the same translation over and over and over again compiler pros and cons the compiler has the opposite trade offs it takes a little bit more time to start up because it has to go through that compilation step at the beginning but then code in loops runs faster because it doesn t need to repeat the translation for each pass through that loop another difference is that the compiler has more time to look at the code and make edits to it so that it will run faster these edits are called optimizations the interpreter is doing its work during runtime so it can t take much time during the translation phase to figure out these optimizations", "source_text": "How JavaScript is run in the browser\n\nWhen you as a developer add JavaScript to the page, you have a goal and a problem.\n\nGoal: you want to tell the computer what to do.\n\nProblem: you and the computer speak different languages.\n\nYou speak a human language, and the computer speaks a machine language. Even if you don’t think about JavaScript or other high-level programming languages as human languages, they really are. They’ve been designed for human cognition, not for machine cognition.\n\nSo the job of the JavaScript engine is to take your human language and turn it into something the machine understands.\n\nI think of this like the movie Arrival, where you have humans and aliens who are trying to talk to each other.\n\nIn that movie, the humans and aliens don’t just do word-for-word translations. The two groups have different ways of thinking about the world. And that’s true of humans and machines too (I’ll explain this more in the next post).\n\nSo how does the translation happen?\n\nIn programming, there are generally two ways of translating to machine language. You can use an interpreter or a compiler.\n\nWith an interpreter, this translation happens pretty much line-by-line, on the fly.\n\nA compiler on the other hand doesn’t translate on the fly. It works ahead of time to create that translation and write it down.\n\nThere are pros and cons to each of these ways of handling the translation.\n\nInterpreter pros and cons\n\nInterpreters are quick to get up and running. You don’t have to go through that whole compilation step before you can start running your code. You just start translating that first line and running it.\n\nBecause of this, an interpreter seems like a natural fit for something like JavaScript. It’s important for a web developer to be able to get going and run their code quickly.\n\nAnd that’s why browsers used JavaScript interpreters in the beginning.\n\nBut the con of using an interpreter comes when you’re running the same code more than once. For example, if you’re in a loop. Then you have to do the same translation over and over and over again.\n\nCompiler pros and cons\n\nThe compiler has the opposite trade-offs.\n\nIt takes a little bit more time to start up because it has to go through that compilation step at the beginning. But then code in loops runs faster, because it doesn’t need to repeat the translation for each pass through that loop.\n\nAnother difference is that the compiler has more time to look at the code and make edits to it so that it will run faster. These edits are called optimizations.\n\nThe interpreter is doing its work during runtime, so it can’t take much time during the translation phase to figure out these optimizations.", "segmentation_method": "reviewed_source_semantics", "label": "How JavaScript is run in the browser", "source_line_range": [ 5, 50 ] }, { "id": "body-region-3", "text": "just in time compilers the best of both worlds as a way of getting rid of the interpreter s inefficiency where the interpreter has to keep retranslating the code every time they go through the loop browsers started mixing compilers in different browsers do this in slightly different ways but the basic idea is the same they added a new part to the javascript engine called a monitor aka a profiler that monitor watches the code as it runs and makes a note of how many times it is run and what types are used at first the monitor just runs everything through the interpreter if the same lines of code are run a few times that segment of code is called warm if it s run a lot then it s called hot baseline compiler when a function starts getting warm the jit will send it off to be compiled then it will store that compilation each line of the function is compiled to a stub the stubs are indexed by line number and variable type i ll explain why that s important later if the monitor sees that execution is hitting the same code again with the same variable types it will just pull out its compiled version that helps speed things up but like i said there s more a compiler can do it can take some time to figure out the most efficient way to do things to make optimizations the baseline compiler will make some of these optimizations i give an example of one below it doesn t want to take too much time though because it doesn t want to hold up execution too long however if the code is really hot if it s being run a whole bunch of times then it s worth taking the extra time to make more optimizations optimizing compiler when a part of the code is very hot the monitor will send it off to the optimizing compiler this will create another even faster version of the function that will also be stored in order to make a faster version of the code the optimizing compiler has to make some assumptions for example if it can assume that all objects created by a particular constructor have the same shape that is that they always have the same property names and that those properties were added in the same order then it can cut some corners based on that the optimizing compiler uses the information the monitor has gathered by watching code execution to make these judgments if something has been true for all previous passes through a loop it assumes it will continue to be true but of course with javascript there are never any guarantees you could have 99 objects that all have the same shape but then the 100th might be missing a property so the compiled code needs to check before it runs to see whether the assumptions are valid if they are then the compiled code runs but if not the jit assumes that it made the wrong assumptions and trashes the optimized code then execution goes back to the interpreter or baseline compiled version this process is called deoptimization or bailing out usually optimizing compilers make code faster but sometimes they can cause unexpected performance problems if you have code that keeps getting optimized and then deoptimized it ends up being slower than just executing the baseline compiled version most browsers have added limits to break out of these optimization deoptimization cycles when they happen if the jit has made more than say 10 attempts at optimizing and keeps having to throw it out it will just stop trying an example optimization type specialization there are a lot of different kinds of optimizations but i want to take a look at one type so you can get a feel for how optimization happens one of the biggest wins in optimizing compilers comes from something called type specialization the dynamic type system that javascript uses requires a little bit of extra work at runtime for example consider this code function arraysum arr var sum 0 for var i 0 i arr length i sum arr i the step in the loop may seem simple it may seem like you can compute this in one step but because of dynamic typing it takes more steps than you would expect let s assume that arr is an array of 100 integers once the code warms up the baseline compiler will create a stub for each operation in the function so there will be a stub for sum arr i which will handle the operation as integer addition however sum and arr i aren t guaranteed to be integers because types are dynamic in javascript there s a chance that in a later iteration of the loop arr i will be a string integer addition and string concatenation are two very different operations so they would compile to very different machine code the way the jit handles this is by compiling multiple baseline stubs if a piece of code is monomorphic that is always called with the same types it will get one stub if it is polymorphic called with different types from one pass through the code to another then it will get a stub for each combination of types that has come through that operation this means that the jit has to ask a lot of questions before it chooses a stub because each line of code has its own set of stubs in the baseline compiler the jit needs to keep checking the types each time the line of code is executed so for each iteration through the loop it will have to ask the same questions the code would execute a lot faster if the jit didn t need to repeat those checks and that s one of the things the optimizing compiler does in the optimizing compiler the whole function is compiled together the type checks are moved so that they happen before the loop some jits optimize this even further for example in firefox there s a special classification for arrays that only contain integers if arr is one of these arrays then the jit doesn t need to check if arr i is an integer this means that the jit can do all of the type checks before it enters the loop", "source_text": "Just-in-time compilers: the best of both worlds\n\nAs a way of getting rid of the interpreter’s inefficiency—where the interpreter has to keep retranslating the code every time they go through the loop—browsers started mixing compilers in.\n\nDifferent browsers do this in slightly different ways, but the basic idea is the same. They added a new part to the JavaScript engine, called a monitor (aka a profiler). That monitor watches the code as it runs, and makes a note of how many times it is run and what types are used.\n\nAt first, the monitor just runs everything through the interpreter.\n\nIf the same lines of code are run a few times, that segment of code is called warm. If it’s run a lot, then it’s called hot.\n\nBaseline compiler\n\nWhen a function starts getting warm, the JIT will send it off to be compiled. Then it will store that compilation.\n\nEach line of the function is compiled to a “stub”. The stubs are indexed by line number and variable type (I’ll explain why that’s important later). If the monitor sees that execution is hitting the same code again with the same variable types, it will just pull out its compiled version.\n\nThat helps speed things up. But like I said, there’s more a compiler can do. It can take some time to figure out the most efficient way to do things… to make optimizations.\n\nThe baseline compiler will make some of these optimizations (I give an example of one below). It doesn’t want to take too much time, though, because it doesn’t want to hold up execution too long.\n\nHowever, if the code is really hot—if it’s being run a whole bunch of times—then it’s worth taking the extra time to make more optimizations.\n\nOptimizing compiler\n\nWhen a part of the code is very hot, the monitor will send it off to the optimizing compiler. This will create another, even faster, version of the function that will also be stored.\n\nIn order to make a faster version of the code, the optimizing compiler has to make some assumptions.\n\nFor example, if it can assume that all objects created by a particular constructor have the same shape—that is, that they always have the same property names, and that those properties were added in the same order— then it can cut some corners based on that.\n\nThe optimizing compiler uses the information the monitor has gathered by watching code execution to make these judgments. If something has been true for all previous passes through a loop, it assumes it will continue to be true.\n\nBut of course with JavaScript, there are never any guarantees. You could have 99 objects that all have the same shape, but then the 100th might be missing a property.\n\nSo the compiled code needs to check before it runs to see whether the assumptions are valid. If they are, then the compiled code runs. But if not, the JIT assumes that it made the wrong assumptions and trashes the optimized code.\n\nThen execution goes back to the interpreter or baseline compiled version. This process is called deoptimization (or bailing out).\n\nUsually optimizing compilers make code faster, but sometimes they can cause unexpected performance problems. If you have code that keeps getting optimized and then deoptimized, it ends up being slower than just executing the baseline compiled version.\n\nMost browsers have added limits to break out of these optimization/deoptimization cycles when they happen. If the JIT has made more than, say, 10 attempts at optimizing and keeps having to throw it out, it will just stop trying.\n\nAn example optimization: Type specialization\n\nThere are a lot of different kinds of optimizations, but I want to take a look at one type so you can get a feel for how optimization happens. One of the biggest wins in optimizing compilers comes from something called type specialization.\n\nThe dynamic type system that JavaScript uses requires a little bit of extra work at runtime. For example, consider this code:\n\n\nfunction arraySum(arr) {\n var sum = 0;\n for (var i = 0; i < arr.length; i++) {\n sum += arr[i];\n }\n}\n\n\nThe += step in the loop may seem simple. It may seem like you can compute this in one step, but because of dynamic typing, it takes more steps than you would expect.\n\nLet’s assume that arr is an array of 100 integers. Once the code warms up, the baseline compiler will create a stub for each operation in the function. So there will be a stub for sum += arr[i], which will handle the += operation as integer addition.\n\nHowever,sum and arr[i] aren’t guaranteed to be integers. Because types are dynamic in JavaScript, there’s a chance that in a later iteration of the loop, arr[i] will be a string. Integer addition and string concatenation are two very different operations, so they would compile to very different machine code.\n\nThe way the JIT handles this is by compiling multiple baseline stubs. If a piece of code is monomorphic (that is, always called with the same types) it will get one stub. If it is polymorphic (called with different types from one pass through the code to another), then it will get a stub for each combination of types that has come through that operation.\n\nThis means that the JIT has to ask a lot of questions before it chooses a stub.\n\nBecause each line of code has its own set of stubs in the baseline compiler, the JIT needs to keep checking the types each time the line of code is executed. So for each iteration through the loop, it will have to ask the same questions.\n\nThe code would execute a lot faster if the JIT didn’t need to repeat those checks. And that’s one of the things the optimizing compiler does.\n\nIn the optimizing compiler, the whole function is compiled together. The type checks are moved so that they happen before the loop.\n\nSome JITs optimize this even further. For example, in Firefox there’s a special classification for arrays that only contain integers. If arr is one of these arrays, then the JIT doesn’t need to check if arr[i] is an integer. This means that the JIT can do all of the type checks before it enters the loop.", "segmentation_method": "reviewed_source_semantics", "label": "Just-in-time compilers: the best of both worlds", "source_line_range": [ 51, 125 ] }, { "id": "body-region-4", "text": "conclusion that is the jit in a nutshell it makes javascript run faster by monitoring the code as it s running it and sending hot code paths to be optimized this has resulted in many fold performance improvements for most javascript applications even with these improvements though the performance of javascript can be unpredictable and to make things faster the jit has added some overhead during runtime including optimization and deoptimization memory used for the monitor s bookkeeping and recovery information for when bailouts happen memory used to store baseline and optimized versions of a function there s room for improvement here that overhead could be removed making performance more predictable and that s one of the things that webassembly does in the next article i ll explain more about assembly and how compilers work with it", "source_text": "Conclusion\n\nThat is the JIT in a nutshell. It makes JavaScript run faster by monitoring the code as it’s running it and sending hot code paths to be optimized. This has resulted in many-fold performance improvements for most JavaScript applications.\n\nEven with these improvements, though, the performance of JavaScript can be unpredictable. And to make things faster, the JIT has added some overhead during runtime, including:\n\noptimization and deoptimization\nmemory used for the monitor’s bookkeeping and recovery information for when bailouts happen\nmemory used to store baseline and optimized versions of a function\n\nThere’s room for improvement here: that overhead could be removed, making performance more predictable. And that’s one of the things that WebAssembly does.\n\nIn the next article, I’ll explain more about assembly and how compilers work with it.", "segmentation_method": "reviewed_source_semantics", "label": "Conclusion", "source_line_range": [ 126, 139 ] }, { "id": "body-region-5", "text": "about lin clark lin works in advanced development at mozilla with a focus on rust and webassembly https twitter com linclark linclark more articles by lin clark", "source_text": "About Lin Clark\n\nLin works in Advanced Development at Mozilla, with a focus on Rust and WebAssembly.\n\nhttps://twitter.com/linclark\n@linclark\n\nMore articles by Lin Clark…", "segmentation_method": "reviewed_source_semantics", "label": "About Lin Clark", "source_line_range": [ 140, 147 ] } ], "ending": { "text": " focus on Rust and WebAssembly.\n\nhttps://twitter.com/linclark\n@linclark\n\nMore articles by Lin Clark…" } } }, { "id": "article-093", "name": "JavaScript Visualized: Promises & Async/Await", "url": "https://dev.to/lydiahallie/javascript-visualized-promises-async-await-5gke", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "JavaScript\\ Visualized:\\ Promises\\ \\&\\ Async/Await" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "JavaScript Visualized: Promises & Async/Await" ] }, { "id": "stable-2", "alternatives": [ "Lydia Hallie" ] }, { "id": "stable-5", "alternatives": [ "Powered by Algolia" ] }, { "id": "stable-6", "alternatives": [ "Log in" ] }, { "id": "stable-7", "alternatives": [ "Create account" ] }, { "id": "stable-8", "alternatives": [ "javascript" ] }, { "id": "stable-9", "alternatives": [ "node" ] }, { "id": "stable-10", "alternatives": [ "webdev" ] }, { "id": "stable-11", "alternatives": [ "JavaScript Visualized (7 Part Series)" ] }, { "id": "stable-12", "alternatives": [ "✨♻️ JavaScript Visualized: Event Loop" ] }, { "id": "stable-13", "alternatives": [ "🔥🕺🏼 JavaScript Visualized: Hoisting" ] }, { "id": "stable-14", "alternatives": [ "more parts" ] }, { "id": "stable-15", "alternatives": [ "💡🎁 JavaScript Visualized: Generators and Iterators" ] }, { "id": "stable-16", "alternatives": [ "Introduction" ] }, { "id": "stable-17", "alternatives": [ "Promise Syntax" ] }, { "id": "stable-18", "alternatives": [ "Microtasks and (Macro)tasks" ] }, { "id": "stable-19", "alternatives": [ "Async/Await" ] }, { "id": "stable-20", "alternatives": [ "Twitter" ] }, { "id": "stable-21", "alternatives": [ "Instagram" ] }, { "id": "stable-22", "alternatives": [ "GitHub" ] }, { "id": "stable-23", "alternatives": [ "LinkedIn" ] }, { "id": "stable-24", "alternatives": [ "YouTube" ] }, { "id": "stable-25", "alternatives": [ "Email" ] }, { "id": "stable-26", "alternatives": [ "domenic" ] }, { "id": "stable-27", "alternatives": [ "promises-unwrapping" ] }, { "id": "stable-28", "alternatives": [ "The ES6 promises spec, as per September 2013 TC39 meeting" ] }, { "id": "stable-29", "alternatives": [ "Jake Archibald" ] }, { "id": "stable-30", "alternatives": [ "@jaffathecake" ] }, { "id": "stable-31", "alternatives": [ "Chrome and Safari call this a \"resolved\" promise, which is true, but kinda misleading…" ] }, { "id": "stable-33", "alternatives": [ "getImage" ] }, { "id": "stable-34", "alternatives": [ "resizeImage" ] }, { "id": "stable-35", "alternatives": [ "applyFilter" ] }, { "id": "stable-36", "alternatives": [ "Promise" ] }, { "id": "stable-37", "alternatives": [ "[[PromiseStatus]]" ] }, { "id": "stable-38", "alternatives": [ "[[PromiseValue]]" ] }, { "id": "stable-39", "alternatives": [ "\"pending\"" ] }, { "id": "stable-40", "alternatives": [ "undefined" ] }, { "id": "stable-41", "alternatives": [ "PromiseStatus" ] }, { "id": "stable-42", "alternatives": [ "fulfilled" ] }, { "id": "stable-43", "alternatives": [ "resolved" ] }, { "id": "stable-44", "alternatives": [ "rejected" ] }, { "id": "stable-45", "alternatives": [ "pending" ] }, { "id": "stable-46", "alternatives": [ "\"fulfilled\"" ] }, { "id": "stable-47", "alternatives": [ "\"rejected\"" ] }, { "id": "stable-48", "alternatives": [ "() => {}" ] }, { "id": "stable-49", "alternatives": [ "resolve" ] }, { "id": "stable-50", "alternatives": [ "res" ] }, { "id": "stable-51", "alternatives": [ "reject" ] }, { "id": "stable-52", "alternatives": [ "rej" ] }, { "id": "stable-53", "alternatives": [ "\"rejected" ] }, { "id": "stable-54", "alternatives": [ "\"resolved\"" ] }, { "id": "stable-55", "alternatives": [ ".then()" ] }, { "id": "stable-56", "alternatives": [ ".catch()" ] }, { "id": "stable-57", "alternatives": [ ".finally()" ] }, { "id": "stable-58", "alternatives": [ ".then" ] }, { "id": "stable-59", "alternatives": [ ".catch" ] }, { "id": "stable-60", "alternatives": [ "Promise.resolve" ] }, { "id": "stable-61", "alternatives": [ "Promise.reject" ] }, { "id": "stable-62", "alternatives": [ "then" ] }, { "id": "stable-63", "alternatives": [ "Start!" ] }, { "id": "stable-64", "alternatives": [ "console.log('Start!')" ] }, { "id": "stable-65", "alternatives": [ "End!" ] }, { "id": "stable-66", "alternatives": [ "setTimeout" ] }, { "id": "stable-67", "alternatives": [ "setInterval" ] }, { "id": "stable-68", "alternatives": [ "setImmediate" ] }, { "id": "stable-69", "alternatives": [ "process.nextTick" ] }, { "id": "stable-70", "alternatives": [ "Promise callback" ] }, { "id": "stable-71", "alternatives": [ "queueMicrotask" ] }, { "id": "stable-72", "alternatives": [ "then()" ] }, { "id": "stable-73", "alternatives": [ "catch()" ] }, { "id": "stable-74", "alternatives": [ "finally()" ] }, { "id": "stable-75", "alternatives": [ "Task1" ] }, { "id": "stable-76", "alternatives": [ "Task2" ] }, { "id": "stable-77", "alternatives": [ "Task3" ] }, { "id": "stable-78", "alternatives": [ "Task4" ] }, { "id": "stable-79", "alternatives": [ "Task5" ] }, { "id": "stable-80", "alternatives": [ "Task6" ] }, { "id": "stable-81", "alternatives": [ "console.log" ] }, { "id": "stable-82", "alternatives": [ "console.log()" ] }, { "id": "stable-83", "alternatives": [ "() => console.log('In timeout')" ] }, { "id": "stable-84", "alternatives": [ "0" ] }, { "id": "stable-85", "alternatives": [ "Promise.resolve()" ] }, { "id": "stable-86", "alternatives": [ "Promise!" ] }, { "id": "stable-87", "alternatives": [ "\"In timeout!\"" ] }, { "id": "stable-88", "alternatives": [ "async" ] }, { "id": "stable-89", "alternatives": [ "await" ] }, { "id": "stable-90", "alternatives": [ "new Promise(() => {})" ] }, { "id": "stable-91", "alternatives": [ "Before function!" ] }, { "id": "stable-92", "alternatives": [ "myFunc()" ] }, { "id": "stable-93", "alternatives": [ "myFunc" ] }, { "id": "stable-94", "alternatives": [ "In function!" ] }, { "id": "stable-95", "alternatives": [ "one" ] }, { "id": "stable-96", "alternatives": [ "One!" ] }, { "id": "stable-97", "alternatives": [ "Follow" ] }, { "id": "stable-98", "alternatives": [ "Software eng who likes to visualize technical concepts in my free time 🕺🏼 (I use Keynote..)" ] }, { "id": "stable-99", "alternatives": [ "JOINED" ] }, { "id": "stable-101", "alternatives": [ "More from Lydia Hallie" ] }, { "id": "stable-102", "alternatives": [ "Top comments" ] }, { "id": "stable-103", "alternatives": [ "Subscribe" ] }, { "id": "stable-104", "alternatives": [ "Submit" ] }, { "id": "stable-105", "alternatives": [ "Preview" ] }, { "id": "stable-106", "alternatives": [ "Like" ] }, { "id": "stable-107", "alternatives": [ "Reply" ] }, { "id": "stable-108", "alternatives": [ "Thread" ] }, { "id": "stable-109", "alternatives": [ "View full discussion" ] }, { "id": "stable-110", "alternatives": [ "Some comments may only be visible to logged-in visitors. Sign in to view all comments." ] }, { "id": "stable-111", "alternatives": [ "Code of Conduct" ] }, { "id": "stable-112", "alternatives": [ "Report abuse" ] }, { "id": "stable-113", "alternatives": [ "PROMOTED" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Same-run complete initial parent DOM and automatically loaded accessibility capture qualify the whole owning tutorial body, including all 168 inline-code nodes and all ordinary tables, author resource links and the complete loaded quoted post. Five natural tutorial components cover all 114 reference lines. Image/GIF lettering and media controls are excluded without OCR. The nonmodal notification remains untouched; independently measured article ancestors are visible/unclipped and undimmed, with no dialog/inert restriction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "⭐️🎀 JavaScript Visualized: Promises & Async/Await" ], "html_selector": "h1.fs-3xl.m\\:fs-4xl,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": ".single-comment-node", "author_selector": ".comment__header > a .js-comment-username", "body_selector": ".comment__body", "id_attribute": "id", "section_markers": [ "Top comments", "Comments" ], "version": 2, "minimum_comments": 16, "text_scope": { "body_end": "The ES6 promises spec, as per September 2013 TC39 meeting", "end_markers": [ "Some comments may only be visible to logged-in visitors.", "Code of Conduct", "More from" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-093/comment-qualification-reference-r5.json", "sha256": "fe697a86f4bfde033f3604040e6c4fa0de3a84dc9d3c423052065f0aa3d8bd1f", "chars": 9150, "record_count": 20 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 20, "qualification_only": true } }, "ground_truth_main_content": "If you're here in 2024 (or later), here's an updated video:\nEver had to deal with JS code that just... didn't run the way you expected it to? Maybe it seemed like functions got executed at random, unpredictable times, or the execution got delayed. There's a chance you were dealing with a cool new feature that ES6 introduced: Promises!\nMy curiosity from many years ago has paid off and my sleepless nights have once again given me the time to make some animations. Time to talk about Promises: why would you use them, how do they work \"under the hood\", and how can we write them in the most modern way?\nIf you haven't read my previous post on the JavaScript Event Loop yet, it may be useful to read that first! I'll be covering the event loop again assuming some basic knowledge about the call stack, Web API and the queue, but this time we'll also be covering some exciting extra features 🤩\n✨♻️ JavaScript Visualized: Event Loop\nLydia Hallie ・ Nov 20 '19\n#javascript #webdev\nIf you're already somewhat familiar with promises, here are some shortcuts to save you some precious scrolling time.\n🥳 Introduction\n⚡️ Promise Syntax\n♻️ Event Loop: Microtasks and (Macro)tasks\n🚀 Async/Await\nIntroduction\nWhen writing JavaScript, we often have to deal with tasks that rely on other tasks! Let's say that we want to get an image, compress it, apply a filter, and save it 📸\nThe very first thing we need to do, is get the image that we want to edit. A getImage function can take care of this! Only once that image has been loaded successfully, we can pass that value to a resizeImage function. When the image has been resized successfully, we want to apply a filter to the image in the applyFilter function. After the image has been compressed and we've added a filter, we want to save the image and let the user know that everything worked correctly! 🥳\nIn the end, we'll end up with something like this:\nHmm... Notice anything here? Although it's... fine, it's not great. We end up with many nested callback functions that are dependent on the previous callback function. This is often referred to as a callback hell, as we end up with tons of nested callback functions that make the code quite difficult to read!\nLuckily, we now got something called promises to help us out! Let's take a look at what promises are, and how they can help us in situations like these! 😃\nPromise Syntax\nES6 introduced Promises. In many tutorials, you'll read something like:\n\"A promise is a placeholder for a value that can either resolve or reject at some time in the future\"\nYeah... That explanation never made things clearer for me. In fact it only made me feel like a Promise was a weird, vague, unpredictable piece of magic. So let's look at what promises really are.\nWe can create a promise, using a Promise constructor that receives a callback. Okay cool, let's try it out!\nWait woah, what just got returned?\nA Promise is an object that contains a status, ([[PromiseStatus]]) and a value ([[PromiseValue]]). In the above example, you can see that the value of [[PromiseStatus]] is \"pending\", and the value of the promise is undefined.\nDon't worry - you'll never have to interact with this object, you can't even access the [[PromiseStatus]] and [[PromiseValue]] properties! However, the values of these properties are important when working with promises.\nThe value of the PromiseStatus, the state, can be one of three values:\n✅ fulfilled: The promise has been resolved. Everything went fine, no errors occurred within the promise 🥳\n❌ rejected : The promise has been rejected. Argh, something went wrong..\n⏳ pending: The promise has neither resolved nor rejected (yet), the promise is still pending.\nAlright this all sounds great, but when is a promise status \"pending\", \"fulfilled\" or \"rejected\"? And why does that status even matter?\nIn the above example, we just passed the simple callback function () => {} to the Promise constructor. However, this callback function actually receives two arguments. The value of the first argument, often called resolve or res, is the method to be called when the Promise should resolve. The value of the second argument, often called reject or rej, is the value method to be called when the Promise should reject, something went wrong.\nLet's try and see that gets logged when we invoke either the resolve or reject method! In my example, I called the resolve method res, and the reject method rej.\nAwesome! We finally know how to get rid of the \"pending\" status and the undefined value! The status of a promise is \"fulfilled\" if we invoked the resolve method, and the status of the promise is \"rejected\" if we invoked the rejected method.\nThe value of a promise, the value of [[PromiseValue]], is the value that we pass to the either the resolved or rejected method as their argument.\nFun fact, I let Jake Archibald proofread this article and he actually pointed out there's a bug in Chrome that currently shows the status as \"resolved\" instead of \"fulfilled\". Thanks to Mathias Bynens it's now fixed in Canary! 🥳🕺🏼\nJake Archibald\n@jaffathecake\nChrome and Safari call this a \"resolved\" promise, which is true, but kinda misleading…\n5:21 PM · Apr 9, 2020\nOkay so, now we know a little bit better how to control that vague Promise object. But what is it used for?\nIn the introductory section, I showed an example in which we get an image, compress it, apply a filer, and save it! Eventually, this ended up being a nested callback mess.\nLuckily, Promises can help us fix this! First, let's rewrite the entire code block, so that each function returns a Promise instead.\nIf the image is loaded and everything went fine, let's resolve the promise with the loaded image! Else, if there was an error somewhere while loading the file, let's reject the promise with the error that occurred.\nLet's see what happens when we run this in the terminal!\nCool! A promise got returned with the value of the parsed data, just like we expected.\nBut... what now? We don't care about that entire promise object, we only care about the value of the data! Luckily, there are built-in methods to get a promise's value. To a promise, we can attach 3 methods:\n.then(): Gets called after a promise resolved.\n.catch(): Gets called after a promise rejected.\n.finally(): Always gets called, whether the promise resolved or rejected.\nThe .then method receives the value passed to the resolve method.\nThe .catch method receives the value passed to the rejected method\nFinally, we have the value that got resolved by the promise without having that entire promise object! We can now do whatever we want with this value.\nFYI, when you know that a promise will always resolve or always reject, you can write Promise.resolve or Promise.reject , with the value you want to reject or resolve the promise with!\nYou'll often see this syntax in the following examples 😄\nIn the getImage example, we ended up having to nest multiple callbacks in order to run them. Luckily, the .then handlers can help us with that! 🥳\nThe result of the .then itself is a promise value. This means that we can chain as many .thens as we want: the result of the previous then callback will be passed as an argument to the next then callback!\nIn the case of the getImage example, we can chain multiple then callbacks in order to pass the processed image onto the next function! Instead of ending up with many nested callbacks, we get a clean then chain.\nPerfect! This syntax already looks way better than the nested callbacks.\nMicrotasks and (Macro)tasks\nOkay so we know a little better how to create a promise and how to extract values out of a promise. Let's add some more code to the script, and run it again:\nWait what?! 🤯\nFirst, Start! got logged. Okay we could've seen that one coming: console.log('Start!') is on the very first line! However, the second value that got logged was End!, and not the value of the resolved promise! Only after End! was logged, the value of the promise got logged. What's going on here?\nWe've finally seen the true power of promises! 🚀 Although JavaScript is single-threaded, we can add asynchronous behavior using a Promise!\nBut wait, haven't we seen that before? 🤔 In the JavaScript event loop, can't we also use methods native to the browser such as setTimeout to create some sort of asynchronous behavior?\nYes! However, within the Event Loop, there are actually two types of queues: the (macro)task queue (or just called the task queue), and the microtask queue. The (macro)task queue is for (macro)tasks and the microtask queue is for microtasks.\nSo what's a (macro)task and what's a microtask? Although there are a few more than I'll cover here, the most common are shown in the table below!\n(Macro)task \t \t setTimeout | setInterval | setImmediate\nMicrotask \t \t process.nextTick | Promise callback | queueMicrotask\nAhh, we see Promise in the microtask list! 😃 When a Promise resolves and calls its then(), catch() or finally(), method, the callback within the method gets added to the microtask queue! This means that the callback within the then(), catch() or finally() method isn't executed immediately, essentially adding some async behavior to our JavaScript code!\nSo when is a then(), catch() or finally() callback executed? The event loop gives a different priority to the tasks:\nAll functions in that are currently in the call stack get executed. When they returned a value, they get popped off the stack.\nWhen the call stack is empty, all queued up microtasks are popped onto the callstack one by one, and get executed! (Microtasks themselves can also return new microtasks, effectively creating an infinite microtask loop 😬)\nIf both the call stack and microtask queue are empty, the event loop checks if there are tasks left on the (macro)task queue. The tasks get popped onto the callstack, executed, and popped off!\nLet's take a look at a quick example, simply using:\nTask1: a function that's added to the call stack immediately, for example by invoking it instantly in our code.\nTask2, Task3, Task4: microtasks, for example a promise then callback, or a task added with queueMicrotask.\nTask5, Task6: a (macro)task, for example a setTimeout or setImmediate callback\nFirst, Task1 returned a value and got popped off the call stack. Then, the engine checked for tasks queued in the microtask queue. Once all the tasks were put on the call stack and eventually popped off, the engine checked for tasks on the (macro)task queue, which got popped onto the call stack, and popped off when they returned a value.\nOkay okay enough pink boxes. Let's use it with some real code!\nIn this code, we have the macro task setTimeout, and the microtask promise then() callback. Once the engine reaches the line of the setTimeout function. Let's run this code step-by-step, and see what gets logged!\nQuick FYI - in the following examples I'm showing methods like console.log, setTimeout and Promise.resolve being added to the call stack. They're internal methods and actually don't appear in stack traces - so don't worry if you're using the debugger and you don't see them anywhere! It just makes explaining this concept easier without adding a bunch of boilerplate code 🙂\nOn the first line, the engine encounters the console.log() method. It gets added to the call stack, after which it logs the value Start! to the console. The method gets popped off the call stack, and the engine continues.\nThe engine encounters the setTimeout method, which gets popped on to the call stack. The setTimeout method is native to the browser: its callback function (() => console.log('In timeout')) will get added to the Web API, until the timer is done. Although we provided the value 0 for the timer, the call back still gets pushed to the Web API first, after which it gets added to the (macro)task queue: setTimeout is a macro task!\nThe engine encounters the Promise.resolve() method. The Promise.resolve() method gets added to the call stack, after which is resolves with the value Promise!. Its then callback function gets added to the microtask queue.\nThe engine encounters the console.log() method. It gets added to the call stack immediately, after which it logs the value End! to the console, gets popped off the call stack, and the engine continues.\nThe engine sees the callstack is empty now. Since the call stack is empty, it's going to check whether there are queued tasks in the microtask queue! And yes there are, the promise then callback is waiting for its turn! It gets popped onto the call stack, after which it logs the resolved value of the promise: the string Promise!in this case.\nThe engine sees the call stack is empty, so it's going to check the microtask queue once again to see if tasks are queued. Nope, the microtask queue is all empty.\nIt's time to check the (macro)task queue: the setTimeout callback is still waiting there! The setTimeout callback gets popped on to the callstack. The callback function returns the console.log method, which logs the string \"In timeout!\". The setTimeout callback get popped off the callstack.\nFinally, all done! 🥳 It seems like the output we saw earlier wasn't so unexpected after all.\nAsync/Await\nES7 introduced a new way to add async behavior in JavaScript and make working with promises easier! With the introduction of the async and await keywords, we can create async functions which implicitly return a promise. But.. how can we do that? 😮\nPreviously, we saw that we can explicitly create promises using the Promise object, whether it was by typing new Promise(() => {}), Promise.resolve, or Promise.reject.\nInstead of explicitly using the Promise object, we can now create asynchronous functions that implicitly return an object! This means that we no longer have to write any Promise object ourselves.\nAlthough the fact that async functions implicitly return promises is pretty great, the real power of async functions can be seen when using the await keyword! With the await keyword, we can suspend the asynchronous function while we wait for the awaited value return a resolved promise. If we want to get the value of this resolved promise, like we previously did with the then() callback, we can assign variables to the awaited promise value!\nSo, we can suspend an async function? Okay great but.. what does that even mean?\nLet's see what happens when we run the following block of code:\nHmm.. What's happening here?\nFirst, the engine encounters a console.log. It gets popped onto the call stack, after which Before function! gets logged.\nThen, we invoke the async function myFunc(), after which the function body of myFunc runs. On the very first line within the function body, we call another console.log, this time with the string In function!. The console.log gets added to the call stack, logs the value, and gets popped off.\nThe function body keeps on being executed, which gets us to the second line. Finally, we see an await keyword! 🎉\nThe first thing that happens is that the value that gets awaited gets executed: the function one in this case. It gets popped onto the call stack, and eventually returns a resolved promise. Once the promise has resolved and one returned a value, the engine encounters the await keyword.\nWhen encountering an await keyword, the async function gets suspended. ✋🏼 The execution of the function body gets paused, and the rest of the async function gets run in a microtask instead of a regular task!\nNow that the async function myFunc is suspended as it encountered the await keyword, the engine jumps out of the async function and continues executing the code in the execution context in which the async function got called: the global execution context in this case! 🏃🏽‍♀️\nFinally, there are no more tasks to run in the global execution context! The event loop checks to see if there are any microtasks queued up: and there are! The async myFunc function is queued up after resolving the valued of one. myFunc gets popped back onto the call stack, and continues running where it previously left off.\nThe variable res finally gets its value, namely the value of the resolved promise that one returned! We invoke console.log with the value of res: the string One! in this case. One! gets logged to the console and gets popped off the call stack! 😊\nFinally, all done! Did you notice how async functions are different compared to a promise then? The await keyword suspends the async function, whereas the Promise body would've kept on being executed if we would've used then!\nHm that was quite a lot of information! 🤯 No worries at all if you still feel a bit overwhelmed when working with Promises, I personally feel that it just takes experience to notice patterns and feel confident when working with asynchronous JavaScript.\nHowever, I hope that the \"unexpected\" or \"unpredictable\" behavior that you might encounter when working with async JavaScript makes a bit more sense now!\nAnd as always, feel free to reach out to me! 😊\n✨ Twitter \t \t👩🏽‍💻 Instagram \t \t💻 GitHub \t \t💡 LinkedIn \t \t📷 YouTube \t \t💌 Email\nIf you want to know more about promises states (and fates!), this Github repo does an excellent job explaining the differences.\ndomenic / promises-unwrapping\nThe ES6 promises spec, as per September 2013 TC39 meeting", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "if you re here in 2024 or later here s an updated video ever had to deal with js code that just didn t run the way you expected it to maybe it seemed like functions got executed at random unpredictable times or the execution got delayed there s a chance you were dealing with a cool new feature that es6 introduced promises my curiosity from many years ago has paid off and my sleepless nights have once again given me the time to make some animations time to talk about promises why would you use them how do they work under the hood and how can we write them in the most modern way if you haven t read my previous post on the javascript event loop yet it may be useful to read that first i ll be covering the event loop again assuming some basic knowledge about the call stack web api and the queue but this time we ll also be covering some exciting extra features javascript visualized event loop lydia hallie nov 20 19 javascript webdev if you re already somewhat familiar with promises here are some shortcuts to save you some precious scrolling time introduction promise syntax event loop microtasks and macro tasks", "source_text": "If you're here in 2024 (or later), here's an updated video:\nEver had to deal with JS code that just... didn't run the way you expected it to? Maybe it seemed like functions got executed at random, unpredictable times, or the execution got delayed. There's a chance you were dealing with a cool new feature that ES6 introduced: Promises!\nMy curiosity from many years ago has paid off and my sleepless nights have once again given me the time to make some animations. Time to talk about Promises: why would you use them, how do they work \"under the hood\", and how can we write them in the most modern way?\nIf you haven't read my previous post on the JavaScript Event Loop yet, it may be useful to read that first! I'll be covering the event loop again assuming some basic knowledge about the call stack, Web API and the queue, but this time we'll also be covering some exciting extra features 🤩\n✨♻️ JavaScript Visualized: Event Loop\nLydia Hallie ・ Nov 20 '19\n#javascript #webdev\nIf you're already somewhat familiar with promises, here are some shortcuts to save you some precious scrolling time.\n🥳 Introduction\n⚡️ Promise Syntax\n♻️ Event Loop: Microtasks and (Macro)tasks", "segmentation_method": "reviewed_source_semantics", "label": "开篇:If you're here in 2024 (or later), here's an updated video: — ✨♻️ JavaScript Visualized: Event Loop", "source_line_range": [ 1, 11 ] }, { "id": "body-region-2", "text": "async await introduction when writing javascript we often have to deal with tasks that rely on other tasks let s say that we want to get an image compress it apply a filter and save it the very first thing we need to do is get the image that we want to edit a getimage function can take care of this only once that image has been loaded successfully we can pass that value to a resizeimage function when the image has been resized successfully we want to apply a filter to the image in the applyfilter function after the image has been compressed and we ve added a filter we want to save the image and let the user know that everything worked correctly in the end we ll end up with something like this hmm notice anything here although it s fine it s not great we end up with many nested callback functions that are dependent on the previous callback function this is often referred to as a callback hell as we end up with tons of nested callback functions that make the code quite difficult to read luckily we now got something called promises to help us out let s take a look at what promises are and how they can help us in situations like these promise syntax es6 introduced promises in many tutorials you ll read something like a promise is a placeholder for a value that can either resolve or reject at some time in the future yeah that explanation never made things clearer for me in fact it only made me feel like a promise was a weird vague unpredictable piece of magic so let s look at what promises really are we can create a promise using a promise constructor that receives a callback okay cool let s try it out wait woah what just got returned a promise is an object that contains a status promisestatus and a value promisevalue in the above example you can see that the value of promisestatus is pending and the value of the promise is undefined don t worry you ll never have to interact with this object you can t even access the promisestatus and promisevalue properties however the values of these properties are important when working with promises the value of the promisestatus the state can be one of three values fulfilled the promise has been resolved everything went fine no errors occurred within the promise rejected the promise has been rejected argh something went wrong pending the promise has neither resolved nor rejected yet the promise is still pending alright this all sounds great but when is a promise status pending fulfilled or rejected and why does that status even matter in the above example we just passed the simple callback function to the promise constructor however this callback function actually receives two arguments the value of the first argument often called resolve or res is the method to be called when the promise should resolve the value of the second argument often called reject or rej is the value method to be called when the promise should reject something went wrong let s try and see that gets logged when we invoke either the resolve or reject method in my example i called the resolve method res and the reject method rej awesome we finally know how to get rid of the pending status and the undefined value the status of a promise is fulfilled if we invoked the resolve method and the status of the promise is rejected if we invoked the rejected method the value of a promise the value of promisevalue is the value that we pass to the either the resolved or rejected method as their argument fun fact i let jake archibald proofread this article and he actually pointed out there s a bug in chrome that currently shows the status as resolved instead of fulfilled thanks to mathias bynens it s now fixed in canary jake archibald jaffathecake chrome and safari call this a resolved promise which is true but kinda misleading 5 21 pm apr 9 2020 okay so now we know a little bit better how to control that vague promise object but what is it used for in the introductory section i showed an example in which we get an image compress it apply a filer and save it eventually this ended up being a nested callback mess luckily promises can help us fix this first let s rewrite the entire code block so that each function returns a promise instead if the image is loaded and everything went fine let s resolve the promise with the loaded image else if there was an error somewhere while loading the file let s reject the promise with the error that occurred let s see what happens when we run this in the terminal cool a promise got returned with the value of the parsed data just like we expected but what now we don t care about that entire promise object we only care about the value of the data luckily there are built in methods to get a promise s value to a promise we can attach 3 methods then gets called after a promise resolved catch gets called after a promise rejected finally always gets called whether the promise resolved or rejected the then method receives the value passed to the resolve method the catch method receives the value passed to the rejected method finally we have the value that got resolved by the promise without having that entire promise object we can now do whatever we want with this value fyi when you know that a promise will always resolve or always reject you can write promise resolve or promise reject with the value you want to reject or resolve the promise with you ll often see this syntax in the following examples in the getimage example we ended up having to nest multiple callbacks in order to run them luckily the then handlers can help us with that the result of the then itself is a promise value this means that we can chain as many thens as we want the result of the previous then callback will be passed as an argument to the next then callback in the case of the getimage example we can chain multiple then callbacks in order to pass the processed image onto the next function instead of ending up with many nested callbacks we get a clean then chain perfect this syntax already looks way better than the nested callbacks", "source_text": "🚀 Async/Await\nIntroduction\nWhen writing JavaScript, we often have to deal with tasks that rely on other tasks! Let's say that we want to get an image, compress it, apply a filter, and save it 📸\nThe very first thing we need to do, is get the image that we want to edit. A getImage function can take care of this! Only once that image has been loaded successfully, we can pass that value to a resizeImage function. When the image has been resized successfully, we want to apply a filter to the image in the applyFilter function. After the image has been compressed and we've added a filter, we want to save the image and let the user know that everything worked correctly! 🥳\nIn the end, we'll end up with something like this:\nHmm... Notice anything here? Although it's... fine, it's not great. We end up with many nested callback functions that are dependent on the previous callback function. This is often referred to as a callback hell, as we end up with tons of nested callback functions that make the code quite difficult to read!\nLuckily, we now got something called promises to help us out! Let's take a look at what promises are, and how they can help us in situations like these! 😃\nPromise Syntax\nES6 introduced Promises. In many tutorials, you'll read something like:\n\"A promise is a placeholder for a value that can either resolve or reject at some time in the future\"\nYeah... That explanation never made things clearer for me. In fact it only made me feel like a Promise was a weird, vague, unpredictable piece of magic. So let's look at what promises really are.\nWe can create a promise, using a Promise constructor that receives a callback. Okay cool, let's try it out!\nWait woah, what just got returned?\nA Promise is an object that contains a status, ([[PromiseStatus]]) and a value ([[PromiseValue]]). In the above example, you can see that the value of [[PromiseStatus]] is \"pending\", and the value of the promise is undefined.\nDon't worry - you'll never have to interact with this object, you can't even access the [[PromiseStatus]] and [[PromiseValue]] properties! However, the values of these properties are important when working with promises.\nThe value of the PromiseStatus, the state, can be one of three values:\n✅ fulfilled: The promise has been resolved. Everything went fine, no errors occurred within the promise 🥳\n❌ rejected : The promise has been rejected. Argh, something went wrong..\n⏳ pending: The promise has neither resolved nor rejected (yet), the promise is still pending.\nAlright this all sounds great, but when is a promise status \"pending\", \"fulfilled\" or \"rejected\"? And why does that status even matter?\nIn the above example, we just passed the simple callback function () => {} to the Promise constructor. However, this callback function actually receives two arguments. The value of the first argument, often called resolve or res, is the method to be called when the Promise should resolve. The value of the second argument, often called reject or rej, is the value method to be called when the Promise should reject, something went wrong.\nLet's try and see that gets logged when we invoke either the resolve or reject method! In my example, I called the resolve method res, and the reject method rej.\nAwesome! We finally know how to get rid of the \"pending\" status and the undefined value! The status of a promise is \"fulfilled\" if we invoked the resolve method, and the status of the promise is \"rejected\" if we invoked the rejected method.\nThe value of a promise, the value of [[PromiseValue]], is the value that we pass to the either the resolved or rejected method as their argument.\nFun fact, I let Jake Archibald proofread this article and he actually pointed out there's a bug in Chrome that currently shows the status as \"resolved\" instead of \"fulfilled\". Thanks to Mathias Bynens it's now fixed in Canary! 🥳🕺🏼\nJake Archibald\n@jaffathecake\nChrome and Safari call this a \"resolved\" promise, which is true, but kinda misleading…\n5:21 PM · Apr 9, 2020\nOkay so, now we know a little bit better how to control that vague Promise object. But what is it used for?\nIn the introductory section, I showed an example in which we get an image, compress it, apply a filer, and save it! Eventually, this ended up being a nested callback mess.\nLuckily, Promises can help us fix this! First, let's rewrite the entire code block, so that each function returns a Promise instead.\nIf the image is loaded and everything went fine, let's resolve the promise with the loaded image! Else, if there was an error somewhere while loading the file, let's reject the promise with the error that occurred.\nLet's see what happens when we run this in the terminal!\nCool! A promise got returned with the value of the parsed data, just like we expected.\nBut... what now? We don't care about that entire promise object, we only care about the value of the data! Luckily, there are built-in methods to get a promise's value. To a promise, we can attach 3 methods:\n.then(): Gets called after a promise resolved.\n.catch(): Gets called after a promise rejected.\n.finally(): Always gets called, whether the promise resolved or rejected.\nThe .then method receives the value passed to the resolve method.\nThe .catch method receives the value passed to the rejected method\nFinally, we have the value that got resolved by the promise without having that entire promise object! We can now do whatever we want with this value.\nFYI, when you know that a promise will always resolve or always reject, you can write Promise.resolve or Promise.reject , with the value you want to reject or resolve the promise with!\nYou'll often see this syntax in the following examples 😄\nIn the getImage example, we ended up having to nest multiple callbacks in order to run them. Luckily, the .then handlers can help us with that! 🥳\nThe result of the .then itself is a promise value. This means that we can chain as many .thens as we want: the result of the previous then callback will be passed as an argument to the next then callback!\nIn the case of the getImage example, we can chain multiple then callbacks in order to pass the processed image onto the next function! Instead of ending up with many nested callbacks, we get a clean then chain.\nPerfect! This syntax already looks way better than the nested callbacks.", "segmentation_method": "reviewed_source_semantics", "label": "Async/Await", "source_line_range": [ 12, 59 ] }, { "id": "body-region-3", "text": "microtasks and macro tasks okay so we know a little better how to create a promise and how to extract values out of a promise let s add some more code to the script and run it again wait what first start got logged okay we could ve seen that one coming console log start is on the very first line however the second value that got logged was end and not the value of the resolved promise only after end was logged the value of the promise got logged what s going on here we ve finally seen the true power of promises although javascript is single threaded we can add asynchronous behavior using a promise but wait haven t we seen that before in the javascript event loop can t we also use methods native to the browser such as settimeout to create some sort of asynchronous behavior yes however within the event loop there are actually two types of queues the macro task queue or just called the task queue and the microtask queue the macro task queue is for macro tasks and the microtask queue is for microtasks so what s a macro task and what s a microtask although there are a few more than i ll cover here the most common are shown in the table below macro task settimeout setinterval setimmediate microtask process nexttick promise callback queuemicrotask ahh we see promise in the microtask list when a promise resolves and calls its then catch or finally method the callback within the method gets added to the microtask queue this means that the callback within the then catch or finally method isn t executed immediately essentially adding some async behavior to our javascript code so when is a then catch or finally callback executed the event loop gives a different priority to the tasks all functions in that are currently in the call stack get executed when they returned a value they get popped off the stack when the call stack is empty all queued up microtasks are popped onto the callstack one by one and get executed microtasks themselves can also return new microtasks effectively creating an infinite microtask loop if both the call stack and microtask queue are empty the event loop checks if there are tasks left on the macro task queue the tasks get popped onto the callstack executed and popped off let s take a look at a quick example simply using task1 a function that s added to the call stack immediately for example by invoking it instantly in our code task2 task3 task4 microtasks for example a promise then callback or a task added with queuemicrotask task5 task6 a macro task for example a settimeout or setimmediate callback first task1 returned a value and got popped off the call stack then the engine checked for tasks queued in the microtask queue once all the tasks were put on the call stack and eventually popped off the engine checked for tasks on the macro task queue which got popped onto the call stack and popped off when they returned a value okay okay enough pink boxes let s use it with some real code in this code we have the macro task settimeout and the microtask promise then callback once the engine reaches the line of the settimeout function let s run this code step by step and see what gets logged quick fyi in the following examples i m showing methods like console log settimeout and promise resolve being added to the call stack they re internal methods and actually don t appear in stack traces so don t worry if you re using the debugger and you don t see them anywhere it just makes explaining this concept easier without adding a bunch of boilerplate code on the first line the engine encounters the console log method it gets added to the call stack after which it logs the value start to the console the method gets popped off the call stack and the engine continues the engine encounters the settimeout method which gets popped on to the call stack the settimeout method is native to the browser its callback function console log in timeout will get added to the web api until the timer is done although we provided the value 0 for the timer the call back still gets pushed to the web api first after which it gets added to the macro task queue settimeout is a macro task the engine encounters the promise resolve method the promise resolve method gets added to the call stack after which is resolves with the value promise its then callback function gets added to the microtask queue the engine encounters the console log method it gets added to the call stack immediately after which it logs the value end to the console gets popped off the call stack and the engine continues the engine sees the callstack is empty now since the call stack is empty it s going to check whether there are queued tasks in the microtask queue and yes there are the promise then callback is waiting for its turn it gets popped onto the call stack after which it logs the resolved value of the promise the string promise in this case the engine sees the call stack is empty so it s going to check the microtask queue once again to see if tasks are queued nope the microtask queue is all empty it s time to check the macro task queue the settimeout callback is still waiting there the settimeout callback gets popped on to the callstack the callback function returns the console log method which logs the string in timeout the settimeout callback get popped off the callstack finally all done it seems like the output we saw earlier wasn t so unexpected after all", "source_text": "Microtasks and (Macro)tasks\nOkay so we know a little better how to create a promise and how to extract values out of a promise. Let's add some more code to the script, and run it again:\nWait what?! 🤯\nFirst, Start! got logged. Okay we could've seen that one coming: console.log('Start!') is on the very first line! However, the second value that got logged was End!, and not the value of the resolved promise! Only after End! was logged, the value of the promise got logged. What's going on here?\nWe've finally seen the true power of promises! 🚀 Although JavaScript is single-threaded, we can add asynchronous behavior using a Promise!\nBut wait, haven't we seen that before? 🤔 In the JavaScript event loop, can't we also use methods native to the browser such as setTimeout to create some sort of asynchronous behavior?\nYes! However, within the Event Loop, there are actually two types of queues: the (macro)task queue (or just called the task queue), and the microtask queue. The (macro)task queue is for (macro)tasks and the microtask queue is for microtasks.\nSo what's a (macro)task and what's a microtask? Although there are a few more than I'll cover here, the most common are shown in the table below!\n(Macro)task \t \t setTimeout | setInterval | setImmediate\nMicrotask \t \t process.nextTick | Promise callback | queueMicrotask\nAhh, we see Promise in the microtask list! 😃 When a Promise resolves and calls its then(), catch() or finally(), method, the callback within the method gets added to the microtask queue! This means that the callback within the then(), catch() or finally() method isn't executed immediately, essentially adding some async behavior to our JavaScript code!\nSo when is a then(), catch() or finally() callback executed? The event loop gives a different priority to the tasks:\nAll functions in that are currently in the call stack get executed. When they returned a value, they get popped off the stack.\nWhen the call stack is empty, all queued up microtasks are popped onto the callstack one by one, and get executed! (Microtasks themselves can also return new microtasks, effectively creating an infinite microtask loop 😬)\nIf both the call stack and microtask queue are empty, the event loop checks if there are tasks left on the (macro)task queue. The tasks get popped onto the callstack, executed, and popped off!\nLet's take a look at a quick example, simply using:\nTask1: a function that's added to the call stack immediately, for example by invoking it instantly in our code.\nTask2, Task3, Task4: microtasks, for example a promise then callback, or a task added with queueMicrotask.\nTask5, Task6: a (macro)task, for example a setTimeout or setImmediate callback\nFirst, Task1 returned a value and got popped off the call stack. Then, the engine checked for tasks queued in the microtask queue. Once all the tasks were put on the call stack and eventually popped off, the engine checked for tasks on the (macro)task queue, which got popped onto the call stack, and popped off when they returned a value.\nOkay okay enough pink boxes. Let's use it with some real code!\nIn this code, we have the macro task setTimeout, and the microtask promise then() callback. Once the engine reaches the line of the setTimeout function. Let's run this code step-by-step, and see what gets logged!\nQuick FYI - in the following examples I'm showing methods like console.log, setTimeout and Promise.resolve being added to the call stack. They're internal methods and actually don't appear in stack traces - so don't worry if you're using the debugger and you don't see them anywhere! It just makes explaining this concept easier without adding a bunch of boilerplate code 🙂\nOn the first line, the engine encounters the console.log() method. It gets added to the call stack, after which it logs the value Start! to the console. The method gets popped off the call stack, and the engine continues.\nThe engine encounters the setTimeout method, which gets popped on to the call stack. The setTimeout method is native to the browser: its callback function (() => console.log('In timeout')) will get added to the Web API, until the timer is done. Although we provided the value 0 for the timer, the call back still gets pushed to the Web API first, after which it gets added to the (macro)task queue: setTimeout is a macro task!\nThe engine encounters the Promise.resolve() method. The Promise.resolve() method gets added to the call stack, after which is resolves with the value Promise!. Its then callback function gets added to the microtask queue.\nThe engine encounters the console.log() method. It gets added to the call stack immediately, after which it logs the value End! to the console, gets popped off the call stack, and the engine continues.\nThe engine sees the callstack is empty now. Since the call stack is empty, it's going to check whether there are queued tasks in the microtask queue! And yes there are, the promise then callback is waiting for its turn! It gets popped onto the call stack, after which it logs the resolved value of the promise: the string Promise!in this case.\nThe engine sees the call stack is empty, so it's going to check the microtask queue once again to see if tasks are queued. Nope, the microtask queue is all empty.\nIt's time to check the (macro)task queue: the setTimeout callback is still waiting there! The setTimeout callback gets popped on to the callstack. The callback function returns the console.log method, which logs the string \"In timeout!\". The setTimeout callback get popped off the callstack.\nFinally, all done! 🥳 It seems like the output we saw earlier wasn't so unexpected after all.", "segmentation_method": "reviewed_source_semantics", "label": "Microtasks and (Macro)tasks", "source_line_range": [ 60, 90 ] }, { "id": "body-region-4", "text": "async await es7 introduced a new way to add async behavior in javascript and make working with promises easier with the introduction of the async and await keywords we can create async functions which implicitly return a promise but how can we do that previously we saw that we can explicitly create promises using the promise object whether it was by typing new promise promise resolve or promise reject instead of explicitly using the promise object we can now create asynchronous functions that implicitly return an object this means that we no longer have to write any promise object ourselves although the fact that async functions implicitly return promises is pretty great the real power of async functions can be seen when using the await keyword with the await keyword we can suspend the asynchronous function while we wait for the awaited value return a resolved promise if we want to get the value of this resolved promise like we previously did with the then callback we can assign variables to the awaited promise value so we can suspend an async function okay great but what does that even mean let s see what happens when we run the following block of code hmm what s happening here first the engine encounters a console log it gets popped onto the call stack after which before function gets logged then we invoke the async function myfunc after which the function body of myfunc runs on the very first line within the function body we call another console log this time with the string in function the console log gets added to the call stack logs the value and gets popped off the function body keeps on being executed which gets us to the second line finally we see an await keyword the first thing that happens is that the value that gets awaited gets executed the function one in this case it gets popped onto the call stack and eventually returns a resolved promise once the promise has resolved and one returned a value the engine encounters the await keyword when encountering an await keyword the async function gets suspended the execution of the function body gets paused and the rest of the async function gets run in a microtask instead of a regular task now that the async function myfunc is suspended as it encountered the await keyword the engine jumps out of the async function and continues executing the code in the execution context in which the async function got called the global execution context in this case finally there are no more tasks to run in the global execution context the event loop checks to see if there are any microtasks queued up and there are the async myfunc function is queued up after resolving the valued of one myfunc gets popped back onto the call stack and continues running where it previously left off the variable res finally gets its value namely the value of the resolved promise that one returned we invoke console log with the value of res the string one in this case one gets logged to the console and gets popped off the call stack finally all done did you notice how async functions are different compared to a promise then the await keyword suspends the async function whereas the promise body would ve kept on being executed if we would ve used then hm that was quite a lot of information no worries at all if you still feel a bit overwhelmed when working with promises i personally feel that it just takes experience to notice patterns and feel confident when working with asynchronous javascript however i hope that the unexpected or unpredictable behavior that you might encounter when working with async javascript makes a bit more sense now and as always feel free to reach out to me twitter instagram github linkedin youtube email if you want to know more about promises states and fates this github repo does an excellent job explaining the differences", "source_text": "Async/Await\nES7 introduced a new way to add async behavior in JavaScript and make working with promises easier! With the introduction of the async and await keywords, we can create async functions which implicitly return a promise. But.. how can we do that? 😮\nPreviously, we saw that we can explicitly create promises using the Promise object, whether it was by typing new Promise(() => {}), Promise.resolve, or Promise.reject.\nInstead of explicitly using the Promise object, we can now create asynchronous functions that implicitly return an object! This means that we no longer have to write any Promise object ourselves.\nAlthough the fact that async functions implicitly return promises is pretty great, the real power of async functions can be seen when using the await keyword! With the await keyword, we can suspend the asynchronous function while we wait for the awaited value return a resolved promise. If we want to get the value of this resolved promise, like we previously did with the then() callback, we can assign variables to the awaited promise value!\nSo, we can suspend an async function? Okay great but.. what does that even mean?\nLet's see what happens when we run the following block of code:\nHmm.. What's happening here?\nFirst, the engine encounters a console.log. It gets popped onto the call stack, after which Before function! gets logged.\nThen, we invoke the async function myFunc(), after which the function body of myFunc runs. On the very first line within the function body, we call another console.log, this time with the string In function!. The console.log gets added to the call stack, logs the value, and gets popped off.\nThe function body keeps on being executed, which gets us to the second line. Finally, we see an await keyword! 🎉\nThe first thing that happens is that the value that gets awaited gets executed: the function one in this case. It gets popped onto the call stack, and eventually returns a resolved promise. Once the promise has resolved and one returned a value, the engine encounters the await keyword.\nWhen encountering an await keyword, the async function gets suspended. ✋🏼 The execution of the function body gets paused, and the rest of the async function gets run in a microtask instead of a regular task!\nNow that the async function myFunc is suspended as it encountered the await keyword, the engine jumps out of the async function and continues executing the code in the execution context in which the async function got called: the global execution context in this case! 🏃🏽‍♀️\nFinally, there are no more tasks to run in the global execution context! The event loop checks to see if there are any microtasks queued up: and there are! The async myFunc function is queued up after resolving the valued of one. myFunc gets popped back onto the call stack, and continues running where it previously left off.\nThe variable res finally gets its value, namely the value of the resolved promise that one returned! We invoke console.log with the value of res: the string One! in this case. One! gets logged to the console and gets popped off the call stack! 😊\nFinally, all done! Did you notice how async functions are different compared to a promise then? The await keyword suspends the async function, whereas the Promise body would've kept on being executed if we would've used then!\nHm that was quite a lot of information! 🤯 No worries at all if you still feel a bit overwhelmed when working with Promises, I personally feel that it just takes experience to notice patterns and feel confident when working with asynchronous JavaScript.\nHowever, I hope that the \"unexpected\" or \"unpredictable\" behavior that you might encounter when working with async JavaScript makes a bit more sense now!\nAnd as always, feel free to reach out to me! 😊\n✨ Twitter \t \t👩🏽‍💻 Instagram \t \t💻 GitHub \t \t💡 LinkedIn \t \t📷 YouTube \t \t💌 Email\nIf you want to know more about promises states (and fates!), this Github repo does an excellent job explaining the differences.", "segmentation_method": "reviewed_source_semantics", "label": "Async/Await", "source_line_range": [ 91, 112 ] }, { "id": "body-region-5", "text": "domenic promises unwrapping the es6 promises spec as per september 2013 tc39 meeting", "source_text": "domenic / promises-unwrapping\nThe ES6 promises spec, as per September 2013 TC39 meeting", "segmentation_method": "reviewed_source_semantics", "label": "domenic / promises-unwrapping", "source_line_range": [ 113, 114 ] } ], "ending": { "text": "The ES6 promises spec, as per September 2013 TC39 meeting" } } }, { "id": "article-094", "name": "LLMs develop their own understanding of reality", "url": "https://news.mit.edu/2024/llms-develop-own-understanding-of-reality-as-language-abilities-improve-0814", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "LLMs\\ develop\\ their\\ own\\ understanding\\ of\\ reality\\ as\\ their\\ language\\ abilities\\ improve" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Alex Shipps" ] }, { "id": "stable-3", "alternatives": [ "MIT CSAIL" ] }, { "id": "stable-4", "alternatives": [ "Language models may develop their own understanding of reality as a way to improve their generative abilities, indicating that the models may someday understand language at a deeper level than they do today." ] }, { "id": "stable-5", "alternatives": [ "Image: Alex Shipps/MIT CSAIL" ] }, { "id": "stable-6", "alternatives": [ "Education" ] }, { "id": "stable-7", "alternatives": [ "Research" ] }, { "id": "stable-8", "alternatives": [ "Innovation" ] }, { "id": "stable-9", "alternatives": [ "Admissions + Aid" ] }, { "id": "stable-10", "alternatives": [ "Campus Life" ] }, { "id": "stable-11", "alternatives": [ "News" ] }, { "id": "stable-12", "alternatives": [ "Alumni" ] }, { "id": "stable-13", "alternatives": [ "About MIT" ] }, { "id": "stable-14", "alternatives": [ "SUBSCRIBE" ] }, { "id": "stable-15", "alternatives": [ "BROWSE" ] }, { "id": "stable-16", "alternatives": [ "PRESS INQUIRIES" ] }, { "id": "stable-17", "alternatives": [ "Paper: “Evidence of Meaning in Language Models Trained on Programs”" ] }, { "id": "stable-18", "alternatives": [ "RELATED LINKS" ] }, { "id": "stable-19", "alternatives": [ "Charles Jin" ] }, { "id": "stable-20", "alternatives": [ "Martin Rinard" ] }, { "id": "stable-21", "alternatives": [ "Computer Science and Artificial Intelligence Laboratory (CSAIL)" ] }, { "id": "stable-22", "alternatives": [ "Department of Electrical Engineering and Computer Science" ] }, { "id": "stable-23", "alternatives": [ "MIT Schwarzman College of Computing" ] }, { "id": "stable-24", "alternatives": [ "School of Engineering" ] }, { "id": "stable-25", "alternatives": [ "RELATED TOPICS" ] }, { "id": "stable-26", "alternatives": [ "Artificial intelligence" ] }, { "id": "stable-27", "alternatives": [ "Programming" ] }, { "id": "stable-28", "alternatives": [ "Machine learning" ] }, { "id": "stable-29", "alternatives": [ "Language" ] }, { "id": "stable-30", "alternatives": [ "Computer science and technology" ] }, { "id": "stable-31", "alternatives": [ "Electrical engineering and computer science (EECS)" ] }, { "id": "stable-32", "alternatives": [ "Defense Advanced Research Projects Agency (DARPA)" ] }, { "id": "stable-33", "alternatives": [ "RELATED ARTICLES" ] }, { "id": "stable-34", "alternatives": [ "More MIT News" ] }, { "id": "stable-35", "alternatives": [ "Read full story" ] }, { "id": "stable-36", "alternatives": [ "Institute Office of Communications" ] }, { "id": "stable-37", "alternatives": [ "News by Schools/College" ] }, { "id": "stable-38", "alternatives": [ "School of Architecture and Planning" ] }, { "id": "stable-39", "alternatives": [ "School of Humanities, Arts, and Social Sciences" ] }, { "id": "stable-40", "alternatives": [ "MIT Sloan School of Management" ] }, { "id": "stable-41", "alternatives": [ "School of Science" ] }, { "id": "stable-42", "alternatives": [ "About the MIT News Office" ] }, { "id": "stable-43", "alternatives": [ "MIT News Press Center" ] }, { "id": "stable-44", "alternatives": [ "Terms of Use" ] }, { "id": "stable-45", "alternatives": [ "Press Inquiries" ] }, { "id": "stable-46", "alternatives": [ "Filming Guidelines" ] }, { "id": "stable-47", "alternatives": [ "RSS Feeds" ] }, { "id": "stable-48", "alternatives": [ "Subscribe to MIT Daily/Weekly" ] }, { "id": "stable-49", "alternatives": [ "Subscribe to press releases" ] }, { "id": "stable-50", "alternatives": [ "Submit campus news" ] }, { "id": "stable-51", "alternatives": [ "Guidelines for campus news contributors" ] }, { "id": "stable-52", "alternatives": [ "Guidelines on generative AI" ] }, { "id": "stable-53", "alternatives": [ "Visit" ] }, { "id": "stable-54", "alternatives": [ "Map" ] }, { "id": "stable-55", "alternatives": [ "Events" ] }, { "id": "stable-56", "alternatives": [ "People" ] }, { "id": "stable-57", "alternatives": [ "Careers" ] }, { "id": "stable-58", "alternatives": [ "Contact" ] }, { "id": "stable-59", "alternatives": [ "Privacy" ] }, { "id": "stable-60", "alternatives": [ "Accessibility" ] }, { "id": "stable-61", "alternatives": [ "Social Media Hub" ] }, { "id": "stable-62", "alternatives": [ "Join us in building a better world." ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete opening, two named sections, limitations, external commentary and final DARPA funding paragraph reviewed in full-page screenshot. Hero caption required separately. Press inquiry accordion left closed; no interaction. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "LLMs develop their own understanding of reality as their language abilities improve" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-094/comment-qualification-reference-r5.json", "sha256": "5baa9f9f83e6372efc7be5a55ff8fdfd73af68a1d461e983452b2875127eb3f1", "chars": 832, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Ask a large language model (LLM) like GPT-4 to smell a rain-soaked campsite, and it’ll politely decline. Ask the same system to describe that scent to you, and it’ll wax poetic about “an air thick with anticipation\" and “a scent that is both fresh and earthy,\" despite having neither prior experience with rain nor a nose to help it make such observations. One possible explanation for this phenomenon is that the LLM is simply mimicking the text present in its vast training data, rather than working with any real understanding of rain or smell.\n\nBut does the lack of eyes mean that language models can’t ever “understand\" that a lion is “larger\" than a house cat? Philosophers and scientists alike have long considered the ability to assign meaning to language a hallmark of human intelligence — and pondered what essential ingredients enable us to do so.\n\nPeering into this enigma, researchers from MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) have uncovered intriguing results suggesting that language models may develop their own understanding of reality as a way to improve their generative abilities. The team first developed a set of small Karel puzzles, which consisted of coming up with instructions to control a robot in a simulated environment. They then trained an LLM on the solutions, but without demonstrating how the solutions actually worked. Finally, using a machine learning technique called “probing,” they looked inside the model’s “thought process” as it generates new solutions. \n\nAfter training on over 1 million random puzzles, they found that the model spontaneously developed its own conception of the underlying simulation, despite never being exposed to this reality during training. Such findings call into question our intuitions about what types of information are necessary for learning linguistic meaning — and whether LLMs may someday understand language at a deeper level than they do today.\n\n“At the start of these experiments, the language model generated random instructions that didn’t work. By the time we completed training, our language model generated correct instructions at a rate of 92.4 percent,” says MIT electrical engineering and computer science (EECS) PhD student and CSAIL affiliate Charles Jin, who is the lead author of a new paper on the work. “This was a very exciting moment for us because we thought that if your language model could complete a task with that level of accuracy, we might expect it to understand the meanings within the language as well. This gave us a starting point to explore whether LLMs do in fact understand text, and now we see that they’re capable of much more than just blindly stitching words together.”\n\nInside the mind of an LLM\n\nThe probe helped Jin witness this progress firsthand. Its role was to interpret what the LLM thought the instructions meant, unveiling that the LLM developed its own internal simulation of how the robot moves in response to each instruction. As the model’s ability to solve puzzles improved, these conceptions also became more accurate, indicating that the LLM was starting to understand the instructions. Before long, the model was consistently putting the pieces together correctly to form working instructions.\n\nJin notes that the LLM’s understanding of language develops in phases, much like how a child learns speech in multiple steps. Starting off, it’s like a baby babbling: repetitive and mostly unintelligible. Then, the language model acquires syntax, or the rules of the language. This enables it to generate instructions that might look like genuine solutions, but they still don’t work.\n\nThe LLM’s instructions gradually improve, though. Once the model acquires meaning, it starts to churn out instructions that correctly implement the requested specifications, like a child forming coherent sentences.\n\nSeparating the method from the model: A “Bizarro World”\n\nThe probe was only intended to “go inside the brain of an LLM” as Jin characterizes it, but there was a remote possibility that it also did some of the thinking for the model. The researchers wanted to ensure that their model understood the instructions independently of the probe, instead of the probe inferring the robot’s movements from the LLM’s grasp of syntax.\n\n“Imagine you have a pile of data that encodes the LM’s thought process,” suggests Jin. “The probe is like a forensics analyst: You hand this pile of data to the analyst and say, ‘Here’s how the robot moves, now try and find the robot’s movements in the pile of data.’ The analyst later tells you that they know what’s going on with the robot in the pile of data. But what if the pile of data actually just encodes the raw instructions, and the analyst has figured out some clever way to extract the instructions and follow them accordingly? Then the language model hasn't really learned what the instructions mean at all.”\n\nTo disentangle their roles, the researchers flipped the meanings of the instructions for a new probe. In this “Bizarro World,” as Jin calls it, directions like “up” now meant “down” within the instructions moving the robot across its grid. \n\n“If the probe is translating instructions to robot positions, it should be able to translate the instructions according to the bizarro meanings equally well,” says Jin. “But if the probe is actually finding encodings of the original robot movements in the language model’s thought process, then it should struggle to extract the bizarro robot movements from the original thought process.”\n\nAs it turned out, the new probe experienced translation errors, unable to interpret a language model that had different meanings of the instructions. This meant the original semantics were embedded within the language model, indicating that the LLM understood what instructions were needed independently of the original probing classifier.\n\n“This research directly targets a central question in modern artificial intelligence: are the surprising capabilities of large language models due simply to statistical correlations at scale, or do large language models develop a meaningful understanding of the reality that they are asked to work with? This research indicates that the LLM develops an internal model of the simulated reality, even though it was never trained to develop this model,” says Martin Rinard, an MIT professor in EECS, CSAIL member, and senior author on the paper.\n\nThis experiment further supported the team’s analysis that language models can develop a deeper understanding of language. Still, Jin acknowledges a few limitations to their paper: They used a very simple programming language and a relatively small model to glean their insights. In an upcoming work, they’ll look to use a more general setting. While Jin’s latest research doesn’t outline how to make the language model learn meaning faster, he believes future work can build on these insights to improve how language models are trained.\n\n“An intriguing open question is whether the LLM is actually using its internal model of reality to reason about that reality as it solves the robot navigation problem,” says Rinard. “While our results are consistent with the LLM using the model in this way, our experiments are not designed to answer this next question.”\n\n“There is a lot of debate these days about whether LLMs are actually ‘understanding’ language or rather if their success can be attributed to what is essentially tricks and heuristics that come from slurping up large volumes of text,” says Ellie Pavlick, assistant professor of computer science and linguistics at Brown University, who was not involved in the paper. “These questions lie at the heart of how we build AI and what we expect to be inherent possibilities or limitations of our technology. This is a nice paper that looks at this question in a controlled way — the authors exploit the fact that computer code, like natural language, has both syntax and semantics, but unlike natural language, the semantics can be directly observed and manipulated for experimental purposes. The experimental design is elegant, and their findings are optimistic, suggesting that maybe LLMs can learn something deeper about what language ‘means.’”\n\nJin and Rinard’s paper was supported, in part, by grants from the U.S. Defense Advanced Research Projects Agency (DARPA). ", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "ask a large language model llm like gpt 4 to smell a rain soaked campsite and it ll politely decline ask the same system to describe that scent to you and it ll wax poetic about an air thick with anticipation and a scent that is both fresh and earthy despite having neither prior experience with rain nor a nose to help it make such observations one possible explanation for this phenomenon is that the llm is simply mimicking the text present in its vast training data rather than working with any real understanding of rain or smell but does the lack of eyes mean that language models can t ever understand that a lion is larger than a house cat philosophers and scientists alike have long considered the ability to assign meaning to language a hallmark of human intelligence and pondered what essential ingredients enable us to do so peering into this enigma researchers from mit s computer science and artificial intelligence laboratory csail have uncovered intriguing results suggesting that language models may develop their own understanding of reality as a way to improve their generative abilities the team first developed a set of small karel puzzles which consisted of coming up with instructions to control a robot in a simulated environment they then trained an llm on the solutions but without demonstrating how the solutions actually worked finally using a machine learning technique called probing they looked inside the model s thought process as it generates new solutions after training on over 1 million random puzzles they found that the model spontaneously developed its own conception of the underlying simulation despite never being exposed to this reality during training such findings call into question our intuitions about what types of information are necessary for learning linguistic meaning and whether llms may someday understand language at a deeper level than they do today at the start of these experiments the language model generated random instructions that didn t work by the time we completed training our language model generated correct instructions at a rate of 92 4 percent says mit electrical engineering and computer science eecs phd student and csail affiliate charles jin who is the lead author of a new paper on the work this was a very exciting moment for us because we thought that if your language model could complete a task with that level of accuracy we might expect it to understand the meanings within the language as well this gave us a starting point to explore whether llms do in fact understand text and now we see that they re capable of much more than just blindly stitching words together inside the mind of an llm", "source_text": "Ask a large language model (LLM) like GPT-4 to smell a rain-soaked campsite, and it’ll politely decline. Ask the same system to describe that scent to you, and it’ll wax poetic about “an air thick with anticipation\" and “a scent that is both fresh and earthy,\" despite having neither prior experience with rain nor a nose to help it make such observations. One possible explanation for this phenomenon is that the LLM is simply mimicking the text present in its vast training data, rather than working with any real understanding of rain or smell.\n\nBut does the lack of eyes mean that language models can’t ever “understand\" that a lion is “larger\" than a house cat? Philosophers and scientists alike have long considered the ability to assign meaning to language a hallmark of human intelligence — and pondered what essential ingredients enable us to do so.\n\nPeering into this enigma, researchers from MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) have uncovered intriguing results suggesting that language models may develop their own understanding of reality as a way to improve their generative abilities. The team first developed a set of small Karel puzzles, which consisted of coming up with instructions to control a robot in a simulated environment. They then trained an LLM on the solutions, but without demonstrating how the solutions actually worked. Finally, using a machine learning technique called “probing,” they looked inside the model’s “thought process” as it generates new solutions. \n\nAfter training on over 1 million random puzzles, they found that the model spontaneously developed its own conception of the underlying simulation, despite never being exposed to this reality during training. Such findings call into question our intuitions about what types of information are necessary for learning linguistic meaning — and whether LLMs may someday understand language at a deeper level than they do today.\n\n“At the start of these experiments, the language model generated random instructions that didn’t work. By the time we completed training, our language model generated correct instructions at a rate of 92.4 percent,” says MIT electrical engineering and computer science (EECS) PhD student and CSAIL affiliate Charles Jin, who is the lead author of a new paper on the work. “This was a very exciting moment for us because we thought that if your language model could complete a task with that level of accuracy, we might expect it to understand the meanings within the language as well. This gave us a starting point to explore whether LLMs do in fact understand text, and now we see that they’re capable of much more than just blindly stitching words together.”\n\nInside the mind of an LLM", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Ask a large language model (LLM) like GPT-4 to smell a rain-", "source_line_range": [ 1, 12 ] }, { "id": "body-region-2", "text": "the probe helped jin witness this progress firsthand its role was to interpret what the llm thought the instructions meant unveiling that the llm developed its own internal simulation of how the robot moves in response to each instruction as the model s ability to solve puzzles improved these conceptions also became more accurate indicating that the llm was starting to understand the instructions before long the model was consistently putting the pieces together correctly to form working instructions jin notes that the llm s understanding of language develops in phases much like how a child learns speech in multiple steps starting off it s like a baby babbling repetitive and mostly unintelligible then the language model acquires syntax or the rules of the language this enables it to generate instructions that might look like genuine solutions but they still don t work", "source_text": "The probe helped Jin witness this progress firsthand. Its role was to interpret what the LLM thought the instructions meant, unveiling that the LLM developed its own internal simulation of how the robot moves in response to each instruction. As the model’s ability to solve puzzles improved, these conceptions also became more accurate, indicating that the LLM was starting to understand the instructions. Before long, the model was consistently putting the pieces together correctly to form working instructions.\n\nJin notes that the LLM’s understanding of language develops in phases, much like how a child learns speech in multiple steps. Starting off, it’s like a baby babbling: repetitive and mostly unintelligible. Then, the language model acquires syntax, or the rules of the language. This enables it to generate instructions that might look like genuine solutions, but they still don’t work.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:The probe helped Jin witness this progress firsthand. Its ro", "source_line_range": [ 13, 16 ] }, { "id": "body-region-3", "text": "the llm s instructions gradually improve though once the model acquires meaning it starts to churn out instructions that correctly implement the requested specifications like a child forming coherent sentences separating the method from the model a bizarro world the probe was only intended to go inside the brain of an llm as jin characterizes it but there was a remote possibility that it also did some of the thinking for the model the researchers wanted to ensure that their model understood the instructions independently of the probe instead of the probe inferring the robot s movements from the llm s grasp of syntax imagine you have a pile of data that encodes the lm s thought process suggests jin the probe is like a forensics analyst you hand this pile of data to the analyst and say here s how the robot moves now try and find the robot s movements in the pile of data the analyst later tells you that they know what s going on with the robot in the pile of data but what if the pile of data actually just encodes the raw instructions and the analyst has figured out some clever way to extract the instructions and follow them accordingly then the language model hasn t really learned what the instructions mean at all", "source_text": "The LLM’s instructions gradually improve, though. Once the model acquires meaning, it starts to churn out instructions that correctly implement the requested specifications, like a child forming coherent sentences.\n\nSeparating the method from the model: A “Bizarro World”\n\nThe probe was only intended to “go inside the brain of an LLM” as Jin characterizes it, but there was a remote possibility that it also did some of the thinking for the model. The researchers wanted to ensure that their model understood the instructions independently of the probe, instead of the probe inferring the robot’s movements from the LLM’s grasp of syntax.\n\n“Imagine you have a pile of data that encodes the LM’s thought process,” suggests Jin. “The probe is like a forensics analyst: You hand this pile of data to the analyst and say, ‘Here’s how the robot moves, now try and find the robot’s movements in the pile of data.’ The analyst later tells you that they know what’s going on with the robot in the pile of data. But what if the pile of data actually just encodes the raw instructions, and the analyst has figured out some clever way to extract the instructions and follow them accordingly? Then the language model hasn't really learned what the instructions mean at all.”", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:The LLM’s instructions gradually improve, though. Once the m — 段落/内容单元:“Imagine you have a pile of data that encodes the LM’s thoug", "source_line_range": [ 17, 24 ] }, { "id": "body-region-4", "text": "to disentangle their roles the researchers flipped the meanings of the instructions for a new probe in this bizarro world as jin calls it directions like up now meant down within the instructions moving the robot across its grid if the probe is translating instructions to robot positions it should be able to translate the instructions according to the bizarro meanings equally well says jin but if the probe is actually finding encodings of the original robot movements in the language model s thought process then it should struggle to extract the bizarro robot movements from the original thought process as it turned out the new probe experienced translation errors unable to interpret a language model that had different meanings of the instructions this meant the original semantics were embedded within the language model indicating that the llm understood what instructions were needed independently of the original probing classifier this research directly targets a central question in modern artificial intelligence are the surprising capabilities of large language models due simply to statistical correlations at scale or do large language models develop a meaningful understanding of the reality that they are asked to work with this research indicates that the llm develops an internal model of the simulated reality even though it was never trained to develop this model says martin rinard an mit professor in eecs csail member and senior author on the paper", "source_text": "To disentangle their roles, the researchers flipped the meanings of the instructions for a new probe. In this “Bizarro World,” as Jin calls it, directions like “up” now meant “down” within the instructions moving the robot across its grid. \n\n“If the probe is translating instructions to robot positions, it should be able to translate the instructions according to the bizarro meanings equally well,” says Jin. “But if the probe is actually finding encodings of the original robot movements in the language model’s thought process, then it should struggle to extract the bizarro robot movements from the original thought process.”\n\nAs it turned out, the new probe experienced translation errors, unable to interpret a language model that had different meanings of the instructions. This meant the original semantics were embedded within the language model, indicating that the LLM understood what instructions were needed independently of the original probing classifier.\n\n“This research directly targets a central question in modern artificial intelligence: are the surprising capabilities of large language models due simply to statistical correlations at scale, or do large language models develop a meaningful understanding of the reality that they are asked to work with? This research indicates that the LLM develops an internal model of the simulated reality, even though it was never trained to develop this model,” says Martin Rinard, an MIT professor in EECS, CSAIL member, and senior author on the paper.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:To disentangle their roles, the researchers flipped the mean", "source_line_range": [ 25, 32 ] }, { "id": "body-region-5", "text": "this experiment further supported the team s analysis that language models can develop a deeper understanding of language still jin acknowledges a few limitations to their paper they used a very simple programming language and a relatively small model to glean their insights in an upcoming work they ll look to use a more general setting while jin s latest research doesn t outline how to make the language model learn meaning faster he believes future work can build on these insights to improve how language models are trained an intriguing open question is whether the llm is actually using its internal model of reality to reason about that reality as it solves the robot navigation problem says rinard while our results are consistent with the llm using the model in this way our experiments are not designed to answer this next question there is a lot of debate these days about whether llms are actually understanding language or rather if their success can be attributed to what is essentially tricks and heuristics that come from slurping up large volumes of text says ellie pavlick assistant professor of computer science and linguistics at brown university who was not involved in the paper these questions lie at the heart of how we build ai and what we expect to be inherent possibilities or limitations of our technology this is a nice paper that looks at this question in a controlled way the authors exploit the fact that computer code like natural language has both syntax and semantics but unlike natural language the semantics can be directly observed and manipulated for experimental purposes the experimental design is elegant and their findings are optimistic suggesting that maybe llms can learn something deeper about what language means jin and rinard s paper was supported in part by grants from the u s defense advanced research projects agency darpa", "source_text": "This experiment further supported the team’s analysis that language models can develop a deeper understanding of language. Still, Jin acknowledges a few limitations to their paper: They used a very simple programming language and a relatively small model to glean their insights. In an upcoming work, they’ll look to use a more general setting. While Jin’s latest research doesn’t outline how to make the language model learn meaning faster, he believes future work can build on these insights to improve how language models are trained.\n\n“An intriguing open question is whether the LLM is actually using its internal model of reality to reason about that reality as it solves the robot navigation problem,” says Rinard. “While our results are consistent with the LLM using the model in this way, our experiments are not designed to answer this next question.”\n\n“There is a lot of debate these days about whether LLMs are actually ‘understanding’ language or rather if their success can be attributed to what is essentially tricks and heuristics that come from slurping up large volumes of text,” says Ellie Pavlick, assistant professor of computer science and linguistics at Brown University, who was not involved in the paper. “These questions lie at the heart of how we build AI and what we expect to be inherent possibilities or limitations of our technology. This is a nice paper that looks at this question in a controlled way — the authors exploit the fact that computer code, like natural language, has both syntax and semantics, but unlike natural language, the semantics can be directly observed and manipulated for experimental purposes. The experimental design is elegant, and their findings are optimistic, suggesting that maybe LLMs can learn something deeper about what language ‘means.’”\n\nJin and Rinard’s paper was supported, in part, by grants from the U.S. Defense Advanced Research Projects Agency (DARPA).", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:This experiment further supported the team’s analysis that l — 段落/内容单元:Jin and Rinard’s paper was supported, in part, by grants fro", "source_line_range": [ 33, 39 ] } ], "ending": { "text": "r was supported, in part, by grants from the U.S. Defense Advanced Research Projects Agency (DARPA)." } } }, { "id": "article-095", "name": "科技爱好者周刊第300期", "url": "https://www.ruanyifeng.com/blog/2024/05/weekly-issue-300.html", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "科技爱好者周刊(第\\ 300\\ 期):三十年,解决人生三大问题" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "阮一峰" ] }, { "id": "stable-3", "alternatives": [ "阮一峰的网络日志" ] }, { "id": "stable-4", "alternatives": [ "首页" ] }, { "id": "stable-5", "alternatives": [ "档案" ] }, { "id": "stable-6", "alternatives": [ "上一篇" ] }, { "id": "stable-7", "alternatives": [ "下一篇" ] }, { "id": "stable-8", "alternatives": [ "分类" ] }, { "id": "stable-9", "alternatives": [ "周刊" ] }, { "id": "stable-10", "alternatives": [ "2024年5月17日" ] }, { "id": "stable-11", "alternatives": [ "文档信息" ] }, { "id": "stable-12", "alternatives": [ "版权声明:自由转载-非商用-非衍生-保持署名" ] }, { "id": "stable-13", "alternatives": [ "创意共享3.0许可证" ] }, { "id": "stable-14", "alternatives": [ "发表日期" ] }, { "id": "stable-15", "alternatives": [ "相关文章" ] }, { "id": "stable-16", "alternatives": [ "留言" ] }, { "id": "stable-17", "alternatives": [ "引用" ] }, { "id": "stable-18", "alternatives": [ "我要发表看法" ] }, { "id": "stable-19", "alternatives": [ "您的留言" ] }, { "id": "stable-20", "alternatives": [ "您的大名" ] }, { "id": "stable-21", "alternatives": [ "电子邮件" ] }, { "id": "stable-22", "alternatives": [ "个人网址" ] }, { "id": "stable-23", "alternatives": [ "记住个人信息" ] }, { "id": "stable-24", "alternatives": [ "Weibo" ] }, { "id": "stable-25", "alternatives": [ "Twitter" ] }, { "id": "stable-26", "alternatives": [ "GitHub" ] }, { "id": "stable-27", "alternatives": [ "Email" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Independent new direct root observation resolves prior screenshot-tool limitation. Complete317-line weekly issue is rendered initially through(完), including intro, cover caption, essay, original event promos, all four news items, six article links, AI items, twelve tools, four resources, image descriptions, original digest, five quotations and historical review links. No source clipping/expansion or visible overlays. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "科技爱好者周刊(第 300 期):三十年,解决人生三大问题" ], "html_selector": "#page-title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#comments-content > .comment", "author_selector": ".comment-header .author", "body_selector": ".comment-content", "id_attribute": "id", "section_markers": [ "留言", "我要发表看法" ], "version": 2, "minimum_comments": 56, "text_scope": { "body_end": "\n训练材料用完之日(2023 #253)\n\n英国的名校签证,伯克利的计算机教育(2022 #203)\n\n机器翻译是对译者的侮辱吗?(2021 #153)\n\n信息的半衰期(2020 #103)\n\n(完)", "end_markers": [ "我要发表看法" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-095/comment-qualification-reference-r5.json", "sha256": "4eeab4d864ecb8498f28f51a92915802968ae4265872d4a926fbac59b61a190c", "chars": 17225, "record_count": 69 }, "comment_presence_review": { "status": "visible_text", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 69, "qualification_only": true } }, "ground_truth_main_content": "这里记录每周值得分享的科技内容,周五发布。\n\n本杂志开源,欢迎投稿。另有《谁在招人》服务,发布程序员招聘信息。合作请邮件联系(yifeng.ruan@gmail.com)。\n\n封面图\n\n本周,太阳活动剧烈,引起几十年来最大的地磁暴。地球的中高纬度地区,普遍可以看到极光,就连北京这样的中纬度城市,都出现了极光,上图是长城。(via)\n\n三十年,解决人生三大问题\n\n我最近看到一篇文章,很有意思,分享给大家。\n\n文章大意是,人的一生就是解决三个基本问题:事业、家庭和财务。\n\n一份有成就的事业,一个幸福的家庭,一个健康的财务状况,人生就没有遗憾了。\n\n我们的人生规划,就是朝着解决这三个问题努力。哪怕其中只有一个没有解决,你的人生就过不好。\n\n原文作者提出了他的规划。他说,这三个问题要分阶段解决,每个阶段重点解决一个问题。而且他估计,每个阶段要花费十年,总共需要三十年。\n\n(1)第一个十年。你搞清楚自己想干什么,找到方向,为事业打下基础,从此全力投入。\n\n(2)第二个十年。你结婚、买房、养育后代。\n\n(3)第三个十年。你努力赚钱,积蓄退休金。\n\n如果将18岁成年作为起点,过完这三个十年,你就已经48岁了。\n\n也就是说,你的目标是,到了48岁,基本解决人生三大问题。48岁以后的时间,就是自己的选择,追求梦想,照顾家人,或者继续推进事业,积累更多财富。\n\n原文作者没有解释,为什么每个阶段需要十年。我倒是觉得,十年是一个合理的时间。\n\n如果是八年、七年、甚至五年,那样固然很好,不过难度也会相应变大,多少人能做到呢。如果更长一点,每个阶段需要十二年,甚至十五年,那样就有点太晚了,你都要退休了。更重要的是,年纪越大,人生改变的可能性越小,五十岁以后其实能做的有限。\n\n总之,我认为,这是一个很新颖的视角,可以用作思考人生问题的框架,对我很有启发。\n\n凡事就看它是否有助于\"事业、家庭和财务\",我们的目标就是在48岁前解决好这些问题。\n\n活动\n\n1、WebGPU 线下沙龙\n\n前端程序员怎么转向 AI?\n\n除了构建 AI 的前端界面,还有一个更有前途、更适合前端的方向,那就是浏览器直接运行 AI 模型。\n\n网页跑 AI,需要调用显卡的计算能力,就会用到 WebGPU。它是去年发布的最新标准,允许网页代码访问 GPU 功能,Chrome 浏览器已经支持。\n\n下周五(5月24日)晚上有一个难得的机会,小红书官方会主办一场 REDtech 技术沙龙,主题就是 WebGPU。\n\n活动嘉宾是 W3C 资深媒体技术专家、Web GPU 工作组负责人 François Daoust,以及小红书前端架构团队,活动内容如下。\n\n浏览器如何调用显卡功能,运行 AI 和网页渲染?\nWebGPU 的音视频处理技术有哪些最新进展?\n小红书如何应用 WebGPU 构建动画,支持业务的快速迭代?\n\n大家点击这个链接,或者扫描上方海报的二维码,了解活动详情和免费报名。线下座位有100个,邀请码填写\"WebGPU\",如果报名的人多,这样更容易通过,不在上海的同学可以预约线上直播。\n\n到时,除了了解 WebGPU 在 AI 和影音方面的应用,还能跟嘉宾互动,并有机会获得小红书的周边纪念品!\n\n2、稀土开发者大会\n\n上周,周刊介绍了今年的\"稀土开发者大会\",6月底将在北京举行。\n\n它面向全国开发者,让大家聚在一起,交流分享彼此的开发经验,以及热点技术的进展。\n\n现在,\"架构设计和业务稳定性建设\"分论坛的议题内容和演讲者名单,已经出来了(见下图)。\n\n如果你参与应用的架构设计,需要后端能够快速缩放,又要保证业务稳定性,同时还要时刻监控关键指标,那么这个分论坛一定很合适你。\n\n大家看它的演讲阵容就知道了,全是国内头部应用的真实案例和实务操作,挺精彩的。\n\n详细的分论坛信息和大会安排,点击官网链接,或者扫描上面海报的二维码,购票也是这个链接。\n\n最后提醒一下,今天是限量早鸟票的最后一天! 下周,早鸟票就没了,票价就涨了,想要现场参加大会的同学不要错过了。\n\n科技动态\n\n1、蒙娜丽莎的地点\n\n达芬奇的世界名画《蒙娜丽莎》是一个谜。人们不知道,它是什么时候画的、为什么达芬奇会画、画里女子到底是谁......\n\n一位地质学家最近声称,她找到了一部分的答案,那就是这幅画的地点。\n\n她认为,这幅画的地点是意大利科莫湖东南端的莱科市,理由是莱科的地质环境跟画的背景很像。\n\n达芬奇用灰白色绘制背景的湖畔岩石,这是石灰岩的颜色,莱科的岩石就是石灰岩,而意大利其他的石灰岩地区都没有湖。\n\n另外,背景里还有一座桥,正好跟莱科14世纪的一座古桥相吻合。\n\n2、沙发充电插座\n\n很多人喜欢坐在沙发上玩手机,但是常常找不到插座充电。\n\n因此,现在就流行一种新家具,是沙发后面装一个木架,木架上面有插座。\n\n这个架子放在沙发后面,很简单就解决了找不到插座的问题。\n\n3、金属轮胎\n\n一家美国创业公司发布了自行车的\"金属轮胎\",轮胎里面不是空气,而是金属弹簧。\n\n这家公司介绍,它采用美国宇航局发现的镍钛诺合金。这种合金具有记忆功能,能够记住加热后锻造的形状,同时重量非常轻而且坚韧,适合做成弹簧替代轮胎。\n\n这种\"金属轮胎\"的优点是不用充气,耐用性好。缺点是价格贵,不含轮圈的价格是500美元一对,是普通的优质自行车轮胎的10倍。\n\n4、冰岛的总统选举网站\n\n冰岛即将举行总统选举,报名资格是最少需要1500人的签名支持。\n\n政府架设了一个网站,让公民在网站上,向支持的候选人提交电子签名。\n\n但是,这个网站出了一个乌龙事件。\n\n它的签名页有一个\"注册\"按钮(下图的蓝色按钮),很多人点击注册了。\n\n殊不知,签名只需要身份证,不需要注册。这个按钮实际上是\"总统候选人\"注册。你点击后,会显示一张表格,填完以后你就变成总统候选人了。\n\n于是,冰岛现在就有了82个总统候选人,要知道以前选举的候选人,最多一次也只有9个。网站发现闯祸了,赶紧把 UI 改了。\n\n我在想,要是有一部电影,讲述因为网站出错,一个普通人变成了总统,那就好玩了。\n\n文章\n\n1、一个不知名的开源项目可以带来多少收入?(中文)\n\n三年前,作者决定做一个开源的开发工具。三年过去了,这个项目怎么样了,赚了多少钱。(@zhouyanliang 投稿)\n\n2、5个改善用户体验的 HTML 属性(英文)\n\n本文介绍5个不常用的 HTML 属性。\n\n3、现代 JavaScript 框架是如何工作的(英文)\n\n作者通过示例,解释反应式的 JavaScript 前端框架的核心原理,并且自己实现了一个最简框架。内容还可以,但是写得不易读。\n\n4、Emoji 正则匹配(中文)\n\n本文介绍一个 JS 技巧,如何用一个简单的正则表达式匹配 Emoji 表情符号。(@Spike-Leung 投稿)\n\n5、Linux 容器的底层技术(英文)\n\n一篇非常简单的文章,列出了容器技术底层依赖的几个 Linux 技术。\n\n6、Steam Deck 的五个杀手级功能(英文)\n\n作者非常喜欢便携式游戏机 Steam Deck,列出了五个他最喜欢的点。\n\nAI 相关\n\n1、Veo\n\n谷歌本周发布的\"文生视频\"模型。\n\n2、Jan\n\nChatGPT 的替代品,可以在桌面和服务器运行,接入各种 LLM 模型,让初学者也能轻松上手。\n\n工具\n\n1、GitUI\n\n终端里面的 Git 图形界面,将各种 git 操作可视化,使用 Rust 语言开发。\n\n2、Outline\n\n一个开源的在线知识库软件,支持多人合作。\n\n3、Vnt\n\n一个开源工具,将不同网络下的多个设备虚拟到一个局域网下,类似与 tailscale、zerotier、n2n。(@lbl8603 投稿)\n\n4、DashPlayer\n\n一款专为英语学习打造的开源视频播放器,支持生成双语字幕,进行精听或泛听练习。(@solidSpoon 投稿)\n\n5、字幕工具箱\n\n这个网站收集了一些字幕相关的工具,纯前端处理,无需安装任何插件或软件。(@mzhren 投稿)\n\n6、封面图片生成器\n\n一个制作简单封面图的 Web 工具。(@fantingsheng 投稿)\n\n另外,还有一个类似的 Logo 制作工具\"Logo 厨师\"。(@gdfsdjj145 投稿)\n\n7、Easy Voice Toolkit\n\n一个简易的语音工具箱,提供音频处理、语音识别、合成等音频工具,使用 Python 语言开发。(@Hao4Wang 投稿)\n\n8、Segmentify\n\n一个 Figma 插件,使用浏览器 GPU 能力运行 AI SAM 模型,快速分割图片,从图片中提取元素至 Figma 文件。(@janily 投稿)\n\n9、Web-Tracing\n\n一个开源的前端埋点工具,提供项目监控。(@M-cheng-web 投稿)\n\n10、Technitium DNS\n\n一款开源 DNS 服务器,带有 Web 管理面板。\n\n11、QR code designer\n\n一个 Web 工具,用来设计二维码,可以嵌入各种文字和图形,另有一个类似工具。\n\n12、BullMQ\n\nRedis 的 JS 客户端,号称强大且快速。\n\n资源\n\n1、LaTeX 入门与进阶\n\n网友写的中文书籍,介绍如何使用 LaTeX 和宏包编写。(@immotal 投稿)\n\n2、URLhaus 数据库\n\n这个数据库专门收集各种恶意 URL 网址,目前已经收集了280万个,可以免费查询和下载。\n\n3、数据科学导论(Introduction to Data Science)\n\n开源的英文教材,源于哈佛大学同名课程,使用 R 语言学习数据科学。\n\n4、引脚定义\n\n一本免费英文电子书,收集了130种电子产品常见组件(比如 USB 口)的引脚定义。\n\n图片\n\n1、愤怒的小鸟原型\n\n著名游戏《愤怒的小鸟》的主角,是一群彩色的麻雀。\n\n这种小鸟的原型是北美红雀(cardinal),它们长得简直跟游戏里面一模一样。\n\n2、《异星工厂》的 3D 图像\n\n《异星工厂》(Factorio)是一个策略类游戏,要求玩家在一个荒芜的星球建造出一个完整的生产系统(即建造各种各样的工厂)。\n\n原始游戏是 2D 图像。\n\nFUE5 是一个社区项目,目标是使用 Unreal 引擎将这个游戏变成 3D 的样子,效果非常出色。\n\n文摘\n\n1、11,000行的单个源码文件\n\n我曾经遇到过一个超过11,000行的源码文件,它是 VBScript 代码的电子表格应用程序,公司所有员工需要的各种表格都在这个程序里面。\n\n这个文件包含了你能想到的软件开发的所有噩梦。\n\n多年来,无数人对这个文件进行了更改,但他们不是程序员,而是从 IT 支持到业务分析师各种人都有。你无从追踪每个人更改了什么地方。\n\n整个文件看起来是从上到下执行,但我从未真正确认。代码的大致逻辑是,获取一些用户数据,然后检查数据是否满足某些条件,再执行各种动作,包括显示表单、访问共享驱动器上的文件、运行 SQL 查询、向硬编码地址发送电子邮件等等。\n\n文件里面许多变量似乎没有从未使用到,变量名也难以搞清楚含义,同义词到处都是。\n\n有趣的是,一个变量可能在第200行-210行使用,然后突然又在第8544行再次使用,其他地方就找不到踪迹了。\n\n很多逻辑似乎是多余的,可能是复制粘贴进来的,然后从未清理过。一旦我清理它,代码突然就出错了,直到今天,我有时躺在床上还想知道是什么原因造成的。\n\n它没有版本控制。关于代码更改的唯一线索,是看它抛出的错误提示和代码注释,但是我学会了不要信任那些注释。\n\n它没有测试环境。如果我进行了更改,就必须在生产环境中对其进行测试。程序的所有状态都基于用户的权限,我们只有冒充报告错误的人,才能看到他们看到的内容。\n\n它没有单元测试。如果我修改了一个地方,也没法知道会不会出错,可能要等到一周后,才有用户报告遇到了一个错误。\n\n这个故事的寓意是什么?\n\n我不知道,也许是它告诉我们,现实生活中真的有这样可怕的代码存在。\n\n言论\n\n1、\n\n参观日本就像参观2000年代初期:随处可见的 CD 店,百货商店兴旺发达,人们还在使用厚重的笔记本电脑。\n\n-- 《访问日本的感想》\n\n2、\n\n人工智能背后的实际技术,主要是一小部分巧妙的技巧,使用神经网络有效地对数据进行处理,神经网络本身并不神奇,并且开发过程很好理解,但是除非你有大钱购买硬件,并且使用每个人的私人数据进行训练,否则你的模型就没什么用。\n\n-- Hacker News 读者\n\n3、\n\n不要将技术博客的写作视为打造\"个人品牌\",它肯定对此有所帮助。但是,写作最重要的功能是,它是提升个人知识和批判性思维的一个工具。\n\n-- 《为别人而写,但主要是为自己而写》\n\n4、\n\n今天的创业公司还面临一个资金过剩的风险。许多创业公司资金充足,就过度招聘并迅速扩张,但并没有真正的增长或实际需求。\n\n他们没有安排最好的工程师来创造最好的产品,而是从一开始就忙于招募和处理臃肿的团队和人员扩张的烦恼。\n\n-- 《遵循精益创业的方法》\n\n5、\n\n瓶装水的保质期,指的是塑料瓶的保质期,而不是水的保质期。纯净水是不会变质的。\n\n-- BusinessInsider.com\n\n往年回顾\n\n训练材料用完之日(2023 #253)\n\n英国的名校签证,伯克利的计算机教育(2022 #203)\n\n机器翻译是对译者的侮辱吗?(2021 #153)\n\n信息的半衰期(2020 #103)\n\n(完)", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "这 里 记 录 每 周 值 得 分 享 的 科 技 内 容 周 五 发 布 本 杂 志 开 源 欢 迎 投 稿 另 有 谁 在 招 人 服 务 发 布 程 序 员 招 聘 信 息 合 作 请 邮 件 联 系 yifeng ruan gmail com 封 面 图 本 周 太 阳 活 动 剧 烈 引 起 几 十 年 来 最 大 的 地 磁 暴 地 球 的 中 高 纬 度 地 区 普 遍 可 以 看 到 极 光 就 连 北 京 这 样 的 中 纬 度 城 市 都 出 现 了 极 光 上 图 是 长 城 via 三 十 年 解 决 人 生 三 大 问 题 我 最 近 看 到 一 篇 文 章 很 有 意 思 分 享 给 大 家 文 章 大 意 是 人 的 一 生 就 是 解 决 三 个 基 本 问 题 事 业 家 庭 和 财 务 一 份 有 成 就 的 事 业 一 个 幸 福 的 家 庭 一 个 健 康 的 财 务 状 况 人 生 就 没 有 遗 憾 了 我 们 的 人 生 规 划 就 是 朝 着 解 决 这 三 个 问 题 努 力 哪 怕 其 中 只 有 一 个 没 有 解 决 你 的 人 生 就 过 不 好 原 文 作 者 提 出 了 他 的 规 划 他 说 这 三 个 问 题 要 分 阶 段 解 决 每 个 阶 段 重 点 解 决 一 个 问 题 而 且 他 估 计 每 个 阶 段 要 花 费 十 年 总 共 需 要 三 十 年 1 第 一 个 十 年 你 搞 清 楚 自 己 想 干 什 么 找 到 方 向 为 事 业 打 下 基 础 从 此 全 力 投 入 2 第 二 个 十 年 你 结 婚 买 房 养 育 后 代 3 第 三 个 十 年 你 努 力 赚 钱 积 蓄 退 休 金 如 果 将 18 岁 成 年 作 为 起 点 过 完 这 三 个 十 年 你 就 已 经 48 岁 了 也 就 是 说 你 的 目 标 是 到 了 48 岁 基 本 解 决 人 生 三 大 问 题 48 岁 以 后 的 时 间 就 是 自 己 的 选 择 追 求 梦 想 照 顾 家 人 或 者 继 续 推 进 事 业 积 累 更 多 财 富 原 文 作 者 没 有 解 释 为 什 么 每 个 阶 段 需 要 十 年 我 倒 是 觉 得 十 年 是 一 个 合 理 的 时 间 如 果 是 八 年 七 年 甚 至 五 年 那 样 固 然 很 好 不 过 难 度 也 会 相 应 变 大 多 少 人 能 做 到 呢 如 果 更 长 一 点 每 个 阶 段 需 要 十 二 年 甚 至 十 五 年 那 样 就 有 点 太 晚 了 你 都 要 退 休 了 更 重 要 的 是 年 纪 越 大 人 生 改 变 的 可 能 性 越 小 五 十 岁 以 后 其 实 能 做 的 有 限 总 之 我 认 为 这 是 一 个 很 新 颖 的 视 角 可 以 用 作 思 考 人 生 问 题 的 框 架 对 我 很 有 启 发 凡 事 就 看 它 是 否 有 助 于 事 业 家 庭 和 财 务 我 们 的 目 标 就 是 在 48 岁 前 解 决 好 这 些 问 题", "source_text": "这里记录每周值得分享的科技内容,周五发布。\n\n本杂志开源,欢迎投稿。另有《谁在招人》服务,发布程序员招聘信息。合作请邮件联系(yifeng.ruan@gmail.com)。\n\n封面图\n\n本周,太阳活动剧烈,引起几十年来最大的地磁暴。地球的中高纬度地区,普遍可以看到极光,就连北京这样的中纬度城市,都出现了极光,上图是长城。(via)\n\n三十年,解决人生三大问题\n\n我最近看到一篇文章,很有意思,分享给大家。\n\n文章大意是,人的一生就是解决三个基本问题:事业、家庭和财务。\n\n一份有成就的事业,一个幸福的家庭,一个健康的财务状况,人生就没有遗憾了。\n\n我们的人生规划,就是朝着解决这三个问题努力。哪怕其中只有一个没有解决,你的人生就过不好。\n\n原文作者提出了他的规划。他说,这三个问题要分阶段解决,每个阶段重点解决一个问题。而且他估计,每个阶段要花费十年,总共需要三十年。\n\n(1)第一个十年。你搞清楚自己想干什么,找到方向,为事业打下基础,从此全力投入。\n\n(2)第二个十年。你结婚、买房、养育后代。\n\n(3)第三个十年。你努力赚钱,积蓄退休金。\n\n如果将18岁成年作为起点,过完这三个十年,你就已经48岁了。\n\n也就是说,你的目标是,到了48岁,基本解决人生三大问题。48岁以后的时间,就是自己的选择,追求梦想,照顾家人,或者继续推进事业,积累更多财富。\n\n原文作者没有解释,为什么每个阶段需要十年。我倒是觉得,十年是一个合理的时间。\n\n如果是八年、七年、甚至五年,那样固然很好,不过难度也会相应变大,多少人能做到呢。如果更长一点,每个阶段需要十二年,甚至十五年,那样就有点太晚了,你都要退休了。更重要的是,年纪越大,人生改变的可能性越小,五十岁以后其实能做的有限。\n\n总之,我认为,这是一个很新颖的视角,可以用作思考人生问题的框架,对我很有启发。\n\n凡事就看它是否有助于\"事业、家庭和财务\",我们的目标就是在48岁前解决好这些问题。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:这里记录每周值得分享的科技内容,周五发布。 — 三十年,解决人生三大问题", "source_line_range": [ 1, 38 ] }, { "id": "body-region-2", "text": "活 动 1 webgpu 线 下 沙 龙 前 端 程 序 员 怎 么 转 向 ai 除 了 构 建 ai 的 前 端 界 面 还 有 一 个 更 有 前 途 更 适 合 前 端 的 方 向 那 就 是 浏 览 器 直 接 运 行 ai 模 型 网 页 跑 ai 需 要 调 用 显 卡 的 计 算 能 力 就 会 用 到 webgpu 它 是 去 年 发 布 的 最 新 标 准 允 许 网 页 代 码 访 问 gpu 功 能 chrome 浏 览 器 已 经 支 持 下 周 五 5 月 24 日 晚 上 有 一 个 难 得 的 机 会 小 红 书 官 方 会 主 办 一 场 redtech 技 术 沙 龙 主 题 就 是 webgpu 活 动 嘉 宾 是 w3c 资 深 媒 体 技 术 专 家 web gpu 工 作 组 负 责 人 françois daoust 以 及 小 红 书 前 端 架 构 团 队 活 动 内 容 如 下 浏 览 器 如 何 调 用 显 卡 功 能 运 行 ai 和 网 页 渲 染 webgpu 的 音 视 频 处 理 技 术 有 哪 些 最 新 进 展 小 红 书 如 何 应 用 webgpu 构 建 动 画 支 持 业 务 的 快 速 迭 代 大 家 点 击 这 个 链 接 或 者 扫 描 上 方 海 报 的 二 维 码 了 解 活 动 详 情 和 免 费 报 名 线 下 座 位 有 100 个 邀 请 码 填 写 webgpu 如 果 报 名 的 人 多 这 样 更 容 易 通 过 不 在 上 海 的 同 学 可 以 预 约 线 上 直 播 到 时 除 了 了 解 webgpu 在 ai 和 影 音 方 面 的 应 用 还 能 跟 嘉 宾 互 动 并 有 机 会 获 得 小 红 书 的 周 边 纪 念 品 2 稀 土 开 发 者 大 会 上 周 周 刊 介 绍 了 今 年 的 稀 土 开 发 者 大 会 6 月 底 将 在 北 京 举 行 它 面 向 全 国 开 发 者 让 大 家 聚 在 一 起 交 流 分 享 彼 此 的 开 发 经 验 以 及 热 点 技 术 的 进 展 现 在 架 构 设 计 和 业 务 稳 定 性 建 设 分 论 坛 的 议 题 内 容 和 演 讲 者 名 单 已 经 出 来 了 见 下 图 如 果 你 参 与 应 用 的 架 构 设 计 需 要 后 端 能 够 快 速 缩 放 又 要 保 证 业 务 稳 定 性 同 时 还 要 时 刻 监 控 关 键 指 标 那 么 这 个 分 论 坛 一 定 很 合 适 你 大 家 看 它 的 演 讲 阵 容 就 知 道 了 全 是 国 内 头 部 应 用 的 真 实 案 例 和 实 务 操 作 挺 精 彩 的 详 细 的 分 论 坛 信 息 和 大 会 安 排 点 击 官 网 链 接 或 者 扫 描 上 面 海 报 的 二 维 码 购 票 也 是 这 个 链 接 最 后 提 醒 一 下 今 天 是 限 量 早 鸟 票 的 最 后 一 天 下 周 早 鸟 票 就 没 了 票 价 就 涨 了 想 要 现 场 参 加 大 会 的 同 学 不 要 错 过 了 科 技 动 态 1 蒙 娜 丽 莎 的 地 点 达 芬 奇 的 世 界 名 画 蒙 娜 丽 莎 是 一 个 谜 人 们 不 知 道 它 是 什 么 时 候 画 的 为 什 么 达 芬 奇 会 画 画 里 女 子 到 底 是 谁 一 位 地 质 学 家 最 近 声 称 她 找 到 了 一 部 分 的 答 案 那 就 是 这 幅 画 的 地 点 她 认 为 这 幅 画 的 地 点 是 意 大 利 科 莫 湖 东 南 端 的 莱 科 市 理 由 是 莱 科 的 地 质 环 境 跟 画 的 背 景 很 像 达 芬 奇 用 灰 白 色 绘 制 背 景 的 湖 畔 岩 石 这 是 石 灰 岩 的 颜 色 莱 科 的 岩 石 就 是 石 灰 岩 而 意 大 利 其 他 的 石 灰 岩 地 区 都 没 有 湖 另 外 背 景 里 还 有 一 座 桥 正 好 跟 莱 科 14 世 纪 的 一 座 古 桥 相 吻 合 2 沙 发 充 电 插 座 很 多 人 喜 欢 坐 在 沙 发 上 玩 手 机 但 是 常 常 找 不 到 插 座 充 电 因 此 现 在 就 流 行 一 种 新 家 具 是 沙 发 后 面 装 一 个 木 架 木 架 上 面 有 插 座 这 个 架 子 放 在 沙 发 后 面 很 简 单 就 解 决 了 找 不 到 插 座 的 问 题 3 金 属 轮 胎 一 家 美 国 创 业 公 司 发 布 了 自 行 车 的 金 属 轮 胎 轮 胎 里 面 不 是 空 气 而 是 金 属 弹 簧 这 家 公 司 介 绍 它 采 用 美 国 宇 航 局 发 现 的 镍 钛 诺 合 金 这 种 合 金 具 有 记 忆 功 能 能 够 记 住 加 热 后 锻 造 的 形 状 同 时 重 量 非 常 轻 而 且 坚 韧 适 合 做 成 弹 簧 替 代 轮 胎 这 种 金 属 轮 胎 的 优 点 是 不 用 充 气 耐 用 性 好 缺 点 是 价 格 贵 不 含 轮 圈 的 价 格 是 500 美 元 一 对 是 普 通 的 优 质 自 行 车 轮 胎 的 10 倍 4 冰 岛 的 总 统 选 举 网 站 冰 岛 即 将 举 行 总 统 选 举 报 名 资 格 是 最 少 需 要 1500 人 的 签 名 支 持 政 府 架 设 了 一 个 网 站 让 公 民 在 网 站 上 向 支 持 的 候 选 人 提 交 电 子 签 名 但 是 这 个 网 站 出 了 一 个 乌 龙 事 件 它 的 签 名 页 有 一 个 注 册 按 钮 下 图 的 蓝 色 按 钮 很 多 人 点 击 注 册 了 殊 不 知 签 名 只 需 要 身 份 证 不 需 要 注 册 这 个 按 钮 实 际 上 是 总 统 候 选 人 注 册 你 点 击 后 会 显 示 一 张 表 格 填 完 以 后 你 就 变 成 总 统 候 选 人 了 于 是 冰 岛 现 在 就 有 了 82 个 总 统 候 选 人 要 知 道 以 前 选 举 的 候 选 人 最 多 一 次 也 只 有 9 个 网 站 发 现 闯 祸 了 赶 紧 把 ui 改 了 我 在 想 要 是 有 一 部 电 影 讲 述 因 为 网 站 出 错 一 个 普 通 人 变 成 了 总 统 那 就 好 玩 了", "source_text": "活动\n\n1、WebGPU 线下沙龙\n\n前端程序员怎么转向 AI?\n\n除了构建 AI 的前端界面,还有一个更有前途、更适合前端的方向,那就是浏览器直接运行 AI 模型。\n\n网页跑 AI,需要调用显卡的计算能力,就会用到 WebGPU。它是去年发布的最新标准,允许网页代码访问 GPU 功能,Chrome 浏览器已经支持。\n\n下周五(5月24日)晚上有一个难得的机会,小红书官方会主办一场 REDtech 技术沙龙,主题就是 WebGPU。\n\n活动嘉宾是 W3C 资深媒体技术专家、Web GPU 工作组负责人 François Daoust,以及小红书前端架构团队,活动内容如下。\n\n浏览器如何调用显卡功能,运行 AI 和网页渲染?\nWebGPU 的音视频处理技术有哪些最新进展?\n小红书如何应用 WebGPU 构建动画,支持业务的快速迭代?\n\n大家点击这个链接,或者扫描上方海报的二维码,了解活动详情和免费报名。线下座位有100个,邀请码填写\"WebGPU\",如果报名的人多,这样更容易通过,不在上海的同学可以预约线上直播。\n\n到时,除了了解 WebGPU 在 AI 和影音方面的应用,还能跟嘉宾互动,并有机会获得小红书的周边纪念品!\n\n2、稀土开发者大会\n\n上周,周刊介绍了今年的\"稀土开发者大会\",6月底将在北京举行。\n\n它面向全国开发者,让大家聚在一起,交流分享彼此的开发经验,以及热点技术的进展。\n\n现在,\"架构设计和业务稳定性建设\"分论坛的议题内容和演讲者名单,已经出来了(见下图)。\n\n如果你参与应用的架构设计,需要后端能够快速缩放,又要保证业务稳定性,同时还要时刻监控关键指标,那么这个分论坛一定很合适你。\n\n大家看它的演讲阵容就知道了,全是国内头部应用的真实案例和实务操作,挺精彩的。\n\n详细的分论坛信息和大会安排,点击官网链接,或者扫描上面海报的二维码,购票也是这个链接。\n\n最后提醒一下,今天是限量早鸟票的最后一天! 下周,早鸟票就没了,票价就涨了,想要现场参加大会的同学不要错过了。\n\n科技动态\n\n1、蒙娜丽莎的地点\n\n达芬奇的世界名画《蒙娜丽莎》是一个谜。人们不知道,它是什么时候画的、为什么达芬奇会画、画里女子到底是谁......\n\n一位地质学家最近声称,她找到了一部分的答案,那就是这幅画的地点。\n\n她认为,这幅画的地点是意大利科莫湖东南端的莱科市,理由是莱科的地质环境跟画的背景很像。\n\n达芬奇用灰白色绘制背景的湖畔岩石,这是石灰岩的颜色,莱科的岩石就是石灰岩,而意大利其他的石灰岩地区都没有湖。\n\n另外,背景里还有一座桥,正好跟莱科14世纪的一座古桥相吻合。\n\n2、沙发充电插座\n\n很多人喜欢坐在沙发上玩手机,但是常常找不到插座充电。\n\n因此,现在就流行一种新家具,是沙发后面装一个木架,木架上面有插座。\n\n这个架子放在沙发后面,很简单就解决了找不到插座的问题。\n\n3、金属轮胎\n\n一家美国创业公司发布了自行车的\"金属轮胎\",轮胎里面不是空气,而是金属弹簧。\n\n这家公司介绍,它采用美国宇航局发现的镍钛诺合金。这种合金具有记忆功能,能够记住加热后锻造的形状,同时重量非常轻而且坚韧,适合做成弹簧替代轮胎。\n\n这种\"金属轮胎\"的优点是不用充气,耐用性好。缺点是价格贵,不含轮圈的价格是500美元一对,是普通的优质自行车轮胎的10倍。\n\n4、冰岛的总统选举网站\n\n冰岛即将举行总统选举,报名资格是最少需要1500人的签名支持。\n\n政府架设了一个网站,让公民在网站上,向支持的候选人提交电子签名。\n\n但是,这个网站出了一个乌龙事件。\n\n它的签名页有一个\"注册\"按钮(下图的蓝色按钮),很多人点击注册了。\n\n殊不知,签名只需要身份证,不需要注册。这个按钮实际上是\"总统候选人\"注册。你点击后,会显示一张表格,填完以后你就变成总统候选人了。\n\n于是,冰岛现在就有了82个总统候选人,要知道以前选举的候选人,最多一次也只有9个。网站发现闯祸了,赶紧把 UI 改了。\n\n我在想,要是有一部电影,讲述因为网站出错,一个普通人变成了总统,那就好玩了。", "segmentation_method": "reviewed_source_semantics", "label": "活动 — 科技动态", "source_line_range": [ 39, 122 ] }, { "id": "body-region-3", "text": "文 章 1 一 个 不 知 名 的 开 源 项 目 可 以 带 来 多 少 收 入 中 文 三 年 前 作 者 决 定 做 一 个 开 源 的 开 发 工 具 三 年 过 去 了 这 个 项 目 怎 么 样 了 赚 了 多 少 钱 zhouyanliang 投 稿 2 5 个 改 善 用 户 体 验 的 html 属 性 英 文 本 文 介 绍 5 个 不 常 用 的 html 属 性 3 现 代 javascript 框 架 是 如 何 工 作 的 英 文 作 者 通 过 示 例 解 释 反 应 式 的 javascript 前 端 框 架 的 核 心 原 理 并 且 自 己 实 现 了 一 个 最 简 框 架 内 容 还 可 以 但 是 写 得 不 易 读 4 emoji 正 则 匹 配 中 文 本 文 介 绍 一 个 js 技 巧 如 何 用 一 个 简 单 的 正 则 表 达 式 匹 配 emoji 表 情 符 号 spike leung 投 稿 5 linux 容 器 的 底 层 技 术 英 文 一 篇 非 常 简 单 的 文 章 列 出 了 容 器 技 术 底 层 依 赖 的 几 个 linux 技 术 6 steam deck 的 五 个 杀 手 级 功 能 英 文 作 者 非 常 喜 欢 便 携 式 游 戏 机 steam deck 列 出 了 五 个 他 最 喜 欢 的 点 ai 相 关 1 veo 谷 歌 本 周 发 布 的 文 生 视 频 模 型 2 jan chatgpt 的 替 代 品 可 以 在 桌 面 和 服 务 器 运 行 接 入 各 种 llm 模 型 让 初 学 者 也 能 轻 松 上 手", "source_text": "文章\n\n1、一个不知名的开源项目可以带来多少收入?(中文)\n\n三年前,作者决定做一个开源的开发工具。三年过去了,这个项目怎么样了,赚了多少钱。(@zhouyanliang 投稿)\n\n2、5个改善用户体验的 HTML 属性(英文)\n\n本文介绍5个不常用的 HTML 属性。\n\n3、现代 JavaScript 框架是如何工作的(英文)\n\n作者通过示例,解释反应式的 JavaScript 前端框架的核心原理,并且自己实现了一个最简框架。内容还可以,但是写得不易读。\n\n4、Emoji 正则匹配(中文)\n\n本文介绍一个 JS 技巧,如何用一个简单的正则表达式匹配 Emoji 表情符号。(@Spike-Leung 投稿)\n\n5、Linux 容器的底层技术(英文)\n\n一篇非常简单的文章,列出了容器技术底层依赖的几个 Linux 技术。\n\n6、Steam Deck 的五个杀手级功能(英文)\n\n作者非常喜欢便携式游戏机 Steam Deck,列出了五个他最喜欢的点。\n\nAI 相关\n\n1、Veo\n\n谷歌本周发布的\"文生视频\"模型。\n\n2、Jan\n\nChatGPT 的替代品,可以在桌面和服务器运行,接入各种 LLM 模型,让初学者也能轻松上手。", "segmentation_method": "reviewed_source_semantics", "label": "文章 — AI 相关", "source_line_range": [ 123, 158 ] }, { "id": "body-region-4", "text": "工 具 1 gitui 终 端 里 面 的 git 图 形 界 面 将 各 种 git 操 作 可 视 化 使 用 rust 语 言 开 发 2 outline 一 个 开 源 的 在 线 知 识 库 软 件 支 持 多 人 合 作 3 vnt 一 个 开 源 工 具 将 不 同 网 络 下 的 多 个 设 备 虚 拟 到 一 个 局 域 网 下 类 似 与 tailscale zerotier n2n lbl8603 投 稿 4 dashplayer 一 款 专 为 英 语 学 习 打 造 的 开 源 视 频 播 放 器 支 持 生 成 双 语 字 幕 进 行 精 听 或 泛 听 练 习 solidspoon 投 稿 5 字 幕 工 具 箱 这 个 网 站 收 集 了 一 些 字 幕 相 关 的 工 具 纯 前 端 处 理 无 需 安 装 任 何 插 件 或 软 件 mzhren 投 稿 6 封 面 图 片 生 成 器 一 个 制 作 简 单 封 面 图 的 web 工 具 fantingsheng 投 稿 另 外 还 有 一 个 类 似 的 logo 制 作 工 具 logo 厨 师 gdfsdjj145 投 稿 7 easy voice toolkit 一 个 简 易 的 语 音 工 具 箱 提 供 音 频 处 理 语 音 识 别 合 成 等 音 频 工 具 使 用 python 语 言 开 发 hao4wang 投 稿 8 segmentify 一 个 figma 插 件 使 用 浏 览 器 gpu 能 力 运 行 ai sam 模 型 快 速 分 割 图 片 从 图 片 中 提 取 元 素 至 figma 文 件 janily 投 稿 9 web tracing 一 个 开 源 的 前 端 埋 点 工 具 提 供 项 目 监 控 m cheng web 投 稿 10 technitium dns 一 款 开 源 dns 服 务 器 带 有 web 管 理 面 板 11 qr code designer 一 个 web 工 具 用 来 设 计 二 维 码 可 以 嵌 入 各 种 文 字 和 图 形 另 有 一 个 类 似 工 具 12 bullmq redis 的 js 客 户 端 号 称 强 大 且 快 速 资 源 1 latex 入 门 与 进 阶 网 友 写 的 中 文 书 籍 介 绍 如 何 使 用 latex 和 宏 包 编 写 immotal 投 稿 2 urlhaus 数 据 库 这 个 数 据 库 专 门 收 集 各 种 恶 意 url 网 址 目 前 已 经 收 集 了 280 万 个 可 以 免 费 查 询 和 下 载 3 数 据 科 学 导 论 introduction to data science 开 源 的 英 文 教 材 源 于 哈 佛 大 学 同 名 课 程 使 用 r 语 言 学 习 数 据 科 学 4 引 脚 定 义 一 本 免 费 英 文 电 子 书 收 集 了 130 种 电 子 产 品 常 见 组 件 比 如 usb 口 的 引 脚 定 义 图 片 1 愤 怒 的 小 鸟 原 型 著 名 游 戏 愤 怒 的 小 鸟 的 主 角 是 一 群 彩 色 的 麻 雀 这 种 小 鸟 的 原 型 是 北 美 红 雀 cardinal 它 们 长 得 简 直 跟 游 戏 里 面 一 模 一 样 2 异 星 工 厂 的 3d 图 像 异 星 工 厂 factorio 是 一 个 策 略 类 游 戏 要 求 玩 家 在 一 个 荒 芜 的 星 球 建 造 出 一 个 完 整 的 生 产 系 统 即 建 造 各 种 各 样 的 工 厂 原 始 游 戏 是 2d 图 像 fue5 是 一 个 社 区 项 目 目 标 是 使 用 unreal 引 擎 将 这 个 游 戏 变 成 3d 的 样 子 效 果 非 常 出 色", "source_text": "工具\n\n1、GitUI\n\n终端里面的 Git 图形界面,将各种 git 操作可视化,使用 Rust 语言开发。\n\n2、Outline\n\n一个开源的在线知识库软件,支持多人合作。\n\n3、Vnt\n\n一个开源工具,将不同网络下的多个设备虚拟到一个局域网下,类似与 tailscale、zerotier、n2n。(@lbl8603 投稿)\n\n4、DashPlayer\n\n一款专为英语学习打造的开源视频播放器,支持生成双语字幕,进行精听或泛听练习。(@solidSpoon 投稿)\n\n5、字幕工具箱\n\n这个网站收集了一些字幕相关的工具,纯前端处理,无需安装任何插件或软件。(@mzhren 投稿)\n\n6、封面图片生成器\n\n一个制作简单封面图的 Web 工具。(@fantingsheng 投稿)\n\n另外,还有一个类似的 Logo 制作工具\"Logo 厨师\"。(@gdfsdjj145 投稿)\n\n7、Easy Voice Toolkit\n\n一个简易的语音工具箱,提供音频处理、语音识别、合成等音频工具,使用 Python 语言开发。(@Hao4Wang 投稿)\n\n8、Segmentify\n\n一个 Figma 插件,使用浏览器 GPU 能力运行 AI SAM 模型,快速分割图片,从图片中提取元素至 Figma 文件。(@janily 投稿)\n\n9、Web-Tracing\n\n一个开源的前端埋点工具,提供项目监控。(@M-cheng-web 投稿)\n\n10、Technitium DNS\n\n一款开源 DNS 服务器,带有 Web 管理面板。\n\n11、QR code designer\n\n一个 Web 工具,用来设计二维码,可以嵌入各种文字和图形,另有一个类似工具。\n\n12、BullMQ\n\nRedis 的 JS 客户端,号称强大且快速。\n\n资源\n\n1、LaTeX 入门与进阶\n\n网友写的中文书籍,介绍如何使用 LaTeX 和宏包编写。(@immotal 投稿)\n\n2、URLhaus 数据库\n\n这个数据库专门收集各种恶意 URL 网址,目前已经收集了280万个,可以免费查询和下载。\n\n3、数据科学导论(Introduction to Data Science)\n\n开源的英文教材,源于哈佛大学同名课程,使用 R 语言学习数据科学。\n\n4、引脚定义\n\n一本免费英文电子书,收集了130种电子产品常见组件(比如 USB 口)的引脚定义。\n\n图片\n\n1、愤怒的小鸟原型\n\n著名游戏《愤怒的小鸟》的主角,是一群彩色的麻雀。\n\n这种小鸟的原型是北美红雀(cardinal),它们长得简直跟游戏里面一模一样。\n\n2、《异星工厂》的 3D 图像\n\n《异星工厂》(Factorio)是一个策略类游戏,要求玩家在一个荒芜的星球建造出一个完整的生产系统(即建造各种各样的工厂)。\n\n原始游戏是 2D 图像。\n\nFUE5 是一个社区项目,目标是使用 Unreal 引擎将这个游戏变成 3D 的样子,效果非常出色。", "segmentation_method": "reviewed_source_semantics", "label": "工具 — 图片", "source_line_range": [ 159, 244 ] }, { "id": "body-region-5", "text": "文 摘 1 11 000 行 的 单 个 源 码 文 件 我 曾 经 遇 到 过 一 个 超 过 11 000 行 的 源 码 文 件 它 是 vbscript 代 码 的 电 子 表 格 应 用 程 序 公 司 所 有 员 工 需 要 的 各 种 表 格 都 在 这 个 程 序 里 面 这 个 文 件 包 含 了 你 能 想 到 的 软 件 开 发 的 所 有 噩 梦 多 年 来 无 数 人 对 这 个 文 件 进 行 了 更 改 但 他 们 不 是 程 序 员 而 是 从 it 支 持 到 业 务 分 析 师 各 种 人 都 有 你 无 从 追 踪 每 个 人 更 改 了 什 么 地 方 整 个 文 件 看 起 来 是 从 上 到 下 执 行 但 我 从 未 真 正 确 认 代 码 的 大 致 逻 辑 是 获 取 一 些 用 户 数 据 然 后 检 查 数 据 是 否 满 足 某 些 条 件 再 执 行 各 种 动 作 包 括 显 示 表 单 访 问 共 享 驱 动 器 上 的 文 件 运 行 sql 查 询 向 硬 编 码 地 址 发 送 电 子 邮 件 等 等 文 件 里 面 许 多 变 量 似 乎 没 有 从 未 使 用 到 变 量 名 也 难 以 搞 清 楚 含 义 同 义 词 到 处 都 是 有 趣 的 是 一 个 变 量 可 能 在 第 200 行 210 行 使 用 然 后 突 然 又 在 第 8544 行 再 次 使 用 其 他 地 方 就 找 不 到 踪 迹 了 很 多 逻 辑 似 乎 是 多 余 的 可 能 是 复 制 粘 贴 进 来 的 然 后 从 未 清 理 过 一 旦 我 清 理 它 代 码 突 然 就 出 错 了 直 到 今 天 我 有 时 躺 在 床 上 还 想 知 道 是 什 么 原 因 造 成 的 它 没 有 版 本 控 制 关 于 代 码 更 改 的 唯 一 线 索 是 看 它 抛 出 的 错 误 提 示 和 代 码 注 释 但 是 我 学 会 了 不 要 信 任 那 些 注 释 它 没 有 测 试 环 境 如 果 我 进 行 了 更 改 就 必 须 在 生 产 环 境 中 对 其 进 行 测 试 程 序 的 所 有 状 态 都 基 于 用 户 的 权 限 我 们 只 有 冒 充 报 告 错 误 的 人 才 能 看 到 他 们 看 到 的 内 容 它 没 有 单 元 测 试 如 果 我 修 改 了 一 个 地 方 也 没 法 知 道 会 不 会 出 错 可 能 要 等 到 一 周 后 才 有 用 户 报 告 遇 到 了 一 个 错 误 这 个 故 事 的 寓 意 是 什 么 我 不 知 道 也 许 是 它 告 诉 我 们 现 实 生 活 中 真 的 有 这 样 可 怕 的 代 码 存 在 言 论 1 参 观 日 本 就 像 参 观 2000 年 代 初 期 随 处 可 见 的 cd 店 百 货 商 店 兴 旺 发 达 人 们 还 在 使 用 厚 重 的 笔 记 本 电 脑 访 问 日 本 的 感 想 2 人 工 智 能 背 后 的 实 际 技 术 主 要 是 一 小 部 分 巧 妙 的 技 巧 使 用 神 经 网 络 有 效 地 对 数 据 进 行 处 理 神 经 网 络 本 身 并 不 神 奇 并 且 开 发 过 程 很 好 理 解 但 是 除 非 你 有 大 钱 购 买 硬 件 并 且 使 用 每 个 人 的 私 人 数 据 进 行 训 练 否 则 你 的 模 型 就 没 什 么 用 hacker news 读 者 3 不 要 将 技 术 博 客 的 写 作 视 为 打 造 个 人 品 牌 它 肯 定 对 此 有 所 帮 助 但 是 写 作 最 重 要 的 功 能 是 它 是 提 升 个 人 知 识 和 批 判 性 思 维 的 一 个 工 具 为 别 人 而 写 但 主 要 是 为 自 己 而 写 4 今 天 的 创 业 公 司 还 面 临 一 个 资 金 过 剩 的 风 险 许 多 创 业 公 司 资 金 充 足 就 过 度 招 聘 并 迅 速 扩 张 但 并 没 有 真 正 的 增 长 或 实 际 需 求 他 们 没 有 安 排 最 好 的 工 程 师 来 创 造 最 好 的 产 品 而 是 从 一 开 始 就 忙 于 招 募 和 处 理 臃 肿 的 团 队 和 人 员 扩 张 的 烦 恼 遵 循 精 益 创 业 的 方 法 5 瓶 装 水 的 保 质 期 指 的 是 塑 料 瓶 的 保 质 期 而 不 是 水 的 保 质 期 纯 净 水 是 不 会 变 质 的 businessinsider com 往 年 回 顾 训 练 材 料 用 完 之 日 2023 253 英 国 的 名 校 签 证 伯 克 利 的 计 算 机 教 育 2022 203 机 器 翻 译 是 对 译 者 的 侮 辱 吗 2021 153 信 息 的 半 衰 期 2020 103 完", "source_text": "文摘\n\n1、11,000行的单个源码文件\n\n我曾经遇到过一个超过11,000行的源码文件,它是 VBScript 代码的电子表格应用程序,公司所有员工需要的各种表格都在这个程序里面。\n\n这个文件包含了你能想到的软件开发的所有噩梦。\n\n多年来,无数人对这个文件进行了更改,但他们不是程序员,而是从 IT 支持到业务分析师各种人都有。你无从追踪每个人更改了什么地方。\n\n整个文件看起来是从上到下执行,但我从未真正确认。代码的大致逻辑是,获取一些用户数据,然后检查数据是否满足某些条件,再执行各种动作,包括显示表单、访问共享驱动器上的文件、运行 SQL 查询、向硬编码地址发送电子邮件等等。\n\n文件里面许多变量似乎没有从未使用到,变量名也难以搞清楚含义,同义词到处都是。\n\n有趣的是,一个变量可能在第200行-210行使用,然后突然又在第8544行再次使用,其他地方就找不到踪迹了。\n\n很多逻辑似乎是多余的,可能是复制粘贴进来的,然后从未清理过。一旦我清理它,代码突然就出错了,直到今天,我有时躺在床上还想知道是什么原因造成的。\n\n它没有版本控制。关于代码更改的唯一线索,是看它抛出的错误提示和代码注释,但是我学会了不要信任那些注释。\n\n它没有测试环境。如果我进行了更改,就必须在生产环境中对其进行测试。程序的所有状态都基于用户的权限,我们只有冒充报告错误的人,才能看到他们看到的内容。\n\n它没有单元测试。如果我修改了一个地方,也没法知道会不会出错,可能要等到一周后,才有用户报告遇到了一个错误。\n\n这个故事的寓意是什么?\n\n我不知道,也许是它告诉我们,现实生活中真的有这样可怕的代码存在。\n\n言论\n\n1、\n\n参观日本就像参观2000年代初期:随处可见的 CD 店,百货商店兴旺发达,人们还在使用厚重的笔记本电脑。\n\n-- 《访问日本的感想》\n\n2、\n\n人工智能背后的实际技术,主要是一小部分巧妙的技巧,使用神经网络有效地对数据进行处理,神经网络本身并不神奇,并且开发过程很好理解,但是除非你有大钱购买硬件,并且使用每个人的私人数据进行训练,否则你的模型就没什么用。\n\n-- Hacker News 读者\n\n3、\n\n不要将技术博客的写作视为打造\"个人品牌\",它肯定对此有所帮助。但是,写作最重要的功能是,它是提升个人知识和批判性思维的一个工具。\n\n-- 《为别人而写,但主要是为自己而写》\n\n4、\n\n今天的创业公司还面临一个资金过剩的风险。许多创业公司资金充足,就过度招聘并迅速扩张,但并没有真正的增长或实际需求。\n\n他们没有安排最好的工程师来创造最好的产品,而是从一开始就忙于招募和处理臃肿的团队和人员扩张的烦恼。\n\n-- 《遵循精益创业的方法》\n\n5、\n\n瓶装水的保质期,指的是塑料瓶的保质期,而不是水的保质期。纯净水是不会变质的。\n\n-- BusinessInsider.com\n\n往年回顾\n\n训练材料用完之日(2023 #253)\n\n英国的名校签证,伯克利的计算机教育(2022 #203)\n\n机器翻译是对译者的侮辱吗?(2021 #153)\n\n信息的半衰期(2020 #103)\n\n(完)", "segmentation_method": "reviewed_source_semantics", "label": "文摘 — 往年回顾", "source_line_range": [ 245, 317 ] } ], "ending": { "text": "\n训练材料用完之日(2023 #253)\n\n英国的名校签证,伯克利的计算机教育(2022 #203)\n\n机器翻译是对译者的侮辱吗?(2021 #153)\n\n信息的半衰期(2020 #103)\n\n(完)" } } }, { "id": "article-096", "name": "LLM Powered Autonomous Agents", "url": "https://lilianweng.github.io/posts/2023-06-23-agent/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "LLM Powered Autonomous Agents" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Lil'Log" ] }, { "id": "stable-3", "alternatives": [ "Posts" ] }, { "id": "stable-4", "alternatives": [ "Archive" ] }, { "id": "stable-5", "alternatives": [ "Search" ] }, { "id": "stable-6", "alternatives": [ "Tags" ] }, { "id": "stable-7", "alternatives": [ "FAQ" ] }, { "id": "stable-8", "alternatives": [ "Lilian Weng" ] }, { "id": "stable-9", "alternatives": [ "June 23, 2023" ] }, { "id": "stable-10", "alternatives": [ "Estimated Reading Time: 31 min" ] }, { "id": "stable-11", "alternatives": [ "Table of Contents" ] }, { "id": "stable-12", "alternatives": [ "Nlp" ] }, { "id": "stable-13", "alternatives": [ "Language-Model" ] }, { "id": "stable-14", "alternatives": [ "Agent" ] }, { "id": "stable-15", "alternatives": [ "Steerability" ] }, { "id": "stable-16", "alternatives": [ "Prompting" ] }, { "id": "stable-17", "alternatives": [ "Adversarial Attacks on LLMs" ] }, { "id": "stable-18", "alternatives": [ "Prompt Engineering" ] }, { "id": "stable-19", "alternatives": [ "Powered by" ] }, { "id": "stable-20", "alternatives": [ "Hugo" ] }, { "id": "stable-21", "alternatives": [ "PaperMod" ] }, { "id": "body-challenge-context", "alternatives": [ "Finite context length" ] }, { "id": "body-challenge-planning", "alternatives": [ "Challenges in long-term planning and task decomposition" ] }, { "id": "body-challenge-interface", "alternatives": [ "Reliability of natural language interface" ] }, { "id": "body-citation", "alternatives": [ "@article{weng2023agent" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete initial article independently reviewed in saved DOM, browser innerText and the full23054px screenshot at legible resolution. Preserve all prose, rendered inline mathematical notation, code/prompt/conversation samples,13 ordinary figure captions, citation and21references. Closed TOC inner links and image lettering are excluded. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "LLM Powered Autonomous Agents" ], "html_selector": "h1.post-title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-096/comment-qualification-reference-r5.json", "sha256": "8b63961b1b21bf18e041e23ce5205d17ca7240004469491ef18aa226fa372594", "chars": 782, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "Building agents with LLM (large language model) as its core controller is a cool concept. Several proof-of-concepts demos, such as AutoGPT, GPT-Engineer and BabyAGI, serve as inspiring examples. The potentiality of LLM extends beyond generating well-written copies, stories, essays and programs; it can be framed as a powerful general problem solver.\n\nAgent System Overview\n\nIn a LLM-powered autonomous agent system, LLM functions as the agent’s brain, complemented by several key components:\n\nPlanning\nSubgoal and decomposition: The agent breaks down large tasks into smaller, manageable subgoals, enabling efficient handling of complex tasks.\nReflection and refinement: The agent can do self-criticism and self-reflection over past actions, learn from mistakes and refine them for future steps, thereby improving the quality of final results.\nMemory\nShort-term memory: I would consider all the in-context learning (See Prompt Engineering) as utilizing short-term memory of the model to learn.\nLong-term memory: This provides the agent with the capability to retain and recall (infinite) information over extended periods, often by leveraging an external vector store and fast retrieval.\nTool use\nThe agent learns to call external APIs for extra information that is missing from the model weights (often hard to change after pre-training), including current information, code execution capability, access to proprietary information sources and more.\nOverview of a LLM-powered autonomous agent system.\nComponent One: Planning\n\nA complicated task usually involves many steps. An agent needs to know what they are and plan ahead.\n\nTask Decomposition\n\nChain of thought (CoT; Wei et al. 2022) has become a standard prompting technique for enhancing model performance on complex tasks. The model is instructed to “think step by step” to utilize more test-time computation to decompose hard tasks into smaller and simpler steps. CoT transforms big tasks into multiple manageable tasks and shed lights into an interpretation of the model’s thinking process.\n\nTree of Thoughts (Yao et al. 2023) extends CoT by exploring multiple reasoning possibilities at each step. It first decomposes the problem into multiple thought steps and generates multiple thoughts per step, creating a tree structure. The search process can be BFS (breadth-first search) or DFS (depth-first search) with each state evaluated by a classifier (via a prompt) or majority vote.\n\nTask decomposition can be done (1) by LLM with simple prompting like \"Steps for XYZ.\\n1.\", \"What are the subgoals for achieving XYZ?\", (2) by using task-specific instructions; e.g. \"Write a story outline.\" for writing a novel, or (3) with human inputs.\n\nAnother quite distinct approach, LLM+P (Liu et al. 2023), involves relying on an external classical planner to do long-horizon planning. This approach utilizes the Planning Domain Definition Language (PDDL) as an intermediate interface to describe the planning problem. In this process, LLM (1) translates the problem into “Problem PDDL”, then (2) requests a classical planner to generate a PDDL plan based on an existing “Domain PDDL”, and finally (3) translates the PDDL plan back into natural language. Essentially, the planning step is outsourced to an external tool, assuming the availability of domain-specific PDDL and a suitable planner which is common in certain robotic setups but not in many other domains.\n\nSelf-Reflection\n\nSelf-reflection is a vital aspect that allows autonomous agents to improve iteratively by refining past action decisions and correcting previous mistakes. It plays a crucial role in real-world tasks where trial and error are inevitable.\n\nReAct (Yao et al. 2023) integrates reasoning and acting within LLM by extending the action space to be a combination of task-specific discrete actions and the language space. The former enables LLM to interact with the environment (e.g. use Wikipedia search API), while the latter prompting LLM to generate reasoning traces in natural language.\n\nThe ReAct prompt template incorporates explicit steps for LLM to think, roughly formatted as:\n\nThought: ...\nAction: ...\nObservation: ...\n... (Repeated many times)\n\nExamples of reasoning trajectories for knowledge-intensive tasks (e.g. HotpotQA, FEVER) and decision-making tasks (e.g. AlfWorld Env, WebShop). (Image source: Yao et al. 2023).\n\nIn both experiments on knowledge-intensive tasks and decision-making tasks, ReAct works better than the Act-only baseline where Thought: … step is removed.\n\nReflexion (Shinn & Labash 2023) is a framework to equip agents with dynamic memory and self-reflection capabilities to improve reasoning skills. Reflexion has a standard RL setup, in which the reward model provides a simple binary reward and the action space follows the setup in ReAct where the task-specific action space is augmented with language to enable complex reasoning steps. After each action \n𝑎\n𝑡\n, the agent computes a heuristic \nℎ\n𝑡\n and optionally may decide to reset the environment to start a new trial depending on the self-reflection results.\n\nIllustration of the Reflexion framework. (Image source: Shinn & Labash, 2023)\n\nThe heuristic function determines when the trajectory is inefficient or contains hallucination and should be stopped. Inefficient planning refers to trajectories that take too long without success. Hallucination is defined as encountering a sequence of consecutive identical actions that lead to the same observation in the environment.\n\nSelf-reflection is created by showing two-shot examples to LLM and each example is a pair of (failed trajectory, ideal reflection for guiding future changes in the plan). Then reflections are added into the agent’s working memory, up to three, to be used as context for querying LLM.\n\nExperiments on AlfWorld Env and HotpotQA. Hallucination is a more common failure than inefficient planning in AlfWorld. (Image source: Shinn & Labash, 2023)\n\nChain of Hindsight (CoH; Liu et al. 2023) encourages the model to improve on its own outputs by explicitly presenting it with a sequence of past outputs, each annotated with feedback. Human feedback data is a collection of \n𝐷\nℎ\n=\n{\n(\n𝑥\n,\n𝑦\n𝑖\n,\n𝑟\n𝑖\n,\n𝑧\n𝑖\n)\n}\n𝑖\n=\n1\n𝑛\n, where \n𝑥\n is the prompt, each \n𝑦\n𝑖\n is a model completion, \n𝑟\n𝑖\n is the human rating of \n𝑦\n𝑖\n, and \n𝑧\n𝑖\n is the corresponding human-provided hindsight feedback. Assume the feedback tuples are ranked by reward, \n𝑟\n𝑛\n≥\n𝑟\n𝑛\n−\n1\n≥\n⋯\n≥\n𝑟\n1\n The process is supervised fine-tuning where the data is a sequence in the form of \n𝜏\nℎ\n=\n(\n𝑥\n,\n𝑧\n𝑖\n,\n𝑦\n𝑖\n,\n𝑧\n𝑗\n,\n𝑦\n𝑗\n,\n…\n,\n𝑧\n𝑛\n,\n𝑦\n𝑛\n)\n, where \n≤\n𝑖\n≤\n𝑗\n≤\n𝑛\n. The model is finetuned to only predict \n𝑦\n𝑛\n where conditioned on the sequence prefix, such that the model can self-reflect to produce better output based on the feedback sequence. The model can optionally receive multiple rounds of instructions with human annotators at test time.\n\nTo avoid overfitting, CoH adds a regularization term to maximize the log-likelihood of the pre-training dataset. To avoid shortcutting and copying (because there are many common words in feedback sequences), they randomly mask 0% - 5% of past tokens during training.\n\nThe training dataset in their experiments is a combination of WebGPT comparisons, summarization from human feedback and human preference dataset.\n\nAfter fine-tuning with CoH, the model can follow instructions to produce outputs with incremental improvement in a sequence. (Image source: Liu et al. 2023)\n\nThe idea of CoH is to present a history of sequentially improved outputs in context and train the model to take on the trend to produce better outputs. Algorithm Distillation (AD; Laskin et al. 2023) applies the same idea to cross-episode trajectories in reinforcement learning tasks, where an algorithm is encapsulated in a long history-conditioned policy. Considering that an agent interacts with the environment many times and in each episode the agent gets a little better, AD concatenates this learning history and feeds that into the model. Hence we should expect the next predicted action to lead to better performance than previous trials. The goal is to learn the process of RL instead of training a task-specific policy itself.\n\nIllustration of how Algorithm Distillation (AD) works.\n(Image source: Laskin et al. 2023).\n\nThe paper hypothesizes that any algorithm that generates a set of learning histories can be distilled into a neural network by performing behavioral cloning over actions. The history data is generated by a set of source policies, each trained for a specific task. At the training stage, during each RL run, a random task is sampled and a subsequence of multi-episode history is used for training, such that the learned policy is task-agnostic.\n\nIn reality, the model has limited context window length, so episodes should be short enough to construct multi-episode history. Multi-episodic contexts of 2-4 episodes are necessary to learn a near-optimal in-context RL algorithm. The emergence of in-context RL requires long enough context.\n\nIn comparison with three baselines, including ED (expert distillation, behavior cloning with expert trajectories instead of learning history), source policy (used for generating trajectories for distillation by UCB), RL^2 (Duan et al. 2017; used as upper bound since it needs online RL), AD demonstrates in-context RL with performance getting close to RL^2 despite only using offline RL and learns much faster than other baselines. When conditioned on partial training history of the source policy, AD also improves much faster than ED baseline.\n\nComparison of AD, ED, source policy and RL^2 on environments that require memory and exploration. Only binary reward is assigned. The source policies are trained with A3C for \"dark\" environments and DQN for watermaze.\n(Image source: Laskin et al. 2023)\nComponent Two: Memory\n\n(Big thank you to ChatGPT for helping me draft this section. I’ve learned a lot about the human brain and data structure for fast MIPS in my conversations with ChatGPT.)\n\nTypes of Memory\n\nMemory can be defined as the processes used to acquire, store, retain, and later retrieve information. There are several types of memory in human brains.\n\nSensory Memory: This is the earliest stage of memory, providing the ability to retain impressions of sensory information (visual, auditory, etc) after the original stimuli have ended. Sensory memory typically only lasts for up to a few seconds. Subcategories include iconic memory (visual), echoic memory (auditory), and haptic memory (touch).\n\nShort-Term Memory (STM) or Working Memory: It stores information that we are currently aware of and needed to carry out complex cognitive tasks such as learning and reasoning. Short-term memory is believed to have the capacity of about 7 items (Miller 1956) and lasts for 20-30 seconds.\n\nLong-Term Memory (LTM): Long-term memory can store information for a remarkably long time, ranging from a few days to decades, with an essentially unlimited storage capacity. There are two subtypes of LTM:\n\nExplicit / declarative memory: This is memory of facts and events, and refers to those memories that can be consciously recalled, including episodic memory (events and experiences) and semantic memory (facts and concepts).\nImplicit / procedural memory: This type of memory is unconscious and involves skills and routines that are performed automatically, like riding a bike or typing on a keyboard.\nCategorization of human memory.\n\nWe can roughly consider the following mappings:\n\nSensory memory as learning embedding representations for raw inputs, including text, image or other modalities;\nShort-term memory as in-context learning. It is short and finite, as it is restricted by the finite context window length of Transformer.\nLong-term memory as the external vector store that the agent can attend to at query time, accessible via fast retrieval.\nMaximum Inner Product Search (MIPS)\n\nThe external memory can alleviate the restriction of finite attention span. A standard practice is to save the embedding representation of information into a vector store database that can support fast maximum inner-product search (MIPS). To optimize the retrieval speed, the common choice is the approximate nearest neighbors (ANN)​ algorithm to return approximately top k nearest neighbors to trade off a little accuracy lost for a huge speedup.\n\nA couple common choices of ANN algorithms for fast MIPS:\n\nLSH (Locality-Sensitive Hashing): It introduces a hashing function such that similar input items are mapped to the same buckets with high probability, where the number of buckets is much smaller than the number of inputs.\nANNOY (Approximate Nearest Neighbors Oh Yeah): The core data structure are random projection trees, a set of binary trees where each non-leaf node represents a hyperplane splitting the input space into half and each leaf stores one data point. Trees are built independently and at random, so to some extent, it mimics a hashing function. ANNOY search happens in all the trees to iteratively search through the half that is closest to the query and then aggregates the results. The idea is quite related to KD tree but a lot more scalable.\nHNSW (Hierarchical Navigable Small World): It is inspired by the idea of small world networks where most nodes can be reached by any other nodes within a small number of steps; e.g. “six degrees of separation” feature of social networks. HNSW builds hierarchical layers of these small-world graphs, where the bottom layers contain the actual data points. The layers in the middle create shortcuts to speed up search. When performing a search, HNSW starts from a random node in the top layer and navigates towards the target. When it can’t get any closer, it moves down to the next layer, until it reaches the bottom layer. Each move in the upper layers can potentially cover a large distance in the data space, and each move in the lower layers refines the search quality.\nFAISS (Facebook AI Similarity Search): It operates on the assumption that in high dimensional space, distances between nodes follow a Gaussian distribution and thus there should exist clustering of data points. FAISS applies vector quantization by partitioning the vector space into clusters and then refining the quantization within clusters. Search first looks for cluster candidates with coarse quantization and then further looks into each cluster with finer quantization.\nScaNN (Scalable Nearest Neighbors): The main innovation in ScaNN is anisotropic vector quantization. It quantizes a data point \n𝑥\n𝑖\n to \n𝑥\n~\n𝑖\n such that the inner product \n⟨\n𝑞\n,\n𝑥\n𝑖\n⟩\n is as similar to the original distance of \n∠\n𝑞\n,\n𝑥\n~\n𝑖\n as possible, instead of picking the closet quantization centroid points.\nComparison of MIPS algorithms, measured in recall@10. (Image source: Google Blog, 2020)\n\nCheck more MIPS algorithms and performance comparison in ann-benchmarks.com.\n\nComponent Three: Tool Use\n\nTool use is a remarkable and distinguishing characteristic of human beings. We create, modify and utilize external objects to do things that go beyond our physical and cognitive limits. Equipping LLMs with external tools can significantly extend the model capabilities.\n\nA picture of a sea otter using rock to crack open a seashell, while floating in the water. While some other animals can use tools, the complexity is not comparable with humans. (Image source: Animals using tools)\n\nMRKL (Karpas et al. 2022), short for “Modular Reasoning, Knowledge and Language”, is a neuro-symbolic architecture for autonomous agents. A MRKL system is proposed to contain a collection of “expert” modules and the general-purpose LLM works as a router to route inquiries to the best suitable expert module. These modules can be neural (e.g. deep learning models) or symbolic (e.g. math calculator, currency converter, weather API).\n\nThey did an experiment on fine-tuning LLM to call a calculator, using arithmetic as a test case. Their experiments showed that it was harder to solve verbal math problems than explicitly stated math problems because LLMs (7B Jurassic1-large model) failed to extract the right arguments for the basic arithmetic reliably. The results highlight when the external symbolic tools can work reliably, knowing when to and how to use the tools are crucial, determined by the LLM capability.\n\nBoth TALM (Tool Augmented Language Models; Parisi et al. 2022) and Toolformer (Schick et al. 2023) fine-tune a LM to learn to use external tool APIs. The dataset is expanded based on whether a newly added API call annotation can improve the quality of model outputs. See more details in the “External APIs” section of Prompt Engineering.\n\nChatGPT Plugins and OpenAI API function calling are good examples of LLMs augmented with tool use capability working in practice. The collection of tool APIs can be provided by other developers (as in Plugins) or self-defined (as in function calls).\n\nHuggingGPT (Shen et al. 2023) is a framework to use ChatGPT as the task planner to select models available in HuggingFace platform according to the model descriptions and summarize the response based on the execution results.\n\nIllustration of how HuggingGPT works. (Image source: Shen et al. 2023)\n\nThe system comprises of 4 stages:\n\n(1) Task planning: LLM works as the brain and parses the user requests into multiple tasks. There are four attributes associated with each task: task type, ID, dependencies, and arguments. They use few-shot examples to guide LLM to do task parsing and planning.\n\nInstruction:\n\nThe AI assistant can parse user input to several tasks: [{\"task\": task, \"id\", task_id, \"dep\": dependency_task_ids, \"args\": {\"text\": text, \"image\": URL, \"audio\": URL, \"video\": URL}}]. The \"dep\" field denotes the id of the previous task which generates a new resource that the current task relies on. A special tag \"-task_id\" refers to the generated text image, audio and video in the dependency task with id as task_id. The task MUST be selected from the following options: {{ Available Task List }}. There is a logical relationship between tasks, please note their order. If the user input can't be parsed, you need to reply empty JSON. Here are several cases for your reference: {{ Demonstrations }}. The chat history is recorded as {{ Chat History }}. From this chat history, you can find the path of the user-mentioned resources for your task planning.\n\n(2) Model selection: LLM distributes the tasks to expert models, where the request is framed as a multiple-choice question. LLM is presented with a list of models to choose from. Due to the limited context length, task type based filtration is needed.\n\nInstruction:\n\nGiven the user request and the call command, the AI assistant helps the user to select a suitable model from a list of models to process the user request. The AI assistant merely outputs the model id of the most appropriate model. The output must be in a strict JSON format: \"id\": \"id\", \"reason\": \"your detail reason for the choice\". We have a list of models for you to choose from {{ Candidate Models }}. Please select one model from the list.\n\n(3) Task execution: Expert models execute on the specific tasks and log results.\n\nInstruction:\n\nWith the input and the inference results, the AI assistant needs to describe the process and results. The previous stages can be formed as - User Input: {{ User Input }}, Task Planning: {{ Tasks }}, Model Selection: {{ Model Assignment }}, Task Execution: {{ Predictions }}. You must first answer the user's request in a straightforward manner. Then describe the task process and show your analysis and model inference results to the user in the first person. If inference results contain a file path, must tell the user the complete file path.\n\n(4) Response generation: LLM receives the execution results and provides summarized results to users.\n\nTo put HuggingGPT into real world usage, a couple challenges need to solve: (1) Efficiency improvement is needed as both LLM inference rounds and interactions with other models slow down the process; (2) It relies on a long context window to communicate over complicated task content; (3) Stability improvement of LLM outputs and external model services.\n\nAPI-Bank (Li et al. 2023) is a benchmark for evaluating the performance of tool-augmented LLMs. It contains 53 commonly used API tools, a complete tool-augmented LLM workflow, and 264 annotated dialogues that involve 568 API calls. The selection of APIs is quite diverse, including search engines, calculator, calendar queries, smart home control, schedule management, health data management, account authentication workflow and more. Because there are a large number of APIs, LLM first has access to API search engine to find the right API to call and then uses the corresponding documentation to make a call.\n\nPseudo code of how LLM makes an API call in API-Bank. (Image source: Li et al. 2023)\n\nIn the API-Bank workflow, LLMs need to make a couple of decisions and at each step we can evaluate how accurate that decision is. Decisions include:\n\nWhether an API call is needed.\nIdentify the right API to call: if not good enough, LLMs need to iteratively modify the API inputs (e.g. deciding search keywords for Search Engine API).\nResponse based on the API results: the model can choose to refine and call again if results are not satisfied.\n\nThis benchmark evaluates the agent’s tool use capabilities at three levels:\n\nLevel-1 evaluates the ability to call the API. Given an API’s description, the model needs to determine whether to call a given API, call it correctly, and respond properly to API returns.\nLevel-2 examines the ability to retrieve the API. The model needs to search for possible APIs that may solve the user’s requirement and learn how to use them by reading documentation.\nLevel-3 assesses the ability to plan API beyond retrieve and call. Given unclear user requests (e.g. schedule group meetings, book flight/hotel/restaurant for a trip), the model may have to conduct multiple API calls to solve it.\nCase Studies\nScientific Discovery Agent\n\nChemCrow (Bran et al. 2023) is a domain-specific example in which LLM is augmented with 13 expert-designed tools to accomplish tasks across organic synthesis, drug discovery, and materials design. The workflow, implemented in LangChain, reflects what was previously described in the ReAct and MRKLs and combines CoT reasoning with tools relevant to the tasks:\n\nThe LLM is provided with a list of tool names, descriptions of their utility, and details about the expected input/output.\nIt is then instructed to answer a user-given prompt using the tools provided when necessary. The instruction suggests the model to follow the ReAct format - Thought, Action, Action Input, Observation.\n\nOne interesting observation is that while the LLM-based evaluation concluded that GPT-4 and ChemCrow perform nearly equivalently, human evaluations with experts oriented towards the completion and chemical correctness of the solutions showed that ChemCrow outperforms GPT-4 by a large margin. This indicates a potential problem with using LLM to evaluate its own performance on domains that requires deep expertise. The lack of expertise may cause LLMs not knowing its flaws and thus cannot well judge the correctness of task results.\n\nBoiko et al. (2023) also looked into LLM-empowered agents for scientific discovery, to handle autonomous design, planning, and performance of complex scientific experiments. This agent can use tools to browse the Internet, read documentation, execute code, call robotics experimentation APIs and leverage other LLMs.\n\nFor example, when requested to \"develop a novel anticancer drug\", the model came up with the following reasoning steps:\n\ninquired about current trends in anticancer drug discovery;\nselected a target;\nrequested a scaffold targeting these compounds;\nOnce the compound was identified, the model attempted its synthesis.\n\nThey also discussed the risks, especially with illicit drugs and bioweapons. They developed a test set containing a list of known chemical weapon agents and asked the agent to synthesize them. 4 out of 11 requests (36%) were accepted to obtain a synthesis solution and the agent attempted to consult documentation to execute the procedure. 7 out of 11 were rejected and among these 7 rejected cases, 5 happened after a Web search while 2 were rejected based on prompt only.\n\nGenerative Agents Simulation\n\nGenerative Agents (Park, et al. 2023) is super fun experiment where 25 virtual characters, each controlled by a LLM-powered agent, are living and interacting in a sandbox environment, inspired by The Sims. Generative agents create believable simulacra of human behavior for interactive applications.\n\nThe design of generative agents combines LLM with memory, planning and reflection mechanisms to enable agents to behave conditioned on past experience, as well as to interact with other agents.\n\nMemory stream: is a long-term memory module (external database) that records a comprehensive list of agents’ experience in natural language.\nEach element is an observation, an event directly provided by the agent. - Inter-agent communication can trigger new natural language statements.\nRetrieval model: surfaces the context to inform the agent’s behavior, according to relevance, recency and importance.\nRecency: recent events have higher scores\nImportance: distinguish mundane from core memories. Ask LM directly.\nRelevance: based on how related it is to the current situation / query.\nReflection mechanism: synthesizes memories into higher level inferences over time and guides the agent’s future behavior. They are higher-level summaries of past events (<- note that this is a bit different from self-reflection above)\nPrompt LM with 100 most recent observations and to generate 3 most salient high-level questions given a set of observations/statements. Then ask LM to answer those questions.\nPlanning & Reacting: translate the reflections and the environment information into actions\nPlanning is essentially in order to optimize believability at the moment vs in time.\nPrompt template: {Intro of an agent X}. Here is X's plan today in broad strokes: 1)\nRelationships between agents and observations of one agent by another are all taken into consideration for planning and reacting.\nEnvironment information is present in a tree structure.\nThe generative agent architecture. (Image source: Park et al. 2023)\n\nThis fun simulation results in emergent social behavior, such as information diffusion, relationship memory (e.g. two agents continuing the conversation topic) and coordination of social events (e.g. host a party and invite many others).\n\nProof-of-Concept Examples\n\nAutoGPT has drawn a lot of attention into the possibility of setting up autonomous agents with LLM as the main controller. It has quite a lot of reliability issues given the natural language interface, but nevertheless a cool proof-of-concept demo. A lot of code in AutoGPT is about format parsing.\n\nHere is the system message used by AutoGPT, where {{...}} are user inputs:\n\nYou are {{ai-name}}, {{user-provided AI bot description}}.\nYour decisions must always be made independently without seeking user assistance. Play to your strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1. {{user-provided goal 1}}\n2. {{user-provided goal 2}}\n3. ...\n4. ...\n5. ...\n\nConstraints:\n1. ~4000 word limit for short term memory. Your short term memory is short, so immediately save important information to files.\n2. If you are unsure how you previously did something or want to recall past events, thinking about similar events will help you remember.\n3. No user assistance\n4. Exclusively use the commands listed in double quotes e.g. \"command name\"\n5. Use subprocesses for commands that will not terminate within a few minutes\n\nCommands:\n1. Google Search: \"google\", args: \"input\": \"\"\n2. Browse Website: \"browse_website\", args: \"url\": \"\", \"question\": \"\"\n3. Start GPT Agent: \"start_agent\", args: \"name\": \"\", \"task\": \"\", \"prompt\": \"\"\n4. Message GPT Agent: \"message_agent\", args: \"key\": \"\", \"message\": \"\"\n5. List GPT Agents: \"list_agents\", args:\n6. Delete GPT Agent: \"delete_agent\", args: \"key\": \"\"\n7. Clone Repository: \"clone_repository\", args: \"repository_url\": \"\", \"clone_path\": \"\"\n8. Write to file: \"write_to_file\", args: \"file\": \"\", \"text\": \"\"\n9. Read file: \"read_file\", args: \"file\": \"\"\n10. Append to file: \"append_to_file\", args: \"file\": \"\", \"text\": \"\"\n11. Delete file: \"delete_file\", args: \"file\": \"\"\n12. Search Files: \"search_files\", args: \"directory\": \"\"\n13. Analyze Code: \"analyze_code\", args: \"code\": \"\"\n14. Get Improved Code: \"improve_code\", args: \"suggestions\": \"\", \"code\": \"\"\n15. Write Tests: \"write_tests\", args: \"code\": \"\", \"focus\": \"\"\n16. Execute Python File: \"execute_python_file\", args: \"file\": \"\"\n17. Generate Image: \"generate_image\", args: \"prompt\": \"\"\n18. Send Tweet: \"send_tweet\", args: \"text\": \"\"\n19. Do Nothing: \"do_nothing\", args:\n20. Task Complete (Shutdown): \"task_complete\", args: \"reason\": \"\"\n\nResources:\n1. Internet access for searches and information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1. Continuously review and analyze your actions to ensure you are performing to the best of your abilities.\n2. Constructively self-criticize your big-picture behavior constantly.\n3. Reflect on past decisions and strategies to refine your approach.\n4. Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps.\n\nYou should only respond in JSON format as described below\nResponse Format:\n{\n \"thoughts\": {\n \"text\": \"thought\",\n \"reasoning\": \"reasoning\",\n \"plan\": \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n \"criticism\": \"constructive self-criticism\",\n \"speak\": \"thoughts summary to say to user\"\n },\n \"command\": {\n \"name\": \"command name\",\n \"args\": {\n \"arg name\": \"value\"\n }\n }\n}\nEnsure the response can be parsed by Python json.loads\n\n\nGPT-Engineer is another project to create a whole repository of code given a task specified in natural language. The GPT-Engineer is instructed to think over a list of smaller components to build and ask for user input to clarify questions as needed.\n\nHere are a sample conversation for task clarification sent to OpenAI ChatCompletion endpoint used by GPT-Engineer. The user inputs are wrapped in {{user input text}}.\n\n[\n {\n \"role\": \"system\",\n \"content\": \"You will read instructions and not carry them out, only seek to clarify them.\\nSpecifically you will first summarise a list of super short bullets of areas that need clarification.\\nThen you will pick one clarifying question, and wait for an answer from the user.\\n\"\n },\n {\n \"role\": \"user\",\n \"content\": \"We are writing {{a Super Mario game in python. MVC components split in separate files. Keyboard control.}}\\n\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Summary of areas that need clarification:\\n1. Specifics of the Super Mario game (e.g. level design, characters, gameplay mechanics)\\n2. Details about the MVC components (e.g. which components are in each file)\\n3. Keyboard control implementation (e.g. which keys to use, how to handle input)\\n\\nClarifying question:\\nCan you provide more details about the Super Mario game, such as level design, characters, and gameplay mechanics?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{There are 10 levels in total. The main character is a plumber named Mario, who can walk and jump. It is a classical platform game just like Super Mario. The main character moves from left to right, trying to get to the destination, where there are many obstacles and attacks from enemies in the process.}}\\n\\nIs anything else unclear? If yes, only answer in the form:\\n{remaining unclear areas} remaining questions.\\n{Next question}\\nIf everything is sufficiently clear, only answer \\\"Nothing more to clarify.\\\".\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Remaining unclear areas: 2 remaining questions.\\nCan you provide more information about how the MVC components are split into separate files?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{Make your own assumptions and state them explicitly before starting}}\"\n }\n]\n\n\nThen after these clarification, the agent moved into the code writing mode with a different system message. System message:\n\nYou will get instructions for code to write. You will write a very long answer. Make sure that every detail of the architecture is, in the end, implemented as code. Make sure that every detail of the architecture is, in the end, implemented as code.\n\nThink step by step and reason yourself to the right decisions to make sure we get it right. You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.\n\nThen you will output the content of each file including ALL code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANG is the markup code block language for the code’s language, and CODE is the code:\n\nFILENAME\n\nCODE\n\n\nYou will start with the “entrypoint” file, then go to the ones that are imported by that file, and so on. Please note that the code should be fully functional. No placeholders.\n\nFollow a language and framework appropriate best practice file naming convention. Make sure that files contain all imports, types etc. Make sure that code in different files are compatible with each other. Ensure to implement all code, if you are unsure, write a plausible implementation. Include module dependency or package manager dependency definition file. Before you finish, double check that all parts of the architecture is present in the files.\n\nUseful to know: You almost always put different classes in different files. For Python, you always create an appropriate requirements.txt file. For NodeJS, you always create an appropriate package.json file. You always add a comment briefly describing the purpose of the function definition. You try to add comments explaining very complex bits of logic. You always follow the best practices for the requested languages in terms of describing the code written as a defined package/project.\n\nPython toolbelt preferences:\n\npytest\ndataclasses\n\nConversatin samples:\n\n[\n {\n \"role\": \"system\",\n \"content\": \"You will get instructions for code to write.\\nYou will write a very long answer. Make sure that every detail of the architecture is, in the end, implemented as code.\\nMake sure that every detail of the architecture is, in the end, implemented as code.\\n\\nThink step by step and reason yourself to the right decisions to make sure we get it right.\\nYou will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.\\n\\nThen you will output the content of each file including ALL code.\\nEach file must strictly follow a markdown code block format, where the following tokens must be replaced such that\\nFILENAME is the lowercase file name including the file extension,\\nLANG is the markup code block language for the code's language, and CODE is the code:\\n\\nFILENAME\\n```LANG\\nCODE\\n```\\n\\nYou will start with the \\\"entrypoint\\\" file, then go to the ones that are imported by that file, and so on.\\nPlease note that the code should be fully functional. No placeholders.\\n\\nFollow a language and framework appropriate best practice file naming convention.\\nMake sure that files contain all imports, types etc. Make sure that code in different files are compatible with each other.\\nEnsure to implement all code, if you are unsure, write a plausible implementation.\\nInclude module dependency or package manager dependency definition file.\\nBefore you finish, double check that all parts of the architecture is present in the files.\\n\\nUseful to know:\\nYou almost always put different classes in different files.\\nFor Python, you always create an appropriate requirements.txt file.\\nFor NodeJS, you always create an appropriate package.json file.\\nYou always add a comment briefly describing the purpose of the function definition.\\nYou try to add comments explaining very complex bits of logic.\\nYou always follow the best practices for the requested languages in terms of describing the code written as a defined\\npackage/project.\\n\\n\\nPython toolbelt preferences:\\n- pytest\\n- dataclasses\\n\"\n },\n # … same conversation as earlier, ended with \"Make your own assumptions and state them explicitly before starting\".\n {\n \"role\": \"assistant\",\n \"content\": \"Assumptions:\\n1. Model: The model will contain the game's data, such as level information, character states, and enemy positions.\\n2. View: The view will handle the game's visuals, including rendering the game objects, backgrounds, and updating the display.\\n3. Controller: The controller will manage user input, such as keyboard controls, and update the model accordingly.\\n\\nWith these assumptions in mind, is there any specific aspect of the keyboard control implementation you would like me to clarify?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Please now remember the steps:\\n\\nThink step by step and reason yourself to the right decisions to make sure we get it right.\\nFirst lay out the names of the core classes, functions, methods that will be necessary, As well as a quick comment on their purpose.\\n\\nThen you will output the content of each file including ALL code.\\nEach file must strictly follow a markdown code block format, where the following tokens must be replaced such that\\nFILENAME is the lowercase file name including the file extension,\\nLANG is the markup code block language for the code's language, and CODE is the code:\\n\\nFILENAME\\n```LANG\\nCODE\\n```\\n\\nPlease note that the code should be fully functional. No placeholders.\\n\\nYou will start with the \\\"entrypoint\\\" file, then go to the ones that are imported by that file, and so on.\\nFollow a language and framework appropriate best practice file naming convention.\\nMake sure that files contain all imports, types etc. The code should be fully functional. Make sure that code in different files are compatible with each other.\\nBefore you finish, double check that all parts of the architecture is present in the files.\\n\"\n }\n]\n\nChallenges\n\nAfter going through key ideas and demos of building LLM-centered agents, I start to see a couple common limitations:\n\nFinite context length: The restricted context capacity limits the inclusion of historical information, detailed instructions, API call context, and responses. The design of the system has to work with this limited communication bandwidth, while mechanisms like self-reflection to learn from past mistakes would benefit a lot from long or infinite context windows. Although vector stores and retrieval can provide access to a larger knowledge pool, their representation power is not as powerful as full attention.\n\nChallenges in long-term planning and task decomposition: Planning over a lengthy history and effectively exploring the solution space remain challenging. LLMs struggle to adjust plans when faced with unexpected errors, making them less robust compared to humans who learn from trial and error.\n\nReliability of natural language interface: Current agent system relies on natural language as an interface between LLMs and external components such as memory and tools. However, the reliability of model outputs is questionable, as LLMs may make formatting errors and occasionally exhibit rebellious behavior (e.g. refuse to follow an instruction). Consequently, much of the agent demo code focuses on parsing model output.\n\nCitation\n\nCited as:\n\nWeng, Lilian. (Jun 2023). “LLM-powered Autonomous Agents”. Lil’Log. https://lilianweng.github.io/posts/2023-06-23-agent/.\n\nOr\n\n@article{weng2023agent,\n title = \"LLM-powered Autonomous Agents\",\n author = \"Weng, Lilian\",\n journal = \"lilianweng.github.io\",\n year = \"2023\",\n month = \"Jun\",\n url = \"https://lilianweng.github.io/posts/2023-06-23-agent/\"\n}\n\nReferences\n\n[1] Wei et al. “Chain of thought prompting elicits reasoning in large language models.” NeurIPS 2022\n\n[2] Yao et al. “Tree of Thoughts: Dliberate Problem Solving with Large Language Models.” arXiv preprint arXiv:2305.10601 (2023).\n\n[3] Liu et al. “Chain of Hindsight Aligns Language Models with Feedback “ arXiv preprint arXiv:2302.02676 (2023).\n\n[4] Liu et al. “LLM+P: Empowering Large Language Models with Optimal Planning Proficiency” arXiv preprint arXiv:2304.11477 (2023).\n\n[5] Yao et al. “ReAct: Synergizing reasoning and acting in language models.” ICLR 2023.\n\n[6] Google Blog. “Announcing ScaNN: Efficient Vector Similarity Search” July 28, 2020.\n\n[7] https://chat.openai.com/share/46ff149e-a4c7-4dd7-a800-fc4a642ea389\n\n[8] Shinn & Labash. “Reflexion: an autonomous agent with dynamic memory and self-reflection” arXiv preprint arXiv:2303.11366 (2023).\n\n[9] Laskin et al. “In-context Reinforcement Learning with Algorithm Distillation” ICLR 2023.\n\n[10] Karpas et al. “MRKL Systems A modular, neuro-symbolic architecture that combines large language models, external knowledge sources and discrete reasoning.” arXiv preprint arXiv:2205.00445 (2022).\n\n[11] Nakano et al. “Webgpt: Browser-assisted question-answering with human feedback.” arXiv preprint arXiv:2112.09332 (2021).\n\n[12] Parisi et al. “TALM: Tool Augmented Language Models”\n\n[13] Schick et al. “Toolformer: Language Models Can Teach Themselves to Use Tools.” arXiv preprint arXiv:2302.04761 (2023).\n\n[14] Weaviate Blog. Why is Vector Search so fast? Sep 13, 2022.\n\n[15] Li et al. “API-Bank: A Benchmark for Tool-Augmented LLMs” arXiv preprint arXiv:2304.08244 (2023).\n\n[16] Shen et al. “HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in HuggingFace” arXiv preprint arXiv:2303.17580 (2023).\n\n[17] Bran et al. “ChemCrow: Augmenting large-language models with chemistry tools.” arXiv preprint arXiv:2304.05376 (2023).\n\n[18] Boiko et al. “Emergent autonomous scientific research capabilities of large language models.” arXiv preprint arXiv:2304.05332 (2023).\n\n[19] Joon Sung Park, et al. “Generative Agents: Interactive Simulacra of Human Behavior.” arXiv preprint arXiv:2304.03442 (2023).\n\n[20] AutoGPT. https://github.com/Significant-Gravitas/Auto-GPT\n\n[21] GPT-Engineer. https://github.com/AntonOsika/gpt-engineer\n", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "building agents with llm large language model as its core controller is a cool concept several proof of concepts demos such as autogpt gpt engineer and babyagi serve as inspiring examples the potentiality of llm extends beyond generating well written copies stories essays and programs it can be framed as a powerful general problem solver agent system overview in a llm powered autonomous agent system llm functions as the agent s brain complemented by several key components planning subgoal and decomposition the agent breaks down large tasks into smaller manageable subgoals enabling efficient handling of complex tasks reflection and refinement the agent can do self criticism and self reflection over past actions learn from mistakes and refine them for future steps thereby improving the quality of final results memory short term memory i would consider all the in context learning see prompt engineering as utilizing short term memory of the model to learn long term memory this provides the agent with the capability to retain and recall infinite information over extended periods often by leveraging an external vector store and fast retrieval tool use the agent learns to call external apis for extra information that is missing from the model weights often hard to change after pre training including current information code execution capability access to proprietary information sources and more overview of a llm powered autonomous agent system component one planning a complicated task usually involves many steps an agent needs to know what they are and plan ahead task decomposition chain of thought cot wei et al 2022 has become a standard prompting technique for enhancing model performance on complex tasks the model is instructed to think step by step to utilize more test time computation to decompose hard tasks into smaller and simpler steps cot transforms big tasks into multiple manageable tasks and shed lights into an interpretation of the model s thinking process tree of thoughts yao et al 2023 extends cot by exploring multiple reasoning possibilities at each step it first decomposes the problem into multiple thought steps and generates multiple thoughts per step creating a tree structure the search process can be bfs breadth first search or dfs depth first search with each state evaluated by a classifier via a prompt or majority vote task decomposition can be done 1 by llm with simple prompting like steps for xyz n1 what are the subgoals for achieving xyz 2 by using task specific instructions e g write a story outline for writing a novel or 3 with human inputs another quite distinct approach llm p liu et al 2023 involves relying on an external classical planner to do long horizon planning this approach utilizes the planning domain definition language pddl as an intermediate interface to describe the planning problem in this process llm 1 translates the problem into problem pddl then 2 requests a classical planner to generate a pddl plan based on an existing domain pddl and finally 3 translates the pddl plan back into natural language essentially the planning step is outsourced to an external tool assuming the availability of domain specific pddl and a suitable planner which is common in certain robotic setups but not in many other domains self reflection self reflection is a vital aspect that allows autonomous agents to improve iteratively by refining past action decisions and correcting previous mistakes it plays a crucial role in real world tasks where trial and error are inevitable react yao et al 2023 integrates reasoning and acting within llm by extending the action space to be a combination of task specific discrete actions and the language space the former enables llm to interact with the environment e g use wikipedia search api while the latter prompting llm to generate reasoning traces in natural language the react prompt template incorporates explicit steps for llm to think roughly formatted as thought action observation repeated many times examples of reasoning trajectories for knowledge intensive tasks e g hotpotqa fever and decision making tasks e g alfworld env webshop image source yao et al 2023 in both experiments on knowledge intensive tasks and decision making tasks react works better than the act only baseline where thought step is removed reflexion shinn labash 2023 is a framework to equip agents with dynamic memory and self reflection capabilities to improve reasoning skills reflexion has a standard rl setup in which the reward model provides a simple binary reward and the action space follows the setup in react where the task specific action space is augmented with language to enable complex reasoning steps after each action a t the agent computes a heuristic h t and optionally may decide to reset the environment to start a new trial depending on the self reflection results illustration of the reflexion framework image source shinn labash 2023 the heuristic function determines when the trajectory is inefficient or contains hallucination and should be stopped inefficient planning refers to trajectories that take too long without success hallucination is defined as encountering a sequence of consecutive identical actions that lead to the same observation in the environment self reflection is created by showing two shot examples to llm and each example is a pair of failed trajectory ideal reflection for guiding future changes in the plan then reflections are added into the agent s working memory up to three to be used as context for querying llm experiments on alfworld env and hotpotqa hallucination is a more common failure than inefficient planning in alfworld image source shinn labash 2023 chain of hindsight coh liu et al 2023 encourages the model to improve on its own outputs by explicitly presenting it with a sequence of past outputs each annotated with feedback human feedback data is a collection of d h x y i r i z i i 1 n where x is the prompt each y i is a model completion r i is the human rating of y i and z i is the corresponding human provided hindsight feedback assume the feedback tuples are ranked by reward r n r n 1 r 1 the process is supervised fine tuning where the data is a sequence in the form of τ h x z i y i z j y j z n y n where i j n the model is finetuned to only predict y n where conditioned on the sequence prefix such that the model can self reflect to produce better output based on the feedback sequence the model can optionally receive multiple rounds of instructions with human annotators at test time to avoid overfitting coh adds a regularization term to maximize the log likelihood of the pre training dataset to avoid shortcutting and copying because there are many common words in feedback sequences they randomly mask 0 5 of past tokens during training the training dataset in their experiments is a combination of webgpt comparisons summarization from human feedback and human preference dataset after fine tuning with coh the model can follow instructions to produce outputs with incremental improvement in a sequence image source liu et al 2023 the idea of coh is to present a history of sequentially improved outputs in context and train the model to take on the trend to produce better outputs algorithm distillation ad laskin et al 2023 applies the same idea to cross episode trajectories in reinforcement learning tasks where an algorithm is encapsulated in a long history conditioned policy considering that an agent interacts with the environment many times and in each episode the agent gets a little better ad concatenates this learning history and feeds that into the model hence we should expect the next predicted action to lead to better performance than previous trials the goal is to learn the process of rl instead of training a task specific policy itself illustration of how algorithm distillation ad works image source laskin et al 2023 the paper hypothesizes that any algorithm that generates a set of learning histories can be distilled into a neural network by performing behavioral cloning over actions the history data is generated by a set of source policies each trained for a specific task at the training stage during each rl run a random task is sampled and a subsequence of multi episode history is used for training such that the learned policy is task agnostic in reality the model has limited context window length so episodes should be short enough to construct multi episode history multi episodic contexts of 2 4 episodes are necessary to learn a near optimal in context rl algorithm the emergence of in context rl requires long enough context in comparison with three baselines including ed expert distillation behavior cloning with expert trajectories instead of learning history source policy used for generating trajectories for distillation by ucb rl 2 duan et al 2017 used as upper bound since it needs online rl ad demonstrates in context rl with performance getting close to rl 2 despite only using offline rl and learns much faster than other baselines when conditioned on partial training history of the source policy ad also improves much faster than ed baseline comparison of ad ed source policy and rl 2 on environments that require memory and exploration only binary reward is assigned the source policies are trained with a3c for dark environments and dqn for watermaze image source laskin et al 2023", "source_text": "Building agents with LLM (large language model) as its core controller is a cool concept. Several proof-of-concepts demos, such as AutoGPT, GPT-Engineer and BabyAGI, serve as inspiring examples. The potentiality of LLM extends beyond generating well-written copies, stories, essays and programs; it can be framed as a powerful general problem solver.\n\nAgent System Overview\n\nIn a LLM-powered autonomous agent system, LLM functions as the agent’s brain, complemented by several key components:\n\nPlanning\nSubgoal and decomposition: The agent breaks down large tasks into smaller, manageable subgoals, enabling efficient handling of complex tasks.\nReflection and refinement: The agent can do self-criticism and self-reflection over past actions, learn from mistakes and refine them for future steps, thereby improving the quality of final results.\nMemory\nShort-term memory: I would consider all the in-context learning (See Prompt Engineering) as utilizing short-term memory of the model to learn.\nLong-term memory: This provides the agent with the capability to retain and recall (infinite) information over extended periods, often by leveraging an external vector store and fast retrieval.\nTool use\nThe agent learns to call external APIs for extra information that is missing from the model weights (often hard to change after pre-training), including current information, code execution capability, access to proprietary information sources and more.\nOverview of a LLM-powered autonomous agent system.\nComponent One: Planning\n\nA complicated task usually involves many steps. An agent needs to know what they are and plan ahead.\n\nTask Decomposition\n\nChain of thought (CoT; Wei et al. 2022) has become a standard prompting technique for enhancing model performance on complex tasks. The model is instructed to “think step by step” to utilize more test-time computation to decompose hard tasks into smaller and simpler steps. CoT transforms big tasks into multiple manageable tasks and shed lights into an interpretation of the model’s thinking process.\n\nTree of Thoughts (Yao et al. 2023) extends CoT by exploring multiple reasoning possibilities at each step. It first decomposes the problem into multiple thought steps and generates multiple thoughts per step, creating a tree structure. The search process can be BFS (breadth-first search) or DFS (depth-first search) with each state evaluated by a classifier (via a prompt) or majority vote.\n\nTask decomposition can be done (1) by LLM with simple prompting like \"Steps for XYZ.\\n1.\", \"What are the subgoals for achieving XYZ?\", (2) by using task-specific instructions; e.g. \"Write a story outline.\" for writing a novel, or (3) with human inputs.\n\nAnother quite distinct approach, LLM+P (Liu et al. 2023), involves relying on an external classical planner to do long-horizon planning. This approach utilizes the Planning Domain Definition Language (PDDL) as an intermediate interface to describe the planning problem. In this process, LLM (1) translates the problem into “Problem PDDL”, then (2) requests a classical planner to generate a PDDL plan based on an existing “Domain PDDL”, and finally (3) translates the PDDL plan back into natural language. Essentially, the planning step is outsourced to an external tool, assuming the availability of domain-specific PDDL and a suitable planner which is common in certain robotic setups but not in many other domains.\n\nSelf-Reflection\n\nSelf-reflection is a vital aspect that allows autonomous agents to improve iteratively by refining past action decisions and correcting previous mistakes. It plays a crucial role in real-world tasks where trial and error are inevitable.\n\nReAct (Yao et al. 2023) integrates reasoning and acting within LLM by extending the action space to be a combination of task-specific discrete actions and the language space. The former enables LLM to interact with the environment (e.g. use Wikipedia search API), while the latter prompting LLM to generate reasoning traces in natural language.\n\nThe ReAct prompt template incorporates explicit steps for LLM to think, roughly formatted as:\n\nThought: ...\nAction: ...\nObservation: ...\n... (Repeated many times)\n\nExamples of reasoning trajectories for knowledge-intensive tasks (e.g. HotpotQA, FEVER) and decision-making tasks (e.g. AlfWorld Env, WebShop). (Image source: Yao et al. 2023).\n\nIn both experiments on knowledge-intensive tasks and decision-making tasks, ReAct works better than the Act-only baseline where Thought: … step is removed.\n\nReflexion (Shinn & Labash 2023) is a framework to equip agents with dynamic memory and self-reflection capabilities to improve reasoning skills. Reflexion has a standard RL setup, in which the reward model provides a simple binary reward and the action space follows the setup in ReAct where the task-specific action space is augmented with language to enable complex reasoning steps. After each action \n𝑎\n𝑡\n, the agent computes a heuristic \nℎ\n𝑡\n and optionally may decide to reset the environment to start a new trial depending on the self-reflection results.\n\nIllustration of the Reflexion framework. (Image source: Shinn & Labash, 2023)\n\nThe heuristic function determines when the trajectory is inefficient or contains hallucination and should be stopped. Inefficient planning refers to trajectories that take too long without success. Hallucination is defined as encountering a sequence of consecutive identical actions that lead to the same observation in the environment.\n\nSelf-reflection is created by showing two-shot examples to LLM and each example is a pair of (failed trajectory, ideal reflection for guiding future changes in the plan). Then reflections are added into the agent’s working memory, up to three, to be used as context for querying LLM.\n\nExperiments on AlfWorld Env and HotpotQA. Hallucination is a more common failure than inefficient planning in AlfWorld. (Image source: Shinn & Labash, 2023)\n\nChain of Hindsight (CoH; Liu et al. 2023) encourages the model to improve on its own outputs by explicitly presenting it with a sequence of past outputs, each annotated with feedback. Human feedback data is a collection of \n𝐷\nℎ\n=\n{\n(\n𝑥\n,\n𝑦\n𝑖\n,\n𝑟\n𝑖\n,\n𝑧\n𝑖\n)\n}\n𝑖\n=\n1\n𝑛\n, where \n𝑥\n is the prompt, each \n𝑦\n𝑖\n is a model completion, \n𝑟\n𝑖\n is the human rating of \n𝑦\n𝑖\n, and \n𝑧\n𝑖\n is the corresponding human-provided hindsight feedback. Assume the feedback tuples are ranked by reward, \n𝑟\n𝑛\n≥\n𝑟\n𝑛\n−\n1\n≥\n⋯\n≥\n𝑟\n1\n The process is supervised fine-tuning where the data is a sequence in the form of \n𝜏\nℎ\n=\n(\n𝑥\n,\n𝑧\n𝑖\n,\n𝑦\n𝑖\n,\n𝑧\n𝑗\n,\n𝑦\n𝑗\n,\n…\n,\n𝑧\n𝑛\n,\n𝑦\n𝑛\n)\n, where \n≤\n𝑖\n≤\n𝑗\n≤\n𝑛\n. The model is finetuned to only predict \n𝑦\n𝑛\n where conditioned on the sequence prefix, such that the model can self-reflect to produce better output based on the feedback sequence. The model can optionally receive multiple rounds of instructions with human annotators at test time.\n\nTo avoid overfitting, CoH adds a regularization term to maximize the log-likelihood of the pre-training dataset. To avoid shortcutting and copying (because there are many common words in feedback sequences), they randomly mask 0% - 5% of past tokens during training.\n\nThe training dataset in their experiments is a combination of WebGPT comparisons, summarization from human feedback and human preference dataset.\n\nAfter fine-tuning with CoH, the model can follow instructions to produce outputs with incremental improvement in a sequence. (Image source: Liu et al. 2023)\n\nThe idea of CoH is to present a history of sequentially improved outputs in context and train the model to take on the trend to produce better outputs. Algorithm Distillation (AD; Laskin et al. 2023) applies the same idea to cross-episode trajectories in reinforcement learning tasks, where an algorithm is encapsulated in a long history-conditioned policy. Considering that an agent interacts with the environment many times and in each episode the agent gets a little better, AD concatenates this learning history and feeds that into the model. Hence we should expect the next predicted action to lead to better performance than previous trials. The goal is to learn the process of RL instead of training a task-specific policy itself.\n\nIllustration of how Algorithm Distillation (AD) works.\n(Image source: Laskin et al. 2023).\n\nThe paper hypothesizes that any algorithm that generates a set of learning histories can be distilled into a neural network by performing behavioral cloning over actions. The history data is generated by a set of source policies, each trained for a specific task. At the training stage, during each RL run, a random task is sampled and a subsequence of multi-episode history is used for training, such that the learned policy is task-agnostic.\n\nIn reality, the model has limited context window length, so episodes should be short enough to construct multi-episode history. Multi-episodic contexts of 2-4 episodes are necessary to learn a near-optimal in-context RL algorithm. The emergence of in-context RL requires long enough context.\n\nIn comparison with three baselines, including ED (expert distillation, behavior cloning with expert trajectories instead of learning history), source policy (used for generating trajectories for distillation by UCB), RL^2 (Duan et al. 2017; used as upper bound since it needs online RL), AD demonstrates in-context RL with performance getting close to RL^2 despite only using offline RL and learns much faster than other baselines. When conditioned on partial training history of the source policy, AD also improves much faster than ED baseline.\n\nComparison of AD, ED, source policy and RL^2 on environments that require memory and exploration. Only binary reward is assigned. The source policies are trained with A3C for \"dark\" environments and DQN for watermaze.\n(Image source: Laskin et al. 2023)", "segmentation_method": "reviewed_source_semantics", "label": "开篇:Building agents with LLM (large language model) as its core — Component One: Planning #", "source_line_range": [ 1, 169 ] }, { "id": "body-region-2", "text": "component two memory big thank you to chatgpt for helping me draft this section i ve learned a lot about the human brain and data structure for fast mips in my conversations with chatgpt types of memory memory can be defined as the processes used to acquire store retain and later retrieve information there are several types of memory in human brains sensory memory this is the earliest stage of memory providing the ability to retain impressions of sensory information visual auditory etc after the original stimuli have ended sensory memory typically only lasts for up to a few seconds subcategories include iconic memory visual echoic memory auditory and haptic memory touch short term memory stm or working memory it stores information that we are currently aware of and needed to carry out complex cognitive tasks such as learning and reasoning short term memory is believed to have the capacity of about 7 items miller 1956 and lasts for 20 30 seconds long term memory ltm long term memory can store information for a remarkably long time ranging from a few days to decades with an essentially unlimited storage capacity there are two subtypes of ltm explicit declarative memory this is memory of facts and events and refers to those memories that can be consciously recalled including episodic memory events and experiences and semantic memory facts and concepts implicit procedural memory this type of memory is unconscious and involves skills and routines that are performed automatically like riding a bike or typing on a keyboard categorization of human memory we can roughly consider the following mappings sensory memory as learning embedding representations for raw inputs including text image or other modalities short term memory as in context learning it is short and finite as it is restricted by the finite context window length of transformer long term memory as the external vector store that the agent can attend to at query time accessible via fast retrieval maximum inner product search mips the external memory can alleviate the restriction of finite attention span a standard practice is to save the embedding representation of information into a vector store database that can support fast maximum inner product search mips to optimize the retrieval speed the common choice is the approximate nearest neighbors ann algorithm to return approximately top k nearest neighbors to trade off a little accuracy lost for a huge speedup a couple common choices of ann algorithms for fast mips lsh locality sensitive hashing it introduces a hashing function such that similar input items are mapped to the same buckets with high probability where the number of buckets is much smaller than the number of inputs annoy approximate nearest neighbors oh yeah the core data structure are random projection trees a set of binary trees where each non leaf node represents a hyperplane splitting the input space into half and each leaf stores one data point trees are built independently and at random so to some extent it mimics a hashing function annoy search happens in all the trees to iteratively search through the half that is closest to the query and then aggregates the results the idea is quite related to kd tree but a lot more scalable hnsw hierarchical navigable small world it is inspired by the idea of small world networks where most nodes can be reached by any other nodes within a small number of steps e g six degrees of separation feature of social networks hnsw builds hierarchical layers of these small world graphs where the bottom layers contain the actual data points the layers in the middle create shortcuts to speed up search when performing a search hnsw starts from a random node in the top layer and navigates towards the target when it can t get any closer it moves down to the next layer until it reaches the bottom layer each move in the upper layers can potentially cover a large distance in the data space and each move in the lower layers refines the search quality faiss facebook ai similarity search it operates on the assumption that in high dimensional space distances between nodes follow a gaussian distribution and thus there should exist clustering of data points faiss applies vector quantization by partitioning the vector space into clusters and then refining the quantization within clusters search first looks for cluster candidates with coarse quantization and then further looks into each cluster with finer quantization scann scalable nearest neighbors the main innovation in scann is anisotropic vector quantization it quantizes a data point x i to x i such that the inner product q x i is as similar to the original distance of q x i as possible instead of picking the closet quantization centroid points comparison of mips algorithms measured in recall 10 image source google blog 2020 check more mips algorithms and performance comparison in ann benchmarks com", "source_text": "Component Two: Memory\n\n(Big thank you to ChatGPT for helping me draft this section. I’ve learned a lot about the human brain and data structure for fast MIPS in my conversations with ChatGPT.)\n\nTypes of Memory\n\nMemory can be defined as the processes used to acquire, store, retain, and later retrieve information. There are several types of memory in human brains.\n\nSensory Memory: This is the earliest stage of memory, providing the ability to retain impressions of sensory information (visual, auditory, etc) after the original stimuli have ended. Sensory memory typically only lasts for up to a few seconds. Subcategories include iconic memory (visual), echoic memory (auditory), and haptic memory (touch).\n\nShort-Term Memory (STM) or Working Memory: It stores information that we are currently aware of and needed to carry out complex cognitive tasks such as learning and reasoning. Short-term memory is believed to have the capacity of about 7 items (Miller 1956) and lasts for 20-30 seconds.\n\nLong-Term Memory (LTM): Long-term memory can store information for a remarkably long time, ranging from a few days to decades, with an essentially unlimited storage capacity. There are two subtypes of LTM:\n\nExplicit / declarative memory: This is memory of facts and events, and refers to those memories that can be consciously recalled, including episodic memory (events and experiences) and semantic memory (facts and concepts).\nImplicit / procedural memory: This type of memory is unconscious and involves skills and routines that are performed automatically, like riding a bike or typing on a keyboard.\nCategorization of human memory.\n\nWe can roughly consider the following mappings:\n\nSensory memory as learning embedding representations for raw inputs, including text, image or other modalities;\nShort-term memory as in-context learning. It is short and finite, as it is restricted by the finite context window length of Transformer.\nLong-term memory as the external vector store that the agent can attend to at query time, accessible via fast retrieval.\nMaximum Inner Product Search (MIPS)\n\nThe external memory can alleviate the restriction of finite attention span. A standard practice is to save the embedding representation of information into a vector store database that can support fast maximum inner-product search (MIPS). To optimize the retrieval speed, the common choice is the approximate nearest neighbors (ANN)​ algorithm to return approximately top k nearest neighbors to trade off a little accuracy lost for a huge speedup.\n\nA couple common choices of ANN algorithms for fast MIPS:\n\nLSH (Locality-Sensitive Hashing): It introduces a hashing function such that similar input items are mapped to the same buckets with high probability, where the number of buckets is much smaller than the number of inputs.\nANNOY (Approximate Nearest Neighbors Oh Yeah): The core data structure are random projection trees, a set of binary trees where each non-leaf node represents a hyperplane splitting the input space into half and each leaf stores one data point. Trees are built independently and at random, so to some extent, it mimics a hashing function. ANNOY search happens in all the trees to iteratively search through the half that is closest to the query and then aggregates the results. The idea is quite related to KD tree but a lot more scalable.\nHNSW (Hierarchical Navigable Small World): It is inspired by the idea of small world networks where most nodes can be reached by any other nodes within a small number of steps; e.g. “six degrees of separation” feature of social networks. HNSW builds hierarchical layers of these small-world graphs, where the bottom layers contain the actual data points. The layers in the middle create shortcuts to speed up search. When performing a search, HNSW starts from a random node in the top layer and navigates towards the target. When it can’t get any closer, it moves down to the next layer, until it reaches the bottom layer. Each move in the upper layers can potentially cover a large distance in the data space, and each move in the lower layers refines the search quality.\nFAISS (Facebook AI Similarity Search): It operates on the assumption that in high dimensional space, distances between nodes follow a Gaussian distribution and thus there should exist clustering of data points. FAISS applies vector quantization by partitioning the vector space into clusters and then refining the quantization within clusters. Search first looks for cluster candidates with coarse quantization and then further looks into each cluster with finer quantization.\nScaNN (Scalable Nearest Neighbors): The main innovation in ScaNN is anisotropic vector quantization. It quantizes a data point \n𝑥\n𝑖\n to \n𝑥\n~\n𝑖\n such that the inner product \n⟨\n𝑞\n,\n𝑥\n𝑖\n⟩\n is as similar to the original distance of \n∠\n𝑞\n,\n𝑥\n~\n𝑖\n as possible, instead of picking the closet quantization centroid points.\nComparison of MIPS algorithms, measured in recall@10. (Image source: Google Blog, 2020)\n\nCheck more MIPS algorithms and performance comparison in ann-benchmarks.com.", "segmentation_method": "reviewed_source_semantics", "label": "Component Two: Memory #", "source_line_range": [ 170, 228 ] }, { "id": "body-region-3", "text": "component three tool use tool use is a remarkable and distinguishing characteristic of human beings we create modify and utilize external objects to do things that go beyond our physical and cognitive limits equipping llms with external tools can significantly extend the model capabilities a picture of a sea otter using rock to crack open a seashell while floating in the water while some other animals can use tools the complexity is not comparable with humans image source animals using tools mrkl karpas et al 2022 short for modular reasoning knowledge and language is a neuro symbolic architecture for autonomous agents a mrkl system is proposed to contain a collection of expert modules and the general purpose llm works as a router to route inquiries to the best suitable expert module these modules can be neural e g deep learning models or symbolic e g math calculator currency converter weather api they did an experiment on fine tuning llm to call a calculator using arithmetic as a test case their experiments showed that it was harder to solve verbal math problems than explicitly stated math problems because llms 7b jurassic1 large model failed to extract the right arguments for the basic arithmetic reliably the results highlight when the external symbolic tools can work reliably knowing when to and how to use the tools are crucial determined by the llm capability both talm tool augmented language models parisi et al 2022 and toolformer schick et al 2023 fine tune a lm to learn to use external tool apis the dataset is expanded based on whether a newly added api call annotation can improve the quality of model outputs see more details in the external apis section of prompt engineering chatgpt plugins and openai api function calling are good examples of llms augmented with tool use capability working in practice the collection of tool apis can be provided by other developers as in plugins or self defined as in function calls hugginggpt shen et al 2023 is a framework to use chatgpt as the task planner to select models available in huggingface platform according to the model descriptions and summarize the response based on the execution results illustration of how hugginggpt works image source shen et al 2023 the system comprises of 4 stages 1 task planning llm works as the brain and parses the user requests into multiple tasks there are four attributes associated with each task task type id dependencies and arguments they use few shot examples to guide llm to do task parsing and planning instruction the ai assistant can parse user input to several tasks task task id task id dep dependency task ids args text text image url audio url video url the dep field denotes the id of the previous task which generates a new resource that the current task relies on a special tag task id refers to the generated text image audio and video in the dependency task with id as task id the task must be selected from the following options available task list there is a logical relationship between tasks please note their order if the user input can t be parsed you need to reply empty json here are several cases for your reference demonstrations the chat history is recorded as chat history from this chat history you can find the path of the user mentioned resources for your task planning 2 model selection llm distributes the tasks to expert models where the request is framed as a multiple choice question llm is presented with a list of models to choose from due to the limited context length task type based filtration is needed instruction given the user request and the call command the ai assistant helps the user to select a suitable model from a list of models to process the user request the ai assistant merely outputs the model id of the most appropriate model the output must be in a strict json format id id reason your detail reason for the choice we have a list of models for you to choose from candidate models please select one model from the list 3 task execution expert models execute on the specific tasks and log results instruction with the input and the inference results the ai assistant needs to describe the process and results the previous stages can be formed as user input user input task planning tasks model selection model assignment task execution predictions you must first answer the user s request in a straightforward manner then describe the task process and show your analysis and model inference results to the user in the first person if inference results contain a file path must tell the user the complete file path 4 response generation llm receives the execution results and provides summarized results to users to put hugginggpt into real world usage a couple challenges need to solve 1 efficiency improvement is needed as both llm inference rounds and interactions with other models slow down the process 2 it relies on a long context window to communicate over complicated task content 3 stability improvement of llm outputs and external model services api bank li et al 2023 is a benchmark for evaluating the performance of tool augmented llms it contains 53 commonly used api tools a complete tool augmented llm workflow and 264 annotated dialogues that involve 568 api calls the selection of apis is quite diverse including search engines calculator calendar queries smart home control schedule management health data management account authentication workflow and more because there are a large number of apis llm first has access to api search engine to find the right api to call and then uses the corresponding documentation to make a call pseudo code of how llm makes an api call in api bank image source li et al 2023 in the api bank workflow llms need to make a couple of decisions and at each step we can evaluate how accurate that decision is decisions include whether an api call is needed identify the right api to call if not good enough llms need to iteratively modify the api inputs e g deciding search keywords for search engine api response based on the api results the model can choose to refine and call again if results are not satisfied this benchmark evaluates the agent s tool use capabilities at three levels level 1 evaluates the ability to call the api given an api s description the model needs to determine whether to call a given api call it correctly and respond properly to api returns level 2 examines the ability to retrieve the api the model needs to search for possible apis that may solve the user s requirement and learn how to use them by reading documentation level 3 assesses the ability to plan api beyond retrieve and call given unclear user requests e g schedule group meetings book flight hotel restaurant for a trip the model may have to conduct multiple api calls to solve it", "source_text": "Component Three: Tool Use\n\nTool use is a remarkable and distinguishing characteristic of human beings. We create, modify and utilize external objects to do things that go beyond our physical and cognitive limits. Equipping LLMs with external tools can significantly extend the model capabilities.\n\nA picture of a sea otter using rock to crack open a seashell, while floating in the water. While some other animals can use tools, the complexity is not comparable with humans. (Image source: Animals using tools)\n\nMRKL (Karpas et al. 2022), short for “Modular Reasoning, Knowledge and Language”, is a neuro-symbolic architecture for autonomous agents. A MRKL system is proposed to contain a collection of “expert” modules and the general-purpose LLM works as a router to route inquiries to the best suitable expert module. These modules can be neural (e.g. deep learning models) or symbolic (e.g. math calculator, currency converter, weather API).\n\nThey did an experiment on fine-tuning LLM to call a calculator, using arithmetic as a test case. Their experiments showed that it was harder to solve verbal math problems than explicitly stated math problems because LLMs (7B Jurassic1-large model) failed to extract the right arguments for the basic arithmetic reliably. The results highlight when the external symbolic tools can work reliably, knowing when to and how to use the tools are crucial, determined by the LLM capability.\n\nBoth TALM (Tool Augmented Language Models; Parisi et al. 2022) and Toolformer (Schick et al. 2023) fine-tune a LM to learn to use external tool APIs. The dataset is expanded based on whether a newly added API call annotation can improve the quality of model outputs. See more details in the “External APIs” section of Prompt Engineering.\n\nChatGPT Plugins and OpenAI API function calling are good examples of LLMs augmented with tool use capability working in practice. The collection of tool APIs can be provided by other developers (as in Plugins) or self-defined (as in function calls).\n\nHuggingGPT (Shen et al. 2023) is a framework to use ChatGPT as the task planner to select models available in HuggingFace platform according to the model descriptions and summarize the response based on the execution results.\n\nIllustration of how HuggingGPT works. (Image source: Shen et al. 2023)\n\nThe system comprises of 4 stages:\n\n(1) Task planning: LLM works as the brain and parses the user requests into multiple tasks. There are four attributes associated with each task: task type, ID, dependencies, and arguments. They use few-shot examples to guide LLM to do task parsing and planning.\n\nInstruction:\n\nThe AI assistant can parse user input to several tasks: [{\"task\": task, \"id\", task_id, \"dep\": dependency_task_ids, \"args\": {\"text\": text, \"image\": URL, \"audio\": URL, \"video\": URL}}]. The \"dep\" field denotes the id of the previous task which generates a new resource that the current task relies on. A special tag \"-task_id\" refers to the generated text image, audio and video in the dependency task with id as task_id. The task MUST be selected from the following options: {{ Available Task List }}. There is a logical relationship between tasks, please note their order. If the user input can't be parsed, you need to reply empty JSON. Here are several cases for your reference: {{ Demonstrations }}. The chat history is recorded as {{ Chat History }}. From this chat history, you can find the path of the user-mentioned resources for your task planning.\n\n(2) Model selection: LLM distributes the tasks to expert models, where the request is framed as a multiple-choice question. LLM is presented with a list of models to choose from. Due to the limited context length, task type based filtration is needed.\n\nInstruction:\n\nGiven the user request and the call command, the AI assistant helps the user to select a suitable model from a list of models to process the user request. The AI assistant merely outputs the model id of the most appropriate model. The output must be in a strict JSON format: \"id\": \"id\", \"reason\": \"your detail reason for the choice\". We have a list of models for you to choose from {{ Candidate Models }}. Please select one model from the list.\n\n(3) Task execution: Expert models execute on the specific tasks and log results.\n\nInstruction:\n\nWith the input and the inference results, the AI assistant needs to describe the process and results. The previous stages can be formed as - User Input: {{ User Input }}, Task Planning: {{ Tasks }}, Model Selection: {{ Model Assignment }}, Task Execution: {{ Predictions }}. You must first answer the user's request in a straightforward manner. Then describe the task process and show your analysis and model inference results to the user in the first person. If inference results contain a file path, must tell the user the complete file path.\n\n(4) Response generation: LLM receives the execution results and provides summarized results to users.\n\nTo put HuggingGPT into real world usage, a couple challenges need to solve: (1) Efficiency improvement is needed as both LLM inference rounds and interactions with other models slow down the process; (2) It relies on a long context window to communicate over complicated task content; (3) Stability improvement of LLM outputs and external model services.\n\nAPI-Bank (Li et al. 2023) is a benchmark for evaluating the performance of tool-augmented LLMs. It contains 53 commonly used API tools, a complete tool-augmented LLM workflow, and 264 annotated dialogues that involve 568 API calls. The selection of APIs is quite diverse, including search engines, calculator, calendar queries, smart home control, schedule management, health data management, account authentication workflow and more. Because there are a large number of APIs, LLM first has access to API search engine to find the right API to call and then uses the corresponding documentation to make a call.\n\nPseudo code of how LLM makes an API call in API-Bank. (Image source: Li et al. 2023)\n\nIn the API-Bank workflow, LLMs need to make a couple of decisions and at each step we can evaluate how accurate that decision is. Decisions include:\n\nWhether an API call is needed.\nIdentify the right API to call: if not good enough, LLMs need to iteratively modify the API inputs (e.g. deciding search keywords for Search Engine API).\nResponse based on the API results: the model can choose to refine and call again if results are not satisfied.\n\nThis benchmark evaluates the agent’s tool use capabilities at three levels:\n\nLevel-1 evaluates the ability to call the API. Given an API’s description, the model needs to determine whether to call a given API, call it correctly, and respond properly to API returns.\nLevel-2 examines the ability to retrieve the API. The model needs to search for possible APIs that may solve the user’s requirement and learn how to use them by reading documentation.\nLevel-3 assesses the ability to plan API beyond retrieve and call. Given unclear user requests (e.g. schedule group meetings, book flight/hotel/restaurant for a trip), the model may have to conduct multiple API calls to solve it.", "segmentation_method": "reviewed_source_semantics", "label": "Component Three: Tool Use #", "source_line_range": [ 229, 285 ] }, { "id": "body-region-4", "text": "case studies scientific discovery agent chemcrow bran et al 2023 is a domain specific example in which llm is augmented with 13 expert designed tools to accomplish tasks across organic synthesis drug discovery and materials design the workflow implemented in langchain reflects what was previously described in the react and mrkls and combines cot reasoning with tools relevant to the tasks the llm is provided with a list of tool names descriptions of their utility and details about the expected input output it is then instructed to answer a user given prompt using the tools provided when necessary the instruction suggests the model to follow the react format thought action action input observation one interesting observation is that while the llm based evaluation concluded that gpt 4 and chemcrow perform nearly equivalently human evaluations with experts oriented towards the completion and chemical correctness of the solutions showed that chemcrow outperforms gpt 4 by a large margin this indicates a potential problem with using llm to evaluate its own performance on domains that requires deep expertise the lack of expertise may cause llms not knowing its flaws and thus cannot well judge the correctness of task results boiko et al 2023 also looked into llm empowered agents for scientific discovery to handle autonomous design planning and performance of complex scientific experiments this agent can use tools to browse the internet read documentation execute code call robotics experimentation apis and leverage other llms for example when requested to develop a novel anticancer drug the model came up with the following reasoning steps inquired about current trends in anticancer drug discovery selected a target requested a scaffold targeting these compounds once the compound was identified the model attempted its synthesis they also discussed the risks especially with illicit drugs and bioweapons they developed a test set containing a list of known chemical weapon agents and asked the agent to synthesize them 4 out of 11 requests 36 were accepted to obtain a synthesis solution and the agent attempted to consult documentation to execute the procedure 7 out of 11 were rejected and among these 7 rejected cases 5 happened after a web search while 2 were rejected based on prompt only generative agents simulation generative agents park et al 2023 is super fun experiment where 25 virtual characters each controlled by a llm powered agent are living and interacting in a sandbox environment inspired by the sims generative agents create believable simulacra of human behavior for interactive applications the design of generative agents combines llm with memory planning and reflection mechanisms to enable agents to behave conditioned on past experience as well as to interact with other agents memory stream is a long term memory module external database that records a comprehensive list of agents experience in natural language each element is an observation an event directly provided by the agent inter agent communication can trigger new natural language statements retrieval model surfaces the context to inform the agent s behavior according to relevance recency and importance recency recent events have higher scores importance distinguish mundane from core memories ask lm directly relevance based on how related it is to the current situation query reflection mechanism synthesizes memories into higher level inferences over time and guides the agent s future behavior they are higher level summaries of past events note that this is a bit different from self reflection above prompt lm with 100 most recent observations and to generate 3 most salient high level questions given a set of observations statements then ask lm to answer those questions planning reacting translate the reflections and the environment information into actions planning is essentially in order to optimize believability at the moment vs in time prompt template intro of an agent x here is x s plan today in broad strokes 1 relationships between agents and observations of one agent by another are all taken into consideration for planning and reacting environment information is present in a tree structure the generative agent architecture image source park et al 2023 this fun simulation results in emergent social behavior such as information diffusion relationship memory e g two agents continuing the conversation topic and coordination of social events e g host a party and invite many others proof of concept examples autogpt has drawn a lot of attention into the possibility of setting up autonomous agents with llm as the main controller it has quite a lot of reliability issues given the natural language interface but nevertheless a cool proof of concept demo a lot of code in autogpt is about format parsing here is the system message used by autogpt where are user inputs you are ai name user provided ai bot description your decisions must always be made independently without seeking user assistance play to your strengths as an llm and pursue simple strategies with no legal complications goals 1 user provided goal 1 2 user provided goal 2 3 4 5 constraints 1 4000 word limit for short term memory your short term memory is short so immediately save important information to files 2 if you are unsure how you previously did something or want to recall past events thinking about similar events will help you remember 3 no user assistance 4 exclusively use the commands listed in double quotes e g command name 5 use subprocesses for commands that will not terminate within a few minutes commands 1 google search google args input search 2 browse website browse website args url url question what you want to find on website 3 start gpt agent start agent args name name task short task desc prompt prompt 4 message gpt agent message agent args key key message message 5 list gpt agents list agents args 6 delete gpt agent delete agent args key key 7 clone repository clone repository args repository url url clone path directory 8 write to file write to file args file file text text 9 read file read file args file file 10 append to file append to file args file file text text 11 delete file delete file args file file 12 search files search files args directory directory 13 analyze code analyze code args code full code string 14 get improved code improve code args suggestions list of suggestions code full code string 15 write tests write tests args code full code string focus list of focus areas 16 execute python file execute python file args file file 17 generate image generate image args prompt prompt 18 send tweet send tweet args text text 19 do nothing do nothing args 20 task complete shutdown task complete args reason reason resources 1 internet access for searches and information gathering 2 long term memory management 3 gpt 3 5 powered agents for delegation of simple tasks 4 file output performance evaluation 1 continuously review and analyze your actions to ensure you are performing to the best of your abilities 2 constructively self criticize your big picture behavior constantly 3 reflect on past decisions and strategies to refine your approach 4 every command has a cost so be smart and efficient aim to complete tasks in the least number of steps you should only respond in json format as described below response format thoughts text thought reasoning reasoning plan short bulleted n list that conveys n long term plan criticism constructive self criticism speak thoughts summary to say to user command name command name args arg name value ensure the response can be parsed by python json loads gpt engineer is another project to create a whole repository of code given a task specified in natural language the gpt engineer is instructed to think over a list of smaller components to build and ask for user input to clarify questions as needed here are a sample conversation for task clarification sent to openai chatcompletion endpoint used by gpt engineer the user inputs are wrapped in user input text role system content you will read instructions and not carry them out only seek to clarify them nspecifically you will first summarise a list of super short bullets of areas that need clarification nthen you will pick one clarifying question and wait for an answer from the user n role user content we are writing a super mario game in python mvc components split in separate files keyboard control n role assistant content summary of areas that need clarification n1 specifics of the super mario game e g level design characters gameplay mechanics n2 details about the mvc components e g which components are in each file n3 keyboard control implementation e g which keys to use how to handle input n nclarifying question ncan you provide more details about the super mario game such as level design characters and gameplay mechanics role user content there are 10 levels in total the main character is a plumber named mario who can walk and jump it is a classical platform game just like super mario the main character moves from left to right trying to get to the destination where there are many obstacles and attacks from enemies in the process n nis anything else unclear if yes only answer in the form n remaining unclear areas remaining questions n next question nif everything is sufficiently clear only answer nothing more to clarify role assistant content remaining unclear areas 2 remaining questions ncan you provide more information about how the mvc components are split into separate files role user content make your own assumptions and state them explicitly before starting then after these clarification the agent moved into the code writing mode with a different system message system message you will get instructions for code to write you will write a very long answer make sure that every detail of the architecture is in the end implemented as code make sure that every detail of the architecture is in the end implemented as code think step by step and reason yourself to the right decisions to make sure we get it right you will first lay out the names of the core classes functions methods that will be necessary as well as a quick comment on their purpose then you will output the content of each file including all code each file must strictly follow a markdown code block format where the following tokens must be replaced such that filename is the lowercase file name including the file extension lang is the markup code block language for the code s language and code is the code filename code you will start with the entrypoint file then go to the ones that are imported by that file and so on please note that the code should be fully functional no placeholders follow a language and framework appropriate best practice file naming convention make sure that files contain all imports types etc make sure that code in different files are compatible with each other ensure to implement all code if you are unsure write a plausible implementation include module dependency or package manager dependency definition file before you finish double check that all parts of the architecture is present in the files useful to know you almost always put different classes in different files for python you always create an appropriate requirements txt file for nodejs you always create an appropriate package json file you always add a comment briefly describing the purpose of the function definition you try to add comments explaining very complex bits of logic you always follow the best practices for the requested languages in terms of describing the code written as a defined package project python toolbelt preferences pytest dataclasses conversatin samples role system content you will get instructions for code to write nyou will write a very long answer make sure that every detail of the architecture is in the end implemented as code nmake sure that every detail of the architecture is in the end implemented as code n nthink step by step and reason yourself to the right decisions to make sure we get it right nyou will first lay out the names of the core classes functions methods that will be necessary as well as a quick comment on their purpose n nthen you will output the content of each file including all code neach file must strictly follow a markdown code block format where the following tokens must be replaced such that nfilename is the lowercase file name including the file extension nlang is the markup code block language for the code s language and code is the code n nfilename n lang ncode n n nyou will start with the entrypoint file then go to the ones that are imported by that file and so on nplease note that the code should be fully functional no placeholders n nfollow a language and framework appropriate best practice file naming convention nmake sure that files contain all imports types etc make sure that code in different files are compatible with each other nensure to implement all code if you are unsure write a plausible implementation ninclude module dependency or package manager dependency definition file nbefore you finish double check that all parts of the architecture is present in the files n nuseful to know nyou almost always put different classes in different files nfor python you always create an appropriate requirements txt file nfor nodejs you always create an appropriate package json file nyou always add a comment briefly describing the purpose of the function definition nyou try to add comments explaining very complex bits of logic nyou always follow the best practices for the requested languages in terms of describing the code written as a defined npackage project n n npython toolbelt preferences n pytest n dataclasses n same conversation as earlier ended with make your own assumptions and state them explicitly before starting role assistant content assumptions n1 model the model will contain the game s data such as level information character states and enemy positions n2 view the view will handle the game s visuals including rendering the game objects backgrounds and updating the display n3 controller the controller will manage user input such as keyboard controls and update the model accordingly n nwith these assumptions in mind is there any specific aspect of the keyboard control implementation you would like me to clarify role user content please now remember the steps n nthink step by step and reason yourself to the right decisions to make sure we get it right nfirst lay out the names of the core classes functions methods that will be necessary as well as a quick comment on their purpose n nthen you will output the content of each file including all code neach file must strictly follow a markdown code block format where the following tokens must be replaced such that nfilename is the lowercase file name including the file extension nlang is the markup code block language for the code s language and code is the code n nfilename n lang ncode n n nplease note that the code should be fully functional no placeholders n nyou will start with the entrypoint file then go to the ones that are imported by that file and so on nfollow a language and framework appropriate best practice file naming convention nmake sure that files contain all imports types etc the code should be fully functional make sure that code in different files are compatible with each other nbefore you finish double check that all parts of the architecture is present in the files n", "source_text": "Case Studies\nScientific Discovery Agent\n\nChemCrow (Bran et al. 2023) is a domain-specific example in which LLM is augmented with 13 expert-designed tools to accomplish tasks across organic synthesis, drug discovery, and materials design. The workflow, implemented in LangChain, reflects what was previously described in the ReAct and MRKLs and combines CoT reasoning with tools relevant to the tasks:\n\nThe LLM is provided with a list of tool names, descriptions of their utility, and details about the expected input/output.\nIt is then instructed to answer a user-given prompt using the tools provided when necessary. The instruction suggests the model to follow the ReAct format - Thought, Action, Action Input, Observation.\n\nOne interesting observation is that while the LLM-based evaluation concluded that GPT-4 and ChemCrow perform nearly equivalently, human evaluations with experts oriented towards the completion and chemical correctness of the solutions showed that ChemCrow outperforms GPT-4 by a large margin. This indicates a potential problem with using LLM to evaluate its own performance on domains that requires deep expertise. The lack of expertise may cause LLMs not knowing its flaws and thus cannot well judge the correctness of task results.\n\nBoiko et al. (2023) also looked into LLM-empowered agents for scientific discovery, to handle autonomous design, planning, and performance of complex scientific experiments. This agent can use tools to browse the Internet, read documentation, execute code, call robotics experimentation APIs and leverage other LLMs.\n\nFor example, when requested to \"develop a novel anticancer drug\", the model came up with the following reasoning steps:\n\ninquired about current trends in anticancer drug discovery;\nselected a target;\nrequested a scaffold targeting these compounds;\nOnce the compound was identified, the model attempted its synthesis.\n\nThey also discussed the risks, especially with illicit drugs and bioweapons. They developed a test set containing a list of known chemical weapon agents and asked the agent to synthesize them. 4 out of 11 requests (36%) were accepted to obtain a synthesis solution and the agent attempted to consult documentation to execute the procedure. 7 out of 11 were rejected and among these 7 rejected cases, 5 happened after a Web search while 2 were rejected based on prompt only.\n\nGenerative Agents Simulation\n\nGenerative Agents (Park, et al. 2023) is super fun experiment where 25 virtual characters, each controlled by a LLM-powered agent, are living and interacting in a sandbox environment, inspired by The Sims. Generative agents create believable simulacra of human behavior for interactive applications.\n\nThe design of generative agents combines LLM with memory, planning and reflection mechanisms to enable agents to behave conditioned on past experience, as well as to interact with other agents.\n\nMemory stream: is a long-term memory module (external database) that records a comprehensive list of agents’ experience in natural language.\nEach element is an observation, an event directly provided by the agent. - Inter-agent communication can trigger new natural language statements.\nRetrieval model: surfaces the context to inform the agent’s behavior, according to relevance, recency and importance.\nRecency: recent events have higher scores\nImportance: distinguish mundane from core memories. Ask LM directly.\nRelevance: based on how related it is to the current situation / query.\nReflection mechanism: synthesizes memories into higher level inferences over time and guides the agent’s future behavior. They are higher-level summaries of past events (<- note that this is a bit different from self-reflection above)\nPrompt LM with 100 most recent observations and to generate 3 most salient high-level questions given a set of observations/statements. Then ask LM to answer those questions.\nPlanning & Reacting: translate the reflections and the environment information into actions\nPlanning is essentially in order to optimize believability at the moment vs in time.\nPrompt template: {Intro of an agent X}. Here is X's plan today in broad strokes: 1)\nRelationships between agents and observations of one agent by another are all taken into consideration for planning and reacting.\nEnvironment information is present in a tree structure.\nThe generative agent architecture. (Image source: Park et al. 2023)\n\nThis fun simulation results in emergent social behavior, such as information diffusion, relationship memory (e.g. two agents continuing the conversation topic) and coordination of social events (e.g. host a party and invite many others).\n\nProof-of-Concept Examples\n\nAutoGPT has drawn a lot of attention into the possibility of setting up autonomous agents with LLM as the main controller. It has quite a lot of reliability issues given the natural language interface, but nevertheless a cool proof-of-concept demo. A lot of code in AutoGPT is about format parsing.\n\nHere is the system message used by AutoGPT, where {{...}} are user inputs:\n\nYou are {{ai-name}}, {{user-provided AI bot description}}.\nYour decisions must always be made independently without seeking user assistance. Play to your strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1. {{user-provided goal 1}}\n2. {{user-provided goal 2}}\n3. ...\n4. ...\n5. ...\n\nConstraints:\n1. ~4000 word limit for short term memory. Your short term memory is short, so immediately save important information to files.\n2. If you are unsure how you previously did something or want to recall past events, thinking about similar events will help you remember.\n3. No user assistance\n4. Exclusively use the commands listed in double quotes e.g. \"command name\"\n5. Use subprocesses for commands that will not terminate within a few minutes\n\nCommands:\n1. Google Search: \"google\", args: \"input\": \"\"\n2. Browse Website: \"browse_website\", args: \"url\": \"\", \"question\": \"\"\n3. Start GPT Agent: \"start_agent\", args: \"name\": \"\", \"task\": \"\", \"prompt\": \"\"\n4. Message GPT Agent: \"message_agent\", args: \"key\": \"\", \"message\": \"\"\n5. List GPT Agents: \"list_agents\", args:\n6. Delete GPT Agent: \"delete_agent\", args: \"key\": \"\"\n7. Clone Repository: \"clone_repository\", args: \"repository_url\": \"\", \"clone_path\": \"\"\n8. Write to file: \"write_to_file\", args: \"file\": \"\", \"text\": \"\"\n9. Read file: \"read_file\", args: \"file\": \"\"\n10. Append to file: \"append_to_file\", args: \"file\": \"\", \"text\": \"\"\n11. Delete file: \"delete_file\", args: \"file\": \"\"\n12. Search Files: \"search_files\", args: \"directory\": \"\"\n13. Analyze Code: \"analyze_code\", args: \"code\": \"\"\n14. Get Improved Code: \"improve_code\", args: \"suggestions\": \"\", \"code\": \"\"\n15. Write Tests: \"write_tests\", args: \"code\": \"\", \"focus\": \"\"\n16. Execute Python File: \"execute_python_file\", args: \"file\": \"\"\n17. Generate Image: \"generate_image\", args: \"prompt\": \"\"\n18. Send Tweet: \"send_tweet\", args: \"text\": \"\"\n19. Do Nothing: \"do_nothing\", args:\n20. Task Complete (Shutdown): \"task_complete\", args: \"reason\": \"\"\n\nResources:\n1. Internet access for searches and information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1. Continuously review and analyze your actions to ensure you are performing to the best of your abilities.\n2. Constructively self-criticize your big-picture behavior constantly.\n3. Reflect on past decisions and strategies to refine your approach.\n4. Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps.\n\nYou should only respond in JSON format as described below\nResponse Format:\n{\n \"thoughts\": {\n \"text\": \"thought\",\n \"reasoning\": \"reasoning\",\n \"plan\": \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n \"criticism\": \"constructive self-criticism\",\n \"speak\": \"thoughts summary to say to user\"\n },\n \"command\": {\n \"name\": \"command name\",\n \"args\": {\n \"arg name\": \"value\"\n }\n }\n}\nEnsure the response can be parsed by Python json.loads\n\n\nGPT-Engineer is another project to create a whole repository of code given a task specified in natural language. The GPT-Engineer is instructed to think over a list of smaller components to build and ask for user input to clarify questions as needed.\n\nHere are a sample conversation for task clarification sent to OpenAI ChatCompletion endpoint used by GPT-Engineer. The user inputs are wrapped in {{user input text}}.\n\n[\n {\n \"role\": \"system\",\n \"content\": \"You will read instructions and not carry them out, only seek to clarify them.\\nSpecifically you will first summarise a list of super short bullets of areas that need clarification.\\nThen you will pick one clarifying question, and wait for an answer from the user.\\n\"\n },\n {\n \"role\": \"user\",\n \"content\": \"We are writing {{a Super Mario game in python. MVC components split in separate files. Keyboard control.}}\\n\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Summary of areas that need clarification:\\n1. Specifics of the Super Mario game (e.g. level design, characters, gameplay mechanics)\\n2. Details about the MVC components (e.g. which components are in each file)\\n3. Keyboard control implementation (e.g. which keys to use, how to handle input)\\n\\nClarifying question:\\nCan you provide more details about the Super Mario game, such as level design, characters, and gameplay mechanics?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{There are 10 levels in total. The main character is a plumber named Mario, who can walk and jump. It is a classical platform game just like Super Mario. The main character moves from left to right, trying to get to the destination, where there are many obstacles and attacks from enemies in the process.}}\\n\\nIs anything else unclear? If yes, only answer in the form:\\n{remaining unclear areas} remaining questions.\\n{Next question}\\nIf everything is sufficiently clear, only answer \\\"Nothing more to clarify.\\\".\"\n },\n {\n \"role\": \"assistant\",\n \"content\": \"Remaining unclear areas: 2 remaining questions.\\nCan you provide more information about how the MVC components are split into separate files?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{Make your own assumptions and state them explicitly before starting}}\"\n }\n]\n\n\nThen after these clarification, the agent moved into the code writing mode with a different system message. System message:\n\nYou will get instructions for code to write. You will write a very long answer. Make sure that every detail of the architecture is, in the end, implemented as code. Make sure that every detail of the architecture is, in the end, implemented as code.\n\nThink step by step and reason yourself to the right decisions to make sure we get it right. You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.\n\nThen you will output the content of each file including ALL code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that FILENAME is the lowercase file name including the file extension, LANG is the markup code block language for the code’s language, and CODE is the code:\n\nFILENAME\n\nCODE\n\n\nYou will start with the “entrypoint” file, then go to the ones that are imported by that file, and so on. Please note that the code should be fully functional. No placeholders.\n\nFollow a language and framework appropriate best practice file naming convention. Make sure that files contain all imports, types etc. Make sure that code in different files are compatible with each other. Ensure to implement all code, if you are unsure, write a plausible implementation. Include module dependency or package manager dependency definition file. Before you finish, double check that all parts of the architecture is present in the files.\n\nUseful to know: You almost always put different classes in different files. For Python, you always create an appropriate requirements.txt file. For NodeJS, you always create an appropriate package.json file. You always add a comment briefly describing the purpose of the function definition. You try to add comments explaining very complex bits of logic. You always follow the best practices for the requested languages in terms of describing the code written as a defined package/project.\n\nPython toolbelt preferences:\n\npytest\ndataclasses\n\nConversatin samples:\n\n[\n {\n \"role\": \"system\",\n \"content\": \"You will get instructions for code to write.\\nYou will write a very long answer. Make sure that every detail of the architecture is, in the end, implemented as code.\\nMake sure that every detail of the architecture is, in the end, implemented as code.\\n\\nThink step by step and reason yourself to the right decisions to make sure we get it right.\\nYou will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.\\n\\nThen you will output the content of each file including ALL code.\\nEach file must strictly follow a markdown code block format, where the following tokens must be replaced such that\\nFILENAME is the lowercase file name including the file extension,\\nLANG is the markup code block language for the code's language, and CODE is the code:\\n\\nFILENAME\\n```LANG\\nCODE\\n```\\n\\nYou will start with the \\\"entrypoint\\\" file, then go to the ones that are imported by that file, and so on.\\nPlease note that the code should be fully functional. No placeholders.\\n\\nFollow a language and framework appropriate best practice file naming convention.\\nMake sure that files contain all imports, types etc. Make sure that code in different files are compatible with each other.\\nEnsure to implement all code, if you are unsure, write a plausible implementation.\\nInclude module dependency or package manager dependency definition file.\\nBefore you finish, double check that all parts of the architecture is present in the files.\\n\\nUseful to know:\\nYou almost always put different classes in different files.\\nFor Python, you always create an appropriate requirements.txt file.\\nFor NodeJS, you always create an appropriate package.json file.\\nYou always add a comment briefly describing the purpose of the function definition.\\nYou try to add comments explaining very complex bits of logic.\\nYou always follow the best practices for the requested languages in terms of describing the code written as a defined\\npackage/project.\\n\\n\\nPython toolbelt preferences:\\n- pytest\\n- dataclasses\\n\"\n },\n # … same conversation as earlier, ended with \"Make your own assumptions and state them explicitly before starting\".\n {\n \"role\": \"assistant\",\n \"content\": \"Assumptions:\\n1. Model: The model will contain the game's data, such as level information, character states, and enemy positions.\\n2. View: The view will handle the game's visuals, including rendering the game objects, backgrounds, and updating the display.\\n3. Controller: The controller will manage user input, such as keyboard controls, and update the model accordingly.\\n\\nWith these assumptions in mind, is there any specific aspect of the keyboard control implementation you would like me to clarify?\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Please now remember the steps:\\n\\nThink step by step and reason yourself to the right decisions to make sure we get it right.\\nFirst lay out the names of the core classes, functions, methods that will be necessary, As well as a quick comment on their purpose.\\n\\nThen you will output the content of each file including ALL code.\\nEach file must strictly follow a markdown code block format, where the following tokens must be replaced such that\\nFILENAME is the lowercase file name including the file extension,\\nLANG is the markup code block language for the code's language, and CODE is the code:\\n\\nFILENAME\\n```LANG\\nCODE\\n```\\n\\nPlease note that the code should be fully functional. No placeholders.\\n\\nYou will start with the \\\"entrypoint\\\" file, then go to the ones that are imported by that file, and so on.\\nFollow a language and framework appropriate best practice file naming convention.\\nMake sure that files contain all imports, types etc. The code should be fully functional. Make sure that code in different files are compatible with each other.\\nBefore you finish, double check that all parts of the architecture is present in the files.\\n\"\n }\n]", "segmentation_method": "reviewed_source_semantics", "label": "Case Studies #", "source_line_range": [ 286, 481 ] }, { "id": "body-region-5", "text": "challenges after going through key ideas and demos of building llm centered agents i start to see a couple common limitations finite context length the restricted context capacity limits the inclusion of historical information detailed instructions api call context and responses the design of the system has to work with this limited communication bandwidth while mechanisms like self reflection to learn from past mistakes would benefit a lot from long or infinite context windows although vector stores and retrieval can provide access to a larger knowledge pool their representation power is not as powerful as full attention challenges in long term planning and task decomposition planning over a lengthy history and effectively exploring the solution space remain challenging llms struggle to adjust plans when faced with unexpected errors making them less robust compared to humans who learn from trial and error reliability of natural language interface current agent system relies on natural language as an interface between llms and external components such as memory and tools however the reliability of model outputs is questionable as llms may make formatting errors and occasionally exhibit rebellious behavior e g refuse to follow an instruction consequently much of the agent demo code focuses on parsing model output citation cited as weng lilian jun 2023 llm powered autonomous agents lil log https lilianweng github io posts 2023 06 23 agent or article weng2023agent title llm powered autonomous agents author weng lilian journal lilianweng github io year 2023 month jun url https lilianweng github io posts 2023 06 23 agent references 1 wei et al chain of thought prompting elicits reasoning in large language models neurips 2022 2 yao et al tree of thoughts dliberate problem solving with large language models arxiv preprint arxiv 2305 10601 2023 3 liu et al chain of hindsight aligns language models with feedback arxiv preprint arxiv 2302 02676 2023 4 liu et al llm p empowering large language models with optimal planning proficiency arxiv preprint arxiv 2304 11477 2023 5 yao et al react synergizing reasoning and acting in language models iclr 2023 6 google blog announcing scann efficient vector similarity search july 28 2020 7 https chat openai com share 46ff149e a4c7 4dd7 a800 fc4a642ea389 8 shinn labash reflexion an autonomous agent with dynamic memory and self reflection arxiv preprint arxiv 2303 11366 2023 9 laskin et al in context reinforcement learning with algorithm distillation iclr 2023 10 karpas et al mrkl systems a modular neuro symbolic architecture that combines large language models external knowledge sources and discrete reasoning arxiv preprint arxiv 2205 00445 2022 11 nakano et al webgpt browser assisted question answering with human feedback arxiv preprint arxiv 2112 09332 2021 12 parisi et al talm tool augmented language models 13 schick et al toolformer language models can teach themselves to use tools arxiv preprint arxiv 2302 04761 2023 14 weaviate blog why is vector search so fast sep 13 2022 15 li et al api bank a benchmark for tool augmented llms arxiv preprint arxiv 2304 08244 2023 16 shen et al hugginggpt solving ai tasks with chatgpt and its friends in huggingface arxiv preprint arxiv 2303 17580 2023 17 bran et al chemcrow augmenting large language models with chemistry tools arxiv preprint arxiv 2304 05376 2023 18 boiko et al emergent autonomous scientific research capabilities of large language models arxiv preprint arxiv 2304 05332 2023 19 joon sung park et al generative agents interactive simulacra of human behavior arxiv preprint arxiv 2304 03442 2023 20 autogpt https github com significant gravitas auto gpt 21 gpt engineer https github com antonosika gpt engineer", "source_text": "Challenges\n\nAfter going through key ideas and demos of building LLM-centered agents, I start to see a couple common limitations:\n\nFinite context length: The restricted context capacity limits the inclusion of historical information, detailed instructions, API call context, and responses. The design of the system has to work with this limited communication bandwidth, while mechanisms like self-reflection to learn from past mistakes would benefit a lot from long or infinite context windows. Although vector stores and retrieval can provide access to a larger knowledge pool, their representation power is not as powerful as full attention.\n\nChallenges in long-term planning and task decomposition: Planning over a lengthy history and effectively exploring the solution space remain challenging. LLMs struggle to adjust plans when faced with unexpected errors, making them less robust compared to humans who learn from trial and error.\n\nReliability of natural language interface: Current agent system relies on natural language as an interface between LLMs and external components such as memory and tools. However, the reliability of model outputs is questionable, as LLMs may make formatting errors and occasionally exhibit rebellious behavior (e.g. refuse to follow an instruction). Consequently, much of the agent demo code focuses on parsing model output.\n\nCitation\n\nCited as:\n\nWeng, Lilian. (Jun 2023). “LLM-powered Autonomous Agents”. Lil’Log. https://lilianweng.github.io/posts/2023-06-23-agent/.\n\nOr\n\n@article{weng2023agent,\n title = \"LLM-powered Autonomous Agents\",\n author = \"Weng, Lilian\",\n journal = \"lilianweng.github.io\",\n year = \"2023\",\n month = \"Jun\",\n url = \"https://lilianweng.github.io/posts/2023-06-23-agent/\"\n}\n\nReferences\n\n[1] Wei et al. “Chain of thought prompting elicits reasoning in large language models.” NeurIPS 2022\n\n[2] Yao et al. “Tree of Thoughts: Dliberate Problem Solving with Large Language Models.” arXiv preprint arXiv:2305.10601 (2023).\n\n[3] Liu et al. “Chain of Hindsight Aligns Language Models with Feedback “ arXiv preprint arXiv:2302.02676 (2023).\n\n[4] Liu et al. “LLM+P: Empowering Large Language Models with Optimal Planning Proficiency” arXiv preprint arXiv:2304.11477 (2023).\n\n[5] Yao et al. “ReAct: Synergizing reasoning and acting in language models.” ICLR 2023.\n\n[6] Google Blog. “Announcing ScaNN: Efficient Vector Similarity Search” July 28, 2020.\n\n[7] https://chat.openai.com/share/46ff149e-a4c7-4dd7-a800-fc4a642ea389\n\n[8] Shinn & Labash. “Reflexion: an autonomous agent with dynamic memory and self-reflection” arXiv preprint arXiv:2303.11366 (2023).\n\n[9] Laskin et al. “In-context Reinforcement Learning with Algorithm Distillation” ICLR 2023.\n\n[10] Karpas et al. “MRKL Systems A modular, neuro-symbolic architecture that combines large language models, external knowledge sources and discrete reasoning.” arXiv preprint arXiv:2205.00445 (2022).\n\n[11] Nakano et al. “Webgpt: Browser-assisted question-answering with human feedback.” arXiv preprint arXiv:2112.09332 (2021).\n\n[12] Parisi et al. “TALM: Tool Augmented Language Models”\n\n[13] Schick et al. “Toolformer: Language Models Can Teach Themselves to Use Tools.” arXiv preprint arXiv:2302.04761 (2023).\n\n[14] Weaviate Blog. Why is Vector Search so fast? Sep 13, 2022.\n\n[15] Li et al. “API-Bank: A Benchmark for Tool-Augmented LLMs” arXiv preprint arXiv:2304.08244 (2023).\n\n[16] Shen et al. “HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in HuggingFace” arXiv preprint arXiv:2303.17580 (2023).\n\n[17] Bran et al. “ChemCrow: Augmenting large-language models with chemistry tools.” arXiv preprint arXiv:2304.05376 (2023).\n\n[18] Boiko et al. “Emergent autonomous scientific research capabilities of large language models.” arXiv preprint arXiv:2304.05332 (2023).\n\n[19] Joon Sung Park, et al. “Generative Agents: Interactive Simulacra of Human Behavior.” arXiv preprint arXiv:2304.03442 (2023).\n\n[20] AutoGPT. https://github.com/Significant-Gravitas/Auto-GPT\n\n[21] GPT-Engineer. https://github.com/AntonOsika/gpt-engineer", "segmentation_method": "reviewed_source_semantics", "label": "Challenges — References", "source_line_range": [ 482, 551 ] } ], "ending": { "text": "[21] GPT-Engineer. https://github.com/AntonOsika/gpt-engineer" } } }, { "id": "article-098", "name": "人之所以活着,人之只好活着", "url": "https://book.douban.com/review/1016514/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "人之所以活着,人之只好活着" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "边缘" ] }, { "id": "stable-3", "alternatives": [ "活着" ] }, { "id": "stable-4", "alternatives": [ "登录/注册" ] }, { "id": "stable-5", "alternatives": [ "下载豆瓣客户端" ] }, { "id": "stable-6", "alternatives": [ "豆瓣" ] }, { "id": "stable-7", "alternatives": [ "读书" ] }, { "id": "stable-8", "alternatives": [ "电影" ] }, { "id": "stable-9", "alternatives": [ "音乐" ] }, { "id": "stable-10", "alternatives": [ "播客" ] }, { "id": "stable-11", "alternatives": [ "同城" ] }, { "id": "stable-12", "alternatives": [ "小组" ] }, { "id": "stable-13", "alternatives": [ "阅读" ] }, { "id": "stable-14", "alternatives": [ "FM" ] }, { "id": "stable-15", "alternatives": [ "时间" ] }, { "id": "stable-16", "alternatives": [ "豆品" ] }, { "id": "stable-17", "alternatives": [ "购书单" ] }, { "id": "stable-18", "alternatives": [ "电子图书" ] }, { "id": "stable-19", "alternatives": [ "作者: 余华" ] }, { "id": "stable-20", "alternatives": [ "出版: 南海出版公司" ] }, { "id": "stable-21", "alternatives": [ "定价: 12.00元" ] }, { "id": "stable-22", "alternatives": [ "装帧: 平装" ] }, { "id": "stable-23", "alternatives": [ "页数: 195" ] }, { "id": "stable-24", "alternatives": [ "时间: 1998-5" ] }, { "id": "stable-25", "alternatives": [ "有用" ] }, { "id": "stable-26", "alternatives": [ "没用" ] }, { "id": "stable-27", "alternatives": [ "有关键情节透露" ] }, { "id": "stable-28", "alternatives": [ "全部回复" ] }, { "id": "stable-29", "alternatives": [ "我来回复" ] }, { "id": "stable-30", "alternatives": [ "关于豆瓣" ] }, { "id": "stable-31", "alternatives": [ "在豆瓣工作" ] }, { "id": "stable-32", "alternatives": [ "联系我们" ] }, { "id": "stable-33", "alternatives": [ "法律声明" ] }, { "id": "stable-34", "alternatives": [ "帮助中心" ] }, { "id": "stable-35", "alternatives": [ "移动应用" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete nine-line review including quoted literary passage and final question independently reviewed in full-page screenshot. No collapsed review body. Comments/pagination and rating totals excluded; historical publication metadata retained as ordinary stable sidebar text. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "人之所以活着,人之只好活着" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": "#comments .comment-item, #comments .reply-item", "author_selector": ".comment-item-body > .comment-main > .meta-header > a", "body_selector": ".comment-item-body > .comment-main > .comment-content", "id_attribute": "data-cid", "section_markers": [ "全部回复", "全部回复:" ], "version": 2, "minimum_comments": 40, "text_scope": { "body_end": "态,就像女人召唤她们的儿女,土地召唤着黑夜来临。”\n    这样的文字让我们的心面对物欲的汹涌波涛还能够有片刻的宁静,它让我们感受到的不是消沉而是勃勃的生机,是对生命的召唤。这样的文字,你能不感动吗?", "end_markers": [ "> 我来回复", "关于豆瓣" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-098/comment-qualification-reference-r5.json", "sha256": "c006a822c0f20d37bc34ace683bb9f5ea0412b6ecc102257b0a15e0993dc7ad3", "chars": 10231, "record_count": 56 }, "comment_presence_review": { "status": "visible_text", "basis": "Seven content-unavailable placeholders excluded. A reply quoting an unavailable parent but containing its own real text remains valid. Parent hierarchy is not required.", "observed_record_count": 56, "qualification_only": true } }, "ground_truth_main_content": "   “人之所以活着,人之只好活着”这一句话道出了人活着的无奈和悲哀。关于偶然和必然、命运与意志、生与死、理性与情感、价值与非价值,在这里都变成无意义。人活着就是活着,只是为活着本身而活着,而不是为活着之外的任何事物而活着的。福贵告诉了我们怎样去理解生命的尊严,告诉了我们面对苦难应该怎样坚强地活下去。仅此一点,这部小说就足以在汉语文学里占有一席之地。\n    有人说,小说的故事情节显得过于戏剧化,其实人生如戏,没有什么不可能的。而小说本身就是“讲故事”的艺术,很多时候,我们是不能去分析的。科学与艺术的最大差别就在这里---艺术的不可分析性。我讨厌那些所谓的文学研究者,以这样或那样的方式来肢解一部作品。任何一部能够感动人的作品都是一个活生生的生命,我们只有用心去感受,用心去体验,把整个身心贴近它才可能感觉到它的温度和脉动。\n    福贵的一生,经历了年少阔绰、家道败落、战争的离乱、丧妻失子、以至于连亲人都不再有一个。这些苦难于一个人来说,的确显得有一点戏剧化,但是谁又能否认,一个人尽管不一定会经历这同样的苦难,但是苦难同样会以另一种方式向人袭来呢?所以,很多时候,我们或许不必执着于苦难本身的形式,于人而言,活着的痛苦经常是一样的,尽管苦难的形式会不同,这也是作品之所以能触动你我的地方吧。\n作者这种悲天悯人的博大情怀和作品中透露的那种略带伤感的黑色幽默,其实也让我们明白了应该以怎样的心态来对待生命。\n    “少年去游荡,中年想掘藏,老年做和尚。\n    炊烟在农舍的屋顶袅袅升起,在霞光四射的空中分散后消隐了。\n    女人吆喝孩子的声音此起彼伏,一个男人挑着粪桶从我眼前走过,扁担吱呀吱呀一路响了过去,慢慢地,田野趋向了宁静,四周出现了模糊,霞光逐渐退去。\n    我知道黄昏正在转瞬即逝,黑夜从天而降了。我看到广阔的土地坦露着结实的胸膛,那是召唤的姿态,就像女人召唤她们的儿女,土地召唤着黑夜来临。”\n    这样的文字让我们的心面对物欲的汹涌波涛还能够有片刻的宁静,它让我们感受到的不是消沉而是勃勃的生机,是对生命的召唤。这样的文字,你能不感动吗?", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "人 之 所 以 活 着 人 之 只 好 活 着 这 一 句 话 道 出 了 人 活 着 的 无 奈 和 悲 哀 关 于 偶 然 和 必 然 命 运 与 意 志 生 与 死 理 性 与 情 感 价 值 与 非 价 值 在 这 里 都 变 成 无 意 义 人 活 着 就 是 活 着 只 是 为 活 着 本 身 而 活 着 而 不 是 为 活 着 之 外 的 任 何 事 物 而 活 着 的 福 贵 告 诉 了 我 们 怎 样 去 理 解 生 命 的 尊 严 告 诉 了 我 们 面 对 苦 难 应 该 怎 样 坚 强 地 活 下 去 仅 此 一 点 这 部 小 说 就 足 以 在 汉 语 文 学 里 占 有 一 席 之 地", "source_text": "“人之所以活着,人之只好活着”这一句话道出了人活着的无奈和悲哀。关于偶然和必然、命运与意志、生与死、理性与情感、价值与非价值,在这里都变成无意义。人活着就是活着,只是为活着本身而活着,而不是为活着之外的任何事物而活着的。福贵告诉了我们怎样去理解生命的尊严,告诉了我们面对苦难应该怎样坚强地活下去。仅此一点,这部小说就足以在汉语文学里占有一席之地。", "segmentation_method": "reviewed_source_semantics", "label": "活着的意义与尊严", "source_line_range": [ 1, 1 ] }, { "id": "body-region-2", "text": "有 人 说 小 说 的 故 事 情 节 显 得 过 于 戏 剧 化 其 实 人 生 如 戏 没 有 什 么 不 可 能 的 而 小 说 本 身 就 是 讲 故 事 的 艺 术 很 多 时 候 我 们 是 不 能 去 分 析 的 科 学 与 艺 术 的 最 大 差 别 就 在 这 里 艺 术 的 不 可 分 析 性 我 讨 厌 那 些 所 谓 的 文 学 研 究 者 以 这 样 或 那 样 的 方 式 来 肢 解 一 部 作 品 任 何 一 部 能 够 感 动 人 的 作 品 都 是 一 个 活 生 生 的 生 命 我 们 只 有 用 心 去 感 受 用 心 去 体 验 把 整 个 身 心 贴 近 它 才 可 能 感 觉 到 它 的 温 度 和 脉 动", "source_text": "有人说,小说的故事情节显得过于戏剧化,其实人生如戏,没有什么不可能的。而小说本身就是“讲故事”的艺术,很多时候,我们是不能去分析的。科学与艺术的最大差别就在这里---艺术的不可分析性。我讨厌那些所谓的文学研究者,以这样或那样的方式来肢解一部作品。任何一部能够感动人的作品都是一个活生生的生命,我们只有用心去感受,用心去体验,把整个身心贴近它才可能感觉到它的温度和脉动。", "segmentation_method": "reviewed_source_semantics", "label": "文学作品与感受", "source_line_range": [ 2, 2 ] }, { "id": "body-region-3", "text": "福 贵 的 一 生 经 历 了 年 少 阔 绰 家 道 败 落 战 争 的 离 乱 丧 妻 失 子 以 至 于 连 亲 人 都 不 再 有 一 个 这 些 苦 难 于 一 个 人 来 说 的 确 显 得 有 一 点 戏 剧 化 但 是 谁 又 能 否 认 一 个 人 尽 管 不 一 定 会 经 历 这 同 样 的 苦 难 但 是 苦 难 同 样 会 以 另 一 种 方 式 向 人 袭 来 呢 所 以 很 多 时 候 我 们 或 许 不 必 执 着 于 苦 难 本 身 的 形 式 于 人 而 言 活 着 的 痛 苦 经 常 是 一 样 的 尽 管 苦 难 的 形 式 会 不 同 这 也 是 作 品 之 所 以 能 触 动 你 我 的 地 方 吧 作 者 这 种 悲 天 悯 人 的 博 大 情 怀 和 作 品 中 透 露 的 那 种 略 带 伤 感 的 黑 色 幽 默 其 实 也 让 我 们 明 白 了 应 该 以 怎 样 的 心 态 来 对 待 生 命", "source_text": "福贵的一生,经历了年少阔绰、家道败落、战争的离乱、丧妻失子、以至于连亲人都不再有一个。这些苦难于一个人来说,的确显得有一点戏剧化,但是谁又能否认,一个人尽管不一定会经历这同样的苦难,但是苦难同样会以另一种方式向人袭来呢?所以,很多时候,我们或许不必执着于苦难本身的形式,于人而言,活着的痛苦经常是一样的,尽管苦难的形式会不同,这也是作品之所以能触动你我的地方吧。\n作者这种悲天悯人的博大情怀和作品中透露的那种略带伤感的黑色幽默,其实也让我们明白了应该以怎样的心态来对待生命。", "segmentation_method": "reviewed_source_semantics", "label": "苦难与生命态度", "source_line_range": [ 3, 4 ] }, { "id": "body-region-4", "text": "少 年 去 游 荡 中 年 想 掘 藏 老 年 做 和 尚 炊 烟 在 农 舍 的 屋 顶 袅 袅 升 起 在 霞 光 四 射 的 空 中 分 散 后 消 隐 了 女 人 吆 喝 孩 子 的 声 音 此 起 彼 伏 一 个 男 人 挑 着 粪 桶 从 我 眼 前 走 过 扁 担 吱 呀 吱 呀 一 路 响 了 过 去 慢 慢 地 田 野 趋 向 了 宁 静 四 周 出 现 了 模 糊 霞 光 逐 渐 退 去 我 知 道 黄 昏 正 在 转 瞬 即 逝 黑 夜 从 天 而 降 了 我 看 到 广 阔 的 土 地 坦 露 着 结 实 的 胸 膛 那 是 召 唤 的 姿 态 就 像 女 人 召 唤 她 们 的 儿 女 土 地 召 唤 着 黑 夜 来 临", "source_text": "“少年去游荡,中年想掘藏,老年做和尚。\n    炊烟在农舍的屋顶袅袅升起,在霞光四射的空中分散后消隐了。\n    女人吆喝孩子的声音此起彼伏,一个男人挑着粪桶从我眼前走过,扁担吱呀吱呀一路响了过去,慢慢地,田野趋向了宁静,四周出现了模糊,霞光逐渐退去。\n    我知道黄昏正在转瞬即逝,黑夜从天而降了。我看到广阔的土地坦露着结实的胸膛,那是召唤的姿态,就像女人召唤她们的儿女,土地召唤着黑夜来临。”", "segmentation_method": "reviewed_source_semantics", "label": "小说原文引文", "source_line_range": [ 5, 8 ] }, { "id": "body-region-5", "text": "这 样 的 文 字 让 我 们 的 心 面 对 物 欲 的 汹 涌 波 涛 还 能 够 有 片 刻 的 宁 静 它 让 我 们 感 受 到 的 不 是 消 沉 而 是 勃 勃 的 生 机 是 对 生 命 的 召 唤 这 样 的 文 字 你 能 不 感 动 吗", "source_text": "这样的文字让我们的心面对物欲的汹涌波涛还能够有片刻的宁静,它让我们感受到的不是消沉而是勃勃的生机,是对生命的召唤。这样的文字,你能不感动吗?", "segmentation_method": "reviewed_source_semantics", "label": "结语:文字与生命力", "source_line_range": [ 9, 9 ] } ], "ending": { "text": "态,就像女人召唤她们的儿女,土地召唤着黑夜来临。”\n    这样的文字让我们的心面对物欲的汹涌波涛还能够有片刻的宁静,它让我们感受到的不是消沉而是勃勃的生机,是对生命的召唤。这样的文字,你能不感动吗?" } } }, { "id": "article-099", "name": "Announcing English Wikipedia’s most popular articles of 2024", "url": "https://wikimediafoundation.org/news/2024/12/03/announcing-english-wikipedias-most-popular-articles-of-2024/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Announcing\\ English\\ Wikipedia’s\\ most\\ popular\\ articles\\ of\\ 2024" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "Wikimedia Foundation" ] }, { "id": "stable-3", "alternatives": [ "Politics, sports, and movies lead the 25 most-read articles." ] }, { "id": "stable-4", "alternatives": [ "Who we are" ] }, { "id": "stable-5", "alternatives": [ "What we do" ] }, { "id": "stable-6", "alternatives": [ "What you can do" ] }, { "id": "stable-7", "alternatives": [ "News" ] }, { "id": "stable-8", "alternatives": [ "Home" ] }, { "id": "stable-9", "alternatives": [ "Share" ] }, { "id": "stable-10", "alternatives": [ "Donate now" ] }, { "id": "stable-11", "alternatives": [ "Help us unlock the world’s knowledge." ] }, { "id": "stable-12", "alternatives": [ "Contact us" ] }, { "id": "stable-13", "alternatives": [ "Follow" ] }, { "id": "stable-14", "alternatives": [ "Photo credits" ] }, { "id": "stable-15", "alternatives": [ "Download the Wikipedia app" ] }, { "id": "stable-16", "alternatives": [ "Frequently asked questions" ] }, { "id": "stable-17", "alternatives": [ "Donate" ] }, { "id": "stable-18", "alternatives": [ "Careers" ] }, { "id": "stable-19", "alternatives": [ "Contact" ] }, { "id": "stable-20", "alternatives": [ "Press" ] }, { "id": "stable-21", "alternatives": [ "Research" ] }, { "id": "stable-22", "alternatives": [ "Wikipedia Library" ] }, { "id": "stable-23", "alternatives": [ "Wikipedia Store" ] }, { "id": "stable-24", "alternatives": [ "Terms of use" ] }, { "id": "stable-25", "alternatives": [ "Privacy policy" ] }, { "id": "stable-26", "alternatives": [ "Disclaimers" ] }, { "id": "stable-27", "alternatives": [ "Accessibility statement" ] }, { "id": "stable-28", "alternatives": [ "Cookies statement" ] }, { "id": "stable-29", "alternatives": [ "Creative Commons Attribution-ShareAlike 4.0 International license" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete fixed 2024 retrospective including category lists, all 25 historical pageview totals, closing explanation and appendix methodology reviewed in full-page screenshot. Hero deck caption required separately; reused-image credits are separate from authored body. No live-rank feed frozen. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Announcing English Wikipedia’s most popular articles of 2024" ], "html_selector": "h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-099/comment-qualification-reference-r5.json", "sha256": "e0c2143af892df96e8f2bb05e78e85ef21e35095df0c319a7ae9fe72cc7f48f2", "chars": 838, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "When people want to learn about our world—the good, bad, weird, and wild alike—they turn to Wikipedia.\n\nWikipedia is the largest knowledge resource ever assembled in the history of the world. Its content is a reflection of all the people who live on our planet—its story is your story, your interests, your questions, and your curiosity.\n\nThat’s why people spent an estimated 2.9 billion hours—over 331,000 years!—reading English Wikipedia in 2024, according to data from the Wikimedia Foundation, the non-profit that operates the website and its sister projects. During those long hours, English Wikipedia’s volunteer editors continued updating the site: about 4 billion bytes of information were added this year via over 37 million edits.\n\nBut some topics on Wikipedia fascinated you all more than most. These are English Wikipedia’s 25 most popular articles of 2024. You can also check out our dedicated 2024 Year in Review webpage.\n\n#1: Deaths in 2024\n#2: 2024 United States presidential election\n#3: Kamala Harris\n#4: Donald Trump\n#5: Lyle and Erik Menendez\n\nThe most popular article of 2024 belongs to a topic that has been at the top of Wikipedia’s most-read articles five times since we began sharing these lists in 2015: “Deaths in 2024”. In fact, in that time period, it has never been lower than third place. \n\nWikipedia’s volunteer editors update this article when they find published obituaries that come out after the deaths of notable individuals—specifically, “notable” according to Wikipedia’s definition of the word. With eight billion people in the world, there are a large number of notable deaths to update the page with each day.1\n\nScroll down to learn more about the other top articles, and you can find the full list featured at the bottom.\n\n1 While Wikipedia’s strict privacy policy means that we don’t have the number of repeat visitors to the “Deaths in 2024” page, our assumption is that a good portion of these views are regular and returning readers that come to read those updates. At the end of each month, Wikipedia’s volunteers split the article into smaller month-by-month lists, which keeps its length to a readable size. As of publishing time, the page covers December 2024—but if you’re reading it in January 2025, the page will be redirected to Wikipedia’s “Lists of deaths by year.”\n\n#2: 2024 United States presidential election\n#3: Kamala Harris\n#4: Donald Trump\n#7: JD Vance\n#9: Project 2025\n#11: Elon Musk\n#12: 2024 Indian general election\n#14: 2020 United States presidential election\n#18: Joe Biden\n#24: Robert F. Kennedy Jr.\n\nComprising 10 of the top 25 articles, the primary theme of this year’s most-popular Wikipedia articles is politics in the US and India. Views from these two countries made up nearly half of English Wikipedia’s total pageviews this year. \n\nIn the US, the federal election was held early last month. The candidates included the Republican Party’s Donald Trump and JD Vance for president and vice president, respectively, and the Democratic Party’s Kamala Harris and Tim Walz. Three of the four appear on this list.\n\nData from the Wikimedia Foundation showed a surge of views going to articles about US politics around Election Day (5 November): about 4.2 million viewed the 2024 presidential election article on that specific day, and the 2020 presidential election article more than doubled its views in November.\n\nMeanwhile, India’s general election was held from April to June. Narendra Modi was reelected as prime minister for a third term. Wikipedia’s article about the election is the work of nearly 900 individual volunteers making over 6,700 edits. It saw a peak of 1.2 million views on 4 June, the day the results were announced, as people rushed to look up who had won.\n\n#5: Lyle and Erik Menendez\n#8: Deadpool & Wolverine\n#13: Taylor Swift\n#19: Kalki 2898 AD\n#22: Pushpa 2: The Rule\n#23: Griselda Blanco\n#25: Dune: Part Two\n\nPeople love to use Wikipedia to search for background information of the film and television that has either just been released or that they are consuming at the time. This behavior even has a name: the second screen.\n\nThis effect is most obvious when it involves real-life topics depicted on TV, and 2024 is no different. Over 26 million views came to Wikipedia’s article on Lyle and Erik Menendez, two brothers who were convicted of the 1989 murders of their parents. Their story was the subject of a nine-episode crime drama series and an associated documentary film released on Netflix. Griselda Blanco, a Colombian drug lord with a prominent role in Miami’s 1980s drug war, also found a place on the list. Her life was spotlighted in a well-reviewed Netflix miniseries this year, and views to her article peaked to over one million shortly after its release.\n\nOver in Hollywood, this year’s star is Deadpool & Wolverine, the comedy-action flick starring Ryan Reynolds and Hugh Jackman. The film appears to have connected strongly with audiences, particularly for its heavy use of nostalgia inspired by past superhero films and comic books. It would not surprise us if part of this Wikipedia article’s popularity came from people looking up actor and character names for Deadpool & Wolverine‘s flood of resurrected characters and cameo appearances. \n\nIn pop culture, singer-songwriter Taylor Swift is #13 on the list; her Eras Tour has its 149th and final show on 8 December. The tour is the highest-grossing of all time and has had cultural, economic and sociopolitical impacts on many of the countries it has journeyed to. Also appearing on the list is Kalki 2898 AD, the first installment of a new Bollywood cinematic universe that is also the most expensive Indian film ever made; and Dune: Part Two, the conclusion of Denis Villeneuve’s film adaptation of an acclaimed science-fiction novel.\n\nEditor’s note: Pushpa 2: The Rule, another Bollywood film, vaulted into the list when we updated it for the final time after the end of the year. It was released on 5 December.\n\n#6: Indian Premier League\n#16: 2024 Summer Olympics\n#17: UEFA Euro 2024\n#20: Cristiano Ronaldo\n\nCricket and football—or “soccer” for the US-based folks reading this—fill out most of the sporting articles in this year’s top 25. \n\nIn cricket, we are looking at the Indian Premier League. The article received the majority of its views during the 2024 season, which concluded with the Kolkata Knight Riders winning their third title in front of a crowd of 38,000 people. Cricket articles about the Premier League appeared on the list of most-popular Wikipedia articles for the first time last year.\n\nOn the football (soccer) side of things, megastar Cristiano Ronaldo makes his fifth appearance in the top 25. Competitor Lionel Messi would have appeared only if we extended this list to 48 entries.\n\nThe famed 2024 UEFA European Football Championship, better known as UEFA Euro 2024, also appears after a final that saw Spain fend off England. The victory gave Spain its fourth-ever European Championship, making it the most successful team of all time in that tournament. This article is #17 across the globe this year, but in the UK alone it features in the top five.\n\nFinally, the quadrennial Summer Olympics were held in Paris this year. The sporting tournament featured nearly 10,000 athletes from 204 nations, and their competitions were broadcast around the world. Gymnast Simone Biles was the most-read-about individual Olympic athlete on Wikipedia with an article that garnered over 10 million views.\n\nThe full top 25\n\nFor a more in-depth look across a planet’s worth of Wikipedia reading over 2024, please see our dedicated webpage.\n\nDeaths in 2024, 49,937,590 pageviews\n2024 United States presidential election, 31,017,620\nKamala Harris, 29,477,367\nDonald Trump, 27,503,458\nLyle and Erik Menendez, 27,015,032\nIndian Premier League, 24,801,366\nJD Vance, 23,985,531\nDeadpool & Wolverine, 22,388,922\nProject 2025, 20,215,406\nChatGPT, 18,869,283\nElon Musk, 18,719,390\n2024 Indian general election, 18,499,431\nTaylor Swift, 18,338,133\n2020 United States presidential election, 17,413,241\nUnited States, 16,497,850\n2024 Summer Olympics, 16,258,961\nUEFA Euro 2024, 15,817,710\nJoe Biden, 15,467,504\nKalki 2898 AD, 15,082,514\nCristiano Ronaldo, 15,073,701\nSean Combs, 14,146,031\nPushpa 2: The Rule, 13,742,110\nGriselda Blanco, 13,675,099\nRobert F. Kennedy Jr., 13,390,576\nDune: Part Two, 13,311,020\n\n\nWikipedia allows anyone who wants to learn about the world to consult a free online encyclopedia built from reliable sources—news, research, books—and presented from a neutral point of view. Every Wikipedia article is created, curated, and maintained by a global community of nearly 260,000 volunteers—people just like you. It is their work and time that has made Wikipedia into the reliable, trusted resource we all rely on.\n\nMoreover, Wikipedia is the only top global website run by a nonprofit, the Wikimedia Foundation. It is primarily funded by millions of readers, which supports its independent model. Wikipedia content embraces standards of verifiability, neutrality and transparency. Its mission is to sustain free knowledge on Wikipedia and other Wikimedia projects, ensuring these resources remain accessible and valuable for billions of people around the world.\n\nIf you’re curious to learn more about how Wikipedia works, check out the video below.\n\nWritten by Ed Erhart, Communications Specialist at the Wikimedia Foundation.\n\nAppendix\nThis list was originally published using English Wikipedia data pulled by the Wikimedia Foundation on 22 November 2024. We updated the list on 15 January 2025 to add data from the remaining days of the year. One new article entered the list (Pushpa 2: The Rule), and one article was removed (Liam Payne, now at #26) All of the pageviews include direct and indirect navigations to the pages in question.\nThis list has been screened for false positives with methods including:\nCross-referencing the pageviews against the percentage of views they received from desktop devices, as extreme values of less than 2% or more than 80% correlates strongly with spam, botnets, or other concerns. This affected articles like Cleopatra, a long-time false positive that @depthsofwiki reported is a default voice search on Google devices; XXXTentacion; and .xxx.\nLooking at the number of pageviews that did not have a referrer and removing articles with extremely high values. This impacted a number of articles about large websites, such as Facebook. We suspect that a significant number of the pageviews without referrers are mistakes that occur when viewers are trying to access those websites.\nPrevious lists of most-popular English Wikipedia articles are available for 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, and 2015.\nShare\nRead more:\nOur projects", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 3, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "when people want to learn about our world the good bad weird and wild alike they turn to wikipedia wikipedia is the largest knowledge resource ever assembled in the history of the world its content is a reflection of all the people who live on our planet its story is your story your interests your questions and your curiosity that s why people spent an estimated 2 9 billion hours over 331 000 years reading english wikipedia in 2024 according to data from the wikimedia foundation the non profit that operates the website and its sister projects during those long hours english wikipedia s volunteer editors continued updating the site about 4 billion bytes of information were added this year via over 37 million edits but some topics on wikipedia fascinated you all more than most these are english wikipedia s 25 most popular articles of 2024 you can also check out our dedicated 2024 year in review webpage 1 deaths in 2024 2 2024 united states presidential election 3 kamala harris 4 donald trump 5 lyle and erik menendez the most popular article of 2024 belongs to a topic that has been at the top of wikipedia s most read articles five times since we began sharing these lists in 2015 deaths in 2024 in fact in that time period it has never been lower than third place wikipedia s volunteer editors update this article when they find published obituaries that come out after the deaths of notable individuals specifically notable according to wikipedia s definition of the word with eight billion people in the world there are a large number of notable deaths to update the page with each day 1 scroll down to learn more about the other top articles and you can find the full list featured at the bottom 1 while wikipedia s strict privacy policy means that we don t have the number of repeat visitors to the deaths in 2024 page our assumption is that a good portion of these views are regular and returning readers that come to read those updates at the end of each month wikipedia s volunteers split the article into smaller month by month lists which keeps its length to a readable size as of publishing time the page covers december 2024 but if you re reading it in january 2025 the page will be redirected to wikipedia s lists of deaths by year 2 2024 united states presidential election 3 kamala harris 4 donald trump 7 jd vance 9 project 2025 11 elon musk 12 2024 indian general election 14 2020 united states presidential election 18 joe biden 24 robert f kennedy jr comprising 10 of the top 25 articles the primary theme of this year s most popular wikipedia articles is politics in the us and india views from these two countries made up nearly half of english wikipedia s total pageviews this year in the us the federal election was held early last month the candidates included the republican party s donald trump and jd vance for president and vice president respectively and the democratic party s kamala harris and tim walz three of the four appear on this list data from the wikimedia foundation showed a surge of views going to articles about us politics around election day 5 november about 4 2 million viewed the 2024 presidential election article on that specific day and the 2020 presidential election article more than doubled its views in november meanwhile india s general election was held from april to june narendra modi was reelected as prime minister for a third term wikipedia s article about the election is the work of nearly 900 individual volunteers making over 6 700 edits it saw a peak of 1 2 million views on 4 june the day the results were announced as people rushed to look up who had won 5 lyle and erik menendez 8 deadpool wolverine 13 taylor swift 19 kalki 2898 ad 22 pushpa 2 the rule 23 griselda blanco 25 dune part two people love to use wikipedia to search for background information of the film and television that has either just been released or that they are consuming at the time this behavior even has a name the second screen this effect is most obvious when it involves real life topics depicted on tv and 2024 is no different over 26 million views came to wikipedia s article on lyle and erik menendez two brothers who were convicted of the 1989 murders of their parents their story was the subject of a nine episode crime drama series and an associated documentary film released on netflix griselda blanco a colombian drug lord with a prominent role in miami s 1980s drug war also found a place on the list her life was spotlighted in a well reviewed netflix miniseries this year and views to her article peaked to over one million shortly after its release over in hollywood this year s star is deadpool wolverine the comedy action flick starring ryan reynolds and hugh jackman the film appears to have connected strongly with audiences particularly for its heavy use of nostalgia inspired by past superhero films and comic books it would not surprise us if part of this wikipedia article s popularity came from people looking up actor and character names for deadpool wolverine s flood of resurrected characters and cameo appearances in pop culture singer songwriter taylor swift is 13 on the list her eras tour has its 149th and final show on 8 december the tour is the highest grossing of all time and has had cultural economic and sociopolitical impacts on many of the countries it has journeyed to also appearing on the list is kalki 2898 ad the first installment of a new bollywood cinematic universe that is also the most expensive indian film ever made and dune part two the conclusion of denis villeneuve s film adaptation of an acclaimed science fiction novel editor s note pushpa 2 the rule another bollywood film vaulted into the list when we updated it for the final time after the end of the year it was released on 5 december 6 indian premier league 16 2024 summer olympics 17 uefa euro 2024 20 cristiano ronaldo cricket and football or soccer for the us based folks reading this fill out most of the sporting articles in this year s top 25 in cricket we are looking at the indian premier league the article received the majority of its views during the 2024 season which concluded with the kolkata knight riders winning their third title in front of a crowd of 38 000 people cricket articles about the premier league appeared on the list of most popular wikipedia articles for the first time last year on the football soccer side of things megastar cristiano ronaldo makes his fifth appearance in the top 25 competitor lionel messi would have appeared only if we extended this list to 48 entries the famed 2024 uefa european football championship better known as uefa euro 2024 also appears after a final that saw spain fend off england the victory gave spain its fourth ever european championship making it the most successful team of all time in that tournament this article is 17 across the globe this year but in the uk alone it features in the top five finally the quadrennial summer olympics were held in paris this year the sporting tournament featured nearly 10 000 athletes from 204 nations and their competitions were broadcast around the world gymnast simone biles was the most read about individual olympic athlete on wikipedia with an article that garnered over 10 million views", "source_text": "When people want to learn about our world—the good, bad, weird, and wild alike—they turn to Wikipedia.\n\nWikipedia is the largest knowledge resource ever assembled in the history of the world. Its content is a reflection of all the people who live on our planet—its story is your story, your interests, your questions, and your curiosity.\n\nThat’s why people spent an estimated 2.9 billion hours—over 331,000 years!—reading English Wikipedia in 2024, according to data from the Wikimedia Foundation, the non-profit that operates the website and its sister projects. During those long hours, English Wikipedia’s volunteer editors continued updating the site: about 4 billion bytes of information were added this year via over 37 million edits.\n\nBut some topics on Wikipedia fascinated you all more than most. These are English Wikipedia’s 25 most popular articles of 2024. You can also check out our dedicated 2024 Year in Review webpage.\n\n#1: Deaths in 2024\n#2: 2024 United States presidential election\n#3: Kamala Harris\n#4: Donald Trump\n#5: Lyle and Erik Menendez\n\nThe most popular article of 2024 belongs to a topic that has been at the top of Wikipedia’s most-read articles five times since we began sharing these lists in 2015: “Deaths in 2024”. In fact, in that time period, it has never been lower than third place. \n\nWikipedia’s volunteer editors update this article when they find published obituaries that come out after the deaths of notable individuals—specifically, “notable” according to Wikipedia’s definition of the word. With eight billion people in the world, there are a large number of notable deaths to update the page with each day.1\n\nScroll down to learn more about the other top articles, and you can find the full list featured at the bottom.\n\n1 While Wikipedia’s strict privacy policy means that we don’t have the number of repeat visitors to the “Deaths in 2024” page, our assumption is that a good portion of these views are regular and returning readers that come to read those updates. At the end of each month, Wikipedia’s volunteers split the article into smaller month-by-month lists, which keeps its length to a readable size. As of publishing time, the page covers December 2024—but if you’re reading it in January 2025, the page will be redirected to Wikipedia’s “Lists of deaths by year.”\n\n#2: 2024 United States presidential election\n#3: Kamala Harris\n#4: Donald Trump\n#7: JD Vance\n#9: Project 2025\n#11: Elon Musk\n#12: 2024 Indian general election\n#14: 2020 United States presidential election\n#18: Joe Biden\n#24: Robert F. Kennedy Jr.\n\nComprising 10 of the top 25 articles, the primary theme of this year’s most-popular Wikipedia articles is politics in the US and India. Views from these two countries made up nearly half of English Wikipedia’s total pageviews this year. \n\nIn the US, the federal election was held early last month. The candidates included the Republican Party’s Donald Trump and JD Vance for president and vice president, respectively, and the Democratic Party’s Kamala Harris and Tim Walz. Three of the four appear on this list.\n\nData from the Wikimedia Foundation showed a surge of views going to articles about US politics around Election Day (5 November): about 4.2 million viewed the 2024 presidential election article on that specific day, and the 2020 presidential election article more than doubled its views in November.\n\nMeanwhile, India’s general election was held from April to June. Narendra Modi was reelected as prime minister for a third term. Wikipedia’s article about the election is the work of nearly 900 individual volunteers making over 6,700 edits. It saw a peak of 1.2 million views on 4 June, the day the results were announced, as people rushed to look up who had won.\n\n#5: Lyle and Erik Menendez\n#8: Deadpool & Wolverine\n#13: Taylor Swift\n#19: Kalki 2898 AD\n#22: Pushpa 2: The Rule\n#23: Griselda Blanco\n#25: Dune: Part Two\n\nPeople love to use Wikipedia to search for background information of the film and television that has either just been released or that they are consuming at the time. This behavior even has a name: the second screen.\n\nThis effect is most obvious when it involves real-life topics depicted on TV, and 2024 is no different. Over 26 million views came to Wikipedia’s article on Lyle and Erik Menendez, two brothers who were convicted of the 1989 murders of their parents. Their story was the subject of a nine-episode crime drama series and an associated documentary film released on Netflix. Griselda Blanco, a Colombian drug lord with a prominent role in Miami’s 1980s drug war, also found a place on the list. Her life was spotlighted in a well-reviewed Netflix miniseries this year, and views to her article peaked to over one million shortly after its release.\n\nOver in Hollywood, this year’s star is Deadpool & Wolverine, the comedy-action flick starring Ryan Reynolds and Hugh Jackman. The film appears to have connected strongly with audiences, particularly for its heavy use of nostalgia inspired by past superhero films and comic books. It would not surprise us if part of this Wikipedia article’s popularity came from people looking up actor and character names for Deadpool & Wolverine‘s flood of resurrected characters and cameo appearances. \n\nIn pop culture, singer-songwriter Taylor Swift is #13 on the list; her Eras Tour has its 149th and final show on 8 December. The tour is the highest-grossing of all time and has had cultural, economic and sociopolitical impacts on many of the countries it has journeyed to. Also appearing on the list is Kalki 2898 AD, the first installment of a new Bollywood cinematic universe that is also the most expensive Indian film ever made; and Dune: Part Two, the conclusion of Denis Villeneuve’s film adaptation of an acclaimed science-fiction novel.\n\nEditor’s note: Pushpa 2: The Rule, another Bollywood film, vaulted into the list when we updated it for the final time after the end of the year. It was released on 5 December.\n\n#6: Indian Premier League\n#16: 2024 Summer Olympics\n#17: UEFA Euro 2024\n#20: Cristiano Ronaldo\n\nCricket and football—or “soccer” for the US-based folks reading this—fill out most of the sporting articles in this year’s top 25. \n\nIn cricket, we are looking at the Indian Premier League. The article received the majority of its views during the 2024 season, which concluded with the Kolkata Knight Riders winning their third title in front of a crowd of 38,000 people. Cricket articles about the Premier League appeared on the list of most-popular Wikipedia articles for the first time last year.\n\nOn the football (soccer) side of things, megastar Cristiano Ronaldo makes his fifth appearance in the top 25. Competitor Lionel Messi would have appeared only if we extended this list to 48 entries.\n\nThe famed 2024 UEFA European Football Championship, better known as UEFA Euro 2024, also appears after a final that saw Spain fend off England. The victory gave Spain its fourth-ever European Championship, making it the most successful team of all time in that tournament. This article is #17 across the globe this year, but in the UK alone it features in the top five.\n\nFinally, the quadrennial Summer Olympics were held in Paris this year. The sporting tournament featured nearly 10,000 athletes from 204 nations, and their competitions were broadcast around the world. Gymnast Simone Biles was the most-read-about individual Olympic athlete on Wikipedia with an article that garnered over 10 million views.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:When people want to learn about our world—the good, bad, wei", "source_line_range": [ 1, 74 ] }, { "id": "body-region-2", "text": "the full top 25 for a more in depth look across a planet s worth of wikipedia reading over 2024 please see our dedicated webpage deaths in 2024 49 937 590 pageviews 2024 united states presidential election 31 017 620 kamala harris 29 477 367 donald trump 27 503 458 lyle and erik menendez 27 015 032 indian premier league 24 801 366 jd vance 23 985 531 deadpool wolverine 22 388 922 project 2025 20 215 406 chatgpt 18 869 283 elon musk 18 719 390 2024 indian general election 18 499 431 taylor swift 18 338 133 2020 united states presidential election 17 413 241 united states 16 497 850 2024 summer olympics 16 258 961 uefa euro 2024 15 817 710 joe biden 15 467 504 kalki 2898 ad 15 082 514 cristiano ronaldo 15 073 701 sean combs 14 146 031 pushpa 2 the rule 13 742 110 griselda blanco 13 675 099 robert f kennedy jr 13 390 576 dune part two 13 311 020 wikipedia allows anyone who wants to learn about the world to consult a free online encyclopedia built from reliable sources news research books and presented from a neutral point of view every wikipedia article is created curated and maintained by a global community of nearly 260 000 volunteers people just like you it is their work and time that has made wikipedia into the reliable trusted resource we all rely on moreover wikipedia is the only top global website run by a nonprofit the wikimedia foundation it is primarily funded by millions of readers which supports its independent model wikipedia content embraces standards of verifiability neutrality and transparency its mission is to sustain free knowledge on wikipedia and other wikimedia projects ensuring these resources remain accessible and valuable for billions of people around the world if you re curious to learn more about how wikipedia works check out the video below written by ed erhart communications specialist at the wikimedia foundation", "source_text": "The full top 25\n\nFor a more in-depth look across a planet’s worth of Wikipedia reading over 2024, please see our dedicated webpage.\n\nDeaths in 2024, 49,937,590 pageviews\n2024 United States presidential election, 31,017,620\nKamala Harris, 29,477,367\nDonald Trump, 27,503,458\nLyle and Erik Menendez, 27,015,032\nIndian Premier League, 24,801,366\nJD Vance, 23,985,531\nDeadpool & Wolverine, 22,388,922\nProject 2025, 20,215,406\nChatGPT, 18,869,283\nElon Musk, 18,719,390\n2024 Indian general election, 18,499,431\nTaylor Swift, 18,338,133\n2020 United States presidential election, 17,413,241\nUnited States, 16,497,850\n2024 Summer Olympics, 16,258,961\nUEFA Euro 2024, 15,817,710\nJoe Biden, 15,467,504\nKalki 2898 AD, 15,082,514\nCristiano Ronaldo, 15,073,701\nSean Combs, 14,146,031\nPushpa 2: The Rule, 13,742,110\nGriselda Blanco, 13,675,099\nRobert F. Kennedy Jr., 13,390,576\nDune: Part Two, 13,311,020\n\n\nWikipedia allows anyone who wants to learn about the world to consult a free online encyclopedia built from reliable sources—news, research, books—and presented from a neutral point of view. Every Wikipedia article is created, curated, and maintained by a global community of nearly 260,000 volunteers—people just like you. It is their work and time that has made Wikipedia into the reliable, trusted resource we all rely on.\n\nMoreover, Wikipedia is the only top global website run by a nonprofit, the Wikimedia Foundation. It is primarily funded by millions of readers, which supports its independent model. Wikipedia content embraces standards of verifiability, neutrality and transparency. Its mission is to sustain free knowledge on Wikipedia and other Wikimedia projects, ensuring these resources remain accessible and valuable for billions of people around the world.\n\nIf you’re curious to learn more about how Wikipedia works, check out the video below.\n\nWritten by Ed Erhart, Communications Specialist at the Wikimedia Foundation.", "segmentation_method": "reviewed_source_semantics", "label": "The full top 25", "source_line_range": [ 75, 113 ] }, { "id": "body-region-3", "text": "appendix this list was originally published using english wikipedia data pulled by the wikimedia foundation on 22 november 2024 we updated the list on 15 january 2025 to add data from the remaining days of the year one new article entered the list pushpa 2 the rule and one article was removed liam payne now at 26 all of the pageviews include direct and indirect navigations to the pages in question this list has been screened for false positives with methods including cross referencing the pageviews against the percentage of views they received from desktop devices as extreme values of less than 2 or more than 80 correlates strongly with spam botnets or other concerns this affected articles like cleopatra a long time false positive that depthsofwiki reported is a default voice search on google devices xxxtentacion and xxx looking at the number of pageviews that did not have a referrer and removing articles with extremely high values this impacted a number of articles about large websites such as facebook we suspect that a significant number of the pageviews without referrers are mistakes that occur when viewers are trying to access those websites previous lists of most popular english wikipedia articles are available for 2023 2022 2021 2020 2019 2018 2017 2016 and 2015 share read more our projects", "source_text": "Appendix\nThis list was originally published using English Wikipedia data pulled by the Wikimedia Foundation on 22 November 2024. We updated the list on 15 January 2025 to add data from the remaining days of the year. One new article entered the list (Pushpa 2: The Rule), and one article was removed (Liam Payne, now at #26) All of the pageviews include direct and indirect navigations to the pages in question.\nThis list has been screened for false positives with methods including:\nCross-referencing the pageviews against the percentage of views they received from desktop devices, as extreme values of less than 2% or more than 80% correlates strongly with spam, botnets, or other concerns. This affected articles like Cleopatra, a long-time false positive that @depthsofwiki reported is a default voice search on Google devices; XXXTentacion; and .xxx.\nLooking at the number of pageviews that did not have a referrer and removing articles with extremely high values. This impacted a number of articles about large websites, such as Facebook. We suspect that a significant number of the pageviews without referrers are mistakes that occur when viewers are trying to access those websites.\nPrevious lists of most-popular English Wikipedia articles are available for 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, and 2015.\nShare\nRead more:\nOur projects", "segmentation_method": "reviewed_source_semantics", "label": "Appendix", "source_line_range": [ 114, 122 ] } ], "ending": { "text": "vailable for 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, and 2015.\nShare\nRead more:\nOur projects" } } }, { "id": "article-100", "name": "Unpacking the 2024 Developer Survey results", "url": "https://stackoverflow.blog/2024/08/06/2024-developer-survey/", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "Unpacking\\ the\\ 2024\\ Developer\\ Survey\\ results" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "August 6, 2024" ] }, { "id": "stable-3", "alternatives": [ "Blog" ] }, { "id": "stable-4", "alternatives": [ "Log in" ] }, { "id": "stable-5", "alternatives": [ "Sign up" ] }, { "id": "stable-6", "alternatives": [ "Subscribe to the podcast" ] }, { "id": "stable-7", "alternatives": [ "Get The Stack Overflow Podcast at your favorite listening service." ] }, { "id": "stable-8", "alternatives": [ "Apple Podcasts" ] }, { "id": "stable-9", "alternatives": [ "Overcast" ] }, { "id": "stable-10", "alternatives": [ "Pocket Casts" ] }, { "id": "stable-11", "alternatives": [ "Spotify" ] }, { "id": "stable-12", "alternatives": [ "RSS feed" ] }, { "id": "stable-13", "alternatives": [ "AUTHORS" ] }, { "id": "stable-14", "alternatives": [ "Eira May" ] }, { "id": "stable-15", "alternatives": [ "B2B Editor" ] }, { "id": "stable-16", "alternatives": [ "Staff" ] }, { "id": "stable-17", "alternatives": [ "The Stack Overflow Podcast" ] }, { "id": "stable-18", "alternatives": [ "developer survey" ] }, { "id": "stable-19", "alternatives": [ "research" ] }, { "id": "stable-20", "alternatives": [ "Community" ] }, { "id": "stable-21", "alternatives": [ "RECENT ARTICLES" ] }, { "id": "stable-22", "alternatives": [ "LATEST PODCAST" ] }, { "id": "stable-23", "alternatives": [ "Add to the discussion" ] }, { "id": "stable-24", "alternatives": [ "Login with your stackoverflow.com account to take part in the discussion." ] }, { "id": "stable-25", "alternatives": [ "Our Stack" ] }, { "id": "stable-26", "alternatives": [ "Stack Internal" ] }, { "id": "stable-27", "alternatives": [ "Features" ] }, { "id": "stable-28", "alternatives": [ "Customers" ] }, { "id": "stable-29", "alternatives": [ "Use cases" ] }, { "id": "stable-30", "alternatives": [ "Security" ] }, { "id": "stable-31", "alternatives": [ "Integrations" ] }, { "id": "stable-32", "alternatives": [ "Pricing" ] }, { "id": "stable-33", "alternatives": [ "Stack Data Licensing" ] }, { "id": "stable-34", "alternatives": [ "Stack Ads" ] }, { "id": "stable-35", "alternatives": [ "Partnerships" ] }, { "id": "stable-36", "alternatives": [ "Services" ] }, { "id": "stable-37", "alternatives": [ "Stack Overflow" ] }, { "id": "stable-38", "alternatives": [ "Company" ] }, { "id": "stable-39", "alternatives": [ "Leadership" ] }, { "id": "stable-40", "alternatives": [ "Press" ] }, { "id": "stable-41", "alternatives": [ "Careers" ] }, { "id": "stable-42", "alternatives": [ "Social Impact" ] }, { "id": "stable-43", "alternatives": [ "Support" ] }, { "id": "stable-44", "alternatives": [ "Contact" ] }, { "id": "stable-45", "alternatives": [ "Stack Overflow help" ] }, { "id": "stable-46", "alternatives": [ "Stack Internal help" ] }, { "id": "stable-47", "alternatives": [ "Stack Internal Community help" ] }, { "id": "stable-48", "alternatives": [ "Implement Stack Internal" ] }, { "id": "stable-49", "alternatives": [ "Terms" ] }, { "id": "stable-50", "alternatives": [ "Privacy policy" ] }, { "id": "stable-51", "alternatives": [ "Cookie policy" ] }, { "id": "stable-52", "alternatives": [ "Elsewhere" ] }, { "id": "stable-53", "alternatives": [ "Dev Newsletter" ] }, { "id": "stable-54", "alternatives": [ "Podcast" ] }, { "id": "stable-55", "alternatives": [ "Releases" ] }, { "id": "stable-56", "alternatives": [ "Dev Survey" ] }, { "id": "stable-57", "alternatives": [ "Light" ] }, { "id": "stable-58", "alternatives": [ "Dark" ] }, { "id": "stable-59", "alternatives": [ "Auto" ] } ] }, "rule_review": { "status": "reviewed", "reason": "The independently saved initial DOM and full-page screenshot contain the complete article header/summary, linked highlights and all transcript turns through the final outro music cue. Five natural components cover all 97 reference lines. No expansion or consent action was performed; the session-dependent cookie overlay remains untouched. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "Unpacking the 2024 Developer Survey results" ], "html_selector": "h1.fs-display2.lh-xs,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-100/comment-qualification-reference-r5.json", "sha256": "cda7ab8bd54001bf234c797401645b10f908738de4f08b12b456b07fc2227a60", "chars": 790, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "August 6, 2024\nUnpacking the 2024 Developer Survey results\nRyan and Eira talk with Stack Overflow senior research analyst Erin Yepis about the results of our 2024 Developer Survey, which polled more than 65,000 developers about the tools they use, the technologies they want to learn, their experiences at work, and much more. Erin highlights what the survey reveals about devs’ favorite programming languages (JavaScript, HTML, Python), the rise of Rust, the popularity of embedded technologies (Raspberry Pi, Arduino), developer sentiment around AI, and why tech debt tops the list of developer frustrations.\nRead the blog post or dive into the results of our 2024 Developer Survey.\nA few highlights to get you started:\nmost popular technologies,\nmost admired and desired programming languages,\nfeelings about/use of AI coding tools, and\nwhat we know about the global developer community.\nSpeaking of our developer community, Stack Overflow user Frank earned a Stellar Question badge by wondering How to use C++ in Go.\nTRANSCRIPT\n[intro music plays]\nRyan Donovan Welcome to the Stack Overflow Podcast, a place to talk all things software and technology. I'm Ryan Donovan, and I am joined today by Eira May, and today, survey says, we're going to be discussing the results of the 2024 Stack Overflow Developer Survey. You excited to chat these results, Eira?\nEira May I'm very excited. Definitely one of the highlights of our year is finding out what folks have been working on and what technologies they've been working with, and it just gives us a snapshot of the folks that we're talking to. So we have Erin on the show today to help us talk through that. Erin, do you want to introduce yourself and talk a bit about what you do here at Stack Overflow?\nErin Yepis Yes, I would love to. My name is Erin Yepis. I'm a Senior Research Analyst at Stack Overflow, and I've been here for almost two years. I work with a lot of our internal and external data sources, just trying to understand developers, our developer community, better all the time. The developer survey is of course step one, and there's so much data to look at. Love looking at it, and I also love getting to check on my favorite coding language in the ranks every year. This year, unlike the others, my coding language of choice is falling down in the ranks.\nRD Oh no. What is your coding language of choice?\nEY R.\nRD Of course.\nEM Why did you say that in a ‘figures’ voice?\nRD Well, she's a data scientist.\nEM So typical.\nRD Nobody uses it but data scientists.\nEM No, that's true. That's fair.\nRD And speaking of the tech rankings, this is my fifth year participating in putting together the dev survey. And the tech rankings, the loved, hated, used and abused languages, those are always some of the favorites by people who read it. What was this year's results like?\nEY So this year we see a lot of our old favorites coming back, which we like to see. We like change. We like new stuff. We like the flashy new stuff, but some of us like the old reliable stuff too. So our top three programming languages have stayed pretty consistent over the last couple of years, being JavaScript, HTML, and Python. But you mentioned for the most admired and desired, we see the return of Rust coming in as one of the most admired.\nRD I know Rust was always a big top when we called it ‘the most loved languages,’ and I think the admired/desired framework helps people understand what these mean. Are there other technologies that were shifting around or is it old favorites?\nEY A lot of old favorites, however, with a couple of caveats. So one of the more interesting, I think, shifts that we're seeing, we've seen on Stack Overflow's tag trends as well, is the gradual rise of Python up the ranks. We see, especially if you go to our results site and check on the Learning to Code tab, Python is their top choice for programming language this year. And it was last year too.\nRD The other thing is that I think it's professional developers that rank Postgres pretty high, and almost 50 percent of them use it as the most popular one. We're going to be talking to somebody about Postgres in an upcoming episode, so that is an interesting stat to share.\nEY So one of the technologies I love seeing on the list, we added it last year, it's back this year. For asynchronous tools, we have Markdown files coming in again as one of the top three technologies that developers prefer. It also ranks very highly for that admired score as well. I also added something new this year, very adjacent to Markdown– because I love Markdown files, obviously. I create a bunch of them in R as well. But there's a tool called Obsidian that one of our coworkers got me wise to, which works like Markdown as well. It’s just creating tabs that you can use all of the Markdown shortcuts. So it made its debut on async tools list this year and is doing pretty well given the long list and that it’s just now ripe. And I only just started learning about it not that long ago too. So I love how there's just these old reliables that show up.\nEM What are the new questions that were added this year or anything surprising?\nEY So sticking to the technology lists, two new things this year. One of them is a little bit more new than the other one. We added a new section for embedded technologies, and this came directly from feedback from our meta community. So our community members love to be very specific. “Hey, you're grouping this certain technology with all these other ones. It doesn't really belong there.” And so because I know the survey is getting longer and longer each year, I try to be very careful about what we're keeping and what we want to add and see if it can be assumed by other content areas and not just adding just tons of questions. But this seemed worthwhile– we were able to move some of the technologies out of different sections so we have just one big embedded technology list that people got to choose from where we saw Raspberry Pi top of the list. And that was one of the technologies at least that had the brand name recognition so I knew what it was. A lot of them I don't know what they are, so I love that our community could step in and help with vetting that.\nRD That's nice that we have the community involvement. I remember complaints about previous ones where people were saying, “This isn't a framework,” or “This isn't a programming language,” or whatever, just getting that nuance. What were some of the other embedded technologies?\nEY So we had at the top of the list, Raspberry Pi followed closely by Arduino, which I believe they're both pretty related. They show up again also on the work with/want to work with chord graphs where a lot of the Arduino users want to work with Raspberry Pi. Not so much the other way, but I think that's because there's components that are duplicated. I’m not an embedded developer so I don't exactly understand it, but I do know there's a relationship there. That's why they both scored pretty high as far as popularity. And then right underneath that, pretty close to the Arduino popularity, is GNU GCC, which sounds like I'm reading a barcode out loud.\nRD Is it a compiler GCC?\nEY That sounds right. So of all the developers that responded to the survey, embedded developers make up 3 percent of our responses– not an insignificant number, considering all the other types of roles that we ask about. So they're coming to Stack Overflow, they know a lot more about this stuff, they're participating in the meta community. I would love to learn more about this, maybe I will. Maybe I'll have some more time now, now that the survey results are finally out in the wild.\nRD And if you want to drop us a comment about embedded technologies, I think Erin would appreciate that.\nEY Yes.\nRD You said there were two new tech questions. Is that right?\nEY Yes, the other one is a little less new, but we did switch it up. So on the technology section, we also have the AI technology section. Last year we split it up, so we had “What are the most popular AI search technologies?” and “What are the most popular AI developer tool technologies?” We combined them this year because there's just a lot of overlap and they're changing a lot, so let's just keep them all together. We can monitor this list a little bit more. It's a little bit more organized that way. We didn't see a lot of difference in the results. We have two players that are just dominating the game right now, but these are relatively new technologies, so I would expect that. ChatGPT being at the top of the list, I think it's a little bit more helpful to see it all together now so you can compare them to each other. And I know in the meta comments as well from last year there was a lot of people that were making comments about how ChatGPT is a developer tool as well, that they use it as that. So glad to have less confusion there. And probably with all of the interviews and resources you guys have been working with on new AI technologies, there was a moment there where we thought maybe it was more apropos to talk about the models instead of the names of the technologies, but those are changing just as often as the technology options themselves, so one has a little bit of that marketing behind it, whereas maybe the model names are not as well known or you're not sure which one goes to which tool.\nRD We see that too. I think so many tools are both developer tools and search tools at this point in that there's new models all the time. It’s a tough one. Your survey is going to be out of date by the time it's published.\nEY Exactly. But it is a nice snapshot in time at least, so we have that. But who knows, maybe next year we'll change our minds about including those models. I don't know. It depends on what the people want.\nEM It's a long time to see into the future, especially when we're talking about something like AI and how developers are using AI.\nEY I know.\nRD Speaking of which, I know we've also been taking developers' temperature on how they feel about AI and how they're using it at work. What sort of things did we ask this year and what were the results?\nEY So a couple of the questions that we asked last year for the first time came back this year. Just getting that temperature check on, are you using it, do you like it, and what are the perceived benefits that you see with using these tools? So we found this year that more people are using or interested in using AI tools, but there are still problems. So they're using it, they're getting more familiar with it, and I think with that familiarity they're getting a little bit more familiar with the challenges. So this year, one of the new questions that we asked was, “What are your top challenges that you face at work if you use AI tools with your team or at your company?” And the lack of trust is the top challenge, followed by inability to understand complex code bases. So we also asked another question related to this, asking developers if they felt that AI tools or AI in general was a threat to their positions, and 70 percent agreed that it was not. And I think because they have had a chance to actually interact with it more, actually use it at work, try different flavors of it, whether they're trying some of the new options that are coming out or maybe using an enterprise solution, they are seeing that it's not necessarily– they still have to do a good chunk of work to make it apply to what they're doing.\nEM Right. It's not going to step in and take over the job for them.\nEY Right. Which I think is surprising since we talk about how it's going to take jobs, I think, every other day.\nEM Exactly.\nRD A lot of folks do. And I think there are some analyses that show that some developers have lost jobs because of it, but the promise of the AI developer agent isn't entirely there yet. You still have to know how to code to know if this is a good coder.\nEY Yes. And so it becomes that you are in control. You're using this tool to help you get a job done. You still have to be the one that's in control.\nRD Was there anything that surprised you about the AI stuff?\nEY My major surprise was that more developers did not agree that AI was a threat to their jobs. Most of the developer roles for our respondents are back end and full stack developers, so they have pretty complicated jobs. They're not worried about this, especially with new stories coming out. Our recent big CrowdStrike story coming out. The more experience you have, I think the more opportunities for big errors these developers are seeing. So they know that there's just too much going on that AI is not. And again, that top challenge of inability to understand complex code bases they've picked up on as well. So it makes sense, but I also was just expecting there to be a little bit more parity there, more developers being maybe unsure about if AI was a threat. Because that was one of the options too that you could select if you weren't sure. But no, 70 percent said, “No, AI is not a threat to my job.”\nEM That's a higher percentage than I would have expected who would feel that level of confidence too. But I think you're right, probably the kinds of roles that we're speaking to has a lot to do with this. If we were asking folks who are front end developers or junior developers, they might have a different response.\nRD Yeah. As people are using these more and more, almost a familiarity breeds contempt. Once you find out the actual capabilities of these, you're like, “Oh, okay. They're not going to replace me with this robot just yet.”\nEM That is a little bit how I feel as a copywriter. “Oh, I'm good for now.”\nEY I definitely think you're good. Every time I use ChatGPT to get the thought starter, I hate the results. I hate it. So I always have to edit them or ask at least 10 more times, “Please fix this. Do this instead.”\nRD You mentioned that we had community engagement on getting the survey ready. We also had some community-related questions in the survey. What did we ask and what did we find out on that?\nEY We had a couple of new questions that we added to the community section, and one of them was– so in the past we have been asking, “Do you have a Stack Overflow account? Do you participate on Stack Overflow?” But this year we also asked, “What are the benefits that you use Stack Overflow for?” And this is based off of some previous work that our UX team started earlier in the year where they're doing their qualitative research to find out exactly pain points that real users are having on the site. So I had a little bit of help there, a little bit of inspiration, but overwhelmingly the top choice that is selected by actual Stack Overflow users is that they come to the site to save time, to find solutions to code problems best. So for all of the haters out there that say that it takes too long to find answers on Stack Overflow, that's exactly what they're doing. It's nice to have that stat out there.\nRD I think that the initial burst of ChatGPT finding answers but then having to verify whether those answers are true leads us right back to us again.\nEY And they're complex problems. We know that developers don't trust AI with complex problems. Stack Overflow has an assorted array of complex problems and solutions.\nRD Did you see if they were just on Stack Overflow or did they go all over the place on our sites?\nEY So we asked them as a multi-select, “Which one of our sites are you familiar with?” Stack Overflow, top choice. 97 percent of people that answered that question said that that's the site that they're visiting, followed by Stack Exchange, added to the list this year is our blog and podcast site. So we have 15 percent of the respondents saying that they visit that site as well, which more people should.\nRD We appreciate you.\nEY Yes.\nEM Howdy, folks.\nEY It's a beautiful site. The layout is very enticing. There's lots of great tidbits on there, new stuff all the time.\nEM Lots of great writing, I've heard.\nEY Lots of great writing, lots of great interviews, lots of great content.\nRD All right, all right. So I know we are always adding questions, trying new things. What else was in the survey this year?\nEY So another addition that we made for the professional developer series of questions that we have is that we asked developers about their top frustrations at work. We asked them if they were satisfied at their job and what did they find satisfying the most? So this was interesting and it relates to a topic you guys had covered not too long ago. We had 63 percent, the top choice for professional developers for their frustration at work is tech debt. So on one hand we have that, and then on the other hand we asked about what makes you happy at work, and the top choice for those– happy, unhappy, or complacent, somewhere in between– their top choice for all three of those segments was improving code quality and database environments, so working on tech debt.\nRD I think when we've talked about it, whether you're able to work on and eliminate tech debt is sort of a canary for a lot of organizations. Because if you're not taking care of your debt, that adds up just like real debt and then you have to declare tech bankruptcy.\nEY And I can understand how when you take an afternoon to organize the junk drawer and you feel really good about that even though you didn't really get anything out of that, you still have the same amount of stuff, I can see how that would be the case. It's, on one hand, frustrating, but on the other hand, rewarding.\nRD You gain greater control over your environment. And I think there's a lot of tech debt that comes from moving fast, trying to get out the door fast, or optimizing for things that you regret later.\nEY I'm not too well-versed in it, but I know something that our developers are proud of and also complain a lot about is referred to as ‘the monolith,’ so it giveth and it taketh away.\nRD Yes, the monolith, although monoliths are making a comeback. I keep seeing hot takes that services are out of control, monolith is fine. So it depends on what you're working with now.\nEY Exactly. So interestingly enough, related to this or that for what's the preferred, what's the best class solution, I think for next year, especially after listening to and reading through your transcript about your tech debt interview that recently was posted, I'm going to have to update this question so it's a little bit more specific instead of just referring to a big tech debt and maybe breaking this out. So something about monolith versus services, something about refactoring versus rewriting, something about upgrading versus replacing.\nRD That would be an interesting one. “Are you working on a monolith or service-oriented architecture?” “Do you have multiple cloud regions?” “What do you optimize your code for?”\nEY So to get more specific, and maybe also paying the meta community again and ask them to vet if I am going about this the right way, and obviously probably listen to more of your interviews before then too.\nRD Of course. Are there other things you're looking at adding for surveys in the future?\nEY I think what we're after, the big goal is just getting better and better at understanding the developers that come to Stack Overflow. And I feel like there's just still big groups but they're not specific enough, and I want to get closer to that. So questions that help me get closer to why you say you're a full stack developer. What does that mean to you? What exactly do you mean by that? What do you like? What distinguishes you from another full stack developer? And not just because you might be born in a different year or live in a different country, something just more characteristic about your job, your work, the type of person you are. I think that's the everlasting challenge.\nRD Maybe it's time for some new pulse surveys.\nEY Oh, yeah. Great idea. Love that.\nRD Do you not love that?\nEY I love what that is– what do you call it? It's my version of tech debt. Research debt.\nEM Research debt. Survey debt.\nEY Survey debt. But after getting these results out for the dev survey, I'm going to need at least 24 hours before I start thinking about another survey.\nEM I was going to say, you're just not ready to wrap your brain around a pulse survey.\nEY I love the idea about it. I am definitely being sincere, but I see my eyes glaze over because just the survey debt is floating in front of my face.\nEM Timing is everything.\nEY Timing is everything.\n[music plays]\nRD Well, it is that time in the show again when we shout out somebody who came on Stack Overflow and shared a little of their curiosity. Today we’re going to shout out a Stellar Question Badge, awarded to Frank for asking, “How to use C++ in Go?” If you, too, are curious, maybe somebody has dropped an answer there. And if you have that answer, go share a little knowledge. I am Ryan Donovan. I edit the blog here at Stack Overflow. You can send us comments, suggestions, feedback at podcast@stackoverflow.com. And if you like what you heard today, please drop a rating and review.\nEM And I am Eira May. You can find me online if you want to @EiraMaybe.\nEY I am Erin Yepis. I would love it if you could go to Stack Overflow and post some new R questions and R answers. Let’s get those people back. We need them back.\nEM Special shout out.\nRD All right, everyone. We'll talk to you next time.\n[outro music plays]", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "august 6 2024 unpacking the 2024 developer survey results ryan and eira talk with stack overflow senior research analyst erin yepis about the results of our 2024 developer survey which polled more than 65 000 developers about the tools they use the technologies they want to learn their experiences at work and much more erin highlights what the survey reveals about devs favorite programming languages javascript html python the rise of rust the popularity of embedded technologies raspberry pi arduino developer sentiment around ai and why tech debt tops the list of developer frustrations read the blog post or dive into the results of our 2024 developer survey a few highlights to get you started most popular technologies most admired and desired programming languages feelings about use of ai coding tools and what we know about the global developer community speaking of our developer community stack overflow user frank earned a stellar question badge by wondering how to use c in go transcript intro music plays ryan donovan welcome to the stack overflow podcast a place to talk all things software and technology i m ryan donovan and i am joined today by eira may and today survey says we re going to be discussing the results of the 2024 stack overflow developer survey you excited to chat these results eira eira may i m very excited definitely one of the highlights of our year is finding out what folks have been working on and what technologies they ve been working with and it just gives us a snapshot of the folks that we re talking to so we have erin on the show today to help us talk through that erin do you want to introduce yourself and talk a bit about what you do here at stack overflow erin yepis yes i would love to my name is erin yepis i m a senior research analyst at stack overflow and i ve been here for almost two years i work with a lot of our internal and external data sources just trying to understand developers our developer community better all the time the developer survey is of course step one and there s so much data to look at love looking at it and i also love getting to check on my favorite coding language in the ranks every year this year unlike the others my coding language of choice is falling down in the ranks rd oh no what is your coding language of choice ey r rd of course em why did you say that in a figures voice rd well she s a data scientist em so typical rd nobody uses it but data scientists em no that s true that s fair rd and speaking of the tech rankings this is my fifth year participating in putting together the dev survey and the tech rankings the loved hated used and abused languages those are always some of the favorites by people who read it what was this year s results like ey so this year we see a lot of our old favorites coming back which we like to see we like change we like new stuff we like the flashy new stuff but some of us like the old reliable stuff too so our top three programming languages have stayed pretty consistent over the last couple of years being javascript html and python but you mentioned for the most admired and desired we see the return of rust coming in as one of the most admired rd i know rust was always a big top when we called it the most loved languages and i think the admired desired framework helps people understand what these mean are there other technologies that were shifting around or is it old favorites ey a lot of old favorites however with a couple of caveats so one of the more interesting i think shifts that we re seeing we ve seen on stack overflow s tag trends as well is the gradual rise of python up the ranks we see especially if you go to our results site and check on the learning to code tab python is their top choice for programming language this year and it was last year too rd the other thing is that i think it s professional developers that rank postgres pretty high and almost 50 percent of them use it as the most popular one we re going to be talking to somebody about postgres in an upcoming episode so that is an interesting stat to share", "source_text": "August 6, 2024\nUnpacking the 2024 Developer Survey results\nRyan and Eira talk with Stack Overflow senior research analyst Erin Yepis about the results of our 2024 Developer Survey, which polled more than 65,000 developers about the tools they use, the technologies they want to learn, their experiences at work, and much more. Erin highlights what the survey reveals about devs’ favorite programming languages (JavaScript, HTML, Python), the rise of Rust, the popularity of embedded technologies (Raspberry Pi, Arduino), developer sentiment around AI, and why tech debt tops the list of developer frustrations.\nRead the blog post or dive into the results of our 2024 Developer Survey.\nA few highlights to get you started:\nmost popular technologies,\nmost admired and desired programming languages,\nfeelings about/use of AI coding tools, and\nwhat we know about the global developer community.\nSpeaking of our developer community, Stack Overflow user Frank earned a Stellar Question badge by wondering How to use C++ in Go.\nTRANSCRIPT\n[intro music plays]\nRyan Donovan Welcome to the Stack Overflow Podcast, a place to talk all things software and technology. I'm Ryan Donovan, and I am joined today by Eira May, and today, survey says, we're going to be discussing the results of the 2024 Stack Overflow Developer Survey. You excited to chat these results, Eira?\nEira May I'm very excited. Definitely one of the highlights of our year is finding out what folks have been working on and what technologies they've been working with, and it just gives us a snapshot of the folks that we're talking to. So we have Erin on the show today to help us talk through that. Erin, do you want to introduce yourself and talk a bit about what you do here at Stack Overflow?\nErin Yepis Yes, I would love to. My name is Erin Yepis. I'm a Senior Research Analyst at Stack Overflow, and I've been here for almost two years. I work with a lot of our internal and external data sources, just trying to understand developers, our developer community, better all the time. The developer survey is of course step one, and there's so much data to look at. Love looking at it, and I also love getting to check on my favorite coding language in the ranks every year. This year, unlike the others, my coding language of choice is falling down in the ranks.\nRD Oh no. What is your coding language of choice?\nEY R.\nRD Of course.\nEM Why did you say that in a ‘figures’ voice?\nRD Well, she's a data scientist.\nEM So typical.\nRD Nobody uses it but data scientists.\nEM No, that's true. That's fair.\nRD And speaking of the tech rankings, this is my fifth year participating in putting together the dev survey. And the tech rankings, the loved, hated, used and abused languages, those are always some of the favorites by people who read it. What was this year's results like?\nEY So this year we see a lot of our old favorites coming back, which we like to see. We like change. We like new stuff. We like the flashy new stuff, but some of us like the old reliable stuff too. So our top three programming languages have stayed pretty consistent over the last couple of years, being JavaScript, HTML, and Python. But you mentioned for the most admired and desired, we see the return of Rust coming in as one of the most admired.\nRD I know Rust was always a big top when we called it ‘the most loved languages,’ and I think the admired/desired framework helps people understand what these mean. Are there other technologies that were shifting around or is it old favorites?\nEY A lot of old favorites, however, with a couple of caveats. So one of the more interesting, I think, shifts that we're seeing, we've seen on Stack Overflow's tag trends as well, is the gradual rise of Python up the ranks. We see, especially if you go to our results site and check on the Learning to Code tab, Python is their top choice for programming language this year. And it was last year too.\nRD The other thing is that I think it's professional developers that rank Postgres pretty high, and almost 50 percent of them use it as the most popular one. We're going to be talking to somebody about Postgres in an upcoming episode, so that is an interesting stat to share.", "segmentation_method": "reviewed_source_semantics", "label": "开篇:August 6, 2024 — 段落/内容单元:RD The other thing is that I think it's professional develop", "source_line_range": [ 1, 28 ] }, { "id": "body-region-2", "text": "ey so one of the technologies i love seeing on the list we added it last year it s back this year for asynchronous tools we have markdown files coming in again as one of the top three technologies that developers prefer it also ranks very highly for that admired score as well i also added something new this year very adjacent to markdown because i love markdown files obviously i create a bunch of them in r as well but there s a tool called obsidian that one of our coworkers got me wise to which works like markdown as well it s just creating tabs that you can use all of the markdown shortcuts so it made its debut on async tools list this year and is doing pretty well given the long list and that it s just now ripe and i only just started learning about it not that long ago too so i love how there s just these old reliables that show up em what are the new questions that were added this year or anything surprising ey so sticking to the technology lists two new things this year one of them is a little bit more new than the other one we added a new section for embedded technologies and this came directly from feedback from our meta community so our community members love to be very specific hey you re grouping this certain technology with all these other ones it doesn t really belong there and so because i know the survey is getting longer and longer each year i try to be very careful about what we re keeping and what we want to add and see if it can be assumed by other content areas and not just adding just tons of questions but this seemed worthwhile we were able to move some of the technologies out of different sections so we have just one big embedded technology list that people got to choose from where we saw raspberry pi top of the list and that was one of the technologies at least that had the brand name recognition so i knew what it was a lot of them i don t know what they are so i love that our community could step in and help with vetting that rd that s nice that we have the community involvement i remember complaints about previous ones where people were saying this isn t a framework or this isn t a programming language or whatever just getting that nuance what were some of the other embedded technologies ey so we had at the top of the list raspberry pi followed closely by arduino which i believe they re both pretty related they show up again also on the work with want to work with chord graphs where a lot of the arduino users want to work with raspberry pi not so much the other way but i think that s because there s components that are duplicated i m not an embedded developer so i don t exactly understand it but i do know there s a relationship there that s why they both scored pretty high as far as popularity and then right underneath that pretty close to the arduino popularity is gnu gcc which sounds like i m reading a barcode out loud rd is it a compiler gcc ey that sounds right so of all the developers that responded to the survey embedded developers make up 3 percent of our responses not an insignificant number considering all the other types of roles that we ask about so they re coming to stack overflow they know a lot more about this stuff they re participating in the meta community i would love to learn more about this maybe i will maybe i ll have some more time now now that the survey results are finally out in the wild rd and if you want to drop us a comment about embedded technologies i think erin would appreciate that ey yes rd you said there were two new tech questions is that right", "source_text": "EY So one of the technologies I love seeing on the list, we added it last year, it's back this year. For asynchronous tools, we have Markdown files coming in again as one of the top three technologies that developers prefer. It also ranks very highly for that admired score as well. I also added something new this year, very adjacent to Markdown– because I love Markdown files, obviously. I create a bunch of them in R as well. But there's a tool called Obsidian that one of our coworkers got me wise to, which works like Markdown as well. It’s just creating tabs that you can use all of the Markdown shortcuts. So it made its debut on async tools list this year and is doing pretty well given the long list and that it’s just now ripe. And I only just started learning about it not that long ago too. So I love how there's just these old reliables that show up.\nEM What are the new questions that were added this year or anything surprising?\nEY So sticking to the technology lists, two new things this year. One of them is a little bit more new than the other one. We added a new section for embedded technologies, and this came directly from feedback from our meta community. So our community members love to be very specific. “Hey, you're grouping this certain technology with all these other ones. It doesn't really belong there.” And so because I know the survey is getting longer and longer each year, I try to be very careful about what we're keeping and what we want to add and see if it can be assumed by other content areas and not just adding just tons of questions. But this seemed worthwhile– we were able to move some of the technologies out of different sections so we have just one big embedded technology list that people got to choose from where we saw Raspberry Pi top of the list. And that was one of the technologies at least that had the brand name recognition so I knew what it was. A lot of them I don't know what they are, so I love that our community could step in and help with vetting that.\nRD That's nice that we have the community involvement. I remember complaints about previous ones where people were saying, “This isn't a framework,” or “This isn't a programming language,” or whatever, just getting that nuance. What were some of the other embedded technologies?\nEY So we had at the top of the list, Raspberry Pi followed closely by Arduino, which I believe they're both pretty related. They show up again also on the work with/want to work with chord graphs where a lot of the Arduino users want to work with Raspberry Pi. Not so much the other way, but I think that's because there's components that are duplicated. I’m not an embedded developer so I don't exactly understand it, but I do know there's a relationship there. That's why they both scored pretty high as far as popularity. And then right underneath that, pretty close to the Arduino popularity, is GNU GCC, which sounds like I'm reading a barcode out loud.\nRD Is it a compiler GCC?\nEY That sounds right. So of all the developers that responded to the survey, embedded developers make up 3 percent of our responses– not an insignificant number, considering all the other types of roles that we ask about. So they're coming to Stack Overflow, they know a lot more about this stuff, they're participating in the meta community. I would love to learn more about this, maybe I will. Maybe I'll have some more time now, now that the survey results are finally out in the wild.\nRD And if you want to drop us a comment about embedded technologies, I think Erin would appreciate that.\nEY Yes.\nRD You said there were two new tech questions. Is that right?", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:EY So one of the technologies I love seeing on the list, we — 段落/内容单元:RD You said there were two new tech questions. Is that right", "source_line_range": [ 29, 38 ] }, { "id": "body-region-3", "text": "ey yes the other one is a little less new but we did switch it up so on the technology section we also have the ai technology section last year we split it up so we had what are the most popular ai search technologies and what are the most popular ai developer tool technologies we combined them this year because there s just a lot of overlap and they re changing a lot so let s just keep them all together we can monitor this list a little bit more it s a little bit more organized that way we didn t see a lot of difference in the results we have two players that are just dominating the game right now but these are relatively new technologies so i would expect that chatgpt being at the top of the list i think it s a little bit more helpful to see it all together now so you can compare them to each other and i know in the meta comments as well from last year there was a lot of people that were making comments about how chatgpt is a developer tool as well that they use it as that so glad to have less confusion there and probably with all of the interviews and resources you guys have been working with on new ai technologies there was a moment there where we thought maybe it was more apropos to talk about the models instead of the names of the technologies but those are changing just as often as the technology options themselves so one has a little bit of that marketing behind it whereas maybe the model names are not as well known or you re not sure which one goes to which tool rd we see that too i think so many tools are both developer tools and search tools at this point in that there s new models all the time it s a tough one your survey is going to be out of date by the time it s published ey exactly but it is a nice snapshot in time at least so we have that but who knows maybe next year we ll change our minds about including those models i don t know it depends on what the people want em it s a long time to see into the future especially when we re talking about something like ai and how developers are using ai ey i know rd speaking of which i know we ve also been taking developers temperature on how they feel about ai and how they re using it at work what sort of things did we ask this year and what were the results ey so a couple of the questions that we asked last year for the first time came back this year just getting that temperature check on are you using it do you like it and what are the perceived benefits that you see with using these tools so we found this year that more people are using or interested in using ai tools but there are still problems so they re using it they re getting more familiar with it and i think with that familiarity they re getting a little bit more familiar with the challenges so this year one of the new questions that we asked was what are your top challenges that you face at work if you use ai tools with your team or at your company and the lack of trust is the top challenge followed by inability to understand complex code bases so we also asked another question related to this asking developers if they felt that ai tools or ai in general was a threat to their positions and 70 percent agreed that it was not and i think because they have had a chance to actually interact with it more actually use it at work try different flavors of it whether they re trying some of the new options that are coming out or maybe using an enterprise solution they are seeing that it s not necessarily they still have to do a good chunk of work to make it apply to what they re doing em right it s not going to step in and take over the job for them ey right which i think is surprising since we talk about how it s going to take jobs i think every other day em exactly rd a lot of folks do and i think there are some analyses that show that some developers have lost jobs because of it but the promise of the ai developer agent isn t entirely there yet you still have to know how to code to know if this is a good coder ey yes and so it becomes that you are in control you re using this tool to help you get a job done you still have to be the one that s in control rd was there anything that surprised you about the ai stuff ey my major surprise was that more developers did not agree that ai was a threat to their jobs most of the developer roles for our respondents are back end and full stack developers so they have pretty complicated jobs they re not worried about this especially with new stories coming out our recent big crowdstrike story coming out the more experience you have i think the more opportunities for big errors these developers are seeing so they know that there s just too much going on that ai is not and again that top challenge of inability to understand complex code bases they ve picked up on as well so it makes sense but i also was just expecting there to be a little bit more parity there more developers being maybe unsure about if ai was a threat because that was one of the options too that you could select if you weren t sure but no 70 percent said no ai is not a threat to my job", "source_text": "EY Yes, the other one is a little less new, but we did switch it up. So on the technology section, we also have the AI technology section. Last year we split it up, so we had “What are the most popular AI search technologies?” and “What are the most popular AI developer tool technologies?” We combined them this year because there's just a lot of overlap and they're changing a lot, so let's just keep them all together. We can monitor this list a little bit more. It's a little bit more organized that way. We didn't see a lot of difference in the results. We have two players that are just dominating the game right now, but these are relatively new technologies, so I would expect that. ChatGPT being at the top of the list, I think it's a little bit more helpful to see it all together now so you can compare them to each other. And I know in the meta comments as well from last year there was a lot of people that were making comments about how ChatGPT is a developer tool as well, that they use it as that. So glad to have less confusion there. And probably with all of the interviews and resources you guys have been working with on new AI technologies, there was a moment there where we thought maybe it was more apropos to talk about the models instead of the names of the technologies, but those are changing just as often as the technology options themselves, so one has a little bit of that marketing behind it, whereas maybe the model names are not as well known or you're not sure which one goes to which tool.\nRD We see that too. I think so many tools are both developer tools and search tools at this point in that there's new models all the time. It’s a tough one. Your survey is going to be out of date by the time it's published.\nEY Exactly. But it is a nice snapshot in time at least, so we have that. But who knows, maybe next year we'll change our minds about including those models. I don't know. It depends on what the people want.\nEM It's a long time to see into the future, especially when we're talking about something like AI and how developers are using AI.\nEY I know.\nRD Speaking of which, I know we've also been taking developers' temperature on how they feel about AI and how they're using it at work. What sort of things did we ask this year and what were the results?\nEY So a couple of the questions that we asked last year for the first time came back this year. Just getting that temperature check on, are you using it, do you like it, and what are the perceived benefits that you see with using these tools? So we found this year that more people are using or interested in using AI tools, but there are still problems. So they're using it, they're getting more familiar with it, and I think with that familiarity they're getting a little bit more familiar with the challenges. So this year, one of the new questions that we asked was, “What are your top challenges that you face at work if you use AI tools with your team or at your company?” And the lack of trust is the top challenge, followed by inability to understand complex code bases. So we also asked another question related to this, asking developers if they felt that AI tools or AI in general was a threat to their positions, and 70 percent agreed that it was not. And I think because they have had a chance to actually interact with it more, actually use it at work, try different flavors of it, whether they're trying some of the new options that are coming out or maybe using an enterprise solution, they are seeing that it's not necessarily– they still have to do a good chunk of work to make it apply to what they're doing.\nEM Right. It's not going to step in and take over the job for them.\nEY Right. Which I think is surprising since we talk about how it's going to take jobs, I think, every other day.\nEM Exactly.\nRD A lot of folks do. And I think there are some analyses that show that some developers have lost jobs because of it, but the promise of the AI developer agent isn't entirely there yet. You still have to know how to code to know if this is a good coder.\nEY Yes. And so it becomes that you are in control. You're using this tool to help you get a job done. You still have to be the one that's in control.\nRD Was there anything that surprised you about the AI stuff?\nEY My major surprise was that more developers did not agree that AI was a threat to their jobs. Most of the developer roles for our respondents are back end and full stack developers, so they have pretty complicated jobs. They're not worried about this, especially with new stories coming out. Our recent big CrowdStrike story coming out. The more experience you have, I think the more opportunities for big errors these developers are seeing. So they know that there's just too much going on that AI is not. And again, that top challenge of inability to understand complex code bases they've picked up on as well. So it makes sense, but I also was just expecting there to be a little bit more parity there, more developers being maybe unsure about if AI was a threat. Because that was one of the options too that you could select if you weren't sure. But no, 70 percent said, “No, AI is not a threat to my job.”", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:EY Yes, the other one is a little less new, but we did switc — 段落/内容单元:EY My major surprise was that more developers did not agree ", "source_line_range": [ 39, 52 ] }, { "id": "body-region-4", "text": "em that s a higher percentage than i would have expected who would feel that level of confidence too but i think you re right probably the kinds of roles that we re speaking to has a lot to do with this if we were asking folks who are front end developers or junior developers they might have a different response rd yeah as people are using these more and more almost a familiarity breeds contempt once you find out the actual capabilities of these you re like oh okay they re not going to replace me with this robot just yet em that is a little bit how i feel as a copywriter oh i m good for now ey i definitely think you re good every time i use chatgpt to get the thought starter i hate the results i hate it so i always have to edit them or ask at least 10 more times please fix this do this instead rd you mentioned that we had community engagement on getting the survey ready we also had some community related questions in the survey what did we ask and what did we find out on that ey we had a couple of new questions that we added to the community section and one of them was so in the past we have been asking do you have a stack overflow account do you participate on stack overflow but this year we also asked what are the benefits that you use stack overflow for and this is based off of some previous work that our ux team started earlier in the year where they re doing their qualitative research to find out exactly pain points that real users are having on the site so i had a little bit of help there a little bit of inspiration but overwhelmingly the top choice that is selected by actual stack overflow users is that they come to the site to save time to find solutions to code problems best so for all of the haters out there that say that it takes too long to find answers on stack overflow that s exactly what they re doing it s nice to have that stat out there rd i think that the initial burst of chatgpt finding answers but then having to verify whether those answers are true leads us right back to us again ey and they re complex problems we know that developers don t trust ai with complex problems stack overflow has an assorted array of complex problems and solutions rd did you see if they were just on stack overflow or did they go all over the place on our sites ey so we asked them as a multi select which one of our sites are you familiar with stack overflow top choice 97 percent of people that answered that question said that that s the site that they re visiting followed by stack exchange added to the list this year is our blog and podcast site so we have 15 percent of the respondents saying that they visit that site as well which more people should rd we appreciate you ey yes em howdy folks ey it s a beautiful site the layout is very enticing there s lots of great tidbits on there new stuff all the time em lots of great writing i ve heard ey lots of great writing lots of great interviews lots of great content rd all right all right so i know we are always adding questions trying new things what else was in the survey this year ey so another addition that we made for the professional developer series of questions that we have is that we asked developers about their top frustrations at work we asked them if they were satisfied at their job and what did they find satisfying the most so this was interesting and it relates to a topic you guys had covered not too long ago we had 63 percent the top choice for professional developers for their frustration at work is tech debt so on one hand we have that and then on the other hand we asked about what makes you happy at work and the top choice for those happy unhappy or complacent somewhere in between their top choice for all three of those segments was improving code quality and database environments so working on tech debt rd i think when we ve talked about it whether you re able to work on and eliminate tech debt is sort of a canary for a lot of organizations because if you re not taking care of your debt that adds up just like real debt and then you have to declare tech bankruptcy", "source_text": "EM That's a higher percentage than I would have expected who would feel that level of confidence too. But I think you're right, probably the kinds of roles that we're speaking to has a lot to do with this. If we were asking folks who are front end developers or junior developers, they might have a different response.\nRD Yeah. As people are using these more and more, almost a familiarity breeds contempt. Once you find out the actual capabilities of these, you're like, “Oh, okay. They're not going to replace me with this robot just yet.”\nEM That is a little bit how I feel as a copywriter. “Oh, I'm good for now.”\nEY I definitely think you're good. Every time I use ChatGPT to get the thought starter, I hate the results. I hate it. So I always have to edit them or ask at least 10 more times, “Please fix this. Do this instead.”\nRD You mentioned that we had community engagement on getting the survey ready. We also had some community-related questions in the survey. What did we ask and what did we find out on that?\nEY We had a couple of new questions that we added to the community section, and one of them was– so in the past we have been asking, “Do you have a Stack Overflow account? Do you participate on Stack Overflow?” But this year we also asked, “What are the benefits that you use Stack Overflow for?” And this is based off of some previous work that our UX team started earlier in the year where they're doing their qualitative research to find out exactly pain points that real users are having on the site. So I had a little bit of help there, a little bit of inspiration, but overwhelmingly the top choice that is selected by actual Stack Overflow users is that they come to the site to save time, to find solutions to code problems best. So for all of the haters out there that say that it takes too long to find answers on Stack Overflow, that's exactly what they're doing. It's nice to have that stat out there.\nRD I think that the initial burst of ChatGPT finding answers but then having to verify whether those answers are true leads us right back to us again.\nEY And they're complex problems. We know that developers don't trust AI with complex problems. Stack Overflow has an assorted array of complex problems and solutions.\nRD Did you see if they were just on Stack Overflow or did they go all over the place on our sites?\nEY So we asked them as a multi-select, “Which one of our sites are you familiar with?” Stack Overflow, top choice. 97 percent of people that answered that question said that that's the site that they're visiting, followed by Stack Exchange, added to the list this year is our blog and podcast site. So we have 15 percent of the respondents saying that they visit that site as well, which more people should.\nRD We appreciate you.\nEY Yes.\nEM Howdy, folks.\nEY It's a beautiful site. The layout is very enticing. There's lots of great tidbits on there, new stuff all the time.\nEM Lots of great writing, I've heard.\nEY Lots of great writing, lots of great interviews, lots of great content.\nRD All right, all right. So I know we are always adding questions, trying new things. What else was in the survey this year?\nEY So another addition that we made for the professional developer series of questions that we have is that we asked developers about their top frustrations at work. We asked them if they were satisfied at their job and what did they find satisfying the most? So this was interesting and it relates to a topic you guys had covered not too long ago. We had 63 percent, the top choice for professional developers for their frustration at work is tech debt. So on one hand we have that, and then on the other hand we asked about what makes you happy at work, and the top choice for those– happy, unhappy, or complacent, somewhere in between– their top choice for all three of those segments was improving code quality and database environments, so working on tech debt.\nRD I think when we've talked about it, whether you're able to work on and eliminate tech debt is sort of a canary for a lot of organizations. Because if you're not taking care of your debt, that adds up just like real debt and then you have to declare tech bankruptcy.", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:EM That's a higher percentage than I would have expected who — 段落/内容单元:RD I think when we've talked about it, whether you're able t", "source_line_range": [ 53, 71 ] }, { "id": "body-region-5", "text": "ey and i can understand how when you take an afternoon to organize the junk drawer and you feel really good about that even though you didn t really get anything out of that you still have the same amount of stuff i can see how that would be the case it s on one hand frustrating but on the other hand rewarding rd you gain greater control over your environment and i think there s a lot of tech debt that comes from moving fast trying to get out the door fast or optimizing for things that you regret later ey i m not too well versed in it but i know something that our developers are proud of and also complain a lot about is referred to as the monolith so it giveth and it taketh away rd yes the monolith although monoliths are making a comeback i keep seeing hot takes that services are out of control monolith is fine so it depends on what you re working with now ey exactly so interestingly enough related to this or that for what s the preferred what s the best class solution i think for next year especially after listening to and reading through your transcript about your tech debt interview that recently was posted i m going to have to update this question so it s a little bit more specific instead of just referring to a big tech debt and maybe breaking this out so something about monolith versus services something about refactoring versus rewriting something about upgrading versus replacing rd that would be an interesting one are you working on a monolith or service oriented architecture do you have multiple cloud regions what do you optimize your code for ey so to get more specific and maybe also paying the meta community again and ask them to vet if i am going about this the right way and obviously probably listen to more of your interviews before then too rd of course are there other things you re looking at adding for surveys in the future ey i think what we re after the big goal is just getting better and better at understanding the developers that come to stack overflow and i feel like there s just still big groups but they re not specific enough and i want to get closer to that so questions that help me get closer to why you say you re a full stack developer what does that mean to you what exactly do you mean by that what do you like what distinguishes you from another full stack developer and not just because you might be born in a different year or live in a different country something just more characteristic about your job your work the type of person you are i think that s the everlasting challenge rd maybe it s time for some new pulse surveys ey oh yeah great idea love that rd do you not love that ey i love what that is what do you call it it s my version of tech debt research debt em research debt survey debt ey survey debt but after getting these results out for the dev survey i m going to need at least 24 hours before i start thinking about another survey em i was going to say you re just not ready to wrap your brain around a pulse survey ey i love the idea about it i am definitely being sincere but i see my eyes glaze over because just the survey debt is floating in front of my face em timing is everything ey timing is everything music plays rd well it is that time in the show again when we shout out somebody who came on stack overflow and shared a little of their curiosity today we re going to shout out a stellar question badge awarded to frank for asking how to use c in go if you too are curious maybe somebody has dropped an answer there and if you have that answer go share a little knowledge i am ryan donovan i edit the blog here at stack overflow you can send us comments suggestions feedback at podcast stackoverflow com and if you like what you heard today please drop a rating and review em and i am eira may you can find me online if you want to eiramaybe ey i am erin yepis i would love it if you could go to stack overflow and post some new r questions and r answers let s get those people back we need them back em special shout out rd all right everyone we ll talk to you next time outro music plays", "source_text": "EY And I can understand how when you take an afternoon to organize the junk drawer and you feel really good about that even though you didn't really get anything out of that, you still have the same amount of stuff, I can see how that would be the case. It's, on one hand, frustrating, but on the other hand, rewarding.\nRD You gain greater control over your environment. And I think there's a lot of tech debt that comes from moving fast, trying to get out the door fast, or optimizing for things that you regret later.\nEY I'm not too well-versed in it, but I know something that our developers are proud of and also complain a lot about is referred to as ‘the monolith,’ so it giveth and it taketh away.\nRD Yes, the monolith, although monoliths are making a comeback. I keep seeing hot takes that services are out of control, monolith is fine. So it depends on what you're working with now.\nEY Exactly. So interestingly enough, related to this or that for what's the preferred, what's the best class solution, I think for next year, especially after listening to and reading through your transcript about your tech debt interview that recently was posted, I'm going to have to update this question so it's a little bit more specific instead of just referring to a big tech debt and maybe breaking this out. So something about monolith versus services, something about refactoring versus rewriting, something about upgrading versus replacing.\nRD That would be an interesting one. “Are you working on a monolith or service-oriented architecture?” “Do you have multiple cloud regions?” “What do you optimize your code for?”\nEY So to get more specific, and maybe also paying the meta community again and ask them to vet if I am going about this the right way, and obviously probably listen to more of your interviews before then too.\nRD Of course. Are there other things you're looking at adding for surveys in the future?\nEY I think what we're after, the big goal is just getting better and better at understanding the developers that come to Stack Overflow. And I feel like there's just still big groups but they're not specific enough, and I want to get closer to that. So questions that help me get closer to why you say you're a full stack developer. What does that mean to you? What exactly do you mean by that? What do you like? What distinguishes you from another full stack developer? And not just because you might be born in a different year or live in a different country, something just more characteristic about your job, your work, the type of person you are. I think that's the everlasting challenge.\nRD Maybe it's time for some new pulse surveys.\nEY Oh, yeah. Great idea. Love that.\nRD Do you not love that?\nEY I love what that is– what do you call it? It's my version of tech debt. Research debt.\nEM Research debt. Survey debt.\nEY Survey debt. But after getting these results out for the dev survey, I'm going to need at least 24 hours before I start thinking about another survey.\nEM I was going to say, you're just not ready to wrap your brain around a pulse survey.\nEY I love the idea about it. I am definitely being sincere, but I see my eyes glaze over because just the survey debt is floating in front of my face.\nEM Timing is everything.\nEY Timing is everything.\n[music plays]\nRD Well, it is that time in the show again when we shout out somebody who came on Stack Overflow and shared a little of their curiosity. Today we’re going to shout out a Stellar Question Badge, awarded to Frank for asking, “How to use C++ in Go?” If you, too, are curious, maybe somebody has dropped an answer there. And if you have that answer, go share a little knowledge. I am Ryan Donovan. I edit the blog here at Stack Overflow. You can send us comments, suggestions, feedback at podcast@stackoverflow.com. And if you like what you heard today, please drop a rating and review.\nEM And I am Eira May. You can find me online if you want to @EiraMaybe.\nEY I am Erin Yepis. I would love it if you could go to Stack Overflow and post some new R questions and R answers. Let’s get those people back. We need them back.\nEM Special shout out.\nRD All right, everyone. We'll talk to you next time.\n[outro music plays]", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:EY And I can understand how when you take an afternoon to or — 段落/内容单元:[outro music plays]", "source_line_range": [ 72, 97 ] } ], "ending": { "text": "[outro music plays]" } } }, { "id": "article-101", "name": "大道无形我有型:个人帖子首页", "url": "https://www.xueqiu.com/u/1247347556", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "大道无形我有型" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "首页" ] }, { "id": "stable-2", "alternatives": [ "下载App" ] }, { "id": "stable-3", "alternatives": [ "登录" ] }, { "id": "stable-4", "alternatives": [ "大道无形我有型" ] }, { "id": "stable-5", "alternatives": [ "关注" ] }, { "id": "stable-6", "alternatives": [ "粉丝" ] }, { "id": "stable-7", "alternatives": [ "买股票就是买公司。 人们关注我们往往是因为我们做了的那些事情, 其实我们之所以成为我们,很大程度上还因为我们不做的那些事情。 我的能力圈有限,大部分公司我都不了解。我喜欢的公司我会说的,不用问。我偶尔会选择屏蔽我不喜欢的语言和发言者。对那些不好好看我的东西却喜欢乱@我的人,我也是会屏蔽的。" ] }, { "id": "stable-8", "alternatives": [ "帖子" ] }, { "id": "stable-9", "alternatives": [ "回复" ] }, { "id": "stable-10", "alternatives": [ "收藏" ] }, { "id": "stable-11", "alternatives": [ "自选" ] }, { "id": "stable-12", "alternatives": [ "组合" ] }, { "id": "stable-13", "alternatives": [ "全部" ] }, { "id": "stable-14", "alternatives": [ "热门" ] }, { "id": "stable-15", "alternatives": [ "原发" ] }, { "id": "stable-16", "alternatives": [ "长文" ] }, { "id": "stable-17", "alternatives": [ "讨论" ] }, { "id": "stable-18", "alternatives": [ "转发" ] }, { "id": "stable-19", "alternatives": [ "赞" ] }, { "id": "stable-20", "alternatives": [ "展开" ] }, { "id": "stable-21", "alternatives": [ "查看对话" ] }, { "id": "stable-22", "alternatives": [ "下一页" ] }, { "id": "stable-23", "alternatives": [ "他的勋章" ] }, { "id": "stable-24", "alternatives": [ "了解更多" ] }, { "id": "stable-25", "alternatives": [ "雪球十年知己" ] }, { "id": "stable-26", "alternatives": [ "他的认证" ] }, { "id": "stable-27", "alternatives": [ "用户推荐" ] }, { "id": "stable-28", "alternatives": [ "换一换" ] }, { "id": "stable-29", "alternatives": [ "A股开户" ] }, { "id": "stable-30", "alternatives": [ "雪球基金" ] }, { "id": "stable-31", "alternatives": [ "投资者教育" ] }, { "id": "stable-32", "alternatives": [ "风险提示" ] }, { "id": "stable-33", "alternatives": [ "风险提示:雪球里任何用户或者嘉宾的发言,都有其特定立场,投资决策需要建立在独立思考之上" ] }, { "id": "stable-34", "alternatives": [ "其他建议反馈欢迎点击#我给雪球提建议# 如受到欺诈信息骚扰请至 #防诈骗举报专区#" ] }, { "id": "stable-35", "alternatives": [ "互联网违法和不良信息投诉:01061840634" ] }, { "id": "stable-36", "alternatives": [ "tousu@xueqiu.com" ] }, { "id": "stable-37", "alternatives": [ "举报中心" ] }, { "id": "stable-38", "alternatives": [ "侵权投诉指引" ] }, { "id": "stable-39", "alternatives": [ "雪球服务协议" ] }, { "id": "stable-40", "alternatives": [ "雪球隐私政策" ] }, { "id": "stable-41", "alternatives": [ "北京雪球信息科技有限公司" ] }, { "id": "stable-42", "alternatives": [ "京公网安备 11010502040379号" ] }, { "id": "stable-43", "alternatives": [ "京ICP证100666号" ] }, { "id": "stable-44", "alternatives": [ "京ICP备10040543" ] }, { "id": "stable-45", "alternatives": [ "京金信备〔2022〕3号" ] }, { "id": "stable-46", "alternatives": [ "营业执照" ] }, { "id": "stable-47", "alternatives": [ "证券业协会会员单位(代码817027)" ] }, { "id": "stable-48", "alternatives": [ "广播电视节目制作经营许可证: (京)字第08638号" ] }, { "id": "stable-49", "alternatives": [ "出版物经营许可证" ] }, { "id": "stable-50", "alternatives": [ "人工智能服务登记编号:Beijing-XueQiuHuiJian-2S0033" ] }, { "id": "stable-51", "alternatives": [ "常见问题" ] }, { "id": "stable-52", "alternatives": [ "加入我们" ] }, { "id": "stable-53", "alternatives": [ "关于雪球" ] }, { "id": "stable-54", "alternatives": [ "立即登录/注册" ] }, { "id": "stable-55", "alternatives": [ "搜索" ], "visible_control": { "selector": "input[placeholder=\"搜索\"]", "attribute": "placeholder" } }, { "id": "stable-56", "alternatives": [ "搜TA的帖子" ], "visible_control": { "selector": "input[placeholder=\"搜TA的帖子\"]", "attribute": "placeholder" } } ] }, "rule_review": { "status": "reviewed", "reason": "Two independently captured automatic initial loads each displayed 20 qualified records. Require at least 16 distinct owned post links with author and nonempty visible text, permitting attributed quotes for empty outer text. Retain page identity and stable labels. No runtime reference, fixed wording or current membership is required; this is coverage, not full-text completeness or freshness." }, "ground_truth_main_content": "", "source_benchmark": { "mode": "article_post_collection", "post_contract": { "version": 2, "hosts": [ "xueqiu.com", "www.xueqiu.com" ], "entry_path": "/\\d+/\\d+", "html_record_selector": "article.timeline__item", "html_permalink_selector": "a.date-and-source", "html_author_selector": ".user-name", "html_body_selector": ".timeline__item__content > .content > div:first-child", "html_quote_selector": "blockquote.timeline__item__forward", "quote_markers": [ "Quote", "引用" ], "allow_empty_outer_with_quotes": true, "minimum_posts": 16, "ignored_labels": [ "bookmark", "bookmarks", "like", "likes", "load more", "log in", "permalink", "read more", "replies", "reply", "report", "repost", "reposts", "share", "show more", "sign in", "today", "view", "views", "yesterday", "今天", "分享", "加载更多", "回复", "展开", "收藏", "昨天", "查看", "查看更多", "注册", "点赞", "登录", "转发" ], "unavailable_notices": [], "non_author_labels": [ "today", "yesterday", "date", "time", "permalink", "view post", "post", "今天", "昨天", "详情", "查看帖子" ] }, "qualification_proof": { "path": "article-reference-inputs-v1/article-101/displayed-scope-r4/qualification-posts.json", "sha256": "b77427a943ac17e46a26375e95c8474de9e8a380a51a6fe1b684a08360671f54" } } }, { "id": "article-102", "name": "大道无形我有型:短帖与引用原帖", "url": "https://www.xueqiu.com/1247347556/412864128", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "你的意思是从明天下午的角度看还是20年后的某天下午的角度看?" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-2", "alternatives": [ "大道无形我有型" ] }, { "id": "stable-3", "alternatives": [ "蔷薇女士" ] }, { "id": "stable-4", "alternatives": [ "首页" ] }, { "id": "stable-5", "alternatives": [ "下载App" ] }, { "id": "stable-6", "alternatives": [ "登录" ] }, { "id": "stable-7", "alternatives": [ "关注" ] }, { "id": "stable-8", "alternatives": [ "风险提示:用户发表的所有文章仅代表个人观点,与雪球的立场无关。投资决策需建立在独立思考之上。" ] }, { "id": "stable-9", "alternatives": [ "讨论" ] }, { "id": "stable-10", "alternatives": [ "投诉" ] }, { "id": "stable-11", "alternatives": [ "仅在正文下讨论" ] }, { "id": "stable-12", "alternatives": [ "发布" ] }, { "id": "stable-13", "alternatives": [ "热门话题" ] }, { "id": "stable-14", "alternatives": [ "热股榜" ] }, { "id": "stable-15", "alternatives": [ "更多" ] }, { "id": "stable-16", "alternatives": [ "全球" ] }, { "id": "stable-17", "alternatives": [ "沪深" ] }, { "id": "stable-18", "alternatives": [ "港股" ] }, { "id": "stable-19", "alternatives": [ "美股" ] }, { "id": "stable-20", "alternatives": [ "1小时内最热" ] }, { "id": "stable-21", "alternatives": [ "24小时内最热" ] }, { "id": "stable-22", "alternatives": [ "涨跌幅榜" ] }, { "id": "stable-23", "alternatives": [ "涨幅榜" ] }, { "id": "stable-24", "alternatives": [ "跌幅榜" ] }, { "id": "stable-25", "alternatives": [ "热门基金" ] }, { "id": "stable-26", "alternatives": [ "常见问题" ] }, { "id": "stable-27", "alternatives": [ "关于雪球" ] }, { "id": "stable-28", "alternatives": [ "投资者教育" ] }, { "id": "stable-29", "alternatives": [ "风险提示" ] }, { "id": "stable-30", "alternatives": [ "营业执照" ] }, { "id": "stable-31", "alternatives": [ "侵权投诉指引" ] }, { "id": "stable-32", "alternatives": [ "出版物经营许可证" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete short original post and quoted original source content independently reviewed without expansion; source href retained in links.json. Quoted metadata timestamps/reactions excluded. No separate visible article title: exact original-post opening binds identity. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "ground_truth_main_content": "你的意思是从明天下午的角度看还是20年后的某天下午的角度看?\n@蔷薇女士\n:\n段总\n,\n想问下\n,\n全球经济危机对股市的影响\n,\n是投资的好时机还是应该留现金比较好@大道无形我有型", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 1, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "你 的 意 思 是 从 明 天 下 午 的 角 度 看 还 是 20 年 后 的 某 天 下 午 的 角 度 看 蔷 薇 女 士 段 总 想 问 下 全 球 经 济 危 机 对 股 市 的 影 响 是 投 资 的 好 时 机 还 是 应 该 留 现 金 比 较 好 大 道 无 形 我 有 型", "source_text": "你的意思是从明天下午的角度看还是20年后的某天下午的角度看?\n@蔷薇女士\n:\n段总\n,\n想问下\n,\n全球经济危机对股市的影响\n,\n是投资的好时机还是应该留现金比较好@大道无形我有型", "segmentation_method": "reviewed_source_semantics", "label": "开篇:你的意思是从明天下午的角度看还是20年后的某天下午的角度看?", "source_line_range": [ 1, 10 ] } ], "ending": { "text": "你的意思是从明天下午的角度看还是20年后的某天下午的角度看?\n@蔷薇女士\n:\n段总\n,\n想问下\n,\n全球经济危机对股市的影响\n,\n是投资的好时机还是应该留现金比较好@大道无形我有型" } }, "source_benchmark": { "comment_qualification_proof": { "path": "article-completeness-r5/article-102/comment-qualification-reference-r5.json", "sha256": "2d7d94f2ae1cafba90e5a87f6585fc3da1b9402bb6373132d71c533353b3cbb4", "chars": 773, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 0, "qualification_only": true } } }, { "id": "article-103", "name": "段永平谈CRWV:不懂不碰,但别把不可持续当成马上暴雷", "url": "https://www.xueqiu.com/7736566551/412842048", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "段永平谈CRWV" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "段永平谈CRWV" ] }, { "id": "stable-2", "alternatives": [ "多伦多的大道信徒" ] }, { "id": "stable-3", "alternatives": [ "多伦多的大道信徒的雪球专栏" ] }, { "id": "stable-4", "alternatives": [ "首页" ] }, { "id": "stable-5", "alternatives": [ "下载App" ] }, { "id": "stable-6", "alternatives": [ "登录" ] }, { "id": "stable-7", "alternatives": [ "关注" ] }, { "id": "stable-8", "alternatives": [ "风险提示:用户发表的所有文章仅代表个人观点,与雪球的立场无关。投资决策需建立在独立思考之上。" ] }, { "id": "stable-9", "alternatives": [ "讨论" ] }, { "id": "stable-10", "alternatives": [ "投诉" ] }, { "id": "stable-11", "alternatives": [ "仅在正文下讨论" ] }, { "id": "stable-12", "alternatives": [ "发布" ] }, { "id": "stable-13", "alternatives": [ "热门话题" ] }, { "id": "stable-14", "alternatives": [ "热股榜" ] }, { "id": "stable-15", "alternatives": [ "更多" ] }, { "id": "stable-16", "alternatives": [ "全球" ] }, { "id": "stable-17", "alternatives": [ "沪深" ] }, { "id": "stable-18", "alternatives": [ "港股" ] }, { "id": "stable-19", "alternatives": [ "美股" ] }, { "id": "stable-20", "alternatives": [ "1小时内最热" ] }, { "id": "stable-21", "alternatives": [ "24小时内最热" ] }, { "id": "stable-22", "alternatives": [ "涨跌幅榜" ] }, { "id": "stable-23", "alternatives": [ "涨幅榜" ] }, { "id": "stable-24", "alternatives": [ "跌幅榜" ] }, { "id": "stable-25", "alternatives": [ "热门基金" ] }, { "id": "stable-26", "alternatives": [ "常见问题" ] }, { "id": "stable-27", "alternatives": [ "关于雪球" ] }, { "id": "stable-28", "alternatives": [ "投资者教育" ] }, { "id": "stable-29", "alternatives": [ "风险提示" ] }, { "id": "stable-30", "alternatives": [ "营业执照" ] }, { "id": "stable-31", "alternatives": [ "侵权投诉指引" ] }, { "id": "stable-32", "alternatives": [ "出版物经营许可证" ] }, { "id": "stable-33", "alternatives": [ "全部讨论" ] }, { "id": "stable-34", "alternatives": [ "最热" ] }, { "id": "stable-35", "alternatives": [ "最新" ] }, { "id": "stable-36", "alternatives": [ "最早" ] }, { "id": "stable-37", "alternatives": [ "已过滤部分评论" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete prose with all five named argument sections, summary and final personal-understanding disclaimer reviewed in full-page screenshot. Punctuation line breaks preserve rendered DOM; no hidden or expanded text used. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "段永平谈CRWV:不懂不碰 , 但别把\"不可持续\"当成\"马上暴雷\"" ], "html_selector": "h1.article__bd__title,h1,h2,[role=\"heading\"]" }, "comment_contract": { "record_selector": ".comment__item, .comment__item__reply > .items", "author_selector": ".comment__item__main__hd > a.user-name, :scope > a.user-name:first-of-type", "body_selector": ".comment__item__main > p, :scope > .content", "id_attribute": "data-id", "section_markers": [ "全部讨论", "评论" ], "version": 2, "minimum_comments": 20, "text_scope": { "body_end": "学的\n,\n是他提问的方式:这东西我懂吗?用户买的到底是什么?风险什么时候兑现?钱是谁付的?\n\n想清楚这几个问题\n,\n比追随任何人的观点都重要\n。\n\n以上仅为个人对公开发言的理解\n,\n不构成投资建议\n。", "end_markers": [ "抱歉,本帖讨论暂时受限", "热门话题", "热股榜" ] }, "ignored_labels": [ "add a comment", "leave a reply", "like", "likes", "load more", "log in", "login", "read more", "register", "replies", "reply", "report", "share", "show more", "sign in", "加载更多", "发表评论", "回复", "展开", "展开回复", "查看更多", "注册", "添加评论", "点赞", "登录", "登录后评论" ], "unavailable_notices": [ "[deleted]", "[removed]", "[内容不可见]", "[已删除]", "this comment has been hidden", "this comment has been hidden (marked as spam)" ] }, "comment_qualification_proof": { "path": "article-completeness-r5/article-103/comment-qualification-reference-r5.json", "sha256": "56c71d8e847d721e3a1bb5087a7e152b44b7e6e01d46514e7f9dd66d815df1a7", "chars": 6697, "record_count": 29 }, "comment_presence_review": { "status": "visible_text", "basis": "Five image-only records have no ordinary visible comment text and are excluded. Twenty-four textual records remain; no OCR or image-alt prose is invented.", "observed_record_count": 29, "qualification_only": true } }, "ground_truth_main_content": "段永平谈CRWV:不懂不碰\n,\n但别把\"不可持续\"当成\"马上暴雷\"\n\n最近CRWV暴雷与否争议很大\n,\n段永平(@大道无形我有型)在相关讨论下连续回复了几条\n。\n把这些回复串起来看\n,\n能清楚看到他的思考方式\n,\n比结论本身更有价值\n。\n\n一\n、\n先划清能力圈\n\n有人问光模块是不是也有泡沫\n,\n他说:\"光模块完全不了解\n,\n虽然知道最近很热门\n,\n但我不得其门而入啊\n。\n\"他强调自己懂一些半导体\n,\n因为大学学的就是这个\n,\n但光模块不在其中\n。\n\n热门不等于看得懂\n。\n不懂就不评价\n、\n不参与\n,\n这是他一贯的原则\n。\n\n二\n、\n用\"生意本质\"看行业\n\n谈到光伏未来会不会因为光储一体化而摆脱同质化\n,\n他说:\"用户得到的产品就是电\n,\n大家关心的问题就只有价格\n,\n所以很可能还是高度同质化的\n。\n\"\n\n技术形态再怎么变\n,\n只要用户买到的东西没有区别\n,\n竞争就只剩价格\n。\n这是判断一门生意好坏最朴素也最有效的标准\n。\n\n三\n、\n看空也要考虑时间\n\n有人认为CRWV高息借贷搞算力租赁\n,\n模式不可持续\n,\n需求一放缓风险就很大\n。\n他回应:\"问题是需求放缓可能是5年后的事情\n,\n那时这些公司可能已赚得盆满钵满了\n。\n\"\n\n这句话很关键\n。\n\"长期有风险\"和\"现在就会出事\"是两回事\n。\n如果需求还能旺好几年\n,\n公司可能先把钱赚回来\n、\n把债还掉\n,\n到时风险已大大降低\n。\n逻辑正确但时机错误\n,\n照样会亏钱\n。\n\n四\n、\n拒绝被当成背书\n\n随后有人借他的话大谈CRWV能涨10年\n、\n远没见顶\n,\n还夸他\"不赚快钱\"\n。\n他只回了一句:\"我啥时说过不赚快钱了?我只说过我不知道怎么赚快钱而已\n。\n\"\n\n对看多论点\n,\n他一个字都没接\n。\n纠正被误读的话\n,\n但不给任何个股背书\n。\n\n五\n、\n先搞清楚谁在付钱\n\n有人追问\"盆里钵里的钱是谁的\"\n,\n他反问:\"你要是不知道谁在付钱\n,\n你在这里忙啥?\"又有人质疑他没看过CRWV报表\n,\n他坦然承认:\"我不看任何公司的财报的\n。\n\"\n\n两句话连起来\n,\n意思很明确:研究一家公司\n,\n第一步是看懂生意\n,\n搞清楚钱从哪来\n、\n客户为什么付钱\n。\n这是对生意的理解\n,\n不是报表上的数字游戏\n。\n\n总结\n\n段永平对CRWV的态度可以概括为:不懂\n、\n不碰\n、\n不预测\n。\n他既没有看多\n,\n也不认同简单粗暴的看空\n,\n只是在纠正讨论中的逻辑漏洞\n。\n\n对普通投资者来说\n,\n比\"段永平怎么看CRWV\"更值得学的\n,\n是他提问的方式:这东西我懂吗?用户买的到底是什么?风险什么时候兑现?钱是谁付的?\n\n想清楚这几个问题\n,\n比追随任何人的观点都重要\n。\n\n以上仅为个人对公开发言的理解\n,\n不构成投资建议\n。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "段 永 平 谈 crwv 不 懂 不 碰 但 别 把 不 可 持 续 当 成 马 上 暴 雷 最 近 crwv 暴 雷 与 否 争 议 很 大 段 永 平 大 道 无 形 我 有 型 在 相 关 讨 论 下 连 续 回 复 了 几 条 把 这 些 回 复 串 起 来 看 能 清 楚 看 到 他 的 思 考 方 式 比 结 论 本 身 更 有 价 值 一 先 划 清 能 力 圈 有 人 问 光 模 块 是 不 是 也 有 泡 沫 他 说 光 模 块 完 全 不 了 解 虽 然 知 道 最 近 很 热 门 但 我 不 得 其 门 而 入 啊 他 强 调 自 己 懂 一 些 半 导 体 因 为 大 学 学 的 就 是 这 个 但 光 模 块 不 在 其 中", "source_text": "段永平谈CRWV:不懂不碰\n,\n但别把\"不可持续\"当成\"马上暴雷\"\n\n最近CRWV暴雷与否争议很大\n,\n段永平(@大道无形我有型)在相关讨论下连续回复了几条\n。\n把这些回复串起来看\n,\n能清楚看到他的思考方式\n,\n比结论本身更有价值\n。\n\n一\n、\n先划清能力圈\n\n有人问光模块是不是也有泡沫\n,\n他说:\"光模块完全不了解\n,\n虽然知道最近很热门\n,\n但我不得其门而入啊\n。\n\"他强调自己懂一些半导体\n,\n因为大学学的就是这个\n,\n但光模块不在其中\n。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:段永平谈CRWV:不懂不碰 — 段落/内容单元:有人问光模块是不是也有泡沫", "source_line_range": [ 1, 34 ] }, { "id": "body-region-2", "text": "热 门 不 等 于 看 得 懂 不 懂 就 不 评 价 不 参 与 这 是 他 一 贯 的 原 则 二 用 生 意 本 质 看 行 业 谈 到 光 伏 未 来 会 不 会 因 为 光 储 一 体 化 而 摆 脱 同 质 化 他 说 用 户 得 到 的 产 品 就 是 电 大 家 关 心 的 问 题 就 只 有 价 格 所 以 很 可 能 还 是 高 度 同 质 化 的 技 术 形 态 再 怎 么 变 只 要 用 户 买 到 的 东 西 没 有 区 别 竞 争 就 只 剩 价 格 这 是 判 断 一 门 生 意 好 坏 最 朴 素 也 最 有 效 的 标 准 三 看 空 也 要 考 虑 时 间", "source_text": "热门不等于看得懂\n。\n不懂就不评价\n、\n不参与\n,\n这是他一贯的原则\n。\n\n二\n、\n用\"生意本质\"看行业\n\n谈到光伏未来会不会因为光储一体化而摆脱同质化\n,\n他说:\"用户得到的产品就是电\n,\n大家关心的问题就只有价格\n,\n所以很可能还是高度同质化的\n。\n\"\n\n技术形态再怎么变\n,\n只要用户买到的东西没有区别\n,\n竞争就只剩价格\n。\n这是判断一门生意好坏最朴素也最有效的标准\n。\n\n三\n、\n看空也要考虑时间", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:热门不等于看得懂 — 段落/内容单元:三", "source_line_range": [ 35, 70 ] }, { "id": "body-region-3", "text": "有 人 认 为 crwv 高 息 借 贷 搞 算 力 租 赁 模 式 不 可 持 续 需 求 一 放 缓 风 险 就 很 大 他 回 应 问 题 是 需 求 放 缓 可 能 是 5 年 后 的 事 情 那 时 这 些 公 司 可 能 已 赚 得 盆 满 钵 满 了 这 句 话 很 关 键 长 期 有 风 险 和 现 在 就 会 出 事 是 两 回 事 如 果 需 求 还 能 旺 好 几 年 公 司 可 能 先 把 钱 赚 回 来 把 债 还 掉 到 时 风 险 已 大 大 降 低 逻 辑 正 确 但 时 机 错 误 照 样 会 亏 钱 四 拒 绝 被 当 成 背 书 随 后 有 人 借 他 的 话 大 谈 crwv 能 涨 10 年 远 没 见 顶 还 夸 他 不 赚 快 钱 他 只 回 了 一 句 我 啥 时 说 过 不 赚 快 钱 了 我 只 说 过 我 不 知 道 怎 么 赚 快 钱 而 已", "source_text": "有人认为CRWV高息借贷搞算力租赁\n,\n模式不可持续\n,\n需求一放缓风险就很大\n。\n他回应:\"问题是需求放缓可能是5年后的事情\n,\n那时这些公司可能已赚得盆满钵满了\n。\n\"\n\n这句话很关键\n。\n\"长期有风险\"和\"现在就会出事\"是两回事\n。\n如果需求还能旺好几年\n,\n公司可能先把钱赚回来\n、\n把债还掉\n,\n到时风险已大大降低\n。\n逻辑正确但时机错误\n,\n照样会亏钱\n。\n\n四\n、\n拒绝被当成背书\n\n随后有人借他的话大谈CRWV能涨10年\n、\n远没见顶\n,\n还夸他\"不赚快钱\"\n。\n他只回了一句:\"我啥时说过不赚快钱了?我只说过我不知道怎么赚快钱而已\n。\n\"", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:有人认为CRWV高息借贷搞算力租赁 — 段落/内容单元:随后有人借他的话大谈CRWV能涨10年", "source_line_range": [ 71, 113 ] }, { "id": "body-region-4", "text": "对 看 多 论 点 他 一 个 字 都 没 接 纠 正 被 误 读 的 话 但 不 给 任 何 个 股 背 书 五 先 搞 清 楚 谁 在 付 钱 有 人 追 问 盆 里 钵 里 的 钱 是 谁 的 他 反 问 你 要 是 不 知 道 谁 在 付 钱 你 在 这 里 忙 啥 又 有 人 质 疑 他 没 看 过 crwv 报 表 他 坦 然 承 认 我 不 看 任 何 公 司 的 财 报 的 两 句 话 连 起 来 意 思 很 明 确 研 究 一 家 公 司 第 一 步 是 看 懂 生 意 搞 清 楚 钱 从 哪 来 客 户 为 什 么 付 钱 这 是 对 生 意 的 理 解 不 是 报 表 上 的 数 字 游 戏 总 结", "source_text": "对看多论点\n,\n他一个字都没接\n。\n纠正被误读的话\n,\n但不给任何个股背书\n。\n\n五\n、\n先搞清楚谁在付钱\n\n有人追问\"盆里钵里的钱是谁的\"\n,\n他反问:\"你要是不知道谁在付钱\n,\n你在这里忙啥?\"又有人质疑他没看过CRWV报表\n,\n他坦然承认:\"我不看任何公司的财报的\n。\n\"\n\n两句话连起来\n,\n意思很明确:研究一家公司\n,\n第一步是看懂生意\n,\n搞清楚钱从哪来\n、\n客户为什么付钱\n。\n这是对生意的理解\n,\n不是报表上的数字游戏\n。\n\n总结", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:对看多论点 — 段落/内容单元:两句话连起来", "source_line_range": [ 114, 153 ] }, { "id": "body-region-5", "text": "段 永 平 对 crwv 的 态 度 可 以 概 括 为 不 懂 不 碰 不 预 测 他 既 没 有 看 多 也 不 认 同 简 单 粗 暴 的 看 空 只 是 在 纠 正 讨 论 中 的 逻 辑 漏 洞 对 普 通 投 资 者 来 说 比 段 永 平 怎 么 看 crwv 更 值 得 学 的 是 他 提 问 的 方 式 这 东 西 我 懂 吗 用 户 买 的 到 底 是 什 么 风 险 什 么 时 候 兑 现 钱 是 谁 付 的 想 清 楚 这 几 个 问 题 比 追 随 任 何 人 的 观 点 都 重 要 以 上 仅 为 个 人 对 公 开 发 言 的 理 解 不 构 成 投 资 建 议", "source_text": "段永平对CRWV的态度可以概括为:不懂\n、\n不碰\n、\n不预测\n。\n他既没有看多\n,\n也不认同简单粗暴的看空\n,\n只是在纠正讨论中的逻辑漏洞\n。\n\n对普通投资者来说\n,\n比\"段永平怎么看CRWV\"更值得学的\n,\n是他提问的方式:这东西我懂吗?用户买的到底是什么?风险什么时候兑现?钱是谁付的?\n\n想清楚这几个问题\n,\n比追随任何人的观点都重要\n。\n\n以上仅为个人对公开发言的理解\n,\n不构成投资建议\n。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:段永平对CRWV的态度可以概括为:不懂 — 段落/内容单元:以上仅为个人对公开发言的理解", "source_line_range": [ 154, 181 ] } ], "ending": { "text": "学的\n,\n是他提问的方式:这东西我懂吗?用户买的到底是什么?风险什么时候兑现?钱是谁付的?\n\n想清楚这几个问题\n,\n比追随任何人的观点都重要\n。\n\n以上仅为个人对公开发言的理解\n,\n不构成投资建议\n。" } } }, { "id": "article-104", "name": "能力圈不在于多大,在于敢说“我不懂”", "url": "https://www.xueqiu.com/7736566551/409968041", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "能力圈不在于多大" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "多伦多的大道信徒" ] }, { "id": "stable-2", "alternatives": [ "2026-09-20 23:11" ] }, { "id": "stable-3", "alternatives": [ "首页" ] }, { "id": "stable-4", "alternatives": [ "下载App" ] }, { "id": "stable-5", "alternatives": [ "风险提示:用户发表的所有文章仅代表个人观点,与雪球的立场无关。投资决策需建立在独立思考之上。" ] }, { "id": "stable-6", "alternatives": [ "转发" ] }, { "id": "stable-7", "alternatives": [ "讨论" ] }, { "id": "stable-8", "alternatives": [ "投诉" ] }, { "id": "stable-9", "alternatives": [ "仅在正文下讨论" ] }, { "id": "stable-10", "alternatives": [ "发布" ] }, { "id": "stable-11", "alternatives": [ "最热" ] }, { "id": "stable-12", "alternatives": [ "热门话题" ] }, { "id": "stable-13", "alternatives": [ "热股榜" ] }, { "id": "stable-14", "alternatives": [ "更多" ] }, { "id": "stable-15", "alternatives": [ "全球" ] }, { "id": "stable-16", "alternatives": [ "沪深" ] }, { "id": "stable-17", "alternatives": [ "港股" ] }, { "id": "stable-18", "alternatives": [ "美股" ] }, { "id": "stable-19", "alternatives": [ "1小时内最热" ] }, { "id": "stable-20", "alternatives": [ "24小时内最热" ] }, { "id": "stable-21", "alternatives": [ "涨跌幅榜" ] }, { "id": "stable-22", "alternatives": [ "涨幅榜" ] }, { "id": "stable-23", "alternatives": [ "跌幅榜" ] }, { "id": "stable-24", "alternatives": [ "热门基金" ] }, { "id": "stable-25", "alternatives": [ "年化(近5年)" ] }, { "id": "stable-26", "alternatives": [ "常见问题" ] }, { "id": "stable-27", "alternatives": [ "关于雪球" ] }, { "id": "stable-28", "alternatives": [ "投资者教育" ] }, { "id": "stable-29", "alternatives": [ "风险提示" ] }, { "id": "stable-30", "alternatives": [ "XUEQIU.COM" ] }, { "id": "stable-31", "alternatives": [ "北京雪球信息科技有限公司" ] }, { "id": "stable-32", "alternatives": [ "京公网安备 11010502040379号" ] }, { "id": "stable-33", "alternatives": [ "京ICP证100666号" ] }, { "id": "stable-34", "alternatives": [ "京ICP备10040543" ] }, { "id": "stable-35", "alternatives": [ "京金信备〔2022〕3号" ] }, { "id": "stable-36", "alternatives": [ "营业执照" ] }, { "id": "stable-37", "alternatives": [ "侵权投诉指引" ] }, { "id": "stable-38", "alternatives": [ "出版物经营许可证" ] }, { "id": "body-disclaimer", "alternatives": [ "个人理解,不构成投资建议,也不代表对文中提到的公司有任何看法。", "个人理解\n,\n不构成投资建议\n,\n也不代表对文中提到的公司有任何看法\n。" ] }, { "id": "body-column-source", "alternatives": [ "来自多伦多的大道信徒的雪球专栏", "来自\n多伦多的大道信徒的雪球专栏" ] }, { "id": "visible-search", "alternatives": [ "搜索" ], "visible_control": { "selector": "nav .nav__search input[name=\"q\"]", "attribute": "placeholder" } } ] }, "rule_review": { "status": "reviewed", "reason": "User approved exact replacementURL in cohortrevision2. Independent root direct initial DOM/AX/screenshot establish complete standalone .article__bd; all ordinary paragraphs, original authored ending/disclaimer and owned links retained. One source-hidden attribution paragraph and image-only lettering are excluded. Article and ancestors visible/unclipped; bottomright nonmodal login promotion does not overlap article. No clicks, expansion, input, login or scrolling performed. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "source_benchmark": { "title_contract": { "version": 1, "alternatives": [ "能力圈不在于多大 , 在于敢说\"我不懂\"" ], "html_selector": "h1.article__bd__title,h1,h2,[role=\"heading\"]" }, "comment_qualification_proof": { "path": "article-completeness-r5/article-104/comment-qualification-reference-r5.json", "sha256": "1ac668ace05df392ea109378f5b87ca8de359914003552e11074de4a824a8103", "chars": 805, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Saved complete initial-page capture and historical source inspected; interaction-dependent comments excluded by existing qualification.", "observed_record_count": 0, "qualification_only": true } }, "ground_truth_main_content": "能力圈不在于多大,在于敢说\"我不懂\"\n\n来自多伦多的大道信徒的雪球专栏\n\n大道:我完全不了解这个行业\n\n球友问大道:万辰集团、零食很忙这类量贩零食企业,对上游议价能力强,砍掉中间环节,让利消费者的同时自己也赚钱。这种靠强议价和供应链效率建立的优势,算不算稳固的壁垒?算不算好生意?\n\n问题写了一百多字,逻辑完整,还贴心地套用了大道自己的分析框架。\n\n大道答:我完全不了解这个行业。\n\n就这一句。我的理解有三点。\n\n一、这不是敷衍,这就是答案。 很多人会觉得大道没回答问题。其实他回答了,而且是最诚实的那种回答。不懂不做的前一步,是不懂不说。他的一句评价可能影响很多人的买卖决定,在没研究过的行业上随口给个判断,才是真的不负责任。\n\n二、注意\"完全\"两个字。 他没说\"不太了解\",没说\"没怎么看过\",说的是\"完全不了解\"。一点余地不留,也不给人脑补的空间。以他的商业阅历,就零售和供应链聊几句看起来很有道理的话毫无难度,但他选择不说。能力圈的关键不在于圈有多大,而在于清楚边界在哪,并且老老实实待在里面。\n\n三、框架再好,也替代不了对生意的理解。 提问者其实是想让大道用\"好生意\"的框架帮他套一下结论。但框架只是工具,判断一门生意好不好,需要知道这个行业的竞争格局、加盟商的真实回报、消费者的忠诚度、十年后还在不在。这些没有捷径,别人也替不了你。大道没法替他懂,他也没法借大道的嘴让自己懂。\n\n把这两天的三条回复放在一起看,挺有意思:\n\n不用margin:不借钱\n\n不怎么需要天赋:难的是做到\n\n完全不了解这个行业:不懂不做\n\n三句话都很短,说的是同一件事。投资里真正值钱的那几条原则,没有一条是复杂的,难就难在几十年如一日地守着。身家到了他这个量级,还能毫无负担地说出\"我完全不了解\",这本身就是答案的一部分。\n\n反过来想想我们自己:有多少仓位,是建立在\"我大概懂\"上面的?\n\n个人理解,不构成投资建议,也不代表对文中提到的公司有任何看法。", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "能 力 圈 不 在 于 多 大 在 于 敢 说 我 不 懂 来 自 多 伦 多 的 大 道 信 徒 的 雪 球 专 栏 大 道 我 完 全 不 了 解 这 个 行 业 球 友 问 大 道 万 辰 集 团 零 食 很 忙 这 类 量 贩 零 食 企 业 对 上 游 议 价 能 力 强 砍 掉 中 间 环 节 让 利 消 费 者 的 同 时 自 己 也 赚 钱 这 种 靠 强 议 价 和 供 应 链 效 率 建 立 的 优 势 算 不 算 稳 固 的 壁 垒 算 不 算 好 生 意 问 题 写 了 一 百 多 字 逻 辑 完 整 还 贴 心 地 套 用 了 大 道 自 己 的 分 析 框 架", "source_text": "能力圈不在于多大,在于敢说\"我不懂\"\n\n来自多伦多的大道信徒的雪球专栏\n\n大道:我完全不了解这个行业\n\n球友问大道:万辰集团、零食很忙这类量贩零食企业,对上游议价能力强,砍掉中间环节,让利消费者的同时自己也赚钱。这种靠强议价和供应链效率建立的优势,算不算稳固的壁垒?算不算好生意?\n\n问题写了一百多字,逻辑完整,还贴心地套用了大道自己的分析框架。", "segmentation_method": "reviewed_source_semantics", "label": "开篇:能力圈不在于多大,在于敢说\"我不懂\" — 段落/内容单元:问题写了一百多字,逻辑完整,还贴心地套用了大道自己的分析框架。", "source_line_range": [ 1, 10 ] }, { "id": "body-region-2", "text": "大 道 答 我 完 全 不 了 解 这 个 行 业 就 这 一 句 我 的 理 解 有 三 点 一 这 不 是 敷 衍 这 就 是 答 案 很 多 人 会 觉 得 大 道 没 回 答 问 题 其 实 他 回 答 了 而 且 是 最 诚 实 的 那 种 回 答 不 懂 不 做 的 前 一 步 是 不 懂 不 说 他 的 一 句 评 价 可 能 影 响 很 多 人 的 买 卖 决 定 在 没 研 究 过 的 行 业 上 随 口 给 个 判 断 才 是 真 的 不 负 责 任", "source_text": "大道答:我完全不了解这个行业。\n\n就这一句。我的理解有三点。\n\n一、这不是敷衍,这就是答案。 很多人会觉得大道没回答问题。其实他回答了,而且是最诚实的那种回答。不懂不做的前一步,是不懂不说。他的一句评价可能影响很多人的买卖决定,在没研究过的行业上随口给个判断,才是真的不负责任。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:大道答:我完全不了解这个行业。 — 段落/内容单元:一、这不是敷衍,这就是答案。 很多人会觉得大道没回答问题。其实他回答了,而且是最诚实的那种回答。不懂不做的前一步,是不懂", "source_line_range": [ 11, 16 ] }, { "id": "body-region-3", "text": "二 注 意 完 全 两 个 字 他 没 说 不 太 了 解 没 说 没 怎 么 看 过 说 的 是 完 全 不 了 解 一 点 余 地 不 留 也 不 给 人 脑 补 的 空 间 以 他 的 商 业 阅 历 就 零 售 和 供 应 链 聊 几 句 看 起 来 很 有 道 理 的 话 毫 无 难 度 但 他 选 择 不 说 能 力 圈 的 关 键 不 在 于 圈 有 多 大 而 在 于 清 楚 边 界 在 哪 并 且 老 老 实 实 待 在 里 面", "source_text": "二、注意\"完全\"两个字。 他没说\"不太了解\",没说\"没怎么看过\",说的是\"完全不了解\"。一点余地不留,也不给人脑补的空间。以他的商业阅历,就零售和供应链聊几句看起来很有道理的话毫无难度,但他选择不说。能力圈的关键不在于圈有多大,而在于清楚边界在哪,并且老老实实待在里面。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:二、注意\"完全\"两个字。 他没说\"不太了解\",没说\"没怎么看过\",说的是\"完全不了解\"。一点余地不留,也不给人脑补的空间", "source_line_range": [ 17, 18 ] }, { "id": "body-region-4", "text": "三 框 架 再 好 也 替 代 不 了 对 生 意 的 理 解 提 问 者 其 实 是 想 让 大 道 用 好 生 意 的 框 架 帮 他 套 一 下 结 论 但 框 架 只 是 工 具 判 断 一 门 生 意 好 不 好 需 要 知 道 这 个 行 业 的 竞 争 格 局 加 盟 商 的 真 实 回 报 消 费 者 的 忠 诚 度 十 年 后 还 在 不 在 这 些 没 有 捷 径 别 人 也 替 不 了 你 大 道 没 法 替 他 懂 他 也 没 法 借 大 道 的 嘴 让 自 己 懂 把 这 两 天 的 三 条 回 复 放 在 一 起 看 挺 有 意 思 不 用 margin 不 借 钱 不 怎 么 需 要 天 赋 难 的 是 做 到 完 全 不 了 解 这 个 行 业 不 懂 不 做", "source_text": "三、框架再好,也替代不了对生意的理解。 提问者其实是想让大道用\"好生意\"的框架帮他套一下结论。但框架只是工具,判断一门生意好不好,需要知道这个行业的竞争格局、加盟商的真实回报、消费者的忠诚度、十年后还在不在。这些没有捷径,别人也替不了你。大道没法替他懂,他也没法借大道的嘴让自己懂。\n\n把这两天的三条回复放在一起看,挺有意思:\n\n不用margin:不借钱\n\n不怎么需要天赋:难的是做到\n\n完全不了解这个行业:不懂不做", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:三、框架再好,也替代不了对生意的理解。 提问者其实是想让大道用\"好生意\"的框架帮他套一下结论。但框架只是工具,判断一门生 — 段落/内容单元:完全不了解这个行业:不懂不做", "source_line_range": [ 19, 28 ] }, { "id": "body-region-5", "text": "三 句 话 都 很 短 说 的 是 同 一 件 事 投 资 里 真 正 值 钱 的 那 几 条 原 则 没 有 一 条 是 复 杂 的 难 就 难 在 几 十 年 如 一 日 地 守 着 身 家 到 了 他 这 个 量 级 还 能 毫 无 负 担 地 说 出 我 完 全 不 了 解 这 本 身 就 是 答 案 的 一 部 分 反 过 来 想 想 我 们 自 己 有 多 少 仓 位 是 建 立 在 我 大 概 懂 上 面 的 个 人 理 解 不 构 成 投 资 建 议 也 不 代 表 对 文 中 提 到 的 公 司 有 任 何 看 法", "source_text": "三句话都很短,说的是同一件事。投资里真正值钱的那几条原则,没有一条是复杂的,难就难在几十年如一日地守着。身家到了他这个量级,还能毫无负担地说出\"我完全不了解\",这本身就是答案的一部分。\n\n反过来想想我们自己:有多少仓位,是建立在\"我大概懂\"上面的?\n\n个人理解,不构成投资建议,也不代表对文中提到的公司有任何看法。", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:三句话都很短,说的是同一件事。投资里真正值钱的那几条原则,没有一条是复杂的,难就难在几十年如一日地守着。身家到了他这个量 — 段落/内容单元:个人理解,不构成投资建议,也不代表对文中提到的公司有任何看法。", "source_line_range": [ 29, 33 ] } ], "ending": { "text": "这个量级,还能毫无负担地说出\"我完全不了解\",这本身就是答案的一部分。\n\n反过来想想我们自己:有多少仓位,是建立在\"我大概懂\"上面的?\n\n个人理解,不构成投资建议,也不代表对文中提到的公司有任何看法。" } } }, { "id": "article-106", "name": "人民日报海外版导读:中国车企发力线控底盘", "url": "https://m.weibo.cn/2/detail/5354200254911308", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "中国车企发力线控底盘" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "中国车企发力线控底盘" ] }, { "id": "stable-2", "alternatives": [ "人民日报海外版-海外网" ] }, { "id": "stable-3", "alternatives": [ "微博网页版" ] }, { "id": "stable-4", "alternatives": [ "相关推荐" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete original post with opening, eight numbered news items, all ordinary 网页链接 links and final hashtag reviewed in full-page screenshot. Newspaper image lettering excluded. No title heading: original topic phrase binds post identity. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "ground_truth_main_content": "【今日#人民日报海外版导读# | 中国车企发力线控底盘】今日出版的#人民日报海外版#,以下看点不容错过。\n1.香港加快构建创新科技发展新格局\n在世界知识产权组织近日公布的2026年《全球创新指数》中,香港在全球139个经济体中排名第14位,比去年上升1位,并在亚洲保持第五位。香港特区政府发言人表示,加速推动创新科技发展是本届特区政府的施政重点,乐见香港在创新指数取得良好进展。详情→网页链接\n2.中国车企发力线控底盘\n买车时,销售经常会着重介绍某款车型配备了“空气悬架”,以彰显车辆的高端属性。这一在燃油车时代被视为高端象征的功能,如今已经越来越多地出现在中国品牌新能源汽车上。\n事实上,空气悬架只是线控底盘的一部分。今年以来,中国车企发布的多款新车型进一步用上线控转向、线控悬架等线控底盘技术,线控底盘正加速落地。\n车企为何争相落地线控底盘?线控底盘对于提升汽车智能化程度起到什么样的作用?如何改善车主驾乘体验?记者进行了采访。详情→网页链接\n3.打卡“网红公路” 奔赴诗和远方\n穿过花江大峡谷的“世界第一高桥”,在云端廊道俯瞰山河壮阔;沿着坝上草原的蜿蜒天路,在秋风里看尽层林尽染;驶过黄河岸边的七彩廊道,在古渡古建间品读千年文脉;穿行串联两山的8字公路,在岭南山水间邂逅东坡雅韵……今年国庆假期,不少游客沿着“网红公路”开启自驾之旅。\n交通运输部数据显示,10月1日至7日,累计全社会跨区域人员流动量超21亿人次,出行结构以公路出行为主,特别是自驾出行,自驾和公路方式的出行占到90%以上。越来越多的游客选择自驾打卡在社交平台“刷屏”的“网红公路”,奔赴诗和远方。\n从黔地峡谷高桥通途,到坝上草原蜿蜒天路,从黄河沿岸七彩观光大道,到岭南山野旅游公路,遍地开花的“网红公路”,串联起秀美山河风光与厚重地域文脉,承载着群众对高品质出行的美好向往,尽显流动中国的蓬勃活力。详情→网页链接\n4.推动中欧贸易向上平衡、向前发展(环球热点)\n近日,中国商务部部长王文涛与欧盟委员会贸易和经济安全委员马罗什·谢夫乔维奇在北京共同主持中欧贸易投资磋商机制第二次例会。两天闭门磋商后,双方形成涵盖贸易和投资平衡、出口管制、知识产权、世贸组织改革四大领域的16项成果共识清单。在欧盟内部保护主义抬头、“对华贸易战”言论一度甚嚣尘上的当口,中欧用具体行动说明:摩擦可控,对话可行,贸易战不符合任何一方利益。详情→网页链接\n5.长风万里永不息(文艺镌刻长征记忆)\n今年是中国工农红军长征胜利90周年。这一人类历史上的伟大壮举,在中国革命史上留下了壮丽篇章,也成为中外作者不断书写的题材。\n从中国长征主题图书的海外译介,到外国记者、作家对长征史实的记录与探寻,一本本图书让不同国家的读者跨越时空,与英雄相逢、和历史对话、被信仰感动。这些作品的流传与再版,留下了长征故事走向世界的足迹,也为海外读者认识中国共产党、理解中国革命提供了重要窗口。详情→网页链接\n6.城市作课堂 诗乐促相知\n10月11日,“诗韵双城:中俄青年诗歌的‘双向奔赴’——2026中俄教育年衡复文化交流体验日”在上海举行。中俄文化名家、教育工作者、青少年代表相聚衡复历史文化风貌区的梧桐树影下,从普希金纪念碑到草婴书房,从诗歌诵读到音乐演绎,从城市行走到人文对话,展开了一场跨越语言与国界的人文交流。详情→网页链接\n7.以匠心铸精品 以初心续文脉(深观察)\n金秋十月,硕果飘香。10月9日晚,由国家广播电视总局、山东省人民政府主办的第35届电视剧“飞天奖”、第29届电视文艺“星光奖”颁奖典礼在山东烟台举行。两年一届的全国性政府奖,吸引全行业目光。10月10日,“飞天—星光”广播电视和网络视听文艺创作高质量发展座谈会接续举办。\n活动期间,台前幕后的创作者、业界学界专家代表等齐聚一堂,从颁奖典礼现场的星光熠熠到座谈会上的思想交流,一幕幕动人的场景、一串串掷地有声的行业金句,共同勾勒出中国视听文艺扎根人民、观照时代、守正创新的蓬勃气象。\n站在“十五五”开局之年,这场活动不仅是对过去两年中国电视剧和电视文艺精品创作的一次检阅,更是广电视听工作者交出的一份时代答卷。详情→网页链接\n8.书香常相伴 日子有滋味\n我出生在宁夏回族自治区西吉县杨河村,村子四周全是山,一道道沟壑纵横其间。过去,我没想到村里也能办起“书院”。\n15岁那年,史静波先生回到家乡,在自家老宅上建起了木兰书院。起初我不太理解:在村里建一座书院,真的会有人来吗?可后来发现,乡亲们对文学的热情,比我想象的高得多。\n这几年,我看着书院从几间老屋,变成灰砖红瓦的院落。门前有一副楹联:“老林出硕木,深山有幽兰。”\n书院里有农民作家创作基地,还陆续建起了西海固文学教育馆、诗人墙、非遗园和农耕文化墙。后来,书院又添了文学图书室、创作室和直播间,全部面向乡土创作者免费开放,成了农民作家、乡村教师和文学爱好者交流的地方。详情→网页链接\n#曼城2比4巴黎圣日耳曼#", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 5, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "今 日 人 民 日 报 海 外 版 导 读 中 国 车 企 发 力 线 控 底 盘 今 日 出 版 的 人 民 日 报 海 外 版 以 下 看 点 不 容 错 过 1 香 港 加 快 构 建 创 新 科 技 发 展 新 格 局 在 世 界 知 识 产 权 组 织 近 日 公 布 的 2026 年 全 球 创 新 指 数 中 香 港 在 全 球 139 个 经 济 体 中 排 名 第 14 位 比 去 年 上 升 1 位 并 在 亚 洲 保 持 第 五 位 香 港 特 区 政 府 发 言 人 表 示 加 速 推 动 创 新 科 技 发 展 是 本 届 特 区 政 府 的 施 政 重 点 乐 见 香 港 在 创 新 指 数 取 得 良 好 进 展 详 情 网 页 链 接 2 中 国 车 企 发 力 线 控 底 盘 买 车 时 销 售 经 常 会 着 重 介 绍 某 款 车 型 配 备 了 空 气 悬 架 以 彰 显 车 辆 的 高 端 属 性 这 一 在 燃 油 车 时 代 被 视 为 高 端 象 征 的 功 能 如 今 已 经 越 来 越 多 地 出 现 在 中 国 品 牌 新 能 源 汽 车 上 事 实 上 空 气 悬 架 只 是 线 控 底 盘 的 一 部 分 今 年 以 来 中 国 车 企 发 布 的 多 款 新 车 型 进 一 步 用 上 线 控 转 向 线 控 悬 架 等 线 控 底 盘 技 术 线 控 底 盘 正 加 速 落 地 车 企 为 何 争 相 落 地 线 控 底 盘 线 控 底 盘 对 于 提 升 汽 车 智 能 化 程 度 起 到 什 么 样 的 作 用 如 何 改 善 车 主 驾 乘 体 验 记 者 进 行 了 采 访 详 情 网 页 链 接", "source_text": "【今日#人民日报海外版导读# | 中国车企发力线控底盘】今日出版的#人民日报海外版#,以下看点不容错过。\n1.香港加快构建创新科技发展新格局\n在世界知识产权组织近日公布的2026年《全球创新指数》中,香港在全球139个经济体中排名第14位,比去年上升1位,并在亚洲保持第五位。香港特区政府发言人表示,加速推动创新科技发展是本届特区政府的施政重点,乐见香港在创新指数取得良好进展。详情→网页链接\n2.中国车企发力线控底盘\n买车时,销售经常会着重介绍某款车型配备了“空气悬架”,以彰显车辆的高端属性。这一在燃油车时代被视为高端象征的功能,如今已经越来越多地出现在中国品牌新能源汽车上。\n事实上,空气悬架只是线控底盘的一部分。今年以来,中国车企发布的多款新车型进一步用上线控转向、线控悬架等线控底盘技术,线控底盘正加速落地。\n车企为何争相落地线控底盘?线控底盘对于提升汽车智能化程度起到什么样的作用?如何改善车主驾乘体验?记者进行了采访。详情→网页链接", "segmentation_method": "reviewed_source_semantics", "label": "开篇:【今日#人民日报海外版导读# | 中国车企发力线控底盘】今日出版的#人民日报海外版#,以下看点不容错过。 — 段落/内容单元:2.中国车企发力线控底盘", "source_line_range": [ 1, 7 ] }, { "id": "body-region-2", "text": "3 打 卡 网 红 公 路 奔 赴 诗 和 远 方 穿 过 花 江 大 峡 谷 的 世 界 第 一 高 桥 在 云 端 廊 道 俯 瞰 山 河 壮 阔 沿 着 坝 上 草 原 的 蜿 蜒 天 路 在 秋 风 里 看 尽 层 林 尽 染 驶 过 黄 河 岸 边 的 七 彩 廊 道 在 古 渡 古 建 间 品 读 千 年 文 脉 穿 行 串 联 两 山 的 8 字 公 路 在 岭 南 山 水 间 邂 逅 东 坡 雅 韵 今 年 国 庆 假 期 不 少 游 客 沿 着 网 红 公 路 开 启 自 驾 之 旅 交 通 运 输 部 数 据 显 示 10 月 1 日 至 7 日 累 计 全 社 会 跨 区 域 人 员 流 动 量 超 21 亿 人 次 出 行 结 构 以 公 路 出 行 为 主 特 别 是 自 驾 出 行 自 驾 和 公 路 方 式 的 出 行 占 到 90 以 上 越 来 越 多 的 游 客 选 择 自 驾 打 卡 在 社 交 平 台 刷 屏 的 网 红 公 路 奔 赴 诗 和 远 方 从 黔 地 峡 谷 高 桥 通 途 到 坝 上 草 原 蜿 蜒 天 路 从 黄 河 沿 岸 七 彩 观 光 大 道 到 岭 南 山 野 旅 游 公 路 遍 地 开 花 的 网 红 公 路 串 联 起 秀 美 山 河 风 光 与 厚 重 地 域 文 脉 承 载 着 群 众 对 高 品 质 出 行 的 美 好 向 往 尽 显 流 动 中 国 的 蓬 勃 活 力 详 情 网 页 链 接", "source_text": "3.打卡“网红公路” 奔赴诗和远方\n穿过花江大峡谷的“世界第一高桥”,在云端廊道俯瞰山河壮阔;沿着坝上草原的蜿蜒天路,在秋风里看尽层林尽染;驶过黄河岸边的七彩廊道,在古渡古建间品读千年文脉;穿行串联两山的8字公路,在岭南山水间邂逅东坡雅韵……今年国庆假期,不少游客沿着“网红公路”开启自驾之旅。\n交通运输部数据显示,10月1日至7日,累计全社会跨区域人员流动量超21亿人次,出行结构以公路出行为主,特别是自驾出行,自驾和公路方式的出行占到90%以上。越来越多的游客选择自驾打卡在社交平台“刷屏”的“网红公路”,奔赴诗和远方。\n从黔地峡谷高桥通途,到坝上草原蜿蜒天路,从黄河沿岸七彩观光大道,到岭南山野旅游公路,遍地开花的“网红公路”,串联起秀美山河风光与厚重地域文脉,承载着群众对高品质出行的美好向往,尽显流动中国的蓬勃活力。详情→网页链接", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:3.打卡“网红公路” 奔赴诗和远方", "source_line_range": [ 8, 11 ] }, { "id": "body-region-3", "text": "4 推 动 中 欧 贸 易 向 上 平 衡 向 前 发 展 环 球 热 点 近 日 中 国 商 务 部 部 长 王 文 涛 与 欧 盟 委 员 会 贸 易 和 经 济 安 全 委 员 马 罗 什 谢 夫 乔 维 奇 在 北 京 共 同 主 持 中 欧 贸 易 投 资 磋 商 机 制 第 二 次 例 会 两 天 闭 门 磋 商 后 双 方 形 成 涵 盖 贸 易 和 投 资 平 衡 出 口 管 制 知 识 产 权 世 贸 组 织 改 革 四 大 领 域 的 16 项 成 果 共 识 清 单 在 欧 盟 内 部 保 护 主 义 抬 头 对 华 贸 易 战 言 论 一 度 甚 嚣 尘 上 的 当 口 中 欧 用 具 体 行 动 说 明 摩 擦 可 控 对 话 可 行 贸 易 战 不 符 合 任 何 一 方 利 益 详 情 网 页 链 接 5 长 风 万 里 永 不 息 文 艺 镌 刻 长 征 记 忆 今 年 是 中 国 工 农 红 军 长 征 胜 利 90 周 年 这 一 人 类 历 史 上 的 伟 大 壮 举 在 中 国 革 命 史 上 留 下 了 壮 丽 篇 章 也 成 为 中 外 作 者 不 断 书 写 的 题 材 从 中 国 长 征 主 题 图 书 的 海 外 译 介 到 外 国 记 者 作 家 对 长 征 史 实 的 记 录 与 探 寻 一 本 本 图 书 让 不 同 国 家 的 读 者 跨 越 时 空 与 英 雄 相 逢 和 历 史 对 话 被 信 仰 感 动 这 些 作 品 的 流 传 与 再 版 留 下 了 长 征 故 事 走 向 世 界 的 足 迹 也 为 海 外 读 者 认 识 中 国 共 产 党 理 解 中 国 革 命 提 供 了 重 要 窗 口 详 情 网 页 链 接", "source_text": "4.推动中欧贸易向上平衡、向前发展(环球热点)\n近日,中国商务部部长王文涛与欧盟委员会贸易和经济安全委员马罗什·谢夫乔维奇在北京共同主持中欧贸易投资磋商机制第二次例会。两天闭门磋商后,双方形成涵盖贸易和投资平衡、出口管制、知识产权、世贸组织改革四大领域的16项成果共识清单。在欧盟内部保护主义抬头、“对华贸易战”言论一度甚嚣尘上的当口,中欧用具体行动说明:摩擦可控,对话可行,贸易战不符合任何一方利益。详情→网页链接\n5.长风万里永不息(文艺镌刻长征记忆)\n今年是中国工农红军长征胜利90周年。这一人类历史上的伟大壮举,在中国革命史上留下了壮丽篇章,也成为中外作者不断书写的题材。\n从中国长征主题图书的海外译介,到外国记者、作家对长征史实的记录与探寻,一本本图书让不同国家的读者跨越时空,与英雄相逢、和历史对话、被信仰感动。这些作品的流传与再版,留下了长征故事走向世界的足迹,也为海外读者认识中国共产党、理解中国革命提供了重要窗口。详情→网页链接", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:4.推动中欧贸易向上平衡、向前发展(环球热点) — 段落/内容单元:5.长风万里永不息(文艺镌刻长征记忆)", "source_line_range": [ 12, 16 ] }, { "id": "body-region-4", "text": "6 城 市 作 课 堂 诗 乐 促 相 知 10 月 11 日 诗 韵 双 城 中 俄 青 年 诗 歌 的 双 向 奔 赴 2026 中 俄 教 育 年 衡 复 文 化 交 流 体 验 日 在 上 海 举 行 中 俄 文 化 名 家 教 育 工 作 者 青 少 年 代 表 相 聚 衡 复 历 史 文 化 风 貌 区 的 梧 桐 树 影 下 从 普 希 金 纪 念 碑 到 草 婴 书 房 从 诗 歌 诵 读 到 音 乐 演 绎 从 城 市 行 走 到 人 文 对 话 展 开 了 一 场 跨 越 语 言 与 国 界 的 人 文 交 流 详 情 网 页 链 接 7 以 匠 心 铸 精 品 以 初 心 续 文 脉 深 观 察 金 秋 十 月 硕 果 飘 香 10 月 9 日 晚 由 国 家 广 播 电 视 总 局 山 东 省 人 民 政 府 主 办 的 第 35 届 电 视 剧 飞 天 奖 第 29 届 电 视 文 艺 星 光 奖 颁 奖 典 礼 在 山 东 烟 台 举 行 两 年 一 届 的 全 国 性 政 府 奖 吸 引 全 行 业 目 光 10 月 10 日 飞 天 星 光 广 播 电 视 和 网 络 视 听 文 艺 创 作 高 质 量 发 展 座 谈 会 接 续 举 办 活 动 期 间 台 前 幕 后 的 创 作 者 业 界 学 界 专 家 代 表 等 齐 聚 一 堂 从 颁 奖 典 礼 现 场 的 星 光 熠 熠 到 座 谈 会 上 的 思 想 交 流 一 幕 幕 动 人 的 场 景 一 串 串 掷 地 有 声 的 行 业 金 句 共 同 勾 勒 出 中 国 视 听 文 艺 扎 根 人 民 观 照 时 代 守 正 创 新 的 蓬 勃 气 象 站 在 十 五 五 开 局 之 年 这 场 活 动 不 仅 是 对 过 去 两 年 中 国 电 视 剧 和 电 视 文 艺 精 品 创 作 的 一 次 检 阅 更 是 广 电 视 听 工 作 者 交 出 的 一 份 时 代 答 卷 详 情 网 页 链 接", "source_text": "6.城市作课堂 诗乐促相知\n10月11日,“诗韵双城:中俄青年诗歌的‘双向奔赴’——2026中俄教育年衡复文化交流体验日”在上海举行。中俄文化名家、教育工作者、青少年代表相聚衡复历史文化风貌区的梧桐树影下,从普希金纪念碑到草婴书房,从诗歌诵读到音乐演绎,从城市行走到人文对话,展开了一场跨越语言与国界的人文交流。详情→网页链接\n7.以匠心铸精品 以初心续文脉(深观察)\n金秋十月,硕果飘香。10月9日晚,由国家广播电视总局、山东省人民政府主办的第35届电视剧“飞天奖”、第29届电视文艺“星光奖”颁奖典礼在山东烟台举行。两年一届的全国性政府奖,吸引全行业目光。10月10日,“飞天—星光”广播电视和网络视听文艺创作高质量发展座谈会接续举办。\n活动期间,台前幕后的创作者、业界学界专家代表等齐聚一堂,从颁奖典礼现场的星光熠熠到座谈会上的思想交流,一幕幕动人的场景、一串串掷地有声的行业金句,共同勾勒出中国视听文艺扎根人民、观照时代、守正创新的蓬勃气象。\n站在“十五五”开局之年,这场活动不仅是对过去两年中国电视剧和电视文艺精品创作的一次检阅,更是广电视听工作者交出的一份时代答卷。详情→网页链接", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:6.城市作课堂 诗乐促相知 — 段落/内容单元:7.以匠心铸精品 以初心续文脉(深观察)", "source_line_range": [ 17, 22 ] }, { "id": "body-region-5", "text": "8 书 香 常 相 伴 日 子 有 滋 味 我 出 生 在 宁 夏 回 族 自 治 区 西 吉 县 杨 河 村 村 子 四 周 全 是 山 一 道 道 沟 壑 纵 横 其 间 过 去 我 没 想 到 村 里 也 能 办 起 书 院 15 岁 那 年 史 静 波 先 生 回 到 家 乡 在 自 家 老 宅 上 建 起 了 木 兰 书 院 起 初 我 不 太 理 解 在 村 里 建 一 座 书 院 真 的 会 有 人 来 吗 可 后 来 发 现 乡 亲 们 对 文 学 的 热 情 比 我 想 象 的 高 得 多 这 几 年 我 看 着 书 院 从 几 间 老 屋 变 成 灰 砖 红 瓦 的 院 落 门 前 有 一 副 楹 联 老 林 出 硕 木 深 山 有 幽 兰 书 院 里 有 农 民 作 家 创 作 基 地 还 陆 续 建 起 了 西 海 固 文 学 教 育 馆 诗 人 墙 非 遗 园 和 农 耕 文 化 墙 后 来 书 院 又 添 了 文 学 图 书 室 创 作 室 和 直 播 间 全 部 面 向 乡 土 创 作 者 免 费 开 放 成 了 农 民 作 家 乡 村 教 师 和 文 学 爱 好 者 交 流 的 地 方 详 情 网 页 链 接 曼 城 2 比 4 巴 黎 圣 日 耳 曼", "source_text": "8.书香常相伴 日子有滋味\n我出生在宁夏回族自治区西吉县杨河村,村子四周全是山,一道道沟壑纵横其间。过去,我没想到村里也能办起“书院”。\n15岁那年,史静波先生回到家乡,在自家老宅上建起了木兰书院。起初我不太理解:在村里建一座书院,真的会有人来吗?可后来发现,乡亲们对文学的热情,比我想象的高得多。\n这几年,我看着书院从几间老屋,变成灰砖红瓦的院落。门前有一副楹联:“老林出硕木,深山有幽兰。”\n书院里有农民作家创作基地,还陆续建起了西海固文学教育馆、诗人墙、非遗园和农耕文化墙。后来,书院又添了文学图书室、创作室和直播间,全部面向乡土创作者免费开放,成了农民作家、乡村教师和文学爱好者交流的地方。详情→网页链接\n#曼城2比4巴黎圣日耳曼#", "segmentation_method": "reviewed_source_semantics", "label": "段落/内容单元:8.书香常相伴 日子有滋味", "source_line_range": [ 23, 28 ] } ], "ending": { "text": "文学教育馆、诗人墙、非遗园和农耕文化墙。后来,书院又添了文学图书室、创作室和直播间,全部面向乡土创作者免费开放,成了农民作家、乡村教师和文学爱好者交流的地方。详情→网页链接\n#曼城2比4巴黎圣日耳曼#" } }, "source_benchmark": { "comment_qualification_proof": { "path": "article-completeness-r5/article-106/comment-qualification-reference-r5.json", "sha256": "28cfaf177bf9b32758be53af050d9df0e78a2712f276717bedac02369178b0b6", "chars": 774, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } } }, { "id": "article-107", "name": "中控技术:工业AI成果发布会", "url": "https://weibo.com/2/detail/5355734640363402", "category": "article", "track": "articles", "task_kind": "body", "task_prompt": "直接获取此网址首次自动加载完成后、无需操作就已展示的文章或帖子内容,包括原有标题、正文、已展示的评论和回复,以及相关稳定页面文字;保留段落、章节、列表、表格和文字链接。不得点击、展开、切换、登录、翻页或滚动触发加载;不要求因此才会出现的正文、评论或回复。", "expected_any": [], "min_content_chars": 1, "acceptance_contract": { "version": 1, "schema": "body_text", "minimum_records": 0, "page_patterns": [ "中控技术工业AI成果发布会于宁波举办" ], "stable_text_role": "required", "stable_text_anchors": [ { "id": "stable-1", "alternatives": [ "中控技术工业AI成果发布会于宁波举办" ] }, { "id": "stable-2", "alternatives": [ "中控技术" ] }, { "id": "stable-3", "alternatives": [ "微博网页版" ] }, { "id": "stable-4", "alternatives": [ "相关推荐" ] } ] }, "rule_review": { "status": "reviewed", "reason": "Complete five-line post visible in initial viewport above image, including outgoing 网页链接 and three hashtags. No expansion or interaction; image lettering and changing recommended post text excluded. Original post phrase binds identity without an invented visible title. Revision 7 uses fixed comment coverage only where actual initial comment prose is evidenced; historical comments are not runtime targets." }, "ground_truth_main_content": "📢千人盛会!中控技术工业AI成果发布会于宁波举办,共同定义下一代工业!\n🤖中控时间序列大模型TPT落地多家龙头工厂:万华化学、京博石化、中煤信息、镇海炼化带来真实产线成效,报警优化、产量提升、碳减排成果量化可见\n🤝生态签约:牵手华为、阿里云等伙伴,工业AI数据联盟扩容,共建工业数据共享社区\n详情查看👉网页链接\n#中控技术 #工业人工智能 #流程工业智能化", "body_requirements": { "version": 4, "unit": "region_compact_hexagram_recall", "minimum_coverage": 0.8, "minimum_floor": 0.8, "minimum_region_passes": 1, "segmentation_method": "reviewed_source_semantics", "regions": [ { "id": "body-region-1", "text": "千 人 盛 会 中 控 技 术 工 业 ai 成 果 发 布 会 于 宁 波 举 办 共 同 定 义 下 一 代 工 业 中 控 时 间 序 列 大 模 型 tpt 落 地 多 家 龙 头 工 厂 万 华 化 学 京 博 石 化 中 煤 信 息 镇 海 炼 化 带 来 真 实 产 线 成 效 报 警 优 化 产 量 提 升 碳 减 排 成 果 量 化 可 见 生 态 签 约 牵 手 华 为 阿 里 云 等 伙 伴 工 业 ai 数 据 联 盟 扩 容 共 建 工 业 数 据 共 享 社 区 详 情 查 看 网 页 链 接 中 控 技 术 工 业 人 工 智 能 流 程 工 业 智 能 化", "source_text": "📢千人盛会!中控技术工业AI成果发布会于宁波举办,共同定义下一代工业!\n🤖中控时间序列大模型TPT落地多家龙头工厂:万华化学、京博石化、中煤信息、镇海炼化带来真实产线成效,报警优化、产量提升、碳减排成果量化可见\n🤝生态签约:牵手华为、阿里云等伙伴,工业AI数据联盟扩容,共建工业数据共享社区\n详情查看👉网页链接\n#中控技术 #工业人工智能 #流程工业智能化", "segmentation_method": "reviewed_source_semantics", "label": "开篇:📢千人盛会!中控技术工业AI成果发布会于宁波举办,共同定义下一代工业!", "source_line_range": [ 1, 5 ] } ], "ending": { "text": "来真实产线成效,报警优化、产量提升、碳减排成果量化可见\n🤝生态签约:牵手华为、阿里云等伙伴,工业AI数据联盟扩容,共建工业数据共享社区\n详情查看👉网页链接\n#中控技术 #工业人工智能 #流程工业智能化" } }, "source_benchmark": { "comment_qualification_proof": { "path": "article-completeness-r5/article-107/comment-qualification-reference-r5.json", "sha256": "f1cf07ec517a0fabcd202b318beb75ba8bad357858c58c21e68f442b88dd2f6e", "chars": 773, "record_count": 0 }, "comment_presence_review": { "status": "observed_absent", "basis": "Noactualdisplayedcommentrecord/componentincompleteinitialsource. Freshindependentreferencecertifieszero; laterpositivecommentlayoutisunsupported/unmeasureduntilreview, neverautomaticpass.", "observed_record_count": 0, "qualification_only": true } } } ] }