AI-Generated Code: Generative AI Concerns & Opportunities for Marketers

August 14, 2023 | 5 minute read
Alexander Stegall
Director of Analytic & Strategic Services, Oracle Digital Experience Agency
Dustin Wurtz
Senior Email & Web Developer for Creative Services, Oracle Digital Experience Agency
Chad S. White
Head of Research, Oracle Digital Experience Agency
Text Size 100%:

Ready or not, we’re rapidly heading into a world where generative AI tools like ChatGPT, Dall-E, and others do more of marketers’ day-to-day work. That transition is not much in question. The only question is how well your organization makes that transition.

To make that transition as smoothly as possible, we recommend taking a cautious and realistic approach toward the here-and-now of these technologies, while keeping an optimistic long-term view. That starts with having a solid understanding of how these technologies work, including what they’re capable of and what they’re not.

Having that understanding will help you deploy generative AI in ways that will help your business grow, and either avoid or safeguard against situations where AI leads to costly errors or embarrassing customer experiences. 

Because the issues and use cases around generative AI vary depending on whether you’re outputting text, images, or code, we’re addressing each of those separately. In this post, we’re focusing on generative AI for code. Let’s start by explaining…

How AI-Generated Code Works

Generative AI large language models (LLMs) write code similarly to how they write text, by calculating probabilities. However, whereas ChatGPT and Bard are trained on literature, articles, and conversations from social media sources, LLMs for coding like GitHub Copilot are trained on billions of lines of publicly available source code. This allows them to recognize patterns in coding and be able to string code elements together by constantly identifying the next-most-likely code element to include.

Not only are there now specialized engines for writing HTML, JavaScript, Python, TypeScript, Ruby, C++, Rust, Go, Bash, and other languages, but engines for particular code-writing functions as well. Let’s talk about those next…

6 Modes of Use

As when generating text and images, marketers have a full spectrum of possible use cases when using generative AI for coding. Here are the six most common code-writing use cases:

  1. Writing full code of project. While this is possible, marketers are generally going to see the most success with small, simple projects, such as doing a basic website landing page.
  2. Writing pieces of code. For larger projects, the best approach is to break it up into functional blocks.
  3. Debugging code. If you’ve written code that doesn’t work as you wanted it to, generative AI can be used to debug it and write in fixes. Some LLMs and plug-ins even allow you to do live debugging as you write, saving valuable compiling time. You will also likely find yourself asking generative AI to debut code that it has written that doesn’t work correctly.
  4. Refactoring code. Generative AI can take code you’ve written and compress it, making it more efficient and lower weight.
  5. Asking for coding advice. Especially when using broad LLMs like ChatGPT, sometimes they’re better at giving advice about coding than actually writing the code. This approach can be a great way to debug code, too.
  6. Documenting code. Whether it’s code written by you, someone in your organization, or someone external, documentation makes future code changes easier.

Similar to how using technical photography specifications, specific art terms, and Pantone color numbers helps dramatically improve the results of AI-generated images, making your coding requests very specific can also boost the accuracy of the results. So, just like being a graphic designer helps you get more out of Midjourney, being an experienced coder will help you get more out of generative AI coding tools.

According to a Bain & Company survey of nearly 600 companies across 11 industries, 46% of brands are already using generative AI for code completion, generation, and copiloting. That said, some brands are taking ill-advised risks.

Confidential & Non-Confidential Code

It’s dangerous to put proprietary code—really, proprietary anything—into generative AI tools because it’s unclear what happens to that information. Does it become training content for LLM? Can other users summon up information you’ve inputted? It’s all very hazy at the moment.

When it comes to proprietary code, the most notable case has been Samsung employees cutting and pasting proprietary code into ChatGPT. However, they’re not the only ones. According to Cyberhaven research, more than 4% of employees have put sensitive corporate data into LLMs.

It’s also worth noting that since coding-focused LLMs are trained on publicly available code, they aren’t likely to be very helpful in generating proprietary code, which involves internal libraries and other sources to which these engines haven’t been exposed.

