惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
C
Cybersecurity and Infrastructure Security Agency CISA
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Know Your Adversary
Know Your Adversary
S
Securelist
I
Intezer
AWS News Blog
AWS News Blog
L
LINUX DO - 热门话题
P
Privacy International News Feed
Recent Announcements
Recent Announcements
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
The GitHub Blog
The GitHub Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
爱范儿
爱范儿
B
Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
S
Secure Thoughts
K
Kaspersky official blog
N
News | PayPal Newsroom
O
OpenAI News
Last Week in AI
Last Week in AI
C
Check Point Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tor Project blog
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
D
Docker
Hugging Face - Blog
Hugging Face - Blog
T
Threat Research - Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
博客园 - 司徒正美
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
P
Palo Alto Networks Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
What Prime Day Taught Me About Prompt Engineering
christine · 2026-06-23 · via DEV Community

I wanted to get better at prompt engineering. Not the trick-the-robot kind, the boring-but-useful kind: how to ask a model a question so you get an answer you can actually trust.

The trouble with practicing is that most tutorials use made-up examples, and it's hard to tell a good answer from a bad one when you don't care about the topic. So I practiced on something I did care about: the deals sitting in my Amazon cart. I had a vacuum I'd been eyeing and a hair styler that was "43% off," and I genuinely wanted to know if those were good prices or just good marketing. The stakes were real, actual money on an actual decision, and that's what made it a good drill. A vague prompt gives you a confident answer, and when you actually care, you can feel that the answer is hollow.

What I learned, with the real deals and the actual before-and-after prompts:

The trap hiding in every deal

Start with the hair styler. The listing said:

Shark FlexStyle. Limited time deal. $199.00, 43% savings. List Price: $349.99.

Amazon listing for the Shark FlexStyle showing $199.00 marked 43% off a $349.99 list price

My first instinct was the prompt most people write:

"Shark FlexStyle $199, 43% off list $349.99, is that a good deal?"

This feels reasonable. It is also nearly useless: it lets the model answer the easy question (is 43% off a big discount? sure!) instead of the real one (is $199 actually a good price?). That $349.99 list price is a marketing anchor. A lazy prompt accepts it, and so you get a lazy "yes, great deal!" back.

The fix was re-framing this:

Act as a pricing analyst. I don't care whether $199 looks like a discount off list. I care whether $199 is a genuinely good price for the Shark FlexStyle right now. Before concluding, work through: (1) the actual street price over the last 6-12 months, (2) how often it drops to or below $199, (3) the real discount vs. its typical selling price, not vs. list. Cite a source and date for each price, or mark it unverified.

Same question, completely different answer. What the assistant came back with, in its own telling:

$199 is a genuinely good price, but not for the reason Shark markets it. It's the 6-month floor and has only appeared a couple of times in that window. The more honest benchmark is its recent median price, and $199 is a real savings off that, not the headline savings off the inflated $349.99 list.

The honest discount vs. street price is ~20% below median, and ~13% below its most common

I'm taking those specifics on faith, the assistant reported them and I didn't independently verify its price history, but that's almost beside the point. What changed was the shape of the answer: instead of "43% off, great deal!" I got "$199 is the all-time low on Amazon - only hit twice in 180 days, and the previous touch was one day only" The only thing I did differently was tell the model to ignore the anchor and compare to street price.

Lesson one: reframe the question to attack the anchor. "Compare to street price, not list" is the line I am going to find more helpful going forward. It applies to nearly every "is this a good deal" question you'll ever ask.

When "better" has no meaning yet

Next I tried a comparison, which is where vague prompts fall apart:

Dyson V8 Cordless: $269.99, 31% off list $389.99.

Shark IZ363HT with HEPA filter: $199.99, 43% off list $349.99.

Compare with similar
Just the plan old compare with similar on Alexa for Shopping on Amazon

The trap is right there in the numbers. The Shark is 43% off and cheaper, so a lazy prompt crowns it the winner in one line. But "better deal" is meaningless until you say better for what. A comparison has no answer until you define the criteria.

The prompt I landed on added three new moves on top of the anchor break:

Act as a product and pricing analyst. Don't let a bigger discount percentage decide the winner. Compare the Dyson V8 ($269.99) and Shark IZ363HT ($199.99) as a purchase. Ignore list-price discounts; compare each to its real street price. Flag if they're different product classes. Score on weighted criteria: price-vs-street 30%, cleaning 25%, runtime 20%, HEPA 15%, upkeep 10%. Then answer two things separately: better DEAL, and better PRODUCT. Cite source and date per price or mark unverified.

Three things made this work:

  1. Weighted criteria. "Better" means nothing until you declare what matters and how much. Writing the weights forced me to admit what I actually cared about.

  2. Split the deal from the product. A thing can be a great deal and the wrong buy. Keeping those two questions separate clears up most of the confusion in a comparison.

  3. Flag the class mismatch. These two vacuums aren't the same tier, and I wanted the model to say so instead of comparing raw prices.

The result split exactly the way good analysis should (again, these are the assistant's figures, which I didn't independently confirm):

Better DEAL: the Shark at $199.99, a genuine discount off its typical street price. The Dyson's deal is real but based on thin historical data. Better PRODUCT: the Dyson V8, for cleaner engineering and easier maintenance, though the Shark's HEPA seal is a meaningful win for a cat household.

One prompt, two different winners. A single "which is better?" would have collapsed that into one arbitrary answer and I'd have learned nothing.

Lesson two: in any comparison, the quality of the answer is capped by whether you defined the criteria. The model can't tell you "better" until you tell it "better how."

The model is smarter, not infallible

The part that surprised me most came in that same comparison answer, which also contained this:

The $130 gap vs. the Dyson is real money…

and later:

…are comfortable paying $70 more.

Both can't be true. The actual gap is $269.99 minus $199.99, which is $70. The $130 was wrong, and the model contradicted itself within the same answer. A well-engineered prompt made the reasoning much better. It did not make the arithmetic correct.

The fix is one more constraint: "show the price-difference math explicitly." Errors hide in summary claims but not in shown work. If I'd forced it to write $269.99 - $199.99 = $70, the contradiction would have been impossible.

Lesson three: a better prompt improves reasoning, not truth. Always verify the model's math.

The constraint I should've expected: word count

When I copied that comparison prompt into the Amazon shopping assistant, only the first half pasted. There was a character limit, and my nicely-formatted prompt with its ROLE and TASK and OUTPUT headers got cut off mid-sentence.

The annoying part is that nothing told me the limit existed until I hit it. These assistants rarely document it, so you find the ceiling by bumping your head on it. That changes the strategy: since you can't plan around a number you don't know, put the instructions that change the answer first, so if you do get truncated, you lose the formatting and not the substance.

That accident taught me something useful. Under a tight budget, you rank techniques by how much each word buys you and cut the rest. The headers and scaffolding? First to go, the model infers structure on its own. What you protect, in order:

  1. The anchor break (street price, not list)
  2. The deal-vs-product split
  3. The weighted criteria (compressed to inline shorthand)
  4. The cite-or-unverified rule

The compressed version was a quarter the length and carried every essential instruction:

Compare as a purchase: Dyson V8 $269.99 vs Shark IZ363HT (HEPA) $199.99. Ignore list-price discounts; compare each to its real street price. Note if they're different product classes. Score on: price-vs-street 30%, cleaning 25%, runtime 20%, HEPA 15%, upkeep 10%. Answer two things separately: better DEAL, and better PRODUCT. Cite source+date per price or mark unverified.

Shopping assistant's detailed reply with a price-vs-street table, 12-month price history chart, and a buy/wait verdict
Now with more details that you care about in the prompt. The engineered prompt, with the price-history table and chart it produced.

Lesson four: a prompt's power lives in its constraints and reframes, not its formatting. Headers are a readability luxury. The instructions that change the answer are the ones you never cut.

The same question, side by side

This is the comparison I'd point a skeptic to. I ran a third product through both kinds of prompt so you can see the difference in one frame: the Garmin epix Pro (Gen 2) Sapphire Edition, 51mm. A premium watch with a real list price north of $1,000, which makes the anchor problem even more tempting.

Without prompt engineering, you write what feels natural:

"Is the Garmin epix Pro (Gen 2) Sapphire 51mm a good deal right now?"

And you get back something that sounds authoritative and tells some but maybe not all you want:


The vague prompt, the vague(ish) answer.

Notice what that answer does: it accepts the discount at face value, and uses list price.

With prompt engineering, you spend the reframes:

Act as a pricing analyst. I care whether the current price of the Garmin epix Pro (Gen 2) Sapphire 51mm is genuinely good, not whether it looks discounted off list. Before concluding: (1) find its street/historical price over the last 6-12 months, (2) note how often it hits the current price or lower, (3) state the real discount vs. typical selling price, not list. Cite source and date per price or mark unverified. Then give a verdict: buy / wait / skip, and a "wait-for" target price if I should hold out.

