jump to navigation

An introduction to ChatGPT December 11, 2023

Posted by fofo in ChatGPT, Generative AI.
Tags: , , , ,
trackback


Artificial intelligence (AI) is changing our world quickly, especially in making software. AI tools are making it easier and better for people to create software.
I’ve been in the tech world for nearly 25 years and have been witnessing some amazing stuff. It is really mind-blowing what is happening right now with artificial intelligence and machine learning, especially with ChatGPT. In this post we will look into ChatGPT and generative AI.

ChatGPT is a true paradigm shift, like when the internet first emerged. It has been the talk of the town so to speak and there is sparking interest from investors and tech companies around the globe. It is already used by millions much to the surprise of its creators at OpenAI. It took just 2 months to reach 100 million users. It draws almost 1.5 billion visits per month.

In short, ChatGPT is a smart chatbot that’s really good at making human-like conversation. It’s a type of AI that creates new stuff, just like those tools that make new pictures or music. It’s become super popular really fast and is changing how we work, learn, and chat.


I will explain how it can be used in the real world, offering handy insights for software engineers and developers. You do not need to have any previous experience to follow this post. I hope that you will learn how to leverage this brilliant new technology to make your work/life easier.

Let’s start by explaining what Generative AI or Gen AI in short, is.
You can think of it like a creative AI that can create all sorts of new things like text, pictures, videos, tunes, or even computer code. It can create digital content on the spot.

There are various types of AI. Another type of AI, called discriminative AI.

Discriminative AI, also known as a discriminative model in the context of machine learning, is a type of model that focuses on distinguishing between different kinds of data inputs. It learns the boundaries between different categories or classes in a dataset. Discriminative models differ from generative models in that they do not focus on how data is generated. While generative models can create new data instances, discriminative models are solely concerned with learning the distinction between existing data categories.

In summary, discriminative AI models are powerful tools in machine learning for classifying and distinguishing between different types of data, making them essential in many practical applications where accurate categorization is critical.

Let’s get back to Gen AI.

There is a tool created by OpenAI, called DALL-E. DALL-E is an artificial intelligence program,specialised in generating images from textual descriptions. It’s named as a playful combination of the famous surrealist artist Salvador Dalí and the Pixar movie character WALL-E. You can supply this tool with the following description for an image “A developer sitting in his desk typing some code in his laptop wearing a nice t-shirt” and you will get back a brilliant image generated by this handy tool.

There are several key aspects of Generative AI:

  1. Machine Learning Models: Generative AI typically involves machine learning models like neural networks. These models are trained on large datasets and learn to recognize patterns, styles, and structures within this data.
  2. Data-Driven Creativity: The AI uses the insights gained from its training data to create new content. For example, after analyzing thousands of paintings, a generative AI model could create new images in the style of the observed artworks.
  3. Diverse Applications: Generative AI can be used in various fields, such as creating realistic computer graphics, generating text for chatbots, composing music, synthesizing human-like speech, and more.
  4. Deep Learning Techniques: Techniques like Generative Adversarial Networks (GANs) and transformers are commonly used. GANs, for instance, involve two neural networks—the generator and the discriminator—working in tandem to produce increasingly refined outputs.
  5. Ethical and Creative Implications: As Generative AI becomes more sophisticated, it raises questions about originality, copyright, and the role of AI in creative processes. It also poses challenges in areas like misinformation and deepfakes.

Overall, Generative AI represents a significant advancement in the field of artificial intelligence, offering new possibilities for automation and creativity.

One might ask “So how does ChatGPT know so much?”Well, the short answer is, that has been trained on tons of information from the internet – news, research papers, books, websites like Wikipedia, and more. I should highlight the fact that ChatGPT doesn’t look stuff up online when you ask a question. It uses what it’s already learned to make guesses about what comes next. It’s not a search engine, but if you ask me, it will replace search engines soon.

The obvious question, is “How do I chat with ChatGPT?”
Just, browse to chat.openai.com. You need to create an account. Do not worry it is free! You can also download the OpenAI apps for Android and iOS users.

There’s a free version of ChatGPT that everyone can use. It’s got all the cool features, although it’s currently on version 3.5. Sometimes it might be a bit slow when lots of people are using it. If it’s taking a bit longer, just hang tight for a moment, or try refreshing the page.

There’s also ChatGPT Plus! It costs $20 a month, and you get quicker responses, even when it’s busy. You will also get all the new features, including the latest GPT- 4 version.

Let’s explore what ChatGPT can do. ChatGPT can have conversations and remember things within them. We can also give it feedback to make it even better. It has some new features like browsing with Bing and using plugins. Let’s do a quick demo.

