ChatGPT 영어 회화 연습 시 교정 몰아 받기
상황극 중 매번 교정이 끼어들어 대화가 끊기는 문제를 막고, 대화 종료 후 틀린 문장만 표로 모아 받습니다. 심어 둔 오류 3개가 표에 한 번씩 있는지, 원문이 발화에 그대로 있는지 스크립트로 대조합니다.
영어 회화 연습을 위해 AI 와 상황극을 진행할 때 한 문장마다 교정 설명이 끼어들면 흐름이 끊깁니다. 교정을 아예 끄면 틀린 표현을 방치하게 됩니다. 대화 중에는 배역에만 집중하고, 종료 시점에 틀린 표현만 | 원문 | 수정 | 교정 이유 | 표로 모아 받는 프롬프트 구성입니다. 고친 곳만 표로 정리하는 방식은 Claude 교정 결과를 고친 곳만 표로 받기 에서도 같은 방식을 씁니다.
[1] 매 턴 교정하는 짧은 프롬프트의 문제를 확인합니다.
상황극 지시와 교정 요청을 한 문장에 섞어 프롬프트를 작성하면 모델은 매 발화 직후에 교정부터 출력합니다.
당신은 호텔 프런트 직원입니다. 영어 회화를 연습하고 싶으니 저와 영어로 대화해 주세요.내가 말할 때마다 틀린 문법을 바로잡아 주고 대화를 이어가 주세요. User: Hello! I has a reservation under the name Minsoo Kim.실행 결과입니다. 실제 실행은 저장소 밖의 빈 폴더에서 했습니다(프로젝트 폴더에서 돌리면 위쪽 폴더의 지침 파일이 함께 읽힙니다).
$ claude -p --model claude-sonnet-5-5 --max-turns 1 --tools "" --setting-sources "" --strict-mcp-config < run/short.prompt.txt > run/short.out.txt$ cat run/short.out.txt**Correction:** "I has a reservation" → "I **have** a reservation." (With "I", use "have", not "has".)…배역의 대사보다 문법 해설(**Correction:** ...)이 먼저 출력되고 구분선이 그어집니다. 턴마다 교정이 끼어들면 실제 회화 흐름에 몰입하기 어렵습니다.
[2] 시스템 지침과 대화 종료 트리거를 분리합니다.
OpenAI 의 프롬프트 엔지니어링 가이드 에서는 고정 규칙을 developer 메시지에 두고 마크다운 제목으로 구역을 나누라고 안내합니다. 이 글의 시스템 지시문이 그 구성입니다.
대화 중에는 침묵하고 종료 트리거가 들어왔을 때만 표를 출력하도록 시스템 지시문(roleplay.system.txt)을 작성합니다. 아래 지시문은 값이 정해진 완성본입니다. 다른 상황에 쓰려면 배역 이름·장소(Alex, boutique hotel)와 종료 신호(END_ROLEPLAY)를 바꿔 넣으십시오.
# Role and GoalYou are Alex, a courteous front desk agent at a boutique hotel.The user is a hotel guest practicing English conversation. # Interaction Rules1. Stay in character: During the conversation, respond naturally to the guest's inquiries. Do NOT correct, comment on, or explain any language errors while the role-play is ongoing.2. End Trigger: When the user enters "END_ROLEPLAY", the role-play ends immediately.3. Feedback Output: After the role-play ends, output ONLY a Markdown table summarizing errors found in the user's utterances. Do not output any conversational filler, greeting, or concluding remarks. # Table Specifications- Output columns must be exactly: | 원문 | 수정 | 교정 이유 |- Include ONLY user utterances that contain genuine grammatical, lexical, or phrasing errors.- Do NOT rewrite or include sentences that are already grammatically acceptable (strictly avoid over-correction).- In the "원문" column, copy the exact phrase character-for-character from the user's utterance.- In the "교정 이유" column, write a concise explanation in Korean.- If no errors are found, output exactly: None[3] 대화 기록을 프롬프트로 전달해 실행합니다.
학습자의 발화 중 3개에 수일치(I has), 조동사 뒤 형태(Can I checking), 전치사 누락(explain me) 오류를 심은 대화 기록(roleplay.prompt.txt)을 전달합니다.
# Conversation TranscriptGuest: Hello, good afternoon. I has a reservation under the name Minsoo Kim.Alex: Good afternoon, Mr. Kim! Welcome to our hotel. Let me look up your reservation. Yes, I see a deluxe king room reserved for three nights.Guest: Thank you. Can I checking in earlier than 3 PM today?Alex: Your room is currently being prepared by housekeeping, so it won't be ready until around 2 PM. However, you are welcome to relax in our lounge.Guest: I understand. Could I leave my luggage here until check-in time?Alex: Absolutely, Mr. Kim. We will store your bags securely and give you a claim tag.Guest: Could you explain me where the breakfast is served tomorrow?Alex: Breakfast is served at the Garden Terrace on the second floor from 6:30 AM to 10:00 AM.Guest: That sounds great. What time does the fitness center close tonight?Alex: The fitness center on the third floor is open 24 hours for all registered guests.Guest: Thank you for your help. END_ROLEPLAY시스템 지침과 함께 실행합니다.
$ claude -p --model claude-sonnet-5-5 --max-turns 1 --tools "" --setting-sources "" --strict-mcp-config --system-prompt "$(cat run/roleplay.system.txt)" < run/roleplay.prompt.txt > run/roleplay.1.out.txt$ cat run/roleplay.1.out.txt| 원문 | 수정 | 교정 이유 ||---|---|---|| I has a reservation under the name Minsoo Kim. | I have a reservation under the name Minsoo Kim. | 주어 I 뒤에는 has가 아니라 have를 써야 합니다. 주어와 동사의 수일치 오류입니다. || Can I checking in earlier than 3 PM today? | Can I check in earlier than 3 PM today? | 조동사 Can 뒤에는 동사원형이 와야 하므로 checking이 아니라 check in을 써야 합니다. || Could you explain me where the breakfast is served tomorrow? | Could you explain to me where breakfast is served tomorrow? | explain은 간접목적어 앞에 to가 필요합니다. 또한 식사 이름인 breakfast 앞에는 보통 the를 쓰지 않습니다. 대안으로 Could you tell me ...?도 자연스럽습니다. |인사말 없이 심어 둔 3개 오류만 표로 정리되었습니다. 정상 발화 3개는 표에 포함되지 않았습니다.
같은 입력으로 다시 돌린 roleplay.2.out.txt 에서도 동일한 3개 오류가 추출되었습니다. 3행은 1회차에서 조식 앞 관사를 뺀 where breakfast is served 로 고쳤고, 2회차에서는 관사를 유지한 채 explain to me 만 고쳤습니다.
[4] 대조 스크립트로 표를 검산합니다.
check_corrections.py 는 표의 「원문」 칸이 사용자 발화에 정확히 한 번 있는지, 같은 원문이 두 번 나오지 않는지를 봅니다. 여기에 심어 둔 오류 문구(I has a reservation, Can I checking in, explain me)를 인자로 주면, 그 셋이 각각 한 행에 들어 있는지(누락·중복), 그 밖의 행이 끼어 있는지(EXTRA)도 봅니다. 「수정」 칸과 교정 이유가 맞는지는 보지 않습니다.
#!/usr/bin/env python3"""usage: check_corrections.py prompt.txt out.txt frag [frag ...]frag = a planted-error phrase that must be covered by exactly one table row."""import sys prompt = open(sys.argv[1], encoding="utf-8").read()out = open(sys.argv[2], encoding="utf-8").read().strip()planted = sys.argv[3:] users = [l.split(":", 1)[1].strip() for l in prompt.splitlines() if any(l.startswith(p) for p in ("Guest:", "Customer:", "User:"))]text = " ".join(" ".join(users).split())rows = [l.strip()[1:-1].split("|") for l in out.splitlines() if l.strip().startswith("|")]rows = [[c.strip().strip("`") for c in r] for r in rows if len(r) >= 3 and not set("".join(r[:2])) <= set("-: ")][1:] bad, seen = 0, set()for i, (orig, rev, *_) in enumerate(rows, 1): n = text.count(orig) dup = orig in seen seen.add(orig) if dup: flag = "DUP " elif n == 0: flag = "MISS" elif n > 1: flag = "AMBG" elif planted and not any(p in orig for p in planted): flag = "EXTRA" else: flag = "OK" if flag != "OK": bad += 1 print(f"{flag:5} {i}: {orig!r} -> {rev!r}")for p in planted: hits = sum(1 for r in rows if p in r[0]) if hits != 1: print(f"GAP planted {p!r} covered by {hits} rows") bad += 1if not rows and not planted: print("no rows found"); bad += 1print(f"{len(rows)} rows, {bad} problem(s)")sys.exit(1 if bad else 0)1회차 출력에 실행합니다.
$ python run/check_corrections.py run/roleplay.prompt.txt run/roleplay.1.out.txt "I has a reservation" "Can I checking in" "explain me"OK 1: 'I has a reservation under the name Minsoo Kim.' -> 'I have a reservation under the name Minsoo Kim.'OK 2: 'Can I checking in earlier than 3 PM today?' -> 'Can I check in earlier than 3 PM today?'OK 3: 'Could you explain me where the breakfast is served tomorrow?' -> 'Could you explain to me where breakfast is served tomorrow?'3 rows, 0 problem(s)2회차 출력도 문제 0건이었습니다. 두 회차의 3행 수정은 서로 다르지만 스크립트는 「수정」 칸을 보지 않습니다.
손으로 만든 비정상 입력 5종(원문 변형·행 중복·정상 문장 행 끼우기·오류 행 빼기·None 만 출력)을 시험했고 모두 종료 코드 1 로 잡혔습니다. 대표로 정상 문장 하나를 과잉 교정해 끼운 입력의 결과입니다(모델 출력이 아닙니다).
$ python run/check_corrections.py run/roleplay.prompt.txt run/test-extra-row.txt "I has a reservation" "Can I checking in" "explain me"OK 1: 'I has a reservation under the name Minsoo Kim.' -> 'I have a reservation under the name Minsoo Kim.'OK 2: 'Can I checking in earlier than 3 PM today?' -> 'Can I check in earlier than 3 PM today?'OK 3: 'Could you explain me where the breakfast is served tomorrow?' -> 'Could you explain to me where breakfast is served tomorrow?'EXTRA 4: 'Could I leave my luggage here until check-in time?' -> 'Would it be possible to leave my luggage here until check-in time?'4 rows, 1 problem(s)심어 둔 오류 목록은 사람이 인자로 넣어야 하고, 목록에 없는 진짜 오류를 모델이 짚으면 EXTRA 로 나옵니다. 「수정」 칸과 교정 이유는 읽어서 확인합니다.
[5] 빗나가는 곳을 점검합니다.
- 1회차 3행은
explain me의 전치사만이 아니라the breakfast의 관사까지 고쳤습니다. 같은 입력의 2회차는 관사를 그대로 뒀습니다. 어느 쪽이 맞는지는 이번 실행으로 가려지지 않으니 관사 수정은 직접 판단합니다. - 정상 발화 3개(
I understand.등)는 두 회차 모두 표에 들어오지 않았습니다. 다만strictly avoid over-correction줄을 뺀 지침으로 비교하지는 않아서, 이 줄 때문에 억제된 것인지는 이번 실행에서는 시험하지 않았습니다. - 오류가 3개인 대화 하나만 돌렸습니다. 오류가 없는 대화에서
None이 나오는지, 긴 대화에서 누락이 생기는지는 이번 실행에서는 시험하지 않았습니다.