C.W.K.
Stream
Lesson 01 of 05 · published

Plan-Execute: 방황 좀 그만하기

~30 min · planning, plan-execute

Level 0Observer
0 XP0/40 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

plan은 의도의 압축이야

reactive agent는 방황하기 쉽다. planning은 행동 전에 목표를 순서 있는 약속으로 압축한다. plan이 완벽할 필요는 없어. 다음 몇 행동을 점검 가능하게 만들면 돼.

plan-execute는 dependency가 있는 작업에서 특히 좋다. 글쓰기 전에 research. fix 전에 reproduce. edit 전에 inspect. 와, 너무 충격적이지?

plan은 실행 가능해야 한다

“품질 개선” 같은 plan item은 흐물흐물해. “failing test를 실행하고 exact error를 캡처한다”는 실행 가능해.

긴 작업에서는 plan을 run state에 저장하고 step이 끝날 때 갱신해. 모델이 매 turn마다 plan을 다시 발견하게 만들지 마.

Code

Plan-execute loop·python
def plan_execute(task, planner, worker, tools):
    plan = planner(task)
    state = {"task": task, "plan": plan, "done": []}
    for step in plan:
        result = worker(step=step, state=state, tools=tools)
        state["done"].append({"step": step, "result": result})
        if result.get("needs_replan"):
            state["plan"] = planner(task, state=state)
    return synthesize(state)

External links

Exercise

애매한 plan step 세 개를 executable step으로 다시 써봐.
Hint
tool이나 사람이 실제로 수행할 수 있는 동사를 써.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.