Mobile Navigation

Get instant answers, find creative inspiration, learn something new.

Quick links

  • Download on the App Store Badge

Ask me anything

  • Teach me to negotiate
  • Quiz me on vocabulary
  • Plan a surf trip to Costa Rica
  • Draft a thank-you note
  • Explain this code
  • Help me train for a half marathon
  • Translate this recipe into Greek
  • Rank dog breeds for a small apartment
  • Help me plan a fun dinner party
  • Draft a social media content calendar
  • Explain why popcorn pops
  • Plan an itinerary for teens in Hong Kong
  • Design a database schema
  • Recommend an easy potluck dish
  • Help me build a budget
  • Critique my short story
  • Find gentle lower back stretches
  • Make this recipe vegetarian
  • Explain options trading like I'm 5
  • Help me pick a halloween costume
  • Write a polite rejection email
  • Generate fantasy football team names
  • Explain airplane turbulence
  • Write a spreadsheet formula
  • Brainstorm domain names
  • Explain nostalgia to a kindergartener
  • Help brainstorm interview questions
  • Summarize my meeting notes
  • Write a Python script
  • Plan a college tour
  • Suggest rainy day activities
  • Write a SQL Query
  • Help me with gift ideas for my dad
  • Draft an email for a repair quote
  • Troubleshoot my printer set-up
  • Write a thank-you note
  • Help me debug this code
  • Create a mobility training workout
  • Brainstorm podcast episode ideas
  • Review my argument for a debate
  • Suggest photo shoot locations
  • Teach me Mahjong for beginners
  • Draft a checklist for a dog-sitter
  • Help me improve this job description
  • Rank e-bikes for daily commuting

ChatGPT can see, hear, and speak

Vision

Chat with images

Dalle 3

Create new images

Voice

Chat with voice

Free plan features, plus plan features, do more with gpts.

You can choose from hundreds of GPTs that are customized for a single purpose—Creative Writing, Marathon Training, Trip Planning or Math Tutoring. Building a GPT doesn’t require any code, so you can create one for almost anything with simple instructions. 

Do more with GPTs links

assignment 3 chat box

logo

Introductory Python

Assignment 3: chatbots, assignment 3: chatbots ¶.

This is a demo assignment that is available as part of the Introductory Python open materials.

This assignment covers Functions & Algorithms, and builds up to the application of Chatbots.

This assignment is out of 8 points, worth 8% of your grade.

Make sure your completed assignment passes all the asserts. This assignment also has hidden tests - which means that passing all the asserts you see does not guarantee that you have the correct answer! Make sure to double check and re-run your code to make sure it does what you expect.

Quick Tips ¶

Make sure you execute your code to define the functions you write, and then add a new cell to apply your function to different inputs, and check that you get the outputs you expect.

If you’re not sure where to start, look at the code in the test cases (in the asserts) for examples for what kind of inputs and outputs the function you are writing should take, and what kind of behaviour it should have.

Keep in mind that each question is mostly independent from every other - so if you get stuck on something, you can always move on to the next one, and come back to any that you have trouble with later.

Code Imports ¶

You must run the following cell before proceeding with the assignment.

Zen Chatbot ¶

In this assignment, we will be working our way up to building a chatbot.

To start with, we can have a quick chat with a zen chatbot, to see what these kinds of chatbots look like.

Also, if you get stuck on anything, come back here, and talk to the Zen chatbot, to relax :)

Note: in this, and other, chatbot lines, running this code will start an open-ended while loop, that will interupt your code flow, until you explicity quit out of the conversation. If you want to be able to run all your code (from kernel restart & run all ), then comment these lines back out when you are finished exploring them.

Part 1: Functions ¶

This part covers the basics of writing and using functions.

Function Examples ¶

The following are a couple examples of functions provided to you, so you can see their structure.

You don’t need to do anything with these functions.

Q1 - Find Max Value (0.5 points) ¶

Write a function called find_max , that takes in a single parameter called random_list , which should be a list.

This function will find the maximum (max) value of the input list, and return it.

This function will assume the list is composed of only positive numbers.

To find the max, within the function, use a variable called list_max , that you initialize to value 0.

Then use a for loop, to loop through random_list .

Inside the list, use a conditional to check if the current value is larger than list_max , and if so, re-assign list_max to store this new value.

After the loop, return list_max , which should now store the maximum value from within the input list.

Q2 - Square Everything (0.5 points) ¶

Write a function called square_all that takes an input called collection that you assume to be a list or tuple of numbers.

This function should return a new list , which contains the square of each value in collection .

To do so, inside the function, you will define a new list, use a loop to loop through the input list, use an operator to square the current value, and use the append method to add this to your output list. After the loop, return the output list.

Part 2: Refactoring Code to Use Functions ¶

‘Refactoring’ is the process of updating existing computer code, to keep the same outputs, but to have better internal organization and/or properties.

We’ve written a lot of code in previous assignments. However, since we did not yet have functions at our disposal, a lot of that code is not very easy to re-use.

In this section we will refactor some code - rewriting (and extending) some code from previous assignments as functions, to make it easier to re-use.

Q3 - Calculator (0.5 points) ¶

Let’s start with the calculator code that we worked on in A1.

Instead of using a conditional, like we did before, we will make a series of functions to do all the mathematical operations that we want to do.

Define four functions, called summation , subtraction , multiplication , and division .

Each of them will take two inputs num1 and num2 (that could be int or float ), and use them as follows:

summation will add num1 to num2 and return the result

subtraction will subtract num2 from num1 and return the result

multiplication will multiply num1 by num2 and return the result

division will divide num1 by num2 and return the result

Q4 - Extending our Calculator (0.5 points) ¶

Let’s now add some more functions to our calculator:

Write a function called squared that takes one parameter, called num , and returns the square of it.

Write a function called square_root that takes one parameter, called num , and returns the square root of it.

Example: Chaining Functions Together ¶

The goal of using functions is partly to be able to re-use code segments.

It’s also a way to able to flexibly apply and combine different functions together, to build up to more complex and interesting programs.

The cell below shows a couple examples of using our calculator functions that we have now defined, in combination with each other.

Q5 - Using Our Calculator (0.5 points) ¶

Let’s now use our new calculator functions to do some calculations!

Add the square of 3 to the square root of 9

Save the result to a variable called calc_a

Subtract the division of 12 by 3 from the the multiplication of 2 and 4

Save the result to a variable called calc_b

Multiply the square root of 16 to the sum of 7 and 9

Save the result to a variable called calc_c

Divide the square of 7 by the square root of 49

Save the result to a variable called calc_d

Calling Functions from Functions ¶

In the example above, we were able to refactor our code into re-useable functions.

We were then able to use these functions and chain them together to flexibly and extensibly do computation.

Next we’ll dive into another aspect of writing good modular code: dividing complex tasks into independent functions and then using them together.

In practice, this will look like writing lots of and small and specific functions to do simple tasks.

We can then use these functions from within other functions build up to being able to do more complex tasks.

Q6 - Functions for Even & Positive Numbers (0.5 points) ¶

Recall Q13 from A2, when we wanted to check a series of conditions across items in a list.

We can consider that checking each of these conditions is really a separate task.

When writing modular code, these separate tasks should therefore be organized as separate functions.

For this question, write two functions, one called is_even , and the other called is_positive .

Each function should take in a single parameter, a number called value :

is_even will check if value is even, and return True if so, and False otherwise.

is_positive will check if value is positive, and return True if so, and False otherwise.

Note: for our purposes here, ‘positive’ numbers are all numbers greater than 0 (so 0 is not considered positive).

Q7 - Functions Using Functions (0.5 points) ¶

In this section, your are going to recreate a function called make_new_list which takes a list called data_list as its input.

This function will use is_positive and is_even to mimic the task from A2-Q13.

That is, this function will check each value in data_list to see if they are even or odd and whether they are positive or negative.

If they are both positive and even, encode this as the number 1

If they are both negative and odd, encode this as the the number -1

Otherwise, encode this as the number 0

Store the result for each value into a list called output and return it.

Part 3: Algorithms ¶

This part covers working with algorithms.

Q8 - Algorithms (0.5 points) ¶

For each of the tasks below, indicate whether you think it is something that a human or a computer would be better at doing.

Answer each question by setting each requested variable to the string either ‘human’ or ‘computer’.

Set the variable to reflect the answer of which of them you think would be better at the task.

a) Recognize whether a sentence is sarcastic and/or ironic.

Answer in a variable called algo_q_a

b) Reply to a question with information about a topic, replying with the exact wording from a wikipedia article.

Answer in a variable called algo_q_b

