Handling different States Langgraph is basically designed to work with one state type. i.e. input and output should be of same type. This means we can have different intermediate state. Number guessing game State: input as well as output guessed_number result intermediate state guessed_number result count picked_number React agents This concept was introduced as a… Continue reading Gen-AI Developer Classroom notes 04/Jun/2025
Category: Classroom notes
Gen-AI Developer Classroom notes 03/Jun/2025
State Langgraph state can be implemented in 3 ways TypedDict DataClasses Pydantic Langgraph state can be of multiple types Pydantic built in specialized types Built-in Specialized Types | Validator / Type | Summary | |———————–|—————————————————————————————————| | EmailStr | Validates that a string is a properly formatted email address. Uses the email-validator package internally[2][5]. | |… Continue reading Gen-AI Developer Classroom notes 03/Jun/2025
Gen-AI Developer Classroom notes 01/Jun/2025
Tools Refer Here for some tools prebuilt by langchain Lets install a pip package called as python-dotenv now create a file called as .env and add Tavily Api key and also openweather Refer Here for the jupyter notebook with tools to search web and get weather information. Lets try building an graph with the following… Continue reading Gen-AI Developer Classroom notes 01/Jun/2025
Gen-AI Developer Classroom notes 31/May/2025
looping in tools Number Guessing Game: User enters a number, a random number will be picked 5 times, if that matches the guess user wins or looses Refer Here Tool Nodes ToolNode Refer Here for example
Gen-AI Developer Classroom notes 28/May/2025
Langgraph contd.. Lets interact with llms using langgraph and also our tools For today our tools will be simple python functions Refer Here In Langgraph tools are functions or external APIS that LLM can call as part of workflow or graph node. Tools extend the LLM capabilities beyond just generating, In a simplest form a… Continue reading Gen-AI Developer Classroom notes 28/May/2025
Gen-AI Developer Classroom notes 25/May/2025
Dive into langgraph TypeDict dictionary x = { ‘name’: ‘python’, ‘version’: 3.11 } x[‘name’] # python x[‘version’] # 3.11 Type Dict from typing_extensions import TypeDict class Technology(TypeDict): name: str version: float tech = Techonology(name=’python’, version=3.11) Lets build a workflow with decision to make Overview conditional edge Refer Here for the changes Adding LLMs to langgraph… Continue reading Gen-AI Developer Classroom notes 25/May/2025
Gen-AI Developer Classroom notes 24/May/2025
Debugging langgraph in vscode Install a pip package debugpy pip install debugpy The command to run the application with debugger is langgraph dev –allow-blocking –debug-port 5678 on the visual studio code. Navigate to Run & Add configuration python debugger Remote Launch localhost 5678
Gen-AI Developer Classroom notes 22/May/2025
Graphs, Node, Edges and State in Langgraph Lets create a new folder and activate virtual environment mkdir basic-graph cd basic-graph python -m venv .venv # source .venv/bin/activate .venv/Scripts/activate Ensure pip install -U “langgraph-cli[inmem]” is executed create a new file called as requirements.txt with langgraph in it Now install pip install -r requirements.txt Lets create a… Continue reading Gen-AI Developer Classroom notes 22/May/2025
Gen-AI Developer Classroom notes 21/May/2025
Setup – Softwares Terminal (Pre-installed) Windows winget (pre-installed) choco Mac: homebrew Git python 3.11 visual studio code Docker Desktop (optional) ollama (optional) Setup – Accounts Cloud GCP: Create a new gmail account or use existing Create a free tier Azure (optional) AWS (optional) Langsmith langstudio OpenAI Tavily
Gen-AI Developer Classroom notes 20/May/2025
Agentic AI How to build an Agent Variables Model Foundational Models: OpenAI Google Gemini Anthropic LLAMA Small language models: LLAMA Hugging Face Transformers: microsoft phi Google Gemma … … Fine tuned models Framework Workflow steps Static Steps: (Router) This is a fixed set of steps and conditional logic around when which node has to be… Continue reading Gen-AI Developer Classroom notes 20/May/2025
Gen-AI Developer Classroom notes 20/May/2025
Agentic AI How to build an Agent Variables Model Foundational Models: OpenAI Google Gemini Anthropic LLAMA Small language models: LLAMA Hugging Face Transformers: microsoft phi Google Gemma … … Fine tuned models Framework Workflow steps Static Steps: (Router) This is a fixed set of steps and conditional logic around when which node has to be… Continue reading Gen-AI Developer Classroom notes 20/May/2025
Gen-AI Developer Classroom notes 19/May/2025
Agentic AI AI Agents vs Agentic AI: Key Differences AI agents and agentic AI are related but distinct concepts in artificial intelligence, differing primarily in autonomy, complexity, adaptability, and operational scope[1][2][3][5]. Definition and Scope AI Agents Individual software entities designed to perform specific tasks within defined parameters or rules[2][3][5]. Examples: Chatbots for customer service, automated… Continue reading Gen-AI Developer Classroom notes 19/May/2025
Gen-AI Developer Classroom notes 08/May/2025
Transformers: Attention is all you need Token: A prompt is broken down into multiple tokens Embeddings: A vector representation of all possible words GPT 3.5 (50k words) Vector: A point in a larger dimension Words can be converted into vectors (Word2Vec) Refer Here for visualization
Gen-AI Developer Classroom notes 07/May/2025
How do LLMs Work ? ML On a broder note ML solves three problems predictions classification clustering Usecase: I want to know what would be price of real estate in hyderabad (Supervised learning, Linear Regression) I want to know if the transaction is fraud or not (Classification, Logistic Regression) I want to give movie recommendations… Continue reading Gen-AI Developer Classroom notes 07/May/2025
Gen-AI Developer Classroom notes 06/May/2025
Why not use ChatGPT or Gemini Directly All the LLM (Large Language Models) are pre-trained on publicly available information. Then why don’t i use for my needs: LLMS donot have access to private data: My organization has technical manuals, I want to create a chatgpt/gemini kind of solution around user manuals. LLMs can hallucinate LLMs… Continue reading Gen-AI Developer Classroom notes 06/May/2025
Gen-AI Developer Classroom notes 03/May/2025
Langchain: Memory We have following classes ConversationBufferMemory ConversationBufferWindowMemory ConversationTokenBufferMemory ConversationSummaryMemory Refer Here for the notebook Langchain Primitives The most basic langchain abstract interface is langchain_core.runnables.base.Runnable‘ Refer Here for notebook
Gen-AI Developer Classroom notes 29/04/2025
Gen-AI Developer Classroom notes 26/Apr/2025
Chains in Langchain Refer Here for chains api reference Lets explore chains First chain: Lets write a prompt pass the prompt to llm Second chain: Lets write a prompt pass the prompt to llm convert the output to some format Third chain Use Vector database as retriever write a prompt with context Pass the prompt… Continue reading Gen-AI Developer Classroom notes 26/Apr/2025
Gen-AI Developer Classroom notes 24/Apr/2025
Link to the notebook Refer Here Refer Here for retriever Refer Here for the implementation of text book rag with text Exercise Try building a retriever for a Directai.blog with atleast 10 to 15 pages as source
Gen-AI Developer Classroom notes 23/Apr/2025
Embeddings As of now we have documents and we have split the documents to create chunks Next steps are using embeddings and storing into vector databases. Refer Here for langchain embedding Every Embedding will have an interface with two methods embed_query embed_documents OpenAI Embeddings Google Vertex AI Embeddings Other providers Local embeddings: hugging face llama… Continue reading Gen-AI Developer Classroom notes 23/Apr/2025
