<?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: Abhinav Krishna K S</title>
    <description>The latest articles on DEV Community by Abhinav Krishna K S (@abhi18).</description>
    <link>https://dev.to/abhi18</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%2F4224073%2F8609ca04-4d67-4d14-abe8-ae6f281e27de.jpg</url>
      <title>DEV Community: Abhinav Krishna K S</title>
      <link>https://dev.to/abhi18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhi18"/>
    <language>en</language>
    <item>
      <title>My AI Agent Passed 10 of 12 Tests. The 2 Failures Taught Me More Than the 10.</title>
      <dc:creator>Abhinav Krishna K S</dc:creator>
      <pubDate>Fri, 20 Nov 2026 09:53:17 +0000</pubDate>
      <link>https://dev.to/abhi18/my-ai-agent-passed-10-of-12-tests-the-2-failures-taught-me-more-than-the-10-52k6</link>
      <guid>https://dev.to/abhi18/my-ai-agent-passed-10-of-12-tests-the-2-failures-taught-me-more-than-the-10-52k6</guid>
      <description>&lt;p&gt;I recently built a LangChain agent as part of my internship at Valentius Kryptix. Building it was the easy part. Measuring it honestly was where I learned something.&lt;/p&gt;

&lt;h2&gt;
  
  
  The agent
&lt;/h2&gt;

&lt;p&gt;CloudML Study Analyst answers questions about my ML course notes. Given a task like "explain server virtualization, then calculate the cost of 25 servers at $120 a month for a year", it retrieves from a ChromaDB store, calls a safe calculator, and returns a structured summary with page citations. It has three tools, a custom persona, and logs every step so I can see which tool it called and why.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test set
&lt;/h2&gt;

&lt;p&gt;I wrote 12 test cases covering multi-step tasks, missing data, out-of-scope questions, and error handling. Each case has expected tools and values, and it only passes if every check passes: tools used, tool order, output format, computed value, citation pages and more.&lt;/p&gt;

&lt;p&gt;The result was 10/12 (83.3%). The two failures were very different kinds of failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 1: the agent broke the rules
&lt;/h2&gt;

&lt;p&gt;Asked "What is the capital of France?", the agent replied in plain text. It decided no tool was needed, so it never called the summary tool and my structured output format collapsed. This was a real agent failure: the model followed its own judgment over my output contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 2: my test was wrong
&lt;/h2&gt;

&lt;p&gt;Given the invalid expression &lt;code&gt;5 +* 3&lt;/code&gt;, the agent handled it correctly and wrote "N/A (Invalid syntax)". My checker was looking for the word "error" and failed it. The agent was right and my evaluation was too strict.&lt;/p&gt;

&lt;p&gt;This is the lesson I would not have learned from manual testing. An eval harness is code too, and it has bugs. Reading the trace for each failure told me which side was at fault.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell another beginner
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Evaluate with expected outcomes, not vibes.&lt;/strong&gt; Even 12 cases exposed problems I had missed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log every tool call with its reason.&lt;/strong&gt; Traces turn "the agent did something weird" into a fixable bug.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add guardrails.&lt;/strong&gt; Loop limits, input validation and a rule to report missing data instead of inventing it. My agent correctly said the notes had no price per GB instead of making one up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publish your failures.&lt;/strong&gt; A documented 10/12 is more credible than an unmeasured "it works."&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The agent is live on Render (free tier, so the first request may take about a minute to wake up): &lt;a href="https://agentic-ai-workflow-ek5k.onrender.com/" rel="noopener noreferrer"&gt;https://agentic-ai-workflow-ek5k.onrender.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code is on GitHub: &lt;a href="https://github.com/KRISH18833/agentic-ai-workflow" rel="noopener noreferrer"&gt;https://github.com/KRISH18833/agentic-ai-workflow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the full article&lt;/strong&gt; with the architecture, tracing details and deployment notes: &lt;a href="https://valentiuskryptix.com/how-to-build-an-agentic-ai-workflow-from-seems-fine-to-a-measured-83-3-pass-rate/" rel="noopener noreferrer"&gt;https://valentiuskryptix.com/how-to-build-an-agentic-ai-workflow-from-seems-fine-to-a-measured-83-3-pass-rate/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbe6tnbyeimemryizbj4a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbe6tnbyeimemryizbj4a.png" alt="CloudML Study Analyst live demo showing the answer and agent trace" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>langchain</category>
    </item>
    <item>
      <title>Why my LangChain agent kept double-checking its own math</title>
      <dc:creator>Abhinav Krishna K S</dc:creator>
      <pubDate>Fri, 13 Nov 2026 08:48:43 +0000</pubDate>
      <link>https://dev.to/abhi18/why-my-langchain-agent-kept-double-checking-its-own-math-3g6k</link>
      <guid>https://dev.to/abhi18/why-my-langchain-agent-kept-double-checking-its-own-math-3g6k</guid>
      <description>&lt;p&gt;I built a small LangChain agent with three tools: a calculator, web search, and a Python code runner. The agent worked on the first try, until it didn't know when to stop.&lt;/p&gt;

