Section 1: How LLMs Work from a Developer's Point of View
- Tokens, context windows and their effect on input and output length
- Why output varies, and why it must always be checked
- Reasoning models and tasks that need several steps of thought
- Key limits: hallucination, knowledge cutoff and APIs that do not exist
Section 2: Principles of a Good Prompt
- The parts of a prompt: role, context, task, constraints and output format
- Using delimiters to separate instructions from data
- Zero-shot, few-shot and choosing good examples
- Breaking complex work into steps and having the model check its own output
- Lab: improve a learner's existing prompt and compare the results before and after
Section 3: Lab: Prompts for Writing and Improving Code
- Generate code from requirements, stating the language, version and team standards
- Refactoring and explaining legacy code
- Translating code across languages and versions with care
- Lab: have ChatGPT build and refine DevAssist code against requirements
Section 4: Lab: Prompts for Review, Testing and Debugging
- Code review with a checklist covering security, performance and readability
- Generate unit tests and edge cases from code or requirements, then check the coverage is real
- Analyse error logs and stack traces by asking step-by-step questions
- Lab: review code and trace the cause of bugs from sample bug reports
Section 5: Prompts for Documentation and Using AI in the Organisation
- Generate READMEs, API documentation and commit messages
- Write SQL and regular expressions with explanations
- Check AI-generated code before use: tests, dependencies and licences
- Data that must never be sent to ChatGPT, and team guidelines
Section 6: Workshop: The DevAssist Prompt Library
- Build at least 5 prompts: code generation, code review, unit tests, bug analysis and documentation
- Test them against sample code and bug reports
- Record a before-and-after comparison as the prompts are improved
- Store them as templates the team can reuse