Skip to Content
엔터프라이즈 Java 개발을 위한 응용 AI (Korean Edition)
book

엔터프라이즈 Java 개발을 위한 응용 AI (Korean Edition)

by Alex Soto Bueno, Markus Eisele, Natale Vinto
November 2025
Beginner to intermediate
430 pages
6h 48m
Korean
O'Reilly Media, Inc.
Content preview from 엔터프라이즈 Java 개발을 위한 응용 AI (Korean Edition)

제3장. 개발자를 위한prompt : AI 기반 애플리케이션에서 prompt가 중요한 이유

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

prompt 는 LLMs과 상호작용하는 주요 메커니즘입니다. prompt는 AI 시스템의 응답 방식을 정의하여 생성된 콘텐츠의 품질, 관련성 및 신뢰성에 영향을 미칩니다. AI 기반 애플리케이션을 구축하는 Java 개발자에게 prompt 설계 이해는 가장 중요한 기술 중 하나입니다. 잘 구조화된 prompt는 모델의 미세 조정을 요구하지 않으면서도 환각 현상을 줄이고 일관성을 개선하며 성능을 최적화할 수 있습니다. 효과적인 prompt 작성법과 최적의 기법에 관한 다양한 권장 사항이 존재합니다. 예를 들어 OpenAI prompt 엔지니어링 가이드나 James Phoenix와 Mike Taylor의 『 생성형 AI를 위한 prompt 엔지니어링 』(O’Reilly)이 있습니다. 본 장은 간략한 개요이자 여러분의 학습 여정의 시작점이라고 생각하십시오.

prompt의 유형

prompt 는 출처와 모델을 안내하는 방식에 따라 다릅니다. 주요 유형으로는 사용자 prompt, 시스템 prompt, 컨텍스트 prompt가 있습니다. 각각을 살펴보겠습니다.

사용자 prompt: 사용자의 직접 입력

사용자 prompt는 최종 사용자가 제공하는 원시 입력 데이터입니다. 일반적으로 구조화되지 않은 형태로, 정확한 응답을 보장하기 위해 전처리나 컨텍스트 보강이 필요합니다. 예시는 다음과 같습니다:

String userPrompt = "What is the capital of France?";

사용자 prompt를 효과적으로 처리하려면 입력값 정제, 의도 인식, 컨텍스트 강화가 필요합니다. 이에 대해서는 4장에서 더 자세히 살펴보겠습니다.

시스템 prompt: 모델 행동을 안내하는 지침

시스템 prompt는 세션 내에서 모델의 행동 방식을 정의합니다( ). 이는 상호작용 시작 시 설정되며 사용자에게는 숨겨진 상태로 유지됩니다. 어조를 설정하거나 제약을 적용하거나 모델의 응답을 안내하는 데 활용될 수 있습니다. 예를 들어:

String systemPrompt = "You are a helpful AI assistant\n
                       that provides concise and factual responses.";

시스템 prompt는 애플리케이션 내에서 LLM의 경계를 정의합니다. 특정 출력을 강제하거나 도구 호출 지침을 포함하는 데에도 사용될 수 있습니다.

컨텍스트 prompt: 사전 입력 또는 동적으로 생성된 입력

문맥 prompt에는 응답 품질 향상을 위해 prompt에 추가되는 배경 정보, 과거 상호작용 기록 또는 도메인별 전문 지식이 포함됩니다. 이는 사용자 이력이나 외부 데이터를 기반으로 동적으로 생성될 수 있습니다. 이는 대화 속에 기억을 주입하는 효과적인 방법이기도 합니다. 이에 대한 아키텍처적 측면은 4장에서 더 자세히 ...

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 시스템 성능 엔지니어링 (Korean Edition)

AI 시스템 성능 엔지니어링 (Korean Edition)

Chris Fregly
생성형 AI를 위한 프롬프트 엔지니어링

생성형 AI를 위한 프롬프트 엔지니어링

제임스 피닉스, 마이크 테일러
AI 에이전트를 위한 메모리 관리

AI 에이전트를 위한 메모리 관리

Benjamin Labaschin, Jim Allen Wallace, Andrew Brookins, Manvinder Singh

Publisher Resources

ISBN: 0642572279882