Leveraging Dynamic Application Generation and GenAI for Real-Time Business Insights

Estimated read time 16 min read

Introduction

In the SAP ecosystem, most of us have interacted with business objects (like purchase order, maintenance order etc.) in one way or another. They are integral to any application created for clients or internal use, providing access to essential business data. However, the conventional process of connecting business objects to our applications, especially when performing specific actions on the data, can be tedious and time-consuming.

This blog post introduces an innovative architectural approach to dynamically generate application for real time business insights of business objects harnessing the GenAI capabilities like summarization in just a few simple steps, significantly reducing the effort and time.

Blog post series on Leveraging Dynamic Application Generation and GenAI for Real-Time Business Insights:

Business Value & overview of the entire use-case/application (this blog)Comprehensive guide for setting up the application (TBD)
Langchain Summarization Techniques & Leveraging GenerativeAI Hub via Custom Model (click here)

Problem Statement

To appreciate the significance of this blog, it’s crucial to understand the current process of integrating business objects into applications and its time-consuming nature. Imagine you are a business owner using SAP to manage your operations, utilizing business objects to retrieve and derive insights from your data. With multiple departments like HR, Suppliers, and more, each with its own business object, the conventional approach requires creating separate extension applications for each business object.

Typically, this involves finding the APIs from the SAP Business Accelerator Hub, creating a Domain, Service, and UI for each business object, and integrating it with SAP BTP services and SAP S/4HANA to access the data. Finally, you need to deploy it to the SAP Build Work Zone. Repeating this process for each business object increases computing resources, development time, and maintenance efforts significantly as shown below.

Explanation: If you have n number of business objects (BO1 to BOn) that need summarization of all the details, the entire setup and all its components must be repeated for each one. For each object, separate applications with Domain, Service, and UI components are developed and integrated into business systems along with BTP services by different teams. This process is repeated for each of the n objects, making it time-consuming, resource-intensive, and requiring increased maintenance efforts.

Solution

Now, imagine having a single application capable of displaying and performing actions on any number of business objects you need. Expand this vision to include the ability to achieve this with just one file, where you simply provide the details of the required business objects.

This blog post introduces a proof of concept (PoC) which enables you to gain insights by creating a single application that can display data for multiple applications that can cut across multiple master data business objects and summarize latent texts for various objects through a simple, one-configuration-file deployment.

The sample application source code includes a single configuration file where you can specify the details of relevant objects and indicate any dependencies between them if necessary. This file outlines object details such as object name, API url, destination name, search fields, list fields for the UI, and settings needed for the summarization process. By using this file, you can deploy and create app tiles in the SAP Build Work Zone, providing quick access to summarized information.

Upon deployment, the sample application dynamically generates the necessary artifacts, setting up the domain, service layers, and user interface to ensure flexibility and scalability for summarizing multiple business objects. It processes data from these business objects and transforms it into business insights using LangChain’s Summarization Chain techniques, such as Stuff, Map Reduce, and Refine, all connected to GenAI Hub through the CAP plugin “cap-llm-plugin.” Once deployed, app tiles can be configured to provide role-based access to different business users or personas.

This new approach simplifies the application development, integration by reducing the need for multiple extension applications and streamlining development and maintenance efforts, ultimately saving significant time and resources. By leveraging dynamic application generation and GenAI, it delivers efficient, real-time business insights.

This application has the capability to customize the summarization as per their need for any object via Standard Inputs and Open Ended options.

Standard InputOpen Ended

Standard Input option uses default prompt where the end user can configure the summary structure (paragraph or point based), word length and tone of voice (casual, neutral or formal) whereas Open Ended option uses self-defined prompts given by the end user based on which summarized content will be provided.

The standout feature of this application is its ability to dynamically provide business object details and summarized information for multiple objects using a single configuration file. Additionally, its powerful summarization capability allows you to select specific fields for summarization, making it ideal for managing extensive data that could otherwise hinder decision-making. This feature offers a concise overview, streamlining the data review process and enabling faster, more reliable business decisions with just one click.

