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

[Bug]: Langfuse Integration counts Embedding Response as Output Tokens #4225

Closed
hburrichter opened this issue Jun 16, 2024 · 0 comments · Fixed by #4226
Closed

[Bug]: Langfuse Integration counts Embedding Response as Output Tokens #4225

hburrichter opened this issue Jun 16, 2024 · 0 comments · Fixed by #4226
Labels
bug Something isn't working

Comments

@hburrichter
Copy link
Contributor

What happened?

The Langfuse integration currently counts the embedding response (the vector data) as output tokens of the observation. These vectors are quite large, often around 30,000 tokens for an OpenAI text-embedding-3-large embedding vector. This overshadows the actual generated output tokens (from completion models) of the entire trace, making it difficult to see how many tokens were genuinely generated, especially in the trace list view.

I do not believe displaying the entire embedding vector as the output provides any value in the Langfuse UI. At the very least, the output vector should not count towards the total used tokens for this particular observation and the whole trace.

Here is a screenshots that shows this problem.

Screenshot 2024-06-16 at 15 31 47

Relevant log output

No response

Twitter / LinkedIn details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant