What if you could build your own smart helper to do the boring work for you?
Why Building custom tools in Agentic AI? - Purpose & Use Cases
Start learning this pattern below
Jump into concepts and practice - no test required
Imagine you need to analyze thousands of customer emails to find common complaints. Doing this by reading each email yourself would take forever and be exhausting.
Manually sorting and analyzing data is slow, tiring, and easy to mess up. You might miss important details or get overwhelmed by the sheer volume, leading to mistakes and frustration.
Building custom tools lets you automate these repetitive tasks. You create smart helpers that quickly process data, spot patterns, and deliver insights without tiring or errors.
for email in emails: if 'complaint' in email: print(email)
tool = CustomEmailAnalyzer()
results = tool.find_complaints(emails)
print(results)With custom tools, you can handle huge tasks effortlessly, freeing your time for creative and important work.
A company builds a tool to scan support tickets and automatically tag urgent issues, speeding up response times and improving customer happiness.
Manual work is slow and error-prone for big tasks.
Custom tools automate and speed up repetitive jobs.
This unlocks smarter, faster, and more reliable results.
Practice
Solution
Step 1: Understand what custom tools do
Custom tools add new abilities or skills to an AI, making it better at certain jobs.Step 2: Compare options to the purpose
Only To add special skills that help the AI perform specific tasks talks about adding special skills, which matches the purpose of custom tools.Final Answer:
To add special skills that help the AI perform specific tasks -> Option BQuick Check:
Custom tools = add special skills [OK]
- Thinking custom tools speed up AI generally
- Confusing tool purpose with model size
- Assuming tools change AI language automatically
Solution
Step 1: Recall required fields for a custom tool
A custom tool needs a name, description, and a function to work properly.Step 2: Check which option includes all three
Only tool = Tool(name='search', description='Find info', func=search_function) has name, description, and func parameters correctly set.Final Answer:
tool = Tool(name='search', description='Find info', func=search_function) -> Option DQuick Check:
Tool needs name, description, and func [OK]
- Omitting description or name
- Passing parameters in wrong order
- Using wrong parameter names
tool.func('hello')?
def shout(text):
return text.upper() + '!!!'
tool = Tool(name='shout', description='Make text loud', func=shout)Solution
Step 1: Understand the function behavior
The function shout converts text to uppercase and adds three exclamation marks.Step 2: Apply the function to 'hello'
Calling shout('hello') returns 'HELLO!!!'. Since tool.func points to shout, tool.func('hello') does the same.Final Answer:
'HELLO!!!' -> Option AQuick Check:
shout('hello') = 'HELLO!!!' [OK]
- Ignoring uppercase conversion
- Missing exclamation marks
- Assuming func is not callable
def add_numbers(a, b):
return a + b
tool = Tool(name='adder', description='Add two numbers', func=add_numbers)
result = tool.func(5)Solution
Step 1: Check function parameters
add_numbers requires two inputs: a and b.Step 2: Check how tool.func is called
tool.func(5) provides only one argument, causing an error for missing the second argument.Final Answer:
Missing one argument when calling tool.func -> Option CQuick Check:
Function needs 2 args, only 1 given [OK]
- Ignoring function argument count
- Thinking description length causes error
- Assuming tool name uniqueness causes runtime error
Solution
Step 1: Understand the goal of the function
The function should return the first 10 words, not characters or last words.Step 2: Analyze each option
def summarize(text): return ' '.join(text.split()[:10]) splits text into words and joins the first 10 words correctly. def summarize(text): return text[:10] returns first 10 characters, not words. def summarize(text): return text.split()[-10:] returns last 10 words. def summarize(text): return len(text.split()) returns word count, not summary.Final Answer:
def summarize(text): return ' '.join(text.split()[:10]) -> Option AQuick Check:
First 10 words = def summarize(text): return ' '.join(text.split()[:10]) [OK]
- Returning characters instead of words
- Taking last words instead of first
- Returning word count instead of summary
