여러 줄 프롬프트
Amazon Q Developer는 사용자의 의도를 이해하고 여러 줄 프롬프트에서 지침을 기반으로 제안을 제공합니다. 지시문은 바람직한 결과를 확인하기 위해 프롬프트 내의 특정 키워드를 강조하는 데 도움이 될 수 있습니다.
예시 #1
문자열과 숫자
일반적인 프롬프트
Given a list that contains some numbers and strings,
**CREATE** a function called `format_list` and
format the numbers in the list into a string in which the numbers are prepended with a "#"
and check for strings and wrap in a double quote.
Python 프롬프트
prompt_eng.py
라는 이름의 파일을 생성하고, 다음의 코드를 작성합니다.
"""
Given a list that contains some numbers and strings,
CREATE a function called `format_list` and
format the numbers in the list into a string in which the numbers are prepended with a "#"
and check for strings and wrap in a double quote.
"""
예시 #2
함수 테스트
일반적인 프롬프트
Test the format_list function
Python 프롬프트
같은 파일에서 다음의 코드를 작성합니다.
# Test the format_list function
예시 #3
프롬프트 지시문
키워드를 더욱 강조하기 위한 “CREATE” 및 “MERGE”를 포함한 추가적인 명시적 지시문의 사용법이 아래에 나와 있습니다.
일반적인 프롬프트
*CREATE* a list of TV shows.
*CREATE* a list of ratings for these TV shows.
*MERGE* them to make a json object of 10 shows and their ratings.
Python 프롬프트
같은 파일에서 다음의 코드를 작성합니다.
"""
CREATE a list of TV shows.
CREATE a list of ratings for these TV shows.
MERGE them to make a json object of 10 shows and their ratings.
"""
예시 #4
업데이트 된 함수 테스트
일반적인 프롬프트
Test the merge_lists function
Python 프롬프트
같은 파일에서 다음의 코드를 작성합니다.
# Test the merge_lists function
Last updated