c) Keep answering messages for an arbitrarily long period of time, without demonstrating fatigue.

Answer in a variable called algo_q_c

d) Interpret the tone of what was said, to infer if someone is angry.

Answer in a variable called algo_q_d

For each, try to think through if and how you could write an algorithm to do this task - and if you could not, what about it is hard to formalize.

We can use these questions to start to think through what might be easy and hard to program our chatbot to do.

Part 4: Chatbots ¶

This part is an application of all the tools we have covered so far, to the problem of creating a chatbot.

A chatbot is a piece of software that tries to have a conversation with a human.

While today’s chatbots are powerful learners, traditional chatbots are much simpler.

Traditional chatbots follow a “rule-based” approach that is defined for them (by you, the programmer), usually without any learning.

These rules can be very simple or sometimes quite complex - but everything is pre-defined.

These types of chatbots can handle simple conversations but do tend to fail at more complex ones.

Chatbot functions ¶

In order to make our chatbot, we will create a series of functions that our eventual chatbot will use together to try and chat with a user.

At the end, we will test that these functions do indeed allow us to have simple conversations with our chatbot.

Below are some more example chatbots to talk to. Remember to comment these lines back out if you want to be able to Restart and Run All .

Example Chatbot - Eliza ¶

The following demo is from the Natural Language ToolKit (nltk), a Python package available through Anaconda.

Uncomment the line below, and run the code to be able to have a chat with Eliza.

More information on Eliza: https://en.wikipedia.org/wiki/ELIZA

Example Chatbot - Iesha ¶

The following is another demo chatbot from nltk, this one called Iesha.

As you try the chatbot demos with Eliza and Iesha, see if you can notice any patterns that might help you figure out how they work.

That is, can you guess at what kind of programming structures these programs might use?

Chatbots: Words & Rules ¶

So, how do these kinds of chatbots work? Most broadly, they combine two simple but powerful approaches:

Rule Based Artificial Intelligence (GOFAI)

Bag-Of-Word Language Models

Rule based AI , sometimes called ‘Good Old Fashion Artificial Intelligence’, or ‘GOFAI’, is an approach to making artificial agents that tries to write down a set of rules to follow to perform some task. In practice, this often looks like using a lot of conditionals: if X happens, do Y . If we can write down enough logical procedures (call them algorithms) to follow to complete some task, then we can create an artificially intelligent agent (for that task).

Bag-Of-Word language models are an approach to language that takes the simple approach of saying ‘lets try and figure out what someone is saying simply by checking and counting which words they use’. If someone says the word ‘dog’ three times in conversation, they are probably talking about dogs. This ignores many many things about language, and how it works, but is a good ‘first guess’ for what is being said.

From our perspective, this means two things:

We can broadly try to figure out the topic simply by checking which words are used

We can choose a response based on a rule that defines what to do if and when we identify particular topics

In code then, this looks like:

taking input as strings of continuous text, and splitting this up into lists that contain all the words we see

use conditionals (if/elif/else) that choose an output based on what words appear in those lists

As we work through and create all the function in the next section to create our chatbot, try to think through how these functions relate to this approach.

Q9 - Is It a Question (0.5 points) ¶

One thing we might want to know, given an input to a chatbot, is if the input is a question.

We are going to use a very simple heuristic to check this: we will consider any input that has a question mark (‘?’) in it to be a question.

To do so, write a function called is_question .

This function should have the following inputs, outputs and internal procedures:

input_string - string

output - boolean

Procedure(s):

if there is a ‘?’ in input_string , set output to True

otherwise, set output to False.

return output

Example: string.punctuation ¶

When working with strings, it can be useful to check what kind of things particular characters are.

To do things like this, Python offers some collections of items, that we can check against.

For example, we can ask if a particular character is a punctuation mark, by asking if it is in the collection of punctuation characters.

Q10 - Removing punctuation (0.5 points) ¶

Once we know if an input is a question, we are going to get rid of all punctuation.

To do so, write a function called remove_punctuation .

out_string - string

define a new variable out_string as an empty string

loop through each character in input_string

if this character is not in string.punctuation

then append the current character to out_string

return out_string

Q11 - Preparing Text (0.5 points) ¶

Now we want a more general function to prepare the text inputs for processing.

Inside this function, we will use some string methods as well as our new remove_punctuation function.

Write a function called prepare_text .

out_list - list of string

make the string all lower case (use a string method called lower )

note that you will have to assign the output to a variable. You can use a variable name like temp_string

remove all punctuation from the string (use your new function remove_punctuation )

this can also assign out to temp_string

split the string into words (look for and use a string method called split )

note that split will return a list of strings. Assign this as out_list

return out_list

Q12 - Echo a Response (0.5 points) ¶

We will define a function that will return a string that has been repeated a specified number of times, with a given separator.

We will also want to deal with the case where the input to this function may be None .

Write a function called respond_echo .

input_string - string, or None

number_of_echoes - integer

spacer - string

echo_output - string, or None

if input_string is not None :

set a variable echo_output to be input_string , repeated the number of times specified by number_of_echoes , joined by the spacer .

Hint: to do so, recall what “*” does to strings

otherwise (if input_string is None)

set echo_output to None

return echo_output

Note that a simple version of this version will end up appending the spacer to the end of the list as well. For our purposes here, implement that simple version.

So, for example, respond_echo('bark', 2, '-') should return: ‘bark-bark-‘

Example: random.choice ¶

We want our chatbot to have some variation in it’s responses - not only anwering the same thing.

So, we want to be able to choose an output from a list of options.

We can use the random.choice function to so.

An example of using random.choice is offered below.

Q13 - Selector (0.5 points) ¶

Next we will write a function that will help us select an output for the chatbot, based on the input it got.

The overall goal of this function is to take a list of words that we got as input, a list of words to check for if they appear in the input, and a list of possible outputs to return if something from the list to check is in the input list.

Define a function, called selector .

input_list - list of string

check_list - list of string

return_list - list of string

output - string, or None

Initialize output to None

Loop through each element in input_list

Use a conditional to check if the current element is in check_list

If it is, assign output as the returned value of calling the random.choice function on return_list

Also, break out of the loop

At the end of the function, return output

Note that if we don’t find any words from input_list that are in check_list , output will be returned as None .

Q14 - String Concatenator Function (0.5 points) ¶

Create a function that will concatenate two strings, combining them with a specified separator.

To do so, write a function called string_concatenator .

string1 - string

string2 - string

separator - string

concatenate string1 to string2 with separator in between them.

return the result

Q15 - List to String (0.5 points) ¶

Since we are often dealing with a list of strings, it would be useful to have a function to turn a list of strings back into one single concatenated string.

This function will return a string that is each element of input_list concatenated together with each separated by the string seperator .

For example, the following function call:

shoud return:

To do this, write a function called list_to_string .

output - string

assign a variable called output to be the first (index 0) element from input_list

loop through the rest of input_list , looping from the 2nd element (index 1) through to the end of the list

Within the loop, use string_concatenator to combine output with the current element, separated by separator

Assign the output of this to be the new value of output

return output , which should now be a list of the elements of input_list , joined together into a a single string

Q16 - End Chat (0.5 points) ¶

The last thing we need is a way to end the chat with our chatbot.

We will use the same convention that nltk uses - namely, that we will end the conversation if the word quit appears.

To be able to do so, write a function called end_chat

input_list - list

This function should return True if the string ‘quit’ is in input_list , and return False otherwise.

Pulling it all Together ¶

If everything has gone well with writing everything above, then we are ready to pull all these functions together to create our chatbot.

The next few cells define a bunch of code, all provided for you. This code adds a couple more functions we can use and then defines some lists of inputs and outputs that our chatbot will know about. After that, there is a big function that pulls everything together and creates the procedure to use all of this code together as a chatbot.

You don’t have to write anything in the cells below (or in the rest of the assignment).

Do have a quick read through the code though, to see how our chatbot works, and to see how all the functions you just wrote are used to create the chatbot.

If you need, revisit the information at the beginning of this section about the logic our chatbot uses.

You don’t have to understand everything about what happens here, but try to have a first-pass look through it.

We will build up to understanding and writing this kind of code that brings a lot of things together as we continue through the course.

If the code seems intimidating, just scroll down to the bottom, and test out talking to our chatbot.

Talking to our Chatbot ¶

To talk to our chatbot, uncomment and run the cell below.

If anything seems to go weird, note that you can always interrupt the code from running with chat with kernel - interrupt from the menu.

If this happens, it probably means there is some issue with one of the functions you wrote for the chatbot.

Extending Our Chatbot ¶

