Large Language Models (LLM) gained great momentum in 2023, particularly in the Text generation field. In a few months, summarizing and translating large volumes of content with AI models became somewhat common – no matter your industry or size. They perform especially well when the task is simple (summarize X), a clear example of the expected result is given, and the context does not need to be fully understood.
This blog post describes an experiment with a more obscure type of text content – Process diagrams. In essence, diagrams are indeed sentences put together in a drawing: “Step 1” (goes to) “Step2” (goes to/or to) “…”. No context is really needed, besides the sequencing that needs to be followed. It is also easy to provide a model with the general BPMN specifications (XML elements everyone follows), and accurate examples (SAP provides BPMN files for every single S/4 business process in Signavio Process Explorer – free of charge).
On one hand, SAP quickly released AI Foundation, the all-in-one AI toolbox where you can freely choose a model and datacenter and start building your apps and services directly in SAP BTP. The obvious advantage is the integration with your SAP systems, as well as BTP itself. However, the product is still very new and this blog will use direct APIs instead, but you can technically leverage AI Foundation to achieve the same result.
On the other hand, SAP Cloud ALM is a project toolbox with numerous implementation capabilities: task management, transport execution, automated testing and.. process modeling. The latter is extremely useful during Fit workshops, where the business analyst can simply modify the relevant S/4 process diagram live, add requirements or notes, assign individuals, and more.
Now, let’s say you don’t use of Cloud ALM during the workshop, need to start a process from scratch or simply want to retroactively document your changes. Could LLMs build a process diagram for you? Or create a requirement in the tool directly from your handwritten piece of paper?
Disclaimer: These are almost thought experiments, not productive solutions or even prototypes.
You are a business analyst documenting a process for your company. The objective is easy: explain how to order a pizza (no pineapple variant). First, you navigate to Cloud ALM, create a new requirement and describe the steps in the Description section:
Notice the ###CREATE BPMN###? That’s because your company is AI-powered, and this command will generate a business diagram automatically for you.
The workflow is as follow:
// GET /api/calm-tasks/v1/tasks/123
{
"id": "123",
"projectId": "456",
"title": "Establishing the pizza process",
"type": "CALMREQU",
"status": "CIPREQUOPEN",
"description": "Notes from 20240501 meeting.</p>\n<p>##CREATE BPMN##</p>\n<p>Start, Check pizza price, Order pizza Quattro formaggi, Wait for delivery, Tip driver, Eat pizza .",
...
}
// POST https://api.cohere.ai/v1/chat
{
"message": "### Context\nYou are an expert at writing BPMN files with XML. I will give you a list of steps and you will return the BPMN to me. Here is an example with the steps ***(insert example step)*** and Withdraw ***(insert example step 2)***: ***(insert BPMN XML sample)***.\n\n###My Request\nReturn a BPMN for the following steps: ***(insert mapped description)***"
}
// POST /api/calm-tasks/v1/tasks/123/references
{
"name": "LLM - Pizza process BPMN",
"url": "https://cawemo.com/share/7d764acf-99d0-4b6a-914e-45000a0977df"
}
Still here, I see? Let’s change persona. You are now an old-school note-taker, paper and pencil, with a questionable hand-writing. This is the end of your day, after a quick meeting about what needs to be changed in the current S/4 solution, and you have a few requirements to enter in Cloud ALM.
Optical Recognition (OCR) solutions are not new, but you will mostly find SAP examples talking about Invoices. Why? Because it’s very useful and you probably have a lot of them, which is a great use case for automation. However you do have a lot of consumer tools converting whatever you write on paper into virtual documents, and that’s the topic of our second example.
SAP AI Foundation is not the tool product using LLMs. Another example is BTP’s Document Information Extraction. With DCE, you can extract information from documents and scenes (e.g., a car plate number) at scale directly in SAP BTP, and send the result to other SAP products for further processing. According to SAP, the extraction relies on OCR and LLM, but it is not clear how things work in the background.
Our workflow goes as follow:
// POST /api/calm-tasks/v1/tasks/
{
"projectId": "456",
"title": "Note-taking - Requirements from ABC",
"type": "CALMST",
"externalId": "789",
"dueDate": "",
"priorityId": 30,
"assigneeId": "abc",
"description": "***(insert result here)***"
}
And we are done! If you’re looking for more, search for the tag “ai” here on SAP blogs, or check out the posts from Mario De Felipe for RAG specifically!