1. Learn
  2. /
  3. Courses
  4. /
  5. AI Agents with Hugging Face smolagents

Connected

Exercise

Connect the Tool, Unlock Agentic RAG

You now have a working custom tool that can search appliance manuals using semantic similarity. In this exercise, you'll connect that tool to an agent so it can answer questions based on manual content.

Behind the scenes, you already have access to:

  • A variable called vector_store, which holds your searchable manual content
  • An ApplianceSearchTool to perform semantic search
  • A variable called model, which contains a preconfigured language model for the agent

Your goal is to wire everything together so the agent can use your tool to answer questions like a helpful appliance assistant.

Instructions

100 XP
  • Instantiate the ApplianceSearchTool by passing in the vector_store.
  • Add your appliance_tool tool to the tools list when initializing the CodeAgent.