Wondering how you could use generative AI for human workflow orchestration? Check out this example to learn how generative AI tools like ChatGPT could be used to make human-centric processes easier.
With the launch of ChatGPT, everyone is talking about generative AI and what it could mean for businesses, so during a recent Hackathon, Camunda engineers built a Connector for OpenAI. The Connector is an easy way to start experimenting with ways to use ChatGPT and OpenAI’s Moderation API in your processes.
I started thinking about ways to use the OpenAI Connector, and I was inspired by my local Community Market, which just started its annual season. The Community Market is an outdoor market that’s held every Saturday morning from April through November. Vendors at the market sell a variety of products: fresh fruits and vegetables, locally raised meat and eggs, cookies and other baked goods, handmade soap and candles, houseplants, artwork, jewelry, and more.
I thought there might be a way that generative AI could help the non-profit organization that’s in charge of the Community Market. While the market is closed for the winter, vendors can apply to be included in the coming year’s market. The non-profit staff have to evaluate all applications; ensure each vendor has a sales tax ID; collect permits, certifications, and liability insurance information from each vendor; and update the Community Market website with vendor descriptions. The market features around 90 vendors each year, so that’s a lot of human work!
An example process that combines AI and human work
I built a vendor evaluation process for the Community Market, which starts with an applicant filling out a simple form on the non-profit organization’s website. For this example, let’s assume that the form is not very sophisticated; it’s just a single text field where the applicant writes any information they think is relevant for their application.
When the applicant submits the form, it calls an inbound HTTP webhook that triggers a process instance.
The process uses ChatGPT to extract important information from the text such as the applicant’s name, their email address, their business name and address, and what products they want to sell. ChatGPT also performs a sentiment analysis on the text and formats all of the output as JSON so Camunda Platform can easily parse it.
There are certain types of products that are not allowed at the market, such as alcohol, so the process uses a decision table to automatically reject vendors that want to sell these products. ChatGPT writes a rejection email based on the output of the decision table.
If the application doesn’t contain keywords that indicate unwanted products, a team member reviews the email and decides whether to approve or reject the application. If a decision is not made within 14 days, the team lead is notified via Slack so they can accelerate the decision.
If the team member rejects the application, the process uses ChatGPT to write a rejection email, which the team member will review before it is sent to the applicant.
If the application is approved, the process uses ChatGPT to write a description for the Community Market website, which a team member will review for accuracy. In parallel, the process uses the new Google Maps Connector to validate that the applicant’s business address exists. Finally, the applicant is notified by email.
This process leverages the OpenAI, Slack, Google Maps, and SendGrid Connectors, all of which are available out of the box in Camunda Platform 8.
How generative AI can support human work
The vendor evaluation process is ultimately a human workflow. The non-profit organization that manages the Community Market wants the final decision about whether to accept or reject a vendor’s application to be made by a person. But this example shows a few ways that a generative AI tool such as ChatGPT can support this human workflow:
- Screening vendors that want to sell certain types of products reduces the number of emails that the team has to read
- Generating emails reduces the time the team has to spend crafting messages and promotes consistency in the way applicants are rejected
- Generating a description for the website reduces the time the team has to spend writing website content and ensures every vendor will have a description on the site
- Automatically validating the vendor’s business address eliminates the chance that the team will forget to do so
BPMN is an excellent tool for combining generative AI and human work because it allows you to combine flows where a task is executed by an AI tool with flows where a decision is made by a person. BPMN also makes it easy to enforce the requirement that AI-generated text is reviewed and validated by a person, which is a serious concern for businesses that are considering leveraging generative AI.
Don’t forget about data privacy
By default, OpenAI does not use data submitted via their API to train or improve their models. However, sending sensitive data over the internet to a tool such as ChatGPT carries some risk. In real-world processes, consider avoiding submitting personally identifiable information (PII) and private business information to online generative AI tools. Be sure to adhere to your company’s policies for data security and the use of these types of tools.
Enhancing the process
I already have a few ideas for enhancing the Community Market application process:
- Using ChatGPT to generate posts for Twitter, Facebook, and Instagram to advertise vendors as they’re added to the market lineup
- Adding BPMN logic to handle incorrect or missing business addresses
- Using the OpenAI Moderation API to screen for inappropriate or harassing emails
- Adding the Google Drive Connector to automatically create a folder where the non-profit team and the vendor can share documents
Connectors are available in Camunda Platform 8, so if you’d like to start experimenting with the OpenAI Connector or any of our other built-in Connectors, create a free account today! And if you want to learn more about the architecture of Connectors, be sure to catch the replay of the 2023 Camunda Community Summit, which just wrapped up yesterday – you can find the on-demand videos right here.