DrupalCon

Building AI-Powered Drupal Applications: From Setup to Production-Ready Features

56:35 · 23 Mar 2026 – 26 Mar 2026 · YouTube

За тази лекция

This workshop focuses on integrating AI tools with Drupal, providing practical demonstrations on how to set up and configure various AI functionalities within a Drupal environment. The speakers, Chris and Atam from 1x Internet, guide participants through hands-on exercises that involve enabling AI for content generation, image management, and SEO optimization. They discuss the installation of AI modules and the process of configuring an OpenAI key, while emphasizing the use of field automators to enhance content creation efficiency. The session also covers advanced topics such as implementing vector search capabilities and utilizing guardrails for data security, showcasing the potential of AI to enhance user experience on Drupal websites. Participants are encouraged to follow along and explore the practical applications of AI in their own projects.

Пълен транскрипт

Okay. Yeah, we had a we had an early start and um so we then now now's the real start. All right. So, uh we're here for a workshop style session. So, it's it's hands-on. You can follow along, do some stuff, but um yeah, press. Yes. Um so, you can follow along, but you can also just really just uh uh relax and and and listen. Um so, first

thing you see, I'm not going to do this alone. I brought my uh colleague Atam along. So we are we we going to make this as um entertaining as good as useful for you as possible. That's why it's better when we two so we can like little bit you know put the word back and forth and um yes I'm Chris and uh this is we are both

uh from uh 1x internet and um so we have a packed agenda today so which we are going to go through. So, um, we're starting really really on the low level with like simple configurations and then we're working our way up to do things that are that are more exciting. All through this session and workshop, we're just going to do stuff that you can just click together

and it works right away. Yeah. So, we're not going to code anything. We're not also not going into concepts about like what is Agentic and you know like how does this work? Yeah. We just actually giving you tools at your fingertips that you could use if you want to start building AI things in your Drupal websites today. Yeah, I would like to add a little bit of

feeling feeling for the crowd. So, um, who of you has AI installed on a Drupal website today? Or like other way around who has not yet tried to install Drupal AI? All right. Good, good, good, good. So, we that's where we're starting. Yeah. Um and also like to little explore this more like who has installed like chat bots and rag search and agentic on on on their

websites. Show of hands. Okay. Some all right we'll get there too. So like you will really span from like getting started like how does it work until like you know do stuff that's actually really cool that not many people can do just in our session today. >> Turn the volume up. I can speak more into the microphone. All right. I'll try this. All right. Um, so these

two, um, uh, uh, QR codes will come up in the end again, so you don't have to, uh, uh, take a photograph right now or scan them right now. But, uh, so the right one's a link to the presentation and the left one is a link to a markdown file with all the commands that I'm going to execute or that were executed that are on screen. Yeah.

And if you just if you later want to do exactly what we do in this session, you can just follow the steps in this workshop MD file and you just have this all running and it does exactly the same as you will see today. So that's a little bit the idea. So therefore, if you have your laptop ready and you want to do it, go for it.

Yeah. Um if you just want to watch and then later there's screenshots for everything and then later do it. You can do it later. As said um the barcodes they're coming um the QR codes they're coming back up on the last screen. So I'll just continue now. Maybe you've heard that one before. Content is king, but context is King Kong. That's actually a good one. You think

about it. It's unrelated to AI, but it fits to AI. It's actually from from TV advertising because in TV advertising, you need to show your ad when the audience is watching. Yeah. In AI, it means something else. But context is just king. And therefore I'm going to give like brief context about us and our company so you know who you who you're speaking to and why I'm

presenting this to you now and what I want to get out of it or what we want to get out of it and with you together. All right. So one internet we European uh uh Drupal agency. We have very little business here in in the US. Yeah. So I'm I'm not here like with clients talking to clients. I'm just only here for leisure. I'm only here for

being with you, working with you and just learning and hearing. Yeah. So that's that's really all why I'm here. Yeah. But we are one of the bigger ones in in Europe. So we are everywhere as you can see. We are also up in uh uh up in Iceland. Um that's here upper left corner. And um that is actually real photos not AI generated. It's one of our

colleagues because there was a eruption um uh not so long ago and we discovered this full spectrum like from conception to building to operating hosting and optimization. And of course also uh optimization part of this is a optimization for AI and yeah apart from this we are one of the founding uh companies of the Drupal AI initiative together with others and now we really many there's 31

