{"slug": "ai-proposal-writer-a-two-stage-prompt-engineering-guide", "title": "AI Proposal Writer: A Two-Stage Prompt Engineering Guide", "summary": "A two-stage prompt engineering workflow that splits AI proposal writing into extraction and generation phases eliminates generic 'AI smell,' according to a developer who built a dedicated proposal tool using Next.js 14, Supabase, and GPT-4o. The first stage parses a job post into structured JSON fields, and the second stage uses those signals as constraints to generate tailored proposals under 200 words with strict negative rules.", "body_md": "# AI Proposal Writer: A Two-Stage Prompt Engineering Guide\n\nThe secret to high-conversion AI writing isn't the model you use—it's the architecture. After building a dedicated proposal tool, I found that splitting the process into a two-stage workflow (Extraction then Generation) completely eliminates the \"AI smell.\"\n\n## The Architecture: Extraction vs. Generation\n\nThe core issue with single-prompting is that the LLM tries to analyze the requirements and write the prose simultaneously, often defaulting to safe, boring templates. By decoupling these, you force the AI to understand the client's pain points before it even thinks about writing a sentence.\n\n### Stage 1: Signal Extraction\n\nFirst, I use a prompt that acts as a data parser. It ignores the \"writing\" part entirely and just converts the messy job post into a structured JSON object.\n\n``` js\nconst extractionPrompt = ` You are analyzing a freelance job posting. Extract ONLY these fields as JSON:\n\n{ \"client_company\": \"string | null\", \"specific_problem\": \"string - the exact pain point described\", \"desired_outcome\": \"string - what success looks like\", \"tone\": \"formal | casual | urgent\", \"budget_signal\": \"string | null - any rate mentioned\" }\n\nJob Post: ${jobPost} `;\n```\n\n### Stage 2: Proposal Generation\n\nNow that we have the \"signals,\" the second prompt uses that data as a constraint. I implement strict negative constraints (the \"NEVER\" rules) to kill the generic AI habits.\n\n``` js\nconst proposalPrompt = ` Write an Upwork proposal using this EXACT structure:\n\nOPEN with: \"${extracted.specific_problem || 'Your project sounds interesting'}\"\nReference their SPECIFIC problem, not your skills\nDo NOT start with \"Hi\" or \"I read your post\"\nPROVE with one quantified result\nExample format: \"I helped a client [do X] which resulted in [Y]\"\nKeep it specific, not generic\nMATCH their tone: ${extracted.tone}\nEND with a specific question about their current setup\nExample: \"Are you currently using [tool]?\"\nKeep total word count under 200\nNEVER start sentences with \"I am,\" \"I have,\" or \"I am a\"\nClient: ${extracted.client_company || 'not mentioned'} `;\n```\n\n## Technical Implementation and Lessons\n\nFor the build, I went with a standard modern stack: Next.js 14 (App Router) for the frontend, Supabase for the backend and edge functions, and GPT-4o. I found GPT-4o to be the most reliable for the extraction phase because it handles the JSON formatting without hallucinations.\n\nIf you're planning a similar deployment, avoid these mistakes I made:\n\n**Latency:** Don't wait for the full response. Implement streaming immediately, or your users will think the app has crashed.**Efficiency:** Cache your extraction results. There's no reason to re-run the extraction prompt if the job post hasn't changed; hash the input and store the JSON.**Iterative UI:** Add a \"regenerate\" or \"tweak\" button from the start. Even with great prompts, users always want a slightly different version.\n\nThis two-stage pattern is a massive lever for any AI workflow where you need tailored output from unstructured data. It moves the LLM from \"guessing\" what to write to \"executing\" based on extracted facts.\n\n[Next Claude Code System Prompt: Why it Stops Asking Permission →](/en/threads/4114/)", "url": "https://wpnews.pro/news/ai-proposal-writer-a-two-stage-prompt-engineering-guide", "canonical_source": "https://promptcube3.com/en/threads/4116/", "published_at": "2026-07-28 18:12:19+00:00", "updated_at": "2026-07-28 18:43:02.111009+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools", "developer-tools"], "entities": ["Next.js 14", "Supabase", "GPT-4o", "Upwork"], "alternates": {"html": "https://wpnews.pro/news/ai-proposal-writer-a-two-stage-prompt-engineering-guide", "markdown": "https://wpnews.pro/news/ai-proposal-writer-a-two-stage-prompt-engineering-guide.md", "text": "https://wpnews.pro/news/ai-proposal-writer-a-two-stage-prompt-engineering-guide.txt", "jsonld": "https://wpnews.pro/news/ai-proposal-writer-a-two-stage-prompt-engineering-guide.jsonld"}}