Spaces:
Sleeping
Sleeping
diana3135
commited on
Commit
·
4010b2c
1
Parent(s):
0c0398a
add alignment and inimitability, remove comment
Browse files
utils.py
CHANGED
|
@@ -71,22 +71,22 @@ def modify_with_suggestion(task_description, text, suggestions, api_key = None):
|
|
| 71 |
|
| 72 |
def get_evaluation_with_gpt(task_description, text, api_key=None):
|
| 73 |
prompt = (
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
)
|
| 92 |
return generate_text_with_gpt(prompt, api_key)
|
|
|
|
| 71 |
|
| 72 |
def get_evaluation_with_gpt(task_description, text, api_key=None):
|
| 73 |
prompt = (
|
| 74 |
+
f"Given the task: {task_description}, the provided answer is: {text}\n"
|
| 75 |
+
f"Evaluate the answer using a scale from 0 to 10. Scores should reflect how well the ideas fit each specific evaluation criteria:\n"
|
| 76 |
+
f"0-2: Poor fit; the idea demonstrates minimal relevance to the criteria.\n"
|
| 77 |
+
f"3-5: Partial fit; the idea shows some relevance but contains significant shortcomings.\n"
|
| 78 |
+
f"6-8: Good fit; the idea aligns well with the criteria, showing clear relevance and thoughtfulness.\n"
|
| 79 |
+
f"9-10: Excellent fit; the idea fully aligns with the criteria, demonstrating exceptional insight.\n\n"
|
| 80 |
+
f"When evaluating, use the entire scoring range and avoid defaulting to mid-range scores.\n\n"
|
| 81 |
+
f"Evaluate based on the following criteria:\n"
|
| 82 |
+
f"Novelty: The uniqueness and innovation of the ideas.\n"
|
| 83 |
+
f"Implementability: The practicality of suggested actions.\n"
|
| 84 |
+
f"Inimitability: The difficulty for competitors to replicate the ideas.\n"
|
| 85 |
+
f"Alignment: The degree to which the ideas align with Airbnb’s goals and 17 SDGs.\n\n"
|
| 86 |
+
f"Please format the output exactly as follows:\n"
|
| 87 |
+
f"Novelty: [Score]\n"
|
| 88 |
+
f"Implementability: [Score]\n"
|
| 89 |
+
f"Inimitability: [Score]\n"
|
| 90 |
+
f"Alignment: [Score]\n"
|
| 91 |
)
|
| 92 |
return generate_text_with_gpt(prompt, api_key)
|