I think as of today but we were there from the beginning so we take a huge role in there and um yeah I'm personally deeply involved in the productization side of Drupal AI. Yeah. So together with Neils, he's actually sitting there and um so we are the ones that try to bundle this all that bundle this all together into shippable products that are for you um so

that you can use them in projects. Yeah. And part of this shipping is that we do trainings and we just we tell you how this actually works because from the show of hands I saw not everybody's familiar and even if you are familiar there's so many things to discover. Yeah. So we need to find ways of how to get this fastmoving technology into your hands in a

way that you can understand. Yeah. And that is what this workshop today is. So therefore, I'm I'm really happy that so many are here and that you're just working with us now on this. And I would like later like to get your feedback if this is a format that's good for getting this kind of information across for you so that you can use it. So far for

context, the goal of the initiative, as I said, we just want to deliver features that you can use. And so therefore, let's get started. Um again we're starting with the first point. Yeah we will first configure now and uh but then we'll just do the most obvious thing is that is you know enable AI for seek editor so that you can actually work with your content and

change it and just use the power of AI directly in Drupal. So before we start um let's do uh let's see how we set this up. So for this workshop, if you want were to do this at home, you need two things, excuse me, you would need a running DDF environment on your local machine and you would need an OpenAI key. So Drupal AI is vendor independent.

Doesn't have to be open AI, but OpenAI is just the easiest. Most people have that key, so that's why I also did it here. And um and that's it. And then you can actually run through this by yourself. All right. If you want to get started like these are just the standard commands that you find see on drupal.org work where you set up a Drupal project with

composer and then you just use uh you know you see here it's just loading the standard project you know configuring everything starting it up then requiring Drush and then running Drush site install that's all that does you know so if you're a developer you've done it 100 times if you're not then the developers you work with have done it 100 times and um and then the next

thing what you would do is just install the AI modules so here's the list so it's it's it's a bit fragmented so therefore I is useful that they all here just in one command. Yeah. So obviously the AI module, there's something called AI dashboard, AI agents, then the OpenAI provider because that's what we're going to be using. And then a couple of other modules among them, for

example, Jin and Gen toolbar to make all the stuff that we see today look good. Yeah. And once we have that uh required, then we just enable it and uh then we set the system theme to Jin. Yeah. And enable Jin toolbar. And then we have a nice system that can do everything that AI needs. Yeah, it's simple. It's you can copy it later, fire it, and

it does exactly what I just said. Um, >> just also with you can also do it with Drupal CMS of course, but we are just showing it from scratch. >> Yeah, that's actually a very very good point that Adam makes. So we are targeting with all AI um functionality that we built, we're targeting Drupal CMS compatibility. So for this demo because like Drupal CMS is also fast

moving we just do vanilla Drupal but it's exactly the same. Yeah. Um all right. So how I did it here for the demo Yeah. is uh that I just put the OpenAI key in as an environment variable in DDEV but you can also just put this in through the UI. Yeah. And then you just configure it. And now I'm going to show you like how you actually

do this because that's here. Now it's actually now mirroring would be better. Sorry, I'm going to change the miring. Sorry, I I thought it was good idea to have like speaker notes here, but I need mirroring because otherwise I have to look here. So, let's go play mirror. Mirror means that it's better. Keep Yes, we here. All right, good. So first thing you would do here wait

you'd go to keys and you would configure an open AI key. Yes. So in my case I set this here to read from an uh read from environment. Yeah. You can also just put in the key directly. Yeah. And um then you put in the key. Next thing you do is you go to OpenAI provider and you just select that key you just create it and you

save and then your system's connected with uh uh with OpenAI and the way you can check it is that you go to um default settings to the AI default and there you see that for all the different AI capabilities it uses the default module that's configured from Mayai. Yeah. Um so for you to follow along if you do this at home um you see here like exactly

these screenshots are also in here. So you don't have to remember this really hard now. So you can see it here and then you can try it parallel by yourself. And um I wanted to point out uh one thing here. I want to point out one thing. So if you go to the um um if you go AI dashboard here. No, hang on. If you settings, >>

where is it? >> Yeah, exactly. There we go. So, we have a really nice dashboard. Yeah. That um uh that sits on top of Drupal AI. And there you can actually also just like put in a key directly and all these steps that you just saw with like key and provider and configuration that just happens there with one click. So you can do that too. Yeah, for