I navigate at chat.openai.com and log in.
I’m using the ChatGPT Plus account, which as I said costs $20 per month. With Plus subscription, I can pick between the GPT-3.5 model, which is awesome for most things, or the latest GPT-4. I am going to use GPT-4.

ChatGPT-4 was released on March 14, 2023. It has 175 billion parameters and receives 10 million queries per day. It was trained on a massive corpus of text data, around 570GB of datasets, including web pages, books, and other sources.

This my request/prompt to ChatGPT -> “I would like to apply to a top university in USA for a Master’s degree in Computer Science with a focus in Artificial Intelligence and Machine Learning.”

This is the reply I got from the chatbot.

—————————————————————————————————————-
Applying for a Master’s degree in Computer Science with a specialization in Artificial Intelligence and Machine Learning at a top university in the USA is an exciting goal! Here are some steps and tips to help you with the application process:

  1. Research Universities: Start by researching which universities offer strong programs in your area of interest. Look for programs with a good reputation in AI and Machine Learning, and check their research facilities, faculty expertise, and industry connections.
  2. Check Admission Requirements: Each university will have its own set of admission requirements. These typically include a relevant undergraduate degree, GRE scores, TOEFL or IELTS scores for non-native English speakers, and sometimes specific prerequisites in mathematics and programming.
  3. Prepare Your Application:
    • Statement of Purpose (SOP): This is a crucial part of your application. Your SOP should clearly articulate your interest in AI and Machine Learning, your academic and professional background, your long-term goals, and why you’re interested in that specific program.
    • Letters of Recommendation: Most programs require 2-3 letters of recommendation. Choose recommenders who know you well and can speak to your academic and research abilities, such as professors or employers.
    • Resume/CV: Highlight your academic achievements, research projects, relevant work experience, publications, and any other pertinent accomplishments.
  4. Gather Transcripts and Test Scores: Request transcripts from your undergraduate institution(s), and ensure you have your GRE and TOEFL/IELTS scores ready to submit.
  5. Apply for Funding: Investigate funding options such as scholarships, research assistantships, teaching assistantships, or fellowships. Some programs offer funding packages to international students, while others require separate applications.
  6. Write a Research Proposal (if required): Some programs might ask for a research proposal. If so, write a clear and concise proposal that aligns with your interests and the faculty’s research areas.
  7. Prepare for Interviews: Some programs may conduct interviews as part of the admissions process. Be ready to discuss your academic background, research interests, and why you are a good fit for the program.
  8. Application Submission: Submit your application before the deadline. It’s wise to apply to multiple universities to increase your chances of acceptance.
  9. Follow Up: After submitting your applications, keep an eye on your email for interview invitations or additional requests from universities.
  10. Decision and Acceptance: Once you receive acceptance letters, decide which program best fits your goals and needs. Be mindful of the acceptance deadline.
  11. Visa and Preparation for Moving: If you’re an international student, you’ll need to apply for a student visa. Start this process as soon as you accept an offer, as it can take time.

Remember, applying to top universities is competitive, so ensure your application is well-prepared and showcases your passion and suitability for the field of AI and Machine Learning. Good luck!
—————————————————————————————————————–

You can see the ChatGPT UI below.

Let’s have a quick look on how to use ChatGPT. When you open it up, you’ll notice on the left side there’s a place where all your chats are listed. If you’re new here, it’ll be empty until you start chatting. To kick off a new chat, just hit the “New Chat” button at the top left corner.

One cool thing about ChatGPT is that it remembers what you’re talking about in each chat session. You can even juggle a few chats on different topics at the same time.

If you are ready to chat, just type what you want to say at the bottom of the page, where it says “Message ChatGPT…” Hit the up-facing arrow or press ENTER to send your message.

If you need to add a new line without sending the message,just press Shift + ENTER. The chat will move up as you go along, but your message box stays put at the bottom. If you’ve scrolled up and want to jump back to the latest in the chat, just click the down arrow key next to the chat, and you’re back in action.

Before creating a new chat, l would like to talk about prompts and their importance.

When you use ChatGPT, you give it a prompt, which is a text that helps the model know what to respond. Think of a prompt as a question or a statement that sets the stage for the model’s reply.

Before the model gets this prompt, the text is split into smaller parts called tokens. Each token is a word or a punctuation mark, and they help the model understand the text’s meaning.

ChatGPT can handle up to 4000 tokens for both the prompt and its response. This means the prompt and the model’s reply each can’t be more than 4000 tokens.

