Using ChatGPT on a daily work as a P.O, Developer or for Q/A or Support and checking plagiarism if needed with Python
The use of ChatGPT is in many articles and the internet is buzzing with the “extraordinary” performance of this large language model trained by OpenAI.
Indeed, I was eager to test by myself, this “astonishing” supposed ability generating human-like text based on the input it receives and can be used to answer questions and engage in conversations with people.
and… with no surprise, the answer is YES, it is AMAZING! This permanently will turn upside down, and it already turns upside down, all the established digital functions: P.O, developers, support, or training for instance.
There are two behaviors facing this major shift: you can put your head in the sand like an ostrich or “jumping on the bandwagon”. For those of you who prefer more conceptual explanations to catch the meaning of this dilemma: you can pin yourself between fixed mindset versus growth mindset.
Two remarks:
First, asking Chat GPT about moral issues is pointless and sometimes ludicrous! Knowing if technology is full of prejudices, the answer is yes… People are said to be the product of their readings, why should it be any different for AI? ChatGPT has been trained on a “corpus” i.e. the incredible amount of information on which the algorithm has been trained. Therefore, the AI is only the undoubtedly unconscious and conscious reflection of their authors and the texts chosen by themselves.
A quick search with “What is the corpus that has trained Chatgpt” give some clues!
Chat GPT was trained on a large corpus of text from the internet, which may contain inaccuracies, biases, and cultural misunderstandings. It’s important for educators to be aware of these limitations and to review and verify the information generated by Chat GPT.
Source: https://bonnersferryherald.com/news/2023/feb/16/revolutionizing-education-rise-openais-chat-gpt-mo/
One last thing, which sounds obvious, it is possible to make Chat GPT “write”: a philosophy or history homework, a cover letter for a job, a love letter for someone, a summary of a book that you haven’t read, a note on a subject you don’t know, a correspondence on Tinder, some posts for LinkedIn… Of course, you are entitled to use AI but then in the end you are only fooling yourself! You even risk passing for a dull person that say nothing more than empty platitudes without point of view :). In French, the accurate expression for that is called “ouvrir le robinet d’eau tiède”
Second, still about the “corpus”, as we do not know exactly the corpus of texts on which ChatGPT was trained to perfect its learning, it is certainly obvious that all the documentation relating to the development languages has been included (SQL, PHP, Python, JavaScript and so on…. etc.) but that they do not necessarily integrate the latest developments of this, we can see this, but it is anecdotal regarding the service provided by Chat GPT.
So, there is much better to do with Chat GPT in any case concerning me. Voilà. Below the results of some experiments: using ChatGPT to comment, understand, transform, or even generate code
Again, the ChatGPT’s ability is properly amazing! You can rely on ChatGPT to do a substantial part of the job. Of course, some humans will tell you not to do so probably because their job survival is indeed at stake. Afterall, this is human! But, on understanding logic, ChatGPT is properly outstanding, that makes it a formidable ally. It is an excellent training assistant that beats a lot of online training. It can help when you struggle to understand a codebase that wasn’t created by you. Navigating through a complex and poorly-organized code — also known as spaghetti code — can be a frustrating and time-consuming task.
And so, for the rest of some other tedious tasks for P.O, developers, support, or training for instance.
You can find all files on my GitHub account. See https://github.com/bflaven/ia_usages/tree/master/ai_chatgpt_usages
How to detect plagiarism?
The idea naturally came because of using GPT chat https://chat.openai.com/ is how do we ensure that is has been made by a real person or by an IA?
Consequently, the massive use of GPT Chat or any other form of AI device necessarily brings its corollary of control which comes down to the following question: Is it a human who wrote all or part of the text or code that I have under the eyes?
For sure, I suppose that many algorithms are already in use in many sectors: reading and summarizing legal documents, profiling individuals in marketing and tracking, reading and checking course materials and students materials in a training, reading and automatic summary for scenarios in TV production, verification of copy-writing in PR or writing press release in the communication sector, automatic reading of CVs and cover letters in the HRD sector… if it is not the case, it will become soon!
The IA’s examples list for usages is endless and indeed, this “monitoring” task will become a recurring task for a P.O, a product manager or in all sorts of job. So, for my personal use, I have a made a quick and dirty plagiarism checker with Python, Streamlit and Scikit-learn.
You can find all files on my GitHub account. See https://github.com/bflaven/ia_usages/tree/master/ai_chatgpt_usages/plagiarism_checker_python
Examples generated with ChatGPT
Here are a bunch of examples for a daily tasks if you worked in digital.
1. PO: generate Jira tickets for user stories, tasks, and bugs
In agile product development, Jira ticket is the grail, but it may be boring to write on and on tickets. For most POs, it is a recurring task in product management to write user stories, tasks and bugs in project management system such as Jira, Trello… etc. Instead of using template, you can think about using ChatGPT
# Some PO Jira ticket example... Write a Jira ticket to improve the image loading in a media library Write a Jira ticket to add a field name "location" in an edit form for content type article.
2. Q/A: Some testing examples
Instead of outsourcing, some testing scenario can be written for Cypress or for Playwright or used for migration from one E2E framework to another E2E framework with the help of Gherkin that preserve logic.
Write a test in Gherkin syntax to test a website main navigation Generate a login test with Cypress testing Framework Generate a login test with Playwright testing Framework
3. DEV: Some Coding examples
– 1 – Coding: Query example for GPT to generate code for MySQL
# source_MySQL_GPT_query.sql # source MySQL for GPT query In write the MySQL code in order to create a table named users with the followning fields : FirstName, LastName, email, address, country The user id must be a key and incremental.
– 2 – Coding: Query example for GPT to generate code in Python
# source_Python_GPT_query.py # source Python for GPT query In Python, write the code for a function that pick randomly one element from of the following categories: Nature, Tech, Science, Life, Entertainment, Development, Videos, Cinema, Serial, Literature, Foreign politics, Philosophy
– 3 – Coding: Query example for GPT to generate code in PHP for a plugin WordPress named “MySocialBuddy”
# to create a simple plugin for WP Write in PHP, a WordPress plugin with comments, named MySocialBuddy. This Plugin MySocialBuddy will add a new entry in the main administration menu in "Settings". The name of the entrance will be “MySocialBuddy”. The purpose of this plugin is to manipulate 5 custom fields for social network accounts: mysocialbuddy_twitter, mysocialbuddy_linkedin, mysocialbuddy_facebook, mysocialbuddy_instagram, mysocialbuddy_vkontakt, mysocialbuddy_weibo. You can you write also tips for each field and general explanation at the beginning of the plugin page settings to explain how does the plugin work.
– 4 – Coding: Other attempts…
# the more you are detailed in you description, the best the code is.... Can you write a log parser in Python to detect specific part of data contained in .log file, extract this sample of data, retrieve it and load it with the Panda library inside a dataframe then export this sample as .csv file then write a small application with the Streamlit framework to manipulate this new .csv file? # Give contextual explanation for a spaghetti code for instance with any kind of language: PHP, Python, JavaScript.... What does the following code do? [insert code here] # adding comments to an existing code Add comments to the following code [insert code here] # convert code written from E2E testing CodeceptJS framework to E2E testing Cypress Convert the following code from CodeceptJS to Cypress logic: [insert code here] # using a transition format in Gherkin to preserve the test logic Convert the following code from CodeceptJS to Gherkin syntax: [insert code here] Convert the following code from Gherkin syntax to Cypress code, please generate real code for cut and paste : [insert code here] # using Pep8 standard to rewrite code in python Can you rewrite the following code using Pep8 standard [Insert code here]
4. DEV: Errors explained
Some errors searchings quicker to look in stackoverflow.com. The error can be explained by ChatGPT, it is complementary source of information with stackoverflow.com for instance
# sample for errors... Explain the python error "TypeError: Protocols cannot be instantiated" Explain the python error"TypeError: Protocols cannot be instantiated for Streamlit what is the solution?" # How-to update and check the version How to update python in anaconda (conda)?
5. SUPPORT: mails for Support
You can find the queries and the results from this attempts with GPT on my github account.
– 1 – Support: Query example for GPT to generate support mail for 2FA authentication
# write a support mail for someone who has lost a 2FA authentication and explain to renew this access with the help of security questions. Subject: Assistance with Lost 2FA Authentication Dear [Name], I am writing this email in response to your request for help regarding your lost 2FA authentication. I understand how important it is to have access to your account, and I would be happy to assist you in renewing your access. To begin, we can use our security questions to verify your identity and help you reset your 2FA authentication. Please provide answers to the following questions: What is your mother's maiden name? In what city were you born? What is the name of your first pet? Once we have received your answers, we will verify your identity and reset your 2FA authentication. After that, you will be able to access your account as normal. If you have any additional questions or concerns, please do not hesitate to reach out to us. We are here to help and ensure that your account remains secure. Thank you for choosing our services. Best regards, [Your Name] Support Team
– 2 – Support: Query example for GPT to generate support mail for user to explain how-to to login/logout and start private session
# write a support mail to a user that need to login/logout and start private session with his/her chrome browser and login again. Subject: Assistance with Chrome Browser Login/Logout and Private Session Dear [User], Thank you for reaching out to us for assistance with your Chrome browser. I understand that you are having trouble logging in and out and starting a private session. I am here to help. To log out of your Chrome browser, follow these steps: Click on the three dots in the upper-right corner of the Chrome window Select "Sign out" from the dropdown menu You will be logged out of your Google account and any other accounts you have signed into in Chrome. To start a private session in Chrome, follow these steps: Click on the three dots in the upper-right corner of the Chrome window Select "New incognito window" from the dropdown menu A new incognito window will open, and you can browse the web privately. To log back in, follow these steps: Click on the three dots in the upper-right corner of the Chrome window Select "Sign in" from the dropdown menu Enter your email address and password to sign in to your Google account. If you have any further issues, please do not hesitate to reach out to us. We are here to help. Best regards, [Your Name] Support Team
– 3 – Support: Query example for GPT to generate support mail for JavaScript error on website, be f… polite
# write a support mail to a user to explain that this JavaScript used in the website that is not properly loaded but that a fix will be deployed soon and be polite Dear [User], Thank you for reaching out to us about the issue you are experiencing with the JavaScript on our website. I apologize for any inconvenience this may have caused. I can understand your concern and I want to assure you that our team is aware of the issue and working to resolve it as quickly as possible. The problem is caused by a recent update to the website that has caused some of the JavaScript to not load properly. We are currently working on a fix that will be deployed as soon as possible. We anticipate that the issue will be resolved within the next 24 hours. In the meantime, if you need assistance with any other aspects of our website, please do not hesitate to reach out to us. Once again, I apologize for any inconvenience this may have caused and thank you for your patience and understanding as we work to resolve the issue. Best regards, [Your Name] Support Team
Videos to tackle this post
#1 Using ChatGPT for P.O: Generate Jira tickets for user stories & some Q/A testing scripts
Cypress
#2 Using ChatGPT for coding: Generate Python code with comments using Beautiful Soup & SQL command for SQLite
#3 Using ChatGPT: Generate simple PHP for WordPress Plugin code to extend Dashboard WP features
#4 After using ChatGPT a Quick POC to check Plagiarism with Python
More infos
- Jira templates for user stories, tasks and bugs
https://blog.codecentric.de/jira-template-user-story-tasks-bugs - ChatGPT im Alltag eines Python-Entwicklers
https://blog.codecentric.de/chatgpt-python-entwickler - Des avocats laxistes, manipulés mais pas coupables, plaide la défense au procès des deux pénalistes et du narcotrafiquant. “mélanger les vérités”, “to merge in with truths”
https://www.lemonde.fr/societe/article/2023/02/08/des-avocats-manipules-mais-pas-coupables-plaide-la-defense-au-proces-des-deux-penalistes-et-du-narcotrafiquant_6160953_3224.html - 5 ChatGPT features to boost your daily work
https://medium.com/geekculture/5-chatgpt-features-to-boost-your-daily-work-404478fd70ca - On a testé : rédiger des lettres de motivation avec ChatGPT3. L’avis des recruteurs
https://www.welcometothejungle.com/fr/articles/lettre-motivation-redigee-par-ia - Google unveils its experimental conversational AI service Bard
https://dataconomy.com/2023/02/how-to-use-google-bard-ai-chatbot-examples/ - An important next step on our AI journey
https://blog.google/technology/ai/bard-google-ai-search-updates/ - Bing confirms ChatGPT-style search with OpenAI announcement.
https://mashable.com/article/microsoft-bing-openai-search-integration - Microsoft’s framework for building AI systems responsibly
https://blogs.microsoft.com/on-the-issues/2022/06/21/microsofts-framework-for-building-ai-systems-responsibly/ - KnowledgeGPT
https://github.com/mmz-001/knowledge_gpt - GPT3 AI Content Writer & Generator For WordPress
https://gptaipower.com/ - Simple Plagiarism Detection in Python
https://towardsdatascience.com/simple-plagiarism-detection-in-python-2314ac3aee88 - Build a Plagiarism Checker Using Machine Learning
https://towardsdatascience.com/build-a-plagiarism-checker-using-machine-learning-6538110ce162 - How to detect plagiarism in text using Python
https://dev.to/kalebu/how-to-detect-plagiarism-in-text-using-python-dpk - pycode-similar 1.4
https://pypi.org/project/pycode-similar/ - Spacy – Contextual Spell Check
https://spacy.io/universe/project/contextualspellcheck - plagiarism-checker on github
https://github.com/topics/plagiarism-checker?l=python - ChatGPT and GPT-3
https://en.wikipedia.org/wiki/ChatGPT - GPT-3
https://en.wikipedia.org/wiki/GPT-3 - Les meilleures librairies NLP en Python (2020)
https://labsonmars.com/python-nlp/ - How to use OPENAI GPT-3 in Python – Beginners guide
https://pythonwarriors.com/how-to-use-openai-gpt-3-in-python-beginners-guide/ - Google perd 7 % à la Bourse de New York après une erreur de Bard, son nouveau robot conversationnel
https://www.lemonde.fr/pixels/article/2023/02/09/google-perd-7-a-la-bourse-de-new-york-a-la-suite-d-une-erreur-de-son-tout-nouveau-robot-conversationnel_6161118_4408996.html - Having a personal Python Teacher using ChatGPT
https://medium.com/geekculture/having-a-personal-python-teacher-using-chatgpt-49204261c531