zilliztech / GPTCache

Semantic cache for LLMs. Fully integrated with LangChain and llama_index.
https://gptcache.readthedocs.io
MIT License
7.09k stars 502 forks source link

[Feature]: Query the frequency of hits for a cached search #455

Closed Adam-Gibbs closed 1 year ago

Adam-Gibbs commented 1 year ago

Is your feature request related to a problem? Please describe.

I would like to track how often searches for specific terms happen to be asked for

Describe the solution you'd like.

Simply tracking them by iterating a value in the scalar store tied to the gptcache_question table, perhaps a column for hits. I can then implement a custom data view that grabs the questions and their hit counts.

Describe an alternate solution.

No response

Anything else? (Additional Context)

No response

SimFG commented 1 year ago

Thank you for your suggestion. I am currently planning to implement it in the next version.

SimFG commented 1 year ago

@Adam-Gibbs I have added a report table in the v0.1.35 version, and you can use it to analyze the cache data.