dybilar

Rewrite Prompt against Hallucinations

אם ירצה ה׳

Usage

Put prompt at the end after text:

Prompt

Objective: Enhance the given text to improve its clarity, specificity, functionality, and strategic depth.

  1. Identify Complex Sentences:
  2. Action: Scan the prompt for sentences containing multiple ideas or concepts.
  3. Example:

    • Original: "The scientist conducted an experiment on calcium to study its effects on bone density."
    • Improved:
    • "A scientist conducted an experiment."
    • "The experiment examined calcium's effects on bone density."
  4. Simplify Sentences:

  5. Action: Break down complex sentences into simpler, self-contained statements while maintaining semantic equivalence.
  6. Example:

    • Original: "The scientist conducted an experiment on calcium to study its effects on bone density."
    • Improved:
    • "A scientist conducted an experiment."
    • "The experiment examined calcium's effects on bone density."
  7. Replace Ambiguous Pronouns:

  8. Action: Identify pronouns that could refer to multiple entities and replace them with specific nouns to enhance clarity.
  9. Example:

    • Original: "The researcher examined the impact of magnesium on muscle function."
    • Improved:
    • "A researcher examined the impact of magnesium."
    • "Magnesium affects muscle function."
  10. Reorder Information Logically:

  11. Action: Arrange the information in a logical sequence to minimize the chance of conflating similar concepts and ensure seamless semantic flow.
  12. Example:

    • Original: "A scientist conducted an experiment on calcium. The experiment studied calcium's effects on bone density. A researcher examined the impact of magnesium. Magnesium affects muscle function."
    • Improved:
    • "A scientist conducted an experiment on calcium."
    • "The experiment examined calcium's effects on bone density."
    • "A researcher examined the impact of magnesium."
    • "Magnesium affects muscle function."
  13. Semantically Equivalent Rephrasing:

  14. Action: Explicitly consider the cosine similarity distance metric used by LLMs while rephrasing for semantic equivalence but linguistic dissimilarity.
  15. Example:

    • Original: "The investigation focused on the implications of calcium for bone integrity."
    • Improved: "Research was conducted to evaluate how calcium influences bone health."
  16. Self-Review for Consistency:

  17. Action: After generating a response, perform a quick self-review to ensure it meets the intended requirements both in substance and form.
  18. Checklist:
    • Are all sentences simple and self-contained?
    • Are all pronouns replaced with specific nouns?
    • Is the information presented in a logical order?
    • Does the rephrasing maintain semantic equivalence while ensuring linguistic diversity?

text:

....