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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/vector-embeddings-workflow-guide.md | A 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.javascript | A 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.python | A 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.bash | A 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.json | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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.python | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
