संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
आपके ऐप्लिकेशन के ब्लूप्रिंट की परफ़ॉर्मेंस और जनरेट किए गए कोड की क्वालिटी, आपके प्रॉम्प्ट की जानकारी और उसके ब्यौरे पर निर्भर करती है. App Prototyping agent का इस्तेमाल करते समय, ऐप्लिकेशन जनरेट करने और डीबग करने के लिए, असरदार प्रॉम्प्ट बनाने से जुड़े इन दिशा-निर्देशों का पालन करें:
ज़्यादा जानकारी दें: अपने ऐप्लिकेशन की सुविधाओं, उपयोगकर्ता के इंटरैक्शन, और डेटा से जुड़ी ज़रूरी शर्तों के बारे में साफ़ तौर पर बताएं. जहां हो सके, खास टेक्नोलॉजी के बारे में पूछें. उदाहरण के लिए, अगर आपको 3D एलिमेंट वाला वेब ऐप्लिकेशन बनाना है, तो Gemini से three.js का इस्तेमाल करने के लिए कहा जा सकता है.
सेवाएं सेट अप करने के लिए, अतिरिक्त टास्क के बारे में पूछें:Gemini आपके ऐप्लिकेशन के लिए कोड लिख सकता है. हालांकि, यह सेवाएं सेट अप नहीं कर सकता, एपीआई चालू नहीं कर सकता या संसाधन उपलब्ध नहीं करा सकता. जैसे, Cloud Storage बकेट या Stripe खाता.
Gemini को यह बताना न भूलें कि अगर वह किसी खास सेवा के लिए कोड लिखता है, तो उसे आपको यह भी बताना चाहिए कि उन सेवाओं को कैसे सेट अप किया जाए.
Firebase प्रोजेक्ट का अनुरोध करना: अगर आपने App Prototyping agent से Firebase सेवाएं सेट अप करने में मदद मांगी है, तो यह आपकी ओर से एक Firebase प्रोजेक्ट उपलब्ध कराएगा. उदाहरण के लिए, "Firestore जोड़ने में मेरी मदद करो" या "मेरे ऐप्लिकेशन को Firebase से कनेक्ट करो" कहा जा सकता है.
अपने प्रॉम्प्ट को बेहतर बनाने के लिए, Gemini का इस्तेमाल करें: अपने प्रॉम्प्ट को बेहतर बनाने और उसे ऑप्टिमाइज़ करने के लिए, Gemini for
Google,
Firebase में Gemini से चैट करें, Code व्यू या अन्य Gemini प्लैटफ़ॉर्म का इस्तेमाल करें.
संदर्भ दें: अपने ऐप्लिकेशन के मकसद, टारगेट ऑडियंस, और उपयोगकर्ता अनुभव के बारे में बैकग्राउंड की जानकारी शामिल करें.
उदाहरणों का इस्तेमाल करें: अगर हो सके, तो उदाहरण दें कि उपयोगकर्ताओं को ऐप्लिकेशन के साथ कैसे इंटरैक्ट करना चाहिए या कौन सा डेटा दिखाया जाना चाहिए.
दोहराएं और बेहतर बनाएं: डेवलपमेंट को दोहराएं और बेहतर बनाएं. हमारा सुझाव है कि आप सबसे पहले एक सामान्य अनुरोध करें. इसके बाद, उसमें कोई सुविधा जोड़ें, उसे आज़माएं, और उसमें सुधार करें. इसके बाद, कोई दूसरी सुविधा जोड़ें.
इन दिशा-निर्देशों का पालन करके, Firebase Studio से जनरेट किए गए ऐप्लिकेशन के ब्लूप्रिंट की क्वालिटी और काम के होने की संभावना को बेहतर बनाया जा सकता है. साथ ही, ऐप्लिकेशन को डीबग करते समय, Firebase Studio के काम करने की संभावना को भी बेहतर बनाया जा सकता है.
जवाबों को बेहतर बनाने के लिए, अन्य प्रॉम्प्ट का इस्तेमाल करना
अगर शुरुआती नतीजे आपकी उम्मीद के मुताबिक नहीं हैं, तो ज़्यादा जानकारी जोड़कर या खास निर्देश देकर अपने प्रॉम्प्ट को बेहतर बनाया जा सकता है:
पाबंदियां जोड़ें: यूज़र इंटरफ़ेस (यूआई), डेटा मॉडल या सुविधाओं पर पाबंदियां तय करें.
उदाहरण दें: उदाहरण दें कि उपयोगकर्ताओं को ऐप्लिकेशन के साथ कैसे इंटरैक्ट करना चाहिए और कौनसा डेटा दिखना चाहिए.
कीवर्ड का इस्तेमाल करें: कीवर्ड का इस्तेमाल करके, उन सुविधाओं या क्षमताओं के बारे में बताएं जो आपको चाहिए. इससे एलएलएम को यह समझने में मदद मिलेगी कि आपको किस तरह का आउटपुट चाहिए. उदाहरण के लिए, किसी ऐसे प्रॉम्प्ट में Material Design का इस्तेमाल किया जा सकता है जिसमें यह बताया गया हो कि आपको अपने ऐप्लिकेशन को Google के डिज़ाइन स्टैंडर्ड के मुताबिक बनाना है.
खास बदलावों के लिए अनुरोध करना: जनरेट किए गए कोड या ब्लूप्रिंट में खास बदलाव करने के लिए अनुरोध करें. हर सुविधा के अनुरोध को अलग-अलग अनुरोध में जोड़ें.
मॉडल से जवाब के बारे में तर्क देने के लिए कहें: अगर आपको अपनी पसंद के नतीजे नहीं मिल रहे हैं, तो मॉडल से प्रॉम्प्ट के बारे में तर्क देने के लिए कहें. उदाहरण के लिए, "एक-एक करके सोचो. मुझे अपने टास्क ऐप्लिकेशन के लिए एक इनपुट बॉक्स बनाना है. इसमें 'टास्क जोड़ें' बटन और 'रद्द करें' बटन होना चाहिए."
इन तकनीकों का इस्तेमाल करके, अपने प्रॉम्प्ट को बार-बार बेहतर बनाया जा सकता है, ताकि आपको मनमुताबिक नतीजे मिल सकें.
ऐप्लिकेशन ब्लूप्रिंट के लिए असरदार प्रॉम्प्ट के उदाहरण
यहां अलग-अलग तरह के ऐप्लिकेशन के लिए, असरदार प्रॉम्प्ट के कुछ उदाहरण दिए गए हैं:
सामान्य टास्क ट्रैकर:
Create a simple web app that displays a list of to-do items.
Users should be able to add new items to the list and mark items as complete.
Provide a way to delete items and export the list as a text file.
Use a clean and modern UI using Google Material Design principles.
बजट बनाने वाला ऐप्लिकेशन:
A budgeting and expense tracking app with spending categories, charts, and
budget goals. Include a clean dashboard with key insights. It should include
spending categories, charts, and budget goals. The app should allow users to
manually add expenses or upload csv files. The app should also allow users to
upload receipts, then use AI to convert the receipt into an expense entry that
users can edit. Data should be stored in browser cache, with download and
delete options.
Gemini (मार्कडाउन) की मदद से गेम ऐप्लिकेशन का प्रॉम्प्ट:
Generate a delightful sliding number puzzle game (15-puzzle) with Javascript,
HTML, and CSS.
-**Setup:** Create a 4x4 grid with numbers 1-15 and one empty space. Use a
**solvable shuffling algorithm** to randomize the start.
-**Gameplay:** Allow clicking tiles **adjacent to the empty space** to slide
them. Count and display the number of moves.
-**Timer:** Include a **countdown timer** starting at **120 seconds**
(2 minutes).
-**End Conditions:**-If solved (numbers 1-15 in order): Alert with an encouraging winning
statement generated by AI.
-If timer reaches 0: Alert with a funny retort generated by AI.
डीबग करने के लिए सलाह
Firebase में Gemini का इस्तेमाल करके, अपने कोड की गड़बड़ियों को ठीक किया जा सकता है. इसके लिए, Code वर्कस्पेस या App Prototyping agent में चैट करें.
Gemini आपके लिए कोड लिख सकता है. हालांकि, कभी-कभी इसमें गड़बड़ियां भी हो सकती हैं. गड़बड़ी का पता चलने पर, यह उसे ठीक करने की कोशिश करेगा. अगर आपको लगता है कि गड़बड़ी के मैसेज के हिसाब से समस्या हल नहीं हो रही है, तो यहां दिए गए कुछ तरीके आज़माएं:
समस्या के बारे में बताएं: चैट इंटरफ़ेस में, आपको जो समस्या आ रही है उसके बारे में साफ़ तौर पर और कम शब्दों में बताएं.
Gemini के पास गड़बड़ी के मैसेज और लॉग जैसे कॉन्टेक्स्ट का ऐक्सेस हो सकता है. हालांकि, हो सकता है कि वह पूरे कॉन्टेक्स्ट को न समझ पाए. गड़बड़ी के मैसेज के साथ-साथ, समस्या के बारे में जानकारी देने से Gemini को गड़बड़ियां ठीक करने में मदद मिल सकती है.
खास सवाल पूछें: अपने कोड के बारे में Gemini
सीधे सवाल पूछने में न हिचकिचाएं. उदाहरण के लिए, "इस फ़ंक्शन में नल पॉइंटर एक्सेप्शन की वजह क्या हो सकती है?" या "मैं इस रेस कंडीशन को कैसे रोकूं?"
मुश्किल समस्याओं को छोटे-छोटे हिस्सों में बांटें: अगर आपको किसी मुश्किल समस्या का सामना करना पड़ रहा है, तो उसे छोटे-छोटे और आसान हिस्सों में बांटें. Gemini से हर हिस्से को अलग-अलग डीबग करने के लिए कहें. साथ ही, समस्याओं के बारे में सिलसिलेवार तरीके से सोचने के लिए कहें.
कोड फ़ेंस का इस्तेमाल करें: कोड स्निपेट शेयर करते समय, कोड फ़ेंस का इस्तेमाल करें. इससे यह पक्का किया जा सकता है कि कोड को सही तरीके से फ़ॉर्मैट किया गया है. इससे Gemini को आपके कोड को पढ़ने और समझने में आसानी होती है.
दोहराएं और बेहतर बनाएं: ऐसा हो सकता है कि Gemini पहली बार में सही जवाब न दे. जवाबों की समीक्षा करें, सवाल पूछें, और ज़रूरत के मुताबिक ज़्यादा जानकारी दें.
प्रॉम्प्ट के लूप से बचें: अगर Gemini किसी लूप में फंस जाता है या आपके सवाल का जवाब नहीं दे पाता है, तो अपने प्रॉम्प्ट को अलग तरीके से लिखें या ज़्यादा जानकारी दें. कभी-कभी, अपने सवाल को दूसरे शब्दों में पूछने से, Gemini को यह समझने में मदद मिल सकती है कि आपको क्या जानकारी चाहिए.
अगर प्रॉम्प्ट को फिर से लिखने पर भी लूप की समस्या ठीक नहीं होती है, तो ये तरीके आज़माएं:
नई चैट शुरू करें: अगर Code
Workspace में Firebase
चैट में Gemini का इस्तेमाल किया जा रहा है, तो Gemini
के कॉन्टेक्स्ट को रीसेट करने के लिए, नया चैट सेशन शुरू करें. इससे Gemini को पिछली बातचीत में हुई किसी भी गलतफ़हमी या अनुमान से छुटकारा मिल सकता है.
ऐसे उदाहरण दें जो Gemini के अनुमानों से अलग हों: अगर Gemini गलत अनुमान लगा रहा है, तो ऐसे उदाहरण दें जो Gemini के अनुमानों से अलग हों. इससे Gemini को सही व्यवहार समझने में मदद मिलेगी.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["The effectiveness of your app blueprint and the quality of the generated code\ndepend on the clarity and detail of your prompts. When using\nthe App Prototyping agent, consider the following guidelines for effective\nprompting when generating and debugging apps:\n\n- **Be specific:** Clearly define the features, user interactions, and data requirements of your app. Ask for specific technologies, where possible. For example, if trying to create a web app with 3D elements, you may want to ask Gemini to use `three.js`.\n- **Ask about additional tasks to set up services:** Gemini can write code for your app, but it cannot actually set up services, enable APIs, or provision resources (like a Cloud Storage bucket or a Stripe account). Make sure to tell Gemini that if it writes code for specific services that it should also tell you how to set up those services.\n- **Request a Firebase project:** If you ask the App Prototyping agent to help you set up Firebase services, it will provision a Firebase project on your behalf. For example, you can ask \"Help me add Firestore,\" or \"Connect my app to Firebase.\"\n- **Use Gemini to refine your prompt:** Use [Gemini for\n Google](https://gemini.google.com), [chat with\n Gemini in Firebase](/docs/studio/try-gemini) in Code view, or other Gemini surfaces to refine and optimize your prompt.\n- **Provide context:** Include background information about your app's purpose, target audience, and the user experience you want.\n- **Use examples:** If possible, provide examples of how users should interact with the app or what data should be displayed.\n- **Iterate and refine:** Approach your development *iteratively*. Consider starting with a basic request, then add a feature, test it, refine it, then add another feature.\n\nBy following these guidelines, you can significantly improve the quality and\nrelevance of the app blueprints generated by Firebase Studio and its\nsuccess when debugging your app.\n\nUse additional prompts to refine responses\n\nIf the initial results aren't what you expect, you can refine your prompts by\nadding more detail or providing specific instructions:\n\n- **Add constraints:** Specify constraints on the UI, data model, or features.\n- **Provide examples:** Provide examples of how users should interact with the app and what data should appear.\n- **Use keywords:** Use keywords to describe the features or capabilities you want that the LLM might associate with the class of output you want. For example, you might use *Material Design* in a prompt where you indicate that you want your app to adhere to Google design standards.\n- **Ask for specific changes:** Ask for specific changes to the generated code or blueprint. Add each feature request in a separate request.\n- **Ask the model to reason:** If you're having trouble getting the results you want, try asking the model to reason through the prompt. For example, you could say \"Think step by step. I want to create an input box for my task app. It should contain an 'Add task' button and a 'Cancel' button.\"\n\nBy using these techniques, you can iteratively refine your prompts to get the\nresults you want.\n\nExamples of effective prompts for app blueprints\n\nHere are some examples of effective prompts for different types of apps:\n\n**Simple task tracker:** \n\n Create a simple web app that displays a list of to-do items.\n Users should be able to add new items to the list and mark items as complete.\n Provide a way to delete items and export the list as a text file.\n Use a clean and modern UI using Google Material Design principles.\n\n**Budgeting app:** \n\n A budgeting and expense tracking app with spending categories, charts, and\n budget goals. Include a clean dashboard with key insights. It should include\n spending categories, charts, and budget goals. The app should allow users to\n manually add expenses or upload csv files. The app should also allow users to\n upload receipts, then use AI to convert the receipt into an expense entry that\n users can edit. Data should be stored in browser cache, with download and\n delete options.\n\n**Game app prompt with assistance from Gemini (Markdown):** \n\n Generate a delightful sliding number puzzle game (15-puzzle) with Javascript,\n HTML, and CSS.\n\n - **Setup:** Create a 4x4 grid with numbers 1-15 and one empty space. Use a\n **solvable shuffling algorithm** to randomize the start.\n - **Gameplay:** Allow clicking tiles **adjacent to the empty space** to slide\n them. Count and display the number of moves.\n - **Timer:** Include a **countdown timer** starting at **120 seconds**\n (2 minutes).\n - **End Conditions:**\n - If solved (numbers 1-15 in order): Alert with an encouraging winning\n statement generated by AI.\n - If timer reaches 0: Alert with a funny retort generated by AI.\n\nTips for debugging\n\nYou can use Gemini in Firebase to help you debug your code with\nchat in your **Code** workspace\nor the App Prototyping agent.\n\nWhile Gemini can write code for you, it might sometimes also\nproduce errors. When it detects an error, it will attempt\nto fix it. If you find that it isn't able to resolve the issue given\nthe error message, you can try some of the following techniques:\n\n- **Describe the issue:** In the chat interface, describe the\n problem you're encountering as clearly and concisely as possible.\n While Gemini might have access to context like error messages\n and logs, it might not understand the full context. Describing the behavior\n along with the error message can help Gemini fix errors\n faster.\n\n- **Ask specific questions:** Don't be afraid to ask Gemini\n direct questions about your code. For example, \"What could be causing a\n null pointer exception in this function?\" or \"How can I prevent\n this race condition?\"\n\n- **Break down complex problems:** If you're dealing with a complex\n issue, break it down into smaller, more manageable parts. Ask\n Gemini to help you debug each part separately and think\n through problems step-by-step.\n\n- **Use code fences:** When sharing code snippets, use code fences\n to ensure that the code is properly formatted. This makes it easier\n for Gemini to read and understand your code.\n\n- **Iterate and refine:** Gemini may not always provide the perfect\n solution on the first try. Review the responses, ask clarifying\n questions, and provide additional information as needed.\n\n- **Avoid prompting loops:** If Gemini gets stuck in a loop or is\n unable to answer your question, try rephrasing your prompt or\n providing additional context. Sometimes, just rewording your\n question can help Gemini understand what you're asking.\n\n If rephrasing your prompt doesn't resolve the loop, try\n the following techniques:\n - **Start a new chat:** If you're using Gemini in Firebase\n chat in your Code\n workspace, start a new chat session to reset\n Gemini's context. This can help break free from any\n misconceptions or assumptions that Gemini may have made\n in the previous conversation.\n\n - **Provide counter-examples:** If Gemini is making incorrect\n assumptions, provide counter-examples to help it understand\n the correct behavior.\n\nNext steps\n\n- [Get started with the App Prototyping agent](/docs/studio/get-started-ai).\n- [Develop, publish, and monitor an app following a guided tour of the App Prototyping agent](/docs/studio/solution-build-with-ai).\n- [Develop applications in a\n Firebase Studio workspace](/docs/studio/get-started-workspace)."]]