Detailed Introduction to the new Drupal AI module.

Detailed Introduction to the new Drupal AI module

Welcome to the announcement post of the new AI module for Drupal!

Below is a detailed blog post going through our vision for the module, what our immediate plans are and what is the philosophy of our approach to this module. This should be everything you need to get heavily involved with the module if you want.

If you want a short press release find it here: click here
If you want developer documentation find it here: click here

AI Module Vision and approach

Our vision is to provide you with all the core tools you will need to build fully tested, useful and usable AI applications using Drupal, then turn them into something magical at lightning speed! We believe Drupal is perfectly placed to speed up the process of building AI prototypes and MVPs, so we have come together with a number of individuals and organisations working with Drupal and AI to make a base “AI module”.

Below we share our current approach to this module and the functionality of the submodules, and share some of our exciting plans for the future of AI and Drupal.

Key components of the module:

  • An AI abstraction layer which will allow you to hotswap to all supported AI models. We aim to support most of the common AI model providers in the core module and support others in the AI ecosystem.

    Will take the Search API approach, where plugins can tell the module of its functionality such as Context Window or Streaming.

    Supports all the differing functionality of AI companies such as image generation, text, multi-modality, audio and (eventually) video.

  • Retrieval Augmented Generation using Search API. Allows the LLM to access all your content and attachments in a secure and configurable manner.

    Pluggable so it will support a variety of embeddings and vector databases, both proprietary and open source. 

  • AI_Automators - AI automators on your fields and content will allow you to quickly create full applications with AI with no/low code. Based around AI_Interpolator.

    AI_Automator_ECA - Integrates with the ECA module to make workflows combined with human agents.

    AI_Agents (Experimental) - Autonomous Agents that can work in the background, talk to each other, review each other and interact with the Drupal site.

    AI_External_Services - Bringing in the hundreds of AI_Interpolator plugin rules so that automator can connect with a large number of external services such as Media Wiki, transcription tools and website scraping tools. Includes a browser to help you find the tools you need.

  • A testing framework to check that your AI application is useful. It will be able to compare to past data, ongoing human evaluations or questionnaires for the end-user.

  • A collection of small modules so that the AI module does something useful out of the box as well as some debugging tools or components such as a Chatbot and CK Editor widgets.

    Basic Content Tools - Our AI module will provide simple example widgets for the content editing experience such as translation, recommended taxonomy and summaries. This will be built on top of AI_Automator, so the prompts behind these example widgets can be edited according to your website’s needs. - Same as the OpenAI_Content module.

    Chatbot Block - A simple chatbot so that users can talk to your content or interact with your site. Pluggable so other modules can provide their own Chatbot instead.

    Prompt Explorer - Simple User interface to prompt your LLM and get a response, so you can test that it works. Works with other models such as AI image generation and saving it to your media library.

  • Will include best practices alongside how the code works.


FAQ

  • We want the AI module to, as much as possible, get you up and running with powerful AI applications in Drupal as quickly and simply as possible, without having to find a huge collection of separate modules across drupal.org. The module will provide the basic, usable functionality that you would expect, right out of the box. We will make sure it is possible to take our sub-modules out of the AI module if necessary. Most AI applications will likely become recipes that use a collection of the sub-modules. AI combined with the fleixbility and openness of Drupal where you can just add your own implementation and use it everywhere is enormously powerful!

  • The AI module maintainers have already built a lot of the functionality we have outlined above, just in separate modules. This initiative brings everything together in one module, allowing them to be closely integrated and tidied up to production-level quality. 

    LLM provider - Will form the basis of the core AI module and allow you to swap different models, supporting Claude properly for the first time and many open source models. 

    OpenAI - The AI module follows the approach of the Openai module but will allow you to hotswap to any model, not just ChatGPT. All the functionality in the OpenAI module will be ported to the AI module.

    Search_API_AI - Will form the basis for RAG in the AI module but fully integrated with the other tools.

    AI_Interpolator - Will form the basis for the AI Automator module.

  • We believe AI is too big and has too many possible approaches and exciting use-cases to be dominated by a single Drupal company. We believe that through collaboration Drupal will become indispensable in this new wave of innovation and everyone stands to gain from this. Please reach out to us, get involved and share some stories!

  • AI will be essential for Drupal’s survival. Starshot is aimed at making it easier for a beginner to use Drupal but this will soon seem ancient technology compared to AI-powered competing products. We also strongly believe that Drupal can be important for the AI community. Drupal is a serious contender to be the No. 1 in Open source AI orchestration required to build fast AI applications easily with little to no-code. Here are some reasons why we think this is true: 

    Many alternative tools require a large amount of coding, whilst Drupal can achieve a great deal very quickly without code.

    Other tools that focus on no/low code lack the functionality that Drupal takes for granted (e.g. granular user permissions) whilst Drupal already has a huge collection of modules and functions available to it.

    Other powerful tools are proprietary and therefore expensive, inflexible or only work well with the organization's other products.

    We believe that AI has the ability to further democratize web publishing as Drupal aimed to do. We think the best AI applications will not come from people with traditional technical backgrounds, so making this easy is incredibly important.

  • There is so much that could be said here. From an editing point of view one could argue that any CMS of the future will have LLM-like text processing capability built in. When combined with the Ai_automators sub-module, you will be able to carefully tune these features to your own website’s specific needs such as tone, branding and information.  Examples of functionality include.

    Tone of voice checking

    Derivate text/content generation (for social media or newsletters)

    Translations

    Input validation

  • We will aim to be as flexible and pluggable as possible, with the minimum amount of hardcoding, whilst providing opinionated defaults to help users get started. 

  • 17th June: We aim to have an alpha version of the AI version of the LLM provider completed, which will allow you to use the prompt explorer from OpenAI but switch between claude and openai.

    24th June: As many of us will be attending Drupal Dev days, we will focus on engaging with the community rather than logging code this week.

    24th June: Search API AI starts being ported by Michal during Dev days. Goal to release by 3 weeks.

    1st July: Aim to port AI Interpolator to the AI module.

    16st July: We aim to gradually port all the appropriate OpenAI functionality into the AI module built on top of AI_Automators including integrating it with AI_Search.


Further modules planned:

Below is our vision for future modules that we plan to build into the AI module’s ecosystem: 

  • AI_Extra_Models: We will support pull requests for any other module you might want to support; this will put them all in one place but will not be as heavily supported.

  • AI_Content_Editing_Experience: Whilst we have provided some simple functionality, Drupal is first and foremost a Content Management System; therefore, we expect that a fully fledged AI-powered experience will be created in due course. 

  • AI_Image_Manipulation: Supporting more complex AI image tools than the core experience e.g. using AI to generate an image from your sketch or editing an existing image.

  • AI_Prompt_Manager: As this becomes more widely used we will need tools to save specific prompts and prompt workflows.

  • AI_Experience_Builder: A potential AI-powered version of the experience builder, allowing AI to create content, views, layouts, components or even themes and designs. In the medium term, themes are likely to be specific AI-powered themes.

  • AI_Project_Browser: - Use AI to help recommend the modules you need to solve a use-case. 

  • AI_Misc_Examples: Similar to the AI core examples sub-module but will support a wider variety of examples including those too complex for core. For example:

    • A Drupal error log explainer via LLMs

    • Example applications such as a Venue analyser tool or a podcast socials generator. 

Next
Next

Press Release: A New AI Initiative in Drupal