Intro
<aside>
๐ฅ
์ด๋ฒ ์ฅ์์๋ AI Agents๋ผ๋ ๊ฒ์ ๋ํ ๊ธฐ๋ณธ ๊ฐ๋
๋ค์ ๋ํด์ ์์๋ด
๋๋ค.
</aside>
Body
ํ๊น
ํ์ด์ค์์ ์ ์ํ๋ ํต์ฌ ๊ฐ๋
์ ์๋์ ๊ฐ์ต๋๋ค.
Agent ์ดํดํ๊ธฐ
- Agent๋ ๋ฌด์์ด๋ฉฐ, ์ด๋ป๊ฒ ์๋ํ ๊น์?
- Agent๋ ์ถ๋ก (reasoning)๊ณผ ๊ณํ์(planning) ํตํด ์ด๋ป๊ฒ ๊ฒฐ์ ์ ๋ด๋ฆด๊น์?
- Agent๋ LLM์ ์ํ์ ๋ฅ๋ ฅ์ธ ์ถ๋ก ๋ฅ๋ ฅ(reasoning ๋ฅ๋ ฅ)์ด ํฅ์๋จ์ ๋ฐ๋ผ ๋ฐ์ ๋ ํํ์
๋๋ค. ์๋ฅผ ๋ค์ด, ๋ฅ์ํฌ์ R1 ๋ชจ๋ธ์ฒ๋ผ reasoning์ด ๋ฐํ์ด ๋์ด์ผ๋ง Agent๊ฐ ๋ ์ ์์ต๋๋ค.
- ๊ทธ reasoning ๋ชจ๋ธ์ planning ๋ชจ๋ธ or ์ถ๋ก (inference) ํ์ดํ๋ผ์ธ์ด ์๋จ์ ๋ถ์ด์ planning์ด ์ธ์์ ธ์ผ๋ง Agent๊ฐ ์ ์ญํ ์ ํ ์ ์์ต๋๋ค.
Agent์์ LLM(๋ํ ์ธ์ด ๋ชจ๋ธ)์ ์ญํ
- LLM์ด Agent์ โ๋๋โ ์ญํ ์ ํ๋ ๋ฐฉ์
- LLM์ด ๋ฐ์ ํจ์ ๋ฐ๋ผ Agent๊ฐ ๋น์ ๋ฐํํ๊ณ ์๊ธฐ ๋๋ฌธ์ base๊ฐ ๋๋ LLM๋ ์ ์์์ผ ํฉ๋๋ค.
- LLM์ด ๋ฉ์์ง ์์คํ
(Messages system)์ ํตํด ๋ํ๋ฅผ ๊ตฌ์กฐํํ๋ ๋ฐฉ๋ฒ
- ์ ํํ messages system์ system prompt, user prompt๋ก ๋๋ ์ ์์ต๋๋ค. ์ด๋, ๋๋ถ๋ถ์ planning์ ๋ํ ๋ถ๋ถ์ system prompt์์ ๊ดํ ํ๋ฏ๋ก ์ต๊ทผ๋ค์ด system prompt์ ์ค์์ฑ์ด ๋์ฑ ์ปค์ง๊ณ ์์ต๋๋ค.
๋๊ตฌ(Tools)์ ์ก์
(Actions)
- Agent๊ฐ ์ธ๋ถ ๋๊ตฌ๋ฅผ ์ฌ์ฉํ์ฌ ํ๊ฒฝ๊ณผ ์ํธ ์์ฉํ๋ ๋ฐฉ์
- Agent๋ tool์ ๊ฐ์ ธ์์ ํ์ฉํ๋ ๋ฐฉ์์
๋๋ค. ์๋ฅผ ๋ค์ด, LLM์ด output์ผ๋ก ์ถ๋ ฅํ ์ฝ๋๊ฐ ์๋ค๋ฉด, ๊ทธ๊ฒ์ ๋ฐ๋ก ํฐ๋ฏธ๋์ ์คํํ๊ณ ํฐ๋ฏธ๋ ๋ด์์ ๊ทธ ์ฝ๋๋ฅผ ์คํํด๋ด์ผ๋ก์จ ๊ทธ ๊ฒฐ๊ณผ๋ฌผ์ LLM์ด ๋ฐ๋ก ์
๋ ฅ์ผ๋ก ๋ฐ์๋ณผ ์ ์์ต๋๋ค.
- ์์ด์ ํธ๋ฅผ ์ํ ๋๊ตฌ๋ฅผ ๊ตฌ์ถํ๊ณ ํตํฉํ๋ ๋ฐฉ๋ฒ
- ๋๊ตฌ๋ค์ ์ ๊ฐ์ ธ์ค๊ณ ๊ฐ ๋๊ตฌ๋ค์ ์ด๋ค ๋จ๊ณ์ ๋ฐฐ์นํ๊ณ ํตํฉํ ์ง์ ๋ํด์๋ ๊ฒฐ๊ณผ๋ฌผ์ ์์ฒญ๋ ์ํฅ์ ์ค ์ ์๊ธฐ ๋๋ฌธ์ ์ค์ํ ๋ถ๋ถ์
๋๋ค.
Agent์ Workflow
- ์๊ฐ(Think) โ ํ๋(Act) โ ํ์ธ(Observe)
- ์ฌ๋๊ณผ ์ ์ฌํ๊ฒ Agent๋ ์ด๋ค ์
๋ฌด ์ฒ๋ฆฌ๋ฅผ ํ ๋ ์๊ฐ์ ํ๊ณ , ํ๋์ ํ๊ณ , ๊ทธ ํ๋์ ๊ฒฐ๊ณผ๋ฌผ์ ํ์ธํ๊ฒ ๋ฉ๋๋ค.
Conclusion
์์ ํต์ฌ ๊ฐ๋
๋ค์ ๋งค์ฐ๋งค์ฐ ์ค์ํ ์ ์ฒด ํ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค. ์ด๋ฌํ ์ ์ฒด์ ์ธ ๊ตฌ์กฐ๋ฅผ ์ ์ธ์งํ๊ณ ํ์ต์ ํ๋ฉด ์ข์๊ฑฐ ๊ฐ์ต๋๋ค!
โฌ
๏ธย ์ด์ ํ์ด์ง
โก๏ธย ๋ค์ ํ์ด์ง
1.2. What is Agent?
Reference
https://huggingface.co/learn/agents-course/en/unit1/introduction
<aside>
Topics
1. Introduction to Agents
1.1. Introduction
1.2. What is Agent?
1.3. What are LLMs?
1.4. Messages and Special Tokens
1.5. What are Tools?
1.6. Understanding AI Agents through the Thought-Action-Observation Cycle
1.7. Thought, Internal Reasoning and the Re-Act Approach
1.8. Actions: Enabling the Agent to Engage with Its Environment
1.9. Observe: Integrating Feedback to Reflect and Adapt
</aside>