Using LlamaIndex for RAG in Python

Steven Loyens
Steven Loyens 18 Lessons 1h 4m Updated intermediate ai

Discover how to use LlamaIndex with practical examples. This framework helps you build retrieval-augmented generation (RAG) apps using Python. LlamaIndex lets you load your data and documents, create and persist searchable indexes, and query an LLM using your data as context.

In this course, you’ll learn the basics of installing the package, setting AI providers, spinning up a query engine, and running queries against remote or local models.

By the end of this course, you’ll understand that:

  • You use LlamaIndex to connect your data to LLMs, allowing you to build AI agents, workflows, query engines, and chat engines.
  • You can perform RAG with LlamaIndex to retrieve relevant context at query time, helping the LLM generate grounded answers and minimize hallucinations.

You’ll start by preparing your environment and installing LlamaIndex. From there, you’ll learn how to load your own files, build and save an index, choose different AI providers, and run targeted queries over your data through a query engine.

What’s Included:

  • 18 Lessons
  • Video Subtitles and Full Transcripts
  • 2 Downloadable Resources
  • Accompanying Text-Based Tutorial
  • Interactive Quiz to Check Your Progress
  • 2 Hands-On Coding Exercises
  • Q&A With Python Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

About Steven Loyens

Steven is an Actuary, Economist and Engineer who found his passion for coding messing about with his Commodore 64 in the eighties. He loves understanding how things work and sharing that knowledge. He's an experienced coach and mentor.

» More about Steven

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

← Browse All Courses