You might notice that our chatbot, right now, is pretty limited in how many things it can respond to.

To respond to more topics, we could re-use these same functions, adding more input & output options for our chatbot to respond to, using the basic approaches and functionality we have defined here.

If you are interested in this topic, extending this chatbot (or ones like it) will be one of your project options.

After you’ve explored chatting to the chatbot, you are done!

Have a look back over your answers, and also make sure to Restart & Run All from the kernel menu to double check that everything is working properly.

When you are ready to submit your assignment, upload it to TritonED under Assignment-3.

Assignment 4: Artificial Agents

Assignment 3: Chatbot

Have a language expert improve your writing

Check your paper for plagiarism in 10 minutes, generate your apa citations for free.

  • Knowledge Base

Using AI tools

  • Using ChatGPT for Assignments | Tips & Examples

Using ChatGPT for Assignments | Tips & Examples

Published on February 13, 2023 by Jack Caulfield and Tobias Solis. Revised on November 16, 2023.

People are still figuring out the best use cases for ChatGPT , the popular chatbot based on a powerful AI language model. This article provides some ideas for how to use ChatGPT and other AI tools to assist with your academic writing .

These tools can assist you with the following steps when writing a paper, thesis , or dissertation :

  • Developing a research question
  • Creating an outline
  • Generating literature ideas

Paraphrasing and summarizing text

  • Getting feedback

Instantly correct all language mistakes in your text

Upload your document to correct all your mistakes in minutes

upload-your-document-ai-proofreader

Table of contents

Developing a research question with chatgpt, creating an outline of your paper with chatgpt, generate literature ideas, getting feedback from chatgpt, limitations of chatgpt, other interesting articles, frequently asked questions.

You can use ChatGPT to help you formulate a clear and concise research question by generating and improving potential questions.

With the help of ChatGPT, you can develop a large number of possible research questions within a short time. This is a great way to generate ideas and different approaches to a topic.

However, make sure that the generated questions make sense and meet your needs. As you can see from our example, you can keep working with ChatGPT to adapt its suggestions to your needs (or just edit the text directly if you already have a clear idea of what you want).

First input

Develop three possible research questions on the following topic: “The influence of social media on political opinion formation.”

ChatGPT output

  • To what extent does exposure to diverse political perspectives on social media affect individuals’ political opinions and behaviors?
  • How does the personalized algorithm of social media platforms shape the formation of political opinions among its users?
  • What are the underlying factors that determine the effect of social media on political opinion formation, and how can they be measured and analyzed?

Second input

Based on the second research question, develop three further research questions on the topic of polarization in US politics.

  • Build my scientific method, qualitative discourse analysis, into each question
  • Include the term “filter bubble” in each question
  • How does the filter bubble effect on social media platforms contribute to the polarization of political attitudes in the US? A qualitative discourse analysis.
  • What is the role of filter bubbles in perpetuating and reinforcing political echo chambers in the US? A qualitative discourse analysis.
  • How does the influence of filter bubbles on social media affect the ability of individuals to engage in productive political discourse across ideological divides in the US? A qualitative discourse analysis.

Third input

Try to incorporate “qualitative discourse analysis” into the questions themselves, instead of using it as a separate sentence.

  • How does a qualitative discourse analysis of filter bubble effect on social media platforms contribute to understanding the polarization of political attitudes in the US?
  • What is the contribution of a qualitative discourse analysis to understanding the role of filter bubbles in perpetuating and reinforcing political echo chambers in the US?
  • How does a qualitative discourse analysis of the influence of filter bubbles on social media inform our understanding of the ability of individuals to engage in productive political discourse across ideological divides in the US?

Check for common mistakes

Use the best grammar checker available to check for common mistakes in your text.

Fix mistakes for free

You can also use ChatGPT to help you draft a research paper outline or thesis outline . To do this, try generating possible headings and subheadings and then improving them. ChatGPT can help to generate a clear and well-structured outline, especially if you keep adjusting the structure with its help.

However, it doesn’t have a deep understanding of your topic. As a result, inappropriate headings may sometimes be generated. It’s important to check that the outline makes sense and covers all the points needed to answer your research question.

You should also ensure that the headings and subheadings follow a logical structure. Scribbr’s Proofreading & Editing service can help you with this.

Create an outline for an academic research paper with the following research question:

“What is the contribution of a qualitative discourse analysis to understanding the role of filter bubbles in perpetuating and reinforcing political echo chambers in the US?”

The paper will be about 8 pages long.

  • Background information on filter bubbles and political echo chambers
  • Purpose of the study
  • Research question
  • Thesis statement
  • Definition and concept of filter bubbles
  • Definition and concept of political echo chambers
  • Previous studies on the role of filter bubbles in perpetuating and reinforcing political echo chambers
  • Critiques and limitations of previous studies
  • Research design
  • Participants
  • Data collection and analysis
  • Validity and reliability
  • Findings from qualitative discourse analysis
  • Results related to the research question
  • Implications of the findings
  • Interpretation of the results
  • Comparison with previous studies
  • Limitations of the study
  • Implications for future research
  • Summary of the results
  • Implications for understanding the role of filter bubbles in perpetuating and reinforcing political echo chambers
  • Conclusion and recommendations for future research
  • List of references used in the paper
  • Data collection materials
  • Examples of qualitative data analysis

This seems like too much information to fit into only 8 pages. Can you condense the outline, for example removing the appendices and simplifying the structure?

  • Background on filter bubbles and political echo chambers
  • Definition of filter bubbles and political echo chambers
  • Previous studies on the role of filter bubbles
  • Limitations of previous studies
  • Implications for understanding the role of filter bubbles
  • Final thoughts

ChatGPT can be a useful way to generate ideas regarding what sources you might use in your work. Try asking it for suggestions about where to look and what to consider.

However, we advise against using it to find sources directly. It’s not designed for this and, if asked to do it, often just creates fake sources and presents them as real. Search a database like Google Scholar instead.

What types of sources could I use to write a paper on the following research question?

When writing a paper on the contribution of qualitative discourse analysis to understanding the role of filter bubbles in perpetuating and reinforcing political echo chambers in the US, you could use the following types of sources:

  • Academic journals and articles: These are a good place to start when you’re looking for information on specific topics and they can provide you with in-depth analysis and perspectives on the topic at hand.
  • Books and book chapters: These sources can provide comprehensive overviews of a particular topic and can also offer theoretical frameworks and historical perspectives.
  • Government reports and studies: Government agencies, such as the Federal Communications Commission (FCC), may have conducted studies on the role of filter bubbles in perpetuating political echo chambers.
  • News articles and media reports: These sources can provide insight into the current state of the issue, as well as opinions from various stakeholders.
  • Online sources: Websites, blogs, and online forums can provide a range of perspectives on the topic and can also be useful in exploring the experiences of individuals who are affected by filter bubbles and political echo chambers.
  • Data and statistics: Relevant data and statistics on the prevalence and impact of filter bubbles and political echo chambers in the US can be useful in providing evidence to support your arguments.
  • Expert interviews and focus groups: Conducting expert interviews or focus groups with individuals who have experience with or knowledge of the topic can provide valuable insights and perspectives that can be used to support your arguments.

You can also try using ChatGPT to paraphrase or summarize text. ChatGPT can quickly condense the text or generate a number of different paraphrases of the same idea. You can keep typing “again” in the chat until you are satisfied with the result.

This kind of paraphrasing/summarizing can be helpful to, for example, non-native speakers who want to improve the fluency of their text. However, be careful. The outputs often:

  • Contain grammatical errors
  • Include false information

So you should always check the output to make sure it’s correct. If you’re unsure, you can run the text through the Scribbr Grammar Checker and cross-reference the information against other, more credible sources .

An alternative is to use the Scribbr Paraphrasing Tool or Scribbr’s free text summarizer , which were designed specifically for these purposes.

Paraphrase the following text:

“A filter bubble results from a social media algorithm’s attempts to cater to an individual user based on data such as their search history and previous behavior on the site. It results in the user only being presented with information that confirms their biases.”

Restructure the sentences and use other phrasings for the following parts:

  • “results from”
  • “only being presented with”

“A filter bubble is created when a social media algorithm customizes its content for a particular user based on their data, such as their search history and past actions on the platform. This leads to the user being confined to information that reinforces their pre-existing beliefs.” Note We strongly advise against having ChatGPT write text for you and trying to pass it off as your own work. This is academically dishonest and is widely considered plagiarism . It will usually result in an automatic fail, as well as other potential consequences .

You can also use ChatGPT to get feedback on the argumentation and structure of your paper and suggestions for improvements.

