Loading...

Building an RAG Chatbot Using Python, LangChain, FAISS & OpenAI

Building an RAG Chatbot Using Python, LangChain, FAISS & OpenAI

Dates:   April 22, 2025 - May 5, 2025

Time:   6.00 PM - 8.30 PM

KES:   2,500

Past Master Class

Building an RAG Chatbot Using Python, LangChain, FAISS & OpenAI

Prerequisites

Basic coding knowledge in any language e.g. JavaScript, PHP, Python, Java etc.

Overview

In this era of Large Language Models (LLMs), ensuring factual accuracy and contextual relevance in AI-generated responses is a critical challenge. Retrieval-Augmented Generation (RAG) bridges this gap by enhancing LLMs with real-time, domain-specific information retrieval. This project provides a hands-on experience in building a fully functional RAG-powered chatbot, covering the complete pipeline—from data ingestion and vector search to retrieval and response generation. By the end of the program, you will have gained practical experience with embeddings, vector search, retrieval optimization, tools, chains, agents, LangChain, FAISS, and OpenAI.

Problem                                 

Traditional AI chatbots rely solely on pre-trained LLMs, often generating hallucinated or outdated responses. These models struggle with:

  • Lack of contextual grounding – Responses are based only on pre-trained knowledge.
  • No real-time retrieval – They can't fetch updated or domain-specific information.
  • Inability to customize knowledge – Businesses need a way to integrate proprietary data dynamically.

This leads to unreliable AI assistants that cannot be trusted for business-critical use cases.

Solution

This project introduces a Retrieval-Augmented Generation (RAG) chatbot built using Python, LangChain, FAISS, and OpenAI. Instead of relying solely on an LLM’s pre-trained knowledge, the chatbot will dynamically retrieve relevant information from an indexed document store before generating responses.

Project Outline

Day

Date

Objective

Delivery

Day 1

Tuesday

22/04/2025

Onboarding

🔹 Course overview.

🔹 Joining Google Classroom.

🔹 Setting up our development environment.

Live Session - Practical

Day 2

Wednesday

23/04/2025

Introduction | Understanding RAG

🔹 What is Retrieval-Augmented Generation?

🔹 Why do LLMs need retrieval?

🔹 Basic pipeline overview: index, query, retrieve and generate.

🔹 Introduction to embeddings.

🔹 FAISS vs other vector search methods

Live Session - Theory

Day 3

Thursday

24/04/2025

Assignment

🔹 Reading + quiz: RAG Fundamentals.

Offline (Submit
assignment to
Google Classroom)

Day 4

Friday

25/04/2025

Setting Up a Simple RAG App

🔹 Setting up a Python environment.

🔹 Creating an in-memory vector database.

🔹 Indexing – loading, splitting and storing documents.

🔹 Retrieval and generation

Live Session - Practical

Day 5

Saturday

26/04/2025

Assignment

🔹 Reading + quiz: index, query, retrieve and generate.

Offline (Submit
assignment to
Google Classroom)

Day 6

Monday

28/04/2025

Improving Our RAG App – Part 1

🔹 Fine-tuning retrieval quality (top-k results).

🔹 Query analysis.

🔹 Tools and chains.

🔹 Chat history.

Live Session – Theory and Practical

Day 7

Tuesday

29/04/2025

Assignment

🔹 Reading + quiz: query analysis, tools, chains and chat history.

Offline (Submit
assignment to
Google Classroom)

Day 8

Wednesday

30/04/2025

Improving Our RAG App – Part 2

🔹 Introduction to agents and decomposition.

🔹 Building an agent.

Live Session – Theory and Practical

Day 9

Thursday

01/05/2025

Assignment

🔹 Reading + quiz: agents and decomposition.

Offline (Submit
assignment to
Google Classroom)

Day 10

Friday

02/05/2025

Conclusion and Next Steps

🔹 Projects presentation.

🔹 Discussion – next steps.

Live Session – Theory and Practical

 

 

Trainer

Brian Cheboi

Software Engineer – SaaS, AI, E-commerce

LinkedIn: https://www.linkedin.com/in/brian-cheboi/

About the Trainer

Brian Cheboi is a software engineer specializing in AI-powered SaaS, e-commerce, and big data solutions. With experience in finance, real estate, and enterprise AI, he has developed platforms that drive business automation, intelligent decision-making, and large-scale efficiency. Brian recently built an MVP that secured $1M in funding from a Dubai-based accelerator. He is passionate about leveraging technology to create impactful solutions that drive sustainable business growth.