[GH-ISSUE #1696] [FEAT]: Persist query mode refusal responses as chat history #1110

Closed
opened 2026-02-22 18:23:09 -05:00 by yindo · 5 comments
Owner

Originally created by @santini-cyber on GitHub (Jun 17, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1696

Originally assigned to: @shatfield4 on GitHub.

What would you like to see?

In our dev environment we typically will roll out a new ALLM build every four to six weeks. We have a set of standard tests that we run to validate the build process. In our use case, we are using ALLM for document analysis via the API. In our document analysis workflow, the refusal response is an important data point. In our Feb, March, and April builds we were receiving a refusal response (from the LLM) which was returned via the ALLM API. Starting in our June build we noticed that the API was no longer returning the refusal response and the refusal response was not being written to the local database. When interacting through the UI, the refusal response is presented to the user but does not persist in the Workspace Chats. We set up a test to validate this observation. We ran the exact same queries and workspace configuration side by side comparing the April vs. June builds. With the same query, model, and workspace configuration the April build returns a refusal response via the API and persists to the local db, while the June version does not. Can we bring back this feature? I believe it is a very valuable analytical capability of the ALLM platform.

Originally created by @santini-cyber on GitHub (Jun 17, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1696 Originally assigned to: @shatfield4 on GitHub. ### What would you like to see? In our dev environment we typically will roll out a new ALLM build every four to six weeks. We have a set of standard tests that we run to validate the build process. In our use case, we are using ALLM for document analysis via the API. In our document analysis workflow, the refusal response is an important data point. In our Feb, March, and April builds we were receiving a refusal response (from the LLM) which was returned via the ALLM API. Starting in our June build we noticed that the API was no longer returning the refusal response and the refusal response was not being written to the local database. When interacting through the UI, the refusal response is presented to the user but does not persist in the Workspace Chats. We set up a test to validate this observation. We ran the exact same queries and workspace configuration side by side comparing the April vs. June builds. With the same query, model, and workspace configuration the April build returns a refusal response via the API and persists to the local db, while the June version does not. Can we bring back this feature? I believe it is a very valuable analytical capability of the ALLM platform.
yindo added the enhancementfeature request labels 2026-02-22 18:23:09 -05:00
yindo closed this issue 2026-02-22 18:23:09 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jun 17, 2024):

The refusal from the LLM itself, from the perspective of AnythingLLM, is a chat response.
We did add "Custom Chat refusal response" as a property of the workspace. Are you saying that when you get these refusals the chat is not stored and you would like to keep these prompt/responses as well? They are currently omitted from chat history and are not saved.

@timothycarambat commented on GitHub (Jun 17, 2024): The refusal from the LLM itself, from the perspective of AnythingLLM, is a chat response. We did add "Custom Chat refusal response" as a property of the workspace. Are you saying that when you get these refusals the chat is not stored and you would like to keep these prompt/responses as well? They are currently omitted from chat history and are not saved.
Author
Owner

@santini-cyber commented on GitHub (Jun 18, 2024):

Yes, that is correct. I would like the prompt/refusal response sequences to be persisted. I think they provide valuable analytical data points. Especially when automating analytical functions via the API.

@santini-cyber commented on GitHub (Jun 18, 2024): Yes, that is correct. I would like the prompt/refusal response sequences to be persisted. I think they provide valuable analytical data points. Especially when automating analytical functions via the API.
Author
Owner

@santini-cyber commented on GitHub (Jun 25, 2024):

I built and tested a new version of ALLM yesterday. The refusal responses are persisted in local db storage and accessible via "Workspace Chats". When I attempt to export via /api/v1/workspace/{workspace}/chats endpoint, the refusal responses are not returned. Would it be possible to allow refusal responses to be returned from this api endpoint?

@santini-cyber commented on GitHub (Jun 25, 2024): I built and tested a new version of ALLM yesterday. The refusal responses are persisted in local db storage and accessible via "Workspace Chats". When I attempt to export via /api/v1/workspace/{workspace}/chats endpoint, the refusal responses are not returned. Would it be possible to allow refusal responses to be returned from this api endpoint?
Author
Owner

@timothycarambat commented on GitHub (Jun 25, 2024):

We exclude the refusals from being included in the /chats because then they would be part of the history and would use tokens/impact chat results since they would persist in the history during a prompt session

@timothycarambat commented on GitHub (Jun 25, 2024): We exclude the refusals from being included in the `/chats` because then they would be part of the history and would use tokens/impact chat results since they would persist in the history during a prompt session
Author
Owner

@santini-cyber commented on GitHub (Jun 25, 2024):

Thank you for your response @timothycarambat . I get it from an economic perspective. I feel like as the language models mature and continue to expand their intelligence, the refusal responses will be valuable context for the AI. For example they would provide a holistic perspective on human patterns of inquiry which could then be used to provide more helpful responses.

@santini-cyber commented on GitHub (Jun 25, 2024): Thank you for your response @timothycarambat . I get it from an economic perspective. I feel like as the language models mature and continue to expand their intelligence, the refusal responses will be valuable context for the AI. For example they would provide a holistic perspective on human patterns of inquiry which could then be used to provide more helpful responses.
yindo changed title from [FEAT]: Persist query mode refusal responses as chat history to [GH-ISSUE #1696] [FEAT]: Persist query mode refusal responses as chat history 2026-06-05 14:39:01 -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#1110