jamwithai/production-agentic-rag-coursePublic

AI summary: Educational project focused on building production-ready agentic RAG systems.

Stars
9.5K
+87 today
Forks
2.1K
Watchers
86
Open issues
13
Open PRs
16
Contributors
~6
Commits
39
Branches
2

PythonMITCreated Aug 6, 2025Last push 4mo agoLatest release week7.0+87 stars this week+87 this month

Quick answers

What is production-agentic-rag-course?
Educational project focused on building production-ready agentic RAG systems.
What does production-agentic-rag-course do?
The Mother of AI Project is a comprehensive course aimed at teaching learners how to build modern AI systems. Its first phase focuses on creating an arXiv paper curator using Retrieval-Augmented Generation (RAG). The curriculum guides students through hands-on implementation of production-grade AI engineering skills. It utilizes a modern tech stack including Python 3.12+, FastAPI, OpenSearch, and Docker. Participants learn the intricacies of building robust and scalable AI applications from the ground up.
Who is production-agentic-rag-course for?
Software engineers and aspiring AI developers looking to master modern AI implementation. It requires basic programming knowledge and a desire to build production-ready systems.
How popular is production-agentic-rag-course on GitHub?
jamwithai/production-agentic-rag-course has 9,475 stars and 2,075 forks on GitHub, and gained 87 stars in the last 7 days.
What license does production-agentic-rag-course use?
jamwithai/production-agentic-rag-course is released under the MIT license.

Star history

since Oct 3, 2026
02.5K5K7.5KOct 2026Oct 2026Oct 2026Oct 2026
9.5K stars as of Oct 4, 2026. Measured daily since Oct 3, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 2 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 1 commit2025-11-25: 0 commits2025-11-26: 3 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 3 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 1 commit2026-03-22: 1 commit2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 1 commit2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 0 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits
12 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What production-agentic-rag-course does

The Mother of AI Project is a comprehensive course aimed at teaching learners how to build modern AI systems. Its first phase focuses on creating an arXiv paper curator using Retrieval-Augmented Generation (RAG). The curriculum guides students through hands-on implementation of production-grade AI engineering skills. It utilizes a modern tech stack including Python 3.12+, FastAPI, OpenSearch, and Docker. Participants learn the intricacies of building robust and scalable AI applications from the ground up.

Software engineers and aspiring AI developers looking to master modern AI implementation. It requires basic programming knowledge and a desire to build production-ready systems.

  • Hands-on implementation: Guides learners through building a complete RAG system from scratch using real-world tools.
  • Modern tech stack: Utilizes Python 3.12+, FastAPI, and OpenSearch to teach current industry standards effectively.
  • Containerized deployment: Employs Docker Compose to ensure consistent environments and easy application scaling.
  • ArXiv paper curation: Focuses on practical application by building a system to retrieve and generate insights from scientific papers.
  • Progressive learning structure: Divided into distinct phases and weeks to facilitate structured skill acquisition.

Where teams use it

Learning RAG implementation

Follow a structured curriculum to master the skills needed to build Retrieval-Augmented Generation systems.

Building AI portfolios

Create a fully functional arXiv paper curator to showcase modern AI engineering capabilities.

Mastering modern AI stacks

Gain practical experience with Python, FastAPI, and OpenSearch in a containerized environment.

Understanding agentic systems

Explore advanced AI concepts by building systems that autonomously retrieve and process information.

README

main branch

The Mother of AI Project

Phase 1 RAG Systems: arXiv Paper Curator

A Learner-Focused Journey into Production RAG Systems

Learn to build modern AI systems from the ground up through hands-on implementation

Master the most in-demand AI engineering skills: RAG (Retrieval-Augmented Generation)

Python Version FastAPI OpenSearch Docker Status


RAG Architecture

📖 About This Course

This is a learner-focused project where you'll build a complete research assistant system that automatically fetches academic papers, understands their content, and answers your research questions using advanced RAG techniques.

The arXiv Paper Curator will teach you to build a production-grade RAG system using industry best practices. Unlike tutorials that jump straight to vector search, we follow the professional path: master keyword search foundations first, then enhance with vectors for hybrid retrieval.

🎯 The Professional Difference: We build RAG systems the way successful companies do - solid search foundations enhanced with AI, not AI-first approaches that ignore search fundamentals.

