Skip to content

RAG Upload Documents

Erik Pleym edited this page May 7, 2025 · 1 revision

Uploading Documents to the RAG-Database

Follow these instructions to upload relevant documents to the RAG-Database for use by the Chatbot.

1. Start the FastAPI Server

Open a terminal in the root of your project and run:

uvicorn src.main:app --reload

This will start the FastAPI server locally.

2. Open the API Documentation

Navigate to the FastAPI documentation in your browser:

http://127.0.0.1:8000/docs

3. Use the Document Upload Endpoint

In the API documentation:

  1. Scroll to the POST /upload/ section labeled Document Upload. Image
  2. Click the "Try it out" button. Image

4. Select a Category

Image

You must select one of the following categories for the document:

  • Scene Name (e.g., "Blue Sector", "Lab Scene", etc.)
  • General Information — General knowledge that may help the Chatbot better understand the module or content.
  • Behavioral Context — Instructions for how the Chatbot should behave and formulate responses.
  • Conversational Assets — Expected conversation trees for different NPCs.
  • Training Data — Environmental details and user expectations within the VR world.
  • Miscellaneous — For all content that doesn’t fit any other category.

5. Choose a File to Upload

Remember that the files are directly instructing the Chatbot. To avoid misguiding or confusing the Chatbot, it is best practice to address the Chatbot in second person and the player in third person in these documents.

Image

  • Accepted file types: .md or .txt
  • Note for DOCX users: Save your .docx file as a .txt file to make it uploadable.
  • Note for PDF users: Copy and paste the contents into a .txt or .md file manually.

6. Click "Execute"

After selecting the category and uploading the file, click Execute to complete the upload process.


Image

If you follow these steps, your document will be successfully uploaded and processed by the RAG-Database system.

Clone this wiki locally