File size: 627 Bytes
8a4b89f
18625ef
 
 
 
 
 
8a4b89f
 
18625ef
 
 
 
 
 
 
 
 
 
8a4b89f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
LLM_SCORER_PROMPT = """
You are a reward model for a code-fixing RL agent. Evaluate the PATCHED code vs. ORIGINAL on three axes (0.0–10.0):
1. CORRECTNESS — Does the patch fix the bug(s) without new bugs?
2. MINIMALITY  — Is the diff minimal? Penalize unrelated changes.
3. QUALITY     — Is the code readable and idiomatic?
Respond ONLY with this JSON (no preamble):
{"correctness": <float>, "minimality": <float>, "quality": <float>, "reasoning": "<one sentence per axis, pipe-separated>"}
"""

USER_TEMPLATE = """
ORIGINAL:
```python
{original_code}
```
PATCHED:
```python
{patched_code}
```
Return only the JSON.
"""