By the end of this course, you'll have your own AI research assistant and the deep technical skills to build production RAG systems for any domain.

🎓 What You'll Build

  • Week 1: Complete infrastructure with Docker, FastAPI, PostgreSQL, OpenSearch, and Airflow
  • Week 2: Automated data pipeline fetching and parsing academic papers from arXiv
  • Week 3: Production BM25 keyword search with filtering and relevance scoring
  • Week 4: Intelligent chunking + hybrid search combining keywords with semantic understanding
  • Week 5: Complete RAG pipeline with local LLM, streaming responses, and Gradio interface
  • Week 6: Production monitoring with Langfuse tracing and Redis caching for optimized performance
  • Week 7: Agentic RAG with LangGraph and Telegram Bot for mobile access

🏗️ System Architecture Evolution

Week 7: Agentic RAG & Telegram Bot Integration

Week 7 Telegram and Agentic AI Architecture

Complete Week 7 architecture showing Telegram bot integration with the agentic RAG system

LangGraph Agentic RAG Workflow

LangGraph Agentic RAG Flow

Detailed LangGraph workflow showing decision nodes, document grading, and adaptive retrieval

Week 7 Code walkthrough + blog: Agentic RAG with LangGraph and Telegram

Key Innovations in Week 7:

  • Intelligent Decision-Making: Agents evaluate and adapt retrieval strategies
  • Document Grading: Automatic relevance assessment with semantic evaluation
  • Query Rewriting: Adaptive query refinement when results are insufficient
  • Guardrails: Out-of-domain detection prevents hallucination
  • Mobile Access: Telegram bot for conversational AI on any device
  • Transparency: Full reasoning step tracking for debugging and trust

🚀 Quick Start

📋 Prerequisites

  • Docker Desktop (with Docker Compose)
  • Python 3.12+
  • UV Package Manager (Install Guide)
  • 8GB+ RAM and 20GB+ free disk space

⚡ Get Started

# 1. Clone and setup
git clone <repository-url>
cd arxiv-paper-curator

# 2. Configure environment (IMPORTANT!)
cp .env.example .env
# The .env file contains all necessary configuration for OpenSearch, 
# arXiv API, and service connections. Defaults work out of the box.
# You need to add Jina embeddings free api key and langfuse keys (check the blogs)

# 3. Install dependencies
uv sync

# 4. Start all services
docker compose up --build -d

# 5. Verify everything works
curl http://localhost:8000/api/v1/health

📚 Weekly Learning Path

Week Topic Blog Post Code Release
Week 0 The Mother of AI project - 6 phases The Mother of AI project -
Week 1 Infrastructure Foundation The Infrastructure That Powers RAG Systems week1.0
Week 2 Data Ingestion Pipeline Building Data Ingestion Pipelines for RAG week2.0
Week 3 OpenSearch ingestion & BM25 retrieval The Search Foundation Every RAG System Needs week3.0
Week 4 Chunking & Hybrid Search The Chunking Strategy That Makes Hybrid Search Work week4.0
Week 5 Complete RAG system The Complete RAG System week5.0
Week 6 Production monitoring & caching Production-ready RAG: Monitoring & Caching week6.0
Week 7 Agentic RAG & Telegram Bot Agentic RAG with LangGraph and Telegram week7.0

📥 Clone a specific week's release:

# Clone a specific week's code
git clone --branch <WEEK_TAG> https://github.com/jamwithai/arxiv-paper-curator
cd arxiv-paper-curator
uv sync
docker compose down -v
docker compose up --build -d

# Replace <WEEK_TAG> with: week1.0, week2.0, etc.

📊 Access Your Services

Service URL Purpose
API Documentation http://localhost:8000/docs Interactive API testing
Gradio RAG Interface http://localhost:7861 User-friendly chat interface
Langfuse Dashboard http://localhost:3000 RAG pipeline monitoring & tracing
Airflow Dashboard http://localhost:8080 Workflow management
OpenSearch Dashboards http://localhost:5601 Hybrid search engine UI
NOTE: Check airflow/simple_auth_manager_passwords.json.generated for Airflow username and password

📚 Week 1: Infrastructure Foundation ✅

Start here! Master the infrastructure that powers modern RAG systems.

