AI Text

Question types ::: qtype_aitext
Maintained by Marcus Green
Question type that uses a Large Language Model for feedback
Latest release:
274 sites
215 downloads
7 fans
Current versions available: 2

Report any issue here https://github.com/marcusgreen/moodle-qtype_aitext/issues

This Moodle question type accepts free text which is then evaluated by a remote Large Language Model AI system such as ChatGPT, Groq, Together.ai etc. Each question can have its own feedback and grading prompts. It requires either a paid for ChatGPT api account which will give access to ChatGPT4 or other Large Language Model such as Ollama or Groq.com

It requires the creation of a prompt to evaluate the text according to its purpose and an optional marking scheme. For example for a question

"Write an English sentence in the past tense"

The prompt could be

"Explain if there is anything wrong with the Grammar in this text."

An example mark scheme could be

Give 10 marks if there are no errors and all spelling is correct and it is in the past tense. Give 0 marks if the grammar is incorrect. Deduct one mark, every word where the spelling is incorrect"

There is a prompttester field in the quesition editing form which uses ajax to test out prompts without needing to go through the quesiton preview screen.

Screenshots

Screenshot #0

Contributors

Marcus Green (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

نیشاندانی سه‌رنجه‌کان
  • Plugins bot
    Wed, 10 Sept 2025, 9:20 AM
    Approval issue created: CONTRIB-10103
  • Vladimír Výboh
    Fri, 24 Oct 2025, 8:29 PM
    When I entered text into the Response tester - Sample Response item and clicked Evaluate Sample Response, I got an error:
    generalexceptionmessage
    Výnimka - qtype_aitext_question::perform_request(): Return value must be of type string, null returned
  • Marcus Green
    Fri, 24 Oct 2025, 8:33 PM
    Can you create an issue at https://github.com/marcusgreen/moodle-qtype_aitext/issues And include full information, i.e. Moodle version, plugin version AI Configuration details and what happens when you attempt to preview a question.
  • Vladimír Výboh
    Tue, 16 Dec 2025, 10:51 PM
    When I entered the story text, I received an output from AI in the form:
    Komentár: ```json { "feedback": "Text je gramaticky a pravopisne správny.... Celkové skóre: 10 bodov.", "marks": 10 } ```
    but no final grade was recorded.
    This is exactly how it will be displayed to the student as feedback
  • Marcus Green
    Tue, 16 Dec 2025, 11:24 PM
    its probably thiss
    https://github.com/marcusgreen/moodle-qtype_aitext/issues/49
    But you would need to supply full details for me to comment further. I suggest you create a ticket there
Please login to post comments