The current capabilities of AI to generate the cloud backend and edge logic are deceptive.
I asked AI to write AWS CDK code deploying backend infrastructure for a sample Internet of Things system. It took me a few prompts, but finally, it generated nicely looking and well-commented Python code. I was surprised by the overall quality of the output I received...
... until I reviewed that code more closely.
After thorough verification, I got suspicious about the merit of the obtained solution. While the code looked correct during the initial review, it had a few security vulnerabilities.
I repeated my exercise and asked AI to generate an edge logic communicating with the backend system using MQTT. The result had similar issues as before.
AI models are trained based on publicly available data containing diverse code quality. Ultimately, we obtain a blend of good/bad code fragments in a single script. It takes in-depth domain knowledge to verify and adjust generated solutions. Don't let the first impression mislead you!
9 Replies
What tool did you use? ChatGPT?
yes
Would you be willing to share your prompts here? I'm curious to understand how you're asking to get the desired result.
I need to work on it. I will prepare a stream describing the process and pointing vulnerabilities in the generated code. I will share the prompts during that event and paste them here.
noice!
I added this topic to my planned streams: https://www.thingrex.com/live/
Live
ThingRex.com Live Events
LMTX DEV
YouTube
How to use ChatGPT to generate an Internet of Things environment us...
How to use ChatGPT to generate an Internet of Things environment using the AWS Cloud? Can we trust AI to build working solutions?
If you are interested in this topic, join my future webinar: https://www.thingrex.com/live/
#chatgpt #ai #aws #cloud #iot
That is the query I used in this video:
Generate Python source code that uses AWS CDK to deploy cloud infrastructure required to send telemetry data from devices via MQTT protocol to the cloud storage.
For every invocation, I got different output - from horribly wrong to almost correct, but none of them were working solutions.