<?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: Yogendra singh </title>
    <description>The latest articles on DEV Community by Yogendra singh  (@yogendra_singhjasawat_73).</description>
    <link>https://dev.to/yogendra_singhjasawat_73</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%2F4129391%2F04ee4bc4-e7c9-412f-a2ad-d1d4170fd0ba.jpg</url>
      <title>DEV Community: Yogendra singh </title>
      <link>https://dev.to/yogendra_singhjasawat_73</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yogendra_singhjasawat_73"/>
    <language>en</language>
    <item>
      <title>Don’t Trust the Answer, Trust the Log: Lessons from Building an AI Expense Auditor</title>
      <dc:creator>Yogendra singh </dc:creator>
      <pubDate>Sat, 17 Oct 2026 12:24:39 +0000</pubDate>
      <link>https://dev.to/yogendra_singhjasawat_73/dont-trust-the-answer-trust-the-log-lessons-from-building-an-ai-expense-auditor-133o</link>
      <guid>https://dev.to/yogendra_singhjasawat_73/dont-trust-the-answer-trust-the-log-lessons-from-building-an-ai-expense-auditor-133o</guid>
      <description>&lt;p&gt;canonical_url:&lt;a href="https://valentiuskryptix.com/3-surprising-failures-from-testing-my-ai-auditing-agent/" rel="noopener noreferrer"&gt;https://valentiuskryptix.com/3-surprising-failures-from-testing-my-ai-auditing-agent/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A chatbot answers questions. An agent is different: it is given a goal and a toolbox, then decides for itself which tool to call, what to pass in, and when to stop. For my “Agentic AI Workflow” milestone during an internship at Valentius Kryptix, I built one, and I set myself a harder requirement than “it works.” I had to prove it.&lt;/p&gt;

&lt;p&gt;The project&lt;/p&gt;

&lt;p&gt;ExpenseBot reviews employee expense claims against an invented company policy. It is written in Python with LangGraph and has three tools: a policy search, a currency converter with fixed rates, and a calculator. The calculator parses expressions into a syntax tree and allows only numbers and basic operators, instead of using eval, because model output feeding into code should be treated as untrusted input.&lt;/p&gt;

&lt;p&gt;A system prompt acts as the agent’s job description: look up the rule, convert foreign currency, do all arithmetic through the calculator, and if no policy matches, say so and refer the user to Finance instead of inventing a rule.&lt;/p&gt;

&lt;p&gt;Take three hotel nights at 200 euros each. The agent finds the $250 international cap, converts to $216 per night, sees it is under the cap, calculates 648, and approves the claim. Every number comes from a tool call, so it can be traced in the log.&lt;/p&gt;

&lt;p&gt;How I tested it&lt;/p&gt;

&lt;p&gt;I wrote 12 test claims with expected results before running anything. A test passed only if the final answer was correct and the agent had used the tools that answer depends on.&lt;/p&gt;

&lt;p&gt;Three lessons from failures&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The bug was in the tools, not the prompt. A taxi claim was told no policy existed. My instinct was to rewrite the prompt, but the log showed my search scoring treated “domestic” as important as “taxi,” so three rules tied and the taxi rule lost. Fixing the search fixed the problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A right answer can hide a wrong process. A smaller model returned correct totals but did the multiplication itself instead of calling the calculator. I counted those as failures. A system that sometimes guesses right is not one that computes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The plumbing matters too. Rate-limit errors were being recorded as test failures, so I made the script save progress and resume later. GitHub also blocked a push because of a real API key in a template file, a good reminder to rotate any exposed credential, not just hide it.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What the numbers say&lt;/p&gt;

&lt;p&gt;The agent scored 10 to 11 out of 12 depending on the run. Those scores shift even at temperature zero, so I treat them as a rough range. Twelve cases are enough to find bugs, not to claim general reliability. The prototype also uses keyword search, invented policy data, and handles one claim at a time, so embedding-based search and multi-expense claims are my next steps.&lt;/p&gt;

