<?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: Nivedhitha .K</title>
    <description>The latest articles on DEV Community by Nivedhitha .K (@nivedhitha_k).</description>
    <link>https://dev.to/nivedhitha_k</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259832%2Ff2ddf347-691c-4fc2-9c70-dc5d939ca21a.png</url>
      <title>DEV Community: Nivedhitha .K</title>
      <link>https://dev.to/nivedhitha_k</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nivedhitha_k"/>
    <language>en</language>
    <item>
      <title>What I Learned About Prompt Engineering by Experimenting with Gemini</title>
      <dc:creator>Nivedhitha .K</dc:creator>
      <pubDate>Mon, 23 Nov 2026 06:21:55 +0000</pubDate>
      <link>https://dev.to/nivedhitha_k/what-i-learned-about-prompt-engineering-by-experimenting-with-gemini-1a0a</link>
      <guid>https://dev.to/nivedhitha_k/what-i-learned-about-prompt-engineering-by-experimenting-with-gemini-1a0a</guid>
      <description>&lt;p&gt;Everyone online talks about prompt engineering like it's a bag of secret tricks. I wanted to see how much of that was true, so I ran three small experiments in Google AI Studio with a Gemini 3.8 Flash. No code, nothing fancy. Just a prompt, the raw output, and me deciding whether the answer was right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero-shot vs few-shot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I gave the model eight product reviews, some of them deliberately tricky: sarcasm, phrases like "Not bad at all," and reviews with mixed feelings. With zero-shot prompting (no examples), it got all eight right. With few-shot prompting (five labelled examples), it also got all eight.&lt;/p&gt;

&lt;p&gt;So the examples didn't make it smarter. What they did was make the answers look more consistent. One thing surprised me, though. I asked for exactly one word and the model still added an explanation. If you're planning to parse the output with code, that's the kind of thing that breaks your pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Direct answers vs chain-of-thought&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then I tried four maths problems, including the classic bat-and-ball puzzle. Asking for just the final answer and asking it to think step by step both got all four correct.&lt;/p&gt;

&lt;p&gt;The real difference was that I could see the working. When the model set up the equation and solved it in front of me, I could check each step myself. That matters a lot more when the model might actually be wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting clean JSON&lt;/strong&gt;&lt;br&gt;
This was the one where prompting finally made a visible difference. I asked the model to pull a name, date and amount out of messy payment messages. I was strict about what counted as a pass: valid JSON, exact keys, a YYYY-MM-DD date, and a plain number for the amount.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt style&lt;/strong&gt;                                  &lt;strong&gt;Success&lt;/strong&gt;&lt;br&gt;
Basic prompt, no schema                               2/6&lt;br&gt;
Schema + clear rules                                  6/6&lt;br&gt;
Two examples + short instruction                  6/6&lt;/p&gt;

&lt;p&gt;The jump from 2/6 to 6/6 came from a schema and a few plain rules: use null when something is missing, don't guess, and use the transaction date, not the reminder date. Nothing clever, just clear instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I took away&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Clear rules beat clever tricks. The biggest improvement came from the simplest change.&lt;br&gt;
Examples helped with format more than accuracy, at least on tasks this easy.&lt;br&gt;
Step-by-step reasoning is useful for you, because it makes mistakes easier to spot.&lt;br&gt;
Instructions aren't guarantees, so always check the output.&lt;br&gt;
Ambiguity needs handling. The date 04/05/26 was quietly read as 4 May, and a real tool should ask the model to flag cases like that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A fair warning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I ran each input only once, with six to eight inputs per test. That shows a trend, not proof, and harder inputs could change the results.&lt;/p&gt;

&lt;p&gt;If I had to sum it up, prompt engineering feels less like finding magic words and more like writing a good brief for a new teammate: say what you want, say what format you want, tell them what to do when information is missing, and then check their work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the full article:&lt;/strong&gt; &lt;a href="https://valentiuskryptix.com/prompt-engineering-the-surprising-truth-i-found-testing-gemini/" rel="noopener noreferrer"&gt;https://valentiuskryptix.com/prompt-engineering-the-surprising-truth-i-found-testing-gemini/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; &lt;br&gt;
ai&lt;br&gt;
promptengineering&lt;br&gt;
gemini&lt;br&gt;
machinelearning&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gemini</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
