和顺 / 知白 返回所属 Agent
ZB-02.02

片段上下文

原能力

把关键片段与前后对话相连,写明截取范围与单看片段容易漏掉的信息。(细化版 p.2–3)

首选项目

Label Studio(Apache-2.0)。 Label Studio

匹配范围

Text 区域标注保留片段起止和可查看的全文。

源码

Label Studio · .model("RichTextRegionModel"

web/libs/editor/src/regions/RichTextRegion.js · 27–40 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
  .model("RichTextRegionModel", {
    type: "richtextregion",
    object: types.late(() => types.reference(RichTextModel)),

    startOffset: types.integer,
    endOffset: types.integer,
    start: types.string,
    end: types.string,
    text: types.maybeNull(types.string),
    isText: types.optional(types.boolean, false),
    globalOffsets: types.maybeNull(GlobalOffsets),
  })
  .volatile(() => ({
    hideable: true,

实现与验收要点

关联话轮、定义可显示的前后文、解释截断风险。