Skip to Content
RAG with Python 쿡북 (Korean Edition)
book

RAG with Python 쿡북 (Korean Edition)

by Dominik Polzer
May 2026
Intermediate
378 pages
5h 49m
Korean
O'Reilly Media, Inc.
Content preview from RAG with Python 쿡북 (Korean Edition)

제8장. 에이전트형 RAG

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

에이전트는 LLM이 의사결정자 역할을 수행하는 시스템입니다. 이 모델은 현재 상황을 관찰하고, 일련의 행동을 계획하며, 해당 행동을 실행할 도구를 선택합니다. 기차가 취소되었을 때 여행 계획을 조정하는 사람처럼, 에이전트는 새로운 정보가 들어오면 전략을 조정합니다(그림 8-1).

Diagram comparing human decision-making and agent systems, illustrating how both select and execute tasks based on context, such as planning travel routes or fetching news and weather information.
그림 8-1. 에이전트를 활용한복잡한 문제 해결은 인간의 행동을 모방합니다

이러한 문제 해결 방식은 하룻밤 사이에 등장한 것이 아닙니다. 초기 LLM 애플리케이션은 요약이나 번역과 같은 독립적인 기능으로 구축되었습니다. 시간이 지남에 따라 이러한 기능들은 다단계 워크플로로 발전했고, 결국 어떤 도구를 사용할지 스스로 결정할 수 있는 완전한 에이전트 기반 시스템으로 진화했습니다.

그림 8-2는 단일 LLM 기능에서 조율된 워크플로우를 거쳐, 도구를 자유롭게 선택하고 결합하는 자율 에이전트로의 진화 과정을 보여줍니다.

Diagram illustrating the evolution of LLM applications from single features to orchestrated workflows and autonomous agents, highlighting their progression and capability enhancement.
그림 8-2. 단일 LLM 기능에서 자율 에이전트 시스템으로

에이전트를 자율적인 문제 해결자로 바라보면, 그 내부 구조를 이해하기가 더 쉬워집니다. 핵심적으로, 에이전트는 지속적인 루프 안에서 작동합니다. 에이전트는 행동을 수행하고, 그 결과를 관찰하며, 다음에 무엇을 할지 결정합니다.

그림 8-3은 이를 가능하게 하는 주요 구성 요소를 보여줍니다. 에이전트는 추론과 계획을 위해 LLM을 사용하고, 행동을 수행하기 위해 도구에 의존하며, 과거 결과가 미래의 결정에 영향을 미칠 수 있도록 정보를 단기 및 장기 기억 에 저장합니다.

Diagram of an agent architecture showing the integration of tools, memory, and planning processes, including the ReAct pattern for decision-making and action.
그림 8-3. 일반적인 에이전트아키텍처는 의사 결정을 위한 LLM, 행동을 위한 도구, 그리고 맥락을 위한 메모리로 구성됩니다

이 루프를 구현하는 방법은 하나만 있는 것이 아닙니다. 여러 계획 패턴이 존재하지만, 가장 널리 사용되는 것은 React입니다. 이 패턴에서 에이전트는 다음에 무엇을 할지 추론하는 단계와 도구를 호출하여 행동하는 단계를 번갈아 가며, 그 결과를 활용하여 계획을 개선합니다. 이 루프는 에이전트가 목표에 도달하거나 도구 호출 횟수 제한과 같은 미리 정의된 한계에 도달할 때까지 계속된다. React는 Shunyu Yao 등이 2023년 에 발표한 논문 “React: Synergizing Reasoning ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Tips for Designing Effective Presentation Slide Decks

Tips for Designing Effective Presentation Slide Decks

Curtis Newbold
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
Three Essentials for Agentic AI Security

Three Essentials for Agentic AI Security

Paolo Dal Cin, Daniel Kendzior, Yusof Seedat, Renato Marinho
How to Overcome a Power Deficit

How to Overcome a Power Deficit

Cyril Bouquet, Jean-Louis Barsoux

Publisher Resources

ISBN: 0642572383596