[GH-ISSUE #2721] How to send system prompt only at the START of a chat session? #1746

Closed
opened 2026-02-22 18:26:20 -05:00 by yindo · 1 comment
Owner

Originally created by @joomgallerytestit on GitHub (Nov 26, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2721

Hi,

how can I prevent AnythingLLM from sending the system prompt to LM Studio for every question within a chat session, instead of just at the start of a chat session?

Thanks in advance
Jommgallerytestit

Originally created by @joomgallerytestit on GitHub (Nov 26, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2721 Hi, how can I prevent AnythingLLM from sending the system prompt to LM Studio **for every question within a chat session**, instead of just at the start of a chat session? Thanks in advance Jommgallerytestit
yindo closed this issue 2026-02-22 18:26:20 -05:00
Author
Owner

@timothycarambat commented on GitHub (Nov 26, 2024):

You cant optionally only send it at the start. its the system prompt - it is in each request because LLMs are stateless so you need to send the whole conversation each time and the system prompts helps guide the response.

If you want something to only be sent once in the request, then just send it as a regular chat as it will eventually be filtered out of the context window.

@timothycarambat commented on GitHub (Nov 26, 2024): You cant optionally only send it at the start. its the system prompt - it is in each request because LLMs are stateless so you need to send the whole conversation each time and the system prompts helps guide the response. If you want something to only be sent once in the request, then just send it as a regular chat as it will eventually be filtered out of the context window.
yindo changed title from How to send system prompt only at the START of a chat session? to [GH-ISSUE #2721] How to send system prompt only at the START of a chat session? 2026-06-05 14:42:27 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1746