Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Cheat sheet · Build products

Prompt Engineering cheat sheet

Opens with credits

A quick-revision book on writing prompts that work the same way twice: how a good prompt is built, when examples and step-by-step reasoning help, how to get clean JSON back, and how to test prompts like code. It works with any chat model or LLM API.

Curated by Tauseef Fayyaz8 chapters55 concepts62 glossary terms

Chapters

8 chapters · 55 concepts

  1. 1Anatomy of a promptThe parts every reliable prompt has: a role, a clear task, the context the model cannot guess, explicit rules and the shape of the answer.8 concepts
  2. 2Zero-shot and few-shot promptingWhen to rely on instructions alone and when to show the model worked examples of the input and output you want.6 concepts
  3. Chain of thought and reasoningGetting the model to work through a problem before it answers, and splitting big jobs into smaller prompts.7 conceptsOpens with credits
  4. Structured outputGetting JSON, lists and fixed labels your code can parse, and what to do when the output does not parse.7 conceptsOpens with credits
  5. Long inputs and contextWorking with documents, long chats and big codebases: where to put things, how to ground answers and how to keep costs down.7 conceptsOpens with credits
  6. Prompts for codeGetting useful code, reviews and bug fixes out of a model: what context to give and what to ask for.7 conceptsOpens with credits
  7. Prompts for learningUsing a model as a tutor that makes you think, rather than a machine that does your homework.6 conceptsOpens with credits
  8. Testing and securing promptsTreating prompts like code: test sets, versioning, sampling settings and defending against prompt injection.7 conceptsOpens with credits
  9. 9Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.62 terms

About this sheet

Prompt anatomy, few-shot examples, chain of thought, structured output, long context, prompts for code and study, and testing prompts.

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com