{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/the-impact-of-prompts-on-zero-shot-detection","title":"The Impact of Prompts on Zero-Shot Detection of AI-Generated Text","arxiv_id":"2403.20127","date":"2024-03-29","proceeding":null,"authors":["Kaito Taguchi","Yujie Gu","Kouichi Sakurai"],"abstract":"In recent years, there have been significant advancements in the development of Large Language Models (LLMs). While their practical applications are now widespread, their potential for misuse, such as generating fake news and committing plagiarism, has posed significant concerns. To address this issue, detectors have been developed to evaluate whether a given text is human-generated or AI-generated. Among others, zero-shot detectors stand out as effective approaches that do not require additional training data and are often likelihood-based. In chat-based applications, users commonly input prompts and utilize the AI-generated texts. However, zero-shot detectors typically analyze these texts in isolation, neglecting the impact of the original prompts. It is conceivable that this approach may lead to a discrepancy in likelihood assessments between the text generation phase and the detection phase. So far, there remains an unverified gap concerning how the presence or absence of prompts impacts detection accuracy for zero-shot detectors. In this paper, we introduce an evaluative framework to empirically analyze the impact of prompts on the detection accuracy of AI-generated text. We assess various zero-shot detectors using both white-box detection, which leverages the prompt, and black-box detection, which operates without prompt information. Our experiments reveal the significant influence of prompts on detection accuracy. Remarkably, compared with black-box detection without prompts, the white-box methods using prompts demonstrate an increase in AUC of at least $0.1$ across all zero-shot detectors tested. Code is available: \\url{https://github.com/kaito25atugich/Detector}.","url_abs":"https://arxiv.org/abs/2403.20127v1","url_pdf":"https://arxiv.org/pdf/2403.20127v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"the-impact-of-prompts-on-zero-shot-detection","repo_url":"https://github.com/kaito25atugich/detector","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.20127","atlas_url":"https://app.syntology.ai/?focus=2403.20127","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.20127"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kaito25atugich/detector","reach":{"status":"ok"}}],"summary":{"ran":7,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":9,"samples":[{"code_sha256_prefix":"d3ccb79d5f676d7a","entry":"find_max_index","repo":"kaito25atugich/detector","repo_kind":"official","path":"utils.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d3ccb79d5f676d7a"}},{"code_sha256_prefix":"1952adc5b5b7b860","entry":"get_precision_recall_metrics","repo":"kaito25atugich/detector","repo_kind":"official","path":"utils.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1952adc5b5b7b860"}},{"code_sha256_prefix":"9a9e58cbb8b7370b","entry":"get_prompt","repo":"kaito25atugich/detector","repo_kind":"official","path":"tmp/generate_estimation_prompts.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/tmp/generate_estimation_prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9a9e58cbb8b7370b"}},{"code_sha256_prefix":"4480f9be0b362363","entry":"get_roc_metrics","repo":"kaito25atugich/detector","repo_kind":"official","path":"utils.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4480f9be0b362363"}},{"code_sha256_prefix":"318a521cfba1fbf1","entry":"perplexity","repo":"kaito25atugich/detector","repo_kind":"official","path":"detector.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"318a521cfba1fbf1"}},{"code_sha256_prefix":"1ebc2d66bc8ec407","entry":"preprocess_string","repo":"kaito25atugich/detector","repo_kind":"official","path":"detector.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1ebc2d66bc8ec407"}},{"code_sha256_prefix":"f6d96afa1d60eb61","entry":"remove_special_tokens","repo":"kaito25atugich/detector","repo_kind":"official","path":"tmp/paraphraser.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/tmp/paraphraser.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f6d96afa1d60eb61"}},{"code_sha256_prefix":"ebcdce09885239f8","entry":"get_paraphraser","repo":"kaito25atugich/detector","repo_kind":"official","path":"tmp/paraphraser.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/tmp/paraphraser.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ebcdce09885239f8"}},{"code_sha256_prefix":"595d1d025c7e692d","entry":"prim_tree","repo":"kaito25atugich/detector","repo_kind":"official","path":"detector.py","file_url":"https://github.com/kaito25atugich/detector/blob/HEAD/detector.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"595d1d025c7e692d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}