mode
keyword | semantic | hybriddefault: hybridChooses the retrieval strategy: lexical, vector, or both fused by reciprocal rank.
Keyword is BM25 over the postings tier: fastest, and correct when the query contains exact terms that must match. Semantic searches the vector tier: right when the user's words and the document's words differ. Hybrid runs both and fuses the rankings, which is the default because it is rarely wrong.
Keyword is also the cheapest mode. High-volume agent traffic with well-formed queries can often run keyword-only and halve its latency.
Accepted values
- keyword
- semantic
- hybrid
The live vocabulary is served by /describe — read it rather than hardcoding this list.
Example
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=ENOSPC+handling&mode=keyword"Common questions
What does the mode filter do?
Chooses the retrieval strategy: lexical, vector, or both fused by reciprocal rank.
When should I use mode?
Keyword for identifiers and high volume; semantic for natural-language questions; hybrid when unsure.
How does mode behave in practice?
Keyword is also the cheapest mode. High-volume agent traffic with well-formed queries can often run keyword-only and halve its latency.
Filters are free
Every filter is evaluated against a stored field, so it narrows the candidate set before scoring — a filtered query is often faster than an unfiltered one.