Cookbook 04 · Build
Document-to-JSON Pipeline
Turn invoice documents into schema-checked JSON, and hold every invalid one for a second person to approve or reject.
BuildCore20–30 min
What you build. A workflow that reads one invoice from the
doc-intake bucket, extracts JSON with a deterministic python_code node, and checks it against a JSON Schema with a data_transform json_schema node. A valid record is written to doc-extracted under invoices/<invoice number>.json; an invalid one stops at review_gate, where a second person approves it (written under reviewed/) or rejects it (nothing is written). No model is called, so simulated and real providers give the same result.
Surfaces: Object Store Cookbooks Workflows Administration
What you learn
- Create the
doc-intakeanddoc-extractedbuckets, upload the 30 sample documents underincoming/and preview one in Object Store - Install the Document-to-JSON Pipeline cookbook as a paused draft from Cookbooks, then Resume it
- Run one document per queued run, with the object key as the run input, and read each step in the Execution Debugger
- See a duplicate invoice refused by the output bucket, and hold a document that fails the schema at an approval gate
- Approve and reject as the
revieweraccount; the account that started a run is refused (403) - Check what reached the output bucket: exactly 17 objects, and nothing for the rejected document
Implementation flow
flowchart LR
IN[("Bucket doc-intake: incoming/")] --> RD["read_document"]
RD --> EX["extract_fields: python_code"]
EX --> VS["validate_schema: JSON Schema"]
VS --> PK["package_result"]
PK --> RT{"route"}
RT -->|valid| EE["emit_extracted"]
EE --> WE[("write_extracted: doc-extracted/invoices/")]
RT -->|invalid| RG{{"review_gate: second person"}}
RG -->|approve and resume| WR[("write_reviewed: doc-extracted/reviewed/")]
RG -->|reject| FAIL["run fails, nothing written"]Step-by-step UI only
Each step shows the exact navigation path, the fields to fill, the button to click, and a snapshot of the CALIBER screen you'll be on.
Admin › Administration (Accounts), top bar › Create workspace, then Project accesscreates · account: reviewer, workspace: invoice-intake, member: reviewerCreate the second person, a workspace for the lab, and put them in it. On Administration enterrevieweras User ID andreviewer-pass-123as Password and click Create account. Click the + next to the workspace selector in the top bar, name the workspace, and click Create and select. Back on Administration, choose the workspace under Project for access management, enter the reviewer's user id, pick the Reviewer role and click Add member. (The reviewer's platform scopes come from the environment variables in the README's setup section.)Fill inAccount User ID / Password reviewer/reviewer-pass-123Workspace name invoice-intakeUser ID reviewerRole ReviewerClick Create account, Create and select, then Add memberYou'll see: The top bar shows the new workspace as active, and the Project members table listsreviewerwith the rolereviewer.Screen snapshotcaliber · Admin › Administration (Accounts), top bar › Create workspace, then Project accessCreate account, Create and select, then Add memberAgent resources › Object Store › Bucket browsercreates · buckets: doc-intake, doc-extractedCreate the two buckets the pipeline reads from and writes to. Type the bucket name into the new-bucket-name field and click + (Create bucket). Do it twice.Fill innew-bucket-name doc-intakenew-bucket-name doc-extractedClick + (Create bucket)You'll see: Both buckets appear in the Bucket browser next tocaliber-workspaces, the bucket the server keeps for itself.Screen snapshotcaliber · Agent resources › Object Store › Bucket browser+ (Create bucket)Agent resources › Object Store › doc-intakecreates · 30 objects under doc-intake/incoming/ inv-2026-0101-acme.txt ↓ extraction-cases.jsonl ↓Opendoc-intake, click New folder, name itincomingand click Create. Open the folder and click Upload; select all 30 files from the sources folder at once. The upload keeps each file name, so the keys becomeincoming/<file name>.Fill infolder name incomingFiles all 30 files in assets/dataset/sources/ Click UploadYou'll see: The folder lists 30 objects, fromempty.txt(0 B) toinv-2026-0123-oversized.txt(about 120 KB).Screen snapshotcaliber · Agent resources › Object Store › doc-intakeUploadAgent resources › Object Store › doc-intake › incomingcreates · preview of a stored documentCheck the pipeline will see what you think it will. Click the View preview (eye) action oninv-2026-0101-acme.txt.Click View previewYou'll see: The preview dialog shows the invoice text, startingAcme Industrial Supply Co.and containingInvoice No: INV-2026-0101. This is the text the workflow's Input Bucket node will read.Screen snapshotcaliber · Agent resources › Object Store › doc-intake › incomingView previewGet started › Cookbookscreates · workflow: doc-intake-to-json (paused, draft v1)Install the pipeline. On Document-to-JSON Pipeline click Install, give the workflow a name, tick the prerequisites acknowledgement and click Install paused draft. The Studio opens on the draft with every node on the canvas.Fill inWorkflow name doc-intake-to-jsonClick Install paused draftYou'll see: The editor outline listsread_document,extract_fields,validate_schema,package_result,route,emit_extracted,write_extracted,review_gate,emit_reviewed,write_reviewedandfinal. Validate answers Valid.Screen snapshotcaliber · Get started › CookbooksInstall paused draftAgent resources › Workflows › doc-intake-to-jsoncreates · workflow activeThe cookbook installs paused. Open the workflow's page and click Resume, then open the editor again and click Run monitor.Click ResumeYou'll see: The button now reads Pause, and the run monitor opens without the This workflow is paused note.Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-jsonResumeAgent resources › Workflows › doc-intake-to-json › Run monitorcreates · runs: completed, doc-extracted/invoices/INV-2026-0101.json and TP-20260317-02.jsonRun a valid invoice. Type the object key into the run input and click Run. Then run the yen invoice; it is valid under this version too.Fill inRun input incoming/inv-2026-0101-acme.txtRun input (second run) incoming/inv-2026-0107-tokyo.txtClick RunYou'll see: The status badge reaches Completed within a few seconds and the Execution Debugger's step map listswrite_extracted. The yen invoice also completes and its JSON is written.Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-json › Run monitorRunAgent resources › Workflows › doc-intake-to-json › Run monitorcreates · run: failed (duplicate refused)Run the same invoice sent again under another file name.Fill inRun input incoming/inv-2026-0101-acme-resend.txtClick RunYou'll see: The run ends Failed and the monitor showsoutput_bucket write failed for 'invoices/INV-2026-0101.json': object already exists. The first invoice's JSON is not touched.Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-json › Run monitorRunAgent resources › Workflows › doc-intake-to-json › Run monitorcreates · two runs awaiting approvalRun an invoice whose total is missing, then try to approve your own run, then start a second invalid invoice (no vendor) that you will reject.Fill inRun input incoming/inv-2026-0115-no-total.txtRun input (second run) incoming/inv-2026-0117-no-vendor.txtClick Run, then ApproveYou'll see: The badge reads Awaiting approval atreview_gate. Clicking Approve as the account that started the run shows the account that triggered this run cannot approve it; a second person must decide and the run stays awaiting approval.Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-json › Run monitorRun, then ApproveTop bar › Log out, then sign in as reviewercreates · runs: one approved and completed, one rejectedSign in asreviewer, select the workspace, open the workflow editor and the run monitor, select the first held run, click Approve, then Resume. Select the second held run and click Reject.Click Approve, Resume, RejectYou'll see: The first run ends Completed and the step map listswrite_reviewed. The second ends Failed.Screen snapshotcaliber · Top bar › Log out, then sign in as reviewerApprove, Resume, RejectAgent resources › Object Store › doc-extractedcreates · doc-extracted/invoices/INV-2026-0101.json, doc-extracted/reviewed/inv-2026-0115-no-total.jsonCheck what reached the output bucket. Openinvoicesand previewINV-2026-0101.json; openreviewed.Click View previewYou'll see: The preview contains"invoice_number": "INV-2026-0101"and"total": 646.92. Thereviewedfolder holdsinv-2026-0115-no-total.jsonand nothing for the rejected document.Screen snapshotcaliber · Agent resources › Object Store › doc-extractedView previewAgent resources › Workflows › doc-intake-to-json › editorcreates · workflow version v1 publishedVersion 1 is final. Sign in asadminagain, select the workspace, open the workflow's editor and click Publish: run validation, tick the acknowledgement if shown, Next, Next, Publish.Click PublishYou'll see: The message reads Published., the header changes fromv1 · drafttov1 · publishedand a banner says the version is read-only.Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-json › editorPublishAgent resources › Workflows › doc-intake-to-json › editorcreates · workflow version v2 published (JPY removed from the schema's currency list)Finance wants yen invoices checked by a person. Click Restore as draft in the banner, select thevalidate_schemanode, delete"JPY"from thecurrencylist in its config, click Save, then publish as before.Click Restore as draft, Save, PublishYou'll see: The editor opensv2 · draft, shows Saved, and after publishing readsv2 · published.Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-json › editorRestore as draft, Save, PublishAgent resources › Workflows › doc-intake-to-json › Run monitorcreates · run: awaiting approval (v2)Re-run the yen invoice on version 2.Fill inRun input incoming/inv-2026-0107-tokyo.txtClick RunYou'll see: The badge reads Awaiting approval atreview_gate: the same document that completed under version 1 is now held, and nothing new is written.Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-json › Run monitorRunAgent resources › Workflows › doc-intake-to-json › Versionscreates · version diff v1 to v2Compare the versions. Open the workflow's page, the Versions tab, and pickv1 · publishedas the base andv2 · publishedto compare. Then open the Runs tab.Click Versions tab, CompareYou'll see: The diff listsvalidate_schemaas the modified node. The Runs tab shows the two yen runs: one Completed (v1), one Awaiting approval (v2).Screen snapshotcaliber · Agent resources › Workflows › doc-intake-to-json › VersionsVersions tab, Compare
Assets (copy-paste)
The exact files this cookbook uses — copy each into the matching field. Source: docs-site/cookbooks/04-document-extraction-structuring-lab/assets/.
Acme Industrial Supply Co.
1200 Foundry Road, Dayton OH 45402
INVOICE
Invoice No: INV-2026-0101
Invoice Date: 2026-03-04
Due Date: 2026-04-03
Bill To: Caliber Demo Co., 500 Market St, Seattle WA
Qty Description Unit Price Amount
---- ----------------------------------- ------------ ------------
4 Hydraulic hose assembly, 2 m $86.50 $346.00
12 Quick-release coupling $14.25 $171.00
2 Pressure gauge 0-250 psi $41.00 $82.00
Subtotal $599.00
Tax (8%) $47.92
Total $646.92
Payment terms: Net 30. Quote the invoice number on your remittance.
{"id": "D01", "tags": ["valid", "text", "currency-symbol"], "note": "Clean aligned-text invoice; currency inferred from the $ symbols.", "inputs": {"key": "incoming/inv-2026-0101-acme.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "INV-2026-0101", "vendor": "Acme Industrial Supply Co.", "invoice_date": "2026-03-04", "currency": "USD", "line_items": [{"description": "Hydraulic hose assembly, 2 m", "quantity": 4, "unit_price": 86.5, "amount": 346.0}, {"description": "Quick-release coupling", "quantity": 12, "unit_price": 14.25, "amount": 171.0}, {"description": "Pressure gauge 0-250 psi", "quantity": 2, "unit_price": 41.0, "amount": 82.0}], "total": 646.92}}, "source_bytes": 792}
{"id": "D02", "tags": ["valid", "text", "multi-line-items", "currency-code"], "note": "Item descriptions wrap onto a second line; the currency is only the code USD beside the total.", "inputs": {"key": "incoming/inv-2026-0102-brightline.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "BL-77120", "vendor": "Brightline Cloud Services Ltd", "invoice_date": "2026-03-09", "currency": "USD", "line_items": [{"description": "Managed hosting, production cluster March 2026, 3 nodes", "quantity": 1, "unit_price": 3200.0, "amount": 3200.0}, {"description": "Premium support retainer includes 24x7 paging and quarterly review", "quantity": 1, "unit_price": 1200.0, "amount": 1200.0}, {"description": "Extra storage 500 GB", "quantity": 4, "unit_price": 105.13, "amount": 420.5}], "total": 4820.5}}, "source_bytes": 532}
{"id": "D03", "tags": ["valid", "csv"], "note": "Invoice exported as CSV: key,value header rows, then a line-item table.", "inputs": {"key": "incoming/inv-2026-0103-northwind.csv"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "INV-2026-0103", "vendor": "Northwind Traders GmbH", "invoice_date": "2026-03-11", "currency": "EUR", "line_items": [{"description": "Oak planks 2.4 m", "quantity": 40, "unit_price": 18.5, "amount": 740.0}, {"description": "Wood glue 5 L", "quantity": 6, "unit_price": 22.9, "amount": 137.4}, {"description": "Delivery pallet", "quantity": 1, "unit_price": 35.0, "amount": 35.0}], "total": 1085.76}}, "source_bytes": 268}
{"id": "D04", "tags": ["valid", "text", "currency-symbol", "european-number-format"], "note": "Euro amounts written the European way (1.250,00); the date is '14 March 2026'.", "inputs": {"key": "incoming/inv-2026-0104-kessler.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "KP-2026-554", "vendor": "Kessler Pumpen AG", "invoice_date": "2026-03-14", "currency": "EUR", "line_items": [{"description": "Pumpe Typ K-200", "quantity": 2, "unit_price": 1250.0, "amount": 2500.0}, {"description": "Dichtungssatz", "quantity": 5, "unit_price": 38.9, "amount": 194.5}], "total": 2694.5}}, "source_bytes": 465}
{"id": "D05", "tags": ["valid", "text", "currency-symbol"], "note": "Pound sterling with VAT; the number follows 'INVOICE #'.", "inputs": {"key": "incoming/inv-2026-0105-harrow.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "HB-8812", "vendor": "Harrow & Bell Surveyors", "invoice_date": "2026-03-02", "currency": "GBP", "line_items": [{"description": "Site survey and report", "quantity": 1, "unit_price": 950.0, "amount": 950.0}, {"description": "Soil sampling kit", "quantity": 3, "unit_price": 120.0, "amount": 360.0}], "total": 1572.0}}, "source_bytes": 539}
{"id": "D06", "tags": ["valid", "markdown"], "note": "Markdown invoice with a pipe table and a bold total.", "inputs": {"key": "incoming/inv-2026-0106-lumen.md"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "LW-30415", "vendor": "Lumen Wholesale", "invoice_date": "2026-03-16", "currency": "USD", "line_items": [{"description": "LED panel 600x600", "quantity": 20, "unit_price": 31.4, "amount": 628.0}, {"description": "Mounting kit", "quantity": 20, "unit_price": 4.75, "amount": 95.0}], "total": 773.61}}, "source_bytes": 298}
{"id": "D07", "tags": ["valid", "text", "currency-symbol", "no-decimals"], "note": "Yen amounts without decimals.", "inputs": {"key": "incoming/inv-2026-0107-tokyo.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "TP-20260317-02", "vendor": "Tokyo Precision Parts KK", "invoice_date": "2026-03-17", "currency": "JPY", "line_items": [{"description": "Precision bearing set", "quantity": 10, "unit_price": 4800, "amount": 48000}, {"description": "Spindle oil 1 L", "quantity": 6, "unit_price": 1250, "amount": 7500}], "total": 55500.0}}, "source_bytes": 427}
{"id": "D08", "tags": ["valid", "text", "discount"], "note": "A negative discount line; currency given by an explicit Currency: CAD row.", "inputs": {"key": "incoming/inv-2026-0108-maple.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "MLT-4410", "vendor": "Maple Leaf Tire Depot", "invoice_date": "2026-03-18", "currency": "CAD", "line_items": [{"description": "Snow tires 205/55R16", "quantity": 4, "unit_price": 142.0, "amount": 568.0}, {"description": "Mount and balance", "quantity": 4, "unit_price": 25.0, "amount": 100.0}], "total": 618.0}}, "source_bytes": 542}
{"id": "D09", "tags": ["valid", "text", "shipping"], "note": "Tax percentage in the label and a shipping line; the total reconciles only if both are counted.", "inputs": {"key": "incoming/inv-2026-0109-ridge.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "RO-2201", "vendor": "Ridge Office Interiors", "invoice_date": "2026-03-19", "currency": "USD", "line_items": [{"description": "Ergonomic chair", "quantity": 3, "unit_price": 289.0, "amount": 867.0}, {"description": "Standing desk frame", "quantity": 3, "unit_price": 412.5, "amount": 1237.5}], "total": 2342.12}}, "source_bytes": 589}
{"id": "D10", "tags": ["valid", "text", "many-items"], "note": "24 line items, to show the table parser does not stop early.", "inputs": {"key": "incoming/inv-2026-0110-bulkparts.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "BP-60012", "vendor": "Bulkparts Direct", "invoice_date": "2026-03-20", "currency": "USD", "line_items": [{"description": "Fastener pack type 01", "quantity": 2, "unit_price": 2.75, "amount": 5.5}, {"description": "Fastener pack type 02", "quantity": 3, "unit_price": 3.0, "amount": 9.0}, {"description": "Fastener pack type 03", "quantity": 4, "unit_price": 3.25, "amount": 13.0}, {"description": "Fastener pack type 04", "quantity": 5, "unit_price": 3.5, "amount": 17.5}, {"description": "Fastener pack type 05", "quantity": 1, "unit_price": 3.75, "amount": 3.75}, {"description": "Fastener pack type 06", "quantity": 2, "unit_price": 4.0, "amount": 8.0}, {"description": "Fastener pack type 07", "quantity": 3, "unit_price": 4.25, "amount": 12.75}, {"description": "Fastener pack type 08", "quantity": 4, "unit_price": 4.5, "amount": 18.0}, {"description": "Fastener pack type 09", "quantity": 5, "unit_price": 4.75, "amount": 23.75}, {"description": "Fastener pack type 10", "quantity": 1, "unit_price": 5.0, "amount": 5.0}, {"description": "Fastener pack type 11", "quantity": 2, "unit_price": 5.25, "amount": 10.5}, {"description": "Fastener pack type 12", "quantity": 3, "unit_price": 5.5, "amount": 16.5}, {"description": "Fastener pack type 13", "quantity": 4, "unit_price": 5.75, "amount": 23.0}, {"description": "Fastener pack type 14", "quantity": 5, "unit_price": 6.0, "amount": 30.0}, {"description": "Fastener pack type 15", "quantity": 1, "unit_price": 6.25, "amount": 6.25}, {"description": "Fastener pack type 16", "quantity": 2, "unit_price": 6.5, "amount": 13.0}, {"description": "Fastener pack type 17", "quantity": 3, "unit_price": 6.75, "amount": 20.25}, {"description": "Fastener pack type 18", "quantity": 4, "unit_price": 7.0, "amount": 28.0}, {"description": "Fastener pack type 19", "quantity": 5, "unit_price": 7.25, "amount": 36.25}, {"description": "Fastener pack type 20", "quantity": 1, "unit_price": 7.5, "amount": 7.5}, {"description": "Fastener pack type 21", "quantity": 2, "unit_price": 7.75, "amount": 15.5}, {"description": "Fastener pack type 22", "quantity": 3, "unit_price": 8.0, "amount": 24.0}, {"description": "Fastener pack type 23", "quantity": 4, "unit_price": 8.25, "amount": 33.0}, {"description": "Fastener pack type 24", "quantity": 5, "unit_price": 8.5, "amount": 42.5}], "total": 422.5}}, "source_bytes": 1947}
{"id": "D11", "tags": ["valid", "text", "non-ascii", "utf-8"], "note": "Non-ASCII characters that ARE valid UTF-8 pass through intact (contrast with D22).", "inputs": {"key": "incoming/inv-2026-0111-mueller.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "MS-2026-031", "vendor": "Müller & Söhne GmbH", "invoice_date": "2026-03-21", "currency": "EUR", "line_items": [{"description": "Wartungsvertrag Q1", "quantity": 1, "unit_price": 2400.0, "amount": 2400.0}], "total": 2400.0}}, "source_bytes": 353}
{"id": "D12", "tags": ["valid", "csv", "quoted-comma"], "note": "CSV whose descriptions contain commas inside quotes.", "inputs": {"key": "incoming/inv-2026-0112-orchard.csv"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "OH-3009", "vendor": "Orchard Hardware LLC", "invoice_date": "2026-03-22", "currency": "USD", "line_items": [{"description": "Widget, large", "quantity": 10, "unit_price": 7.4, "amount": 74.0}, {"description": "Widget, small", "quantity": 25, "unit_price": 3.1, "amount": 77.5}], "total": 151.5}}, "source_bytes": 200}
{"id": "D13", "tags": ["valid", "text", "fractional-quantity"], "note": "Fractional quantity (7.5 hours) and labels 'Vendor:' / 'Inv. No:' / 'Issued:'.", "inputs": {"key": "incoming/inv-2026-0113-sable.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "SBL-5521", "vendor": "Sable Analytics", "invoice_date": "2026-03-23", "currency": "USD", "line_items": [{"description": "Consulting hours", "quantity": 7.5, "unit_price": 160.0, "amount": 1200.0}, {"description": "Travel expenses", "quantity": 1, "unit_price": 212.4, "amount": 212.4}], "total": 1412.4}}, "source_bytes": 415}
{"id": "D14", "tags": ["valid", "text"], "note": "Subtotal, tax and a 'Grand Total' label; the grand total (not the subtotal) is the invoice total.", "inputs": {"key": "incoming/inv-2026-0114-delta.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "DS-9004", "vendor": "Delta Software Inc.", "invoice_date": "2026-03-24", "currency": "USD", "line_items": [{"description": "Annual licence, 10 seats", "quantity": 10, "unit_price": 199.0, "amount": 1990.0}], "total": 2189.0}}, "source_bytes": 456}
{"id": "D15", "tags": ["valid", "text", "distractor-fields"], "note": "A PO number and a due date sit beside the invoice number and date and must not replace them.", "inputs": {"key": "incoming/inv-2026-0129-harbor.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "HM-1188", "vendor": "Harbor Metrology", "invoice_date": "2026-03-26", "currency": "USD", "line_items": [{"description": "Calibration service", "quantity": 2, "unit_price": 450.0, "amount": 900.0}], "total": 900.0}}, "source_bytes": 390}
{"id": "D16", "tags": ["valid", "text", "whole-amount"], "note": "A total written without cents.", "inputs": {"key": "incoming/inv-2026-0130-quillnet.txt"}, "expectations": {"outcome": "extracted", "record": {"invoice_number": "QN-0001", "vendor": "Quillnet Registrar", "invoice_date": "2026-03-27", "currency": "USD", "line_items": [{"description": "Domain renewal", "quantity": 1, "unit_price": 1000.0, "amount": 1000.0}], "total": 1000.0}}, "source_bytes": 294}
{"id": "D17", "tags": ["invalid", "missing-total"], "note": "The document never states a total, so the extractor leaves it null and the schema requires it.", "inputs": {"key": "incoming/inv-2026-0115-no-total.txt"}, "expectations": {"outcome": "needs_review", "errors": ["total"]}, "source_bytes": 378}
{"id": "D18", "tags": ["invalid", … truncated — open the file in the repo for the full content.
Evaluation & quality gates
| Quality gate | Target |
|---|---|
| Valid invoices extracted and matching the expected JSON | 16 of 16 |
| Invalid documents held at review_gate with exactly the listed schema errors | 13 of 13 |
| Duplicate invoice refused by the output bucket | 1 of 1 |
| Account that started a run cannot approve it | 403 |
| Approved document written under reviewed/, rejected document writes nothing | doc-extracted holds exactly 17 objects |
Developer notes & gotchas
- Flags.
CALIBER_FEATURE_COOKBOOKS=trueopens the gallery (a preview area, off by default); no other flag is needed. The lab also needs an S3-compatible store:scripts/cookbook-env.sh up lab04 --flags cookbooks --s3starts a private in-memory one, so objects do not surviverestart. - Nothing in the pipeline is simulated, and no model is called. The simulated default LLM and evaluator providers are never used; the result is deterministic. The object store is real S3 protocol (moto), not a production service.
- Second person required. Start with
CALIBER_APPROVER_USERS=admin,reviewer CALIBER_OPERATOR_USERS=admin,reviewer(approver to approve or reject, operator to resume). LeaveCALIBER_APPROVAL_ALLOW_SELF_APPROVALunset, and keep runtime approvals and the run queue on. - Text only.
input_bucketdecodes UTF-8 with replacement characters and keeps 100,000 bytes per object, so binary.docx/.xlsxcannot flow through it, and the 120 KB oversized file is truncated. - Preview is blocked. The editor's Preview refuses this workflow (it cannot isolate
python_code,input_bucketoroutput_bucket); run it for real, queued, throughPOST /workflow-runs. - Extractor is rules, not a model. It understands only the layouts in the corpus (aligned text, Markdown table, CSV) and writes
nullfor anything a document does not state. A new layout is a new dataset case and a new rule. One run handles one document. - Keep the gate's shape. After an approval only what flows through the gate reaches later nodes; the installed workflow puts the record and its schema errors in one text (
package_result) for that reason. - Runnable.
sdk/caliber-sdk/examples/cookbooks/cookbook_04_document_to_json_pipeline.py(about 75 s, 30 runs); UI:caliber/caliber-ui/e2e/cookbooks/labs/04-document-extraction.spec.ts; environment:scripts/cookbook-env.sh up lab04.