

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

# Fournir des exemples (invites à quelques essais)


En incluant quelques exemples de votre tâche dans l'invite, vous pouvez créer un modèle structuré à suivre par Amazon Nova 2. Cela réduit l’ambiguïté et améliore la précision et la qualité du résultat. La technique consistant à fournir des exemples clairs afin que les réponses du modèle correspondent davantage au résultat souhaité est appelée *invites à quelques essais*.

Le concept des invites à quelques essais consiste à fournir au modèle linguistique quelques exemples de la tâche, ainsi que le format d’entrée et de sortie, puis à lui demander de générer la sortie pour une nouvelle entrée sur la base des exemples fournis. Cette méthode permet également de clarifier des instructions ou des tâches complexes, ce qui permet à Amazon Nova 2 de comprendre et d'interpréter plus facilement ce qui est demandé.

**Comment l’ajout d’exemples à l’invite peut aider :**

L’ajout d’exemples peut aider le modèle à produire 
+ Des réponses cohérentes, uniformes avec le style des exemples 
+ Des réponses performantes grâce à la réduction du risque de mauvaise interprétation des instructions et à la minimisation des hallucinations

L’amélioration des performances du modèle grâce à l’utilisation des invites à quelques essais dépendra de la qualité et de la diversité des exemples que vous aurez choisis. Les éléments suivants illustrent les caractéristiques d’une bonne série d’exemples dans l’invite :
+ **Sélectionnez divers exemples** : Les exemples choisis doivent représenter la distribution de vos attentes input/output en termes de diversité (allant des cas d'utilisation courants aux cas extrêmes) afin de couvrir de manière adéquate les cas d'utilisation pertinents. Il est important d’éviter tout biais dans vos exemples, car un biais dans les entrées peut également entraîner un biais dans les sorties.
+ **Faites correspondre les niveaux de complexité** : la complexité des exemples fournis doit correspondre à la tâche ou au scénario cible. Il est important de s’assurer que le niveau de complexité est bien adapté entre l’entrée attendue et l’exemple choisi dans l’invite.
+ **Assurez-vous de la pertinence** : les exemples sélectionnés doivent être directement pertinents par rapport au problème ou à l’objectif à atteindre. Cela garantit la cohérence et l’uniformité des réponses. 

**Astuce**  
Si les suggestions ci-dessus ne fonctionnent pas, nous vous recommandons de créer un système basé sur RAG qui complète l’invite avec une sélection dynamique de clichés en fonction des similitudes entre la requête saisie par l’utilisateur et un groupe de clichés disponibles.

## Exemple 1 : fournir des exemples dans l’invite utilisateur


Ici, votre utilisateur tente de classer les tickets d’assistance client entrants dans des catégories prédéfinies. Vous pouvez fournir aux modèles Amazon Nova 2 quelques exemples de tickets correctement classés afin d'améliorer sa compréhension des catégories et de la langue utilisée dans les tickets. Les exemples doivent être concis et représenter toutes les tâches ciblées dans votre application. S’il existe un nom de champ spécifique significatif pour les tâches, tel que `Ticket` ou `Category` dans cet exemple, votre utilisateur peut utiliser ces champs directement suivis d’un deux-points `":"`. 

------
#### [ 0-shot prompt ]

Utilisateur :

```
Please classify the following customer support tickets into one of the categories: "Technical Issue," "Billing Inquiry," or "General Inquiry." 

Ticket: "Can you explain why my latest bill is higher than usual? I haven't changed my plan."
```

Assistante :

```
The customer support ticket should be classified as a "Billing Inquiry."

 Here’s the reasoning:
 - The customer is asking about the reason for a change in their latest bill amount.
 - The context revolves around billing and payment, which falls under the category of "Billing Inquiry."
```

------
#### [ 3-shot prompt ]

Utilisateur :

```
Please classify the following customer support tickets into one of the categories: "Technical Issue," "Billing Inquiry," or "General Inquiry." 
Use these examples to guide your classification:

Ticket: "I can't log in to my account. The system keeps giving me an error message."
Category: Technical Issue

Ticket: "I received an email saying my account will be suspended unless I make a payment. Is this a scam?"
Category: Billing Inquiry

Ticket: "What are the hours of operation for your customer support team?"
Category: General Inquiry

Now, classify the following ticket:
Ticket: "Can you explain why my latest bill is higher than usual? I haven't changed my plan."
```

Assistante :

```
Category: Billing Inquiry

Explanation: The ticket is asking for an explanation regarding a change in the billing amount, which falls under the billing category as it pertains to questions about charges or payments.
```

------

## Exemple 2 : fournir des exemples sous forme d’invites


Dans cet exemple, les exemples sont fournis sous forme de tours, à raison d’un tour par exemple, où le rôle `User` contient l’entrée et le rôle `Assistant` contient la sortie attendue pour cet exemple. 

------
#### [ 0-shot Prompt ]

Système :

```
Your task is to Classify the following texts into the appropriate categories. The categories to classify are: 

Categories: 
- Food 
- Entertainment 
- Health 
- Wealth 
- Other
```

Utilisateur :

```
I have 20$ in my pocket.
```

Assistante :

```
Category: Wealth

Explanation: The text mentions a specific amount of money, which falls under the category of wealth. The presence of a monetary value directly relates to financial status or economic aspect.
```

------
#### [ 3-shot Prompt (as turns) ]

Système :

```
Your task is to Classify the following texts into the appropriate categories. The categories to classify are: 

Categories: 
- Food 
- Entertainment 
- Health 
- Wealth 
- Other
```

Utilisateur :

```
I love to eat pizza.
```

Assistante :

```
Food
```

Utilisateur :

```
I enjoy watching movies.
```

Assistante :

```
Entertainment
```

Utilisateur :

```
I am going to the gym after this.
```

Assistante :

```
Health
```

Utilisateur :

```
I have 20$ in my pocket.
```

Assistante :

```
Wealth
```

------

## Exemple 3 : fournir des exemples dans l’invite système


Dans cet exemple, vous pouvez spécifier une section « Exemple », puis énumérer une série d’exemples dans l’invite système. Cette façon de fournir des exemples dans l’invite est particulièrement utile si vos exemples sont longs et complexes et aide à localiser les exemples.

------
#### [ 0-shot Prompt ]

Système :

```
You are an AI assistant helping to draft professional reports for enterprise stakeholders. Ensure the report is formatted in rich text, with headings, bullet points, and highlighted important tasks.
```

Utilisateur :

```
Draft a detailed project update report for our stakeholders, summarizing the project milestones achieved, tasks completed, and future plans.
```

Assistante :

```
# Project Update Report

## Executive Summary
This report provides a comprehensive update on the project milestones achieved, tasks completed, and future plans. Our team has made significant progress, and we are on track to meet the project goals. The following sections outline the details of our accomplishments and upcoming activities.

---

## Project Milestones Achieved

### **1. Project Initiation**
- **Milestone Date:** July 15, 2023
- **Description:** Completed initial project planning and secured stakeholder approval.

### **2. System Design Completion**
- **Milestone Date:** September 30, 2023
- **Description:** Finished the detailed system design and received positive feedback from technical review meetings.

### **3. Prototype Development**
- **Milestone Date:** November 15, 2023
- **Description:** Developed and tested a working prototype of the system.

---

## Tasks Completed

### **1. Requirement Gathering**
- **Description:** Conducted comprehensive stakeholder interviews and collected detailed requirements.
- **Highlighted Important Tasks:**
  - **User Story Mapping:** Mapped out user stories to ensure all user needs are addressed.
  - **Requirement Documentation:** Created detailed requirement specifications.

### **2. System Architecture Design**
- **Description:** Designed the system architecture, focusing on scalability and maintainability.
- **Highlighted Important Tasks:**
  - **Technology Stack Selection:** Chose the appropriate technology stack based on project requirements.
  - **Architecture Diagrams:** Developed detailed architecture diagrams for easy understanding.

### **3. Prototype Development and Testing**
- **Description:** Developed and rigorously tested the prototype.
- **Highlighted Important Tasks:**
  - **Coding:** Implemented core functionalities of the prototype.
  - **Testing:** Conducted unit and integration testing to ensure prototype reliability.

---

## Future Plans

### **1. Full System Development**
- **Description:** Begin the full-scale development of the system based on the approved design and prototype.
- **Highlighted Important Tasks:**
  - **Module Development:** Develop each module as per the design specifications.
  - **Code Reviews:** Implement regular code reviews to maintain code quality.

### **2. User Acceptance Testing (UAT)**
- **Description:** Conduct UAT to ensure the system meets user requirements and is ready for deployment.
- **Highlighted Important Tasks:**
  - **Test Plan Development:** Create detailed UAT plans and test cases.
  - **UAT Execution:** Execute UAT and gather feedback for final adjustments.

### **3. Deployment and Training**
- **Description:** Deploy the system and provide necessary training to end-users.
- **Highlighted Important Tasks:**
  - **Deployment:** Roll out the system to the production environment.
  - **Training Sessions:** Organize training sessions for users to familiarize them with the new system.

---

## Conclusion
Our project has successfully achieved key milestones and completed significant tasks. With the current momentum, we are well-positioned to meet our future objectives. We remain committed to delivering a high-quality system that meets all stakeholder expectations.

---

**Prepared by:**
[Your Name]
[Your Position]
[Date]

**Contact Information:**
[Your Email]
[Your Phone Number]

---

This detailed update aims to keep stakeholders informed and reassured about the project's progress and future direction. For any queries or further information, please do not hesitate to contact me directly.
```

------
#### [ 2-shot Prompt ]

Système :

```
You are an AI assistant helping to draft professional reports for enterprise stakeholders. Below are a few examples of well-formatted project update reports to guide your response. 

<Example 1>

<b>Project Update Report</b><br>
<i>Date:</i> January 15, 2023<br>
<hr>


<b>Project Milestones Achieved:</b><br>
- Successfully launched the new CRM system.<br>
- Integrated the marketing automation tool.<br>
- Completed the employee training sessions.

<b>Tasks Completed:</b><br>
- Developed the user manual.<br>
- Conducted system testing.<br>
- Prepared the training materials.

<b>Future Plans:</b><br>
- Roll out the CRM system to all departments.<br>
- Schedule follow-up training sessions.<br>
- Monitor system performance and make necessary adjustments.

<hr>
<b>Prepared by:</b><br>
[Your Name]<br>
[Your Position]<br>
[Your Contact Information]

<Example 2>

<b>Project Update Report</b><br>
<i>Date:</i> February 20, 2023<br>
<hr>

<b>Project Milestones Achieved:</b><br>
- Launched the new website.<br>
- Completed the SEO optimization.<br>
- Organized the stakeholder meeting.

<b>Tasks Completed:</b><br>
- Designed the website layout.<br>
- Wrote the content for the website.<br>
- Tested the website functionality

<b>Future Plans:</b><br>
- Implement the analytics tracking.<br>
- Launch the social media campaign.<br>
- Gather feedback from stakeholders.

<hr>
<b>Prepared by:</b><br>
[Your Name]<br>
[Your Position]<br>
[Your Contact Information]
```

Utilisateur :

```
Draft a detailed project update report for our stakeholders, summarizing the project milestones achieved, tasks completed, and future plans.
```

Assistante :

```
<b>Project Update Report</b><br>
<i>Date:</i> October 5, 2023<br>
<hr>

<b>Project Milestones Achieved:</b><br>
- Successfully completed the implementation of the new enterprise resource planning (ERP) system.<br>
- Conducted and completed the first phase of the data migration process.<br>
- Successfully launched the new inventory management module.

<b>Tasks Completed:</b><br>
- Developed and finalized the comprehensive user training program, including detailed user manuals and video tutorials.<br>
- Conducted extensive system integration testing with all existing systems and ensured seamless interoperability.<br>
- Executed the initial data migration from the legacy system to the new ERP system, resulting in a 95% accuracy rate.

<b>Future Plans:</b><br>
- Roll out the new ERP system to all departments in the next two phases.<br>
- Schedule and conduct follow-up training sessions for all employees.<br>
- Implement the remaining modules of the ERP system, including financial management and human resources.<br>
- Establish a robust monitoring and support framework to ensure smooth system operation and address any issues promptly.

<hr>
<b>Prepared by:</b><br>
[Your Name]<br>
[Your Position]<br>
[Your Contact Information]

---

This detailed report provides a clear and concise overview of the project's progress, highlighting the milestones achieved, tasks completed, and future plans. It ensures stakeholders are well-informed and can make strategic decisions based on the current status of the project.
```

------