본문으로 건너뛰기

효과적인 프롬프트 엔지니어링으로 데이터 추출하기

Hw

2024.07.22

1. 명확한 지시 제공
LLM이 정확한 데이터를 추출하도록 하기 위해서는 명확하고 구체적인 지시를 제공하는 것이 중요합니다. 명확한 지시는 모델이 혼동하지 않고 올바른 데이터를 추출하는 데 도움이 됩니다.

예시:
KO: 사용자의 입력에서 구조화된 정보를 추출하는 것이 목표입니다. 정보를 추출할 때, 반드시 아래에 설명된 형식과 정확히 일치하도록 해야 합니다. 스키마에 포함되지 않은 속성을 추가하지 마세요.
EN: Your goal is to extract structured information from the user’s input that matches the form described below. When extracting information please make sure it matches the type information exactly. Do not add any attributes that do not appear in the schema shown below.

2. 참조 예시 제공
모델이 어떤 유형의 데이터를 추출해야 하는지 이해할 수 있도록 여러 입력과 출력 예시를 제공합니다. 참조 예시는 모델의 이해를 돕고 일관된 결과를 보장합니다.

예시:
Input: Songs by paul simon
Output: <json>{"musicrequest": {"artist": ["paul simon"]}}</json>

Input: Please stop the music
Output: <json>{"musicrequest": {"action": "stop"}}</json>

Input: play something
Output: <json>{"musicrequest": {"action": "play"}}</json>


3. 추출 스키마 활용
추출할 데이터의 구조를 명확히 정의하여 모델이 어떤 형식으로 데이터를 추출해야 하는지 명확하게 합니다. Kor 라이브러리는 이를 쉽게 구현할 수 있는 도구를 제공합니다.

예시:
musicrequest: {
song: Array<string> // 사용자가 재생하고자 하는 노래
album: Array<string> // 사용자가 재생하고자 하는 앨범
artist: Array<string> // 사용자가 듣고자 하는 아티스트
action: "play" | "stop" | "previous" | "next" // 실행할 작업; play, stop, previous, next 중 하나
}

4. 프롬프트
“Your goal is to extract structured information from the user’s input that matches the form described below. When extracting information please make sure it matches the type information exactly. Do not add any attributes that do not appear in the schema shown below.

musicrequest: {
song: Array<string> // 사용자가 재생하고자 하는 노래
album: Array<string> // 사용자가 재생하고자 하는 앨범
artist: Array<string> // 사용자가 듣고자 하는 아티스트
action: "play" | "stop" | "previous" | "next" // 실행할 작업; play, stop, previous, next 중 하나
}

Please output the extracted information in JSON format. Do not output anything except for the extracted information. Do not add any clarifying information. Do not add any fields that are not in the schema. If the text contains attributes that do not appear in the schema, please ignore them. All output must be in JSON format and follow the schema specified above. Wrap the JSON in  tags.

Input: Songs by paul simon
Output: <json>{"musicrequest": {"artist": ["paul simon"]}}</json>

Input: Please stop the music
Output: <json>{"musicrequest": {"action": "stop"}}</json>

Input: play something
Output: <json>{"musicrequest": {"action": "play"}}</json>

Input: [user input]
Output:



이와 같은 방식으로 프롬프트를 작성하면 LLM이 정확하고 일관된 방식으로 데이터를 추출할 수 있습니다. 데이터 추출의 성공은 잘 설계된 프롬프트에 달려 있으며, 이를 통해 프로젝트의 품질과 효율성을 크게 향상시킬 수 있습니다.

6

함께 이야기해요 6

로그인하고 댓글을 남겨 주세요

W
WilliamBrown2026.08.12