completeness I just want to show it all on this dashboard. You see like also a bunch of other things. You see like here the configurations you see the same here like what we just saw and you see a bunch of bunch of other things. All right, next thing. So now we know it's working and before we start building anything like we want to maybe play around with

it and therefore that's the next thing that has want to show it's called the AI API explorer because the AI functionality has like very many things you can do with it and before you start building and then you figure out doesn't work. Yeah. So there's an API explorer that you can just use and I want to show that here. So you can say um AI API explorer

and you can explore all the different things that AI module just brings and for example the most obvious one would be the chat generation explorer. Yeah. So where you see here, okay, is OpenAI being used if you had more providers configured. You could choose, you can also choose between the different models. It's using the default now. And now here I could do something like um tell me

a joke about Drupal and would send that request and I would get the response here. Yeah. So that's actually when you just start building stuff. That's that's when you start building stuff how you would actually do it. you know that you just explore like the functionality so you make sure it works. Yeah. And then you can start building. All right. Let's continue. Um we are now going

to um enable AI for seeker editor. So here so what we do in the eye initiative we just we built recipes that you can just apply. Yeah. For those who are maybe not familiar yet with recipes are just bundles of Drupal um configurations. Yeah. that you can then apply with one click and it's sort of like importing the configuration and then it's all set up and that's

uh is it too low? Yeah. Okay. And um and uh yeah so we have that here for seek editor uh as well. Yeah. So you see there's one little patch that I had to make and just for the completeness that if you want to try it at home um therefore the patch is included here. Only thing it does because this recipe was built for Drupal CMS where

the text format that is targeted it's called content format. But in this regular Drupal installation I have it's called um uh it's called uh full_html as you know. Yeah. So that's the only change that I'm making here. So really >> yeah and by default we while preparing to this talk we found this problem and there is already an issue for this recipe and it's already fixed. Talking

with Adam that he pointed out that we can parameterize this uh config action. So soonish it will be also ready that you can select yourself which format and which editor you want to change. So there's actually like a lot of the new stuff that's being built in Drupal right now that when you import recipes then you can parameterize so that you could for example put in API

keys or you could select target text format and so forth. Yeah. So that was so actually we didn't have to do this anymore if we had prepared that part earlier >> earlier. Yeah. Today anyway. So it's really just two lines. Yeah. So you just uh uh you require the recipe and you apply it and then you just can start uh configuring it. So here again you see

the screens. I will show this now live. So I go here to the text formats. Yeah. Um text formats and editors. And the one that we targeted here was um was full HTML. And what the recipe does, it just drags this button here, the AI seeker editor button into the toolbar so that it appears so that you have AI operations. And then it enables a few uh

AI tools that are available. And the only one that I just the main one that we're going to be using now is to generate text with a with AI. And the other one that's not enabled by default, which are enabled now for this training, is to just like modify text. Yeah. So and once you do this and you save then you can actually do something like this

you can add new content and you can say basic page and then you say uh Drupal AI and then you can go in here have to change to full HTML and then you could say assistant you should generate with AI uh generate three paragraphs about AI initiative. Yeah. So I I I know I can I can write better. Yeah. But like he understands me like this too.

And um so now like uh chat um or the model uh responded so I can put that in. So I could now um for example add some more text. Let's do one more or maybe it's changes here. Let's say, okay, I like the text, but we now want to modify it a bit and say, um, use some section headlines for better readability. Don't know if that's correct.

English. Yeah, looks much nicer. Use that instead. And we can save. Yeah. So that's essentially the same what you just do when you just use claude or chatbd today and you just create some text you take it you right click on it or Gemini and you say change this change that so you can do that right here all right let's check notes if there's more for see

editor um no all right um should we switch already or do you want to but it's okay take this one so this was the most common use case for the edit that they use it every day. But we want also to show you that there are more tools that can be easily added and they are small but bring a lot of value. So uh for example we

selected uh image management to show that you can for example add al text easy without finding it out yourself. So with help of AI you can also do the same faster and easier. For this there are already two new recipes that were created by initiative. So there is image classification and content classification. We will show only image classification because content is mostly what basically the recipe does.

So we have the media and the recipe helps you to generate al uh so with the eye so you don't have to do it yourself also uh it describes the image what it sees so there is prompt that says uh what it needs to do but mostly it just describes what is on the picture uh what is displayed what is the photo uh records and all this

