Kay.ai
Kai Data API built for RAG 🕵️ We are curating the world's largest datasets as high-quality embeddings so your AI agents can retrieve context on the fly. Latest models, fast retrieval, and zero infra.
This notebook shows you how to retrieve datasets supported by Kay. You can currently search SEC Filings
and Press Releases of US companies
. Visit kay.ai for the latest data drops. For any questions, join our discord or tweet at us
Installation
First, install the kay
package.
!pip install kay
You will also need an API key: you can get one for free at https://kay.ai. Once you have an API key, you must set it as an environment variable KAY_API_KEY
.
KayAiRetriever
has a static .create()
factory method that takes the following arguments:
dataset_id: string
required -- A Kay dataset id. This is a collection of data about a particular entity such as companies, people, or places. For example, try"company"
data_type: List[string]
optional -- This is a category within a dataset based on its origin or format, such as ‘SEC Filings’, ‘Press Releases’, or ‘Reports’ within the “company” dataset. For example, try ["10-K", "10-Q", "PressRelease"] under the “company” dataset. If left empty, Kay will retrieve the most relevant context across all types.num_contexts: int
optional, defaults to 6 -- The number of document chunks to retrieve on each call toget_relevant_documents()