&lt;p&gt;I asked it to multiply two large numbers. The calculator returned the correct answer, and then the agent re-checked it four more times with other tools until it hit the recursion limit. The answer was right every time. The loop was the bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;LangChain &lt;code&gt;create_agent&lt;/code&gt; (built on LangGraph) with &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;calculator&lt;/code&gt;: exact math using Python's &lt;code&gt;ast&lt;/code&gt; module, no &lt;code&gt;eval&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;web_search&lt;/code&gt;: live results through the &lt;code&gt;ddgs&lt;/code&gt; package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;python_repl&lt;/code&gt;: code execution in a subprocess with a 10-second timeout&lt;/li&gt;
&lt;li&gt;Every step logged as &lt;code&gt;[TOOL CALL]&lt;/code&gt;, &lt;code&gt;[TOOL RESULT]&lt;/code&gt; and &lt;code&gt;[FINAL ANSWER]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three fixes that made it reliable
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Rewrite the tool descriptions.&lt;/strong&gt;&lt;br&gt;
The agent chooses tools from their descriptions. Mine overlapped, so the model saw two tools that could do the same job. Saying "this result is final and exact" on the calculator and "do not use for simple arithmetic" on the code runner removed most of the confusion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Put guardrails in code, not only in the prompt.&lt;/strong&gt;&lt;br&gt;
A prompt rule like "don't re-verify results" was ignored by the smaller model. What worked was a loop guard in the run function that stops:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;repeated identical tool calls&lt;/li&gt;
&lt;li&gt;more than 3 calls to one tool&lt;/li&gt;
&lt;li&gt;2 errors in a row from the same tool&lt;/li&gt;
&lt;li&gt;more than 5 tool calls in total&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When a guard fires, the agent is forced to give a final answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Make tool failures return text.&lt;/strong&gt;&lt;br&gt;
Each tool wrapper catches its own exceptions and returns a string starting with &lt;code&gt;Error:&lt;/code&gt;. The agent then reads the failure like any other result and responds, instead of crashing the whole run.&lt;/p&gt;

&lt;h2&gt;
  
  
  One bug worth knowing about
&lt;/h2&gt;

&lt;p&gt;When a guard forced a final answer, the model once invented a number that was off by a few digits, even though the tool had returned the right one. The fix was to pass the latest successful tool result directly into the forcing message and tell the model to use those exact digits. Always compare the final answer with the tool output, not just the tool output with the truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the tests showed
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A general-knowledge question was answered directly with no tool call&lt;/li&gt;
&lt;li&gt;A large calculation used one calculator call&lt;/li&gt;
&lt;li&gt;"Find India's population, then compute people per km²" used web search, then the calculator, with the number found by the search&lt;/li&gt;
&lt;li&gt;A divide-by-zero and a forced network failure both ended in a clear message, not a crash&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;An agent is only as reliable as the guardrails around it. Clear tool descriptions, limits in code, and errors treated as data mattered more than the choice of model.&lt;/p&gt;

&lt;p&gt;I wrote up the full build, the test logs and the lessons in my longer article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the full article:&lt;/strong&gt; &lt;a href="https://valentiuskryptix.com/a-practical-guide-to-build-an-langchain-ai-agent-that-uses-its-own-tools/" rel="noopener noreferrer"&gt;https://valentiuskryptix.com/a-practical-guide-to-build-an-langchain-ai-agent-that-uses-its-own-tools/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code and logged runs: &lt;a href="https://github.com/KRISH18833/langchain-agent" rel="noopener noreferrer"&gt;https://github.com/KRISH18833/langchain-agent&lt;/a&gt;&lt;/p&gt;

