Warning when an input prompt was truncated in Ollama #378
Unanswered
agatheblues
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Thanks for the great library. I am trying to find out what's a good way to warn the developer when Ollama truncated their input prompt. We are currently at a time where we want to evaluate whether our prompts are efficient, and not knowing that the prompt was truncated seems like an oversight!
So far the most reliable way seems to be running ollama with
ollama serve
and look for logs like:But that feels quite easy to miss. Of course I can increase the
num_ctx
to a number large enough that it would be very unlikely that we reach the limit but I am still interested in how one would solve the problem :)Some ideas:
prompt_eval_count
that is return with the message? If the metric could be compared to whatevernum_ctx
was supplied?Am I missing something obvious? Or maybe this is actually very hard to solve and looking at ollama's logs is still the best approach. Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions