Embeddings
Create vectors for semantic search and retrieval
Embeddings convert text into numerical vectors that represent its meaning. Applications compare vectors to support semantic search, recommendations, clustering, duplicate detection and retrieval-augmented generation.
Choose a model
| Model | Hosted | Notes |
|---|---|---|
nomic-embed-text-v1.5 | At UF | Fast general-purpose model. Every input needs a task prefix |
sfr-embedding-mistral | At UF | Larger retrieval model. Queries need an instruction |
text-embedding-3-small | Cloud | Needs a key from a team with cloud models enabled |
text-embedding-3-large | Cloud | Needs a key from a team with cloud models enabled |
Each model page lists its approved data classifications, limits and pricing. Cloud models are approved for Open data only.
To see which models your key can use, list them:
curl "$NAVIGATOR_API_BASE_URL/models" \
--header "Authorization: Bearer $NAVIGATOR_TOOLKIT_API_KEY"The examples use nomic-embed-text-v1.5.
Create an embedding
Before running an example, complete Getting Started, configure the documented environment variables and confirm that your key can use nomic-embed-text-v1.5. The Python and JavaScript examples need the openai package from OpenAI-compatible SDKs.
curl "$NAVIGATOR_API_BASE_URL/embeddings" \
--header "Authorization: Bearer $NAVIGATOR_TOOLKIT_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "nomic-embed-text-v1.5",
"input": "search_document: Albert and Alberta are the Florida Gators mascots."
}'A successful request returns one vector under data[0].embedding; nomic-embed-text-v1.5 vectors have 768 dimensions. To embed several texts in one request, send input as a list. Store each vector with its source text and the model ID.
Prepare text for each model
Some models expect a marker that says what the text is for. Embeddings made without it are less accurate.
nomic-embed-text-v1.5: start stored documents withsearch_document:and search questions withsearch_query:. Useclustering:orclassification:for those tasks.sfr-embedding-mistral: add a one-sentence instruction to questions, in the formInstruct: <task>\nQuery: <question>. Embed stored documents as plain text.text-embedding-3-smallandtext-embedding-3-large: send plain text.
Application guidance
- Use the same embedding model for documents and queries.
- Do not compare vectors produced by different models.
- Split long documents into meaningful chunks before embedding them, and keep each chunk within the model's input limit.
- Store enough source metadata to trace every result back to its original content.
- Rebuild an index when changing embedding models or incompatible preprocessing.
- Choose a vector-distance function, the method used to calculate similarity between vectors, that is supported by the model and your vector database.
Check the selected model's pricing and approved data classifications before embedding content. Vector databases and downstream storage must also be approved for the data they contain.