व्यवसाय GPT के लिए विभिन्न उपयोग मामलों की कल्पना करते हैं, जिनमें से कुछ GPT और उपयोगकर्ता के बीच खुले संचार पर निर्भर करते हैं।
उदाहरण के लिए इन उपकरणों को लें:
चैटस्पॉट। नेचुरल लैंग्वेज क्वेरी चैटस्पॉट एपीआई में जाती है और हबस्पॉट सीआरएम एपीआई, गूगल डॉक्स एपीआई, आदि के लिए संचालन में तब्दील हो जाती है, फिर एक जनरेटिव टेक्स्ट मॉडल का उपयोग करके जवाब देती है जब कार्रवाई की गई हो (या नहीं)। जीपीटी-4 आधारित।
खानमिगो। खान अकादमी की एआई-पावर्ड गाइड। उपयोगकर्ता के अनुरोध अंतःक्षेपित संदर्भ के साथ संकेतों में रूपांतरित हो जाते हैं। सिस्टम आठ गुना अधिक इंजेक्ट किए गए संदर्भ को संभालने के लिए GPT की क्षमता पर निर्भर करता है। जीपीटी-4 आधारित।
आपको तथ्यों के बीच बहुत सी गलत जानकारी मिलेगी:
बड़े भाषा मॉडल का ट्रांसफॉर्मर आर्किटेक्चर इनपुट डेटा में लंबी दूरी की निर्भरता को पकड़ने के लिए ध्यान तंत्र और आत्म-ध्यान पर निर्भर करता है। जबकि यह मॉडल को सुसंगत और प्रासंगिक-प्रासंगिक पाठ उत्पन्न करने के लिए सशक्त बनाता है, यह तथ्यात्मक सटीकता की गारंटी नहीं देता है । इसके अतिरिक्त, प्रशिक्षण डेटा में पूर्वाग्रह या गलत सूचना हो सकती है जिसे मॉडल अनजाने में सीख सकता है और इस प्रकार एआई मतिभ्रम में योगदान कर सकता है।
विश्वसनीयता की इस कमी का एक कारण GPT की संभाव्य प्रकृति में पाया जा सकता है। संदर्भ के लिए, आइए एक पल के लिए संभावित डेटा संरचनाओं की जांच करें, जैसे ब्लूम फ़िल्टर। ब्लूम फ़िल्टर एक संभाव्य डेटा संरचना है जिसका उपयोग यह परीक्षण करने के लिए किया जाता है कि क्या कोई तत्व एक सेट का सदस्य है जिसमें बिट्स और कई हैश फ़ंक्शन शामिल हैं, जिनमें से प्रत्येक एक तत्व को एक या अधिक सरणी सूचकांकों में मैप करता है।
इन शमनों ने GPT-3.5 की तुलना में GPT-4 के सुरक्षा गुणों में काफी सुधार किया है, मॉडल की अस्वीकृत सामग्री के अनुरोधों का जवाब देने की प्रवृत्ति में 82% की कमी आई है और नीतियों के अनुसार संवेदनशील अनुरोधों का जवाब देने वाले मॉडल में 29% की वृद्धि हुई है। [ ]
शीघ्र इंजीनियरिंग
संकेतों में सुधार कार्य प्रदर्शन को बढ़ा सकता है, जिसके परिणामस्वरूप लगभग 50% से 65% समय में संतोषजनक परिणाम मिलते हैं, लेकिन प्रदर्शन बार-बार इस सीमा से अधिक नहीं हो सकता है।
अध्ययन ने प्रदर्शित किया कि प्रत्येक उत्तर से पहले " लेट्स थिंक स्टेप बाय स्टेप " जैसे एक सरल वाक्यांश को जोड़ने से GPT को एक सभ्य शून्य-शॉट रीजनर में बदलने में सक्षम होता है, बिना हाथ की आवश्यकता के विभिन्न बेंचमार्क रीजनिंग कार्यों के खिलाफ शून्य-शॉट एलएलएम प्रदर्शन को बेहतर बनाता है- तैयार किए गए कुछ-शॉट उदाहरण।
GitHub Copilot और दोनों ही अपने कार्यान्वयन में इस पर बहुत अधिक निर्भर हैं। लिखे जा रहे कोड के संदर्भ में, किसी भी टिप्पणी या दस्तावेज़ीकरण के साथ, ये कोडिंग सहायक कोड की इच्छित कार्यक्षमता और बाधाओं को समझने में सक्षम हैं।
# Define the context and question context = ''' Last week we heard of the failure of the Silicon Valley Bank (SVB). And it is the 2nd largest bank to shut down in the US since 2000. While that is sad, miserable, and pathetic, I want to show you something under the hood — the real reason the bank failed. ''' question = "What is the reason for the failure of Silicon Valley Bank and when did it happen?" # Define prompts with and without context prompt_without_context = question prompt_with_context = f'''Context: """{context}""" Instructions: Using the provided context, write a comprehensive reply to the given query. Query: {question}''' # List of prompts to iterate over prompts = [ {"name": "Without context", "prompt": prompt_without_context}, {"name": "With context", "prompt": prompt_with_context}, ] for prompt_info in prompts: print(f"--- {prompt_info['name']} ---") print(f"Prompt: {prompt_info['prompt']}") response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": prompt_info['prompt']}, ] ) # Extract the answer from the response answer = response.choices[0].message.content.strip() # Print the answer print(f"Answer: {answer}\n")
--- Without context --- Prompt: What is the reason for the failure of Silicon Valley Bank and when did it happen? Answer: As of now, Silicon Valley Bank has not experienced any significant failure. Silicon Valley Bank, founded in 1983, is a successful and high-performing financial institution that specializes in offering banking services to technology and life science companies and venture capital firms. The bank has grown consistently and continues to operate effectively, serving its clients and staying relevant in the industry.
--- With context --- Prompt: Context: """ Last week we heard of the failure of the Silicon Valley Bank (SVB). And it is the 2nd largest bank to shut down in the US since 2000. While that is sad, miserable, and pathetic, I want to show you something under the hood — the real reason the bank failed. """ Instructions: Using the provided context, write a comprehensive reply to the given query. Query: What is the reason for the failure of Silicon Valley Bank and when did it happen? Answer: Silicon Valley Bank (SVB) failed last week, making it the 2nd largest bank to shut down in the US since 2000. The precise reasons behind the bank's failure have not been provided in the given context, but it is implied that there is a significant underlying cause for its collapse. To fully understand the situation, it would be helpful to obtain more information about the bank's performance, financial stability, and any recent events that may have contributed to the failure.
यहाँ कुछ नमूना परिणाम दिए गए हैं:
निम्नलिखित आरेख पर विचार करें:
प्रक्रिया में ये घटक शामिल हैं:
उदाहरण के लिए, मैं अक्सर वेब एप्लिकेशन बनाने के लिए नेक्स्ट.जेएस का उपयोग करता हूं, और 2022 में नेक्स्ट.जेएस संस्करण 13 जारी किया। इसे सत्यापित करने के लिए, आइए चैटजीपीटी से नेक्स्ट.जेएस 13 की रिलीज की तारीख के बारे में पूछें और देखें कि यह किस जानकारी को खींच सकता है। विषय:
यहाँ एक कोड नमूना है:
def generate_qa(filepath): article = read_file(filepath)[:MAX_CONTENT_LENGTH] content = f'''Content for {filepath}: {article} Instructions: Generate question and answer based on Content for {filepath}. Structure it as: Q: <question> A: <answer> ''' questions_answers = [] response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "You are a helpful software developer who specialize in next.js and react."}, {"role": "user", "content": content}, ], n=TOTAL_QUESTIONS_COUNT ) for choice in response.choices: qa = extract_qa_from_content(choice.message.content.strip()) questions_answers.extend(qa) return questions_answers
आउटपुट को में सेव किया जाना चाहिए
कोड नमूना:
NON_NEXTJS_Q_A_PROMPT = """Create a series of random questions and answers that are not related to the Next.js framework. Each question should be followed by a clear answer stating that it is not relevant to Next.js. For example: <question>What is the capital of Ukraine?</question> <answer>This question is not related to Next.js.</answer> <question>What is Spring Framework?</question> <answer>It is not related to Next.js.</answer> Feel free to generate any type of questions you like, as long as the answer indicates that it is not related to the Next.js framework.""" def generate_random_qa(prompt): questions_answers = [] response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "You are a helpful software developer who specialize in next.js and react."}, {"role": "user", "content": prompt}, ], n=RANDOM_QUESTIONS_COUNT ) for choice in response.choices: qa = extract_qa_from_content(choice.message.content.strip()) questions_answers.extend(qa) return questions_answers
मैंने मॉडल को दिखाने के लिए 100 प्रश्न और उत्तर उत्पन्न किए कि हम चाहते हैं कि यह केवल Next.js से संबंधित किसी भी प्रश्न का उत्तर दे और मतिभ्रम को कम करने के लिए "मुझे नहीं पता" का उत्तर देना पूरी तरह से ठीक है। परिणामी प्रशिक्षण डेटासेट यहाँ सूचीबद्ध है
अफसोस की बात है कि ऐसे कई मॉडल नहीं हैं जिनसे हम फ़ाइन-ट्यून कर सकें। आप सभी मॉडलों की एक सूची openai api models.list' with '“allow_fine_tuning”: true,
खींचकर देख सकते हैं।
याद रखें कि हम पाठ पूर्णता मॉडल के साथ काम कर रहे हैं, न कि चैट या निर्देश मॉडल के साथ। और हमारे पाठ पूर्णता मॉडल को उत्तर प्रारूप का उपयोग करके प्रतिक्रिया देने के लिए ट्यून किया गया है। साथ ही, हमारा मॉडल इनपुट प्रॉम्प्ट के समाप्त होने की प्रतीक्षा करता है ?\n\n###\n\n
। यदि नहीं, तो आउटपुट अनपेक्षित हो सकता है, लेकिन सबसे अधिक संभावना है कि मॉडल प्रॉम्प्ट टर्मिनेटर के साथ प्रॉम्प्ट को पूरा करने के लिए कुछ सामग्री उत्पन्न करने का प्रयास करेगा।
proper_questions = [ "When Next.js 13 was released?", "Is Next.js 14 already released?", "How Next.js 13 is different from Next.js 12?", "How routing is different in Next.js 13 compared to Next.js 12?", "How to prevent Next.js file component from using React Server Components?", "What is Turbopack?" ]
मैंने इन सवालों पर तापमान = 0.3 के साथ दो मॉडल रन किए।
सही उत्तरों की सूची:
#1 Q: When Next.js 13 was released? A: Next.js 13 was released on October 2022. It includes the new App Directory, Turbopack, and several other updates and improvements. #3 Q: How Next.js 13 is different from Next.js 12? A: Next.js 13 has been rebuilt from the ground up to be faster and more reliable. It introduces a new app directory that supports incremental adoption and is less complex than the `pages` directory. The new directory has a different file system layout that is designed for better performance and reliability. The new directory also has special support for dynamic styles, server components, and streaming. #4 Q: How routing is different in Next.js 13 compared to Next.js 12? A: In Next.js 13, the `app` directory replaces the `pages` directory. This means that routing is handled via the file path each `page.tsx` is located in. Each route is housed within its own directory, with the directory name being the route and the `page.tsx` being its index that gets rendered at that route.
आंशिक रूप से सही प्रतिक्रियाओं की सूची:
#2 Q: Is Next.js 14 already released? A: No, Next.js 14 is not released yet. It will be released in the coming months. #5 Q: How to prevent Next.js file component from using React Server Components? A: To prevent Next.js file components from using React Server Components, we can add the following code at the top of the file:
This code tells Next.js to use client components only and not server components when rendering this file component.
मैंने इन सवालों पर तापमान = 0.7 के साथ दो मॉडल रन किए।
सही उत्तरों की सूची:
#2 Q: Is Next.js 14 already released? A: No, Next.js 14 is not released yet. This blog post is about the new features coming to Next.js 13 with React 18. #3 Q: How Next.js 13 is different from Next.js 12? A: Next.js 13 has several new features, including the `app` directory, layouts, error components, loading components, and server components. It also comes with a new loading strategy and incremental static-site generation. #4 Q: How routing is different in Next.js 13 compared to Next.js 12? A: Routing in Next.js 13 no longer requires a `pages` directory. Instead, you can create any file inside of any directory to define the routing structure for that folder. Every route is housed within its own directory, with the directory name being the route and the `page.tsx` being its index render at that route. #5 Q: How to prevent Next.js file component from using React Server Components? A: To prevent Next.js file components from using React Server Components, you can add the following code at the top of the file:
#6 Q: What is Turbopack? A: Turbopack is a new general-purpose JavaScript bundler and a major feature in Next.js 13. It is intended as a Webpack replacement, and although it's released as alpha, you can use Turbopack now as the dev-mode bundler from Next.js 13 forward. Turbopack comes with architectural changes, including clever use of caching, which improves the handling of source changes in an optimized way. #1 Q: When Next.js 13 was released? A: Next.js 13 was released in October 2022. #2 Q: Is Next.js 14 already released? A: No. Next.js 14 is still in beta, but with the release of Next.js 13.2, it is now possible to use the `next` command in a project directory to create a new Next.js application using the latest version. #4 Q: How routing is different in Next.js 13 compared to Next.js 12? A: Routing in Next.js 13 is now handled via the new `app` directory, which means that every route is a single file, `page.js`. Every route is housed within a folder named after the URL path, and the folder name becomes the route path. For example, `app/profile/settings/page.js` is the file that controls the `/profile/settings` route. #5 Q: How to prevent Next.js file component from using React Server Components? A: To prevent Next.js file components from using React Server Components, you can add the following code at the bottom of the file:
If you don't add this code, the file component will use the React Server Components by default. #6 Q: What is Turbopack? A: Turbopack is a new general-purpose JavaScript bundler and a major feature in Next.js 13. Using the Turbopack alpha with Next.js 13 results in a 700x faster update than Webpack, 10x faster updates than Vite, and 4x faster cold starts than Webpack. Additionally, it only bundles the minimum assets required in development, so startup time is extremely fast. Turbopack also has out-of-the-box support for Server Components, TypeScript, JSX, CSS, and more. It is being developed as a replacement for Webpack and it's expected to be released as the official Rust-based Webpack replacement in the Next.js 13 stable release.
आंशिक रूप से सही प्रतिक्रियाओं की सूची:
#3 Q: How Next.js 13 is different from Next.js 12? A: Next.js 13 is different from Next.js 12 in the following ways: - It comes with an improved `app` directory which provides new features like layouts, error components, and loading components. - It introduces the `loading.tsx` file which automatically wraps the page inside of a React suspense boundary. - It includes improvements to the build process, including a smaller binary size.
गलत प्रतिक्रियाओं की सूची:
#1 Q: When Next.js 13 was released? A: Next.js 13 was released in November of 2020.
out_of_scope_questions = [ "What is the population of the United States?", "How to cook a steak?", "What is native vector database?", "Could you please generate a random number?", "What is a space-time continuum?", ]
सही उत्तरों की सूची:
#1 Q: What is the population of the United States? A: This question is not related to Next.js. #2 Q: How to cook a steak? A: This question is not related to Next.js. #5 Q: What is a space-time continuum? A: This question is not related to Next.js. #1 Q: What is the population of the United States? A: This question is not related to Next.js. #2 Q: How to cook a steak? A: I do not know. #5 Q: What is a space-time continuum? A: This question is not related to Next.js.
आंशिक रूप से सही प्रतिक्रियाओं की सूची:
#3 Q: What is native vector database? A: Native vector database is a new feature in Next.js 13 that allows you to store vectorial images (such as SVG) in a database instead of rendered as images. This feature is available in Next.js 13 with the Vercel database and is designed to be fast and easy to set up. #4 Q: Could you please generate a random number? A: Yes, I can generate a random number. #3 Q: What is native vector database? A: Native vector database is a new feature in Next.js 13 that allows you to store vectorial data in a compact and optimized format, which can be used with the new `@next/vector-icons` package. It is a faster and more efficient way to display vector icons in your application compared to the previous `@next/icons` package.
एक गलत प्रतिक्रिया:
#4 Q: Could you please generate a random number? A: Sure. Here you go:
एनपीएम रन जनरेट This will generate a random number in the range of 1 to 10.
not_questions = [ "Generate Next.js index page", "Suggest how no name next.js pages to show about me page", "six(6) + six(6)", "cos(0) + cos(0)", "Write code to generate Next.js index page", "Aaaaaughibbrgubugbugrguburgle!?", "Mmmm mrrrggk", ] process_questions(not_questions, is_accumulate = False)
सही उत्तरों की सूची:
#3 Q: six(6) + six(6) A: This is not a valid mathematical expression. #6 Q: Aaaaaughibbrgubugbugrguburgle!? A: I do not understand. #7 Q: Mmmm mrrrggk A: I do not understand. #6 Q: Aaaaaughibbrgubugbugrguburgle!? A: I have no idea what that means. #3 Q: six(6) + six(6) A: This is not a valid mathematical expression.
आंशिक रूप से सही प्रतिक्रियाओं की सूची:
#1 Q: Generate Next.js index page A: Generate a Next.js `index.js` file with the given directory path.
गलत प्रतिक्रियाओं की सूची:
#2 Q: Suggest how no name next.js pages to show about me page A: I do not need this suggestion #4 Q: cos(0) + cos(0) A: Next platformDRNext were NextDR NextNextNext Next standalone Next Next SessionsNext were SessionsNextNext NextNext Next sickness Next Next Next... #5 Q: Write code to generate Next.js index page A: Sessions Next were Next were sickness wereNext were NEXT NextNext NextDR visualsNextNext Next were Next wereNextNext Next Next WereNext visuals SI Sessions... #7 Q: Mmmm mrrrggk A: Am Next b Next NextDRNext Sessions NextNext NextDR were NextNext Next were Next were NextNext Next platform standalone were... #1 Q: Generate Next.js index page A: This command will generate an index.js file inside the `pages/` directory. You can then use this file to render the index page of your app. #2 Q: Suggest how no name next.js pages to show about me page A: I do not have an about me page, so I will leave this question blank. #4 Q: cos(0) + cos(0) A: This expression is not a constant expression. #5 Q: Write code to generate Next.js index page A: Next.js has a built-in function called `getServerSideProps` that can be used to fetch data on the server and then pass it down to the component as props. We can use this function to fetch user data and pass it down to the `User` component as a prop.
export default function User({ user }) { return <h1>User: {user.name}</h1>; }export async function getServerSideProps(context) { const { userId } = context.params; const res = await fetch(//api.example.com/users/${userId}); const user = await res.json();
OpenAI ने ओपन-सोर्स किया है
ओपनएआई इवल्स चैट और गैर-चैट मॉडल दोनों के साथ काम करता है, लेकिन चूंकि ओपनएआई चैट मॉडल पर ध्यान केंद्रित करता है, इसलिए आपको चैट-आधारित प्रारूप इनपुट में मूल्यांकन के लिए डेटासेट तैयार करने की आवश्यकता होगी। आज आप इसका प्रयोग शुरू कर सकते हैं
और कुछ अंतिम साधारण तथ्य जो ध्यान देने योग्य हैं: