<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Shivam Bhardwaj]]></title><description><![CDATA[Shivam Bhardwaj]]></description><link>https://shivambhardwaj.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Shivam Bhardwaj</title><link>https://shivambhardwaj.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 22:35:18 GMT</lastBuildDate><atom:link href="https://shivambhardwaj.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[My Reflection Loop Made Things Worse. My Evaluation Framework Showed Me Why.]]></title><description><![CDATA[I was building a travel planning agent based on my travel experience. I have a real 43-day trip across Korea and Japan coming up, and that's something very close to me. It's a trip I've spent months p]]></description><link>https://shivambhardwaj.hashnode.dev/my-reflection-loop-made-things-worse-my-evaluation-framework-showed-me-why</link><guid isPermaLink="true">https://shivambhardwaj.hashnode.dev/my-reflection-loop-made-things-worse-my-evaluation-framework-showed-me-why</guid><category><![CDATA[ai agents]]></category><category><![CDATA[ai-evaluation]]></category><category><![CDATA[LLM's ]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[langgraph]]></category><dc:creator><![CDATA[Shivam Bhardwaj]]></dc:creator><pubDate>Sat, 08 Aug 2026 16:49:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a4ce677ee7791b97f0ff2c5/7851a9b4-30eb-49a3-b6f0-dd8044e8ebcf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I was building a travel planning agent based on my travel experience. I have a real 43-day trip across Korea and Japan coming up, and that's something very close to me. It's a trip I've spent months planning, and something I'm actually preparing for myself. So I thought, why not build an evaluation framework around it and use the travel planning agent as the first system it grades?</p>
<p>So I started by designing scenarios. Every scenario had a different purpose: budget constraints, route optimisation, mid-trip disruptions, remote work scheduling across time zones, and information gathering. Every scenario had its own scoring system with explicit pass/fail criteria, and I wrote all of them before I wrote a single line of agent code.</p>
<p>Then I added what I thought would make everything better: a second pair of eyes... a quality auditor which is commonly called a reflection agent. Its job was simple: critique the itinerary, point out problems, and push the planner to improve it. Generate a plan, critique it, revise it, repeat.</p>
<p>It went a bit off the rails.</p>
<p><em>But here's the thing... that's not really what this article is about. What I was actually building wasn't a travel app. The eval suite is the product. The travel agent is just the first thing it grades.</em></p>
<p>The evaluation scenarios were already in my head before I even thought about building an agent. I'd spent months planning this trip myself, so I was constantly thinking about different situations that could actually happen. For example, one of the scenarios came from my own remote work schedule. I have fixed working hours but I also want to experience the city, the culture, and the country. How do I manage both efficiently? That became one of the benchmark scenarios.</p>
<p>The same thing happened with route optimisation. I was traveling from Korea to Japan during autumn, and i wanted to maximise the peak foliage season. Korea reaches its peak a little earlier, while Japan follows from north to south. That wasn't just an interesting benchmark idea; it was a real planning problem I wanted the agent to solve correctly.</p>
<p>That's why writing the evaluation scenarios came naturally. They were based on real problems I had already thought through for my own trip. The agent was almost the easier part. What actually mattered to me was seeing how well the agent responded to those scenarios and constraints. I already had an idea of what a good answer should look like, and i wanted to measure how close the agent could get to it.</p>
<p>There was another reason I built it this way. If I had built the agent first, I would have ended up becoming the reflection loop myself without even realizing it. I would have looked at whatever itinerary the agent produced, thought it looked reasonable, and then started writing scenarios around what the agent already did well. The scenarios would have been shaped by the agent instead of the other way around.</p>
<p>Writing the scenarios first kept the evaluations honest. The agent had to adapt to the scenarios, not the other way around.</p>
<p>Before building the planner, I wanted to define the kinds of problems it should actually be able to solve. These weren't random benchmark scenarios or academic test cases. Every one of them came from a real question I had while planning my own trip. Instead of asking, "Can the agent plan the trip?", I wanted to ask, "Can it solve the problems that actually matter when you're travelling?"</p>
<p>The first scenario was <strong>Budget.</strong> Almost everyone travels with a fixed budget, so I wanted to see whether the agent could maximize the overall experience within a fixed limit.</p>
<p>The second was <strong>Route Optimization</strong>, where the planner had to follow the autumn season while avoiding unnecessary backtracking.</p>
<p>The third was <strong>Remote Worker,</strong> balancing fixed meetings with actually experiencing the country.</p>
<p>The fourth was <strong>Mid-trip Replanning,</strong> testing whether the planner could adapt to disruptions without throwing away the original itinerary.</p>
<p>The final scenario was <strong>Information Gathering,</strong> evaluating whether the planner knew when to gather more information before making planning decisions.</p>
<p>Together these five scenarios became the benchmark suite. They weren't designed around the agent's strengths, they were designed around the real problems I wanted solved before leaving for my trip.</p>
<h2>What the Benchmarks Revealed</h2>
<p>I finally ran the benchmark suite expecting the reflection agent to improve every scenario. That was the whole reason I built it. The idea was simple: let the planner decide the itinerary, let the reflection agent critique it, revise the plan, and end up with something better than the original.</p>
<p>Instead, the original benchmark taught me something much more valuable. The planner itself wasn't really the biggest problem. The reflection loop didn't always know <strong>what deserved changing and what should simple be left alone.</strong> Without the benchmark suite, I probably would've looked at the itineraries, thought they looked reasonable, and never noticed these weaknesses.</p>
<p><strong>Benchmark Results</strong></p>
<p>Planner-only (v1) vs Planner + Reflection (v2) after introducing the first reflection loop.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a4ce677ee7791b97f0ff2c5/2d715506-16df-4d2e-8409-9e4f4689dcfc.jpg" alt="" style="display:block;margin:0 auto" />

