Back to blog

Unleashing the power of composability with Contentstack

Nishant PatelJul 17, 20236 min read
CS_1200x628_ComposableHeroes.png
Talk to an expert about something you read on this page

The birth of the Composable Hero

A few months away from South by Southwest® [SXSW] 2023, a Contentstack account executive had an idea to host an experience during the event that would capture the attention and imaginations of the attendees. A joint team of composable technology experts from Contentstack, Aprimo and EPAM was assembled to create an unforgettable experience around the platform.

Considering the rich history of SXSW, they knew they needed something truly engaging that would showcase the endless possibilities of composable technology and the digital experience platform (DXP). This is the story of how the Composable Hero came to be.

"We aim to inspire companies to transcend conventional implementations and experiment with composable architecture and artificial intelligence to engage their target audience. The Composable Heroes project embodies the limitless potential of forward-thinking businesses that want to redefine routine technology applications. By pushing creative boundaries, embracing AI technologies, and leveraging MACH principles, we are able to showcase the transformative power of innovation through a fun and imaginative experience." said Zamir Thind, Sr. Solutions Architect at Contentstack.

Pawan_Sharma_Original_file.webp

"GenerativeAI is set to completely disrupt how our clients work. As we already have one of the most advanced applications of AI for digital asset management and content operations, we wanted to continue to push the envelope of possibilities with our cutting-edge partners at Contentstack and EPAM," said Erik Huddleston, CEO, Aprimo. "We collaborated with our partners to incorporate generative AI platforms into the content creation process, illustrating how seamlessly our companies work together to address our client's content scarcity challenges and prepare for their content abundance challenges of tomorrow."

“Through our partnership with Contentstack and Aprimo, we’re committed to bringing innovation to the forefront by developing this unique and interactive AI-fueled app,” said Yury Bialykh, CTO, Digital Engagement Practice at EPAM. “By investing in MACH technology, our main goal is to support our customers in their business transformation journey and help design, build and deliver engaging digital experiences at scale.”

Conceptualizing an AI-powered interactive experience

The team was faced with a few fundamental questions: 

  • How could they maximize the potential of Automation Hub?
  • How could they harness the power of new technologies, such as AI-generated content?
  • How could they create a unique omnichannel experience?

Out of these questions, the initial concept took shape. Inspired by the idea of a photo booth, they envisioned an interactive experience where users could have their photos taken while providing additional input, such as their name, work title and job duties. This data would then be sent to Automation Hub, which would seamlessly communicate with AI generators.

Diagram_1_(1).png

In a matter of minutes, the AI would work its magic, transforming the individual's photo into a personalized superhero image and generating a captivating superhero story to accompany it. Using this data-driven model, the team would create a digital superhero card for each user. Dubbed the "Composable Hero," this experience aimed to demonstrate the true power of composability. 

Unleashing AI: Choosing the right services

With a clear vision of the end product and experience in mind, they began planning the development cycle steps.

For the text portion, selecting OpenAI’s ChatGPT (gpt-3.5-turbo) was an obvious choice. Its powerful API and remarkable generative capabilities made it the perfect fit for creating personalized superhero stories based on user input.

The next challenge was AI image generation. Real-time transformation of images alongside text prompts required an image generator capable of consuming image files and delivering the desired results. However, building models for generative AI is a time-consuming and resource-intensive task. They explored various options and found that Midjourney (V4) produced the best results, despite not having an available API. To overcome this limitation, they took matters into their own hands and developed an API to interact with Discord, which is where Midjourney hosts its services, enabling them to generate the images seamlessly.

To complete the experience, they needed a design templating engine that could effortlessly combine the generated image and story into an elegant, cool and fun trading card. The product manager for Automation Hub discovered Placid during a quick Google search. Its API-friendly nature and easy reconfigurability made it an immediate contender, swiftly earning its place on the whitelist.

The components required were all ad hoc, and the need for Placid as a design templating engine only became apparent after they had selected the generative AI services and needed a way to bring everything together seamlessly. This exemplifies how, with a simple idea and the right vendors that meet your project's needs, you can move at MACH speed to create something innovative. 

Simplifying the user journey

The remarkable thing about this initiative is its simplicity and adherence to the core principles of everyday web services. It all boils down to a straightforward process: collect user data, transform the data and present it back to the user in its new form.