Although 4000 tokens might seem like a lot, this limit can affect how complex your questions or statements to the model can be. For instance, you can’t give the model a whole software application in one prompt because of this token limit.

To make a good prompt, you should be clear and to the point. Tell the model exactly what you want to know and give any important details or limits. A well-made prompt is specific and clear, helping the model give a precise answer. You will come across the term “Prompt Engineering”.

Prompt engineering is the art of crafting effective prompts to guide AI language models like ChatGPT in generating specific and relevant responses. It involves understanding how these models interpret and process language, allowing users to frame their questions or statements in a way that maximizes the accuracy and relevance of the AI’s output. The key lies in being clear, concise and direct in the prompt, providing sufficient context without overloading the model with unnecessary information. This skill becomes crucial in complex scenarios where the desired output is highly specific or when the user seeks creative or technical solutions.

ChatGPT’s ability to handle a wide range of topics and its interactive nature make it an invaluable tool across various fields, from education and customer service to creative writing and technical problem-solving. However, the effectiveness of its application largely depends on the user’s ability to communicate their needs and context through well-thought-out prompts.

Let’s create a new chat with a good prompt. This time we will ask the AI chatbot for a blog post. The prompt is

“I need to create a blog post for an e-commerce site, Buying Guide & Helpful Tips, for children car seats”.

ChatGPT gets back to me with a very detailed response. I can choose to regenerate the response, rate if the second reponse was better than the first one and copy the response to the clipboard.

There are the new GPT-4 features! With a Plus account, you can use Bing for real-time internet searches. Let’s say we ask for today’s Microsoft stock price. GPT-4 with Bing gives us the latest info in a friendly response.

“As of the close of the market, Microsoft Corporation’s (MSFT) stock price was $374.23. This price reflects the value at the end of the trading day.”

Plugins are another cool feature. They let you interact with websites directly from ChatGPT.

We need to install the plugin first. See the image below



We will install the KAYAK plugin to find flights. We just give our travel details, and ChatGPT will do the rest.

Have a look at the image below. Kayak Plugin is installing.

I gave ChatGPT this prompt

“I need to fly from athens to london on the 15th of december. Returning on the 22nd of december back to athens. I need direct flights, preferably evening flights. I will travel alone”
In the image below, you can see the Kayak plugin response. I even get booking links for my flights.


ChatGPT has some limitations. First, the information it uses is not always up-to-date, so it might not know about recent events. However, it’s getting updates over time. Also, it can sometimes give wrong answers that sound right, so you need to double-check what it tells you.

Another thing to remember is how ChatGPT deals with harmful or biased questions. It’s trained on internet data, which can include biased or harmful content. But, it’s designed not to help with illegal or harmful activities. So, if you ask something like that, it won’t give you the answer.

Don’t share personal or sensitive information because it’s not completely private. Also, it’s hard to understand exactly how ChatGPT comes up with its answers, which can raise ethical questions. And, there’s a big question about who owns the information it creates – is it the developers, the users, or someone else?

ChatGPT is a useful tool, but it’s important to use it sensibly. You should always check its answers and be mindful of privacy and ethical issues. Remember, it’s a tool to help you, but it’s not perfect.

Finally let’s look into OpenAI’s APIs. You can access them at platform.openai.com. These APIs let you add cool AI features to your own websites or apps. This isn’t just for ChatGPT, but also for other cool tools like DALL-E for images.

Many popular apps are using these APIs, like GitHub’s Copilot and Duolingo for translating languages. ChatGPT is awesome, but the real magic happens with these APIs. They open up so many possibilities, like creating chatbots for your website or app, or using it as a virtual writing assistant for your customers.

For example, you can ask ChatGPT to draft a friendly cover letter for a senior software developer position, or translate a sentence into Greek. ChatGPT can help with tasks you’d usually Google, like coding syntax or formulas. You could ask ChatGPT on Excel’s HLOOKUP formula.

It’s also handy for extracting key info from documents, like pulling out important details from resumes. And of course, it’s great for writing and refining code in various programming languages, generating test cases and code documentation even helping with debugging or comparing different tech options.

Let’s look into a typical prompt relevant to a programming task.

“Generate code comments for a Java program that implements a database
management system. The comments should describe the purpose and functionality of
each class and method, as well as any relevant design decisions.”

The possibilities are endless, and it’s all about how you choose to use this cool technology in your daily tasks.
I will write a new blog post regarding ChatGPT and development stuff. In the meantime have a look at the OpenAI blog.
Hope it helps!!!

Comments»

No comments yet — be the first.

Leave a comment