# harishneel1/multi-modal-rag-pipeline architecture

> Architecture diagram of the GitHub repository harishneel1/multi-modal-rag-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harishneel1/multi-modal-rag-pipeline
- Repository: https://github.com/harishneel1/multi-modal-rag-pipeline

## Overview

This repository is a small prototype for a multimodal retrieval-augmented generation workflow, centered around a single Jupyter notebook rather than a packaged application.

1. Primary entry point  
The main working surface is `multi_modal_rag.ipynb`. That suggests the whole pipeline is orchestrated interactively in notebook cells, likely covering data loading, preprocessing, retrieval, and response generation in one place.

2. Repository shape  
There is no `src/` tree, service layer, or deployment configuration visible. Architecturally, this is more of an experiment/research repo than a production system. The notebook is the control plane; the other files are supporting inputs and references.

3. Knowledge sources  
The `docs/attention-is-all-you-need.pdf` file is a local document asset and appears to be one of the content sources for retrieval. Since the repo is labeled “multi-modal,” the system likely treats non-text artifacts such as PDFs as first-class retrieval inputs.

4. Query/evaluation data  
`synthetic_questions.txt` looks like a prepared set of test prompts or evaluation questions. This likely serves as the query workload for exercising the retrieval pipeline and checking answer quality.

5. Ingestion boundary  
A likely first subsystem is document ingestion from local assets in the repo. In architecture terms, this is the boundary where raw files are turned into normalized representations suitable for indexing or retrieval.

6. Retrieval layer  
The core technical boundary is the retriever: it must map a user question to relevant document fragments or multimodal content. For a multimodal RAG pipeline, this usually means combining text-based chunk retrieval with some representation of non-text content, though the exact modality handling is not shown in the file tree.

7. Generation layer  
After retrieval, the notebook likely passes selected context to an LLM for answer synthesis. That makes the generation step dependent on retrieved evidence rather than on the raw source files directly.

8. Evaluation/iteration loop  
The presence of synthetic questions implies an iterative evaluation loop: run queries, inspect retrieved context and generated outputs, refine chunking, embedding, prompt design, or indexing strategy. This is an important diagram boundary because the repo is not just a one-way pipeline; it is meant for experimentation.

9. Dependency/runtime boundary  
`requirements.txt` defines the Python runtime dependencies for the notebook workflow. This is the only explicit environment specification visible, so the architecture should be drawn as a Python-based local pipeline executed in a notebook kernel.

10. External services are not explicit  
No API clients, vector database configs, cloud resources, or model-serving files are visible in the repository listing. So any external LLM, embedding model, or vector store should be treated as an implementation detail inside the notebook unless confirmed elsewhere.

11. Practical diagram takeaway  
If you draw this architecture, represent it as: local document assets and question set feeding a notebook-driven RAG pipeline, which likely performs ingestion/indexing, retrieval over multimodal content, and LLM-based answer generation, with iterative evaluation via synthetic prompts.

12. Confidence note  
Because the repo contains only a README title and supporting artifacts, the exact internals are not exposed here. The safest architectural claim is that this is a notebook-based multimodal RAG prototype with local document inputs and a synthetic-question evaluation harness.

Main entry points: [`multi_modal_rag.ipynb`](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/multi_modal_rag.ipynb) (Notebook), [`synthetic_questions.txt`](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/synthetic_questions.txt) (Questions), [`docs/attention-is-all-you-need.pdf`](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/docs/attention-is-all-you-need.pdf) (Paper PDF), [`requirements.txt`](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/requirements.txt) (Requirements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Notebook workflow"]
  node_notebook["Notebook<br/>orchestrator"]
  node_ingest["Ingest<br/>document prep"]
  node_index["Index<br/>chunking/embed"]
  node_retriever["Retriever<br/>multi-modal retrieval"]
  node_context["Context<br/>evidence assembly"]
  node_generator["Generator<br/>LLM synthesis"]
  node_evaluation["Evaluate<br/>prompt loop"]
end

subgraph group_inputs["Local inputs"]
  node_pdf["Paper PDF<br/>source document"]
  node_questions["Questions<br/>eval prompts"]
end

subgraph group_runtime["Runtime"]
  node_requirements["Requirements<br/>python deps<br/>[requirements.txt]"]
end

node_notebook -->|"loads"| node_ingest
node_ingest -->|"reads"| node_pdf
node_ingest -->|"normalizes"| node_index
node_index -->|"feeds"| node_retriever
node_questions -->|"drives"| node_evaluation
node_evaluation -->|"queries"| node_retriever
node_retriever -->|"returns"| node_context
node_context -->|"supplies"| node_generator
node_generator -->|"outputs"| node_evaluation
node_notebook -.->|"depends on"| node_requirements

click node_notebook "https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/multi_modal_rag.ipynb"
click node_pdf "https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/docs/attention-is-all-you-need.pdf"
click node_questions "https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/synthetic_questions.txt"
click node_requirements "https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/requirements.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_notebook,node_ingest,node_index,node_retriever,node_context,node_generator,node_evaluation toneBlue
class node_pdf,node_questions toneAmber
class node_requirements toneMint
```

## Components

### Notebook workflow

Interactive RAG pipeline stages inside the notebook

- [Notebook](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/multi_modal_rag.ipynb): orchestrator · Main interactive control plane for the prototype · `multi_modal_rag.ipynb`
- **Ingest**: document prep · Loads local assets and normalizes them for retrieval
- **Index**: chunking/embed · Builds retrieval-ready representations from source content
- **Retriever**: multi-modal retrieval · Finds relevant text or other evidence for a query
- **Context**: evidence assembly · Collects retrieved fragments into prompt context
- **Generator**: LLM synthesis · Produces answers from retrieved evidence
- **Evaluate**: prompt loop · Runs synthetic questions and supports iteration

### Local inputs

Source document and evaluation prompts

- [Paper PDF](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/docs/attention-is-all-you-need.pdf): source document · Local knowledge source for retrieval · `docs/attention-is-all-you-need.pdf`
- [Questions](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/synthetic_questions.txt): eval prompts · Synthetic query set used to exercise the pipeline · `synthetic_questions.txt`

### Runtime

Python environment definition

- [Requirements](https://github.com/harishneel1/multi-modal-rag-pipeline/blob/main/requirements.txt): python deps · Python packages needed by the notebook workflow · `requirements.txt`

## Connections

- Notebook → Ingest: loads · Notebook starts the data preparation flow
- Ingest → Paper PDF: reads · Ingests the local PDF source
- Ingest → Index: normalizes · Turns raw content into retrieval-ready form
- Index → Retriever: feeds · Indexed content becomes searchable evidence
- Questions → Evaluate: drives · Synthetic prompts are used to probe behavior
- Evaluate → Retriever: queries · Evaluation questions trigger retrieval
- Retriever → Context: returns · Retriever selects relevant evidence
- Context → Generator: supplies · Assembled context is passed to generation
- Generator → Evaluate: outputs · Generated answers are inspected in the loop
- Notebook → Requirements: depends on · Notebook execution relies on Python dependencies
