{"id":14939,"date":"2026-09-23T19:30:00","date_gmt":"2026-09-23T14:00:00","guid":{"rendered":"https:\/\/www.allerin.com\/blog\/?p=14939"},"modified":"2026-09-20T19:37:12","modified_gmt":"2026-09-20T14:07:12","slug":"ai-document-acceptance-revisions-review","status":"publish","type":"post","link":"https:\/\/www.allerin.com\/blog\/ai-document-acceptance-revisions-review\/","title":{"rendered":"Accepting AI document results after a file is replaced"},"content":{"rendered":"<style>.allerin-ai-example{max-width:100%;overflow-wrap:anywhere}.allerin-ai-example h2{scroll-margin-top:125px}.allerin-ai-example nav{border-left:3px solid #17665b;padding:10px 18px;margin:24px 0}.allerin-ai-example nav ol{padding-left:22px}.allerin-ai-example nav a{display:inline-block}.allerin-ai-example code{white-space:normal;overflow-wrap:anywhere}.allerin-ai-example pre{max-width:100%;overflow:auto}.allerin-ai-example pre code{white-space:pre;overflow-wrap:normal}.allerin-ai-example .table-wrap{max-width:100%;overflow-x:auto;margin:22px 0}.allerin-ai-example table{width:100%;min-width:540px;border-collapse:collapse;line-height:1.5}.allerin-ai-example th,.allerin-ai-example td{border:1px solid #d1d9d5;padding:10px;text-align:left;vertical-align:top}.allerin-ai-example th{background:#edf2ef}.allerin-ai-example .scroll-hint{font-size:.85em}.allerin-ai-example .example-disclosure{margin-top:28px;border-top:1px solid #d1d9d5;padding-top:18px}.allerin-ai-example .table-wrap:focus-visible,.allerin-ai-example pre:focus-visible{outline:3px solid #17665b;outline-offset:3px}<\/style>\n<div class=\"allerin-ai-example\" data-example=\"AI02\">\n<nav aria-label=\"In this article\"><strong>In this article<\/strong><\/p>\n<ol>\n<li><a href=\"#a-successful-conversion-leaves-questions-unanswered\">A successful conversion leaves questions unanswered<\/a><\/li>\n<li><a href=\"#bind-the-decision-to-the-source-and-result\">Bind document acceptance to the source and result<\/a><\/li>\n<li><a href=\"#keeping-an-upload-is-a-different-decision\">Keeping an upload is a different decision<\/a><\/li>\n<li><a href=\"#repeat-the-work-without-changing-its-meaning\">Repeat the work without changing its meaning<\/a><\/li>\n<li><a href=\"#about-this-example\">About this example<\/a><\/li>\n<li><a href=\"#download-example\">Download the example<\/a><\/li>\n<\/ol>\n<\/nav>\n<p>A supplier uploads a corrected form while the first file is still being processed. The old job finishes successfully. If it sets a single \u201cready\u201d flag on the document, the application can make the replacement eligible for the next step even though nobody has checked it.<\/p>\n<p>The result may be perfectly valid for the old file. The mistake is attaching that result to the wrong revision.<\/p>\n<p>The accompanying synthetic example tests this handoff with a two-page supplier form, a required reporting period and two required fields. Its extraction outputs are supplied JSON records. No parser, OCR engine or model produced them. This lets the experiment isolate acceptance decisions without claiming to measure extraction quality.<\/p>\n<h2 id=\"a-successful-conversion-leaves-questions-unanswered\">A successful conversion leaves questions unanswered<\/h2>\n<p>Completeness deserves its own check. A <a href=\"https:\/\/github.com\/docling-project\/docling\/issues\/3921\" target=\"_blank\" rel=\"noopener\">Docling issue opened in July 2026<\/a> reports text cells present at earlier processing stages but absent from the table output. It was closed as a duplicate; that status does not establish that the behavior was fixed. The author&#8217;s private document was not used in this experiment.<\/p>\n<p>The project&#8217;s <a href=\"https:\/\/docling-project.github.io\/docling\/concepts\/confidence_scores\/\" target=\"_blank\" rel=\"noopener\">confidence documentation<\/a> also marks its table score as not implemented. A workflow therefore needs to know what a reported score covers before using it to accept a document.<\/p>\n<p>Our example defines a much narrower rule. The supplied output must establish readability, identify the expected reporting period, list both required pages and contain the supplier ID and contact email. Missing fields or pages produce an incomplete result; an unknown period or unreadable input remains unknown. A wrong period is recorded separately.<\/p>\n<p>These checks inspect declarations in the supplied output. They do not prove that its contact email matches the original document, that an OCR engine read every page, or that an arbitrary document is complete. Those require their own ground truth and extraction tests.<\/p>\n<h2 id=\"bind-the-decision-to-the-source-and-result\">Bind document acceptance to the source and result<\/h2>\n<p>The corrected implementation stores the original source, its revision and its content hash. Each supplied extraction result names that exact source and has its own result ID, version and output hash. A review identifies the specific result it accepts or rejects.<\/p>\n<p>When the replacement arrives, it becomes revision two. A later result for revision one can be retained as history, but it cannot become revision two&#8217;s selected result. The new revision remains pending until its own output arrives and receives the required review.<\/p>\n<p>The same rule applies when a newer extraction result arrives for an unchanged source. An acceptance decision for an earlier result does not silently carry forward. The current source and selected result determine which review can make the document eligible.<\/p>\n<div class=\"table-wrap\" tabindex=\"0\" role=\"region\" aria-label=\"Executed comparison results\">\n<table>\n<thead>\n<tr>\n<th>Executed sequence<\/th>\n<th>Document-level readiness flag<\/th>\n<th>Revision-specific acceptance<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Old result arrives after a replacement<\/td>\n<td>Replacement marked eligible<\/td>\n<td>Replacement stays pending and ineligible<\/td>\n<\/tr>\n<tr>\n<td>Submitter keeps a flagged file<\/td>\n<td>File marked eligible<\/td>\n<td>Choice recorded; review remains pending<\/td>\n<\/tr>\n<tr>\n<td>Reviewer overrides the exact complete-but-flagged result<\/td>\n<td>Eligible<\/td>\n<td>Eligible with recorded override<\/td>\n<\/tr>\n<tr>\n<td>Current complete result receives review<\/td>\n<td>Eligible<\/td>\n<td>Eligible with recorded acceptance<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p class=\"scroll-hint\">On a narrow screen, scroll the table sideways to read every column.<\/p>\n<p>The first implementation deliberately uses the wrong document-level flag. It is a failure control, not a claim about a particular vendor. The corrected implementation preserves valid acceptance paths instead of making every exception a permanent rejection.<\/p>\n<h2 id=\"keeping-an-upload-is-a-different-decision\">Keeping an upload is a different decision<\/h2>\n<p>Financial Cents describes a <a href=\"https:\/\/financial-cents.com\/artificial-intelligence\/ai-file-validator\/\" target=\"_blank\" rel=\"noopener\">file-validator workflow<\/a> in which a client can replace a flagged upload or keep it, with an advisory shown to the firm. That is a useful product distinction. A client&#8217;s decision to retain a file does not, by itself, establish authority to accept it for another business process.<\/p>\n<p>In this fixture, the submitter can record that choice. Only a current fixture session with the reviewer role can accept, reject or override the selected result. Identity and roles come from stored test records; there is no real sign-in integration.<\/p>\n<p>The local policy permits an override only when the supplied output is structurally complete but contains a warning. It requires a reason and records who made the decision. An override cannot turn missing pages, an unknown period or a wrong period into a complete result. This is the experiment&#8217;s chosen policy, not a universal rule for document automation.<\/p>\n<p>The false-warning case is deliberately labeled in the synthetic inputs. It verifies that a legitimate review path exists. It does not measure a model&#8217;s false-positive rate or demonstrate a human reviewer validating a real supplier document.<\/p>\n<h2 id=\"repeat-the-work-without-changing-its-meaning\">Repeat the work without changing its meaning<\/h2>\n<p>A repeated delivery with the same identifier and identical payload returns its existing receipt. Reusing that identifier with changed content is rejected. Replacement uploads also name the revision they expect to replace, allowing the service to reject an outdated update.<\/p>\n<p>The stored source, supplied output, review and audit events make the local decision inspectable. They are ordinary SQLite records, not tamper-evident logs. The example exposes eligibility for a downstream step; it does not send data to an ERP or demonstrate a production transaction across systems. Eligibility is a local snapshot; a later handoff needs to revalidate the revision it uses.<\/p>\n<p>Run the <a href=\"#download-example\">companion<\/a> from its directory:<\/p>\n<pre tabindex=\"0\" aria-label=\"Reproduction commands\"><code class=\"language-sh\">python3 document_demo.py\r\npython3 -m unittest -v\r\n<\/code><\/pre>\n<p>The <a href=\"#download-example\">execution record<\/a> preserves the tested inputs and environment. Research and execution took place on 20 September 2026 using Python 3.14.7 and SQLite 3.53.4.<\/p>\n<p>For an existing workflow, choose one document class and define what makes a particular revision usable. Then agree who can resolve warnings and what a late result is allowed to change. Allerin&#8217;s <a href=\"https:\/\/www.allerin.com\/services\/genai-accelerator\">GenAI engineering<\/a> and <a href=\"https:\/\/www.allerin.com\/services\/integration-fasttrack\">integration work<\/a> can turn those decisions into a bounded acceptance review and implementation scope.<\/p>\n<section class=\"example-disclosure\" aria-labelledby=\"about-this-example\">\n<h2 id=\"about-this-example\">About this example<\/h2>\n<p>AI tools assisted the research, writing and code. Independent technical and editorial reviews were performed by AI agents. This example uses synthetic data and does not describe a customer deployment. Results apply only to the recorded versions and test conditions. Review and test the companion code against your own requirements before production use.<\/p>\n<p>This example tests acceptance decisions using supplied extraction-output JSON. It does not run OCR, a parser or a model, or measure extraction accuracy.<\/p>\n<\/section>\n<section aria-labelledby=\"download-example\">\n<h2 id=\"download-example\">Download the example<\/h2>\n<p><a href=\"https:\/\/www.allerin.com\/blog\/wp-content\/uploads\/2026\/09\/allerin-ai-document-acceptance-2026-09-20.zip\">Download the runnable document acceptance example and execution record (ZIP)<\/a>. Extract it and open <code>AI02-document-acceptance\/README.md<\/code>. The included <code>EXECUTION.json<\/code> records the tested environment and file identities; <code>expected-demo.json<\/code> preserves the demonstration output. The public package replay used the same implementation and tests as the original 20 September 2026 experiment. The included README identifies this public documentation adaptation.<\/p>\n<\/section>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Test how document replacements, late extraction results and reviewer decisions affect downstream acceptance with a runnable synthetic example.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[5],"tags":[2078,260,2080],"class_list":["post-14939","post","type-post","status-publish","format-standard","hentry","category-ai","tag-ai-engineering","tag-artificial-intelligence","tag-document-acceptance"],"_links":{"self":[{"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/posts\/14939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/comments?post=14939"}],"version-history":[{"count":3,"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/posts\/14939\/revisions"}],"predecessor-version":[{"id":14964,"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/posts\/14939\/revisions\/14964"}],"wp:attachment":[{"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/media?parent=14939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/categories?post=14939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.allerin.com\/blog\/wp-json\/wp\/v2\/tags?post=14939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}