Skip to main content
Export your evaluation history, and you can explain and measure every answer in your own systems, long after the documents it read have changed. Each line of an export is one answer: the exact inputs, the question version, the engine version and the outcomes. Brussle keeps each evaluation that it makes, with the compiled context that the engine read. On the Scale plan, you can export this history to files that you download and keep. Say your finance team asks for each answer of settles, which matches each payment to the open invoice that it settles (match one record to another), from July to September. You export the evaluations in that range, and each comes with:
  • its context: the payment’s fields, and the invoices that it read
  • its answer
  • the judgment version: the version of the question
  • the engine version
  • the outcomes joined to it, such as the invoice that your team recorded
The dashboard also exports the audit log as CSV. Exports are included in Scale and never billed (an export uses no judgments and scans no bytes, and the files are not stored bytes). An export request below Scale returns plan_required (HTTP 402).

Export evaluations

An export is a job:
  1. Start the export for a namespace.
  2. Poll the job until its status is done.
  3. Download each file in export.files.
The examples export acme/prod, which needs a key whose scope covers acme/prod (such as acme/*), since the key you got at sign-up cannot reach it, and only an organization with a card on file can create one that does (get an API key).
POST /namespaces/{ns}/evaluations/exports takes:
  • since: the earliest created_at to export, which the range includes. The default is 30 days before until.
  • until: the end of the range, which the range does not include. The default is now, and Brussle uses now in place of a later time.
  • judgments: export only these judgments. Leave it out to export each judgment that has evaluations in the namespace, deleted judgments included.
{} exports the last 30 days of each judgment. One export includes at most 366 days, so a longer history takes more than one export. Start an export with a read_write key whose scope includes the namespace. Your audit log records the start as job.create. The job is GET /jobs/{id} with type: "evaluation_export". While it runs, progress.documents_done and export.evaluations count the evaluations written so far, and you can pause, resume and cancel it like any job. When it is done, export.files lists its files:
  • Each link works for one hour. A link needs no API key, so you can give it to the tool that downloads the file. Links are on the API’s own host (https://api.brussle.com/v1/downloads/...), so a network that reaches the API also reaches the links. To get new links, read the job again.
  • Sometimes Brussle cannot make links. The job still reads done and lists its files, but their url and url_expires_at are null, and links_unavailable says so, with a request id to give to support. The files are not affected, so read the job again later.
  • Brussle keeps files for 7 days after it writes them. expires_at is the time that Brussle deletes the first file. After that time, the job lists no files, and you must start a new export.
  • A file holds up to 100,000 evaluations. An export writes at most 1,000 files, and one that needs more fails with an error that says so. Make the time range smaller, or export fewer judgments at a time.
  • An export runs in the background, so a large export can take some time. An export that something stops continues from where it stopped. Brussle also deletes a namespace’s exports when you delete the namespace.

What a file holds

Each file is gzipped JSON Lines, and each line is one evaluation as GET /namespaces/{ns}/evaluations/{id} returns it, plus the outcomes joined to it. Most tools read the file with no change (BigQuery, Snowflake and Athena load .jsonl.gz files directly), and gunzip -c 00001.jsonl.gz | jq . shows the content.
The example shortens context. A real context holds each field and each invoice that the recipe names.
  • context is the exact compiled context that the engine read. Each image in it is a reference, never the image’s bytes (the reference that the document held when the engine read the image, or {"digest": "sha256:...", "omitted": ...} when the engine did not read it), and images are only at image paths such as images.photo. Get the bytes with GET /namespaces/{ns}/images/{digest}, and each read is billed as bytes_scanned. The images of deleted documents stay readable until you delete the namespace or erase the image, so keep a copy of an image’s bytes to keep it after that. An image erased before the export was written has "erased": true on its reference. An export written before the erasure holds only the reference, never the bytes, so it does not change.
  • related_documents, for a judgment with relations, lists each other document that the engine read, with its revision at that time.
  • output is the raw numbers of the answer: p, value, dist, escape_p, score or parts. Brussle applies thresholds and the correction when you read answers, so the export holds what the engine said. For a judgment with features, an answer’s p is the fit applied to output.p and features, and for a composite it is the fitted weights applied to parts and features.
  • raw is the engine’s answer to this judgment alone, in the shape of output. raw holds the same numbers as output when the evaluation called the engine. For a composite judgment, both hold parts (the p of each part). raw is null in two cases:
    • A failed evaluation has no answer.
    • A reuse evaluation did not call the engine, because only the judgment’s features changed. It uses the engine’s answer from the evaluation that its engine_answer_from names. output holds that answer, and context is the context of that evaluation.
  • judgment_version is the version of the judgment (the question) that made the evaluation, so group the lines by judgment_version to keep the answers of different questions apart.
  • engine_version is the epoch in which Brussle made the evaluation, engine names the engine, and model_id is the model string the provider reported, or null. Each engine numbers its own epochs, so read the two together. Each epoch gets its own fit (when the engine changes).
  • outcomes are the outcomes that the correction joins to this evaluation: posted outcomes, outcomes from your outcome rules (source: "rule") and labels from the labelling queue ("queue"). Implicit negatives are not listed, because they are inferred, not recorded. The list is empty when no outcome joins.
  • The export includes each evaluation:
    • failed evaluations, with their error
    • shadow evaluations from shadow reports, with shadow: true (a shadow evaluation made no answer)
    • replays after an engine change, with replay_of set and context: null (the context is in the evaluation that replay_of names, and a replay made no answer)
    • evaluations of documents that someone deleted since then
  • Files are in no order. Sort by created_at if you need an order.
  • Rarely, an evaluation appears twice. A duplicate comes from Brussle reorganizing the history while the export ran. id is unique, so keep one line for each id.

Export the audit log

The dashboard’s Audit page lists your organization’s audit events on each plan, and on Scale, Export CSV downloads the events that match the page’s filters. The CSV has each event’s time, actor, action, target, and the values before and after.

After a downgrade

A downgrade takes effect at the start of the first billing period that starts at least 30 days after you ask for it (changing plan). Below Scale:
  • Brussle refuses new exports with plan_required.
  • The audit log’s CSV export is not available.
  • You can still download the files of an earlier export until Brussle deletes them.
  • The audit log stays in the dashboard.