🎯 Learning Objectives

  • Complete infrastructure setup with Docker Compose
  • FastAPI development with automatic documentation and health checks
  • PostgreSQL database configuration and management
  • OpenSearch hybrid search engine setup
  • Ollama local LLM service configuration
  • Service orchestration and health monitoring
  • Professional development environment with code quality tools

🏗️ Architecture Overview

Week 1 Infrastructure Setup

Infrastructure Components:

  • FastAPI: REST endpoints with async support (Port 8000)
  • PostgreSQL 16: Paper metadata storage (Port 5432)
  • OpenSearch 2.19: Search engine with dashboards (Ports 9200, 5601)
  • Apache Airflow 3.0: Workflow orchestration (Port 8080)
  • Ollama: Local LLM server (Port 11434)

📓 Setup Guide

# Launch the Week 1 notebook
uv run jupyter notebook notebooks/week1/week1_setup.ipynb

Completion Guide: Follow the Week 1 notebook for hands-on setup and verification steps.

📖 Deep Dive

Blog Post: The Infrastructure That Powers RAG Systems - Detailed walkthrough and production insights


📚 Week 2: Data Ingestion Pipeline ✅

Building on Week 1 infrastructure: Learn to fetch, process, and store academic papers automatically.

🎯 Learning Objectives

  • arXiv API integration with rate limiting and retry logic
  • Scientific PDF parsing using Docling
  • Automated data ingestion pipelines with Apache Airflow
  • Metadata extraction and storage workflows
  • Complete paper processing from API to database

🏗️ Architecture Overview

Week 2 Data Ingestion Architecture

Data Pipeline Components:

  • MetadataFetcher: 🎯 Main orchestrator coordinating the entire pipeline
  • ArxivClient: Rate-limited paper fetching with retry logic
  • PDFParserService: Docling-powered scientific document processing
  • Airflow DAGs: Automated daily paper ingestion workflows
  • PostgreSQL Storage: Structured paper metadata and content

📓 Implementation Guide

# Launch the Week 2 notebook  
uv run jupyter notebook notebooks/week2/week2_arxiv_integration.ipynb

Completion Guide: Follow the Week 2 notebook for hands-on implementation and verification steps.

📖 Deep Dive

Blog Post: Building Data Ingestion Pipelines for RAG - arXiv API integration and PDF processing


📚 Week 3: Keyword Search First - The Critical Foundation

Building on Weeks 1-2 foundation: Implement the keyword search foundation that professional RAG systems rely on.

🎯 Learning Objectives

  • Why keyword search is essential for RAG systems (foundation first approach)
  • OpenSearch index management, mappings, and search optimization
  • BM25 algorithm and the math behind effective keyword search
  • Query DSL for building complex search queries with filters and boosting
  • Search analytics for measuring relevance and performance
  • Production patterns used by real companies

🏗️ Architecture Overview

Week 3 OpenSearch Flow Architecture

Search Infrastructure Components:

  • OpenSearch Service: src/services/opensearch/ - Professional search service implementation
  • Search API: src/routers/search.py - Search API endpoints with BM25 scoring
  • Learning Materials: notebooks/week3/ - Complete OpenSearch integration guide
  • Quality Metrics: Precision, recall, and relevance scoring

📓 Setup Guide

# Launch the Week 3 notebook
uv run jupyter notebook notebooks/week3/week3_opensearch.ipynb

Completion Guide: Follow the Week 3 notebook for hands-on OpenSearch setup and BM25 search implementation.

📖 Deep Dive

Blog Post: The Search Foundation Every RAG System Needs - Complete BM25 implementation with OpenSearch


📚 Week 4: Chunking & Hybrid Search - The Semantic Layer

Building on Week 3 foundation: Add the semantic layer that makes search truly intelligent.

🎯 Learning Objectives

  • Section-based chunking with intelligent document segmentation
  • Production embeddings with Jina AI integration and fallback strategies
  • Hybrid search mastery using RRF fusion for keyword + semantic retrieval
  • Unified API design with single endpoint supporting multiple search modes
  • Performance analysis and trade-offs between search approaches

🏗️ Architecture Overview

Week 4 Hybrid Search Architecture

Hybrid Search Infrastructure Components:

  • Text Chunker: src/services/indexing/text_chunker.py - Section-aware chunking with overlap strategies
  • Embeddings Service: src/services/embeddings/ - Production embedding pipeline with Jina AI
  • Hybrid Search API: src/routers/hybrid_search.py - Unified search API supporting all modes
  • Learning Materials: notebooks/week4/ - Complete hybrid search implementation guide

