Skip to Content
그림으로 배우는 생성형 AI
book

그림으로 배우는 생성형 AI

by 프리양카 베르가디아, 발리아파 락슈마난, 류광
April 2026
Intermediate
348 pages
8h 22m
Korean
Hanbit Media, Inc.
Content preview from 그림으로 배우는 생성형 AI
3296
장 책임 있는 생성형 AI 애플리케이션 구축
result = lg_weather_agent.run_
query(app,
input_query)
actual_output = result[-1]
# chicago_weather 객체의 강수량이 0mm
이므로
# 항상 다음과 같은 결과를 기대할 수
있다.
expected_output = "아니요, 현재 시카
고에는 비가 오지 않습니다."
이 코드에서
lg_weather_agent.run_query()
는 내
부적으로
lg_weather_agent.retrieve_weather_
data()
를 호출합니다
.
4
장에서 논의했듯이 후자의
함수는 평소에는 미국 기상청
(
NWS
)
API
를 호출해서
얻은 날씨 정보를 돌려줍니다
.
하지만 이번에는
‘
패
치
’(
@patch
어노테이션
)
가 호출을 가로채서
,
Mock
형
식의 객체인
chicago_weather
가 반환됩니다
.
이렇
게 하면 모든 실험에 대해 동일한 데이터가 적용됩
니다
.
도구 호출뿐만 아니라 모든 파이썬 함수를 이런 식으
로 가로챌 수 있습니다
.
따라서 애플리케이션의 모든
에이전트 단계에 패치를 적용할 수 있지요
.
이런 식으
로 에이전트 애플리케이션에서 변화를 살펴볼 한 부
분만 격리하고 나머지 실험 단계는 동일하게 유지함
으로써 체계적인 실험이 가능해집니다
.
이 예제에서
보듯이
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

만들면서 배우는 생성 AI

만들면서 배우는 생성 AI

데이비드 포스터

Publisher Resources

ISBN: 9791175790476