vector-embeddings

Generate text embeddings with OpenAI and search by cosine similarity in Upstash Vector or pg-vector.

1|Updated Sep 1, 2025
One-click install
npx skills add https://github.com/lewisperez999/v0-lewis-perez-portfolio-twin --skill vector-embeddings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vector-embeddings
Source: https://github.com/lewisperez999/v0-lewis-perez-portfolio-twin/tree/main/.skills/vector-embeddings
Command: npx skills add https://github.com/lewisperez999/v0-lewis-perez-portfolio-twin --skill vector-embeddings

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Vector embeddings enable semantic search, similarity matching, and scalable retrieval by converting text into numerical representations that machines can compare efficiently.

Core Features & Use Cases

  • Generate embeddings from text using OpenAI models.
  • Store embeddings in Upstash Vector or PostgreSQL pg-vector with optional metadata.
  • Search by cosine similarity and filter results by metadata to refine relevance.
  • Use cases include knowledge bases, document search, and product content discovery.

Quick Start

Index a sample text and run a vector search using the provided embedding and search utilities.

Frequently Asked Questions about vector-embeddings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate vector embeddings from text for semantic search?

Vector embeddings are generated by passing input text to an OpenAI model, which converts it into numerical representations that machines can compare efficiently for semantic search and similarity matching.

Can I attach metadata to vector embeddings for filtering search results?

Yes, you can attach optional metadata to vector embeddings when storing them in Upstash Vector or pg-vector, and apply those metadata filters during cosine similarity search to refine and return top_k results.

Does this approach work with both Upstash Vector and PostgreSQL pg-vector?

Yes, the semantic search approach supports both Upstash Vector and PostgreSQL pg-vector as storage backends, allowing you to store embeddings with metadata and query them using cosine similarity.

How do I search stored embeddings using cosine similarity?

To search stored embeddings using cosine similarity, generate a query embedding from your search text, compare it against the database, apply optional metadata filters, and return the top_k most relevant results.

What is the best way to build a scalable knowledge base with semantic search?

Building a scalable knowledge base with semantic search involves generating OpenAI embeddings from documents, storing them in Upstash Vector or pg-vector with metadata, and querying by cosine similarity to retrieve relevant content.