Getting the most of Generative AI and Sitefinity - Part 1

Getting the most of Generative AI and Sitefinity - Part 1


TL;DR;
See how we tweaked the new Sitefinity 15 Generative AI from producing a large block of text into producing well formatted HTML text, that in most cases is ready to go without further interventions.




The new version of Sitefinity offers integration with OpenAI services (Azure) to help content editors quickly produce text.

This is an amazing start and it does really improve the content editing experience by far. Azure AI Deployments are secure and you can rest assured your IP and sensitive prompts are not being used for training. So everything you may have as a concern should be met.

To get it going you may need to turn to your development team or partner as the module needs to installed and setup + you need an Azure Open AI machine setup.

Lino Tadros already covered this part:

Azure AI Instance Setup (Part 1 - Azure)
Sitefinity modules setup (Part 2 - Sitefinity).

We can of course help you with that, so use our Contacts page to raise a hand and we'll be more than happy to be with you on it.

So we were playing with the AI for the past month or so and we found out that while very helpful - one thing was consuming significant time - the "post production" or formatting the output of the AI.

This is so, because by default the Sitefinity Generative AI feature will just generate text with no formatting, that gets injected into your editor.

True to ourselves - we went on thinking and experimenting on how can we improve this.

So there it is, following the steps bellow will allow you to redefine the output format and tell AI to come back with text that in most cases will be ready to go!

  1. Go to the Sitefinity backend.
  2. Click "Administration" 
  3. Click "Settings"
  4. Click "Advanced"
  5. Expand "AIServices"
  6. Expand "ServiceClients"
  7. Expand your AI Client (e.g. for us it is "AzureCompletionsOpenAIClient")
  8. Expand "Actions"
  9. Expand "ComposeNewText"
  10. Enter the new prompt in the prompt field. We did this one:
    Generate a text that includes these keypoints: "{KeyPoints}". The target audience is "{Audience}" and the tone is {Tone} and text length of no more than {Length} words. Use the following output: <h1>Title</h1><p>text</p>, if you need to list things - just use UL + LI structure. Return RAW HTML, do not use markdown.



The last part is that makes the difference. In our case - it will also force the AI to come up with a title, it will put it in H1, then it will add the generated text in paragraph tag and output everything as HTML. The preview screen in Sitefinity will still not properly show it, so you want to insert it for preview in the Content block.