Problem/Motivation

Currently the AI Interpolator can handle the following use cases:

  • One field to one field interpolation
  • Many fields to one field interpolation

It should also be possible to handle many field interpolation as output. This becomes extra important with LLM's and the huge contexts that you can send in now, that are 100k tokens plus, where one request can end up costing several dollars. If you want 10 outputs on that context, you don't want to do 10 queries with the same context.

We need a solution for this.

Steps to reproduce

Proposed resolution

  • Create a submodule called AI Interpolator Field (not everyone wants this and wants extra field types).
  • That field type does not have any widget or formatter, so its only possible to add, but not to view in the form or the view.
  • Any interpolator can add an annotation field that is grouping them to realize which ones can be run together
  • TBD: The form field functions for the Interpolator will change a little bit, so that we have grouped form fields as well - for example you can't choose different OpenAI models for each field output, its only selected once.

Remaining tasks

User interface changes

  • Add all fields that should be generated.
  • Add an AI Interpolator Field.
  • When added it has the normal prompt fields and advanced token fields as inputs, fill out.
  • Choose master rule. Some that would work are OpenAI (text output), Extractor or SceneX
  • Then start adding child rules, which works similar to the current solution, just with the added field output choice.
  • You might have to fill out descriptions and example outputs for AI solutions like OpenAI to do one-shot learning for better response.

API changes

Data model changes

Comments

Marcus_Johansson created an issue.

fishfree’s picture

A notice which you probably already knew: some fields are multi-valued, i.e. a term reference field with comma-splitted autocomplete widget.

marcus_johansson’s picture

@fishfree - If you mean one to many of the same field that should already work. I need to add more video turtorials, but I'm short on time :) I added this for tagging: https://workflows-of-ai.com/workflow/auto-tagging

For the above solution this could be one part of a multi field output.

marcus_johansson’s picture

The first version of this is available for Google Places: https://www.drupal.org/project/ai_interpolator_google_places

It should be added to OpenAI and some other modules soon.