<creating_precise_prompts>
<summary>
Crafting specific user queries is crucial in prompt engineering. Well-crafted queries direct Amazon Nova text understanding models to generate accurate and pertinent responses. To craft such queries, it is essential to start by providing contextual information in the query. The context provided helps situate the model better by aligning to clear target-user scenarios, thereby enhancing the relevance and coherence of the output.
</summary>

<providing_contextual_specific_information>
Amazon Nova models work best if the instructions are clear, well structured, short, and specific.
<prompt_template>
// use this to clearly define the task and job needed by the model
Task:
{{Task summary}}

// use this to provide contextual information related to the task
Context information:
- {{Context and content information 1}}
- {{Context and content information 2}}
...

// use this to provide any model instructions that you want model to adhere to
Model Instructions:
- {{ Other Model Instructions }}
...

// use this to provide response style and formatting guidance
Response style and format requirements:
- {{Style and format requirement 1}}
- {{Style and format requirement 2}}
...
</prompt_template>
<example name="specific and contextual information">
Write me a meeting invite to the project team. The meeting is about project planning, and should be held on October 16th, from 10 AM to 11 AM in Conference Room B. Please include an agenda that covers our progress on the project thus far, as well as any upcoming milestones and deadlines.
</example>
Be clear: When prompting the model, try to keep instructions as clear as possible in a way a human would understand it versus a machine (for instance, a JSON-style list).
Be specific: Give the model specific instructions about what the task is, what the expected output is, and any additional context to help the model respond the way you want.
<specify_the_output_format_and_style>
If you want Amazon Nova to generate responses that are tailored to your specific needs, you can specify the format and style of the output. For example, if you want to generate responses only in JSON or constrain the response length to a maximum number of words, bullet points, or paragraphs. This enables Amazon Nova to better understand your requirements and produce output that is more relevant and easier to parse.

Use capitalization and strong wordings such as DO, DO NOT, MUST to emphasize the rules you want the model to strictly obey. For example, if you want only one JSON object in the response, you can instruct the model by saying "You MUST answer in JSON format only. DO NOT use any other format while answering the question."

Here are some example prompts that are rewritten with specific and contextual information. Adding more contextual information helps the model ground towards the desired behavior.

Adding extra details on the response formatting can help the model accomplish the desired result. Some of the other commonly used response format include CSV, Markdown, YAML, and XML
<example name="provide extra details">
Outline the different types of rooms available in a typical 4-star hotel, including their features. All responses MUST be in YAML format.
</example>

In this case, the prompt with style constraints provides comprehensive information on the constraints to follow and the desired response format. As observed in the response, the optimized prompt aligns more closely with the requested brevity and bulleted list structure.
<example name="provide style constraints">
Explain the process of checking in a guest at a luxury resort. Provide all answers in a numbered list format, with each point containing no more than 15 words, and no more than 6 bullet points.
</example>

Here, the prompt with the response format forces the model to respond only with the category number and limit it to be between 1-10, instead of being highly verbose.
<example name = "limit the response format">
In this task, you are given a text which is the body of a document. Your job is to classify the topic of the document into these categories: 1)Company, 2)Educational Institution, 3)Artist, 4)Athlete, 5)Office Holder, 6)Mean of transportation, 7)Building, 8)Natural place, 9)Village, 10)Animal. Your output should be the category number. DO NOT generate anything apart from numbers 1-10.

Text: Johangsan is a mountain of South Korea. It has an elevation of 954 metres.
</example>
</providing_contextual_specific_information>

<provide_clear_prompt_sections>
Beyond the initial context, a structured query format plays a significant role in optimizing interactions with the language model. Separating distinct parts of the input with delimiters ensures clarity and enhances Amazon Nova models' ability to understand the query's structure. Another effective way is to use numbered lists or bullet points, which can help to break down the task into manageable steps and provide a clear outline of the actions that need to be taken. This structured approach aids in reducing ambiguity and improving the accuracy of the responses generated.

Notice how in the Sectioned Prompt column, the prompt is clearer and has delineated sections for different entities like Tasks, Context, Requirements, and the rest when compared to the instructions in the Unsectioned Prompt column.
<example name="create a sectioned prompt">
Task:

Write an article

Context Section:

Topic: Climate Change

Target Audience: High School Students

Purpose: Educational Article

Content Requirements:

    Explanation of basic concepts related to climate change.

    Examples of current impacts on ecosystems and human populations.

    Suggestions for individual actions to mitigate climate change.

Tone and Style:

    Informative and engaging

    Use simple language

    Include statistics and real-world examples
</example>
</provide_clear_prompt_sections>