# allen-paul-18/locallens-omnirag architecture

> Architecture diagram of the GitHub repository allen-paul-18/locallens-omnirag, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/allen-paul-18/locallens-omnirag
- Repository: https://github.com/allen-paul-18/locallens-omnirag

## Overview

Multimodal RAG System lets users upload or batch-ingest documents, search their text, images, and audio-derived transcriptions, and retrieve grounded results or generate answers. The Streamlit app is the primary user entry point; the backend implements ingestion, modality-aware search, reranking, and answer generation. Oracle storage is an optional documented backend capability. The source is concentrated in a single backend file, so several domain stages share its path; unsampled implementation details are represented only where the README documents them.

Main entry points: [`multimodal_rag_system.py`](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py) (Document ingestion), [`streamlit_app.py`](https://github.com/allen-paul-18/locallens-omnirag/blob/main/streamlit_app.py) (Streamlit app), [`batch_ingest.py`](https://github.com/allen-paul-18/locallens-omnirag/blob/main/batch_ingest.py) (Batch ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_streamlit["Streamlit app<br/>[streamlit_app.py]"]
end

subgraph group_ingestion["Content ingestion"]
  node_batch["Batch ingestion<br/>[batch_ingest.py]"]
  node_document_ingest["Document ingestion"]
  node_text_processing["Text processing"]
  node_image_processing["Image processing"]
  node_audio_transcription["Audio transcription"]
  node_embeddings["Embeddings"]
end

subgraph group_retrieval["Search and answers"]
  node_semantic_search["Semantic search"]
  node_cross_modal_search["Cross-modal search"]
  node_reranking["Result reranking"]
  node_answer_generation["Answer generation"]
end

subgraph group_persistence["Persistence"]
  node_oracle[("Oracle vector store")]
end

node_user(("User"))

node_user -->|"uses"| node_streamlit
node_streamlit -->|"queries"| node_semantic_search
node_streamlit -->|"requests answers"| node_answer_generation
node_batch -->|"ingests files"| node_document_ingest
node_document_ingest -.->|"extracts text"| node_text_processing
node_document_ingest -.->|"processes images"| node_image_processing
node_document_ingest -.->|"transcribes audio"| node_audio_transcription
node_document_ingest -.->|"creates embeddings"| node_embeddings
node_semantic_search -->|"reranks candidates"| node_reranking
node_cross_modal_search -.->|"uses embeddings"| node_embeddings
node_semantic_search -->|"searches vectors"| node_oracle
node_document_ingest -->|"stores chunks"| node_oracle
node_answer_generation -.->|"uses retrieved context"| node_semantic_search

click node_streamlit "https://github.com/allen-paul-18/locallens-omnirag/blob/main/streamlit_app.py"
click node_batch "https://github.com/allen-paul-18/locallens-omnirag/blob/main/batch_ingest.py"
click node_document_ingest "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_text_processing "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_image_processing "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_audio_transcription "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_embeddings "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_semantic_search "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_cross_modal_search "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_reranking "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_answer_generation "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py"
click node_oracle "https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.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_streamlit,node_user toneBlue
class node_batch,node_document_ingest,node_text_processing,node_image_processing,node_audio_transcription,node_embeddings toneAmber
class node_semantic_search,node_cross_modal_search,node_reranking,node_answer_generation toneMint
class node_oracle toneRose
```

## Components

### User interface

- [Streamlit app](https://github.com/allen-paul-18/locallens-omnirag/blob/main/streamlit_app.py): `streamlit_app.py`

### Content ingestion

- [Batch ingestion](https://github.com/allen-paul-18/locallens-omnirag/blob/main/batch_ingest.py): `batch_ingest.py`
- [Document ingestion](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`
- [Text processing](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`
- [Image processing](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`
- [Audio transcription](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`
- [Embeddings](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`

### Search and answers

- [Semantic search](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`
- [Cross-modal search](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`
- [Result reranking](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`
- [Answer generation](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`

### Persistence

- [Oracle vector store](https://github.com/allen-paul-18/locallens-omnirag/blob/main/multimodal_rag_system.py): `multimodal_rag_system.py`

### Other components

- **User**

## Connections

- User → Streamlit app: uses (evidence: `README.md`)
- Streamlit app → Semantic search: queries (evidence: `streamlit_app.py`)
- Streamlit app → Answer generation: requests answers (evidence: `streamlit_app.py`)
- Batch ingestion → Document ingestion: ingests files (evidence: `batch_ingest.py`)
- Document ingestion → Text processing: extracts text (evidence: `multimodal_rag_system.py`)
- Document ingestion → Image processing: processes images (evidence: `multimodal_rag_system.py`)
- Document ingestion → Audio transcription: transcribes audio (evidence: `multimodal_rag_system.py`)
- Document ingestion → Embeddings: creates embeddings (evidence: `multimodal_rag_system.py`)
- Semantic search → Result reranking: reranks candidates (evidence: `multimodal_rag_system.py`)
- Cross-modal search → Embeddings: uses embeddings (evidence: `multimodal_rag_system.py`)
- Semantic search → Oracle vector store: searches vectors (evidence: `multimodal_rag_system.py`)
- Document ingestion → Oracle vector store: stores chunks (evidence: `multimodal_rag_system.py`)
- Answer generation → Semantic search: uses retrieved context (evidence: `multimodal_rag_system.py`)