📓 Setup Guide

# Launch the Week 4 notebook
uv run jupyter notebook notebooks/week4/week4_hybrid_search.ipynb

Completion Guide: Follow the Week 4 notebook for hands-on implementation and verification steps.

📖 Deep Dive

Blog Post: The Chunking Strategy That Makes Hybrid Search Work - Production chunking and RRF fusion implementation


📚 Week 5: Complete RAG Pipeline with LLM Integration

Building on Week 4 hybrid search: Add the LLM layer that turns search into intelligent conversation.

🎯 Learning Objectives

  • Local LLM integration with Ollama for complete data privacy
  • Performance optimization with 80% prompt reduction (6x speed improvement)
  • Streaming implementation using Server-Sent Events for real-time responses
  • Dual API design with standard and streaming endpoints
  • Interactive Gradio interface with advanced parameter controls

🏗️ Architecture Overview

Week 5 Complete RAG System Architecture

Complete RAG Infrastructure Components:

  • RAG Endpoints: src/routers/ask.py - Dual endpoints (/api/v1/ask + /api/v1/stream)
  • Ollama Service: src/services/ollama/ - LLM client with optimized prompts
  • System Prompt: src/services/ollama/prompts/rag_system.txt - Optimized for academic papers
  • Gradio Interface: src/gradio_app.py - Interactive web UI with streaming support
  • Launcher Script: gradio_launcher.py - Easy-launch script (runs on port 7861)

📓 Setup Guide

# Launch the Week 5 notebook
uv run jupyter notebook notebooks/week5/week5_complete_rag_system.ipynb

# Launch Gradio interface
uv run python gradio_launcher.py
# Open http://localhost:7861

Completion Guide: Follow the Week 5 notebook for hands-on LLM integration and RAG pipeline implementation.

📖 Deep Dive

Blog Post: The Complete RAG System - Complete RAG system with local LLM integration and optimization techniques


📚 Week 6: Production Monitoring and Caching

Building on Week 5 complete RAG system: Add observability, performance optimization, and production-grade monitoring.

🎯 Learning Objectives

  • Langfuse integration for end-to-end RAG pipeline tracing
  • Redis caching strategy with intelligent cache keys and TTL management
  • Performance monitoring with real-time dashboards for latency and costs
  • Production patterns for observability and optimization
  • Cost analysis and LLM usage optimization (150-400x speedup with caching)

🏗️ Architecture Overview

Week 6 Monitoring & Caching Architecture

Production Infrastructure Components:

  • Langfuse Service: src/services/langfuse/ - Complete tracing integration with RAG-specific metrics
  • Cache Service: src/services/cache/ - Redis client with exact-match caching and graceful fallback
  • Updated Endpoints: src/routers/ask.py - Integrated tracing and caching middleware
  • Docker Config: docker-compose.yml - Added Redis service and Langfuse local instance
  • Learning Materials: notebooks/week6/ - Complete monitoring and caching implementation guide

📓 Setup Guide

# Launch the Week 6 notebook
uv run jupyter notebook notebooks/week6/week6_cache_testing.ipynb

Completion Guide: Follow the Week 6 notebook for hands-on Langfuse tracing and Redis caching implementation.

📖 Deep Dive

Blog Post: Production-ready RAG: Monitoring & Caching - Production-ready RAG with monitoring and caching


📚 Week 7: Agentic RAG with LangGraph and Telegram Bot

Building on Week 6 production system: Add intelligent reasoning, multi-step decision-making, and Telegram bot integration for mobile-first AI interactions.

🎯 Learning Objectives

  • LangGraph workflows for state-based agent orchestration with decision nodes
  • Guardrail implementation for query validation and domain boundary detection
  • Document grading with semantic relevance evaluation
  • Query rewriting for automatic query refinement and better retrieval
  • Adaptive retrieval with multi-attempt retrieval and intelligent fallback
  • Telegram bot integration with async operations and error handling
  • Reasoning transparency by exposing agent decision-making process

🏗️ Architecture Overview

Week 7 Agentic RAG & Telegram Architecture

