Welcome to Portkey Forum

Updated 11 months ago

Occasionally Receiving 3k Tokens with Line Breaks as Output

I wrote a prompt today, which gives me occassionally 3k tokens full of line breaks as output (the prompt is supposed to create this much as text). Is it possible to understand if this was the original OpenAI output? I used the Portkey SDK in python, but saw the same results in portkey evals. It only happens sometimes.
V
e
r
12 comments
Possible to share the trace id over DM? Can investigate if it's something to do with Portkey. In general, Portkey doesn't even touch the actual output - so whatever you see either on the playground or elsewhere is the actual LLM output.
Sure, I'll DM you, maybe you can have a look. Never seen this kind of output from OpenAI before.
Can you check the log for this? The JSON view would contain the exact response sent from OpenAI
I did, it is the same - 4k of empty lines and line breaks. Retrying helps, but I would still pay for the tokens. I am not really sure how that happens.
I'd suggest trying it out on the OpenAI playground once and see if it works there
might be a miss from the model then.. let us know if you see this happening often
Well, it is difficult to pinpoint because it happens only sometimes and retrying the exact same prompt gives me normal results next time. Today I had it only twice out of about 20 runs. But it does happen relatively regularly.
I’d suggest taking the full input text and trying it out on OpenAI directly, removing Portkey. That way we can pinpoint and see if it’s a prompt engineering problem - which I have a hunch it is!
Well, my theory is that I am creating something like a memory overload on OpenAI's side because I am requiring large input and large output as well. There is no indication in the prompt that would yield line breaks as the output. But I also understand that it is not Portkey doing anything here.
Hmmm.. maybe it's useful to post this on the OpenAI forum once? https://community.openai.com/

I tried to have a cursory look if someone else had shared a similar issue, but couldn't find it
The issue seemed to have been temporary. I had now about 70 runs in a row where it didn't occur anymore for the last 1,5 days without changing anything.
Add a reply
Sign up and join the conversation on Discord