Giter Club home page Giter Club logo

llamaindex-docs-agent's Introduction

Advanced chatbot over LlamaIndex TS documentation ๐Ÿ”ฅ

llamats_docs_demo_compressed.mp4

Multi-document Agents

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.

Main Files to Look At

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 agent
  • backend/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.

Getting Started

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.

Learn More

To learn more about LlamaIndex, take a look at the following resources:

You can check out the LlamaIndexTS GitHub repository - your feedback and contributions are welcome!

llamaindex-docs-agent's People

Contributors

rsrohan99 avatar tombombadilom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.