Core Concepts at a Glance
ABVβs observability model has four main building blocks:| Concept | What It Is | When to Use | Example |
|---|---|---|---|
| Trace | Single request or operation | Every API call or workflow | User asks a question in your chatbot |
| Observation | Individual steps within a trace | Track specific operations | LLM call, database query, function execution |
| Session | Group of related traces | Multi-turn interactions | Entire conversation thread |
| Score | Evaluation metric | Measure quality or performance | Accuracy score, cost, latency |
Data Model Visualization
The following diagram shows how ABVβs core concepts relate to each other: Key relationships:- Sessions group multiple traces (one-to-many)
- Traces contain multiple observations (one-to-many)
- Observations can be nested hierarchically
- Scores evaluate traces, observations, or sessions
Traces and Observations
Traces
Atrace typically represents a single request or operation. It contains the overall input and output of the function, as well as metadata about the request ( i.e. user, session, tags, etc.).
Observations
Each trace can contain multipleobservations to log the individual steps of the execution. Usually, a trace corresponds to a single api call of an application.
Types
Events are the basic building blocks. They are used to track discrete events in a trace.
Spans represent durations of units of work in a trace.
Generations are spans used to log generations of AI models incl. prompts, token usage and costs.
Nesting
Observations can be nested to represent the hierarchical structure of your application. For example, a trace might contain a span for the entire request, which in turn contains a generation for an LLM call.
Sessions
Optionally, traces can be grouped into sessions. Sessions are used to group traces that are part of the same user interaction. A common example is a thread in a chat interface. Please refer to the Sessions documentation to add sessions to your traces.Scores
Scores are flexible objects used to evaluate traces, observations, sessions and dataset runs. They can be:- Numeric, categorical, or boolean values
- Associated with a trace, a session, or a dataset run (one and only one is required)
- For trace level scores only: Linked to a specific observation within a trace (optional)
- Annotated with comments for additional context
- Validated against a score configuration schema (optional)
Real-World Examples
Understanding how to apply ABVβs data model to different scenarios helps you instrument your application effectively.Example 1: Simple Chatbot
Example 2: RAG Pipeline
Example 3: Multi-Agent System
Related Docs
Now that you understand the data model, hereβs how to implement it:Python Quickstart
Start instrumenting your Python application
JS/TS Quickstart
Start instrumenting your JavaScript/TypeScript application
Sessions Guide
Learn how to group traces into sessions
Evaluations
Add scores to measure quality