sidebar_position: 3
:::warning This tutorial is a community contribution and is not supported by the OpenWebUI team. It serves only as a demonstration on how to customize OpenWebUI for your specific use case. Want to contribute? Check out the contributing tutorial. :::
In this tutorial, you will learn how to use Retrieval-Augmented Generation (RAG) with OpenWebUI to load real-world documentation as a knowledge base. We will walk through how to use the latest OpenWebUI Documentation as an example for this setup.
Retrieval-Augmented Generation (RAG) combines LLMs with retrieved knowledge from external sources. The system retrieves relevant data from uploaded documents or knowledge bases, enhancing the quality and accuracy of responses.
This tutorial demonstrates how to:
Follow these steps to set up RAG with OpenWebUI Documentation:
Download the Documentation:
Extract the Files:
main.zip file to get all documentation files.Locate the Markdown Files:
.md and .mdxextensions (tip: search for *.md*).Create a Knowledge Base:
OpenWebUI DocumentationClick Create Knowledge.
.md and .mdx files from the extracted folder into the OpenWebUI Documentation knowledge base.Navigate to Models:
Configure the Model:
OpenWebUISave the Model.
Start a New Chat:
OpenWebUI model.Example Queries:
User: "How do I configure environment variables?"
System: "Refer to Section 3.2: Use the `.env` file to manage configurations."
User: "How do I update OpenWebUI using Docker?"
System: "Refer to `docker/updating.md`: Use `docker pull` and restart the container."
With the RAG-enabled model, the system retrieves the most relevant sections from the documentation to answer your query.
With this setup, you can effectively use the OpenWebUI Documentation to assist users by retrieving relevant information for their queries. Enjoy building and querying your custom knowledge-enhanced models!