Tips for using effective prompting with Amazon Q Apps

2 minute read
Content level: Foundational

Learn how to write effective prompts for Amazon Q Apps, a capability of Amazon Q Business

When prompting Amazon Q Apps Creator to generate an app

Start by describing your goal by stating the inputs and outputs

When writing a prompt to generate an Amazon Q App, provide clear instructions on the inputs you'll provide and the expected outputs. Explain what you want to build as if you were describing it to another person. You can do this by listing your inputs and outputs.

Specify data sources

Be explicit when you want to use a specific data source like a document. For example, specify if you expect the data to already be in the Q knowledge base (e.g., "using the data known to Q..."), or whether it needs to be a text or file input provided by the user instead (e.g., “using a file”...).

Identify your persona (optional)

When thinking of the type of Amazon Q App you want to create, imagine someone trying to accomplish a task like generate social media posts or document, etc. (e.g., "You are a marketing professional", "You are a copywriter", etc.).

Provide clear, concise instructions

When providing additional details in your prompt, we recommend you use concise language and avoid lengthy explanations by staying on topic and avoid diverging into unrelated areas. Additionally, avoid redundant or repetitive information.

The following image shows some examples of effective prompts for create Amazon Q Apps

Good examples of Amazon Q Apps prompts

When adding or updating card-level prompts in a Q App

While Amazon Q Apps automatically generates the card-level prompts for your app when you use Amazon Q App Creator, here are some tips for when you start from scratch, add new cards, or refine what's already in the prompt.

Describe your goal

State what you want the output card to generate (e.g., "Based on @[insert input card name] and the specified document @[insert file card name] generate...").

Reference cards

Use the @ symbol to reference other cards to help produce the expected output (e.g., @[insert input card name]...).

Be specific

Provide extra instructions on what the goal of the card output is by using simple and straightforward language.

The following image shows an example of a good card prompt

Good examples of card prompts