The shape of what comes back changes entirely. Instead of a sales pitch, you get a verdict with the reasoning shown:

With some real, actionable information and price history in context:

12-month median: ~$624.90. The current $549.99 is a real ~$75

That is a decision, with the math shown and the uncertainty labeled. One answer is a brochure, the other tells you exactly how good the price is, how often it appears, and what to hold out for. The difference isn't the model. It's the four or five sentences of reframing you put in front of it.

And one last thing, the part I didn't expect. The first time I ran this, the assistant answered from only about 40 days of data and called it a ~$50 saving. The phrase "over the last 6-12 months" in my prompt is what made it go back, pull a full year of price history, and correct itself to the ~$75 figure with a proper wait-for target. The reframe didn't just change the format of the answer. It changed how hard the model looked.

The cheat-sheet

The whole thing distilled, for when you want to try this yourself.

The five core techniques

  1. Role for clarity, not theater. Set a role only when it changes what good output looks like, and say why. "Act as a pricing analyst; I care about real price history over marketing claims."

  2. Explicit output structure. Tell it the shape: a table, then a verdict, then a confidence rating. Structure is the highest-leverage habit.

  3. Few-shot examples. Show one example of the answer you want. It pins down tone and granularity better than any description.

  4. Reason before verdict. Ask for the work first, conclusion last. Evidence-first ordering kills confident-but-wrong answers.

  5. Constraints, especially for uncertainty. "If you can't verify it, say unverified rather than guessing." The uncertainty clause is the one people skip, and it's what prevents fabrication.

For comparisons, add

  • Define and weight your criteria. No criteria, no real answer.
  • Split "best deal" from "best product." Don't let a steeper discount pick the winner.
  • Force the math to be shown so errors can't hide in summaries.

For deals specifically

  • Break the anchor: compare to street price, never to list price.
  • Ask how often the price appears, not just how low it is.

Meta-habits

  • Specificity beats politeness. The model can't read intent you didn't state.
  • Prompt engineering is debugging, not authorship. Run it, find the specific failure, fix that one thing.
  • Watch which constraints the model quietly drops, then promote those to non-negotiable on the next pass.
  • Under a word limit, cut formatting first and reframes last.
  • Name the scope. A phrase like "over the last 6-12 months" makes the model look harder, not just format differently; it pulled a full year of data and corrected its own answer.

Reading the patterns vs. using them

None of this is new, and I knew that. I'd read White et al. (2023), A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT a while back. It catalogs prompt techniques as reusable "patterns," the way software design patterns work, and the moves I leaned on map almost one to one onto it:

  • "Act as a pricing analyst" is the Persona Pattern: give the model a point of view so it knows what to focus on.
  • "Compare to street price, not list" is the Question Refinement Pattern: get the model to answer a better version of the question than the one you asked.
  • "Work through (1), (2), (3) before concluding" is the Cognitive Verifier Pattern: break a question into sub-questions and build the answer from them.
  • "Cite each price or mark it unverified" and "verify the math" are the Fact Check List and Reflection patterns: make the model surface what its answer depends on, then check itself.
  • The assistant offering to "pull price history on any specific item before you commit" is the Flipped Interaction Pattern, where the model drives by asking you questions.

But knowing the catalog and using it are different skills. Reading the paper, the patterns felt like a tidy list to nod along to. It wasn't until I was staring at a $549 watch I actually wanted, with real money on the line, that "Question Refinement" stopped being a term and became a reflex: no, don't accept the list price, make it compare to street. The patterns only stuck once I had a reason to care whether the answer was right.

If you want an easier intro than the paper, Descript's 5 Advanced Prompts to Get Better Answers from ChatGPT walks through five of these same patterns with plain examples. Read either one. Then go find a question you actually care about and use them, because that's the part the reading can't do for you.

The actual takeaway

I set out to learn prompt engineering and ended up also learning that the Shark IZ363HT was a genuinely good deal and the Dyson was the better vacuum, which is its own kind of useful. Still don't know which to buy, but at least I do know more and have developed some better prompting habits. Every one of these techniques is just a way of refusing to accept the easy answer: don't trust the list price, don't accept an undefined "better," don't believe the math without seeing it.

Pick something you actually want to know the answer to. That's the trick. When you care, you can feel the difference between a hollow answer and a real one, and chasing that difference is the entire skill.