Prompt
How do I do multilingual enterprise search?
Latest observation
Multilingual enterprise search means making it easy to find relevant documents, records, tickets, chats, and other content across multiple languages, without forcing users to search only in the language of the source content.
Core approaches
1. Translate the query
A user searches in their language, and you translate the query into the content languages before searching.
Pros
- Simple to understand
- Works well when your content is concentrated in a few languages
Cons
- Translation errors can hurt recall and precision
- Synonyms and domain terms may not translate cleanly
2. Translate the content
You translate documents or fields into a pivot language, then index the translated text.
Pros
- Search is simpler downstream
- Useful for analytics and unified indexing
Cons
- Expensive at scale
- Translation quality can distort meaning
- Needs reprocessing when source changes
3. Multilingual embeddings / semantic search
Represent queries and documents in a shared vector space so text in different languages can match semantically.
Pros
- Often the best multilingual experience
- Handles cross-lingual search naturally
- Good for messy enterprise content
Cons
- Requires vector infrastructure
- Needs careful ranking and evaluation
- May miss exact-term matches unless combined with lexical search
4. Hybrid search
Combine keyword search, multilingual translation, and vector search.
This is usually the best enterprise answer.
A typical hybrid stack:
- Lexical search for exact names, IDs, product codes, legal terms
- Cross-lingual semantic search for meaning-based matching
- Language detection + normalization for preprocessing
- Translation for query expansion or result presentation
- Business rules for ACLs, freshness, source priority, etc.
Recommended architecture
Ingestion pipeline
- Detect language of each document/chunk
- Extract text from PDFs, emails, Office docs, HTML, chat logs
- Normalize text:
- Unicode normalization
- tokenization
- stemming/lemmatization where appropriate
- remove boilerplate
- Chunk content into searchable units
- Generate:
- lexical index fields
- multilingual embeddings
- optionally translated versions or summaries
- Store metadata:
- source system
- timestamp
- author/team
- language
- ACL/permissions
- document type
Query pipeline
- Detect user language and/or accept a language preference
- Parse intent:
- exact search?
- semantic search?
- filter-only?
- Run:
- lexical match
- vector match
- translated query expansion if needed
- Merge and re-rank results
- Apply ACL filtering
- Return snippets in the user’s language when possible
Key design decisions
1. What languages matter?
- Which languages do users search in?
- Which languages do documents exist in?
- Are you supporting right-to-left scripts, CJK languages, accented Latin languages, etc.?
This affects analyzers, tokenization, OCR, and UI.
2. Do you need cross-lingual matching?
Examples:
- User searches in English, document is in German
- User searches in Spanish, ticket is in Portuguese
If yes, use multilingual embeddings and/or query translation.
3. Do you need exact match precision?
Enterprise search usually needs both:
- “Find me the document with this exact part number”
- “Find documents about this topic”
That’s why hybrid search is common.
4. How do you handle permissions?
Search must respect access control at index or retrieval time:
- per-document ACLs
- group permissions
- row-level security
- tenant isolation
Never return a result just because it matches well.
5. How do you evaluate quality?
Use multilingual relevance tests:
- precision@k / nDCG / recall
- per-language evaluation
- cross-lingual queries
- synonym and translation variants
- business-specific benchmark queries
Best practices
- Use hybrid retrieval: lexical + semantic + metadata filters
- Preserve original text: never rely only on translated text
- Index language metadata: helps analyzers and ranking
- Chunk intelligently: sentence/paragraph-aware chunks work better than arbitrary splits
- Use multilingual embedding models trained for cross-lingual retrieval
- Support domain terminology: abbreviations, product names, legal/medical terms
- Handle transliteration: important for names and entities
- Show snippets in the user’s language when available
- Monitor drift: language distribution and vocabulary can change over time
Common pitfalls
- Relying only on machine translation
- Using a monolingual search analyzer for all languages
- Ignoring ACLs until after retrieval, leading to leakage risks
- Not handling CJK tokenization or accent normalization
- Treating all languages the same in ranking
- Forgetting that query intent differs by locale and user role
Practical implementation options
If you use Elasticsearch/OpenSearch
- Use language-specific analyzers where appropriate
- Add multilingual fields or per-language subfields
- Use vector search for embeddings
- Combine BM25 with semantic reranking
If you use a vector database
- Store embeddings for document chunks
- Use a multilingual embedding model
- Keep lexical index alongside it for exact search
- Re-rank results with business rules and metadata filters
If you use an LLM-based search experience
- Use retrieval-augmented generation (RAG)
- Retrieve across languages with hybrid search
- Generate answers in the user’s language
- Cite source passages and preserve permissions
A good default strategy
If you’re building from scratch, start with this:
- Index original text
- Detect and store language
- Create multilingual embeddings for chunks
- Keep a lexical index for exact match
- Use query translation only as a fallback or expansion
- Hybrid retrieve + rerank
- Enforce permissions at retrieval
- Evaluate per language
If you want, I can also give you:
- a reference architecture diagram,
- an Elasticsearch/OpenSearch implementation plan,
- a vector DB + hybrid search design,
- or a checklist for multilingual search evaluation.
Brands