top of page
Writer's picturefutureprooftechskills

Evaluating ChatGPT for Mule 4

Hello World! This is the second post in a series of posts regarding ChatGPT and MuleSoft. If you have read the first post, thank you! If not, check it out after reading this post.


You clicked on this link to know if you can use ChatGPT to build Mule 4 flows. This post will answer that question based on experiments run during my appearance on the MuleSoft Community Twitch Stream on Feb 21, 2023 using ChatGPT Plus’ default model.

Disclaimer: These are my opinions and not the opinions of my current employer Salesforce.

Note: Interested in the ChatGPT MuleSoft and Mule 4 conversation? You can access it here. If you use a screen reader, I do not place the actual response in text form on this post. You will need to access the link to get the ChatGPT response.

Now the following conversational tests were run:


Test 1: What does ChatGPT know about async scope?


Prompt 1: What Mule 4 scope will allow me to process flows asynchronously?

Observations

  1. Asynchronously was misspelled in the question. However, ChatGPT understood that I misspelled the word.

  2. ChatGPT is intelligent enough to deduce from the question that the scope's name should have something to do with “asynchronous.” Therefore I assume it took an educated guess and came up with the term “asynchronous” scope.

  3. ChatGPT answers this question confidently and goes as far as to provide a code snippet.

  4. ChatGPT understands when to use the scope but does not get the name correct.

  5. The code snippet is incorrect.

    1. The tag “<asynchronous>” should be “<async>”

    2. The use case is valid.

    3. The chatbot thinks the code is PHP.


Prompt 2:Take the flow you created and add maxCurrency of 5 to it.

Observations

  1. Instead of mentioning the “<asynchronous>” tag was wrong, ChatGPT modifies the code snippet to use the <async> tag.

  2. After testing this flow in Anypoint Studio, I believe this flow is correct.


Notice. ChatGPT fixed the code snippet in the first prompt while adding the maxCurrency property.


Rating

Putting on the role of a computer science professor teaching an integration class. I would provide ChatGPT a C+. The chatbot was able to get the async scope theoretical concepts correct and explain how it worked; however, in applying those concepts, the chatbot struggled a bit.


Test 2: What does ChatGPT know about scatter-gather?


Prompt 1: Which Mule 4 component can I use to process three routes in parallel?


Observations

  1. The response has a confident tone and appears to be correct, but it is not.

  2. Each element in the collection (array) [1, 2, 3] will spin off a thread and sequentially process each route.

  3. Execution should spin up three threads and execute in parallel.

  4. The code is clean.

Prompt 2: Is there another way? (1st time)

Observations

  1. The response gets better, but its still not the correct answer.

  2. The code will spin up three threads sequentially.

  3. Each thread will execute a route (sub-flow) in a fire-and-forget fashion.


Prompt 3: Is there another way? (2nd time)

Observations

  1. The explanation and answer are correct.

Rating

The Chatbot came up with some clever responses that were ultimately wrong. I would expect a MuleSoft Developer without any experience but who has taken the Anypoint Platform Development: Fundamentals course to get this answer correct. Scatter-gather is the best way because the prompt mentions finite numbers (3) of routes. Scatter-gather is perfect for that case.


Other Considerations


Creating good prompts

While testing ChatGPT and other prompt-based AI tools, I have noticed a common theme, “the more descriptive the prompt is, the better the response.” To be fair, the inventors of these tools have taken time to write brief examples to help you before you start.


The ChatGPTs response is only as good as the prompt itself.


Adding details can increase the probability of ChatGPT getting the answer correct and limit the number of assumptions that the chatbot has to use.


Should you use ChatGPT to help build Mule 4 flows?

Right now, NO! At least not yet. However, I suspect future models will be pre-trained to write good Mule 4 flows.


If you use ChatGPT now to build Mule 4 flows, you will encounter the following issues, which may cause more frustration than help.

  1. ChatGPTs default model makes mistakes on simple MuleSoft questions that an experienced developer should know after taking the Anypoint Platform Development: Fundamentals course.

  2. The chatbot's confident tone makes inexperienced developers think they have the correct answer, but that is far from the truth.

ChatGPT in the future

If Open AI trains ChatGPT to build Mule 4 flows in the future, I think this tool will be good as a copilot for developers. This would be a fantastic tool for generating and inserting code templates. I know most want AI to write the entire code for you and remove the need for developers, but I double down on my belief that developers will be needed in the future.


By the way, I’ve watched a few “Explore Anypoint Code Builder” series on Twitch, and a few MuleSoft Community members mentioned wanting ChatGPT integrated with the tool. It's a great idea. I wonder Salesforce partner with Github to take advantage of the AI pair programming tool Github copilot, which is already an extension to VSCode.

This is a picture of the installation page in VSCode for the VSCode Extension for GitHub Copolit
VS Code Extension: GitHub Copolit

Wouldn’t that be cool? What do you think?


2 Comments


alexandra.martinez
alexandra.martinez
Mar 01, 2023

hahaha Should you use ChatGPT to help build Mule 4 flows? NO NO NO!!

it was so insightful to see all this in the live stream. definitely curious to see where the future of AI will take us, but at least i dont think they'll replace developers just yet (not within my lifetime i hope lol)

Like
Replying to

Yeah ChatGPT needs more training. 🤣🤣. I'm curious too. I find AI hits are BIG hits and AI fails are BIG FAILS.

Like
bottom of page