Move the results to the system prompt instead of Assistant Message
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3499935. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !408 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Currently the Assistant will have a system prompt, that comprises of the Assistants System Prompt + Pre-Action Prompt + Instructions. The Pre-Action Prompt is only rendered when there is not action taken or any results given. </p> <p>If the assistant uses one of the actions, that action will return the answer in an assistant message currently.</p> <p>The current Drupal CMS instructions wants there to be a two step process, where you approve something first and then apply it via the actions (agents in this case). The problem is, as can be seen in the issue queue, that it can hallucinate what it has done.</p> <p>The working theory is that happens because of the message history and the LLM, messing up what the results are.</p> <p>The idea here is to move the results to the system prompt instead and specifically write "No actions have been taken" if there has been no actions taken, to enforce to the LLM that its not confusing.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Move the results from the assistant message to system prompt.<br> Test it against the previous solution manually.</p>
issue