AI Agents In LangGraph L1 Build An Agent From Scratch
llamaDeepLearningai_Course_NotebooksagentsAIvllmmachine-learningend-to-end-use-casesllama2LLMllama-cookbookPythonfinetuningpytorchlangchain
Export
This notebook ports the DeepLearning.AI short course AI Agents in LangGraph Lesson 1 Build an Agent from Scratch to using Llama 3, with a bonus section that ports the agent from scratch code to using LangGraph, introduced in Lession 2 LangGraph Components of the course.
You should take the course, especially the first two lessons, before or after going through this notebook, to have a deeper understanding.
[ ]
[ ]
[ ]
ReAct Agent from Sractch
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
Automate the ReAct action execution
[ ]
[ ]
Using model "llama3-8b-8192", the code below will cause an invalid syntax error because the Action returned is calculate: (average_dog_weight: Border Collie) + (average_dog_weight: Scottish Terrier), instead of the expected "Action: average_dog_weight: Border Collie".
[ ]
Prompt engineering in action:
REPLACE "Use Thought to describe your thoughts about the question you have been asked. Use Action to run one of the actions available to you - then return PAUSE." with "First, use Thought to describe your thoughts about the question you have been asked, and generate Action to run one of the actions available to you, then return PAUSE."
[ ]
[ ]
Bonus: Port the Agent Implementation to LangGraph
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]