Prompt for RAG
Collection
Prompt Template for RAG
β’
2 items
β’
Updated
β’
1
[ Instruction ] :
- Your mission is to generate detailed ONE QUESTION that can yield correct answers from the GIVEN CONTEXT.
- When creating a QUESTION, you should carefully consider the following items:
- Requirements : Essential requirements that must be included
- Style : The form and style of the generated question
- Think : Elements and procedures you need to self-examine for the created question
<Requirements>
- The questions you generate must always maintain high quality.
- Please do not print and generate any other unnecessary words.
- The Questions are created from the given context, but it must be created with an appropriate balance between general content and domain-specific content.
- If the given context related figure, you must generate the question related figure data.
- Finally, verify that the generated question contains only ONE QUESTION itself without any unnecessary description or content.
</Requirements>
<Style>
- The expressions you use should either be inferred from the given context or be directly used expressions.
- Any expressions involving formulas must always be enclosed within $ symbols.
- Text that is conceptually represented with subscripts or superscripts should be expressed as mathematical formulas.
- You should compose questions that are as natural as possible within the context.
</Style>
Now, It's your turn. You must generate long and detailed high-quality questions from the given context while following the mentioned <Requirements> and <Style>.
The examples below consist of positive samples and negative samples. Please refer to the given examples to generate your answer.
When you generated QUESTION, you should take a deep breath and think step-by-step and generate the most natural Korean question.
<Example>
- chunk :
1) 곡μ (μ€λΉ) μ μ λ° νΉμ§
β μ¬μΆμ±ν μ μ
- μ¬μΆμ±νμ΄λ νλΌμ€ν± μ±νλ² μ€μ ν λ°©λ²μΌλ‘μ, μ΄κ°μμ± μμ§λ₯Ό κ°μ΄ν΄μ μ λ μνλ‘ λμμ λ κΈνμ 곡λλΆ(Cavity, μ΄ν βμΊλΉν°β)μ κ°μ μ£Όμ
νμ¬ κΈν λ΄μμ λκ°μν΄μΌλ‘μ¨, κΈνμ 곡λλΆμ μλΉνλ μ±ννμ λ§λλ λ°©λ²μ΄λ€.
β μ¬μΆμ±ν νΉμ§
β μ±ν μ¬μ΄ν΄μ΄ μ§§κ³ , μ±ν λ₯λ₯ μ΄ μ’λ€. (λλ μμ° κ°λ₯)
β‘ κ΄λ²μν μμ§μ μ±ν (μ΄κ°μμ± μμ§, μ΄κ²½νμ± μμ§)
β’ μλμ μ΄νκ° κ°λ₯νλ€.
β£ νμ¬ λν μ±ννμ μ±ν κ°λ₯νλ€.
β€ μ λ°λκ° λμ 볡μ‘ν λͺ¨μ κ°λ₯νλ€.
- positive sample :
- μ¬μΆμ±νμ κ³Όμ μ μλμ μ΄νκ° κ°λ₯νκ°?
- μ¬μΆμ±νμ μ μλ 무μμΈκ°?
- μ¬μΆμ±νμ νΉμ§μ΄ 무μμΈκ°?
- μ¬μΆμ±ν κ³Όμ μμ λλμμ°μ΄ κ°λ₯ν κ²½μ°μ μ΄λ ν νΉμ§μ μ§λλκ°?
- negative sample :
- μ¬μΆμ±νμ μ μμ νΉμ§μ κ³ λ €ν λ, μ¬μΆμ±νμ μ±ν μ¬μ΄ν΄κ³Ό μ±ν λ₯λ₯ μ νΉμ§μ 무μμ΄λ©°, μ΄ νΉμ§μΌλ‘ μΈν΄ μ΄λ€ μμ°μ΄ κ°λ₯ν΄μ§λκ°?
- μ¬μΆμ±ν μ μμ νΉμ§μ μ€λͺ
νκ³ , μ¬μΆμ±νμ μ±ν μ¬μ΄ν΄μ΄ μ§§κ³ μ±ν λ₯λ₯ μ΄ μ’μ μ΄μ λ₯Ό μ€λͺ
ν΄ μ£ΌμΈμ.
- μ¬μΆμ±νμ μλμ μ΄ν κ°λ₯μ±κ³Ό μ λ°λμ λν΄ μ€λͺ
ν΄ μ£ΌμΈμ.
- μ¬μΆμ±νμ μ μμ νΉμ§μ λ°νμΌλ‘, μ¬μΆμ±νμ 곡μ (μ€λΉ)μμ μλμ μ΄νμ μ λ°λκ° μ€μν μ΄μ λ₯Ό μ€λͺ
ν΄ μ£ΌμΈμ.
</Example>
- Given context : {context}
[ Instruction ] :
- Your mission is to review & check the context and the question to determine whether the answer to the question can be obtained from the given context, and then evolve the following question.
- If the question can be fully answered using information from the given context, please return the same question.
- If the question cannot be answered using information from the given context, please modify the question.
- This process is called <Evolving> and should be carried out according to the procedure below, ultimately returning either the original or the EVOLVING QUESTION.
<Evolving>
1. Understand the given context and question.
2. Determine whether all the information required to answer the question is present in the context.
2-1. If you conclude that all necessary information is available in the context:
2-1-1. Treat the given question as the EVOLVING QUESTION.
2-2. If you conclude that not all necessary information is present in the context:
2-2-1. Modify the form or content of the question so that it can be answered using only the information provided in the context.
2-2-2. Treat the modified question as the EVOLVING QUESTION.
3. Return the evolving question.
</Evolving>
You can refer to the following examples when performing the <Evolving> process, however you must never explain the <Evolving> process. Only provide the EVOLVING QUESTION.
Take sufficient time to think logically through each step as you proceed.
If you create a high-quality EVOLVING QUESTION, you may receive a small tip.
Now it's your turn. Take a deep breath and start!
<Example>
- chunk :
1) 곡μ (μ€λΉ) μ μ λ° νΉμ§
β μ¬μΆμ±ν μ μ
- μ¬μΆμ±νμ΄λ νλΌμ€ν± μ±νλ² μ€μ ν λ°©λ²μΌλ‘μ, μ΄κ°μμ± μμ§λ₯Ό κ°μ΄ν΄μ μ λ μνλ‘ λμμ λ κΈνμ 곡λλΆ(Cavity, μ΄ν βμΊλΉν°β)μ κ°μ μ£Όμ
νμ¬ κΈν λ΄μμ λκ°μν΄μΌλ‘μ¨, κΈνμ 곡λλΆμ μλΉνλ μ±ννμ λ§λλ λ°©λ²μ΄λ€.
β μ¬μΆμ±ν νΉμ§
β μ±ν μ¬μ΄ν΄μ΄ μ§§κ³ , μ±ν λ₯λ₯ μ΄ μ’λ€. (λλ μμ° κ°λ₯)
β‘ κ΄λ²μν μμ§μ μ±ν (μ΄κ°μμ± μμ§, μ΄κ²½νμ± μμ§)
β’ μλμ μ΄νκ° κ°λ₯νλ€.
β£ νμ¬ λν μ±ννμ μ±ν κ°λ₯νλ€.
β€ μ λ°λκ° λμ 볡μ‘ν λͺ¨μ κ°λ₯νλ€.
- question : μ¬μΆμ±ν μ μμ νΉμ§μ μ€λͺ
νκ³ , μ¬μΆμ±νμ μ±ν μ¬μ΄ν΄μ΄ μ§§κ³ μ±ν λ₯λ₯ μ΄ μ’μ μ΄μ λ₯Ό μ€λͺ
ν΄ μ£ΌμΈμ.
- EVOLVING QUESTION : μ¬μΆμ±ν μ μμ νΉμ§μ μ€λͺ
νκ³ , κ·Έμ€ λλ μμ°μ κ°λ₯νκ² νλ μ΄μ κ° μ΄λ€ κ²μΈμ§ μλ €μ£ΌμΈμ.
</Example>
- Given context : {context}
- Question :{question}
- EVOLVING QUESTION :
[ Instruction ] :
- Your mission is to produce an accurate answer by reviewing the provided CONTEXT and QUESTION.
- When creating your ANSWER, you must use the information from the CONTEXT and strive to make your response as detailed and high-quality as possible.
- Please refer to the <Example> below to create your ANSWER.
<Example>
- CONTEXT :
1) 곡μ (μ€λΉ) μ μ λ° νΉμ§
β μ¬μΆμ±ν μ μ
- μ¬μΆμ±νμ΄λ νλΌμ€ν± μ±νλ² μ€μ ν λ°©λ²μΌλ‘μ, μ΄κ°μμ± μμ§λ₯Ό κ°μ΄ν΄μ μ λ μνλ‘ λμμ λ κΈνμ 곡λλΆ(Cavity, μ΄ν βμΊλΉν°β)μ κ°μ μ£Όμ
νμ¬ κΈν λ΄μμ λκ°μν΄μΌλ‘μ¨, κΈνμ 곡λλΆμ μλΉνλ μ±ννμ λ§λλ λ°©λ²μ΄λ€.
β μ¬μΆμ±ν νΉμ§
β μ±ν μ¬μ΄ν΄μ΄ μ§§κ³ , μ±ν λ₯λ₯ μ΄ μ’λ€. (λλ μμ° κ°λ₯)
β‘ κ΄λ²μν μμ§μ μ±ν (μ΄κ°μμ± μμ§, μ΄κ²½νμ± μμ§)
β’ μλμ μ΄νκ° κ°λ₯νλ€.
β£ νμ¬ λν μ±ννμ μ±ν κ°λ₯νλ€.
β€ μ λ°λκ° λμ 볡μ‘ν λͺ¨μ κ°λ₯νλ€.
- QUESTION : μ¬μΆμ±ν μ μμ νΉμ§μ μ€λͺ
νκ³ , κ·Έμ€ λλ μμ°μ κ°λ₯νκ² νλ μ΄μ κ° μ΄λ€ κ²μΈμ§ μλ €μ£ΌμΈμ.
- ANSWER : μ¬μΆμ±νμ νλΌμ€ν± μ±νλ²μ ν μ’
λ₯λ‘ μ΄κ°μμ± μμ§λ₯Ό κ°μ΄ν΄μ μ λ μνλ‘ λμμ λ κΈνμ 곡λλΆ(Cavity, μ΄ν 'μΊλΉν°')μ κ°μ μ£Όμ
νμ¬ κΈν λ΄μμ λκ°μν΄μΌλ‘μ¨, κΈνμ 곡λλΆμ μλΉνλ μ±ννμ λ§λλ λ°©λ²μ μλ―Έν©λλ€. μ΄λ¬ν μ¬μΆμ±νμ λνμ μΌλ‘ μλμ μ΄νκ° κ°λ₯νλ€λ μ , λν μ±ννμ μ±νμ΄ κ°λ₯νλ€λ μ , λμ μ λ°λλ₯Ό μ΄μ©ν 볡μ‘ν λͺ¨μμ μ±νλ κ°λ₯νλ€λ μ λ± μ¬λ¬ νΉμ§μ κ°μ§κ³ μμ΅λλ€. νΉν μ±ν μ¬μ΄ν΄μ΄ μ§§κ³ , μ±ν λ₯λ₯ μ΄ μ’λ€λ νΉμ§μ λλ μμ°μ κ°λ₯νκ² ν©λλ€.
</Example>
Take sufficient time to think logically through each step as you proceed.
If you create a detail high-quality ANSWER, you may receive a small tip.
Now it's your turn. Take a deep breath and start!
- CONTEXT : {context}
- QUESTION :{question}
- ANSWER :