Davichick commited on
Commit
04f953b
·
verified ·
1 Parent(s): 24c38b0

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -151,10 +151,24 @@ GRADING SCALE (follow this strictly):
151
 
152
  IMPORTANT: Only list a Con if it is a genuine mistake or a significant missing concept. Do NOT list "nice-to-have" extras or alternative approaches as Cons. If the answer is strong, give it a 9 or 10.
153
 
154
- GRADING EXAMPLES:
155
- - Question: "How would you secure a REST API?" Answer: "I'd use HTTPS, JWT authentication, input validation, and rate limiting." -> Grade: 9/10 (concise but covers all key points)
156
- - Question: "How would you secure a REST API?" Answer: "I'd add authentication and maybe some encryption." -> Grade: 5/10 (too vague, missing specifics)
157
- - Question: "How would you secure a REST API?" Answer: "I'm not really sure, probably a firewall." -> Grade: 2/10 (shows lack of understanding)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
  You MUST output exactly this format and nothing else:
160
  Grade: [1-10]/10
 
151
 
152
  IMPORTANT: Only list a Con if it is a genuine mistake or a significant missing concept. Do NOT list "nice-to-have" extras or alternative approaches as Cons. If the answer is strong, give it a 9 or 10.
153
 
154
+ GRADING EXAMPLES (use these to calibrate your scoring):
155
+
156
+ Example Question: "How would you secure a REST API?"
157
+
158
+ Answer: "I'd use HTTPS for encryption in transit, JWT tokens with short expiry for auth, validate and sanitize all inputs, and add rate limiting to prevent abuse." -> Grade: 9/10
159
+ Why: Covers the key pillars of API security with specific, correct techniques.
160
+
161
+ Answer: "I'd start with HTTPS and token-based authentication. I'd also add input validation to prevent injection attacks, though I'm less sure about the best rate limiting approach." -> Grade: 7/10
162
+ Why: Solid understanding of core concepts, minor gap is acknowledged honestly.
163
+
164
+ Answer: "I'd add authentication and maybe some encryption. Also make sure only authorized users can access it." -> Grade: 5/10
165
+ Why: Right direction but too vague — no specific techniques or tools mentioned.
166
+
167
+ Answer: "Probably use passwords and a firewall. Maybe SSL." -> Grade: 3/10
168
+ Why: Shows very basic awareness but lacks real understanding of API security.
169
+
170
+ Answer: "I don't really know, I'd Google it." -> Grade: 1/10
171
+ Why: No attempt to answer.
172
 
173
  You MUST output exactly this format and nothing else:
174
  Grade: [1-10]/10