feat: LLM-generated adaptive follow-up questions
- Grader: LLM outputs follow_up_question targeting uncovered keyPoints - Remove static followupHints usage in grading flow - maxFollowUps sourced from question.maxFollowUps (hints.length) - Clean answerKey: remove followupHints field - Three-language prompt update with examples and bad examples - Grader spec: add follow_up_question to mock responses
This commit is contained in:
@@ -532,16 +532,16 @@ private async getModel(tenantId: string): Promise<ChatOpenAI> {
|
||||
difficulty: item.difficulty,
|
||||
dimension: item.dimension,
|
||||
basis: item.basis,
|
||||
maxFollowUps: item.followupHints?.length || 0,
|
||||
};
|
||||
});
|
||||
|
||||
const answerKey: Record<string, { correctAnswer?: string | null; judgment?: string | null; followupHints?: string[] | null }> = {};
|
||||
const answerKey: Record<string, { correctAnswer?: string | null; judgment?: string | null }> = {};
|
||||
selectedItems.forEach(item => {
|
||||
if (item.correctAnswer || item.judgment || item.followupHints) {
|
||||
if (item.correctAnswer || item.judgment) {
|
||||
answerKey[item.id] = {
|
||||
correctAnswer: item.correctAnswer,
|
||||
judgment: item.judgment,
|
||||
followupHints: item.followupHints,
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user