AI System, User, Assistant message question

Describe the problem/error/question

Why don’t AI agents send the history as User message and Assistant message to the API, and both are sent only in the System message, according to the API and the operation of LLM the best performance is when it is sent according to the documentation because the user message is very important to be described for LLM and the assistant to demonstrate its history.

Is there any reason for n8n to send everything as a system message? I see it as something that could greatly improve the experience of LLM which uses a lot of memory.

Information on your n8n setup

  • n8n version: 1.82
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu 20.04

Hey @Junior_Sereno

What do you mean by ‘always sends as an user message’ as far as I know even the basic LLM Chain node has to options of sending system, user, AI messages:

The AI Tools agent also has it as most of the other n8n AI nodes:

What I noticed was that the conversation history is always sent within the system message by observing the logs and is not separated between system, assistant, user as in other frameworks

Open the logs after some interactions with the agent and you will see that the history is inserted and sent within the system message, and this decreases the quality of the agent’s interpretation in larger histories

1 Like

I see. That is good to know. Thank you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.