Knowledge Graph RAG Document Ingestion Pipeline
Knowledge Graph RAG (Knowledge Graph Retrieval-Augmented Generation) allows users to build an AI-ready document repository by converting PDFs into vector data and creating a knowledge graph. This document ingestion pipeline is the first step in setting up a KG RAG system, using webAI's Navigator to process documents and prepare them for semantic retrieval.
This step-by-step guide walks you through setting up the document ingestion pipeline using the Document Ingestion and Knowledge Graph Builder elements. Once complete, your documents will be processed, vectorized, and ready for use in the inference pipeline where you can chat with your documents using an LLM.
See our What is KG RAG? article for more information on system requirements, element details, key features, and known limitations.
Use Cases
- Enterprise Knowledge Base → Company documentation and policy Q&A
- Customer Support → Automated responses from support materials
- Legal Document Analysis → Contract and compliance document search
- Technical Documentation → API docs, manuals, and troubleshooting guides
- Research Assistant → Academic paper and research document querying
- Medical Information → Healthcare documentation and procedure guides
- Educational Content → Textbook and curriculum material assistance
- Compliance Systems → Regulatory and standards documentation
- Code Documentation → Software documentation and codebase understanding
- Training Materials → Employee handbook and training resource systems
Document Ingestion → Knowledge Graph Builder
-
Before we begin we need to download the PDFs that we are going to use as our Source Document input. The below file structure is optional, however, this will help in this step by step guide for accessing these inputs and outputs easily.
- Create a main folder - in the below example - kg_rag_demo is the main folder
- Create 2 folders inside of the main folder. input, and output
-
Place all of the PDFs we are going to use inside of the input folder

We only have one PDF file in this input folder but you can add more if needed for your specific ingestion flow. The Document Ingestion element will accept PDF for multimodal mode and we can handle PDF, XML, JSON, and HTML in text-only mode.
- Open Navigator and on the Projects tab create a new KG RAG Document Ingestion template. Create → Templates → KG RAG Document Ingestion
-
You will now see the Document Ingestion element Output connected to the Input of Knowledge Graph Builder element. Your canvas should look like the below image:
- Click on the Document Ingestion element → View Settings or click the three dots on this element ... → Settings to open the Element Settings panel.
-
In the Document Ingestion element settings you can enable or disable Text-Only Ingestion
Enabling this feature will ignore all content outside of plain text during the extraction process. So if you plan to run inference on charts, diagrams, tables, etc. it is advised to keep this disabled.
-
In the Document Ingestion element settings click Select Directory under Source Documents (PDFs)
-
From the folder structure we created in the first step above, select the folder titled input → Open

-
Back on the Document Ingestion Settings panel click Select Directory under Output Directory
-
From the folder structure we created in the first step above, select the folder titled output → Open

The Document Ingestion element settings should now look like the below image:
- We are now going to configure the inputs and outputs of our Knowledge Graph Builder element. Click on the Knowledge Graph Builder element → View Settings or click the three dots on this element ... → Settings to open the Element Settings panel.
-
In the Knowledge Graph Builder element settings click into Setup → New Collection and provide a Name for this Vector Database collection. Select from the Configuration options then click Create Collection

-
(Optional) You can enable the Visualize Interactively toggle which will create a visualization of this knowledge graph in a browser. Keep this disabled for faster processing.

The Knowledge Graph Builder element settings should now look like the below image:
-
Once both the Document Ingestion and Knowledge Graph Builder elements are configured → click Run and you will see this Flow start to process! The Log Viewer will automatically open during this process for you to monitor along with progress bars on each Element.
This process will take some time to finish depending on the amount of documentation within your PDF files. This can take about 10-15 mins for 200 pages on a MacBook Pro with an M4 chip and 16 GB RAM and about 5-10 mins for 200 pages on a Mac Studio with an M4 chip and 256 GB RAM.
-
If Visualize Interactively setting in the Knowledge Graph Builder element was enabled you can Click Open on the Knowledge Graph Builder element to see the graph once this process has completed.
-
Once this ingestion process completes you should see a toast message in the top right of your Canvas with an option to Create Inference. Click this button and choose whether you would like these canvases nested in one project folder or keep these canvases separate.
This is the next step in interacting with your documents using an LLM! See the next steps below to for more information on the inference process.
If you don't click the Create Inference button your ingestion flow will continue to run. As long as this ingestion flow shows 100% completion it is okay to stop this ingestion flow by clicking the dropdown next to Active -> Stop
You should see all the individual pages from the PDFs that were in the input folder now in the output folder.
Next Steps
- Now that your documents have been ingested and processed, proceed to the Knowledge Graph RAG Inference Pipeline guide to set up the retrieval and chat interface
- For more information on the elements used in this guide, see our Element Registry
- For more information on deploying flows, see our Clusters Overview guide and our Deployments Overview guide