Problem / motivation
The Follow Up Prompts feature currently passes only the current bot response (apiMessage.content) as the {history} variable in the prompt template.
Because the model has no access to the previous conversation context, it is technically "blind" to the rest of the session. Any prompt instructions requiring session awareness will automatically fail.
Use case
A common scenario is configuring Follow Up Prompts to select from a fixed list of predefined questions (rather than generating new ones freely).
To prevent looping, a user adds a prompt rule like: "Never suggest a question the user has already asked in this session."
With the current implementation, this rule cannot work. The model has no way to know which questions from the list were already discussed, making it impossible to avoid duplicate suggestions across a multi-turn conversation.
Proposed improvement
Either:
- Option A — change
{history} to contain the full session history instead of just the current response
- Option B — keep
{history} as-is and introduce a new variable, e.g. {session_history}, that contains all messages from the current session
Option B is preferred as it is fully backward-compatible with existing prompt configurations.
Why this change is safe
- Strictly backward-compatible (Option B) - the existing
{history} variable remains untouched, meaning no current user setups will break.
- Minimal change - modifies only a few lines in the pipeline.
- Improves prompt control for follow-up generation without breaking existing configurations
Suggested labels: enhancement, follow-up-prompts
Problem / motivation
The Follow Up Prompts feature currently passes only the current bot response (
apiMessage.content) as the{history}variable in the prompt template.Because the model has no access to the previous conversation context, it is technically "blind" to the rest of the session. Any prompt instructions requiring session awareness will automatically fail.
Use case
A common scenario is configuring Follow Up Prompts to select from a fixed list of predefined questions (rather than generating new ones freely).
To prevent looping, a user adds a prompt rule like: "Never suggest a question the user has already asked in this session."
With the current implementation, this rule cannot work. The model has no way to know which questions from the list were already discussed, making it impossible to avoid duplicate suggestions across a multi-turn conversation.
Proposed improvement
Either:
{history}to contain the full session history instead of just the current response{history}as-is and introduce a new variable, e.g.{session_history}, that contains all messages from the current sessionOption B is preferred as it is fully backward-compatible with existing prompt configurations.
Why this change is safe
{history}variable remains untouched, meaning no current user setups will break.Suggested labels:
enhancement,follow-up-prompts