Prompt
Do I need embeddings from an LLM API for semantic search?
Latest observation
Nov 23, 2026
OpenAI APIWeb search: off
Not necessarily.
For semantic search, you need a way to represent text as vectors so you can compare meaning, but those vectors do not have to come from an LLM API. Common options:
-
Use an embeddings model from an API
- Easiest to get started
- Often high quality
- Example: OpenAI, Cohere, Voyage, etc.
-
Use a local/open-source embedding model
- No API dependency
- Can be cheaper at scale
- Examples: sentence-transformers, E5, BGE, GTE, etc.
-
Use traditional search methods
- BM25 / keyword search
- Good for exact matches, less good for meaning
- Often combined with embeddings in hybrid search
Do you need an LLM specifically?
No.
You usually use a dedicated embedding model, not the generative LLM itself. Embedding models are smaller, faster, and cheaper, and are designed for retrieval.
Typical semantic search setup
- Convert documents into embeddings
- Store them in a vector database or index
- Embed the user query
- Find nearest vectors by cosine similarity / dot product / distance
When embeddings are useful
- Synonyms and paraphrases
- Concept-based retrieval
- “Find me docs about refunds” even if the exact word “refund” isn’t used
When keyword search may be enough
- Exact names, IDs, error codes
- Small datasets
- Simple filtering needs
If you want, I can also explain:
- how semantic search works end-to-end, or
- how to choose between API embeddings and local embeddings.