<p>The biggest weakness showed up in the <strong>Remote Worker</strong> scenario. This benchmark came directly from my own trip planning, where I have fixed working hours and meetings that simply can't move. The planner sometimes scheduled sightseeing, train journeys, or other activities during those meeting windows because it wasn't consistently treating timezone-aware work schedules as hard constraints. Reflection improved the score from <strong>21.45</strong> to <strong>35.85,</strong> but it was still the weakest-performing scenario by a considerable margin.</p>
<p>The second issue appeared in <strong>Mid-trip Replanning.</strong> The goal was to see how well the planner could adapt when something unexpected happened without throwing away the rest of the itinerary. Instead, the reflection loop often rewrote parts of the trip that weren't affected at all, sometimes even modifying locked bookings. Rather than making a small, local adjustment, it tried to regenerate large sections of the itinerary. That caused the score to fall from <strong>83.95</strong> to <strong>73.45.</strong></p>
<p>The most interesting result came from <strong>Route Optimization.</strong> The original planner had already produced a sensible route with very little backtracking. Instead of recognising that it was already good enough, the reflection agent kept suggesting additional changes anyway. It wasn't fixing real problems anymore; it was simply editing for the sake of editing. The score only dropped slightly (<strong>83.60</strong> to <strong>82.85</strong>)<strong>,</strong> but the lesson was much bigger than the numbers.</p>
<p>That first benchmark run completely changed how I thought about reflection agents. They aren't automatically an improvement. Without clear stopping criteria and well-defined constraints, a reflection loop can easily become an overcritical editor that keeps changing things simply because it can.</p>
<h2>The Fixes</h2>
<p>The benchmark results made the next steps pretty obvious. I wasn't trying to redesign the planner from scratch anymore. I was trying to fix the specific weaknesses that the evaluation framework had exposed.</p>
<p>The first fix focused on the <strong>Remote Worker</strong> scenario. I updated the reflection agent so it performs a strict check for timezone conversions and calendar conflicts before approving an itinerary. Working hours and meeting slots shouldn't be treated as suggestions, they're hard constraints that the planner has to respect.</p>
<p>The second fix addressed <strong>Mid-trip Replanning.</strong> I changed the revision prompt so that locked bookings became immutable, and the planner was only allowed to modify the part of the itinerary that was actually affected by the disruption. If a typhoon affects Day 12, there shouldn't be a reason to rewrite Day 18.</p>
<p>The final fix was for <strong>Route Optimization.</strong> I added a clear stopping condition to the reflection loop. If an itinerary already satisfies the important constraints, the reflection agent simply returns <em>ITINERARY APPROVED</em> instead of continuing to look for problems that don't really exist.</p>
<p>Those were relatively small changes, but they raised a much more interesting question: <strong>would they actually improve across different models, or had I just optimized for one benchmark?</strong></p>
<h2>Did the Fixes Actually Generalize?</h2>
<p>It wasn't enough for the fixes to work on just one model. If they only improved the benchmarks on the model I had been testing with, then I probably hadn't fixed the underlying architecture... I had just optimized the prompts for that particular model. To test that, I reran the entire benchmark suite across four different LLMs: <strong>GPT 5.6 Terra, Gemini 3.1 Pro, Gemini 3.5 Flash, and Llama 3.1 8B.</strong></p>
<img src="https://cdn.hashnode.com/uploads/covers/6a4ce677ee7791b97f0ff2c5/0eaedf58-f17f-4577-bb83-fe44a1cd083c.jpg" alt="" style="display:block;margin:0 auto" />

