Template design tips — lessons from processing 10k+ invoices

After processing over 10,000 invoices through Qomplement, here are my hard-won template design tips:

1. Keep field names descriptive but short
invoice_total > the_total_amount_on_the_invoice. You’ll thank yourself when writing downstream code.

2. Use fallback fields
Some invoices put the total at the top, others at the bottom. Add both locations as sources for the same field and let Qomplement pick the one with higher confidence.

3. Don’t over-extract
Start with the 5-6 fields you actually need. Adding 30 fields because “we might need them” just increases noise and processing time.

4. Test with your worst documents
Grab the 10 ugliest, most poorly formatted invoices you have and test with those. If your template works on those, it’ll work on everything.

5. Version your templates
Keep a changelog. When you tweak a template, note what changed and why. Future you will be grateful.

6. Set confidence thresholds
Don’t accept extractions below 80% confidence. Better to flag for review than to let garbage into your pipeline.

1 Like

Tip #4 is so true. I spent a week perfecting a template on clean sample docs, then it fell apart on the actual messy claims forms. Now I always start with the worst examples.

1 Like

Great list. I’d add: if you’re processing documents from multiple vendors/sources, consider having separate templates per source rather than one mega-template. The accuracy improvement is worth the extra setup time.

2 Likes