# sumit-exe/building-ai-agents-and-rag architecture

> Architecture diagram of the GitHub repository sumit-exe/building-ai-agents-and-rag, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sumit-exe/building-ai-agents-and-rag
- Repository: https://github.com/sumit-exe/building-ai-agents-and-rag

## Overview

This repository is a hands-on agentic-AI course, not one integrated application. Its documented learning path moves from basic LLM calls through retrieval and agent patterns to safety, evaluation, and two end-to-end projects. The shopping project handles text/image product discovery, ratings, and confirmed checkout; the telecom project answers support questions using FAQ, ticket, and guide retrieval. Relationships within those projects are grounded in excerpts. Other tutorial folders are represented as capabilities, without inferring calls between independent examples.

Main entry points: [`README.md`](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/README.md) (Course Guide), [`10_project_shopping_agent/shopping_agent.py`](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/shopping_agent.py) (Shopping Agent), [`11_project_telecom_chatbot/rag_chain.py`](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/rag_chain.py) (Answer Chain), [`9_eval/func_eval.py`](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/9_eval/func_eval.py) (Evaluation Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["LLM Foundations"]
  node_llm_basics["LLM Calls<br/>[call_llm.ipynb]"]
  node_health["Health Analysis<br/>[app.py]"]
  node_vector_db["Vector Databases"]
  node_rag_basics["RAG Basics<br/>[rag_demo.ipynb]"]
end

subgraph group_patterns["Agent Patterns"]
  node_single_agent["Single Agent"]
  node_memory["Agent Memory"]
  node_multimodal["Multimodal Agent"]
end

subgraph group_quality["Safety and Evaluation"]
  node_guardrails["Guardrails<br/>[guardrails.py]"]
  node_eval_agent["Inventory Agent<br/>[inventory_agent.py]"]
  node_eval_runner["Evaluation Runner<br/>[func_eval.py]"]
  node_similarity["Semantic Similarity<br/>[utils.py]"]
end

subgraph group_shopping["Shopping Project"]
  node_shop_ui["Shopping Interface<br/>[app.py]"]
  node_shop_agent["Shopping Agent<br/>[shopping_agent.py]"]
  node_ratings["Product Ratings<br/>[reviews_api.py]"]
  node_shop_db[("Store Database<br/>[store.db]")]
end

subgraph group_telecom["Telecom Project"]
  node_telecom_ui["Support Interface<br/>[app.py]"]
  node_telecom_cli["CLI Entry<br/>[main.py]"]
  node_rag_chain["Answer Chain<br/>[rag_chain.py]"]
  node_retriever["Merged Retriever<br/>[retriever.py]"]
  node_faq_ingest["FAQ Ingestion<br/>[ingest_faq.py]"]
  node_ticket_ingest["Ticket Ingestion<br/>[ingest_tickets.py]"]
  node_guide_ingest["Guide Ingestion<br/>[ingest_pdf.py]"]
  node_chroma[("Chroma Collections")]
end

node_learner(("Learner"))
node_course["Course Guide<br/>[README.md]"]

node_learner -->|"follows"| node_course
node_course -->|"starts with"| node_llm_basics
node_course -->|"covers"| node_health
node_course -->|"covers"| node_vector_db
node_course -->|"covers"| node_rag_basics
node_course -->|"covers"| node_single_agent
node_course -->|"covers"| node_memory
node_course -->|"covers"| node_multimodal
node_course -->|"covers"| node_guardrails
node_course -->|"covers"| node_eval_agent
node_shop_ui -->|"invokes"| node_shop_agent
node_shop_agent -->|"queries"| node_ratings
node_shop_agent -->|"searches and orders"| node_shop_db
node_ratings -->|"reads reviews"| node_shop_db
node_eval_runner -->|"evaluates"| node_eval_agent
node_eval_runner -->|"scores answers"| node_similarity
node_telecom_ui -->|"streams answers"| node_rag_chain
node_telecom_cli -->|"streams answers"| node_rag_chain
node_rag_chain -->|"retrieves context"| node_retriever
node_retriever -->|"queries collections"| node_chroma
node_faq_ingest -.->|"populates FAQ"| node_chroma
node_ticket_ingest -.->|"populates tickets"| node_chroma
node_guide_ingest -.->|"populates guide"| node_chroma

click node_course "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/README.md"
click node_llm_basics "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/1_simple_llm_calling/call_llm.ipynb"
click node_health "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/2_health_analysis/streamlit_app/app.py"
click node_vector_db "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/3_vector_db/vector_db_basics.ipynb"
click node_rag_basics "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/4_rag_basics/rag_demo.ipynb"
click node_single_agent "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/5_single_agent/product_query_agent.ipynb"
click node_memory "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/6_memory/product_query_agent_with_memory.ipynb"
click node_multimodal "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/7_multimodal/multimodal_demo.ipynb"
click node_guardrails "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/8_guardrails/guardrails.py"
click node_eval_agent "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/9_eval/inventory_agent.py"
click node_eval_runner "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/9_eval/func_eval.py"
click node_similarity "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/9_eval/utils.py"
click node_shop_ui "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/app.py"
click node_shop_agent "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/shopping_agent.py"
click node_ratings "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/reviews_api.py"
click node_shop_db "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/store.db"
click node_telecom_ui "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/app.py"
click node_telecom_cli "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/main.py"
click node_rag_chain "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/rag_chain.py"
click node_retriever "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/retriever.py"
click node_faq_ingest "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/ingest_faq.py"
click node_ticket_ingest "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/ingest_tickets.py"
click node_guide_ingest "https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/ingest_pdf.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_llm_basics,node_health,node_vector_db,node_rag_basics toneBlue
class node_single_agent,node_memory,node_multimodal toneAmber
class node_guardrails,node_eval_agent,node_eval_runner,node_similarity toneMint
class node_shop_ui,node_shop_agent,node_ratings,node_shop_db toneRose
class node_telecom_ui,node_telecom_cli,node_rag_chain,node_retriever,node_faq_ingest,node_ticket_ingest,node_guide_ingest,node_chroma,node_learner toneIndigo
class node_course toneTeal
```

## Components

### LLM Foundations

- [LLM Calls](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/1_simple_llm_calling/call_llm.ipynb): `1_simple_llm_calling/call_llm.ipynb`
- [Health Analysis](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/2_health_analysis/streamlit_app/app.py): `2_health_analysis/streamlit_app/app.py`
- [Vector Databases](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/3_vector_db/vector_db_basics.ipynb): `3_vector_db/vector_db_basics.ipynb`
- [RAG Basics](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/4_rag_basics/rag_demo.ipynb): `4_rag_basics/rag_demo.ipynb`

### Agent Patterns

- [Single Agent](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/5_single_agent/product_query_agent.ipynb): `5_single_agent/product_query_agent.ipynb`
- [Agent Memory](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/6_memory/product_query_agent_with_memory.ipynb): `6_memory/product_query_agent_with_memory.ipynb`
- [Multimodal Agent](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/7_multimodal/multimodal_demo.ipynb): `7_multimodal/multimodal_demo.ipynb`

### Safety and Evaluation

- [Guardrails](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/8_guardrails/guardrails.py): `8_guardrails/guardrails.py`
- [Inventory Agent](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/9_eval/inventory_agent.py): `9_eval/inventory_agent.py`
- [Evaluation Runner](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/9_eval/func_eval.py): `9_eval/func_eval.py`
- [Semantic Similarity](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/9_eval/utils.py): `9_eval/utils.py`

### Shopping Project

- [Shopping Interface](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/app.py): `10_project_shopping_agent/app.py`
- [Shopping Agent](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/shopping_agent.py): `10_project_shopping_agent/shopping_agent.py`
- [Product Ratings](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/reviews_api.py): `10_project_shopping_agent/reviews_api.py`
- [Store Database](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/10_project_shopping_agent/store.db): `10_project_shopping_agent/store.db`

### Telecom Project

- [Support Interface](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/app.py): `11_project_telecom_chatbot/app.py`
- [CLI Entry](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/main.py): `11_project_telecom_chatbot/main.py`
- [Answer Chain](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/rag_chain.py): `11_project_telecom_chatbot/rag_chain.py`
- [Merged Retriever](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/retriever.py): `11_project_telecom_chatbot/retriever.py`
- [FAQ Ingestion](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/ingest_faq.py): `11_project_telecom_chatbot/ingest_faq.py`
- [Ticket Ingestion](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/ingest_tickets.py): `11_project_telecom_chatbot/ingest_tickets.py`
- [Guide Ingestion](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/11_project_telecom_chatbot/ingest_pdf.py): `11_project_telecom_chatbot/ingest_pdf.py`
- **Chroma Collections**

### Other components

- **Learner**
- [Course Guide](https://github.com/sumit-exe/building-ai-agents-and-rag/blob/main/README.md): `README.md`

## Connections

- Learner → Course Guide: follows (evidence: `README.md`)
- Course Guide → LLM Calls: starts with (evidence: `README.md`)
- Course Guide → Health Analysis: covers (evidence: `README.md`)
- Course Guide → Vector Databases: covers (evidence: `README.md`)
- Course Guide → RAG Basics: covers (evidence: `README.md`)
- Course Guide → Single Agent: covers (evidence: `README.md`)
- Course Guide → Agent Memory: covers (evidence: `README.md`)
- Course Guide → Multimodal Agent: covers (evidence: `README.md`)
- Course Guide → Guardrails: covers (evidence: `README.md`)
- Course Guide → Inventory Agent: covers (evidence: `README.md`)
- Shopping Interface → Shopping Agent: invokes (evidence: `10_project_shopping_agent/app.py`)
- Shopping Agent → Product Ratings: queries (evidence: `10_project_shopping_agent/shopping_agent.py`)
- Shopping Agent → Store Database: searches and orders (evidence: `10_project_shopping_agent/shopping_agent.py`)
- Product Ratings → Store Database: reads reviews (evidence: `10_project_shopping_agent/reviews_api.py`)
- Evaluation Runner → Inventory Agent: evaluates (evidence: `9_eval/func_eval.py`)
- Evaluation Runner → Semantic Similarity: scores answers (evidence: `9_eval/func_eval.py`)
- Support Interface → Answer Chain: streams answers (evidence: `11_project_telecom_chatbot/app.py`)
- CLI Entry → Answer Chain: streams answers (evidence: `11_project_telecom_chatbot/main.py`)
- Answer Chain → Merged Retriever: retrieves context (evidence: `11_project_telecom_chatbot/rag_chain.py`)
- Merged Retriever → Chroma Collections: queries collections (evidence: `11_project_telecom_chatbot/retriever.py`)
- FAQ Ingestion → Chroma Collections: populates FAQ
- Ticket Ingestion → Chroma Collections: populates tickets
- Guide Ingestion → Chroma Collections: populates guide
