Inferensys

Prompt

Signature Presence Detection Prompt

A practical prompt playbook for using Signature Presence Detection Prompt in production AI workflows.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, reader, and constraints for the Signature Presence Detection Prompt.

This prompt is designed for engineering teams building e-signature verification, document completeness, and automated intake pipelines. Its primary job is to detect the presence of signatures on a document page, classify their type (wet ink, digital, or stamp), and return their location with a confidence score. The ideal user is a developer or ML engineer who needs a reliable, binary detection step before routing a document for further processing or human review. You should use this prompt when the goal is to answer 'Is there a signature here, and what kind?' rather than validating the signature's legal authenticity or comparing it against a known sample.

The prompt requires a clear image of a document page as input, along with a defined output schema and a confidence threshold for flagging uncertain results. It is built to handle common production challenges: distinguishing real signatures from printed signature images, ignoring decorative elements and logos, and correctly identifying stamps that overlap with text. However, it is not a replacement for cryptographic signature validation or forensic handwriting analysis. Do not use this prompt to verify the identity of a signatory or to make legally binding determinations about a document's execution status without a human review step.

Before integrating this prompt, define your tolerance for false positives on logos, initials, and printed text that mimics a signature. The accompanying evaluation harness should include test cases for these specific failure modes. If your pipeline processes multi-signature pages, ensure your implementation can handle multiple detection boxes in a single response. For high-stakes workflows, always route low-confidence detections to a human review queue and log the model's raw output alongside the final decision for auditability.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Signature Presence Detection Prompt delivers reliable results and where it introduces unacceptable risk. Use these cards to decide if this prompt fits your document pipeline before integrating it.

01

Good Fit: Clean Digital Scans

Use when: documents are high-resolution (300+ DPI) digital scans or born-digital PDFs with clear signature regions. Guardrail: Pre-filter documents by DPI and image quality score before running detection. Route low-quality scans to a human review queue with a quality flag.

02

Bad Fit: Printed Signature Images

Avoid when: documents contain pre-printed facsimile signatures, corporate letterhead with signature graphics, or scanned copies of previously signed documents. Guardrail: Implement a second-pass classifier that distinguishes pen pressure artifacts and ink reflectance from flat printed graphics. Flag all matches on known letterhead regions for human review.

03

Required Inputs

Required: per-page image data, document DPI metadata, and a defined signature region bounding box or page zone. Guardrail: Validate that all required inputs are present before invoking the prompt. Return a structured MISSING_INPUT error with specific missing fields rather than running with incomplete context.

04

Operational Risk: False Positives on Logos

Risk: corporate logos, decorative elements, and stylized initials trigger false positive signature detections, inflating completion metrics. Guardrail: Add a logo exclusion list with bounding box coordinates per known document template. Run logo detection as a pre-processing step and mask identified logo regions before signature detection.

05

Operational Risk: Multi-Signature Pages

Risk: pages with multiple signature blocks (witness, notary, multiple parties) produce ambiguous attribution when only presence is checked. Guardrail: Extend the output schema to include signature count, relative position ordering, and association with labeled signature blocks. Flag pages where detected signature count does not match expected block count.

06

Operational Risk: Overlapping Text and Stamps

Risk: signatures overlaid on text, notary stamps crossing signature lines, or overlapping wet-ink and digital signatures cause classification confusion. Guardrail: Add a signature_clarity confidence field that degrades when overlap is detected. Route low-clarity detections to human review with the overlapping region highlighted. Do not auto-accept signatures with clarity below threshold.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt for detecting signatures in documents, classifying their type, and returning structured location data with confidence scores.

This prompt template is designed for integration into document processing pipelines that need to determine whether a signature is present on a page, where it is located, and what type of signature it is. The template uses square-bracket placeholders that must be replaced with actual values at runtime. The core instruction set is self-contained and can be copied directly into your application's prompt layer. The model is instructed to perform a strict binary detection task, avoiding false positives on logos, initials, and decorative elements, which are the most common failure modes in production.

