cd ../logs
#012 OCT 05, 2026

Inside the Drupal AI Demo: How AI Answers Finds Its Sources

Behind the Drupal AI demo from DrupalCon Rotterdam: how its AI Answers search gets from a visitor's question to a cited answer.

Inside the Drupal AI Demo: How AI Answers Finds Its Sources
Marina Bay from the Singapore Flyer, Singapore

DrupalCon Rotterdam wrapped up last week. Four days, 28 September to 1 October. I followed it from home, and AI was everywhere on the schedule. Honestly, I felt good looking at it, because it wasn’t only AI. It was AI built into the things Drupal was already good at. The official recap put the keynote’s argument well: Drupal is “light-years ahead of its reputation”.

In the Driesnote on Tuesday, AI was one of the three areas Dries put under “Bring Drupal’s strengths to more people”, next to multilingual and JavaScript plus headless. He also introduced the Drupal AI demo, one of the six demos from the keynote: a university website built to show off the best of what Drupal AI can do in one place.

Demo: Try Drupal AI for yourself Our version of the Driesnote slide that introduced the Drupal AI demo: "Demo: Try Drupal AI for yourself. A demo site for exploring Drupal AI." DRIESNOTE · DRUPALCON ROTTERDAM 2026 DEMO: TRY DRUPAL AI FOR YOURSELF A demo site for exploring Drupal AI.
The Drupal AI demo, from the Driesnote

On Wednesday, Niels Aers and Christoph Breidert went deeper in their session, Drupal AI Product Update: From Foundation to Agentic Workflows. Thanks to both of them for covering it.

One piece of that demo is the AI Search page. The recap describes a site where visitors “get answers drawn from your own content with sources shown”. You type a question in plain language, and you get a written answer with numbered citations that link back to the site’s own content, the source of truth. That feature is AI Answers, and a few of my teammates and I spent the last few months on it, together with the AI Initiative. The demo as a whole was built by “leading Drupal AI companies”, as the recap puts it, and AI Answers is the part I worked on.

Search wasn’t a random pick for the demo. In July 2025 the AI Initiative ran the Global AI Survey, with 216 people from 199 organisations saying which AI capabilities they actually want. When the results were presented in the webinar that August, good AI-enabled search was the top ask.

The demo is public now, so you can try it yourself. Start the official Drupal AI demo, a free one-hour site with nothing to install. Once it’s up, go to /ai-feature/ai-search on your demo site. That page explains the feature and links to the search.

Here’s how it’s put together, and what actually happens between the question and the answer.

One-click demo site, a lot of repositories

When you start the demo from drupal.org, the site is spun up on demand on Drupal Forge. It’s the same demo either way. Behind that one click there’s almost no custom code. It’s Drupal CMS with a stack of recipes applied on top. The code base has three main parts:

  • The starter template is the base project, running on DDEV locally and on Drupal Forge for the live demo. It runs composer create-project drupal/cms, installs the site, and applies everything else.
  • The demo content is Northmoor University, a synthetic university with courses, programs, departments, events, people and news, in English and Spanish. It’s applied first, as the install profile.
  • The site recipe is a type: Site recipe whose recipes: list decides which AI features get installed, and in what order.
Northmoor University demo content An illustration of Northmoor University, the synthetic university behind the Drupal AI demo, next to a grid of its content: programs, courses, people, events, news and policies. A few items in each group are highlighted. NORTHMOOR UNIVERSITY A synthetic university, in English and Spanish PROGRAMS COURSES PEOPLE EVENTS NEWS POLICIES
Northmoor University, the demo’s sample site

Working on this taught me a lot about how a site built from many recipes behaves. One example: the order recipes get applied in matters more than you’d think. AI Answers and another recipe in the demo both depend on AI Recipe: Content vector search, and that recipe couldn’t be applied twice. More on how that played out further down.

How the Drupal AI demo site is assembled The starter template runs every step. It installs Drupal CMS, adds the Northmoor University demo content, then applies the site recipe, which adds every AI feature in a set order, AI Answers among them. AI Answers is three layers: a university partner recipe builds on a public AI Answers recipe, which installs the ai_answers module. HOW THE DEMO SITE IS ASSEMBLED STARTER TEMPLATE 1 Drupal CMS The base every demo starts from 2 Northmoor University Demo content, installed first 3 Site recipe Adds every AI feature, in a set order Guardrails Chatbot Translation Image tools AI Answers …and more AI ANSWERS, ZOOMED IN University tweaks for the demo AI Answers recipe, any site ai_answers the module Public, on drupal.org Partner, for the demo
How the demo site is built

