Composum Blog

various aspects of the Composum world

Composum AI für Adobe AEM

Composum AI for AEM extends Adobe AEM by providing a Content Creation Dialog that is accessible via the toolbar of richtext editors as well es text areas in dialogs, and with a Side panel AI that is geared for content analysis of the page including a chat feature. This blog gives a tour with some examples. You can try it out yourself - it is publicly available as installable package for AEM 6.5.x and AEMaaCS and is open source (MIT license).

Hans-Peter Störr
20.10.2023

More information is available on the documentation site and on Github. There is also a Composum Pages variant.

Large language models like ChatGPT increasingly provide often near human level capabilities in using languages, and exhibit serious reasoning capabilities and offer an incredible breadth of general knowledge. The Composum AI provides the editor in Adobe AEM with a seamless integration that allows analysing content, content generation and transformation according to the users wishes. It integrates two assistant dialogs with different focus and capabilities. Both of them offer a library with various prompt examples that can be used as is or modified into processing / analysis instructions to process page parts or the whole page text, or external texts into summaries, introductions, conclusions, rewrite texts, generate suggestions for extending texts, phrases, headlines and so forth.

How to try it out yourself

The Composum AI is open source and publicly available with a MIT license - compare the list of releases and the documentation site. To test it, you can deploy the package for AEM on your AEMaaCS server or AEM 6.5.x. Since ChatGPT is used as a backend, you need an OpenAI API key. The API key can be set as an environment variable OPENAI_API_KEY, or there are various other configuration options.

Technology

Composum AI is currently based on the OpenAI chat completion API , but if some users might require more stringent data privacy requirements than OpenAI might provide even in it's ChatGPT Enterprise or Microsoft OpenAI service form, 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 Adobe AEM as a cloud service and AEM 6.5.x. There is a version for Composum Pages as well with mostly identical functionality, and the functionality is generic enough to lend itself to be easily ported to other CMS.

The provided functionality

How to access the dialogs

There are two ways to access content creation dialog. If the Composum AI is enabled, you will find a new icon (gears and pen) in the toolbar of richtext editors. It will call up the Content Creation Dialog. The content created with it can then either replace the richtext editor's content and be edited further or the edit be aborted, if needed, or the dialog can be cancelled, returning to an unmodified richtext editor.

The dialogs are currently accessible in the AEM page editor, the page properties and the experience fragment editor.

Second: for text areas in component dialogs, there is a new 'gears and pen' icon in the label line, next to the help icon (if present). This will call up the content creation dialog, and the results will be put into the text area in the component dialog, without yet being saved to JCR.

The side panel AI is integrated into the side panel to the left with the same 'gears and pen' icon as the content creation dialog.

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, paste in an external text 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 cancel the operation. The calling dialog / the richtext editor from which the content creation was called will still be open for editing.

The Side Panel 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.

Configuration

Using the Composum AI needs an OpenAI API key that can either be configured for the whole server in the OSGI configuration "Composum AI GPT Chat Completion Service" or flexibly per site or content-tree with Sling Context Aware Configuration in the  "Composum AI OpenAI Configuration".

It is also possible to restrict Composum AI via OSGI or context aware configuration to certain users / groups, components, paths, page templates and views (configuration "Composum AI Permission Configuration").


More about it

You can find tricks and tips in the documentation of the sister project Composum AI for Composum Pages, which has mostly the same functionality. It's blog entry also contains some interesting usecases I had with it.

Conclusion

The Composum AI module brings you many new abilities for AI text generation and analysis to the AEM author, 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!