Managing Instructions and Prompts | Bondar Academy
Course: Playwright API Testing with TypeScript
Module: AI-Assisted Scripting with Copilot
Instructor: Artem Bondar
Lesson Summary
In this lesson, we explore how to effectively use instructions and prompts when interacting with AI, specifically within the context of Copilot. The key takeaway is that providing detailed and descriptive prompts leads to better outcomes. Understanding Instructions vs. Prompts Instructions are a set of commands that define how tasks should be performed, while prompts specify what needs to be done. It is recommended to keep instructions and prompts separate for clarity and reusability. Types of Instructions and Prompts Instructions: Workspace Instructions - Automatically applied to every prompt. Custom Instructions - Specific to certain operations. Profile Instructions - Related to user preferences across projects. Prompts: Custom Prompts - Specific to a project. Profile Prompts - Saved across different projects for user-specific tasks. Creating and Using Prompts and Instructions To create a structured workflow: Create a folder named .github in your project root. Inside, create instructions and prompts folders. Define a copilot-instructions.md file for workspace instructions. Use Markdown syntax for formatting your instructions, which will be automatically converted for better readability in GitHub. Leveraging AI for Automation By providing clear instructions and prompts, you can automate repetitive tasks. For instance, AI can generate instructions based on your application context, which you can then refine. It's essential to ensure there are no conflicting instructions to avoid unexpected results. This lesson emphasizes the importance of detailed prompts and instructions to enhance AI interaction and streamline workflows in your projects.