Acho que a API discourse-ai precisa de uma regressão

That would be nice, I am not and can not demand Discourse team, so just giving some suggestions.

Using old “separators” solution for robuster parsing, a XML-like raw content like this:

<SUMMARY_START>
Summary contnet.
<SUMMARY_END>

<SUGGESTIONS_START>
<SUGGESTION_START>
Suggestion 1
<SUGGESTION_END>
<SUGGESTION_START>
Suggestion 2
<SUGGESTION_END>
...
<SUGGESTIONS_END>

Then not caring about anything outside of <START> and <END>, I believe that the most foolish productional AI model can process labels correctly.

And asking AI not to add extra discription; then warning admins possible problems if opening that checkbox.

I do not know what Discourse AI generated request body looks like. But if not, just putting system prompts in first message said by role system, vector database query result in the next system role message with a prefix anything like Past important content:\n, and putting post content or other actual data in user role’s messages.