vonvon56 님의 블로그
[referto] 프롬프트 수정하기 본문
1. 이슈: 졸업논문 응답 부정확
졸업논문들은 대부분 맨 앞장이 다음과 같은 정보를 포함하고 있어서,
첫 장만 OCR해서 넘겼던 기존 로직으로는 처리가 불가능했다.
그래서 계속 프롬프트에 넣어준 응답만 반환하는 문제가 생겼다.
2. 해결: 프롬프트 분기 설정 & 순서 조정
이것이 프롬프트의 예외 처리 파트였다.
더보기
There may not be enough information, and the first page may only have dummy information. In such cases, you can definitely extract the author's name and title from another page.
If the information on the first page is insufficient, you must be able to pull information from other pages.
Even if the information is insufficient, you just fill every part by this form, Korean and English. try to complete the title and author name accurately. Be aware of hallucination, and don't just print the example given below.
Be aware of hallucination, and don't just print the example given below. There must be title and author name, so you must find it.
If there is no blank in the content, edit them appropriately.
Follow the format below.
If it is a Korean paper) 전지은, 「윌렘 드 쿠닝의 1980년대 회화의 연구」 (석사학위논문, 숙명여자대학교, 2016).
If it is an English paper) Thomas Crow, "Jacques-Louis David's 'Oath of the Horatii': Painting and Pre-Revolutionary Radicalism" (Ph.D. dissertation, UCLA, 1978), 56.
이것을 원래 프롬프트인
더보기
You are provided with a paper's details, citation guidelines, and styles (APA, MLA, Chicago, Vancouver). Based on this information, generate citations for each style, keeping the author names and journal title exactly as they appear in the original language. Use the following output format in JSON:
If the information on the first page is insufficient, pull information from other pages and complete it as similarly as possible to APA, MLA, Chicago, and Vancouver.
Even if the information is insufficient, try to complete the title and author name accurately. However, if the information does not exist at all, fill in the corresponding part with <unknown>. Be aware of hallucination, and don't just print the example given below.
If the information on the first page is insufficient, pull information from other pages and complete it as similarly as possible to APA, MLA, Chicago, and Vancouver.
Even if the information is insufficient, try to complete the title and author name accurately. However, if the information does not exist at all, fill in the corresponding part with <unknown>. Be aware of hallucination, and don't just print the example given below.
위에 넣었는데, 작동되지 않아서 아래로 옮겼었다.
하지만 그래도 작동하지 않았다.
그래서 예외 처리 파트를 다시 위로 올리고, 원래 프롬프트의 첫 문장을
You are provided with...에서
If You are provided with a paper's details, citation guidelines, and styles
라는 조건문으로 바꿨다.
그러면 정보가 부족한 경우를 놓치지 않고, 정보가 충분한 경우도 위 프롬프트에 휘둘리지 않고 정보를 잘 처리하는 듯하다.
'컴퓨터공학' 카테고리의 다른 글
컨테이너와 도커 (1) | 2024.12.05 |
---|---|
모바일 반응형 구현 (3) | 2024.11.19 |
간편로그인 & 상태관리 (2) | 2024.09.26 |