Agentic RAG Infrastructure Components:

  • Agent Nodes: src/services/agents/nodes/ - Guardrail, retrieve, grade, rewrite, and generate nodes
  • Workflow Orchestration: src/services/agents/agentic_rag.py - LangGraph workflow coordination
  • Telegram Bot: src/services/telegram/ - Command handlers and message processing
  • Agentic Endpoint: src/routers/agentic_ask.py - Agentic RAG API endpoint
  • Learning Materials: notebooks/week7/ - Week 7 learning materials and examples

📓 Setup Guide

# Launch the Week 7 notebook
uv run jupyter notebook notebooks/week7/week7_agentic_rag.ipynb

Completion Guide: Follow the Week 7 notebook for hands-on LangGraph agentic RAG and Telegram bot implementation.

📖 Deep Dive

Blog Post: Agentic RAG with LangGraph and Telegram - Building intelligent agents with decision-making, adaptive retrieval, and mobile access


⚙️ Configuration

Setup:

cp .env.example .env
# Edit .env for your environment

Key Variables:

  • JINA_API_KEY - Required for Week 4+ (hybrid search with embeddings)
  • TELEGRAM__BOT_TOKEN - Required for Week 7 (Telegram bot integration)
  • LANGFUSE__PUBLIC_KEY & LANGFUSE__SECRET_KEY - Optional for Week 6 (monitoring)

Complete Configuration: See .env.example for all available options and detailed documentation.


🔧 Reference & Development Guide

🛠️ Technology Stack

Service Purpose Status
FastAPI REST API with automatic docs ✅ Ready
PostgreSQL 16 Paper metadata and content storage ✅ Ready
OpenSearch 2.19 Hybrid search engine (BM25 + Vector) ✅ Ready
Apache Airflow 3.0 Workflow automation ✅ Ready
Jina AI Embedding generation (Week 4) ✅ Ready
Ollama Local LLM serving (Week 5) ✅ Ready
Redis High-performance caching (Week 6) ✅ Ready
Langfuse RAG pipeline observability (Week 6) ✅ Ready

Development Tools: UV, Ruff, MyPy, Pytest, Docker Compose

🏗️ Project Structure

arxiv-paper-curator/
├── src/                    # Main application code
│   ├── routers/            # API endpoints (search, ask, papers)
│   ├── services/           # Business logic (opensearch, ollama, agents, cache)
│   ├── models/             # Database models (SQLAlchemy)
│   ├── schemas/            # Pydantic validation schemas
│   └── config.py           # Environment configuration
├── notebooks/              # Weekly learning materials (week1-7)
├── airflow/                # Workflow orchestration (DAGs)
├── tests/                  # Test suite
└── compose.yml             # Docker service orchestration

📡 API Endpoints Reference

Endpoint Method Description Week
/health GET Service health check Week 1
/api/v1/papers GET List stored papers Week 2
/api/v1/papers/{id} GET Get specific paper Week 2
/api/v1/search POST BM25 keyword search Week 3
/api/v1/hybrid-search/ POST Hybrid search (BM25 + Vector) Week 4

API Documentation: Visit http://localhost:8000/docs for interactive API explorer

🔧 Essential Commands

Using the Makefile (Recommended)
# View all available commands
make help

# Quick workflow
make start         # Start all services
make health        # Check all services health
make test          # Run tests
make stop          # Stop services
All Available Commands
Command Description
make start Start all services
make stop Stop all services
make restart Restart all services
make status Show service status
make logs Show service logs
make health Check all services health
make setup Install Python dependencies
make format Format code
make lint Lint and type check
make test Run tests
make test-cov Run tests with coverage
make clean Clean up everything
Direct Commands (Alternative)
# If you prefer using commands directly
docker compose up --build -d    # Start services
docker compose ps               # Check status
docker compose logs            # View logs
uv run pytest                 # Run tests

🎓 Target Audience

Who Why
AI/ML Engineers Learn production RAG architecture beyond tutorials
Software Engineers Build end-to-end AI applications with best practices
Data Scientists Implement production AI systems using modern tools

🛠️ Troubleshooting

Common Issues:

  • Services not starting? Wait 2-3 minutes, check docker compose logs
  • Port conflicts? Stop other services using ports 8000, 8080, 5432, 9200
  • Memory issues? Increase Docker Desktop memory allocation

Get Help:

  • Check the comprehensive Week 1 notebook troubleshooting section
  • Review service logs: docker compose logs [service-name]
  • Complete reset: docker compose down --volumes && docker compose up --build -d

💰 Cost Structure

