upstash-vector-js
Upstash Vector is a high-performance vector database for storing and querying vector embeddings. This skill covers the TypeScript/JavaScript SDK, including core operations like upserting vectors, querying, and managing namespaces, plus advanced features like filtering, metadata handling, and index structures.
Upstash Vector JS helps you set up and use Upstash's vector database with TypeScript and JavaScript.
AI-generated summary based on this skill's SKILL.md
Install
upstash/skills/upstash-vector-js · repository language: JavaScript
git clone https://github.com/upstash/skills
cp -r skills/skills/upstash-vector-js ~/.claude/skills/upstash-vector-jsnpx skillfed install upstash/skills/upstash-vector-jsFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I use Upstash Vector with TypeScript?
Upstash Vector is a high-performance vector database accessible via its TypeScript/JavaScript SDK. To get started, install the SDK package, initialize a client with your Upstash credentials, and use methods like `upsert()` to store vectors, `query()` to search embeddings, and `fetch()` to retrieve specific vectors. The SDK handles authentication and connection management automatically.
How do I upsert vectors in Upstash Vector?
Upstash Vector's upsert operation allows you to insert or update vectors in your database. Use the `upsert()` method with an array of vector objects, each containing an ID, values array, and optional metadata. Upstash Vector will create new vectors or replace existing ones with matching IDs, making upsert ideal for bulk updates and initial data loading.
What are namespaces in Upstash Vector and how do I use them?
Upstash Vector namespaces are logical partitions within your vector database that isolate data and queries. They're useful for multi-tenant applications or separating different datasets. When querying or upserting, specify the namespace parameter to target a specific partition. Namespaces help organize embeddings and improve query performance by reducing search scope.
How does Upstash Vector handle filtering and metadata?
Upstash Vector supports metadata filtering during queries, allowing you to attach key-value pairs to vectors and filter results based on metadata conditions. When upserting vectors, include metadata alongside your embeddings. During queries, use filter expressions to narrow results by metadata values, enabling precise similarity searches combined with business logic constraints.
What vector similarity search capabilities does Upstash Vector provide?
Upstash Vector enables vector similarity search through its `query()` method, which accepts a query vector and returns the most similar vectors ranked by distance. The SDK supports various index structures including dense and sparse indices, hybrid indexing for combined search, and range queries. Results include vector IDs, similarity scores, and associated metadata for comprehensive search results.
Can I integrate Upstash Vector into JavaScript applications?
Yes, Upstash Vector integrates seamlessly into JavaScript applications via the TypeScript/JavaScript SDK. The skill covers setup, core operations like querying and managing embeddings, advanced configurations, and index structures. Upstash Vector works with both Node.js and browser environments, making it suitable for AI applications requiring high-performance vector storage and retrieval.
SKILL.md
rendered from the published skill — quoted content, verbatim
Vector Documentation Skill
Quick Start
Vector is a high‑performance vector database for storing, querying, and managing vector embeddings.
Basic workflow:
- Install the Vector TS SDK.
- Connect to a Vector instance.
- Upsert vectors, query them, and manage namespaces.
Example (TypeScript):
import { Index } from "@upstash/vector";
const index = new Index({
url: process.env.UPSTASH_VECTOR_REST_URL!,
token: process.env.UPSTASH_VECTOR_REST_TOKEN!,
});
await index.upsert([{ id: "1", vector: [0.1, 0.2], metadata: { tag: "example" } }]);
const results = await index.query({
vector: [0.1, 0.2],
topK: 5,
});
For full usage, refer to the linked skill files below.
Other Skill Files
TS SDK Reference
sdk-methods: Explains SDK commands: delete, fetch, info, query, range, reset, resumable-query, upsert
Features
features/namespaces: Explains namespaces and dataset organization.features/index-structure: Covers hybrid
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 5 files
skills/upstash-vector-js/SKILL.md
skills/upstash-vector-js/features/filtering-and-metadata.md
skills/upstash-vector-js/features/index-structure.md
skills/upstash-vector-js/features/namespaces.md
skills/upstash-vector-js/sdk-methods.md