Python Python Design idea one language independent of solution type Things to Know Zen of python New features in python are introduced as PEP (Python enhancement Proposal) Python has many distributions Cpython: One which we use IronPython Jython Two types of languages based on types Static typed languages Dynamic typed languages Python: Dynamically typed language… Continue reading Python Classroom notes 09/Sep/2026
Author: continuous learner
enthusiastic technology learner
Gen-AI Developer Classroom notes 09/Sep/2026
Basics of Langchain Langchain built a interface which abstracts the model Interaction with llm generally involves prompt model output structure Langchain did simply this with chaining prompt | model | parser Lets try this Runnable in langchain (Base class for many langchain objects) PromptTemplates Refer Here for basic langchain chains with model interaction.
Python Classroom notes 07/Sep/2026
How do programs work program is executed on os. To make the program work we have 3 options Compiler Interpreter Hybrid OS’s create a process and each process gets its own cpu and memory program is loaded into process in the case of python with python executable.
Gen-AI Developer Classroom notes 07/Sep/2026
Lets look into what agent is ? Agent (created from create_agent) is a graph at its core Langgraph is what makes this graphs possible Langgraph helps in creating custom agents with your workflows. Langgraph terminology Graph is a collection of nodes connected with each other Langraph uses the same terms Nodes (where processing happens) Edges… Continue reading Gen-AI Developer Classroom notes 07/Sep/2026
Python Classroom notes 05/Sep/2026
WSGI and ASGI WSGI ASGI Creating a simple api Purpose: which returns flats on rent based on filters location type To acheive this lets make little steps Step 1: Create a standard folder structure Figure out what is standard root (project name) Create a repository in github (private) with same name clone the repository into… Continue reading Python Classroom notes 05/Sep/2026
Python Classroom notes 03/Sep/2026
Functions reusable instructions (block ) reverse of a number number = 731 orig = number rev = 0 until number > 0 rev = number % 10 + rev * 10 number = number / 10 say rev To make this function define reverse(number) orig = number rev = 0 until number > 0 rev… Continue reading Python Classroom notes 03/Sep/2026
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
Python Classroom notes 02/Sep/2026
Problems Prime number Solution number = 7 start = 2 is_prime = True until start < number if number % start == 0 is_prime = False exit or break start = start + 1 say is_prime optimization number = 7 start = 2 is_prime = True until start <= number / 2 if number %… Continue reading Python Classroom notes 02/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
Python Classroom notes 01/Sep/2026
looping Kid now knows and or not Sample – 1 Sum of all numbers from 1 to 10 result = 0 start = 1 end = 10 until start <= end result = result + start start = start + 1 say result Sample – 2 Factorial of a number number = 5 result =… Continue reading Python Classroom notes 01/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
Python Classroom notes 31/Aug/2026
Conditional flow Generally program executes instructions one by one What kid knows Addition (+) Subtraction (-) Multiplication (*) integer Division Quotient (//) Remainder or modulus (%) Division (/) equals (==) less than (<) less than or equals <= gt (>) ge (‘>=) assignment (=) Scenario – 1 we need to make this kid tell if… Continue reading Python Classroom notes 31/Aug/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 26/Aug/2026
Execution Kid executes one instruction at a time Add 3, 5 and remember as C C = 3 + 5 A step will have calculations and/or remembering To speak with kid follow the below structure What kid knows Addition (+) Subtraction (-) Multiplication (*) integer Division Quotient (//) Remainder or modulus (%) Division (/) equals… Continue reading Python Classroom notes 26/Aug/2026
Gen-AI Developer Classroom notes 26/Aug/2026
Build a Basic Agent I Want to build a agent which calls tools Agent: Model + Prompt Tool Framework Model (LLM) Where will i get access to a models Hosted by provider Google AI Studio (Free access available) Hosted by Cloud Providers (Enterpirse) Self Hosted In the class when we built the agent these were… Continue reading Gen-AI Developer Classroom notes 26/Aug/2026
Python Classroom notes 25/Aug/2026
Programming To solve repetitive time consuming problems Our approach Generally a program is executed on a system and it executes the instructions one by one Add 3, 3 and remember as result Add result, 3 and remember as result Add result, 3 and remember as result Programs are executed by systems with some OS (operating… Continue reading Python Classroom notes 25/Aug/2026
Gen-AI Developer Classroom notes 25/Aug/2026
Introduction to Agents Usecase – 1: Customer raised a complaint that the product is not delivered Customer care representative: pulls the records * order * shipping * delivery information Options: * Redeliver * Refund Solution * Pick a tool calling model * a tool to read customer complaints * a tool to read the order,… Continue reading Gen-AI Developer Classroom notes 25/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
