功能域 Functional domain
RAG 与知识库 RAG & knowledge
从文档读取、切分、向量化到向量库检索与重排的完整链路,包含 Milvus/Qdrant/MongoDB/Elasticsearch 以及多种第三方 RAG 平台集成。 The document-to-retrieval pipeline: readers, chunking, embeddings, vector stores, retrieval and third-party RAG integrations.
114 类型总数 types total
33 Python
81 Java
3 学习锚点 learning anchors
心智模型 Mental model
知识库把文档切分、向量化、写入向量存储,并在查询时做召回与重排,最终把证据注入模型上下文。 Knowledge bases chunk and embed documents, store vectors, retrieve and rerank at query time, then inject evidence into model context.
先学什么 What to learn first
切分策略与 embedding 模型必须匹配,换模型要重建索引。 Chunking strategy must match the embedding model; changing models requires re-indexing. 召回质量先看 chunk 元数据与过滤条件,再看重排模型。 Debug recall through chunk metadata and filters before blaming the reranker. 回答要带来源引用,否则无法审计和纠错。 Answers must carry source citations for auditability and correction.
生产常见坑 Production pitfalls
文档更新后未删除旧向量,召回过期内容。 Stale vectors remain after document updates and surface outdated facts. 把知识库检索放进每次对话的同步路径,首字延迟飙升。 Synchronous retrieval on every turn destroys time-to-first-token.
进入对应闯关单元 Practice this domain →
域内图谱 Domain map
点击节点打开 API 页面;拖拽平移,滚轮缩放。 Click a node to open its API page. Drag to pan, scroll to zoom.
Python Java
Python API 集 Python API set 33
归入本功能域的全部 Python 公开类型,按所属包分组。 Every public Python type classified into this domain, grouped by owning package.
agentscope.rag22 agentscope.app.rag11
Java API 集 Java API set 81
归入本功能域的全部 Java 公开类型,按包分组并标注构件。 Every public Java type classified into this domain, grouped by package with its artifact.
io.agentscope.core.rag.reader17 AbstractChunkingReaderclass agentscope-extensions-rag-simple抽象 Chunking 读取器,把私有文档转化为可检索的知识。 Builderclass agentscope-extensions-rag-simple构建器,用于构建并配置目标实例。 ExternalApiReaderclass agentscope-extensions-rag-simple外部 API 读取器,把私有文档转化为可检索的知识。 ImageReaderclass agentscope-extensions-rag-simple图像读取器,把私有文档转化为可检索的知识。 InputTypeenum agentscope-extensions-rag-simple定义输入类型的枚举。 PDFReaderclass agentscope-extensions-rag-simplePDF 读取器,把私有文档转化为可检索的知识。 Readerinterface agentscope-extensions-rag-simple定义读取器契约的接口。 ReaderInputclass agentscope-extensions-rag-simple读取器输入,把私有文档转化为可检索的知识。 ReaderUtilsclass agentscope-extensions-rag-simple读取器 Utils,把私有文档转化为可检索的知识。 RequestBuilderinterface agentscope-extensions-rag-simple定义请求构建器契约的接口。 ResponseParserinterface agentscope-extensions-rag-simple定义响应解析器契约的接口。 SplitStrategyenum agentscope-extensions-rag-simple定义已拆分 Strategy相关取值的枚举。 TableFormatenum agentscope-extensions-rag-simple定义Table 格式相关取值的枚举。 TextChunkerclass agentscope-extensions-rag-simple文本切分器,把私有文档转化为可检索的知识。 TextReaderclass agentscope-extensions-rag-simple文本读取器,把私有文档转化为可检索的知识。 TikaReaderclass agentscope-extensions-rag-simpleTika 读取器,把私有文档转化为可检索的知识。 WordReaderclass agentscope-extensions-rag-simpleWord 读取器,把私有文档转化为可检索的知识。
io.agentscope.core.rag.integration.dify13 Builderclass agentscope-extensions-rag-difyDifyKnowledge的构建器。 Builderclass agentscope-extensions-rag-difyDifyRAGConfig的构建器。 Builderclass agentscope-extensions-rag-difyMetadataFilter的构建器。 Builderclass agentscope-extensions-rag-difyMetadataFilterCondition的构建器。 Builderclass agentscope-extensions-rag-difyRerankConfig的构建器。 DifyDocumentConverterclass agentscope-extensions-rag-difyDify 文档转换器,把私有文档转化为可检索的知识。 DifyKnowledgeclass agentscope-extensions-rag-difyDify 知识库,把私有文档转化为可检索的知识。 DifyRAGClientclass agentscope-extensions-rag-difyDify RAG 客户端,封装与远端服务的连接和调用。 DifyRAGConfigclass agentscope-extensions-rag-difyDify RAG 配置,保存相关配置项。 MetadataFilterclass agentscope-extensions-rag-dify元数据过滤器,把私有文档转化为可检索的知识。 MetadataFilterConditionclass agentscope-extensions-rag-dify元数据过滤 Condition,把私有文档转化为可检索的知识。 RerankConfigclass agentscope-extensions-rag-dify重排配置,保存相关配置项。 RetrievalModeenum agentscope-extensions-rag-dify定义检索模式相关取值的枚举。
io.agentscope.core.rag.store12 Builderclass agentscope-extensions-rag-simpleElasticsearchStore的构建器。 Builderclass agentscope-extensions-rag-simpleInMemoryStore的构建器。 Builderclass agentscope-extensions-rag-simple构建器,用于构建并配置目标实例。 Builderclass agentscope-extensions-rag-simple构建器,用于构建并配置目标实例。 Builderclass agentscope-extensions-rag-simple构建器,用于构建并配置目标实例。 DistanceTypeenum agentscope-extensions-rag-simple定义Distance 类型的枚举。 ElasticsearchStoreclass agentscope-extensions-rag-simpleElasticsearch 存储,负责持久化与读取数据。 InMemoryStoreclass agentscope-extensions-rag-simpleIn 记忆存储,负责持久化与读取数据。 MilvusStoreclass agentscope-extensions-rag-simpleMilvus 存储,负责持久化与读取数据。 PgVectorStoreclass agentscope-extensions-rag-simplePg 向量存储,负责持久化与读取数据。 QdrantStoreclass agentscope-extensions-rag-simpleQdrant 存储,负责持久化与读取数据。 VDBStoreBaseinterface agentscope-extensions-rag-simple定义 VDB 存储基类契约的接口。
io.agentscope.core.rag.integration.bailian11 BailianClientclass agentscope-extensions-rag-bailianBailian 客户端,封装与远端服务的连接和调用。 BailianConfigclass agentscope-extensions-rag-bailianBailian 配置,保存相关配置项。 BailianDocumentConverterclass agentscope-extensions-rag-bailianBailian 文档转换器,把私有文档转化为可检索的知识。 BailianKnowledgeclass agentscope-extensions-rag-bailianBailian 知识库,把私有文档转化为可检索的知识。 Builderclass agentscope-extensions-rag-bailianBailianConfig的构建器。 Builderclass agentscope-extensions-rag-bailianBailianKnowledge的构建器。 Builderclass agentscope-extensions-rag-bailianRerankConfig的构建器。 Builderclass agentscope-extensions-rag-bailianRewriteConfig的构建器。 QueryHistoryEntryclass agentscope-extensions-rag-bailian查询历史条目,把私有文档转化为可检索的知识。 RerankConfigclass agentscope-extensions-rag-bailian重排配置,保存相关配置项。 RewriteConfigclass agentscope-extensions-rag-bailianRewrite 配置,保存相关配置项。
io.agentscope.core.rag.integration.haystack7 Builderclass agentscope-extensions-rag-haystack构建器,用于构建并配置目标实例。 Builderclass agentscope-extensions-rag-haystack构建器,用于构建并配置目标实例。 FilterPolicyenum agentscope-extensions-rag-haystack定义过滤策略相关取值的枚举。 HayStackClientclass agentscope-extensions-rag-haystackHay Stack 客户端,封装与远端服务的连接和调用。 HayStackConfigclass agentscope-extensions-rag-haystackHay Stack 配置,保存相关配置项。 HayStackDocumentConverterclass agentscope-extensions-rag-haystackHay Stack 文档转换器,把私有文档转化为可检索的知识。 HayStackKnowledgeclass agentscope-extensions-rag-haystackHay Stack 知识库,把私有文档转化为可检索的知识。
io.agentscope.core.rag.integration.ragflow6 Builderclass agentscope-extensions-rag-ragflow构建器,用于构建并配置目标实例。 Builderclass agentscope-extensions-rag-ragflow构建器,用于构建并配置目标实例。 RAGFlowClientclass agentscope-extensions-rag-ragflow用于RAGFlow API的HTTP 客户端。 RAGFlowConfigclass agentscope-extensions-rag-ragflowRAG Flow 配置,保存相关配置项。 RAGFlowDocumentConverterclass agentscope-extensions-rag-ragflowRAG Flow 文档转换器,把私有文档转化为可检索的知识。 RAGFlowKnowledgeclass agentscope-extensions-rag-ragflowRAG Flow 知识库,把私有文档转化为可检索的知识。
io.agentscope.core.rag4 io.agentscope.core.rag.exception2 io.agentscope.core.rag.integration.dify.exception2 io.agentscope.core.rag.integration.ragflow.exception2 io.agentscope.core.rag.knowledge2 Builderclass agentscope-extensions-rag-simpleSimpleKnowledge的构建器。 SimpleKnowledgeclass agentscope-extensions-rag-simple开箱即用的知识库实现
io.agentscope.core.rag.store.dto2 io.agentscope.core.rag.integration.haystack.exception1
Python ↔ Java 对照 Python ↔ Java
两套实现共享同一概念模型,但在并发(async/await 与 Reactor)、打包(wheel 模块与 Maven 构件)和生命周期 API 上存在差异。需要精确签名时请使用 API 全景。 The two implementations follow the same conceptual model but differ in concurrency (async/await vs Reactor), packaging (wheel modules vs Maven artifacts) and lifecycle APIs. Use the full API map to locate exact signatures.
打开 API 全景 Open full API map →