This prompt engineering framework for ChatGPT acts as a guide for providing a structured set of instructions to the AI model in order to receive fuller, more accurate, and more desirable results.
I call this SPICIER because it is the best anagram I could think of, but it doesn't perfectly match the order of categories.
ℹ️ This, especially Input, can and should be written for a computer, not a human.
ROLE:
Act as a software engineer expert in the following:
- TypeScript
- Node.js
- Koa
- Prisma
- Zod
INSTRUCTIONS:
- I will give you my code for a specific Koa middleware and the related Prisma schema
- You will change the code to do the following:
- Check if
something123
exists.- If it does, send a patch to X API and ignore both Prisma and the Airtable response
- If it does not, send a post to Y API and create the record in Prisma
CONTEXT:
- The
submit
Koa middleware to handles form submissions- The following are arbitrary unique identifier variables:
something123
something456
CODE:
INSERT CODE
EXCLUSIONS:
- Assume my web application code is working and is setup correctly