Here is a video of the sample application: Demo Video

Architecture

In the above architecture, a CAP-based application accesses APIs for necessary business objects (either SAP solutions or third-party) via the SAP Destination Service, through its application logic layer. According to a configuration file provided by the end user, the application logic dynamically generates the domain, service, and UI components as required. The data retrieved via the Destination Service is then processed through a summarization chain, which utilizes techniques such as stuff, map-reduce, or refine, depending on the length of data and tokens required. This process involves creating a custom model to access SAP GenAI Hub via the cap-llm-plugin ( cap-llm plugin enables seamless integration with LLMs while anonymizing sensitive data via SAP HANA Cloud Data Anonymization, ensuring confidential information is not exposed to the LLM). The application is secured with XSUAA for authentication and integrated with SAP Build Work Zone. This integration ensures that all app tiles created for the business objects are accessed based on user’s role.

Scenario Set Up and Technical Details

To set up the scenario, certain prerequisites and initial configurations are required in SAP BTP and SAP S/4HANA. For detailed instructions, please refer to the following resources:

GitHub Repo: https://github.com/SAP-samples/real-time-business-insights-with-genai Scenario Set Up Guide: Refer to the part-2 of the blogpost (TBD)Summarization Technical Details: Langchain Summarization Techniques: Leveraging Generative AI Hub via Custom Model

Note: Please note that this sample application has been created for proof of concept (PoC) purposes. Customers and partners are welcome to use the code, modify it, customize it to their specific needs, and maintain it for productive use.

Future Enhancements/ Roadmap

While our application already significantly streamlines data management and enhances decision-making processes, there is still potential for further improvements.

In Phase 2, we aim to add more value by introducing the following features:

Simplified Business Object Configuration:
We plan to replace the current configuration file setup with a user-friendly interface that allows users to select entities and fields directly. This enhancement will make the application accessible and easy to use for non-technical users, removing the need for manual configuration file editing.

Human Feedback Loop for Summarization:
To optimize the summarization response, we will implement a human feedback loop. During this phase, users will receive summarized responses based on different summarization techniques (stuff, map_reduce, refine). Users will be prompted to rate these summaries, helping us determine which technique delivers the best results. The feedback collected will enable us to set the most effective summarization method as the default.

Support for REST APIs and Kyma Integration:
We intend to expand our application’s capabilities by including support for Business Objects accessed via REST APIs. Additionally, we will re-engineer the application setup to be compatible with Kyma, enhancing its flexibility and scalability.

These planned enhancements are designed to further simplify the user experience, improve the accuracy and relevance of data summaries, and broaden the application’s compatibility with various APIs and platforms. By continuously evolving and refining our solution, we aim to deliver even greater value to our users, empowering them to make smarter, data-driven business decisions with ease.

You can watch the demo here that highlights our application’s capabilities and showcases its seamless, efficient approach to transforming latent data into actionable insights, significantly enhancing the decision-making processes and business operations.

Conclusion

We hope this blog has given you a brief idea on how our application leverages the power of SAP GenAI Hub and advanced summarization techniques to transform vast amounts of business information into actionable insights. Our solution offers a seamless, efficient, and dynamic approach for various Business Object Summarization. With a single configuration file, businesses can automate the creation and maintenance of user interfaces, ensuring quick access to comprehensive data and its summaries across LOBs. This capability enhances decision-making while significantly reducing the time and effort traditionally required for such processes.

By adopting this solution, businesses can unlock the full potential of their data, driving smarter, more informed decisions and ultimately achieving greater success.

At last, I would like to extend my heartfelt gratitude to my colleagues whose insights, support, and collaboration have been invaluable throughout this PoC. So Special thanks to @Ajit_K_Panda and @Aryan_Raj_Sinha  for their valuable contributions in PoC development and @PVNPavanKumar and @anirban-sap for their leadership support.

 

