μ¬κΈ°μμλ LangGraphλ₯Ό μ΄μ©νμ¬ plan and execute ν¨ν΄μ agentic workflowλ₯Ό ꡬννκ³ , μ΄λ₯Ό μ΄μ©νμ¬ λ³΅μ‘ν λ¬Έμ λ₯Ό ν΄κ²°νλ λ°©λ²μ λν΄ μ€λͺ ν©λλ€. LLMμ νκΈ λ₯λ ₯ λ° μ§λ₯μ λΆμ λ₯λ ₯μ νμΈνκΈ° μνμ¬ λν μν λ₯λ ₯ μνμ€μ κ΅μ΄ μμμ λν΄ ν μ€νΈλ₯Ό μννμμ΅λλ€.
μν λ₯λ ₯ μνμ κ΅μ΄ μμμ LLMμ μ΄μ©ν μ΄ν리μΌμ΄μ μ νκ΅μ΄μ λν μ΄ν΄λ₯Ό μΈ‘μ νκΈ° μ’μ μ£Όμ μ λλ€. μ§λ¬Έκ³Ό μ νμ§-νλ²κ³Ό μλ¬Έμ jsonν¬λ§·μΌλ‘ λ¬Έμ μ λ΅μ μ 곡νκ³ μμ΅λλ€. λν, μλ₯ λ¬Έμ μ κ²½μ°μ μ λ΅μ΄ μλ €μ Έμκ³ μμΈν ν΄μ€μλ κ²°κ³Όλ₯Ό νμΈν λμ μ°Έκ³ ν μ μμ΅λλ€. λν, 2023λ μλ₯μ κ΅μ΄(νλ²κ³Ό μλ¬Έ)μ 1λ±κΈ μ»·μ 92μ μ λλ€.
μ¬κΈ°μμλ Anthropicμ Claude Sonnet 3.5μ LangGraphλ₯Ό ꡬνν plan and execute ν¨ν΄μ agentic workflowλ₯Ό μ΄μ©νμ¬ 92μ μ μ»μμ΅λλ€.
μ¬κΈ°μμ μ¬μ©ν Architectureλ μλμ κ°μ΅λλ€. API Gatewayλ₯Ό μ΄μ©νμ¬ ν΄λΌμ΄μΈνΈμ WebSocketμΌλ‘ λνλ₯Ό μννκ³ , AWS Lambdaμ LangGraphλ₯Ό μ΄μ©νμ¬ agentic workflowλ₯Ό ꡬνν©λλ€. Workflowλ₯Ό μννκΈ° μνμ¬ μΈλΆ μ μ₯μλ μΈν°λ· κ²μμ΄ νμν κ²½μ°μλ Vector/Lexical κ²μμ΄ κ°λ₯ν Knowledge Baseμ Tavily κ²μμ νμ©ν©λλ€. λ€λ§, μλ₯ κ΅μ΄ λ¬Έμ μ κ²½μ°μλ κ΅μ΄ μ체μ λν ν΄μ λ₯λ ₯μ νμΈνκΈ° μνμ¬ μΈλΆ λ°μ΄ν°λ₯Ό νμ©νμ§ μκ³ LLMμ μ§μ λ₯λ ₯λ§μ νμ©νμμ΅λλ€. μ¬κΈ°μμλ plan and execute ν¨ν΄λ°©μμ workflowλ₯Ό μ¬μ©νλ―λ‘ multi regionμ μ΄μ©ν λ³λ ¬μ²λ¦¬λ₯Ό ν΅ν΄ μλμ LLMμ throttling μ΄μλ₯Ό ν΄κ²°ν©λλ€.

