@ -362,6 +366,199 @@ Consider how well the student demonstrates understanding of the topic and expres
exceptExceptionase:
raiseException(f"评估文章失败: {str(e)}")
defcheck_grammar(self,content:str,context:Dict,
user_settings:Optional[Dict]=None)->Dict:
"""检查语法错误"""
settings=self._get_ai_settings(user_settings)
model=self._create_llm_model(settings)
# 提取上下文信息
ctx_info=self._extract_context_info(context)
# 根据学科制作不同的提示词
ifctx_info['subject']=='英语':
prompt=f"""As an experienced American English teacher, please conduct a comprehensive grammar check for this {ctx_info['article_type']} written by a {ctx_info['grade']} student.
"writing_content":"Generative AI, such as large language models, are becoming increasingly popular. They offers students a powerful tool for complete homework and generating ideas. However, its impact on learning ability are a subject of intense debate.\n\nOn one hand, it is argued that AI hinder the development of critical thinking. When a student rely on AI to write essays, they doesn't engage in the rigorous process of research and analysis their own. This lead to a superficial understanding and a failure to develop their own voice. Furthermore, the convenience of AI means that less effort are put into mastering fundamental skills, such as grammar and structuring arguments.\n\nConversely, supporter of AI argues that it serve as a personalized tutor. It can explaining complex concepts in different ways until the student understands. Used responsibly, AI could helps a student to brainstorm and to organize their thoughts more better than before.\n\nIn conclusion, the effect of generative AI on learning ability depend not on the technology itself, but on how it is been used by the student. The key lies in using it as a supplement for one's own thinking, not as a replacement.",
"ai_feedback":"{\"writing_analysis\": {\"strengths\": [\"文章结构清晰,包含引言、正反论证和结论,符合英语议论文基本框架\", \"能够从正反两个角度分析AI对学习的影响,展现了辩证思维能力\", \"结论部分点明核心观点——关键在于如何使用而非技术本身,立意较好\", \"使用了on one hand、conversely、in conclusion等过渡词,使文章有一定连贯性\"], \"issues\": [\"语法错误较多,特别是主谓一致问题(如'are becoming'→'is becoming','they offers'→'they offer')\", \"论点发展不够深入,缺乏具体例证和数据支持,论证力度不足\", \"主题句不够突出,段落开头未能清晰表明该段核心论点\", \"用词不够精准学术(如'more better'不符合学术写作规范)\", \"缺乏美国学术写作中典型的thesis statement明确陈述全文论点\"], \"suggestions\": [{\"讲解\": \"在引言段末尾添加明确的总论点陈述\", \"示例\": \"While generative AI presents legitimate concerns about academic integrity, its educational value ultimately depends on how students harness it as a cognitive tool rather than a shortcut.\"}, {\"讲解\": \"改进主题句,使其更具体并预告段落内容\", \"示例\": \"Critics rightly point out that overreliance on AI can undermine the very cognitive processes essential for deep learning, particularly in the domains of critical analysis and original thought.\"}, {\"讲解\": \"增加具体例证使论证更有说服力\", \"示例\": \"For instance, when AI generates entire paragraphs for a history paper, students miss the opportunity to develop their own historical interpretation and analytical voice—skills that distinguish mediocre writing from exceptional scholarship.\"}, {\"讲解\": \"使用更精准的学术词汇和表达\", \"示例\": \"Proponents counter that AI, when used judiciously, functions as an adaptive learning assistant that scaffolds complex tasks and provides immediate, personalized feedback—much like a digital writing center available 24/7.\"}, {\"讲解\": \"加强段落间的逻辑过渡\", \"示例\": \"Despite these valid concerns about dependency, the pedagogical potential of AI cannot be dismissed outright. In fact, when integrated intentionally...\"}], \"next_steps\": [\"系统学习英语主谓一致、时态等基础语法规则\", \"阅读美国大学水平的议论文范文,注意观察其论点陈述方式和论证结构\", \"练习使用具体事例、研究数据或权威引用来支持论点\", \"积累学术写作常用词汇和表达,避免口语化表述\", \"写作时先明确总论点和各分论点,确保整篇文章有清晰的逻辑脉络\"]}}",
"writing_content":"Generative AI, such as large language models, are becoming increasingly popular. They offers students a powerful tool for complete homework and generating ideas. However, its impact on learning ability are a subject of intense debate.\n\nOn one hand, it is argued that AI hinder the development of critical thinking. When a student rely on AI to write essays, they doesn't engage in the rigorous process of research and analysis their own. This lead to a superficial understanding and a failure to develop their own voice. Furthermore, the convenience of AI means that less effort are put into mastering fundamental skills, such as grammar and structuring arguments.",
"ai_feedback":"{\"writing_analysis\": {\"strengths\": [\"文章结构清晰,采用了标准的议论文框架:引入话题-正反论证-总结观点\", \"能够从正反两个角度分析AI对学习的影响,体现了辩证思维\", \"结论段明确提出了核心观点,强调使用方式而非技术本身决定影响\", \"使用了适当的学术词汇如'critical thinking''personalized tutor'等\"], \"issues\": [\"语法错误较多,特别是主谓一致问题(如'are becoming''it offers''they doesn't'等)\", \"论点发展不够深入,缺乏具体例证和数据支持\", \"过渡词使用单一,缺乏美国学术写作中常见的递进、转折等复杂过渡\", \"部分表达不够地道,存在中式英语痕迹(如'more better than before')\", \"论点之间的逻辑衔接可以更紧密,缺乏对反论的深入反驳\"], \"suggestions\": [{\"讲解\": \"修正主谓一致等基础语法错误,确保语言准确性\", \"示例\": \"Generative AI, such as large language models, is becoming increasingly popular. It offers students a powerful tool for completing homework and generating ideas. However, its impact on learning ability is a subject of intense debate.\"}, {\"讲解\": \"在主题句后添加具体例证,增强说服力\", \"示例\": \"When students rely exclusively on AI to write essays, they bypass the rigorous process of research and analysis. For instance, instead of wrestling with primary sources to form original arguments, they might simply paraphrase AI-generated content, resulting in a superficial understanding and failure to develop their own academic voice.\"}, {\"讲解\": \"使用更丰富的过渡词和逻辑连接词\", \"示例\": \"While critics emphasize the risks of over-reliance, proponents counter that AI, when used judiciously, can serve as a personalized tutor. Specifically, it can adapt explanations to individual learning styles, breaking down complex concepts until the student achieves genuine comprehension.\"}, {\"讲解\": \"改进结论段,使其更具深度和号召力\", \"示例\": \"Ultimately, the educational impact of generative AI depends less on the technology itself and more on the intentionality behind its use. The key lies in leveraging it as a supplement to—not a replacement for—authentic intellectual engagement, ensuring that technology enhances rather than diminishes our cognitive development.\"}, {\"讲解\": \"使用更地道的学术表达方式\", \"示例\": \"Furthermore, the convenience of AI may reduce the effort students invest in mastering fundamental skills. This could potentially undermine their long-term academic growth, as proficiency in grammar and logical argumentation requires consistent practice and refinement.\"}], \"next_steps\": [\"系统学习英语主谓一致、时态等基础语法规则\", \"阅读美国学生的议论文范文,观察其论证结构和语言风格\", \"练习使用具体的例子、数据或研究结果来支持抽象论点\", \"积累学术写作常用的过渡词和表达方式\", \"完成写作后多次修改,重点关注逻辑流畅性和语言地道性\", \"尝试在正反论证后加入综合分析的段落,展现更高层次的批判性思维\"]}}",