Fully fledged website and module development with Artificial Intelligence

Created on 8 May 2023, almost 2 years ago
Updated 10 June 2024, 9 months ago

Problem/Motivation

Accelerating development of websites, more described in the parent issue πŸ“Œ Use ChatGPT for solving Drupal issues to increase rate of development Active

Considering new developments within a few months, we can foresee simpler Drupal websites may be developed with AI within a year.

Proposed resolution

Since Drupal has configuration management (configuration written in .yml files), AI can write code and build websites by modifying yaml files and interacting with website on the command line using Drush.

What is needed to achieve this and how it already getting possible?

  1. AI has to be great at Drupal.
  2. AI has to know a lot of context about current website
    • Context window of AIs is getting larger:
      • GPT-3 had 2000 tokens,
      • GPT-3.5 - 4000 tokens,
      • GPT-4 - 8000 tokens,
      • GPT-3.5-16k (recent update) - 16000 tokens.
      • GPT-4-32k - 32000 tokens,
      • Open source MPT-7B-StoryWriter has 65000 tokens,
      • Anthropic's Claude (similar to GPT-4) - 100'000 tokens
      • this paper https://arxiv.org/abs/2304.11062 explains >1'000'000 tokens
      • LTM-1 (new kind of experimental LLM) has 5'000'000 tokens
    • Parts about the website and codebase can be compressed (summarized/optimized for LLM)
  3. AI has to continuously access currently live/running codebase
    • [this part is unclear how to process large context continuously, at the moment this would be extremely expensive, so some innovations/optimizations/improvements/ideas necessary if not already known]
  4. AI has to have access to the command line
    • GPT-4 Code Interpreter plugin demonstrates AI can execute code and perform task on the command line.
    • We can expect open source libraries will replicate this functionality soon if it is not done so already.
  5. AI can edit code
    • AI can edit code by sending commands to the terminal like this: sed -i 's/^core_version_requirement: ^9$/core_version_requirement: ^9 || ^10/g' web/themes/stylish/stylish.info.yml
  6. AI can change configuration (and build websites)
    • AI can change settings by writing commands like this: drush cset system.site name "New Website Name" -y && drush cim -y
  7. AI has to see how website looks like (including admin pages)
    • GPT-4 has vision, but it is not released to the public yet.
    • GPT-4 can be given browser access like Selenium, Pupetter, https://browserless.io/ etc. for: HTML fetching, screenshot making, or testing functionality by clicking on things.
  8. AI has to perform tasks autonomously
  9. AI must have access to most up-to-date knowledge of the world
    • AI could have a vector database, or Bing searching (recently released to general public). Possibly both at the same time. autoGPT can search the internet and update its knowledge base. Or it could be an open source knowledge database, which anyone can download and use locally to optimize for speed, because browsing the internet is slow. Only if local database does not have the (Drupal) knowledge, internet search might be performed.
  10. Humans have to receive results they expect
    • Simple examples:
      • "AI, please create sub-theme for Barrio named Stylish" - doable.
      • "Please create a grid view with URL /posts with latest articles" - doable.
    • For more complex scenarios autoGPT will have to devise multi-step plan.
      • "Please create a website for a conference named DrupalCon"
    • When AI does something wrong, humans will modify AI's reasoning and save it to AI's open source knowledge base. Next time, AI will know better how to perform tasks or reasoning on more complex scenarios. In other words, we can train the AI to do the right thing (this is a big ask for the whole world in general, and Drupal can participate in inventing the solution).

What innovations can be done on a Drupal side?

  • Since this would be implemented similar style to autoGPT, this Python library could be implemented in PHP.
  • Drupal UI could act as a User Interface for interaction with autoGPT or autoGPT-PHP. Creating chating and control mechanisms inside Drupal CMS taking advantage of Drupal standard features #3347447-4: ChatGPT-like UI/UX (and integration with aichat) β†’ . But this would also mean we would need to create a lot of new features Drupal currently lacks, which would be usable in all kinds of scenarios (described here #3350297-4: Creating chatGPT ECA action β†’ ). Like aim for the moon, but create additional useful technologies as a side effect.
  • Try to use this whole development concept in practice and iterate.

Remaining tasks

User interface changes

API changes

Data model changes

🌱 Plan
Status

Active

Component

Proposed Plan

Created by

πŸ‡±πŸ‡ΉLithuania mindaugasd

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

Comments & Activities

Production build 0.71.5 2024