stuff and also helps you to add tags to image so you can find it easily later in media library so for example you have a media library in your C editor but you need also to find easily your images at the moment it's only by name but if you want for example uh people. >> Sure. Just add an image. >> So if we add a new image

in the content, >> that's actually why I thought I was present this because he now has to pick an image from my laptop. >> Maybe added to the media libraries to media media. Yeah. Media media. video I think. Go to here. Uh I have demo images somewhere. Demo images. Ah yeah. Let's pick something like this here. Oh, I think this could be even something from Go for

it. >> Yes. So for example, there is a group photo from Duvocon and we just click this generate all text button and here is the text and now we just save It takes a bit of time because the vision model is needs some time. And basically with automators that are also part of EI core module, we get on safe this information about what is on the picture

and also some categorization that we can use later anywhere to find this image easier. And also this text from image description can be used with vector search later to also easily find the image from any context. For example, you wanted to use in canvas and then then find me the image with people on Drupalcon and then this one will be there. >> Yes. So how this all

done? So you see that there is this nice now on the form that is not part of the widget itself. So let's check the widget settings and find out where where it comes from. to the form display now there is this section called field with detections. It's just small framework that helps you to add these buttons to any field that you have either on media or taxonomy

or any other fieldable content type. And in our case, it adds the automator. Automator is the set of rules that just does something with unstructured content and converts it to structured content. In our case, this is image vision. And we can check the automator itself here in the edit of the image. Yes. So here is this magic button enable AI automator that adds automator type image al

text but there are others and there are more others. So for example you can generate image just on the fly from with the eye or rewrite image file name or any other that will be in the future will appear here and then just with a small prompt we can ask AI to generate alternative text that will be accessible SEO optimized and any prompt what you You can

add more than one automator to field. So you can for example at the same time change the file name itself add the text or maybe even generate it on the fly. So that's how it works. You can also just set the order of automators. We have to explain these ones too first. The description. >> Yeah, there are others now uh for the same media. The one that

creates this description that you saw on save and the same it adds the new text or existing text when when it's when image is saved. Also, you can there are automators out of the box for most of the field types that are there in Drupal core and more. So for example, there are automators for text fields, entity references as you see now with the text for image

fields, select boxes, uh practically any field type and field widget that exists in Drupal core and also in contribute modules. For example, custom field. This is the most powerful probably that exists now. And also there are others that we will show later. Maybe I won't answer. >> So I want to add. So you see two things here at work. So number one, you see field automators. Yeah.

So you can automate what happens in a field depending on other fields, right? So you can enable a field. You can say you would actually see this here in um if we just went to the um oh here the tags There's also an automator available but isn't the taxonomy field. So there's an automator for taxonomy. What this one does, it just reads a base field which is

the image description right in the image description AI put like lots of stuff in and then the next automator comes reads from the image description field makes tags from it. Yeah. So that's how automators work. They attach themselves to fields and now this field widget actions allows you to just bring this to the field widget. So because then you can choose if you want us to run

like on save or on chron or if you want to run it in field widget. Yeah. So there these are these two. Yeah. And but once you understand this how this hangs together, yeah, then like there's a lot of power at your fingertips. At the moment there are also extensive uh documentation in the iModule itself that explains how you can configure yourself for most of the field

types. for example for metatags also for address fields for chart fields uh you can check it also and follow the instructions with the instructions also with images and it should be easier. So yeah, so here are also the same screenshots that you have seen. Maybe this one is uh we can again talk about quickly. So these are the processors that are used for running these automators. So

as Kristoff said, you can have it directly by save. So that was what I was showing when I saved automators run. Then there is another one that you save it and it adds to the queue and then runs in background if for example the task is really long and you don't want to wait in the form that it will do in the background. The same was with

batch operation. So you have I don't know 10 automators and then you don't want also to lose the form with timeout and this runs in batch and the last one is field actions the one that you see on the form with a and trigger with a button yourself. Okay, so we come to the next section of our presentation. How you can deliver the your content from your

site to LLMs to these uh chat bots that are scraping your site. So they know more about your site, about your content. This is of course only starting to be developed. Uh and the protocol that is used in our example is also not really a standard protocol yet. Maybe uh you have seen the post from Dre about the same that he converted most of his pages to

