[Week2] 알고리즘 코치에 thread_id 메모리와 풀이 리뷰 HITL 추가#12
Open
pykido wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
도메인 / 목표
thread_id기반으로 상태가 유지되는 workflow 로 확장하였습니다.state/schema/tools/graph/run.ipynb)로 분리하였습니다.그래프 흐름 (노드/엣지)
flowchart TD START([START]) --> agent agent -->|review_solution 포함| review_gate[review_gate / interrupt] agent -->|그 외 tool_calls| tools[tools / ToolNode] agent -->|tool_calls 없음| format_answer[format_answer / with_structured_output] review_gate -->|resume=full| tools review_gate -->|resume=hint| agent tools --> agent format_answer --> END([END])agent— 1주차와 동일,bind_tools된 LLMtools_condition을route_after_agent3분기로 확장 (format_answer/review_gate/tools)review_gate—review_solution호출 직전interrupt()로 정지,Command(goto=...)로resume=full → tools/resume=hint → agent라우팅InMemorySaver를compile()에 결합해 thread별 대화 상태 분리·복원1주차 대비 추가 (State / Memory / Control)
InMemorySaver+thread_id로 대화 상태 분리·복원route_after_agent3분기 라우터review_solution만 게이트로 감쌌습니다 (패턴 조회·문제 추천은 멈추지 않음).thread_id 분리
alicepgs-43238 입국심사로 정확히 해석bob테스트 (노트북에 출력 박혀 있음)
alice맥락 질문 3연속recommend_problems→ 접근법 → 실수pgs-43238맥락 유지review_gateinterrupt →resume=fullreview_solution실행, 레퍼런스 기반 전체 리뷰resume=hintreview_solution미실행(used_tools=[]), 정답 미공개 힌트만get_state_history(alice)resume임의값은 hint 폴백 / interrupt 가로질러도 thread 상태 유지다음 주 개선