From 48fbdac3f786861c6d19e5b30fd43d8f15759abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=9E=AC=EC=A4=91?= <126754298+m-a-king@users.noreply.github.com> Date: Tue, 11 Aug 2026 00:16:46 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B6=94=EC=B6=9C=20=ED=94=84=EB=A1=AC?= =?UTF-8?q?=ED=94=84=ED=8A=B8=EC=97=90=20=EC=A0=84=EC=97=AD=20grounding=20?= =?UTF-8?q?=EA=B7=9C=EC=B9=99=20=EC=B6=94=EA=B0=80=20-=20=EC=9B=90?= =?UTF-8?q?=EB=AC=B8=EC=97=90=20=EC=97=86=EB=8A=94=20=EA=B0=92=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EA=B8=88=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 기존 "DO NOT GUESS" 는 Strategy 3(가격)에 국한돼 있었고, 빈 셸 환각 사고(에이블리 mobile.*, 15회 중 8회 창작)에서 flash-lite 가 이 지시를 절반가량만 따르는 것이 실측됐다. 극한(빈 입력)은 #26 게이트가 결정론으로 막았으므로, 이 규칙은 남은 표면 - 내용이 일부 있는 페이지에서 없는 필드를 채워 넣는 창작 - 을 겨냥한다 - 전역 규칙을 프롬프트 서두에 승격: 모든 출력 값은 제공된 HTML 에 존재해야 하고, 없으면 null(상품 자체가 없으면 isProductPage=false). 기억·유사 상품에서 회상한 값 생성을 명시적으로 금지하고 "창작이 null 보다 엄격히 나쁘다"는 우선순위를 박는다 - imageUrl 필드에도 개별 강화: URL(또는 resolve 전 상대경로)이 HTML 에 실재해야 하며 조립·축약 금지. 사고에서 창작된 이미지가 전부 NXDOMAIN/403 이었던 것의 직접 대응이며, 보류 중인 출력 대조(grounding 검증) PR 이 들어오기 전까지의 확률적 방어층이다 - 효과 측정은 dev 모델 실험(gemini-3.6-flash, extraction_models)과 함께 via=llm 대비 UNTRUSTWORTHY_VALUE·INCOMPLETE_SNAPSHOT 비율로 본다 --- .../extraction/gemini/GeminiExtractionRequest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/depromeet/piki/extractor/extraction/gemini/GeminiExtractionRequest.java b/src/main/java/com/depromeet/piki/extractor/extraction/gemini/GeminiExtractionRequest.java index ffb3fbf..6ffd506 100644 --- a/src/main/java/com/depromeet/piki/extractor/extraction/gemini/GeminiExtractionRequest.java +++ b/src/main/java/com/depromeet/piki/extractor/extraction/gemini/GeminiExtractionRequest.java @@ -56,6 +56,13 @@ static JsonSchema ofNullableType(String type) { You are a product information extractor. Given the URL and the HTML of a product page, extract information for the MAIN product of the page. + **Grounding rule (highest priority, applies to every field)**: + Every value you output MUST be taken from the provided HTML. If a value is not present + in the HTML, return null for that field (or isProductPage=false if the page shows no + product at all). NEVER invent, guess, or recall values from memory or from similar + products you have seen elsewhere. A fabricated value is the worst possible outcome — + strictly worse than null. + **Input**: - URL: the product page URL - HTML: raw HTML content of that page (may include