When Drupal meets AI
Tags: drupal, contribution, ai, openai
Published: 2023-12-11 10:04:45

---
title: When Drupal meets AI
published: true
date: 2023-12-05 10:11:00 UTC
tags: ["drupal", "contribution", "ai", "openai"]
canonical_url: https://tech.sparkfabrik.com/en/blog/when-drupal-meets-ai/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dov6a836xnu2b8catj78.png
---

How the Drupal community is moving to embrace this new era of advancement.

## Walking through the new era's days

Artificial Intelligence is radically becoming an integral part of our daily lives. It's an unstoppable trend, and it will be a part of our lives for a long time. It's already being used in many fields, such as medicine, finance, and education, and also in the development of new technologies, such as self-driving cars and robots. Witness to this trend is the [increase in investments](https://www.forbes.com/sites/cindygordon/2023/08/31/ai-start-up-investments-bucking-venture-capital-decline-trends/) made for 2023 in favor of startups offering services related to Artificial Intelligence. The reason is that it is a powerful tool that can be used to solve many problems, and it is not just a matter of technology but also ethics. It is a tool that can be used for good or evil purposes, and it is up to us to decide how to use it.

> "With great power comes great responsibility"

Like any wave of innovation, it makes you rack your brain thinking about the unbelievable opportunities it provides for streamlining your life and carrying out everyday tedious activities. However, at the same time, it instills a fear of the unknown that freezes us up because we are not convinced about its kindness. The institutions are trying to regulate the use of Artificial Intelligence, but it is not easy to find a balance between the benefits and the risks to fix the main concerns of the people:

* **Bias concerns**, it is widely recognized that a significant portion of the content available on the web is generated by people who have the privilege of [having access to the internet](https://www.statista.com/statistics/262966/number-of-internet-users-in-selected-countries/) and the time to spend on it. As a result, the training data and results tend to reflect this demographic bias.

* **Ethical concerns**, [research](https://investors.asana.com/node/9461/pdf) by work management platform [Asana's Work Innovation Lab](https://asana.com/work-innovation-lab/) found that 29% of the UK workforce uses generative AI and Artificial Intelligence weekly, compared to 46% of workers in the US. However, the decision to do so in a professional context is complex, and there is a growing fear among employees that using AI will make them less valuable and leave them with fewer creative skills. The same study finds that 30% of workers fear being considered lazy for using AI, and 21% say they feel like an impostor.

* **Legal concerns**, already last year, Microsoft, GitHub, and OpenAI [were sued](https://www.theverge.com/2022/11/8/23446821/microsoft-openai-github-copilot-class-action-lawsuit-ai-copyright-violation-training-data) for an alleged violation of copyright law by reproducing open source code using Artificial Intelligence. As a consequence, in June this year, the European Commission published the [first document](https://www.europarl.europa.eu/news/en/headlines/society/20230601STO93804/eu-ai-act-first-regulation-on-artificial-intelligence?&at_campaign=20226-Digital&at_medium=Google_Ads&at_platform=Search&at_creation=RSA&at_goal=TR_G&at_advertiser=Webcomm&at_audience=eu%20ai%20legislation&at_topic=Artificial_intelligence_Act&at_location=IT&gclid=CjwKCAjwmbqoBhAgEiwACIjzEAtUkUHdk5LcaMO0hG3TRzVMluAD6ajvQwXDt6xka2m6IqT1QxMtFhoC7jcQAvD_BwE) with the purpose to regulate Artificial Intelligence. OpenAI then, at the end of August [released an enterprise](https://openai.com/blog/introducing-chatgpt-enterprise) version of ChatGPT that promises to protect business data as more companies consider using the platform but worries about privacy and security.

* **Environmental concerns**, training models are the most energy-intensive components of generative AI. The researchers argued that training a _large, single deep learning model_ such as OpenAI's GPT-4 or Google's PaLM is estimated to use around 300 tons of CO~2~ - for comparison, the average person is responsible for creating approximately 5 tons of CO~2~ per year, although the average North American amount. Other researchers calculated that training a medium-sized generative AI model using a technique called _neural architecture search_ used electricity and energy consumption equivalent to 626,000 tons of CO~2~ emissions – or the same as CO~2~ emissions produced by driving five average American cars over their lifetime. Training a single BERT model (a large language model developed by Google) from scratch would require the same energy and carbon footprint as a transatlantic commercial flight.

## How is the Drupal community moving?
In this continuous evolution scenario, the Drupal community wants to keep pace and, since the end of last year, has brought out several modules for helping content editors, site builders, and developers.

On the edge, I might mention:
* [OpenAI / ChatGPT Integration](https://www.drupal.org/project/openai) provides a suite of submodules for content editors.
* [AI Interpolator](https://www.drupal.org/project/ai_interpolator) is an interesting module that can help you implement AI workflows wherein you can use the result from one AI service as the input for another AI service.
* [Augmentor AI](https://www.drupal.org/project/augmentor) allows you to integrate disparate AI services into your Drupal site.
* [Search API AI](https://www.drupal.org/project/search_api_ai) allows you to create powerful, AI-driven search experiences for your users.

Last September, I had the opportunity to talk about this topic at the virtual event [Drupal@localhost](https://www.grusp.org/conferenze_/drupal-127-0-0-1-28-settembre-2023/#when-drupal-meets-ai) organized by SparkFabrik and [GrUSP](https://www.grusp.org/chi-siamo/)

I showed how the AI can help in some simple scenarios using a couple of contrib modules out of the box.

{% youtube https://www.youtube.com/watch?v=fyy20o6Ztf4&start=6718 %}

If you want to know more about how the community is working, you might reach out to the [Drupal Artificial Intelligence (AI) community initiative](https://www.drupal.org/project/artificial_intelligence_initiative) and join the Drupal AI Slack channels [#ai](https://drupal.slack.com/archives/CDL2YPBNX) and [#openai](https://drupal.slack.com/archives/C04NCQGGX0E).

## Voice to maintainers
During my journey in AI discovery, I had the pleasure of exchanging a few words with some of the maintainers of the modules mentioned above, and I want to thank them for their time and for sharing their thoughts with me:

* Mindaugas [mindaugasd](https://www.drupal.org/u/mindaugasd)
* Raffaele Chiocca [rafuel92](https://www.drupal.org/u/rafuel92)
* Robert Menetray [trebormc](https://www.drupal.org/u/trebormc)
* Julien Alombert [julien-alombert](https://www.drupal.org/u/julien-alombert)
* Pedro Pelaez [psf_](https://www.drupal.org/u/psf_)

They told me that a double dose of inspiration sparked the journey into their Drupal modules. First of all, the fantastic features of ChatGPT are that it's like having a tech wizard who can understand language like a champ. This got them thinking: what if we could infuse that magic into Drupal? And this is where their second spark was born, in the deep desire to accelerate the evolution of Drupal. It's a fact Drupal's got many issues and exciting features in the pipeline, so why not turbocharge the solution process with the help of upcoming AI capabilities? Think about the awesome things we could achieve if we crank up the development speed.

It won't be an easy feat because it's like dancing with the ever-changing API – trying to keep up with its moves can be a real challenge. Moreover, the open-source world, while fantastic, sometimes comes with a tiny hiccup – not always having the funds it needs to keep pace with evolving technology. But good vibes shine through in their story; having AI by our side is like having a superhero making things simpler and faster, opening up a whole universe of possibilities for better experiences for end users and developers. What do you think if, in a not-so-distant future, we could dialogue with Drupal CMS to craft the features we've been longing for? It's like having a futuristic conversation where our ideas transform into reality, thanks to the brilliant touch of Artificial Intelligence as described in this core idea [Fully fledged website and module development with Artificial Intelligence](https://www.drupal.org/project/ideas/issues/3358892).

## Conclusions

Artificial Intelligence (AI)'s omnipresence in our lives is undeniable, shaping various aspects of society and technology. Conversations with module maintainers reveal a dual inspiration derived from the remarkable features of ChatGPT and the aspiration to contribute to Drupal's advancement. While navigating the dynamic nature of AI, the Drupal community remains optimistic, envisioning a future where dialogue with Drupal CMS is enriched by AI, paving the way for collaborative innovation and the realization of desired features. The journey into AI discovery and module development reflects the community's commitment to embracing AI's potential while addressing challenges with resilience and creativity.

Well, if you wish to lend now a hand in the Drupal evolving path, you may start by tackling the bunch of small, but mighty improvements listed in the following links:

  * [Issue 3380839](https://www.drupal.org/project/aichat/issues/3380839)
  * [Issue 3384411](https://www.drupal.org/project/aiprompt/issues/3384411)
  * [Issue 3384408](https://www.drupal.org/project/aiprompt/issues/3384408)
  * [Issue 3384407](https://www.drupal.org/project/aiprompt/issues/3384407)

They seem like tiny tweaks but trust me, they can make a difference. Join the Drupal crew; we're waiting for you!