Member-only story
Building Production-Ready LLM Apps With LlamaIndex: Recursive Document Agents for Dynamic Retrieval
Combining recursive retrieval and document agents for advanced retrieval

Let’s continue our exploration on building production-ready LLM apps with LlamaIndex. This time let’s focus on recursive document agents, developed by LlamaIndex co-founder and CEO Jerry Liu.
Recursive Document Agent
We explored data agent in our previous article Low-Code and No-Code Task Automation With LlamaIndex Data Agents, Zapier NLA, Snowflake, and Streamlit. Document agent in many ways is similar to data agent. It calls LlamaIndex’s OpenAIAgent
from_tools
to construct the agent. The difference is that document agent, indicated by its name, deals mainly with documents.
As we learned from our previous article Experimenting LlamaIndex RouterQueryEngine with Document Management, different indexes serve different purposes. For example:
- List index is better suited for summarization.
- Vector store index is more fitting for question-answering.
It’s obvious that in order to serve the different types of queries/summarization, it’s best to create multiple indexes for each document. Document agent…