Skip to main content


This page covers how to use the Databerry within LangChain.

What is Databerry?

Databerry is an open source document retrievial platform that helps to connect your personal data with Large Language Models.


Quick start

Retrieving documents stored in Databerry from LangChain is very easy!

import { DataberryRetriever } from "langchain/retrievers/databerry";

const retriever = new DataberryRetriever({
datastoreUrl: "",
apiKey: "DATABERRY_API_KEY", // optional: needed for private datastores
topK: 8, // optional: default value is 3

// Create a chain that uses the OpenAI LLM and Databerry retriever.
const chain = RetrievalQAChain.fromLLM(model, retriever);

// Call the chain with a query.
const res = await{
query: "What's Databerry?",

console.log({ res });
res: {
text: 'Databerry provides a user-friendly solution to quickly setup a semantic search system over your personal data without any technical knowledge.'