Zum Inhalt springen
NEULerne Alaaddin kennen, deinen KI-Flaschengeist mit Stimme. trig8n startet am 1. Januar 2027. Neuigkeiten ansehen

Bibliothek / Dokumente, PDF & OCR

Dokumente, PDF & OCR

Verify contract extraction and flag hallucinated fields with Judgment API

When you run it, it reads and extracts data from documents using Judgment.

Was sie bewirkt

## Verify extracted contract terms and flag the fabricated ones with Judgment ### How it works 1. Builds two worked examples of the same contract extraction: one Set node with values that match the document, and one with two fields changed. 2. Merges them into a single stream, so both records are verified side by side. 3. Checks every extracted value against the source in one judgment call, asking two questions per field: is this value absent from the document, and does the document state a different one. 4. Reshapes the answers into a field name, a check name, the extracted value, a probability, and a verdict. 5. Sends any field the verifier doubted through *Explain the Flag* to the *Review Queue*, and treats the rest as confirmed. ### Setup steps - [ ] Add your Judgment API credential to the *Verify Extract* node, and set the Base URL if you are not using the default provider. - [ ] Install n8n-nodes-judgment from Settings → Community Nodes. See the note beside the first node. - [ ] Replace *Source Document* and *Fabricated Extraction* with your own extraction output, keeping the source_text and one field per extracted value. - [ ] Add two questions to *Verify Extract* for each field you want checked, following the existing pattern. - [ ] Review the 0.5 threshold in *Reshape Checks* against the cost of a wrong field reaching production. ### Customization Field names are the keys of the extraction object, so adding a field means adding its two questions. The check name carries the field, which is why one call covers a whole record. To build the full cascade, replace *Review Queue* with a stronger reasoning model that re-extracts just the flagged fields.

Die Schritte

  1. When Clicking Test Workflow
  2. Verify Extract
  3. Reshape Checks
  4. Review Queue
  5. Confirmed
  6. Is the Field in Doubt?
  7. Explain the Flag
  8. Source Document
  9. Fabricated Extraction
  10. Two Records

Ähnliche Automatisierungen