지난 포스팅에서 소개하지 않았던 논문 속 다른 프롬프트 패턴들과 여러 블로그, 유튜브에서 소개하는 효율적인 AI 활용법에 대해 포스팅해보려고 한다.
프롬프트 패턴 2
이전 포스트에서 다루지 않았던 패턴들을 다룸
https://yeonwoo97.tistory.com/566
메타 언어 생성 패턴 (Meta Language Creation)
"메타 언어 생성 패턴"은 문서 "ChatGPT로 프롬프트 엔지니어링을 향상시키는 프롬프트 패턴 카탈로그"에 자세히 설명된 프롬프트 패턴 중 하나입니다. 이 패턴에 대한 요약은 다음과 같습니다.
의도 및 컨텍스트: 이 패턴은 그래프에 대한 속기 표기법 또는 프롬프트 자동화를 위한 명령과 같은 대체 언어를 사용하여 프롬프트를 만드는 데 사용됩니다. LLM(Language Learning Model)에게 이 대체 언어의 의미를 학습시켜 향후 프롬프트가 이 새로운 언어를 효과적으로 사용할 수 있도록 하는 것을 목표로 합니다.
동기: 이 패턴은 영어와 같은 기존의 인간 언어 이외의 언어로 아이디어를 더 간결하고 명확하게 표현해야 하는 필요성을 해결합니다. LLM이 정확한 출력을 생성하기 위해서는 이 대체 언어의 의미를 이해하는 것이 중요합니다.
구조 및 주요 아이디어: 패턴의 구조는 기호, 단어 또는 문장에 대한 의미를 정의하는 것을 포함합니다. 이는 "X"가 "Y"를 의미하거나 작업 "Y"를 유도하도록 정의되는 문맥적 진술을 통해 수행됩니다. 이를 통해 LLM은 대화에서 이러한 새로 정의된 용어를 올바르게 해석하고 사용할 수 있습니다.
구현 예: 그래프를 설명하기 위한 표기법을 정의하는 것이 예입니다. 예를 들어, "a → b"는 노드 "a"와 "b"와 그 사이의 간선이 있는 그래프를 나타냅니다. 가중치 또는 레이블과 같은 추가 속성은 "-[w:2 z:3]→"와 같은 특정 구문을 사용하여 추가할 수 있습니다. 이는 그래프와 같은 복잡한 구조를 전달하는 명확하고 간결한 방법을 확립합니다.
결과: 이 패턴은 사용자 상호 작용을 위한 강력한 사용자 정의를 제공하지만 LLM 내에서 혼동을 일으킬 수 있습니다. 언어를 명확하게 정의하고 성능 저하를 유발할 수 있는 모호성을 피하는 것이 중요합니다. 예를 들어, 일반적인 용어 또는 기호를 재정의하면 혼동을 일으킬 수 있습니다. 상충되는 해석을 피하기 위해 새 대화 세션에서 이 패턴을 사용하고 세션당 하나의 메타 언어를 사용하는 것이 좋습니다.
이 패턴은 LLM과의 상호 작용을 사용자 정의하는 정교한 방법을 보여줍니다. 특히 복잡한 구조나 지침을 다룰 때 더 정확하고 효율적인 의사 소통이 가능합니다.
The "Meta Language Creation Pattern" is one of the prompt patterns detailed in the document "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT." Here's a summary of this pattern:
### Meta Language Creation Pattern
1. **Intent and Context**: This pattern is used to create prompts using an alternative language, such as shorthand notations for graphs or commands for prompt automation. It aims to teach the LLM (Language Learning Model) the semantics of this alternative language, enabling future prompts to use this new language effectively.
2. **Motivation**: The pattern addresses the need for expressing ideas more concisely or clearly in a language other than conventional human languages like English. Understanding the semantics of this alternative language is crucial for the LLM to produce accurate output.
3. **Structure and Key Ideas**: The pattern's structure involves defining meanings for symbols, words, or statements. This is done through contextual statements where "X" is defined to mean "Y" or to prompt an action "Y". This enables the LLM to interpret and use these newly defined terms correctly in the conversation.
4. **Example Implementation**: An example is defining a notation for describing graphs. For instance, "a → b" indicates a graph with nodes "a" and "b" and an edge between them. Additional properties like weights or labels can be added with specific syntax like “-[w:2 z:3]→”. This establishes a clear and concise method to communicate complex structures like graphs.
5. **Consequences**: While this pattern offers powerful customization for user interaction, it can potentially create confusion within the LLM. It’s important to define the language clearly and avoid ambiguities that could degrade performance. For example, redefining common terms or symbols could cause confusion. It's recommended to use this pattern in new conversation sessions and stick to one meta-language per session to avoid conflicting interpretations.
This pattern illustrates a sophisticated method of customizing interaction with an LLM, allowing for more precise and efficient communication, especially when dealing with complex structures or instructions.
- example
사용자: 대화에서 'Stralight'라는 용어를 사용하면 우주 탐사 및 천문학과 관련된 모든 주제를 나타냅니다.
그래서 ChatGPT에서 'Starlight 업데이트'에 대해 물어보면 우주 탐사에 관한 최신 소식을 물어보는 것입니다.
출력 자동화 패턴 (Output Automater)
"출력 자동화 패턴"은 "ChatGPT를 사용한 프롬프트 엔지니어링 향상을 위한 프롬프트 패턴 카탈로그" 문서에 자세히 설명된 또 다른 핵심 패턴입니다. 이 패턴에 대한 요약은 다음과 같습니다.
- 의도 및 컨텍스트: 이 패턴의 주요 목표는 언어 학습 모델(LLM)이 출력에서 추천하는 단계를 실행할 수 있는 스크립트 또는 자동화 아티팩트를 생성하도록 하는 것입니다. 이 접근 방식은 LLM의 출력 제안을 구현하는 데 필요한 수작업을 최소화하는 것을 목표로 합니다.
- 동기: LLM 출력에는 종종 사용자가 따라야 하는 일련의 단계가 포함됩니다. 이러한 단계를 수동으로 수행하는 것은 지루하고 오류가 발생하기 쉽습니다. 출력 자동화 패턴은 이러한 단계를 자동화하는 실행 가능한 아티팩트를 생성하여 이 문제를 해결합니다.
- 구조 및 주요 아이디어: 이 패턴은 출력에 실행 가능한 단계가 포함될 때 자동화를 생성한다는 아이디어를 중심으로 구성됩니다. 예를 들어, 권장 파일 수정을 자동화하는 Python 스크립트 생성을 지정할 수 있습니다. 이 프로세스에는 자동화가 적절한 시기를 식별하고 특정 스크립트 또는 명령 시퀀스와 같은 자동화에 필요한 실행 가능한 아티팩트 유형을 정의하는 작업이 포함됩니다.
- 구현 예: 예를 들어 LLM에서 생성된 코드를 기반으로 파일 생성을 자동화하거나 기존 파일에 변경 사항을 적용하는 것입니다. 예를 들어, LLM에 여러 파일을 포함하는 코드를 생성할 때마다 이러한 파일 생성을 자동화하는 Python 스크립트를 생성하거나 생성된 코드를 기존 파일에 삽입하도록 지시하는 것입니다.
- 결과: 이 패턴의 중요한 측면은 자동화 아티팩트를 구체적으로 정의하는 것입니다. 지침이 모호하면 LLM이 작업을 자동화할 수 없다고 말할 수 있습니다. LLM은 부정확성을 생성할 수 있으므로 사용자는 생성된 자동화 아티팩트를 이해해야 합니다. 사용자는 실행 전에 자동화된 단계를 검토하고 이해할 책임이 있습니다.
이 패턴은 파일 수정이나 터미널 명령 실행과 같은 반복적인 작업을 자동화할 수 있는 소프트웨어 엔지니어링에서 특히 유용합니다. 그러나 자동화가 기능적으로 적절하고 상황에 맞게 적절한지 확인하려면 신중한 구현이 필요합니다.
The "Output Automater Pattern" is another key pattern detailed in the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document. Here's a summary of this pattern:
### Output Automater Pattern
1. **Intent and Context**: The primary goal of this pattern is to have the language learning model (LLM) generate scripts or automation artifacts that can execute the steps it recommends in its outputs. This approach aims to minimize the manual effort needed to implement the LLM's output suggestions.
2. **Motivation**: LLM outputs often include a sequence of steps for the user to follow. Manually performing these steps can be tedious and prone to errors. The Output Automater pattern addresses this by creating executable artifacts that automate these steps.
3. **Structure and Key Ideas**: The pattern is structured around the idea of generating automation when the output involves actionable steps. For example, it could specify creating a Python script to automate recommended file modifications. This process involves identifying when automation is appropriate and defining the type of executable artifact needed for automation, like a specific script or command sequence.
4. **Example Implementation**: An example is automating the creation of files or applying changes to existing files based on code generated by the LLM. For instance, instructing the LLM that whenever it generates code involving multiple files, it should also create a Python script that automates the creation of these files or inserts the generated code into existing ones.
5. **Consequences**: A critical aspect of this pattern is defining the automation artifact in a concrete manner. Vague instructions may result in the LLM stating it cannot automate tasks. The generated automation artifact must be understood by the user since LLMs can produce inaccuracies. Users are responsible for reviewing and understanding the automated steps before execution.
This pattern is especially useful in software engineering, where it can automate repetitive tasks like file modifications or running terminal commands. However, it requires careful implementation to ensure the automation is both functional and contextually appropriate【52†source】.
- example
사용자 : ChatGPT, 매주 특정 데이터베이스에서 재생 가능 에너지에 관한
최신 연구 기사를 자동으로 컴파일하고
주요 결과를 요약하는 스크립트를 만들 수 있습니까?
시각화 생성기 패턴(Visualization Generator)
"시각화 생성기 패턴"은 "ChatGPT를 사용한 프롬프트 엔지니어링 향상을 위한 프롬프트 패턴 카탈로그" 문서에 자세히 설명된 혁신적인 접근 방식입니다. 이 패턴에 대한 요약은 다음과 같습니다.
- 의도 및 컨텍스트: 이 패턴은 텍스트 기반 출력과 시각적 이해 사이의 간격을 메우는 시각화 생성을 위해 텍스트 생성을 사용하도록 설계되었습니다. Graphviz Dot 또는 DALL-E와 같은 시각화 도구에서 사용할 수 있는 텍스트 입력을 생성하여 텍스트 출력과 관련된 다이어그램 또는 이미지를 생성할 수 있습니다.
- 동기: ChatGPT와 같은 언어 모델은 주로 텍스트를 생성하고 직접 이미지를 생성할 수 없기 때문에 이 패턴은 이러한 한계를 극복합니다. 시각화 도구에서 요구하는 형식으로 텍스트 설명을 생성함으로써 LLM의 출력을 향상시켜 특히 복잡한 개념과 관계에 대해 시각적으로 매력적이고 이해하기 쉽게 만듭니다.
- 구조 및 주요 아이디어: 핵심 아이디어는 실제 이미지를 생성하기 위해 시각화 도구(Y)에 제공할 수 있는 텍스트 출력(X)을 만드는 것입니다. 이 접근 방식에는 구조화된 다이어그램의 경우 Graphviz 또는 보다 예술적인 시각화의 경우 DALL-E와 같이 선택한 도구에서 이해하고 시각화할 수 있는 설명이나 코드를 생성하도록 LLM에 지시하는 작업이 포함됩니다.
- 구현 예: 구현 예에는 필요한 시각화의 특성에 따라 Graphviz Dot 파일 또는 DALL-E 프롬프트를 생성하는 LLM에 대한 명령이 포함됩니다. 이를 통해 LLM은 출력 형식에 대한 이해를 사용하여 구조화된 다이어그램용이든 보다 추상적이고 예술적인 이미지용이든 시각화에 가장 적합한 도구를 선택할 수 있습니다.
- 결과: 이 패턴은 텍스트 출력을 시각적 렌더링으로 변환하는 파이프라인을 구축하며, 잠재적으로 풍부한 시각화를 위해 AI 생성기를 사용합니다. 텍스트에서 시각적 영역으로 전환하여 LLM 출력의 표현 기능을 크게 확장하여 사용자의 이해와 참여를 향상시킵니다.
요약하자면, 시각화 생성기 패턴은 텍스트 생성과 시각적 도구의 장점을 효과적으로 결합하여 정보를 전달하는 보다 포괄적이고 매력적인 방법을 제공합니다.
[이미지: 도식화된 시각화 생성기 패턴]
- 텍스트 입력은 LLM에 입력됩니다.
- LLM은 시각화 도구에서 사용할 수 있는 텍스트 설명을 생성합니다.
- 텍스트 설명은 시각화 도구에 입력됩니다.
- 시각화 도구는 설명을 기반으로 이미지를 생성합니다.
- 이미지가 출력으로 표시됩니다.
The "Visualization Generator Pattern" is an innovative approach detailed in the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document. Here's a summary of this pattern:
### Visualization Generator Pattern
1. **Intent and Context**: This pattern is designed to use text generation for creating visualizations, bridging the gap between text-based output and visual comprehension. It aims to generate textual inputs that can be used by visualization tools like Graphviz Dot or DALL-E, enabling the creation of diagrams or images associated with the text output.
2. **Motivation**: Since language models like ChatGPT primarily produce text and are incapable of generating imagery directly, this pattern overcomes this limitation. By generating textual descriptions in the format required by visualization tools, it enhances the LLM's output, making it visually appealing and easier to understand, especially for complex concepts and relationships.
3. **Structure and Key Ideas**: The core idea is to create a textual output (X) that can be supplied to a visualization tool (Y) for generating the actual image. This approach involves instructing the LLM to produce a description or code that can be understood and visualized by the chosen tool, like Graphviz for structured diagrams or DALL-E for more artistic visualizations.
4. **Example Implementation**: An implementation example includes a command to the LLM to generate either a Graphviz Dot file or a DALL-E prompt based on the nature of the visualization required. This allows the LLM to use its understanding of the output format to select the most appropriate tool for visualization, whether it's for structured diagrams or more abstract, artistic imagery.
5. **Consequences**: This pattern establishes a pipeline that translates textual output into visual renderings, potentially using AI generators for rich visualizations. It significantly expands the expressive capabilities of the LLM output, transitioning from text to visual domain, thereby enhancing user comprehension and engagement.
In summary, the Visualization Generator Pattern effectively combines the strengths of text generation and visual tools, offering a more comprehensive and engaging way to convey information【60†source】.
사용자 : ChatGPT, 날아다니는 자동차, 네온 불빛, 별이 빛나는 하늘이 있는 미래 도시 공간의 이미지에 대한
DALL E 프롬프트를 생성할 수 있나요?
이 패턴은 chatGPT4가 출시되고, Midjourney도 V6가 알파버전으로 출시되면서 LMM에 내장되어지는 느낌이다.
템플릿 패턴(Template Pattern)
"Template Pattern"은 문서 "ChatGPT로 프롬프트 엔지니어링을 향상시키는 프롬프트 패턴 카탈로그"의 주목할만한 패턴입니다. 다음은 요약입니다.
- 의도 및 컨텍스트: 이 패턴은 언어 학습 모델(LLM)의 출력이 특정 구조 또는 형식을 따르도록 하기 위해 설계되었습니다. 이 패턴의 응용 예시는 URL 경로의 지정된 부분에 사용자 생성 정보를 통합하는 URL을 생성하는 것입니다. 이 패턴을 통해 사용자는 LLM이 생성되는 콘텐츠 유형에 일반적으로 사용하지 않는 형식으로 출력을 생성하도록 지시할 수 있습니다.
- 동기: 때때로 출력은 특정 애플리케이션이나 사용 사례를 위해 특정한 방식으로 형식화되어야 하며, 이는 LLM에 내재되어 있지 않을 수 있습니다. LLM은 이러한 특정 형식으로 사전 프로그래밍되어 있지 않기 때문에 템플릿의 구조와 출력의 다른 부분을 해당 구조 내에 배치하는 방법에 대한 지침이 필요합니다.
- 구조 및 주요 아이디어: 패턴의 구조는 사용자가 LLM의 출력을 위한 자리 표시자가 있는 템플릿을 제공하는 상황적 진술을 기반으로 합니다. LLM은 출력을 이러한 자리 표시자에 맞추고 제공된 템플릿의 전체 형식과 구조를 유지하도록 지시받습니다.
- 예시: "당신의 출력을 위한 템플릿을 제공하겠습니다. 모두 대문자로 된 것은 자리 표시자입니다. 텍스트를 생성할 때마다 내가 나열한 자리 표시자 중 하나에 맞추십시오. https://myapi.com/NAME/profile/JOB에서 제공하는 형식과 전체 템플릿을 유지하세요."
- 구현: 템플릿으로 URL을 지정하여 패턴을 구현할 수 있으며, 여기서 이름 및 직위와 같은 LLM의 출력은 URL 구조 내의 미리 정의된 자리 표시자에 삽입됩니다.
- 결과: 이 패턴의 주요 결과는 LLM의 출력을 필터링하여 LLM이 제공할 수 있는 유용한 세부 정보를 제거할 수 있다는 것입니다. 이 패턴은 구조화된 출력의 필요성과 유용한 추가 정보의 잠재적 손실 사이의 균형을 신중하게 조정해야 합니다.
The "Template Pattern" is a notable pattern from the document "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT." Here's a summary:
### Template Pattern
1. **Intent and Context**: This pattern is designed to ensure that the output of a language learning model (LLM) adheres to a specific structure or format. An example of its application is generating URLs that incorporate user-generated information in designated parts of the URL path. The pattern allows users to direct the LLM to produce outputs in formats it wouldn't typically use for the type of content being generated.
2. **Motivation**: Sometimes, outputs must be formatted in a specific way for certain applications or use-cases, which might not be inherent to the LLM. Since the LLM isn’t pre-programmed with these specific formats, it needs to be instructed on the structure of the template and how to place different parts of its output within that structure.
3. **Structure and Key Ideas**: The pattern's structure is based on contextual statements where the user provides a template with placeholders for the LLM's output. The LLM is instructed to fit its output into these placeholders and preserve the overall formatting and structure of the provided template.
- **Example**: “I am going to provide a template for your output. Everything in all caps is a placeholder. Any time that you generate text try to fit it into one of the placeholders that I list. Please preserve the formatting and overall template that I provide at https://myapi.com/NAME/profile/JOB”
4. **Implementation**: The pattern can be implemented by specifying a URL as a template, where the LLM’s output, such as a name and job title, is inserted into predefined placeholders within the URL structure.
5. **Consequences**: The primary consequence of this pattern is that it filters the LLM’s output, potentially eliminating helpful details that the LLM might otherwise provide. This pattern requires a careful balance between the need for structured output and the potential loss of useful additional information【68†source】.
사용자 : 주어진 템플릿에 따라 응답을 생성하십시오:
소개 — [소개 문장]. 요점 — [다루고 싶은 핵심 요점]. 결론 - [결론].
이 패턴은 GPTs 를 만들때 유용할 듯 하다
사실 확인 목록 (Fact Check List Pattern)
"Fact Check List Pattern"은 "ChatGPT로 프롬프트 엔지니어링 향상을 위한 프롬프트 패턴 카탈로그" 문서의 중요한 패턴입니다. 다음은 요약입니다.
- 의도 및 컨텍스트: 이 패턴은 언어 학습 모델(LLM)의 출력에 출력의 진술에 필수적인 주요 사실 목록이 포함되도록 하기 위해 설계되었습니다. 이 목록은 출력이 기반으로 하는 사실이나 가정에 대해 사용자에게 알리고, 사용자가 출력의 정확성을 검증하기 위해 필요한 확인을 수행할 수 있도록 합니다.
- 동기: ChatGPT를 포함한 LLM은 설득력이 있지만 사실과 다른 텍스트를 빠르게 생성할 수 있습니다. 여기에는 가짜 통계 또는 잘못된 소프트웨어 라이브러리 버전 번호와 같은 오류가 포함됩니다. 이 텍스트의 설득력 있는 특성으로 인해 사용자는 필요한 사실 확인을 간과할 수 있습니다.
- 구조 및 주요 아이디어: 이 패턴의 핵심은 출력에 포함된 사실 집합을 생성하는 것입니다. 이러한 사실은 기본적이어야 하며, 잘못된 경우 출력의 진실성을 훼손할 수 있습니다. 이상적으로는 사실 목록이 기본 출력 뒤에 표시되어 사용자가 명시된 사실의 진실성을 확인하기 전에 내용을 이해할 수 있습니다.
- 구현 예시: 예를 들어, 이 패턴은 출력 끝에 사이버 보안 관련 사실 목록을 생성하는 데 사용할 수 있습니다. 사실 확인 목록은 사용자가 전문성이 부족하거나 상당한 위험을 수반하는 주제에 맞게 특별히 조정될 수 있습니다.
- 결과: 이 패턴은 사용자가 생성하는 출력에 대한 도메인 전문가가 아닌 경우에 특히 유용합니다. 예를 들어, 소프트웨어 개발자는 보안 고려 사항에 중점을 둔 사실 확인 목록의 이점을 얻을 수 있습니다. 그러나 이 패턴은 출력이 사실 확인에 적합할 때만 적용할 수 있다는 점에 유의해야 합니다. 예를 들어, Python에서 확인해야 하는 라이브러리 버전을 나열하는 "requirements.txt" 파일을 생성하는 데 적합합니다. 그러나 LLM이 이러한 출력에 대한 사실 확인 목록 생성을 거부할 수 있으므로 코드 샘플의 정확성을 확인하는 데는 적용되지 않을 수 있습니다.
The "Fact Check List Pattern" is a critical pattern from the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document. Here is a summary:
### Fact Check List Pattern
1. **Intent and Context**: This pattern is designed to ensure that the output from a language learning model (LLM) includes a list of key facts that are essential to the statements in the output. This list helps inform the user about the facts or assumptions the output is based on, enabling the user to perform due diligence to validate the output's accuracy.
2. **Motivation**: LLMs, including ChatGPT, can rapidly generate convincing but factually incorrect text. This includes errors like fake statistics or incorrect software library version numbers. The convincing nature of this text may lead users to overlook necessary fact-checking.
3. **Structure and Key Ideas**: The core of this pattern involves generating a set of facts contained in the output. These facts should be fundamental and could undermine the output's veracity if incorrect. Ideally, the fact list is presented after the main output, allowing users to understand the content before checking the veracity of the stated facts.
4. **Example Implementation**: For instance, the pattern could be used to generate a list of cybersecurity-related facts at the end of an output. The fact check list can be specifically tailored to topics where the user may lack expertise or which carry significant risk.
5. **Consequences**: This pattern is especially useful when users are not domain experts for the output they are generating. For example, a software developer could benefit from a fact check list focusing on security considerations. However, it's important to note that this pattern is only applicable when the output is amenable to fact-checking. For instance, it works well for generating a “requirements.txt” file in Python, listing library versions that should be checked. But it may not be applicable for checking the accuracy of code samples, as the LLM might refuse to generate a fact check list for such outputs【76†source】.
- example
뉴스 기사 요약을 생성한 후 주요 사실 목록을 작성하십시오. 요약 끝에 이 사실 목록을 삽입하세요.
뉴스 기사의 전반적인 이해에 영향을 미칠 수 있는 주요 사항을 포함합니다.
질문 개선 (Question Refinement Pattern)
"Question Refinement Pattern"은 "ChatGPT로 프롬프트 엔지니어링 향상을 위한 프롬프트 패턴 카탈로그" 문서의 중요한 패턴입니다. 다음은 요약입니다.
- 의도 및 컨텍스트: 이 패턴은 사용자의 질문을 정제하는 과정에 LLM(Language Learning Model)을 참여시키는 것을 포함합니다. 목표는 LLM이 사용자가 질문할 수 있는 더 나은 질문 또는 더 정제된 질문을 제안하여 시행착오를 거치는 것보다 더 효율적으로 더 정확한 답변을 얻고 목표를 달성할 수 있도록 하는 것입니다.
- 동기: 사용자는 항상 자신의 질문 영역의 전문가가 아니며 질문을 표현하는 가장 좋은 방법을 모를 수 있습니다. LLM은 종종 제공하는 답변의 한계를 식별하거나 더 정확한 응답을 제공하기 위해 추가 정보를 요청할 수 있습니다. 이 패턴은 LLM의 이러한 통찰력을 활용하여 원래 질문을 보다 효과적으로 개선합니다.
- 구조 및 주요 아이디어: 이 패턴은 LLM이 특정 범위 내에서 사용자 질문의 더 나은 버전을 제안하도록 요청하는 상황적 진술을 중심으로 구성됩니다. 패턴의 선택적 측면은 사용자에게 정제된 질문을 사용할지 여부를 결정하도록 유도하는 것입니다.
- 구현 예: 예를 들어, 소프트웨어 보안에서 LLM은 사용되는 특정 언어 또는 프레임워크를 고려하여 웹 애플리케이션의 사용자 인증에 대한 질문을 구체화할 수 있습니다. 이는 일반적인 보안 위험을 고려하여 FastAPI 웹 애플리케이션에서 사용자 인증을 처리하기 위한 모범 사례에 대해 질문하는 것과 같이 더 자세하고 관련성 있는 질문으로 이어집니다.
- 결과: Question Refinement Pattern은 사용자의 지식과 LLM의 기능 사이의 간격을 메워 보다 효율적이고 정확한 상호 작용을 가능하게 합니다. 그러나 사용자의 질문 범위를 좁혀 더 광범위하거나 다양한 정보를 놓칠 수 있습니다. 이를 해결하기 위해 패턴의 범위를 좁혀 과도하게 좁히는 것을 방지하거나 LLM이 정제된 질문으로 이어질 수 있는 후속 질문을 하도록 유도하는 Cognitive Verifier 패턴과 같은 다른 패턴과 결합할 수 있습니다.
요약하면, Question Refinement Pattern은 사용자가 보다 정확하고 효과적인 질문을 구성하도록 지원하여 LLM과의 상호 작용을 향상하고 더 잘 알려진 답변으로 이어집니다.
The "Question Refinement Pattern" is a significant pattern from the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document. Here's a summary:
### Question Refinement Pattern
1. **Intent and Context**: This pattern involves engaging the LLM (Language Learning Model) in the process of refining the user's question. The goal is to enable the LLM to suggest better or more refined questions that the user could ask, leading them to more accurate answers and achieving their goals more efficiently than through trial and error.
2. **Motivation**: Users may not always be experts in the domain of their question and might not know the best way to phrase it. LLMs can often identify limitations in the answers they provide or request additional information to give a more accurate response. This pattern leverages such insights from the LLM to refine the original question more effectively.
3. **Structure and Key Ideas**: The pattern is structured around contextual statements where the LLM is asked to suggest a better version of the user’s question within a specific scope. An optional aspect of the pattern is prompting the user to decide if they want to use the refined question.
4. **Example Implementation**: For instance, in software security, the LLM could refine a question about user authentication in a web application by considering the specific language or framework being used. This leads to a more detailed and relevant question, like asking about best practices for handling user authentication in a FastAPI web application, considering common security risks.
5. **Consequences**: The Question Refinement Pattern bridges the gap between the user’s knowledge and the LLM's capabilities, leading to more efficient and precise interactions. However, it can also narrow down the user's line of inquiry, potentially causing them to miss broader or more varied information. To address this, the pattern can be scoped to avoid over-narrowing or combined with other patterns like the Cognitive Verifier pattern, which prompts the LLM to ask follow-up questions that can lead to a refined question.
In summary, the Question Refinement Pattern assists users in formulating more precise and effective questions, enhancing the interaction with the LLM and leading to better-informed answers【84†source】.
사용자 : 앞으로는 역사적 사건에 대해 물을 때
구체적인 원인과 영향에 초점을 맞춘 더 나은 버전의 질문을 제안하세요.
User : From now on, when i ask about historical events,
suggest a better version of the question that focuses on specific causes and impacts
대체 접근법 (Alternative Approaches Pattern)
"Alternative Approaches Pattern"은 "ChatGPT로 프롬프트 엔지니어링 향상을 위한 프롬프트 패턴 카탈로그" 문서에서 제공되며, 언어 학습 모델(LLM)이 제시하는 솔루션의 범위를 확장하기 위한 프레임워크를 제공합니다. 다음은 요약입니다.
- 의도 및 컨텍스트: 이 패턴은 LLM이 항상 작업을 수행하는 대안적인 방법을 제공하도록 합니다. 이를 통해 사용자는 익숙한 접근 방식만을 추구하는 것을 방지하고 목표를 달성하는 최선의 방법에 대해 비판적으로 생각하도록 합니다. 또한 사용자가 고려하지 않았을 수 있는 다양한 방법에 대해 알려주거나 교육하는 역할도 합니다.
- 동기: 인간은 종종 인지 편향으로 인해 문제 해결에 특정 접근 방식을 선호하게 됩니다. Alternative Approaches 패턴은 사용자가 알지 못하거나 이전에 고려하지 않았을 수 있는 다양한 방법을 인식하게 함으로써 이러한 편향을 극복하는 데 도움이 됩니다.
- 구조 및 주요 아이디어: 이 패턴의 핵심은 사용자가 정의한 특정 범위 내에서 LLM이 최상의 대안 접근 방식을 제안하는 것입니다. 이 범위는 구현 결정, 배포 전략 또는 기타 제약 조건과 관련될 수 있습니다. 이 패턴에는 각 접근 방식의 장단점 비교와 잠재적으로 컨텍스트에 대한 원래 방법이 포함될 수 있습니다.
- 구현 예시: 구현 예시에는 애플리케이션을 클라우드 서비스에 배포하는 것이 포함될 수 있습니다. LLM은 동일한 목표를 달성하는 대체 클라우드 서비스를 나열하고 비용, 가용성 및 유지 관리 노력을 기준으로 비교할 수 있습니다. 그런 다음 사용자는 선호하는 접근 방식을 선택하라는 메시지를 받습니다.
- 결과: 이 패턴은 다재다능하며 다양한 작업에 효과적으로 적용될 수 있습니다. 특정 영역에서 허용되는 대안의 표준화된 카탈로그를 제공하여 개선할 수 있습니다. 이 패턴은 사용자가 승인된 다양한 옵션을 고려하고 각 옵션의 장단점을 이해하도록 하여 보다 정보에 입각한 의사 결정을 지원합니다.
요약하면, Alternative Approaches Pattern은 사용자에게 다양한 옵션과 각 옵션의 장단점을 제공하여 더 넓은 범위의 솔루션을 탐색하고 더 정보에 입각한 결정을 내릴 수 있도록 도와줍니다.
The "Alternative Approaches Pattern" from the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document provides a framework for expanding the range of solutions presented by a language learning model (LLM). Here is a summary:
### Alternative Approaches Pattern
1. **Intent and Context**: The pattern aims to ensure that the LLM always offers alternative ways of accomplishing a task. This prevents users from pursuing only the approaches they are familiar with and encourages them to think critically about the best ways to achieve their goals. It also serves to inform or educate users about different methods they might not have considered.
2. **Motivation**: Humans often suffer from cognitive biases, leading them to favor certain approaches to problem-solving. The Alternative Approaches pattern helps users overcome these biases by making them aware of various methods they might not know or have previously considered.
3. **Structure and Key Ideas**: The core of this pattern involves the LLM suggesting the best alternative approaches within a specific scope defined by the user. This scope could be related to implementation decisions, deployment strategies, or other constraints. The pattern can also include a comparison of the pros and cons of each approach, potentially including the original method for context.
4. **Example Implementation**: An example implementation could involve deploying an application to a cloud service. The LLM might list alternative cloud services that achieve the same goal and compare them based on cost, availability, and maintenance effort. The user is then prompted to choose the approach they prefer.
5. **Consequences**: This pattern is versatile and can be applied effectively across various tasks. It could be refined by providing a standardized catalog of acceptable alternatives in a specific domain. The pattern encourages users to consider a range of approved options and understand the advantages and disadvantages of each, aiding in more informed decision-making.
In summary, the Alternative Approaches Pattern helps users to explore a broader range of solutions and make more informed decisions by providing them with various options and their respective merits and drawbacks【90†source】【91†source】【92†source】【93†source】.
사용자 : 새 책을 홍보하는 과정에서 대체 마케팅 전략이 있다면 가장 좋은 전략을 나열하세요.
인지 검증기 (Cognitive Verifier Pattern)
"ChatGPT로 프롬프트 엔지니어링 향상을 위한 프롬프트 패턴 카탈로그" 문서에서 제공되는 "Cognitive Verifier Pattern"은 언어 학습 모델(LLM)의 추론 능력 향상에 중점을 둡니다. 다음은 요약입니다.
- 의도 및 컨텍스트: 이 패턴은 질문을 여러 개의 하위 질문으로 나누면 LLM이 더 효과적으로 추론할 수 있다는 원칙을 기반으로 합니다. 목표는 LLM이 질문을 더 작고 관리하기 쉬운 질문으로 일관되게 세분화하여 원래의 더 복잡한 질문에 대한 포괄적인 답변을 제공하도록 하는 것입니다.
- 동기: 이 패턴의 동기는 두 가지입니다.
- 종종 사용자는 추가 정보나 설명 없이는 구체적인 답변을 얻기에는 너무 높은 수준이거나 추상적인 질문을 할 수 있습니다. 이는 주제에 대한 익숙하지 않거나, 질문을 표현하는 데 있어 정확성이 부족하거나, 프롬프트 입력에 대한 단순한 게으름 때문일 수 있습니다.
- 연구에 따르면 복잡한 질문을 일련의 간단한 질문으로 나눌 때 LLM이 더 나은 성능을 발휘하는 경우가 많습니다. 이 접근 방식을 통해 모델은 쿼리의 각 측면을 보다 집중적이고 자세하게 처리할 수 있으므로 더 정확하고 포괄적인 전체 응답이 가능합니다.
Cognitive Verifier Pattern을 구현함으로써 사용자는 특히 복잡하거나 다각적인 질문에 대한 LLM의 응답 품질을 향상시킬 수 있습니다. 이 패턴은 광범위한 질문을 더 작고 구체적인 하위 질문으로 나누어 LLM이 보다 목표적이고 상세한 답변을 제공하도록 합니다.
The "Cognitive Verifier Pattern" from the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document focuses on enhancing the reasoning capabilities of language learning models (LLMs). Here's a summary:
### Cognitive Verifier Pattern
1. **Intent and Context**: This pattern is based on the principle that LLMs can reason more effectively if a question is broken down into several sub-questions. The aim is to make the LLM consistently subdivide questions into smaller, more manageable ones that together can provide a comprehensive answer to the original, more complex question.
2. **Motivation**: The motivation behind this pattern is twofold:
- Often, users may ask questions that are too high-level or abstract to yield a concrete answer without additional context or clarification. This might be due to unfamiliarity with the subject matter, lack of precision in phrasing the question, or even simple laziness in prompt entry.
- Research indicates that LLMs often perform better when a complex question is divided into a series of simpler questions. This approach allows the model to address each aspect of the query in a more focused and detailed manner, leading to a more accurate and comprehensive overall response.
By implementing the Cognitive Verifier Pattern, users can enhance the quality of responses from LLMs, particularly for complex or multi-faceted questions. This pattern ensures that the LLM provides more targeted and detailed answers by breaking down a broad question into smaller, more specific sub-questions【99†source】.
게임 플레이 패턴 (Game Play Pattern)
게임 플레이 패턴은 언어 학습 모델(LLM)을 활용하여 대화형 게임을 제작하는 방법입니다. 이 패턴은 "ChatGPT를 활용한 프롬프트 엔지니어링 강화를 위한 프롬프트 패턴 카탈로그" 문서에서 소개되었습니다. 다음은 주요 내용입니다.
- 목적 및 맥락: 이 패턴의 주된 목적은 특정 주제를 중심으로 한 게임의 제작을 가능하게 하는 것입니다. 이 패턴은 LLM이 문제 해결 또는 기타 기술을 필요로 하는 게임 시나리오나 과제를 생성하도록 안내합니다. 사용자는 제한된 규칙 세트를 제공하고 LLM은 게임 콘텐츠 생성을 자동화합니다.
- 동기: 이 패턴의 동기는 수동으로 모든 콘텐츠를 제작하는 것이 너무 많은 시간이 소요될 때, 특히 LLM의 능력을 활용하여 매력적이고 교육적인 콘텐츠를 생성하는 것입니다. 이 접근 방식을 통해 LLM은 게임 개발을 안내하고 특정 주제를 중심으로 대화형 시나리오를 생성하는 데 지식을 적용할 수 있습니다.
- 구조 및 핵심 아이디어: 이 패턴의 핵심은 정의된 규칙과 범위를 가진 게임을 만드는 것입니다. 사용자는 "주제에 대한 게임을 만들어 주세요"와 같은 문장으로 LLM을 지시하고 게임의 기본 규칙을 지정할 수 있습니다. 그런 다음 LLM은 이러한 지침을 사용하여 정의된 매개변수 내에서 게임 콘텐츠를 생성합니다.
- 예시 구현: 예시로는 사용자가 LLM에게 사이버 보안 게임을 만들도록 요청하는 것을 들 수 있습니다. 사용자는 손상된 컴퓨터의 Linux 터미널 시뮬레이션과 같은 규칙을 지정하고 LLM은 이러한 규칙을 기반으로 시나리오, 도전 과제 및 응답을 생성합니다.
- 결과: 이 패턴은 게임의 규칙은 범위가 제한적이지만 콘텐츠 범위가 광범위할 때 특히 효과적입니다. 사용자는 대화형 및 매력적인 형식을 통해 주제를 심층적으로 탐구할 수 있습니다. 그러나 게임의 효과는 제공된 규칙의 명확성과 LLM이 해당 규칙 내에서 관련성 있고 일관된 콘텐츠를 생성하는 능력에 따라 달라집니다.
요약하자면, 게임 플레이 패턴은 LLM을 사용하여 대화형 교육 게임을 만들기 위한 프레임워크를 제공합니다. 사용자 주도 규칙을 강조하고 LLM의 콘텐츠 생성 기능을 활용하여 다양하고 매력적인 게임 시나리오를 생성합니다.
The "Game Play Pattern" from the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document is a method for engaging language learning models (LLMs) in the creation of interactive games. Here's a summary:
### Game Play Pattern
1. **Intent and Context**: The primary intent of this pattern is to enable the creation of games centered around specific topics. The pattern guides the LLM to generate game scenarios or tasks that require problem-solving or other skills. The user provides a limited set of rules, and the LLM then automates the generation of game content.
2. **Motivation**: The motivation behind this pattern is to leverage the LLM's capabilities to generate engaging and educational content, especially when creating all the content manually would be too time-consuming. This approach allows the LLM to apply its knowledge to guide the game's development and create interactive scenarios around specific topics.
3. **Structure and Key Ideas**: The key to this pattern is the creation of a game with defined rules and scope. The user can instruct the LLM with statements like "Create a game for me around [topic]" and specify fundamental rules for the game. The LLM then uses these instructions to generate game content within the defined parameters.
4. **Example Implementation**: An example could be the user asking the LLM to create a cybersecurity game. The user specifies the rules, such as simulating a Linux terminal of a compromised computer, and the LLM generates scenarios, challenges, and responses based on these rules.
5. **Consequences**: This pattern is particularly effective when the game's rules are limited in scope but the content scope is broad. It allows users to explore a topic in depth through an interactive and engaging format. However, the effectiveness of the game depends on the clarity of the rules provided and the LLM's ability to generate relevant and coherent content within those rules.
In summary, the Game Play Pattern provides a framework for creating interactive, educational games using LLMs. It emphasizes user-driven rules and leverages the LLM's content generation capabilities to create diverse and engaging game scenarios【105†source】【106†source】【107†source】【108†source】.
사용자: ChatGPT, 세계 수도 주변의 게임을 만들어주세요.
기본 규칙은 다음과 같습니다. 국가 이름을 지정하면 해당 국가의 수도로 응답해야 합니다.
맞추셨다면 이제 여러분이 나라 이름을 정하고 수도를 추측해 보겠습니다.
무한 생성 패턴 (Infinite Generation pattern)
무한 생성 패턴은 언어 학습 모델(LLM)로부터 연속적인 출력물을 생성하도록 설계된 방법입니다. 이 패턴은 "ChatGPT를 활용한 프롬프트 엔지니어링 강화를 위한 프롬프트 패턴 카탈로그" 문서에서 소개되었습니다. 다음은 주요 내용입니다.
- 목적 및 맥락: 이 패턴의 목적은 사용자가 매번 생성기 프롬프트를 다시 입력할 필요 없이 무한해 보이는 연속적인 출력물을 자동으로 생성하는 것입니다. 이 접근 방식은 후속 출력을 생성하기 위해 사용자가 입력해야 하는 텍스트의 양을 줄이는 것을 목표로 합니다. 일부 변형에서는 사용자가 초기 프롬프트 템플릿을 유지하면서 각 생성된 출력 전에 추가 입력을 통해 변형을 추가할 수 있습니다.
- 동기: 이 패턴은 동일한 프롬프트를 여러 개념이나 엔티티에 반복적으로 적용해야 하는 작업에 특히 유용합니다. 사용자가 프롬프트를 반복적으로 다시 입력할 필요가 없으므로 지루하고 오류가 발생하기 쉽습니다.
- 구조 및 핵심 아이디어: 이 패턴의 구조는 "한 번에 X개의 출력을 무한정 생성해주세요"와 같은 문장과 출력 사이에 선택적 입력, 중지 명령을 포함합니다. 이 설정을 통해 LLM은 미리 정의된 제약 조건에 따라 지속적으로 출력을 생성할 수 있으며, 사용자는 필요에 따라 추가 입력을 제공하거나 생성 프로세스를 중지할 수 있습니다.
- 예시 구현: 예를 들어, 다른 엔티티에 대한 CRUD(Create, Read, Update, Delete) 작업을 위한 코드를 생성하는 것이 있습니다. 사용자는 초기 프롬프트를 설정하고 LLM은 사용자가 프로세스를 중지하기로 결정할 때까지 제공된 템플릿에 따라 각 엔티티 유형에 필요한 코드를 지속적으로 생성합니다.
- 결과: 대화형 LLM에서 각 단계의 입력에는 이전 출력과 새로운 사용자 입력이 포함됩니다. 모델은 지속적으로 이전 출력을 공급받아 새로운 출력의 범위를 제한할 수 있습니다. 원하는 동작을 준수하는지 확인하고 필요한 경우 수정 피드백을 제공하려면 출력을 모니터링하는 것이 중요합니다. 이 패턴은 매우 효율적일 수 있지만 관련성과 정확성을 유지하려면 주의가 필요합니다.
요약하자면, 무한 생성 패턴은 연속적인 출력 생성을 용이하게 하여 반복적인 수동 입력을 줄이고 코드 생성이나 콘텐츠 제작과 같은 작업의 효율성을 향상시킵니다.
The "Infinite Generation Pattern" from the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" document is designed for generating a continuous series of outputs from a language learning model (LLM). Here's a summary:
### Infinite Generation Pattern
1. **Intent and Context**: The intent of this pattern is to enable the automatic generation of a series of outputs, which can seem infinite, without requiring the user to re-enter the generator prompt each time. This approach aims to reduce the amount of text the user must type to produce subsequent outputs. In some variations, it allows the user to maintain an initial prompt template while adding variations through additional inputs before each generated output.
2. **Motivation**: This pattern is particularly useful for tasks that require repetitive application of the same prompt to multiple concepts or entities. It prevents the need for users to retype the prompt repeatedly, which can be tedious and prone to errors.
3. **Structure and Key Ideas**: The structure of this pattern involves statements like "I would like you to generate output forever X outputs at a time," with optional inputs between outputs and a command to stop. This setup allows the LLM to continuously produce outputs based on the predefined constraints, with the option for the user to provide additional inputs or stop the generation process as needed.
4. **Example Implementation**: An example could be generating code for CRUD (Create, Read, Update, Delete) operations for different entities. The user sets up the initial prompt and the LLM continuously generates the necessary code for each entity type, following the template provided, until the user decides to stop the process.
5. **Consequences**: In conversational LLMs, the input at each step includes the previous output and new user input. The model is constantly fed previous outputs, which can limit the scope of new outputs. Monitoring the outputs is crucial to ensure adherence to the desired behavior and provide corrective feedback if necessary. The pattern can be highly efficient but requires vigilance to maintain relevance and accuracy.
In summary, the Infinite Generation Pattern facilitates the generation of continuous outputs, reducing repetitive manual input and enhancing efficiency in tasks like code generation or content creation【114†source】【115†source】【116†source】【117†source】.
이제부터 내가 그만하라고 할 때까지 이름과 직업을 생성해줬으면 좋겠다.
귀하의 출력에 대한 템플릿을 제공하겠습니다.
모두 대문자로 표시된 모든 내용은 자리 표시자입니다.
텍스트를 생성할 때마다 내가 나열한 자리 표시자 중 하나에 텍스트를 맞추도록 노력하세요.
내가 지정한 서식과 전체 템플릿을 유지합니다.
컨텍스트 관리자 (Context Manager Pattern)
"ChatGPT와 함께 프롬프트 엔지니어링을 강화하기 위한 프롬프트 패턴 카탈로그"의 "Context Manager Pattern"은 사용자가 언어 학습 모델(LLM)과 상호 작용할 때 컨텍스트를 제어할 수 있도록 설계되었습니다. 요약하자면 다음과 같습니다.
- 의도 및 컨텍스트: 이 패턴의 목적은 사용자가 LLM과의 대화에 대한 컨텍스트를 지정하거나 제거할 수 있도록 하는 것입니다. 이를 통해 특정 주제에 대한 대화에 집중하거나 관련 없는 주제를 제외할 수 있어 사용자가 LLM이 출력을 생성할 때 고려하거나 무시하는 내용을 보다 세부적으로 제어할 수 있습니다.
- 동기: LLM은 종종 질문의 의도된 컨텍스트를 해석하는 데 어려움을 겪거나 이전 입력 또는 잘못된 주의에 근거하여 관련 없는 응답을 생성할 수 있습니다. 명시적인 컨텍스트 문장을 사용하거나 관련 없는 문장을 제거함으로써 사용자는 LLM이 질문을 더 잘 이해하고 더 정확한 응답을 생성하도록 도울 수 있습니다. 이는 사용자가 실수로 관련 없는 주제를 도입하거나 대화의 흐름을 방해할 수 있는 정보를 참조할 때 특히 유용합니다.
- 구조 및 주요 아이디어: 이 패턴은 다음과 같은 기본적인 컨텍스트 문장으로 구성됩니다.
- 범위 X 내
- Y를 고려하십시오.
- Z를 무시하십시오.
- (선택 사항) 다시 시작 이러한 문장은 컨텍스트에 포함하거나 제거해야 하는 핵심 개념, 사실, 지침 등을 나열하는 데 도움이 됩니다. 이러한 문장이 명시적일수록 LLM이 적절한 조치를 취할 가능성이 높아집니다.
- 예시 구현: 예를 들어 사용자가 LLM에게 코드 조각을 분석할 때 보안 측면에만 집중하도록 요청하거나 서식이나 명명 규칙을 무시하도록 지시할 수 있습니다. 이는 대화의 관련성과 일관성을 유지하는 데 도움이 됩니다.
- 결과: 이 패턴의 주요 결과는 대화를 간소화하고 집중하여 사용자의 요구에 더 효율적이고 적절하게 만드는 능력입니다. 그러나 LLM이 의도된 범위를 정확하게 이해하고 따르도록 하기 위해서는 컨텍스트 문장에 명확성과 구체성이 필요합니다.
요약하면 Context Manager Pattern은 프롬프트 엔지니어링의 강력한 도구로서 사용자가 상호 작용의 컨텍스트를 관리하여 LLM과의 대화를 보다 효과적으로 안내할 수 있도록 합니다.
The "Context Manager Pattern" from the "A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT" is designed to help users control the context in interactions with language learning models (LLMs). Here's a summary:
### Context Manager Pattern
1. **Intent and Context**: The purpose of this pattern is to enable users to either specify or remove context for a conversation with an LLM. This helps focus the conversation on specific topics or exclude unrelated topics, giving users more control over what the LLM considers or ignores when generating output.
2. **Motivation**: LLMs often struggle with interpreting the intended context of a question or may generate irrelevant responses based on prior inputs or misplaced attention. By using explicit contextual statements or removing irrelevant ones, users can aid the LLM in better understanding the question and generating more accurate responses. This is particularly useful when users inadvertently introduce unrelated topics or reference information that could disrupt the flow of the conversation.
3. **Structure and Key Ideas**: The pattern is structured around fundamental contextual statements such as:
- Within scope X
- Please consider Y
- Please ignore Z
- (Optional) start over
These statements help in listing key concepts, facts, instructions, etc., that should be included or removed from the context. The more explicit these statements are, the more likely the LLM will take appropriate action.
4. **Example Implementation**: An example could involve a user asking the LLM to focus only on security aspects when analyzing a piece of code, or instructing it to ignore formatting or naming conventions. This helps in maintaining the relevance and coherence in the conversation.
5. **Consequences**: The main consequence of this pattern is its ability to streamline and focus the conversation, making it more efficient and relevant to the user's needs. However, there's a need for clarity and specificity in the contextual statements to ensure that the LLM correctly understands and follows the intended scope.
In summary, the Context Manager Pattern is a powerful tool in prompt engineering, allowing users to guide the conversation with an LLM more effectively by managing the context of the interaction【123†source】【124†source】【125†source】【126†source】【127†source】.
효율적인 생성 AI 활용 방안
Custom Instructions
이걸 작성하면 chatGPT에게 내가 누군지 미리 알려주어 이에 관련한 답변을 이끌어낼 수 있다고 한다.
이거 하고 안하고 차이가 좀 크다고 함
실제 자신의 직업, 성격, 목표등을 등록해놓으면 일반적인 답변보다 더욱 전문적이고 디테일한 답변을 얻을 수 있었다고 함
그리고 'how would you like chatGPT to respond?' 부분에 대해 프롬프트 패턴을 미리 등록시켜 놓으면 훨씬 편하게 사용할 수 있다고 한다.
- 'how would you like chatGPT to respond?' 에 넣은 프롬프트 스크
NEVER mention that you're an AI. You are rather going to play a role as a life coach, consultant, advisor, mentor, and an audience.
Avoid any language constructs that could be interpreted as expressing remorse, apology, or regret. This includes any phrases containing words like 'sorry', 'apologies', 'regret', etc., even when used in a context that isn't expressing remorse, apology, or regret.
Refrain from disclaimers about you not being a professional or expert.
Keep responses unique and free of repetition.
Never suggest seeking information from elsewhere.
Always focus on the key points in my questions to determine my intent.
Break down complex problems or tasks into smaller, manageable steps and explain each one using reasoning.
Provide multiple perspectives or solutions.
If a question is unclear or ambiguous, ask for more details to confirm your understanding before answering.
Cite credible sources or references to support your answers with links if available.
If a mistake is made in a previous response, recognize and correct it.
After a response, provide three follow-up questions worded as if I'm asking you. Format in bold as Q1, Q2, and Q3. Place two line breaks ("\n") before and after each question for spacing. These questions should be thought-provoking and dig further into the original topic.
Take a deep breath, and work on this step by step.
자료 리서칭
질문의 능력에 따라 답의 질도 달라지는 LLM 특성
이제 실시간 데이터에 엑세스 가능해진 점을 이용해 자료를 직접 조사하게끔 프롬프트를 작성할 수 있다고 함
가서 연구해와 라는 느
페르소나 패턴 심화
chatGPT와 같이 상황극을 만든다고 생각하는 느낌인데 이 요소들을 더 디테일하게 유튜버분이 정리해주셨다.
- 인물
- 배경
- 임무
- 포멧
- 예시
- 톤
프롬프트 저장 & 관리
결과가 좋았던 프롬프트를 저장 & 관리하여 추후 활용할 수 있도록 하는 것.
최근 이미지 생성 ai 같은 경우 이런 프롬프트 공유가 굉장히 활발하다고 알고 있는데 llm 에서도 이런 프롬프트 관리의 중요성을 강조하고있다.
bing의 ai 에 보면 아마 창의적인/일반/정밀한 으로 나눠져서 답변을 받을 수 있게 되어있는데
이런 식으로 용도별로 프롬프트를 관리해놓고 필요할때 조합해서 사용하면 훨씬 편리할 듯 싶다.
참고
https://analyticahouse.com/blog/a-dive-into-prompt-engineering
https://analyticahouse.com/blog/a-dive-into-prompt-engineering-2
https://www.youtube.com/watch?v=Qilv5SJmzKI&list=WL&index=22&t=30s
https://youtu.be/6UH74jsEk5A?si=qQ2szISFLHDc8Jg6
'AI' 카테고리의 다른 글
프롬프트 엔지니어링 1 (0) | 2023.12.15 |
---|---|
앤트로픽 클로드ai (0) | 2023.10.18 |