# jaskeeratk/rag_chromadb_groq_streamlit architecture

> Architecture diagram of the GitHub repository jaskeeratk/rag_chromadb_groq_streamlit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaskeeratk/rag_chromadb_groq_streamlit
- Repository: https://github.com/jaskeeratk/rag_chromadb_groq_streamlit

## Overview

##### Project type and purpose
- From the file tree and the README title “RAG_chromaDB_Groq_streamlit,” we see this is a small full-stack RAG (Retrieval-Augmented Generation) application built in Python, with a Streamlit front end, a retrieval & generation core, and a vector database (ChromaDB). Its purpose is to let users query a knowledge base via a UI, retrieve relevant documents, and generate answers using a Groq‐accelerated model.

##### File structure
- Top-level files:
- app.py   – Streamlit UI entry point
- rag_core.py – Core retrieval + generation logic
- preprocessing.py – Data ingestion/vectorization pipeline
- requirements.txt – Python dependencies (e.g., streamlit, chromadb, groq)
- .devcontainer/… – Dev container config for reproducible environment
- There are no separate “frontend” and “backend” folders; instead, the backend (rag_core + preprocessing) and frontend (Streamlit) coexist in the same repo.

##### README for additional insights
- README only gives the project name, but the file names make clear the architecture: preprocessing → vector store (ChromaDB) → retrieval + generation → Streamlit UI.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Development Environment
    DevEnv["Dev Container"]:::dev
    click DevEnv "https://github.com/jaskeeratk/rag_chromadb_groq_streamlit/blob/main/.devcontainer/devcontainer.json"

    %% Frontend Layer
    UI["Streamlit UI (app.py)"]:::compute
    click UI "https://github.com/jaskeeratk/rag_chromadb_groq_streamlit/blob/main/app.py"

    %% Backend Layer
    RC["RAG Core (rag_core.py)"]:::compute
    click RC "https://github.com/jaskeeratk/rag_chromadb_groq_streamlit/blob/main/rag_core.py"
    Pre["Preprocessor (preprocessing.py)"]:::compute
    click Pre "https://github.com/jaskeeratk/rag_chromadb_groq_streamlit/blob/main/preprocessing.py"
    DB[(ChromaDB)]:::db
    LLM["Groq LLM"]:::external

    %% Dependencies
    Req["Dependencies (requirements.txt)"]:::compute
    click Req "https://github.com/jaskeeratk/rag_chromadb_groq_streamlit/blob/main/requirements.txt"

    %% Data Flow
    UI -->|"query"| RC
    RC -->|"retrieve embeddings"| DB
    DB -->|"docs"| RC
    RC -->|"generate answer"| LLM
    LLM -->|"response"| RC
    RC -->|"answer"| UI
    Pre -->|"load embeddings"| DB

    %% Environment Links
    DevEnv -.-> UI
    DevEnv -.-> RC
    DevEnv -.-> Pre

    classDef compute fill:#bbdefb,stroke:#000
    classDef db fill:#c8e6c9,stroke:#000
    classDef external fill:#ffe0b2,stroke:#000
    classDef dev fill:none,stroke:#000,stroke-dasharray:5 5,stroke-width:1
```
