国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

ChatGPT 最佳實踐指南之:將復(fù)雜任務(wù)拆分為較簡單的子任務(wù)

這篇具有很好參考價值的文章主要介紹了ChatGPT 最佳實踐指南之:將復(fù)雜任務(wù)拆分為較簡單的子任務(wù)。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

Split complex tasks into simpler subtasks

將復(fù)雜任務(wù)分解為較簡單的子任務(wù)

Just as it is good practice in software engineering to decompose a complex system into a set of modular components, the same is true of tasks submitted to GPTs. Complex tasks tend to have higher error rates than simpler tasks. Furthermore, complex tasks can often be re-defined as a workflow of simpler tasks in which the outputs of earlier tasks are used to construct the inputs to later tasks.

與軟件工程中將復(fù)雜系統(tǒng)分解為一組模塊化組件的最佳實踐相同,將任務(wù)提交給 GPT 時也是如此。與較簡單的任務(wù)相比,復(fù)雜任務(wù)的錯誤率往往更高。此外,復(fù)雜任務(wù)通??梢灾匦露x為一系列較簡單任務(wù)的工作流程,其中較早任務(wù)的輸出被用于構(gòu)建后續(xù)任務(wù)的輸入。

Tactic: Use intent classification to identify the most relevant instructions for a user query

技巧:使用意圖分類識別與用戶查詢最相關(guān)的指示

For tasks in which lots of independent sets of instructions are needed to handle different cases, it can be beneficial to first classify the type of query and to use that classification to determine which instructions are needed. This can be achieved by defining fixed categories and hardcoding instructions that are relevant for handling tasks in a given category. This process can also be applied recursively to decompose a task into a sequence of stages. The advantage of this approach is that each query will contain only those instructions that are required to perform the next stage of a task which can result in lower error rates compared to using a single query to perform the whole task. This can also result in lower costs since larger prompts cost more to run (see pricing information).

對于需要處理不同情況下的許多獨立指令集的任務(wù),首先對查詢進行分類,并使用分類來確定所需的指令,這將是有益的??梢酝ㄟ^定義固定的類別并硬編碼與給定類別下任務(wù)處理相關(guān)的指令來實現(xiàn)。這個過程也可以遞歸應(yīng)用于將任務(wù)分解為一系列階段。這種方法的優(yōu)點是每個查詢只包含執(zhí)行任務(wù)的下一個階段所需的指令,與使用單個查詢執(zhí)行整個任務(wù)相比,這可以降低錯誤率。這還可以降低成本,因為更大的提示需要更多的資源(請參閱定價信息)。

Suppose for example that for a customer service application, queries could be usefully classified as follows:

例如,假設(shè)對于客戶服務(wù)應(yīng)用程序,查詢可以有以下有用的分類:

SYSTEM

系統(tǒng)

You will be provided with customer service queries. Classify each query into a primary category and a secondary category. Provide your output in json format with the keys: primary and secondary.

您將收到客戶服務(wù)查詢。將每個查詢分類為主要類別和次要類別。使用 JSON 格式提供輸出,鍵為:主要和次要。

Primary categories: Billing, Technical Support, Account Management, or General Inquiry.

主要類別:計費、技術(shù)支持、帳戶管理或一般查詢。

Billing secondary categories:

-?Unsubscribe or upgrade

- Add a payment method

- Explanation for charge

- Dispute a charge

計費的次要類別:

-?退訂或升級

-?添加付款方式

-?收費解釋

-?爭議收費

Technical Support secondary categories:

- Troubleshooting

- Device compatibility

- Software updates

技術(shù)支持的次要類別:

-?故障排除

-?設(shè)備兼容性

-?軟件更新

Account Management secondary categories:

- Password reset

- Update personal information

- Close account

- Account security

帳戶管理的次要類別:

-?密碼重置

-?更新個人信息

-?關(guān)閉帳戶

-?帳戶安全

General Inquiry secondary categories:

- Product information

- Pricing

- Feedback

- Speak to a human

一般查詢的次要類別:

-?產(chǎn)品信息

-?定價

-?反饋

-?聯(lián)系人工客服

USER

用戶

I need to get my internet working again.

我需要讓我的互聯(lián)網(wǎng)再次工作起來。

Based on the classification of the customer query, a set of more specific instructions can be provided to a GPT model to handle next steps. For example, suppose the customer requires help with "troubleshooting".

