jamwithai/production-agentic-rag-course
GitHub: jamwithai/production-agentic-rag-course
一套完整的 7 周实战课程,指导从零构建具备混合检索、智能体编排及生产监控能力的 arXiv 论文问答系统。
Stars: 3254 | Forks: 878
# AI 之母项目
## 第一阶段 RAG 系统:arXiv 论文管理器
### LangGraph Agentic RAG 工作流
**第 7 周代码演示 + 博客:** [Agentic RAG with LangGraph and Telegram](https://jamwithai.substack.com/p/agentic-rag-with-langgraph-and-telegram)
**第 7 周的关键创新:**
- **智能决策制定**:Agent 评估并调整检索策略
- **文档分级**:通过语义评估进行自动相关性评估
- **查询重写**:当结果不足时进行自适应查询优化
- **护栏机制**:域外检测防止幻觉
- **移动访问**:在任何设备上通过 Telegram bot 进行对话式 AI
- **透明度**:完整的推理步骤跟踪,用于调试和信任
## 🚀 快速开始
### **📋 前置条件**
- **Docker Desktop** (包含 Docker Compose)
- **Python 3.12+**
- **UV 包管理器** ([安装指南](https://docs.astral.sh/uv/getting-started/installation/))
- **8GB+ 内存** 和 **20GB+ 可用磁盘空间**
### **⚡ 开始使用**
```
# 克隆与设置
git clone
cd arxiv-paper-curator
# 配置环境 (重要!)
cp .env.example .env
# .env 文件包含 OpenSearch、
# arXiv API 和服务连接的所有必要配置。默认设置即可直接使用。
# 你需要添加 Jina embeddings 免费 api key 和 langfuse keys (查看博客)
# 安装依赖
uv sync
# 启动所有服务
docker compose up --build -d
# 验证一切正常
curl http://localhost:8000/health
```
### **📚 每周学习路径**
| 周次 | 主题 | 博客文章 | 代码发布 |
|------|-------|-----------|--------------|
| **第 0 周** | AI 之母项目 - 6 个阶段 | [The Mother of AI project](https://jamwithai.substack.com/p/the-mother-of-ai-project) | - |
| **第 1 周** | 基础设施基础 | [The Infrastructure That Powers RAG Systems](https://jamwithai.substack.com/p/the-infrastructure-that-powers-rag) | [week1.0](https://github.com/jamwithai/arxiv-paper-curator/releases/tag/week1.0) |
| **第 2 周** | 数据摄取管道 | [Building Data Ingestion Pipelines for RAG](https://jamwithai.substack.com/p/bringing-your-rag-system-to-life) | [week2.0](https://github.com/jamwithai/arxiv-paper-curator/releases/tag/week2.0) |
| **第 3 周** | OpenSearch 摄取 & BM25 检索 | [The Search Foundation Every RAG System Needs](https://jamwithai.substack.com/p/the-search-foundation-every-rag-system) | [week3.0](https://github.com/jamwithai/arxiv-paper-curator/releases/tag/week3.0) |
| **第 4 周** | **分块 & 混合搜索** | [The Chunking Strategy That Makes Hybrid Search Work](https://jamwithai.substack.com/p/chunking-strategies-and-hybrid-rag) | [week4.0](https://github.com/jamwithai/arxiv-paper-curator/releases/tag/week4.0) |
| **第 5 周** | **完整 RAG 系统** | [The Complete RAG System](https://jamwithai.substack.com/p/the-complete-rag-system) | [week5.0](https://github.com/jamwithai/arxiv-paper-curator/releases/tag/week5.0) |
| **第 6 周** | **生产监控 & 缓存** | [Production-ready RAG: Monitoring & Caching](https://jamwithai.substack.com/p/production-ready-rag-monitoring-and) | [week6.0](https://github.com/jamwithai/arxiv-paper-curator/releases/tag/week6.0) |
| **第 7 周** | **Agentic RAG & Telegram Bot** | [Agentic RAG with LangGraph and Telegram](https://jamwithai.substack.com/p/agentic-rag-with-langgraph-and-telegram) | [week7.0](https://github.com/jamwithai/arxiv-paper-curator/releases/tag/week7.0) |
**📥 克隆特定周次的发布版本:**
```
# 克隆特定周的代码
git clone --branch https://github.com/jamwithai/arxiv-paper-curator
cd arxiv-paper-curator
uv sync
docker compose down -v
docker compose up --build -d
# 将 替换为: week1.0, week2.0 等。
```
### **📊 访问你的服务**
| 服务 | URL | 用途 |
|---------|-----|---------|
| **API 文档** | http://localhost:8000/docs | 交互式 API 测试 |
| **Gradio RAG 界面** | http://localhost:7861 | 用户友好的聊天界面 |
| **Langfuse 仪表板** | http://localhost:3000 | RAG 管道监控 & 追踪 |
| **Airflow 仪表板** | http://localhost:8080 | 工作流管理 |
| **OpenSearch Dashboards** | http://localhost:5601 | 混合搜索引擎 UI |
#### **注意**:请查看 airflow/simple_auth_manager_passwords.json.generated 获取 Airflow 的用户名和密码
## 📚 第 1 周:基础设施基础 ✅
**从这里开始!** 掌握支撑现代 RAG 系统的基础设施。
### **🎯 学习目标**
- 使用 Docker Compose 完成基础设施设置
- FastAPI 开发,包含自动文档和健康检查
- PostgreSQL 数据库配置和管理
- OpenSearch 混合搜索引擎设置
- Ollama 本地 LLM 服务配置
- 服务编排和健康监控
- 使用代码质量工具的专业开发环境
### **🏗️ 架构概览**
## Star History
[](https://star-history.com/#jamwithai/production-agentic-rag-course&Date)
## 📄 许可证
MIT License - 详情请参阅 [LICENSE](LICENSE) 文件。
以学习者为中心的实战生产级 RAG 系统之旅
通过动手实践,从零开始学习构建现代 AI 系统
掌握市场需求最大的 AI 工程技能:RAG (检索增强生成)
Complete Week 7 architecture showing Telegram bot integration with the agentic RAG system
Detailed LangGraph workflow showing decision nodes, document grading, and adaptive retrieval
🎉 准备好开始你的 AI 工程之旅了吗?
从第 1 周的设置笔记本开始,构建你的第一个生产级 RAG 系统!
献给希望掌握现代 AI 工程的学习者
由 Shirin Khosravi Jam & Shantanu Ladhwe 用心构建
标签:AI, Airflow, AI风险缓解, Apex, arXiv, AV绕过, BM25, DLL 劫持, DNS解析, Docker, FastAPI, LLM, NLP, PostgreSQL, Python, RAG, Ruby, TruffleHog, Unmanaged PE, 人工智能, 向量搜索, 大语言模型, 学术论文, 安全防御评估, 开源项目, 搜索引擎查询, 数据管道, 无后门, 机器学习, 检索增强生成, 测试用例, 深度学习, 混合检索, 生产环境, 用户模式Hook绕过, 知识库, 科研助手, 系统架构, 编程教程, 自动化代码审查, 语义检索, 请求拦截, 软件工程, 逆向工具