Composum Blog

various aspects of the Composum world

Composum AI

The Composum AI is a module that brings AI text generation and analysis capabilities into Composum Pages or Adobe Experience Manager (AEM). It's currently 4 dialogs support generating keywords, translation, text content generation and page text review and various other operation modi, including a chat with the AI if needed. This blog gives a short tour with some examples. You can try it out yourself!

Hans-Peter Störr
12.07.2023

More documentation is here, the project homepage is on Github and at it's documentation site. Compare also the AEM variant.

Marked with the advent of OpenAI's ChatGPT, the development of artificial intelligence reached a stage where large language models reach often near human level capabilities in using languages, exhibit serious reasoning capabilities and often exhibit an incredible breadth of general knowledge. Composum AI provides a way to use these capabilities integrated into several assistant dialogs. In this blog will give a short tour through these.

How to try it out yourself

The Composum AI is publicly available at MIT licence. Probably the easiest way to try it out is to use our cloud cloud.composum.com , where you can sign in and try out Composum Pages with the Composum AI. It is also integrated into the composumstarter and into the docker image composum/featurelauncher-composum, but both of which do require an OpenAI API key - compare the Composum AI README on Github. The docker image has the advantage that you have the content of www.composum.com imported as a site with ample content to play around with. To try it out yourself using docker, that could be as simple as this (login with admin/admin):

export OPENAI_API_KEY="(your api key)" docker pull composum/featurelauncher-composum:develop docker run --rm -p 8080:8080 composum/featurelauncher-composum:develop open "http://localhost:8080/bin/pages.html/content/ist/composum/home/pages/editing/Composum-AI"

Technology

Composum AI is currently based on the OpenAI chat completion API , but since some users might require more stringent data privacy requirements than OpenAI might provide and because of the rapid technological advances of OpenAI's competitors, the module is structured so that it'll be simple to provide alternative backends. So it would be easy to use e.g  Anthropic's Claude (UK) or Google's Bard or Aleph's Luminous, once they are publicly available.

The frontend is integrated with Composum Pages, but the functionality is generic enough to lend itself to be easily ported to other CMS like Adobes AEM or others.

The functionality

Picture of a component editing dialog

How to access the dialogs

When you are editing a field in a component in Pages, there are, depending on the field type, some icons on the right side of the line with the field label. For text fields there is a magic wand for the content creation dialog, but there can also be the translate symbol if there is a text in an alternative language available, from which a translation could be triggered. There is also a special 'tags' symbol on the page categories that calls the page category assistant. 

The Sidebar AI can be found in the right "context tools" sidebar under the tab with the 'chat' symbol.

Picture of the translation assistant

The translation assistant

When editing components, the translation dialog allows quickly selecting a source language (if there are several) and retrieving a translation into the edited component field, which can then be adapted as needed.

Picture of the page category dialog

The page category assistant

As a productivity tool, the page category assistant can help you selecting page categories for SEO optimization based on the text content of the page. It lists current and some suggested categories and let's you check which you like to be applied.

The content creation assistant

This dialog provides access to a powerful and flexible tool the Composum AI offers for creating content. 

First, it allows you to select a base text for the AI to draw from. That can be the text field you were editing when calling up the dialog, it can be the text content of the component you were editing or the text content of the current page. But you can also take the last output of the AI, to have it refine the text iteratively, or just describe what you need without providing any additional base text.

Then you can either select one from a range of predefined prompts, like Summarize, Introduction, Conclusion, Expand, Headline suggestions, Improve, ..., and apply these. You are invited to modify or extend the prompt you selected, or create your entirely own request to the AI.

A history in the dialog supports you to switch back and forth between your requests, so it's easy to retry and switch back if the first generated text was better.

As the last step, you can replace the edited component field by the generated text, or append it for further editing.

The Sidebar AI

The Sidebar AI is a complement to the content creation assistant whose primary focus is not on content generation, but employing the AI's reasoning capabilities to generate reports about the text content of the page or individual components. Its purpose is to assist you in improving the content or seek explanations through a chat with the AI.

Similar to the Content Creation Assistant, the Sidebar AI enables you to select a base text for the AI to work with, such as the current page's text, or the text content of a selected component along with its subcomponents. Then you can either select one of a range of predefined prompts, or write your own request to the AI. The predefined prompts range from text / content flow review, suggestions for simplification, to suggestions for "call to action" phrases, and, of course, you can provide your own. If you are not yet satisfied with the result, you can both modify the prompt and try again, or ask for further refinement or additional information in a chat like fashion.

Some experiences using it

Of course, I've been employing this for writing documentations at www.composum.com. I'd like to share some examples where I found it very useful.

What I found amazing is how nicely you can use it as a "content transformation" tool. For instance, I've got files in JSON format that contain the predefined prompts, and wanted to document what these do. So I copied that into the text field of the editor, and asked it to "Make bullet points (HTML unordered list), keys in bold, values should be turned into a description what the AI does when executing the prompt". And there it was.

Something like "Convert this text from markdown to HTML: " (with text appended and "no text added" base text selection) can be pretty useful as well - especially if there are many links in the converted text.

Or, to create a quite good initial dialog description I just copied a large part of the feature specification into the text field and prompted "Describe the dialog from the users perspective. Use passive voice and a businesslike informative style." 

Of course, you might want to edit that to fit your personal style, preferences and what exactly you want to convey, but it's a marvellous way to make a quick first structure of the page, collect ideas and phrases, or see what you've missed, and many of the texts are rather good.

The Sidebar AI did help me find a number of typos I missed (though that is admittedly troublesome with ChatGPT-3.5); what I found very useful was e.g. the content gap analysis or review to find ideas, or the "simplification suggestions" to fight endless sentences like this. :-)


Conclusion

The Composum AI module brings you many new abilities for AI text generation and analysis, supported by large language models like ChatGPT in a seamless integration into Composum Pages. Please give it a try, tell us what you think, and enjoy using it creatively for your site!