Google AI Studio를 사용하면 모델을 바로 사용해 보고 다양한 프롬프트를 실험할 수 있습니다. 빌드할 준비가 되면 '코드 가져오기'와 원하는 프로그래밍 언어를 선택하여 Gemini API를 사용할 수 있습니다.
프롬프트 및 설정
Google AI Studio는 다양한 사용 사례를 위해 설계된 프롬프트용 인터페이스를 여러 개 제공합니다. 이 가이드에서는 대화형 환경을 만드는 데 사용되는 채팅 프롬프트를 다룹니다. 이 프롬프트 기법을 사용하면 여러 입력 및 응답 턴을 통해 출력을 생성할 수 있습니다. 아래의 채팅 프롬프트 예시에서 자세히 알아보세요. 실시간 스트리밍, 동영상 생성 등의 옵션도 있습니다.
채팅 프롬프트 창 상단에 있는 assignment 아이콘을 클릭하여 시스템 안내 입력란을 펼칩니다. 다음 내용을 텍스트 입력 필드에 붙여넣습니다.
You are an alien that lives on Europa, one of Jupiter's moons.
시스템 안내를 추가한 후 모델과 채팅하여 애플리케이션 테스트를 시작합니다.
무언가를 입력하세요...라는 텍스트 입력 상자에 사용자가 할 수 있는 질문이나 관찰 내용을 입력합니다. 예를 들면 다음과 같습니다.
What's the weather like?
실행 버튼을 클릭하여 챗봇의 응답을 받습니다. 이 응답은 다음과 같을 수 있습니다.
Ah, a query about the flows and states upon Europa! You speak of "weather," yes? A curious concept from worlds with thick gas veils...
2단계 - 봇이 더 나은 채팅을 할 수 있도록 학습시키기
단일 명령어를 제공하여 기본적인 Europa 외계인 챗봇을 빌드할 수 있었습니다. 하지만 모델의 대답에서 일관성과 품질을 보장하기에는 단일 명령어가 충분하지 않을 수 있습니다. 더 구체적인 요청 사항이 없으면 날씨에 관한 질문에 대한 모델의 대답이 매우 길어지고 자체적으로 판단할 수 있습니다.
시스템 안내에 다음을 추가하여 챗봇의 어조를 맞춤설정합니다.
새 채팅 프롬프트를 시작하거나 동일한 프롬프트를 사용합니다. 채팅 세션이 시작된 후에는 시스템 안내를 수정할 수 있습니다.
시스템 요청 사항 섹션에서 기존 요청 사항을 다음과 같이 변경합니다.
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!)...
이 방법을 사용하면 챗봇에 깊이를 더할 수 있습니다. 더 많은 질문을 하고, 답변을 수정하고, 챗봇의 품질을 개선하세요. 계속해서 안내를 추가하거나 수정하고 챗봇의 동작이 어떻게 달라지는지 테스트합니다.
3단계 - 다음 단계
다른 프롬프트 유형과 마찬가지로 프롬프트 프로토타입이 만족스럽게 완성되면 코드 가져오기 버튼을 사용하여 코딩을 시작하거나 프롬프트를 저장하여 나중에 작업하고 다른 사용자와 공유할 수 있습니다.
[[["이해하기 쉬움","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](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\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\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\nStep 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\nStep 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\nStep 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- 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)."]]