Files
nexus/wiki/concepts/LLMHandoff.md
2026-05-03 05:42:12 +08:00

2.3 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
LLMHandoff concept
llm
agent
handoff
transcription
summarization
2026-05-02

LLMHandoffLLM 交接协议)

Definition

LLM Handoff 是在 Agent 管道中,将结构化数据(转录文本、会议记录、文档)传递给下游 LLM 进行摘要/问答/行动项提取的标准接口。定义格式化规则和任务指令,使下游 LLM 能准确理解输入并产生期望输出。

Purpose

StructuredTranscriptJSON 基础上LLM Handoff 定义:

  1. 格式化规则:如何将带时间戳的段落转为 LLM 可读的文本格式
  2. 任务指令:不同任务(摘要/问答/行动项)对应的 prompt 指令
  3. Schema 输出LLM 应返回的结构化格式(如 action_items、summary 等)

Handoff Payload Format

{
  "task": "summarize",
  "source_type": "transcript",
  "source_id": "meeting-2026-05-02-001",
  "total_duration": 3600.5,
  "speakers": ["SPEAKER_00", "SPEAKER_01"],
  "content": "[0.0s] <SPEAKER_00> Hello, welcome...\n[5.2s] <SPEAKER_01> Thank you...\n...",
  "instructions": {
    "summarize": "Produce a concise summary, section headers for topic changes, and a bulleted action items list with speaker attribution.",
    "action_items": "Extract all action items and commitments with the speaker who made them and the timestamp.",
    "qa": "Answer questions about the transcript using only information present in the content. Cite timestamps."
  }
}

Downstream Integrations

  • LangChainConversationalRetrievalChain / LLMChain
  • CrewAIAgent 接收 JSON payload 作为 context
  • 自定义 LLM 管道:直接读取 payload 并注入 system prompt

Critical Design Considerations

  • 保留时间戳锚点[5.2s] 格式使 LLM 能引用具体时刻
  • 说话人归属[SPEAKER_00] 前缀使 LLM 能区分不同发言人的观点
  • 分块交付:超长转录可分批传递给 LLM避免 token 超限)