-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample_rubric.json
More file actions
70 lines (70 loc) · 2.1 KB
/
example_rubric.json
File metadata and controls
70 lines (70 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
"name": "code_quality_basic",
"version": "1.0.0",
"description": "Basic code quality evaluation rubric for Python functions",
"domain": "code",
"scale": {
"min": 0.0,
"max": 10.0,
"type": "continuous"
},
"criteria": [
{
"name": "correctness",
"description": "Does the code solve the problem correctly and handle edge cases?",
"weight": 0.4,
"examples": {
"excellent": [
{
"input": "Write a function to reverse a string",
"output": "def reverse_string(s):\n if not isinstance(s, str):\n raise TypeError('Input must be a string')\n return s[::-1]",
"score": 9.5,
"explanation": "Correct implementation with type checking and edge case handling"
}
],
"good": [
{
"input": "Write a function to reverse a string",
"output": "def reverse_string(s):\n return s[::-1]",
"score": 7.0,
"explanation": "Correct but lacks input validation"
}
],
"poor": [
{
"input": "Write a function to reverse a string",
"output": "def reverse_string(s):\n result = ''\n for i in range(len(s)):\n result = s[i] + result\n return result",
"score": 4.0,
"explanation": "Works but inefficient and overly complex"
}
]
}
},
{
"name": "readability",
"description": "Is the code clean, well-named, and easy to understand?",
"weight": 0.3,
"subcriteria": [
{
"name": "naming",
"description": "Variable and function names are descriptive"
},
{
"name": "structure",
"description": "Code is well-organized and formatted"
}
]
},
{
"name": "efficiency",
"description": "Is the solution computationally efficient?",
"weight": 0.3
}
],
"metadata": {
"author": "OpenRubricRL Team",
"created_at": "2024-01-01T00:00:00Z",
"tags": ["python", "code-quality", "basic"],
"license": "MIT"
}
}