← Articles

Reading signed pages and querying large registers

A handwritten note beside a signature may be missing from the extracted text. A payment register may have hundreds of thousands of rows. These questions call for a page image or a table query.

Tools up close

What the agent does with a page and with a register

The data in these pictures is illustrative.

Looks at the page

Question: who signed the contract on p. 3, and is it stamped?
SupplierBuyer ALPHA LLC · COMPANY SEAL · with protocol ofdisagreements ✓ signed and stamped ✕ no stamp
Answer: the supplier signed and stamped. The buyer signed without a stamp and added by hand “with protocol of disagreements”.
The page reaches the model as a picture, so the stamp and the handwriting are visible. Recognised text has neither.

Queries the table

Question: which five debtors owe the most across the whole register?
The register does not fit in an answer, so the agent writes a query. You never have to.
SELECT debtor, SUM(amount)
FROM registry
GROUP BY debtor
ORDER BY 2 DESC
LIMIT 5
debtortotal
Alpha LLC12.4 m
Beta JSC9.1 m
Gamma LLC6.7 m
The query can only read. It cannot change your data.

Looking at the page

OCR may pick up a company name from a stamp and miss the stamp itself. Handwriting next to a signature can disappear too.

The agent can open the relevant page as an image. This also helps with charts and scanned tables whose columns have shifted in the extracted text.

Querying the table

NeedleSearch preserves spreadsheet rows and columns. To find the five largest debtors or count payments above a threshold, the agent runs a query over the table.

The query is read-only and scoped to the selected table. If the result is too large to return, the agent has to narrow it.

Interest, penalties and working-day deadlines use a separate calculation tool.

Questions and answers

Why would the agent look at a page as an image?

Recognised text can lose stamps, handwriting next to a signature, charts and scanned tables whose columns have shifted. Opening the page as an image shows what OCR missed.

How does the agent answer questions about a table with hundreds of thousands of rows?

It writes a read-only query scoped to the selected table instead of reading every row. If the result is too large to return, the agent has to narrow it.

Can the query change my data?

No. The query can only read, and it is limited to the selected table.