Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Vector embeddings

Explains how to generate vector embeddings using OpenAI models, including model selection, dimension reduction via the dimensions parameter, and implementation for tasks like search, clustering, and classification.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Vector embeddings

Explains how to generate vector embeddings using OpenAI models, including model selection, dimension reduction via the dimensions parameter, and implementation for tasks like search, clustering, and classification.

When To Use

Use when you need to implement semantic search, text clustering, recommendation engines, or dimensionality reduction for text-based vector representations.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/vector-embeddings-workflow-guide.mdA guide explaining the concept of text embeddings, how to obtain them, available models, and common use cases like search and clustering.Questions about a guide explaining the concept of text embeddings, how to obtain them, available models, and common use cases like se...
examples/vector-embeddings-openai-embeddings-javascript-create-request.javascriptA JavaScript code example demonstrating how to use the OpenAI client to generate vector embeddings for a text string.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI client to generate vector embeddings for a text string.
examples/vector-embeddings-openai-embeddings-python-client-request.pythonA Python script demonstrating how to use the OpenAI client to generate vector embeddings for a text string using the text-embedding-3-small model.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate vector embeddings for a text string using the...
examples/vector-embeddings-openai-embeddings-curl-request.bashA bash curl command demonstrating how to send a text string to the OpenAI embeddings API using the text-embedding-3-small model.Exact payloads, commands, or snippets shown in A bash curl command demonstrating how to send a text string to the OpenAI embeddings API using the text-embedding-3-s...
examples/vector-embeddings-openai-embeddings-api-response.jsonA JSON object representing a successful response from the OpenAI embeddings API containing vector data and usage statistics.Exact payloads, commands, or snippets shown in A JSON object representing a successful response from the OpenAI embeddings API containing vector data and usage stat...
examples/vector-embeddings-openai-embeddings-python-text-embedding-3-small-datafr.pythonA Python script demonstrating how to use the OpenAI client to generate embeddings for a pandas DataFrame column using the text-embedding-3-small model.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate embeddings for a pandas DataFrame column using...
examples/vector-embeddings-openai-embeddings-python-pandas-csv-processing.pythonA Python script using pandas to load embedded review data from a CSV file and convert string representations into numpy arrays.Exact payloads, commands, or snippets shown in A Python script using pandas to load embedded review data from a CSV file and convert string representations into num...
examples/vector-embeddings-openai-embeddings-python-client-request-2.pythonA Python script demonstrating how to use the OpenAI client to generate text embeddings using the text-embedding-3-small model.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate text embeddings using the text-embedding-3-sma...
examples/vector-embeddings-openai-embeddings-python-semantic-search.pythonA Python script demonstrating how to use OpenAI embeddings to perform semantic search by comparing a query against a Wikipedia article.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use OpenAI embeddings to perform semantic search by comparing a query against a...
examples/vector-embeddings-openai-embeddings-python-similarity-search.pythonA Python script demonstrating how to use cosine similarity to search through a dataframe of reviews using text embeddings.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use cosine similarity to search through a dataframe of reviews using text embedd...
examples/vector-embeddings-openai-embeddings-python-cosine-similarity-search.pythonA Python script demonstrating how to generate text embeddings and perform similarity searches using cosine similarity.Exact payloads, commands, or snippets shown in A Python script demonstrating how to generate text embeddings and perform similarity searches using cosine similarity.
examples/vector-embeddings-openai-embeddings-python-recommendations-from-strings.pythonA Python function that calculates vector embeddings to find the nearest neighbor indices for a given input string.Exact payloads, commands, or snippets shown in A Python function that calculates vector embeddings to find the nearest neighbor indices for a given input string.
examples/vector-embeddings-openai-embeddings-python-tsne-visualization.pythonA Python script using pandas and scikit-learn to perform t-SNE dimensionality reduction on OpenAI embedding vectors for visualization.Exact payloads, commands, or snippets shown in A Python script using pandas and scikit-learn to perform t-SNE dimensionality reduction on OpenAI embedding vectors f...
examples/vector-embeddings-openai-embeddings-python-train-test-split.pythonA Python script demonstrating how to split vector embedding data into training and testing sets using scikit-learn.Exact payloads, commands, or snippets shown in A Python script demonstrating how to split vector embedding data into training and testing sets using scikit-learn.
examples/vector-embeddings-openai-embeddings-python-randomforest-regression.pythonA Python script demonstrating the use of OpenAI vector embeddings in conjunction with a scikit-learn RandomForestRegressor for predictive modeling.Exact payloads, commands, or snippets shown in A Python script demonstrating the use of OpenAI vector embeddings in conjunction with a scikit-learn RandomForestRegr...
examples/vector-embeddings-openai-embeddings-python-randomforest-classification.pythonA Python script demonstrating the use of scikit-learn's RandomForestClassifier in conjunction with vector embeddings for a classification task.Exact payloads, commands, or snippets shown in A Python script demonstrating the use of scikit-learn's RandomForestClassifier in conjunction with vector embeddings...
examples/vector-embeddings-openai-embeddings-python-cosine-similarity-sentiment-a.pythonA Python script demonstrating how to use OpenAI embeddings and cosine similarity to perform sentiment analysis on a dataset.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use OpenAI embeddings and cosine similarity to perform sentiment analysis on a d...
examples/vector-embeddings-openai-embeddings-python-user-product-aggregation.pythonA Python script demonstrating how to aggregate vector embeddings by user and product IDs using pandas and numpy.Exact payloads, commands, or snippets shown in A Python script demonstrating how to aggregate vector embeddings by user and product IDs using pandas and numpy.
examples/vector-embeddings-openai-embeddings-python-kmeans-clustering.pythonA Python script demonstrating how to use scikit-learn KMeans clustering on OpenAI vector embeddings.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use scikit-learn KMeans clustering on OpenAI vector embeddings.
examples/vector-embeddings-openai-embeddings-python-tiktoken-token-count.pythonA Python function using the tiktoken library to calculate the number of tokens in a given string for OpenAI embeddings.Exact payloads, commands, or snippets shown in A Python function using the tiktoken library to calculate the number of tokens in a given string for OpenAI embeddings.

What This Skill Covers

  • OpenAI’s text embeddings measure the relatedness of text strings. Embeddings are commonly used for:
  • Main sections: What are embeddings?, How to get embeddings, Embedding models, Use cases, Obtaining the embeddings.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/embeddings.md