JevMade

Sign in
← Back to guides

JevMade field notes / Java invoice architecture article

Separate invoice extraction from decisions

Mariano Barcia separates extracting invoice details, judging the evidence and controlling what the application does next.

Original by Mariano Barcia / Mokapot LabsIntegrations
Leave a noteWhat would you try with this? : Separate invoice extraction from decisions

Only you can see your notes.

Listen to this guide

JevMade’s plain-English explanation

0:00 /

Our summary

An invoice app needs to read unfamiliar company names and amounts, then match the invoice to a known property. Mariano Barcia explains why those are different jobs. His Java application keeps a text-generating model for reading the details and gives Jev the decisions with a fixed set of possible answers.

Jev answers two fixed-option questions together. One rates supplier evidence as explicit, strongly suggested or insufficient; the other picks a property from the supplied list. Ordinary code decides when to request image analysis. A person still confirms the recommendation, and separate application code handles archiving the invoice.

Picking an allowed property prevents an invented identifier, not a wrong match. The article describes an architecture rather than proving faster or more accurate invoice processing. Its useful boundary is that model judgments stay separate from human approval and external actions. The existing text model still extracts names, invoice numbers and amounts.

Key takeaways

  1. Separate reading new values from comparing known options. Extracting a company name is not the same as judging the evidence for it.
  2. Ask related questions together when they use the same invoice facts, while keeping the application's next steps in ordinary code.
  3. A valid selection is not necessarily correct. Keep human confirmation and external actions separate from the model's recommendation.

The supplier question judges evidence strength; it does not select a supplier from a catalogue. The article offers no measured performance comparison, and the application was not independently tested. The author's later '18 hours' article describes the development work on this integration.

DEV Community · Original published

Read the original guide Opens the author’s site in a new tab.

Your note

Only you can see this. Clear the text and save to remove it.

Keep what you save

Sign in to keep bookmarks and private notes on every device. We email you a link; there is no password, and the same link creates your account.