(uoft) Include chat history in semantic cache #27548
AntonioFerreras
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
I don't know how practical a semantic cache is beyond a first level of interaction. If it substantially increases recall, don't see how it doesn't happen at the expense of precision. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checked
Feature request
Semantic cache implementations such as the Upstash, Redis, and GPTcache do not have easy support to include chat history. This proposal would extend their functionality to have this crucial feature.
Motivation
LLM caches allow for repeat prompts to an LLM to be cached and reused to save wait time. The semantic cache increases cache hit rate by not only finding string-equivalent prompts, but semantically similar ones too.
However, there is a flaw in this, a single prompt may not capture the semantic meaning within a chat. Previous chat history is important to determine the response of the latest prompt. Here is an example:
Prompt: "Tell me a joke"
Response: "Why did the chicken cross the road, to get to the other side!"
Prompt: "I want car jokes"
Response: "--a car joke--"
Prompt: "tell me a joke"
Cached response: "Why did the chicken..."
Proposal (If applicable)
We are a team of 4 in CSCD01 at UTSC. We would like to know if this is a good idea to contribute!
Beta Was this translation helpful? Give feedback.
All reactions