根據(jù)客戶查詢的分類,可以提供一組更具體的指令給 GPT 模型處理下一步操作。例如,假設(shè)客戶需要幫助“故障排除”。

SYSTEM

系統(tǒng)

You will be provided with customer service inquiries that require troubleshooting in a technical support context. Help the user by:

您將收到需要在技術(shù)支持上下文中進行故障排除的客戶服務(wù)查詢。通過以下方式幫助用戶:

- Ask them to check that all cables to/from the router are connected. Note that it is common for cables to come loose over time.

- 要求他們檢查與路由器相連的所有電纜是否連接。請注意,隨著時間的推移,電纜常常會松動。

- If all cables are connected and the issue persists, ask them which router model they are using

-?如果所有電纜連接正常且問題仍然存在,請詢問他們使用的路由器型號。

- Now you will advise them how to restart their device:

-?現(xiàn)在,請告訴他們?nèi)绾沃匦聠釉O(shè)備:

-- If the model number is MTD-327J, advise them to push the red button and hold it for 5 seconds, then wait 5 minutes before testing the connection.

-?如果型號是 MTD-327J,請建議他們按下紅色按鈕并保持按壓 5 秒鐘,然后等待 5 分鐘后測試連接。

-- If the model number is MTD-327S, advise them to unplug and replug it, then wait 5 minutes before testing the connection.

如果型號是 MTD-327S,請建議他們拔下插頭并重新插上,然后等待 5 分鐘后測試連接。

- If the customer's issue persists after restarting the device and waiting 5 minutes, connect them to IT support by outputting {"IT support requested"}.

如果客戶在重新啟動設(shè)備并等待 5 分鐘問題仍然存在,則通過輸出 {"IT support requested"} 將他們連接到 IT 支持。

- If the user starts asking questions that are unrelated to this topic then confirm if they would like to end the current chat about troubleshooting and classify their request according to the following scheme:

-?如果用戶開始詢問與此主題無關(guān)的問題,則確認他們是否想結(jié)束當(dāng)前有關(guān)故障排除的聊天,并根據(jù)以下方案對其請求進行分類:

USER

用戶

<insert primary/secondary classification scheme from above here>

<在上面插入主要/次要分類方案>

I need to get my internet working again.

我需要讓我的互聯(lián)網(wǎng)再次工作起來。

Notice that the model has been instructed to emit special strings to indicate when the state of the conversation changes. This enables us to turn our system into a state machine where the state determines which instructions are injected. By keeping track of state, what instructions are relevant at that state, and also optionally what state transitions are allowed from that state, we can put guardrails around the user experience that would be hard to achieve with a less structured approach.

請注意,已指示模型發(fā)出特殊字符串以指示會話狀態(tài)何時發(fā)生變化。這使我們能夠?qū)⑾到y(tǒng)轉(zhuǎn)變?yōu)橐粋€狀態(tài)機,其中狀態(tài)確定注入哪些指令。通過跟蹤狀態(tài)、確定在該狀態(tài)下哪些指令相關(guān),以及可選地確定從該狀態(tài)允許的狀態(tài)轉(zhuǎn)換,我們可以為用戶體驗設(shè)置防護措施,這對于使用不太結(jié)構(gòu)化的方法很難實現(xiàn)。

Tactic: For dialogue applications that require very long conversations, summarize or filter previous dialogue

技巧:對于需要非常長對話的對話應(yīng)用,總結(jié)或過濾先前的對話

Since GPTs have a fixed context length, dialogue between a user and an assistant in which the entire conversation is included in the context window cannot continue indefinitely.

由于 GPT 模型有固定的上下文長度,在用戶與助手之間的對話中,如果整個對話都包含在上下文窗口中,對話不能無限繼續(xù)下去。

There are various workarounds to this problem, one of which is to summarize previous turns in the conversation. Once the size of the input reaches a predetermined threshold length, this could trigger a query that summarizes part of the conversation and the summary of the prior conversation could be included as part of the system message. Alternatively, prior conversation could be summarized asynchronously in the background throughout the entire conversation.

有多種解決這個問題的方法,方法之一是對先前的對話進行總結(jié)。一旦輸入的大小達到預(yù)定的閾值長度,這可能會觸發(fā)一個查詢,對對話的一部分進行總結(jié),先前對話的總結(jié)可以作為系統(tǒng)消息的一部分包含在其中?;蛘?,可以在整個對話過程中異步地對先前的對話進行總結(jié)。

An alternative solution is to dynamically select previous parts of the conversation that are most relevant to the current query. See the tactic "Use embeddings-based search to implement efficient knowledge retrieval".

另一種解決方案是動態(tài)選擇與當(dāng)前查詢最相關(guān)的先前對話部分。請參閱策略“使用基于嵌入的搜索來實現(xiàn)高效的知識檢索”。

Tactic: Summarize long documents piecewise and construct a full summary recursively

策略:逐段總結(jié)長文檔并遞歸構(gòu)建完整總結(jié)

Since GPTs have a fixed context length, they cannot be used to summarize a text longer than the context length minus the length of the generated summary in a single query.

由于 GPT 模型有固定的上下文長度,無法在單個查詢中對超出上下文長度減去生成總結(jié)長度的文本進行總結(jié)。

To summarize a very long document such as a book we can use a sequence of queries to summarize each section of the document. Section summaries can be concatenated and summarized producing summaries of summaries. This process can proceed recursively until an entire document is summarized. If it’s necessary to use information about earlier sections in order to make sense of later sections, then a further trick that can be useful is to include a running summary of the text that precedes any given point in the book while summarizing content at that point. The effectiveness of this procedure for summarizing books has been studied in previous research by OpenAI using variants of GPT-3.

要對非常長的文檔(如書籍)進行總結(jié),可以使用一系列查詢來逐段總結(jié)文檔的每個部分。可以將各個段落的總結(jié)連接并進行總結(jié),生成總結(jié)的總結(jié)。這個過程可以遞歸進行,直到對整個文檔進行總結(jié)。如果需要使用先前部分的信息才能理解后續(xù)部分,則可以在總結(jié)內(nèi)容時,在給定點之前包含文本的運行總結(jié)。這個過程在以往的 OpenAI 研究中使用 GPT-3 的變體研究了對書籍進行總結(jié)的效果。

“點贊有美意,贊賞是鼓勵”文章來源地址http://www.zghlxwxcb.cn/news/detail-556543.html

到了這里,關(guān)于ChatGPT 最佳實踐指南之:將復(fù)雜任務(wù)拆分為較簡單的子任務(wù)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • MySQL 安全最佳實踐指南

    MySQL 安全最佳實踐指南

    MySQL 以其可靠性和效率在各種可用的數(shù)據(jù)庫系統(tǒng)中脫穎而出。然而,與任何保存有價值數(shù)據(jù)的技術(shù)一樣,MySQL 數(shù)據(jù)庫是網(wǎng)絡(luò)犯罪分子利潤豐厚的目標(biāo)。 這使得 MySQL 安全不僅是一種選擇,而且是一種必需。這份綜合指南將深入探討保護 MySQL 數(shù)據(jù)庫的最佳實踐。 從初始設(shè)置到高

    2024年01月16日
    瀏覽(30)
  • 技術(shù)寫作最佳實踐與策略指南

    作為一名技術(shù)寫作者,遵守既定的最佳實踐有助于確保您的工作的一致性、清晰性和整體質(zhì)量。一些常見的最佳實踐包括: 始終考慮受眾: 牢記用戶視角編寫內(nèi)容。確保技術(shù)術(shù)語、語言和復(fù)雜程度與您的目標(biāo)讀者相匹配。 邏輯地組織內(nèi)容: 將材料分為章節(jié)、子章節(jié)、項目符號

    2024年02月04日
    瀏覽(21)
  • 【譯】MongoDB 性能最佳實踐指南

    原文地址:Best Practices Guide for MongoDB Performance MongoDB 是面向開發(fā)高性能應(yīng)用程序的現(xiàn)代開發(fā)人員的主要 NoSQL 文檔數(shù)據(jù)庫。MongoDB 采用類似 JSON 的文檔,以水平擴展和負載平衡著稱,為開發(fā)人員提供了定制化和可擴展性之間的絕佳平衡。 但是,與其他高性能工具一樣,MongoDB 在

    2024年02月03日
    瀏覽(21)
  • 項目管理軟件選擇指南:最佳實踐與避坑指南

    項目管理軟件選擇指南:最佳實踐與避坑指南

    當(dāng)今企業(yè)中,協(xié)作工具是必不可少的,每個企業(yè)都會尋找最適合自己的協(xié)作工具來提高工作效率。在這些協(xié)作工具中,Zoho Projects項目協(xié)作工具是最常用的一種,因為它能夠為團隊提供一個集任務(wù)、項目、文檔、IM、目標(biāo)、日歷、甘特圖、工時、審批等多個功能于一體的協(xié)作環(huán)

    2024年02月16日
    瀏覽(21)
  • 掌握Spring緩存-全面指南與最佳實踐

    掌握Spring緩存-全面指南與最佳實踐

    第1章:引言 大家好,我是小黑,咱們今天來聊聊緩存,在Java和Spring里,緩存可是個大角色。咱們在網(wǎng)上購物,每次查看商品詳情時,如果服務(wù)器都要去數(shù)據(jù)庫里翻箱倒柜,那速度得慢成什么樣?這就是緩存發(fā)光發(fā)熱的時刻。緩存就像是服務(wù)器的“小抽屜”,把經(jīng)常用到的數(shù)

    2024年01月17日
    瀏覽(27)
  • 電子文件管理系統(tǒng)的最佳實踐指南分享

    電子文件管理系統(tǒng)的最佳實踐指南分享

    電子文件管理系統(tǒng) 是一種專門用于管理電子文件的軟件工具,可以幫助組織更有效地管理、存儲、檢索和共享文件。 首先,在選擇適合自己組織的電子文件管理系統(tǒng)時,需要考慮以下幾個關(guān)鍵因素。首先,系統(tǒng)的易用性和用戶界面是否友好,是否能夠滿足您組織的需求。其

    2024年02月14日
    瀏覽(19)
  • 小程序安全指南:保護用戶數(shù)據(jù)的最佳實踐

    小程序安全指南:保護用戶數(shù)據(jù)的最佳實踐

    ? 第一章:引言 近年來,小程序已成為移動應(yīng)用開發(fā)的重要組成部分。它們?yōu)橛脩籼峁┝朔奖愕墓δ芎蛡€性化的體驗,然而,與此同時,小程序安全問題也引起了廣泛的關(guān)注。保護用戶數(shù)據(jù)是開發(fā)者應(yīng)該高度重視的問題。在本指南中,我們將介紹保護小程序用戶數(shù)據(jù)的最佳實

    2024年02月15日
    瀏覽(27)
  • Flink:處理大規(guī)模復(fù)雜數(shù)據(jù)集的最佳實踐深入探究Flink的數(shù)據(jù)處理和性能優(yōu)化技術(shù)

    作者:禪與計算機程序設(shè)計藝術(shù) 隨著互聯(lián)網(wǎng)、移動互聯(lián)網(wǎng)、物聯(lián)網(wǎng)等新型網(wǎng)絡(luò)技術(shù)的不斷發(fā)展,企業(yè)對海量數(shù)據(jù)的處理日益依賴,而大數(shù)據(jù)分析、決策支持、風(fēng)險控制等領(lǐng)域都需要海量的數(shù)據(jù)處理能力。如何高效、快速地處理海量數(shù)據(jù)、提升處理效率、降低成本,是當(dāng)下處理

    2024年02月13日
    瀏覽(27)
  • ChatGPT初學(xué)者最佳實踐

    ChatGPT初學(xué)者最佳實踐

    2022年11月底,ChatGPT引爆了新一輪AI的革命,也讓人們意識到AI真的能夠大幅度提高人們的工作效率,甚至有人擔(dān)心自己的工作會因為AI不保。這種居安思危的意識是正確的,但是正如錛鑿斧鋸的出現(xiàn),并沒有讓木匠這個行業(yè)消失,而是讓這個行業(yè)以更高效的方式工作。所以作為

    2024年02月05日
    瀏覽(20)
  • 性能測試的指南:測試類型、性能測試步驟、最佳實踐等

    近期公司為了節(jié)省成本搞了一波機房遷移,整合了一些南美部署架構(gòu)。有一些上google云和有些下阿里云等大的調(diào)整。 在做機房遷移項目當(dāng)中就需要思考如何進行性能測試,這種大的機房遷移SRE(運維)會針對組件會做一些單組件的性能測試,但是整個遷移之后性能上面會不會

    2024年02月03日
    瀏覽(30)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包