and format and was also trying to do the same as we will show you. But not all scrapers are now follow the standard yet. But it's also nice to have if you have opportunity. But opportunity here for us is to show that it's easy to do and you don't lose anything if you try to do it. And maybe in the future it will also help to find

your site easily with chat bots like chat GPT or Gemini and they will probably reference your So for this AI initiative also created a LLM support. We are also installing pass alto module because it's not a requirement but uh we will show why we did it later a bit. Yeah, let's just show it off. Um so like after you've applied these recipes, there's two ways. So it

does two things. is it converts your content into markdown and it just puts everything in llmtxt file so that um AI can pick it if that will be the standards who knows if that won't be the standards you can uninstall it again but for the moment that's what we have and so for example if I go on this website here um on this page and uh let's

go to edit you see that um uh it has like some LLM content section taxonomy that you can add I just for the fun of it added a taxonomy item called products, right? So that you could like classify your pages uh uh into you know some classification system in which it would show. Yeah. And then what you can do is you can if I just go back

here and I go here to lm txt you see like the uh the standard conform lms configuration nice to have. Uh what's really good you see here like it has MD in the end. Yeah. And so what that also does is recipe that just um you know enables rendering of all your pages SMD files and that's actually a real benefit because that comes in handy later because

like if you build like rack based search or you expose your data for other systems you don't want to expose it with all the fancy HTML that you have just for token saving but also for clarity. Yeah. So you just want to have this markdown conversion and that's actually solved really nicely simply by applying this recipe. >> Yeah, forget something. >> Yeah. And that is why there

was pass auto to show that even just by adding MD to your alias, you still get this markdown format and you don't need to remember the URL. >> Yeah, exactly. All right. Uh let's continue now. Uh let's build some more uh AI functionality here. So um so you see this here again, you know, like all the settings are if you put that to the menu, it would

also show up in LMC. That's the default configuration. Um so now let's um now build something with um uh for AI. Yeah. Something very typical typical workflow is if you just wanted to optimize for SEO is that you would just add a field for focus keyword. That's what the SEO folks always say. You need to have a focus keyword then everything should uh arrange around that. Yeah.

And then you know if you have that you just want to optimize your text you know around uh around that. So uh let's a little bit uh play around uh what we can do here. So here we is actually not adding anything new. Um the only thing we're doing is we just we added here a new field. So for examp we created a page didn't we? Um

this one here Drupal AI. This page we did create. Yeah. And we could you see here down here is a focus keyword. So I could of course also now add an automator to that to automate finding the focus keyword. That would be kind of reverse though. you want to set the focus keyword and then use it for the rest. Yeah. But you could. So let's say this

would be uh Drupal uh AI initiative. Yeah, that would be my focus uh keyword. Yeah. And then I can just use this focus keyword in AI operations. And um for example, how we could use it would be here for just generating titles. Yeah. So you see here now what I have enabled. I have enabled a content suggestion widget that uses AI with taking the focus keyword into

account to just generate SEO optimized titles. Yeah. And what that would now do is just you know read the page and then use the focus keyword and then suggest whatever titles I could have and for example that would be a good title let's say and I can save it. Yeah, let's take a look how that's built. So here we are just on the article um on the

form display. So you here have the form display for my title field and here I again have field widget action and here now I have suggested added an action to uh suggest content with a prompt. I gave it a title. It said suggest title. You saw that on the button. Yeah. And um all you then do here I I use the same the default model the 5.2

that comes out of the box. You could change if you wanted to. And then my prompt is as simple as um as simple as that. You know generate two to three titles based on the focus keyword and the body. Right. Um good. Of course you can do yeah meta text. Yeah, this text >> this suggestion can also be not only for the plain text fields. It can

also be for the seek editor fields. So if you have for example some summary that you want to show, you can also ask to generate summary with couple of examples and then you choose which one you like >> Exactly. >> Uh yes. And um there's another uh nice uh uh feature that you can add here is um um what is that? Yeah, that was here. this one.

Yeah. So, you can also use the same thing uh uh for meta tags. Yeah. So, here going uh further through, we just adding now the meta tag module that you would most likely use for SEO. And then just for the fun of it, we've added the um meta tag open graph. Yeah, we've added it to the form. And we have then again just giving it a very

