Spaces:
Sleeping
Sleeping
arun-j0 commited on
Commit ·
9f5fa52
1
Parent(s): 941cc3e
chore: system promt refactor
Browse files- groq_client.py +13 -14
groq_client.py
CHANGED
|
@@ -58,20 +58,19 @@ def send_to_groq_api_with_context(markdown, code, output, cell_index):
|
|
| 58 |
Sends markdown, code, and output to the Groq API for grading.
|
| 59 |
"""
|
| 60 |
prompt = f"""
|
| 61 |
-
You are a Python notebook grader. Below is
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
1.
|
| 65 |
-
2.
|
| 66 |
-
3.
|
| 67 |
-
4.
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
Cell Index: {cell_index}
|
| 76 |
|
| 77 |
Context or Question:
|
|
|
|
| 58 |
Sends markdown, code, and output to the Groq API for grading.
|
| 59 |
"""
|
| 60 |
prompt = f"""
|
| 61 |
+
You are a Python notebook grader. Below is the context or question from a Jupyter notebook, followed by the corresponding Python code and its output.
|
| 62 |
+
|
| 63 |
+
Your task is to:
|
| 64 |
+
1. Grade the cell on a scale of 1 to 10 based on correctness, readability, and efficiency.
|
| 65 |
+
2. Assess how well the code addresses the provided context or question.
|
| 66 |
+
3. Identify any logical errors or flaws that would prevent the code from achieving its intended result, even if it runs without errors.
|
| 67 |
+
4. Provide actionable suggestions for improvement, focusing on:
|
| 68 |
+
- Code readability, modularity, and adherence to Pythonic practices.
|
| 69 |
+
- Computational efficiency and possible optimizations.
|
| 70 |
+
- Improvements in the clarity of the output and whether it aligns with the context.
|
| 71 |
+
5. Identify areas for improvement and suggest alternative solutions if applicable.
|
| 72 |
+
6. Avoid generating additional code unless it helps in demonstrating a recommended improvement.
|
| 73 |
+
|
|
|
|
| 74 |
Cell Index: {cell_index}
|
| 75 |
|
| 76 |
Context or Question:
|