https://github.com/atopx/rag-example
A RAG (Retrieval-Augmented Generation) example project
https://github.com/atopx/rag-example
langchain llm qdrant rag rig rust vector
Last synced: 2 months ago
JSON representation
A RAG (Retrieval-Augmented Generation) example project
- Host: GitHub
- URL: https://github.com/atopx/rag-example
- Owner: atopx
- License: mit
- Created: 2025-05-14T17:12:36.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-14T17:17:22.000Z (about 1 year ago)
- Last Synced: 2025-07-01T22:45:36.718Z (12 months ago)
- Topics: langchain, llm, qdrant, rag, rig, rust, vector
- Language: Rust
- Homepage:
- Size: 4.23 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-zh.md
- License: LICENSE
Awesome Lists containing this project
README
# rag-example
一个基于RAG(检索增强生成)示例项目,通过处理PDF文档构建知识库,提供智能问答功能。
## 功能特性
- PDF文档加载与分块处理
- 文本向量化与向量存储(使用Qdrant)
- 动态上下文检索的智能问答
## 依赖要求
- Rust 1.75+
- OpenAI API 密钥(用于嵌入模型和LLM)
- Qdrant 向量数据库(需提供URL和API密钥)
## 安装与运行
1. 克隆仓库:`git clone https://github.com/atopx/rag-example.git`
2. 安装依赖:`cargo build --release`
3. 配置环境变量:
- `OPENAI_API_KEY`:OpenAI API 密钥
- `OPENAI_BASE_URL`:OpenAI API 地址(可选,默认https://api.openai.com)
- `QDRANT_URL`:Qdrant 服务URL(如http://localhost:6333)
- `QDRANT_API_KEY`:Qdrant API 密钥(如无则留空)
4. 运行程序:`cargo run`
## 许可
本项目采用MIT许可协议,详见[LICENSE](LICENSE)文件。