text
You are a document analysis system specialized in signature detection. Your task is to analyze the provided document page and determine if a signature is present.

## INPUT
[INPUT]

## CONSTRAINTS
[CONSTRAINTS]

## OUTPUT SCHEMA
Return a valid JSON object with the following structure. Do not include any text outside the JSON object.
{
  "page_number": integer,
  "signatures": [
    {
      "signature_id": "string",
      "present": boolean,
      "type": "wet_ink" | "digital" | "stamp" | "unknown",
      "bounding_box": {
        "x": number,
        "y": number,
        "width": number,
        "height": number,
        "unit": "pixel" | "normalized"
      },
      "confidence": number (0.0 to 1.0),
      "evidence": "string describing visual evidence for the classification"
    }
  ],
  "false_positive_risks": [
    {
      "region": "string describing the region",
      "risk": "logo" | "initials" | "printed_text" | "decorative" | "other",
      "reason": "string explaining why this region is not a signature"
    }
  ]
}

## INSTRUCTIONS
1. Scan the entire page for any marks that could be signatures.
2. For each candidate region, classify it as a signature or a false-positive risk.
3. A signature is a hand-drawn mark representing a person's name or mark of approval. It is typically cursive, stylized, and placed in a designated signature block.
4. Do NOT classify the following as signatures: typed names, initials in text fields, company logos, decorative borders, checkmarks, or printed signature images that are clearly part of the document template.
5. If a printed signature image is present, classify it as "digital" only if it appears to be an applied signature (e.g., a scanned wet-ink signature or a cryptographic digital signature representation). If it is part of the pre-printed form, flag it as a false-positive risk with risk type "printed_text".
6. For each detected signature, provide a bounding box in the unit specified by [COORDINATE_UNIT].
7. Confidence should reflect the certainty of the detection. Reduce confidence when signatures overlap with text, are partially obscured, or are very faint.
8. If no signatures are found, return an empty `signatures` array and populate `false_positive_risks` with any regions that might be mistaken for signatures.

## EXAMPLES
[EXAMPLES]

To adapt this template for your pipeline, replace the placeholders as follows: [INPUT] should contain the document page image or extracted text and layout data, depending on your model's modality. [CONSTRAINTS] can be used to inject domain-specific rules, such as "Signatures are only valid in the designated signature block on page 4" or "A valid document must have exactly two signatures." [EXAMPLES] should include one-shot or few-shot examples of your specific document type, showing both positive and negative cases. [COORDINATE_UNIT] should be set to "pixel" if your downstream system uses pixel coordinates, or "normalized" (0.0 to 1.0) for resolution-independent processing. If your application requires a specific risk level, add a [RISK_LEVEL] placeholder to the constraints section to adjust the model's sensitivity. For high-stakes workflows such as legal admissibility or financial transactions, always route low-confidence detections (confidence < 0.85) to a human review queue and log the evidence field for auditability.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Signature Presence Detection Prompt. Each placeholder must be populated before the prompt is assembled and sent. Validation notes describe how to check the input before it reaches the model.

PlaceholderPurposeExampleValidation Notes

[DOCUMENT_IMAGE]

Base64-encoded image or URL of the page to analyze for signatures

data:image/png;base64,iVBORw0KGgo...

Check MIME type is image/png, image/jpeg, or image/tiff. Reject if payload exceeds 20MB. Verify image dimensions are at least 200x200px.

[PAGE_NUMBER]

Integer indicating which page of a multi-page document is being analyzed

3

Must be a positive integer. Null allowed for single-page documents. Validate against total page count if available.

[SIGNATURE_TYPES]

Array of signature types to detect: wet_ink, digital, stamp, initials

["wet_ink", "digital", "stamp"]

Must be a non-empty array. Each element must match the enum exactly. Reject unknown types before prompt assembly.

[CONFIDENCE_THRESHOLD]

Float between 0.0 and 1.0 controlling minimum confidence for a positive detection

0.75

Must be a float. Clamp to [0.0, 1.0]. Lower thresholds increase false positives on logos and decorative elements. Default 0.75 if not provided.

