[GH-ISSUE #612] [langgraph]: How can I cache the answer only under a certain condition, such as when the client likes the answer? #97

Open
opened 2026-02-17 17:19:10 -05:00 by yindo · 0 comments
Owner

Originally created by @tranhuuan170302 on GitHub (Sep 21, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/612

Type of issue

question

Language

Python

Description

In our agentic AI system, we want to implement a caching mechanism that stores answers only when they meet specific conditions. The main condition is based on client feedback: if a client explicitly likes or approves an answer, then it should be cached. This ensures that only high-quality, user-approved responses are reused in future interactions. By filtering cached results through feedback, we can avoid storing incorrect or low-value answers. The cache will be checked before running agents, so if a similar query appears again, the approved answer can be returned immediately. This approach reduces computational cost, improves response speed, and increases consistency across sessions. Ultimately, the goal is to make the system more efficient while ensuring that cached answers remain reliable and trustworthy.

Note: This system involves multiple agents, where each node in the workflow is an agent, and the orchestration is managed using LangGraph.

Originally created by @tranhuuan170302 on GitHub (Sep 21, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/612 ### Type of issue question ### Language Python ### Description In our agentic AI system, we want to implement a caching mechanism that stores answers only when they meet specific conditions. The main condition is based on client feedback: if a client explicitly likes or approves an answer, then it should be cached. This ensures that only high-quality, user-approved responses are reused in future interactions. By filtering cached results through feedback, we can avoid storing incorrect or low-value answers. The cache will be checked before running agents, so if a similar query appears again, the approved answer can be returned immediately. This approach reduces computational cost, improves response speed, and increases consistency across sessions. Ultimately, the goal is to make the system more efficient while ensuring that cached answers remain reliable and trustworthy. **Note**: This system involves multiple agents, where each node in the workflow is an agent, and the orchestration is managed using LangGraph.
yindo added the langgraphexternal labels 2026-02-17 17:19:10 -05:00
yindo changed title from [langgraph]: How can I cache the answer only under a certain condition, such as when the client likes the answer? to [GH-ISSUE #612] [langgraph]: How can I cache the answer only under a certain condition, such as when the client likes the answer? 2026-06-05 17:25:03 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#97