Discover LlamaIndex: Introduction to Data Agents for Developers

LlamaIndex · Beginner ·🧠 Large Language Models ·2y ago

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 LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex
2 LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex
3 Discover LlamaIndex: Ask Complex Queries over Multiple Documents
Discover LlamaIndex: Ask Complex Queries over Multiple Documents
LlamaIndex
4 Discover LlamaIndex: Document Management
Discover LlamaIndex: Document Management
LlamaIndex
5 Discover LlamaIndex: Joint Text to SQL and Semantic Search
Discover LlamaIndex: Joint Text to SQL and Semantic Search
LlamaIndex
6 Discover LlamaIndex: JSON Query Engine
Discover LlamaIndex: JSON Query Engine
LlamaIndex
7 LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex
8 LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex
9 LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex
10 LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex
11 LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex
12 LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex
13 Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
LlamaIndex
14 Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
LlamaIndex
15 Discover LlamaIndex: Key Components to build QA Systems
Discover LlamaIndex: Key Components to build QA Systems
LlamaIndex
16 Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
LlamaIndex
17 LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic  (with @jxnlco)
LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic (with @jxnlco)
LlamaIndex
18 Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
LlamaIndex
19 Discover LlamaIndex: Custom Retrievers + Hybrid Search
Discover LlamaIndex: Custom Retrievers + Hybrid Search
LlamaIndex
20 LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex
21 LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex
22 LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex
23 LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex
Discover LlamaIndex: Introduction to Data Agents for Developers
Discover LlamaIndex: Introduction to Data Agents for Developers
LlamaIndex
25 LlamaIndex Webinar: Finetuning + RAG
LlamaIndex Webinar: Finetuning + RAG
LlamaIndex
26 Discover LlamaIndex: SEC Insights, End-to-End Guide
Discover LlamaIndex: SEC Insights, End-to-End Guide
LlamaIndex
27 Discover LlamaIndex: Custom Tools for Data Agents
Discover LlamaIndex: Custom Tools for Data Agents
LlamaIndex
28 LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex
29 Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
LlamaIndex
30 LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex
31 LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex
32 LlamaIndex Webinar: Agents Showcase!
LlamaIndex Webinar: Agents Showcase!
LlamaIndex
33 LlamaIndex Webinar: Learn about DSPy
LlamaIndex Webinar: Learn about DSPy
LlamaIndex
34 LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex
35 LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex
36 LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex
37 LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex
38 LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex
39 LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex
40 Introducing create-llama
Introducing create-llama
LlamaIndex
41 LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex
42 Multi-modal Retrieval Augmented Generation with LlamaIndex
Multi-modal Retrieval Augmented Generation with LlamaIndex
LlamaIndex
43 LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex
44 A deep dive into Retrieval-Augmented Generation with Llamaindex
A deep dive into Retrieval-Augmented Generation with Llamaindex
LlamaIndex
45 LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex
46 LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex
47 Introduction to Query Pipelines (Building Advanced RAG, Part 1)
Introduction to Query Pipelines (Building Advanced RAG, Part 1)
LlamaIndex
48 LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LlamaIndex
49 LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex
50 Ollama X LlamaIndex Multi-Modal
Ollama X LlamaIndex Multi-Modal
LlamaIndex
51 Build Agents from Scratch (Building Advanced RAG, Part 3)
Build Agents from Scratch (Building Advanced RAG, Part 3)
LlamaIndex
52 LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex
53 LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex
54 Introduction to LlamaIndex v0.10
Introduction to LlamaIndex v0.10
LlamaIndex
55 Build SELF-DISCOVER from Scratch with LlamaIndex
Build SELF-DISCOVER from Scratch with LlamaIndex
LlamaIndex
56 Introducing LlamaCloud (and LlamaParse)
Introducing LlamaCloud (and LlamaParse)
LlamaIndex
57 LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex
58 LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex
59 A Comprehensive Cookbook for Claude 3
A Comprehensive Cookbook for Claude 3
LlamaIndex
60 LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex

This video introduces LlamaIndex Data Agents and demonstrates how to use Llama Index with Lava Hub to create custom data agents and augment them with tools from LlamaHub. It showcases various use cases, including using Wikipedia to search and retrieve articles, and using Wolfram Alpha to extend the capabilities of large language models.

Key Takeaways
  1. Initialize the Wolfram Alpha tool with API key
  2. Pass the tool directly to the Open AI agent
  3. Ask the agent to evaluate a math problem
  4. Use the Wikipedia tool to search and retrieve articles from Wikipedia
  5. Load Wikipedia pages relevant to a topic
  6. Search the vector store to answer questions
  7. Read the data from the vector store to answer follow-up questions
💡 LlamaIndex Data Agents can be used to interact with APIs and data in a read and write fashion, and can be augmented with tools from LlamaHub to extend their capabilities.

Related Reads

📰
Claude Sonnet 5 Just Launched. Is It Actually Better Or Just Newer?
Learn how Claude Sonnet 5 compares to other models like Opus 4.8 and GPT 5.6 in terms of pricing, performance, and benchmarking, and understand what these differences mean for your projects
Medium · AI
📰
Claude Sonnet 5 Just Launched. Is It Actually Better Or Just Newer?
Learn how Claude Sonnet 5 compares to Frontier models in pricing, performance, and benchmarking, and what this means for your ML projects
Medium · Machine Learning
📰
Claude Sonnet 5 Just Launched. Is It Actually Better Or Just Newer?
Learn how Claude Sonnet 5 compares to Frontier models in terms of pricing, performance, and benchmarking, and understand what these differences mean for your projects
Medium · LLM
📰
Claude Sonnet 5 Didn’t Just Get Smarter. It Changed the Economics of AI.
Claude Sonnet 5's advancements have transformed the economics of AI, making it more viable for production
Medium · LLM
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →