Laava LogoLaava

Why we use Langfuse in every AI project we build

Alec Siemerink
AI observability and engineering

Most teams building AI applications spend their time on the visible parts: models, prompts, orchestration frameworks, maybe a polished demo UI.

That makes sense at the start. You want to get something working. But the moment an AI system starts touching real business workflows, the problem changes completely.

Now it has to process actual documents, handle edge cases, call tools, retry failures, pass data between services, stay within budget, and produce outputs that are not just plausible, but useful and auditable.

That is where most AI projects stop being exciting and start becoming engineering.

At Laava, that is exactly the point where we want to begin.

AI systems are much harder to debug than traditional software

In traditional software, when something breaks, you inspect logs, traces, inputs, outputs, and system state. You follow the execution path, find the failure, patch it, and move on.

LLM applications do not give you that for free. They are non-deterministic by nature. A prompt change that improves one edge case can quietly damage another. A retrieval problem can look like a model problem. A tool timeout can look like bad reasoning. Costs can creep up without anyone noticing until usage grows.

Without proper observability, teams end up debugging by intuition. Someone thinks the model got worse. Someone else blames the prompt. Somebody suspects retrieval. Nobody has enough evidence to know what actually happened.

That is not a sustainable way to run AI in production.

Observability is part of the architecture

We do not treat observability as something you add later once the system is live. For us, it is part of the design from day one.

If an AI system can influence a workflow, extract data from a document, trigger a downstream action, or present outputs that matter to users, we want to be able to answer a few basic questions immediately:

  • What exactly happened during this request?
  • Which prompt version was used?
  • What context was retrieved?
  • Which tools were called?
  • Where did latency accumulate?
  • What did it cost?
  • Why did the output fail, succeed, or degrade?
  • Can we compare this run to previous runs?
  • Can we measure whether the system is getting better over time?

If you cannot answer those questions, you do not have a production system. You have a black box with a good demo.

Why Langfuse

There are plenty of ways to log model calls. That is not the bar. What we need is a system that helps us observe, evaluate, and improve AI applications as engineered systems, not just as isolated prompts.

That is why Langfuse fits us well.

  • Full workflow tracing instead of only prompt logging
  • Nested spans and observations for retrieval, tools, validations, retries, and model calls
  • Prompt management with versioning and labels
  • Prompt-to-trace linkage so changes can be tied back to real outcomes
  • Evaluation support through custom scores, user feedback, human review, and model-based evaluation workflows
  • Cost, token, and latency tracking at the trace level
  • An OpenTelemetry foundation that fits modern engineering stacks
  • Open source and self-hostable deployment options for more control

That combination matters because production AI is not one prompt and one response. It is a workflow. And workflows need visibility.

How we use Langfuse in practice

We do not build isolated chat demos. We build end-to-end AI systems that sit inside workflows. That means observability has to span the whole path.

End-to-end request tracing

For each meaningful AI request, we want one clear trace of the full flow: the incoming trigger, relevant metadata, preprocessing or parsing, retrieval and context assembly, the model interaction itself, tool or function calls, validation or business-rule checks, and the final output or downstream action.

When something goes wrong, we do not want to reconstruct the event from five services and a vague Slack message. We want to inspect the run directly.

Agent workflows as nested execution paths

As soon as an application becomes even slightly agentic, observability gets harder and more important. One request can now include planning, multiple tool calls, retries, intermediate summaries, handoffs between components, and validation passes before a final action.

We represent those steps as nested traces and spans so the workflow stays legible. This is crucial because agentic systems fail in ways that are otherwise annoying to diagnose. A final output may look poor, but the root cause may be one bad tool result fifteen steps earlier.

Prompt versioning tied to real outcomes

Prompts are operational logic. They evolve quickly. They need versioning, comparison, and controlled rollout. When we iterate on prompts, we want to understand which version was used, in which environment, on what workload, and with what quality, latency, and cost profile.

Prompt management gets much more useful when it is connected to real production traces instead of handled as isolated text editing.

Cost and performance monitoring by workflow

Not every AI flow deserves the same model, the same prompt complexity, or the same latency budget. By tracking cost and latency at the trace level, we can see which workflow is expensive, which version got slower, where retries are hurting throughput, and where architecture changes matter more than prompt changes.

Evaluation hooks, not blind iteration

Observability tells you what happened. Evaluation tells you whether it was good. You need both.

The exact setup differs per project, but the principle stays the same: changes should be testable and quality should be measurable. Otherwise every improvement is just a claim.

Why we use this approach across all projects

The specifics vary. One system may process documents. Another supports internal operations. Another orchestrates a multi-step backoffice workflow. Another combines retrieval, reasoning, and system actions.

But the operational needs are surprisingly consistent. Across all of them, we need to know what happened, why it happened, what it cost, whether it was good, and whether the last change improved or degraded the system.

That is why we do not treat Langfuse as a project-specific add-on. We treat it as part of the standard stack for serious AI delivery.

The bigger point

The easiest part of AI is getting something impressive to happen once. The hard part is building a system that keeps working, keeps improving, and can be trusted when it touches real operations.

That requires more than a good model. It requires observability, evaluation, discipline, and the willingness to treat AI as infrastructure.

That is why we use Langfuse in every AI project we build. Not because observability is trendy. Because if an AI system matters, you need to be able to see what it is doing. And if you want to improve it, you need more than intuition.

AI is easy to demo. Hard to operate. Langfuse helps us operate AI systems properly.

Why we use Langfuse in every AI project we build | Laava Blog | Laava