Many websites feature a chat window for visitor queries. This article shows how to create a test website with a chatbot using Retrieval-Augmented Generation (RAG) with MiniLM embeddings and no vector database. The application searches a PDF knowledge base, passes relevant passages to a small language model, and displays answers.
It serves as a proof of concept for implementing AI-powered answers about business hours or services. Users can deploy the application locally or on Hugging Face, though the system lacks the reliability for unattended customer support. The language model may invent facts or stray from the intended business topic.
Full source code is available on GitHub. The workflow demonstrates how to implement a functional chatbot using Gradio and Hugging Face ZeroGPU, requiring only a PDF and Python environment. It breaks down the process from project setup to running and testing the website, highlighting model constraints and the RAG approach that supplies reference passages without retraining the language model.
Source: Towards Data Science · Summarized by HeadlinesBriefing