An advantage of this is that you can get feedback from ChatGPT on different text excerpts at any time. However, one downside is that ChatGPT does not have a deep understanding of your research question, so its feedback and suggestions may be shallow or inappropriate.

This kind of feedback cannot replace input from an experienced academic supervisor who’s familiar with your topic. Use ChatGPT feedback as a supplement, not a substitute for human feedback.

If you need in-depth feedback on your writing from someone with academic expertise, try Scribbr’s Proofreading & Editing service .

[Text you want to get feedback on.]

Thank you for submitting your research paper for review. Let me provide you with my constructive criticism:

Clarity of Explanations: Overall, the explanations are clear and concise, but there are a few areas that could benefit from additional clarification. For example, in the first paragraph, you mention “the mental lexicon,” but do not provide a definition or further explanation for what this is. It would also be helpful to provide a definition of “lemma.”

Smoothness of Language: The language in the paper is generally smooth, but there are a few instances where it could be refined. For example, the sentence “The symptoms vary from adding superfluous words and taking pauses to hoarseness of the voice” could be rephrased to “The symptoms of these disorders can range from excessive use of words and pauses to hoarseness.”

Structure of Text: The structure of the text is clear, with each paragraph building on the previous one. However, the transition between the first two paragraphs could be smoother. Perhaps you could add a sentence or two to bridge the gap between the two topics.

Even though ChatGPT is a powerful writing tool, you should keep the following limitations in mind:

No original research

Risk of plagiarism, fake sources, fake “facts”.

ChatGPT was trained using existing texts, and the texts created by the AI are based on this data. It’s not capable of doing its own research, only of synthesizing sources that it was trained on.

Additionally, because the texts that it was trained on only go up to 2021, it’s unfamiliar with more recent world events, cultural trends, and developments in different fields of research. This means it may provide outdated information.

Because ChatGPT was trained using existing text, the AI tends to reuse that content in a way that may be considered plagiarism. The AI may copy text from an online publication in its responses.

Additionally, using ChatGPT to write your assignment for you is considered plagiarism regardless of where it got the content from, because you’re passing off something you didn’t write as your own work.

ChatGPT was trained on a wide variety of sources, but it’s not able to accurately tell you what sources it’s using for any given output. Worse, it has a tendency to make up sources that don’t actually exist when you ask.

In addition, ChatGPT is not designed as a citation generator and cannot add correctly formatted citations to your work. Instead, try a tool designed for this purpose, like the Scribbr Citation Generator .

ChatGPT is not always trustworthy when it comes to giving you factually correct information. While it doesn’t deliberately lie, it also doesn’t have “knowledge” in a traditional sense, and it lacks the ability to verify its claims.

Instead, its responses are based on recognizing and reproducing patterns that it has seen in other texts. This means that if it doesn’t “know” something, it tends to guess. And its guesses are presented with full confidence, just like established facts.

So it’s very important that you carefully check any factual claims made by ChatGPT against more credible sources —and don’t cite ChatGPT as a source of factual information for your research.

If you want more tips on using AI tools , understanding plagiarism , and citing sources , make sure to check out some of our other articles with explanations, examples, and formats.

  • Citing ChatGPT
  • Best grammar checker
  • Best paraphrasing tool
  • ChatGPT in your studies
  • Deep learning
  • Types of plagiarism
  • Self-plagiarism
  • Avoiding plagiarism
  • Academic integrity
  • Best plagiarism checker

Citing sources

  • Citation styles
  • In-text citation
  • Citation examples
  • Annotated bibliography

You can use ChatGPT to assist in the writing process for your research paper , thesis , or dissertation in the following ways:

  • Paraphrasing text

No, it’s not a good idea to do so in general—first, because it’s normally considered plagiarism or academic dishonesty to represent someone else’s work as your own (even if that “someone” is an AI language model). Even if you cite ChatGPT , you’ll still be penalized unless this is specifically allowed by your university . Institutions may use AI detectors to enforce these rules.

Second, ChatGPT can recombine existing texts, but it cannot really generate new knowledge. And it lacks specialist knowledge of academic topics. Therefore, it is not possible to obtain original research results, and the text produced may contain factual errors.

However, you can usually still use ChatGPT for assignments in other ways, as a source of inspiration and feedback.

No, it is not possible to cite your sources with ChatGPT . You can ask it to create citations, but it isn’t designed for this task and tends to make up sources that don’t exist or present information in the wrong format. ChatGPT also cannot add citations to direct quotes in your text.

Instead, use a tool designed for this purpose, like the Scribbr Citation Generator .

But you can use ChatGPT for assignments in other ways, to provide inspiration, feedback, and general writing advice.

Cite this Scribbr article

If you want to cite this source, you can copy and paste the citation or click the “Cite this Scribbr article” button to automatically add the citation to our free Citation Generator.

Caulfield, J. & Solis, T. (2023, November 16). Using ChatGPT for Assignments | Tips & Examples. Scribbr. Retrieved February 19, 2024, from https://www.scribbr.com/ai-tools/chatgpt-assignments/

Is this article helpful?

Jack Caulfield

Jack Caulfield

Other students also liked, writing strong research questions | criteria & examples, how to create a structured research paper outline | example, student guide: information literacy | meaning & examples.

Jack Caulfield

Jack Caulfield (Scribbr Team)

Thanks for reading! Hope you found this article helpful. If anything is still unclear, or if you didn’t find what you were looking for here, leave a comment and we’ll see if we can help.

Still have questions?

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form .

How ChatGPT (and other AI chatbots) can help you write an essay

sabrina-ortiz

ChatGPT  is capable of doing many different things very well, with one of the biggest standout features being its ability to compose all sorts of text within seconds, including songs, poems, bedtime stories, and essays . 

The chatbot's writing abilities are not only fun to experiment with, but can help provide assistance with everyday tasks. Whether you are a student, a working professional, or just getting stuff done, we constantly take time out of our day to compose emails, texts, posts, and more. ChatGPT can help you claim some of that time back by helping you brainstorm and then compose any text you need. 

How to use ChatGPT to write: Code | Excel formulas | Resumes  | Cover letters  

Contrary to popular belief, ChatGPT can do much more than just write an essay for you from scratch (which would be considered plagiarism). A more useful way to use the chatbot is to have it guide your writing process. 

Below, we show you how to use ChatGPT to do both the writing and assisting, as well as some other helpful writing tips. 

How ChatGPT can help you write an essay

If you are looking to use ChatGPT to support or replace your writing, here are five different techniques to explore. 

It is also worth noting before you get started that other AI chatbots can output the same results as ChatGPT or are even better, depending on your needs.

Also: The best AI chatbots of 2024: ChatGPT and alternatives

For example,  Copilot  has access to the internet, and as a result, it can source its answers from recent information and current events. Copilot also includes footnotes linking back to the original source for all of its responses, making the chatbot a more valuable tool if you're writing a paper on a more recent event, or if you want to verify your sources.

Regardless of which AI chatbot you pick, you can use the tips below to get the most out of your prompts and from AI assistance.

1. Use ChatGPT to generate essay ideas

Before you can even get started writing an essay, you need to flesh out the idea. When professors assign essays, they generally give students a prompt that gives them leeway for their own self-expression and analysis. 

As a result, students have the task of finding the angle to approach the essay on their own. If you have written an essay recently, you know that finding the angle is often the trickiest part -- and this is where ChatGPT can help. 

Also: ChatGPT vs. Copilot: Which AI chatbot is better for you?

All you need to do is input the assignment topic, include as much detail as you'd like -- such as what you're thinking about covering -- and let ChatGPT do the rest. For example, based on a paper prompt I had in college, I asked:

Can you help me come up with a topic idea for this assignment, "You will write a research paper or case study on a leadership topic of your choice." I would like it to include Blake and Mouton's Managerial Leadership Grid, and possibly a historical figure. 

Also: I'm a ChatGPT pro but this quick course taught me new tricks, and you can take it for free

Within seconds, the chatbot produced a response that provided me with the title of the essay, options of historical figures I could focus my article on, and insight on what information I could include in my paper, with specific examples of a case study I could use. 

 width=

2. Use the chatbot to create an outline

Once you have a solid topic, it's time to start brainstorming what you actually want to include in the essay. To facilitate the writing process, I always create an outline, including all the different points I want to touch upon in my essay. However, the outline-writing process is usually tedious. 

With ChatGPT, all you have to do is ask it to write the outline for you. 

Also: Thanks to my 5 favorite AI tools, I'm working smarter now

Using the topic that ChatGPT helped me generate in step one, I asked the chatbot to write me an outline by saying: 

