Cannot get Base Mode and placeholders working

Created on 11 April 2025, 16 days ago

Background

We have been experimenting with using the AI Automators module as follows…

We wish to provide a mark-by-mark critique of a Student response to an Examination question, based on a Model answer and an accompanying Analytical rubric describing how to go about generating the critique.

The Base Mode / placeholder approach

We have enabled an AI Automator on a field and set it up as follows…

The Analytical rubric field target as above contains a very simple prompt to instruct the module to compare the Response with a Model and provide some analysis.

A screenshot of the node edit form…

The response we get back seems to vary pretty randomly between reports like these…

and...

We have experimented with all sorts including using single braces for the placeholders but we always get the me results.

Token approach

HOWEVER, if we instead use Tokens (1) and (2) like this…

…and we edit the Analytical rubric field accordingly by using Tokens in the (3), (4), (5) and (6) in a much more detailed direction as shown here…

We do indeed get the detailed results!

We don't think the Token approach is very robust because when we extend the Analytic rubric further, we often end up with some of the Tokens failing to be translated - this may be something to do the memory allocated to dealing with a heavily Token-ridden rubric - who knows?

In summary

The long and short of it is that the placeholder approach seems more like the 'right way to do things but we can't even get started with it.

Can anyone please advise and as to whether we have got the wrong end of the stick>?

Thanks

💬 Support request
Status

Active

Version

1.0

Component

AI Automators

Created by

🇬🇧United Kingdom SirClickALot Somerset

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SirClickALot
  • 🇬🇧United Kingdom MrDaleSmith

    The Basic method provides ONLY the selected field's data as {{ context }}. The tokens you are adding in your rubric do not appear to be valid Drupal tokens (they should be prefixed with the entity type, as in [node:field_model] so there is nothing that can turn these into values.

    I would say that this is working as expected: the Basic mode is - as the name suggests - a basic method that does not support complex data structures: you SHOULD be using the token method for a set up that is this complicated, and if you have issues with the translations of your tokens that would be the issue you'd need to resolve.

  • 🇬🇧United Kingdom SirClickALot Somerset

    Thanks, @mrdalesmith that's great advice and I suppose it make perfect sense that the Base Mode is just that.

    As I eluded to, the Advanced Mode (Token) mode works well but it has limitations and I will try to be specific about them and write them up in separate issues.

Production build 0.71.5 2024