0Pricing
Prompt Engineering & LLM Optimization for Developers · 강의

에이전트 성찰과 자기 수정 루프

에이전트가 자신의 작업을 비평하고 수정하도록 하여 더 똑똑하게 만듭니다. 성찰 패턴과 사용 시점, 프로덕션 환경에서 이를 제한하는 방법을 배웁니다.

에이전트 성찰과 자기 수정 루프은(는) CoddyKit의 무료 Prompt Engineering & LLM Optimization for Developers 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Prompt Engineering & LLM Optimization for Developers 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Prompt Engineering & LLM Optimization for Developers 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

What is Reflection?

Reflection is an agent pattern where the model reviews its own output, identifies flaws, and produces an improved version — without a human in the loop.

It turns a one-shot answer into an iterative draft-then-revise process.

The Generator-Critic Pattern

Two roles drive reflection:

  • Generator: produces a candidate answer
  • Critic: evaluates it against criteria and suggests fixes

They can be the same model with different prompts.

A Basic Reflection Loop

Generate, critique, then regenerate using the critique. Repeat until the critic is satisfied or a limit is hit.

let draft = generate(task);
for (let i = 0; i < maxIters; i++) {
  const fb = critique(task, draft);
  if (fb.ok) break;
  draft = revise(task, draft, fb.notes);
}

Writing the Critic Prompt

A good critic is specific. Give it explicit checklist criteria so feedback is actionable rather than vague praise.

Review the answer for:
1. Correctness
2. Completeness
3. Following the format spec
List concrete problems, or reply DONE.

Reflexion with Memory

The Reflexion technique stores past mistakes as text memory. The agent reads its prior reflections before the next attempt, so it does not repeat errors.

Tool-Grounded Reflection

Reflection is far stronger when the critic can run tests, compile code, or query data — replacing opinion with evidence.

const result = runTests(draft);
if (!result.passed) {
  draft = revise(task, draft, result.failures);
}

Bounding the Loop

Unbounded reflection can loop forever or burn tokens. Always cap iterations and add an early exit when the critic approves.

const MAX_ITERS = 3;
let iters = 0;
while (!approved && iters++ < MAX_ITERS) { /* ... */ }

Diminishing Returns

Quality usually plateaus after 2-3 cycles. Track whether each revision actually improves a measurable score; stop reflecting once gains stall.

Cost vs Quality

Each reflection cycle is extra LLM calls. Reserve reflection for high-value or error-prone tasks (code, planning) and skip it for simple ones.

Avoiding Self-Reinforcing Errors

A model can confidently approve its own wrong answer. Use a different model or external tools as the critic when correctness is critical.

Combining with Planning

In a larger agent, reflection sits after each major step: act, observe, reflect, adjust the plan. This makes long autonomous workflows far more robust.

Quick Check

Test your understanding.

Recap

You learned the reflection pattern: a generator-critic loop where the agent critiques and revises its own work. Use specific critic criteria, ground critiques in tools, store reflections as memory, bound iterations, and use an independent critic for high-stakes correctness.

자주 묻는 질문

“에이전트 성찰과 자기 수정 루프” 강의는 무료인가요?

네 — “에이전트 성찰과 자기 수정 루프” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Prompt Engineering & LLM Optimization for Developers 강의 전체를 잠금 해제할 수 있습니다. Prompt Engineering & LLM Optimization for Developers 강의에는 총 4개의 강의가 포함되어 있습니다.

“에이전트 성찰과 자기 수정 루프”에서 뭘 배우나요?

에이전트가 자신의 작업을 비평하고 수정하도록 하여 더 똑똑하게 만듭니다. 성찰 패턴과 사용 시점, 프로덕션 환경에서 이를 제한하는 방법을 배웁니다. 브라우저에서 직접 실행하는 실습 코드로 Prompt Engineering & LLM Optimization for Developers을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Prompt Engineering & LLM Optimization for Developers을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Prompt Engineering & LLM Optimization for Developers은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“에이전트 성찰과 자기 수정 루프” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Prompt Engineering & LLM Optimization for Developers 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Prompt Engineering & LLM Optimization for Developers 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 다중 에이전트 시스템 설계
  2. 에이전트를 위한 메모리 및 상태 관리
  3. 자율 워크플로 자동화
  4. 에이전트 성찰과 자기 수정 루프
← Prompt Engineering & LLM Optimization for Developers(으)로 돌아가기