This device is not compatible.
PROJECT
Build a RAG Chatbot Using DeepSeek and LlamaIndex
In this project, we’ll build an AI chat agent using RAG to answer Wikipedia-based questions with Chainlit, LlamaIndex, and DeepSeek, and deploy it as an interactive React-based assistant.
You will learn to:
Generate and use vector-based document indexes from Wikipedia pages.
Build a ReAct-style agent using the LlamaIndex framework.
Create an interactive chat agent that integrates with Wikipedia search.
Implement Chainlit’s chat settings and message handling system.
Skills
Chatbot
API Integration
Generative AI
Prerequisites
Basic understanding of Python
Familiarity with APIs and HTTP requests
Some exposure to LLMs or prompt engineering
Working knowledge of how indexes and embeddings work
Technologies
Python
Chainlit
LlamaIndex
Project Description
Traditional chatbots rely solely on pre-trained knowledge, often providing outdated answers. retrieval-augmented generation (RAG) solves this by combining large language models with real-time information retrieval, allowing AI assistants to fetch relevant context before generating responses. This powers modern question-answering systems that need accurate, up-to-date information from external sources.
In this project, we'll build a RAG chatbot using DeepSeek, LlamaIndex, and Chainlit that answers questions by retrieving content from Wikipedia. Users select their LLM model (LLaMA 3 or DeepSeek) through a Chainlit interface and specify topics to index. We'll use the Groq API for LLM inference, LlamaIndex for document chunking and vector indexing, and implement a ReAct agent framework that enables step-by-step reasoning and tool usage based on retrieved context.
We'll configure API keys, build a Wikipedia indexing script that creates a vector index for semantic search, develop the chat agent with a settings menu, and integrate the ReAct agent for agentic reasoning. By the end, you'll have a working RAG application demonstrating LlamaIndex integration, DeepSeek API usage, Chainlit development, retrieval-augmented generation, and agentic workflows applicable to any conversational AI system.
Project Tasks
1
Introduction
Task 0: Get Started
Task 1: Read in the DeepSeek API Key
2
Create the Wikipedia Index
Task 2: Import Libraries
Task 3: Develop a Script to Index the Wikipedia Pages
Task 4: Create Documents
Task 5: Creating the Index
3
Build the Chat Agent
Task 6: Import Libraries for the Chat Agent
Task 7: Initialize the Settings Menu
Task 8: Create the Wikipedia Search Engine
Task 9: Create the ReAct Agent
Task 10: Finalize the Settings Menu
Task 11: Script the Chat Interactions
4
Launch the Chat Agent
Task 12: Launch the Chat Agent
Congratulations!
Subscribe to project updates
Atabek BEKENOV
Senior Software Engineer
Pradip Pariyar
Senior Software Engineer
Renzo Scriber
Senior Software Engineer
Vasiliki Nikolaidi
Senior Software Engineer
Juan Carlos Valerio Arrieta
Senior Software Engineer
Relevant Courses
Use the following content to review prerequisites or explore specific concepts in detail.