Request and Response Handling PATH Parameters Refer Here for official docs Refer Here for the changes done Query Parameters Refer Here for official docs Refer Here for examples Body Refer Here for request body Form Parameters Refer Here Refer Here for handling files Refer Here Header and Cookies Refer Here for header parameters Refer Here… Continue reading Python Classroom notes 17/Aug/2026
Category: Classroom notes
Gen-AI Developer Classroom notes 15/Aug/2026
Usecase Short news: Take the news and create a 40-45 word short news in english and any regional language. recommendations: Pick a model which is good at generating regional content Git Commit Messages: Any organization will have a structure for git commit : <JIRA|REQ-ID>: <Description> <Category>: <feature|defect|poc> For the git problem try to take the… Continue reading Gen-AI Developer Classroom notes 15/Aug/2026
Python Classroom notes 13/Aug/2026
Data Validation FastApi uses pydantic Create a simple file models.py from pydantic import BaseModel class ProductResponse(BaseModel): name: str price: float description: str class ProductRequest(ProductResponse): id: int Use this schema in main.py from fastapi import FastAPI, status from models import ProductRequest, ProductResponse # create an application object app = FastAPI() @app.get("/") def home(): return "Welcome to… Continue reading Python Classroom notes 13/Aug/2026
Gen-AI Developer Classroom notes 13/Aug/2026
Executing the finetuning Open google colab File => Open Notebook => Github => https://github.com/GenAIDevelopment/agenticai/blob/main/aug26/finetune/Qwen3_PizzaPalace_finetune.ipynb upload jsonl files into files section in colab
Python Classroom notes 11/Aug/2026
Lets build our first api’s Lets Build apis for inventory Identify nouns and verbs Product Get update delete Create Sale(Order) Create Get Delete Procurement Create Get Delete Vendor Get update delete Create Customer Get update delete Create Employee Get update delete Create To build this lets use Fastapi Create a folder called as hello-api lets… Continue reading Python Classroom notes 11/Aug/2026
Gen-AI Developer Classroom notes 11/Aug/2026
PEFT, LORA, QLORA Parameter efficient Fine Tuning is about identifying an additional matrices with weights to change the behavior of the model LoRA (Low Rank Adapters) => Rather than using the whole matrices use 2 matrices with lower sizes (100 * 3 3 * 100) Quantization will compress the size of each floating point (8… Continue reading Gen-AI Developer Classroom notes 11/Aug/2026
Python Classroom notes 10/Aug/2026
REST APIs VERBS/Methods GET POST PUT DELETE PATCH Status Codes This a 3 digit number between 100-599 Status code categories Information 1xx Success 2xx Redirection 3xx Client Side errors 4xx Server side errors 5xx HTTP Headers These are key value pairs REST Design philosopy Verbs and Nouns Lets think of IRCTC Nouns: User Employee Train… Continue reading Python Classroom notes 10/Aug/2026
Gen-AI Developer Classroom notes 10/Aug/2026
Why would i fine tune Finetuning is not for facts its for behavior. Example 1 usecase: I have a need to build an application which will help in retrieving the latest information about organization policies. Solution: A RAG would be right fit Example 2 usecase: I’m building a customer support chatbot, where the model should… Continue reading Gen-AI Developer Classroom notes 10/Aug/2026
Gen-AI Developer Classroom notes 08/Aug/2026
Typical Model Training Stage 1: Base model – Become knowledagble Here a model is trained on large volumes of data where the result is model can predict next token Stage 2: Instruct model – Learn how to interact Here a methodolgy called supervised finetuning is used to teach model on how to follow instructions. Stage… Continue reading Gen-AI Developer Classroom notes 08/Aug/2026
Python Classroom notes 06/Aug/2026
UV Ultra fast package manager Refer Here UV helps in basic project creation installing: use brew or winget Python project creation options uv helps in creating two types of python projects (applicaton and library) default option is app Lets build an app mkdir hello_uv_app cd hello_uv_app uv init . Lets create a library mkdir hello_uv_lib… Continue reading Python Classroom notes 06/Aug/2026
Gen-AI Developer Classroom notes 06/Aug/2026
Encoders and Decoders in Transformer Encoder is used to understand Decoder is used to generate Most of the RECENT LLMS are decoder only (GPT, Claude) How does Image generation work out Patch Computation Now how can i make a model behave differently A model has Weights which are adjusted during training phases Now if we… Continue reading Gen-AI Developer Classroom notes 06/Aug/2026
Python Classroom notes 03/Aug/2026
Web Programming Here we have two problems to solve Web serving html pages => Web APP Frameworks: Django Web serving data/actions/method => APIs Frameworks: FastAPI Flask Django-restful our focus: APIs with FastAPI Lets use a calculator which is hosted as api Instructions to run an api server on your system git clone https://github.com/asquarezone/Python.git cd Python/Aug26/WebAPIs/using_apis/calc… Continue reading Python Classroom notes 03/Aug/2026
Gen-AI Developer Classroom notes 03/Aug/2026
Transformers contd Lets play with transformers Running a small llm in google colab import torch from transformers import AutoTokenizer, AutoModelForCausalLM model_name = "Qwen/Qwen3-0.6B" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype="auto", device_map="auto" ) prompt = "Explain Democracy in simple words." messages = [ {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True )… Continue reading Gen-AI Developer Classroom notes 03/Aug/2026
Python Classroom notes 30/Jul/2026
External packages in python When we install python, we get standard library Now lets assume i want to write python code to get list of s3 buckets in aws account. AWS gives a package (package is set of python modules organized in folders) As part of python installation we get package manager (pip/pipx) and all… Continue reading Python Classroom notes 30/Jul/2026
Gen-AI Developer Classroom notes 30/Jul/2026
Embedding This converts words into vector (array of floating point numbers) Embeddings will have whole vocabulary of words, these are not words but we refer them as tokens LLMS accept tokens (input tokens) and generate tokens (output tokens) Pricing of hosted llms is based on tokens Try the below prompt Give me model pricing of… Continue reading Gen-AI Developer Classroom notes 30/Jul/2026
Python Classroom notes 29/Jul/2026
We want to store history of calculations Refer Here for the commit Dependency Injection injecting dependecies: Ensure your functions or methods dont create objects but take objects as arguments Deciding which objects to create (Container)
Gen-AI Developer Classroom notes 29/Jul/2026
Evolution Machine Learning Neural Networks + Deep Learning Natural language Processing Word2Vec => Numerical vector => Semantics Embeddings (Evolution of Word2Vec) Transformers and Attention Hardware: GPU, TPU
Python Classroom notes 28/Jul/2026
Decorator Decorators add additional functionality to existing functions or classes. To write our own decorators, we need to understand the concept of nested functions Refer Here Exercise We have a code which does calcualations When the user chooses the option verbose I’m supposed to print each variable value (args) Calculator We support multiple types of… Continue reading Python Classroom notes 28/Jul/2026
Gen-AI Developer Classroom notes 28/Jul/2026
Models We have two types of models Open source Models OpenAI Qwen GLM Google Gemma Vendor Models: Popular: Claude Open AI Gemini Amazon Groq To access open source models we have following options Run on your hardware Hosted: Cloud GCP AWS Azure To access vendor specific models Direct Vendor APIs Cloud Hosted: AWS Azure GCP… Continue reading Gen-AI Developer Classroom notes 28/Jul/2026
Gen-AI Developer Classroom notes 25/Jul/2026
Handling Document Updates When the source documents change, How to handle them Strategy 1: Full re-index Strategy 2: Content hashing + incremental upsert Strategy 3: Langchain’s built in indexing API Strategy 4: Document level versioning + soft delete. Refer Here for illustration Project: NCERT Book RAG Refer Here for the project repo
