# bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss architecture

> Architecture diagram of the GitHub repository bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss
- Repository: https://github.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss

## Overview

This is a multimodal retrieval-augmented generation application with CLI and Streamlit entry points. Users ingest documents and images into a FAISS index, then submit text or image queries to retrieve relevant content and generate an answer with Bedrock. The README documents Nova/Titan embedding options, supported input formats, and Claude generation; source excerpts show the entry-point wiring, but not the internals of the src modules, so those links rely on documented architecture.

Main entry points: [`app.py`](https://github.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss/blob/main/app.py) (Streamlit UI), [`main.py`](https://github.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss/blob/main/main.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI<br/>[main.py]"]
  node_ui["Streamlit UI<br/>[app.py]"]
end

subgraph group_pipeline["RAG pipeline"]
  node_ingest["Ingestion"]
  node_rag["RAG query"]
end

subgraph group_services["Models and storage"]
  node_embeddings["Bedrock embeddings"]
  node_vector[("FAISS index")]
  node_config["Configuration"]
end

node_user(("User"))
node_bedrock{{"AWS Bedrock"}}
node_claude{{"Claude generation"}}

node_user -->|"runs commands"| node_cli
node_user -->|"uses interface"| node_ui
node_cli -->|"runs ingestion"| node_ingest
node_ui -->|"runs ingestion"| node_ingest
node_cli -->|"runs queries"| node_rag
node_ui -->|"submits queries"| node_rag
node_cli -->|"creates"| node_embeddings
node_cli -->|"loads index"| node_vector
node_ui -->|"creates"| node_embeddings
node_ui -->|"creates"| node_vector
node_ui -->|"reads paths"| node_config
node_ingest -->|"embeds content"| node_embeddings
node_ingest -->|"stores vectors"| node_vector
node_rag -->|"embeds query"| node_embeddings
node_rag -->|"retrieves matches"| node_vector
node_rag -->|"generates answer"| node_claude
node_embeddings -->|"requests embeddings"| node_bedrock
node_claude -->|"uses model"| node_bedrock

click node_cli "https://github.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss/blob/main/main.py"
click node_ui "https://github.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss/blob/main/app.py"

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_cli,node_ui,node_user toneBlue
class node_ingest,node_rag toneAmber
class node_embeddings,node_vector,node_config toneMint
class node_bedrock,node_claude toneIndigo
```

## Components

### User interfaces

- [CLI](https://github.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss/blob/main/main.py): `main.py`
- [Streamlit UI](https://github.com/bhardwajtanuj/build-a-multimodal-rag-system-using-aws-bedrock-and-faiss/blob/main/app.py): `app.py`

### RAG pipeline

- **Ingestion**
- **RAG query**

### Models and storage

- **Bedrock embeddings**
- **FAISS index**
- **Configuration**

### Other components

- **User**
- **AWS Bedrock**
- **Claude generation**

## Connections

- User → CLI: runs commands (evidence: `README.md`)
- User → Streamlit UI: uses interface (evidence: `README.md`)
- CLI → Ingestion: runs ingestion (evidence: `main.py`)
- Streamlit UI → Ingestion: runs ingestion (evidence: `app.py`)
- CLI → RAG query: runs queries (evidence: `main.py`)
- Streamlit UI → RAG query: submits queries (evidence: `app.py`)
- CLI → Bedrock embeddings: creates (evidence: `main.py`)
- CLI → FAISS index: loads index (evidence: `main.py`)
- Streamlit UI → Bedrock embeddings: creates (evidence: `app.py`)
- Streamlit UI → FAISS index: creates (evidence: `app.py`)
- Streamlit UI → Configuration: reads paths (evidence: `app.py`)
- Ingestion → Bedrock embeddings: embeds content (evidence: `README.md`)
- Ingestion → FAISS index: stores vectors (evidence: `README.md`)
- RAG query → Bedrock embeddings: embeds query (evidence: `README.md`)
- RAG query → FAISS index: retrieves matches (evidence: `README.md`)
- RAG query → Claude generation: generates answer (evidence: `README.md`)
- Bedrock embeddings → AWS Bedrock: requests embeddings (evidence: `README.md`)
- Claude generation → AWS Bedrock: uses model (evidence: `README.md`)