</description>
      <category>langchain</category>
      <category>python</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Building a RAG System: Making AI Understand Your Documents</title>
      <dc:creator>Abhinav Krishna K S</dc:creator>
      <pubDate>Tue, 03 Nov 2026 10:58:46 +0000</pubDate>
      <link>https://dev.to/abhi18/building-a-rag-system-making-ai-understand-your-documents-56c2</link>
      <guid>https://dev.to/abhi18/building-a-rag-system-making-ai-understand-your-documents-56c2</guid>
      <description>&lt;p&gt;Large Language Models (LLMs) can generate impressive answers, but they have one important limitation: they may not know the information contained in your private documents. This is where &lt;strong&gt;Retrieval-Augmented Generation (RAG)&lt;/strong&gt; becomes useful.&lt;/p&gt;

&lt;p&gt;RAG combines document retrieval with AI-generated responses. Instead of depending only on information learned during training, an AI application can retrieve relevant content from a collection of documents and use it to answer questions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is Retrieval-Augmented Generation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieval-Augmented Generation is an approach that connects a language model to an external knowledge source. When a user asks a question, the system first searches for relevant information and then provides that information as context to the language model.&lt;/p&gt;

&lt;p&gt;This helps make responses more relevant to the documents being used and reduces the need to manually search through large files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exploring a Python-Based RAG Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a practical implementation, I explored a project called &lt;strong&gt;Cloud Notes RAG&lt;/strong&gt;, which demonstrates how users can ask questions about PDF documents.&lt;/p&gt;

&lt;p&gt;The project uses five PDF documents containing approximately 135 pages. It processes the documents, divides their text into smaller chunks, converts those chunks into embeddings, and stores them in ChromaDB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The main technologies used are:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python:&lt;/strong&gt; Handles document processing and application logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyPDF:&lt;/strong&gt; Extracts text from PDF documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Gemini API:&lt;/strong&gt; Generates embeddings and AI responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChromaDB:&lt;/strong&gt; Stores document embeddings and retrieves relevant information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamlit:&lt;/strong&gt; Provides an interactive user interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How Does the System Work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The workflow begins with PDF text extraction. The extracted text is divided into smaller chunks with overlapping content so that useful context is preserved.&lt;/p&gt;

&lt;p&gt;Next, the Gemini embedding model converts the text chunks into numerical representations called embeddings. These embeddings are stored in ChromaDB, which acts as the vector database.&lt;/p&gt;

&lt;p&gt;When a user submits a question, the system converts the question into an embedding and searches ChromaDB for relevant document sections. In this implementation, the six most relevant chunks are retrieved and passed to the Gemini language model as context.&lt;/p&gt;

&lt;p&gt;Finally, Gemini generates a response based on the retrieved information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Is RAG Useful?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RAG is useful for applications that need to work with specific information, such as technical documentation, study materials, company knowledge bases, and research documents.&lt;/p&gt;

&lt;p&gt;It can make information easier to access without requiring users to read entire documents manually.&lt;/p&gt;

&lt;p&gt;However, RAG systems still have limitations. Their answers depend on the quality of document extraction, retrieval, and the available context. For example, this project uses PyPDF for text extraction and does not currently implement OCR for image-only scanned documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Building a RAG system is a practical way to understand how document processing, vector databases, embeddings, and language models work together. Projects like Cloud Notes RAG demonstrate how Python, Gemini, and ChromaDB can be combined to create an interactive document question-answering application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the Full Article:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;[How to Build an AI Answers RAG with Gemini &amp;amp; ChromaDB][(&lt;a href="https://valentiuskryptix.com/how-to-build-an-ai-answers-rag-with-gemini-chromadb/)" rel="noopener noreferrer"&gt;https://valentiuskryptix.com/how-to-build-an-ai-answers-rag-with-gemini-chromadb/)&lt;/a&gt;]&lt;/p&gt;

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