Duaer

AI 配方

在 Duaer 里搭一个能回答 Google Drive 文档的 AI 助手

在 Duaer 里把 Google Drive 文件夹里的文档切块写进向量库,再让 AI Agent 按问题检索相关片段回答。

第一段:在 Duaer 里把文档写进向量库

  1. 加 Manual Trigger。文档常更新时换成 Schedule Trigger。
  2. 接 Google Drive,Resource 选 File/Folder,Operation 选 Search,筛选条件选你的文件夹。
  3. 再接一个 Google Drive,Resource 选 File,Operation 选 Download,File 用 {{ $json.id }}。是 Google 文档时,在 Options 的 Google File Conversion 里转成 PDF 或纯文本。
  4. 接 Simple Vector Store,Operation Mode 选 Insert Documents,Memory Key 写 drive_docs。
  5. 在它下面挂三个子节点:Embeddings OpenAI;Default Data Loader,Type of Data 选 Binary;Recursive Character Text Splitter,块大小 1000,重叠 200。
  6. 执行一次,文档就进了向量库。

第二段:在 Duaer 里按问题检索回答

  1. 加 Chat Trigger,接 AI Agent。
  2. Chat Model 挂 Duaer Chat Model,按价格选一个模型,不用填密钥。
  3. Tool 挂一个 Simple Vector Store,Operation Mode 选 Retrieve Documents (As Tool for AI Agent),Memory Key 同样写 drive_docs,描述写「公司 Google Drive 文档」。
  4. 它下面挂同一个 Embeddings OpenAI 模型。写入和检索用的嵌入模型必须一样。
  5. 打开对话面板提问,Agent 会先检索再回答。

上线前要知道

Simple Vector Store 存在 Duaer 进程内存里,服务重启后要重跑第一段。要长期保存,换成 Postgres PGVector、Qdrant 或 Pinecone,步骤一样。原理见 在 Duaer 里用 RAG 检索。

常见问题

Duaer 的 RAG 能读 Google 文档和表格吗?

能。Duaer 的 Google Drive 下载操作用 Google File Conversion 把 Google 文档转成 PDF 或纯文本,再交给 Default Data Loader。

Duaer 里的 Simple Vector Store 重启后还在吗?

不在。Simple Vector Store 存在 Duaer 内存里,适合试用;长期使用换成 PGVector、Qdrant 或 Pinecone。

同组