Skip to main content

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.
Now we have a much more robust agent that can handle ambiguous queries, and will perform multiple iterations of research to find the most relevant information. It will also include citations in the final report.

Why using a subagent is good?

Doing everything in only a prompt of type agent works, but now it has too many responsibilities:
  1. It has to understand the user’s request.
  2. It has to perform the research.
  3. It has to fact-check the information it finds.
  4. 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.