Make your AI answer questions and use tools.#

You already talked to a model. Now you give it tools. You will meet LangChain, build your first chain, and then build an agent that decides when to use a tool. The examples below show each step.

Example ยท Smart Shop Assistanttool decision transcript
How much are the shoes?
๐Ÿ”ง get_price("shoes") โ†’ โ‚น799
The shoes are โ‚น799! Anything else? ๐Ÿ™‚
Nice. What can you do?
I can look up any item's price. I decide when to check the database myself. ๐Ÿ˜Ž
The assistant calls get_price for a price question. It answers directly when the user only asks what it can do.

Scaler Academy โ€” type along. Every code block has ๐Ÿ“‹ Copy. Every example shows its full input and output.

6 Topics • Concepts, Worked Examples & a Tool-Using Agent