Multi-Document Agents Pack
This LlamaPack provides an example of our multi-document agents.
This specific template shows the e2e process of building this. Given a set of documents, the pack will build our multi-document agents architecture.
- setup a document agent over agent doc (capable of QA and summarization)
- setup a top-level agent over doc agents
- During query-time, do "tool retrieval" to return the set of relevant candidate documents, and then do retrieval within each document.
Check out the notebook here.
CLI Usage
You can download llamapacks directly using llamaindex-cli, which comes installed with the llama-index python package:
llamaindex-cli download-llamapack MultiDocumentAgentsPack --download-dir ./multi_doc_agents_pack
You can then inspect the files at ./multi_doc_agents_pack and use them as a template for your own project.
Code Usage
You can download the pack to a the ./multi_doc_agents_pack directory:
from llama_index.core.llama_pack import download_llama_pack
# download and install dependencies
MultiDocumentAgentsPack = download_llama_pack(
"MultiDocumentAgentsPack", "./multi_doc_agents_pack"
)
From here, you can use the pack, or inspect and modify the pack in ./multi_doc_agents_pack.
Then, you can set up the pack like so:
# imagine documents on different cities
docs = ...
doc_titles = ["Toronto", "Seattle", "Houston", "Chicago"]
doc_descriptions = [
"<Toronto description>",
"<Seattle description>",
"<Houston description>",
"<Chicago description>",
]
# create the pack
# get documents from any data loader
multi_doc_agents_pack = MultiDocumentAgentsPack(
docs, doc_titles, doc_descriptions
)
The run() function is a light wrapper around query_engine.query().
response = multi_doc_agents_pack.run(
"Tell me the demographics of Houston, and then compare with the demographics of Chicago"
)
You can also use modules individually.
# get the top-level agent
top_agent = multi_doc_agents_pack.top_agent
# get the object index (which indexes all document agents, can return top-k
# most relevant document agents as tools given user query)
obj_index = multi_doc_agents_pack.obj_index
# get document agents
doc_agents = multi_doc_agents_pack.agents
Metadata
Release files for llama-index-packs-multi-document-agents 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_packs_multi_document_agents-0.4.1.tar.gz | 5.3 kB | Without provenance | Details for llama_index_packs_multi_document_agents-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_packs_multi_document_agents-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for llama_index_packs_multi_document_agents-0.4.1-py3-none-any.whl |
Total release size: 10.4 kB
Release files / llama_index_packs_multi_document_agents-0.4.1.tar.gz
| Download URL | llama_index_packs_multi_document_agents-0.4.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aeff946ee6d4a3d5ccef35def3fc677634d8fe10ec04691079830274ef4a5447
|
|
BLAKE2b-256 checksum How to use checksums |
78cd527cba6b75fc0b9c9a67d735ca325aafed3d2816e3beddb80834762d7f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Release files / llama_index_packs_multi_document_agents-0.4.1-py3-none-any.whl
| Download URL | llama_index_packs_multi_document_agents-0.4.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03786d22ddafb77ae714117970ca65db51e15e8a63adce760aef847f84746a72
|
|
BLAKE2b-256 checksum How to use checksums |
26ec02470683f3bf44b84f5fd401e2988c7a87306da006cb6453b2aefd31959d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Security for llama-index-packs-multi-document-agents 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.