Gen-AI Developer Classroom notes 03/Sep/2026

Long term memory Refer Here for longterm memory Longterm memory spans across converstaions (sessions) Langchain uses store Lets play with InMemoryStore (ideally longterm ends in persistent store) MemoryStore is a Key Value Storage which is namespaced key is string and value is dictionary Longterm memory by types episodic semantic procedural Refer Here for sample code… Continue reading Gen-AI Developer Classroom notes 03/Sep/2026

Gen-AI Developer Classroom notes 02/Sep/2026

using agents and init chat models To create a model object just pass the string provider:model in init_chat_model create_agent Memory by scope Scope: current session/chat => short-term (checkpointer) across sessions => long term => store scratch pad (current task) => todo_list Create an agent invoke with interaction 1: tell your name interaction 2: ask your… Continue reading Gen-AI Developer Classroom notes 02/Sep/2026

Gen-AI Developer Classroom notes 01/Sep/2026

Prompt Engineering Core Principles => Garbage in and Garbage out In our case we create an agent which has model tools Every request to model will carry tools schema system prompt human message optionally tool responses previous messages or previous messages summary Anatomy of a good prompt Role Action Context Format Constraints Sample prompt You… Continue reading Gen-AI Developer Classroom notes 01/Sep/2026

Gen-AI Developer Classroom notes 31/Aug/2026

Messages in langchain when we are interacting with model we have following options system prompt: This sets the system instructions for a model human prompt: This is users question llm response: This is response from llm tool message: This represents tool response. According to langchain terminology System Prompt => SystemMessage HumanPrompt => HumanMessage LLM Response… Continue reading Gen-AI Developer Classroom notes 31/Aug/2026

Gen-AI Developer Classroom notes 27/Aug/2026

Developer Environment Setup for Agents Python windows winget install –id Python.Python.3.13 mac brew install python@3.13 UV Windows winget install -e –id astral-sh.uv mac brew install uv Visual Studio Code with necessary extensions Windows winget install Microsoft.VisualStudioCode Mac brew install –cask visual-studio-code Google AI Studio API Key Note: For vscode extensions Python (Microsoft) Jupyter (Microsoft) Windows… Continue reading Gen-AI Developer Classroom notes 27/Aug/2026

Python Classroom notes 22/Aug/2026

Threads, Thread pool, Concurrency and Async CPU Intensive activities use multiprocessing IO intensive activities: (async) Calls are blocked Lets create a simple python module which demonstrates the async We are supposed to download files from internet we have a python function python def download_file(url:str): pass When we are downloding multiple files (blocking style) for url… Continue reading Python Classroom notes 22/Aug/2026

Python Classroom notes 20/Aug/2026

Adding persistence layer (storing into databases) From python to interact with relational databases we have two apporaches Write sql queries and code around for your business logic. ORM (Object Relational Mapping): we deal with python objects and ORM translates that into SQL Queries depending on db. ORM would require a db driver package Concepts Connection… Continue reading Python Classroom notes 20/Aug/2026

Python Classroom notes 20/Aug/2026

Adding persistence layer (storing into databases) From python to interact with relational databases we have two apporaches Write sql queries and code around for your business logic. ORM (Object Relational Mapping): we deal with python objects and ORM translates that into SQL Queries depending on db. ORM would require a db driver package Concepts Connection… Continue reading Python Classroom notes 20/Aug/2026

Python Classroom notes 20/Aug/2026

Adding persistence layer (storing into databases) From python to interact with relational databases we have two apporaches Write sql queries and code around for your business logic. ORM (Object Relational Mapping): we deal with python objects and ORM translates that into SQL Queries depending on db. ORM would require a db driver package Concepts Connection… Continue reading Python Classroom notes 20/Aug/2026

Python Classroom notes 18/Aug/2026

Creating a Fastapi Project Structure Step 1: Scaffold uv init learning-api –package –python 3.13 cd learning-api Step 2: Add Dependencies # for project uv add fastapi "uvicorn[standard]" pydantic-settings email-validator # for tests uv add –dev pytest pytest-asyncio pytest-cov httpx ruff mypy debugpy Step 3: Directories mkdir src/learning_api/api mkdir src/learning_api/api/v1 mkdir src/learning_api/core mkdir src/learning_api/schemas mkdir src/learning_api/services… Continue reading Python Classroom notes 18/Aug/2026