LLM의 요약 품질을 올리기 위한 프롬프트로 Chain-of-thought 을 적용한 Summary CoT를 제안합니다. 요약할 텍스트의 핵심 요소(인물, 날짜, 사건, 결과를 중심으로)를 반영한 프롬프트에서 요약의 일관성과 정확성을 올렸습니다. 포인트는 "Element" 을 프롬프트에 반영하는 것인데요 슬라이드에 상세를 정리했습니다.
☑ Chain-of-Density (CoD) Prompting
2023년 SalesForce AI, MIT et al 에서 요약의 정보 밀도 향상 프롬프트 연구 논문입니다. CoD Prompting 는 기존 요약의 entity 밀도를 단계적으로 높이는 방법입니다.
압축과 통합을 통해 내용 길이를 유지하는 것이 특징입니다.
논문의 프롬프트입니다. (복사해서 사용해보세요)
Article: {{ ARTICLE }} <-- 이 부분에 내용을 넣습니다.
You will generate increasingly concise, entity-dense summaries of the above article.
Repeat the following 2 steps 5 times.
Step 1. Identify 1-3 informative entities (";" delimited) from the article which are missing from the previously generated summary.
Step 2. Write a new, denser summary of identical length which covers every entity and detail from the previous summary plus the missing entities.
A missing entity is:
•
relevant to the main story,
•
specific yet concise (5 words or fewer),
•
novel (not in the previous summary),
•
faithful (present in the article),
•
anywhere (can be located anywhere in the article).
Guidelines:
•
The first summary should be long (4-5 sentences, ~80 words) yet highly non-specific, containing little information beyond the entities marked as missing. Use overly verbose language and fillers (e.g., "this article discusses") to reach ~80 words.
•
Make every word count: rewrite the previous summary to improve flow and make space for additional entities.
•
Make space with fusion, compression, and removal of uninformative phrases like "the article discusses".
•
The summaries should become highly dense and concise yet self-contained, i.e., easily understood without the article.
•
Missing entities can appear anywhere in the new summary.
•
Never drop entities from the previous summary. If space cannot be made, add fewer new entities.
Remember, use the exact same number of words for each summary.
Answer in JSON. The JSON should be a list (length 5) of dictionaries whose keys are "Missing_Entities" and "Denser_Summary".
✅ 사용 경험:
•
CoD 프롬프트의 일부를 응용하여, 비즈니스용 요약 및 보고서 프롬프트 템플릿을 만들었는데요. 내용을 압축을 하는 과정에서 Element-Aware 에 해당하는 프롬프트와 합하여 사용하였더니 세밀한 프롬프트를 완성할 수 있었습니다.
•
"Answer in JSON"으로 출력을 제한하면 오히려 요약 내용의 세밀함이 떨어지는 경험을 했습니다.
Subscribe to my site to be the first to receive notifications and emails about the latest updates, including new posts.
Join Slashpage and subscribe to 'sujin-prompt-engineer'!