AI Engineer World's Fair 2024

The Future of Knowledge Assistants

Jerry Liu16:55

Read the talk

Beyond Basic RAG: Building Knowledge Assistants That Can Plan, Remember, and Collaborate

Selected presentation frame from The Future of Knowledge Assistants: Jerry Liu at 94 seconds
Beyond Basic RAG: Building Knowledge Assistants That Can Plan, Remember, and Collaborate

Jerry Liu outlines a progression from reliable document processing to agentic query execution and coordinated agent services, with production readiness as the organizing constraint.

From a talk by Jerry Liu

At a glance

Ideas worth remembering

  • A useful knowledge assistant must handle varied tasks and output formats; basic RAG alone does not provide robust planning, service interaction, or conversational memory. 1:14

  • Preserving document structure during parsing can prevent tables and schedules from becoming misleading model inputs, reducing hallucinations before more advanced retrieval is introduced. 4:11

  • Agentic RAG extends retrieval with tool use, query planning, and persistent state, enabling workflows that span multiple documents and both structured and unstructured data. 6:57

  • Specialist agents can avoid overwhelming one model with hundreds or thousands of tools and may create opportunities for parallel execution and lower-cost, faster models. 9:07

  • A production-oriented multi-agent architecture treats agents as independent services coordinated through a message queue and control plane, with either explicit workflows or model-directed delegation. 11:00

  • The proposed Llama Agents architecture is explicitly alpha-stage, and reliable orchestration, service boundaries, communication protocols, and integration remain active design challenges. 10:04

A knowledge assistant must do more than retrieve passages

Selected presentation frame from The Future of Knowledge Assistants: Jerry Liu at 113 seconds
A knowledge assistant must do more than retrieve passages

Jerry Liu, Co-Founder & CEO of LlamaIndex, frames knowledge assistants as interfaces that accept many kinds of work, from straightforward questions to ambiguous research tasks, and return outputs ranging from concise answers to research reports or structured data. This framing expands beyond document search into systems that can preserve conversational context, interact with services, and potentially take actions on a user’s behalf. 0:14

A basic RAG pipeline can be assembled from parsing, sentence splitting, chunking, top-k retrieval, and a single model response, but Liu argues that this convenience obscures important production limitations. Naive pipelines can mishandle source documents, struggle with broad or complex queries, lack sophisticated service interactions, and remain stateless across conversations. 1:14

The proposed progression has three layers: stronger data and retrieval modules, more capable single-agent query flows, and coordinated multi-agent task solving. The ordering matters: agent orchestration cannot substitute for usable source data, while better retrieval alone does not provide planning, memory, or reliable coordination across specialized capabilities. 2:12

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:14 · section reference included

Production quality begins with document structure

Selected presentation frame from The Future of Knowledge Assistants: Jerry Liu at 292 seconds
Production quality begins with document structure

Liu identifies parsing, chunking, and indexing as the core components of the data-processing layer. Its job is to transform raw, unstructured, or semi-structured material into a representation that an LLM application can actually use, because retrieval and answer quality remain constrained by the quality of the underlying information. 3:02

Parsing is especially consequential when documents contain layouts that cannot be reduced safely to a flat text stream. Liu describes a financial report in which poor PDF extraction collapses a table, blending numbers with surrounding text; when the model encounters that damaged representation, the resulting answer can contain hallucinations even if the subsequent retrieval machinery is otherwise sophisticated. 4:11

His Caltrain weekend-schedule example illustrates the mechanism more concretely: a parser that preserves the spatial organization of the timetable allows the model to associate train times with the correct columns, whereas a parser that destroys that structure produces unreliable answers. The practical implication is that improved parsing can reduce hallucinations before any advanced indexing, retrieval, or agent behavior is added. 4:11

The same concern extends to enterprise document collections containing embedded charts, tables, and images. Liu presents LlamaParse and Llama Cloud in connection with processing these materials and handling decisions around parsing, chunking, and indexing, while also noting that document-quality improvements remain useful even for teams that do not want to adopt agents. 5:11

