AI Overview for Sitecore Module

Ai Overview No Border
This Sitecore Module allows you to add a 'google' style AI Overview component to search pages. Returning a GenAI response to the search based solely on your own data. Some key benefits include:
  • Create multiple data sources
  • For each data source specify the root to crawl and the templates to include
  • Scheduled tasks to keep data up-to-date
  • Sample component to showcase generating the overview
  • Optional delayed Ajax response to improve page load

How to install

  1. Go to https://github.com/deanobrien/ai-overview-for-sitecore and download the package AI Overview for Sitecore.zip
  2. Install the package using the Installation Wizard
  3. Sitecore will crash after you install the package! In order to fix this, you need to apply the following binding redirects in your web.config

< dependentAssembly >
  < assemblyIdentity name="Azure.Core" publicKeyToken="92742159e12e44c8" culture="neutral" />
  < bindingRedirect oldVersion="0.0.0.0-1.43.0.0" newVersion="1.43.0.0" />
< /dependentAssembly>
< dependentAssembly>
  < assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" />
  < bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
< /dependentAssembly>
< dependentAssembly>
  < assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" />
  < bindingRedirect oldVersion="0.0.0.0-6.0.0.9" newVersion="6.0.0.9" />
< /dependentAssembly>
Note: The reason for the binding redirects is that the minimum version of Azure.AI.OpenAI (2.0.0) requires Azure.Core 1.43. Which in turn has a dependency on System.Diagnostics.DiagnosticsSource >= 6.0.0.1 and System.Text.Json > = 6.0.9. Therefore its not possible to use the OpenAI library without changing some default packages.

Create Azure Assets

You now need to create the following assets in Azure:
  • Storage Account (to store crawled data)
  • Search Service (to index the crawled data)
  • Azure OpenAI Service (to provision GenAI models)
For a step by step guide on how to create these resources follow this article: how to call a genai model using your own data 

Configure Sitecore Settings

Using the configuration from your Azure Assets, navigate to '/sitecore/system/Modules/AI Language Assistant' and:
  • Add a Deployed model - '/sitecore/system/Modules/AI Language Assistant/Deployed Models'
  • Add a Data Source - '/sitecore/system/Modules/AI Language Assistant/Data Sources'
  • Update Default Data Source and Model - '/sitecore/system/Modules/AI Language Assistant'

Configure Scheduled Task to Crawl Your Data

Navigate to your scheduled task here: '/sitecore/system/Tasks/Schedules/AI Overview - Own Data - Schedule' and define a schedule (i.e.20000101|29990101|127|12:00:00). Paste the path to the root that you want to crawl in the 'Items' field. Clear 'Last Run' if it is set and press save. If everything has been set correctly, when the task runs, it will recursively crawl all children of the root. For every item that it finds that matches one of the templates (defined in data source), it will create a basic html page for the item (based on content field) and upload it to the blob storage container you defined.

Index your data

Use the Import and Vectorize Data button in your Search Service to index your data (as discussed in this article: how to call a genai model using your own data )

Add component to a search page

Open your search page in the experience editor. Add the AI Overview Component to your page and publish Note: The AI Overview component looks for the 'q' GET parameter in the URL to function. If you use a different parameter, you can configure it to use it via the component parameters or Search Parameter sitecore setting.

Test the component

Navigate to your search page and perform a search. If everything is configured correctly, then you should recieve an AI Overview based on your own data.

Leave a Reply

Your email address will not be published. Required fields are marked *