How can i use prompting (instructions) in Amazon Q before asking Question and answer?

Instructions

Welcome! Use the Q bar below to ask natural language questions about the dataset.

Guidelines:

  • Use keywords like “total cases”, “average revenue”, or “top products”.
  • To get the count of total statusdate, phrase your question as:
    • “What is the count of total statusdate?”
    • “How many entries are in total statusdate?”
  • For best results, refer to the example questions provided below.

Hi @gaurav.gupta5 and welcome to the QuickSight community!
Could you please elaborate a bit more on what you’d like to accomplish with the questioning? Maybe provide an example of the Answer you’re looking to achieve and what fields would be used to get that answer.

Thank you, @Brett, for your response!

To clarify, I am working with telecom data and would like to create a structured approach to pass specific instructions in my Amazon Q queries before asking a question and receiving an answer.

For example, if I ask, “How many device categories are in this data? I want the total count of devicecategory grouped by statusdate, I’d like the query to calculate the count of devicecategory occurrences instead of summing any values, ensuring clarity in the instructions.

Similarly, I want to include other instructions, such as:

  • If the query involves “count” and statusdate, always calculate the count, not the sum.

Could you guide me on how to ensure QuickSight processes queries based on such predefined rules and how to set up these instructions effectively? Thank you!

Hi @gaurav.gupta5,
There are a number of ways you can make adjustments to your topic to better understand which fields to use and the different aggregation types.

  • You can set up synonyms for your field names, define the aggregation type that primarily gets used for a specific field (for example, you can set the aggregation to default to ‘count’ or set a field as ‘non-additive’ so that you never get a sum.
  • You can also assign a semantic type, which helps when using words like ‘who’ or ‘what’.
  • Additionally, how you ask the question can help define the fields being used. So if you’re looking for a count by status date, you may have to include ‘status date’ in the question for Q to understand that you’d like to incorporate that field.

The easiest way to edit a response though (to setup an answer based around a format of question you’d like), is once you receive an answer for a question, underneath the question there will be an ‘interpreted as’ section. Click on that and you’ll be able to adjust the aggregation type, change the primary field being used, sorting, etc.
Once you’ve made the adjustments and the answer returns correctly, you can then verify that question to receive the same answer format next time that question is asked.
(Once verified, you can then click the down arrow in the verified button to add question variants if you know a specific format that’s always used when asking questions).
I’ve included some links below with additional information on building Q Topics along with a couple QuickSight Learning Series videos that explore the same.

Thank you so much, @Brett, for your guidance and support. I greatly appreciate your help!

1 Like