프롬프트를 스키마로 나누는 방식은 이미지→영상 작업에도 잘 맞습니다. 저는 장면, 피사체, 카메라 움직임, 길이, 비율을 먼저 구조화한 뒤 모델별 문장으로 변환해 비교합니다. 여러 영상 모델을 한곳에서 시험할 때는 Image To Video AI(https://imagetovideo-ai.org/)처럼 이미지·텍스트·키프레임 입력을 지원하는 작업공간이 이런 실험에 편리했습니다. 같은 입력 스키마를 유지하면 모델별 결과 차이를 기록하기도 쉽습니다.

W
WilliamBrown2026.08.10

스키마를 먼저 정의한다는 부분이 특히 유용했습니다. 오디오 생성 요청에서도 언어, 화자, 길이, 분위기, 출력 유형을 JSON으로 구조화한 뒤 생성 단계로 넘기면 결과를 비교하기 쉽습니다. 음성·음악·효과음 프롬프트를 분리해서 테스트하면 자유형 프롬프트 하나에 모든 조건을 넣는 것보다 누락을 확인하기 좋습니다. 관련 테스트 도구: Seed Audio

f
flowers2026.02.13

I just had to share this gem I stumbled upon called OpenClaw because it seriously saved me so much headache with web scraping. We all know how annoying it is to spend hours just configuring the environment before actually getting any data, but this thing actually delivers on its promise of a 30-second one-click deployment, which is insane. I love that it doesn't force you into a box either; you can plug in your own API keys if you want full control, or just use their "No-API" version if you want to get started immediately without any setup. If you're looking for a way to streamline your workflow and stop fighting with configs, definitely check out https://open-claw.org, it’s honestly been a total game-changer for my recent projects.

f
flowers2025.12.25

I recently stumbled upon this amazing tool called https://aicoloringpage.org/ that lets you instantly generate custom AI coloring pages from text or photos. It's been a total game-changer for me when looking for unique printables for my kids or just some stress-relief art without needing to draw anything myself, highly recommend checking it out!

f
flowers2025.10.12

Want to experience the power of Sora2's video generation? Check out sora2web.net! We use the latest official Sora2 API to turn your text ideas into stunning videos at the lowest prices you'll find anywhere online. It's simple to use, fast, and new users get free credits to start. Visit https://sora2web.net to begin your AI creation journey now

f
flowers2025.08.21

ExtractAny(https://extractany.com/)는 웹 페이지와 양식에서 구조화된 데이터 추출을 위해 설계된 강력한 도구로, 빠르고 정확하며 개인정보를 의식하는 경험을 제공합니다.그것의 주요 이점은 다음과 같습니다:

규모에 맞는 배치 추출:수백 개의 링크나 스크린샷을 한 번에 처리하고 더 이상 수동 복사 붙여넣기를 하지 않습니다.

뛰어난 정확도의 최적화된 OCR 엔진:고급 OCR 모델의 융합으로 구동되는 ExtractAny는 저품질이나 복잡한 레이아웃에서도 ChatGPT나 Gemini와 같은 범용 모델보다 상당히 높은 정확도를 제공합니다.

도메인별 템플릿:선하증권, 송장 또는 구조화된 웹 양식과 같은 특정 시나리오를 위해 맞춤 제작된 추출기-별도의 설정이 필요하지 않습니다.

Zero Learning Curve:URL을 붙여넣거나 파일을 업로드하기만 하면 플러그인, 코딩, 교육이 필요 없습니다.누구나 쉽게 사용할 수 있습니다.

개인 정보 보호 우선:귀하의 데이터는 절대 저장되거나 교육을 위해 사용되지 않습니다.모든 처리가 메모리 내에서 이루어지므로 완벽한 기밀성과 데이터 보안이 보장됩니다.

ExtractAny는 데이터 추출을 빠르고 신뢰할 수 있으며 걱정 없이 하므로 가장 중요한 것에 집중할 수 있습니다.

필요한 AI 정보만
메일함에 쏙쏙 넣어드려요.

지금 핫한 AI 소식부터 직접 해 본 사례까지, 월요일마다 무료로 받아보세요

이런 사례도 있어요

사례 전체 보기