How it fits togetherHow document structure improves answers

Weekend schedule with spatially organized columns.

Preserved timetable layout makes the correct train times accessible during question answering.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:02 · section reference included

Single agents turn retrieval into a planned, stateful workflow

Selected presentation frame from The Future of Knowledge Assistants: Jerry Liu at 432 seconds
Single agents turn retrieval into a planned, stateful workflow

Once the data layer is reliable, Liu’s next step is to move beyond a single prompt that merely synthesizes retrieved passages. In Agentic RAG, the model participates in understanding the request, deciding which services to consult, and planning how to combine their outputs, rather than forwarding every question directly to the same vector database. 6:04

The core ingredients are function calling and tool use, query planning, and conversation memory. Plans may execute sequentially or follow a DAG, while persistent conversation state lets the application revisit what a user previously needed instead of treating each request as an isolated event. 6:57

Liu describes a function-calling or React-style while loop as the most stable agent reasoning pattern he has observed, while also identifying DAG-based and tree-based planning as more elaborate alternatives. These approaches can support comparisons across multiple documents, combine structured and unstructured data through a common tool-oriented interface, and deliver more personalized question answering. 8:03

Additional capability introduces tradeoffs: simpler components generally come with lower cost and lower latency, whereas more extensive agent systems increase sophistication and operational complexity. The appropriate design therefore depends on whether a given task actually needs richer planning, tool interaction, or collaboration rather than assuming maximal agent behavior is always preferable. 6:04

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:04 · section reference included

Specialized agents address the limits of a single generalist

Selected presentation frame from The Future of Knowledge Assistants: Jerry Liu at 589 seconds
Specialized agents address the limits of a single generalist

A single agent cannot reliably absorb an unlimited range of responsibilities. Liu uses the example of giving one agent 1,000 tools: with current model capabilities, the agent is likely to struggle, which motivates assigning narrower responsibilities and smaller tool sets to specialist agents. 8:03

A multi-agent system can compose those specialists into a broader task-solving workflow while allowing each participant to operate within a more focused scope. Separate agents can also process independent work in parallel, and an agent limited to roughly five to ten tools may be able to use a weaker, faster model instead of requiring one highly capable agent to reason across an enormous tool catalog. 9:07

These benefits are presented as potential improvements in reliability, latency, and cost rather than guaranteed outcomes. Production systems still need to decide how much autonomy agents should have, whether their interactions should remain unconstrained or follow explicit rules, and what service architecture can support dependable operation beyond notebook-based functions. 10:04

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:03 · section reference included

Treat agents as services, not notebook functions

Selected presentation frame from The Future of Knowledge Assistants: Jerry Liu at 856 seconds
Treat agents as services, not notebook functions

Liu introduces Llama Agents as an alpha-stage approach that represents each agent as an independent microservice. The objective is to move from agents implemented as notebook functions toward deployable services that encapsulate their own logic, communicate through a shared interface, handle multiple requests, and can be reused across different tasks. 11:00

In the proposed architecture, agents may be implemented with LlamaIndex or another framework and then deployed as separate services. A message queue carries interactions between them, while a control plane coordinates execution; orchestration can either follow explicitly defined service flows or rely on an LLM orchestrator to delegate work according to the current state. 12:06

The demonstration deliberately starts with a modest RAG workflow: one agent rewrites an incoming query, and another performs search and retrieval before returning a response. Additional services could provide reflection, other tools, or a general tool service, but the central lesson is that even familiar retrieval logic becomes operationally different when its components communicate through an API protocol and can serve concurrent requests. 13:00

The limitations are important: Liu explicitly describes Llama Agents as an alpha feature and identifies communication protocols, integration with other community work, and the project roadmap as ongoing areas for feedback. The talk therefore presents multi-agent microservices as a developing production architecture, not as evidence that every knowledge assistant already requires or benefits from a complete multi-agent deployment. 10:04

