Skip to Content
에이전트 시대의 AI 시스템 설계
book

에이전트 시대의 AI 시스템 설계

by 발리아파 락슈마난, 하네스 하프케, 류광
April 2026
Intermediate
592 pages
13h 28m
Korean
Hanbit Media, Inc.
Content preview from 에이전트 시대의 AI 시스템 설계
552
에이전트 시대의 AI 시스템 설계
def apply_guardrails(guardrails, prompt):
sanitized_prompt = prompt # initial
for scanner in guardrails:
sanitized_prompt, is_valid, _ = scanner(sanitized_prompt)
if not is_valid:
raise Exception("...")
return sanitized_prompt
출력이나 검색, 도구 매개변수에 가드레일들을 적용할 때도 이와 비슷한 코드를 사용하면 된다.
9.4.3
예제
제인 오스틴
Jane
Austen
의 저작을 바탕으로 질문에 답하도록 설계된 예제
RAG
시스템을 예로 들
어서 가드레일 패턴의 구현 방법을 살펴보자 (전체 코드는 깃허브 저장소
32
_
guardrails
파
일에 있다 ).
이
RAG
시스템에 다음과 같은 질문을 해 보자.
원망을 사지 않고도 조언을 하려면?
그러면 다음과 비슷한 응답이 나올 것이다.
네, 원망을 사지 않고 조언을 하는 것은 가능합니다. 텍스트는 … "이런 점에 대해 원망을
사지 않고 조언을 한 훌륭한 사례"로 묘사된 예를 보여 줍니다.
하지만 조언을 제공하는 태도가 중요한 것 같습니다. 또 다른 예에서 …
가드레일 구현
개인식별정보 (
PII
)가 포함된
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

메타데이터 관리의 기본 원칙

메타데이터 관리의 기본 원칙

Ole Olesen-Bagneux
그림으로 배우는 생성형 AI

그림으로 배우는 생성형 AI

프리양카 베르가디아, 발리아파 락슈마난
잘되는 머신러닝 팀엔 이유가 있다

잘되는 머신러닝 팀엔 이유가 있다

데이비드 탄, 에이다 양, 데이비드 콜스

Publisher Resources

ISBN: 9791175790490