Can you create an outline for a paper, "Examining the Leadership Style of Winston Churchill through Blake and Mouton's Managerial Leadership Grid."

After a couple of seconds, the chatbot produced a holistic outline divided into seven different sections, with three different points under each section. 

This outline is thorough and can be condensed for a shorter essay or elaborated on for a longer paper. If you don't like something or want to tweak the outline further, you can do so either manually or with more instructions to ChatGPT. 

As mentioned before, since Copilot is connected to the internet, if you use Copilot to produce the outline, it will even include links and sources throughout, further expediting your essay-writing process. 

 width=

3. Use ChatGPT to find sources

Now that you know exactly what you want to write, it's time to find reputable sources to get your information. If you don't know where to start, you can just ask ChatGPT. 

Also: How to make ChatGPT provide sources and citations

All you need to do is ask the AI to find sources for your essay topic. For example, I asked the following: 

Can you help me find sources for a paper, "Examining the Leadership Style of Winston Churchill through Blake and Mouton's Managerial Leadership Grid."

The chatbot output seven sources, with a bullet point for each that explained what the source was and why it could be useful. 

Also:   How to use ChatGPT to make charts and tables

The one caveat you will want to be aware of when using ChatGPT for sources is that it does not have access to information after 2021, so it will not be able to suggest the freshest sources. If you want up-to-date information, you can always use Copilot. 

Another perk of using Copilot is that it automatically links to sources in its answers. 

4. Use ChatGPT to write an essay

It is worth noting that if you take the text directly from the chatbot and submit it, your work could be considered a form of plagiarism since it is not your original work. As with any information taken from another source, text generated by an AI should be clearly identified and credited in your work.

Also: ChatGPT will now remember its past conversations with you (if you want it to)

In most educational institutions, the penalties for plagiarism are severe, ranging from a failing grade to expulsion from the school. A better use of ChatGPT's writing features would be to use it to create a sample essay to guide your writing. 

If you still want ChatGPT to create an essay from scratch, enter the topic and the desired length, and then watch what it generates. For example, I input the following text: 

Can you write a five-paragraph essay on the topic, "Examining the Leadership Style of Winston Churchill through Blake and Mouton's Managerial Leadership Grid."

Within seconds, the chatbot gave the exact output I required: a coherent, five-paragraph essay on the topic. You could then use that text to guide your own writing. 

Also: ChatGPT vs. Microsoft Copilot vs. Gemini: Which is the best AI chatbot?

At this point, it's worth remembering how tools like ChatGPT work : they put words together in a form that they think is statistically valid, but they don't know if what they are saying is true or accurate. 

As a result, the output you receive might include invented facts, details, or other oddities. The output might be a useful starting point for your own work, but don't expect it to be entirely accurate, and always double-check the content. 

 width=

5. Use ChatGPT to co-edit your essay

Once you've written your own essay, you can use ChatGPT's advanced writing capabilities to edit the piece for you. 

You can simply tell the chatbot what you want it to edit. For example, I asked ChatGPT to edit our five-paragraph essay for structure and grammar, but other options could have included flow, tone, and more. 

Also: AI meets AR as ChatGPT is now available on the Apple Vision Pro

Once you ask the tool to edit your essay, it will prompt you to paste your text into the chatbot. ChatGPT will then output your essay with corrections made. This feature is particularly useful because ChatGPT edits your essay more thoroughly than a basic proofreading tool, as it goes beyond simply checking spelling. 

You can also co-edit with the chatbot, asking it to take a look at a specific paragraph or sentence, and asking it to rewrite or fix the text for clarity. Personally, I find this feature very helpful. 

 width=

The best AI chatbots: ChatGPT isn't the only one worth trying

 width=

Microsoft and Google are proud AI is helping you (other companies not so much)

 width=

How Android Auto will use AI to summarize incoming text conversations

Banner

AI in the Classroom

  • Chatbots & Critical Pedagogy
  • Chatbots & Accessibility
  • Chatbot-Proof Assignments
  • Chatbot Assignment Examples
  • How to cite ChatGPT
  • Tutorial: AI, ChatGPT, and Responsible Use for Coursework

Kristen Palmer

Profile Photo

Jeana Jorgensen

Profile Photo

Remix & Share

Creative Commons License

Assignment Considerations

Before assigning work that involves the use of AI tools, please read the information about privacy and other concerns with chatbots . Caines (2022) suggests to consider:

  • Not asking students to create ChatGPT accounts and instead doing instructor demos;
  • Encouraging students to use burner email accounts (to reduce personal data collection) if they choose to use the tool;
  • Using one shared class login.

Assignment Ideas

  • Digital AI Literacy
  • Critiquing Chatbot Responses
  • Revising Chatbot Responses
  • Generating Ideas
  • Assessing Chat Prompts
  • Physical Models & Designs
  • Writing Voice
  • Simulation or Game Play
  • Social Annotation & GAI

One researcher commented on Meta's Galatica tool (which was taken offline after three days of demo and user feedback), saying, “You should never keep the output verbatim or trust it. Basically, treat it like an advanced Google search of (sketchy) secondary sources!” (Cranmer, 2022, as cited in Heaven, 2022). 

Students' digital and information literacy skills now need to expand to include AI literacy. Explore this topic with your students by designing assignments like:

  • Determining if writing was human-produced or machine-produced;
  • Discussing how chatbots work and what intelligence means for humans and machines;
  • Brainstorming how chatbots can be used in students' future professions, noting limitations and ethical considerations;
  • Examining the dataset used to train a particular AI tool (e.g., Who created it? How was it collected? If personal data was used, did individuals give consent? Is the data representative of the population using the tool? What biases may be present?);
  • Fact checking outputs by chatbots—trace claims to original source materials or find sources to refute claims;
  • Exploring the limitations of chatbots in your discipline;
  • Discussing how to resist automation bias like that found in Robinette et al.'s (2016) “Overtrust of Robots in Emergency Evacuation Scenarios” research (Toon, 2016). 

Ideas inspired by Long & Magerko (2020).

Teach a microlesson about AI. The microlesson could be about how generative AI tools work or about an aspect of critical AI literacy, like privacy, fabrication/hallucination, bias, or AI's lack of understanding (not sentient). 

View the microlesson ideas on  Generative AI Activities for the Writing & Language Classroom by Anna Mills for more resources. (This presentation is licensed  CC BY NC 4.0 ).

Trust (2022) lists ways to engage students in critiquing and improving ChatGPT responses.

Pre-service teachers might critique how a ChatGPT lesson plan integrates technologies using the Triple E Rubric or examine whether it features learning activities that support diversity, equity, accessibility, and inclusion. (This will help future teachers learn to critique TPT resources! )

Computer science students might identify potential ways to revise ChatGPT generated code to reduce errors and improve output.

Middle school students might critically review the feedback ChatGPT provides on their writing and determine what is most helpful to their own learning. 

High school and college students could analyze, provide feedback on, and even grade text produced by ChatGPT as a way to prepare for peer review of their classmates’ work. 

Watkins (2022) suggests designing an assignment where students:

  • Identify a current issue in your field.
  • Develop a rubric with specific criteria upon which to judge a chatbot's response.
  • Individually write a question prompt for the chatbot.
  • In groups, compare the responses by applying the rubric.

Engage students in critical thinking by asking them to revise chatbot outputs. If you are hesitant to ask students to sign up for a chatbot account ( see our privacy and free labor discussion ), generate a few responses yourself and post these in your LMS course.

You can structure your assignment so students will:

  • Use the Track Changes feature to mark up a chatbot output;
  • Reflect on the chatbot output by noting what important details are missing;
  • Research claims made in the chatbot output and add in appropriate citations;
  • Expand on a particular section or claim; or
  • Rewrite the output from the other side of the argument.

Ideas were inspired by Watkins (2022).

Chatbots can be a great tool at the beginning of projects. Students can ask a chatbot to:

  • Generate 10 ideas for a paper about a specific topic;
  • Create an outline for a paper;
  • Create an outline for an infographic;
  • Generate ideas for a podcast;
  • List blog post ideas.

After using the chatbot for brainstorming, students can then craft their final project.

Educators can assess students' prompts to a chatbot to assess their knowledge. For this kind of assignment, students could ask the chatbot an initial question, and then follow up with additional prompts to hone a more accurate or holistic response. 

Students can respond to the output and create a new but similar output by stating something like, "Great, but this time include..."

Students act as the experts and guide the chatbot to the best response.

Idea from Bruff (2023).

Ask ChatGPT to design a board game or invention related to the course content and then have students build a physical or digital model for the design/invention. (ChatGPT can’t build the inventions it comes up with.)

