Agent retrieval
Multilingual search for agents
Most agent stacks are quietly monolingual — they search in English, find English sources, and answer in English, even when better material exists elsewhere. That is usually an artefact of the retrieval layer rather than a decision anyone made.
Verified 5 August 2026
One embedding space
A multilingual embedder is trained so that texts with the same meaning land near each other regardless of language. Retrieval then crosses languages for free: an English query about climate policy retrieves a relevant German passage because the two are neighbours in the space.
The alternative — translate the query, search a per-language index, translate results back — costs infrastructure, latency and meaning at every boundary.
Mode matters here
Only semantic retrieval crosses languages. Keyword mode matches tokens, and an English token does not appear in a German document, so keyword-only search is monolingual by construction.
Hybrid — the default — gets both: lexical precision within the query language and semantic reach across all of them.
# German query, sources in any language
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=Klimapolitik&mode=semantic&limit=10"
# Pinned to German sources only
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=Klimapolitik&lang=de&limit=10"When to pin the language
Pin with lang when the answer must be in a language your user reads, or when you are deliberately comparing coverage across languages — asking how a story was reported in three countries requires three pinned queries, not one.
Leave it unset when you want the best sources regardless of language and the model can handle translation itself, which modern models generally can.
Scripts without word boundaries
Chinese, Japanese and Thai do not delimit words with spaces, so a word tokeniser has nothing to split on. Character bigrams are the robust answer: 量子力学 indexes as 量子, 子力 and 力学, with the same rule applied to queries so the two always agree.
It needs no language-specific model and degrades gracefully on mixed-script text, which is common in technical writing.
A practical pattern
For a multilingual product, run the query unpinned first and inspect the language distribution in the facets. If coverage is thin in the user's language, you now know that before answering — and can say so rather than silently returning worse sources.
For comparative research, run the same semantic query pinned to each language in turn. Because it is one embedding space, the queries are genuinely comparable rather than three separate translations.
Frequently asked questions
Do I need to translate my query?
No. Semantic and hybrid modes cross languages directly. Translating the query would defeat the point — you would be searching for the translation rather than the meaning.
Which languages are supported?
101 in the embedding space. The 30 highest-volume ones have their own pages with sample queries; the lang filter accepts the full ISO set regardless.
Does cross-language retrieval hurt precision?
It can, if you wanted one language and did not say so. That is what the lang filter is for — the default is breadth, and pinning is one parameter away.
Try it against your own queries
10,000 free requests a month, no card. Everything in this guide works on the free tier.