simple something like you're an SEO expert make meta tags. Yeah, that's common knowledge. They know that. and then use the focus keyword, the note title and the note body. And that then looks like this that you just have here um also on the form display where meta tag and that's exactly the same. that's it. Yeah. And um so what then happens is that when you just um

edit piece of content so for example here like uh initiative that one where we were and you have a meta tag on the side I think there's not a button on the bottom and now you see a nice button that would just generate that for you if you wanted Right. So it's like really powerful everything like building for SEO and stuff where like your experts have to

fill in things. So purely done with field widget actions and uh automators. Now um a yeah a word on logging. Yeah. So of course when something goes wrong you have to kind of trace it down to like how can I find the errors. Yeah. So the way what we are building in Drupal AI is we have a module in course called observability and that actually collects all

the signals that are coming from all operations and sends this somewhere in a production environment. You would of course not send this to your local logger. You would send this to something like graphana or data dog or whatever it is that you have for this really monitoring like your AI trace. Yeah. But when you develop you're just most likely going to um uh maybe or also for

showcasing here you just want to see this directly in Drupal. And for this we are going to install two additional modules like it would be the logger and the logger uh database module. And what that now does is that when I go here to um so I have here the um where's my logging? Yeah, sorry. There it is. Yeah, we have the recent log messages. That's the

watch log that you know. But we also now have here logs. Yeah. And now all the logs here from the system. I could filter by observability. The last one is anyways from observability and that now um just gives you the full log of um AI input and output operation. It's fully configurable. So if you go to logger and um you can just really configure like uh what

uh what should go in there and and how it's and how it should act. It doesn't yet look so nice because we at the moment working on recipes because since it's logger and structured we can make views and we can make this look nice. That's not so useful for production, but it's really useful for like showcasing and just like getting started. Yeah. So, we provide recipes around

that very soon. And then this what is now looking a bit rough will then also look super nice. All right. Now, let's build something cool again. Um, let's build a let's build a chat assistant that just knows your content. Yeah. So that's a bit more magical and it's again dropped that simple as everything else that uh we have shown so far. So what we're going to do

now is we're going to um require tools. Yeah. Or tool and we're going to enable it. Uh and what tool is so you've probably heard this in the Dre note and maybe everywhere else. So you have a chat assistant which is just an interface. You type something in and send something away. Yeah. But if you give that tools, it can also just do something with the tools

first and then it can it can loop. Yeah. So for example, like for the um um so for the title generation, we just say read this body, read this uh uh uh keyword and then suggest three titles. That's just one shot. Yeah. But like with tools, you can say, all right, here's the question. Here's the content that I have right now, and here's some tools that you

could choose to load additional content from if that was needed to complete the request. So then you have loops, right? And that's just what that does. And uh this is what we are going to configure now. So the way you would do that, you would just go and you would make yourself an assistant. And the one that we just did here in in the demo, it's all

documented. This here uh the latest content assistant. Yeah. And and all that it only has this very simple prompt. It just says you are just you have access to the content entities. Yeah. And you should answer some questions. Yeah. And um and uh um and and if you can't answer say you can't answer. Yeah. Um so it works twofold because we are going to expose so this

creates an agent uh at the same time but we are exposing this agent as an assistant. That's why we create an assistant first and that creates an agent at the same time. So every assistant has an agent but you could also create yourself an agent that doesn't have an assistant. Yeah. So therefore we just add an assistant first. And then if you just go over to the

agents you see the same. You see here the same the latest content uh assistant. Yeah. And you see that this assistant here has um has two tools available. Let's first look at the first one here, the list content entities tool. That's just a tool that's just available. If you install tool, it just has that. Yeah. And if you just add this tool here, so adding tools is

as simple as going here and then just picking or filtering. Yeah. And then the tools you have selected, they appear as um configuration UIs down here. And you can then say like um I don't know like if you just wanted to restrict um for example I only want to have entity type node is that's the only thing that I want to know to load and I think

I only want to have five or something like this. Yeah. And only five. So and then so once you have now the agent configured that has a tool and you have your assistant now you just need to place this on the website and for this you just use standard blocks. So let's take a look how that was built. So you go to block layout and we see

here our um uh where the content section here you see the uh the content assistant and if I look how that one was configured I picked the latest content assistant that's the one we just configured. Yeah. And I just told it to appear in the toolbar and um Yeah. And so now let's take a look. So what does toolbar mean? Tool bar means it comes to where

