Skip to content

Commit e56220d

Browse files
committed
Temporarily relax correctAnswer schema to debug AI generation
- Change ExerciseContentSchema.correctAnswer from z.enum to z.string - This will allow us to see what the AI is actually generating - Once we identify the issue, we can fix the prompt and restore strict validation
1 parent 9b0e1db commit e56220d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/domain/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const ExerciseContentSchema = z.object({
8585
paragraph: z.string(),
8686
question: z.string(),
8787
options: z.object({ A: z.string(), B: z.string(), C: z.string(), D: z.string() }),
88-
correctAnswer: z.enum(['A', 'B', 'C', 'D']),
88+
correctAnswer: z.string(),
8989
allExplanations: z.object({
9090
A: z.string(),
9191
B: z.string(),

0 commit comments

Comments
 (0)