TRANSKRIP 🔗
WEBVTT
00:16.003 --> 00:19.715
Hello and welcome to the Time for AI podcast, the podcast
00:20.215 --> 00:23.652
that brings you the best AI conference speakers and allows them to
00:24.152 --> 00:27.615
sum up their presentation in 5 minutes. My name is Peter and I'm the
00:27.664 --> 00:31.982
host of this podcast in the same way as I've been in the previous 11
00:32.031 --> 00:36.363
episodes. This is episode number 12. And if you're interested into
00:36.556 --> 00:39.848
what is going on in the AI company
00:39.977 --> 00:43.656
integration fields, go and check out the previous
00:44.156 --> 00:49.225
recordings because we have some really, really great presentations
00:49.241 --> 00:53.465
from conference in the archive. But today we
00:53.609 --> 00:56.736
have a great guest and I'm very glad to welcome to the
00:57.236 --> 00:59.397
podcast Pierre-Louis Bonvin. Hey, Pierre.
01:00.407 --> 01:00.760
Hey there,
01:00.840 --> 01:02.123
Peter. Nice to be here.
01:02.828 --> 01:04.415
Nice to meet you too. How are you doing?
01:04.592 --> 01:08.071
How is life in Munich with Oktoberfest?
01:08.776 --> 01:12.784
Yeah, it's pretty, pretty nice. Just after this presentation,
01:12.864 --> 01:15.894
probably going to join a few friends in Oktoberfest as well.
01:17.097 --> 01:20.400
All right, we'll do this very briefly so that you can go and enjoy.
01:21.621 --> 01:25.390
some music and of course beers and
01:25.423 --> 01:28.687
Brezel and everything else that Munich has to offer.
01:31.348 --> 01:34.844
Pierre, you are the solutions engineer
01:34.957 --> 01:38.410
at Apprize. Can you tell us a bit about your company? What do
01:38.910 --> 01:42.174
you do and what is your job there? Maybe what's your favorite thing that you
01:42.222 --> 01:42.920
do in your job?
01:43.910 --> 01:45.685
So sure. So I'm a solution
01:45.717 --> 01:49.979
engineer at Apprize. Apprize is a an SDK—
01:52.276 --> 01:55.656
how to say— provider in the main space of
01:55.689 --> 01:59.515
document processing. So, imagine PDF
01:59.563 --> 02:02.793
generation or conversion PDFs to DOCX,
02:03.195 --> 02:07.212
whatever, visualization of PDFs inside a web viewer. So, we provide
02:07.276 --> 02:10.759
an SDK, which is a software development kit,
02:11.324 --> 02:14.855
for developers to use it and integrate it in their own applications.
02:16.580 --> 02:19.834
So yeah, and as a solution engineer, basically I'm
02:20.268 --> 02:23.269
the counterpart to sales. So when we go together in a call,
02:24.264 --> 02:28.052
I try to understand the use case, I try to find the appropriate
02:28.552 --> 02:32.884
solution to their use case, and most of the time some technical questions
02:33.384 --> 02:36.639
about is it integratable in their environment and such. So I'm
02:37.139 --> 02:40.861
kind of a, yeah, a solution
02:41.198 --> 02:45.148
engineer. I'm trying to give them some consultants
02:45.648 --> 02:49.807
about how to integrate it in their environment. Sometimes we
Load full transcript
do some proof of concepts
02:50.307 --> 02:54.129
for them to show them that our technology delivers what they requested.
02:54.914 --> 02:57.270
Yeah, that's pretty much it.
02:59.850 --> 03:01.743
But your background is a developer, right?
03:02.664 --> 03:03.877
Yes. So I did
03:04.201 --> 03:07.904
computer science in the university. Then I had some jobs
03:08.001 --> 03:11.526
as a software developer. But I kind of wanted to be a
03:12.026 --> 03:15.825
bit more closer to the customer, less coding, more talking.
03:16.338 --> 03:19.995
And I think I reached a good 50/50 balance here to
03:20.011 --> 03:23.733
be able to still code a little, but also talk with the customer.
03:24.182 --> 03:27.566
And because our solution is platform agnostic, I also
03:28.066 --> 03:31.223
get to experience new coding languages,
03:31.736 --> 03:35.987
like the mobile development was completely new. And we have also mobile SDK.
03:36.099 --> 03:39.217
So going in this discovering this front is pretty
03:39.717 --> 03:39.813
nice as well.
03:40.877 --> 03:44.034
Is your job now that you're not 100%
03:44.534 --> 03:48.555
developer more safe from AI or what would
03:52.638 --> 03:55.908
More safe from AI, you mean? Yeah, I mean—
03:56.101 --> 03:58.775
Bit of a joke, but maybe not.
04:00.060 --> 04:03.200
Yeah, I mean, of course you can rely on
04:03.670 --> 04:07.872
Especially when you have such a broad variety
04:08.372 --> 04:12.254
of technologies, you kind of start to lose a bit the overview about
04:12.656 --> 04:16.155
all the stuff we have. So having a knowledge base
04:16.187 --> 04:19.799
and using AI maybe to help you find the right documentation can be
04:20.299 --> 04:23.652
helpful. But at the end of the day, the personal connection to the
04:24.152 --> 04:28.404
customer, having someone to talk to about the problem, is still a nice
04:28.904 --> 04:32.497
thing. I mean, it will take some ages or some time until maybe this is
04:32.562 --> 04:36.058
also reproducible, but— Yeah. Right, right. Um,
04:36.891 --> 04:40.658
you— I've invited you to the podcast because you were presenting at
04:41.158 --> 04:44.842
the Infobip Shift conference. You're now the second guest from that
04:45.342 --> 04:48.834
conference. I really liked the lineup there. I think that was great,
04:48.850 --> 04:51.976
a great lineup of speakers. Um, how did
04:52.476 --> 03:48.979
you like— how did you see the conference?
03:52.638 --> 04:54.941
Was this your first time? It was
04:55.441 --> 04:59.526
in Split, right? In Zadar, in Croatia. Yeah, in Zadar.
04:59.590 --> 05:03.261
Yeah, it was amazing. Uh, I was in a couple of conferences before,
05:03.277 --> 05:07.697
in JITEC mainly. It was very big. It very crowded.
05:08.278 --> 05:12.155
But this Zadar conference felt very personal. It was just a few
05:12.655 --> 05:16.111
booths. It was just in one area. We also had our company representing there
05:16.611 --> 05:20.188
in a booth, but the people were more,
05:20.542 --> 05:24.508
how to say, I don't want to offend
05:25.008 --> 05:28.581
anyone, but this was more a younger crowd and they were a bit more techie
05:28.597 --> 05:31.398
in the space, a bit more interested about newer technologies.
05:31.950 --> 05:35.319
A lot of startups that were also looking for this kind of solutions,
05:35.335 --> 05:39.190
they wanted to basically all use SDKs to develop
05:39.206 --> 05:42.060
everything by themselves instead of relying on SaaS. So it was,
05:42.156 --> 05:45.506
it was very cool. I loved the crowd there. The people were very friendly.
05:45.554 --> 05:49.273
And of course, being in the Balkans and Croatia, it's very welcoming people,
05:49.369 --> 05:51.277
very warm hearts and everything.
05:52.127 --> 05:56.006
So I think this is very important what you've mentioned, right? I sort
05:56.022 --> 05:59.436
of see that conferences are separated. Some of them are
05:59.485 --> 06:02.931
more technical and it is, it is required
06:03.431 --> 06:07.355
that you understand the background. Some conferences are more strategic.
06:07.419 --> 06:10.917
So, you know, having technical Technical conferences seem like to be a very important
06:10.933 --> 06:14.528
thing, especially now when the tech is changing so fast.
06:14.640 --> 06:17.866
So you really have to understand what's the background, right?
06:17.930 --> 06:21.397
So I really like that you mentioned that. So yeah,
06:21.541 --> 06:25.553
your presentation at Infobit was called Garbage In, Garbage Out:
06:25.698 --> 06:29.694
Engineering Reliable AI Document Extraction Pipelines.
06:30.368 --> 06:33.417
Pierre, here are your 5 minutes to sum up your presentation.
06:34.043 --> 06:37.801
Before I Let you jump into the presentation. If your company
06:38.058 --> 06:42.011
has AI but no one is using it, if you don't see
06:42.155 --> 06:46.252
real business results, go to petermesarets.ai.
06:46.911 --> 06:50.510
There you can find the AI execution system that
06:51.010 --> 06:55.233
will allow you to bring AI into your company strategically,
06:55.651 --> 06:59.909
organized, and in such a way that it brings business results.
07:00.471 --> 07:04.177
petermesarets.ai. And now let's hear what
07:04.677 --> 07:08.266
was the presentation about. All right. So basically,
07:08.346 --> 07:11.521
the main idea behind my presentation was pretty simple.
07:11.569 --> 07:15.402
So when we talk about document AI, we focus
07:15.902 --> 07:19.523
a lot on the AI part, but not enough on the document part itself.
07:20.533 --> 07:23.564
So I started the presentation with a normal example.
07:24.061 --> 07:27.541
Probably you also went through the same. You're at the conference and you
07:27.813 --> 07:31.533
go for dinner, you have a couple of beers, and at the end, you need
07:31.581 --> 07:34.759
the receipt for your expenses, of course. And you just take a
07:34.807 --> 07:38.228
quick picture with your phone and it might be a little blurry.
07:38.725 -->
07:42.741
The lighting is not great or the receipt is not really completely straight.
07:43.720 --> 07:47.334
And then on Monday you upload that image into an expense
07:47.834 --> 07:51.333
system and you expect the AI behind the system to basically
07:51.413 --> 07:55.043
understand everything what's in this document. And if it
07:55.543 --> 07:59.540
doesn't, well then we blame the technology. We say the OCR was not good
08:00.040 --> 08:03.092
enough. The AI is not good enough. We need a better LLM, whatever.
08:04.610 --> 08:08.049
But often the problems start way before all
08:08.098 --> 08:10.956
of this, before the technology is even involved.
08:12.070 --> 08:15.129
And that's actually, like you said, the first point is garbage in,
08:15.194 --> 08:18.415
garbage out. So if the quality of the input is bad,
08:18.990 --> 08:22.368
everything that comes afterwards becomes also bad
08:22.642 --> 08:26.149
or harder at least. So OCR becomes less reliable.
08:26.929 --> 08:31.164
Extraction becomes messy. And if you give that
08:31.228 --> 08:35.563
incorrect information to the LLM, the LLM
08:35.644 --> 08:40.621
doesn't necessarily know that something went wrong earlier, and it just
08:41.121 --> 08:45.326
gives you confidently the wrong answer. So instead of asking,
08:45.422 --> 08:48.987
how can we make the AI smarter, we should better ask, how can we give
08:49.452 --> 08:51.347
the AI better information?
08:53.081 --> 08:57.128
And that leads to the second point. So document AI isn't necessarily
08:57.626 --> 09:01.593
one step. It should be a whole pipeline. So you
09:01.882 --> 09:05.222
capture the documents, you check whether the quality is good enough.
09:05.832 --> 09:09.285
Maybe you crop it, you straighten it, you remove noise, you overall just
09:09.785 --> 09:13.332
improve the quality. Then you run the OCR and then
09:13.846 --> 09:18.086
you extract the information that you actually need. So not the whole OCR
09:18.102 --> 09:21.627
text, just Yeah, a bunch of information that you actually
09:21.643 --> 09:25.590
want to send then to your AI or LLM to further
09:25.928 --> 09:29.448
process. And so
09:29.608 --> 09:33.803
the important message is that the LLM or the AI agent should be
09:33.867 --> 09:37.627
the very last step, not the very first step. It's very tempting
09:37.643 --> 09:41.539
to just take an entire PDF and just send everything to ChatGPT
09:42.039 --> 09:44.453
and say, hey, figure this out, give me the information I need.
09:45.262 --> 09:49.671
It does sometimes work well, but If you process this over thousands
09:50.171 --> 09:53.663
of millions of documents, you will start to see that it's pretty inefficient.
09:53.759 --> 09:57.255
And yeah, that's where it matters. So one
09:57.303 --> 10:01.664
example in my presentation that I give was we took a— with
10:01.696 --> 10:05.048
an image that we took with a picture, a very casual one,
10:05.705 --> 10:08.992
and it was around 5 megabytes. And when we
ran
10:09.492 --> 10:13.434
it through OCR without completely raw, without any preprocessing, it took
10:13.658 --> 10:17.639
about 190 seconds. And then when we did some preprocessing
10:17.671 --> 10:21.543
on this image, so cropping, adjusting the quality of the image,
10:21.623 --> 10:24.660
etc., we reduced
10:24.740 --> 10:28.210
the file size immediately, massively, and it
10:28.274 --> 10:31.889
took only 77 seconds to
10:32.389 --> 10:35.632
process all of it. And then another
10:35.664 --> 10:38.717
step was to apply smart data extraction. So this is what
10:39.217 --> 10:44.226
we call smart data extraction. It's basically understanding
10:44.339 --> 10:48.450
the context of this image. So instead of just handing
10:48.579 --> 10:54.007
out a huge file of OCR text with coordinates,
10:54.120 --> 10:56.994
it's just key-value pairs that are on this page.
10:57.990 --> 11:01.523
And this basically took only 8 seconds to extract.
11:02.744 --> 11:06.598
So yeah, that leads to the 3rd point that I wanted to talk about.
11:06.727 --> 11:10.292
And all the biggest improvements happened before
11:10.517 --> 11:13.983
AI. So we We spend a lot of time looking for the newest
11:14.047 --> 11:18.185
model or the smartest, the fastest model, but sometimes
11:18.217 --> 11:21.633
just improving these steps before that in the pipeline
11:21.809 --> 11:25.322
make a much bigger impact. You can improve accuracy,
11:26.156 --> 11:29.540
the processing time. You can reduce the amount of data
11:29.620 --> 11:32.940
that you're sending out to the LLM. This, of course,
11:33.052 --> 11:36.741
reduces costs and also sometimes a
11:37.241 --> 11:41.586
little bit of privacy problems because sometimes you send out PDFs and all
11:41.634 --> 11:45.803
the sensitive information is still on there. But with preprocessing,
11:45.899 --> 11:49.389
you can eradicate it. You can filter out only the information
11:49.889 --> 11:53.838
you want to send out. Yeah. So if
11:54.338 --> 11:57.357
I had to summarize the whole presentation, the 3 ideas, it would be, first,
11:57.695 --> 11:59.768
the quality of your input matters, of course.
12:00.201 --> 12:03.782
Second, to think about document AI as a complete pipeline
12:03.815 --> 12:07.291
and not just one model. And third, before trying to
12:07.791 --> 12:11.843
make the AI smarter, you should improve all the steps before
12:12.343 --> 12:15.857
that. Yeah. So that's really what I
12:16.357 --> 12:20.384
meant with garbage in, garbage out. All right.
12:20.769 --> 12:25.504
You talked briefly about the cost and of course cost of tokens
12:25.585 --> 12:29.100
and cost of AI is the one thing that everyone is talking about right
12:29.600 --> 12:31.797
now. Sending a PDF,
12:33.194 --> 12:36.806
raw PDF without any preprocessing to an AI And
12:36.998 --> 12:40.302
sending data based on all
12:40.350 --> 12:44.022
of the steps that you have described to the
12:44.103 --> 12:47.422
AI. Can you talk a bit about the difference on
12:47.922 --> 12:51.127
the cost on what the AI has to do and what are the results?
12:52.073 --> 12:56.082
So basically what happens if you send just a raw
12:56.563 --> 13:00.075
image to AI, the AI needs to first
13:00.575 --> 13:04.216
process it with an OCR engine. This already costs
13:04.328 --> 13:09.518
time and a lot. And it also just processes the whole page
13:09.695 --> 13:13.441
or PDF that you give him. If it's 200 pages, it will process
13:13.634 --> 13:17.450
each of them page even if only a fracture of it
13:17.950 --> 13:21.916
is necessary. And then it has to analyze all of this
13:22.467 --> 13:26.741
OCR text that it just have been given. And if you would structure
13:26.757 --> 13:30.557
it a little bit different and apply all of these steps beforehand,
13:31.142 --> 13:35.242
then we can actually transform this OCR into a
13:35.742 --> 13:39.130
more structured output. So we have, let's say, a JSON
13:39.340 --> 13:43.942
with just the
13:45.219 --> 13:49.067
invoice number, the ID of the user, and maybe some
13:49.358 --> 13:52.658
amounts. And these are the only information that we
13:53.158 --> 13:57.012
would then send to the LLM to process instead of the whole page.
13:58.339 --> 14:01.854
I think this is a very, very common problem
14:02.354 --> 14:04.295
that very often happens, that AI is going to solve everything idea. We'll just give
14:04.795 --> 14:09.839
it to If the
14:10.339 --> 14:14.051
people that are listening go into the archive, 2 episodes ago I
14:14.551 --> 14:18.080
talked to Mateusz from
14:18.225 --> 14:23.283
AWS. We talked exactly about this, how we should do the decision-making
14:23.395 --> 14:26.684
on what should be AI and what shouldn't be. It can be a script,
14:26.700 --> 14:30.328
it can be automation, how this, all of that should be
14:30.828 --> 14:33.654
done. But I think that's a very good point. Another question for you.
14:34.479 --> 14:37.813
When we look at the pipeline that happens before
14:38.864 --> 14:42.892
sending data to the AI, what do you think are the— what
14:43.392 --> 14:47.144
is the most common mistake that happens in those pipelines that companies
14:47.177 --> 14:50.572
should think about when they think about structuring such a
14:51.072 --> 14:54.782
pipeline? So they
14:54.815 --> 14:59.048
mostly forget about the data itself, how it is preprocessed.
14:59.096 --> 15:02.162
So because, yeah, if we send in garbage, we just don't care about the quality
15:04.020 --> 15:07.929
quality, we hope everything AI to solve. It does matter because
15:08.041 --> 15:11.650
at the end, it's just an engine that works on what it's given. And OCR,
15:11.666 --> 15:15.338
even if it's the best OCR, if I would give them a paper that I
15:15.838 --> 15:19.396
completely shriveled, it will not be able to imagine
15:19.508 --> 15:22.699
what's behind one of these broken parts.
15:23.052 --> 15:26.051
So the preprocessing, the sanitizing,
15:26.099 --> 15:29.547
sanitation of data in all forms, it doesn't
15:29.692 --> 15:32.290
need to be only a picture of a phone.
15:32.643 --> 15:35.879
It can be also a JSON that you get,
15:35.959 --> 15:39.428
it first needs some restructuring to be able
15:39.928 --> 15:43.171
to be correctly processed. So yeah, I think this is one
15:43.220 --> 15:48.140
of the most points that some companies ignore
15:48.461 --> 15:51.789
is the part before sending everything
15:51.902 --> 15:55.296
to AI. All right, excellent. And of course,
15:57.559 --> 16:00.863
you as a company also can help others,
16:01.119 --> 16:04.265
other companies set up such a pipeline? If I understand, this is
16:04.765 --> 16:08.535
something that you do, right? Exactly. So yeah, we provide a
16:09.035 --> 16:12.419
multitude of SDKs, not only about processing PDFs already when
16:12.516 --> 16:15.630
they are digitalized, but we also have, for example,
16:15.662 --> 16:18.920
something— a company called Scanbot that we acquired,
16:19.273 --> 16:22.804
and they focus very much into scanning documents,
16:23.206 --> 16:28.230
extracting information from these documents, but also the ability to automatically
16:28.326 --> 16:32.420
detect if the quality of the image is bad so that it asks
16:32.920 --> 16:36.177
you to literally retake the picture so that when the picture is taken,
16:36.209 --> 16:39.500
you can be sure that when it's digital inside your system,
16:39.581 --> 16:43.113
that it's good quality. And that OCR can handle it way
16:43.613 --> 16:47.529
better. Is all of that relevant also to other
16:47.689 --> 16:51.431
file types next to PDF or JPEG? So, for Excel
16:51.463 --> 16:54.112
files or Word files, is this also relevant?
16:55.541 --> 16:59.940
I mean, definitely. Well, Aprize is mainly focused on extracting
16:59.972 --> 17:03.360
information out of a PDF. But what we also do
17:03.505 --> 17:07.262
is— and of course, there's way more file types than PDFs. There's Word,
17:07.278 --> 17:11.773
Excel, like you mentioned. What we can do also is to convert
17:12.560 --> 17:15.177
all these Office files like DOCX, Excel,
17:15.948 --> 17:19.641
and PowerPoints into PDFs. And then from the PDF, we use the OCR
17:20.141 --> 17:23.655
on top to extract information. Yeah. So basically, from any file type to PDF and
17:24.155 --> 17:28.311
then extracting the information from a PDF. That's kind of the workflow.
17:28.648 --> 17:31.506
we strive for. All right, excellent.
17:32.325 --> 17:36.917
Pierre, if people want to talk to you more about document
17:37.417 --> 17:41.317
extraction, where can they find you? Do you have any future conferences planned
17:41.817 --> 17:45.186
where you'll be talking? So I think currently this year
17:45.686 --> 17:48.462
not, but we are planning on next year.
17:49.184 --> 17:53.070
But they can follow me on LinkedIn, of course, and I'm happy to provide more
17:54.326 --> 17:57.951
updates on the status and where I will be next and also
17:58.451 --> 18:01.725
might be speaking. All right. So yeah. All right.
18:01.773 --> 18:05.000
We'll put the link to your LinkedIn
18:05.161 --> 18:08.870
into the show notes. Pierre, thank you very much for
18:08.950 --> 18:12.996
summing up your presentation and being the guest on the podcast and
18:13.912 --> 18:16.818
enjoy Oktoberfest. Thank you very much.
18:17.749 --> 18:19.210
Bye. Bye-bye.
18:36.886 --> 18:41.063
Thank you for listening, and go and subscribe on podcast
18:41.563 --> 03:55.908
or on YouTube wherever you are. I'm going—
03:56.101 --> 18:44.885
I'm trying to bring as many episodes as
18:45.385 --> 18:49.427
I. I can. And if you have ideas on who should be on this podcast,
18:50.840 --> 18:51.904
send me an email to, uh,
18:52.549 --> 18:56.563
info@timeforai.show and
18:56.838 --> 18:59.579
leave a review. Thank you and have a great day.