Use ai logging with the llm that shows the full prompt and context.
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3458605. -->
Reported by: [yautja_cetanu](https://www.drupal.org/user/626050)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When debugging why an LLM bases search isn't working it might be happy to see the raw prompts that are provided. The AI module has a logging feature that submits all prompts to Drupal's logs that can be turned on and off when debugging the site.</p>
<p>This may just automatically work when using the AI abstraction layer but there may need to be more than what was just sent do the LLM (Maybe the embeddings themselves?)</p>
<p>It's Major for now but this might just work. Or if it works out of the box but there are nice to haves that could be added a minor issue could be created.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue