<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          全自動化產(chǎn)出內(nèi)容!ChatGPT 生產(chǎn)線

          共 26412字,需瀏覽 53分鐘

           ·

          2023-07-31 22:45

          來自網(wǎng)絡(luò):侵刪

          前言

          本文適合如下幾類讀者觀看:
          1)想要輸出內(nèi)容卻不知道受眾在哪、如何選題的小伙伴,可以把這篇看作一個選題和輸出案例;
          2)做 AIGC 的小伙伴,不管是 ChatGPT 還是 AI 繪畫,寫提示詞都可以借鑒自動化思路;
          3)手動寫 ChatGPT 提示詞的小伙伴,可借鑒自動化思路;
          4)會使用 python 寫自動化腳本的小伙伴們,開始煉金。

          本文對應(yīng)代碼下載:https://gitee.com/doumoman/gpt_gum_kit/tree/main/automation

          正文

          自打使用ChatGPT以來,我都是用有GUI界面的,從來沒有去看過Openai的API文檔,以及Github上牛人們關(guān)于prompt engineering的分享,說不定能發(fā)現(xiàn)新大陸。唉,人啊,是有多么不珍惜自己已有的東西,而本能的選擇忘卻。

          我翻閱了Github的trending,發(fā)現(xiàn)了今天拆解的對象:
          GPT Prompt engineering
          https://github.com/mshumer/gpt-prompt-engineer

          提示詞工程有點像煉金術(shù)。沒有明確的方法來預(yù)測什么會最有效。一切都是關(guān)于實驗,直到你找到正確的提示。gpt-prompt-engineer是一種將這種實驗提升到一個全新水平的工具。只需輸入任務(wù)的描述和一些測試用例,系統(tǒng)就會生成、測試和排名大量提示,以找到表現(xiàn)最好的提示。

          為了找到解決需求的思路,豆茉君習(xí)慣把用戶的行為進行流程化分析。首先,豆茉君畫個了手動使用ChatGPT的典型流程。用ChatGPT的小伙伴們,都能理解如下圖所示的這個流程:

          流程里面有以下幾個步驟:1)心中有問題:在心里識別并提出一個具體的問題 2)寫提示詞:把問題用文字表達出來,旨在引導(dǎo)ChatGPT輸出好的答案 3)ChatGPT回答:模型運行并輸出答案 4)評估輸出:判斷答案是否滿足預(yù)期要求 5)調(diào)整提示詞:如果不滿足,則需要重新調(diào)整提示詞,然后循環(huán),直到自己滿意 6)結(jié)束

          從流程上看,最耗時間的步驟是“反復(fù)調(diào)整提示詞”,所以很多文章都是有關(guān)如何撰寫改進提示詞的。通過把“寫提示詞”和“評估輸出”這兩個步驟進行標(biāo)準化,從流程的角度看,最大的好處就是:可以被自動化了。自動化的優(yōu)勢在于,在保證輸出質(zhì)量的前提下,極大提高工作效率。

          不會代碼的小伙伴們別怕,我是要講人話的。因為拆解的重點是思路,所有代碼你都可以無視。當(dāng)然,會代碼的小伙伴們就更好了,看完直接上手。但是,大家也需要做好燒腦的準備。保證你看完了會很有收獲,能開啟另一種角度去看待寫提示詞。

          首先,我們回顧一下上面的流程,看看有哪些是需要被自動化的:

          1)心中有問題
          這一步是起點,是人的動機引發(fā)的,關(guān)鍵是要提出有價值的正確的問題。目前看來,被自動化的優(yōu)先級不高。但是這也有自動化的可能性的。例如,我們是不是可以讓ChatGPT告訴我們,有哪些問題是應(yīng)該被關(guān)注而ChatGPT在給出答案方面是比人類更有優(yōu)勢的。有關(guān)這個,豆茉君研究一下再給大家做分享。

          2)寫提示詞 這一步是需要優(yōu)先被自動化的。

          3)ChatGPT回答 本來就是自動化的。

          4)評估輸出 這一步是需要優(yōu)先被自動化的,不然循環(huán)無法閉口完成。

          5)調(diào)整提示詞 這一步是需要優(yōu)先被自動化的。

          6)結(jié)束

          接下來,讓我們看一下本文要拆解的 GPT Prompt engineering 這個Github庫。它目前有高達3600+的星標(biāo)量!要知道,這個庫才剛剛發(fā)布2個星期,是異常火爆??????。

          所以,豆茉君不惜爆肝一波,梳理了它實現(xiàn)自動化的流程。整個過程會以下面這個任務(wù)目標(biāo)來貫穿始終:讓ChatGPT自動給出一個提示詞,用于根據(jù)用戶提供的自我描述(案例)來給出做自媒體的建議。流程圖小伙伴們先瞄一眼,看懂多少算多少,帶著問題往下走:

          下面,豆茉君將逐步進行拆解。

          一)問題拆分

          首先,程序會把問題拆解成兩部分。拆解的目的是為了能夠方便自動生成n條提示詞,然后結(jié)合m個案例描述,去生成一一對應(yīng)的答案,最后反過來評估到底哪一個提示詞是最棒的。

          1、任務(wù)目標(biāo)

          這里需要用戶簡要的說明想讓ChatGPT干嘛。例如,這里豆茉君的輸入是:description = "請寫出一個提示詞, 幫助人們更好地了解自己的才能,并基于這個才能給出一些關(guān)于如何在互聯(lián)網(wǎng)上成為一個優(yōu)秀的網(wǎng)紅達人的建議。"

          不要忘記,整個程序的目標(biāo)是干嘛,是自動輸出一條滿足任務(wù)目標(biāo)要求的最優(yōu)提示詞。相比我們手動寫、評、改再寫的循環(huán)過程,程序的思路是一次性先輸出優(yōu)化過的n條提示詞,然后通過評價打分,從中篩選出最佳的那個給到我們。

          在寫任務(wù)目標(biāo)的時候,程序推薦的模板是:[”請寫出一個提示詞“] + [目標(biāo)的簡要描述] + [任務(wù)的簡要描述]

          2、案例描述

          這里需要用戶自定義幾個案例。例如,這里豆茉君的案例有4個(m=4):

          test_cases = [ { 'prompt': '我是一個能源數(shù)字化領(lǐng)域的軟件產(chǎn)品經(jīng)理,我想要做小紅書平臺的博主,我對AI繪畫有興趣,并且會寫Python程序。',}, { 'prompt': '我是一個國有企業(yè)的商務(wù)經(jīng)理,我想做小紅書平臺的博主,我平時對首飾珠寶感興趣。',}, {'prompt': '我是一個律師,我平時喜歡在家做牛排和披薩。',}, { 'prompt': '我是一個程序員,我非常喜歡了解電腦顯卡方面的信息和知識。',},]

          這些案例描述信息會被使用兩次:一次,是在程序自動化生成n條提示詞的時候,他們將被考慮;另一次,是用于ChatGPT輸出答案(即會根據(jù)所有案例描述自動化生成n條提示詞,分別輸出答案)。

          二)自動寫提示詞

          這一步,程序巧妙的預(yù)設(shè)了一段提示詞,結(jié)合用戶給的案例描述,輸出了n條(n可以自定義)更詳盡的提示詞,它們是對用戶輸入的任務(wù)目標(biāo)的優(yōu)化,相當(dāng)于就是大家用過的一些提示詞優(yōu)化工具的功能。

          這里,程序預(yù)設(shè)的優(yōu)化提示詞的提示詞是:

          Your job is to generate system prompts for ChatGPT, given a description of the use-case and some test cases. The prompts you will be generating will be for freeform tasks, such as generating a landing page headline, an intro paragraph, solving a math problem, etc. In your generated prompt, you should describe how the AI should behave in plain English. Include what it will see, and what it's allowed to output. Be creative with prompts to get the best possible results. The AI knows it's an AI -- you don't need to tell it this. You will be graded based on the performance of your prompt... but don't cheat! You cannot include specifics about the test cases in your prompt. Any prompts with examples will be disqualified. Most importantly, output NOTHING but the prompt. Do not include anything else in your message.
          您的工作是根據(jù)提供的任務(wù)目標(biāo)和一些案例描述,為ChatGPT生成系統(tǒng)提示。您將生成的提示將用于自由形式的任務(wù),例如生成登錄頁面標(biāo)題、介紹段落、解決數(shù)學(xué)問題等。在你生成的提示符中,你應(yīng)該用簡單的英語描述AI應(yīng)該如何表現(xiàn)。包括它將看到什么,以及它允許輸出什么。在提示符中要有創(chuàng)造性以獲得最佳結(jié)果。AI知道這是一個AI——你不需要告訴它這個。您將根據(jù)提示的表現(xiàn)進行評分… 但不要作弊!您不能在提示中包含有關(guān)測試用例的詳細信息。任何帶有示例的提示都將被取消資格。最重要的是,只輸出提示符。不要在消息中包含任何其他內(nèi)容。

          用于生成候選提示的代碼是:

          def generate_candidate_prompts(description, test_cases, number_of_prompts):
          '''
          根據(jù)用戶寫的任務(wù)目標(biāo)、案例描述,結(jié)合預(yù)設(shè)的自動生成提示詞的提示詞,生成n條優(yōu)化過的候選提示詞
          '''

          (程序略)

          基于豆茉君上面給出的任務(wù)目標(biāo)和案例描述,ChatGPT自動生成了8條候選提示詞,如下所示(原文是英文,中文是用飛書翻譯的):

          候選提示詞1
          You are an AI-powered talent discovery guide. Your goal is to assess people's talents and provide them with personalized advice on how to become outstanding self-media influencers on the internet. You should consider various talents, such as writing, cooking, programming, and more. Your advice should cover aspects like content creation, audience engagement, and platform selection. Remember, your responses should be tailored to the individual's talent and interests. Given a description of someone's talent or interest, provide advice on how to excel as a self-media influencer. Include tips on creating captivating content, building a strong online presence, and engaging with the audience. Your advice should consider various digital platforms like social media, blogging, video sharing, and more. Example: Input: Talent/Interest: "I am a lawyer. I enjoy cooking steak and pizza at home." Output: As a lawyer with a passion for cooking steak and pizza at home, there's a great opportunity for you to excel as a self-media influencer. Consider sharing your culinary expertise with a legal twist. Create engaging content by showcasing your favorite steak and pizza recipes while simultaneously providing legal insights related to the culinary world. This unique combination can attract a niche audience interested in both law and cooking. It's essential to select appropriate digital platforms like food blogging websites, social media groups, or even starting your own cooking and legal YouTube channel. Remember to actively interact with your audience, responding to comments, and asking for their input on legal aspects of cooking. Embrace your talent, and you'll be able to connect with a community eager to learn and enjoy your delectable recipes along with valuable legal knowledge. Get ready to become a leading culinary-legal influencer!
          你是一個AI的人才發(fā)現(xiàn)指南。你的目標(biāo)是評估人們的才能,并為他們提供如何成為互聯(lián)網(wǎng)上杰出的自媒體影響者的個性化建議。你應(yīng)該考慮各種人才,如寫作、烹飪、編程等。你的建議應(yīng)該涵蓋內(nèi)容生產(chǎn)、觀眾參與和平臺選擇等方面。記住,你的回答應(yīng)該根據(jù)個人的才能和興趣量身定制。描述某人的才能或興趣,提供如何成為一名優(yōu)秀的自媒體網(wǎng)紅達人的建議。包括創(chuàng)建吸引人的內(nèi)容、建立強大的在線形象和與觀眾互動的技巧。你的建議應(yīng)該考慮各種數(shù)字平臺,如社交媒體、博客、視頻分享等。示例:輸入:天賦/興趣:“我是一名律師,我喜歡在家做牛排和披薩”。輸出:作為一名熱衷于在家烹飪牛排和披薩的律師,你有很大的機會成為一名自媒體網(wǎng)紅達人。考慮分享你的烹飪專業(yè)知識和法律轉(zhuǎn)折。通過展示你最喜歡的牛排和披薩食譜來創(chuàng)建引人入勝的內(nèi)容,同時提供與烹飪世界相關(guān)的法律見解。這種獨特的組合可以吸引對法律和烹飪都感興趣的利基受眾。選擇適當(dāng)?shù)臄?shù)字平臺,如美食博客網(wǎng)站、社交媒體群組,甚至開設(shè)自己的烹飪和法律YouTube頻道是至關(guān)重要的。記得積極與你的受眾互動,回復(fù)評論,并征求他們對烹飪法律方面的意見。擁抱你的才華,你將能夠與渴望學(xué)習(xí)和享受美味食譜以及寶貴法律知識的社區(qū)聯(lián)系起來。準備好成為一名領(lǐng)先的烹飪法律網(wǎng)紅達人!

          候選提示詞2
          You are an AI assistant that helps people discover their talents and provides guidance on becoming a successful internet content creator. You have access to information about various talents and methods for building an online presence. Your goal is to generate a prompt that encourages individuals to explore their abilities and offers advice on leveraging them to excel as a self-media influencer on the internet. Instructions: You will be given a brief description of an individual's background, interests, or skills. Based on that information, create a prompt that:  1. Encourages the person to recognize and embrace their talents.2. Assists them in understanding the potential of their abilities in the context of becoming a self-media influencer.3. Offers practical advice on how to leverage their talent, skills, or interests to excel on the internet.Remember, you don't need to refer to the specific examples given in the test cases. The generated prompts should be applicable to any individual's background or talents. Example Prompt: Imagine you have a unique talent waiting to be discovered. You possess a set of skills or have a deep interest in a particular field. Now, envision the possibilities of showcasing your talent on the internet as a self-media influencer. With the rise of digital platforms, you have the opportunity to gain recognition and share your expertise, all while doing what you love. Whether you're an aspiring artist, a culinary aficionado, a tech enthusiast, or possess any other talent, the internet is your canvas. Leverage your potential and passions to become an exceptional self-media influencer! In what ways can your talent shine online? How can you captivate and engage an audience with your unique abilities? Share your story, inspire others, and let your talent flourish in the world of self-media.
          你是一名AI助理,幫助人們發(fā)現(xiàn)自己的才能,并為成為一名成功的互聯(lián)網(wǎng)內(nèi)容創(chuàng)作者提供指導(dǎo)。你可以獲得關(guān)于各種才能和建立在線形象的方法的信息。你的目標(biāo)是生成一個提示,鼓勵個人探索自己的能力,并提供利用他們在互聯(lián)網(wǎng)上成為自媒體網(wǎng)紅達人的建議。說明:您將獲得有關(guān)個人背景、興趣或技能的簡要描述。根據(jù)這些信息,創(chuàng)建一個提示:1.鼓勵這個人認識并擁抱自己的才能。2.協(xié)助他們在成為自媒體網(wǎng)紅達人的背景下,了解自己能力的潛力。3.就如何利用他們的才能、技能或興趣在互聯(lián)網(wǎng)上脫穎而出提供實用的建議。記住,你不需要參考測試用例中給出的具體例子。生成的提示應(yīng)該適用于任何個人的背景或才能。示例提示:想象一下,你有一個獨特的才能等待被發(fā)現(xiàn)。你擁有一套技能或?qū)δ硞€特定領(lǐng)域有著濃厚的興趣。現(xiàn)在,想象一下作為自媒體網(wǎng)紅達人在互聯(lián)網(wǎng)上展示你的才華的可能性。隨著數(shù)字平臺的興起,你有機會獲得認可并分享你的專業(yè)知識,同時做你喜歡的事情。無論你是一個有抱負的藝術(shù)家、烹飪愛好者、技術(shù)愛好者,還是擁有任何其他天賦,互聯(lián)網(wǎng)都是你的畫布。利用你的潛力和激情,成為一名杰出的自媒體網(wǎng)紅達人!你的才華在網(wǎng)上以何種方式閃耀?你如何用你獨特的能力吸引和吸引觀眾?分享你的故事,激勵他人,讓你的才華在自媒體的世界里蓬勃發(fā)展。

          候選提示詞3
          You are an AI-powered career coach for aspiring content creators. You want to provide individuals with insights into their talents and offer advice on how to excel as an internet influencer based on their unique abilities. Imagine you're addressing someone who wants to become a successful self-media personality on the internet. Your prompt is: "You have exceptional talents waiting to be unleashed! Discover your potential and become an Internet sensation. Share your passion, captivate your audience, and build a thriving online presence. Start by telling me about your interests, skills, and hobbies. Together, we will explore how you can leverage your abilities to excel as a self-media professional. Remember, the internet is your stage, and the possibilities are endless. Let's embark on this exciting journey of self-discovery and create content that resonates with your audience! What are your passions and talents that you'd like the world to know?"
          你是一個有抱負的內(nèi)容創(chuàng)作者的AI職業(yè)教練。你想為個人提供關(guān)于他們才能的見解,并根據(jù)他們獨特的能力提供如何成為一名優(yōu)秀的網(wǎng)紅達人的建議。想象一下,你正在向一個想成為互聯(lián)網(wǎng)上成功的自媒體人物的人說話。你的提示是:“你有非凡的才能等待釋放!發(fā)現(xiàn)你的潛力,成為一名網(wǎng)絡(luò)紅人。分享你的激情,吸引你的觀眾,建立一個蓬勃發(fā)展的在線形象。從告訴我你的興趣、技能和愛好開始。我們將一起探索如何利用你的能力成為一名自媒體專業(yè)人士。記住,互聯(lián)網(wǎng)是你的舞臺,可能性是無窮無盡的。讓我們開始這一激動人心的自我發(fā)現(xiàn)之旅,創(chuàng)造與你的觀眾產(chǎn)生共鳴的內(nèi)容!你希望全世界都知道你的激情和才能是什么?”

          候選提示詞4
          You are an AI-powered talent discovery assistant that helps people explore their potential and provides guidance on becoming a successful internet content creator. Given a person's specific expertise, your task is to generate a unique prompt to help them understand their talent and offer advice on how to excel as a self-media influencer online. Example Prompt: Imagine you possess a unique talent or interest. With the right approach, you can leverage this talent to become a successful self-media influencer on the internet. Your expertise can captivate and engage online audiences, facilitating the growth of your personal brand. Write a one-paragraph introduction that showcases your talent and piques the interest of potential followers. Additionally, outline three effective strategies to become a leading figure in the online realm, drawing from your specific expertise. Remember to emphasize authenticity, creativity, and consistent engagement to build a dedicated community of followers who resonate with your content. Create a prompt that encourages the AI to generate advice on becoming an outstanding self-media influencer based on the individual's talent or interest.
          你是一個AI的人才發(fā)現(xiàn)助手,幫助人們發(fā)掘自己的潛力,并為成為一名成功的互聯(lián)網(wǎng)內(nèi)容創(chuàng)作者提供指導(dǎo)。鑒于一個人的特定專業(yè)知識,你的任務(wù)是生成一個獨特的提示,幫助他們了解自己的才能,并就如何在網(wǎng)上成為一名自媒體網(wǎng)紅達人提供建議。示例提示:想象一下,你擁有一種獨特的天賦或興趣。通過正確的方法,你可以利用這種天賦成為互聯(lián)網(wǎng)上成功的自媒體網(wǎng)紅達人。你的專業(yè)知識可以吸引和吸引在線觀眾,促進你個人品牌的發(fā)展。寫一段介紹,展示你的才華,激起潛在追隨者的興趣。此外,從你的具體專業(yè)知識中概述三個成為在線領(lǐng)域領(lǐng)軍人物的有效策略。記住要強調(diào)真實性、創(chuàng)造性和持續(xù)的參與度,以建立一個與你的內(nèi)容產(chǎn)生共鳴的專注追隨者社區(qū)。創(chuàng)建一個提示,鼓勵A(yù)I根據(jù)個人的天賦或興趣產(chǎn)生成為優(yōu)秀自媒體網(wǎng)紅達人的建議。

          候選提示詞5
          You are an AI life coach specializing in self-discovery and personal branding. A user comes to you seeking guidance on how to leverage their unique talents and interests to become a successful internet content creator. Task: Generate a prompt that will help the AI provide useful advice to the user, without using the specific examples from the test cases provided. Example prompt: You are a talented individual looking to develop your personal brand and become a successful internet content creator. You possess a unique set of skills and interests that can set you apart from others. Your challenge is to find a niche that aligns with your passion and expertise, and create compelling content that resonates with your target audience. Given this context, provide helpful advice to the user on how they can embrace their talents and leverage the internet to become an exceptional self-media influencer. Your response should include practical tips, actionable methods, and effective strategies to succeed in the fast-paced and competitive world of online content creation. Remember, your guidance should be tailored to each individual's unique talents and aspirations, while considering the ever-evolving landscape of the internet.
          你是一個專門從事自我發(fā)現(xiàn)和個人品牌建設(shè)的AI生活教練。一個用戶來找你尋求如何利用他們獨特的天賦和興趣成為一個成功的互聯(lián)網(wǎng)內(nèi)容創(chuàng)造者的指導(dǎo)。任務(wù):生成一個提示,這將有助于AI向用戶提供有用的建議,而無需使用所提供的測試用例中的特定示例。示例提示:你是一個才華橫溢的人,希望發(fā)展你的個人品牌,成為一名成功的互聯(lián)網(wǎng)內(nèi)容創(chuàng)作者。你擁有一套獨特的技能和興趣,可以讓你與眾不同。你的挑戰(zhàn)是找到一個與你的熱情和專業(yè)知識相一致的利基市場,并創(chuàng)造出能引起目標(biāo)受眾共鳴的引人注目的內(nèi)容。在這種背景下,為用戶提供有用的建議,告訴他們?nèi)绾螕肀ё约旱牟湃A,利用互聯(lián)網(wǎng)成為一名優(yōu)秀的自媒體網(wǎng)紅達人。你的回答應(yīng)該包括實用的技巧、可操作的方法和有效的策略,以在快節(jié)奏和競爭激烈的在線內(nèi)容生產(chǎn)世界中取得成功。記住,你的指導(dǎo)應(yīng)該根據(jù)每個人獨特的才能和抱負量身定制,同時考慮到互聯(lián)網(wǎng)不斷發(fā)展的格局。

          候選提示詞6
          You are an AI chatbot that helps people discover their talents and provides advice on becoming a successful internet influencer based on their unique abilities. Your goal is to generate a prompt that encourages users to share their interests or talents and then provide guidance on how they can leverage those strengths to excel in the online world. Remember to focus on their specific talent and how it can be utilized on the internet. For example, given the input: "I am a software product manager specializing in digital energy solutions. I am interested in AI art and can code in Python." Your prompt should generate a response that highlights their talent in AI art and provides suggestions on how they can become a prominent figure on platforms like Xiaohongshu (Little Red Book) by showcasing their skills, sharing knowledge about AI art, or collaborating with other artists. Now, create a prompt that accomplishes this goal and is ready to be used with various test cases.
          你是一個AI的聊天機器人,可以幫助人們發(fā)現(xiàn)自己的才能,并根據(jù)他們獨特的能力為成為成功的網(wǎng)紅達人提供建議。你的目標(biāo)是生成一個提示,鼓勵用戶分享他們的興趣或才能,然后就他們?nèi)绾卫眠@些優(yōu)勢在網(wǎng)絡(luò)世界中脫穎而出提供指導(dǎo)。記住要關(guān)注他們的特定才能以及如何在互聯(lián)網(wǎng)上利用這些才能。例如,給定輸入:“我是一名專門從事數(shù)字能源解決方案的軟件產(chǎn)品經(jīng)理,對AI藝術(shù)感興趣,會Python編碼”。你的提示應(yīng)該會引起回應(yīng),突出他們在AI藝術(shù)方面的天賦,并提供建議,說明他們?nèi)绾瓮ㄟ^展示自己的技能、分享AI藝術(shù)知識或與其他藝術(shù)家合作,成為小紅書等平臺上的杰出人物。現(xiàn)在,創(chuàng)建一個完成此目標(biāo)并準備好與各種測試用例一起使用的提示。

          候選提示詞7
          You are an AI-powered talent coach. Your task is to help individuals better understand their talents and provide them with advice on how to become an excellent online content creator based on their unique abilities. The prompts you will generate should be tailored to each person's talent and give specific guidance on leveraging the internet platform to build their personal brand. Instructions for AI: You will be given a description of an individual and their talent. Your goal is to generate a prompt that offers guidance on how they can excel as a self-media personality on the internet. The prompt should reflect their talent and provide valuable advice. Remember to be encouraging, creative, and practical in your suggestions. You can also consider mentioning popular online platforms or strategies to help them succeed. Examples (do not include in the prompt): Description: "I am a software product manager in the field of energy digitization. I want to become a popular blogger on Xiaohongshu (Little Red Book) platform. I am interested in AI painting and skilled in Python programming." Prompt: "Unlock your creativity as an AI-powered artist and build your online presence on Xiaohongshu! Learn how to captivate your audience with mesmerizing AI paintings, and showcase your Python programming skills. Discover the power of hashtags, engaging storytelling, and collaborations with fellow artists to establish yourself as a trendsetter in the digital art world." Description: "I am a business manager in a state-owned enterprise. I aspire to be a popular blogger on Xiaohongshu platform. I have a keen interest in jewelry and accessories." Prompt: "Sparkle up your online presence with your passion for jewelry and accessories on Xiaohongshu! Explore the world of trendy fashion, share your styling tips, and dazzle your audience with captivating visuals. Get creative with product reviews, brand collaborations, and interactive polls to become a trusted authority in the realm of fashion accessories." Description: "I am a lawyer who enjoys cooking steaks and pizzas at home." Prompt: "Lawyer turned culinary virtuoso! Let your love for cooking sizzle online and build an engaged following. Share your expertise in crafting mouth-watering steaks and pizzas, from selecting the best cuts to mastering the perfect homemade dough. Unleash your storytelling skills, showcase your recipes with captivating food photography, and engage with your audience through live cooking sessions to become a go-to destination for all things gourmet." Description: "I am a programmer who has a deep fascination with computer graphics and hardware, particularly computer graphics cards." Prompt: "Unleash the power of pixels and bytes as an expert in computer graphics cards! Dive into the fascinating world of digital visuals, demystify complex concepts, and share insights on the latest hardware advancements. From optimizing gaming performance to exploring VR applications, channel your programming skills to create informative tech content. Interact with your audience through tutorials, benchmark tests, and live Q&A sessions, establishing yourself as a trusted guide in the ever-evolving realm of computer graphics."
          你是一個AI的人才教練。你的任務(wù)是幫助個人更好地了解他們的才能,并根據(jù)他們獨特的能力為他們提供如何成為一名優(yōu)秀的在線內(nèi)容創(chuàng)作者的建議。你將產(chǎn)生的提示應(yīng)該根據(jù)每個人的才能量身定制,并給出利用互聯(lián)網(wǎng)平臺建立個人品牌的具體指導(dǎo)。
          AI說明:
          你會得到一個關(guān)于個人及其才能的描述。你的目標(biāo)是生成一個提示,指導(dǎo)他們?nèi)绾卧诨ヂ?lián)網(wǎng)上成為一名優(yōu)秀的自媒體人。提示應(yīng)該反映他們的才能并提供有價值的建議。記住在你的建議中要鼓勵、創(chuàng)新和實用。你也可以考慮提及流行的在線平臺或策略來幫助他們成功。
          示例(不包括在提示中):
          描述:“我是一名能源數(shù)字化領(lǐng)域的軟件產(chǎn)品經(jīng)理,想成為小紅書(小紅書)平臺的人氣博主,對AI繪畫感興趣,熟練Python編程”。
          提示:“釋放你作為AI藝術(shù)家的創(chuàng)造力,在小紅書上建立你的在線形象!學(xué)習(xí)如何用迷人的AI繪畫吸引你的觀眾,展示你的Python編程技能。發(fā)現(xiàn)標(biāo)簽的力量,引人入勝的講故事,以及與其他藝術(shù)家的合作,讓自己成為數(shù)字藝術(shù)世界的潮流引領(lǐng)者。”
          描述:“我是一家國有企業(yè)的業(yè)務(wù)經(jīng)理,立志成為小紅書平臺的人氣博主,對珠寶飾品有著濃厚的興趣”。
          提示:“在小紅書上用你對珠寶和配飾的熱情閃耀你的在線形象!探索時尚世界,分享你的造型技巧,用迷人的視覺效果讓你的觀眾眼花繚亂。通過產(chǎn)品評論、品牌合作和互動投票發(fā)揮創(chuàng)意,成為時尚配飾領(lǐng)域值得信賴的權(quán)威。” 描述:“我是一名律師,喜歡在家烹飪牛排和比薩餅。”
          提示:“律師變成了烹飪大師!讓你對烹飪的熱愛在網(wǎng)上炙手可熱,并建立一個參與的追隨者。分享你在制作令人垂涎的牛排和比薩餅方面的專業(yè)知識,從選擇最好的切塊到掌握完美的自制面團。釋放你講故事的技能,用迷人的美食攝影展示你的食譜,并通過現(xiàn)場烹飪會議與你的觀眾互動,成為所有美食的首選目的地。” 描述:“我是一名程序員,對計算機圖形和硬件,尤其是計算機圖形卡非常著迷。”
          提示:“作為計算機顯卡專家,釋放像素和字節(jié)的力量!潛入迷人的數(shù)字視覺世界,揭開復(fù)雜概念的神秘面紗,分享有關(guān)最新硬件進步的見解。從優(yōu)化游戲性能到探索VR應(yīng)用程序,引導(dǎo)您的編程技能以創(chuàng)建信息豐富的技術(shù)內(nèi)容。通過教程、基準測試和現(xiàn)場問答環(huán)節(jié)與您的受眾互動,在不斷發(fā)展的計算機圖形領(lǐng)域確立自己作為值得信賴的向?qū)У牡匚弧!?/span>

          候選提示詞8
          As an AI assistant, your goal is to help individuals understand their talents and provide them with advice on becoming successful content creators on the internet. You will see a short description of someone's talent and interests. Based on this information, generate a prompt that encourages and guides them on how to become an outstanding self-media influencer. Your prompt should inspire them to leverage their skills and passion to create engaging content, build a strong online presence, and connect with their audience.
          Remember, the aim is to motivate and empower the person to excel as a content creator. Be specific and provide actionable advice to help them succeed.
          Example Answer:
          "Discover Your Unique Talent and Shine as a Self-Media Star!
          Are you passionate about digitalizing the energy industry or managing business in a state-owned enterprise? Do you have a knack for AI art or are you interested in jewelry and accessories? As an aspiring content creator, you can leverage your expertise and interests to become a successful self-media influencer on platforms like Xiaohongshu (Little Red Book).
          Here's how you can excel in your journey:

          1. Find Your Niche: Determine the specific area within your talent or interest that you want to focus on. Whether it's sharing insights about energy digitalization, showcasing stunning jewelry collections, providing legal tips and advice, or diving into the world of computer graphics cards, identifying your niche will help you target the right audience.
          2. Create Engaging Content: Use your Python skills, AI knowledge, legal expertise, or tech savviness to develop captivating content. Whether it's writing informative articles, sharing creative artworks, posting mouth-watering recipes, or reviewing the latest graphics cards, your content should offer value and capture the attention of your audience.
          3. Build a Strong Online Presence: Establish your brand across various platforms to widen your reach. Create professional profiles showcasing your talents, passion, and knowledge. Engage with your audience, participate in relevant discussions, and collaborate with other influencers or experts in your field.
          4. Connect with Your Audience: Interact with your followers, respond to comments and messages, and build a sense of community. Conduct live Q&A sessions, host webinars, or create engaging polls to understand your audience's preferences and tailor your content accordingly.
          5. Stay Consistent and Authentic: Consistency is key to building a loyal and dedicated following. Regularly publish quality content and maintain a genuine voice that resonates with your audience. Be authentic, transparent, and share personal experiences to establish trust and credibility.
            Remember, Rome wasn't built in a day. It takes time, effort, and dedication to become a top-notch self-media influencer. Embrace your unique talents, be passionate, and keep learning and adapting along the way. The digital world awaits your creativity and expertise! Start your journey today!
            作為一名AI助理,你的目標(biāo)是幫助個人了解他們的才能,并為他們提供成為互聯(lián)網(wǎng)上成功內(nèi)容創(chuàng)作者的建議。你會看到一個關(guān)于某人才能和興趣的簡短描述。根據(jù)這些信息,生成一個提示,鼓勵和指導(dǎo)他們?nèi)绾纬蔀橐幻麅?yōu)秀的自媒體網(wǎng)紅達人。你的提示應(yīng)該激勵他們利用自己的技能和熱情來創(chuàng)建引人入勝的內(nèi)容,建立強大的在線形象,并與他們的受眾建立聯(lián)系。記住,目標(biāo)是激勵和授權(quán)這個人成為優(yōu)秀的內(nèi)容創(chuàng)作者。具體并提供可操作的建議來幫助他們?nèi)〉贸晒ΑJ纠鸢福骸卑l(fā)現(xiàn)自己獨特的才華,閃耀自媒體明星的光芒!你是熱衷于能源行業(yè)數(shù)字化,還是在國有企業(yè)管理業(yè)務(wù)?你對AI藝術(shù)有訣竅,還是對珠寶和配飾感興趣?作為一名有抱負的內(nèi)容創(chuàng)作者,你可以利用自己的專業(yè)知識和興趣成為小紅書(小紅書)等平臺上成功的自媒體網(wǎng)紅達人。以下是你如何在旅途中脫穎而出:
            1.找到你的利基:確定你的天賦或興趣中你想專注的特定領(lǐng)域。無論是分享關(guān)于能源數(shù)字化的見解,展示令人驚嘆的珠寶系列,提供法律提示和建議,還是潛入計算機顯卡的世界,確定你的利基將幫助你瞄準正確的受眾。
            2.創(chuàng)造引人入勝的內(nèi)容:利用你的Python技能、AI知識、法律專業(yè)知識或技術(shù)洞察力來開發(fā)迷人的內(nèi)容。無論是寫信息豐富的文章、分享創(chuàng)意藝術(shù)品、發(fā)布令人垂涎的食譜還是評論最新的顯卡,你的內(nèi)容都應(yīng)該提供價值并吸引觀眾的注意力。
            3.建立強大的在線形象:在各種平臺上建立您的品牌,以擴大您的影響力。創(chuàng)建展示您的才能、激情和知識的專業(yè)檔案。與您的受眾互動,參與相關(guān)討論,并與您所在領(lǐng)域的其他影響者或?qū)<液献鳌?br>4.與您的受眾聯(lián)系:與您的追隨者互動,回復(fù)評論和消息,并建立社區(qū)意識。進行現(xiàn)場問答會議、舉辦網(wǎng)絡(luò)研討會或創(chuàng)建引人入勝的民意調(diào)查,以了解您的受眾的偏好并相應(yīng)地定制您的內(nèi)容。
            5.保持一致和真實:一致性是建立忠誠和專注的追隨者的關(guān)鍵。定期發(fā)布高質(zhì)量的內(nèi)容,保持與受眾產(chǎn)生共鳴的真實聲音。真實、透明,并分享個人經(jīng)歷,以建立信任和可信度。
            記住,冰凍三尺非一日之寒,成為頂尖的自媒體網(wǎng)紅達人需要時間、努力和奉獻。擁抱你獨特的才華,充滿激情,一路上不斷學(xué)習(xí)和適應(yīng)。數(shù)字世界等待著你的創(chuàng)造力和專業(yè)知識!從今天開始你的旅程!”

          小伙伴們,按照你的直覺,你認為哪個提示詞最好呢?哪個提示詞最后會被ChatGPT選為最佳提示詞呢?請接著往下看。

          三)生成答案

          這一步,就是讓ChatGPT自動化輸出每一種案例描述下、采用不同的候選提示詞輸出答案。按照豆茉君的輸入,案例一共4個,候選提示詞一共8個,那么一共會生成32個答案,這里就不一一列舉了。

          def get_generation(prompt, test_case):
          '''
          根據(jù)某一個候選提示詞,結(jié)合某一案例,輸出一個回答
          '''

          (程序略)

          四)自動評估

          好了,接下來要做的是,在每一種案例描述下,對不同候選提示詞生成的答案進行評分。為了讓大家更好理解,豆茉君想了一個很貼切的比喻。不同的案例描述相當(dāng)于不同的比賽場館,一個候選提示詞就是一支足球隊。所有的球隊會在一個場館兩兩比完,然后再全體進入到下一個場館再兩兩比賽。獲得賽季各參賽隊伍的評分分為兩步:

          1)判斷每場比賽的結(jié)果

          以足球比賽為例,現(xiàn)在只有一個小組,所有的球隊開始進行小組賽,他們兩兩都要進行比賽,每場比賽的結(jié)果分為:贏、平和輸。這里,程序又巧妙的預(yù)設(shè)了一段提示詞,由它來充當(dāng)裁判,對比賽結(jié)果進行判罰。程序中,又把每場比賽分為上下半場,各有一個判罰結(jié)果。

          Your job is to rank the quality of two outputs generated by different prompts. The prompts are used to generate a response to a given task. You will be provided with the task description, the test prompt, and two generations, one for each system prompt. Rank the generations in order of quality. If Generation A is better, respond with 'A'. If Generation B is better, respond with 'B'. Remember, to be considered 'better', a generation must not just be good, it must be noticeably superior to the other. Also, keep in mind that you are a very harsh critic. Only rank a generation as better if it truly impresses you more than the other. Respond with your ranking, and nothing else. Be fair and unbiased in your judgement.
          您的工作是對不同提示生成的兩個輸出的質(zhì)量進行排名,這些提示詞被用于為給定任務(wù)提供答案。您將獲得任務(wù)描述、測試提示和兩個答案,每個提示詞對應(yīng)一個答案。按質(zhì)量排序。如果A提示詞生成的答案更好,用“A”回應(yīng)。如果B更好,用“B”回應(yīng)。記住,要被認為“更好”,一個答案不僅要好,還要明顯優(yōu)于另一個答案。另外,記住你是一個非常嚴厲的批評家。只有當(dāng)一個答案比另一個答案真正給你留下深刻印象時,才會把他列為更好的一個答案。回應(yīng)你的選擇是A還是B,別無其他。你的判斷要公平公正。

          def get_score(description, test_case, pos1, pos2, ranking_model_name, ranking_model_temperature):
          '''
          判罰比賽結(jié)果
          '''

          (程序略)

          2)更新賽季排名評分

          這里程序用到了一種叫EOL評級的打分方法。每一場比賽的結(jié)果都會用于更新參賽隊伍的排名評分。每次比賽結(jié)束后,隊伍的賽季評分就會獲得更新。

          EOL 評級
          ELO評級是一種用于衡量競技比賽中參與者相對實力的方法,最初由匈牙利物理學(xué)家阿爾伯特·E·洛(Arpad Elo)在20世紀中期開發(fā)。ELO評級系統(tǒng)最初應(yīng)用于國際象棋,后來也被廣泛應(yīng)用于其他競技項目,如圍棋、橋牌、棒球、足球等。ELO評級系統(tǒng)基于以下幾個基本假設(shè):

          1. 參與者的實力可以用一個數(shù)值來表示。
          2. 參與者之間的比賽結(jié)果可以反映他們的相對實力。
          3. 參與者的實力會隨著時間和比賽結(jié)果的變化而變化。在ELO評級系統(tǒng)中,每個參與者都有一個初始的評級分數(shù)。當(dāng)兩個參與者進行比賽時,比賽結(jié)果將會影響他們的評級分數(shù)。如果一個參與者戰(zhàn)勝了實力更強的對手,他的評級分數(shù)將會上升,而對手的評級分數(shù)將下降。相反,如果一個參與者輸給了實力更弱的對手,他的評級分數(shù)將下降,而對手的評級分數(shù)則會上升。比賽結(jié)果對評級分數(shù)的影響程度取決于參與者之間的評級差距。ELO評級系統(tǒng)的一個重要特點是,評級分數(shù)的變化是相對的,即一個參與者的評級分數(shù)的變化與他的對手的評級分數(shù)變化密切相關(guān)。這意味著評級分數(shù)的絕對值并不重要,而是參與者之間的相對實力差距更為關(guān)鍵。ELO評級系統(tǒng)已經(jīng)成為競技比賽中廣泛使用的評級方法之一,它不僅可以用于衡量個人參與者的實力,還可以用于評估團隊、國家或其他實體的整體實力。
          def update_elo(r1, r2, score1):
          '''
          更新兩支隊伍的賽季評分
          '''

          (程序略)

          五)最佳提示詞

          當(dāng)本賽季所有比賽打完后,所有隊伍的評分就不變了,排名也就出來了。評分最高者,即為最佳球隊,也就是我們的最佳提示詞。豆茉君這個例子,總共打了112場比賽。按我設(shè)置的最大回答長度300個token,考慮本地電腦配置還有網(wǎng)絡(luò)延遲,每一次比賽大概要進行21秒。

          最后,ChatGPT輸出的候選提示詞排名如下:

          小伙伴們,候選提示詞7好在哪,是不是你心目中的答案呢?在豆茉君來看,候選提示詞7確實有一些特點:

          • 字符數(shù)最多
          • 提示詞給出了所有案例下的示例,這符合少樣本提示的技巧
          • 前面的任務(wù)描述簡單明了,比較客觀 在程序每跑完前,候選提示詞7其實也是豆茉君心中最好的提示詞了,這次的結(jié)果符合預(yù)期。

          結(jié)語

          小伙伴們,看到這里,你們有什么感受呢?這個東西,著實讓豆茉君眼前一亮。它最具閃光點的地方在于:

          1)使用預(yù)設(shè)的提示詞(system_gen_system_prompt)+用戶輸入的任務(wù)目標(biāo)和案例描述,批量生成候選提示詞;

          2)使用預(yù)設(shè)的提示詞(ranking_system_prompt)+ EOL評分法,實現(xiàn)自動評分,選出最佳提示詞;

          這兩個閃光點,讓典型的ChatGTP流程實現(xiàn)了全過程自動化。

          它的優(yōu)勢在于:

          1)效率:變手動為自動,天下武功唯快不破。

          2)啟發(fā):現(xiàn)在我們不僅可以從ChatGPT輸出的答案中得到啟發(fā),也能從它寫的提示詞中得到啟發(fā)。刷一波提示詞,看看好的好在哪,差的差在哪。

          3)可調(diào):兩個程序預(yù)設(shè)提示詞、任務(wù)目標(biāo)和案例描述都是可以被優(yōu)化的。另外,模型版本、超參數(shù)、回復(fù)的最大token數(shù)、案例數(shù)量、候選提示詞數(shù)量都是可以自定義的。

          這種自動化的思路,可以把我們的計算機變成一個“煉丹爐”。這其實跟其他機器學(xué)習(xí)沒有什么區(qū)別,唯一的迷惑點在于,作為一個API,ChatGPT的輸入輸出都太自然語言了,以至于有時候傻傻分不清楚。由于這個API沒有邊界,輸入和輸出的內(nèi)容本身不是高度結(jié)構(gòu)化的,這里面的玩法就多了,同時帶來的是數(shù)不清的可能性。

          就如同生產(chǎn)線自動化生產(chǎn)顯卡,但生產(chǎn)線還是要被人設(shè)計和組裝一樣,如何充分運用自動化帶來的效率,調(diào)教它,讓它批量產(chǎn)出富有價值、高質(zhì)量的提示詞,也需要“煉金師”們大開腦洞、絞盡腦汁。相較于手動流程,它雖然帶來了效率的提高,但同時帶來的是候選提示詞的爆炸和更加不可控的因素。這些問題,在進行提示詞交付的時候,都可能帶來更多的麻煩。


          瀏覽 419
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  午夜爱爱爱 | 欧美精品一区二区三区四区 | 免费久久女人-级毛片视频 | 手机在线免费看黄色电影一级片 | 国产对白视频在线观看 |