با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
وقتی آماده راهاندازی برنامه خود هستید و کاربران نهایی واقعی با ویژگیهای هوش مصنوعی مولد شما تعامل دارند، حتماً این چک لیست از بهترین شیوهها و ملاحظات مهم را مرور کنید.
ژنرال
چک لیست راه اندازی کلی را برای برنامه هایی که از Firebase استفاده می کنند مرور کنید
این چک لیست راه اندازی Firebase بهترین شیوه های مهم را قبل از راه اندازی هر برنامه Firebase برای تولید توصیف می کند.
مطمئن شوید که پروژه های Firebase شما از بهترین شیوه ها پیروی می کنند
به عنوان مثال، مطمئن شوید که از پروژه های مختلف Firebase برای توسعه، آزمایش و تولید استفاده می کنید. بهترین شیوه های بیشتر برای مدیریت پروژه های خود را مرور کنید.
دسترسی و امنیت
چک لیست امنیتی عمومی را برای برنامه هایی که از Firebase استفاده می کنند مرور کنید
این چک لیست امنیتی بهترین شیوه های مهم برای دسترسی و امنیت برنامه ها و سرویس های Firebase را شرح می دهد.
اجرایFirebase App Check را شروع کنید
Firebase App Check به محافظت از APIهایی که به شما امکان دسترسی به مدلهای Gemini و Imagen را میدهند، کمک میکند. App Check تأیید میکند که درخواستها از برنامه واقعی شما و یک دستگاه معتبر و دستکاری نشده است. از ارائه دهندگان گواهی برای پلتفرم های اپل (DeviceCheck یا App Attest)، اندروید (Play Integrity) و وب (reCAPTCHA Enterprise) پشتیبانی می کند و از همه این ارائه دهندگان برای برنامه های Flutter و Unity نیز پشتیبانی می کند.
محدودیتهایی را برای کلیدهای API Firebase خود تنظیم کنید
«محدودیتهای برنامه» را تنظیم کنید تا استفاده از هر کلید API Firebase را فقط به درخواستهای برنامهتان محدود کنید (بهعنوان مثال، شناسه بسته منطبق برای برنامه Apple). توجه داشته باشید که حتی اگر کلید خود را محدود کنید، Firebase App Check همچنان قویاً توصیه میشود.
توجه داشته باشید که API های مرتبط با Firebase از کلیدهای API فقط برای شناسایی پروژه یا برنامه Firebase استفاده می کنند، نه برای مجوز برای فراخوانی API.
نظارت بر هوش مصنوعی را در کنسول Firebase تنظیم کنید
نظارت بر هوش مصنوعی را تنظیم کنید تا معیارهای عملکرد کلیدی مانند درخواستها، تأخیر، خطاها و استفاده از رمز را مشاهده کنید. مانیتورینگ هوش مصنوعی همچنین به شما کمک میکند ویژگیهای Firebase AI Logic خود را با نمایش ردیابیهای فردی بازرسی و اشکالزدایی کنید.
سهمیه های خود را برای API های اساسی مورد نیاز بررسی کنید
از یک نسخه مدل پایدار در برنامه تولیدی خود استفاده کنید
در برنامه تولیدی خود، فقط از نسخه های مدل پایدار (مانند gemini-2.0-flash-001 ) استفاده کنید، نه نسخه پیش نمایش یا آزمایشی یا نام مستعار به روز شده خودکار .
حتی اگر یک نام مستعار پایدار بهروزرسانی خودکار به یک نسخه پایدار اشاره میکند، نسخه مدل واقعی که به آن اشاره میکند، هر زمان که یک نسخه پایدار جدید منتشر شود، بهطور خودکار تغییر میکند، که میتواند به معنای رفتار یا پاسخهای غیرمنتظره باشد. همچنین، نسخههای پیشنمایش و آزمایشی تنها در هنگام نمونهسازی توصیه میشوند.
Firebase Remote Config تنظیم و استفاده کنید
با Remote Config ، میتوانید پیکربندیهای مهم ویژگی هوش مصنوعی مولد خود را در فضای ابری به جای مقادیر کدگذاری سخت در کد خود کنترل کنید. این بدان معنی است که می توانید بدون انتشار نسخه جدیدی از برنامه خود، پیکربندی خود را به روز کنید. با Remote Config میتوانید کارهای زیادی انجام دهید، اما در اینجا مقادیر بالایی وجود دارد که توصیه میکنیم برای ویژگی هوش مصنوعی خود از راه دور کنترل کنید:
برنامه خود را به روز نگه دارید.
نام مدل : مدلی را که برنامهتان استفاده میکند بهروزرسانی کنید، زیرا مدلهای جدید منتشر میشوند یا مدلهای دیگر متوقف میشوند.
مقادیر و ورودیها را بر اساس ویژگیهای مشتری، یا برای تطبیق با بازخورد آزمایش یا کاربران، تنظیم کنید.
پیکربندی مدل : دما، حداکثر نشانههای خروجی و موارد دیگر را تنظیم کنید.
تنظیمات ایمنی : اگر پاسخهای زیادی مسدود میشوند یا کاربران پاسخهای مضر را گزارش میکنند، تنظیمات ایمنی را تنظیم کنید.
دستورالعملهای سیستم و هرگونه درخواستی که ارائه میکنید : زمینه اضافی را که برای مدل ارسال میکنید تنظیم کنید تا پاسخها و رفتار آن را هدایت کند. به عنوان مثال، ممکن است بخواهید درخواستهایی را برای انواع مشتری خاص تنظیم کنید، یا درخواستهایی را برای کاربران جدید شخصیسازی کنید که با مواردی که برای ایجاد پاسخ برای کاربران فعلی استفاده میشوند متفاوت است.
همچنین میتوانید بهصورت اختیاری یک پارامتر minimum_version را در Remote Config تنظیم کنید تا نسخه فعلی برنامه را با آخرین نسخه تعریفشده Remote Config مقایسه کنید تا اعلان ارتقا را به کاربران نشان دهید یا کاربران را مجبور به ارتقا کنید.
مکان دسترسی به مدل را تنظیم کنید
فقط در صورت استفاده از Vertex AI Gemini API به عنوان ارائهدهنده API در دسترس است.
تاریخ آخرین بهروزرسانی 2025-08-28 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-08-28 بهوقت ساعت هماهنگ جهانی."],[],[],null,["\u003cbr /\u003e\n\nWhen you're ready to launch your app and have real end users interact with your\ngenerative AI features, make sure to review this checklist of best practices and\nimportant considerations.\n| You can complete many of these checklist items as soon as you start to seriously develop your app and well before launch. \n| **Most importantly, you should enable\n| [Firebase App Check](/docs/ai-logic/app-check)\n| to help secure your app and configure\n| [Firebase Remote Config](/docs/ai-logic/solutions/remote-config)\n| to allow on-demand changes to AI parameters (like model name) without an app\n| update.**\n\nGeneral\n\nReview the general launch checklist for apps that use Firebase\n\nThis [Firebase launch checklist](/support/guides/launch-checklist) describes\nimportant best practices before launching any Firebase app to production.\n\nMake sure your Firebase projects follow best practices\n\nFor example, make sure that you use different Firebase projects for development,\ntesting, and production. Review more best practices for\n[managing your projects](/support/guides/launch-checklist#projects-follow-best-practices).\n\nAccess and security\n\nReview the general security checklist for apps that use Firebase\n\nThis [security checklist](/support/guides/security-checklist) describes\nimportant best practices for access and security for Firebase apps and services.\n\nStart *enforcing* Firebase App Check\n\n[Firebase App Check](/docs/ai-logic/app-check) helps protect the APIs that\ngive you access to the Gemini and Imagen models.\nApp Check verifies that requests are from your actual app and an authentic,\nuntampered device. It supports attestation providers for\nApple platforms (DeviceCheck or App Attest), Android (Play Integrity), and\nWeb (reCAPTCHA Enterprise), and it supports all these providers for Flutter and\nUnity apps, as well.\n\nSet up restrictions for your Firebase API keys\n\n- Review each Firebase API key's\n [\"API restrictions\"](https://cloud.google.com/docs/authentication/api-keys#adding_api_restrictions)\n allowlist:\n\n - Make sure that the Firebase AI Logic API is in the\n allowlist.\n\n - Make sure that the only other APIs in the key's allowlist are for Firebase\n services that you use in your app. See the\n [list of which APIs are required to be on the allowlist for each product](/docs/projects/api-keys#faq-required-apis-for-restricted-firebase-api-key).\n\n- Set\n [\"Application restrictions\"](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions)\n to help restrict usage of each Firebase API key to only requests from your app\n (for example, a matching bundle ID for the Apple app). Note that even if you\n restrict your key, Firebase App Check is still strongly recommended.\n\nNote that Firebase-related APIs use API keys only to *identify* the Firebase\nproject or app, *not for authorization* to call the API.\n\nBilling, monitoring, and quota\n\nAvoid surprise bills\n\nIf your Firebase project is on the pay-as-you-go Blaze pricing plan, then\n[monitor your usage](/docs/ai-logic/monitoring) and\n[set up budget alerts](/docs/projects/billing/avoid-surprise-bills#set-up-budget-alert-emails).\n\nSet up AI monitoring in the Firebase console\n\n[Set up AI monitoring](/docs/ai-logic/monitoring#ai-monitoring-in-console) to\ngain visibility into key performance metrics, like requests, latency, errors,\nand token usage. AI monitoring also helps you inspect and debug your\nFirebase AI Logic features by surfacing individual traces.\n\nReview your quotas for the required underlying APIs\n\n- Make sure that you\n [understand the quotas for each required API](/docs/ai-logic/quotas#understand-quotas).\n\n- [Set rate limits per user](/docs/ai-logic/quotas#understand-quotas-vertexai-in-firebase)\n (the default is 100 RPM).\n\n- [Edit quota or request a quota increase](/docs/ai-logic/quotas#edit-quota-or-request-quota-increase),\n as needed.\n\nManagement of configurations\n\nUse a stable model version in your production app\n\nIn your production app, only use\n[*stable* model versions](/docs/ai-logic/models#versions) (like\n`gemini-2.0-flash-001`), not a *preview* or *experimental* version or\nan *auto-updated* alias.\n\nEven though an *auto-updated* stable alias points to a stable version, the\nactual model version it points to will automatically change whenever a new\nstable version is released, which could mean unexpected behavior or responses.\nAlso, *preview* and *experimental* versions are only recommended during\nprototyping.\n| **Important:** We strongly recommend using [Firebase Remote Config](/docs/ai-logic/solutions/remote-config) to control and update the model name used in your app (see the next section).\n\nSet up and use Firebase Remote Config\n\nWith [Remote Config](/docs/ai-logic/solutions/remote-config),\nyou can control important configurations for your generative AI feature\n*in the cloud* rather than hard-coding values in your\ncode. This means that you can update your configuration without releasing\na new version of your app. You can do a lot with Remote Config, but here\nare the top values that we recommend you control remotely for your generative\nAI feature:\n\n- Keep your app up-to-date.\n\n - **Model name**: Update the model your app uses as new models are released or others are discontinued.\n- Adjust values and inputs based on client attributes, or to accommodate\n feedback from testing or users.\n\n - **Model configuration**: Adjust the temperature, max output tokens, and\n more.\n\n - **Safety settings**: Adjust safety settings if too many responses are\n getting blocked or if users report harmful responses.\n\n - **System instructions** and **any prompts that you provide**: Adjust the\n additional context that you're sending to the model to steer its\n responses and behavior. For example, you might want to tailor prompts for\n specific client types, or personalize prompts for new users that differ from\n those used to generate responses for existing users.\n\nYou could also optionally set a `minimum_version` parameter in Remote Config\nto compare the app's current version with the Remote Config-defined latest\nversion, to either show an upgrade notification to users or force users to\nupgrade.\n\nSet the location for accessing the model\n\n\n|----------------------------------------------------------------------------|\n| *Only available when using the Vertex AI Gemini API as your API provider.* |\n\n\u003cbr /\u003e\n\n[Setting a location for accessing the model](/docs/ai-logic/locations) can help\nwith costs as well as help prevent latency for your users.\n\nIf you don't specify a location, the default is `us-central1`. You can set this\nlocation during initialization, or you can optionally\n[use Firebase Remote Config to dynamically change the location based on each user's location](/docs/ai-logic/solutions/remote-config)."]]