[OUTPUT_SCHEMA]

JSON schema describing the expected output structure for downstream consumption

{"type": "object", "properties": {"detections": {"type": "array"}}}

Validate as parseable JSON. Must include detections array with location, type, and confidence fields. Reject schemas missing required fields.

[DOCUMENT_CONTEXT]

Optional metadata about the document: type, expected signer count, known signature locations

{"doc_type": "contract", "expected_signers": 2, "signature_page": 8}

Null allowed. If provided, validate as parseable JSON. Use to suppress false positives on known non-signature regions like logos and letterhead.

[EXCLUSION_REGIONS]

Array of bounding boxes to exclude from analysis, such as logos, seals, or pre-printed signature images

[{"x": 50, "y": 720, "w": 200, "h": 80}]

Null allowed. Each region must have x, y, w, h as positive integers. Validate coordinates are within image dimensions. Use to reduce false positives on known decorative elements.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Signature Presence Detection Prompt into a production document processing pipeline with validation, retries, and human review.

The Signature Presence Detection Prompt is designed to operate as a single step within a larger document processing pipeline, not as a standalone application. It expects a pre-processed image of a document page or signature block region, typically extracted by an upstream layout analysis or field boundary detection step. The prompt returns a structured JSON payload containing binary presence, location coordinates, type classification, and confidence scores. This output should be consumed by a downstream validation layer before any business logic acts on the result.

Wire the prompt into your application using a standard model invocation pattern with structured output constraints. For OpenAI-compatible APIs, set response_format to json_schema and provide the expected output schema. For other providers, include the schema inline in the prompt's [OUTPUT_SCHEMA] placeholder and enforce JSON mode. Implement a validation wrapper that checks the returned JSON against the schema, verifies bounding box coordinates fall within page dimensions, and confirms confidence scores are in the 0.0–1.0 range. If validation fails, retry once with the validation error message appended to the prompt context. After a second failure, route the page to a human review queue with the raw model output and error details attached.

Model choice matters for this task. Use a vision-capable model with strong spatial reasoning—GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro are appropriate starting points. Avoid text-only models that require pre-extracted OCR descriptions of the signature region; the prompt relies on direct visual inspection to distinguish wet ink from printed images. For high-throughput pipelines processing thousands of pages, consider a two-stage architecture: a fast, cheaper model for initial binary presence detection, followed by the full prompt only on pages that trigger a positive signal. Log every invocation with the input image hash, model version, raw response, validated output, and routing decision. This trace is essential for debugging false positives on logos, initials, and decorative elements—the most common production failure mode.

The eval harness for this prompt should include a golden dataset of at least 200 labeled page images covering wet ink signatures, digital signatures, stamps, printed signature images, initials, logos, blank signature blocks, and multi-signature pages. Run the prompt against this dataset on every model version change and prompt revision. Track precision and recall separately for each signature type, and set a minimum precision threshold of 0.95 for binary presence before allowing automatic routing. Pages with confidence scores between 0.5 and 0.8 should always route to human review, not to automated acceptance or rejection. Do not use the model's confidence score as a direct pass/fail gate without calibration against your eval dataset—raw confidence scores from vision models often require per-document-type calibration to align with actual accuracy.

IMPLEMENTATION TABLE

Expected Output Contract

Schema contract for the Signature Presence Detection Prompt. Use this table to validate the model's JSON output before it enters downstream e-signature verification or document completeness pipelines.

Field or ElementType or FormatRequiredValidation Rule

signatures

array of objects

Must be a JSON array. If no signatures are detected, return an empty array, not null.

signatures[].type

enum: wet_ink, digital, stamp, unknown

Must match one of the allowed enum values. Reject any output with a type not in this list.

signatures[].confidence

number (0.0 - 1.0)

Must be a float between 0.0 and 1.0 inclusive. Parse check: reject non-numeric or out-of-range values.

signatures[].bounding_box

object with page_number, x, y, width, height