Idea from Trust (2023).

Trust (2022) suggests to use ChatGPT to analyze how the bot generates text for different audiences. For example:

Ask ChatGPT to explain a concept for a 5 year old, college student, and expert. Analyze the difference in the way ChatGPT uses language. 

Ofgang (2022) has a similar idea: use the chatbot to generate outputs to compare and analyze different genres or writing styles (e.g., Ernest Hemingway).

AI chatbots can enter into the role of a game simulator when given the right prompt as demonstrated by Bryan Alexander . Learners can practice critical thinking and decision making as they interact with the simulation. (Note the guardrails, biases, and limitations that  Alexander points out in his blog post.)

Instructors can leverage social annotation to emphasize student voice, increase student motivation to complete assignments themselves, and deemphasize the need to turn to chatbots. 

In October 2023, Butler University hosted a workshop called "Leveraging social annotation in the age of AI" led by our Hypothesis customer success manager. To learn how to use Hypothesis, a social annotation tool, to decrease students' reliance on AI, review the resources from the workshop:

  • Leveraging social annotation in the age of AI (slides)
  • Leveraging social annotation in the age of AI (recording)

Here are some other links that might help you get started with Hypothesis:

  • Instructions: How to create an Hypothesis-enabled reading in Canvas Assignments
  • Annotation starter assignments (assignment instruction examples to use in or adapt for your course)
  • Video to share with students: annotation basics

Alexander, B. (2023, March 5).  Experimenting with using ChatGPT as a simulation application . Bryan Alexander. Retrieved March 6, 2023, from  https://bryanalexander.org/gaming/experimenting-with-using-chatgpt-as-a-simulation-application/

Bruff, D. (2023, January 5).  A bigger, badder clippy: Enhancing student learning with AI writing tools . Agile Learning. Retrieved January 9, 2023, from  https://derekbruff.org/?p=3995 . 

Caines, A. (2022, December 29).  ChatGPT and good intentions in higher ed . Is a Liminal Space. Retrieved January 6, 2023, from  http://autumm.edtech.fm/2022/12/29/chatgpt-and-good-intentions-in-higher-ed/

Heaven, W.D. (2022, November 18).  Why Meta’s latest large language model survived only three days online . MIT Technology Review. Retrieved on January 12, 2023, from  https://www.technologyreview.com/2022/11/18/1063487/meta-large-language-model-ai-only-survived-three-days-gpt-3-science/

Long, D & Magerko, B. (2020, April). What is AI literacy? Competencies and design considerations [Research article]. CHI '20: Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems, New York, NY, United States. https://doi.org/10.1145/3313831.3376727

Mills, A. (2023, October 17). Generative AI Activities for the Writing & Language Classroom [Google Slides].  https://docs.google.com/presentation/d/1IbEBckhoOPKRWKQovCVL43-552rF4tlK/edit?usp=sharing&ouid=111341422569034219664&rtpof=true&sd=true

Ofgang, E. (2022, December).  What is ChatGPT and how can you teach with it? Tips & tricks . Tech & Learning. Retrieved on January 9, 2023 from  https://www.techlearning.com/how-to/what-is-chatgpt-and-how-to-teach-with-it-tips-and-tricks . 

Toon, J. (2016, February 29).  In Emergencies, Should You Trust a Robot? Georgia Tech News Center. Retrieved on January 12, 2023, from  https://news.gatech.edu/news/2016/02/29/emergencies-should-you-trust-robot

Trust, T. (2023).  ChatGPT & education  [Google Slides]. Retrieved on January 6, 2023, from  https://docs.google.com/presentation/d/1Vo9w4ftPx-rizdWyaYoB-pQ3DzK1n325OgDgXsnt0X0/edit?usp=sharing  

Watkins, R. (2022, December 18).  Update your course syllabus for chatGPT . Medium. Retrieved on January 6, 2023, from  https://medium.com/@rwatkins_7167/updating-your-course-syllabus-for-chatgpt-965f4b57b003

  • << Previous: Chatbot-Proof Assignments
  • Next: How to cite ChatGPT >>
  • Last Updated: Oct 26, 2023 2:30 PM
  • URL: https://libguides.butler.edu/ai-in-the-classroom

Like us on Facebook

QUICK LINKS

Library Hours Study Rooms My Library Account Library Website

Search code, repositories, users, issues, pull requests...

Provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications

Object Orientated Programming Assignment 3 - Chat Bot

henrybmcf/OOP-Assignment-3-Chat-Bot

Folders and files, repository files navigation, oop-assignment-3-chat-bot, team name: team china, team members: henry ballinger mcfarlane (chatbot code) & lok-woon wan (visual code), student numbers: c14489558 & c14357716, youtube links:.

  • HBM: https://youtu.be/T8OHznyE0eI
  • LWW: https://youtu.be/9J7U7Lvu6No
  • Bundling into a jar file gave a whole bucket load of null pointer excepetions for some reason. So, the project will have to be run through IntelliJ, this will require importing the necessary libraries before it can run. These are all stored in the lib folder. In IntelliJ (on Mac), it can be done through 'File' -> 'Project Structure' -> 'Libraries'.
  • The bot does talk, so please turn up your volume.

Bot Execution

  • The first thing the bot will ask is what your name is. Here you must put in your full name, this is used to create your profile file (In this, the bot will remember any favourites that you tell it about)
  • After this, you are free to talk to the bot.
  • To exit the program, please use one of the following phrases: "bye", "goodbye", "see you later", "i have to go", "see ya".

Orginal Basic Step-by-Step Plan

Increasing complexity of chat bot conversational abilities per step.

  • Simplest implementation of a chat bot, to simply have a list of predefined responses. Select a response randomly from this list. This gives no conversation between the user and bot, simply a random response.
  • Moving on from this, will be the ability to recognise key words and phrases in the user's input. There will then be a database of responses, within which each keyword or phrase has several possible responses. One of these is selected randomly. This gives the user a sense that the bot has responded to their question. Additional to this would be to implement that multiple keywords can have the same set of responses, this will allow the user to ask a question in different ways and it still be recognised by the bot.
  • The keyword search can bring problems is their is punctuation or white space in the user's input, so the next step is to remove all of these unwanted characters before searching the database for a match to the keyword. Also implemented here will be the ability to save the bot's previously selected response, so that in the event that the user repeats themselves, the bot's response will be different from the one immediately prior.
  • The previous keyword search implementation only allowed for exact matches of a key phrase. However, we can improve the detection and matching ability by using Levenshtein's distance algorithm to determine if the user's input matching any keyword in the database closely enough to be classed as the same.
  • To improve the conversational abilities, we need the bot to think more about what the user is asking, for example if the there are two keyword matches for the input, the bot needs to determine the ranking or priority of the keywords, listing them in order of importance and then searching for a response to the top keyword.
  • Next would be to introduce improved replies, keyword transposition. This meaning that if the user asks the bot a question, for example, "You are not clever enough", the bot could turn this around by recognising the use of 'you are', knowing to replace it with "I am", meaning that the bot could reply with something like "So, you think I'm not clever enough?". This could be done by having some skeleton responses, basic templates that the bot can manipulate and use to improve it's responses.
  • Introducing context to the bot's responses, that is if the user replies to an answer from the bot, then the bot knowing what the previous response was and replying to the second question from the user in context to the answer. For example, User: "What is your favourite food?". Bot: "It is chocolate.". User: "Why do you like it?". Bot: "I like it because it is tastes damn good.". The idea of this is give more of a flow and continuation to the conversation.
  • Saving files and coder controlled learning. If we save a log of all conversations held by the bot, then we can review it at points to see where the bot falls down and where it exceeds, applying this knowledge to improve the AI capabilities of the bot. This will also allow us to see the overall progress of the bot over time.
  • User controlled/Self-learning. If the bot does not know or recognise a keyword inputted by a user, then the bot can ask the user what it is, what it means and what a possible correct response could be. This will allow the bot to continuously learn and adapt it's knowledge database, thus improving it's conversational abilities.
  • The final stages can be to better the aesthetics of the bot. Text-to-speech could be implemented so that the bot can speak the answers back to the user. A simple sound/tone visualiser could be used to represent the voice and speech patterns. A possible further step would be to allow the user to speak to the bot, with a speech-to-text program, however this can be decided later, as implementation may be difficult.

All of theses steps are simple ideas at the minute, so the intermediate and final versions may and probably will vary from these points, with additions and deletions from this list.

  • Java 100.0%

Spring 2021 CSE30264 Programming Assignment 3 - Online Chat Room

