AI Engineer Europe 2026
OpenRAG: An open-source stack for RAG — Phil Nash
About this talk
IBM developer relations engineer Phil Nash introduces OpenRAG, an open-source RAG stack combining Docling document processing, OpenSearch retrieval, and Langflow orchestration. He explains why large context windows do not eliminate retrieval challenges, demonstrates document-ingestion pipelines including OCR, automatic speech recognition, hierarchical chunking, and the Granite-Docling-258M vision-language model, and discusses configurable embeddings, offline deployment, local demonstrations, and application customization.
Chapters
- 0:01Introduction and why RAG remains difficult
- 1:57OpenRAG architecture: Docling, OpenSearch, and Langflow
- 2:51Docling ingestion, OCR, ASR, and Granite-Docling
- 4:59Hierarchical chunking, embeddings, offline execution, and OpenSearch
- 8:16Local OpenRAG demonstration and application customization
- 15:34Closing: building with the OpenRAG ecosystem
Talk transcript
- 0:01
Hi there. My name is Phil Nash, and I'm a developer relations engineer at IBM. I've been working on, uh, tools around, uh, AI and RAG for the last couple of years, and I've got something, uh, I'd like to show to you today.
- 0:14
Uh, now, first things first, I've heard that RAG is dead many a time, and I'm sure you have too. Context windows are huge these days, so you might as well just dump all of your information into there.
- 0:25
I don't take this kind of thing very seriously. Uh, if every business has less than a million tokens worth of data, then sure, RAG is dead and probably so are all those businesses.
- 0:36
Uh, and of course, like, not everyone is happy, you know, paying for, uh, a million input tokens every time you want to ask a question as well.
- 0:44
I... instead I sort of hear that the RAG is dead claims is more of, more as RAG is solved, right? We, we think we understand the process, and we can just apply RAG when we need to.
- 0:53
You just, you know, gather up all your unstructured data, extract the text, chunk it up, embed it, throw it into a vector database, and then when you want to ask your agent a question, you just embed that question, search the database, pick the top K results, and pass them to a model as context.
- 1:07
It's just a, it's a footnote in, in context engineering these days.
- 1:13
But it turns out that RAG is actually hard, and it's hard for different reasons for different projects. Um, you know, PDFs are a pain. Chunking strategies are a hassle, and changing them and testing them is difficult.
- 1:25
Embeddings keep improving, which is great for the industry, but not very great when you've used something from, uh, six months or a year ago. There are new search techniques all the time and further tweaks that you can add to your pipeline to improve the results, like adding summaries to chunks, performing chunk expansion, using a, a cross-encoder to,
- 1:42
to re-rank results, query rewriting. There's, there's so much more. RAG is quite complex. In fact, everyone's documents are different. Every system will have different users, different questions, different interaction patterns, and different expectations.
- 1:57
While every RAG system will ultimately be different, there are definitely some core components that are required. When building a RAG system, it's useful to have a high-quality baseline to build from.
- 2:09
And so that's what we've been working on at IBM. We've brought together three existing open source projects to create a RAG stack that is powerful, easy to use, and easy to extend.
- 2:19
And the project's called OpenRAG, and it uses, uh, the open source, uh, Docling for document processing, OpenSearch for search indexing, and Langflow for visual orchestration and agents. OpenRAG is an open source project that you can try out today to, uh, build your own powerful, customizable, and easy-to-use RAG system.
- 2:40
But I just want to break down the stack for you so that you understand the components and how they work together and how they create a stack that is flexible enough for your modern RAG requirements.
- 2:51
Let's start by looking at the ingestion side of RAG. Um, let's start where it all begins, document processing. Uh, ingesting PDFs, HTML, Word docs, slides, and more can be a pain.
- 3:02
Uh, but the biggest pain of all is, is of course PDFs. Um, Docling, uh, is an open source project. It was built out of IBM Research in Zurich, and it processes and parses all sorts of documents, from HTML, Markdown, and Word documents through to slides and spreadsheets, audio and video, and even that enemy of all RAG systems,
- 3:21
PDFs. Uh, Docling has a number of different pipelines that handle different file types. Uh, this allows it to be flexible in the way it, uh, it takes in documents and, uh, accurate in its ex- in it...
- 3:34
accurate in its output. So there is a simple pipeline that handles those mostly straightforward text documents like Markdown, HTML, and Word. Um, though that just extracts the text, uh, turns it into a hierarchy and, and outputs a document.
- 3:47
For audio and video, there is an ASR, an automatic speech recognition pipeline. And for PDFs, there's two available pipelines. The standard pipeline has a number of small focused models that do different things like extracting text, tables, and images from PDFs.
- 4:03
Uh, you can even choose an OCR backend to read text, which is particularly useful for scanned documents that don't have actual real text in them. So this collection of small models in a pipeline perform things like layout analysis, table extraction, image extraction, descriptions.
- 4:19
Um, this gives you a wide array of options to get the best out of those documents.
- 4:23
Uh, there's also a, a VLM, a vision language model, uh, pipeline that uses the Granite Docling 258 million vision, uh, model to extract all of that in one go.
- 4:33
Uh, this is a newer pipeline, but it is simpler as it is this just all-in-one model,
- 4:38
uh, that's, that's trained specifically for this task.
- 4:42
Uh, Docling extracts text and then produces an intermediate representation, a DoclingDocument, uh, which models the structure of a document, uh, in an XML-ish format called DocTags. Uh, those DocTags can then be converted to a number of formats, including Markdown, HTML, and JSON.
- 4:59
And then Docling also has a chunker that uses the hierarchy generated, uh, generated by the parsers and, and built into those DocTags to produce hierarchically understood chunks of text.
- 5:14
Moving on to embeddings. OpenRAG actually isn't very prescriptive with embeddings at all. It supports a number of external providers, including OpenAI, uh, watsonx.ai, and Ollama for locally hosted embeddings.
- 5:24
And in fact, the entire of OpenRAG can be run offline using locally hosted models. Um, Docling itself can be, uh, run offline, uh, so it can run in air-gapped situations.
- 5:36
Uh, it doesn't need those external services. But once you have embedded those chunks, uh, they are indexed in OpenSearch. Uh, OpenSearch is, of course, the open source fork of Elasticsearch and is, is a powerful database for performing vector search and keyword search, as well as highly configurable.
- 5:53
It has, it also has highly configurable of filtering and aggregation. Uh, out of the box, OpenRAG uses OpenSearch for a hybrid vector and keyword search and exposes that sophisticated filtering for more targeted searching.
- 6:05
It also supports vector search over multiple embedding models. Now, this will slow down your vector search, uh, in practice, but it is useful if you decide you need to migrate your embedding models as, as part of your, uh, system.
- 6:19
OpenRAG also sets up OpenSearch with a secret fourth open source project. [chuckles] Um, the default OpenSearch, uh, nearest neighbors plugin gives you options for HNSW or IVF vector indexes, but OpenRAG uses the JVector KNN plugin by default.
- 6:34
JVector is, um, an open source, uh, vector index that gives you live indexing and, uh, because it's based on the DiskANN, uh, architecture, means your whole index doesn't have to fit in memory, giving you more options for scaling, uh, the data, uh, servers.
- 6:52
Uh, all of this is then tied together with Langflow. Langflow is a drag-and-drop visual editor for AI flows, uh, and it integrates Docling, OpenSearch, and all these embedding models, uh, as well as further data enrichment as part of that ingestion process and pipeline.
- 7:07
We'll come back and have a look more deeply into Langflow later. So that's ingestion and indexing. What about the generation side of RAG?
- 7:15
On the generation side, we, we don't normally have to worry about ingesting documents, and we already know that OpenSearch is handling that multi-vector hybrid search for us. Um, but we do need to point out that OpenRAG uses agentic retrieval in order to perform the search.
- 7:29
So this is also done in Langflow, and again, gives you access to, um, all the kind of models that Langflow, uh, makes, makes available to you. So out of the box, that's very much, um, OpenAI, Anthropic, uh, Ollama, watsonx.ai.
- 7:44
Uh, what does agentic search mean? Well, traditional... a traditional RAG generation pipeline would take a user query, embed it, use it to perform that nearest neighbor search over the chunks, and present the top K chunks to the LLM, hoping that the answer is contained within, and that the model is smart enough to extract it.
- 8:00
With agentic retrieval, we instead give the user's query to a, to an agent along with instructions and tools that it can use to perform as many searches as required.
- 8:09
The model is actually responsible for deciding what searches to perform and what to do with the results.
- 8:16
So let's actually take a look at this in action. Uh, I have OpenRAG running on my laptop, uh, and we're gonna have a quick look at what it can do.
- 8:25
So once you've gone through the, uh, once you've gone through the onboarding process with OpenRAG and setting it up, uh, you get dropped into a chat, uh, and the first thing you get to ask it is, "What is OpenRAG?"
- 8:35
Um, and as you can see here, uh, it has got an answer, but you can also see that it's done some, uh, tool calling already. Uh, it turns out that what is OpenRA...
- 8:44
the answer to what is OpenRAG is inside the agent's, uh, uh, prompt, uh, by default. So it doesn't actually need to do any search querying. Uh, but it did, um, go and get the current date just in case as well, which is nice of it.
- 8:57
So we can see we get an answer out of it, um, but we also get these kind of suggestions about the next things. Those are little nudges. Uh, that is also powered by Langflow.
- 9:06
Uh, and if we, uh, if we were to ask about that, uh, to explore Langflow's role in AI agent construction, then the, uh, agent itself will go off, search that documentation, and come up itself with an answer.
- 9:19
And so as you see, the model, uh, the agent has, uh, gone and used some tools again. It has come up with an answer. Uh, it's come up with more nudges as well.
- 9:28
So let's go look at the mod- the knowledge section. This is where you actually upload, uh, your data, your, uh, your documents, uh, and you can do so just by adding a whole file or a whole folder.
- 9:38
Um, there's also a sync button here. We'll see that in a minute. Uh, and you can also, uh, inspect kind of your, uh, your, your objects and your documents here and your chunks.
- 9:46
Uh, so you can see that they are chunking things as you'd expect. Uh, this also is where you can create knowledge filters. So, um, this takes advantage of that filtering in OpenSearch.
- 9:57
You can create filters based on a whole bunch of, uh, different options around the data that you have in your system. Uh, and then that allows you in chat to, uh, write, uh, use, um, use those filters, uh, to only s- talk to specific documents.
- 10:14
So that's the knowledge section. Uh, and then in the settings, we can dig into the actual customizability of this. Uh, so right at the top, um, there are cloud connectors, but in order to use cloud connectors, you need a, a user model, some, some authentication.
- 10:27
Uh, right now, we set that up with Google OAuth, uh, so you need to, uh, you need an OAuth client and secret there. Once you have that involved, you can connect to, uh, Google Drive, you can connect to SharePoint, uh, you can connect to OneDrive, and this allows your users to, uh, connect to, uh, directories of their
- 10:42
own documents, uh, and allow OpenRAG to sync them, uh, directly. I think that's really powerful. It saves you having to upload things a lot of the time. You can just sync with this external document store, and it will always be up to date.
- 10:55
And we can see our model providers. Uh, you can configure kind of API-based ones or Ollama. Uh, like I said, uh, that's for, for running things locally. Uh, and I'm running Ollama, and you can see I'm running currently Granite 004 3B.
- 11:08
That's, uh, one of IBM's models. So this is our language model, and you can see the actual agent instructions as well. Uh, so you can set your system prompt there.
- 11:17
And then in the ingest section, uh, you can see again, I'm running Qwen3 embedding, uh, 0.6B for my embedding model, also on Ollama. Uh, and you can set your chunk size and chunk overlap.
- 11:27
And then these last bits are Doc- Docling settings where we, where we say, "Do we want to capture table structure?" Uh, yes, currently. Um, do we want to run OCR?
- 11:37
Uh, not right now. That's turned off. Uh, and do we want to extract picture descriptions? Uh, currently that's off, but that's a useful one if you want to kind of get the information out of images as well.
- 11:47
Of course, adding, uh, more models, uh, to the pipeline makes things a little slower, uh, so they're off for now. And then right at the bottom, there are API keys, and this is where you can set up access to OpenRAG as an API.
- 11:58
So you can implement... You can use your search or your agent within your own application. Um, but let's actually drop into, uh, under the hood even further where we can go and customize things even more.
- 12:11
Uh, you can hit this Edit in Langflow button, and that will take you into the actual implementation uh, of your, uh, of your agent. Uh, and so let's actually zoom in.
- 12:21
We can see here is our agent. So this is the, this is the chat, the generation flow. Um, and our agent receives its information from this chat input, uh, which goes through a, a quick prompt template, um, adding in things about knowledge filters if you've used them.
- 12:36
Uh, and then the agent has a bunch of tools. Uh, those tools include, um, there's an MCP server for a URL ingester. That's actually just another flow within Langflow.
- 12:46
Uh, there's a calculator because I think that, um, agents and, and models shouldn't be doing arithmetic. They're language models, not math models, so, uh, a calculator's always useful. Uh, and then finally, the last one is the OpenSearch multi-model, um, embedding, uh, thing.
- 13:01
And so the embedding providers, uh, are all here.
- 13:05
Um, we can edit this. Uh, if you can go into here and just unlock the flow and save that, we can, we can do more with it. Uh, and so, um, for example, uh, we can take this chat input, uh, and we might want to, um, might wanna put some guardrails, uh, in place.
- 13:22
Uh, so we can grab guardrails from, uh, uh, from our, our set of components on the left. Uh, and then we do need to parse the result of that, so we can just get a parser.
- 13:33
And so if it parses, parses, we parse it through the parser, get the text out, which is the original text that was sent in, and then hand that on to our, uh, prompt template.
- 13:43
I guess if it fails, we can send a, an error message to our chat output, and that's fine. Uh, and so now we've added guardrails to our, to our thing.
- 13:51
Um, we can use, uh, our Ollama models there as well. And, um, and so this is as extensible as Langflow, uh, as Langflow can be for you. Um,
- 14:04
there's one more thing. Uh, there is an MCP server available for OpenRAG as well as, uh, an API, so you can go and, uh, use this and hand this to your other agents as well.
- 14:17
So is RAG solved? Uh, well, that's kind of it's up to you, to your data, and to your users. Uh, but OpenRAG is built to help. Uh, it is an opinionated but agentic and open source stack for RAG.
- 14:30
As I said before, it combines Docling, OpenSearch, and Langflow to create this powerful baseline RAG system made of open source components, and it leaves plenty of room to customize that, uh, within that stack so that you can build out the best RAG for your data and provide the best context to your agents.
- 14:48
Uh, it is currently at version naught point four point zero, and, uh, it's ready for you to play with. Uh, so this link or, or the QR code will take you to the project, and we'd love if you'd try out OpenRAG, uh, drop a star on the GitHub, and, uh, let us know what you think.
- 15:02
Uh, it's also, uh, open source, right? Um, the front end is a Next.js application. Everything else is a Python app. Uh, and if, so if you look, like the look of OpenRAG, we'd also appreciate your feedback and your contributions to the project itself.
- 15:16
Um, and the components to OpenRAG, of course, are open as well, so you can get involved with Docling, with OpenSearch, or with Langflow as well. And together, you know, we can build a RAG platform that works for everyone.
- 15:27
It gives you the choices where you need them and makes good decisions for you where it makes sense. We can do it with open source components out in the open.
- 15:34
That's what I'd like to see. Um, so thank you very much, uh, for listening. Uh, again, my name's Phil Nash. I'm a developer relations engineer at IBM, trying to help build OpenRAG and this open ecosystem of, uh, agentic applications.
- 15:47
And we can't wait to see, uh, what you build with OpenRAG. Thank you very much