Add language context to RAG tool
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3562047. -->
Reported by: [a.dmitriiev](https://www.drupal.org/user/3235287)
Related to !13
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>For a multi language site, it would be nice to have a language context to the tool, of course where the filtering is supported.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Enable translation for a content type.<br>
Create a content item, translate it to some other language.<br>
Index the content item in both languages.<br>
Use AI Tool Explorer to test RAG tool.<br>
There will be two results found for the request in 2 languages.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Add <code>language</code> to context definition of the tool. Allow to use the interface language that is selected for the page, and other options that are available for example in views for language context.</p>
> Related issue: [Issue #3547016](https://www.drupal.org/node/3547016)
> Related issue: [Issue #3554899](https://www.drupal.org/node/3554899)
issue