Type of messages, online chat room.

  • Server opens a port, creates the TCP/UDP socket, goes into "wait for connection" state, and actively listens for socket connections. Hint: please read the Technical Instruction section for details.
  • Client logs in to the system by connecting to the server on the appropriate port .
  • Client sends the username .
  • Server checks to see if it is a new user or existing user and requests a password . Note: store users and their passwords in a file rather than in memory (otherwise the credentials will get lost once the server program is terminated).
  • Server generates a public key and sends it to the client.
  • Client encrypts its password using server's public key, and sends the encrypted password to server.
  • Server receives the password and decrypts it. Then, server either registers a new user or checks to see if the password matches. Server also sends the acknowledgment to the client.
  • Client generates a public key and sends it to the server. Note: multiple clients should be able to register at the same time.
  • Server continues to wait for operation command from a client or a new client connection.
  • Client goes into "prompt user for operation" state and prompts user for operation.
  • Client passes operation ( BM : Broadcast Messaging, PM : Private Messaging, EX : Exit) to server.
  • Client sends operation ( BM ) to broadcast a message to all active clients (i.e., clients who successfully log in to the system but have not exited yet).
  • Server sends the acknowledgment back to the client to prompt for the message to be sent.
  • Client sends the broadcast message to the server.
  • Server receives the message and sends that broadcast message to all other client connections. Note: the server should keep track of the socket descriptors it has created for each client since the program began running. You can decide how to implement this tracking function.
  • Server sends the confirmation that the message was sent. Note: you can decide the content/format of the confirmation.
  • Client receives the confirmation.
  • Client and server return to "prompt user for operation" and "wait for operation from client" state, respectively.
  • Client sends operation ( PM ) to leave a message to a specific client.
  • Server sends the list of current online users . Note: the server should keep track of the usernames of all online users (i.e., users associated with active clients) since the program began running. You can decide how to implement this tracking function. We assume that any client can go offline by using operation ( EX ).
  • Client receives the list of online users from the server.
  • Client prompts the user for the username (of the target user) to send a message to.
  • Client sends the username to the server, and the server replies with the user's public key .
  • Client then prompts for, encrypts, and sends the message to be sent.
  • Server receives the above information and checks to make sure the target user exists/online.
  • If the target user exists/online, the server forwards the message to the user, which decrypts and displays the message. The server should do this by sending the message to the corresponding socket descriptor of the target user.
  • Server sends the confirmation that the message was sent or that the user did not exist. Note: you can decide the content/format of the confirmation.
  • Client receives the confirmation from the server.
  • Client sends operation (CH) to view the chat history.
  • The chat history should be stored in a file on the server that keeps track of all previous chat messages received and sent by the client. The file is stored on the server rather than on the client so that the user cannot modify or delete the chat history. The file should be created upon user registration. For example, when user Alice registers, the server will create a file "Alice.chat" to store her chat history.
  • Each chat history entry should include [Timestamp] [Type of Chat (BM or PM)] [Source and Destination] and [Message Content]. The timestamp is the moment when a client sends or receives a message. In this assignment, you can use the timestamp of the server when it receives the message of the client, given all four student machines are synchronized on a high-speed LAN with negligible communication delay. [Source and Destination] refers to the sender and receiver of the message. For broadcast messages, you only need to specify the sender.
  • When receiving the (CH) command, the server sends the chat history to the client.
  • The client receives and then displays the chat history on screen.
  • Client sends operation ( EX ) to close its connection with the server and end the program.
  • Server receives the operation and closes the socket descriptor for the client.
  • Server updates its tracking record on the socket descriptors of active clients and usernames of online users.
  • Client should close the socket and exit.

Technical Instructions

  • Try logging/registering with multiple clients with the server at the same time. One client's login process should not block any other clients.
  • Reach a state where a server is prompting client 1 to type in some message (e.g., after client 1 sends a BM command). Then send a private message to client 1 from client 2. Client 1 should first print out the message from client 2 and then return to the prompt state.

General Notes

  • Your code may be written in C or C++. You should create two separate directories in your submission, a server directory for the server code and a client directory for the client code. Each directory should contain a Makefile for building your code appropriately.
  • Don't forget that the endian-ness matters. Use htons/ntohs in order to encode a 16-bit (short int) value for transmission. Use htonl/ntohl for 32-bit (long int) values.
  • To determine the size of files , you may want to use the fseek (or equivalent ifstream operation) function and/or the peek operation. For efficiency reasons you probably should not "roll your own".
  • When in doubt, add in extra printf or cout statements to assist with debugging. Make sure to add in a carriage return or do a flush on the I/O buffer to ensure that debug information is displayed before program crashes occur. Make sure to disable your debugging output before handing in the assignment.
  • You can connect back to localhost (127.0.0.1), which will allow you to test your code on the same machine where you have the server running. Create a separate ssh terminal session back to the server and then run your client code by connecting to localhost.
  • When compiling your code, remember to link the libraries -lcrypto -lpthread .

Server Side Design

Client side design.

Download the Demo.

  • Makefile for the client.
  • Source file for the client.
  • Appropriate comments and each member's name.
  • Makefile for the server.
  • Source file for the server
  • Listing of the registered usernames and corresponding passwords. Note: You should read this file in on the server side to handle registered users.
  • Listing of the included file names and example commands to run your code in the archive.

Grading Rubric

  • [5 pts] Included Makefile and code compiles without errors.
  • [5 pts] Code performs the login operation and encrypts the password correctly.
  • [5 pts] Code performs the broadcast messaging operation correctly.
  • [5 pts] Code performs the private messaging operation correctly.
  • [6 pts] Code accepts incoming broadcast and private messages correctly.
  • [5 pts] Code performs the show history operation correctly.
  • [5 pts] Code performs exit operation correctly.
  • [5 pts] Code provides reasonable error checking.
  • [5 pts] Reasonable code performance (runs without errors).
  • [4 pts] Code is commented with appropriate header information.
  • [5 pts] Code handles multiple client connections correctly.
  • [5 pts] Code performs the login operation and decrypts the password correctly.
  • [6 pts] Code performs the private messaging operation correctly.
  • [3 pts] Code is submitted in the requested form.
  • [3 pts] Code follows argument convention.
  • [4 pts] User information is stored in file.

Assignment 3

Text-based discussion formats.

Choose among the following two options, and post your response in the Lesson Three discussion forum .

Option #1: Format that May Be Appropriate

Which of the three text-based discussion formats (chat, threaded discussion, email via listserv) would you consider introducing into your teaching in the near future?

Explain briefly (in a paragraph or so), making sure to cover the following:

  • which format you would use;
  • the discussion topic;
  • the type of students you are trying to engage; and
  • why that format has advantages for your purposes.

Option #2: Inappropriate Format

Is there a text-based discussion format that you would NOT opt to use for your teaching?

If so, explain briefly (a paragraph or so):

  • which format you would avoid;
  • why you would find the disadvantages outweigh any advantages.

To post your response, access the Lesson Three discussion forum . Note : If this link does not work, copy and paste the following URL into your Internet Explorer or Netscape browser window and go to this address:

http://catalyst.washington.edu/webtools/epost/register.cgi?owner=lbaker&id=1609

Follow these instructions for using the EPost threaded discussion forum.

Return To Top

  • Search for: Toggle Search

Say What? Chat With RTX Brings Custom Chatbot to NVIDIA RTX AI PCs

Chatbots are used by millions of people around the world every day, powered by NVIDIA GPU-based cloud servers. Now, these groundbreaking tools are coming to Windows PCs powered by NVIDIA RTX for local, fast, custom generative AI .

Chat with RTX , now free to download , is a tech demo that lets users personalize a chatbot with their own content, accelerated by a local NVIDIA GeForce RTX 30 Series GPU or higher with at least 8GB of video random access memory, or VRAM.

Ask Me Anything

Chat with RTX uses retrieval-augmented generation (RAG), NVIDIA TensorRT-LLM software and NVIDIA RTX acceleration to bring generative AI capabilities to local, GeForce-powered Windows PCs. Users can quickly, easily connect local files on a PC as a dataset to an open-source large language model like Mistral or Llama 2, enabling queries for quick, contextually relevant answers.

Rather than searching through notes or saved content, users can simply type queries. For example, one could ask, “What was the restaurant my partner recommended while in Las Vegas?” and Chat with RTX will scan local files the user points it to and provide the answer with context.

The tool supports various file formats, including .txt, .pdf, .doc/.docx and .xml. Point the application at the folder containing these files, and the tool will load them into its library in just seconds.

