MBS-10581: Build new prompt template system#64
Merged
marcusgreen merged 6 commits intomarcusgreen:mainfrom Feb 10, 2026
Merged
Conversation
160a79f to
065824a
Compare
065824a to
20bcfc0
Compare
Owner
|
Reading through code |
e39a91c to
1959d23
Compare
Owner
|
I have started reading through this and done a few tests, it looks good. I like the replacement of [[ ]] with {{ }}. The former was a legacy of me working with Moodle question types whereas the new approach is in line with the way most people deal with LLM systems. My tests so far have shown an unexpected improvement in responses, probably because the prompts are more like what an LLM expects. Back to testing. |
373adb1 to
fa1adb8
Compare
f67bfce to
e61f176
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #63
This PR introduces a structured prompt template system for the AI Text question type, replacing the legacy
[[placeholder]]syntax with a more flexible{{placeholder}}system. The new architecture provides clear separation between admin-configured templates and question-specific content.Changes
New Features
{{role}},{{questiontext}},{{aiprompt}},{{markscheme}},{{defaultmark}},{{response}},{{jsonprompt}},{{language}}){{response}}in their AI prompt, bypassing the admin templateMigration
[[expert]]→ removed (was only a mode indicator)[[response]]→{{response}}[[questiontext]]→{{questiontext}}[[userlang]]→{{language}}Testing
{{response}}detectionBreaking Changes
Questions using the old
[[expert]]/[[response]]syntax will be automatically migrated during upgrade. No manual intervention required.