Skip to main content
You can track the effect of changes to your LLM app on metrics in ABV. This allows you to:
  • Run experiments (A/B tests) in production and measure the impact on costs, latencies and quality.
    • Example: β€œWhat is the impact of switching to a new model?”
  • Explain changes to metrics over time.
    • Example: β€œWhy did latency in this chain increase?”

Releases

Releases in ABV
A release tracks the overall version of your application. Commonly it is set to the semantic version or git commit hash of your application. The SDKs look for a release in the following order:
  1. SDK initialization
  2. Environment variable
  3. Automatically on popular platforms

SDK initialization

Environment variable

The SDKs will look for a ABV_RELEASE environment variable. Use it to configure the release e.g. in your CI/CD pipeline.

Python SDK

Install packages
Add credentials and ABV_RELEASE environment variable: Add your ABV credentials to your environment variables. Make sure that you have a .env file in your project root.
.env
load environment variables and initialize client with get_client:
The Python SDK also allows you to set the release when initializing the client with client parameters:

JS/TS SDK

Install packages
**Add credentials and **ABV_RELEASE environment variable Add your ABV credentials to your environment variables. Make sure that you have a .env file in your project root and a package like dotenv to load the variables.
.env
Create a instrumentation.ts file that initializes the OpenTelemetry NodeSDK and registers the ABVSpanProcessor.
instrumentation.ts
Modify instrumentation.ts file to use dotenv package to load the variables. Additional parameters are provided to get trace visible in the UI immediately.
instrumentation.ts
Import the instrumentation.ts file at the top of your application.
index.ts
Instrument application The JS/TS SDK will look for a ABV_RELEASE environment variable. Use it also to configure the release e.g. in your CI/CD pipeline. If no other release is set, the ABV SDKs default to a set of known release environment variables. Supported platforms include: Vercel, Heroku, Netlify. See the full list of support environment variables for JS/TS and .

Versions


Versions in ABV
The version parameter can be added to traces and all observation types (span, generation, event). Thereby, you can track the effect of a new version on the metrics of an object with a specific name using ABV analytics.

With Python SDK

When using the @observe() decorator, version could be specified at both trace or observation levels:
When creating spans directly:
The version parameter can be included in both spans and generations, and can be set either during creation or updated later.

With JS/TS SDK

abv.trace(), abv.span() and abv.event() also take an optional version parameter.

In UI

Version parameter in ABV interface