All coordinate fields must be positive numbers. page_number must be an integer >= 1. Schema check: reject missing or negative coordinates.

signatures[].is_printed_image

boolean

Must be true or false. Indicates whether the signature is a pre-printed image rather than an applied mark. Null is not allowed.

signatures[].overlapping_text

string or null

If present, must be a non-empty string describing text that overlaps or intersects the signature region. Null allowed when no overlap exists.

signatures[].review_recommended

boolean

Must be true if confidence < 0.8 or type is unknown or is_printed_image is true. Downstream systems should route true cases for human review.

processing_notes

array of strings

If present, each entry must be a non-empty string describing a processing artifact, ambiguity, or quality issue encountered. Empty strings must be stripped.

PRACTICAL GUARDRAILS

Common Failure Modes

Signature detection models are easily fooled by decorative elements, printed logos, and document artifacts. These are the most common production failures and how to prevent them before they corrupt your completeness pipeline.

01

False Positives on Logos and Branding

What to watch: The model classifies corporate logos, decorative flourishes, or stylized headers as wet-ink or digital signatures. This is the most common failure mode in letterhead-heavy documents. Guardrail: Add a negative-example preamble listing common distractors (logos, seals, letterhead graphics). Require the model to distinguish between a signature block context and a standalone graphic. Implement a post-processing check: if the bounding box overlaps with a known header/footer region, suppress the signature classification.

02

Printed Signature Image Misclassification

What to watch: A scanned or faxed copy of a previously signed document contains a printed image of a signature. The model reports 'wet ink signature present' with high confidence, causing a duplicate or fraudulent document to pass automated checks. Guardrail: Add a classification subtype for 'printed reproduction.' Instruct the model to look for pixelation patterns, uniform ink density, and lack of paper fiber interaction. If the document is a scan of a scan, flag it for human review rather than auto-approving.

03

Initials and Handwritten Dates as Signatures

What to watch: Handwritten initials in margin notes, date fields, or amendment boxes are classified as full signatures, inflating the signature count and marking incomplete documents as complete. Guardrail: Define a minimum bounding box size and aspect ratio for a signature region. Instruct the model to distinguish between a signature block (typically larger, cursive, and adjacent to a printed name line) and isolated initials. Return a separate initials_detected field to avoid conflating the two.

04

Overlapping Text and Signature Bleed-Through

What to watch: A signature overlaps with form text, table lines, or bleed-through from the reverse side of the page. The model either misses the signature entirely or reports very low confidence, causing a valid signed document to route to manual review. Guardrail: Use a two-pass approach. First, detect potential signature regions ignoring text overlap. Second, classify each region with the surrounding context masked. Set a lower confidence threshold for overlapping regions but flag them for quick human verification rather than full manual review.

05

Multi-Signature Page Undercounting

What to watch: A page with multiple signature blocks (e.g., witness, applicant, officer) only detects one signature, causing the pipeline to report the document as incomplete when it is fully signed. Guardrail: Instruct the model to enumerate all signature regions on a page before classifying each one. Use a structured output schema that returns an array of signature objects, not a single boolean. Add a validation step: if the number of detected signatures is less than the number of signature lines or label fields detected, flag for review.

06

Digital Signature Widget vs. Static Image Confusion

What to watch: A PDF contains a digital signature field (interactive widget) that has not been filled. The model sees the placeholder or the digital certificate metadata and reports 'digital signature present,' causing an unsigned document to pass validation. Guardrail: If processing programmatic PDFs, extract digital signature status from the PDF structure directly before sending to the vision model. Use the vision model only for flat/image-based documents. For hybrid documents, cross-reference the model's output with the PDF's digital signature dictionary and flag discrepancies.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Signature Presence Detection Prompt before shipping. Each criterion targets a known failure mode for signature detection in production document pipelines.

CriterionPass StandardFailure SignalTest Method

Wet Ink vs. Printed Image Discrimination

Correctly classifies wet ink signatures as 'wet_ink' and printed/scanned signature images as 'digital_image' with >=95% accuracy on a 50-sample test set.

