At its core, GPT Index contains a toolkit of index data structures designed to easily connect LLM's with your external data. GPT Index helps to provide the following advantages:
- Remove concerns over prompt size limitations.
- Abstract common usage patterns to reduce boilerplate code in your LLM app.
- Provide data connectors to your common data sources (Google Docs, Slack, etc.).
- Provide cost transparency + tools that reduce cost while increasing performance.
Each data structure offers distinct use cases and a variety of customizable parameters. These indices can then be queried in a general purpose manner, in order to achieve any task that you would typically achieve with an LLM:
- Question-Answering
- Summarization
- Text Generation (Stories, TODO's, emails, etc.)
- and more!
This primer is intended to help you get the most out of GPT Index. It gives a high-level overview of the following:
- The general usage pattern of GPT Index.
- Mapping Use Cases to GPT Index data Structures
- How Each Index Works
The general usage pattern of GPT Index is as follows:
- Load in documents (either manually, or through a data loader).
- Index Construction.
- [Optional, Advanced] Building indices on top of other indices
- Query the index.
See our Usage Pattern Guide for a guide on the overall steps involved with using GPT Index.
If you are just starting out, take a look at the Starter Example first.
GPT Index data structures offer distinct use cases and advantages. For instance, the Vector Store-based indices e.g. GPTSimpleVectorIndex are a good general purpose tool for document retrieval.
The list index GPTListIndex is a good tool for combining answers across documents/nodes.
The tree index GPTTreeIndex and keyword indices can be used to "route" queries to the right subindices.
A complete guide on GPT Index use cases.
This guide should paint a picture of how you can use GPT Index to solve your own data needs.
We explain how each index works with diagrams.