<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jaya Prakash Yadav, Gorla on Medium]]></title>
        <description><![CDATA[Stories by Jaya Prakash Yadav, Gorla on Medium]]></description>
        <link>https://medium.com/@jayaprakash.gorla?source=rss-bff888115a73------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_0bnbagYIDoKX9Up</url>
            <title>Stories by Jaya Prakash Yadav, Gorla on Medium</title>
            <link>https://medium.com/@jayaprakash.gorla?source=rss-bff888115a73------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 19:21:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jayaprakash.gorla/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building an Agentic RAG System for Domain-Specific Question Answering]]></title>
            <link>https://medium.com/@jayaprakash.gorla/building-an-agentic-rag-system-for-domain-specific-question-answering-8276456a41c8?source=rss-bff888115a73------2</link>
            <guid isPermaLink="false">https://medium.com/p/8276456a41c8</guid>
            <dc:creator><![CDATA[Jaya Prakash Yadav, Gorla]]></dc:creator>
            <pubDate>Sun, 30 Nov 2025 21:09:51 GMT</pubDate>
            <atom:updated>2025-11-30T21:09:51.059Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A Multi-Tool Architecture Combining Retrieval, Scholarly Search, Summarization &amp; Guardrails.</em></p><p>Large Language Models (LLMs) are impressive, but even the most powerful models still struggle in <strong>knowledge-intensive, fast-changing technical domains</strong>. They hallucinate, miss crucial details, and fail when asked for information that lies outside their training data.</p><p>To address this, I built an <strong>Agentic Retrieval-Augmented Generation (RAG)</strong> system for the cleantech and renewable energy domain. In this space, factual accuracy and up-to-date information are essential. Unlike a typical RAG pipeline, this system uses multiple coordinated tools, each specializing in a different aspect of evidence retrieval, reasoning, verification, and synthesis.</p><p>This article breaks down how the system works, how it was extended through multiple stages, and why agentic RAG architectures are becoming essential for real-world AI applications.</p><p><strong>Why Cleantech Needs RAG (and Why RAG Needs Tools)</strong></p><p>Cleantech is a constantly evolving domain:</p><ol><li>new technologies</li><li>updated environmental regulations</li><li>policy reports</li><li>emerging scientific findings</li><li>media + academic sources scattered across the web</li></ol><p>A static LLM cannot reliably answer questions about such a fluid knowledge space. It needs:</p><ol><li><strong>retrieval</strong> of relevant documents</li><li><strong>scholarly evidence</strong> for technical claims</li><li><strong>summaries</strong> for long or noisy text</li><li><strong>guardrails</strong> to prevent unsupported statements</li></ol><p>This motivated the design of a multi-tool agent with the ability to orchestrate these components on demand.</p><p><strong>System Overview: Multi-Tool Agentic RAG</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kwO38nXdN6aHxCwQeI9aYQ.png" /><figcaption>Fig: Agentic RAG Architecture</figcaption></figure><p>The system integrates four major tools, controlled by an LLM-based agent:</p><ol><li><strong>Retriever (ChromaDB + MiniLM embeddings):</strong> A vector database built from <strong>20,111 cleantech media articles</strong>, chunked and embedded using all-MiniLM-L6-v2. Enables semantic search via cosine similarity.</li><li><strong>Summarizer: </strong>Condenses retrieved passages so the agent can reason on shorter, denser context.</li><li><strong>Scholarly Search (OpenAlex Tool): </strong>Fetches peer-reviewed scientific articles for highly technical questions.</li><li><strong>Guardrail Validator:</strong> Checks the draft answers for Factual accuracy, Missing evidence, Clarity issues, Safety risks and rewrites the answer if necessary.</li></ol><p><strong>Agent(LLM):</strong></p><p>The “brain” that decides: When to retrieve, When to summarize, When to bring in academic sources, When to validate the answer, and When the final response is ready.</p><h3><strong>Development in Three Parts:</strong></h3><p>The system evolved through three distinct phases, with measurable improvements at each step.</p><p><strong>Part 1: Baseline RAG</strong></p><p>The first version implemented a minimal RAG setup:</p><ol><li>ChromaDB retriever</li><li>Document summarizer</li><li>LLM generator</li><li>Vector index over 20,111 articles</li><li>Evaluation on a curated 23-question set</li></ol><p>It performed reasonably well but suffered from: Retrieval limitations, lack of external scientific evidence, and occasional hallucination.</p><p><strong>Part 2: Extended Agentic RAG</strong></p><p>Two Major tools were added here:</p><ol><li><strong>OpenAlex Scholarly Search:</strong> For technical topics where media articles were insufficient.</li><li><strong>Guardrail Validator: </strong>A crucial addition that filtered and corrected risky or unfounded answers.</li></ol><p><strong>Performance Gains:</strong></p><p>This stage produced clear improvements in ROUGE-L:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*Vgd0wvXHd43Q6BkL1qTkdQ.png" /><figcaption>Fig: Part 1 vs. Part 2</figcaption></figure><p>The improvement aligns with retrieval-augmented generation theory, more relevant evidence and better filtering will produce stronger generative answers.</p><p><strong>Part 3: Final System + CleanTech- 50 Benchmark</strong></p><p>The final system incorporated improved prompting, multi-step reasoning, and full tool orchestration.</p><p>It was evaluated on CleanTech-50, a 50-question benchmark requiring synthesis across multiple documents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*cFiWdGP_vaom2aioyC-mww.png" /><figcaption>Fig: Part 3</figcaption></figure><p>This demonstrates strong generalization beyond simple retrieval into multi-document reasoning.</p><p><strong>LLM-as-a-Judge Evaluation:</strong></p><p>Token-based metrics like ROUGE cannot fully evaluate Correctness, Clarity, reasoning, and factual grounding, so a GPT-4 class model was used to score answers from 1 to 5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*gH5Mu1HuApp6T5ZZX3-IlA.png" /><figcaption>Fig: LLM-as-a-Judge for Part 3</figcaption></figure><p>The four tools introduced successfully achieved the best model score. High semantic correctness confirms the success of the agent’s tool-driven workflow.</p><h3><strong>Key Insights About Agentic RAG</strong></h3><ol><li><strong>Multi-tool agents outperform single-tool RAG:</strong> Combining retrievers, summarizers, external search, and guardrails produces far more reliable results.</li><li><strong>Recall is more critical than precision: </strong>In RAG, missing relevant passages harms answers more than retrieving a few noisy ones.</li><li><strong>Guardrails significantly reduce hallucinations: </strong>They restrict the generator’s hypothesis space and push the answer toward factual grounding.</li><li><strong>Multi-document synthesis requires deeper reasoning: </strong>The final system performed well on cleanTech-50, a sign that the agent effectively combined evidence from many sources.</li><li><strong>LLM-as-a-Judge is essential for evaluation:</strong> Semantic correctness cannot be captured by lexical overlap alone.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8276456a41c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>