Package Exports
- genkitx-hnsw-indexer
- genkitx-hnsw-indexer/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (genkitx-hnsw-indexer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Genkit Plugin RAG - HNSW Indexer
Description
This plugin is the indexer part to implement Augmented Generation (RAG) in Generative AI for your application with Firebase Genkit, this is a Genkit plugin flow to save data into vector store with HNSW, Gemini Embedder and Gemini LLM.
Installation
Before installing the plugin, ensure you have the following prerequisites installed:
- Node.js (version 12 or higher)
- npm (usually comes with Node.js installation)
- TypeScript (you can install it globally via npm:
npm install -g typescript)
Once you have the prerequisites installed, you can install the plugin using npm:
npm install genkitx-flow-rag-hnsw-indexerUsage
Register HNSW Indexer Plugin
Import the plugin into your Genkit project
import { HNSWIndexer } from "genkitx-flow-rag-hnsw-indexer";
export default configureGenkit({
plugins: [
HNSWIndexer({ apiKey: "GOOGLE_API_KEY" })
]
});Data preparations
Prepare your data or documents in a Folder

Genkit UI
Open Genkit UI and choose the registered Plugin "HNSW Indexer"

Execute the flow with Input and Output required parameter
Input : Your data and other documents path to be learned by the AI
Output : Your expected output path for your Vector Store Index that is processed based on the data and documents you provided
Genkit Flow Running

Vector Store Index
Vector store will be saved in the defined Output path. this index will be used for the RAG process with the other retrieval plugin.

Contributions are welcome!