The first task was to define the user story. The team wanted to ensure that users could easily navigate through a form that provided intuitive suggestions for constructing their hero. Simultaneously, they had to ensure that the data they provided was valid for processing. One crucial aspect they initially overlooked was that users would primarily use their phones, specifically iPhones, to submit and view their heroes at the event. Consequently, they discovered an obstacle: if users captured a picture with their iPhone, the file would be in HEIC format, which Midjourney/Discord did not accept.

The team devised a solution to compress these files into a more suitable format. Additionally, it became imperative that the website was mobile-first since that would be users’ primary mode of interaction.

The art of prompt engineering

To ensure an exceptional user experience, the team developed a system of prompt engineering that stores specific prompts as metadata entries in the Contentstack stack.

Each character choice corresponds to a prompt designed to elicit attributes and traits that align with that particular character type. Simultaneously, these prompts provide ChatGPT with the user's input and the selected character type, allowing for seamless integration of personalized elements into the hero's story.

Screen_Shot_2023-06-23_at_12.59.33_PM.png

Solving the name puzzle

Another crucial aspect the team had to address was the generation of a Composable Hero name. While they could ask ChatGPT to include a name in the story, extracting and identifying the hero's name from the text posed a challenge. One approach was to instruct ChatGPT to add a special character next to the name in the story, which worked effectively when using ChatGPT in the browser. However, this method proved less practical when using the API.

As a result, the team devised an alternative solution: after generating the story, they fed it back into the service to obtain a hero name based on the story. Additionally, they requested the service to provide us with the hero's powers. This refined approach allowed them to create a more precise flow diagram, outlining the interactions between various services and Automation Hub.

The revised flow diagram served as the blueprint, guiding the interactions between the different components to deliver an exceptional result.

CH-Diagram.png

Automation Hub: Streamlining the experience

At the core of the unified experience lies Automation Hub, a vital component that optimizes various tasks, including API interactions, content publishing and email notifications. The main automation includes a Lambda function that plays a pivotal role in orchestrating the entire workflow.

Here's a concise breakdown of its key steps: 

Creation of hero image

  • The Lambda function sends a customized prompt to generative AI services in order to create a hero image specific to the user.

Image handling

  • Once the image is ready, the image is retrieved and securely stored in an S3 bucket.

Text content processing

  • The automation sends the text content to ChatGPT.
  • The hero's story is retrieved, incorporating personalized elements based on user input.

Card creation

  • The generated image and story are seamlessly integrated into a visually appealing trading card using Placid.

Storage and management

  • The final card is securely stored in Aprimo.
  • The card's URL is stored within the initial Contentstack entry.

Real-time display

  • To enhance the user experience, the team leveraged Pusher to display the generated images in real-time on the front end.

The magic of Composable Heroes with MACH and generative AI

With the individual experience in place, the team aimed to make the event interactive and enjoyable. They set up a dedicated photo station equipped with a blank canvas and professional lighting to achieve this. Users had the option to have their photos taken (with their own phone) on the spot or upload their own pictures, including images of themselves or their pets.

A team member snaps a photo of an SXSW attendee for his Composable Hero trading card.

The live event proved to be a resounding success, showcasing the immense potential that can be achieved by adopting a MACH approach to generative AI. 

Central to this success was Automation Hub, which played a pivotal role in executing complex tasks, such as interacting with APIs, publishing content, and sending emails. With a sophisticated automation workflow in place, triggered by user actions, the team was able to harness the capabilities of generative AI to deliver personalized hero images and stories.

To learn more, click here to book a demo and learn how EPAM, Aprimo and Contentstack:

  • Maximized the potential of Contentstack’s Automation Hub

  • Harnessed the power of new technologies, such as AI-generated content
  • Created a unique and immersive omnichannel experience

As well as create your own personal Composable Hero trading card!

Share on:

About Contentstack

The Contentstack team comprises highly skilled professionals specializing in product marketing, customer acquisition and retention, and digital marketing strategy. With extensive experience holding senior positions in notable technology companies across various sectors, they bring diverse backgrounds and deep industry knowledge to deliver impactful solutions.  

Contentstack stands out in the composable DXP and Headless CMS markets with an impressive track record of 87 G2 user awards, 6 analyst recognitions, and 3 industry accolades, showcasing its robust market presence and user satisfaction.

Check out our case studies to see why industry-leading companies trust Contentstack.

Experience the power of Contentstack's award-winning platform by scheduling a demo, starting a free trial, or joining a small group demo today.

Follow Contentstack on Linkedin

Background.png