Unstructured text files
AI Models & Assistants / Knowledge library
text-embedding-ada-002
Older embedding model
Why learn text-embedding-ada-002?
Offers the documented OpenAI model capabilities through hosted.
The problem it solves
Provides model inference for supported text inputs.
Where it came from
text-embedding-ada-002: Older embedding model Published aliases: text-embedding-ada-002. Input: text. Output: text. Checked 2026-10-13. Model capabilities are distinct from tools available in a particular agent.
Build your understanding
Work through these exercises in order. Try the task before opening a reference.
- Explain what text-embedding-ada-002 does.
- Identify a use case for text-embedding-ada-002.
- Describe a limitation of text-embedding-ada-002.
- Name a compatible tool for text-embedding-ada-002.
- Compare text-embedding-ada-002 against an alternative.
Documentation and sources
- Primary source / model card (developers.openai.com)
Catalog research notes
- See the AI Workbench for source dates, pricing evidence and configuration details.
Connect the ideas
Built on
Real World Example
Legacy Archive Semantic Discovery
A historical research firm managing millions of digitized, unindexed archival documents.
The business problem
Researchers struggle to find relevant documents because traditional keyword searches fail to capture the conceptual intent or thematic connections between fragmented historical records.
How this topic solves it
By utilizing text-embedding-ada-002, the firm converts unstructured text into high-dimensional vectors, enabling semantic search that retrieves documents based on conceptual similarity rather than exact keyword matching.
- Pre-process archival text into clean, tokenized segments.
- Send text segments to the v1/embeddings endpoint using the text-embedding-ada-002 model.
- Store the resulting numerical vector arrays in a specialized vector database.
- Perform cosine similarity calculations between user query vectors and stored document vectors to rank search results.
This flow illustrates the transformation of raw text into searchable vector data.
text-embedding-ada-002
Storage for numerical embeddings
User search input
- Raw Archive → sends text → Embedding API
- Embedding API → stores vectors → Vector Database
- Query Interface → embeds query → Embedding API
- Vector Database → returns matches → Query Interface
Implementation example
This code demonstrates the primary interaction with the v1/embeddings endpoint to generate numerical representations for archival text.
import openai
# Requesting vector representation for a document snippet
response = openai.Embedding.create(
input="Historical document text content",
model="text-embedding-ada-002"
)
# The vector is found in response['data'][0]['embedding']Expected business outcome
Researchers can identify thematic patterns across disparate archives, significantly reducing the time required for deep historical investigation.
Limitations and checks
The model produces fixed-length vectors that represent the entire input; if a document is too long, the semantic focus may become diluted, which can be checked by evaluating the retrieval precision against known ground-truth document clusters.