Neurolingua
commited on
Commit
•
ac2e58a
1
Parent(s):
bda2aeb
Update teacher_function.py
Browse files- teacher_function.py +9 -4
teacher_function.py
CHANGED
@@ -59,13 +59,18 @@ def extract_text_from_image(image_path):
|
|
59 |
|
60 |
def evaluate(question, answer, max_marks):
|
61 |
prompt = f"""Questions: {question}
|
62 |
-
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
-
Evaluate above questions one by one(if there are multiple) by provided answers and assign marks out of {max_marks}. No need overall score. Note that as maximum mark increases, the size of the answer must be large enough to get good marks. Give ouput in format below:
|
66 |
Assigned marks:
|
67 |
-
Total marks:
|
68 |
-
Note that you should not display total marks"""
|
69 |
|
70 |
messages = [
|
71 |
{"role": "system", "content": "You are an answer evaluator"},
|
|
|
59 |
|
60 |
def evaluate(question, answer, max_marks):
|
61 |
prompt = f"""Questions: {question}
|
62 |
+
Answer: {answer}
|
63 |
|
64 |
+
Evaluate each question based on the provided answers and assign marks out of {max_marks}. Use the following guidelines to assign marks:
|
65 |
+
- If the answer is very accurate and complete, give full marks.
|
66 |
+
- If the answer is good but not completely accurate, give full marks minus 1.
|
67 |
+
- If the answer is somewhat accurate, give full marks minus 2, and so on.
|
68 |
+
- Ensure that the length and detail of the answers correspond to the maximum marks available.
|
69 |
+
|
70 |
+
Provide the results in the following format:
|
71 |
|
|
|
72 |
Assigned marks:
|
73 |
+
Total marks: """
|
|
|
74 |
|
75 |
messages = [
|
76 |
{"role": "system", "content": "You are an answer evaluator"},
|