I'm trying to use an LLM to generate text that can't be detected as written by an AI but…
- User
I'm trying to use an LLM to generate text that can't be detected as written by an AI but the LLM always gives itself away by overusing some phrases and under using some common human phrases. How can I fix this?
Assistant
To help an LLM (language learning model) generate text that is less detectable as being written by an AI and more closely resembles human-written text, you can follow these steps:
-
Fine-tuning: If possible, fine-tune the LLM on a dataset that includes a diverse range of human-written text styles. This will help the model to better understand and mimic human writing patterns.
-
Diversify training data: Ensure that the training data includes various writing styles, registers, and topics. This will help the model to generalize better and produce more diverse output.
-
N-gram blocking: Implement n-gram blocking to prevent the model from overusing specific phrases. This technique involves identifying and blocking sequences of n words (n-grams) that frequently appear in the model's output but are rarely used by humans.
-
Negative sampling: During training, include a negative sampling strategy that encourages the model to avoid generating overused phrases and underused human phrases. This involves providing the model with examples of both good and bad phrases and training it to differentiate between the two.
-
Constrained decoding: Implement a decoding strategy that constrains the model's output based on predefined rules or patterns. For example, you can set up rules that enforce the use of more varied sentence structures, vocabulary, and punctuation.
-
Post-processing: After generating text, apply post-processing techniques to make the output more human-like. This can include adjusting sentence length, adding or removing punctuation, and introducing grammatical errors at a level similar to human writers.
-
Re-ranking: Implement a re-ranking mechanism to select the most human-like output from a set of candidate sentences. This can be based on various features, such as fluency, diversity, and coherence.
-
Iterative refinement: Implement an iterative refinement process where the model generates text in stages, with each stage building upon the previous one. This allows the model to revise and improve its output, making it more human-like over time.
Remember that completely eliminating the AI "fingerprint" from the generated text is a challenging task, but these steps can help reduce detectability and make the output more similar to human-written text.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.