<?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: Ijlal Haider</title>
    <description>The latest articles on DEV Community by Ijlal Haider (@ijlalxhaider).</description>
    <link>https://dev.to/ijlalxhaider</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%2F4113772%2F1056a6dc-6b4c-4979-9987-0b137225ceee.jpeg</url>
      <title>DEV Community: Ijlal Haider</title>
      <link>https://dev.to/ijlalxhaider</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ijlalxhaider"/>
    <language>en</language>
    <item>
      <title>Building 3 AI Agents on a $0 Budget: What I Learned About Tool-Use, RAG, and Code Execution</title>
      <dc:creator>Ijlal Haider</dc:creator>
      <pubDate>Mon, 07 Sep 2026 11:08:38 +0000</pubDate>
      <link>https://dev.to/ijlalxhaider/building-3-ai-agents-on-a-0-budget-what-i-learned-about-tool-use-rag-and-code-execution-2ejl</link>
      <guid>https://dev.to/ijlalxhaider/building-3-ai-agents-on-a-0-budget-what-i-learned-about-tool-use-rag-and-code-execution-2ejl</guid>
      <description>&lt;h2&gt;
  
  
  Why I built this
&lt;/h2&gt;

&lt;p&gt;I'm a CS graduate preparing for a Data Science/AI master's application, and I wanted &lt;br&gt;
to go beyond the usual coursework projects — Kaggle competitions, Coursera &lt;br&gt;
certificates — and actually build something that shows I understand how modern AI &lt;br&gt;
systems work under the hood, not just how to call an API.&lt;/p&gt;

&lt;p&gt;So I built three small agents, each demonstrating a different core pattern in how &lt;br&gt;
LLMs interact with the world: web search, retrieval over your own data, and live &lt;br&gt;
code execution. All three run entirely on Google Gemini's free tier — total cost: $0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent 1: Research Assistant (tool-use)
&lt;/h2&gt;

&lt;p&gt;The simplest and most foundational pattern: give the model a tool and let it decide, &lt;br&gt;
on its own, when it actually needs to use it. I used Gemini 2.5 Flash as the LLM and &lt;br&gt;
DuckDuckGo search (via the free &lt;code&gt;ddgs&lt;/code&gt; Python package, no API key needed) as the tool.&lt;/p&gt;

&lt;p&gt;The agent doesn't search for everything — it only calls the &lt;code&gt;web_search&lt;/code&gt; tool when &lt;br&gt;
it judges that it needs current or specific information it isn't confident about, &lt;br&gt;
and answers directly from its own knowledge otherwise. This matters because a naive &lt;br&gt;
"always search" agent wastes calls and can actually produce worse answers by &lt;br&gt;
grounding itself in irrelevant search results for questions it already knew the &lt;br&gt;
answer to. Getting this decision right — teaching the model when &lt;em&gt;not&lt;/em&gt; to use a &lt;br&gt;
tool — turned out to be as important as the tool integration itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent 2: RAG Q&amp;amp;A (retrieval-augmented generation)
&lt;/h2&gt;

&lt;p&gt;The difference between an agent that "knows things" from training and one that &lt;br&gt;
looks them up in real, specific source material. This agent ingests your own &lt;br&gt;
documents (notes, articles, anything in &lt;code&gt;.txt&lt;/code&gt;/&lt;code&gt;.md&lt;/code&gt; format), splits them into &lt;br&gt;
overlapping chunks, and embeds each chunk into a vector using Gemini's embedding &lt;br&gt;
model. Those vectors get stored locally in ChromaDB — no hosted database, runs &lt;br&gt;
entirely on your own machine.&lt;/p&gt;

&lt;p&gt;When you ask a question, it's embedded the same way, and the database finds the &lt;br&gt;
chunks whose meaning is closest to your question. Only those chunks are handed to &lt;br&gt;
Gemini as context, and it's instructed to answer using &lt;em&gt;only&lt;/em&gt; that context, citing &lt;br&gt;
which file it came from. This grounding is what reduces hallucination — the model &lt;br&gt;
isn't guessing from general training data, it's answering from your actual source &lt;br&gt;
material, and it's honest when the answer isn't in there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent 3: Data Analysis Agent (code execution)
&lt;/h2&gt;

&lt;p&gt;Instead of trusting the model's own arithmetic (LLMs are notoriously unreliable at &lt;br&gt;
exact calculations), this agent writes real pandas code and executes it against a &lt;br&gt;
CSV you give it, then reports the actual computed result — not a guess. You ask a &lt;br&gt;
question in plain English ("what's the average fare by passenger class?"), the &lt;br&gt;
model translates that into pandas code, the code actually runs, and you get a &lt;br&gt;
verifiable answer rather than a black-box one. This is the same underlying idea as &lt;br&gt;
tools like ChatGPT's Code Interpreter, just built from scratch to understand how it &lt;br&gt;
actually works.&lt;/p&gt;

&lt;h2&gt;
  
  
  What tied all three together
&lt;/h2&gt;

&lt;p&gt;All three agents share the same underlying pattern: the model decides when to call &lt;br&gt;
a tool, uses it, then reasons over the result. The main thing that surprised me was &lt;br&gt;
how much of the real engineering effort wasn't the "AI" part — it was the boring &lt;br&gt;
plumbing: handling free-tier rate limits gracefully, chunking documents sensibly, &lt;br&gt;
deciding what to exclude from version control. The actual "make an LLM call a tool" &lt;br&gt;
logic was often the easiest part; making it work reliably and cheaply was where the &lt;br&gt;
real learning happened.&lt;/p&gt;

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

&lt;p&gt;All three repos are public on GitHub, along with an overview repo tying them together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ijlalXhaider/Research-Agent" rel="noopener noreferrer"&gt;Research / Study Assistant Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ijlalXhaider/RAG-QA-AGENT" rel="noopener noreferrer"&gt;RAG Q&amp;amp;A Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ijlalXhaider/data-analysis-agent" rel="noopener noreferrer"&gt;Data Analysis Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ijlalXhaider/ai-agents-portfolio" rel="noopener noreferrer"&gt;Overview / Portfolio repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building something similar on a student budget: Gemini's free tier is &lt;br&gt;
genuinely usable for small projects like this — you don't need to spend anything to &lt;br&gt;
learn how agentic systems actually work.&lt;/p&gt;

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