{"slug": "i-built-a-rag-document-assistant-with-fastapi-react-faiss-and-ollama", "title": "I Built a RAG Document Assistant with FastAPI, React, FAISS and Ollama", "summary": "A developer built CloudRAG, an open-source retrieval-augmented generation document assistant that lets users upload documents and ask questions about them. The application uses FastAPI for the backend, React for the frontend, FAISS for local vector search, and Ollama for local LLM inference, with Docker and Pytest used during development. The developer added retrieval evaluation and testing, and experimented with a Qdrant Cloud integration that was not successfully deployed, leaving FAISS as the working implementation.", "body_md": "I've been learning more about Retrieval-Augmented Generation (RAG), and I wanted to understand what actually happens inside a RAG application.\n\nSo instead of building another simple chatbot, I decided to build a complete application around documents.\n\nThe result is **CloudRAG**:\n\n[https://github.com/abderaoufsec/CloudRAG](https://github.com/abderaoufsec/CloudRAG)\n\nThe idea is straightforward.\n\nYou upload documents, then ask questions about them.\n\nInstead of sending the question directly to the LLM, the application first searches the uploaded documents for relevant information. That information is then given to the LLM as context.\n\nThe simplified flow looks like this:\n\n```\nDocument\n   ↓\nText extraction\n   ↓\nChunking\n   ↓\nEmbeddings\n   ↓\nFAISS\n   ↓\nRelevant chunks\n   ↓\nOllama\n   ↓\nAnswer + sources\n```\n\nFor the backend I used:\n\nFor the RAG pipeline:\n\nFor the frontend:\n\nI also used Docker and Pytest during development.\n\nI wanted the project to work locally without depending on a paid external service.\n\nFAISS makes it possible to store and search the embeddings locally, which made it a good fit for the current version of the project.\n\nThe biggest thing I learned is that RAG isn't simply:\n\n\"Send documents to an LLM.\"\n\nThere are several steps that affect the final result.\n\nHow you split documents matters.\n\nHow you generate embeddings matters.\n\nHow you retrieve relevant chunks matters.\n\nAnd you need a way to evaluate whether your retrieval is actually useful.\n\nThat's why I also added retrieval evaluation and testing to the project.\n\nI also experimented with Qdrant Cloud and added an integration for it.\n\nHowever, I wasn't able to successfully deploy and validate the Qdrant part.\n\nSo the current working implementation uses FAISS locally.\n\nI'd like to come back to the Qdrant deployment later and compare it with the local FAISS setup.\n\nThis project was mainly a learning exercise, but it gave me a much better understanding of what goes into building a RAG application.\n\nI now have a better understanding of:\n\nThe source code is available here:\n\nI'd be happy to hear feedback, especially from people who have worked on improving RAG retrieval quality.", "url": "https://wpnews.pro/news/i-built-a-rag-document-assistant-with-fastapi-react-faiss-and-ollama", "canonical_source": "https://dev.to/abderaouf-b/-i-built-a-rag-document-assistant-with-fastapi-react-faiss-and-ollama-1bgj", "published_at": "2026-09-11 23:29:08+00:00", "updated_at": "2026-09-12 00:22:18.727683+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "generative-ai", "ai-tools", "developer-tools"], "entities": ["CloudRAG", "FastAPI", "React", "FAISS", "Ollama", "Qdrant", "Docker", "Pytest"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-rag-document-assistant-with-fastapi-react-faiss-and-ollama", "markdown": "https://wpnews.pro/news/i-built-a-rag-document-assistant-with-fastapi-react-faiss-and-ollama.md", "text": "https://wpnews.pro/news/i-built-a-rag-document-assistant-with-fastapi-react-faiss-and-ollama.txt", "jsonld": "https://wpnews.pro/news/i-built-a-rag-document-assistant-with-fastapi-react-faiss-and-ollama.jsonld"}}