openrag-twin
A functional replica of IBM's OpenRAG, built to prove I understand the stack — not just describe it
Pitch video

Click to watch (~3 min) — what this project is, the architecture, the routing scenario, and one
real bug found and fixed along the way. Opens and autoplays (muted, click to unmute) on a GitHub
Pages player — nothing downloads. The raw file is also available in
communication/ if you'd rather grab it directly.
Why this exists
I'm preparing for a Field/Client Engineer interview at IBM. Instead of reading about
OpenRAG — IBM's agentic RAG product built on
Langflow + Docling + OpenSearch — I cloned the real, open-source project, ran the actual
stack, broke it, fixed it, and extended it with a functional scenario of my own.
This repo is not a from-scratch reimplementation. It's the genuine upstream codebase
(Apache 2.0), with my own additions layered on top:
- A working local install, running fully on this machine (Docker + native services)
- A document corpus ingested from the real OpenSearch documentation
- A custom agent tool and routing logic on top of the stock RAG flow
- Five real bugs hit and fixed along the way — documented with root cause, not just "it works now"
If you're wondering why the repo starts from a single "Initial commit": that's because it began as
a full clone of upstream, and I squashed that inherited history so the repo reads as this project
rather than as a fork's commit-by-commit log — my own work is the commits after it. Nothing
upstream is hidden; see the engineering log for what changed and why.
What I'm demonstrating
The brief I gave myself: prove the "agentic" half of agentic RAG, not just the "RAG" half.
Most RAG demos show retrieval-then-generation and stop there. That's necessary but it's not what
makes OpenRAG interesting — the interesting part is a system that decides what to do before
it acts. So the scenario is a support agent that has to choose between two entirely different
behaviors depending on what's actually being asked:
| Question type | Example | What the agent must do |
|---|
| Knowledge question | "What is hybrid search in OpenSearch?" | Search the indexed docs, answer only from retrieved chunks, cite the source page |
| Support request | "What's the status of ticket #101?" | Skip the docs entirely, call an external tool, return live data |
Nothing routes these by keyword-matching or a regex if "ticket" in message. The routing is the
LLM reading its own tool descriptions and deciding — the same mechanism a production agent would
use to pick between a knowledge base, a CRM, a ticketing system, or a calculator.
Architecture
flowchart TB
subgraph host["Host machine — native processes (not in Docker)"]
direction LR
Ollama["Ollama\nnomic-embed-text\n(local embeddings, free)"]
Docling["docling-serve\nHTML/PDF → structured text"]
end
subgraph docker["Docker Compose — 5 containers"]
direction LR
FE["Frontend\n:3000"]
BE["Backend API\nFastAPI · task orchestration"]
LF["Langflow\nAgent flow + Ingestion flows\n:7860"]
OS[("OpenSearch\nhybrid vector + keyword index\n:9200")]
end
Claude(["Claude Sonnet\n(Anthropic) — reasoning\n& answer generation"])
User(["User"]) --> FE
FE --> BE
BE --> LF
LF -- "parse documents" --> Docling
LF -- "embed text ↔ vectors" --> Ollama
LF -- "index / search" --> OS
LF -- "decide, reason, write" --> Claude
classDef native fill:#3b2f2f,stroke:#c9a876,color:#f2e9dc
classDef docker0 fill:#1e2a3a,stroke:#6ea8d8,color:#dceaf6
classDef brain fill:#2a1e3a,stroke:#b48ee0,color:#ece3f6
class Ollama,Docling native
class FE,BE,LF,OS docker0
class Claude brain
Each piece has one job:
- Docling — turns messy real-world documents (HTML pages, PDFs) into clean, structured text.
- OpenSearch — stores document chunks and their vector embeddings; answers hybrid
(semantic + keyword) search queries in milliseconds.
- Langflow — the orchestration layer: defines the ingestion pipeline and the agent's flow as
a graph of components, each swappable.
- Ollama — runs the embedding model locally, so ingestion has no per-token cost and no
external dependency for the vectorization step.
- Claude Sonnet 5 (Anthropic) — the model that does the actual reasoning: routing decisions,
tool-call arguments, and final answer composition. See below for why this model, specifically.
On the model choice