Knowledge Search
With the Knowledge Search functionality in HALO, you can search through your Knowledge and generate an answer. Watch this E-learning to find out how to use Knowledge Search.
The Knowledge Search option will, using a query as input, search through your Knowledge to find the most relevant Sources and try to generate an answer. There are three possible outcomes:
Answer
If HALO can answer the user query using Knowledge, an answer will be generated. The tool result includes the answer text, the reasoning behind it, and the sources that were used.
Clarifying Question
If the user query is too vague or unclear to generate a good answer, HALO will respond with a clarifying question. This helps guide the user to provide more context so a proper answer can be given in a follow up.
No Answer
If the available Knowledge does not contain enough information to answer the user query, HALO returns a no_answer type. This means you should handle the conversation yourself, for example by forwarding to a live agent or showing a fallback message.
Date and time awareness
HALO knows the current day of the week, date, and time. This allows it to answer time-sensitive questions, for example "Are you open today?", "Is the summer promotion still valid?", or "When will my order arrive if I order now?".
The current_datetime system context can be configured to change the timezone, so that HALO reasons with the correct local time for your customers.
Source types
When the Knowledge Search uses Sources to generate an answer, those Sources are included in the tool result. Depending on the type of Knowledge Source, they are formatted differently:
|
Source type |
|
Fields |
Description |
|---|---|---|---|
|
Web crawler |
|
|
A page that was crawled from a website. The |
|
API connection |
|
|
Data retrieved from an external API connection. The |
|
File |
|
|
An uploaded file (e.g. PDF, document). The |
|
Other |
|
|
Any other source type. |
Using the output
The response field in the tool result contains text that is ready to be sent directly to the end user. The calling agent should use the response field verbatim as its reply. The instruction field reinforces this: do not add information, suggestions, or actions that are not in the response.
When the type is "answer" or "clarifying_question", the calling agent replies to the user with the exact text from the response field. When the type is "no_answer", a default fallback message is provided, but this can also be handled in your bot flow (e.g. forwarding to a live agent or showing a custom message). Below you will find to examples of how you can use Knowledge Search within your agent.
Example: relay the output directly
In the simplest setup, the calling agent relays the Knowledge Search output exactly as it is. This is useful when you want the generated answer to reach the end user without any modifications.
You are a customer service assistant that can answer user queries using a tool.
Always immediately use [knowledge_search] to answer the user's question.
Never reply to the user without having called [knowledge_search].
This tool can return 3 types of responses:
- If the tool returns an answer, relay it exactly. Do not add, change, or omit information.
- If the tool returns a clarifying question, relay it exactly. Do not add, change, or omit information.
- If the tool returns no answer, immediately call the breakout tool.
Example: customize the output
What makes the Knowledge Search really powerful is that you can fully control what happens with the output. You can alter the answer, enrich it with source URLs, trigger follow up actions, or handle each response type differently. The calling agent prompt is where you define this behavior.
For example, you can configure your Agent to add the URL of the source it used to the answer, and to show the feedback options after giving an answer. You can also configure different behavior when the Knowledge Search cannot find an answer, for example to handover:
You are a customer service assistant that can answer user queries using a tool.
Always immediately use [knowledge_search] to answer the user's question.
Never reply to the user without having called [knowledge_search].
This tool can return 3 types of responses:
- If the tool returns an answer, shorten it into one sentence. If a web-page source
was used and has a URL, add it to the end of the answer between brackets.
Always show_feedback to the user after an answer.
- If the tool returns a clarifying question, relay it exactly. Do not add, change,
or omit information.
- If the tool returns no answer, ask the user if they want to be transferred to a
live agent.