Skip to content

Commit 6104aea

Browse files
authored
Merge pull request #1763 from isaacphysics/improvement/reduce-llm-validation-data-main
Adjust app to allow for reduced data in LLM-marked validation
2 parents c58e8bb + b7f5b60 commit 6104aea

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/IsaacApiTypes.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,6 @@ export interface InlineRegionValidationResponseDTO extends QuestionValidationRes
370370
}
371371

372372
export interface LLMFreeTextQuestionValidationResponseDTO extends QuestionValidationResponseDTO {
373-
markCalculationInstructions?: string;
374-
additionalMarkingInstructions?: string;
375-
maxMarks?: number;
376373
marksAwarded?: number;
377374
markBreakdown?: LLMFreeTextMarkSchemeEntryDTO[];
378375
}

src/app/components/content/IsaacQuestion.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
7676
const [hasSubmitted, setHasSubmitted] = useState<boolean>(false);
7777
const hidingAttempts = useAppSelector(selectors.user.preferences)?.DISPLAY_SETTING?.HIDE_QUESTION_ATTEMPTS ?? false;
7878

79-
8079
const {confidenceState, setConfidenceState, validationPending, setValidationPending, confidenceDisabled, recordConfidence, showQuestionFeedback} = useConfidenceQuestionsValues(
8180
currentGameboard?.tags?.includes("CONFIDENCE_RESEARCH_BOARD"),
8281
"question",
@@ -289,7 +288,7 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
289288

290289
{/* LLM free-text question validation response */}
291290
{isLLMFreeTextQuestion && showQuestionFeedback && validationResponse && showInlineAttemptStatus && !canSubmit &&
292-
<LLMFreeTextQuestionFeedbackView {...{validationResponse, hasSubmitted, sentFeedback, setSentFeedback}} />
291+
<LLMFreeTextQuestionFeedbackView maxMarks={(doc as ApiTypes.IsaacLLMFreeTextQuestionDTO).maxMarks ?? 0} {...{validationResponse, hasSubmitted, sentFeedback, setSentFeedback}} />
293292
}
294293
</ConfidenceContext.Provider>;
295294
});

src/app/components/elements/LLMFreeTextQuestionFeedbackView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ const noFeedback = {disagree: false, partlyAgree: false, agree: false};
1212

1313
interface LLMFreeTextQuestionFeedbackViewProps {
1414
validationResponse: Immutable<LLMFreeTextQuestionValidationResponseDTO>;
15+
maxMarks: number;
1516
hasSubmitted: boolean;
1617
sentFeedback: boolean;
1718
setSentFeedback: (value: boolean) => void;
1819
}
19-
export default function LLMFreeTextQuestionFeedbackView({validationResponse, hasSubmitted, sentFeedback, setSentFeedback}: LLMFreeTextQuestionFeedbackViewProps) {
20+
export default function LLMFreeTextQuestionFeedbackView({validationResponse, maxMarks, hasSubmitted, sentFeedback, setSentFeedback}: LLMFreeTextQuestionFeedbackViewProps) {
2021
const dispatch = useAppDispatch();
2122
const page = useAppSelector(selectors.doc.get);
2223
const pageId = page && page !== NOT_FOUND && page.id || undefined;
@@ -35,7 +36,7 @@ export default function LLMFreeTextQuestionFeedbackView({validationResponse, has
3536
<div className="prediction my-4">
3637
<div className='d-flex'>
3738
<span className="icon-ai me-2"/>
38-
<strong>{`Prediction: ${validationResponse.marksAwarded} out of ${validationResponse.maxMarks} marks`}</strong>
39+
<strong>{`Prediction: ${validationResponse.marksAwarded} out of ${maxMarks} marks`}</strong>
3940
</div>
4041
</div>
4142
<div className="table-responsive card curved-table-wrapper mb-4">

0 commit comments

Comments
 (0)