Gemini Code Assist 和负责任 AI
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本文档介绍了 Gemini Code Assist 的设计理念,并介绍了生成式 AI 的功能、局限性和风险。
大语言模型的功能和风险
大语言模型 (LLM) 可以执行许多实用任务,例如:
- 翻译语言。
- 总结文字。
- 生成代码和富有创意的写作内容。
- 为聊天机器人和虚拟助理赋能。
- 与搜索引擎和推荐系统相辅相成。
同时,LLM 的技术能力不断发展,可能会造成误用、滥用以及意外或不可预见的后果。
LLM 可能会生成意料之外的输出,包括令人反感、不顾他人感受或事实上不正确的文本。由于 LLM 具有出色的多样性,因此很难准确预测它们可能会产生的意外或不可预见的输出。
鉴于这些风险和复杂情况,Gemini Code Assist 在设计时考虑到了 Google 的 AI 原则。不过,用户必须了解 Gemini Code Assist 的一些限制,以便以负责任的方式安全使用。
Gemini Code Assist 的限制
使用 Gemini 代码辅助功能时,您可能会遇到以下限制(但不限于):
边缘情况。边缘情况是指训练数据中没有充分代表的不常见、罕见或异常情况。这些情况会导致 Gemini Code Assist 模型的输出受到限制,例如模型过度置信度、对语境的误解或不当输出。
模型幻觉、依据和真实性。
Gemini Code Assist 模型可能缺乏对真实知识、物理属性或准确理解的依据和真实性。此限制可能导致模型幻觉,即 Gemini Code Assist 生成的输出可能听起来很合理,但实际上不正确、不相关、不当或无意义。幻觉还包括编造指向不存在且从未存在过的网页的链接。如需了解详情,请参阅撰写更好的 Gemini for Google Cloud 提示。
数据质量和调整。输入到 Gemini Code Assist 产品中的提示数据的质量、准确性和偏差可能会对其性能产生重大影响。如果用户输入的提示不准确或不正确,Gemini Code Assist 可能会返回不太理想的回答或错误回答。
偏见放大。语言模型可能会无意中放大其训练数据中现有的偏见,导致输出可能进一步增加社会偏见和对某些群体的不平等待遇。
语言质量。虽然 Gemini Code Assist 在与我们评估的基准上产生了出色的多语言功能,但大多数基准(包括所有公平性评估)都是采用美式英语的。
语言模型可能会为不同的用户提供不一致的服务质量。例如,由于训练数据中的代表性不足,文本生成可能对某些方言或语言变体不太有效。对于非英语语言或表示法较少的英语变体,性能可能较差。
公平性基准和子群组。Google 研究对 Gemini 模型的公平性分析并未详尽说明各种潜在风险。例如,我们关注性别、种族、民族和宗教轴线上的偏见,但仅对美式英语数据和模型输出进行分析。
领域专业知识有限。Gemini 模型是基于 Google Cloud 技术进行训练的,但可能缺乏必需的知识深度,无法就高度专业化或技术主题提供准确、详细的响应,导致肤浅或不正确的信息。
Gemini 安全和毒性过滤
Gemini Code Assist 会根据适用于每个用例的安全属性的完整列表来检查提示和回答。这些安全属性旨在滤除违反我们使用限制政策的内容。如果输出被视为有害,系统会屏蔽相应响应。
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eGemini, a large language model (LLM), is designed with Google's AI principles to offer capabilities like language translation, text summarization, and code generation, while acknowledging the risks of misapplication and unintended outputs.\u003c/p\u003e\n"],["\u003cp\u003eGemini for Google Cloud has limitations such as producing unexpected output in edge cases, potentially generating inaccurate information, and lacking factuality, which can include hallucinated information or links.\u003c/p\u003e\n"],["\u003cp\u003eThe quality of Gemini's output is influenced by the data quality and accuracy of user prompts, and there is a potential for the amplification of societal biases present in its training data.\u003c/p\u003e\n"],["\u003cp\u003eGemini's performance can vary across languages and dialects, as it primarily evaluates fairness in American English, potentially resulting in inconsistent service quality for underrepresented language varieties.\u003c/p\u003e\n"],["\u003cp\u003eDespite being trained on Google Cloud technology, Gemini may lack the specialized knowledge required to offer accurate details on highly technical topics, and it does not have awareness of the user's specific environment in the Google Cloud console.\u003c/p\u003e\n"]]],[],null,["# Gemini Code Assist and responsible AI\n\nThis document describes how Gemini Code Assist is designed in\nview of the capabilities, limitations, and risks that are associated with\ngenerative AI.\n\nCapabilities and risks of large language models\n-----------------------------------------------\n\nLarge language models (LLMs) can perform many useful tasks such as the\nfollowing:\n\n- Translate language.\n- Summarize text.\n- Generate code and creative writing.\n- Power chatbots and virtual assistants.\n- Complement search engines and recommendation systems.\n\nAt the same time, the evolving technical capabilities of LLMs create the\npotential for misapplication, misuse, and unintended or unforeseen consequences.\n\nLLMs can generate output that you don't expect, including text that's offensive,\ninsensitive, or factually incorrect. Because LLMs are incredibly versatile, it\ncan be difficult to predict exactly what kinds of unintended or unforeseen\noutputs they might produce.\n\nGiven these risks and complexities, Gemini Code Assist is\ndesigned with [Google's AI principles](https://ai.google/responsibility/principles/)\nin mind. However, it's important for users to understand some of the limitations\nof Gemini Code Assist to work safely and responsibly.\n\nGemini Code Assist limitations\n------------------------------\n\nSome of the limitations that you might encounter using\nGemini Code Assist include (but aren't limited to) the following:\n\n- **Edge cases.** Edge cases refer to unusual, rare, or exceptional situations\n that aren't well represented in the training data. These cases can lead to\n limitations in the output of Gemini Code Assist models, such as\n model overconfidence, misinterpretation of context, or inappropriate outputs.\n\n- **Model hallucinations, grounding, and factuality.**\n Gemini Code Assist models might lack grounding and factuality\n in real-world knowledge, physical properties, or accurate understanding. This\n limitation can lead to model hallucinations, where\n Gemini Code Assist might generate outputs that are\n plausible-sounding but factually incorrect, irrelevant, inappropriate, or\n nonsensical. Hallucinations can also include fabricating links to web pages\n that don't exist and have never existed. For more information, see\n [Write better prompts for Gemini for Google Cloud](https://cloud.google.com/gemini/docs/discover/write-prompts).\n\n- **Data quality and tuning.** The quality, accuracy, and bias of the prompt\n data that's entered into Gemini Code Assist products can have a\n significant impact on its performance. If users enter inaccurate or incorrect\n prompts, Gemini Code Assist might return suboptimal or false\n responses.\n\n- **Bias amplification.** Language models can inadvertently amplify existing\n biases in their training data, leading to outputs that might further reinforce\n societal prejudices and unequal treatment of certain groups.\n\n- **Language quality.** While Gemini Code Assist yields\n impressive multilingual capabilities on the benchmarks that we evaluated\n against, the majority of our benchmarks (including all of the fairness\n evaluations) are in American English.\n\n Language models might provide inconsistent service quality to different users.\n For example, text generation might not be as effective for some dialects or\n language varieties because they are underrepresented in the training data.\n Performance might be worse for non-English languages or English language\n varieties with less representation.\n- **Fairness benchmarks and subgroups.** Google Research's fairness analyses of\n Gemini models don't provide an exhaustive account of the various\n potential risks. For example, we focus on biases along gender, race,\n ethnicity, and religion axes, but perform the analysis only on the American\n English language data and model outputs.\n\n- **Limited domain expertise.** Gemini models have been trained on\n Google Cloud technology, but it might lack the depth of knowledge that's\n required to provide accurate and detailed responses on highly specialized or\n technical topics, leading to superficial or incorrect information.\n\nGemini safety and toxicity filtering\n------------------------------------\n\nGemini Code Assist prompts and responses are checked against a\ncomprehensive list of safety attributes as applicable for each use case. These\nsafety attributes aim to filter out content that violates our\n[Acceptable Use Policy](https://cloud.google.com/terms/aup). If an output is\nconsidered harmful, the response will be blocked.\n\nWhat's next\n-----------\n\n- Learn more about [how Gemini Code Assist cites sources when helps you generate code](/gemini-code-assist/docs/works#how-when-gemini-cites-sources)."]]