But what about code that isn’t proprietary or sensitive? Here at Oracle, we like the term “confidential.” Confidential code would be any of the applications we develop for either internal usage by employees or external usage by customers. However, there’s lots of code we create that, while protected by copyright, isn’t confidential because the code is already visible to the public.

For marketers, the two biggest areas to think about here are website code and email code, both of which are easily inspected—for both educational purposes and for inspiration. We think these are the two most-promising use cases for generative AI coding.

Website & Email Coding

For the time being, generative AI will be much better at writing website code than email code for a few reasons.

First and most importantly, in terms of AI training content, there are many more large, public repositories of web code than of email code. (It’s legally unclear if Google, for example, could use all of the emails stored in Gmail inboxes to train an AI model on email code, although copyright and ownership issues haven’t impeded generative AI companies thus far.) Second, HTML coding for websites has long-standing standards established by the World Wide Web Consortium, whereas email coding has no official standards, which leads to wider variations in email coding, as well as a less-stable code base. And third, web coding is written about much more on the public web than email coding is.

Put all that together and right now writing full email code is next to impossible, as The Email Factory demonstrates. For the time being, you’ll have much better luck writing pieces of code, debugging code, and asking for coding advice. In all those instances, you’ll want to be very specific in your prompts, given all the fallbacks required with email coding. For instance, if you want it to create an email button that’s compatible with Microsoft Outlook Desktop, you have to ask it for that.

In the months and years ahead, we expect generative AI code-writing tools to get markedly better as they’re trained on larger amounts of content and as their interfaces allow for much more brand-tailored responses. These advances should allow skilled coders to become even more productive.

(Editor’s note: None of this post was written by AI. Not a single word.)

—————

Need help exploring how generative AI and other AI tools can improve your digital marketing? Oracle Digital Experience Agency has hundreds of marketing and communication experts ready to help Oracle customers create stronger connections with their customers and employees, even if they’re not using an Oracle platform as the foundation of that experience. Our award-winning specialists can handle everything from creative and strategy to content planning and project management.

For help overcoming your challenges or seizing your opportunities, talk to your Oracle account manager, visit us online, or email us at OracleAgency_US@Oracle.com.

Alexander Stegall

Director of Analytic & Strategic Services, Oracle Digital Experience Agency

Alex Stegall is the Director of Analytic & Strategic Services at Oracle Digital Experience Agency. He has worked in digital marketing and ecommerce for over 10 years, both in-house and as a consultant, specializing in bringing a data-driven analytic approach to decision-making and design. His background in data science and creative ecommerce development give him a unique perspective on how companies can present and think about their data in ways that engage and inform.

Dustin Wurtz

Senior Email & Web Developer for Creative Services, Oracle Digital Experience Agency

Dustin Wurtz is Senior Email & Web Developer for Creative Services at Oracle Digital Experience Agency, exemplifying a remarkable proficiency in crafting captivating digital experiences. With a career spanning over 8 years, he brings forth a profound wealth of specialized expertise in email and web development, complemented by an avid interest in generative AI. Skillfully blending creative ingenuity with technical precision, he is determined in his commitment to delivering creative solutions, a commitment brilliantly showcased through his array of engaging email campaigns and dynamic web projects.

Chad S. White

Head of Research, Oracle Digital Experience Agency

Chad S. White is the Head of Research at Oracle Digital Experience Agency and the author of four editions of Email Marketing Rules and nearly 4,000 posts about digital and email marketing. A former journalist, he’s been featured in more than 100 publications, including The New York Times, The Wall Street Journal, and Advertising Age. Chad was named the ANA's 2018 Email Marketer Thought Leader of the Year. Follow him on LinkedIn, Twitter, and Mastodon.


Previous Post

Picking the Right Sender Name: Brand or Person?

Chad S. White | 6 min read

Next Post


Rightsizing Your Use of Digital Marketing Agencies

Lauren Gannon | 6 min read