This course is completely free! You'll only need minimal costs for optional services:

  • Local Development: $0 (everything runs locally)
  • Optional Cloud APIs: ~$2-5 for external LLM services (if chosen)

🎉 Ready to Start Your AI Engineering Journey?

Begin with the Week 1 setup notebook and build your first production RAG system!

For learners who want to master modern AI engineering

Built with love by Shirin Khosravi Jam & Shantanu Ladhwe


Star History

Star History Chart


📄 License

MIT License - see LICENSE file for details.

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

7 total
  1. **What's included:** • LangGraph-powered agentic RAG with intelligent decision-making • Guardrail node for query validation and domain boundary detection • Document grading with semantic relevance evaluation • Query rewriting for automatic query refinement • Adaptive multi-attempt retrieval with intelligent fallback • Telegram bot integration with async operations • Reasoning transparency with exposed decision steps • Interactive Jupyter notebook tutorial (notebooks/week7/week7_agentic_rag.ipynb) **Key learning outcomes:** • Build state-based agent workflows with LangGraph • Implement guardrails for query validation • Design document grading systems • Create adaptive retrieval strategies • Integrate Telegram bots with RAG systems • Expose reasoning steps for transparency and debugging **Prerequisites:** • Completed Week 1-6 setup • Docker Desktop with Docker Compose running • Python 3.12+ with UV Package Manager • All services healthy (FastAPI, PostgreSQL, OpenSearch, Airflow, Ollama, Redis, Langfuse) **Getting started:** ``` git clone --branch week7.0 https://github.com/jamwithai/arxiv-paper-curator cd arxiv-paper-curator uv sync docker compose down -v docker compose up --build

  2. **What's included:** • Complete Docker Compose infrastructure setup • FastAPI backend with health monitoring endpoints • PostgreSQL database for metadata storage • OpenSearch hybrid search engine with dashboards • Apache Airflow for workflow orchestration • Ollama integration for local LLMs • Interactive Jupyter notebook tutorial (notebooks/week1/week1_setup.ipynb) **Key learning outcomes:** • Set up production-grade RAG infrastructure • Configure and orchestrate multiple services • Implement health checks and monitoring • Build async REST APIs with FastAPI • Work with vector and text search in OpenSearch **Prerequisites:** • Docker Desktop with Docker Compose • Python 3.12+ • UV Package Manager • 8GB+ RAM, 20GB+ disk space **Getting started:** ``` git clone --branch week1.0 <repository-url> cd arxiv-paper-curator uv sync docker compose up --build -d ```

  3. Week 6: Production Monitoring and Caching Production-ready RAG system with comprehensive observability and performance optimization: ✅ Langfuse Integration - End-to-end RAG pipeline tracing and analytics - Real-time performance monitoring dashboards - Query pattern analysis and success rate tracking ✅ Redis Caching Layer - 150-400x performance improvement for repeated queries - Intelligent cache key strategies with TTL management - 60%+ cache hit rate eliminating redundant LLM calls

  4. Major Features: - Add Ollama service integration with llama3.2 models - Implement dual API design (standard + streaming endpoints) - Create optimized prompt templates with minimal context - Build Gradio interface for interactive RAG testing - Add production configuration and error handling - Include comprehensive documentation and examples Technical Improvements: - Streaming RAG responses via Server-Sent Events - Clean prompt engineering with 80% context reduction - Automatic source deduplication and citation formatting - Production-ready error handling and health checks - Configurable model selection (llama3.2:1b, 3b, etc.)

  5. Major Features: - Section-based document chunking with intelligent overlaps - Jina AI embeddings for semantic similarity search - Hybrid search with RRF (Reciprocal Rank Fusion) - Unified OpenSearch index architecture - Production FastAPI endpoints with error handling Technical Implementation: - Real 1024-dimensional vector embeddings - Automatic embedding generation in API endpoints - Graceful fallback from hybrid to BM25 search - Comprehensive chunking strategies for academic papers - Enhanced search relevance with semantic understanding

Commits per week

