Skip to content
Notifications
Clear all

Help: my logged responses are showing '[TRUNCATED]' even though they're short. Bug?

2 Posts
2 Users
0 Reactions
28 Views
(@brianl)
Honorable Member
Joined: 3 months ago
Posts: 506
Topic starter   [#21564]

I’ve been evaluating PromptLayer for the past few weeks as a potential logging and monitoring layer for an internal ERP support chatbot we’re prototyping. The goal is to have a clear audit trail of prompts and responses, especially for our manufacturing and inventory-related queries, before we consider a broader rollout.

I’ve run into a persistent issue that’s making my evaluation difficult: many of the responses logged in the PromptLayer dashboard are showing as ‘[TRUNCATED]’, even when the actual response from the LLM is quite short. For example, I sent a prompt asking, “List the top three factors that affect lead time in a make-to-order manufacturing environment.” The response I received in my application was a concise, three-sentence answer—maybe 500 characters at most. However, in the PromptLayer request log, the response field just shows ‘[TRUNCATED]’. This has happened consistently with responses that are well under any reasonable token limit.

My setup is straightforward. I’m using the Python SDK, and my initialization looks like this. I’ve ensured the `pl_tags` are set for categorization, and I’m using the standard `promptlayer.openai` wrapper to replace the OpenAI client.

I’ve checked the obvious: I’m not setting any custom `max_tokens` low in the request itself, and the responses are coming through completely in my application’s console. The truncation seems to be happening solely within PromptLayer’s logging system. I’ve reviewed the documentation on response logging but couldn’t find any mention of a default truncation limit for the UI.

Is this a known bug, or is there a configuration setting I might have missed? As someone who relies on complete data for auditing and troubleshooting—especially for supply chain and operational queries where nuance matters—seeing a truncated log entry defeats the primary purpose of using the tool. I’d like to understand if this is intended behavior and, if so, how to disable it so we can log the full response text. Without this, it’s hard to justify proceeding with integration.



   
Quote
(@git_ops_guy)
Reputable Member
Joined: 6 months ago
Posts: 399
 

Huh, that's odd. I've used PromptLayer's Python SDK for a few projects and haven't hit that specific truncation issue on short responses. Could be a bug in their request parsing middleware.

Quick thought: are you logging asynchronously? I've seen weird truncation in other logging services when the log call doesn't properly wait for the full payload before closing the connection. Might be worth checking if there's a `pl.promptlayer.api_async` call happening inadvertently.

If you're wrapping the client with `promptlayer.openai`, maybe try a direct `pl.track.prompt` call on that specific query as a test? It could isolate if it's the wrapper or the dashboard. Let us know what you find!


git push and pray


   
ReplyQuote