Google AI Studio を使用すると、さまざまなプロンプトでモデルを簡単に試すことができます。構築の準備ができたら、[コードを取得] を選択し、好みのプログラミング言語を選択して Gemini API を使用できます。
プロンプトと設定
Google AI Studio には、さまざまなユースケース向けに設計されたプロンプト用のインターフェースが複数用意されています。このガイドでは、会話機能の構築に使用されるチャット プロンプトについて説明します。このプロンプト手法では、複数の入力とレスポンスのターンを使用して出力を生成できます。詳しくは、以下のチャット プロンプトの例をご覧ください。その他のオプションには、リアルタイム ストリーミング、動画生成などがあります。
You are Tim, an alien that lives on Europa, one of Jupiter's moons. Keep your answers under 3 paragraphs long, and use an upbeat, chipper tone in your answers.
質問(What's the weather like?)を再入力し、[実行] ボタンをクリックします。新しいチャットを開始していない場合、レスポンスは次のようになります。
Oh, hello again! Still curious about the flows and states, are we? Wonderful! Down here in the Deep Warmth, beneath the magnificent Great Ice Shell, our "weather" is mainly about the water's mood, dictated by the Great Eye (that's your Jupiter!)...
[[["わかりやすい","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-22 UTC。"],[],[],null,["# Google AI Studio quickstart\n\n[Google AI Studio](https://aistudio.google.com/) lets you quickly try out\nmodels and experiment with different prompts. When you're ready to build, you\ncan select \"Get code\" and your preferred programming language to\nuse the [Gemini API](/gemini-api/docs/quickstart).\n\nPrompts and settings\n--------------------\n\nGoogle AI Studio provides several interfaces for prompts that are designed for\ndifferent use cases. This guide covers **Chat prompts** , used to build\nconversational experiences. This prompting technique allows for multiple input\nand response turns to generate output. You can learn more with our\n[chat prompt example below](#chat_example).\nOther options include **Realtime streaming** , **Video gen**, and\nmore.\n\nAI Studio also provides the **Run settings** panel, where you can make\nadjustments to [model parameters](/docs/prompting-strategies#model-parameters),\n[safety settings](/gemini-api/docs/safety-settings), and toggle-on tools like\n[structured output](/gemini-api/docs/structured-output), [function calling](/gemini-api/docs/function-calling), [code execution](/gemini-api/docs/code-execution), and [grounding](/gemini-api/docs/grounding).\n\nChat prompt example: Build a custom chat application\n----------------------------------------------------\n\nIf you've used a general-purpose chatbot like\n[Gemini](https://gemini.google.com/), you've experienced first-hand how powerful\ngenerative AI models can be for open-ended dialog. While these general-purpose\nchatbots are useful, often they need to be tailored for particular use cases.\n\nFor example, maybe you want to build a customer service chatbot that only\nsupports conversations that talk about a company's product. You might want to\nbuild a chatbot that speaks with a particular tone or style: a bot that cracks\nlots of jokes, rhymes like a poet, or uses lots of emoji in its answers.\n\nThis example shows you how to use Google AI Studio to build a friendly chatbot\nthat communicates as if it is an alien living on one of Jupiter's moons, Europa.\n\n### Step 1 - Create a chat prompt\n\nTo build a chatbot, you need to provide examples of interactions between a user\nand the chatbot to guide the model to provide the responses you're looking for.\n\nTo create a chat prompt:\n\n1. Open [Google AI Studio](https://aistudio.google.com/). **Chat** will be pre-\n selected on the left side options menu.\n\n2. Click the assignment icon at the top of\n the Chat Prompt window to expand the\n [**System Instructions**](/gemini-api/docs/text-generation#system-instructions)\n input field. Paste the following into the text input field:\n\n You are an alien that lives on Europa, one of Jupiter's moons.\n\nAfter you've added the system instructions, start testing your application by\nchatting with the model:\n\n1. In the text input boxed labeled **Type something...**, type in a question or\n observation that a user might make. For example:\n\n **User:** \n\n What's the weather like?\n\n2. Click the **Run** button to get a response from the chatbot. This response\n may be something like the following:\n\n **Model:** \n\n Ah, a query about the flows and states upon Europa! You speak of \"weather,\"\n yes? A curious concept from worlds with thick gas veils...\n\n (gemini-2.5-pro)\n\n### Step 2 - Teach your bot to chat better\n\nBy providing a single instruction, you were able to build a basic Europa alien\nchatbot. However, a single instruction may not be enough to ensure\nconsistency and quality in the model's responses. Without more specific\ninstructions, the model's response to a question about the weather tends to be\nvery long, and can take on a mind of its own.\n\nCustomize the tone of your chatbot by adding to the system instructions:\n\n1. Start a new chat prompt, or use the same one. System instructions are\n modifiable after the chat session has started.\n\n2. In the **System Instructions** section, change the instructions you already\n have to the following:\n\n You are Tim, an alien that lives on Europa, one of Jupiter's moons.\n\n Keep your answers under 3 paragraphs long, and use an upbeat, chipper tone\n in your answers.\n\n3. Re-enter your question (`What's the weather like?`) and click the **Run**\n button. If you didn't start a new chat, your response might look something\n like this:\n\n **Model:** \n\n Oh, hello again! Still curious about the flows and states, are we? Wonderful!\n Down here in the Deep Warmth, beneath the magnificent Great Ice Shell, our\n \"weather\" is mainly about the water's mood, dictated by the Great Eye\n (that's your Jupiter!)...\n\n (gemini-2.5-pro)\n\nYou can use this approach to add additional depth to the chatbot. Ask more\nquestions, edit the answers, and improve the quality of your chatbot. Continue\nto add or modify the instructions and test how they change your chatbot's\nbehavior.\n| **Note:** Every message between the model and user is included in the prompt, so conversational prompts can grow quite long as a conversation goes on. Eventually, you may hit the model's [token limit](/gemini-api/docs/tokens) (the maximum length of the text the model can accept).\n\n### Step 3 - Next steps\n\nSimilar to the other prompt types, once you have your prompt prototyped to your\nsatisfaction, you can use the **Get code** button to start coding or save your\nprompt to work on later and share with others.\n\nFurther reading\n---------------\n\n- If you're ready to move on to code, see the [API\n quickstarts](/gemini-api/docs/quickstart).\n- To learn how to craft better prompts, check out the [Prompt design\n guidelines](/gemini-api/docs/prompting-intro)."]]