<p>The results were encouraging. The biggest improvements appeared in the <strong>Remote Worker</strong> and <strong>Mid-trip Replanning</strong> benchmarks. On <strong>Gemini 3.1 Pro</strong>, the Remote Worker scored improved by <strong>36.95 points,</strong> showing that treating work hours and meeting slots as hard constraints made a significant difference. <strong>GPT 5.6 Terra</strong> also showed a <strong>16.90 point improvement</strong> in the Replanning benchmark after I introduced immutable bookings and localized revisions instead of rewriting the itinerary.</p>
<p>Not every result improved, and I think that's just as important to mention. <strong>Llama 3.1 8B</strong> produced noticeably weaker scores in the Budget and Information Gathering benchmarks. After looking into the results, most of that variation came from limited factual database coverage rather than changes in the planning logic itself. I decided to keep those results instead of removing them because they represent the system's actual behaviour, not the outcome I was hoping for.</p>
<p>Overall, I wasn't trying to get perfect scores across every benchmark. What mattered more was seeing the same architectural changes produce consistent improvements across different model families. That gave me much more confidence that I was improving the system itself rather than accidentally overfitting prompts for a single model.</p>
<h2>Beyond Travel</h2>
<p>The more I worked on this project, the more I realised it wasn't really about travel anymore. I picked travel because it's something I already had real experience with. I had already spent months planning this trip, so it felt like the perfect domain to start learning AI evaluations. But somewhere along the way, the project stopped being about itineraries and started being about something much bigger.</p>
<p>One of the biggest things I learned is that building the agent isn't the difficult part. You can always improve prompts, switch models, or add another agent into the workflow. The difficult part is knowing whether those changes actually made the system better. That's what good evaluations give you. They give you an objective way to measure whether your changes are genuine improvements or just different outputs that happen to look convincing.</p>
<p>This project completely changed how I think about building AI agents. Before this, I mostly thought about generating better responses. Now I think much more about designing better evaluations. If the evaluation itself isn't honest, then it doesn't matter how good the agent looks, you have no reliable way of knowing whether it's actually improving.</p>
<p>I also realised that these problems aren't specific to travel planning. A reflection agent that keeps changing an already-good itinerary isn't very different from a coding agent that keeps rewriting working code, or a scheduling agent that keeps moving confirmed meetings. The underlying problem is the same. Good constraints and good evaluations matter regardless of what the agent is trying to do.</p>
<p>I started building a travel planning agent because I wanted to work with AI evaluations. In the end, the travel planner became the example. Learning how to design honest evaluation frameworks became the real project.</p>
<h2>Limitations and What's next</h2>
<p>Like any early-stage project, this one still has its limitations. The research agent currently works with a limited mock knowledge base rather than live APIs, so some benchmark scores, especially factual ones can fluctuate depending on the model being evaluated. Right now, the framework is primarily testing planning logic, constraint satisfaction, and decision making rather than real-time data retrieval. That was a conscious trade-off while building the evaluation framework itself.</p>
<p>The next step is to make those evaluations more realistic. I'm currently expanding the framework with <strong>Model Context Protocol (MCP)</strong> integrations so the agents can interact with real tools and live data instead of mock datasets. After that, I want to build a second agent in a completely different domain to see whether the same evaluation-first approach generalizes beyond travel planning.</p>
<p>The project started because I wanted a better way to plan my own trip across Korea and Japan. Along the way, it became a way to learn how to build and evaluate AI agents more systematically. The travel planner will continue to evolve, but the evaluation framework is what I'm most excited to keep building.</p>
<p>If you're working on agent systems or AI evaluations, I'd genuinely love to hear your thoughts or feedback. The repository includes the evaluation scenarios, benchmark reports, and the complete agent implementation, and I'll continue publishing new experiments and improvements as the project evolves.</p>
<p>🔗 <strong>GitHub:</strong> <a href="https://github.com/imshivamb/agent-eval-platform">Agent Eval Platform</a></p>
<p>💼 <strong>LinkedIn:</strong> <a href="https://www.linkedin.com/in/shivam-bhardwaj-645b44286/">Linkedin</a></p>
<p><em>If you spot something I could evaluate better, or evaluate differently... I'd genuinely love to hear your perspective.</em></p>
]]></content:encoded></item></channel></rss>