Printed signature images in the document body are misclassified as 'wet_ink'. Logos or decorative elements containing script-like flourishes trigger false positives.

Curate a golden dataset of 25 wet ink and 25 printed signature samples from real scanned contracts. Run the prompt and compare classification labels against ground truth.

Multi-Signature Page Handling

Detects all signatures on a page with multiple signatories (e.g., buyer, seller, witness) and returns a distinct object per signature with correct bounding box and page number.

Only one signature is returned for a page containing three signatures. Bounding boxes for adjacent signatures overlap or merge into a single region.

Use a test PDF with 3-5 signatures on a single page at varying orientations. Assert that the output array length matches the known signature count and that bounding boxes do not intersect beyond a 5px tolerance.

Logo and Decorative Element Rejection

Returns signatures_present: false or an empty signatures array for pages containing only logos, decorative borders, or stylized headers with script fonts.

A company logo in the header is returned as a signature with medium confidence. A cursive font in a section heading triggers a false positive.

Assemble a negative test set of 20 pages with logos, watermarks, and script headers but no actual signatures. Assert zero false positives across the set.

Initials vs. Full Signature Discrimination

Classifies full signatures as 'signature' and initials as 'initials' in the signature_type field. Does not omit initials from output.

Initials are either missed entirely or classified as full signatures. The signature_type field is null or defaults to 'unknown' for initials.

Use a document with both full signatures and initials in distinct fields. Assert that the output contains entries for both and that signature_type values are correct.

Confidence Score Calibration

Returns a confidence score between 0.0 and 1.0. Scores below 0.7 correlate with genuinely ambiguous marks (faint, overlapping, or partial). Scores above 0.9 correlate with clear, unobstructed signatures.

All signatures return confidence of 0.99 regardless of image quality. A smeared, barely visible signature returns confidence above 0.9.

Run the prompt on a set of 10 signatures with known quality degradation (clear, faint, overlapping text, partial crop). Assert that confidence scores monotonically decrease with degradation severity.

Overlapping Text Handling

Correctly identifies a signature that overlaps with printed text or other annotations. Returns signature_present: true and notes the overlap in an artifacts or notes field.

A signature overlapping a line of printed text is missed entirely. The model returns signature_present: false because the text confuses the detection.

Use a document where a signature is deliberately placed over a line of body text. Assert that the signature is detected and that the output acknowledges the overlap condition.

Empty Page Negative Handling

Returns signatures_present: false and an empty signatures array for a page with no marks, stamps, or annotations of any kind.

An empty page returns a low-confidence signature detection due to scanner noise or page texture. The signatures array is non-empty.

Include a blank scanned page in the test set. Assert that signatures_present is false and the signatures array length is zero.

Stamp vs. Signature Discrimination

Classifies notary stamps, company seals, and date stamps as 'stamp' in the signature_type field, distinct from 'wet_ink' or 'digital_image' signatures.

A notary stamp is classified as a 'wet_ink' signature. A circular company seal with text is returned as a signature with high confidence.

Use a document page containing both a notary stamp and a wet ink signature. Assert that the output contains two entries with distinct and correct signature_type values.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a single-page test PDF. Remove strict schema requirements initially—accept free-text JSON or markdown tables. Use a frontier model (GPT-4o, Claude 3.5 Sonnet) with default temperature. Focus on getting correct presence detection and type classification before adding bounding boxes or multi-signature handling.

Prompt modification

code
Detect whether this document page contains a signature. Return JSON with:
- "signature_present": boolean
- "signature_type": "wet_ink" | "digital" | "stamp" | "none"
- "confidence": 0.0-1.0

Do not flag printed names, initials in text, or decorative elements as signatures.

Document: [DOCUMENT_IMAGE]

Watch for

  • False positives on printed letterhead signatures and logos
  • Confusing initials in form fields with full signatures
  • Missing faint pencil signatures on low-contrast scans
  • No confidence calibration—scores may be overconfident on ambiguous marks
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.