# patchy631/ai-engineering-hub architecture

> Architecture diagram of the GitHub repository patchy631/ai-engineering-hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/patchy631/ai-engineering-hub
- Repository: https://github.com/patchy631/ai-engineering-hub

## Overview

This repository is an educational hub of independent AI projects, not one integrated runtime. Its README describes examples spanning RAG, agents and workflows, media processing, model evaluation, and fine-tuning. The graph highlights those branches and preserves every SOURCE INDEX core module. Edges reflect references recorded in the index or calls visible in excerpts; many modules were not sampled, so their internal connections are intentionally omitted.

Main entry points: [`notebook-lm-clone/app.py`](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/app.py) (NotebookLM App), [`notebook-lm-clone/src/generation/rag.py`](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/generation/rag.py) (Notebook RAG), [`notebook-lm-clone/src/document_processing/doc_processor.py`](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/document_processing/doc_processor.py) (Document Processing), [`biotech-agentic-analyst/app.py`](https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/app.py) (Biotech Analyst UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_rag["RAG and Research"]
  node_llama_workflow["Llama 4 RAG<br/>[workflow.py]"]
  node_rag_generation["Notebook RAG<br/>[rag.py]"]
  node_vector_db[("Milvus Vector Store")]
end

subgraph group_media["Media and Knowledge"]
  node_notebook_app["NotebookLM App<br/>[app.py]"]
  node_audio_transcriber["Audio Transcription"]
  node_doc_processor["Document Processing<br/>[doc_processor.py]"]
  node_embeddings["Embedding Generation"]
  node_memory_layer["Conversation Memory<br/>[memory_layer.py]"]
  node_podcast_script["Podcast Scripting"]
  node_podcast_tts["Speech Synthesis<br/>[text_to_speech.py]"]
  node_web_scraper["Web Scraping<br/>[web_scraper.py]"]
end

subgraph group_agents["Agents and Analysis"]
  node_biotech_app["Biotech Analyst UI<br/>[app.py]"]
  node_ocr_pipeline["Paper OCR Pipeline<br/>[pipeline.py]"]
  node_science_flow["Science Analysis Flow<br/>[science_flow.py]"]
  node_science_state["Analysis State<br/>[state.py]"]
  node_biotech_models["Biotech Data Models<br/>[models.py]"]
end

subgraph group_evaluation["Model Evaluation"]
  node_code_compare_app["Code Model Comparison<br/>[app.py]"]
  node_code_ingestion["Repository Ingestion<br/>[code_ingestion.py]"]
  node_model_service["Model Service<br/>[model_service.py]"]
  node_code_evaluation["Code Evaluation"]
end

node_notebook_app -->|"uses transcription"| node_audio_transcriber
node_notebook_app -->|"uses processing"| node_doc_processor
node_notebook_app -->|"uses embeddings"| node_embeddings
node_notebook_app -->|"uses retrieval"| node_rag_generation
node_notebook_app -->|"uses memory"| node_memory_layer
node_notebook_app -->|"uses scripting"| node_podcast_script
node_notebook_app -->|"uses synthesis"| node_podcast_tts
node_notebook_app -->|"uses storage"| node_vector_db
node_notebook_app -->|"uses scraping"| node_web_scraper
node_rag_generation -->|"retrieves from"| node_vector_db
node_rag_generation -->|"uses embeddings"| node_embeddings
node_rag_generation -->|"uses processing"| node_doc_processor
node_podcast_tts -->|"uses scripts"| node_podcast_script
node_web_scraper -->|"uses processing"| node_doc_processor
node_podcast_script -->|"uses processing"| node_doc_processor
node_biotech_app -->|"runs OCR"| node_ocr_pipeline
node_biotech_app -->|"starts analysis"| node_science_flow
node_biotech_app -->|"sets state"| node_science_state
node_ocr_pipeline -->|"builds records"| node_biotech_models
node_science_flow -->|"uses state"| node_science_state
node_code_compare_app -->|"requests models"| node_model_service
node_code_compare_app -->|"ingests repository"| node_code_ingestion
node_code_compare_app -->|"evaluates output"| node_code_evaluation

click node_llama_workflow "https://github.com/patchy631/ai-engineering-hub/blob/main/llama-4-rag/workflow.py"
click node_notebook_app "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/app.py"
click node_audio_transcriber "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/audio_processing/audio_transcriber.py"
click node_doc_processor "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/document_processing/doc_processor.py"
click node_embeddings "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/embeddings/embedding_generator.py"
click node_rag_generation "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/generation/rag.py"
click node_memory_layer "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/memory/memory_layer.py"
click node_podcast_script "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/podcast/script_generator.py"
click node_podcast_tts "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/podcast/text_to_speech.py"
click node_vector_db "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/vector_database/milvus_vector_db.py"
click node_web_scraper "https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/web_scraping/web_scraper.py"
click node_biotech_app "https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/app.py"
click node_ocr_pipeline "https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/mistral_ocr_pipeline/pipeline.py"
click node_science_flow "https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/flow/science_flow.py"
click node_science_state "https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/flow/state.py"
click node_biotech_models "https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/models.py"
click node_code_compare_app "https://github.com/patchy631/ai-engineering-hub/blob/main/code-model-comparison/app.py"
click node_code_ingestion "https://github.com/patchy631/ai-engineering-hub/blob/main/sonnet4-vs-o4/code_ingestion.py"
click node_model_service "https://github.com/patchy631/ai-engineering-hub/blob/main/sonnet4-vs-o4/model_service.py"
click node_code_evaluation "https://github.com/patchy631/ai-engineering-hub/blob/main/gpt-oss-vs-qwen3/code_evaluation_opik.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_llama_workflow,node_rag_generation,node_vector_db toneBlue
class node_notebook_app,node_audio_transcriber,node_doc_processor,node_embeddings,node_memory_layer,node_podcast_script,node_podcast_tts,node_web_scraper toneAmber
class node_biotech_app,node_ocr_pipeline,node_science_flow,node_science_state,node_biotech_models toneMint
class node_code_compare_app,node_code_ingestion,node_model_service,node_code_evaluation toneRose
```

## Components

### RAG and Research

- [Llama 4 RAG](https://github.com/patchy631/ai-engineering-hub/blob/main/llama-4-rag/workflow.py): `llama-4-rag/workflow.py`
- [Notebook RAG](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/generation/rag.py): `notebook-lm-clone/src/generation/rag.py`
- [Milvus Vector Store](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/vector_database/milvus_vector_db.py): `notebook-lm-clone/src/vector_database/milvus_vector_db.py`

### Media and Knowledge

- [NotebookLM App](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/app.py): `notebook-lm-clone/app.py`
- [Audio Transcription](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/audio_processing/audio_transcriber.py): `notebook-lm-clone/src/audio_processing/audio_transcriber.py`
- [Document Processing](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/document_processing/doc_processor.py): `notebook-lm-clone/src/document_processing/doc_processor.py`
- [Embedding Generation](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/embeddings/embedding_generator.py): `notebook-lm-clone/src/embeddings/embedding_generator.py`
- [Conversation Memory](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/memory/memory_layer.py): `notebook-lm-clone/src/memory/memory_layer.py`
- [Podcast Scripting](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/podcast/script_generator.py): `notebook-lm-clone/src/podcast/script_generator.py`
- [Speech Synthesis](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/podcast/text_to_speech.py): `notebook-lm-clone/src/podcast/text_to_speech.py`
- [Web Scraping](https://github.com/patchy631/ai-engineering-hub/blob/main/notebook-lm-clone/src/web_scraping/web_scraper.py): `notebook-lm-clone/src/web_scraping/web_scraper.py`

### Agents and Analysis

- [Biotech Analyst UI](https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/app.py): `biotech-agentic-analyst/app.py`
- [Paper OCR Pipeline](https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/mistral_ocr_pipeline/pipeline.py): `biotech-agentic-analyst/mistral_ocr_pipeline/pipeline.py`
- [Science Analysis Flow](https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/flow/science_flow.py): `biotech-agentic-analyst/flow/science_flow.py`
- [Analysis State](https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/flow/state.py): `biotech-agentic-analyst/flow/state.py`
- [Biotech Data Models](https://github.com/patchy631/ai-engineering-hub/blob/main/biotech-agentic-analyst/models.py): `biotech-agentic-analyst/models.py`

### Model Evaluation

- [Code Model Comparison](https://github.com/patchy631/ai-engineering-hub/blob/main/code-model-comparison/app.py): `code-model-comparison/app.py`
- [Repository Ingestion](https://github.com/patchy631/ai-engineering-hub/blob/main/sonnet4-vs-o4/code_ingestion.py): `sonnet4-vs-o4/code_ingestion.py`
- [Model Service](https://github.com/patchy631/ai-engineering-hub/blob/main/sonnet4-vs-o4/model_service.py): `sonnet4-vs-o4/model_service.py`
- [Code Evaluation](https://github.com/patchy631/ai-engineering-hub/blob/main/gpt-oss-vs-qwen3/code_evaluation_opik.py): `gpt-oss-vs-qwen3/code_evaluation_opik.py`

## Connections

- NotebookLM App → Audio Transcription: uses transcription (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Document Processing: uses processing (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Embedding Generation: uses embeddings (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Notebook RAG: uses retrieval (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Conversation Memory: uses memory (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Podcast Scripting: uses scripting (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Speech Synthesis: uses synthesis (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Milvus Vector Store: uses storage (evidence: `notebook-lm-clone/app.py`)
- NotebookLM App → Web Scraping: uses scraping (evidence: `notebook-lm-clone/app.py`)
- Notebook RAG → Milvus Vector Store: retrieves from (evidence: `notebook-lm-clone/src/generation/rag.py`)
- Notebook RAG → Embedding Generation: uses embeddings (evidence: `notebook-lm-clone/src/generation/rag.py`)
- Notebook RAG → Document Processing: uses processing (evidence: `notebook-lm-clone/src/generation/rag.py`)
- Speech Synthesis → Podcast Scripting: uses scripts (evidence: `notebook-lm-clone/src/podcast/text_to_speech.py`)
- Web Scraping → Document Processing: uses processing (evidence: `notebook-lm-clone/src/web_scraping/web_scraper.py`)
- Podcast Scripting → Document Processing: uses processing (evidence: `notebook-lm-clone/src/podcast/script_generator.py`)
- Biotech Analyst UI → Paper OCR Pipeline: runs OCR (evidence: `biotech-agentic-analyst/app.py`)
- Biotech Analyst UI → Science Analysis Flow: starts analysis (evidence: `biotech-agentic-analyst/app.py`)
- Biotech Analyst UI → Analysis State: sets state (evidence: `biotech-agentic-analyst/app.py`)
- Paper OCR Pipeline → Biotech Data Models: builds records (evidence: `biotech-agentic-analyst/mistral_ocr_pipeline/pipeline.py`)
- Science Analysis Flow → Analysis State: uses state (evidence: `biotech-agentic-analyst/flow/science_flow.py`)
- Code Model Comparison → Model Service: requests models (evidence: `code-model-comparison/app.py`)
- Code Model Comparison → Repository Ingestion: ingests repository (evidence: `code-model-comparison/app.py`)
- Code Model Comparison → Code Evaluation: evaluates output (evidence: `code-model-comparison/app.py`)
