QA over cache database #604

Closed
opened 2026-02-21 17:27:44 -05:00 by yindo · 1 comment
Owner

Originally created by @Yash-1511 on GitHub (Oct 19, 2023).

Originally assigned to: @takatost on GitHub.

Description of the new feature / enhancement

Pattern to store the user's question and answer into some cache DB and build the Cached capability to improve the performance of the system. This is a pattern that can be used for any other use-case as well.

Scenario when this would be used?

  1. Cache Selection: Choose a cache database like pinecoin or chromadb.
  2. Key-Value Structure: Use user questions as keys and answers as values.
  3. Query Cache: Check if the question is in the cache before processing.
  4. Cache Hit: If the answer is in the cache, return it for faster response.
  5. Cache Miss: If not in the cache, generate and store the answer.
  6. Cache Invalidation: Set rules to remove outdated entries.
    It is used for less calls of LLMs. Question arrives then perform similarity search with our cache DB if answer is present the give it to user else call LLM API.

Supporting information

No response

Originally created by @Yash-1511 on GitHub (Oct 19, 2023). Originally assigned to: @takatost on GitHub. ### Description of the new feature / enhancement Pattern to store the user's question and answer into some cache DB and build the Cached capability to improve the performance of the system. This is a pattern that can be used for any other use-case as well. ### Scenario when this would be used? 1. Cache Selection: Choose a cache database like pinecoin or chromadb. 2. Key-Value Structure: Use user questions as keys and answers as values. 3. Query Cache: Check if the question is in the cache before processing. 4. Cache Hit: If the answer is in the cache, return it for faster response. 5. Cache Miss: If not in the cache, generate and store the answer. 6. Cache Invalidation: Set rules to remove outdated entries. It is used for less calls of LLMs. Question arrives then perform similarity search with our cache DB if answer is present the give it to user else call LLM API. ### Supporting information _No response_
yindo added the 💪 enhancement label 2026-02-21 17:27:44 -05:00
yindo closed this issue 2026-02-21 17:27:44 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 15, 2023):

Close due to it's no longer active, if you have any questions, you can reopen it.

@github-actions[bot] commented on GitHub (Nov 15, 2023): Close due to it's no longer active, if you have any questions, you can reopen it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#604