Hi,
is there a reason why the System Message is always prepended everytime the LLM node is visited?
Couldn’t it be just fix at index 0 in the message stack?
Hi,
is there a reason why the System Message is always prepended everytime the LLM node is visited?
Couldn’t it be just fix at index 0 in the message stack?
Hi,
In general, every time to make a call to the LLM, it is a whole new context. It does not actually remember anything from the previous interactions. This is why we need to send the system message every time.
There are techniques like memory that help address this. LangGraph has support for this. The simplest type is just replaying some or all of the previous interactions, a step up from that is to summarize the previous conversation and include the summary. Then there are more advanced techniques as well.
There are some great courses on memory available on DeepLearning.ai.
-Mark