Back to all posts

Leveraging Chat GPT for Development: Balancing Privacy, Security, and Integrity

Posted on Jan 09, 2024

Posted in category:
Productivity Tools

Over the past few years, AI model growth has been exponential, providing a robust collection of tools that can be utilized to streamline many operations that can benefit from machine learning operations. Although some may see AI models as simply "better search engines," there is a lot more that you can utilize ChatGPT or otherwise for; however, it requires careful consideration & planning. Let's explore how ChatGPT can help developers and how we can balance the privacy, security, and other aspects of day-to-day interactions.

Controlling Access to Private Information

As developers, we should always be thinking about the privacy of what we do. We must consider what we can disclose when discussing the projects we work on, the data we process, and the ideas we come up with. Think of all of those confidentiality agreements you have signed over the years!

Keeping privacy on top of mind is imperative when utilizing AI models such as ChatGPT. We must implement controls regarding how we interact with AI, even if they may be manual. Here are a few high-level ideas that can help you consider privacy while still benefitting from AI

Control Measure: Data Minimization

Only provide the necessary information required for the task, avoiding sharing excessive or personally identifiable data. For example, if you need guidance on implementing or optimizing a method, ONLY provide the AI model with the needed elements to review THAT item. Avoid sending the remainder of the file, namespaces, or other information that may leak the nature of your project.

Control Measure: Anonymization

Before interaction with ChatGPT, anonymize or pseudonymize user data. Replace user/industry/project-specific details with generic placeholders. We utilize this concept with Obfuscation when distributing source code, and similar concepts can be utilized when sharing with ChatGPT.

This is especially important when you may have information that could disclose your industry, company, or similar.

Understanding Privacy Policies

There are many methods to interact with ChatGPT and other tools; each of these services has different standards of privacy with the information provided. For example, the following is a snippet from the Privacy Information for ChatGPT provided by OpenAI. (Emphasis mine)

We may use content submitted to ChatGPT, DALL·E, and our other services for individuals to improve model performance. Content may include chats with GPTs. Please refer to this article to understand how content may be used to improve model performance and the choices that users have. Please note that we do not use content submitted by customers to our business offerings such as our API and ChatGPT Enterprise to improve model performance. Please see our Enterprise Privacy page for information on how we use business data.

As you can see here there are different boundaries for exposure between the commercial and free versions of their product. As you utilize other services that integrate AI, it is important to review their policies to review how they will handle/use the data. Microsoft has CoPilot, Grammarly has plugins for AI, you name it, companies are using it. It is your responsibility to review this information and be sure that you protect yourself.

Improving Productivity with ChatGPT

Ok, enough of the negative, let's talk about how you can utilize ChatGPT to help with day-to-day development tasks. As a multi-language tool it doesn't matter if you are a C#, Java, Python, Ruby or any other language developer, AI can help you!

Rapid Prototyping and Testing

ChatGPT can aid in rapid prototyping and testing of applications. Developers can create chat interfaces quickly by integrating the model into their software. This facilitates early-stage testing, allowing for user feedback and iteration before committing to complex development processes.

To put it another way, you can ask ChatGPT for assistance in doing repetitive, common tasks. For example, getting the shell structure of a project setup or creating a default Webpack configuration. The result may not be production-ready, but it can help developers get a productive item in a short period of time.

Pair Programming - Rubber Duck Debugging

Bouncing ideas off of another person is one of the key ways that we learn and grow as developers. Rubber Duck Debugging was discussed in a story within The Pragmatic Programmer where a developer carried a rubber duck and explained problems in a manner that the duck would understand. I find that utilizing this mindset is imperative when interacting with ChatGPT, and it helps to protect yourself from information disclosure naturally.

By trimming your request to common language terms when asking for AI assistance, you naturally remove business process/logic/naming from the discussion and focus on high-level need. This often results in very quick solutions from AI tools that are often more "turn-key" than what you get from other sources such as StackOverflow or documentation.

As a simple example using this prompt with jquery how can I sum all integer values of textboxes with a data-group attribute ChatGPT provided the following solution in selection.

Sample ChatGPT Response
<input type="text" data-group="group1" value="10">
<input type="text" data-group="group1" value="20">
<input type="text" data-group="group2" value="5">
<input type="text" data-group="group1" value="15">
<input type="text" data-group="group2" value="8">
<input type="text" data-group="group1" value="25">

<p id="sum"></p>
$(document).ready(function() {
  var sum = 0;
  $('input[data-group="group1"]').each(function() {
      var value = parseInt($(this).val(), 10);
      if (!isNaN(value)) {
          sum += value;
 $('#sum').text('Sum: ' + sum);

As you can see, this has full context, and it even includes justification as to WHY this solution should work. Quick, easy, and productive, without ANY information disclosure.

Automation of Repetitive Tasks

By integrating ChatGPT into workflow automation tools, developers can automate repetitive tasks more intelligently. The AI's capabilities can significantly improve overall productivity, from automating responses to routine inquiries to assisting in data entry or analysis. Simple learning of patterns can result in many hours saved. You can achieve further optimization with tools that leverage AI in a targeted manner, such as GitHub CoPilot, which can leverage this automation to write unit tests against existing code, among other development tasks!

Language Translation & Localization

For applications targeting a global audience, ChatGPT's multilingual capabilities can be a game-changer. It facilitates real-time language translation, enabling seamless communication across diverse linguistic backgrounds, thereby broadening the reach of the software. The results seem to be far more informed than a traditional enter-text and get-translation tool.

In Summary

AI is here. AI is powerful, but its usage requires care and consideration. In addition to all of the topics covered above, it is important to be aware of your corporate policies regarding the usage of such tools. If you are an executive leader, it is important for you to also consider if you should place restrictions on AI usage among your teams.

Feel free to share how you are leveraging AI in the comments!