Open comments for this post
For this project, I scrapped the UI and remade it. The base setup is still there. The sidebar and the main content area is still present, but I removed the ability to index and clear history. In the new UI, the sidebar allows the user to upload files, and the UI will show how many sections were indexed automatically. When the file is deleted, history and its related context will also be deleted. The QA part of the algorithm now answers more cleanly and provides follow-up questions as well. Moreover, the chat also shows its sources, the document’s text, when answering a question.
Coming to backend of the algorithm, I remade it as well. I first went to an OpenRouter API, which I had to fix for a long time as the file was not being converted to text properly, so the answers generated by the model were not correct. Then, I switched back to use a free Gemini Model for the answer generation and used a local embedding model to save tokens.
Open comments for this post
Added an OCR feature to allow handwritten text to be used. I also updated the user-query feature by allowing the user to select their own settings for the RAG pipeline. Moreover, I was able to allow the user to upload files and improved the UI to make it look better.
Open comments for this post
Finished backend and frontend connection.
Open comments for this post
I built the frontend and backend of this RAG pipeline using Python, GoogleGenAI, and Pinecone