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
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:
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