Skip to main content

ChatGPT

Prompt Engineering

System prompt:

  • Start with a system prompt to set the desired output language, version, syntax etc

Output format:

  • Specify the output structure you want
  • e.g. “explain step-by-step”
  • e.g. “structure output as an array of objects with the following keys: …”)

Conditions:

  • Specify any conditions that must be met while/before completing task

Prompt text formatting:

  • Use delimiters (e.g. `````, """, ---) to clearly indicate distinct parts of the input
  • Wrap code blocks in ```

Iterating:

  • When generating code, start simple, repair as needed, add next functionality, repair as needed, etc

Sources:

Preparing for an interview

  • Act as a technical interviewer and ask me five questions about X
    • What is the answer to question 1?

Using on macOS via Raycast AI

Inbox