I have found that the more detail I give about what I want in my prompt up front, as well as writing a good System Prompt, gives me pretty good results. It's not perfect, but it saves me TONS of typing. Here's an example of my System Prompt, followed by my User Prompt. Keep in mind that I am not using a Visual Studio plug-in for this. I'm just in a browser on our internal AI chatbot that allows me to select the LLM that I want to use for my interactions. In this case, I am using Claude Sonnet 4.
System Prompt:
You are an expert in ASP.NET Core 9.0 Web API development using C#. You are also an expert at writing code against an Open AI compatible API, MS SQL Server, HTML, CSS, responsive design, and JavaScript. You are also an expert at accessibility, particularly WCAG 2.1 level AA.
User Prompt:
Please help me develop an ASP.NET Core 9.0 Web API chatbot application using C# that uses an OpenAI compatible API located at
https://xxxx.xxx.xxxxx.ai/api and using the model "gpt-4.1". The chatbot should interact with data located on the xxxx.xxxx.xxx MS SQL Server, specifically the xxxx database (xxxx schema, as well) and the vw_OrdersAllJSON view, which returns JSON. The application should use RAG for increased accuracy of the LLM. I want to use the embeddings endpoint on the
https://xxxx.xxx.xxxxx.ai/api API and NOT local calculations. Also, the application should save the context of each chat session in a history so the end user can return to previous chat sessions. Just save the last 5 chat sessions, and present them to the end user in a dropdown list for selection. The dropdown list should be in a modal window that is accessed by the user clicking a "Chat History" link. Order the historic chat sessions from most recent to least recent. Here is one row of data returned by the view with headers, just so you understand the kind of data it is returning.
[I included an actual row of JSON data here from my SQL view above]
The end user should be able to ask questions about any of the data returned by the view. Use Visual Studio for the code development. The index.html page should be built with responsive design, using Bootstrap, so it works equally well on mobile devices and desktop computers. Build the web page to the WCAG 2.1 level AA standard of accessibility. The header on the index.html page should have a title of "Purchase Order Request History" with a small XXXXX logo floating to the left of the header. Just put a placeholder for it in the html code, and I will provide the actual logo image file. The chatbot should also allow for the end user to select the option of generating a bar chart, line chart, or pie chart, or to choose not to have a chart. CSS and JavaScript files should be separate from the index.html file and in their own CSS and Script folders, respectively. The color scheme should be using XXXXX colors, such as blue, white, and gray. Please write the code in a secure way, addressing the OWASP Top 10 vulnerabilities and any other known vulnerabilities. For now, do not include a login screen. For logging, be sure to log the IP address of the end user. Start out by showing me the file structure of the project and the NuGet packages needed. Use only the latest and most secure NuGet packages for use with ASP.NET 9.0, please. Do NOT use FluentValidation.AspNetCore. It has been deprecated. The rate limiting functionality is built into ASP.NET Core 7.0+ and doesn't require a separate package.