From the course: Hands-On AI: RAG using LlamaIndex

How LlamaIndex is organized - LlamaIndex Tutorial

From the course: Hands-On AI: RAG using LlamaIndex

How LlamaIndex is organized

- [Instructor] LlamaIndex is a data framework for LLM applications that makes integrating data into language models easy. Essentially, it is a framework for building context augmented LLM applications. What the team means by context augmented is any use case that is using a LLM plus private or domain specific data. At its core, LlamaIndex offers methods for incorporating this private or specialized data into the language model, which, as we discussed, helps enhance the output of a language model. And there's a suite of tools that LlamaIndex provides that makes it relatively easy to deploy production grade RAG systems. You get tools for connecting to data, to ingest data from their native source and format, which could be an API, PDF, SQL database, and so much more. There's also indexes that structure data in some intermediate representation that's easy and performant for a LLM to consume. There's also this concept of an engine. So you have a retriever engine, a query engine, that provide natural language access to data. So we have these query engines that are powerful retrieval interfaces for knowledge augmented output. There's also, you know, chat engines that allow you to do conversational interfaces back and forth kind of dynamic with your data. There's also data agents, which are LLM powered knowledge workers that are augmented by tools, and LlamaIndex gives you all of this and helps you connect with the rest of your ecosystem through its hub. So the LlamaHub has a wide range of integrations. There's, you know, integrations that connect to different loaders and different readers. There's integrations that connect to different vector stores, different LLMs. There's also a lot of community contributed type of work that is available to you on the hub, that typically, you know, if a new paper comes out, showcasing some new methodology in RAG somebody from the community might write a Llama Pack for that research paper for that new methodology and submit it to the LlamaHub. In general, LlamaIndex, it sits between your data, your embeddings, your language model, your vector store, and the different use cases. It allows you to connect your data to an LLM, and gives you a lot of modules for loading, indexing, querying, and even evaluating your RAG system. There's two different SDKs available with LlamaIndex. There's the Python SDK, and the TypeScript SDK. We are going to be using Python throughout this course. There's, you know, so many different integrations and packs like we've discussed available to you through LlamaHub. And as you can see here, they've got a huge number of different integrations for you to build a RAG system. It's heavily used by the community. I mean it gets 2.8 million downloads per month, 15K community members, 700 contributors. It's huge burgeoning resource and library that is really pushing the state of the art and retrieve augmented generation forward. So LlamaIndex, ever since its most recent major release, which is V 1.0, it was refactored into a core library and a number of smaller libraries that are either integrations or packs. And we talked a little bit about integrations when we set up our development environment where we installed the integrations for Quadrant, for OpenAI, Cohere, so on and so forth. The Llama Packs are those modules that are kind of on the cutting edge that are pushing RAG forward. So for example, you can go to LlamaIndex, LlamaHub rather click on Llama Packs, and you can see all these different types of packs that are available to you. A good rule of thumb to kind of decide which pack to use is just to look at the ones that got the most downloads. So you could sort again by popularity, and you can see there's a long tail of packs. Like not everything that comes out gets readily adopted by the community. So if you're kind of wondering which pack to hack around with, that's really a way to get some signal from that. So to summarize it, to wrap it all up, LlamaIndex acts as the data framework to build context augmented LLM applications. It is split up into a few different libraries. There's the core library, there's the integrations, and then the Llama Packs. And if you wanted to find out what the different integrations are, you can go to llamahub.ai. The docs are at docs.llamaindex.ai. The docs are very in depth, very intense, and you know, if I'm being frank with you, the docs are very hard to navigate. But I'm hoping that throughout the rest of this course you'll be able to kind of understand how to build performant RAG systems using LlamaIndex. In the next several modules, I'm going to talk about the core components of LlamaIndex before we start actually building out RAG pipelines.

Contents