Where AI Answers sits

AI Answers is spread across four layers, and a change to how it behaves usually touches more than one of them:

LayerWhat it owns
ai_answers (module)The answer engine: retrieval, sources, citations, and the Question, Answer and Sources blocks
ai_recipe_answers (public recipe)A generic setup for any site: a vector index over all content, a search agent locked to that index, and the AI Answers settings
drupal_ai_demo_answers_university (partner recipe)University overrides: which fields get indexed, the agent’s prompt, permissions, and the /search Canvas page
drupal_ai_demo_recipes (site recipe)Pulls it into the demo, after the RAG chatbot recipe

I recently moved to a new place, and while organising things at home it hit me how much it helps when everything has a fixed place. Code is the same. You can’t just build a feature and drop it anywhere. You have to think about where it fits in the whole system. AI can read the docs and follow them for you, but that only gets you so far. This is where years of Drupal knowledge still pay off, and there’s a good example of that further down.

It also shows how ready Drupal already is for AI. The architecture is good enough that a structure this complex comes together mostly from recipes and YAML config. The part left for us humans is to think it through and craft it. Dries has written about this in Why Drupal is built for the AI era and Launching Drupal’s Outside AI workstream.

Back to the project. The general rule of thumb: anything generic goes upstream into the module or the public recipe. Anything that names Programs or courses stays in the partner recipe. At least, that’s how I drew the lines.

What happens backstage when you ask a question

Here is the path a single question takes, from the search box to the answer.

What happens when you ask AI Answers a question A visitor asks a question. AI Answers always searches the site's own content first. The best matches become numbered sources. The model writes an answer from only those sources, citing them inline. The visitor gets the answer with a card for each source. For list or count questions, a listing tool adds the complete list to the sources. A follow-up question skips the compulsory search: the agent searches again only if it needs to, otherwise it answers from the sources it already has. WHAT HAPPENS WHEN YOU ASK A QUESTION A visitor asks a question 1 Compulsory index search A new question always searches the index first 2 Numbered sources The best matches become citable sources 3 A cited answer Written only from those sources, like [1], [2] Answer + source cards Each source links back to the real page LIST OR COUNT QUESTION? A listing tool adds the complete list, not just the closest matches. FOLLOW-UP SEARCH ONLY IF NEEDED
How AI Answers handles a question

The content is indexed ahead of time. The public recipe builds on the content vector search recipe, which sets up a vector index on PostgreSQL through the Postgres VDB provider. The university recipe decides which fields matter for each kind of content. Landing pages are left out, because their body lives in the Canvas field, which the indexer can’t read yet.

The first step is a compulsory index search. AI Answers runs on top of an AI Agents agent, whose search tool comes from AI Search and is locked to one index. On a new question, AI Answers doesn’t leave it up to the model. It calls that tool itself, which fetches the best matches from the index, every time.

The best matches become numbered sources. Weak matches are dropped. What’s left is numbered and handed to the model with one rule: answer only from these sources, and cite them inline as [1], [2].

The answer streams in. Text appears as it’s generated. It’s model output, so it gets sanitized before it touches the page.

Only cited sources stay. Once the answer is done, anything the model didn’t cite is removed from the list. Each remaining source shows up as the real Drupal page, as a card in the demo.

Follow-ups keep the thread. Ask “Which of those are graduate programs?” after the first answer, and it stays in the same conversation. The compulsory index search only applies to a new question. On a follow-up, the agent sees the earlier questions and answers and decides for itself: if the question needs new information, it searches again. If the context from the first question is enough, it works out the answer from the sources it already has. A source that shows up again keeps the card it already has instead of appearing twice.

If nothing useful comes back from the search, the visitor gets a configured “I don’t have that information” message instead of an answer made up from the model’s general knowledge.

When similarity search isn’t enough

While we were testing the demo, Aidan Foster reported an issue that boils down to this: ask “What are your programs?” and the answer was “I don’t have enough information to list all programs.”

