
Paolo introduces himself as the new co-instructor with Eden and explains the course update from the legacy version to a newer version, with ongoing updates for breaking changes.
Set up your development environment with Python, use Visual Studio Code, and install llama index to explore boilerplate code and llama index with large language models; not for beginners.
Learn how LlamaIndex unifies LLM applications across vendors, connects to private data via connectors, ingests data into vector stores, and enables natural language retrieval, augmentation, and agentic querying.
Join the course discord server to get fast answers, ask questions about the course, discuss LMS prompt engineering, and share feedback, with weekend and weekday support.
Set up a Python development environment in vscode. Create a virtual environment, configure a .env with your OpenAI key, install llama index and dependencies, and verify with a basic run.
Eden Marco invites you to leave a review and share feedback on Udemy to improve the course and help other students decide, and connect via Udemy messages or LinkedIn.
Download and scrape the llama index docs using crawl4ai to pull pages, saving md files in the llama index docs folder, and run setup with pip install and crawl4ai setup.
Learn to build a simple rag system and in-memory vectorstore by ingesting markdown documents, chunking text, creating embeddings with text-embedding-3 small, and querying with an llm-powered vector index using pinecone.
Ingest documents with a custom chunking workflow using a node parser and sentence splitter, tuning chunk size and overlap to build a vector store index from nodes for querying.
Leverage caching with llama index and chroma vector store to avoid reprocessing and reduce costs, using a simple document store, persisted cache, and a production-ready ingestion workflow.
Enable parallel processing in the llama index pipeline by configuring num workers for CPU-bound transformations. Pass documents and options like show progress while noting cache and API-bound limits.
Explore the ingestion pipeline in debug mode with LlamaIndex nodes and pinecone, revealing documents, text nodes, embeddings, IDs, metadata, and their relationships for efficient retrieval.
Connect to pinecone, instantiate the pinecone index and vector store, and run a RAG demo with llama index to retrieve documents via a query engine and answer questions.
Learn how to ground LLM answers with retrieval-based citations by surfacing retrieved source documents and their scores, and display source filenames and text fragments to ensure transparency.
From here on, it's all legacy content and will be removed soon.
Explore llama index core abstractions by importing the simple directory reader, simple node parser, service context, and vector store interfaces to prepare an end-to-end pipeline with Pinecone and OpenAI.
Load and clean HTML docs with the unstructured reader to create llama index documents, then chunk them into nodes using a text splitter with size and overlap.
Build a Python based front end using Streamlit to create a chat interface powered by llama index and a Pinecone vector store, with session state and caching for persistent conversations.
Learn to implement node post-processing in LlamaIndex using the sentence embeddings optimizer to remove duplicates and junk, and create custom post-processors to improve context quality.
Discover under hood retrieval in llama index, tracing how retrieval augmented generation uses a retriever and query engine to fetch relevant chunks and augment prompts before querying a language model.
Data Agents
Data Agents are LLM-powered knowledge workers in LlamaIndex that can intelligently perform various tasks over your data, in both a “read” and “write” function. They are capable of the following:
Perform automated search and retrieval over different types of data - unstructured, semi-structured, and structured.
Calling any external service API in a structured fashion, and processing the response + storing it for later.
In that sense, agents are a step beyond our query engines in that they can not only “read” from a static source of data, but can dynamically ingest and modify data from a variety of different tools.
Building a data agent requires the following core components:
A reasoning loop
Tool abstractions
A data agent is initialized with set of APIs, or Tools, to interact with; these APIs can be called by the agent to return information or modify state. Given an input task, the data agent uses a reasoning loop to decide which tools to use, in which sequence, and the parameters to call each tool.
Understand how a react agent uses a thought action observation loop to reason, call tools, observe results, and output. Learn to define tools, manage context, and stream thoughts.
Learn how function calling lets llm powered apps invoke tools via a json schema, run tools in parallel, and how it compares to the react agent.
What is Language Modeling?
Language modeling is the task of predicting the next word in a sentence.
It is similar to autocomplete or word suggestions we see in our day-to-day life.
The language model predicts the probability of the next word based on the previous words in the sentence.
Formal Definition of Language Modeling
Language modeling involves computing the probability distribution of the next word in a sequence of words.
The probability of the next word (x t+1) is calculated based on the sequence of words before it (X1, X2, ..., XT) and needs to be a part of the vocabulary (V).
Large Language Models: A Brief Overview
A large language model (LLM) is a language model trained on a huge amount of data.
LLMs are capable of predicting the probability of the next word with high accuracy.
They have gained immense popularity in recent times due to their ability to perform a variety of language-related tasks.
How Large Language Models Work
LLMs work by taking an input of words and predicting the probability of the next word.
They make their predictions based on the input provided and the probabilities learned during the training phase.
LLMs can sometimes generate output that is far-fetched from reality and simply not true due to the limitations of probability-based predictions.
What is a Prompt in AI Language Models?
A prompt is the input given to an AI model to produce an output.
It guides the model to understand the context and generate a meaningful response.
Components of a Prompt:
Instruction
The heart of the prompt that tells the AI model what task it needs to perform.
It sets the stage for the model's response, whether it's text summary, translation, or classification.
Context
Additional information that helps the AI model understand the task and generate more accurate responses.
For some tasks, context may not be necessary, but for others, it can significantly improve the model's performance.
Input Data
The information that the AI model will process to complete the task set in the prompt.
It could be a piece of text, image, or anything relevant to the task.
Output Indicator
Signals the AI model that we expect a response.
Sometimes implicit in the instruction, but sometimes explicitly stated.
Here are the key points we'll cover:
Large language models and their immense knowledge base
What is zero shot prompting?
An example of a zero shot prompt
Why zero shot prompts are popular among AI beginners
The limitations of zero shot prompting
With zero shot prompting, AI models can generate outputs for tasks they haven't been explicitly trained on, using their pre-existing knowledge to perform the task based on the information provided in the prompt. However, this kind of prompt comes with its own set of limitations, such as accuracy and scope.
In this video, we will explore the concept of Few Shot Prompting, a technique used in prompt engineering that allows AI models to generate or classify new data by presenting them with a small number of examples or shots of a particular task or concept along with a prompt or instruction. Here are the main points we will cover:
What is Few Shot Prompting?
Few Shot Prompting is a prompt engineering technique that involves presenting the AI model with a small number of examples or shots of a task or concept to generate or classify new data that is similar to the examples provided. It is particularly useful in scenarios where there is limited data available for a given task or domain where data may be scarce.
How Does Few Shot Prompting Work?
Few Shot Prompting works by providing the AI model with a few examples of a particular task or concept and a prompt or instruction on how to generate or classify new data similar to the examples provided. It can quickly adapt models to new tasks and domains by fine-tuning existing models without requiring a large amount of new data.
Case Study: Zero Shot, One Shot, and Few Shot Prompting in Action
We will demonstrate the effectiveness of zero shot, one shot, and few shot prompting techniques in generating text-to-text descriptions for Blue Willow, an open source AI tool that generates images from text prompts. By comparing the outputs generated by each technique, we will see which one performed better according to our task of generating a good description to paint a picture.
Introduction to Chain of Thought
Explanation of Chain of Thought's purpose in improving LLM reasoning abilities
How Chain of Thought allows models to decompose complex problems into manageable steps
Standard Prompting Limitations
Examples of insufficient answers with standard zero-shot prompting
Explanation of zero-shot prompting
Chain of Thought Prompting
Explanation of Chain of Thought as a new prompting technique
Examples of Chain of Thought's success in solving complex reasoning problems
Comparison to human problem-solving methods
Zero-Shot and Few-Shot Chain of Thought Prompting
Explanation of zero-shot Chain of Thought prompting
Explanation of few-shot Chain of Thought prompting
Benefits and limitations of each method
In this video, we will explore the ReAct Prompting technique, a powerful approach to prompt engineering that combines reasoning and acting to accomplish complex tasks. Here are the main points we will cover:
What is ReAct Prompting?
ReAct Prompting is a technique that allows language models to reason and act upon a task to generate an output.
It is based on the chain of thoughts that the model can generate to accomplish a task.
How Does ReAct Prompting Work?
ReAct Prompting involves breaking down a task into multiple steps, reasoning the steps, acting upon them, and then completing the entire task.
The model can derive an action by accessing external sources or APIs, allowing it to accomplish more complex tasks.
Case Study: ReAct Prompting in Action
We will look at a research paper that demonstrates the power of ReAct Prompting in action.
The paper shows how a language model was able to derive the correct answer to a complex question by reasoning and acting upon it.
Apply context and a clear task to prompt engineering, ensuring contextual relevance and coherent responses from a large language model. Iterate prompts to refine specificity, reduce ambiguity, and improve results.
Explore the LlamaIndex Discord community to get debugging help, read focused threads, and use the Kappa index bot to query documentation for turning a function into an agent tool.
Explore the LangChain Hub as a one-stop repository for prompts, chains, and agents, and learn to download, customize, and optimize prompts for QA over documents with retrieval augmentation.
Compare LlamaIndex and LangChain to develop llm-powered apps, noting similarities in data retrieval augmentation and external data integration, and highlight LangChain's expression language and robust agent support.
Welcome to first LlamaIndex Udemy course - Unleashing the Power of LLM!
This comprehensive course is designed to teach you how to QUICKLY harness the power the LlamaIndex library for LLM applications.
This course will equip you with the skills and knowledge necessary to develop cutting-edge LLM solutions for a diverse range of topics.
Please note that this is not a course for beginners. This course assumes that you have a background in software engineering and are proficient in Python
In this course, you will embark on a journey from scratch to building a real-world LLM powered application using LlamaIndex.
We are going to do so by build the main application:
Documentation Helper- Create chatbot over a python package documentation. (and over any other data you would like)
The topics covered in this course include:
LlamaIndex
Retrieval Augmentation Generation
Vectorstores (Pinecone)
Node Parers- TextSplitters
QueryEngines, ChatEngines
Streamlit (for UI)
Agents, LLM Reasoning
ReAct
Output Parsers
LLMs: Few shots prompting, Chain of Thought, ReAct prompting
Throughout the course, you will work on hands-on exercises and real-world projects to reinforce your understanding of the concepts and techniques covered. By the end of the course, you will be proficient in using LlamaIndex to create powerful, efficient, and versatile LLM applications for a wide array of usages.
This is not just a course, it's also a community. Along with lifetime access to the course, you'll get:
Dedicated 1 on 1 troubleshooting support with me
Github links with additional AI resources, FAQ, troubleshooting guides
Access to an exclusive Discord community to connect with other learners
No extra cost for continuous updates and improvements to the course
DISCLAIMERS
Please note that this is not a course for beginners. This course assumes that you have a background in software engineering and are proficient in Python.
I will be using Pycharm/ VSCode IDE but you can use any editor you'd like since we only use basic feature of the IDE like debugging and running scripts.