Users can also include information from YouTube videos and playlists. Adding a video URL to Chat with RTX allows users to integrate this knowledge into their chatbot for contextual queries. For example, ask for travel recommendations based on content from favorite influencer videos, or get quick tutorials and how-tos based on top educational resources.

assignment 3 chat box

Since Chat with RTX runs locally on Windows RTX PCs and workstations, the provided results are fast — and the user’s data stays on the device. Rather than relying on cloud-based LLM services, Chat with RTX lets users process sensitive data on a local PC without the need to share it with a third party or have an internet connection.

In addition to a GeForce RTX 30 Series GPU or higher with a minimum 8GB of VRAM, Chat with RTX requires Windows 10 or 11, and the latest NVIDIA GPU drivers.

Editor’s note: We have identified an issue in Chat with RTX that causes installation to fail when the user selects a different installation directory. This will be fixed in a future release. For the time being, users should use the default installation directory (“C:\Users\<username>\AppData\Local\NVIDIA\ChatWithRTX”).

Develop LLM-Based Applications With RTX

Chat with RTX shows the potential of accelerating LLMs with RTX GPUs. The app is built from the TensorRT-LLM RAG developer reference project, available on GitHub . Developers can use the reference project to develop and deploy their own RAG-based applications for RTX, accelerated by TensorRT-LLM. Learn more about building LLM-based applications .

Enter a generative AI-powered Windows app or plug-in to the NVIDIA Generative AI on NVIDIA RTX developer contest, running through Friday, Feb. 23, for a chance to win prizes such as a GeForce RTX 4090 GPU, a full, in-person conference pass to NVIDIA GTC and more.

Learn more about Chat with RTX .

NVIDIA websites use cookies to deliver and improve the website experience. See our cookie policy for further details on how we use cookies and how to change your cookie settings.

IMAGES

  1. Assignment 3: Chatbot

    assignment 3 chat box

  2. How to send assignments through chat box(Part 2)

    assignment 3 chat box

  3. Chat Box Assignment1.docx

    assignment 3 chat box

  4. Python Fundamentals Unit 3 Assignment 3: Chatbox : r/EdhesiveHelp

    assignment 3 chat box

  5. 15+ Interesting Chat-box Examples Using CSS And JavaScript

    assignment 3 chat box

  6. 17+ Chat Box CSS Examples with Source Code

    assignment 3 chat box

VIDEO

  1. The GC’s words in the chat box, (G.O.):

  2. Write रावन in 3 box

  3. 1 Minute Chat = 3$

  4. chatGpt use kese kre|how to use chat gpt

  5. I Let My Chat Apply For MOD And It Went HORRIBLE

  6. The whole chat understood the assignment😂

COMMENTS

  1. ChatGPT

    Invent new logos, comic strips, and photorealistic scenes right in the chat. You can bring your ideas to life with our most capable image model, DALL·E 3. Learn more. Chat with voice You can now use voice to engage in a back-and-forth conversation with ChatGPT. Speak with it on the go, request a bedtime story for your family, or settle a ...

  2. Assignment 3: Chatbot (first example ) : r/projectstemanswer

    Assignment 3: Chatbot (first example ) unit 3. You can mess around with the text and variable names tbh, this is just a basic example.

  3. Assignment 3

    Presentation video for assignment 3, EECS 4314 FW2020-21

  4. Assignment 3: Chatbots

    This assignment covers Functions & Algorithms, and builds up to the application of Chatbots. This assignment is out of 8 points, worth 8% of your grade. Make sure your completed assignment passes all the asserts. This assignment also has hidden tests - which means that passing all the asserts you see does not guarantee that you have the correct ...

  5. Assignment 3: Chatbot

    Assignment 3: Chatbot |

  6. GitHub

    Assignment 3: Chatbot. Readme. Activity. 0 stars. 1 watching. 0 forks. Report repository. GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

  7. Solved Assignment 3: Chatbot (PYTHON CODE) A chatbot is a

    Computer Science Computer Science questions and answers Assignment 3: Chatbot (PYTHON CODE) A chatbot is a computer program designed to emulate human conversation. For this program you will use if statements, user input, and random numbers to create a basic chatbot. Here is the scenario: You have decided to start an online website.

  8. Assignment 3: Chatbot

    This video was made for free! Create your own. Assignment 3: Chatbot |

  9. Using ChatGPT for Assignments

    Using ChatGPT for Assignments | Tips & Examples. Published on February 13, 2023 by Jack Caulfield and Tobias Solis. Revised on November 16, 2023. People are still figuring out the best use cases for ChatGPT, the popular chatbot based on a powerful AI language model.This article provides some ideas for how to use ChatGPT and other AI tools to assist with your academic writing.

  10. How ChatGPT (and other AI chatbots) can help you write an essay

    1. Use ChatGPT to generate essay ideas Before you can even get started writing an essay, you need to flesh out the idea. When professors assign essays, they generally give students a prompt that...

  11. PDF Assignment 3 Chat Room Requirements

    Assignment 3 Chat Room Requirements COMP4021 Internet Computing Assignment 3 Chat Room Requirements Course Learning Outcomes By the end of this course, you will have the following skill set. 1. General Appreciation 1.1. Have a general appreciation of the use of the Internet in society 3. Server Based Skills 3.1.

  12. LibGuides: AI in the Classroom: Chatbot Assignment Examples

    Assignment Considerations Before assigning work that involves the use of AI tools, please read the information about privacy and other concerns with chatbots. Caines (2022) suggests to consider: Not asking students to create ChatGPT accounts and instead doing instructor demos;

  13. henrybmcf/OOP-Assignment-3-Chat-Bot

    The first thing the bot will ask is what your name is. Here you must put in your full name, this is used to create your profile file (In this, the bot will remember any favourites that you tell it about) After this, you are free to talk to the bot. To exit the program, please use one of the following phrases: "bye", "goodbye", "see you later ...

  14. Python Fundamentals Unit 3 Assignment 3: Chatbox : r/EdhesiveHelp

    View community ranking In the Top 10% of largest communities on Reddit Python Fundamentals Unit 3 Assignment 3: Chatbox . comments sorted by Best Top New Controversial Q&A Add a Comment

  15. PDF 17-708: Software Product Lines Assignment 4: Chat Framework

    Assignment 4: Chat Framework Task 1 Reimplement the Chat system from Assignment 3 as a (black-box) framework in which each feature is implemented as a plugin that can be compiled separately. You may either refactor your existing implementation or redesign it from scratch.

  16. Assignment 3 chatbot edhesive

    Assignment 3 chatbot edhesive Advertisement Lyjy is waiting for your help. Add your answer and earn points. Add answer +5 pts Answer 19 people found it helpful jaceypickett Answer: name1=input ("What is your first name? ") name2=input ("What is your last name? ") print ("Hi there, "+ name1+" "+name2 +" ,nice to meet you!")

  17. Spring 2021 CSE30264 Programming Assignment 3

    Background In this programming assignment, you will implement the client and server sides of an "online chat room" application. You can choose to use either TCP or UDP in your implementation. In this application, the client determines the operation to be performed: broadcast messaging and private messaging.Even though only one port is being used, the server should be able to accept multiple ...

  18. Blackbox: AI Code Generation, Code Chat, Code Search

    BLACKBOX AI is the Best AI Model for Code. More than 6 million developers use Blackbox Code Chat to answer coding questions and assist them while writing code faster. Whether you are fixing a bug, building a new feature or refactoring your code, ask BLACKBOX to help. BLACKBOX has real-time knowledge of the world, making it able to answer questions about recent events, technological ...

  19. Assignment 3

    Assignment 3 Text-based Discussion Formats. Choose among the following two options, ... Format that May Be Appropriate. Which of the three text-based discussion formats (chat, threaded discussion, email via listserv) would you consider introducing into your teaching in the near future? Explain briefly (in a paragraph or so), making sure to ...

  20. Assignment 3: Chatbot Pls answer

    Steps- 1. Open Notepad. To open notepad use the shortcut key to open run that is WINDOWS+R and type "Notepad" then press the "ok" button. 2. Then type the script- You can type anything inside (" "). fname= inputbox ("Hello There!") fname= inputbox ("What is your name") fname= inputbox ("I am Chatbot") fname= inputbox ("How is life")

  21. Chat with RTX Now Free to Download

    Chatbots are used by millions of people around the world every day, powered by NVIDIA GPU-based cloud servers. Now, these groundbreaking tools are coming to Windows PCs powered by NVIDIA RTX for local, fast, custom generative AI.. Chat with RTX, now free to download, is a tech demo that lets users personalize a chatbot with their own content, accelerated by a local NVIDIA GeForce RTX 30 Series ...