Skip to main content
All CollectionsChat
Guide to Advanced Prompts
Guide to Advanced Prompts
Sue Kim avatar
Written by Sue Kim
Updated over 6 months ago

What is an Advanced Prompt and when should I create one?

Simple Prompts will only perform one round of retrieval per request, which is either searching for documents/people or reading the full contents of documents from the Glean index.

Advanced Prompts enable you to complete more complex tasks that require multiple retrieval steps, including being able to chain together dependent retrieval steps. For example, you can search for Jiras related to an issue and then instruct the Assistant to read the full contents of those Jiras. Advanced Prompts also give you more explicit control over which searches to issue, which can make task execution more deterministic.

For more information, see our blog post about Next-generation Prompting and demos of Advanced Prompts.

Getting started

From Glean Chat, click on the Create Prompt button in the top right to load the Prompt Builder.

Then click on the Advanced toggle at the top of the Prompt Builder.

Anatomy of an advanced prompt

An Advanced Prompt has 3 main components, which we'll discuss below.

Goal

This specifies the high level outcome you want to achieve in natural language.

Examples:

  • Create a report of tickets that request a specific feature

  • Extract information from call transcripts with a customer

Steps

An Advanced Prompt can have 2 or more steps. Every step executes its own action which will load information into the memory that can be accessed by any subsequent step.

Here are some actions you can use:

Glean search

This will search for documents in the Glean index and will load snippets from the search results into the memory. You can specify the request in natural language (the pencil icon) and the system will make its best effort to convert this into one or more Glean searches.

Alternatively, you can make the Glean search step faster and more deterministic by clicking on the parameters icon to explicitly specify the search query templates. These can be any search query that you can enter into Glean and can include facets like "app:" and "updated:"

Employee search

This will search for people in your organization by either information about their role or their expertise.

Read documents

This reads the full contents of one or more documents and loads them into the memory. If you already know which documents you want to read, it is best to use the input templates (via the parameters icon) where you can either enter their URLs or type @ to tag a recently accessed document.

Another use case is to read the documents found by Glean Search in a previous step. In this case, you would enter natural language instructions (via the pencil icon) that specify the criteria for which documents to read. Example:

Generate response

These are natural language instructions for generating a response from all the information that’s currently in the memory. This is usually the last step in an Advanced Prompt and is the only action that outputs natural language text to the user. Example:

Input Fields

In any input box, including Goal, you can create a field by enclosing it in double brackets [[ and ]]. Examples:

  • Find Gong calls with [[customer]] from the past month

  • Find Slack messages that mention [[project name]] from the past week

The system will automatically outline the input field in blue and will add it to the Fields section at the top of the prompt. You can then test the prompt with different values for the input fields.

Did this answer your question?