llamats_docs_demo_compressed.mp4
This is a LlamaIndex project bootstrapped with create-llama
.
This multi-document agent is built over the LlamaIndex.TS documentation.
We use our multi-document agent architecture:
- Individual query engine per document
- Top level Orchestrator agent across documents that can pick relevant subsets
This also streams all intermediate results from the agent via a custom Callback handler.
We use this Custom Callback handler to also send intermediate nodes that are retrieved during retrieval of document level query engines, to the frontend.
It allows us to show the relevant section of the documentation in the preview window.
This extends beyond the simple create-llama
example. To see changes, look at the following files:
backend/app/utils/index.py
- contains core logic for constructing + getting multi-doc agentbackend/app/api/routers/chat.py
- contains implementation of chat endpoint + threading to stream intermediate responses.
We also created some custom Transformations
that we use with out robust IngestionPipeline
As we update the documentations in the data
folder, this IngestionPipeline
takes care of handling duplicates, applying our custom nodes transformation logic etc.
The custom transformations we've used:
Deduplicator
- handles duplicates.HyperlinksRemover
- cleans the markdown files.Summarizer
- creates summary of the node and adds that as a metadata.URLExtractor
- generates the url of a particular node section.Upserter
- updates the docstore with new and updated nodes, deletes old ones.
First, startup the backend as described in the backend README.
Second, run the development server of the frontend as described in the frontend README.
Open http://localhost:3000 with your browser to see the result.
To learn more about LlamaIndex, take a look at the following resources:
- LlamaIndex Documentation - learn about LlamaIndex (Python features).
- LlamaIndexTS Documentation - learn about LlamaIndex (Typescript features).
You can check out the LlamaIndexTS GitHub repository - your feedback and contributions are welcome!