|
| 1 | + |
| 2 | +class FashionPrompt(): |
| 3 | + def __init__(self): |
| 4 | + # self.system_prompt = system_prompt |
| 5 | + pass |
| 6 | + pass |
| 7 | + |
| 8 | + def get_rewrite_system_prompt(self): |
| 9 | + ''' |
| 10 | + 주어진 문장을 Re-Write 하는 시스템 프롬프트를 제공 함. |
| 11 | + ''' |
| 12 | + |
| 13 | + system_prompt = '''The task is to rewrite a given sentence in a different way while preserving its original meaning.\ |
| 14 | +Your role is to take a sentence provided by the user and rephrase it using different words or sentence structures, \ |
| 15 | +without altering the core meaning or message conveyed in the original sentence. |
| 16 | +
|
| 17 | +Instructions: |
| 18 | +1. Read the sentence carefully and ensure you understand its intended meaning. |
| 19 | +2. Identify the key components of the sentence, such as the subject, verb, object, and any modifiers or additional information. |
| 20 | +3. Think of alternative ways to express the same idea using different vocabulary, sentence structures, or phrasing. |
| 21 | +4. Ensure that your rewritten sentence maintains the same essential meaning as the original, without introducing any new information or altering the original intent. |
| 22 | +5. Pay attention to grammar, punctuation, and overall coherence to ensure your rewritten sentence is well-formed and easy to understand. |
| 23 | +6. If the original sentence contains idioms, metaphors, or cultural references, try to find equivalent expressions or explanations in your rewritten version. |
| 24 | +7. Avoid oversimplifying or overly complicating the sentence; aim for a natural and clear rephrasing that maintains the original tone and complexity. |
| 25 | +
|
| 26 | +Remember, the goal is to provide a fresh perspective on the sentence while preserving its core meaning and ensuring clarity and coherence in your rewritten version. |
| 27 | +''' |
| 28 | + |
| 29 | + return system_prompt |
| 30 | + |
| 31 | + def get_rewrite_user_prompt(self): |
| 32 | + ''' |
| 33 | + 주어진 문장을 Re-Write 하는 유저 프롬프트를 제공 함. |
| 34 | + ''' |
| 35 | + |
| 36 | + user_prompt = '''Given <coordination_review> based on the guide on system prompt |
| 37 | +Please write in Korean. Output in JSON format following the <output_example> format, excluding <output_example> |
| 38 | +
|
| 39 | +<coordination_review>{coordination_review}</coordination_review> |
| 40 | +<output_example> |
| 41 | +"original_coordination_review" : |
| 42 | +"rewrite_original_coordination_review" : |
| 43 | +</output_example> |
| 44 | +''' |
| 45 | + |
| 46 | + return user_prompt |
| 47 | + |
| 48 | + |
| 49 | + def get_create_criteria_system_prompt(self): |
| 50 | + ''' |
| 51 | + 주어진 문장을 Re-Write 하는 유저 프롬프트를 제공 함. |
| 52 | + ''' |
| 53 | + system_prompt = '''You are a prompt engineering expert.''' |
| 54 | + |
| 55 | + return system_prompt |
| 56 | + |
| 57 | + def get_create_criteria_user_prompt(self): |
| 58 | + |
| 59 | + user_prompt = '''먼저 당신의 역할과 작업을 XML Tag 없이 기술하세요, \ |
| 60 | +이후에 아래의 <guide> 에 맟주어서 프롬프트를 영어로 작성해주세요. |
| 61 | +<guide>{guide}</guide>''' |
| 62 | + |
| 63 | + return user_prompt |
| 64 | + |
| 65 | + def get_fashion_evaluation_system_prompt(self): |
| 66 | + ''' |
| 67 | + 의상 코디에 대한 관련성 여부를 평가 하기 위한 시스템 프롬프트를 제공 |
| 68 | + ''' |
| 69 | + |
| 70 | + |
| 71 | + system_prompt = ''' |
| 72 | +You will be provided with two opinions: one from a fashion expert regarding clothing choices, and \ |
| 73 | +another from an AI system offering recommendations on clothing choices. \ |
| 74 | +Your task is to evaluate the relevance and coherence between these two opinions \ |
| 75 | +by assigning a score from 1 to 5, where 1 indicates low relevance and 5 indicates high relevance.\ |
| 76 | +You will need to define the criteria for scoring in the <criteria></criteria> section, and \ |
| 77 | +outline the steps for evaluating the two opinions in the <steps></steps> section. |
| 78 | +
|
| 79 | +<criteria> |
| 80 | +1 - The two opinions are completely unrelated and contradict each other. |
| 81 | +2 - The opinions share some minor similarities, but the overall themes and recommendations are largely different. |
| 82 | +3 - The opinions have moderate overlap in their themes and recommendations, but there are still notable differences. |
| 83 | +4 - The opinions are mostly aligned, with only minor differences in their specific recommendations or perspectives. |
| 84 | +5 - The two opinions are highly coherent, complementary, and provide consistent recommendations or perspectives on clothing choices. |
| 85 | +</criteria> |
| 86 | +
|
| 87 | +<steps> |
| 88 | +1. Read and understand the opinion provided by the fashion expert. |
| 89 | +2. Read and understand the opinion provided by the AI system. |
| 90 | +3. Identify the main themes, recommendations, and perspectives presented in each opinion. |
| 91 | +4. Compare the two opinions and assess the degree of alignment or contradiction between them. |
| 92 | +5. Based on the criteria defined above, assign a score from 1 to 5 to reflect the relevance and coherence between the two opinions. |
| 93 | +6. Provide a brief explanation justifying the assigned score. |
| 94 | +</steps> |
| 95 | +''' |
| 96 | + return system_prompt |
| 97 | + |
| 98 | + def get_fashion_evaluation_user_prompt(self): |
| 99 | + ''' |
| 100 | + 의상 코디에 대한 관련성 여부를 평가 하기 위한 유저 프롬프트를 제공 |
| 101 | + ''' |
| 102 | + |
| 103 | + user_prompt = ''' |
| 104 | +Given <human_view> and <AI_view>, based on the guide on system prompt |
| 105 | +Write in the form of <evaluation> in korean with JSON format |
| 106 | +
|
| 107 | +<human_view>{human_text}</human_view> |
| 108 | +<AI_view>{AI_text}</AI_view> |
| 109 | +
|
| 110 | +<evaluation> |
| 111 | +'human_view': |
| 112 | +'AI_view' : |
| 113 | +'score': 4, |
| 114 | +'reason': 'AI view is similar to human view' |
| 115 | +</evaluation> |
| 116 | +''' |
| 117 | + return user_prompt |
| 118 | + |
0 commit comments