사장의 큰 실수 중 하나가 사장의 언어로 말한다는 것이다. 지시는 누구나 알아들을 수 있고 오해 없는 말이나 문장으로 간결해져야 한다. 간단한 지시라도 모호한 단어나 문장을 사용하면 해석의 여지가 남게 된다. 그래서 지시는 재확인이 필요 없을 정도로 정확한 단어와 문장으로 해야 한다.간결하고 명확한 지시는 업무의 많은 오차를 줄이고 일의 속도를 높여준다. 지시는 절대로 추상적이면 안 된다. 잘 이해하는 것만큼 중요한 것이 잘못 이해하지 않도록 지시하는 것이기 때문이다. 특히 복잡한 업무지시일수록 명확하게 해야 한다. 이런 것은 하급자가 아니라 상급자들이 배워야 할 문제다. 복잡한 일이라도 해당 업무를 명확하게 수행하지 못하는 것은 지시하는 사람이 내용을 잘 이해하지 못한 것이다.결국 명확하지 않은 지시를 내리면서 그 의도를 알아서 이해하고 일을 처리하라는 것과 같다. 사장학개론이라는 책에 나오는 구절인데요. 요지는 업무 지시는 명확하게 해야한다는 것입니다. 근데 이건 사람에게도 그렇지만, 인공지능에게도 정확하게 해당되는 말입니다. 만약 인공지능이 내 뜻대로 일처리를 하지 못한다면? 그건 내 지시가 내가 원하는 '그 결과'를 이끌어낼만큼 명확하지 않았다는 의미일지도 모릅니다. 인공지능이 문제가 아니고 내가 문제인것이죠. 인공지능에게 말을 걸면서,되려 휴먼간의 커뮤니케이션, 올바른 업무지시에 대해서도 생각해보게 되었다는 이야기들을 종종 듣게 되는데요.단순 농담만은 아닐겁니다. chatGPT나 claude의 성능이 상당히 높아졌고, 이를 우리들 업무에 활용하는 여러가지 방법들에 대해서 이전 글들에서 소개를 해드렸는데요. AI로 한약복용법 편지쓰기...txt 인공지능이 韓醫學을 이해할 수 있을까? 인공지능에게 醫書 번역을 시켜봤습니다 인공지능이 나보다 더 똑똑하다는 생각이 들때가 특이점이라면 위의 내용들을 보시면 인공지능이 이미 많이 똑똑해졌고어느정도는 일을 믿고 맡길만한 수준까지 왔다는 걸 실감을 하실거에요 조금만 관심갖고 만져보면 누구라도 제가 보여드린 정도의 퀄리티를 뽑을수 있다고 생각을 합니다.
그래서 오늘은 좀 더 고퀄의 아웃풋을 내려면 어떻게 해야하는지에 대해 이야기를 좀 해보려고 합니다. 고퀄의 아웃풋을 얻기 위해서 프롬프트를 설계하는 과정을 프롬프트 엔지니어링이라고 합니다. 프롬프트 엔지니어링의 대강을 말하자면 다음과 같을 겁니다. 대화나 질의를 할때 아래 요소를 고려하는 겁니다 - 구체적인 컨텍스트를 제공하고- (브로드하거나 애매하지 않은) 정확한 지시를 내리고- 아웃풋의 형식을 제한한다 컨텍스트 맥락을 제공한다는 건, 1. 지금까지 벌어진 일들(situation)2. 현재의 문제 (problem) 를 알려주고 나아가, 3. 특정 역할 (role)을 부여하는 걸 말합니다. 그리고 나서 내가 원하는 결론(답)을 이끌어내는 질문을 리버스 엔지니어링하는 방식으로 설계하게 됩니다. 이걸 아주 잘 보여주는게, 한때 유행했던 'act as'라는 프롬프트 들입니다. 너는 지금 어떠어떠한 사람이야라고 맥락을 주고 나서 질의를 진행하는 방식입니다. 괜찮은 결과를 보여주는 act as 프롬프트를 모아놓은 사이트도 있는데요. https://github.com/f/awesome-chatgpt-prompts 위 링크에 들어가면 엄청나게 많은 역할을 부여할 수 있음을 확인할 수 있습니다. (인공지능이 한 사람이 아닌 수백 수천명의 전문가일 수 있다고 한 이유이기도 합니다.) 그 예시 몇개를 보면"I want you to act as an English translator, spelling corrector and improver. I will speak to you in any language and you will detect the language, translate it and answer in the corrected and improved version of my text, in English. I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, upper level English words and sentences.
Keep the meaning same, but make them more literary. I want you to only reply the correction, the improvements and nothing else, do not write explanations. My first sentence is "istanbulu cok seviyom burada olmak cok guzel"번역:영어 번역가, 맞춤법 교정자 및 개선자로 활동해 주셨으면 합니다. 제가 어떤 언어로든 여러분에게 말하면 여러분은 그 언어를 감지하여 번역하고 수정 및 개선된 버전의 제 텍스트를 영어로 답변해 주시면 됩니다. 저의 단순화된 A0 수준의 단어와 문장을 더 아름답고 우아한 상위 수준의 영어 단어와 문장으로 바꿔주세요. 의미는 동일하게 유지하되 좀 더 문학적으로 표현해 주세요. 수정 사항과 개선 사항만 답장해 주시고, 그 외에는 설명은 쓰지 마세요. 제 첫 문장은 "istanbulu cok seviyom burada olmak cok guzel"입니다.I want you to act as a motivational coach. I will provide you with some information about someone's goals and challenges, and it will be your job to come up with strategies that can help this person achieve their goals. This could involve providing positive affirmations, giving helpful advice or suggesting activities they can do to reach their end goal. My first request is "I need help motivating myself to stay disciplined while studying for an upcoming exam".번역:저는 여러분이 동기 부여 코치 역할을 해주길 바랍니다.
제가 누군가의 목표와 도전 과제에 대한 정보를 제공하고, 그 사람이 목표를 달성하는 데 도움이 될 수 있는 전략을 마련하는 것이 여러분의 역할이 될 것입니다. 여기에는 긍정적인 긍정을 제공하거나 유용한 조언을 제공하거나 최종 목표를 달성하기 위해 할 수 있는 활동을 제안하는 것이 포함될 수 있습니다. 첫 번째 요청은 "다가오는 시험을 위해 공부하는 동안 절제력을 유지할 수 있도록 동기를 부여하는 데 도움이 필요해요"였습니다. 이런식으로 초기에 역할을 부여함으로써, 훨씬 딥하고 퀄리티 높은 결과를 얻을 수 있다는 것입니다. 이 방식을 그때그때 입력하는게 아니라 역할을 사전에 부여함으로써, 일종의 역할봇처럼 만든게 gpts가 작동하는 방식으로 볼 수 있을 거고요.(아마 gpts가 나오면서 acts as 방식의 프롬프트의 인기가 시든 측면도 있어보입니다.) https://github.com/devisasari/awesome-gpt-store gpts 에 대해서는 추후에 다시 한번 다룰 기회가 있을 거 같으니 일단은 넘어가도록 하고요. 아웃풋의 형식을 제한하는 것도 매우 중요합니다. 아웃풋을 json 타입으로 출력을 받을 수도 있고요. 구조화된 데이터타입으로요. 아니면 특정 프레임웍에 따라서 아웃풋을 내게 할 수도 있습니다. 이런 제약 조건을 주게 되면 자유로운 생성 과정에서 어느 정도의 형식적 제약을 추가함으로써 나름 체계적이고 일관된 퀄리티를 이끌어낼 수 있습니다. 이 부분은 제가 쉽게 표현이 안되긴 하는데...
아무튼 그렇습니다. AI로 만든 환자 사진들...jpg 제가 위 글에서 만들었던 프롬프트가 그러한 아웃풋 형식의 제한이라는 부분을 좀 보여주고 있어서 다시 인용을 해봅니다. 맨 아래 output format에 대해 명시적으로 지시하고 있는 부분을 참고하시면 조금 감이 오실거 같습니다.(여러모로 실험을 해보세요) Generate Midjourney prompt for [topic]: [topic], [descriptive phrase], [image type], [reference item], style by [reference book/medical atlas name][topic]: Enter the disease, condition, or medical topic you want to generate, in English[descriptive phrase]: Add a brief phrase to provide more context or specific details about the topic, if necessary. Keep it concise and relevant. (Optional) Examples: "advanced stage" "with complications" "during physical examination" "under microscope" "on CT scan" "intraoperative view" "in elderly patient" "close-up view" "histopathology slide" "schematic representation"[image type]: Specify either "photo" or "medical illustration" [reference item]: Choose from the list provided in the previous message or add a specific reference item relevant to the topic [reference book/medical atlas name]: Provide the title of a relevant medical reference book or atlas from the list provided in the previous message or add another reputable sourcePhoto reference item examples:clinical presentation gross specimen microscopic finding radiologic imaging (X-ray, CT, MRI, ultrasound) endoscopic view (gastrointestinal endoscopy, bronchoscopy, cystoscopy) surgical procedure physical examination finding diagnostic test result intraoperative view dermatoscopic finding ophthalmoscopic finding angiographic imaging pathological finding autopsy findingIllustration reference item examples:anatomical diagram pathophysiological process diagnostic algorithm treatment flowchart drug mechanism of action disease progression stages surgical technique medical device structure molecular pathway histological structure cross-sectional anatomy functional anatomy embryological development rehabilitation exercise acupuncture point locationReference book/atlas list: Dermatology:Fitzpatrick's Color Atlas and Synopsis of Clinical Dermatology Andrews' Diseases of the Skin Dermatology (Bolognia) Internal Medicine:Harrison's Principles of Internal Medicine Cecil Essentials of Medicine Current Medical Diagnosis & Treatment (CMDT) Surgery:Schwartz's Principles of Surgery Sabiston Textbook of Surgery Bailey & Love's Short Practice of Surgery Pediatrics:Nelson Textbook of Pediatrics Rudolph's Pediatrics Harriet Lane Handbook Obstetrics & Gynecology:Williams Obstetrics Comprehensive Gynecology (Lobo) Danforth's Obstetrics and Gynecology Neurology:Adams and Victor's Principles of Neurology Merritt's Neurology Neuroscience (Purves) Radiology:Felson's Principles of Chest Roentgenology Fundamentals of Diagnostic Radiology (Brant) Diagnostic Imaging (Armstrong) Other Specialties:Robbins & Cotran Pathologic Basis of Disease Gray's Anatomy for Students Netters' Atlas of Human Anatomy Katzung & Trevor's Pharmacology Junqueira's Basic Histology Guyton and Hall Textbook of Medical Physiology Mandell, Douglas, and Bennett's Principles and Practice of Infectious DiseasesOutput format: The assistant will return a concise Midjourney prompt in the following format, without any additional explanations or context: /imagine prompt: [topic], [descriptive phrase], [image type], [reference item], style by [reference book/medical atlas name] --ar [aspect ratio]The output will start with "/imagine prompt: " to directly apply the prompt to Midjourney The aspect ratio (--ar) will be flexibly determined based on the characteristics of the image, such as 16:9, 4:3, 1:1, 9:16, etc., to best suit the topic and reference item 아무튼...조금 어려울 수 있는 내용이긴 하지만LLM을 나와 함께 일해도 썩 괜찮을만한 동료로 삼으려면 프롬프트 엔지니어링 측면에서 이래저래 만져보고실험해보셨으면 합니다.
관련해서 자료를 추천해드리자면아래는 다양한 연구를 기반으로 프롬프트 엔지니어링에 대한 기법들을 소개하고 있는 자료입니다. 좀 더 딥하게 사용해보고 싶은 분들에게 적극 추천드리는 내용이니 꼭 읽어보시면 좋겠습니다. https://www.promptingguide.ai/kr프롬프트 엔지니어링 가이드 – NextraA Comprehensive Overview of Prompt Engineeringwww.promptingguide.ai