Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

How do I start using dsRAG for my own documents? What preparatory steps are required?

2025-09-05 1.4 K

使用dsRAG需要完成以下四个关键步骤:

environmental preparation

  • pass (a bill or inspection etc)pip install dsragInstalling Python Packages
  • 准备API密钥(如OpenAI/Cohere)并设置为环境变量

Document Import

from dsrag.create_kb import create_kb_from_file
file_path = "your_document.pdf"
kb = create_kb_from_file("custom_kb", file_path)

系统支持PDF/Markdown等格式,自动完成解析、分块和向量化。

Query Execution

from dsrag.knowledge_base import KnowledgeBase
kb = KnowledgeBase("custom_kb")
results = kb.query(["您的查询问题"])

自定义配置(可选)

高级用户可替换默认组件:

  • 向量数据库:Weaviate/Chroma等
  • 嵌入模型:CohereEmbedding等
  • 重排序器:VoyageReranker等

系统自动持久化所有配置到磁盘,后续使用无需重复处理文档。

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish