Langfuse: see what your AI app did
Your AI app gave a strange answer. What actually happened? Langfuse is software that sits beside your apps, and keeps a record of what they asked.
Chapters
- 0:00Introduction
- 0:05Where this fits: The AI stack
- 0:12The idea: A trace
- 0:20Together: Sessions and users
- 0:29Why use it: Find the fault
- 0:41In our stack: From your gateway
- 0:57Be careful: Which version?
- 1:11The current version: More parts
- 1:23Privacy: Records hold your words
- 1:38Wrap up
Read the transcript
Introduction
Your AI app gave a strange answer. What actually happened?
Where this fits: The AI stack
Langfuse is software that sits beside your apps, and keeps a record of what they asked.
The idea: A trace
A trace is the record of a request and its steps. It can show a document search, the call to the model, and what came back.
Together: Sessions and users
A session groups the steps of one conversation or task. You can also label records with a user, to see who used what.
Why use it: Find the fault
Use it to see which step went wrong, how long steps took, and how many tokens were used. Langfuse also has tools for prompts and testing answers. What you get depends on your version.
In our stack: From your gateway
In our stack, LiteLLM is the gateway, and it sends Langfuse a record of each request. It needs a pair of keys, and your Langfuse address. LiteLLM's guide says that without an address, it uses Langfuse's cloud.
Be careful: Which version?
Version two has reached end of life, with no security fixes. Don't start a new setup on it. Today's LiteLLM instructions are for newer Langfuse, and their new method doesn't work with version two.
The current version: More parts
The current version needs more to run: two Langfuse services, PostgreSQL, ClickHouse, Redis, and file storage. Check your machine has room before you add it.
Privacy: Records hold your words
These records can hold your questions and answers. So limit who can sign in, and keep it off the internet. Hide sensitive text in your app before it's sent. The current version also sends usage statistics, which you can turn off.
Wrap up
Langfuse shows what happened. Guard what it records.
Sources
- langfuse.com/docs
- langfuse.com/self-hosting
- langfuse.com/self-hosting/upgrade/versioning
- langfuse.com/self-hosting/security/telemetry
- docs.litellm.ai/docs/observability/langfuse_integration
- docs.litellm.ai/docs/proxy/logging
- github.com/langfuse/langfuse/blob/main/LICENSE