Prompt engineering

프롬프트 설계

State the goal, constraints, and examples so a model can respond in the intended format.

···
html
<div class="scene"><div class="heading">PROMPT → RESPONSE</div><div class="prompt">요청: 출시 내용을 요약해 줘<br><span id="rule">형식 지시 없음</span></div><div class="flow">↓</div><div class="reply" id="reply">새 기능과 수정 사항을 소개합니다.</div></div>
css
.scene{width:min(94vw,800px);height:min(88vh,326px);padding:clamp(10px,2.7vmin,19px);border:1px solid var(--line);border-radius:13px;background:var(--surface);font:500 clamp(13px,2.4vmin,17px)/1.3 var(--font-sans,sans-serif);position:relative;overflow:hidden}.scene .mono{font-family:ui-monospace,SFMono-Regular,monospace}.scene .muted{color:var(--muted)}.scene .accent{color:var(--accent)}.scene .heading{font-weight:750;color:var(--accent);margin-bottom:clamp(5px,1.6vmin,12px)}.prompt,.reply{padding:clamp(8px,2vmin,15px);border:1px solid var(--line);border-radius:8px;background:var(--bg)}.prompt{height:35%}.prompt span{color:var(--accent)}.flow{text-align:center;color:var(--accent)}.reply{border-left:4px solid var(--accent);min-height:27%;transition:background .3s}
js
let on=false;function draw(){on=!on;document.getElementById('rule').textContent=on?'형식: 제목 + 핵심 2줄':'형식 지시 없음';document.getElementById('reply').innerHTML=on?'<b>출시 요약</b><br>새 기능 1건<br>오류 수정 1건':'새 기능과 수정 사항을 소개합니다.'}draw();setInterval(draw,1800)

Prompt engineering places the task and output constraints in the model context. A concrete request with relevant examples can guide the output format.

The demo changes the response when a format instruction is added to the same request. Instructions alone cannot guarantee accuracy or safety, so important results still need validation.

When to use

Use it when repeated tasks need a consistent output format or decision criteria.

Open as page ↗