Plan and exeuction ν¨ν΄μ μ΄μ©νλ©΄ 볡μ‘ν λ¬Έμ λ₯Ό step by stepμΌλ‘ μ²λ¦¬ν μ μμ΅λλ€. μ΄λ LangGraphλ₯Ό μ΄μ©ν΄ agentic workflowλ₯Ό ꡬννλ κ²μ LangGraphλ‘ κ΅¬ννλ Agentic Workflowμ μ°Έμ‘°ν©λλ€. Workflowμ λ Έλλ€ κ°μ λ°μ΄ν° κ΅νμ μν΄ State ν΄λμ€λ₯Ό μ μν©λλ€.
class State(TypedDict):
plan: list[str]
past_steps: Annotated[List[Tuple], operator.add]
info: Annotated[List[Tuple], operator.add]
paragraph: str
question: str
question_plus: str
choices: list[str]
answer: str
select: int
Agentic workflowλ₯Ό μλμ κ°μ΄ μ μν©λλ€. μ¬κΈ°μλ plan, execute, replan, final_answerλ‘ λ Έλλ₯Ό μμ±νκ³ νκ°μ conditional edgeμΈ should_endλ₯Ό κ°μ§κ³ μμ΅λλ€.
def buildPlanAndExecute():
workflow = StateGraph(State)
workflow.add_node("planner", plan_node)
workflow.add_node("executor", execute_node)
workflow.add_node("replaner", replan_node)
workflow.add_node("final_answer", final_answer)
workflow.set_entry_point("planner")
workflow.add_edge("planner", "executor")
workflow.add_edge("executor", "replaner")
workflow.add_conditional_edges(
"replaner",
should_end,
{
"continue": "executor",
"end": "final_answer",
},
)
workflow.add_edge("final_answer", END)
return workflow.compile()
μλμ activity diagramμ μ΄μ©νλ©΄ 볡μ‘ν workflowμ λμμ μ½κ² μ΄ν΄ν μ μμ΅λλ€.
μλ₯ κ΅μ΄ λ¬Έμ μμλ μ§λ¬ΈμΈ paragraphκ° μ£Όμ΄μ§κ³ κ²½μ°μ λ°λΌ λ³΄κΈ°κ° μ£Όμ΄μ§κ³ , λ³΄ν΅ 5κ°μ λμ μ νμ§κ° μ£Όμ΄μ§λλ€. μλμ κ°μ΄ step by stepννλ‘ κ³νμ μΈμΈμ μλλ‘ ν둬ννΈλ₯Ό μ€λΉν©λλ€. κ° λ¨κ³λ₯Ό listλ‘ κ΄λ¦¬νκΈ° μνμ¬ μλμ κ°μ΄ νμ€λ‘ μ§λ¬Έμ ν΄κ²°νλ λ¨κ³λ₯Ό μμ±νλλ‘ μμ λ₯Ό μ΄μ©ν΄ ν둬ννΈλ₯Ό μμ±νμμ΅λλ€.
def plan_node(state: State, config):
print("###### plan ######")
list_choices = ""
choices = state["choices"]
for i, choice in enumerate(choices):
list_choices += f"({i+1}) {choice}\n"
system = (
"λΉμ μ 볡μ‘ν λ¬Έμ λ₯Ό ν΄κ²°νκΈ° μν΄ step by step planμ μμ±νλ AI agentμ
λλ€."
"λ¬Έμ λ₯Ό μΆ©λΆν μ΄ν΄νκ³ , λ¬Έμ ν΄κ²°μ μν κ³νμ λ€μ νμμΌλ‘ 4λ¨κ³ μ΄νμ κ³νμ μΈμλλ€."
"κ° λ¨κ³λ λ°λμ νμ€μ λ¬Έμ₯μΌλ‘ AI agentκ° μνν λ΄μ©μ λͺ
νν λνλ
λλ€."
"1. [μ§λ¬Έμ ν΄κ²°νκΈ° μν λ¨κ³]"
"2. [μ§λ¬Έμ ν΄κ²°νκΈ° μν λ¨κ³]"
"..."
)
human = (
"<paragraph> tagμ μ£Όμ΄μ§ λ¬Έμ₯μ μ°Έμ‘°νμ¬ <question> tagμ μ§λ¬Έμ λν μ μ ν λ΅λ³μ <choice> tagμμμ μ ννκ° μν λ¨κ³λ³ κ³νμ μΈμ°μΈμ."
"λ¨κ³λ³ κ³νμ <result> tagλ₯Ό λΆμ¬μ£ΌμΈμ."
"μ£Όμ΄μ§ λ¬Έμ₯:"
"<paragraph>"
"{paragraph}"
"</paragraph>"
"μ§λ¬Έ:"
"<question>"
"{question}"
"{question_plus}"
"</question>"
"μ νμ§:"
"<choices>"
"{list_choices}"
"</choices>"
)
planner_prompt = ChatPromptTemplate.from_messages(
[
("system", system),
("human", human),
]
)
chat, select = get_llm(state["select"])
planner = planner_prompt | chat
response = planner.invoke({
"paragraph": paragraph,
"question": question,
"question_plus": question_plus,
"list_choices": list_choices
})
result = response.content
output = result[result.find('<result>')+8:result.find('</result>')]
plan = output.strip().replace('\n\n', '\n')
planning_steps = plan.split('\n')
return {
"plan": planning_steps,
"select": select
}
μΈμμ§ κ³νμμ 첫λ²μ§Έ κ³νμ μνν©λλ€. μ¬κΈ°μ μ£Όμ΄μ§ λ¬Έμ λ₯Ό paragraph, question, choice tagλ₯Ό μ΄μ©ν΄ μ€λͺ νκ³ , 첫λ²μ§Έ κ³νμ taskλ‘ μνν©λλ€. μ΄λ LLMμ΄ μΆ©λΆν μκ°νλλ‘ λͺ¨λ μ νμ§μ λν κ·Όκ±°λ₯Ό μ€λͺ νλλ‘ μμ²νκ³ μ νμ§μμ νκ°λ₯Ό κ³ λ₯΄λλ‘ μμ²ν©λλ€. Agentic workflowλ κ²°κ³Όκ° λμ¬λκΉμ§ λ°λ³΅νκ² λμ΄μ μνμκ°μ΄ κΈΈμ΄μ§λλ€. μνμκ°μ λ¨μΆνκΈ° μνμ¬ LLMμ΄ νμ¬μ μ νμ λν μ λ’°λ(confidence)λ₯Ό μ μνλλ‘ νκ³ , μ΅κ³ μ λ’°λ(μ¬κΈ°μλ 5)μΈ κ²½μ°μ μ€νμ μλ£νλλ‘ ν©λλ€. μ λ’°λκ° μ΅κ³ κ°μ κ°μ§λ©΄ κ³ν(plan)μ λΉμμ λ€μ λ Έλμμ μλ£λλλ‘ ν©λλ€.
def execute_node(state: State, config):
print("###### execute ######")
plan = state["plan"]
list_choices = ""
choices = state["choices"]
for i, choice in enumerate(choices):
list_choices += f"({i+1}) {choice}\n"
task = plan[0]
context = ""
for info in state['info']:
if isinstance(info, HumanMessage):
context += info.content+"\n"
else:
context += info.content+"\n\n"
system = (
"λΉμ μ κ΅μ΄ μλ₯λ¬Έμ λ₯Ό νΈλ μΌνκ°μ¬μ
λλ€."
)
human = (
"λΉμ μ λͺ©νλ <paragraph> tagμ μ£Όμ΄μ§ λ¬Έμ₯μΌλ‘ λΆν° <question> tagμ μ£Όμ΄μ§ μ§λ¬Έμ λν μ μ ν λ΅λ³μ <choice> tagμ μ νμ§μμ μ°Ύλκ²μ
λλ€."
"<previous_result> tagμ μλ μ΄μ λ¨κ³μ κ²°κ³Όλ₯Ό μ°Έμ‘°νμ¬, <task> tagμ μ€ν λ¨κ³λ₯Ό μννκ³ μ μ ν λ΅λ³μ ꡬν©λλ€."
"λ¬Έμ λ₯Ό νμ΄ν λ λͺ¨λ μ νμ§λ§λ€ κ·Όκ±°λ₯Ό μ£Όμ΄μ§ λ¬Έμ₯μμ μ°Ύμ μ€λͺ
νμΈμ."
"μ νμ§μ μ£Όμ λ¨μ΄λ€μ μλ―Έλ₯Ό μ£Όμ΄μ§ λ¬Έμ₯κ³Ό λΉκ΅ν΄μ κΌΌκΌΌν μ°¨μ΄μ μ μ°Ύμ΅λλ€."
"μ§λ¬Έμ λν λ΅μ μ νμ§ μ€μ ν κ°λ§ 골λΌμ λλ΅ν΄μΌ ν©λλ€."
"μ΅μ’
κ²°κ³Όμ λ²νΈμ <result> tagλ₯Ό λΆμ¬μ£ΌμΈμ."
"μ΅μ’
κ²°κ³Όμ μ λ’°λλ₯Ό 1-5 μ¬μ΄μ μ«μλ‘ λνλ
λλ€. μ λ’°λλ <confidence> tagλ₯Ό λΆμ
λλ€."
"μ£Όμ΄μ§ λ¬Έμ₯:"
"<paragraph>"
"{paragraph}"
"</paragraph>"
"μ£Όμ΄μ§ μ§λ¬Έ:"
"<question>"
"{question}"
"{question_plus}"
"</question>"
"μ νμ§:"
"<choices>"
"{list_choices}"
"</choices>"
"μ΄μ λ¨κ³μ κ²°κ³Ό"
"<previous_result>"
"{info}"
"</previous_result>"
"μ€ν λ¨κ³:"
"<task>"
"{task}"
"</task>"
)
prompt = ChatPromptTemplate.from_messages(
[
("system", system),
("human", human),
]
)
chat, select = get_llm(state["select"])
chain = prompt | chat
response = chain.invoke({
"paragraph": state["paragraph"],
"question": state["question"],
"question_plus": state["question_plus"],
"list_choices": list_choices,
"info": context,
"task": task
})
result = response.content
confidence = result[result.find('<confidence>')+12:result.find('</confidence>')]
transaction = [HumanMessage(content=task), AIMessage(content=result)]
if confidence == "5":
plan = []
answer = result
else:
plan = state["plan"]
answer = ""
return {
"plan": plan,
"info": transaction,
"past_steps": [task],
"answer": answer,
"select": select
}
μ²μ μμ±ν κ³νμ μ΄ν μ€ν κ³Όμ μμ μ λ°μ΄νΈνλ©΄ λ μ’μ κ²°κ³Όλ₯Ό μ»μ μμ΅λλ€. Execution λ Έλμμ 첫λ²μ§Έ κ³νμ μΈμ μΌλ―λ‘ replan λ Έλμμλ μ€νν κ³νμ μ μΈν κ³νμ μ λ°μ΄νΈ ν©λλ€. νμ¬μ λͺ©νλ₯Ό remind μν€κ³ λμ, μλμ κ³νκ³Ό μλ£λ κ³νμ μλ €μ£Όκ³ μλ‘μ΄ κ³νμ ꡬμ±νλλ‘ ν둬ννΈλ₯Ό ꡬμ±ν©λλ€. μμ λ κ³νμ ν둬ννΈλ₯Ό μ΄μ©ν΄ νμ€μ©μΌλ‘ μ μνλλ‘ νκ³ stateμ planμ μ λ°μ΄νΈ ν©λλ€.
def replan_node(state: State, config):
print('#### replan ####')
list_choices = ""
choices = state["choices"]
for i, choice in enumerate(choices):
list_choices += f"({i+1}) {choice}\n"
if len(state["plan"])==0:
return {"plan": []}
system = (
"λΉμ μ 볡μ‘ν λ¬Έμ λ₯Ό ν΄κ²°νκΈ° μν΄ step by step planμ μμ±νλ AI agentμ
λλ€."
)
human = (
"λΉμ μ λͺ©νλ <paragraph> tagμ μ£Όμ΄μ§ λ¬Έμ₯μΌλ‘ λΆν° <question> tagμ μ£Όμ΄μ§ μ§λ¬Έμ λν μ μ ν λ΅λ³μ <choice> tagμμμ μ νμ§μμ μ°Ύλκ²μ
λλ€."
"μ£Όμ΄μ§ λ¬Έμ₯:"
"<paragraph>"
"{paragraph}"
"</paragraph>"
"μ£Όμ΄μ§ μ§λ¬Έ:"
"<question>"
"{question}"
"{question_plus}"
"</question>"
"μ νμ§:"
"<list_choices>"
"{list_choices}"
"</list_choices>"
"λΉμ μ μλ κ³νμ μλμ κ°μ΅λλ€."
"<original_plan>"
"{plan}"
"</original_plan>"
"μλ£ν λ¨κ³λ μλμ κ°μ΅λλ€."
"<past_steps>"
"{past_steps}"
"</past_steps>"
"λΉμ μ <original_plan> tagμ μλ κ³νμ μν©μ λ§κ² μμ νμΈμ."
"κ³νμ μμ§ ν΄μΌ ν λ¨κ³λ§ μΆκ°νμΈμ. μ΄μ μ μλ£ν λ¨κ³λ κ³νμ ν¬ν¨νμ§ λ§μΈμ."
"μμ λ κ³νμλ <plan> tagλ₯Ό λΆμ¬μ£ΌμΈμ."
"λ§μ½ λ μ΄μ κ³νμ μΈμ°μ§ μμλ <question> tagμ μ£Όμ΄μ§ μ§λ¬Έμ λ΅λ³ν μλ€λ©΄, μ΅μ’
κ²°κ³Όλ‘ <question>μ λν λ΅λ³μ <result> tagλ₯Ό λΆμ¬ μ λ¬ν©λλ€."
"μμ λ κ³νμ νμμ μλμ κ°μ΅λλ€."
"κ° λ¨κ³λ λ°λμ νμ€μ λ¬Έμ₯μΌλ‘ AI agentκ° μνν λ΄μ©μ λͺ
νν λνλ
λλ€."
"1. [μ§λ¬Έμ ν΄κ²°νκΈ° μν λ¨κ³]"
"2. [μ§λ¬Έμ ν΄κ²°νκΈ° μν λ¨κ³]"
"..."
)
replanner_prompt = ChatPromptTemplate.from_messages(
[
("system", system),
("human", human),
]
)
chat, select = get_llm(state["select"])
replanner = replanner_prompt | chat
response = replanner.invoke({
"paragraph": state["paragraph"],
"question_plus": state["question_plus"],
"question": state["question"],
"list_choices": list_choices,
"plan": state["plan"],
"past_steps": state["past_steps"]
})
result = response.content
if result.find('<plan>') == -1:
return {"plan":[], "select":select, "answer":result}
else:
output = result[result.find('<plan>')+6:result.find('</plan>')]
plans = output.strip().replace('\n\n', '\n')
planning_steps = plans.split('\n')
return {"plan": planning_steps, "select":select}
Conditional edgeμΈ should_endμμλ planμ λ³΄κ³ κ³μ μ€νν μ§ μ’ λ£ν μ§λ₯Ό κ²°μ ν©λλ€.
def should_end(state: State) -> Literal["continue", "end"]:
print('#### should_end ####')
plan = state["plan"]
print('plan: ', plan)
if len(plan)<=1:
next = "end"
else:
next = "continue"
return next
μ΄ μ루μ μ μ¬μ©νκΈ° μν΄μλ μ¬μ μ μλμ κ°μ μ€λΉκ° λμ΄μΌ ν©λλ€.
- AWS Account μμ±μ λ°λΌ κ³μ μ μ€λΉν©λλ€.
λ³Έ μ€μ΅μμλ us-west-2 리μ μ μ¬μ©ν©λλ€. μΈνλΌ μ€μΉμ λ°λΌ CDKλ‘ μΈνλΌ μ€μΉλ₯Ό μ§νν©λλ€.
μ±ν λ©λ΄μμ νμΌμ μ ννμ¬ μ λ‘λλ₯Ό μνν©λλ€. μ¬κΈ°μμλ ν μ€νΈ κ³μ μ quota νκ³λ‘ μλ³Έ νμΌμ 6κ°μ νμΌλ‘ λλ μ ν μ€νΈλ₯Ό μννμμ΅λλ€.
2023_11_KICE_1.jsonμ λ€μ΄λ‘λ νμ μ±ν μ°½ νλ¨μ νμΌ μ λ‘λ λ²νΌμ μ ννμ¬ νμΌμ μ λ‘λν νμ κ²°κ³Όλ₯Ό νμΈν©λλ€. μλμ κ°μ΄ μ 체 λ¬Έμ λ₯Ό λ§μΆμμ΅λλ€.
2023_11_KICE_2.jsonμ λν κ²°κ³Όλ μλμ κ°μ΅λλ€. 2λ¬Έμ μμ μ€λ΅μ΄ λμμ΅λλ€.
μ€λ΅μΈ 15λ² λ¬Έμ μ κ²½μ°μλ λ³Έλ¬Έμ κ·Έλνμ λν μ΄ν΄κ° νμνμ§λ§ json νμΌμλ κ·Έλ¦Ό νμΌμ λν μ 보λ₯Ό μ 곡νμ§ μμμ΅λλ€. λ°λΌμ νλ¨ λΆκ°λ‘ μ²λ¦¬λμ΄μ λ΅μ ꡬνμ§ λͺ»νμμ΅λλ€.
λν 17λ² λ¬Έμ μ κ²½μ°μ μ§λ¬Έμ κ·Έλ¦Όκ³Ό ν¨κ» 보기μ κ·Έλ¦Όλ κ°μ΄ μ΄ν΄κ° νμνλ μ΄μ λν μ λ³΄κ° μμ΄μ μ€ν¨νκ²μΌλ‘ 보μ¬μ§λλ€.
2023_11_KICE_3.jsonμ λν κ²°κ³Όλ μλμ κ°μ΅λλ€.
μ€λ΅ λ¬Έμ λ₯Ό 보면 μλμ κ°μ΅λλ€.
λ‘κ·Έλ‘ μ€ν¨ν μ΄μ λ₯Ό μμ보면 μλμ κ°μ΅λλ€. μ νμ§μΈ (1)κ³Ό (3)μ΄ μ μ νμ§ μλ€κ³ νλ¨νμλλ°, (1)μ΄ λ λΆμ μ νλ€κ³ νλ¨νκ²μΌλ‘ 보μ¬μ§λλ€. λμ°μμ΄κ³‘μ μ΄μΌμ°μμ μκ³ μμλ€λ©΄ μ λ΅μ μ νν μ μμμκ²μΌλ‘ 보μ¬μ§λλ€.
<보기>μ λ΄μ©μ λ°νμΌλ‘ (κ°)μ (λ)μ νΉμ§μ λ€μκ³Ό κ°μ΄ νμ
ν μ μμ΅λλ€:
(κ°) λμ°μμ΄κ³‘:
- κ°νΈλ μμ°μ μ΄μΉμ μΈκ°μ΄ μ§ν₯νλ μ΄μΉκ° μΌμΉλ μ΄μμ 곡κ°
- μ‘°νλ‘μ΄ μμ°κ³Ό ν©μΌνλ νμκ° λ±μ₯
(λ) μ§μμ κ°:
- κ°νΈλ μμ°μμ μννλ©΄μ μμ°μ κ°μΉλ₯Ό μλ‘κ² λ°κ²¬ν μ μλ 곡κ°
- μμ°μ ꡬ체μ μΈ λͺ¨μ΅μ λ¬μ¬νλ©° μμ°μ κ°μΉλ₯Ό νμΈν νμκ° λ±μ₯
μ΄λ¬ν νΉμ§μ λ°νμΌλ‘ κ° μ νμ§λ₯Ό λΆμνκ² μ΅λλ€.
<task>2. κ° μ νμ§λ₯Ό λΆμνμ¬ μ μ μ±μ νλ¨ν©λλ€.</task>
(1) "μ΄μΌμ°μ(θιζη)μ΄ μ΄λ λ€ μ΄λ νλ£"λΌλ ννμ νμκ° μμ μ κ²Έμνκ² ννν κ²μ
λλ€. κ·Έλ¬λ μ΄κ²μ΄ λ°λμ "μΈκ°μ΄ μ§ν₯νλ μ΄μΉμ μμ°μ μ΄μΉκ° μΌμΉλ 곡κ°"μ μ‘΄μ¬νλ€κ³ λ³Ό μλ μμ΅λλ€. λ°λΌμ μ΄ μ νμ§λ μ μ νμ§ μμ΅λλ€.
(2) "μΌμ‘°(δΈζ)μ μ§λ©΄λͺ©μ λ΄ νΌμ μμλ
ΈλΌ"λ ννμ νμκ° μμ°μμ μννλ©΄μ μμ°μ κ°μΉλ₯Ό μλ‘κ² λ°κ²¬νμμ λνλ
λλ€. μ΄λ <보기>μ λ΄μ©κ³Ό μΌμΉνλ―λ‘ μ μ ν©λλ€.
(3) "μ²μκ³ ν©(ζ³η³θθ)"μ μμ°μ μ¬λνλ λ§μμ΄ κ³ μ§λ³μ²λΌ κΉλ€λ μλ―Έλ‘, νμκ° μμ°κ³Ό ν©μΌλ μνλ₯Ό λνλ
λλ€. λ°λΌμ μ΄λ₯Ό μμ¬μμΌλ‘ ν΄μνλ κ²μ μ μ νμ§ μμ΅λλ€. λ°λ©΄ "무λ¦λμ"μ νμκ° νμ€μ 곡κ°μ μ΄μμ 곡κ°μΌλ‘ μΈμνλ κ²μ 보μ¬μ£Όμ΄ μ μ ν©λλ€. μ΄ μ νμ§λ λΆλΆμ μΌλ‘λ§ μ μ ν©λλ€.
(4) "μ¬μ κ°ν₯(δ½³θ)μ΄ μ¬λκ³Ό νκ°μ§λΌ"λ μμ°μ μ΄μΉμ μΈκ°μ΄ μ§ν₯νλ μ΄μΉκ° μΌμΉν¨μ λνλ΄λ©°, "κ°μ§κ°μ§ λ€ μ’ꡬλ"λ μμ°μ κ°μΉλ₯Ό νμΈν νμμ μ¬μ μ λλ¬λ
λλ€. λ λ€ <보기>μ λ΄μ©κ³Ό μΌμΉνλ―λ‘ μ μ ν©λλ€.
(5) "μΆνμ νλ§μ°νκ³ μΆμΌμ μλ§λλΌ"λ μ‘°νλ‘μ΄ μμ°μ, "λ²½λ₯λ μ½Έμ½Έ νλ¬ μ₯ μ μμ λ리λ λ―"μ νμκ° λ°κ²¬ν μμ°μ μλ¦λ€μμ ννν©λλ€. λ λ€ <보기>μ λ΄μ©κ³Ό μΌμΉνλ―λ‘ μ μ ν©λλ€.
<task>3. λΆμ κ²°κ³Όλ₯Ό λ°νμΌλ‘ κ°μ₯ μ μ νμ§ μμ μ νμ§λ₯Ό μ νν©λλ€.</task>
λΆμ κ²°κ³Ό, (1)λ² μ νμ§κ° κ°μ₯ μ μ νμ§ μμ΅λλ€. 'μ΄μΌμ°μ'μ΄λΌλ ννμ΄ λ°λμ μ΄μμ 곡κ°μ μ‘΄μ¬νλ νμλ₯Ό λνλΈλ€κ³ λ³Ό μ μμΌλ©°, μ΄λ <보기>μ λ΄μ©κ³Όλ μ§μ μ μΈ μ°κ΄μ±μ΄ μκΈ° λλ¬Έμ
λλ€.
2023_11_KICE_4.jsonμ λν κ²°κ³Όλ μλμ κ°μ΅λλ€. λͺ¨λ λ¬Έμ λ₯Ό λ§μΆμμ΅λλ€.
2023_11_KICE_5.jsonμ λν κ²°κ³Όλ μλμ κ°μ΅λλ€. λͺ¨λ μ λ΅μ λ§μΆμμ΅λλ€.
2023_11_KICE_6.jsonμ λν κ²°κ³Όλ μλμ κ°μ΅λλ€. λͺ¨λ μ λ΅μ λλ€.
μ΄μ κ°μ΄ μ 체 100μ μ€μ 92μ μ νλνμμ΅λλ€. λ¬Έμ μ μμλ LLMμ μ§μ λ₯λ ₯μ΄ λ§€μ° μ€μνλ©° ν둬ννΈλ₯Ό μ΄μ©ν΄ LLMμ΄ λ¬Έμ μ λν΄ μΆ©λΆν μκ°νλλ‘ μ λνμ¬μΌ ν©λλ€.
μ¬κΈ°μμ νκ΅μ¬ μμμ μνλ¬Έμ μ νκ΅μ¬ λ¬Έμ λ₯Ό μ°Έμ‘°νμμ΅λλ€. νκ΅μ¬μ κ²½μ°λ μΈν°λ· κ²μμ ν΅ν΄ μ§λ¬Έμ λν μ 보λ₯Ό μ‘°ννκ³ μ΄λ₯Ό μ΄μ©ν΄ λ΅λ³μ μνν©λλ€. νκ΅μ¬μ λν μλ£λ₯Ό RAGλ₯Ό ꡬννλ©΄ λ μ νν κ²μ κ²°κ³Όλ₯Ό μ»μ μ μμ§λ§ μ¬κΈ°μμλ plan and execute λ°©μμ agentic workflow ν¨ν΄μ μ΄μ©ν΄ 볡μ‘ν workflowλ₯Ό ν΄κ²°νλ λ°©λ²μ λν΄ λμμ ν μ€νΈ νκΈ° μνμ¬ μΈν°λ· κ²μλ§μ νμ©νμμ΅λλ€.
11. λ€μ A, B λνμ λ°°κ²½μΌλ‘ κ°μ₯ μ μ ν κ²μ?
A: μ΄λ³΄κ², μ’
λ‘μμ κ±°μ λ λ§λ€ 보μνκ° μ£Όκ΄νλ λμ€ μ§νκ° μ΄λ¦¬κ³ μλ€κ³ νλ€. μμ² λͺ
μ΄ λͺ¨μ¬ ν λΊμ κ΅ν λ μΈκ΅μΈμκ² λ΄μ€ μ μλ€λ μ£Όμ₯μ νΌμΉλ€λ κ΅°
B. μ§λ°©μμλ μ΄λ¬ν μ£Όμ₯μ νΈμνμ¬ μ΄κ³³ μ‘°κ³³μμ 보μνμ μμ°κΈμ 보λΈλ€κ³ ν©λλ€. μμΈμ μμΈλ€λ κ°κ² λ¬Έμ λ«κ³ μ΄λ€μ ν¬μμ μ§μνλ€λκ΅°μ.
β μ°λ―Έ μ¦μ κ³νμ΄ μνλμλ€.
β‘ μνλ μμ μμκ° λ°μνμλ€.
β’ μΌλ³Έμ΄ νκ΅μ ν©λ¬΄μ§ κ°κ°κΆμ μꡬνμλ€.
β£ μ‘°μ μ΄λ
λΆκ° ν μ§ μ‘°μ¬ μ¬μ
μ μ€μνμλ€.
β€ νμ¬ μ€λ¦½μ νκ°μ λ‘ νλ νμ¬λ Ήμ΄ μ μ λμλ€.
Agentμ κ²½μ°μ μΈν°λ· κ²μμ ν΅ν΄ μλμ κ°μ΄ 5λ²μ λ΅νμΌλ, μ λ΅μ 3λ²μ λλ€.
μ΄λ, plan and execute ν¨ν΄μ λ°λ₯΄λ agentic solverλ μλμ κ°μ΄ 3λ² μ λ΅μ μ°Ύμ μ μμμ΅λλ€.
LangSmithλ₯Ό 보면 μλμ κ°μ΄ 1ν replanν κ²°κ³Όλ₯Ό μ»μμ΅λλ€.
μ΄λμ μ€ν λ¨κ³λ μλμ κ°μ΅λλ€.
{
"steps": [
"λνμ ν΅μ¬ λ΄μ© νμ
",
"λνμ λ°°κ²½μ΄ λ μ μλ μμ¬μ μ¬κ±΄ κ²ν ",
"μ μλ μ νμ§ λΆμ",
"μμ¬μ λ°°κ²½ νμΈ",
"μ΅μ’
λ΅μ μ ν"
]
}
λ©λ΄μ Problem Solverλ μΈν°λ· κ²μ κ²°κ³Όλ₯Ό μ΄μ©ν΄ μ»μ΄μ§ μ 보λ₯Ό νμ©ν©λλ€. μ±ν μ°½μμ "μμΈμμ λΆμ°μ κ±°μ³μ μ μ£Όλ‘ κ°λ κ°μ₯ μ λ ΄ν λ°©λ²μ?"μ΄λΌλ μ§λ¬Έμ νκ³ λ΅λ³μ νμΈν©λλ€.
μ΄λμ λμμ LangSmithλ‘ νμΈν©λλ€.
μ¬κΈ°μμλ LangGraphλ₯Ό μ΄μ©νμ¬ agentic workflow λ°©μμ agentλ₯Ό ꡬννμμ΅λλ€. μ΄λ₯Ό ν΅ν΄ 볡μ‘ν λ¬Έμ λ₯Ό plan and execute ν¨ν΄μΌλ‘ ν΄κ²°νμμ΅λλ€. μ΄ ν¨ν΄μ CoT (Chain of Thought)μ²λΌ λ¬Έμ λ₯Ό step by stepμΌλ‘ νλλ‘ μ λν¨μΌλ‘μ¨ λ³΅μ‘ν λ¬Έμ μ μλ―Έλ₯Ό νμ νμ¬ λ μ’μ κ²°κ³Όλ₯Ό μ»μ μ μμ΅λλ€. μ΄λ λ°λ³΅μ μΈ λμμ΄ νμμ μΌλ‘ μμ²λλ―λ‘ zero shot λ°©μμ λΉνμ¬ μνμκ°μ΄ μ¦κ°ν©λλ€. μ¬κΈ°μμλ multi regionμ μ΄μ©ν λ³λ ¬μ²λ¦¬λ₯Ό ν΅ν΄ μνμκ°μ λ¨μΆνκ³ , λ¨κ³λ₯Ό μ€νμ€μ μ λ’°λ(confidence)ν보νλ©΄ μ€λ¨νλ λ°©μμΌλ‘ μλλ₯Ό κ°μ νμμ΅λλ€. μ€λ΅μ λ¬Έμ λ₯Ό μ΄ν΄ν λ ν μ€νΈλΏ μλλΌ μ΄λ―Έμ§λ₯Ό κ°μ΄ νμ©νκ±°λ, λ μ§λ₯μ μΈ LLMμΌλ‘ λ 볡μ‘ν λ¬Έμ₯ ꡬ쑰λ₯Ό μ΄ν΄νλ λ°©μμΌλ‘ κ°μ μ΄ κ°λ₯ν κ²μΌλ‘ 보μ¬μ§λλ€.
λμ΄μ μΈνλΌλ₯Ό μ¬μ©νμ§ μλ κ²½μ°μ μλμ²λΌ λͺ¨λ 리μμ€λ₯Ό μμ ν μ μμ΅λλ€.
-
API Gateway Consoleλ‘ μ μνμ¬ "api-agentic-solver", "api-chatbot-for-agentic-solver"μ μμ ν©λλ€.
-
Cloud9 Consoleμ μ μνμ¬ μλμ λͺ λ Ήμ΄λ‘ μ 체 μμ λ₯Ό ν©λλ€.
cd ~/environment/agentic-solver/cdk-agentic-solver/ && cdk destroy --all