Skip to main content

CogneeRetriever

This will help you get started with the Cognee retriever. For detailed documentation of all CogneeRetriever features and configurations head to the API reference.

Integration details

Bring-your-own data (i.e., index and search a custom corpus of documents):

Setup

For cognee default setup, only thing you need is your OpenAI API key. If you want to get automated tracing from individual queries, you can also set your LangSmith API key by uncommenting below:

Installation

This retriever lives in the langchain-cognee package:

Instantiation

Now we can instantiate our retriever:

Usage

Add some documents, process them, and then run queries. Cognee retrieves relevant knowledge to your queries and generates final answers.

Use within a chain

Like other retrievers, CogneeRetriever can be incorporated into LLM applications via chains. We will need a LLM or chat model:

API reference

TODO: add link to API reference.