Module 1 · Prompting Foundations · Lesson 2 of 26
The Developer Prompt Formula
For software work, vague prompts produce generic answers because the model has to guess your framework version, architecture, database, coding standards, and hidden constraints. The fix is to provide the smallest useful amount of real context.
| Prompt part | What to include | .NET example |
|---|---|---|
| Role | Tell the model what engineering lens to use. | Act as a senior ASP.NET Core backend engineer and code reviewer. |
| Task | Describe what you want built, fixed, reviewed, or explained. | Create POST /api/orders with validation and EF Core persistence. |
| Stack | Give app type, .NET version, database, ORM, testing tools. | .NET 9 Web API, EF Core, SQL Server, xUnit, FluentAssertions. |
| Architecture | State the current project style. | Clean Architecture: Api, Application, Domain, Infrastructure. |
| Relevant code | Paste only the code that matters. | Controller, service method, DbContext, entity, error stack trace. |
| Constraints | Make hidden rules explicit. | No extra packages, async I/O, no entity exposure, preserve response shape. |
Sign in to mark lessons done and keep your place in the course.Sign in