<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>wbq-321 | UCSC OSPO</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/wbq-321/</link><atom:link href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/wbq-321/index.xml" rel="self" type="application/rss+xml"/><description>wbq-321</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Fri, 05 Sep 2025 00:00:00 +0000</lastBuildDate><image><url>https://deploy-preview-1007--ucsc-ospo.netlify.app/media/logo_hub6795c39d7c5d58c9535d13299c9651f_74810_300x300_fit_lanczos_3.png</url><title>wbq-321</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/wbq-321/</link></image><item><title>Final Report: A Systematic Investigation into the Reproducibility of RAG Systems</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/pnnl/llm_rag_reproducibility/20250905-wbq321/</link><pubDate>Fri, 05 Sep 2025 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/pnnl/llm_rag_reproducibility/20250905-wbq321/</guid><description>&lt;p>I&amp;rsquo;m Baiqiang, and this is the final report for the &lt;a href="https://ucsc-ospo.github.io/project/osre25/pnnl/llm_rag_reproducibility/" target="_blank" rel="noopener">Enhancing Reproducibility in RAG Frameworks for Scientific Workflows&lt;/a> project, mentored by Luanzheng &amp;ldquo;Lenny&amp;rdquo; Guo and Dongfang Zhao. This project successfully developed a novel framework to quantitatively measure reproducibility in AI systems, yielding several surprising and impactful results.&lt;/p>
&lt;h3 id="the-challenge-the-need-for-systematic-measurement">The Challenge: The Need for Systematic Measurement&lt;/h3>
&lt;p>Retrieval-Augmented Generation (RAG) is a cornerstone of AI for science, but its reliability is often compromised by non-determinism. While this issue was a known concern, a fundamental challenge was the lack of standardized tools and methodologies to systematically measure and quantify the sources of this inconsistency. Without a rigorous way to analyze the problem, it was difficult to move beyond ad-hoc tests and establish the true root causes, hindering the development of truly trustworthy AI systems for science.&lt;/p>
&lt;h3 id="our-contribution-the-reprorag-framework">Our Contribution: The ReproRAG Framework&lt;/h3>
&lt;p>To address this gap, the central contribution of this project is &lt;strong>ReproRAG&lt;/strong>, a comprehensive, open-source benchmarking framework. ReproRAG is designed to systematically investigate sources of uncertainty across the entire RAG pipeline by:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Isolating Variables:&lt;/strong> It allows for controlled experiments on embedding models, numerical precision, retrieval algorithms, hardware configurations (CPU/GPU), and distributed execution environments.&lt;/li>
&lt;li>&lt;strong>Quantifying Uncertainty:&lt;/strong> It employs a suite of metrics—including Exact Match Rate, Jaccard Similarity, and Kendall&amp;rsquo;s Tau—to precisely measure the impact of each variable on the final retrieved results.&lt;/li>
&lt;/ul>
&lt;h3 id="key-findings-a-new-hierarchy-of-uncertainty">Key Findings: A New Hierarchy of Uncertainty&lt;/h3>
&lt;p>Our large-scale empirical study using ReproRAG challenged common assumptions and established a clear hierarchy of what actually impacts reproducibility.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Core Algorithms Are Not the Problem:&lt;/strong> Our most surprising finding is that modern retrieval libraries like FAISS are perfectly reproducible out-of-the-box. Across all tested index types (including approximate ones like HNSW and IVF) and execution environments (single-node CPU/GPU and multi-node distributed systems), we achieved perfect run-to-run reproducibility (1.000 scores on all metrics) when environmental factors like random seeds were controlled. This falsifies the common hypothesis that approximate nearest neighbor algorithms are a primary source of randomness.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Embedding Model Choice is a Dominant Source of Variation:&lt;/strong> We found that the choice of the embedding model is a dominant factor driving result variation. When comparing outputs from different state-of-the-art models (BGE, E5, Qwen) for the same query, the agreement was very low (e.g., Overlap Coefficient of ~0.43-0.54). This means a scientific conclusion drawn with one model may not be reproducible with another, as they are fundamentally &amp;ldquo;seeing&amp;rdquo; different evidence.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Environmental Factors Introduce Measurable &amp;ldquo;Drift&amp;rdquo;:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Numerical Precision:&lt;/strong> Changing floating-point precision (e.g., FP32 vs. FP16) was a guaranteed source of variation, but it caused a small and quantifiable &amp;ldquo;embedding drift&amp;rdquo; rather than chaotic changes.&lt;/li>
&lt;li>&lt;strong>Data Insertion:&lt;/strong> Incrementally adding new data to an index caused a predictable &amp;ldquo;displacement&amp;rdquo; of old results, not a re-shuffling. The relative ranking of the remaining original documents was perfectly stable (Kendall&amp;rsquo;s Tau of 1.000).&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Common Determinism Flags Can Be Ineffective:&lt;/strong> Our tests showed that popular software-level controls, like &lt;code>cudnn.deterministic&lt;/code> flags in PyTorch, had no observable effect on the output of modern transformer-based embedding models. This underscores the necessity of empirical validation over assuming that framework settings work as advertised.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h3 id="conclusion">Conclusion&lt;/h3>
&lt;p>This project successfully shifted the focus of the RAG reproducibility problem. The key challenge is not to fix supposedly &amp;ldquo;random&amp;rdquo; algorithms, but to rigorously control the entire experimental environment. We delivered &lt;strong>ReproRAG&lt;/strong>, a framework that empowers researchers to do just that. Our findings provide actionable insights for the community: efforts to improve reproducibility should focus less on the retrieval algorithms themselves and more on disciplined management of embedding models, data versioning, and numerical precision.&lt;/p></description></item><item><title>Mid-Term Report: Uncovering the True Sources of Non-Reproducibility in AI for Science</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/pnnl/llm_rag_reproducibility/20250725-wbq321/</link><pubDate>Fri, 01 Aug 2025 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/pnnl/llm_rag_reproducibility/20250725-wbq321/</guid><description>&lt;p>Hello, I&amp;rsquo;m Baiqiang. I’m excited to share a mid-term update from the &lt;a href="https://ucsc-ospo.github.io/project/osre25/pnnl/llm_rag_reproducibility/" target="_blank" rel="noopener">Enhancing Reproducibility in RAG Frameworks for Scientific Workflows&lt;/a> project. This journey, mentored by Luanzheng &amp;ldquo;Lenny&amp;rdquo; Guo and Dongfang Zhao, has taken a fascinating and unexpected turn, leading to a much deeper understanding of what it takes to build truly reliable AI for science.&lt;/p>
&lt;h3 id="the-search-for-an-invisible-bug">The Search for an Invisible Bug&lt;/h3>
&lt;p>As a quick recap, our project tackles the critical problem of &lt;strong>non-determinism&lt;/strong> in Retrieval-Augmented Generation (RAG) systems. For science to be trustworthy, it must be repeatable. If an AI system gives different answers to the same question, it fails this fundamental test. Our initial goal, outlined in my &lt;a href="https://www.overleaf.com/read/fcbxtpngdnhw#8cc2c8" target="_blank" rel="noopener">proposal&lt;/a>, was to find and fix the sources of this inconsistency, which we believed lay within the retrieval algorithms themselves.&lt;/p>
&lt;p>To do this, we built a comprehensive testing framework capable of running thousands of controlled experiments. We designed it to meticulously measure the consistency of retrieval results while varying everything from the indexing algorithm to the underlying hardware.&lt;/p>
&lt;h3 id="a-surprising-discovery-the-usual-suspect-is-innocent">A Surprising Discovery: The Usual Suspect is Innocent&lt;/h3>
&lt;p>The common wisdom in the community is that high-performance, approximate search libraries like FAISS are a major source of randomness. We put this to the test, running repeated queries against various index types, including complex ones like &lt;code>HNSW&lt;/code> and &lt;code>IndexIVF&lt;/code>.&lt;/p>
&lt;p>Our results were clear and surprising: &lt;strong>FAISS is remarkably reproducible out of the box.&lt;/strong> When run on a consistent hardware and software stack, it returns the exact same results, every single time. The library appears to have robust internal seed management that ensures deterministic behavior.&lt;/p>
&lt;p>This finding was a pivotal moment. The non-reproducibility that researchers observe in practice is real, but it doesn&amp;rsquo;t come from where we expected. The problem isn&amp;rsquo;t the algorithm itself, but the environment it runs in. Our investigation immediately shifted to find the real culprits.&lt;/p>
&lt;h3 id="pinpointing-the-true-sources-of-non-determinism">Pinpointing the True Sources of Non-Determinism&lt;/h3>
&lt;p>Our framework quickly helped us identify the true sources of inconsistency:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Hardware-Induced Variation (CPU vs. GPU):&lt;/strong> This is the most significant factor. Running the exact same retrieval code can produce different document rankings and even different document sets when executed on a CPU versus a GPU. This is likely due to subtle differences in floating-point arithmetic and library optimizations in the hardware stack.&lt;/li>
&lt;li>&lt;strong>The Impact of Numerical Precision:&lt;/strong> We also confirmed that changing the floating-point precision of the data (e.g., from FP32 to FP16) can introduce small numerical variations that are just large enough to reorder the results, potentially changing the evidence the LLM receives.&lt;/li>
&lt;/ol>
&lt;h3 id="our-mission-refined-building-tools-for-environmental-control">Our Mission Refined: Building Tools for Environmental Control&lt;/h3>
&lt;p>This discovery has sharpened our project&amp;rsquo;s mission. The challenge is not to &amp;ldquo;fix&amp;rdquo; a supposedly random algorithm, but to develop the tools and best practices to control for the entire experimental environment. Our focus for the second half of the project is to:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Develop a Hardware-Aware Configuration Tracker:&lt;/strong> We are building a tool that goes beyond logging software versions. It will capture the critical details of the hardware environment—CPU/GPU model, CUDA version, etc.—and link them directly to an experiment&amp;rsquo;s results.&lt;/li>
&lt;li>&lt;strong>Create a Cross-Environment Validation Suite:&lt;/strong> Our open-source benchmarking suite will empower researchers to test their own pipelines. Crucially, it will help them identify and diagnose inconsistencies when moving workflows between different machines, such as from a local laptop to a cloud-based GPU.&lt;/li>
&lt;li>&lt;strong>Establish New Best Practices:&lt;/strong> We will distill our findings into clear, actionable guidance. The key recommendation is no longer just about choosing the right algorithm, but ensuring a consistent and well-documented hardware and software environment to guarantee reproducible outcomes.&lt;/li>
&lt;/ol>
&lt;p>By following the evidence, we’ve uncovered the root cause of a critical problem in AI-driven research. We are now developing the solutions needed to manage it, paving the way for a future where scientific discoveries powered by AI are built on a foundation of verifiable trust.&lt;/p></description></item><item><title>Enhancing Reproducibility in RAG Frameworks for Scientific Workflows</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/pnnl/llm_rag_reproducibility/20250625-wbq321/</link><pubDate>Wed, 25 Jun 2025 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/pnnl/llm_rag_reproducibility/20250625-wbq321/</guid><description>&lt;p>Hello, I&amp;rsquo;m Baiqiang. As part of the &lt;a href="https://ucsc-ospo.github.io/project/osre25/pnnl/llm_rag_reproducibility/" target="_blank" rel="noopener">Enhancing Reproducibility in RAG Frameworks for Scientific Workflows&lt;/a> project, I am excited to introduce my work on a crucial challenge in modern computational science. My &lt;a href="https://www.overleaf.com/read/fcbxtpngdnhw#8cc2c8" target="_blank" rel="noopener">proposal&lt;/a> under the mentorship of Luanzheng &amp;ldquo;Lenny&amp;rdquo; Guo at Pacific Northwest National Laboratory and Dongfang Zhao at the University of Washington aims to enhance the reproducibility of AI-driven scientific workflows.&lt;/p>
&lt;h3 id="the-problem-a-crisis-of-confidence-in-ai-for-science">The Problem: A Crisis of Confidence in AI for Science&lt;/h3>
&lt;p>Large Language Models (LLMs) are transforming scientific research, from accelerating literature reviews to generating novel hypotheses. However, their power is matched by their pitfalls: a tendency to &amp;ldquo;hallucinate&amp;rdquo; facts and a lack of transparency. Retrieval-Augmented Generation (RAG) was developed as a powerful solution, grounding LLM outputs in factual evidence retrieved from a specific knowledge base (like a database of scientific papers).&lt;/p>
&lt;p>But a hidden problem lurks within RAG: &lt;strong>non-determinism&lt;/strong>. The very first step of a RAG system—the similarity search that finds relevant documents—can produce different results even when asked the same question. Variations in indexing algorithms, data updates, or even the underlying software can change which documents are retrieved. For science, this is a critical flaw. If an experiment cannot be repeated with the same results, its conclusions cannot be trusted. This project tackles that challenge head-on.&lt;/p>
&lt;h3 id="our-mission-forging-a-path-to-reproducible-rag">Our Mission: Forging a Path to Reproducible RAG&lt;/h3>
&lt;p>This project proposes a comprehensive solution to systematically identify, measure, and mitigate non-determinism in RAG frameworks. Our goal is to empower researchers to build and use AI tools with confidence.&lt;/p>
&lt;p>Our approach is built on four key pillars:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Systematic Analysis:&lt;/strong> We will conduct a deep dive into popular RAG components (like FAISS, ScaNN, and HNSW) to pinpoint the exact sources of randomness and variability.&lt;/li>
&lt;li>&lt;strong>Rigorous Benchmarking:&lt;/strong> We will develop a public, open-source benchmarking suite using standardized scientific datasets (from PubMed, arXiv, etc.). This will allow anyone to quantitatively measure the reproducibility of their own RAG pipeline using clear metrics like retrieval overlap and rank correlation.&lt;/li>
&lt;li>&lt;strong>Targeted Enhancements:&lt;/strong> Based on our findings, we will implement practical solutions, including:
&lt;ul>
&lt;li>Promoting deterministic algorithms and configurations.&lt;/li>
&lt;li>Building robust data versioning and provenance tracking tools (inspired by DVC and Git LFS).&lt;/li>
&lt;li>Creating tools for precise configuration management to capture the entire experimental setup.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Practical Guidance and Open Source Tools:&lt;/strong> We will distill our insights into comprehensive documentation, reusable code examples, and best practices. All tools and findings will be contributed back to the open-source community.&lt;/li>
&lt;/ol></description></item></channel></rss>