Finetuning LLMS Deciding on Compute Free/Cheap: Google Colab: works with models for 7-8B with QLORA Faster/GPU Rentals: A10/A100 on RunPod/Colab Pro/kaggle. Or create the equivelent machines on the cloud and run Approach Unsloth publishes ready to run notebooks Refer Here for github repo with notebooks Preparing a dataset For instruct models we can give instructions… Continue reading Gen-AI Developer Classroom notes 24/Aug/2025
Tag: data-science
Gen-AI Developer Classroom notes 19/Aug/2025
Indexing Pipeline in RAG Indexing pipeline in RAG: The goal of indexing pipeline is store the data (external/private) in the vector database Environment setup Create a new folder, initialize using uv Now add two packages uv add langchain langchain-community Document Loaders in Langchain Refer Here for the official docs class diagram of hierarchy All the… Continue reading Gen-AI Developer Classroom notes 19/Aug/2025
Gen-AI Developer Classroom notes 18/Aug/2025
Understanding Indexing Scenario 1: I have a ayurvedic book (Every day ayurveda) I want a chatgpt to be my ayurvedic expert and suggest me lifesytle changes/medicines You can build a GPT/GEM and give a prompt and knowledge in terms of pdf files Programatic Approach Data Sources: pdf files markdown files databases api calls websites Chunking… Continue reading Gen-AI Developer Classroom notes 18/Aug/2025
Gen-AI Developer Classroom notes 17/Aug/2025
RAG RAG can be explained through three steps It retrieves relevant information from a datasource external to LLMs It augments the input to the LLM with that external information Finally LLM generates a more accurate result Idea of RAG Make LLMs respond with up-to-date information Make LLMs respond with factually accurate information Make LLMs aware… Continue reading Gen-AI Developer Classroom notes 17/Aug/2025
Gen-AI Developer Classroom notes 16/Aug/2025
Introduction to Fine-Tuning Large Language Models (LLM) RAG vs FineTuning RAG: we dont touhc the model we give it extra context great for knowledge injection Fine-Tuning: We are changing the models behavior by training it on new examples Great for behavior/style/task specialization Example: Make the model always reply like a teacher or always output SQL… Continue reading Gen-AI Developer Classroom notes 16/Aug/2025
Gen-AI Developer Classroom notes 16/Aug/2025
Usecase: Making ai applictions which are aware of your private data RAG ( Retrieval-Augmented Generation): RAG augments a LLM with external knowledge source(database, documents or API calls) Instead of depending on only whats in the model’s parameters, this system retrieves releavent information at query time and fees it into LLM’s context How it works: User… Continue reading Gen-AI Developer Classroom notes 16/Aug/2025
Gen-AI Developer Classroom notes 13/Aug/2025
Interacting with different LLMs Generally we might need to have our agent/rag work irrespective on LLM without huge changes i.e. we are abstracting the LLM interactions. Langchain and other frameworks (LLAMA Index) abstract the LLM interactions. Lets try to interact with openAI using langchain and then use the exact same code to interact with other… Continue reading Gen-AI Developer Classroom notes 13/Aug/2025
Gen-AI Developer Classroom notes 12/Aug/2025
Interacting with LargeLanguageModels – OpenAI To interact with openai via api using python, we need to create an api key Refer Here Create an api key and store it Lets create a new python project by create a new folder Ensure uv is installed Refer Here. Install using winget or homebrew in the new folder… Continue reading Gen-AI Developer Classroom notes 12/Aug/2025
Gen-AI Developer Classroom notes 11/Aug/2025
Playing with Transformers For this we will be using Google CoLAB Create a new Google CoLAB and execute the following in the block. Ensure the runtime is GPU (optional) !nvidia-smi -L || echo "NO GPU found (CPU is fine Change runtime)" !pip install -U transformers accelerate datasets sentencepiece sentence-transformers Refer Here for the Colab notebook… Continue reading Gen-AI Developer Classroom notes 11/Aug/2025
Gen-AI Developer Classroom notes 31/Jul/2025
System Setup Windows: Setup Terminal Mac: Install homebrew bash /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” Softwares: Git + Git Bash (Windows) mac brew install git Python winget install –id=Python.Python.3.11 -e brew install python@3.11 Pip UV Visual Studio Code winget install Microsoft.VisualStudioCode brew install –cask visual-studio-code Extensions: Python from Microsoft Jupyter Extension Accounts: GitHub DockerHub. Try using… Continue reading Gen-AI Developer Classroom notes 31/Jul/2025
Gen-AI Developer Classroom notes 30/Jul/2025
AI Contd.. AI Categories: Predictive AI: This predicts based on historical data. Generative AI: This generates a new content which can be multi modal(text/audio/image/video) Descriptive AI: This tells what has happened according to data. () Prescriptive AI: This tells me what to do according to data. (Recomendation systems) ANN (Artificial Neural Network) ANN will have… Continue reading Gen-AI Developer Classroom notes 30/Jul/2025
Gen-AI Developer Classroom notes 29/Jul/2025
Artificial Intelligence Artificial intelligence refers to capability of system to perform tasks like human. Augmented Intelligence: AI works with humans (enhances human productivity) Human traits learn reason memory AI Winters AI Categories by strength: Narrow AI: AI performing domain specific tasks General AI: AI can perform tasks equal to humans Super AI: AI can perform… Continue reading Gen-AI Developer Classroom notes 29/Jul/2025
Gen-AI Developer Classroom notes 27/Jul/2025
Running MCP Server in docker Lets create an MCP Server’s basic structure Refer Here for the basic template Refer Here
Gen-AI Developer Classroom notes 26/Jul/2025
Docker compose This file helps in creating a single command start and destroy for the entire application. This is majorly used in developer environments. Docker compose file is written in YAML format. YAML This is a file format which stores any data in the form of name value pairs Yaml is collection of key value… Continue reading Gen-AI Developer Classroom notes 26/Jul/2025
Gen-AI Developer Classroom notes 25/Jul/2025
Next Steps Containerizing Applications/Agents Overview Lets learn to containerize applications What is a container ? Container Image (Docker Image) => This contains software that packages up code and all its dependencies. This is required to run a container. Registry is a repository of docker images. Docker hub is a default registry Tags are versions and… Continue reading Gen-AI Developer Classroom notes 25/Jul/2025
Gen-AI Developer Classroom notes 22/Jul/2025
MCP Server contd Using linked in api Sharing on linked in Lets use linked_api_client which has methods to perform operations To get the info and post """This module will have necessary functions to post to your linked in """ import os from functools import lru_cache from dotenv import load_dotenv from linkedin_api.clients.restli.client import RestliClient PROFILE_RESOURCE =… Continue reading Gen-AI Developer Classroom notes 22/Jul/2025
Gen AI Developer Classroom Notes – 21/Jul/2025
Gen-AI Developer Classroom notes 19/Jul/2025
Async Programming Async programming is ensure we are not getting blocked. A function defined with the following syntax is referred as coroutine async def …..(): ….. A coroutine is function that can be paused or resumed Coroutines to execute require a scheduler. A scheduler runs on a single thread and manages tasks effeciently Await waits… Continue reading Gen-AI Developer Classroom notes 19/Jul/2025
Gen-AI Developer Classroom notes 16/Jul/2025
Resolution to the problem Ensure VIRTUAL_ENV Environment variable does not exist on your system In StdioServerParameters, if relative paths are not working add full paths for command and full path for args server_params = StdioServerParameters( command=r"C:\khajaclassroom\GenerativeAI\agenticai\june25\langgraph-learning\.venv\Scripts\python.exe", # Make sure to update to the full absolute path to your math_server.py file args=[r"C:\khajaclassroom\GenerativeAI\agenticai\june25\langgraph-learning\experiments\mcp_math.py"], ) Lets Build an… Continue reading Gen-AI Developer Classroom notes 16/Jul/2025
Gen-AI Developer Classroom notes 14/Jul/2025
Langchain contd Runnable interface and Refer Here for key methods Models in Langchain Text Models Chat Models For our purpose we use chat models & all chat models are derived from BaseChatModel, here we get additional capabilities rather than just invoke and stream we can Chat Models have a method which is bind tools which… Continue reading Gen-AI Developer Classroom notes 14/Jul/2025
