← Vetro Attest · Free Art. 12/14 checker · Free EU AI Act tools
Audit log for Haystack pipelines
A Haystack pipeline wires components — retrievers, generators, rankers, tools — into a graph that runs on each request. For most Haystack apps the compliance question is a RAG question: what did the model see, and did it come from the corpus or from the model's own guessing.
What to record
- Which documents a retriever returned for a given query, and their source.
- Each generator call: model, prompt, response, token usage.
- Each tool call, if your pipeline includes a
Toolor agentic component: arguments and result. - The pipeline's own structure for that run, so a reviewer can see the order components executed in.
Capturing it: at the component level
Haystack does not ship a Vetro integration, and pipeline components vary enough between versions that wrapping the pipeline itself is fragile. The reliable place to record from is the client each component calls into: wrap the LLM client behind your Generator component with the Vetro core API, and wrap whatever a Tool component invokes the same way.
import { Vetro } from '@vetro/core';
import { wrapOpenAI } from '@vetro/openai';
const vetro = new Vetro();
const run = vetro.startRun({ name: 'rag-pipeline' });
const client = wrapOpenAI(openaiClient, run);
// use `client` in place of the raw client behind your generator component
Record retrieved documents explicitly with run.event('artifact', { kind: 'retrieval', ref: documentId, ... }) for each result, so the retrieval step is in the same ledger as the generation it fed — not a detail you have to reconstruct later from separate logs.
Haystack's own tracing
Haystack has built-in tracing hooks that can forward pipeline execution to an observability backend. If yours is configured with an OpenTelemetry exporter, that trace is a reasonable starting point (see OpenTelemetry GenAI traces as evidence), but check what it actually captures for your pipeline before relying on it — tracing coverage varies by component type and Haystack version.
Why retrieval matters for the audit
For a RAG system, Article 10 data governance is about the training and grounding data as much as the model. A retrieval record that survives review lets you show which documents informed which answer, which is usually the first thing an incident review asks for.
Check your own logs
Paste a Vetro ledger or an OpenTelemetry GenAI trace export into the free checker: it verifies integrity and shows which record-keeping obligations your evidence covers, in your browser. Unsure whether your pipeline counts as high-risk? Use the high-risk classifier. When you need something to hand to an auditor or a customer, Vetro Attest issues a countersigned EU AI Act report for 49 USD, one-off.
See a sample ledger verified in one click, check your own logs free or get the countersigned EU AI Act report.