Skip to content

LlamaIndex

This page explains how to integrate KDB.AI with LlamaIndex.

The KDB.AI integration with LlamaIndex enhances your Large Language Model (LLM) applications with data scalability, flexibility, and efficient storage. This allows you to build robust, data-augmented applications that significantly improve decision making and user engagement.

LlamaIndex (GPT Index) is a data framework for LLM applications. Building with LlamaIndex typically involves working with LlamaIndex core and a chosen set of integrations (or plugins). - LlamaIndex GitLab Repository

LlamaIndex provides the following tools:

  • Data connectors that allow you to ingest data from various sources and formats (PDFs, APIs, SQL).
  • Data indexes that are both easy to work with and performant for large language models (LLMs) to consume.
  • Advanced retrieval/query interface; feed in LLM input prompts to get back human-like, knowledge-augmented.
  • Data agents that enhance your data processing capabilities and easily integrate with other application frameworks, such as Docker, LangChain, Flask, or ChatGPT.

Advanced RAG capabilities

Applications referred to as Retrieval-Augmented Generation (RAG) systems leverage LlamaIndex to enhance text generation accuracy.

You can use the integration between KDB.AI and LlamaIndex to:

  • Create data-augmented chatbots
  • Index knowledge bases and task lists
  • Query structured data warehouse using natural language interfaces

This efficient exploration and analysis of data makes it easier to extract valuable insights.

Now let's explore a few advanced RAG capabilities you can use with KDB.AI and LlamaIndex:

  1. Multi-modality - process images and audio in addition to unstructured text.

  2. Hybrid search - combine dense and sparse vector searches, tokenization and the Best Matching 25 (BM25) algorithm.

  3. Sub question query engine - decompose a question into multiple sub-questions that can be searched across separate data sources.

1. Multi-modality

This feature helps you reduce an AI model's reliance on a single type of data. For example, instead of searching just text, or pictures, or videos, you can search both pictures and text. Use it to enhance accuracy and reliability, broaden the range of your applications' scope and make outcomes contextually more relevant.

Follow the steps in our sample Multi-modality notebook or run it in Google Colab.

Hybrid search combines multiple search algorithms to improve the accuracy and relevance of the results. In KDB.AI, hybrid search leverages the power of keyword and semantic searches by combining sparse vectors with dense vectors.

Follow the steps in our sample Hybrid search notebook or run it in Google Colab.

3. Sub question query engine

This feature allows customers to decompose a question into multiple sub-questions that can be searched across separate data sources. You'll find this particularly useful when dealing with large datasets or databases, improving both the efficiency and quality of results.

Follow the steps in our sample Sub question query engine notebook or run it in Google Colab.

If you need help with the integration, feel free to reach out to the KDB.AI Slack community or email support@kdb.ai.

Next steps

For more details about KDB.AI and LlamaIndex, check out the following resources: