Add specific guidance to prevent common coding errors
Browse files- Add instruction to convert numpy types to int when using as indices
- Add guidance for simple plt.legend() usage without complex arguments
- Add reminder for proper pandas .iloc/.loc indexing
- These should prevent the recent numpy.float64 and matplotlib legend errors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
src.py
CHANGED
@@ -295,6 +295,9 @@ Requirements:
|
|
295 |
- For text answers: store text directly in 'answer'
|
296 |
- Use proper syntax: f"filename_{{uuid.uuid4().hex[:8]}}.png"
|
297 |
- Add plt.tight_layout() before saving plots
|
|
|
|
|
|
|
298 |
"""
|
299 |
|
300 |
query = f"""{system_prompt}
|
|
|
295 |
- For text answers: store text directly in 'answer'
|
296 |
- Use proper syntax: f"filename_{{uuid.uuid4().hex[:8]}}.png"
|
297 |
- Add plt.tight_layout() before saving plots
|
298 |
+
- Convert numpy types to int when using as indices: int(value)
|
299 |
+
- Use simple plt.legend() without complex arguments
|
300 |
+
- Always use .iloc or .loc properly for pandas indexing
|
301 |
"""
|
302 |
|
303 |
query = f"""{system_prompt}
|