How it fits togetherService-based RAG request flow

A client submits a query.

Two agent services rewrite a query and retrieve information before returning a response.

Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:04 · section reference included

Read the complete timestamped transcript
  1. 0:00

    [on-hold music] Um, hey, everybody. I'm Jerry, co-founder and CEO of LlamaIndex, and I'm excited to be here today to talk about the future of knowledge assistants.

  2. 0:22

    So let's get started. Um, first, you know, everybody's building stuff with LLMs these days. Uh, some of the most common use cases we're seeing throughout the enterprise include the following.

  3. 0:33

    Uh, it includes like document processing, tagging, and extraction. It includes knowledge search and question answering. If you followed our Twitter for the past like year or so, basically, you know, we've talked about RAG probably seventy-five percent of the time.

  4. 0:46

    Uh, and also just you start generalizing that question answering interface into an overall conversational, um, agent that can not only, you know, do a one-shot querying search, but actually store your conversation history over time.

  5. 1:00

    And of course, this year, um, a lot of people are excited about building agentic workflows that can not only synthesize information, but actually perform actions and interact with a lot of services to basically get you back the thing that you need.

  6. 1:14

    So let's talk about specifically this idea of building a knowledge assistant, which, you know, we've been very interested in since the very beginning of the company. The goal is to basically build an interface that can take in any task as input and get back some sort of output.

  7. 1:29

    So the input forms could be, you know, a simple question, it could be a complex question, it could be a vague research task, and the output forms could be a short answer, it could be a research report, or it could be a structured output.

  8. 1:41

    RAG was just the beginning. Uh, last year, I said that RAG was basically just a hack, and there's a lot of things that you can do on top of RAG to basically make it more advanced and sophisticated.

  9. 1:51

    If you build a knowledge assistant with a very basic RAG pipeline, you run into the following issues. First is a naive data processing, uh, pipeline. You know, you put it through some basic parser, uh, do some sentence splitting, chunking, do top-K retrieval, and then re- you realize, you know, even if it took you ten minutes to set

  10. 2:09

    up, that it's not suitable for production. It also just doesn't really have a sense of being able to understand more complex, broader queries, so query understanding and planning. There's also no, uh, kind of more sophisticated way of interacting with other services, and it's also stateless, so there's no memory.

  11. 2:29

    So in this setting, we have said, you know, RAG is kinda boring, uh, if it's just the simple RAG pipeline. It's really just a glorified search system on top of some retrieval methods that have been around for decades, and there's a lot of questions and tasks that naive RAG can't give an a- answer to.

  12. 2:45

    And so one thread that we've been pulling a lot, a lot on is basically figuring out how to go from simple search and naive RAG to building a general context-augmented, uh, research assistant.

  13. 2:57

    So we'll talk about these three steps with some cool feature releases, you know, in, in the mix. Um, but the first step is basically advanced data and retrieval modules.

  14. 3:06

    Even if you don't, you know, care about the fancy agentic stuff, you need good core data quality modules to basically help you go to production. The second is advanced single agent query flows, building some agentic RAG layer on top of existing data services as tools to basically enhance the level of query understanding that your QA interface provides.

  15. 3:26

    And then the third, and this is quite interesting, is this whole idea of a general multi-agent task solver, where you extend beyond even the capabilities of a single agent towards multi-agent orchestration.

  16. 3:37

    So let's talk about advanced data and retrieval as a first step. The first thing is that any LLM app these days is only as good as your data, right?

  17. 3:49

    Garbage in, garbage out. If you're an ML engineer, you've heard that, uh, kind of statement many times. Um, and so this shouldn't be net new, but it applies in the case of LLM app development as well.

  18. 3:59

    Good data quality is a necessary component of any production-grade LLM application, and you need that data processing layer to translate raw, unstructured, semi-structured data into some form that's good for your LLM app.

  19. 4:11

    The main components of data processing, of course, are parsing, chunking, and indexing.

  20. 4:18

    And let's start with parsing. So some of you might have seen these slides already, but basically, the first thing that everybody needs to build some sort of proper RAG pipeline is you need a good PDF parser, okay?

  21. 4:29

    Or a PowerPoint parser or some parser that can actually extract out those complex documents into a well-structured representation instead of just shoving it through PyPDF. If you have a table in a financial report and you run it through PyPDF, it's gonna destroy and collapse the information, blend the numbers and the text together, and what ends up happening

  22. 4:48

    is you get hallucinations. And so one of the key things about parsing is that even good parsing itself can improve performance, right? Even without advanced indexing retrieval, good parsing helps to re- reduce hallucinations.

  23. 5:01

    A simple example here is we took the Caltrain schedule, right, the weekend schedule for Caltrain, parsed it through LlamaParse, one of our offerings, and through some well-structured document parsing format, because the LLMs can actually understand well spatially laid out text, when you ask questions over it, I know the text is a little faint, it's totally fine, I'll

  24. 5:19

    share these slides later on, you're able to actually, uh, get back the correct train times for a given column. Versus if you shove it into PyPDF, you get like a whole bunch of hallucinations when you ask questions over this type of data.

  25. 5:32

    So that's step one. You want good parsing, and you can combine this, of course, with advanced indexing modules to basically, you know, uh, model heterogeneous data within a document.

  26. 5:43

    Uh, one announcement we're making today is, you know, we opened up LlamaParse a few months ago. It has like tens of thousands of users, tens of millions of pages processed, gotten very popular.

  27. 5:51

    And in general, if you're an enterprise developer that has a bucket of PDFs and wants to shove it in and not have to worry about some of these decisions, uh, come sign up.

  28. 5:59

    Uh, this is basically what we're building on the Llama Cloud side.

  29. 6:04

    The next step is advanced single-agent flows. So, you know, we have good data retrieval quality-- or sorry, good data retrieval modules, but in the end, right now, we're still using a single LLM prompt call.

  30. 6:16

    So how do we go a little bit beyond that into something more interesting and sophisticated?

  31. 6:22

    We did this entire course with, uh, you know, Andrew Ng at DeepLearning.AI, and we've also written extensively about this, uh, in the past few months. But basically, you can layer on, um, different components of agents on top of just a basic RAG system, uh, to build something that is a lot more sophisticated in query understanding, planning, and

  32. 6:42

    tool use. And so the way I like to break this down, right, because they all have trade-offs, is on the left side, you have some simple components that come with lower cost and lower latency, and then on the right, you could build full-blown agent systems that can, you know, operate and even work together with other agents.

  33. 6:57

    Some of the core agent ingredients that we see that are pretty fundamental towards building, uh, QA systems these days include, uh, function calling and tool use, uh, being able to actually do query planning, whether it's sequential or in some style of a DAG, and also maintain, uh, conversation memory over time.

  34. 7:14

    So it's a stateful service as opposed to stateless.

  35. 7:19

    We've pioneered this idea of Agentic RAG, where it's not only just, you know, RAG as a single LLM prompt call where the whole responsibility is to just synthesize the information, but to actually use the LLMs extensively during the query understanding and processing phase, where not only are you just directly feeding the query to a vector database, in

  36. 7:38

    the end, everything is just an LLM interacting with a set of data services as tools, right? And so this is a pretty important framework to understand because at the end of the day, you're going to have in any piece of LLM software, LLMs interacting with other services, whether it's a database or even other agents as tools, and

  37. 7:56

    you're going to need to do some sort of query planning to basically figure out how to use these tools to solve the task that you're given. We've also talked about agent reasoning loops, right?

  38. 8:06

    Probably the most stable one that we've seen so far is some sort of while loop over function calling or ReAct. But we've also seen fancier agent papers arise, um, that basically deal with, like, DAG-based planning, planning out an entire DAG of decisions, or tree-based planning.

  39. 8:21

    You know, you plan out an entire set of possible outcomes and try to optimize there.

  40. 8:26

    The end result is that if you're able to do this, uh, you're able to build personalized QA systems, um, that are capable of handling more complex questions. For instance, comparison questions across multiple documents.

  41. 8:38

    Being able to actually maintain the user state over time, so you can actually revisit the thing that they were looking for. Being able to, for instance, look up information from not only unstructured data, but also structured data by treating everything as a data service or a tool.

  42. 8:54

    But, you know, there are some remaining gaps here. First of all, you know, we've kind of had some interesting discussions with other people in the community about this, but a single agent generally cannot solve an infinite set of tasks.

  43. 9:07

    Um, if anyone's tried to give, like, a thousand tools to an agent, the agent is going to struggle and generally fail, at least with current model capabilities. And so one principle is that specialist agents tend to do better if the agent is a little bit more focused on a given task, uh, given some input.

  44. 9:22

    And then the second gap is that agents are increasingly interfacing with services that, you know, may be other agents actually. And so we might want to think about a multi-agent future.

  45. 9:33

    So let's talk about multi-agents and what that means for this idea of knowledge assistants. Multi-agent task solvers.

  46. 9:42

    First of all, why multi-agents? Well, we've mentioned this a little bit, but they offer a few benefits beyond just a single agent flow. First, they offer this idea of being able to actually specialize and operate over a, you know, focused set of tasks more reliably so that you can actually stitch together different agents that potentially can work

  47. 10:02

    together to solve a bigger task. Another benefit or set of benefits is on the system side. By being able to have, you know, multiple copies of even, like, the same LLM agent, you're able to parallelize a bunch of tasks and, um, and able to do things a lot faster.

  48. 10:19

    The third thing is that actually with a multi-agent framework, instead of having, you know, a single agent access, like, a thousand tools, you could potentially have each agent operate over, like, you know, five to ten tools and therefore use a weaker and faster model.

  49. 10:32

    And so there are actually potential cost and latency savings.

  50. 10:36

    There are, of course, some fantastic multi-agent frameworks that have come out in the past few months, and many of you might be either using those or kind of building your own.

  51. 10:44

    And in general, some of the challenges in building this reliably in production include, uh, one, being able to, you know, um, either let the agents kind of operate amongst themselves and build some, some sort of, like, unconstrained flow, or actually being able to inject some sort of constraints between the agents.

  52. 11:00

    So you're basically explicitly forcing an agent to operate in a certain way given a certain input. The second is when you actually think about having these agents operate in production, currently, the bulk of agents are implemented as functions in a Jupyter notebook, and we might want to think about defining the proper service architecture for agents in production

  53. 11:19

    and what that looks like. So today, you know, I'm excited to launch a preview feature of a new repo that we've been working on, uh, called Llama Agents. Um, and it's an alpha feature, but basically, it represents, uh, agents as microservices, right?

  54. 11:36

    So, you know, in addition to some of the fantastic work that a lot of these multi-agent frameworks have done, the core goal of Llama Agents really is to think about every agent as just, like, a separate service and figuring out how these different services can operate together, communicate with each other through a central, uh, API, uh, you

  55. 11:53

    know, communication interface, and then also, uh, work together to solve a given task, um, that is, you know, scalable, can handle multiple requests at once, um, is easy to deploy to, you know, different types of services.

  56. 12:06

    Um, and basically, each agent can encapsulate a set of logic but still communicate with each other and actually be reused across different tasks. So it really is really thinking about how do you take these agents out of a notebook and into production.

  57. 12:20

    And it's an idea that we've had for a while now, but we see this as a key ingredient in helping you build something that's production-grade, uh, a production-grade knowledge assistant, um, especially, you know, as the world gets more agentic over time.

  58. 12:33

    So the core architecture here is that, you know, every agent is just represented as a separate service. Um, you can write the agents however you want, basically, you know, with, uh, LlamaIndex, with another framework as well, and we have some of the interfaces to basically build a custom agent, and then you're able to deploy it as a

  59. 12:50

    service, and basically the agents can interact with each other via some sort of message queue, and then the orchestration can happen between the agents via, like, a general control plane, right?

  60. 13:00

    We took some of the inspiration from, you know, existing resource allocators, uh, for instance, like Kubernetes or just, like, other kind of, like, open source, like, um, systems-level projects.

  61. 13:10

    And the orchestration can be either explicit, so you explicitly define these flows between services, or it can be implicit, right? You can have some sort of LLM orchestrator just figure out what tasks to delegate to, uh, given the, given the current state of things.

  62. 13:26

    And so one thing that I want to show you basically is, uh, figuring out h- or just showing you how this relates to this idea of knowledge assistants, right?

  63. 13:34

    Uh, because we think that multi-agents are going to be a core component of this, and this is basically a demo that we whipped up showing you how to run Llama Agents, um, f- uh, on a basic RAG pipeline.

  64. 13:47

    This is a pretty trivial RAG pipeline. There is, like, uh, a query rewriting service, right, and then also some sort of, uh, default agent, um, that basically just does RAG, like search and retrieval.

  65. 13:57

    Um, and you can also add in other components and services like reflection. You could have other tools as well, or even a general tool service. And the c-core demo here is really showing that, you know, given some sort of input, they're communicating through, uh, with each other through some sort of, like, API protocol.

  66. 14:14

    And so this allows you to, for instance, launch a bunch of different client requests at once, handle, you know, tasks, uh, requests from different directions, and basically have these agents operate a- um, as, like, an encapsulated microservice, right?

  67. 14:27

    And so the query rewrite agent takes in some sort of query, processes it, rewrites it into some, uh, new query, and then, you know, the second agent will basically take in this query, do some search and retrieval, and, um, basically output a final response.

  68. 14:40

    If you built a RAG pipeline, all this stuff, like the actual logic should be relatively trivial, but the goal is to basically show you how you can turn something even that's tr- uh, even something that's trivial into a set of services that you can basically deploy, right?

  69. 14:54

    Um, and this is just, like, another example that's basically a backup slide that basically, again, highlights the fact that you can have multiple agents, right? And they all operate and work together, um, to basically achieve a given task.

  70. 15:08

    So, you know, the QR code is linked. First of all, this is in alpha mode, right? And so we're really excited to basically share this with the community. We ha- we're very public about the roadmap, actually, so check out the Discussions tab about what's actually in there and what's not.

  71. 15:23

    We're launching with, uh, dozens of, uh, a dozen basically initial tutorials to show you how to basically build a set of, like, microservices that basically help you, you know, build that production-grade, uh, agentic knowledge assistant workflow.

  72. 15:36

    And, uh, there's also a repo linked that I think should be public now. Um, you know, in general, we're pretty excited to get feedback from the community about what a general communication protocol should look like, how we basically integrate with some of the other, you know, awesome work that the community has done, and basically, uh, help achieve

  73. 15:53

    this core mission of, again, building something that's production-grade and a multi-agent assistant.

  74. 16:00

    And this is just the last component, um, which, uh, I already mentioned, but basically if you're interested in, like, the data quality side of things, like, let's say you don't care about agents at all and you just care about data quality, uh, we're opening up a wait list for Llama Cloud more generally so that you're able to,

  75. 16:15

    you know, deal with all those decisions that I mentioned, the parsing, chunking, indexing, and ensure that, you know, your bucket of PDFs with embedded charts, tables, images is processed and parsed the right way.

  76. 16:27

    Um, and if you're an enterprise developer with that use case, uh, come talk to us. So that's basically it. Thanks for your time, and hope you enjoyed it. Okay. [upbeat music]