Beginner guide: your first ten minutes
By the end of this page you will have added a document to LocalRAG, asked a question about it, read the answer and checked which page it came from. You will also see what happens when the answer is not in your documents.
What you need
LocalRAG running and the
llama3.2model pulled. See Install.A document to try. Any PDF with real text in it works, or a
.txtor.mdfile. To follow along exactly, save the text below asturbines.txt:textWind turbines convert the kinetic energy of moving air into electricity. Most modern turbines have three blades and turn to face the wind. A typical onshore turbine starts generating power at a wind speed of about 3 to 4 metres per second.
Find your way around
Open http://localhost:8090. The page has four parts:
- The header, with the LocalRAG name on the left and a status dot on the right. When everything works, the dot is lit and shows the name of the answer model, such as
llama3.2. - The sidebar on the left, with an upload area that reads Drop files or click to browse and, below it, the Documents list.
- The chat panel on the right. Before your first question it reads Ask a question about your documents to get started.
- The question box at the bottom, with a Send button.
Add a document
Drag
turbines.txtonto Drop files or click to browse, or click the area and choose the file.Wait for the file to appear under Documents.
Each document shows its name and its size in pages and chunks, such as
1 page · 1 chunk. A chunk is one piece of text that LocalRAG searches separately.
The first upload also downloads the embedding model, so it takes longer. Later uploads are faster.
Ask a question
Click in the box that reads Ask a question….
Type
At what wind speed does a turbine start producing power?and press Enter, or select Send.The answer appears word by word. The very first answer after starting can take a while, because Ollama loads the model into memory.
Read the chips under the answer. Each one names a document and a page, such as
turbines.txt · p.1.Hover over a chip to see its score. The score shows how closely that page matched your question. Higher is closer; most scores fall between 0 and 1.
The footer at the bottom shows first token: with the time the first word took in milliseconds, and the model that answered.
Ask something that is not in your documents
Type Who won the 1998 football World Cup? and send it.
LocalRAG should answer I don't know based on the indexed documents. This happens in one of two ways:
- If no passage in your documents matches the question well enough, LocalRAG does not ask the model at all, and shows no citation chips.
- If some passage matches a little, the model gets it but is told to give exactly that reply when the answer is not in the text. In this case you may still see chips.
This is how LocalRAG avoids making answers up. Models can still make mistakes, so check important answers against the cited page.
TIP
Use Shift + Enter to start a new line in the question box without sending.
Remove a document
Select the × next to a document (its tooltip reads Delete document). The button changes to sure?. Select it again to delete the document and all its chunks.
What you learned
- You add documents in the sidebar, and ask questions in the chat panel.
- Answers come only from your documents, with chips that name the page.
- When nothing matches, LocalRAG says it does not know.
Next steps
- Add documents: bulk import and what files work best
- Ask questions and read citations
- Use the API
- Troubleshooting and FAQ