<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sivasakthi Paramasivam</title>
    <description>The latest articles on DEV Community by Sivasakthi Paramasivam (@sivasakthi_paramasivam_e8).</description>
    <link>https://dev.to/sivasakthi_paramasivam_e8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3964083%2F69405cb4-ae69-4a2d-ae3c-21f675578328.png</url>
      <title>DEV Community: Sivasakthi Paramasivam</title>
      <link>https://dev.to/sivasakthi_paramasivam_e8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sivasakthi_paramasivam_e8"/>
    <language>en</language>
    <item>
      <title>why my prompt failed</title>
      <dc:creator>Sivasakthi Paramasivam</dc:creator>
      <pubDate>Tue, 02 Jun 2026 08:14:54 +0000</pubDate>
      <link>https://dev.to/sivasakthi_paramasivam_e8/why-my-prompt-failed-48hm</link>
      <guid>https://dev.to/sivasakthi_paramasivam_e8/why-my-prompt-failed-48hm</guid>
      <description>&lt;p&gt;As a developer, I recently decided to redesign my portfolio website using an AI coding assistant.&lt;/p&gt;

&lt;p&gt;My initial thought was simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Redesign my portfolio website.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I entered this prompt into Cursor and expected a modern, professional portfolio design.&lt;/p&gt;

&lt;p&gt;Instead of immediately generating code, Cursor asked me several questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which tech stack are you using?&lt;/li&gt;
&lt;li&gt;Do you prefer a sidebar or a top navigation bar?&lt;/li&gt;
&lt;li&gt;What kind of design style do you want?&lt;/li&gt;
&lt;li&gt;Do you want a personal brand focus or a project showcase focus?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After answering these questions, Cursor generated a redesigned portfolio website.&lt;/p&gt;

&lt;p&gt;However, I wasn't satisfied with the result.&lt;/p&gt;

&lt;p&gt;The design wasn't bad, but it didn't match what I had in mind.&lt;/p&gt;

&lt;p&gt;So I tried again.&lt;/p&gt;

&lt;p&gt;And again.&lt;/p&gt;

&lt;p&gt;And again.&lt;/p&gt;

&lt;p&gt;Each time, I modified the prompt slightly, hoping for a better outcome.&lt;/p&gt;

&lt;p&gt;After several attempts, I realized something important:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&amp;gt; The quality of AI output depends on the clarity of instructions, the quality of context, and how well the desired outcome is specified.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That realization led me to learn about prompt engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Personal 6-Step Framework for Better Prompt Writing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is a personal framework I developed through learning and experimentation with AI tools. It is not an official prompt engineering standard, but it has helped me write more effective prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 1: Ask a Question
&lt;/h3&gt;

&lt;p&gt;The most basic level of prompting is simply telling the AI what you want.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is React?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This works, but the AI has very little context about who you are or what kind of answer you need.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 2: Give Context
&lt;/h3&gt;

&lt;p&gt;At this level, you provide information about your situation.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I'm a JavaScript developer. What is React?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now the AI can tailor the explanation to someone who already understands JavaScript.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 3: Assign a Role
&lt;/h3&gt;

&lt;p&gt;Tell the AI who it should act as.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Act as a React instructor and explain React.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The AI now responds from the perspective of a teacher rather than a general assistant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 4: Add Constraints
&lt;/h3&gt;

&lt;p&gt;Specify rules, limitations, or requirements.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Act as a React instructor and explain React in simple English with practical examples.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The AI now knows both the role and the style of explanation you want.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 5: Define the Output Format
&lt;/h3&gt;

&lt;p&gt;Tell the AI exactly how the response should be structured.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Act as a React instructor and explain React in simple English with practical examples. Present the answer in 5 bullet points.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This gives the AI clear instructions about both the content and the format.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 6: Provide Examples
&lt;/h3&gt;

&lt;p&gt;Sometimes, even after defining a role, context, constraints, and output format, the AI may not fully understand the style or quality you expect.&lt;/p&gt;

&lt;p&gt;In such cases, providing examples can help.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Act as a React instructor.&lt;/p&gt;

&lt;p&gt;Here is the teaching style I prefer:&lt;/p&gt;

&lt;p&gt;JavaScript Variables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variables are used to store data.&lt;/li&gt;
&lt;li&gt;They can hold numbers, strings, or objects.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;const name = "John";&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using the same style, explain React.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By providing an example, you show the AI exactly how you want the response to be written.&lt;/p&gt;

&lt;p&gt;This technique is often called &lt;strong&gt;few-shot prompting&lt;/strong&gt; because you provide one or more examples for the AI to follow.&lt;/p&gt;

&lt;p&gt;Examples can be especially useful when you want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A specific writing style&lt;/li&gt;
&lt;li&gt;Consistent formatting&lt;/li&gt;
&lt;li&gt;Particular coding standards&lt;/li&gt;
&lt;li&gt;Structured documentation&lt;/li&gt;
&lt;li&gt;Better quality outputs for complex tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of only telling the AI what you want, you are also showing it what a good answer looks like.&lt;/p&gt;