The index was fine. The problem is what vector search is for. It returns the few chunks most similar to the question, not a complete set. Northmoor has 12 programs, and before the fix AI Answers only used a handful of the closest matches. So a list question could never get a complete answer, however good the embeddings were.

The fix was to let the agent use a second kind of tool for questions like that. ai_answers 1.0.0-beta4 has source tools (#3615754): other tools on the agent whose results also become numbered, citable sources.

As Drupal developers we always say “there’s a module for that”. Now you can stretch it to “there’s a tool for that”, because we didn’t build a listing tool either. Tool API and Tool Belt already ship one. The university recipe gives it to the agent, locked so it can only list Programs, and adds a line to the agent’s system prompt telling it to use that tool for anything that asks to list, count or compare programs.

Now “What are your programs?” lists all 12, grouped into undergraduate and graduate, each with its own citation. Ask it in Spanish and you get the same answer in Spanish, thanks to a small prompt change in the public recipe (#3625284).

Use what’s already there

Most of this project was working out what already existed rather than writing new code. AI Search already did retrieval, the content vector recipe already created the index, and Tool Belt already had the listing tool.

Two more worth knowing about, even though the demo doesn’t use them: Langfuse for tracing, and crwlr, which we also built at Dropsolid AI, for turning an external site into nodes you can use as sources. If you’ve read this far and want a crwlr demo, DM me.

When something upstream didn’t fit, the fix went upstream too. The content vector recipe got a couple of fixes so it works well for AI Answers out of the box (#3620132, #3620134). And then there’s the re-apply crash, the example I promised earlier.

Say recipe X can’t be applied twice. Recipe A depends on X, so X gets applied. Then recipe B also lists X as a dependency, X gets applied again, and the whole site install stops halfway.

In our case, X was the content vector search recipe, and A and B were the basic RAG chatbot recipe and the AI Answers recipe. On the second apply, X tried to create the vector server and index again, found them already there, and crashed.

The proper fix belongs in ai itself, and that’s also what AI suggested as the right way to fix it. Its config actions can now run on a site that already has the server and index (#3586729). Once that shipped, the content vector recipe required the new ai release (#3620136).

But, but, but: the demo had to work before that fix landed. This is where years of Drupal experience kick in. We added a local patch that removed the shared dependency from the AI Answers recipe, so X only got applied once. That broke something else, because the recipe no longer declared some modules its own config needed, so a second change added them back. Once the upstream fix shipped, both workarounds went away.

What I’m taking away from this

A few things stuck with me.

A shared project only works when you understand the whole of it. The demo had developers from many different organisations contributing at the same time. Before you can add anything useful, you need to know how the system fits together and who owns which part.

Recipes are what make a project like this scale. The demo is basically a template, and recipes are how everyone’s work plugs into it. With AI helping and plenty of discussion along the way, an idea could go from “what if” to a working recipe surprisingly fast.

Where code lives matters as much as what it does. Most of my time went into deciding whether a change belonged in the module, the public recipe or the partner recipe, not into writing it. Get that right and the next site can reuse the work for free, and the work goes back into the Drupal ecosystem instead of staying inside one demo.

And AI didn’t replace any of that judgement. It read docs, wrote code and suggested fixes faster than I could. Deciding where things go, and when a workaround is fine to ship in a project, still came from years of working with Drupal and its community. That judgement is the human touch.

I didn’t expect a search box to teach me this much about how Drupal fits together. That’s what an early-stage, community-built demo gives you: every rough edge shows up, and every fix lands where any other Drupal site can use it too.

Thank you

Thanks to the Drupal AI Initiative for making me part of this. Christoph Breidert, Marcus Johansson, Niels Aers, Artem Dmitriiev, Sergiu Nagailic (Nikro) and Laurens Van Damme and many more people who helped me do this work well and brought AI Answers to life in the DrupalCon AI demo.

And thanks to Dropsolid AI for sponsoring my time on this.

If you haven’t tried it yet, spin up the demo and ask it something. If you want AI Answers on your own site, start with ai_recipe_answers. If you get stuck, find me on Drupal Slack (abhisekmazumdar). If you’d rather have it set up for you, with solid hosting and good AI model support behind it, talk to Dropsolid AI about Trusted Answers.

ps: tell them Abhisek sent you.