Last Updated: September 12th, 2023
Table of Contents
1.0 An Introduction into ChatGPT for Developers
1.1 ChatGPT & Software Development Terminology
1.2 Using ChatGPT for Software Development Use Case
2.0 ChatGPT & Software Development Demos
2.1 User Stories and ChatGPT
2.2 ChatGPT for Troubleshooting
2.3 ChatGPT Pseudocode
2.4 ChatGPT Prompt Engineering for Developers
2.5 Full Stack Development ChatGPT
2.6 YAML Code and ChatGPT
2.7 How to Use OpenAI API
3.0 ChatGPT and Software Development Conclusion
3.1 What's Coming? (Future of LLMs)
3.2 Smart Data ChatGPT Developers
3.3 Custom ChatGPT Development Services
Download Original Presentation PDF Here
In the ever-evolving landscape of Artificial Intelligence (AI), insightful discussions are imperative. Recently, a Lunch and Learn session focused on the utilization of AI in software development and the intricacies of its implementation. This blog serves as a reflection and summary of that engaging discourse, capturing the key takeaways and insights presented by industry experts.
The session was moderated and curated by Smart Data CTO Chris St Amand. He provided a comprehensive introduction to ChatGPT, establishing a baseline understanding of its capabilities. Furthermore, he discussed the potential benefits and drawbacks of incorporating ChatGPT into software development, as well as its future prospects.
In addition, several Smart Data employees showcased demos of how they are currently leveraging ChatGPT in their respective projects, effectively utilizing it to build software across the entire technology stack. The discussion also delved into crucial topics such as legal considerations, privacy concerns, and the ethical implications associated with ChatGPT technology. Attached will be recordings from the Lunch and Learn as well as the presentation itself.
As AI becomes increasingly integrated into our lives, it is important for businesses to stay informed and up-to-date on the technological advancements entering today’s market. Smart Data aspires to establish an environment of understanding around these topics. With this understanding comes increased knowledge, which in turn can lead to further growth and innovation within all fields.
What do I want from ChatGPT?
There’s something I’ve been dying to know about ChatGPT – can I essentially have it perform every task for me?
So here’s the deal, I really want to know about ChatGPT. How can I get it to handle everything for me? I had this idea to create a project where ChatGPT and I team up to automate my life – myself, my laptop, my boat! Basically, it’ll take care of most of my tasks, but I’ll still need to keep an eye on things. After that, in phase 2, it’s just me and the boat. I mean, the AI should be able to handle everything, right? The images you’re seeing below were actually produced by OpenAI’s Dall E-2 image generator. I then utilized a new plugin from chat GPT, Code Interpreter, which is apparently pretty good at data visualizations and other image manipulation things.
“Phase 1”
ChatGPT and ME: Laptop + Boat
“Phase 2”
ChatGPT and ME:
Just Boat
I tried my hands at image manipulation. I asked the AI to overlay the text “just boat” on the image, and I specifically wanted a large, bold font. You might not notice it immediately, but it’s right there (in the middle). So then I said, hey, that’s kind of terrible. The font wasn’t as large as I’d expected. I requested for a bigger font and for the text to be placed at the top left. The AI apologized, stating it couldn’t enlarge the font but assured me it had relocated the text to the top left.
Interestingly, it didn’t move the original text. Instead, it created a duplicate at the top left. Now you see both versions. This was my Chat GPT “don’t quit your day job” moment, we are not quite there yet, so where are we? Before we go any further we’ll need to level up on some terminology just in case you haven’t been studying OpenAI and reading about it every day
ChatGPT & Software Development Terminology
-
- ChatGPT – An implementation of a LLM + RLHF (GPT4) in the form of an AI Chatbot developed by OpenAI and backed by Microsoft
- Tokens – basic units of text – “ChatGPT is great!” is 6 tokens. Figure that one out on your own.
- Large Language Models – a specific application of neural networks, particularly deep learning models, that are designed to understand, interpret, and generate human-like text based on vast amounts of input data
- Neural Network – a computational machine learning model inspired by the human brain. They can be used for a wide variety of tasks.
- Generative AI – uses machine learning algorithms to generate new data, insights, or content from existing data
- RLHF – Reinforcement Learning from Human Feedback. Human labelers evaluate and rank different responses generated by the model. These rankings are then used to train a reward model, which estimates the quality of the LLM’s predictions. Using the reward model, the LLM is again fine-tuned, this time through reinforcement learning.
- Prompt Engineering – Knowing how to ask the right questions in the right way
Other Important ChatGPT Points
-
- GPT4 improvements are primarily in the areas of “creativity, visual input, and longer context”
- Both are trained on data up to 2021 but you can feed it info to consider that is more recent
- There is a limit on how much you can send in a single prompt
- There is a ChatGPT API
- You can enhance an LLM with your own data (fine-tuning, embedding, AI-aaS). There are companies ready to build services (some are already released) to help your organization more easily train a model on your corporate data.
- If you want to go beyond the basic chatbot available to everyone, it won’t be free.
There are lots of other ML models besides neural networks. Linear regression, logistic regression, decision trees, random forests, support vector machines, and more. As an example, Smart Data used Neural Networks to examine results of PCR tests for a diagnostic laboratory to determine if the covid test was +, – or undetermined.
Using ChatGPT for Software Development
During the introduction of GPT-4, Greg Brockman, President and Co-Founder of OpenAI showcased a developer who utilized the Discord API to build a Discord chatbot. While I won’t delve into the complete process (you can view the entire video on YouTube here), I’d like to emphasize a few significant points.
“You can ingest images in addition to text with ChatCompletions. Just convert the “content”…”
Build a discord bot example from OpenAI. The developer “taught” the AI about a function in another discord API that was not available when the model was trained. At a certain stage, the developer introduced a function called chat completions in the Discord API, which had been developed after 2021. This function was previously unknown to chat GPT, prompting the developer to inform chat GPT about it, elucidating its functionality and encouraging its utilization.
TypeError: Missing 1 required keyword-only argument: ‘intents’
GPT4 incorporated that. However, the code was not perfect. When tested by the developer there was an error. Interestingly, instead of seeking further assistance from the AI regarding the error, the developer simply copied and pasted the error back into the AI.
My apologies for the error. I missed the “intents” argument required for Discord.py v2.0.0 and above.
The developer encountered environmental challenges when attempting to run the code again. They reached out to chat GPT, explaining their use of Jupyter and seeking assistance in resolving the bug. Without hesitation, Chat GPT provided precise instructions on how to run the Discord bot in Jupyter and even offered to make necessary code updates. The outcome? Success!
- Not being trained on more recent data
- Bugs in the AI-generated code
- Environmental issues.
It was a great example of how someone with a good understanding of prompt engineering could use their own knowledge + the AI to develop something quickly and effectively.
In the following sections, I will delve deeper into these topics, but for now, let’s reflect on these initial findings.
As we move forward, we will delve deeper into the practical applications of ChatGPT in the realm of software development. Our upcoming demos will demonstrate not only the potential of this technology but also the breadth of its capabilities. We’ll see how ChatGPT, when combined with an understanding of prompt engineering, can streamline and support entire full-stack development processes. Prepare for a journey that redefines software development as we know it, merging the unique strengths of humans and AI. We’ll illustrate how to harness the power of ChatGPT in real-world scenarios for better coding efficiency and effectiveness.
Staying Ahead with Smart Data: Generative AI Solutions for Inphlu with OpenAI's ChatGPT Integration.
ChatGPT & Software Development Demos
User Stories and ChatGPT
Kathy Stem
Allow me to introduce myself to those who may not be familiar. I am Kathy Stim, a business analyst at Smart Data. This blog revolves around the role of AI in software development, as well as its impact on the software development life cycle. Before diving into the development process, we must recognize the importance of crafting effective user stories. This is where AI can truly shine, aiding in the creation of both stories and acceptance criteria. Let’s explore how AI can be a valuable asset in this aspect of software development.
In this example, I began with a straightforward prompt, asking chat GPT for assistance in writing a story. As expected, the response requested additional details, specifically a user role, their goal, and the reason behind the goal.
So with my second request, I gave it some more detail. I told it that I needed a way for users to sign up for an account in my application. I gave it some specifics about fields and passwords in terms of conditions. I did not give it a user role or outline a specific goal, though. So let’s see if the response is a bit better. Remember, It specifically suggested the role of the user, their goal, and the reason behind the goal.
I wasn’t quite as specific as it asked, and I also didn’t give any indication that I wanted acceptance criteria or detailed scenarios, but I did provide more content for the requirements:
The results this time are quite a bit better. It generated the following narrative: “As a new user, I desire to register for an account in order to access the application’s features and functionalities.” It even deduced a user role on its own, since I didn’t provide one. Moreover, it provided me with some well-crafted acceptance criteria, although not in my usual format. Overall, it appears to be quite good. It also gave me a scenario and steps, which I did not specifically ask for.
A nice reminder that you should never blindly use your results without careful review and consideration
It also gave me some advice. You may need to consider additional edge cases and error-handling scenarios based on your application’s specific requirements. This is where you can see that a human is still needed. You’re not losing your jobs unless you don’t follow your policies. You should never blindly use what AI source produces. You need to read it, reveal it, make sure that you didn’t miss anything or didn’t get anything wrong entirely.
While the results are better, I still need some improvement.
We use Gherkin for our acceptance criteria to help with automated testing. I want my acceptance criteria written in Gherkins text. If you’re not familiar with Gerkin, it’s often used to help write automated tests and has a very specific format. Let’s try asking for a modification: Can you write the acceptance criteria in Gherkins text?
And just like that, we’re off! In this first section, I’ll share a simple story. As a new user, I have a desire to accomplish tasks. Below that, my scenario consists of acceptance criteria in the Gherkin format: given, when, then. For example, given a specific fact, such as being on a particular page or being a new user, when I take an action like clicking a button or opening an app, then I expect a specific result. This could be a new modal opening, a button becoming active, and so on. You can also include additional statements if needed, although none were required in this case. Lastly, it provided helpful advice on reviewing and adjusting based on my specific application needs.
This is much better. I still have my story, but now I also have specific Given-When-Then Gherkin syntax in the scenario section. And again, it gave me some details to think about – a description of using the Given-When-Then format, and it’s prompting me to REVIEW it and make any changes as necessary.
And just because we all need some fun occasionally, I made one more request. This time, it wasn’t about getting to know me or my personal style, but about appreciating different styles in general. I asked it to craft my user story in the delightful form of a Limerick.
ChatGPT for Troubleshooting
Ryan Wade
You can start by asking more general questions and then delve deeper into specific topics. Additionally, you have the flexibility to have casual conversations with it, as if you were talking to a coding buddy. However, it’s crucial to provide specific instructions to ensure accurate results. It’s fascinating that this ChatGPT not only comprehends JavaScript, React, and job scripts, but also understands Material UI and its components.
It’s a comprehensive body of knowledge that encountered a specific issue with a component not rendering correctly. Initially, I was unsure about the cause of the problem, so I reached out with a general description of the situation and asked for ideas. It provided me with around seven or eight different possibilities, and one of them appeared to be the most likely solution.
I asked about it and ChatGPT provided me with more information. After exploring several options, I found the most promising one. I delved deeper into it and eventually obtained some code, or at least a framework for it. I actually used this code in the project I was working on and it effectively resolved the issue. It’s fascinating how you can start with a simple question and end up with practical code. It’s all about leveraging the potential and making the most of it.
ChatGPT Pseudocode
For this example, I discovered that using ChatGPT can assist me in thinking in pseudocode. This allows me to focus less on individual lines of code or scripts and instead approach problem-solving from a higher level. It is beneficial to begin with a broader perspective and gradually delve into the details.
In this example, the JavaScript issue is relatively straightforward. I needed to solve a problem by asking a question. To protect client data, I made the data anonymous. The names used here are just dummy content. The task was to find a specific value in a string based on an ID and move it to the top of the array. Could you provide a solution or the corresponding line of code for this?
It did, although I did request a more streamlined version, which is something I often do. This helps me explore different options and find the most efficient approach in terms of code. It’s always helpful to see if there are alternative approaches that are more streamlined and faster. With ChatGPT, you can prompt it to guide you in any direction you prefer.
Once I had the script, I asked if it could be converted to TypeScript. It turned out to be a simple yet incredibly helpful process. I’ve utilized this conversion in various React projects, and it has consistently delivered excellent results. However, as Kathy mentioned, it’s crucial to review the output and ensure its accuracy.
Another nice reminder that you should never blindly use your results without careful review and consideration
ChatGPT Prompt Engineering for Developers
Nate Bucher
Hello I’m Nate Bucher a Software Developer Here at Smart Data, let’s discuss some prompt engineering that I have been exploring lately, experimenting with chat GTP. My task was to utilize the free version, which happens to be the 3.5 version and is slightly slower compared to what others were using. Let’s start with what Prompt Engineering is, it refers to the process of crafting a precise combination of input words that are used by ChatGPT.
The goal was to find the most efficient phrase or command that would generate results that were as relevant as possible to my request. To do this I had to identify the correct trigger phrase and then ask for more detailed information regarding different topics. After
For my initial prompt, I simply asked if it could map a C sharp profile using a small code snippet that I provided from a previously created table layout. Surprisingly, it responded positively, offering to generate a complete class for customer mapping. This saved me a significant amount of time, considering there were approximately 30 attributes in the customer model. It truly accelerated the process of laying the groundwork. I was impressed with the efficiency and time-saving capabilities of this approach.
Earlier, I had requested the system to create a SQL job for me. This job aimed to retrieve customers with specific interaction dates. However, during the presentation, I had misplaced that particular snippet. Thankfully, the system retains all our information, as I mentioned earlier. So, I kindly asked if it could provide me with the SQL job again, and it did. I made sure to jot down all the instructions, including the reminder to change the database name.
What I found particularly interesting was that I wanted to revisit my original prompt. So, I asked the system to share it with me, and it did so promptly. My initial prompt was simply to create a SQL job that pulls customers whose last interaction date falls within a specific range and updates their status to inactive. It was incredibly helpful to have this assistance during my presentation.
As I discovered, the more specific and tailored the prompts, the better the results. However, it is worth noting that the system also provides a solid foundation with its generic scaffolding to help you get started. So, once you become adept at formulating precise prompts, the possibilities are limitless.
Here’s another example in the C# middle layer. In this case, I needed to paginate and retrieve the results. What made this one really interesting is that it not only provided a response model, but also a controller method. As you turn the page, you’ll notice it even offered a UI method for returning and fetching the data, all with pagination. This is why I believe full stack development is heading in this direction.
If you’re currently seeking new opportunities, you’ll find that there are numerous openings for prompt engineering developers, where you’ll be responsible for writing code and implementing prompts to develop software for companies.
Fullstack Development with ChatGPT
Nick Dunn
So we’re going to build basically a hypothetical blog application. So I’m saying, hey, I want to use that C sharp down the core for the API and Angular for the front end. And I want to first start generating some T-samples groups.
Another aspect to consider is that when generating code, excessive demands can result in network timeouts. Breaking down complex problems into smaller, more manageable questions can help with this issue.
So this is kind of like going into the full stack part. I wanted to create, start creating this Angular application. Based on everything I already told it to come up with for me. So it’s going to give it, create a lot of code, but you know, it converts all these things to a TypeScript interfaces. And starts building out this application. It creates the service, the interfaces, the HTML, and even tells me how to run in G-Serve.
In my spare time, I plan to further explore the possibilities of using Chat GPT to develop a complete application. It’s kind of a neat experiment. As a parting thought, I would like to share that when you can articulate the question accurately, finding the answer becomes a straightforward task. Here is a nod to Hitchhiker’s Guide to the Galaxy. Thank you.
YAML Code with ChatGPT
Raviteja Karna
On the screen, you’ll notice it provided me with the pipeline file, utilizing the correct dot net packages as requested. It also handles publishing the build artifact and deploying to Azure seamlessly. One of the remarkable abilities of Chat GPT is its ability to summarize the necessary steps when providing code snippets. In our case, you may find some comment lines. We’ll simply replace them with the appropriate values for Azure subscription, web app name, and path to publish the artifact. The complete set of instructions will be shared, along with specific examples, in the reporting and presentation.
Here are some examples I have tried with ChatGPT, along with links to the chats:
https://chat.openai.com/share/0cbaa3bc-03a3-4557-9cbd-1d465a420b9f
https://chat.openai.com/share/4a464bd4-d991-4f32-9aa7-dea6070019a5
How to use OpenAI API
Jay Brown
Hello, I’m Jay Brown I work on the Business Development side of Smart Data. I’ll be discussing the OpenAI API just like APIs such as Whisper and Dolly, which are available through their OpenAI platform, we’ve had a lot of fun with this Smart Data. We’ve successfully implemented multiple POCs for various clients. Now, let’s dive into the key considerations when you start exploring the ChatGPT API.
Firstly, you’ll need to sign up and become a paying subscriber. That’s how they hook you. Once you’ve done that, you’ll be able to log in and access your API key. An important aspect, as Chris mentioned earlier, is understanding the different models available to you. Currently, the core models in use are 3.5 and 4. GPT-3.5 models can understand and generate natural language or code. The most capable and cost-effective model in the GPT-3.5 family is gpt-3.5-turbo which has been optimized for chat but works well f