RAG SYSTEM WITH COMMAND R FROM COHERE

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

 

 

As it’s our turn at the moment anyway and it’s all fresh in our minds, let’s make a documentation of the current status straight away. We’re currently working on the query system for the Memotech docs. This is what it currently looks like. And this is a PDF file in its original state. A human can’t do much with it. A computer can decipher it. The problem is that PDF files are not particularly structured. That is why we have a program here that can read and process such files. Everything that can be found in this data folder is then uploaded and converted into so-called embeddings in a database in JSON format. These are vector representations of the content from these files. These are all places that belong to Nettersheim. We downloaded them from Wikipedia, then vectorized them and uploaded them to the database and now we can use this to query them. This time we didn’t use OpenAI, but Cohere. They released a new model for such data queries last week. And as far as we’ve read, you can also use it as a local version for companies if you license it accordingly. There is a web interface that we can use from any device that has Internet access. In our case, it is currently still running locally. However, there is also the option of using an API, which is an application programming interface, which can then be addressed in Python or JavaScript. Christoph’s requirement was that we create a version that is able to query local databases from the knowledge documents and also specify the source. Let’s ask a simple question like: Which districts are there? Then we get an output and a source displayed here. However, the result is not complete because the question was not complete either. If we ask the question: What districts are there in Nettersheim? And give me a complete list, then we get significantly more districts displayed here. If we ask the question: "What is the mayor’s name? Then we get a different answer than if we ask the question: "What is the name of the mayor of Nettersheim? Because for many years it was Wilfried Pracht and he is still listed in various documents on Wikipedia. Only if we ask the question: "What is the name of the current mayor of Nettersheim? Then we get the really relevant answer. The quality of the question therefore has a decisive impact on the quality of the answer. Let’s ask the question: How high is the observation tower? Then we get the statement: The observation tower has a height of 14 meters. The source document here is the document on Nettersheim Marmagen in Wikipedia. Let’s call it up in the Google search. There should be a tower somewhere here and, as you can see, there are various towers. For example, the Eiffel Tower is mentioned here. The builder was related to a resident of Nettersheim. There are a total of twelve entries here that fit the tower theme. Here is the observation tower and we actually get the statement that the observation tower has a height of 14 meters. So the answer was correct. Assuming it had been wrong, we could now set a flag here and there is a corresponding file here. The question and the answer provided are now listed there together with the time and we can then check this in the future, because the point of the whole solution is not to ask about observation towers, but perhaps about the specifications of printer types or how to solve certain checkout problems. And a system like this stands and falls with the users. This means that if we get the wrong answers, we can press a button here and the system will gradually get better and smarter. Okay, that’s it for this video. Thank you for watching and we’ll see you in the next video. ​