Comment by ljm

7 days ago

How do you deterministically verify that information was correctly entered?

Is it just

  validates :email, format: :email

In Rails?

It depends on the source and destination. The trickiest case is when we're using browser agents for data entry. We can use the fact that we focus on repetitive tasks to our advantage - we know what sections of UI we need to check, and for what data. We can verify correctness by re-extracting data from the destination UI (via the DOM or OCR) and checking:

That all expected fields were entered correctly.

That no unexpected or extraneous data was added.

When we have access to a direct data source (like an API or file store), verification is simpler — we can do deterministic checks and directly confirm the values.

We're also building a validation library for common field types (dates, contact info, etc.) to enforce constraints and avoid propagating unverifiable or out-of-range values.

  • If you have an API, why are you using browser agents?

    • We don't use browser agents if an when we have an API - we prefer the strongest data types we can access. It comes down to what our customers can work with. Some of them are fairly technical (have an IT team), and some aren't (have a legacy portal and operate on spreadsheets / paper).