Skip to content

Commit

Permalink
Merge branch 'main' into mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed May 29, 2024
2 parents 4105635 + 94ac09c commit 99af5b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ https://github.com/marcusgreen/moodle-tool_aiconnect
Additional documentation can be found here https://github.com/marcusgreen/moodle-qtype_aitext/wiki

## Prompting
It is currently limited to the immediate feedback quesiton behaviour. It requires the creation of a prompt to evaluate the text according to its purpose. For example to confirm the grammar in English the following can be used.
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

"Explain if there is anything wrong with the Grammar in this sentence. 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. Reply in json format with a response and marks fields."
"Write an English sentence in the past tense"

It may help to test prompts directly on the Chat GPT site to confirm they work as expected.
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.

## Limitations

Expand All @@ -28,7 +35,6 @@ Mobile app compatibility

Cron based evaluation. Allow for slow LLM systems by marking on a cron timer


## Promotion
If you are a Moodle developer and you use vscode/vscodium you should consider this plugin https://marketplace.visualstudio.com/items?itemName=LMSCloud.mdlcode.
It it very reasonably priced and will quickly save you time and frustration. It is the best Moodle development tool I have come accross in 20 years.
Expand Down
3 changes: 2 additions & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
new lang_string('jsonprompt', 'qtype_aitext'),
new lang_string('jsonprompt_setting', 'qtype_aitext'),
'Return only a JSON object which enumerates a set of 2 elements.The JSON object should be in
this format: {feedback":"string","marks":"number"} where marks is a single number summing all marks.',
this format: {feedback":"string","marks":"number"} where marks is a single number summing all marks.
Also show the marks as part of the feedback.',
PARAM_RAW,
20,
6
Expand Down

0 comments on commit 99af5b6

Please sign in to comment.