36 lines
1.5 KiB
Markdown
36 lines
1.5 KiB
Markdown
---
|
||
title: "IntentDrivenRouting"
|
||
type: concept
|
||
tags: [routing, intent, AI-agent]
|
||
sources: [multi-channel-assistant]
|
||
last_updated: 2026-04-27
|
||
---
|
||
|
||
## Definition
|
||
Intent-Driven Routing(意图驱动路由)是一种 AI Agent 设计模式:通过 Prompt 层或配置层定义"用户意图 → 工具/动作"的映射规则,AI 根据用户输入中的关键词或语义自动路由到对应的工具或工作流,而无需用户显式指定。
|
||
|
||
## How It Works
|
||
1. **意图识别**:AI 解析用户输入,识别核心意图(如"添加任务"、"发邮件"、"创建日程")
|
||
2. **规则匹配**:根据 Prompt 中预定义的规则表,匹配意图到对应工具
|
||
3. **工具执行**:调用对应工具完成任务
|
||
4. **结果返回**:将工具输出以自然语言返回给用户
|
||
|
||
## Example from [[multi-channel-assistant]]
|
||
```
|
||
Prompt 规则:
|
||
"Add [task] to my todo" → use Todoist
|
||
"Create a card for [topic]" → use Asana Video Pipeline project
|
||
"Schedule [event]" → use gog calendar
|
||
"Email [person] about [topic]" → draft email via gog gmail
|
||
"Upload [file] to Drive" → use gog drive
|
||
```
|
||
|
||
## Related Concepts
|
||
- [[TopicRouting]] — 意图路由与话题路由可组合使用(话题提供上下文,意图决定动作)
|
||
- [[Intent-Classification]] — 意图分类是路由的前置步骤
|
||
- [[Agent-Routing-Rules]] — 基于规则的显式路由
|
||
|
||
## Connections
|
||
- [[multi-channel-assistant]] ← uses ← [[IntentDrivenRouting]]
|
||
- [[ToolOrchestration]] ← enables ← [[IntentDrivenRouting]](工具编排提供可调用工具集)
|