New Tool Radar

AI Agents & Automation

How to Build a PDF RAG Chatflow in Flowise With Ollama

Build a Flowise chatflow that reads a PDF, splits it, embeds it with Ollama, and answers questions from the document.

Schematic diagram with four steps: load the PDF, split it into chunks, embed it with Ollama, then ask a question and check the answer quotes the document.

Retrieval-augmented generation, or RAG, pulls passages from a document and gives those passages to a model when it answers. In this Flowise workflow, use Ollama to embed the document and generate answers from the retrieved text.

Index a one-page PDF and connect the retriever

  1. Put the line Quartz Room pickup closes at 16:40 on Fridays. in a blank document and export it as a PDF with selectable text.
  2. In Flowise, create a Document Store, choose a PDF loader, and preview the chunks. Confirm that the line appears intact. Choose Ollama Embeddings, your locally installed embedding model, and a reachable vector store, then run the upsert.
  3. Connect a retriever for that store to the answering flow and configure ChatOllama with the ID of an installed chat model. If Flowise runs in a container, use an Ollama URL that is reachable from the container.

Ask one question the PDF answers and one outside its scope

For “When does Quartz Room pickup close on Fridays?”, inspect the retrieved passage and look for 16:40 in the answer. Then ask “What is the Sunday pickup cutoff?” The expected response is that the source lacks a Sunday cutoff. Configure the prompt to say when the supplied passages lack an answer. If a retrieved passage contains the right text but the answer changes it, adjust the answering prompt and try the check again.

A separate test can check the order of the passages returned to your answer model. See the three-passage reranking exercise.

Try it: four checks

Check What you should see If you do not see it
Nodes connected The chain runs from PDF to QA chain Check each node’s inputs
Upsert done The Upsert button loads the document Check the chunk count
Chat model set ChatOllama points at localhost:11434 Docker needs host.docker.internal
Answer grounded The reply quotes the PDF That is retrieval working

Expected result. We checked the Flowise local setup guide, which describes the PDF loader, the 1000/200 splitter, Ollama Embeddings with nomic-embed-text, the Conversational Retrieval QA Chain, the Upsert button, the ChatOllama base URL, and Chroma at localhost:8000. We did not build the chatflow on this machine.

Limits

This guide covers the RAG chain shape only. Chunk size and the vector store choice change the answers. We did not test any flow ourselves.

Sources

See all