--- tags: [documentation, ia] author: [yann houry] date: 20-12-2022 --- [Thread Twitter](https://twitter.com/yannhoury/status/1605092495624282112?s=20&t=-bpBbIerPJvcarOL-mZ-Jw) (modifié et complété par la suite ici même) > [!info]+ > - [[#Quelques outils|Quelques outils]] > - [[#Quelques outils#GPT-2 Output Detector & Giant Language model Test Room|GPT-2 Output Detector & Giant Language model Test Room]] > - [[#Quelques outils#GPTzero|GPTzero]] > - [[#Quelques outils#Detector|Detector]] > - [[#Quelques outils#D'autres exemples|D'autres exemples]] > - [[#Un jeu pour s'entraîner|Un jeu pour s'entraîner]] > - [[#AI Text Classifier]] > - [[#Conclusion|Conclusion]] > - [[#Les conseils de chatGPT|Les conseils de chatGPT]] ## Quelques outils ### GPT-2 Output Detector & Giant Language model Test Room Pour les enseignants qui voudraient identifier une triche potentielle, il y a plusieurs façons de détecter un texte qui aurait été écrit par une IA. Il y a GPT-2 Output Detector de HuggingFace qui fonctionne, dans l'ensemble, plutôt pas mal. https://huggingface.co/openai-detector/ (davantage d'explications [ici](https://www.twaino.com/outils/seo/detecteur-ia-gpt2-hugging-face/) et [cette vidéo](https://youtu.be/QEaBAZQCtwE)). Il y a aussi [celui-ci](http://gltr.io/dist/index.html) (Giant Language model Test Room) qui semble fonctionner correctement. > [...] les mots qui sont statistiquement plus susceptibles de se trouver après le précédent sont surlignés en vert. Ceux en rouge ou jaune sont moins probables, quant à ceux en violet encore moins. Plus le résultat affiche un rendu jaune et vert, plus le texte risque d’avoir été rédigé par une IA (https://siecledigital.fr/2019/07/30/une-ia-capable-de-detecter-un-texte-redige-par-une-ia/)) Bien que tous basés sur GPT-2, ils s'en sortent manifestement honorablement. La bonne nouvelle, c'est que l'IA suit un modèle mathématique pour produire des textes et que ce modèle peut être utilisé pour détecter son emploi. Enfin, c'est ce que je comprends. ### GPTzero Le 05-01-2023, l'article [ChatGPT : plus possible de tricher avec l’IA, cet étudiant a développé la contre-attaque parfaite](https://www-phonandroid-com.cdn.ampproject.org/c/s/www.phonandroid.com/chatgpt-plus-possible-de-tricher-avec-lia-cet-etudiant-a-developpe-la-contre-attaque-parfaite.html/amp) mentionnait [gptzero](http://gptzero.me/), une application capable de détecter les textes générés par une intelligence artificielle. > Pour cela, GTZero analyse également le caractère aléatoire du texte en le comparant à un modèle similaire. L’application se charge ensuite d’évaluer la cohérence globale, dernier maillon de la chaîne qui lui permet, en théorie, de détecter l’IA qui se cache éventuellement derrière le texte. J'ai fait deux essais. L'un en français, l'autre en anglais. Tous deux provenant de textes générés par chatGPT. [gptzero](http://gptzero.me/) a échoué à identifier le premier comme généré par l'IA, mais a repéré le second. Pour en savoir davantage, [lire le fil Twitter du développeur](https://twitter.com/edward_the6/status/1610067688449007618?s=20). Comme on peut le lire [ici](https://siecledigital.fr/2019/07/30/une-ia-capable-de-detecter-un-texte-redige-par-une-ia/) : > L'algorithme se base sur les distributions statistiques des mots du texte afin d'identifier les différences entre la rédaction humaine ou celle d’une IA. En principe un texte généré à l'aide d’une intelligence artificielle comportera une chaîne de mots plus prévisible que lorsqu'elle a été écrite par un humain. Plus de détails dans [A college student created an app that can tell whether AI wrote an essay](https://www.npr.org/2023/01/09/1147549845/gptzero-ai-chatgpt-edward-tian-plagiarism) : > To determine whether an excerpt is written by a bot, GPTZero uses two indicators: "perplexity" and "burstiness." ==Perplexity== measures the complexity of text; if GPTZero is perplexed by the text, then it has a high complexity and it's more likely to be human-written. However, if the text is more familiar to the bot — because it's been trained on such data — then it will have low complexity and therefore is more likely to be AI-generated. > Separately, ==burstiness== compares the variations of sentences. Humans tend to write with greater burstiness, for example, with some longer or complex sentences alongside shorter ones. AI sentences tend to be more uniform. ### Detector Il existe dorénavant [ChatGPT GPT3 Detector | Draft & Goal](https://detector.dng.ai/fr) (start up française [Detector](https://detector.dng.ai/fr)) qui serait capable de détecter les textes générés par une IA, mais qui pour l’instant ne fonctionne qu’en anglais. Selon le fondateur (cf. [podcast de Jerome Colombain](https://overcast.fm/+v-k0A0_zw)) ,les enseignants pourront proposer gratuitement 30 textes (l’équivalent d’une classe). ## AI Text Classifier [Le tout nouveau détecteur de textes générés par IA](https://platform.openai.com/ai-text-classifier) et produit par... openAI ! Malheureusement, l'outil est tout aussi limité que les autres. Comme précisé sur le site : > - Requires ==a minimum of 1,000 characters==, which is approximately 150 - 250 words. > - The classifier ==isn't always accurate==; it can mislabel both AI-generated and human-written text. > - AI-generated text ==can be edited easily to evade the classifier==. > - The classifier is ==likely to get things wrong== on text written by children and on text not in English, because it was primarily trained on English content written by adults. ### D'autres exemples Clive Thompson donne d'autres exemples d'outils : > There are a couple of other tools out there, too — including the [“AI Content Detector” by Writer.ai](https://writer.com/ai-content-detector/) and the [“Giant Language Model Test Room”.](http://gltr.io/dist/index.html) ([Detectors for “AI-Written Prose” Are Here](https://betterprogramming.pub/detectors-for-ai-written-prose-are-here-8d2d994b175d)) However, the author explains that "to fool the Writer.ai AI content detector". He concludes: > Alas, the more I played with these tools, the less I felt they were particularly reliable. Better than random chance, but not much more. Clive Thompson also quotes David Gewirtz who says: > “At this point, I don’t think we’re ready to let AI fight AI,” he concluded. Donc, pour l’instant, le plus évident encore est de reconnaître que 1. L'IA affirme d'énormes conneries sans sourciller. 2. Les mots sont courants. Aucun emploi rare. 3. L'IA invente parfois certains mots 4. Il n'y aucune erreur du type coquille. 5. Aucune erreur de typographie. 6. ~~L'IA ne cite pas ses sources~~ Le dernier point n'est hélas plus vrai. [Perplixity](https://www.perplexity.ai/?uuid=4942d09f-5a7d-4c0f-8ea1-2bb102716550) est en mesure de fournir l'équivalent de notes de bas de page avec les sources, titre de l'article, lien, etc. On lira également [ce témoignage sur Facebook](https://www.facebook.com/title17/posts/pfbid0DSWaYQVwJxcgSGosS88h7kZn6dA7bmw5ziuRQ5br2JMJcAHCi5Up7EJbJKdgwEZwl) : > Although every time you prompt ChatGPT, it will give at least a slightly different answer, ==I’ve noticed some consistencies== in how it structures essays. In future, that will be enough to raise further flags for me. Sur les mots inventés par l'IA, faire des recherches pour retrouver par exemple cet article mentionnant un auteur inventé par l'IA). Voir aussi [cet exemple](https://twitter.com/serialmapper/status/1605229004717522945?s=20&t=-bpBbIerPJvcarOL-mZ-Jw). [Dans cet article](https://blogs.lse.ac.uk/impactofsocialsciences/2022/05/17/new-ai-tools-that-can-write-student-essays-require-educators-to-rethink-teaching-and-assessment/) sont mentionnés deux auteurs (Dunn and Dunn) qui ont bien publié tel article mais pas dans tel journal : > Note its reference for “Dunn and Dunn (1997)”. There is a journal of Research in Education, but no issue 7(2) in 1997. Dunn and Dunn did publish on learning styles, but not in that journal. GPT-3 has fashioned a plausible-looking but fake reference. It has also invented a fictitious research study from Dunn and Dunn to critique learning styles. ## Un jeu pour s'entraîner Fort de tous ces critères, on peut s'entraîner avec le jeu [Real or fake text?](https://roft.io) à essayer de détecter si le texte provient d'un être humain ou d'une IA. ## Conclusion En attendant que tous ces outils se perfectionnent, il faut compter sur l'identification des facteurs suivants et le fait que les êtres humains écrivent parfois terriblement mal : oubli, rupture syntaxique (la fameuse anacoluthe), erreur d'orthographe, coquille, méchantes erreurs typographiques... Donc si c'est *mal* écrit, c'est humain. Sinon, c'est une IA. Une IA sans style mais une IA. En d'autres termes, le texte généré par l'IA, ce ne sera pas du Huysmans. Aucun style. Un vocabulaire plat. Pas d'erreurs orthographiques certes, mais des semi-vérités voire contre-vérités affirmées péremptoirement ou carrément des choses inventées de toutes pièces. Aucun doute. Ça l'IA comme GPT a été conçu pour le SEO et le marketing. 😄 --- ## Les conseils de chatGPT J'ai aussi demandé à ChatGPT. Voici les conseils donnés. Certains sont à prendre avec des pincettes (d'énormes pincettes). #### ==Explain how to detect ai-generated text== There are several ways to detect whether a piece of text has been generated by an artificial intelligence (AI) system or written by a human. Here are a few approaches: 1. Check for unusual language patterns: AI text generation systems often produce text that contains unusual or repetitive language patterns. For example, the text may contain repetitive phrases or sentences, or it may use words in unusual ways. 2. Look for contextually inappropriate words or phrases: AI systems may sometimes produce text that includes words or phrases that are out of place in the context of the text. 3. Check for a lack of human-like errors: AI systems generally do not make the same types of mistakes that humans do when writing, such as spelling errors or grammatical mistakes. 4. Check for a lack of personalization: AI text generation systems often produce text that lacks the personalization and individuality that is typically present in human-written text. 5. Use automated tools: There are several tools available that can help identify AI-generated text. These tools typically use machine learning algorithms to analyze the text and identify patterns that are indicative of AI generation. It's important to note that these approaches are not foolproof and may not always be reliable in identifying AI-generated text. Additionally, some AI text generation systems are designed to be more "human-like" and may be more difficult to identify as being generated by an AI system. #### ==Give me an example of these automated tools you mentionned== There are several automated tools that can be used to detect AI-generated text. Here are a few examples: 1. GPT-3 fine-tuning: GPT-3 (short for "Generative Pre-training Transformer 3") is a large, powerful language model developed by OpenAI. It can be fine-tuned on a specific task, such as text generation, and can produce highly coherent and human-like text. However, it is possible to detect that the text was generated by GPT-3 by looking for certain patterns in the language or by comparing the text to a large dataset of human-written text. 2. AI Dungeon: AI Dungeon is a text adventure game that uses AI to generate stories and dialogues in real-time. The text generated by AI Dungeon is likely to be more clearly identifiable as being generated by an AI system, due to the repetitive nature of the text and the lack of personalization. 3. AI content generators: There are several tools available that use AI to generate content, such as articles, social media posts, or marketing copy. These tools often produce text that is highly repetitive and lacks the personalization and individuality of human-written text, making it easier to identify as being generated by an AI system. It's important to note that these tools are just a few examples, and there are many other tools available that can be used to detect AI-generated text. #### ==Thanks but I want examples of tools allowing you to detect ai-generated text== Here are a few examples of tools that can be used to detect AI-generated text: 1. Deception detection tools: These tools use machine learning algorithms to analyze the text and identify patterns that are indicative of AI generation. They can be trained on large datasets of human-written and AI-generated text and can accurately identify AI-generated text with high accuracy. 2. Plagiarism detection tools: Some plagiarism detection tools are designed to identify text that has been copied from other sources, including AI-generated text. These tools can be used to identify text that has been generated by an AI system by comparing it to a large database of human-written text. 3. Language modeling tools: Language modeling tools are designed to analyze text and identify patterns that are indicative of human language use. These tools can be used to identify AI-generated text by comparing the language patterns in the text to those found in human-written text. #### ==I mean give names and URLs so I can try these tools== Here are a few examples of tools that can be used to detect AI-generated text, along with their websites: 1. Deception detection tools: - DeepCheck ([https://www.deepcheck.ai/](https://www.deepcheck.ai/)) - Artitrail ([https://artitrail.com/](https://artitrail.com/)) 2. Plagiarism detection tools: - Turnitin ([https://www.turnitin.com/](https://www.turnitin.com/)) - PlagScan ([https://www.plagscan.com/](https://www.plagscan.com/)) 3. Language modeling tools: - GPT-3 fine-tuning ([https://openai.com/blog/gpt-3-apps/](https://openai.com/blog/gpt-3-apps/)) - AI Dungeon ([https://aidungeon.io/](https://aidungeon.io/))