azosi · 2026.7.28 01:38 · 조회 0

Kimi Prompt Best Practices

상위 문서: ← Kimi Core workflows 출처: Kimi API Platform 공식 문서 — Best Practices for Prompts 한글화 (2026-07-22) 공급사: Moonshot AI (月之暗面)

시스템 프롬프트는 모델이 텍스트를 생성하거나 응답하기 전에 받는 초기 입력·지시문입니다. 이 가이드는 명확한 지시 작성 → 참조 텍스트 제공 → 복잡한 작업 분해의 3단계로 효과적인 프롬프트를 만드는 방법을 정리합니다.

왜 명확한 지시가 필요한가

모델은 마음을 읽을 수 없습니다. 출력이 너무 길면 짧게 답하라고 요청하고, 너무 단순하면 전문가 수준의 작성을 요구하고, 출력 포맷이 마음에 들지 않으면 원하는 포맷을 보여주세요. 모델이 추측해야 할 부분이 적을수록 만족스러운 결과를 얻을 가능성이 커집니다.

1. 더 많은 디테일 포함하기

관련 디테일을 모두 포함할수록 더 관련성 높은 출력을 얻을 수 있습니다.

일반적 요청개선된 요청
Excel에서 숫자 더하는 방법은?Excel 표의 한 행 숫자를 합산하는 방법. 전체 표의 각 행을 자동으로 합산해 모든 합계를 "Total"이라는 최우측 열에 배치하고 싶음.
업무 보고서 요약2023년 업무 기록을 500자 이하 단락으로 요약. 매월 하이라이트를 순서대로 나열하고, 연 전체 요약을 제공.

2. 역할 부여하기

API 요청의 messages 필드에서 모델이 사용할 역할을 명시적으로 추가하면 더 정확한 출력을 얻을 수 있습니다.

{
  "messages": [
    {"role": "system", "content": "You are Kimi, an artificial intelligence assistant provided by Moonshot AI. You are more proficient in Chinese and English conversations. You provide users with safe, helpful, and accurate answers. At the same time, you will refuse to answer any questions involving terrorism, racism, or explicit violence. Moonshot AI is a proper noun and should not be translated into other languages."},
    {"role": "user", "content": "Hello, my name is Li Lei. What is 1+1?"}
  ]
}

3. 구분자 사용하기

서로 다른 처리가 필요한 입력 부분을 명확히 구분하려면 """ 트리플 쿼트, XML 태그, 섹션 헤딩 같은 구분자를 사용하세요.

{
  "messages": [
    {"role": "system", "content": "You will receive two articles of the same category, separated by XML tags. First, summarize the arguments of each article, then point out which article presents a better argument and explain why."},
    {"role": "user", "content": "<article>Insert article here</article><article>Insert article here</article>"}
  ]
}
{
  "messages": [
    {"role": "system", "content": "You will receive an abstract and the title of a paper. The title should give readers a clear idea of the paper's topic and also be eye-catching. If the title you receive does not meet these standards, please suggest five alternative options."},
    {"role": "user", "content": "Abstract: Insert abstract here.\n\nTitle: Insert title here"}
  ]
}

4. 작업 단계를 명확히 정의하기

작업을 일련의 단계로 명시적으로 작성하면 모델이 더 쉽게 따라가고 더 나은 출력을 생성합니다.

{
  "messages": [
    {"role": "system", "content": "Respond to user input using the following steps.\nStep one: The user will provide text enclosed in triple quotes. Summarize this text into one sentence with the prefix \"Summary: \".\nStep two: Translate the summary from step one into English and add the prefix \"Translation: \"."},
    {"role": "user", "content": "\"\"\"Insert text here\"\"\""}
  ]
}

5. 예시 제공하기 (Few-shot)

명시적으로 설명하기 어려운 스타일/포맷을 모델이 모방하도록 하려면 예시를 제공하세요. 이를 "few-shot prompting"이라고 합니다.

{
  "messages": [
    {"role": "system", "content": "Respond in a consistent style"},
    {"role": "user", "content": "Insert text here"}
  ]
}

6. 출력 길이 지정하기

특정 길이의 출력을 요청할 수 있습니다. 단어·문장·단락·불릿 등 단위로 지정하세요. 다만 정확한 단어 수 지정은 정확도가 낮습니다. 모델은 단락이나 불릿 수 지정에 더 잘 동작합니다.

{
  "messages": [
    {"role": "user", "content": "Summarize the text within the triple quotes in two sentences, within 50 words. \"\"\"Insert text here\"\"\""}
  ]
}

7. 참조 텍스트 활용하기

신뢰할 수 있는 정보를 모델에 제공해 질문에 답할 때 활용하도록 유도하세요.

{
  "messages": [
    {"role": "system", "content": "Answer the question using the provided article (enclosed in triple quotes). If the answer is not found in the article, write \"I can't find the answer.\""},
    {"role": "user", "content": "<Insert article, each article enclosed in triple quotes>"}
  ]
}

8. 쿼리 분류로 작업 분해하기

독립적인 지시 집합이 필요한 작업은 쿼리 유형을 분류해 어떤 지시가 필요한지 명확히 하세요.

# 고객 문의를 분류해 모델이 후속 단계를 처리하도록 더 구체적인 지시를 제공합니다.
{
  "messages": [
    {"role": "system", "content": "You will receive a customer service inquiry that requires technical support. You can assist the user in the following ways:\n\n- Ask them to check if *** is configured.\n- If all *** are configured but the problem persists, ask for the device model they are using\n- Now you need to tell them how to restart the device:\n  - If the device model is A, perform ***.\n  - If the device model is B, suggest they perform ***."}
  ]
}

9. 긴 대화는 요약 또는 필터링하기

모델은 고정된 컨텍스트 길이를 가지므로 사용자-모델 대화가 무한정 계속될 수 없습니다.

해결책:

  • 대화가 미리 정해진 임계값에 도달하면 이전 부분을 요약하는 쿼리를 트리거하고, 그 요약을 system message의 일부로 포함
  • 전체 대화에서 비동기적으로 이전 대화를 요약

10. 긴 문서는 청크 단위로 재귀 요약하기

책을 요약할 때는 일련의 쿼리로 각 장을 요약하고, 부분 요약을 집계해 다시 요약하는 과정을 재귀적으로 반복합니다. 뒷부분을 이해할 때 앞 장의 맥락이 필요하면, 특정 지점을 요약할 때 앞 장의 요약도 포함하세요.


변경 이력

날짜변경
2026-07-22초판 작성 (공식 Prompt Best Practices 가이드 한글화)
2026-07-22제목에 "Kimi" 접두사 추가, 본문 H1 중복 제거

댓글

아직 댓글이 없습니다.

댓글을 작성하려면 로그인이 필요합니다.