Update nexus wiki content
This commit is contained in:
58
wiki/concepts/LLMHandoff.md
Normal file
58
wiki/concepts/LLMHandoff.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: "LLMHandoff"
|
||||
type: concept
|
||||
tags: ["llm", "agent", "handoff", "transcription", "summarization"]
|
||||
last_updated: 2026-05-02
|
||||
---
|
||||
|
||||
# LLMHandoff(LLM 交接协议)
|
||||
|
||||
## Definition
|
||||
|
||||
LLM Handoff 是在 Agent 管道中,将结构化数据(转录文本、会议记录、文档)传递给下游 LLM 进行摘要/问答/行动项提取的标准接口。定义格式化规则和任务指令,使下游 LLM 能准确理解输入并产生期望输出。
|
||||
|
||||
## Purpose
|
||||
|
||||
在 [[StructuredTranscriptJSON]] 基础上,LLM Handoff 定义:
|
||||
1. **格式化规则**:如何将带时间戳的段落转为 LLM 可读的文本格式
|
||||
2. **任务指令**:不同任务(摘要/问答/行动项)对应的 prompt 指令
|
||||
3. **Schema 输出**:LLM 应返回的结构化格式(如 action_items、summary 等)
|
||||
|
||||
## Handoff Payload Format
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
|
||||
- [[LangChain]]:`ConversationalRetrievalChain` / `LLMChain`
|
||||
- CrewAI:`Agent` 接收 JSON payload 作为 context
|
||||
- 自定义 LLM 管道:直接读取 payload 并注入 system prompt
|
||||
|
||||
## Critical Design Considerations
|
||||
|
||||
- **保留时间戳锚点**:`[5.2s]` 格式使 LLM 能引用具体时刻
|
||||
- **说话人归属**:`[SPEAKER_00]` 前缀使 LLM 能区分不同发言人的观点
|
||||
- **分块交付**:超长转录可分批传递给 LLM(避免 token 超限)
|
||||
|
||||
## Related Concepts
|
||||
- [[StructuredTranscriptJSON]] — Handoff 的输入数据格式
|
||||
- [[PIIRedaction]] — Handoff 前必须脱敏(避免 LLM 学习 PII)
|
||||
- [[SpeakerDiarization]] — 说话人标签是 Handoff 文本格式化的核心要素
|
||||
- [[Human-Handoff]] — LLM → 人类的交接(Agentic 系统中的另一方向)
|
||||
|
||||
## Related Sources
|
||||
- [[engineering-voice-ai-integration-engineer]]
|
||||
Reference in New Issue
Block a user