In this article
A language preference permits other languages; strict filtering changes source eligibility and can remove the only useful document.
Define the language requirement
A Russian support assistant may prefer Russian documentation while accepting an authoritative English specification. A language-learning exercise may require sources only in the target language. These are different retrieval policies. Decide which applies before setting a language field, and keep the answer’s presentation language as a separate application choice.
Distinguish boost from exclusion
The Search reference defines language as a result-ranking boost by default. filter_by_language strictly excludes nonmatching results and requires a language value. Validate that dependency in the request builder. Do not represent the preference alone as a guarantee that every returned page uses the chosen language.
Evaluate the missing-source tradeoff
Search best practices explains that strict filtering can reduce coverage and recommends matching query language to the selected language. For a technical question, preserve identifiers during any translation. A translated description can help retrieval while a changed package name can send it toward an unrelated subject.
Suppose the only detailed error explanation is in an English vendor manual. A preference policy may retain that source; a strict Russian-only policy may remove it. Both can implement the selected policy correctly. The interface should explain the resulting evidence gap rather than invent a Russian source or silently weaken the filter.
Verify the wrapper boundary
The official Python client exposes separate language and strict-filter arguments. Keep them separate in your own configuration too. A single locale control can conceal whether the application requested ranking preference, exclusion, or merely translation of the final answer. Store effective request values with the result record.
Test eligibility before fluency
Use reviewed cases with a matching-language source, a useful foreign-language source, and no matching-language evidence. Check the returned URL set and source language before scoring the generated answer’s readability. A fluent translation cannot demonstrate that retrieval obeyed a strict source-language rule.
The existing guides to Russian identifier handling and retrieval judgments support this separation. Report source eligibility, factual support, and answer language as distinct outcomes. That makes it possible to improve translation without obscuring a retrieval constraint or misclassifying a deliberate coverage reduction as an API failure.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.