From the course: Introduction to AI Orchestration with LangChain and LlamaIndex
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Solution: LangChain and LlamaIndex strengths and weaknesses
From the course: Introduction to AI Orchestration with LangChain and LlamaIndex
Solution: LangChain and LlamaIndex strengths and weaknesses
Here's what I came up with using LLMMathChain. Once you've got the basic structure in place, it's easy to add more tools to the agent. So here in the tools array, we can construct another tool using another chain as easily as we did with a function. Now, remember here to give each tool a strong specific description. The LLM uses these descriptions to figure out which tools it can call. And then for the test case, we got a little bit fancier here, and I calculated the area of a circle. So let's run this code and see our agent work on some math. The first part is operating the same as before. It figured out the CEO question, again. Here's the math question. And it says it's approximately 628.318. That sounds like 100 times 2 pi to me. So perfect. Now that you're experienced with implementing agents, you or your agent can join me in the final video to wrap up this course.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.