How You Prompt Matters! Even Task-Oriented Constraints in Instructions Affect LLM-Generated Text Detection

Ryuto Koike, Masahiro Kaneko, Naoaki Okazaki
11/14/2023
14 citations
cs.CL

Official code: ryuryukke/HowYouPromptMatters (6 stars, Apache-2.0, last commit 2025-08-15).

Abstract

To combat the misuse of Large Language Models (LLMs), many recent studies have presented LLM-generated-text detectors with promising performance. When users instruct LLMs to generate texts, the instruction can include different constraints depending on the user's need.

Show full abstract

However, most recent studies do not cover such diverse instruction patterns when creating datasets for LLM detection. In this paper, we reveal that even task-oriented constraints -- constraints that would naturally be included in an instruction and are not related to detection-evasion -- cause existing powerful detectors to have a large variance in detection performance. We focus on student essay writing as a realistic domain and manually create task-oriented constraints based on several factors for essay quality. Our experiments show that the standard deviation (SD) of current detector performance on texts generated by an instruction with such a constraint is significantly larger (up to an SD of 14.4 F1-score) than that by generating texts multiple times or paraphrasing the instruction. We also observe an overall trend where the constraints can make LLM detection more challenging than without them. Finally, our analysis indicates that the high instruction-following ability of LLMs fosters the large impact of such constraints on detection performance.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[EMNLP 2024] The official repository for our paper, "How You Prompt Matters! Even Task-Oriented Constraints in Instructions Affect LLM-Generated Text Detection"

60Mar 3, 20241 years agoApache-2.0
ai-generated-contentai-generated-textai-generated-text-detectiondeepfakesdetection+6 more

Similar Papers

Cite this paper

@article{koike2023prompt,
  title  = {How You Prompt Matters! Even Task-Oriented Constraints in Instructions Affect LLM-Generated Text Detection},
  author = {Ryuto Koike and Masahiro Kaneko and Naoaki Okazaki},
  year   = {2023},
  eprint = {2311.08369},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.08369v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.08369.svg)](https://codeofpaper.com/paper/2311.08369)

Discussion