AgentRagPipeline
Five-stage retrieval-augmented generation: progress, source cards, and citations that point back to sources.
Demo
检索增强生成
流程已完成2.9 s
- 理解问题380 ms已完成
确认本次查询与来源范围
How can we make signup failures recoverable?
- 向量编码650 ms已完成
将问题转换为检索表示
- 检索来源540 ms已完成
查找与问题相关的片段
- 组装上下文580 ms已完成
将来源片段组织为上下文
- 来源 1:客服工单
- 来源 2:会话回放
- 引用回答720 ms已完成
生成可追溯到来源的回答
验证链接过期后应提供新链接。 会话回放也显示缺少恢复入口。
Basic Usage
vue
<script setup lang="ts">
import { AgentRagPipeline } from '@/components/agent-ui'
</script>
<template>
<AgentRagPipeline
:query="query"
:steps="steps"
:sources="sources"
:answer="answer"
@run="run"
@cancel="cancel"
@select-source="selectSource"
/>
</template>Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | ClassValue | undefined | Root classes |
query | string | '' | Current query |
steps | readonly AgentRagStep[] | [] | Five-stage progress |
sources | readonly AgentRagSource[] | [] | Retrieved sources |
answer | readonly AgentRagAnswerPart[] | [] | Text fragments and source citations |
title | string | '检索增强生成' | Title |
elapsedMs | number | undefined | Elapsed time |
reducedMotion | boolean | false | Disable non-essential motion |
Events
| Event | Payload | Description |
|---|---|---|
run | void | Start or replay |
cancel | void | Stop the current run |
selectSource | AgentRagSource | Select a source |
Target notes
| Target | Import |
|---|---|
| H5 | Named export from @/components/agent-ui |
| weapp | Default export from @/components/agent-ui/AgentRagPipeline.vue |
The docs demo uses a local snapshot and does not call a model or retrieval service.