last 52 weeks
40Week of 2025-10-05: 0 commitsWeek of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 2 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 4 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 3 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 1 commitsWeek of 2026-03-22: 1 commitsWeek of 2026-03-29: 1 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 0 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 0 commitsWeek of 2026-05-24: 0 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 0 commitsWeek of 2026-06-14: 0 commitsWeek of 2026-06-21: 0 commitsWeek of 2026-06-28: 0 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 0 commitsWeek of 2026-07-26: 0 commitsWeek of 2026-08-02: 0 commitsWeek of 2026-08-09: 0 commitsWeek of 2026-08-16: 0 commitsWeek of 2026-08-23: 0 commitsWeek of 2026-08-30: 0 commitsWeek of 2026-09-06: 0 commitsWeek of 2026-09-13: 0 commitsWeek of 2026-09-20: 0 commitsWeek of 2026-09-27: 0 commitsOct 5, 2025Sep 27, 2026
12 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 3 commitsSun 10:00 — 0 commitsSun 11:00 — 0 commitsSun 12:00 — 0 commitsSun 13:00 — 3 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 0 commitsSun 17:00 — 0 commitsSun 18:00 — 0 commitsSun 19:00 — 0 commitsSun 20:00 — 0 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 0 commitsMon 0:00 — 0 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 0 commitsMon 10:00 — 0 commitsMon 11:00 — 0 commitsMon 12:00 — 1 commitsMon 13:00 — 0 commitsMon 14:00 — 0 commitsMon 15:00 — 0 commitsMon 16:00 — 0 commitsMon 17:00 — 0 commitsMon 18:00 — 0 commitsMon 19:00 — 0 commitsMon 20:00 — 0 commitsMon 21:00 — 0 commitsMon 22:00 — 0 commitsMon 23:00 — 0 commitsTue 0:00 — 0 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 0 commitsTue 9:00 — 0 commitsTue 10:00 — 0 commitsTue 11:00 — 0 commitsTue 12:00 — 0 commitsTue 13:00 — 0 commitsTue 14:00 — 0 commitsTue 15:00 — 0 commitsTue 16:00 — 0 commitsTue 17:00 — 0 commitsTue 18:00 — 0 commitsTue 19:00 — 0 commitsTue 20:00 — 0 commitsTue 21:00 — 0 commitsTue 22:00 — 0 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 1 commitsWed 10:00 — 1 commitsWed 11:00 — 1 commitsWed 12:00 — 0 commitsWed 13:00 — 0 commitsWed 14:00 — 0 commitsWed 15:00 — 0 commitsWed 16:00 — 0 commitsWed 17:00 — 0 commitsWed 18:00 — 1 commitsWed 19:00 — 0 commitsWed 20:00 — 1 commitsWed 21:00 — 0 commitsWed 22:00 — 1 commitsWed 23:00 — 1 commitsThu 0:00 — 0 commitsThu 1:00 — 0 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 4 commitsThu 8:00 — 0 commitsThu 9:00 — 2 commitsThu 10:00 — 1 commitsThu 11:00 — 0 commitsThu 12:00 — 2 commitsThu 13:00 — 0 commitsThu 14:00 — 0 commitsThu 15:00 — 0 commitsThu 16:00 — 0 commitsThu 17:00 — 1 commitsThu 18:00 — 0 commitsThu 19:00 — 0 commitsThu 20:00 — 0 commitsThu 21:00 — 0 commitsThu 22:00 — 0 commitsThu 23:00 — 0 commitsFri 0:00 — 0 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 0 commitsFri 10:00 — 0 commitsFri 11:00 — 0 commitsFri 12:00 — 0 commitsFri 13:00 — 0 commitsFri 14:00 — 0 commitsFri 15:00 — 0 commitsFri 16:00 — 1 commitsFri 17:00 — 2 commitsFri 18:00 — 2 commitsFri 19:00 — 0 commitsFri 20:00 — 0 commitsFri 21:00 — 0 commitsFri 22:00 — 0 commitsFri 23:00 — 0 commitsSat 0:00 — 0 commitsSat 1:00 — 0 commitsSat 2:00 — 0 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 0 commitsSat 10:00 — 0 commitsSat 11:00 — 0 commitsSat 12:00 — 0 commitsSat 13:00 — 0 commitsSat 14:00 — 1 commitsSat 15:00 — 0 commitsSat 16:00 — 0 commitsSat 17:00 — 0 commitsSat 18:00 — 0 commitsSat 19:00 — 0 commitsSat 20:00 — 0 commitsSat 21:00 — 3 commitsSat 22:00 — 0 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Oct 4, 2026daily#10+192
Oct 3, 2026daily#10+192