From c5fbd14e34fad510708341fbdd4eeb11fddf43b1 Mon Sep 17 00:00:00 2001 From: Ashish Mishra Date: Thu, 25 Jun 2026 11:40:45 +0530 Subject: [PATCH 1/3] docs: add Infino vector store integration (JavaScript) --- .../integrations/vectorstores/infino.mdx | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 src/oss/javascript/integrations/vectorstores/infino.mdx diff --git a/src/oss/javascript/integrations/vectorstores/infino.mdx b/src/oss/javascript/integrations/vectorstores/infino.mdx new file mode 100644 index 0000000000..6813223318 --- /dev/null +++ b/src/oss/javascript/integrations/vectorstores/infino.mdx @@ -0,0 +1,152 @@ +--- +title: "InfinoVectorStore integration" +description: "Integrate with the InfinoVectorStore using LangChain JavaScript." +--- + +[Infino](https://github.com/infino-ai/infino) is a fast, embedded retrieval engine that runs SQL, full-text (BM25), vector, and hybrid (RRF) search over a single copy of your data on object storage — no separate search cluster or vector store to keep in sync. + +This guide helps you get started with the Infino [vector store](/oss/integrations/vectorstores). For detailed documentation of all `InfinoVectorStore` features and configurations, see the [package README](https://www.npmjs.com/package/@infino-ai/langchain-infino). + +## Overview + +### Integration details + +| Class | Package | [PY support](https://pypi.org/project/langchain-infino/) | Downloads | Version | +| :--- | :--- | :---: | :---: | :---: | +| `InfinoVectorStore` | [`@infino-ai/langchain-infino`](https://www.npmjs.com/package/@infino-ai/langchain-infino) | ✅ | ![NPM - Downloads](https://img.shields.io/npm/dm/@infino-ai/langchain-infino?style=flat-square&label=%20&) | ![NPM - Version](https://img.shields.io/npm/v/@infino-ai/langchain-infino?style=flat-square&label=%20&) | + +## Setup + +Infino is embedded — there is no server to run and no account or API key for the engine itself. Install the integration, the Infino engine binding, `@langchain/core`, and an embeddings provider (this guide uses [OpenAI embeddings](/oss/integrations/embeddings/openai)): + + +```bash npm +npm install @infino-ai/langchain-infino @infino-ai/infino @langchain/core @langchain/openai +``` +```bash yarn +yarn add @infino-ai/langchain-infino @infino-ai/infino @langchain/core @langchain/openai +``` +```bash pnpm +pnpm add @infino-ai/langchain-infino @infino-ai/infino @langchain/core @langchain/openai +``` + + + +Infino runs in a Node.js runtime (the engine is a native addon — not the Edge runtime or the browser). Use a local path for development, or an `s3://` / `gs://` / `az://` URI to persist on object storage. + + +## Instantiation + +Infino never embeds — you bring a LangChain `Embeddings` object and the store supplies the vectors. Create and populate a table with `fromDocuments` / `fromTexts` (the vector column's `dim` must match your embeddings model). Declare any metadata keys you want to filter on as `metadataColumns`: + +```typescript +import { connect } from "@infino-ai/infino"; +import { OpenAIEmbeddings } from "@langchain/openai"; +import { InfinoVectorStore } from "@infino-ai/langchain-infino"; + +const embeddings = new OpenAIEmbeddings({ model: "text-embedding-3-small" }); + +// A local path or an s3://bucket/prefix for durable storage. +const connection = connect("./data"); + +const vectorStore = await InfinoVectorStore.fromDocuments( + [ + { pageContent: "Infino runs search on object storage.", metadata: { source: "docs" } }, + { pageContent: "One engine for SQL, BM25, and vectors.", metadata: { source: "docs" } }, + ], + embeddings, + { + connection, + tableName: "docs", + dim: 1536, // must match text-embedding-3-small + metadataColumns: { source: "large_utf8" }, // promoted, filterable columns + }, +); +``` + +To open an existing table instead, construct the store directly: + +```typescript +const vectorStore = new InfinoVectorStore(embeddings, { + connection, + tableName: "docs", + dim: 1536, + metadataColumns: { source: "large_utf8" }, +}); +``` + +## Manage vector store + +### Add items to vector store + +```typescript +import type { Document } from "@langchain/core/documents"; + +const documents: Document[] = [ + { pageContent: "The lazy dog sleeps.", metadata: { source: "blog" } }, + { pageContent: "Refunds return to the original payment method.", metadata: { source: "help" } }, +]; + +const ids = await vectorStore.addDocuments(documents); +``` + +Re-adding with existing `ids` upserts (overwrites) the matching rows. + +### Delete items from vector store + +```typescript +await vectorStore.delete({ ids: [ids[ids.length - 1]] }); +``` + +## Query vector store + +### Query directly + +```typescript +const results = await vectorStore.similaritySearch("search on S3", 2); + +for (const doc of results) { + console.log(doc.pageContent, doc.metadata); +} +``` + +Filter by metadata — compiled to a SQL `WHERE` over the promoted `metadataColumns`. Operators: `$eq`, `$ne`, `$gt` / `$gte` / `$lt` / `$lte`, `$in` / `$nin`, and `$and` / `$or` / `$not`: + +```typescript +const filtered = await vectorStore.similaritySearch("search", 2, { + source: { $eq: "docs" }, +}); +``` + +### Hybrid and keyword search + +Infino exposes its full retrieval surface, not just vectors: + +```typescript +// BM25 + vector, fused with reciprocal-rank fusion (RRF): +const hybrid = await vectorStore.hybridSearch("search on object storage", 4); + +// Lexical BM25 over the text column: +const lexical = await vectorStore.bm25Search("object storage", 4); +``` + +### Query by turning into retriever + +```typescript +const retriever = vectorStore.asRetriever({ k: 2 }); +const retrieved = await retriever.invoke("search on object storage"); +``` + +### Usage for retrieval-augmented generation + +For guides on how to use this vector store for retrieval-augmented generation (RAG), see the following sections: + +- [Build a RAG app with LangChain](/oss/langchain/rag). +- [Agentic RAG](/oss/langgraph/agentic-rag) +- [Retrieval docs](/oss/langchain/retrieval) + +--- + +## API reference + +For detailed documentation of all `InfinoVectorStore` features and configurations, head to the [package README](https://www.npmjs.com/package/@infino-ai/langchain-infino). From 55c53557a64bfb5c97d3d3d27d6d197372f5f2dc Mon Sep 17 00:00:00 2001 From: Ashish Mishra Date: Thu, 25 Jun 2026 11:41:35 +0530 Subject: [PATCH 2/3] docs: list Infino in the vector store index --- src/oss/javascript/integrations/vectorstores/index.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/oss/javascript/integrations/vectorstores/index.mdx b/src/oss/javascript/integrations/vectorstores/index.mdx index 311d268c87..622307e9bd 100644 --- a/src/oss/javascript/integrations/vectorstores/index.mdx +++ b/src/oss/javascript/integrations/vectorstores/index.mdx @@ -683,6 +683,13 @@ LangChain.js integrates with a variety of vector stores. You can check out a ful arrow="true" cta="View guide" /> + Date: Thu, 25 Jun 2026 11:51:07 +0530 Subject: [PATCH 3/3] docs: remove spaces around em-dashes (Vale LangChain.DashesSpaces) --- .../javascript/integrations/vectorstores/infino.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/oss/javascript/integrations/vectorstores/infino.mdx b/src/oss/javascript/integrations/vectorstores/infino.mdx index 6813223318..4952bbdab4 100644 --- a/src/oss/javascript/integrations/vectorstores/infino.mdx +++ b/src/oss/javascript/integrations/vectorstores/infino.mdx @@ -3,7 +3,7 @@ title: "InfinoVectorStore integration" description: "Integrate with the InfinoVectorStore using LangChain JavaScript." --- -[Infino](https://github.com/infino-ai/infino) is a fast, embedded retrieval engine that runs SQL, full-text (BM25), vector, and hybrid (RRF) search over a single copy of your data on object storage — no separate search cluster or vector store to keep in sync. +[Infino](https://github.com/infino-ai/infino) is a fast, embedded retrieval engine that runs SQL, full-text (BM25), vector, and hybrid (RRF) search over a single copy of your data on object storage—no separate search cluster or vector store to keep in sync. This guide helps you get started with the Infino [vector store](/oss/integrations/vectorstores). For detailed documentation of all `InfinoVectorStore` features and configurations, see the [package README](https://www.npmjs.com/package/@infino-ai/langchain-infino). @@ -17,7 +17,7 @@ This guide helps you get started with the Infino [vector store](/oss/integration ## Setup -Infino is embedded — there is no server to run and no account or API key for the engine itself. Install the integration, the Infino engine binding, `@langchain/core`, and an embeddings provider (this guide uses [OpenAI embeddings](/oss/integrations/embeddings/openai)): +Infino is embedded—there is no server to run and no account or API key for the engine itself. Install the integration, the Infino engine binding, `@langchain/core`, and an embeddings provider (this guide uses [OpenAI embeddings](/oss/integrations/embeddings/openai)): ```bash npm @@ -32,12 +32,12 @@ pnpm add @infino-ai/langchain-infino @infino-ai/infino @langchain/core @langchai -Infino runs in a Node.js runtime (the engine is a native addon — not the Edge runtime or the browser). Use a local path for development, or an `s3://` / `gs://` / `az://` URI to persist on object storage. +Infino runs in a Node.js runtime (the engine is a native addon—not the Edge runtime or the browser). Use a local path for development, or an `s3://` / `gs://` / `az://` URI to persist on object storage. ## Instantiation -Infino never embeds — you bring a LangChain `Embeddings` object and the store supplies the vectors. Create and populate a table with `fromDocuments` / `fromTexts` (the vector column's `dim` must match your embeddings model). Declare any metadata keys you want to filter on as `metadataColumns`: +Infino never embeds—you bring a LangChain `Embeddings` object and the store supplies the vectors. Create and populate a table with `fromDocuments` / `fromTexts` (the vector column's `dim` must match your embeddings model). Declare any metadata keys you want to filter on as `metadataColumns`: ```typescript import { connect } from "@infino-ai/infino"; @@ -110,7 +110,7 @@ for (const doc of results) { } ``` -Filter by metadata — compiled to a SQL `WHERE` over the promoted `metadataColumns`. Operators: `$eq`, `$ne`, `$gt` / `$gte` / `$lt` / `$lte`, `$in` / `$nin`, and `$and` / `$or` / `$not`: +Filter by metadata—compiled to a SQL `WHERE` over the promoted `metadataColumns`. Operators: `$eq`, `$ne`, `$gt` / `$gte` / `$lt` / `$lte`, `$in` / `$nin`, and `$and` / `$or` / `$not`: ```typescript const filtered = await vectorStore.similaritySearch("search", 2, {