কার্যকরী প্রম্পটিং
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আপনার অ্যাপ ব্লুপ্রিন্টের কার্যকারিতা এবং জেনারেট করা কোডের গুণমান আপনার প্রম্পটের স্পষ্টতা এবং বিশদ বিবরণের উপর নির্ভর করে। App Prototyping agent ব্যবহার করার সময়, অ্যাপ তৈরি এবং ডিবাগ করার সময় কার্যকর প্রম্পটিংয়ের জন্য নিম্নলিখিত নির্দেশিকাগুলি বিবেচনা করুন:
- সুনির্দিষ্ট হোন: আপনার অ্যাপের বৈশিষ্ট্য, ব্যবহারকারীর মিথস্ক্রিয়া এবং ডেটা প্রয়োজনীয়তাগুলি স্পষ্টভাবে সংজ্ঞায়িত করুন। নির্দিষ্ট প্রযুক্তির জন্য জিজ্ঞাসা করুন, যেখানে সম্ভব. উদাহরণস্বরূপ, যদি 3D উপাদান সহ একটি ওয়েব অ্যাপ তৈরি করার চেষ্টা করা হয়, তাহলে আপনি Gemini
three.js
ব্যবহার করতে চাইতে পারেন। - পরিষেবাগুলি সেট আপ করার জন্য অতিরিক্ত কাজগুলি সম্পর্কে জিজ্ঞাসা করুন: জেমিনি আপনার অ্যাপের জন্য কোড লিখতে পারে, তবে এটি আসলে পরিষেবাগুলি সেট আপ করতে, APIগুলি সক্ষম করতে বা সংস্থান সংস্থান করতে পারে না (যেমন একটি Cloud Storage বাকেট বা একটি স্ট্রাইপ অ্যাকাউন্ট)৷ মিথুনকে বলা নিশ্চিত করুন যে এটি যদি নির্দিষ্ট পরিষেবার জন্য কোড লেখে যে সেই পরিষেবাগুলি কীভাবে সেট আপ করতে হয় তাও আপনাকে জানাতে হবে।
- একটি ফায়ারবেস প্রকল্পের অনুরোধ করুন: আপনি যদি App Prototyping agent Firebase পরিষেবাগুলি সেট আপ করতে সাহায্য করতে বলেন, তাহলে এটি আপনার পক্ষ থেকে একটি Firebase প্রকল্পের ব্যবস্থা করবে৷ উদাহরণস্বরূপ, আপনি "আমাকে ফায়ারস্টোর যোগ করতে সাহায্য করুন" বা "আমার অ্যাপটিকে ফায়ারবেসের সাথে সংযুক্ত করুন" বলতে পারেন।
- আপনার প্রম্পটকে পরিমার্জিত করতে মিথুন ব্যবহার করুন: Google-এর জন্য Gemini ব্যবহার করুন, Code ভিউতে Firebase এ মিথুনের সাথে চ্যাট করুন , অথবা আপনার প্রম্পটকে পরিমার্জিত ও অপ্টিমাইজ করতে অন্যান্য মিথুন সারফেস ব্যবহার করুন৷
- প্রসঙ্গ প্রদান করুন: আপনার অ্যাপের উদ্দেশ্য, লক্ষ্য দর্শক এবং আপনি যে ব্যবহারকারীর অভিজ্ঞতা চান সে সম্পর্কে পটভূমি তথ্য অন্তর্ভুক্ত করুন।
- উদাহরণ ব্যবহার করুন: সম্ভব হলে, ব্যবহারকারীদের অ্যাপের সাথে কীভাবে ইন্টারঅ্যাক্ট করা উচিত বা কোন ডেটা প্রদর্শন করা উচিত তার উদাহরণ দিন।
- পুনরাবৃত্তি করুন এবং পরিমার্জন করুন: পুনরাবৃত্তিমূলকভাবে আপনার বিকাশের সাথে যোগাযোগ করুন। একটি মৌলিক অনুরোধের সাথে শুরু করার কথা বিবেচনা করুন, তারপর একটি বৈশিষ্ট্য যোগ করুন, এটি পরীক্ষা করুন, এটি পরিমার্জন করুন, তারপর অন্য একটি বৈশিষ্ট্য যোগ করুন৷
এই নির্দেশিকাগুলি অনুসরণ করে, আপনি Firebase Studio দ্বারা তৈরি অ্যাপ ব্লুপ্রিন্টগুলির গুণমান এবং প্রাসঙ্গিকতা এবং আপনার অ্যাপ ডিবাগ করার সময় এর সাফল্য উল্লেখযোগ্যভাবে উন্নত করতে পারেন।
প্রতিক্রিয়া পরিমার্জিত করতে অতিরিক্ত প্রম্পট ব্যবহার করুন
প্রাথমিক ফলাফলগুলি আপনার প্রত্যাশা অনুযায়ী না হলে, আপনি আরও বিশদ যোগ করে বা নির্দিষ্ট নির্দেশ প্রদান করে আপনার প্রম্পটগুলিকে পরিমার্জিত করতে পারেন:
- সীমাবদ্ধতা যোগ করুন: UI, ডেটা মডেল বা বৈশিষ্ট্যগুলিতে সীমাবদ্ধতাগুলি নির্দিষ্ট করুন।
- উদাহরণ প্রদান করুন: ব্যবহারকারীদের অ্যাপের সাথে কীভাবে ইন্টারঅ্যাক্ট করা উচিত এবং কোন ডেটা উপস্থিত হওয়া উচিত তার উদাহরণ প্রদান করুন।
- কীওয়ার্ড ব্যবহার করুন: আপনি যে বৈশিষ্ট্যগুলি বা ক্ষমতাগুলি চান তা বর্ণনা করতে কীওয়ার্ডগুলি ব্যবহার করুন যা LLM আপনার পছন্দের আউটপুটের ক্লাসের সাথে যুক্ত হতে পারে। উদাহরণস্বরূপ, আপনি একটি প্রম্পটে ম্যাটেরিয়াল ডিজাইন ব্যবহার করতে পারেন যেখানে আপনি ইঙ্গিত করেন যে আপনি চান যে আপনার অ্যাপটি 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.
জেমিনি (মার্কডাউন) এর সহায়তায় গেম অ্যাপ প্রম্পট:
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.
ডিবাগিং জন্য টিপস
আপনার Code ওয়ার্কস্পেস বা App Prototyping agent চ্যাটের মাধ্যমে আপনার কোড ডিবাগ করতে আপনি Firebase এ Gemini ব্যবহার করতে পারেন।
যদিও মিথুন আপনার জন্য কোড লিখতে পারে, এটি কখনও কখনও ত্রুটিও তৈরি করতে পারে। যখন এটি একটি ত্রুটি সনাক্ত করে, এটি এটি ঠিক করার চেষ্টা করবে। আপনি যদি খুঁজে পান যে এটি ত্রুটি বার্তা দেওয়া সমস্যাটি সমাধান করতে সক্ষম নয়, আপনি নিম্নলিখিত কিছু কৌশল চেষ্টা করতে পারেন:
সমস্যাটি বর্ণনা করুন: চ্যাট ইন্টারফেসে, আপনি যে সমস্যার সম্মুখীন হচ্ছেন তা যতটা সম্ভব স্পষ্টভাবে এবং সংক্ষিপ্তভাবে বর্ণনা করুন। যদিও মিথুনের কাছে ত্রুটির বার্তা এবং লগের মতো প্রসঙ্গে অ্যাক্সেস থাকতে পারে, তবে এটি সম্পূর্ণ প্রসঙ্গ বুঝতে নাও পারে। ত্রুটি বার্তা সহ আচরণ বর্ণনা করা মিথুনকে দ্রুত ত্রুটিগুলি ঠিক করতে সহায়তা করতে পারে।
নির্দিষ্ট প্রশ্ন জিজ্ঞাসা করুন: আপনার কোড সম্পর্কে জেমিনিকে সরাসরি প্রশ্ন জিজ্ঞাসা করতে ভয় পাবেন না। উদাহরণস্বরূপ, "এই ফাংশনে একটি নাল পয়েন্টার ব্যতিক্রমের কারণ হতে পারে?" বা "কিভাবে আমি এই রেসের অবস্থা প্রতিরোধ করতে পারি?"
জটিল সমস্যাগুলি ভেঙে দিন: আপনি যদি কোনও জটিল সমস্যা নিয়ে কাজ করেন তবে এটিকে আরও ছোট, আরও পরিচালনাযোগ্য অংশে ভাগ করুন। প্রতিটি অংশকে আলাদাভাবে ডিবাগ করতে এবং ধাপে ধাপে সমস্যার সমাধান করতে সাহায্য করতে মিথুনকে বলুন।
কোডের বেড়া ব্যবহার করুন: কোড স্নিপেট শেয়ার করার সময়, কোডটি সঠিকভাবে ফরম্যাট করা হয়েছে তা নিশ্চিত করতে কোডের বেড়া ব্যবহার করুন। এটি মিথুনের পক্ষে আপনার কোড পড়া এবং বোঝা সহজ করে তোলে।
পুনরাবৃত্তি করুন এবং পরিমার্জন করুন: মিথুন সর্বদা প্রথম চেষ্টায় নিখুঁত সমাধান প্রদান করতে পারে না। প্রতিক্রিয়াগুলি পর্যালোচনা করুন, স্পষ্ট প্রশ্ন জিজ্ঞাসা করুন এবং প্রয়োজনে অতিরিক্ত তথ্য প্রদান করুন।
প্রম্পট লুপ এড়িয়ে চলুন: মিথুন যদি একটি লুপে আটকে যায় বা আপনার প্রশ্নের উত্তর দিতে অক্ষম হয়, তাহলে আপনার প্রম্পটটি পুনরায় বলার চেষ্টা করুন বা অতিরিক্ত প্রসঙ্গ প্রদান করুন। কখনও কখনও, শুধুমাত্র আপনার প্রশ্ন পুনরায় লিখলে আপনি কি জিজ্ঞাসা করছেন তা বুঝতে মিথুনকে সাহায্য করতে পারে।
যদি আপনার প্রম্পট রিফ্রেসিং লুপের সমাধান না করে, তাহলে নিম্নলিখিত কৌশলগুলি চেষ্টা করুন:
একটি নতুন চ্যাট শুরু করুন: আপনি যদি আপনার Code ওয়ার্কস্পেসে Firebase চ্যাটে জেমিনি ব্যবহার করে থাকেন, তাহলে মিথুনের প্রসঙ্গ পুনরায় সেট করতে একটি নতুন চ্যাট সেশন শুরু করুন৷ এটি মিথুন পূর্ববর্তী কথোপকথনে যে কোনো ভুল ধারণা বা অনুমান থেকে মুক্ত হতে সাহায্য করতে পারে।
পাল্টা-উদাহরণ প্রদান করুন: মিথুন যদি ভুল অনুমান করে থাকে, তাহলে তাকে সঠিক আচরণ বুঝতে সাহায্য করার জন্য পাল্টা-উদাহরণ দিন।
পরবর্তী পদক্ষেপ
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 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)."]]