Inspiration

Our inspiration for this hackathon came from our work. Overall, we develop a digital grievance system for global supply chains. Workers can contact the brands they produce for when their rights are violated. When there is a new complaint, the CSR team of the brand needs to create a corrective action plan (CAP) to provide remedy to the workers and implement prevention measures to make sure this issue does not occur again. Here we find two problems of the CSR teams that we want to solve:

  1. Time Consuming: So far, the CSR team needs to create the CAP for each new complaint from scratch manually. This work is time consuming.
  2. Creating Commitment: After a CAP is created, the CSR team needs to convince the local management of the factory to implement the measures of the plan. It is often hard to get the commitment of the local management with communication across the globe. Getting real commitment digitally is hard, plus the cultural gap needs to be taken into account.

What it does

You can try out our hackathon prototype here!

Our solution helps at exactly these two problems: You can enter the summary of a complaint case or pick one of our three example summaries. Then you pick the example factory from which you received your complaint and enter your email address, which needs to be registered for the Dropbox Sign API.

Prototype 1: Enter a complaint summary, a factory, and an email (signed up for Dropbox Sign API)

Here comes the AI magic: ChatGPT creates a draft for a Corrective Action Plan for you. It is already separated into single actionable items, which have the same features as on our platform (e.g. description, due date). This saves sooo much time!

You can still manually edit the suggestions of the CAP, so a human is still the last one to make sure everything is correct.

Prototype 2: ChatGPT generated a Corrective Action Plan for the complaint, already in the format of our platform

Then, you can create a PDF out of this CAP. The pdf is in English and the language of the country of the factory.

In the end, you can invite people to sign the CAP. In a real life example, a CSR manager from Germany could ask the CEO of her German company as well as the factory manager in Vietnam to sign the document. The signature of the German CEO really signals the importance of social sustainability to the factory in Vietnam. This helps to create commitment and bridge the cultural gap.

Prototype 3: You can create a pdf out of the plan. The pdf is in English + the language of the factory to bridge the cultural gap.

Overall, this prototype helps to make solving complaints more effective and efficient. The main group that benefits from this, are the workers in the supply chains.

How we built it

For this hackathon we built a standalone web service as a prototype. It starts already at the step where you have a summary of a complaint. For our general application, this functionality would be implemented in our complaints handling platform, where a company also receives the complaint messages.

The core AI part is the usage of the ChatGPT API to create the corrective action plan. Crafting the exact prompt was an essential part of our work. On the one hand we tried to get ChatGPT in an expert role as a complaint handler. On the other hand we were also able to format the response as a json-file that harmonizes with our existing platform.

To give you a glimpse, here is our prompt that creates the draft corrective action plans:

public static final String PROMPT = 
"Imagine you are a professional complaints handler for workers rights. You receive the summary of a complaint case from a factory." +
            "Your task is to draft a Corrective Action Plan to solve the underlying issue." +
            "The corrective action plan should break down in multiple items. Each item must have the following attribute:" +
            "a title, a text description,  a due date in iso format after october 2023 for the implementation of the item, and a priority (low, medium or high)." +
            "Structure your response as a json-file, being a list of items and with the keys \"title\", \"description\", \"dueDate\", \"priority\" as described above." +
            "There should be between two and five items in the corrective action plan." +
            "The complaint is from %s" +
            "The complaint summary is: %s";

Furthermore we experimented a bit with the parameter of the ChatGPT API and ended up at the following settings:

model="gpt-3.5-turbo",
temperature=0.2,
max_tokens=1000,

For the digital signatures, we used the Dropbox Sign API. There especially the Send Signature Request endpoint.

For the web service, we used our usual stack of Java Spring as the backend and the react material ui as the frontend. Our data is stored with mongodb. For the deployment we use heroku.

Challenges we ran into

Well - as you might know - most of the work gets done shortly before a deadline :) Hence, we had a few issues with the limit to 10 emails per day included in the test mode of the Dropbox Sign API.

We also ran into an issue with languages in different character sets (like Hindi or Bengali) for the document signature and focussed on latin alphabet languages for this prototype.

For our case, it would be great to let a document be signed by three persons: The CEO and the CSR manager of the German company and the Factory Manager of the Vietnamese supplier. However, in the API test mode only two people can be requested to sign one document. But this would be no problem in a production setting.

Last but not least, ChatGPT takes its time to come up with longer answers. Heroku on the other side is pretty impatient and time out after 30 seconds without a response. We needed to run a background job to get around this issue.

Accomplishments that we're proud of

We are super happy about how well ChatGPT generates drafts for corrective action plans. We are particularly proud that the drafts come already in the format that we use on our platform. That really saves a lot of time for our users.

Additionally, we are proud of the look of our standalone prototype solution. We are happy that our prototype solves the two problems we identified.

Solutions: ChatGPT saves a lot of time in the CAP creation. Dropbox Sign API helps to signal the commitment to a plan from both sides.

Most importantly, we are proud that we are able to help workers in global supply chains with our solution.

What we learned

Mainly two things:

  1. Never underestimate the abilities of ChatGPT. When you ask the right questions, you will get the right answers.
  2. How electronic signatures can be integrated seamlessly in existing digital processes.

What's next for Corrective Action for Complaints around the globe

Regularly we run our new ideas and prototypes by our existing customers of our core product. We are super hyped to introduce our demo here, because we think it has great potential (after all, who would not love to save time). In case they like it, we would integrate the prototype in our main platform, first on staging and later as a feature in production.

Share this project:

Updates