Summary
firebase/genkit is an OSS framework for building AI-powered apps in JS, Go, and Python. Used in production by Google’s BaaS, Firebase.
Create a Genkit Go plugin that integrates MongoDB Atlas Vector Search as a vector store for RAG applications, implementing the ai.Embedder and ai.Retriever interfaces. This would enable Genkit users to store embeddings and perform similarity searches using MongoDB, filling a gap in the current plugin ecosystem which includes Pinecone, Weaviate, and PostgreSQL but lacks MongoDB support. The integration increases Go driver visibility in the growing AI/LLM application space while providing Atlas users a seamless path to building RAG features.
Definition of Done
- Create a mongovector plugin that Implement ai.Embedder and ai.Retriever interfaces
- Add a mongovector sample package with usage
- Track usage of the plugin through client metadata
The example API would likely look something like this, following existing plugin patterns:
// Compile-time interface checks. var _ ai.Retriever = (*Retriever)(nil) // DocStore wraps a MongoDB collection for vector search operations. type DocStore struct {} // Retriever implements ai.Retriever for MongoDB Atlas Vector Search. type Retriever struct { ds *DocStore } // DefineRetriever creates and registers a Genkit retriever for similarity search. func DefineRetriever(ds *DocStore, name string, opts RetrieverOptions) *Retriever // Name returns the retriever name. func (r *Retriever) Name() string // Retrieve performs similarity search against MongoDB Atlas Vector Search. func (r *Retriever) Retrieve(ctx context.Context, req *ai.RetrieverRequest) (*ai.RetrieverResponse, error) // Register registers the retriever with the Genkit registry. func (r *Retriever) Register(reg ai.Registry)
- derives
-
GODRIVER-3694 Investigate MongoDB support in firebase/genkit
-
- Closed
-