​ IntroductionIn the SAP ecosystem, most of us have interacted with business objects (like purchase order, maintenance order etc.) in one way or another. They are integral to any application created for clients or internal use, providing access to essential business data. However, the conventional process of connecting business objects to our applications, especially when performing specific actions on the data, can be tedious and time-consuming.This blog post introduces an innovative architectural approach to dynamically generate application for real time business insights of business objects harnessing the GenAI capabilities like summarization in just a few simple steps, significantly reducing the effort and time.Blog post series on Leveraging Dynamic Application Generation and GenAI for Real-Time Business Insights:Business Value & overview of the entire use-case/application (this blog)Comprehensive guide for setting up the application (TBD)Langchain Summarization Techniques & Leveraging GenerativeAI Hub via Custom Model (click here)Problem StatementTo appreciate the significance of this blog, it’s crucial to understand the current process of integrating business objects into applications and its time-consuming nature. Imagine you are a business owner using SAP to manage your operations, utilizing business objects to retrieve and derive insights from your data. With multiple departments like HR, Suppliers, and more, each with its own business object, the conventional approach requires creating separate extension applications for each business object.Typically, this involves finding the APIs from the SAP Business Accelerator Hub, creating a Domain, Service, and UI for each business object, and integrating it with SAP BTP services and SAP S/4HANA to access the data. Finally, you need to deploy it to the SAP Build Work Zone. Repeating this process for each business object increases computing resources, development time, and maintenance efforts significantly as shown below.Explanation: If you have n number of business objects (BO1 to BOn) that need summarization of all the details, the entire setup and all its components must be repeated for each one. For each object, separate applications with Domain, Service, and UI components are developed and integrated into business systems along with BTP services by different teams. This process is repeated for each of the n objects, making it time-consuming, resource-intensive, and requiring increased maintenance efforts.SolutionNow, imagine having a single application capable of displaying and performing actions on any number of business objects you need. Expand this vision to include the ability to achieve this with just one file, where you simply provide the details of the required business objects.This blog post introduces a proof of concept (PoC) which enables you to gain insights by creating a single application that can display data for multiple applications that can cut across multiple master data business objects and summarize latent texts for various objects through a simple, one-configuration-file deployment.The sample application source code includes a single configuration file where you can specify the details of relevant objects and indicate any dependencies between them if necessary. This file outlines object details such as object name, API url, destination name, search fields, list fields for the UI, and settings needed for the summarization process. By using this file, you can deploy and create app tiles in the SAP Build Work Zone, providing quick access to summarized information.Upon deployment, the sample application dynamically generates the necessary artifacts, setting up the domain, service layers, and user interface to ensure flexibility and scalability for summarizing multiple business objects. It processes data from these business objects and transforms it into business insights using LangChain’s Summarization Chain techniques, such as Stuff, Map Reduce, and Refine, all connected to GenAI Hub through the CAP plugin “cap-llm-plugin.” Once deployed, app tiles can be configured to provide role-based access to different business users or personas.This new approach simplifies the application development, integration by reducing the need for multiple extension applications and streamlining development and maintenance efforts, ultimately saving significant time and resources. By leveraging dynamic application generation and GenAI, it delivers efficient, real-time business insights.This application has the capability to customize the summarization as per their need for any object via Standard Inputs and Open Ended options.Standard InputOpen EndedStandard Input option uses default prompt where the end user can configure the summary structure (paragraph or point based), word length and tone of voice (casual, neutral or formal) whereas Open Ended option uses self-defined prompts given by the end user based on which summarized content will be provided.The standout feature of this application is its ability to dynamically provide business object details and summarized information for multiple objects using a single configuration file. Additionally, its powerful summarization capability allows you to select specific fields for summarization, making it ideal for managing extensive data that could otherwise hinder decision-making. This feature offers a concise overview, streamlining the data review process and enabling faster, more reliable business decisions with just one click.Here is a video of the sample application: Demo VideoArchitectureIn the above architecture, a CAP-based application accesses APIs for necessary business objects (either SAP solutions or third-party) via the SAP Destination Service, through its application logic layer. According to a configuration file provided by the end user, the application logic dynamically generates the domain, service, and UI components as required. The data retrieved via the Destination Service is then processed through a summarization chain, which utilizes techniques such as stuff, map-reduce, or refine, depending on the length of data and tokens required. This process involves creating a custom model to access SAP GenAI Hub via the cap-llm-plugin ( cap-llm plugin enables seamless integration with LLMs while anonymizing sensitive data via SAP HANA Cloud Data Anonymization, ensuring confidential information is not exposed to the LLM). The application is secured with XSUAA for authentication and integrated with SAP Build Work Zone. This integration ensures that all app tiles created for the business objects are accessed based on user’s role.Scenario Set Up and Technical DetailsTo set up the scenario, certain prerequisites and initial configurations are required in SAP BTP and SAP S/4HANA. For detailed instructions, please refer to the following resources:GitHub Repo: https://github.com/SAP-samples/real-time-business-insights-with-genai Scenario Set Up Guide: Refer to the part-2 of the blogpost (TBD)Summarization Technical Details: Langchain Summarization Techniques: Leveraging Generative AI Hub via Custom ModelNote: Please note that this sample application has been created for proof of concept (PoC) purposes. Customers and partners are welcome to use the code, modify it, customize it to their specific needs, and maintain it for productive use.Future Enhancements/ RoadmapWhile our application already significantly streamlines data management and enhances decision-making processes, there is still potential for further improvements.In Phase 2, we aim to add more value by introducing the following features:Simplified Business Object Configuration:We plan to replace the current configuration file setup with a user-friendly interface that allows users to select entities and fields directly. This enhancement will make the application accessible and easy to use for non-technical users, removing the need for manual configuration file editing.Human Feedback Loop for Summarization:To optimize the summarization response, we will implement a human feedback loop. During this phase, users will receive summarized responses based on different summarization techniques (stuff, map_reduce, refine). Users will be prompted to rate these summaries, helping us determine which technique delivers the best results. The feedback collected will enable us to set the most effective summarization method as the default.Support for REST APIs and Kyma Integration:We intend to expand our application’s capabilities by including support for Business Objects accessed via REST APIs. Additionally, we will re-engineer the application setup to be compatible with Kyma, enhancing its flexibility and scalability.These planned enhancements are designed to further simplify the user experience, improve the accuracy and relevance of data summaries, and broaden the application’s compatibility with various APIs and platforms. By continuously evolving and refining our solution, we aim to deliver even greater value to our users, empowering them to make smarter, data-driven business decisions with ease.You can watch the demo here that highlights our application’s capabilities and showcases its seamless, efficient approach to transforming latent data into actionable insights, significantly enhancing the decision-making processes and business operations.ConclusionWe hope this blog has given you a brief idea on how our application leverages the power of SAP GenAI Hub and advanced summarization techniques to transform vast amounts of business information into actionable insights. Our solution offers a seamless, efficient, and dynamic approach for various Business Object Summarization. With a single configuration file, businesses can automate the creation and maintenance of user interfaces, ensuring quick access to comprehensive data and its summaries across LOBs. This capability enhances decision-making while significantly reducing the time and effort traditionally required for such processes.By adopting this solution, businesses can unlock the full potential of their data, driving smarter, more informed decisions and ultimately achieving greater success.At last, I would like to extend my heartfelt gratitude to my colleagues whose insights, support, and collaboration have been invaluable throughout this PoC. So Special thanks to @Ajit_K_Panda and @Aryan_Raj_Sinha  for their valuable contributions in PoC development and @PVNPavanKumar and @anirban-sap for their leadership support.   Read More Technology Blogs by SAP articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author