Large Language Model‑Generated Text Detection
Portfolio | | Links: Github | Report
In this project, I tackled the challenge of identifying whether a given text was generated by GPT or written by a human, framing it as a binary classification task. Using a naive author attribution method, I pooled sentence embeddings of GPT-generated text to create a GPT-style representation. During inference, cosine similarity was calculated between the GPT-style representation and the testing sentence to make classification decisions. A detailed analysis revealed that the system could distinguish GPT-generated sentences from human-written ones with over 90% accuracy when no prompt engineering was involved. However, when prompt engineering was introduced, the performance dropped to random guessing. To improve this, I projected the embeddings into lower dimensions and added a human-style representation by pooling a diverse range of human author writings, resulting in an accuracy boost to 74%. The full code and report for this project are available on GitHub.