Skip to main content
Veritrix gives you deep visibility into LlamaIndex RAG pipelines, query engines, and agents from the moment you call trace.init(). Every query, document retrieval, re-ranking step, LLM synthesis call, and tool invocation is captured as a structured trace — so you can measure retrieval quality, diagnose slow queries, and understand exactly which steps contribute to latency and cost in your production pipelines.

Prerequisites

  • Python 3.9 or higher
  • An active Veritrix account and API key
  • LlamaIndex core installed

Installation & Setup

1

Install Veritrix and LlamaIndex

For additional LlamaIndex integrations (e.g., specific LLM providers or vector stores), install the relevant packages separately:
2

Initialize Veritrix tracing

Call trace.init() once at the top of your application, before you build any index or query engine.
3

Build and query your index as normal

Veritrix instruments LlamaIndex’s global settings and callback system automatically after trace.init(). No changes to your index or query engine code are needed.

Example: RAG Pipeline

The following example builds a simple in-memory vector index and runs a query against it. Veritrix traces the full retrieval-and-synthesis cycle, including the embedding call, retrieved nodes, and the final LLM call.

Example: LlamaIndex Agent with Tools

For agentic pipelines, Veritrix captures each reasoning step and tool call the agent makes before arriving at a final answer.

What Gets Captured Automatically

Retrieval traces include the actual document chunks returned for each query, making it easy to audit whether your index is surfacing the most relevant content.

OpenTelemetry Compatibility

Veritrix is built on OpenTelemetry. Every span it generates for your LlamaIndex pipelines is a fully compliant OTel span that can be exported to any OTel-compatible backend alongside your existing infrastructure telemetry.
To configure a custom OTel exporter or forward traces to an existing collector, see the OpenTelemetry integration page.