Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt caching #17

Open
calimbrasti94 opened this issue Oct 3, 2024 · 4 comments
Open

Prompt caching #17

calimbrasti94 opened this issue Oct 3, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@calimbrasti94
Copy link

calimbrasti94 commented Oct 3, 2024

Hello! I was thinking that this beautiful and very useful plugin could benefit from prompt caching, for eligible providers.

As for me, I often send the same big note or several notes to llm.

I may have stated the obvious by seeing the last point of the roadmap.

@ECuiDev ECuiDev added the enhancement New feature or request label Oct 3, 2024
@ECuiDev
Copy link
Owner

ECuiDev commented Oct 3, 2024

Are you reusing the same note(s) and generating the same number and types of questions? Or just keeping one of the two the same?

@calimbrasti94
Copy link
Author

the first one. i often use the same note/notes at least three times, because of the size and the low number of questions i request in output, i send it/them multiple times. although sometimes I change the type of questions I ask (t/f, Mcq..).

@ECuiDev
Copy link
Owner

ECuiDev commented Oct 4, 2024

I see. I'll add prompt caching in one of the next three releases.

Also, I haven't checked with the other providers yet but at least for OpenAI, prompts should already be cached if you're generating the same questions with the same notes using either of the 4o models. I ran a small test just now and you can see some tokens were cached on the second generation.

image

@calimbrasti94
Copy link
Author

Oh great! It was just in relation to OAI's announcement of prompt caching that I had thought of this. Also I always feel that the questions generated by Sonnet-3.5 are better compared to gpt4o.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants