Discussion: prompts

Created on 12 December 2024, 10 days ago

Problem/Motivation

Many of the sub-modules use prompts, some of which are hard-coded in .yml files and require special handling to allow users to override them. Some are presented as default values or placeholders in forms. There has been some discussion of how to make these prompts reusable and share them between systems.

Given that Drupal already has a mature system for handling configuration that has default values set by developers, can be altered by administrators, and can be used in multiple places, is there a specific reason why we've tried to recreate the Drupal Config entity with our own more complicated version of it?

🌱 Plan
Status

Active

Version

1.0

Component

Discussion

Created by

🇬🇧United Kingdom MrDaleSmith

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

Comments & Activities

  • Issue created by @MrDaleSmith
  • 🇧🇪Belgium wouters_f Leuven

    I agree! In the ai_translate, ai_ckeditor and ai_content_suggestions submodules the prompts are config (at least after these issues)

    1. https://www.drupal.org/project/ai/issues/3493534 Allow admin of prompts in ai_ckeditor Active
    2. https://www.drupal.org/project/ai/issues/3493510 allow administration of prompts in ai_content_suggestions Active

    these issues would be happy with a review!
    I would like to add token power to this, so the tone of voice could be a token that can be injected in every prompt (if needed).

    I do think we would need a place to manage them centrally, and the config for these submodules is not the right place.
    This kind of entity that can be exposed as tokens would be valueable and reusable.
    Using the power of Drupal it might even be a Content type or entity type (something with a field)

    For a client I created a very simple https://www.drupal.org/project/usage/ai_prompt_mgmt where all this config is in one place but that's absolutely not sufficient.

    Token management in other RAG systems (e.g Danswer) is just a number of textareas where you can put (and name) prompts that you whish to reuse.

    Not really an answer to your question,
    but everything is moving so fast right now, and we can use all help there is.
    If you have a good idea on how to manage the promts everywhere, do the suggestion (here) and let's discuss on #ai on slack.
    Any help is much appreciated.

  • 🇧🇪Belgium wouters_f Leuven

    Also, check this slach thread, where someone is working on a prompt management system
    https://drupal.slack.com/archives/CDL2YPBNX/p1730717913937529

Production build 0.71.5 2024