
At ConfidentialMind, we wanted to improve retrieval when the question and its relevant document are written in different languages. A Finnish query, for example, might need to retrieve an English passage. Multilingual encoders can handle both languages individually, but matching relevance across them remains a separate challenge. In a retrieval-augmented generation (RAG) system, that first retrieval step determines which evidence is available to the answer generator.
Our constraint was to keep the existing document index and preserve the original encoder’s same-language behavior. SampoTron combines a query-only LoRA adapter with a deterministic language rule to do that. On a sampled FIQA financial retrieval evaluation, the mean score across six English, Finnish, and Swedish directions rose from 0.2406 to 0.2908 nDCG@10, a 20.9% relative gain. nDCG@10 measures ranking quality, rewarding relevant passages that appear earlier in the top ten results. All six cross-language directions improved.
Figure 1. nDCG@10 by query language → document language on sampled FIQA. Each direction uses the same 194 questions and searches 14,330 passages in the target language. Higher is better.
Train the query encoder against fixed document vectors
A dense retriever represents questions and passages as vectors, then ranks passages by similarity to the query. Updating the encoder can change that vector space and require a corpus to be embedded again. For a system with a large existing index, the cost of that rebuild is part of the model deployment decision.
We kept the document encoder fixed at NVIDIA Nemotron-3-Embed-1B-BF16. Every configuration used the same normalized 1,024-dimensional document embeddings, taken from the model’s supported output prefix. SampoTron adds a rank-64 low-rank adaptation (LoRA) module to the query encoder. Training updates only those adapter parameters, leaving the base weights and document vectors unchanged. The resulting adapter occupies approximately 84 MB and can be used with the original model’s document index.
The contrastive training objective encourages a query to score its relevant passage above competing passages. Those competitors include hard negatives mined with BM25 and other queries’ positive passages in the batch. Because the document vectors are fixed, training adjusts the query representation to the space already used by the index. For a Finnish query paired with an English passage, this provides a relevance signal across the language boundary.
Use the adapter when the languages differ
At inference, the router compares explicit query-language and index-language labels. Matching labels select the original query encoder; different labels select the encoder with SampoTron enabled. Both routes search the original document vectors for the target index.
Figure 2. Query and index language labels select the original or adapted query encoder. Both routes search the same stored document vectors.
Let d_base denote a stored document vector, and q_base and q_adapt the original and adapted query vectors. All are normalized, so their dot product gives cosine similarity. The scoring rule is:
score(q,d) = q_base(q) · d_base(d) when query and index languages match; otherwise, score(q,d) = q_adapt(q) · d_base(d).
For same-language requests, the query and document vectors are the original ones. Their scores, and therefore rankings, stay the same when preprocessing, search settings, and tie-breaking are also unchanged. This preservation follows from the routing rule regardless of what the adapter has learned.
The distinction matters in serving. The base model must remain available with the adapter disabled, so the adapter is kept unmerged. If concurrent requests share mutable adapter state, selecting the route and encoding the query must happen as one protected operation. Otherwise, one request could change the adapter setting while another is being encoded.
Training and evaluation
The training mixture contained 113,043 query–positive–negative rows: 76,377 from FIQA, 25,674 derived from MIRACL, and 10,992 derived from Mr. TyDi. It covered all six cross-language directions, with more English-to-Finnish examples in the complete mixture. Finnish and Swedish material included machine translations. FIQA training rows matching test-query identifiers or text were excluded; some passages could still appear in both training and evaluation.
We applied rank-64 LoRA to attention and feed-forward projections. Training used an effective batch of 256 queries, replay batches of 16 through gradient caching, and a maximum sequence length of 1,024 tokens. One NVIDIA RTX PRO 6000 Blackwell GPU ran the adapter training. For part of the data preparation, GLM models drafted and refined translations on an on-premises NVIDIA B300 GPU cluster.
For the main evaluation, a fixed-seed shuffle selected 194 of FIQA’s 648 test questions. Each question was available in English, Finnish, and Swedish. Each direction searched 14,330 passages drawn from the 57,638-passage corpus: all 1,706 passages labeled relevant across the full test set, plus 12,624 lexical distractors. The three language versions used the same passage identifiers.
What changed in the rankings
Figure 3. Original and routed nDCG@10 scores. Rows are query languages and columns are index languages. The diagonal retains the base scores by construction; all six off-diagonal scores improve with the adapted query encoder.
Finnish → English showed the largest absolute gain, from 0.285 to 0.382 nDCG@10. Finnish → Swedish rose from 0.146 to 0.209, and Swedish → English from 0.370 to 0.436. English → Swedish had the smallest increase, from 0.303 to 0.315. The equal-weight mean across all six directions rose by 0.0502, or 20.9% relative to the original score.
To examine the role of routing, we compared three configurations: the original encoder, the adapter applied to every query, and SampoTron with the language rule. The two native Finnish evaluations searched the complete MIRACL-fi and Mr. TyDi-fi corpora, containing 1,883,509 and 1,908,757 passages respectively.
| Configuration | FIQA cross-language | FIQA same-language | MIRACL-fi | Mr. TyDi-fi |
|---|---|---|---|---|
| Original encoder | 0.2406 | 0.3303 | 0.7556 | 0.7284 |
| Adapter on every query | 0.2908 | 0.3361 | 0.6746 | 0.6648 |
| SampoTron with routing | 0.2908 | 0.3303 | 0.7556 | 0.7284 |
All values are nDCG@10. The FIQA columns average six cross-language and three same-language directions. Routed same-language scores are inherited from the original measurements because those requests use the unchanged scoring path.
Applying the adapter to every query slightly improved the same-language FIQA average, but lowered both native Finnish scores. Routing kept the cross-language gains while retaining the original scores for Finnish queries searching Finnish passages. Query-only training and language routing therefore serve different purposes: one improves the cross-language representation; the other determines where to use it.
We also applied the architecture to Microsoft’s Harrier encoder, training a separate rank-32 adapter called SampoHarrier. Its cross-language FIQA mean rose from 0.278 to 0.334, approximately 20%. This second result supports trying the approach with other encoders, with a separately trained adapter and evaluation for each.
From Nemotron training to a GB10 deployment
The NVIDIA components in the research were the Nemotron base embedding model and the GPUs used for training and translation preparation. ConfidentialMind prepared the training mixture, trained SampoTron, implemented the router, and ran the evaluation. The GLM models used to prepare translations are separate from NVIDIA Nemotron open models.
In ConfidentialMind’s GB10 setup, this retrieval path sits inside a complete RAG workflow. Nemotron-3-Embed-1B and SampoTron handle the query embeddings, pgvector holds the original document vectors, and NVIDIA Nemotron 3.5 Lightning 30B-A3B NVFP4 generates a response using retrieved passages. These components share one on-premises system built around the NVIDIA GB10 Grace Blackwell Superchip.
Containerized vLLM on CUDA serves the models. ConfidentialMind’s gateway gives applications one entry point, with identity checks, authorization, and tenant scoping. The platform also coordinates the RAG workflow and provides observability, connecting the retrieval work to the rest of the application.
Figure 4. ConfidentialMind’s GB10 architecture combines language-routed retrieval, a shared pgvector index, and Nemotron answer generation. The platform supplies the gateway, access controls, and orchestration.
Future work
For an existing retrieval system, the attraction is that the specialization lives in the query encoder. We can train it against the document space already in use, measure its effect on the intended language pairs, and enable it for those requests. SampoTron’s results show that this approach can improve retrieval across English, Finnish, and Swedish while retaining the original same-language behavior.
The next evaluations should extend beyond the sampled financial collection. Translated Finnish and Swedish text can carry shared translation patterns, so naturally authored material is an important test. Native Swedish retrieval also needs a dedicated benchmark. Future research will also explore searching document collections that contain multiple languages.