LangGraph - Orchestration Framework

Anant GabhaneAnant Gabhane
3 min read

Project Ideas :

  • Create a code reviewer like Code Rabbit, which has a UI to paste a link and should review PR/MR from GitHub or Gitlab

  • Mock Interviewer > Take 2 inputs: job requirements/role & responsibilities, and Resume. AI asks questions to you using a voice model - Feedback on answers and rating

  • Article Reviewer - Paste your hashcode article link - AI finds out mistakes in it, if any - Suggest feedback and rate the articles


  • There are a lot of problems to be solved by AI.

  • Value-driven products are what we need. Real-world problems. NLP to NLP.

  • Solve a problem for yourself.

  • How to evaluate a new idea? Find Delta and how much value does it add?
    Delta = Value provided by your solution, system, or process - Value provided by your solution, system, or process

  • State A: 2 and State B: 8. Delta = State B - State A | Delta >= 4 for creating massive wealth

Advantages of Delta 4 behavior:

  1. Creates an irreversible effect - The User would not go back to the old behavior

  2. UBP > USP: Barging behavior - Mouth-to-mouth-free publicity, so we need less fuel for acquiring new users

  3. High Tolerance: The User would tolerate your mistakes only if the delta is greater than 4


  • Best Explanation for Delta: https://youtu.be/fWm_NKCtXdA?si=wjKdPju31hZ9vuKf

  • The higher the Delta, the better the product or service you're building

  • Humans consistently seek efficiency. Remove the hurdle and build wealth as an entrepreneur


Sam Altman explains how to come up with a great startup idea :

  1. Build on original thought and a new idea

  2. Notice problems in your own life

  3. Ride a Great wave - you’ll have more success doing this


Bluelearn - an AI agent company that solves problems using day-to-day tools like WhatsApp

  • Browseruse a library that uses the browser to perform tasks

  • The parameters on which you are analyzing should be specified

  • How can I make revenue by providing real-world value?


LangGraph

  • Provides a framework for your code

  • Langchain is a library, but LangGraph is a framework

  • For example, FastAPI - when you add @app.post above your function, then it runs as LangGraph works. When we use the library, we decide the flow on our own, using imports and tools we built

  • LangGraph provides a structure for your code

  • Due to libraries, scaling code for an AI application becomes difficult to maintain. That’s why we use LangGraph to make code more modular.

  • The developer decides the flow.

  • LangGraph suggests that we change the structure of our code into a graph, so adding and removing components from the code becomes easy, and the code is structured in a modular format

  • Write code and connect it using nodes, which in turn become a flow

  • n8n is kind of the UI of LangGraph


LangGraph orchestration :

  • To the first node of LangGraph, we provide a state (data) to it.

  • Updating the state after each node

  • Set up tracing to truly understand how the routing works and how the graph is formed.

  • pydentic adds a new validation layer. It’s kind of typescipt for Python code.

  • Plan > Think > Observe > Output


Using LangGraph, we need to create states and nodes, and then we need to update the states based on the flow of the application.

Assignment: Build the flow for the cursor project

Github Link : https://github.com/AnantGabhane/GenAI/tree/main/lang_graph

0
Subscribe to my newsletter

Read articles from Anant Gabhane directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Anant Gabhane
Anant Gabhane