why you want to see it was it only in the edit interface see it supposed to be there what it go >> so like all problems you just need to clear the cash no I know what it is sorry sorry I restricted it to show only on the front page. That's why it is. So it it was doing the correct thing. So it was a human error.

Um so the assistant is here. Yeah. So we can now say um what do you know about Drupal AI? And he would now answer. So what happens in the background? he would just now pick that tool and you know would get the latest five content pieces and then would read that through and then just compute an answer. Yeah. So now let's look at something really cool and

I'll say uh what uh ah where is the gala tonight? I don't think it's in the content but ah okay look. So he says, "I don't know where the where the gala is tonight, but I can put you in in contact with somebody if you share with me your name and your email address." Yeah. So let's do that. Uh ah yes, please. Um I am Kristoff and

my email is uh Yeah. So he offered me to put me in touch with the support team and now he just runs the other tool. You saw that it was a web form submission tool, right? So that tool understands how to deal with this data and says like okay, I have now submitted this web form. Let's take a look if that's really the truth. Uh we go

to web forms and you see here like when you enable the web form module, it comes with a contact web form. Yeah. And if I go to the content web form and we just look at the results you see here latest request request location of Gala for tonight. Yeah. So so what you can actually do and like with a nice message like summarizing everything that was said

before. Yeah. So what you can just really do like with uh with making chat assistant you can just like you know make your forms uh available. There can be multiple forms you can just pick the right one. Yeah. You can just have you can steer these flows and you can load certain content in there if you want to as context. Yeah. So you can just do um

uh do that. I'm going to hand over to you again. Then you can do the next one. Right. So that one we just showed that there was simple tool that was uh listing your five last content. But if you want to have something more uh intelligent then so this was done yes then you need to create uh some vector database search and use uh retrieval augmented uh

generation for for it. So this is also out of the box in the AI module and this is for simple use case easily configured and we will show you now how. So the example would be based on the mil vector database but you can use any other. So there are a lot of others also local and not local with some cloud services but the milbus is just

the most simple one and most accessible and you can also copy the configuration to ddev from the EI module itself and we also will need uh two additional modules search API I hope you all use it and there is also the provider module for mil so just to show that here. So when you install you will have the vector database settings. So here we have mil for

DD is just server mil port the default one but if you have for example zelix or some other one you might need to have a key but uh if it's local you don't need. And now what we need to do is just to create normal search API server and search API index the same as you do for normal search with database solar or elastic. And here will

be your Milvos. You just need to point search API to Milos installation. So we have here this vector database milos. All you need is a provider that supports embeddings. Most of them do. And by default, it will be default provider that you have, but you can of course change it when you create. Now we you can't change because if you change, then all your search will be

not working anymore. That's why it's now disabled. So when you do it first time, choose wisely. And here are some settings what database and collections in mil itself are used. And then when you do index it's also quite the same as you do before but it has now one more column that will just show how this content is used. So for example we want rendered item to

be as main content for the vector. So everything that you have on your page will be vectorized and for example title will also be as contextual content. So it will not be vectorized but when you do some other operation on top it can use title. You can add any other fields but the main content should be only one. So here you also need to make a decision.

If you have for example only body field you can also use just body field. No, no need to do render HTML. But all other fields will be just either contextual filters or normal filters. You can also add if your vector database supports filtering like mil supports. You can add for example by content type or by some category. And this is how it's configured in some basic >>

show the tool. >> Yes. And there is of course a tool that you can explore how your how your search works. So for example >> yes so for example everything that we have added was immediately indexed. So for example the same question what is Drupal EI initiative and then it will just give us here are just only results that it was found that is not nice answer

but the nice answer will be with your assistant. So for >> wait but wait one second. So you see here the question he asked was so that wouldn't work with keyword search right because keyword you add keywords and at some point oh no that word is not in that in that document anymore. So like I'm not returning the document we're now using vector search. Yeah. So like

the search query is vectorized and the content is vectorized and through the similarity results are returned. So that's what you just saw. we just saw that there are results but the answer is not really nice for the human uh >> on the page because it's this one shows up when you're on the page click on this one. Yeah. And shows more. >> Yes. For this we created

another assistant that will use this retrieval augmented generation tool that can talk to your content. And for example here we'll ask the same And it contacts now the agent that also knows how to communicate with our vector database. And now it gives nice summarized answer also with a link to the page where it took it from. And you can also ask anything else like there is also