&lt;p&gt;Takeaway&lt;/p&gt;

&lt;p&gt;Read the tool-call log before touching the prompt, test the process as well as the output, and report your results with the failures and limits included.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Read the full article:&lt;/strong&gt; &lt;a href="https://valentiuskryptix.com/3-surprising-failures-from-testing-my-ai-auditing-agent/" rel="noopener noreferrer"&gt;3 Surprising Failures from Testing My AI Auditing Agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code and test cases: &lt;a href="https://github.com/Yogendra404/expense-agent" rel="noopener noreferrer"&gt;https://github.com/Yogendra404/expense-agent&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>agents</category>
      <category>langgraph</category>
    </item>
    <item>
      <title>Building a RAG App That Knows When to Say "I Don't Know"</title>
      <dc:creator>Yogendra singh </dc:creator>
      <pubDate>Thu, 08 Oct 2026 06:58:08 +0000</pubDate>
      <link>https://dev.to/yogendra_singhjasawat_73/building-a-rag-app-that-knows-when-to-say-i-dont-know-1ji3</link>
      <guid>https://dev.to/yogendra_singhjasawat_73/building-a-rag-app-that-knows-when-to-say-i-dont-know-1ji3</guid>
      <description>&lt;h1&gt;
  
  
  Building a RAG App That Knows When to Say "I Don't Know"
&lt;/h1&gt;

&lt;p&gt;Large language models are impressive, but they answer confidently even when they have no idea. For my internship milestone at Valentius Kryptix, I set out to fix that by building a Retrieval-Augmented Generation (RAG) app: an assistant that answers only from a document I give it. RAG works by looking up the relevant text first and then asking the model to answer from it, which keeps answers grounded and checkable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;A small web app where you can chat with a set of machine learning study notes stored as a PDF. Ask "What test RMSE did the random forest reach?" and it replies from the notes and shows the source passage. Ask something unrelated, like the capital of France, and it politely says it could not find that in the documentation. You can try it here: &lt;a href="https://rag-study-assistant-fro0.onrender.com/" rel="noopener noreferrer"&gt;https://rag-study-assistant-fro0.onrender.com/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Chunk:&lt;/strong&gt; the PDF text is split into pieces of about 800 characters with a small overlap, so ideas are not cut in half.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embed:&lt;/strong&gt; each chunk is turned into a vector with a small open-source embedding model that runs locally, so no paid API is needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Index:&lt;/strong&gt; the vectors are stored in FAISS for fast similarity search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieve:&lt;/strong&gt; the user's question is embedded the same way, and the four closest chunks are fetched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate:&lt;/strong&gt; those chunks are sent to an LLM through Groq's API, with strict instructions to answer only from the context.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The backend is FastAPI, the interface is a single HTML page, and the whole thing is deployed on Render.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Retrieval quality decides everything.&lt;/strong&gt; Chunk size, overlap and a similarity threshold determine whether the app answers correctly or admits it does not know. A chunk that is too small loses context, and one that is too large buries the answer. Tuning the threshold is what made off-topic questions get refused.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompts are part of the product.&lt;/strong&gt; A clear system prompt, two few-shot examples and structured JSON output (an answer, an "answerable" flag and source numbers) made responses consistent and easy to cite.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shipping teaches the most.&lt;/strong&gt; Keeping API keys in environment variables, showing errors clearly in the interface, and debugging problems that only appeared on the server taught me more than any tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;I want to try chunking by headings, support several documents at once, and measure answer quality with a small set of test questions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the full article:&lt;/strong&gt; &lt;a href="https://valentiuskryptix.com/3-powerful-lessons-from-building-my-first-rag-powered-ai-app/" rel="noopener noreferrer"&gt;3 Powerful Lessons from Building My First RAG-Powered AI App&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>python</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
