Discover LlamaIndex: Introduction to Data Agents for Developers
Key Takeaways
The video introduces LlamaIndex Data Agents, which are LLM powered knowledge workers that can interact with data and external APIs, and demonstrates how to use Llama Index with Lava Hub to create custom data agents and augment them with tools from LlamaHub.
Full Transcript
hi everyone my name is Adam this is going to be an intro to data agents for Developers building data agents with llama index and lava hub so the goals for this presentation are going to be to familiarize developers on data agents with llama index showcase simple and more complicated examples of data agents and by the end of this presentation you should understand how to create your own data agent with lava index and Obama hub so to start off what exactly do we mean by a data agent so data agents are a large language model powered interfaces that can intelligently interact with apis and data in a read and write fashion so essentially allowing our large language models to call functions call apis and interact with the world around it there's a number of limitations around just base level large language models that currently exist um some of them that come up a lot include limited context Windows inability to complete logical or mathematical reasoning finding knowledge password training cutoffs Etc so with data agents we can combine large language models and modern Technologies to create even more powerful interfaces a very simple example here is asking chat gbt to evaluate something like a simple quadratic so we can see that it goes through the reasoning um it tries to do all of these calculations and it makes one big mistake here which is calculating the cube of 0.06 um way off and subsequently our final answer of 33 is way off now with the Llama index data agent we can provide it the Wolfram Alpha tool and this is the exact same large language model uh chat gbt 3.5 and instead of trying to walk through the math itself we can see that the agent is just going to go ahead pass the equation to evaluate wall frame Alpha and we get the answer right back without having to do math we end up using less tokens than having the large language model try to reason it out and so you can see here that we've really extended the capabilities of what our large language model can do um suddenly we're combining all of the functionality that Wolfram Alpha has to do math and science problems and we're adding that into our large language model so the idea with lava index is that it's going to be as easy as possible to build your own custom bad engines that do these types of things um the code below here that's the entirety of the code needed to make a Wolfram Alpha data agent that answered that quadratic equation um and we can walk through it the code's pretty simple we're importing a Wolfram Alpha tool from llama Hub we're opening it we're importing a open AI agent abstraction from Lama index and all we really have to do is initialize that tool with our API key and we can pass that tool directly to the openai agent and we're ready to chat with it we're ready to ask it math questions and we're combining that with the language capabilities of the large language model um so you can see here I have like the same notebook we import open AI we import our tools from Mama index and we can go right ahead and we can ask it to evaluate our math problem and you can see here this is the large language model um adding in the text capabilities to like the simple output that we got now um for a bit more complicated example if it weren't going on uh one of the limitations we talked about was news retrieval so if we ask Chachi b2i who won the NBA playoffs in 2023 get the generic knowledge cut off answer um no access to real-time information now luckily with llama index we can give our agent access to real-time information so when we ask a lot of index agent with access to Wikipedia who won the NBA playoffs in 2023 you can see we load some content and we get the answers at the Denver Nuggets won the 22 2023 NBA finals and that's the right answer so the Wikipedia tool is letting the agent search and retrieve articles from Wikipedia and one problem we have is that an entire Wikipedia page is often too large for a large language model to process and so that's why we separated the previous example into two different function calls so I'll walk through this a bit more about the first function call was to load Wikipedia output and then the second function call was to query that from a vector store so here's the first function call that we made we search data for NBA playoffs 2023 winner we loaded the content and we informed the agent that it can now search that information using read search data and essentially what we've done is we've captured the output from searching Wikipedia and we've stored all of those pages into a vector store and now we can query that Vector store essentially as a query engine and we can ask it who won the NBA playoffs in 2023 and we'll get the output the Denver Nuggets won the 2023 MBA playoffs um since Adventure store has already been populated with context rather 22 3 NBA plots we can even ask follow questions that the agent can answer and we don't need to load the pages again so you can see when we ask the agent who did they beat uh we directly get the answer without having to load those Wikipedia Pages again so we can come in we can look at our example um as I talked about in the slides we are loading those Wikipedia and that load and search tool um we're gonna wrap our Wikipedia tool that's loading the data in the load and search load and the load and search tool is essentially what setting up our Vector store and our query engine and it's separating that Wikipedia tool into two interfaces and the cool thing about this is that any llama Hub tool can easily be wrapped with this load and search tool and so it's super easy you don't even have to think about this when you're building your tool and it's very easy to handle tools with larger output um so we can call it and I have a bit of extra output coming here so first we're doing search data which is going to load the Wikipedia pages that are relevant to the MBA playoffs 2023 winner and then you can see these are the entire documents that I'm getting from Wikipedia and this is clearly way too large to fit into a large language model it would blow up the context window super quick and so this doesn't get passed the the large language model instead we get the content loaded let's start into a vector store and now the data agent can again read that data that we've searched for and ask it who won the NBA Playoffs we get the dead in renouncements and then this is our kind of follow-up question example we don't have to load that data again we can simply read it and we can realize that the Denver Nuggets beat the Los Angeles Lakers so again just looking at this code example super straightforward it's really just five lines of code again and we're ready to chat um load all sorts of like recent events and current news from Wikipedia so both of these examples go a long way in extending the capability of modern large language models um you know all those limitations that we expressed at the start we have solutions for them now um and the nice thing is with llama index and llama Hub it's it's five lines of code agents can additionally use multiple tools at the same time so we could have passed an array of larger tools we could have given both Wolfram Alpha and the Wikipedia tools to an agent and the agent can decide when to use which tool so long Hub currently offers over 30 tools and there's hundreds of data readers that are completely ready for your agent to use just like I showed above um they're all open source so you can look at the code you can develop your own create custom tools and contribute them back to llama hub next steps after this presentation I encourage you to build your own custom data agents using llama Hub tools you can build your own tool and open source it on lava Hub I love to see your contributions and finally there's the Llama Hub notebooks folder that has a ton more examples like this presentation that serve to remedy all sorts of problems with large language models and really bypass current limitations thanks for listening
Original Description
In this video, we introduce you to LlamaIndex Data Agents - LLM powered knowledge workers that can interact with your data and external APIs in both a read and write fashion.
We show how to augment Data Agents with Tools from LlamaHub. We showcase a variety of both simple and complicated use cases. We showcase our Wikipedia agent that's supplemented with the LoadAndSearchTool to index/cache large amounts of data on the fly.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from LlamaIndex · LlamaIndex · 24 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
▶
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex
LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex
Discover LlamaIndex: Ask Complex Queries over Multiple Documents
LlamaIndex
Discover LlamaIndex: Document Management
LlamaIndex
Discover LlamaIndex: Joint Text to SQL and Semantic Search
LlamaIndex
Discover LlamaIndex: JSON Query Engine
LlamaIndex
LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex
LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex
LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex
LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex
LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex
LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
LlamaIndex
Discover LlamaIndex: Key Components to build QA Systems
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
LlamaIndex
LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic (with @jxnlco)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
LlamaIndex
Discover LlamaIndex: Custom Retrievers + Hybrid Search
LlamaIndex
LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex
LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex
LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex
LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex
Discover LlamaIndex: Introduction to Data Agents for Developers
LlamaIndex
LlamaIndex Webinar: Finetuning + RAG
LlamaIndex
Discover LlamaIndex: SEC Insights, End-to-End Guide
LlamaIndex
Discover LlamaIndex: Custom Tools for Data Agents
LlamaIndex
LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
LlamaIndex
LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex
LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex
LlamaIndex Webinar: Agents Showcase!
LlamaIndex
LlamaIndex Webinar: Learn about DSPy
LlamaIndex
LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex
LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex
LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex
LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex
LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex
LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex
Introducing create-llama
LlamaIndex
LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex
Multi-modal Retrieval Augmented Generation with LlamaIndex
LlamaIndex
LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex
A deep dive into Retrieval-Augmented Generation with Llamaindex
LlamaIndex
LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex
LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex
Introduction to Query Pipelines (Building Advanced RAG, Part 1)
LlamaIndex
LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LlamaIndex
LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex
Ollama X LlamaIndex Multi-Modal
LlamaIndex
Build Agents from Scratch (Building Advanced RAG, Part 3)
LlamaIndex
LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex
LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex
Introduction to LlamaIndex v0.10
LlamaIndex
Build SELF-DISCOVER from Scratch with LlamaIndex
LlamaIndex
Introducing LlamaCloud (and LlamaParse)
LlamaIndex
LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex
LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex
A Comprehensive Cookbook for Claude 3
LlamaIndex
LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex
More on: Multimodal LLMs
View skill →Related Reads
📰
📰
📰
📰
Claude Sonnet 5 Just Launched. Is It Actually Better Or Just Newer?
Medium · AI
Claude Sonnet 5 Just Launched. Is It Actually Better Or Just Newer?
Medium · Machine Learning
Claude Sonnet 5 Just Launched. Is It Actually Better Or Just Newer?
Medium · LLM
Claude Sonnet 5 Didn’t Just Get Smarter. It Changed the Economics of AI.
Medium · LLM
🎓
Tutor Explanation
DeepCamp AI