&lt;h2&gt;
  
  
  Applying This to My Portfolio Redesign
&lt;/h2&gt;

&lt;p&gt;My original prompt was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Redesign my portfolio website.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After learning more about prompting, I realized that this prompt only communicates the task, not the details needed to produce a result that matches my expectations.&lt;/p&gt;

&lt;p&gt;A much better prompt would be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Act as a senior UI/UX designer and frontend architect.&lt;/p&gt;

&lt;p&gt;Context:&lt;/p&gt;

&lt;p&gt;I am a full-stack developer with 3 years of experience in React.js, Node.js, Electron.js, MySQL, AWS, and Computer Vision applications. I use my portfolio to showcase my professional experience, technical skills, and projects.&lt;/p&gt;

&lt;p&gt;Goal:&lt;/p&gt;

&lt;p&gt;Redesign my existing portfolio website to look modern, professional, recruiter-friendly, and visually appealing.&lt;/p&gt;

&lt;p&gt;Constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use React and MUI.&lt;/li&gt;
&lt;li&gt;Keep the top navigation bar.&lt;/li&gt;
&lt;li&gt;Ensure responsive design for mobile, tablet, and desktop devices.&lt;/li&gt;
&lt;li&gt;Focus on projects, skills, experience, and achievements.&lt;/li&gt;
&lt;li&gt;Follow accessibility and performance best practices.&lt;/li&gt;
&lt;li&gt;Use modern spacing, typography, and animations without making the website feel cluttered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Output Format:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Design strategy&lt;/li&gt;
&lt;li&gt;Information architecture&lt;/li&gt;
&lt;li&gt;Page structure&lt;/li&gt;
&lt;li&gt;UI/UX improvements&lt;/li&gt;
&lt;li&gt;Component hierarchy&lt;/li&gt;
&lt;li&gt;Implementation plan&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example Style:&lt;/p&gt;

&lt;p&gt;I like modern developer portfolios that include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A large hero section with a strong personal introduction.&lt;/li&gt;
&lt;li&gt;Clean typography with plenty of white space.&lt;/li&gt;
&lt;li&gt;Card-based project showcases.&lt;/li&gt;
&lt;li&gt;Smooth scrolling and subtle animations.&lt;/li&gt;
&lt;li&gt;Professional color palettes with good contrast.&lt;/li&gt;
&lt;li&gt;Skills displayed using visually organized categories.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use a similar design philosophy while creating a unique portfolio experience.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Notice how this prompt contains all six levels of my framework:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask a Question&lt;/li&gt;
&lt;li&gt;Give Context&lt;/li&gt;
&lt;li&gt;Assign a Role&lt;/li&gt;
&lt;li&gt;Add Constraints&lt;/li&gt;
&lt;li&gt;Define the Output Format&lt;/li&gt;
&lt;li&gt;Provide Examples&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Compared to my original one-line prompt, this version gives the AI significantly more information and increases the chances of receiving a result that aligns with my expectations.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changed in My Thinking
&lt;/h2&gt;

&lt;p&gt;Before this experience, I thought prompting was simply asking questions.&lt;/p&gt;

&lt;p&gt;Now I see prompting as a way of communicating requirements clearly.&lt;/p&gt;

&lt;p&gt;The more information I provide about my goals, context, constraints, expectations, and examples, the more likely the AI is to generate results that match what I need.&lt;/p&gt;

&lt;p&gt;Whether I'm building a portfolio website, generating documentation, writing code, or learning a new technology, the same principle applies:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Better prompts lead to better outcomes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  My Biggest Takeaway
&lt;/h2&gt;

&lt;p&gt;When I started redesigning my portfolio, I thought AI would automatically generate the perfect design from a simple instruction.&lt;/p&gt;

&lt;p&gt;What I learned was that AI is not a mind reader.&lt;/p&gt;

&lt;p&gt;The quality of the output depends on how clearly we communicate our goals, requirements, and expectations.&lt;/p&gt;

&lt;p&gt;Prompt engineering is not about finding secret keywords or magic phrases.&lt;/p&gt;

&lt;p&gt;It is about giving the AI the information it needs to succeed.&lt;/p&gt;

&lt;p&gt;My personal framework for writing better prompts is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask a Question&lt;/li&gt;
&lt;li&gt;Give Context&lt;/li&gt;
&lt;li&gt;Assign a Role&lt;/li&gt;
&lt;li&gt;Add Constraints&lt;/li&gt;
&lt;li&gt;Define the Output Format&lt;/li&gt;
&lt;li&gt;Provide Examples&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As developers, we already spend our careers learning how to communicate with computers through programming languages.&lt;/p&gt;

&lt;p&gt;Prompt engineering is simply another form of communication—one that helps us collaborate more effectively with AI systems.&lt;/p&gt;

&lt;p&gt;The better the communication, the better the outcome.&lt;/p&gt;

</description>
      <category>learning</category>
    </item>
  </channel>
</rss>
