Data store agent settings

The following agent settings are available.

Grounding

For each response generated from the content of your connected data stores, a confidence level is calculated, which gauges the confidence that all information in the response is supported by information in the data stores. You can select the lowest confidence level allowed, and the agent won't return responses lower than that level.

There are 5 confidence levels to choose from: very low, low, medium, high, and very high.

You can also apply a grounding heuristics filter. If enabled, responses containing content that is likely inaccurate based on common hallucinations are suppressed.

Data store prompt

You have the option to add additional information about the agent that can improve the quality of answers generated from data store content and make them feel more like your brand:

  • Agent name - What the agent should call itself. If you leave it unset, the default value AI Assistant will be used.
  • Agent identity - What the agent persona will be. If you leave it unset, the default value AI Assistant will be used.
  • Company name Set to the name of your company. This should have already been set as part of the agent creation flow, but is adjustable as needed. It is recommended to set this field correctly (and especially not leave it empty), lest quality of generated answers suffer.
  • Company description A short description of what the company does or offers.
  • Agent scope - Where the agent is meant to be used. If you leave it unset, the default value on the company website will be used.

Once you've filled out this section partially or fully, you can inspect on the right side, under Your prompt, the short paragraph that was derived from these settings. This is used as part of answer generation.

Data store model selection and summarization prompt

When a user query is processed, the agent performs a search of the data stores to find good sources. The agent then sends the user query and sources found to the LLM, which performs a summarization.

You can select which model to use for summarization and optionally provide your own prompt.

Select generative model

You can select the generative model used by a data store agent for the summarization generative request. The following table contains the available options:

Model Identifier Language Support
Default This is the currently recommended configuration and is subject to change over time. If you use this option, you may experience changes in agent behavior (likely improvements). If you would like more consistency in agent behavior, select a specific model.
gemini-1.0-pro-001 Available in all supported languages.
gemini-1.5-flash-001 Available in all supported languages.
gemini-1.5-flash-002 Available in all supported languages.

Customize the summarization prompt

You can provide your own prompt for the summarization LLM call. The prompt is a text template that may contain predefined placeholders. The placeholders will be replaced with the appropriate values at runtime and the final text will be sent to the LLM.

The placeholders are as follows:

  • $original-query: The user's query text.
  • $rewritten-query: Dialogflow uses a rewriter module to rewrite the original user query into a more accurate format.
  • $sources: Dialogflow uses Enterprise Search to search for sources based on the user's query. The found sources are rendered in a specific format:

    [1] title of first source
    content of first source
    [2] title of second source
    content of second source
    
  • $end-user-metadata: Information about the user sending the query is rendered in the following format:

    The following additional information is available about the human: {
    "key1": "value1",
    "key2": "value2",
    ...
    }
    
  • $conversation: The conversation history is rendered in the following format:

    Human: user's first query
    AI: answer to user's first query
    Human: user's second query
    AI: answer to user's second query
    
  • ${conversation USER:"<user prefix>" AI:"<agent prefix>" TURNS:<turn count>}: A parameterized version of the $conversation placeholder. You can customize the end-user prefix (USER), the agent prefix (AI), and the number of previous turns to include (TURNS). All placeholder parameter values must be specified.

    For example, ${conversation USER:"Human says:" AI:"Agent says:" TURNS:1}. The conversation history is rendered as:

    Human says: user's first query
    Agent says: answer to user's first query
    

A custom prompt should instruct the LLM to return "NOT_ENOUGH_INFORMATION" when it cannot provide an answer. In this case, the agent will invoke a no-match event.

For example:

Given the conversation between a Human and a AI assistant and a list of sources,
write a final answer for the AI assistant.
Follow these guidelines:
+   Answer the Human's query and make sure you mention all relevant details from
  the sources, using exactly the same words as the sources if possible.
+   The answer must be based only on the sources and not introduce any additional
  information.
+   All numbers, like price, date, time or phone numbers must appear exactly as
  they are in the sources.
+   Give as comprehensive answer as possible given the sources. Include all
  important details, and any caveats and conditions that apply.
+   The answer MUST be in English.
+   Don't try to make up an answer: If the answer cannot be found in the sources,
  you admit that you don't know and you answer NOT_ENOUGH_INFORMATION.
You will be given a few examples before you begin.

Example 1:
Sources:
[1] <product or service> Info Page
Yes, <company> offers <product or service> in various options or variations.

Human: Do you sell <product or service>?
AI: Yes, <company> sells <product or service>. Is there anything else I can
help you with?

Example 2:
Sources:
[1] Andrea - Wikipedia
Andrea is a given name which is common worldwide for both males and females.

Human: How is the weather?
AI: NOT_ENOUGH_INFORMATION

Begin! Let's work this out step by step to be sure we have the right answer.

Sources:
$sources

$end-user-metadata
$conversation
Human: $original-query
AI:

Data store fallback

This section has the following settings:

  • Fallback link: Show the most appropriate link if the agent fails to produce an answer.
  • Enable Generative AI: Allow data store to use generative AI when generating results.