AI-powered document chat apps, such as Bunni, are a new and innovative way to search and interact with documents. They use AI to understand the content of documents and to answer your questions in a comprehensive and informative way.
This blog post explains how AI-powered document chat apps work, step-by-step. It also includes an infographic that provides a visual overview of the process.
This blog post explains how AI-powered document chat apps work, step-by-step. It includes an infographic that provides a, non technical, visual overview of the process, followed by a more detailed explanation. Great if you're new to AI and curious to understand how it all fits together.
Step 1 - Upload
You upload your documents to the chat app.
Step 2 - Process
Each uploaded document is processed and split into chunks, each chunk is then transferred into a database. How the document is split up during processing can vary between apps. Some may split the documents by pages, others by paragraphs or by sentence. The size of the stored chunks can affect the quality of the answer.
For example, if the chunks are too small, the AI may not be able to get enough context to understand the question and provide a comprehensive answer. On the other hand, if the chunks are too large, the AI may take longer to process them.
For this reason, this step's setup can vary between apps.
Step 3 - Question
Once the document is processed it is ready for you to ask it a question. It could be a simple question like "Who wrote this document and when was it published?" to something more specific and detailed. How you write the prompt can influence the quality of the answer, I'll be writing a longer blog about this soon with tips and sample questions!
Step 4 - Search
Before asking AI your question the app needs to find the sections of your document that are likely to contain an answer. Each document chunk is compared to the question, using a mathematical formula. The ones that have a high similarity are then passed on to the next step.
Step 5 - Prompt
The prompt is the instructions that are sent to AI that will enable it to answer your question. How the prompt is written and what data is sent will dramatically affect the quality of the answers. The prompt will vary between apps but most will include variations of the following:
-
Your question
-
The chunks of the document found in Step 4 - search
-
Instructions on the format the answer should be in.
Step 6 - Artificial Intelligence (AI)
The chat app sends the prompt instructions to an AI Service. At Bunni we use OpenAI. The AI then uses the instructions to work out the best answer to your question and sends this back to the chat app.
The AI service charges the chat app for each answer it's sent. Including those for the demo documents.
Step 7 - Answer
The chat app passes the AI answer to you and most will tell you which page of your document the information is from.
The app is then ready for your next question!