Grooper Help - Version 25.0
25.0.0026 2,185

Spatial Grounding

Data Fill Method Grooper.GPT

Assigns spatial location data to fields within a Data Field Container using LLM processing.

Remarks

The Spatial Grounding fill method enriches extracted data by adding precise location information which links each field back to a page number and location on the source document. This is useful for post-processing outputs from LLM-based extraction mechanisms such as AI Extract, which do not inherently capture location data.

How It Works

  • Prematching: Attempts to pre-match field values to their locations using OCR and document content before invoking the LLM.
  • LLM Processing: Presents the LLM with both the extracted data and location data from the document, instructing it to update the JSON structure with spatial properties (pageNo, bounds).
  • Results Application: Updates each field with the location information returned by the LLM, ensuring that extracted values are mapped to their exact position on the page.
  • Configuration:
    • The 'Document Quoting' property controls how location data is presented to the LLM.
    • The 'Included Elements' property restricts which Data Elements are processed for spatial grounding.
    • Extension options allow fine-tuning for fields, tables, and sections.

Use Cases

  • Document Review: Facilitates user validation by showing the spatial origin of each extracted value, improving transparency and trust in automated extraction.
  • Quality Assurance: Enables detection of extraction errors by comparing field values to their actual location in the document.
  • Workflow Integration: Supports downstream processes that require location-aware data, such as redaction, annotation, or visual overlays.

Extension Options

Spatial Grounding supports per-element customization through extension objects based on Data Element Extension:

  • Spatial Grounding Field Options:
    Allows you to exclude individual fields from parent bounds calculations using the ExcludeFromParent property.
    This is useful when certain fields should not influence the computed spatial bounds of their parent section or table row.

  • Spatial Grounding Section Options:
    Enables computation of section bounds from descendant fields after spatial grounding via the ComputeBounds property.
    This helps define the visual extent of a section based on the spatial positions of its child fields.

  • Spatial Grounding Table Options:
    Provides the ability to compute table row bounds from descendant fields after spatial grounding using the ComputeBounds property.
    This is useful for visually grouping table rows or for downstream processes that require row-level location data.

These extension options are configured as embedded objects on their respective Data Field, Data Section, or Data Table elements, inheriting from Data Element Extension. They allow granular control over how spatial grounding is applied and how bounds are calculated.

Diagnostics

  • Writes summary information to the diagnostic log, including the number of fields successfully pre-matched to location data.
  • Adds the full LLM response as a JSON artifact (Response Data.json) for review and troubleshooting.

Notes

  • The accuracy of location assignment depends on the quality of OCR data and the clarity of the document's layout.
  • For best results, configure quoting and included elements to focus the LLM on relevant content and fields.

Properties

NameTypeDescription
General
Options

See Also

Notification