Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Vector embeddings | OpenAI API

Explains the concept of vector embeddings and how to use the OpenAI API to convert text into high-dimensional vectors for semantic search and similarity tasks.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Vector embeddings | OpenAI API

Explains the concept of vector embeddings and how to use the OpenAI API to convert text into high-dimensional vectors for semantic search and similarity tasks.

When To Use

Use when you need to implement semantic search, clustering, or recommendation systems by converting text into numerical vectors.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/vector-embeddings-openai-api-workflow-guide.mdA guide explaining the concept of vector embeddings, available embedding models, and implementation use cases within the OpenAI API.Questions about a guide explaining the concept of vector embeddings, available embedding models, and implementation use cases within...
examples/vector-embeddings-openai-api-openai-embeddings-nodejs-create-request.textA Node.js code example demonstrating how to use the OpenAI client to create text embeddings using the text-embedding-3-small model.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the OpenAI client to create text embeddings using the text-embedding-...
examples/vector-embeddings-openai-api-openai-embeddings-python-client-request.textA 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-api-openai-api-embeddings-curl-request.textA curl command demonstrating how to send a POST request to the OpenAI embeddings endpoint using a text input and a specific model.Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a POST request to the OpenAI embeddings endpoint using a text input and a sp...
examples/vector-embeddings-openai-api-openai-embeddings-api-response-json.textA JSON representation of an OpenAI embeddings API response containing vector data and usage statistics.Exact payloads, commands, or snippets shown in A JSON representation of an OpenAI embeddings API response containing vector data and usage statistics.
examples/vector-embeddings-openai-api-openai-embeddings-python-text-embedding-3-s.textA Python script using the OpenAI client to generate vector embeddings for a pandas DataFrame column using the text-embedding-3-small model.Exact payloads, commands, or snippets shown in A Python script using the OpenAI client to generate vector embeddings for a pandas DataFrame column using the text-em...
examples/vector-embeddings-openai-api-openai-embeddings-python-pandas-csv-loading.textA Python code snippet demonstrating how to load embedded vector data from a CSV file into a Pandas DataFrame using NumPy.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to load embedded vector data from a CSV file into a Pandas DataFrame using Nu...
examples/vector-embeddings-openai-api-openai-embeddings-python-normalization.textA Python code snippet demonstrating how to create embeddings using the OpenAI client and normalize the resulting vectors using NumPy.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to create embeddings using the OpenAI client and normalize the resulting vect...
examples/vector-embeddings-openai-api-openai-embeddings-python-query-context.textA Python code example demonstrating how to use OpenAI embeddings to perform a semantic search by querying a text article.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use OpenAI embeddings to perform a semantic search by querying a text arti...
examples/vector-embeddings-openai-api-openai-embeddings-python-similarity-search.textA Python code example demonstrating how to use text-embedding-3-small to perform a similarity search on product reviews using cosine similarity.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use text-embedding-3-small to perform a similarity search on product revie...
examples/vector-embeddings-openai-api-openai-embeddings-python-similarity-search-2.textA Python code example demonstrating how to generate embeddings using the text-embedding-3-small model and calculate cosine similarity for a search function.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to generate embeddings using the text-embedding-3-small model and calculate c...
examples/vector-embeddings-openai-api-openai-embeddings-python-recommendations-fr.textA Python function that calculates embeddings for a list of strings to find nearest neighbors for recommendation purposes.Exact payloads, commands, or snippets shown in A Python function that calculates embeddings for a list of strings to find nearest neighbors for recommendation purpo...
examples/vector-embeddings-openai-api-openai-embeddings-tsne-visualization-python.textA Python script using 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 scikit-learn to perform t-SNE dimensionality reduction on OpenAI embedding vectors for visualiz...
examples/vector-embeddings-openai-api-openai-embeddings-sklearn-train-test-split.textA Python code snippet demonstrating how to split embedding vectors and scores into training and testing sets using scikit-learn.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to split embedding vectors and scores into training and testing sets using sc...
examples/vector-embeddings-openai-api-openai-embeddings-sklearn-randomforest.textA Python code snippet demonstrating the use of scikit-learn's RandomForestRegressor in conjunction with vector embeddings.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating the use of scikit-learn's RandomForestRegressor in conjunction with vector embedd...
examples/vector-embeddings-openai-api-openai-embeddings-sklearn-randomforest-clas.textA Python code snippet demonstrating the use of scikit-learn's RandomForestClassifier to perform classification tasks.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating the use of scikit-learn's RandomForestClassifier to perform classification tasks.
examples/vector-embeddings-openai-api-openai-embeddings-python-cosine-similarity.textA Python code snippet demonstrating how to calculate cosine similarity between text embeddings using a custom utility function.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to calculate cosine similarity between text embeddings using a custom utility...
examples/vector-embeddings-openai-api-openai-embeddings-python-dataframe-aggregat.textA Python code snippet demonstrating how to aggregate text embeddings by grouping a pandas DataFrame by user and product IDs.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to aggregate text embeddings by grouping a pandas DataFrame by user and produ...
examples/vector-embeddings-openai-api-openai-embeddings-sklearn-kmeans-clustering.textA Python code snippet demonstrating how to use scikit-learn's KMeans to cluster data using OpenAI vector embeddings.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to use scikit-learn's KMeans to cluster data using OpenAI vector embeddings.
examples/vector-embeddings-openai-api-openai-embeddings-tiktoken-token-count-pyth.textA Python function using the tiktoken library to calculate the number of tokens in a given string using a specific encoding.Exact payloads, commands, or snippets shown in A Python function using the tiktoken library to calculate the number of tokens in a given string using a specific enc...

What This Skill Covers

  • New embedding models text-embedding-3-small and text-embedding-3-large , our newest and most performant embedding models, are now available. They feature low...
  • 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