a prompt for this. We can include more information or less information. You can also control how many results it can use. So you can spare your tokens. So for example, we asked to have how many? >> In the tool save the tool. >> Yes. Up to five results only. So for example, if you have thousands of content and then you don't want all your tokens to be

leaked, you can just say use only five most relevant results and then display them to the user. All we're almost done. So one more. Yeah, and that one's simple and fast. So uh we have here something called um the rag assistant. Yes, we did that already. is is guardrails because of course when like data is sent to the um uh uh uh to the large language model

and when data is returned you might want to forbid certain things for example if you are working on a GDPR or the equivalent what you have in the US you know it might be forbidden to just like send email addresses or social security numbers around so you can intercept such AI operations and for that we also have very fine functionality that is uh um available in uh

in the AI module as of the as of the latest release and it's called AI guardrails and we provide two very nice recipes that you can start uh using to work from and I want to show these quickly. Um so so again you just require the recipes you install them and then you start working from there. Yeah. And if you now go to here and we go

to guard rails. Yeah. You see that this imports like a lot of guardrails. Let's take a look at one. For example, the email address guardrail. If I wanted to forbid that emails go through, I could use something like that. It's a regular expression based guardrail that just, you know, intercepts when email is sent or an email is returned from a large language model and then stops the

operation. And the way the module works is that you just configure these guardrail sets uh guardrails together in sets. So here's like a set with everything PII protection. Then there are some examples for like liability things. So don't give medical advice or maybe security related things you know like like filtering out instructions that you know try to jailbreak um uh the system instructions that you gave and

um this works then like this if if I just use the chat generation explorer I can now here um I can add a guardrail so for example if I use the PI protection guardrail and you say like is uh um this Kristoff's email Um right and now it should intercept and it does. Yeah. This message was blocked because it contains an email address. Yeah. So the functionality

is will also be available. So I submitted a web form with an email address and it didn't block. Yeah. Uh it's because like the agent uh um agent module does not yet support guardrails. comes with the release that's upcoming then you could add that there too but for example in my use case I want the email address because it's support bot that accepts email addresses yeah but

like here I uh that's just for showing that like how we can do this and with that we are at the end u because that's all we had to show and we say thank you and floor is open for >> Yeah. For those guardrails, those guardrails are not >> We have we have different types. So I showed Oh, yeah. I showed you I showed you the um

Yeah. The question is if guardrails is has anything to do with AI or if that you know is just regular expressions or I just showed the regular expression guardrail because that's a very easy one to use. There's also AI based guardrails for example um the one for liability if you want to filter out like if somebody says my stomach hurts you know what pills should I take?

Yeah. So that's medical advice. So you can like make a allow list and a deny list of topics for conversations and then like the question would be sent to AI first to figure out if it fits to any of these allowed or denied topics and if it was a denied topic it would block >> or guarding >> Yeah, that's true. True. I mean don't don't don't use

a PII guardrail that uses AI to identify stuff if AI is already violating. Yeah. So therefore like actually you know trying to filter out such stuff with regular expressions before it even hits AI would be the right approach. Yeah. But they are like different things. I mean it depends if like what you're referring to is that you're filtering like what data goes out so it's not leaking.

But the same is true when it comes back. Yeah. Your your AI might have access to some stuff that you just cannot return under no circumstances. Yeah. So that would be the other way around. So that can help this too. Yeah, good question. Next one. >> For the metatag is it also automatically choosing which schema to to use for those metag >> I'm not sure. Do you

know this? >> So u there is automator that >> question >> ah sorry is there a schema used for the metadatex when it's generated? So uh there is a automator that knows uh that there is a metatex field. It also knows which ones you have enabled. So for example that's why we showed that there is open graph we installed. So it knows which one is there and

how to use it because it's also in the metatex module itself. So the field type already explains what is there and how how to be used. But you also can set the examples how you want it to be used yourself in the automator. So for example you can give examples which ones you want. So is uh for example there is address so geolocation something you can say

like I want latitude longitude to be there and then it will know that it needs to it has to do this and it's for every meta tag that is there. You can say example and the rule how you want it to be done but by default it also knows how to do All right then then thank you. Um if you uh catch me or later anywhere we

would like some feedback on on how that was how the format was it was understandable because like we're doing this for the first time we do it for you and we would like to learn like how we can do it better. Thank you.