---
title: "GenKit"
sidebarTitle: "GenKit"
---
import {
TsFrameworksGenkitCustomIndexer,
TsFrameworksGenkitCustomRetriever,
TsFrameworksGenkitUsage,
} from '/snippets/integrations.mdx';
### genkitx-lancedb {#genkitx-lancedb}
Genkit is an open-source framework for building end-to-end AI and RAG pipelines with a clean, TypeScript-first
developer experience. The genkitx-lancedb plugin lets you use LanceDB as a high-performance vector store
inside your Genkit flows, so you can index, search, and retrieve data efficiently as part of your AI
applications.
### Installation {#installation}
```bash
pnpm install genkitx-lancedb
```
### Usage {#usage}
Adding LanceDB plugin to your genkit instance.
{TsFrameworksGenkitUsage}
You can run this app with the following command:
```bash
genkit start -- tsx --watch src/index.ts
```
This'll add LanceDB as a retriever and indexer to the genkit instance. You can see it in the GUI view
**Testing retrieval on a sample table**
Let's see the raw retrieval results
On running this query, you'll get 5 results fetched from the lancedb table, where each result looks something like this:
## Creating a custom RAG flow {#creating-a-custom-rag-flow}
Now that we've seen how you can use LanceDB in a Genkit pipeline, let's refine the flow and create a RAG. A RAG flow will consist of an index and a retriever with its outputs postprocessed and fed into an LLM for final response
### Creating custom indexer flows {#creating-custom-indexer-flows}
You can also create custom indexer flows, utilizing more options and features provided by LanceDB.
{TsFrameworksGenkitCustomIndexer}
In your console, you can see the logs
### Creating custom retriever flows {#creating-custom-retriever-flows}
You can also create custom retriever flows, utilizing more options and features provided by LanceDB.
{TsFrameworksGenkitCustomRetriever}
Now using our retrieval flow, we can ask a question about the ingested PDF