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

Advanced Planning: Branches, Review, Replan

~36 min · planning, tree-of-thought, review

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

Planning은 constraint 아래의 search야

Plan은 예쁜 numbered list가 아니야. tool availability, budget, risk, acceptance criteria, known unknowns 아래에서 하는 search strategy다. 좋은 agent는 plan으로 execution을 바꾸지, transcript를 장식하지 않는다.

첫 route가 명확하지 않을 때 branch를 써

Tree-of-thought식 planning은 여러 plausible route가 있고 나쁜 route의 비용이 클 때 유용하다. alternative를 만들고, explicit criteria로 score하고, 고른 route를 실행해. 사소한 task에 branch를 쓰면 그냥 latency cosplay야.

Reflection은 requirement에 묶여야 해

criteria 없는 reflection은 장황한 자기칭찬이 된다. reviewer pass는 named requirement, evidence, tests, safety boundary, stop reason을 봐야 해. review가 실패하면 다음 run에서 뭔가 달라져야 한다.

Code

Branch and choose·python
def choose_plan(task, constraints, n=3):
    candidates = [
        planner.call({
            "task": task,
            "constraints": constraints,
            "instruction": f"Propose route {i+1} with tools, risks, and stop condition.",
        })
        for i in range(n)
    ]
    scored = reviewer.call({
        "task": task,
        "plans": candidates,
        "rubric": ["fits constraints", "low blast radius", "verifiable", "cheap enough"],
    })
    return scored["best_plan"]
Replan only when inputs change·text
Failure: web_search timed out
Retry? yes, with smaller query or alternate provider

Failure: permission denied for deploy
Retry? no, ask for approval or change goal

Failure: tests failed
Retry? yes, after reading failure output and editing a cause

Failure: schema validation error
Retry? yes, after changing schema or arguments

External links

Exercise

복잡한 agent task 하나를 골라 가능한 plan 세 개를 써봐. 고르기 전에 cost, risk, verifiability, recovery path로 점수 매겨.
Hint
랜덤한 list 세 개를 만드는 게 아니야. 실제 tradeoff가 보여야 해.

Progress

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

댓글 0

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

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