-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
= Enea_Gore
committed
Jan 27, 2025
1 parent
7e5197d
commit 3c6d46d
Showing
3 changed files
with
58 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 11 additions & 17 deletions
28
...es/text/module_text_llm/module_text_llm/divide_and_conquer/prompt_generate_suggestions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
from pydantic import Field, BaseModel | ||
from typing import List, Optional | ||
|
||
# Input Prompt | ||
class GenerateSuggestionsPrompt(BaseModel): | ||
"""Features available: **{problem_statement}**, **{example_solution}**, **{grading_instructions}**, **{max_points}**, **{bonus_points}**, **{submission}** | ||
_Note: **{problem_statement}**, **{example_solution}**, or **{grading_instructions}** might be omitted if the input is too long._""" | ||
system_message: str = Field(default=system_message, | ||
description="Message for priming AI behavior and instructing it what to do.") | ||
human_message: str = Field(default=human_message, | ||
description="Message from a human. The input on which the AI is supposed to act.") | ||
|
||
# Prompts are generated at run time. | ||
# Output Object | ||
# Names have been redefined here, to be consistent with the prompt | ||
# Local LLMs do better with these names. GoatPT does not care and does everything! | ||
class FeedbackModel(BaseModel): | ||
title: str = Field(description="Very short title, i.e. feedback category or similar", example="Logic Error") | ||
description: str = Field(description="Feedback description") | ||
""" A Feedback object consisting of the criteria title, the feedback text, a line_start and line_end to depict | ||
a reference to the text, creidts to depcit the credit amount given and an assessment_instruction_id to depict the assessment instruction ID used""" | ||
criteria: str = Field(description="Short Criteria title!") | ||
feedback: str = Field(description="The feedback in text form.") | ||
line_start: Optional[int] = Field(description="Referenced line number start, or empty if unreferenced") | ||
line_end: Optional[int] = Field(description="Referenced line number end, or empty if unreferenced") | ||
credits: float = Field(0.0, description="Number of points received/deducted") | ||
grading_instruction_id: Optional[int] = Field( | ||
description="ID of the grading instruction that was used to generate this feedback, or empty if no grading instruction was used" | ||
credits: float = Field(0.0, description="Number of credits received/deducted") | ||
assessment_instruction_id: Optional[int] = Field( | ||
description="ID of the assessment instruction that was used to generate this feedback, or empty if no assessment instruction was used" | ||
) | ||
|
||
class AssessmentModel(BaseModel): | ||
"""Collection of feedbacks making up an assessment""" | ||
feedbacks: List[FeedbackModel] = Field(description="Assessment feedbacks") | ||
assessment: List[FeedbackModel] = Field(description="Assessment feedbacks") |