How saksham20189575/generative-ai-notes works
Purpose and Repository Shape
This is a curriculum repository, not a deployable application. It teaches Python through AI-agent, RAG, LangChain, and multi-agent patterns using sequential Markdown lessons plus independently runnable Python labs. The learner-facing entry point is README.md; environment dependencies are centralized in requirements.txt and setup_env.sh.
Learning Pipeline
The top-level numbered directories form the primary progression: Python foundations → agent concepts → memory and databases → embeddings/vector search → RAG → tools → LLM frameworks → automation. Each module’s README.md is the conceptual boundary and each topic folder is a lesson unit:
• 01-Programming-Foundations/README.md
• 06-Retrieval-Augmented-Generation/README.md
• 08-LLM-Frameworks-and-Local-Models/README.md
Runnable Python Foundations
Early lessons use standalone scripts as direct execution entry points, establishing Python control flow, collections, functions, and OOP needed by later examples. They do not form a shared package or reusable runtime:
• 01-Programming-Foundations/01-Intro-to-Programming-and-Python-Basics/code/firstProgram.py
• 01-Programming-Foundations/04-Lists-and-Functions/code/04_functions.py
• 01-Programming-Foundations/05-Strings-Dictionaries-and-Classes/code/06_classes_objects.py
RAG and Retrieval Labs
The core implementation pattern is document corpus → embedding/vector retrieval → LLM-grounded response. Policy or handbook files are local knowledge boundaries; the main.py/rag.py scripts orchestrate ingestion and querying. Retrieval quality is explored separately from the baseline pipeline:
• Coding-Examples/rag_pipeline/main.py
• Coding-Examples/rag_pipeline/policy_documents/refunds_policy.txt
• Coding-Examples/improving_rag/main.py
• Coding-Examples/shopkart_rag/rag.py
LangChain Agent Stack
LangChain examples progressively compose chains, tool calling, memory, RAG retrieval tools, and agent evaluation/debugging. Each directory is an isolated executable scenario rather than a shared agent platform. The integrated-agent examples use local handbook documents as retriever context; evaluation inputs include persisted JSON traces:
• Coding-Examples/langChain/main.py
• Coding-Examples/langChain_integrated_agent/main.py
• Coding-Examples/langChain_integrated_agent/handbook_docs/leave_policy.md
• Coding-Examples/langChain_agent_evaluation/main.py
• Coding-Examples/langChain_agent_evaluation/trace_refund_policy.json
External Models, Services, and Tools
Material integration boundaries include LLM APIs, JSON/HTTP APIs, local Ollama models, vector databases (Chroma is identified by the root README), LangChain, CrewAI, and n8n-oriented workflow concepts. Credentials are intentionally externalized through example environment files where needed:
• Coding-Examples/api_call/main.py
• Coding-Examples/tool_integration/main.py
• Coding-Examples/ollama/main.py
• Coding-Examples/langChain_worktree/.env.example
• Coding-Examples/shopkart_rag/.env.example
Multi-Agent Automation
The final stage demonstrates orchestration patterns: role/task-based CrewAI and an HTTP-triggered researcher → writer → editor flow. The latter is the closest thing to a service boundary, incorporating webhook callback, signature validation, and idempotency concepts, but remains a runnable educational script:
• Coding-Examples/multi_agent_crewai/main.py
• Coding-Examples/multi_agent_crewai/campus_facts.txt
• Coding-Examples/multi_agent_http_automation/main.py
• 09-Multi-Agent-Systems-and-Automation/36-Multi-Agent-Architecture-and-HTTP-Automation/README.md
Main entry points: langChain_integrated_agent/main.py Integrated LangChain agent · rag_pipeline/main.py Baseline RAG pipeline · 01-Programming-Foundations/README.md Python foundations module · 06-Retrieval-Augmented-Generation/README.md RAG module
Components 22
Curriculum
Sequential learner-facing Markdown modules.
- Course entry point · Introduces the curriculum and named integrations.
README.md - Environment setup · Centralized package and environment setup.
requirements.txt - Python foundations module · Conceptual prerequisite for later runnable labs.
01-Programming-Foundations/README.md - RAG module · Conceptual boundary for retrieval-augmented generation.
06-Retrieval-Augmented-Generation/README.md - LLM frameworks module · Covers framework and local-model concepts.
08-LLM-Frameworks-and-Local-Models/README.md
Python Foundations
Standalone prerequisite exercises.
- Standalone Python exercises · Directly runnable control-flow, functions, and OOP examples.
01-Programming-Foundations/01-Intro-to-Programming-and-Python-Basics/code/firstProgram.py - Functions exercise
01-Programming-Foundations/04-Lists-and-Functions/code/04_functions.py - Classes and objects exercise
01-Programming-Foundations/05-Strings-Dictionaries-and-Classes/code/06_classes_objects.py
RAG Labs
Document-grounded retrieval scenarios.
- Policy document corpus · Local knowledge boundary for baseline RAG.
Coding-Examples/rag_pipeline/policy_documents/refunds_policy.txt - Baseline RAG pipeline · Ingests local documents and answers grounded queries.
Coding-Examples/rag_pipeline/main.py - Retrieval quality lab · Explores retrieval improvements separately from the baseline.
Coding-Examples/improving_rag/main.py - Shopkart RAG lab · Alternative runnable RAG scenario with externalized credentials.
Coding-Examples/shopkart_rag/rag.py
Agent Labs
Isolated LangChain agent scenarios.
- LangChain composition · Introduces chains and tool-calling composition.
Coding-Examples/langChain/main.py - Integrated LangChain agent · Combines tools, memory, and handbook retrieval.
Coding-Examples/langChain_integrated_agent/main.py - Handbook context · Retriever context for the integrated agent.
Coding-Examples/langChain_integrated_agent/handbook_docs/leave_policy.md - Agent evaluation lab · Debugs and evaluates agents using persisted traces.
Coding-Examples/langChain_agent_evaluation/main.py - Persisted agent trace
Coding-Examples/langChain_agent_evaluation/trace_refund_policy.json
Automation
Multi-agent orchestration examples.
- CrewAI role/task lab · Coordinates role-based multi-agent tasks.
Coding-Examples/multi_agent_crewai/main.py - HTTP automation flow · Webhook-driven researcher-to-writer-to-editor orchestration.
Coding-Examples/multi_agent_http_automation/main.py - HTTP automation lesson · Explains multi-agent architecture and HTTP automation concepts.
09-Multi-Agent-Systems-and-Automation/36-Multi-Agent-Architecture-and-HTTP-Automation/README.md
Other components
- Vector retrieval · Embedding-backed document retrieval used by RAG examples.
- LLM models and APIs · Hosted APIs and local Ollama models supply generation.
Connections 24
- Course entry point → Environment setup: setup guidance
- Course entry point → Python foundations module: starts progression
- Python foundations module → RAG module: prerequisite progression
- RAG module → LLM frameworks module: next stage
- Python foundations module → Standalone Python exercises: contains runnable lesson
- Standalone Python exercises → Functions exercise: builds toward
- Functions exercise → Classes and objects exercise: builds toward
- RAG module → Baseline RAG pipeline: applied lab
- Policy document corpus → Baseline RAG pipeline: ingested
- Baseline RAG pipeline → Vector retrieval: embeds and retrieves
- Vector retrieval → LLM models and APIs: grounded context for
- Baseline RAG pipeline → Retrieval quality lab: baseline for
- Shopkart RAG lab → Vector retrieval: retrieves from
- Shopkart RAG lab → LLM models and APIs: generates with
- LLM frameworks module → LangChain composition: applied lab
- LangChain composition → Integrated LangChain agent: progresses to
- Handbook context → Integrated LangChain agent: retriever context
- Integrated LangChain agent → Vector retrieval: retrieves through
- Integrated LangChain agent → LLM models and APIs: uses
- Integrated LangChain agent → Agent evaluation lab: evaluated by
- Persisted agent trace → Agent evaluation lab: evaluation input
- CrewAI role/task lab → LLM models and APIs: coordinates
- HTTP automation lesson → HTTP automation flow: implemented as
- HTTP automation flow → LLM models and APIs: orchestrates