Live example
You can play with this example in the Latitude Playground.
Overview
In this example, we will create a Deep Search agent that can search for information autonomously on the web and provide answers to user queries. The agent will use the built-in Latitude tools to search and read content from the Internet.Prompts
Breakdown
Let’s break the example down step by step to understand how it works.Clarify user’s input
Ensure the agent can handle ambiguous queries by providing clarifying questions to the user.Create a subagent
Let the main agent know that it has a subagent available to perform deep research.Multiple iterations
Make sure the agent can perform multiple iterations of research, and not just one.Fact-check the info
Try to fact-check the information the agent finds, and not just return the first search result.Citations
Include citations in the final answer.Why using a subagent is good?
Doing everything in only a prompt of typeagent
works, but now it has too many responsibilities:
- It has to understand the user’s request.
- It has to perform the research.
- It has to fact-check the information it finds.
- It has to create a final report.
Resources
- Autonomous Agents - Learn more about how to create autonomous agents in Latitude.
- Subagents - Learn how to create subagents to delegate tasks to other agents.
- Latitude Tools - Learn more about the built-in tools available in Latitude.