diff --git a/llama-index-packs/llama-index-packs-query-understanding-agent/README.md b/llama-index-packs/llama-index-packs-query-understanding-agent/README.md index 2fcadd1c28969ac005c66ff98cd70393cce40aee..9668098d4b778cf95ad7db8e147251ad582c2d0b 100644 --- a/llama-index-packs/llama-index-packs-query-understanding-agent/README.md +++ b/llama-index-packs/llama-index-packs-query-understanding-agent/README.md @@ -4,6 +4,8 @@ This LlamaPack implements Query Understanding Agent Taking inspiration from Humans - when asked a query, humans would clarify what the query means before proceeding if the human sensed the query is unclear. This LlamaPack implements this. +Check out the [full notebook here](https://github.com/run-llama/llama_index/blob/main/llama-index-packs/llama-index-packs-query-understanding-agent/examples/query_understanding_agent.ipynb). + ### Installation ```bash diff --git a/llama-index-packs/llama-index-packs-query-understanding-agent/examples/query_understanding_agent.ipynb b/llama-index-packs/llama-index-packs-query-understanding-agent/examples/query_understanding_agent.ipynb index 8dea220651eb5c4e006df14b07ff5ac434fcc0e3..3e8ccf31afca8ddbec1827984c250aa0e6223bc0 100644 --- a/llama-index-packs/llama-index-packs-query-understanding-agent/examples/query_understanding_agent.ipynb +++ b/llama-index-packs/llama-index-packs-query-understanding-agent/examples/query_understanding_agent.ipynb @@ -1,5 +1,22 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Query Understanding Agent LlamaPack\n", + "\n", + "<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/llama-index-packs/llama-index-packs-query-understanding-agent/examples/query_understanding_agent.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n", + "\n", + "This notebook shows you how to use our Query Understanding Agent LlamaPack.\n", + "\n", + "This is a template showing you how to build an agent that can explicitly trigger a call for human intervention. In this specific agent, human intervention is triggered if the input query is not clear.\n", + "\n", + "This is determined by having the agent pick a given tool using our `RouterQueryEngine`, getting back the response, and then using the response and tools to determine whether the question itself is clear.\n", + "\n", + "If human intervention is needed, then a `HumanInputRequiredException` is thrown. We have an example showing how to use this exception to seek for additional human input/query clarification." + ] + }, { "cell_type": "code", "execution_count": null, @@ -26,7 +43,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Grab Data" + "## Grab Data" ] }, { @@ -70,7 +87,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Load Data" + "## Load Data" ] }, { @@ -97,7 +114,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Agents" + "## Agents" ] }, { @@ -131,7 +148,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Baseline" + "## Baseline" ] }, { @@ -177,7 +194,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Query Understanding Agent Worker" + "## Query Understanding Agent Worker" ] }, {