View a markdown version of this page

提供範例 (少樣本提示) - Amazon Nova

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

提供範例 (少樣本提示)

透過在提示中包含一些任務範例,您可以為 Amazon Nova 2 建置結構式範本。這可減少模棱兩可的情況,並增強輸出的準確性和品質。提供明確範例以讓模型的回應更符合所需結果,這種技術被稱為少樣本提示

少樣本提示的概念是,為語言模型提供一些任務範例,以及輸入和輸出格式,然後要求它根據提供的範例為新輸入產生輸出。此方法也有助於釐清複雜的指示或任務,讓 Amazon Nova 2 更容易了解和解釋所詢問的內容。

如何新增範例至提示詞說明:

新增範例可協助模型產生

  • 符合範例樣式的一致回應

  • 因為減少了錯誤解譯指示的機會並將產生的幻覺減至最少,回應效能更佳

使用少樣本提示來改善模型效能的數量,取決於所選範例的品質和多樣性。以下項目會在提示詞中示範良好鏡頭的特性:

  • 選擇多樣化範例:選擇的範例應該在多樣化方面代表預期輸入/輸出的分佈 (從常見使用案例到邊緣案例),以充分涵蓋相關的使用案例。務必避免範例中出現任何偏差,因為輸入中的偏差也可能導致輸出偏差。

  • 符合複雜性層級:所提供範例的複雜性應與目標任務或案例相符。務必確保在預期輸入與提示詞中所選的範例之間保持對應的複雜性等級。

  • 確保相關性:選取的範例應與手邊的問題或目標直接相關。這可確保回應的一致性和符合性。

提示

如果上述建議無效,我們建議您建置 RAG 型系統,根據使用者輸入查詢與可用鏡頭集區之間的相似性,透過動態選取的鏡頭來增強提示詞。

在這裡,您的使用者嘗試將傳入的客戶支援票證歸入預先定義的類別。您可以為 Amazon Nova 2 模型提供幾個正確分類的票證範例,以改善其對票證中使用的類別和語言的了解。示範範例應保持簡潔,並代表應用程式中所有目標任務。如果有對任務有意義的特定欄位名稱,例如此範例中的 TicketCategory,您的使用者可以直接使用這些欄位,後面緊接冒號 ":"

0-shot prompt

使用者:

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."

助理:

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

使用者:

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."

助理:

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.

在此範例中,範例會以回合形式提供,每個範例一個回合,其中的 User 角色包含輸入,Assistant 角色包含該範例的預期輸出。

0-shot Prompt

系統:

Your task is to Classify the following texts into the appropriate categories. The categories to classify are: Categories: - Food - Entertainment - Health - Wealth - Other

使用者:

I have 20$ in my pocket.

助理:

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)

系統:

Your task is to Classify the following texts into the appropriate categories. The categories to classify are: Categories: - Food - Entertainment - Health - Wealth - Other

使用者:

I love to eat pizza.

助理:

Food

使用者:

I enjoy watching movies.

助理:

Entertainment

使用者:

I am going to the gym after this.

助理:

Health

使用者:

I have 20$ in my pocket.

助理:

Wealth

在此範例中,您可以指定一個「範例」區段,然後在系統提示詞中列出一系列的範例。如果您的範例很長且複雜,而且有助於模型尋找範例鏡頭,這種在提示詞中提供範例的方式會特別有用。

0-shot Prompt

系統:

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.

使用者:

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

助理:

# 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

系統:

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]

使用者:

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

助理:

<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.