Hello,
I have started trying AI Builder to process invoices. I have tried training a custom model and have some questions. I hope you could help me in this matter.
1. When I create a custom model by using "invoice" document type, does that mean that the custom model that I create will be a "more knowledgeable" version of the prebuilt model? I mean, does it build more knowledge of new invoice patterns (that are provided for the training) on top of the knowledge that the prebuilt model already has? The reason why I ask this is because sometimes, the line items that are extracted with the prebuilt model are more accurate than the ones that are extracted with the custom model even though the custom model was trained with that specific invoice layout.
Example:
- How I tagged tha line items during training
- The line items extracted with the prebuilt model
- The line items extracted with the custom model that was trained with this specific invoice layout using 5 samples
2. Is currency not a default field in "invoice" document type? I can choose it while working on a flow but it doesn't exist in the "invoice" document type. I noticed that about half of the time, the prebuilt model couldn't detect the currency on the invoice as well. Is this being worked on?
3. If a model can be trained with multiple invoice layouts using collections, what would be the reasons or scenerios to have multiple models? why not always put every invoice layouts in one model?
4. Would a custom model that was trained with one specific invoice layout deliver more accurate results when using to extract data from invoices with that layout compared to another custom model that was trained with several invoice layouts including the layout?
5. Sometimes a text on an invoice can be two things (exp. "customer name" and "costomer address recipient", "customer address" and "billing address") but it is not possible to tag the same text with more than one fields. Would this maybe change in the future?
6. Line items table of some invoices has more columns than the default line items table of the "invoice" document type but it is not possible to add more columns to the default line items table. It is not possible to tag the line items table more than once as well. In this case, if I want to extract the line items table with more columns than the available default columns, I have to define a new line items table with all the columns that I need, disable the default line items table during the tagging and just use the custom-defined line items table during the tagging?
7. Is there a best practice in tagging when an invoice has multiple pages with the same header and footer on every page and I want to extract data from the header/footer? I tried to always just tag everything on the first page but after the training, when I went back to edit the model, some tagged positions changed and were not on the first page anymore. The text on the header of the second page could be tagged. Is this normal, because I thought that tagged positions would always stay at the same positions?
Thank you in advance for your answers!
Hi @davidkr ,
Thanks for reaching out, I'll answer as best as possible to all these interesting questions, hope that'll help you in your AI Builder journey!
1- The custom model built starting with "Invoices" shouldn't be more or less knowledgeable that the Structured/Unstructured custom one. See that as a way to bootstrap tagging in a faster way. We recently did an update to the custom model, do you still see discrepancies with the Invoice prebuilt model?
2- Indeed currency symbol detection is not included. There are plans to include it in the future but no committed date on that.
3- Sometimes multiple models can be better if you have to do a conditional routing in a flow for instance. Otherwise yes building a unique model could perfectly do the job.
4- It shouldn't, especially if you add the deferent in separate collections.
5- Yes, each field should point at a different tag and there's no possibility to change that right now. However, if you have 2 fields that sometimes point at different text and sometimes at the same field, it would be possible to add a post-processing logic saying that if a field is empty, set the value of it with the field that is not empty.
6- Yes, that would be the right process.
7- When you have multi-page tables, you should tag all the pages otherwise you will have text not properly recognized. About the footer you could try to include it as a line in your table or perhaps tag it as a separate field.