WorkLensDocs
    Studio
    tool

    score_realism

    Does the generated data have the shape of a REAL sample? Compares column kinds, blank rates, variety and magnitudes, never values. Pass the sample's path on…

    Last updated 2026-09-13 · Generated from mcp-schemas/tools/09-score_realism · Markdown

    Summary

    Does the generated data have the shape of a REAL sample? Compares column kinds, blank rates, variety and magnitudes, never values. Pass the sample's path on this machine, not its contents. Whether the data follows its recipe is prove_recipe.

    Agentcalls
    score_realismProve
    Resultas data

    Inputs and outputs

    Goes in
    • schema (string, required) — The recipe as a JSON string.
    • original_path (string, required) — Path to a real sample (csv, xlsx, json or xml), absolute or relative to the server. Read locally; its values never enter the reply.
    • entity (string) — The generated table the sample corresponds to. Default: the first.
    • n_rows (number) — see the input schema
    • seed (number | string) — As in generate_from_graph.
    • scenario (string) — see the input schema

    When to call it

    Realism is the one question a recipe cannot answer about itself: does the generated data have the shape of the real thing? Column kinds, blank rates, variety and magnitudes are compared on value-free profiles.

    The sample is named by path and read on this machine. Its values never enter the conversation or the reply - only counts and the file's name do.

    Whether the data follows its own recipe is a different question, answered by prove_recipe, whose passed gate checks every rule on every value. (Until 2026-09-17 this tool answered that one, by averaging.)

    Example request

    {
      "_comment": "Twenty invoices compared with the shape of an eight-row sample on disk - its path is sent, never its values.",
      "name": "score_realism",
      "arguments": {
        "schema": {
          "pack_manifest": {
            "name": "au-invoice",
            "version": "1.0.0",
            "provides": [
              "domain:au-invoice"
            ],
            "owner": "worklens"
          },
          "project": "au-invoice",
          "region": "AU",
          "entities": [
            {
              "name": "invoice",
              "rows": 50,
              "fields": [
                {
                  "name": "invoice_id",
                  "type": "id",
                  "unique": true
                },
                {
                  "name": "abn",
                  "type_def": {
                    "pattern": "N##########",
                    "checksum": {
                      "algorithm": "weighted_mod",
                      "weights": [
                        10,
                        1,
                        3,
                        5,
                        7,
                        9,
                        11,
                        13,
                        15,
                        17,
                        19
                      ],
                      "modulus": 89,
                      "check_digit": "last",
                      "remainder_from": "zero",
                      "first_digit_offset": -1
                    },
                    "display": "## ### ### ###",
                    "defects": {
                      "invalid": {
                        "at": 1,
                        "replace_with": "0",
                        "breaks": "checksum",
                        "note": "One digit off, so the mod-89 sum fails. Declared here rather than written into the engine."
                      }
                    }
                  },
                  "sensitivity": "pii"
                },
                {
                  "name": "customer_name",
                  "type": "person.fullName",
                  "sensitivity": "pii"
                },
                {
                  "name": "billing_address",
                  "type": "address.full",
                  "sensitivity": "pii"
                },
                {
                  "name": "issue_date",
                  "type": "date"
                },
                {
                  "name": "subtotal",
                  "type": "finance.amount",
                  "min": 50,
                  "max": 5000
                },
                {
                  "name": "gst",
                  "type": "finance.amount",
              

    Truncated for the page; the full request sits beside the tool’s schema in the repository.

    Example response

    {
      "contract_version": 3,
      "overall": 97,
      "values_checked": 9,
      "metrics": [
        {
          "label": "Types preserved",
          "status": "red",
          "detail": "8 of 9 — columns kept their original kind",
          "pass_rate": 0.8888888888888888,
          "checked": 9
        },
        {
          "label": "Null-rate matches",
          "status": "green",
          "detail": "9 of 9 — blank rates close to the original",
          "pass_rate": 1,
          "checked": 9
        },
        {
          "label": "Cardinality preserved",
          "status": "green",
          "detail": "9 of 9 — value variety close to the original",
          "pass_rate": 1,
          "checked": 9
        },
        {
          "label": "Distribution similar",
          "status": "green",
          "detail": "3 of 3 — numeric ranges resemble the original",
          "pass_rate": 1,
          "checked": 3
        }
      ],
      "compared_with": {
        "file": "invoices.csv",
        "format": "csv",
        "bytes": 1050
      }
    }

    Same step