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

Listen to this guide

JevMade’s plain-English explanation

0:00 /

AI narration

Credits

“LLMs Generate. Jev Decides. Software Should Know the Difference” by Mariano Barcia / Mokapot Labs. Read the original source.

This expanded guide is an AI-narrated adaptation prepared by JevMade. It expands the source’s essential ideas, examples and caveats in JevMade’s own words and is not a word-for-word reading. The synthetic voice does not imitate the author or imply their endorsement.

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.

Keep this for later

Sign in to bookmark experiments, guides and videos, and keep notes only you can see.

Continue to sign in

We’ll bring you back to this listing.