Building applications based on Large Language Models (LLMs) brings unique challenges. Unlike traditional software, where code works deterministically, LLM responses are probabilistic. This means that the same prompt can lead to different behavior at different times. To get a grip on this unpredictability, specialized tooling is indispensable. In this guide, we discuss the different categories of LLM observability, what they solve, and how to choose them for your project.
Are you looking for broader tools for developers or software testing? Then also check out our overview of AI tools for developers and our guide on AI tools for testing and debugging. For a broader perspective on RAG implementations, you can visit leren.llmnet.nl.
Why is LLM Observability Different?
Traditional Application Performance Monitoring (APM) such as Datadog or New Relic focuses on CPU usage, memory leaks, database queries, and HTTP status codes. For LLM applications, these metrics are not enough. An API call can be technically successful (HTTP 200 OK), while the generated response is factually incorrect, contains hallucinations, leaks sensitive data, or does not meet the desired tone of voice.
LLM observability fills this gap by zooming in deeply on the semantic content of the communication between the application and the language model.
The Five Main Categories of LLM Tooling
The landscape of observability tools can be divided into five main categories, each with its own focus within the lifecycle of an AI application.
1. Tracing of Prompts and API Calls
What it solves: Complex LLM applications often use chains, agents, and multiple sequential steps (such as in Retrieval-Augmented Generation or RAG). If something goes wrong, it is difficult to trace where in the chain the error occurred. Tracing captures the full lineage of a request: from the initial user query to the final output, including intermediate system prompts, retrieved context from vector databases, and tool calls.
- Open-source options: OpenInference, Langfuse (open-source core), Arize Phoenix.
- Hosted options: LangSmith, HoneyHive, Braintrust.
2. Evaluation and Dataset Tooling
What it solves: How do you know if a change in your prompt or an update of a model version (for example, from GPT-4o to a newer alternative) improves or worsens the quality of your output? Evaluation tools use test sets and 'LLM-as-a-judge' mechanisms to automatically measure the accuracy, relevance, and safety of responses.
- Open-source options: DeepEval, Ragas, Promptfoo.
- Hosted options: Braintrust, Arize Phoenix (enterprise tier).
3. Cost Monitoring and Token Analysis
What it solves: LLM usage can quietly become exponentially expensive due to inefficient prompts, excessively large context windows, or infinite loops in agents. Cost monitoring tracks how many tokens (input and output) are consumed per user, session, endpoint, or model, and what the actual costs are in euros or dollars.
- Open-source options: LiteLLM (including budget tracking), Portkey (open-source gateway).
- Hosted options: Langfuse, Helicone, various cloud-native dashboards.
4. Prompt Management and Versioning
What it solves: Prompts are essentially the 'source code' of an LLM app, but they are often hardcoded in the application. Prompt management tools separate prompts from the codebase, allowing product teams and domain experts to modify, test, and version prompts without requiring a developer deployment.
- Open-source options: Langfuse Prompts, Cloud-native CMS solutions.
- Hosted options: Padel, LangSmith Prompt Hub, PromptLayer.
5. Gateways and Security Proxies
What it solves: Before a prompt reaches the model, or before the response goes to the user, you want to intervene in case of abuse, data leaks (PII), or prompt injection attempts. AI gateways act as a proxy handling caching, rate limiting, load balancing between different providers, and security filtering.
- Open-source options: LiteLLM Proxy, Portkey, Cloudflare AI Gateway (free basic version).
- Hosted options: Martian, Lakera Guard, Portkey Cloud.
What is the bare minimum you need for a small project?
When starting a small-scale project or prototype, it is wise to keep the overhead low. You usually only need:
- A simple tracer / cost monitor: To see what your models are doing and what it costs. A tool like Langfuse (self-hosted or via their cloud) covers this immediately.
- Basic logging in code: In an early stage, store incoming prompts and outgoing results in your own database if you do not want to set up an external tool yet.
Complex evaluation pipelines and dedicated AI gateways are only truly necessary when your application goes to production, deals with hundreds of concurrent users, or has strict compliance requirements.
Open-Source versus Hosted Options
When selecting tooling, you face the choice between open-source (self-hosted) and hosted (SaaS) solutions.
| Dimension | Open-Source / Self-Hosted | Hosted Options (SaaS) |
|---|---|---|
| Privacy & Data | Maximum control; data does not leave your own infrastructure (essential for sensitive data). | Dependent on the provider; often SOC2 certified, but data flows through third parties. |
| Setup & Management | Requires knowledge of Docker, databases (such as PostgreSQL or ClickHouse), and maintenance. | Ready to use immediately; create an account, enter API key, and start. |
| Scalability | Self-managed and scalable as traffic increases. | Managed by the provider, scalable based on the chosen subscription. |
When is building it yourself sufficient?
Not every project justifies the adoption of an external observability suite. Building it yourself is perfectly sufficient in the following scenarios:
- Internal prototypes and experiments: If you are the only user, a simple
print()statement in your Python script or logging to a local JSON file is often more than enough. - Very limited API calls: If your application only occasionally calls an LLM and costs and error susceptibility are negligible, the benefits of extra tooling do not outweigh the integration time.
- Strict offline environments: In systems that are completely disconnected from the internet and where no external SaaS services may be used, you can deploy lightweight open-source libraries or simply write wrappers around your API calls that write data to an internal database.
Conclusion
LLM observability is not a luxury once your AI application outgrows the testing phase. By investing in good tracing, cost monitoring, and evaluation, you prevent unexpected cost spikes and guarantee the quality of your product. Start small with a lightweight tool or open-source option, and scale up to advanced gateways and evaluation frameworks as your user base grows.