Aurixa

Zdroj: canva.com
The ChatGPT solution seemed to be the first option. In the end, it turned out to be unnecessarily complicated and it was enough to use a “regular” database and query it using SQL. Thanks to our solution, the client saved hundreds of hours of ant work and got a simple table that everyone could use.
The brief was clear: I needed to find dozens of word combinations in thousands of documents and emails. All on a limited budget.
At first, we got swept up in the fashion wave and went the ChatGPT route, what else would a man think of when AI buzzworms are already jumping on him everywhere. However, we soon found out that this solution is more like catching sardines with shark nets and took a more conservative, and more importantly, more effective route.
We received over 12,000 documents and 2,000 email chains, with the last email at the top and all previous ones in the quote below it.
The challenge was to search through them for the keywords specified, so as to reduce as much as possible the number of documents that needed to be read manually. To do this, we chose, perhaps surprisingly, a straightforward solution – upload all the text to a database and query over it using SQL, specifically BigQuery over Google Cloud Storage.
Our journey was not without complications. Some PDF files were not machine readable because they were scans (image only). These had to be converted to plain text first using optical character recognition. Documents of more than a thousand pages then had to be split into smaller parts.
For each word string searched, there were a number of variations, e.g. for a three-word phrase, each word having two additional synonyms, there are 27 possible combinations. Moreover, we could not predict in advance how many occurrences we would find, i.e., whether we would be able to reduce the number of documents to read sufficiently at all. Thus, we prepared two levels for each word string – a general level, where we searched for occurrences of at least one of the synonyms, and a detailed level, where we searched for exact matches.
Thanks to the general level, in some cases we detected a “misleading clue”, where none of the synonyms appeared in the documents at all. In other cases, on the other hand, there were too many matches (typically hundreds). This is where the detailed level came in, where there were orders of magnitude fewer matches and the context could be better estimated.
“In such projects, it is necessary to anticipate what type of output will be most useful for the client. Sometimes it’s not the trendiest technology that you need to look for, but a proven solution. In this case, a spreadsheet as a signpost with outputs.”
František Kopřiva, Engagement Manager, Revolt BI
The final output from this solution was a simple table, which listed the number of matches found for each variant of the word string and a list of specific documents to examine. By converting all the documents to plain text, the exact position of the word in a particular document could then be found classically via a full-text search.
Our solution saved the client hundreds of hours of painstaking work without a certain result.