프롬프트는 GitHub 리포지토리 내에 직접 파일로 저장할 수 있습니다. 이렇게 하면 체계적인 UI에서 프롬프트를 확인하고, 비기술 관련자와 쉽게 공유하고, 모델 및 프롬프트 조정에 대한 반복 테스트와 비교를 원활하게 실행할 수 있습니다.
이점
- GitHub에서 제공하는 새로운 AI 개발 도구 제품군과 쉽게 연동할 수 있습니다.
- 간단한 활용부터 복잡한 사용 사례까지 유연하며, 단순하면서도 확장성 있는 구조입니다.
- 기존 도구와 호환되는 널리 지원되는 형식을 사용합니다.
지원되는 파일 형식
YAML 파일 형식으로 프롬프트를 저장합니다.
파일은 리포지토리의 어디에나 있을 수 있지만 반드시 확장자가 .prompt.yml
또는 .prompt.yaml
이어야 합니다.
예시:
name: Text Summarizer description: Summarizes input text concisely model: openai/gpt-4o-mini modelParameters: temperature: 0.5 messages: - role: system content: You are a text summarizer. Your only job is to summarize text given to you. - role: user content: | Summarize the given text, beginning with "Summary -": <text> {{input}} </text> testData: - input: | The quick brown fox jumped over the lazy dog. The dog was too tired to react. expected: Summary - A fox jumped over a lazy, unresponsive dog. evaluators: - name: Output should start with 'Summary -' string: startsWith: 'Summary -'
name: Text Summarizer
description: Summarizes input text concisely
model: openai/gpt-4o-mini
modelParameters:
temperature: 0.5
messages:
- role: system
content: You are a text summarizer. Your only job is to summarize text given to you.
- role: user
content: |
Summarize the given text, beginning with "Summary -":
<text>
{{input}}
</text>
testData:
- input: |
The quick brown fox jumped over the lazy dog.
The dog was too tired to react.
expected: Summary - A fox jumped over a lazy, unresponsive dog.
evaluators:
- name: Output should start with 'Summary -'
string:
startsWith: 'Summary -'
프롬프트 구조
프롬프트는 다음 두 가지 핵심 요소로 구성됩니다.
- 런타임 정보(필수)
- 간단한
{{variable}}
자리 표시자를 사용하는 프롬프트 템플릿(시스템, 사용자 등)
- 간단한
- 개발 정보(선택 사항)
- 사람이 읽을 수 있는 이름 및 설명
- 모델 식별자 및 매개 변수
- 테스트 및 평가용 샘플 데이터
- Evaluator 자체를 설명하는 데이터
제한 사항
다음 사항에 대해서는 프롬프트를 저장할 수 없습니다.
- 복잡한 템플릿 언어
- 전용 파일 형식 또는 복작합 파일 형식(예:
.ghprompt
또는.prompty
)