<?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 Alp Karaagac on Medium]]></title>
        <description><![CDATA[Stories by Alp Karaagac on Medium]]></description>
        <link>https://medium.com/@alp.karaagac02?source=rss-e1d95ba0efe5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-nWftXgd0eZHljWO</url>
            <title>Stories by Alp Karaagac on Medium</title>
            <link>https://medium.com/@alp.karaagac02?source=rss-e1d95ba0efe5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:06:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alp.karaagac02/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[Hybrid Questions need Hybrid Retrieval]]></title>
            <link>https://medium.com/@alp.karaagac02/hybgrag-retrieval-on-semi-structured-knowledge-bases-86d904cfa8e4?source=rss-e1d95ba0efe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/86d904cfa8e4</guid>
            <category><![CDATA[skb]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[grag]]></category>
            <dc:creator><![CDATA[Alp Karaagac]]></dc:creator>
            <pubDate>Wed, 11 Feb 2026 10:19:38 GMT</pubDate>
            <atom:updated>2026-02-27T22:18:08.204Z</atom:updated>
            <content:encoded><![CDATA[<h4>HybGRAG: A new way to ground outputs with both Graphs and Texts.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*IzR9R86kqmQdjfYI.png" /><figcaption>Figure 1: HybGRAG solves hybrid questions in semi structured knowledge bases — <a href="https://arxiv.org/html/2412.16311v1">HybGRAG Paper</a></figcaption></figure><p>Retrieval has helped models produce more accurate results by connecting them to data and knowledge bases. Usually, retrieval methods are sorted by how they store information. The main types are:</p><ul><li><strong>RAG </strong>→ search chunks of text</li><li><strong>GraphRAG / KG‑QA</strong> → traverse entities and relations</li></ul><p>In practice, data is rarely stored as only text or as neat entities and relations. It is often messy, and creating a well-organized knowledge base can be hard and time-consuming.</p><p>Often, you have documents, entities, relations, text linked to entities, some structure, and some missing structure, all mixed together. The real question is whether we can use this messier setup to ground and retrieve information.</p><p>This combination is called a <strong>Semi-Structured Knowledge Base (SKB)</strong>. The HybGRAG paper examines how to use SKBs in real-world settings.<br>Source: <a href="https://arxiv.org/html/2412.16311v1">HybGRAG paper</a></p><h3>The question that breaks “pure RAG”</h3><p>Let’s consider a specific question. It looks simple at first, but it can actually be hard for a retriever to answer:</p><blockquote><em>“Which papers that introduce a new dataset for Hybrid Question Answering have been authored by John Smith?”</em></blockquote><p>First, think about why a retriever can still struggle here.</p><h4><strong>Because the requirements are spread out and not always clear.</strong></h4><ul><li>“John Smith” might appear in the author list (good)</li><li>…but also in acknowledgements (misleading)</li><li>…or in “related work” (noise)</li><li>while “introduces a new dataset” is often described only in certain sections or attached summaries</li></ul><p>As a result, the retriever might find passages with the right words but still miss the real point of the question.</p><h4><strong>Because graphs often do not contain all the information you need.</strong></h4><p>Even if your KG encodes Author → wrote → Paper, it may not encode:</p><ul><li>“introduces a new dataset.”</li><li>“This dataset is for hybrid QA.”</li></ul><p>Those facts are usually found in the attached text, not in neat triples. This is where SKBs are useful, so why not use both approaches?</p><h3>SKBs in one sentence</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*KusZ1pykAH5JgkVx.png" /><figcaption>Figure 2: An example SKB from STaRK in the academic domain. — <a href="https://stark.stanford.edu/index.html">STaRK Website</a></figcaption></figure><p>An SKB is a knowledge base where:</p><ul><li>You have a typed graph (entities + relations), and</li><li>You also have textual fields/documents linked to entities, and</li><li>questions often require mixing both.</li></ul><p>You do not have to choose between RAG and graphs. Instead, you can use both, depending on the situation.</p><h3>The trap: “Just combine graph + text”</h3><p>The first thing that comes to mind is:</p><ol><li>Retrieve some nodes/paths.</li><li>Retrieve some chunks.</li><li>Dump everything into the prompt.</li><li>And then hope the LLM ignores the irrelevant information.</li></ol><p>But the paper argues that without coordination, this approach often creates a long, noisy context and still misses important requirements because retrieval is not guided by the question in a structured way. Below I also test this Kitchen Sink method.</p><h3>Enter HybGRAG</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qo86oLS-9Kl_ieqMmqGKCA.png" /><figcaption>Figure 3: HybGRAG Workflow — Generated by ChatGPT</figcaption></figure><p>HybGRAG is not just another embedding method. It is a workflow designed for SKBs:</p><ol><li><strong>Question routing:</strong> decide which evidence source to use</li><li><strong>Critique and correction:</strong> detect when retrieval fails, then fix the cause, not just the final answer</li></ol><p>That’s the main idea behind HybGRAG.</p><h3>Part 1: Question routing — Which retriever should I use this time?</h3><h4>Given a question, HybGRAG tries to infer whether it should:</h4><ul><li>Rely primarily on text retrieval (vector similarity search, VSS), or</li><li>Run a hybrid process that uses graph constraints to narrow down candidates, then ranks the attached text.</li></ul><p>This matters because different questions may need different retrieval methods.</p><p>The HybGRAG paper reports a simple but revealing analysis on STaRK-MAG:</p><ul><li>Text retriever (VSS): Hit@1 ≈ 0.2908</li><li>Graph retriever (PPR): Hit@1 ≈ 0.2533</li><li>“Optimal routing” (oracle picks the better one per query): Hit@1 ≈ 0.4522</li></ul><p>This difference highlights an important point from the paper:</p><blockquote><em>Use the right retrieval method for each specific need, rather than focusing on a single approach.</em></blockquote><h3>Part 2: Hybrid retrieval — symbolic narrowing and semantic ranking</h3><h4>The idea is to first narrow down the options using structure, then rank them by meaning.</h4><p>A simple way to think about it:</p><ul><li>Identify topic entities / constraints.</li><li>Pull a local ego-graph neighborhood (small hop distance).</li><li>If multiple constraints exist, intersect candidate sets.</li><li>Then, retrieve / rank the documents attached to candidate entities using VSS.</li></ul><p>The graph helps avoid picking up random mentions of “John Smith,” while the text helps find facts that the graph does not include directly.</p><h3>Part 3: The critic — “Why did retrieval fail?”</h3><p>Most retrieval systems fail without giving a clear reason. HybGRAG aims to make failures useful by identifying mistakes and suggesting fixes.</p><h4>Critic has two roles:</h4><ul><li><strong>Validator:</strong> “Does the retrieved evidence satisfy the question constraints?”</li><li><strong>Commenter:</strong> “If not, what exactly went wrong, and how should the router adjust?”</li></ul><h4>The commenter feedback is meant to be structured enough that you can iterate:</h4><ul><li>wrong entity extraction</li><li>wrong relation choice</li><li>wrong modality choice (text vs graph vs hybrid)</li><li>neighborhood too broad / too narrow</li><li>ranking too weak</li></ul><p>This design creates a trace you can actually inspect:</p><blockquote><strong><em>Router decision → retrieval → validator verdict → commenter feedback → refined routing</em></strong></blockquote><p>This clear record is helpful when working with SKBs because their failures are often possible to diagnose.</p><h3>Results: What evidence supports the claims?</h3><p>If HybGRAG is “just” routing + critique, then the obvious question is:</p><blockquote><em>Does the evidence actually show that routing and critique are doing real work (beyond fancy prompting)?</em></blockquote><p>The paper evaluates HybGRAG in two complementary ways:</p><ol><li>Retrieval-only evaluation on STaRK (retrieve the right node/doc)</li><li>End-to-end RAG evaluation on CRAG (generate an answer and score correctness/hallucination)</li></ol><p>Primary source for all numbers/tables below: <a href="https://arxiv.org/html/2412.16311v1">HybGRAG paper</a></p><h3>1) Retrieval evaluation on STaRK: Does HybGRAG retrieve the right thing?</h3><p>STaRK is a node retrieval benchmark built around Semi-structured Knowledge Bases (SKBs). This means that the answers are entities in the graph. HybGRAG evaluates on two STaRK datasets:</p><ul><li><strong>STaRK-MAG</strong> (academic paper search): 4 entity types, 4 relation types, average node degree 43.5.<br><a href="https://stark.stanford.edu/dataset_mag.html">Dataset stats</a></li><li><strong>STaRK-Prime</strong> (biomed / precision medicine): 10 entity types, 18 relation types, average node degree 125.2.<br><a href="https://stark.stanford.edu/dataset_prime.html">Dataset stats</a></li></ul><p>These stats matter because Prime is much denser and more heterogeneous than MAG, which changes the “graph narrowing vs text recall” trade-off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*72H39KbmQOxTYL2uWm44jw.png" /><figcaption>Table 1: Results of the evaluation from <a href="https://arxiv.org/pdf/2404.13207">HybGRAG Paper</a> (* implies that only 10% of the test questions were evaluated due to cost/latency)</figcaption></figure><p>As you can see HybGRAG outperforms all existing solutions and models on STaRK. However the general performance, especially on STaRK Prime which is more denser is still low. HybGRAG authors mention this as well that HybGRAG doesn’t explicitly solve or help in domain adaptation.</p><p>One detail to note: on Prime, the Hybrid Retrieval Module improves top-1 results a lot, but its Recall@20 is not better than VSS. Aggressive graph narrowing can help precision at the top but reduce breadth. HybGRAG’s routing and critique then help recover recall.</p><h3>2) Ablations: Is everything actually necessary?</h3><p>The biggest token usage comes from feedback and thus the critic module. The paper includes experiments regarding weaker versions of the critic instead of the structured feedback that includes curated examples.</p><ul><li>Validator without a validation context (so it judges with less constraint information)</li><li>Commenter with only 5 shots (weaker corrective feedback)</li><li>Oracle (uses ground-truth judgments during inference)</li></ul><p><em>You can check the metrics in the Appendix with their explanations.</em></p><p><strong>For STaRK-MAG Hit@1:</strong></p><ul><li>w/o context (ICL): 0.6105</li><li>w/ context (5-shot): 0.6465</li><li>full HybGRAG (w/ context + ICL): 0.6540</li><li>oracle: 0.7193</li></ul><p><strong>For STaRK-Prime Hit@1:</strong></p><ul><li>w/o context (ICL): 0.1946</li><li>w/ context (5-shot): 0.2406</li><li>full HybGRAG: 0.2856</li><li>oracle: 0.3606</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*KiY6euItWPbQ3MLTXueiFw.png" /><figcaption>Figure 4: Experiment on the number of iterations with feedback — <a href="https://arxiv.org/pdf/2404.13207">HybGRAG Paper</a></figcaption></figure><p>Also, 2–3 iterations usually get you most of the gain: the biggest jump is from 1 → 2 iterations; later iterations help less.</p><h3>3) Interpretability: why HybGRAG is easier to debug</h3><p>HybGRAG’s router→critic loop produces an explicit trace, and the paper shows concrete examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UG33KHBUrIMgbD99YTCQRQ.png" /><figcaption>Figure 5: Examples of traces of the errors — <a href="https://arxiv.org/pdf/2404.13207">HybGRAG Paper</a></figcaption></figure><p>Even if you disagree with every design choice, having this refinement trace is genuinely helpful.</p><h3>4) Token usage and API calls: what does it cost?</h3><ul><li>The practical costs of HybGRAG are reported as API calls per iteration and token usage for both STaRK and CRAG. For HybGRAG, the main driver of token usage is in context examples within routing and feedback modules. However, as a chat LLM is used for the router, few-shot examples are provided only once.</li><li>Unlike heavy training models such as AVATAR (500 API calls during training), HybGRAG requires far fewer API calls and achieves large gains without any training.</li><li>So the trade off here is: Training once or Multi-step LLM Calls.</li></ul><h4><em>HybGRAG’s gains aren’t “because it used a graph” or “because it used reflection.”<br>The real advantage comes from combining graph and text retrieval with a critic that gives useful, actionable feedback.</em></h4><h3>My implementation: Does the story survive contact with code?</h3><p>After reading the paper, I wanted to check whether the same high-level story shows up in a lightweight reproduction. Not “rebuild HybGRAG exactly” (there is no official public repo linked — so vibe coding it is), but reproduce the <em>shape</em>:</p><ul><li>Text-only baseline (VSS)</li><li>Hybrid retrieval baseline (graph restrict → VSS rerank)</li><li>Kitchen sink baseline (graph paths + text chunks dumped together)</li><li>HybGRAG-like loop (router + critic + at most 2 iterations)</li></ul><p>I ran this on <strong>STaRK-MAG</strong> with precomputed embeddings and evaluated the mean performance over a small query subset.</p><h3>Code + repo</h3><p>I’m publishing the experiment code here:</p><ul><li>Repo: <a href="https://github.com/AlpKaraagac/MediumBlog-HybGRAG">https://github.com/AlpKaraagac/MediumBlog-HybGRAG</a></li></ul><p>Instead of aiming for a full paper reproduction, I focused on a minimal experiment setup that I could run quickly, inspect easily, and explain clearly. I wanted to also compare the dump everything method (Kitchen Sink) and the more thought HybGRAG workflow.</p><pre>pip install -U stark-qa torch tqdm <br>python run_retrieval_experiments.py --print-config <br>python run_retrieval_experiments.py --with-llm</pre><p>From there, I ran a compact sweep: VSS, HybridRM, a HybGRAG-shaped router+critic loop, and a kitchen-sink baseline, with Gemini-based LLM (Gemini-3-flash-preview) variants. I logged per-query outputs to JSONL and used the summary table (MRR, Hit@1, Hit@5, Recall@20) to compare behavior before moving on to the results section.</p><h3>My results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*dOFOyBcQvu_MeusHAPcAFA.png" /><figcaption>Table 2: Results from my experiments vs. the paper</figcaption></figure><p>You can find my configurations below in the appendix. I ran 100 queries without the LLM and 50 queries per experiment with LLM.</p><h3>What I learned from these numbers</h3><p><strong>1) Hybrid Retrieval Model (HybridRM) alone was not a free win (it dropped).</strong><br>In this implementation, “graph restrict → rerank” was worse than VSS across the board. The most plausible explanation is brittleness: if seed choice or traversal assumptions are off, narrowing collapses the candidate set or biases it too hard, and reranking cannot recover. This reinforced a key HybGRAG point: hybrid retrieval needs good routing + correction around it.</p><p><strong>2) The naive kitchen sink baseline only helped once an LLM was allowed to rank.</strong><br>Without an LLM ranker, the kitchen sink looked essentially identical to VSS. That matches the intuition: if you “combine graph and text” but still rank only by similarity, you are not really exploiting the graph evidence.</p><p>With an LLM ranker, performance improved meaningfully.</p><p><strong>3) A weak critic (threshold) does not add much.</strong><br>Router+Critic (threshold) stayed roughly at VSS levels. A similarity threshold is not a real constraint checker — it cannot reliably detect “this evidence violates the question requirements,” which is what HybGRAG’s validator/commenter is designed to do.</p><p><strong>4) Once an LLM evaluates evidence, both approaches improved similarly on this small subset.</strong><br>On the 50-query LLM runs, both “LLM Router + LLM Validator” and “KitchenSink + LLM Ranker” moved Hit@1 from 0.28 → 0.32 and MRR from ~0.39 → ~0.43, with essentially identical Hit@5 and Recall@20. On small samples, a strong LLM ranker can patch over a lot of retrieval mess; HybGRAG’s deeper advantage likely shows up more clearly when the pool is noisier, and you care about control, debugging, and cost.</p><h3>So what did I get that is comparable to the paper?</h3><p>The paper reports a clean ladder on STaRK-MAG:</p><p><strong>text-only → hybrid module → full HybGRAG</strong>.</p><p>My quick reproduction did <strong>not</strong> reproduce that ladder out of the box especially not for HybridRM. However, it did reproduce the core qualitative lesson:</p><ul><li>“Just add graph retrieval” is not automatically better.</li><li>Improvements appear when you add a component that can <strong>judge evidence quality</strong> and <strong>adapt retrieval behavior</strong>.</li><li>Naive graph+text concatenation can work, but it is noisy and unstable unless you add a good ranker/critic.</li></ul><p>That is the practical conclusion I took away: the method is less about “graphs” and more about <strong>coordination + correction</strong> in a messy SKB setting.</p><h3>So when would I use HybGRAG?</h3><p>I’d use HybGRAG when my knowledge is genuinely semi-structured and I need the hybrid retrieval from both textual and graphical knowledge.</p><p>Concretely, HybGRAG is a good fit when:</p><ul><li><strong>Text-only RAG is too fuzzy.</strong></li><li><strong>Graph-only retrieval is too thin.</strong></li><li><strong>My queries are mixed — need for graph or text depends on the query.</strong></li></ul><p>I probably wouldn’t use HybGRAG if everything is basically documents, or if my KG already encodes the answer-critical information.</p><ul><li>Lee, M.-C., Zhu, Q., Mavromatis, C., et al. <a href="https://arxiv.org/abs/2412.16311"><em>HybGRAG: Hybrid Retrieval-Augmented Generation on Textual and Relational Knowledge Bases</em></a><em>.</em> arXiv:2412.16311 (2024).</li><li>Wu, S., et al. <a href="https://arxiv.org/abs/2404.13207"><em>STaRK: Benchmarking LLM Retrieval on Textual and Relational Knowledge Bases</em></a><em>.</em> NeurIPS 2024 (Datasets &amp; Benchmarks); arXiv:2404.13207.</li><li>Yang, X., et al. <a href="https://arxiv.org/abs/2406.04744"><em>CRAG: Comprehensive RAG Benchmark</em></a><em>.</em> NeurIPS 2024 (Datasets &amp; Benchmarks); arXiv:2406.04744.</li><li>Zou Group, et al. <a href="https://cs.stanford.edu/people/jure/pubs/avatar-neurips24.pdf"><em>AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning</em></a><em>.</em> NeurIPS 2024.</li><li>Peng, B., et al. <a href="https://arxiv.org/abs/2408.08921"><em>Graph Retrieval-Augmented Generation: A Survey</em></a><em>.</em> arXiv:2408.08921 (2024).</li></ul><h3><strong>Appendix A:</strong></h3><h4>Experiment Metrics:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*feiiF1dLT_zJFopipn4MjA.png" /><figcaption>Table 3: Metrics used in experiments.</figcaption></figure><h4>My experiment configs:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*IUnZ_0l4nZnUTen31ZJFVw.png" /><figcaption>Table 4: Configs of my experiments</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86d904cfa8e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>