<?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: abdullah bin aqeel</title>
    <description>The latest articles on DEV Community by abdullah bin aqeel (@abdullahbinaqeel).</description>
    <link>https://dev.to/abdullahbinaqeel</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%2F4017476%2Fb0bce7cb-ee90-4ac6-a64c-a9661827d12f.jpg</url>
      <title>DEV Community: abdullah bin aqeel</title>
      <link>https://dev.to/abdullahbinaqeel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdullahbinaqeel"/>
    <language>en</language>
    <item>
      <title>Local-First RAG Pipeline in Pure Python</title>
      <dc:creator>abdullah bin aqeel</dc:creator>
      <pubDate>Mon, 06 Jul 2026 09:59:42 +0000</pubDate>
      <link>https://dev.to/abdullahbinaqeel/local-first-rag-pipeline-in-pure-python-4ji9</link>
      <guid>https://dev.to/abdullahbinaqeel/local-first-rag-pipeline-in-pure-python-4ji9</guid>
      <description>&lt;h1&gt;
  
  
  Stop Wasting Cloud Budget: Ingest &amp;amp; Chunk Unstructured Local Data in Milliseconds
&lt;/h1&gt;

&lt;p&gt;Let's be honest: building Retrieval-Augmented Generation (RAG) pipelines, context-aware LLM agents, or local semantic search engines is incredibly exciting. What &lt;em&gt;isn't&lt;/em&gt; exciting is wasting days writing boilerplate ingestion logic or pulling in bloated, multi-gigabyte frameworks just to split a folder of local Markdown and text files.&lt;/p&gt;

&lt;p&gt;When did parsing a local directory and breaking text into clean chunks become so heavy? Monolithic AI orchestrators introduce massive dependency chains, require internet connectivity to calculate basic token metrics, and frequently mangle structural context by splitting text arbitrarily mid-word or mid-sentence.&lt;/p&gt;

&lt;p&gt;To solve this exact engineering friction point, I built &lt;strong&gt;NexusFlow&lt;/strong&gt;—a high-performance, zero-configuration local data pipeline engine designed to turn messy local text streams into optimized, context-preserving semantic chunks entirely offline.&lt;/p&gt;




&lt;h2&gt;
  
  
  Interactive Repository
&lt;/h2&gt;

&lt;p&gt;Check out the full source code, architecture logs, and contribution guidelines natively on GitHub:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Abdullahbinaqeel" rel="noopener noreferrer"&gt;
        Abdullahbinaqeel
      &lt;/a&gt; / &lt;a href="https://github.com/Abdullahbinaqeel/RAGMill" rel="noopener noreferrer"&gt;
        RAGMill
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;RAGMill&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://pypi.org/project/ragmill/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e814d3036061fafdb9e100bc2c7b3cb30860c3f2100f4e3b3eb809dd3b920ced/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f7261676d696c6c2e737667" alt="PyPI"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Abdullahbinaqeel/RAGMill/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/Abdullahbinaqeel/RAGMill/actions/workflows/ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Abdullahbinaqeel/RAGMill/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://pypi.org/project/ragmill/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e8b41e3ad1971d2e78d632a769faba5536a95f92fb750631f50d65215720bde1/68747470733a2f2f696d672e736869656c64732e696f2f707970692f707976657273696f6e732f7261676d696c6c2e737667" alt="Python"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A lightweight, zero-config local pipeline engine for AI data ingestion, semantic chunking, embeddings, and vector search.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Install&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;pip install ragmill[all]   &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; includes PDF + DOCX + embeddings support&lt;/span&gt;
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; or&lt;/span&gt;
pip install ragmill        &lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; core only (txt/md), zero dependencies&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Developing locally instead? Clone the repo and use an editable install:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;pip install -e &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;.[dev]&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt;
pytest tests/ -v&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Usage&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Ingest + chunk&lt;/h3&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-python notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s1"&gt;ragmill&lt;/span&gt; &lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-v"&gt;RAGEngine&lt;/span&gt;

&lt;span class="pl-s1"&gt;engine&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-en"&gt;RAGEngine&lt;/span&gt;(&lt;span class="pl-s1"&gt;chunk_size&lt;/span&gt;&lt;span class="pl-c1"&gt;=&lt;/span&gt;&lt;span class="pl-c1"&gt;500&lt;/span&gt;, &lt;span class="pl-s1"&gt;overlap&lt;/span&gt;&lt;span class="pl-c1"&gt;=&lt;/span&gt;&lt;span class="pl-c1"&gt;50&lt;/span&gt;)
&lt;span class="pl-s1"&gt;chunks&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-s1"&gt;engine&lt;/span&gt;.&lt;span class="pl-c1"&gt;execute_pipeline&lt;/span&gt;(&lt;span class="pl-s"&gt;"./my_documents"&lt;/span&gt;)

&lt;span class="pl-k"&gt;for&lt;/span&gt; &lt;span class="pl-s1"&gt;chunk&lt;/span&gt; &lt;span class="pl-c1"&gt;in&lt;/span&gt; &lt;span class="pl-s1"&gt;chunks&lt;/span&gt;:
    &lt;span class="pl-en"&gt;print&lt;/span&gt;(&lt;span class="pl-s1"&gt;chunk&lt;/span&gt;[&lt;span class="pl-s"&gt;"metadata"&lt;/span&gt;][&lt;span class="pl-s"&gt;"filename"&lt;/span&gt;], &lt;span class="pl-s1"&gt;chunk&lt;/span&gt;[&lt;span class="pl-s"&gt;"content"&lt;/span&gt;][:&lt;span class="pl-c1"&gt;80&lt;/span&gt;])&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Supports &lt;code&gt;.txt&lt;/code&gt;, &lt;code&gt;.md&lt;/code&gt;, &lt;code&gt;.log&lt;/code&gt;, &lt;code&gt;.rst&lt;/code&gt;, &lt;code&gt;.pdf&lt;/code&gt;, and &lt;code&gt;.docx&lt;/code&gt; out of the box.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Embed + search locally&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;Requires the &lt;code&gt;embeddings&lt;/code&gt; extra (&lt;code&gt;pip install -e ".[embeddings]"&lt;/code&gt;). The model
(a quantized MiniLM ONNX export, ~23MB) downloads once to
&lt;code&gt;~/.cache/ragmill/models&lt;/code&gt;…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Abdullahbinaqeel/RAGMill" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;em&gt;(If you find this project useful for your local workflows, feel free to drop a STAR to support open-source development!)&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Solution: High-Performance Local-First Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RAGMill&lt;/strong&gt; breaks data preparation into three highly efficient, completely decoupled stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Ingestion Engine:&lt;/strong&gt; An asynchronous, zero-copy structural directory crawler that streams raw text while keeping your system's memory consumption flat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Semantic Chunking Router:&lt;/strong&gt; Rejects naive character-based thresholds. It uses recursive boundary analysis to split text at natural structural breaks (like double-newlines, markdown headers, and sentence punctuation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Preservation:&lt;/strong&gt; Dynamically manages sliding-window overlaps to carry vital context across boundaries so your downstream embedding vectors retain optimal meaning.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Quick Start (Under 30 Seconds)
&lt;/h2&gt;

&lt;p&gt;RAGMill is written with strict type-safety, ensuring instant autocomplete support inside modern code editors like Cursor or VS Code. &lt;/p&gt;

&lt;p&gt;Install it cleanly from PyPI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;ragmill[all]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Architectural Deep Dive
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why Custom Regex Over Heavy Tokenizer Dependencies?
&lt;/h3&gt;

&lt;p&gt;Standard tokenizers (like tiktoken or HuggingFace transformers) introduce heavy binaries and active model weight requirements into your environment just to calculate safe text splitting boundaries.&lt;/p&gt;

&lt;p&gt;RAGMill optimizes this process using a custom deterministic regex routine. By scoring structural text markers recursively:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It keeps logically connected paragraphs completely whole.&lt;/li&gt;
&lt;li&gt;If a paragraph exceeds the maximum chunk size, it effortlessly steps down to sentence-level token tracking.&lt;/li&gt;
&lt;li&gt;It safely falls back to safe string slices only as an absolute last resort, keeping execution speed down to a fraction of a millisecond.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The output payload is a highly structured, model-ready JSON-like dictionary containing granular file manifests, index tracking, and character lengths—ready to dump straight into local caches, NumPy arrays, or vector layers like SQLite or Cloud Firestore.&lt;/p&gt;




&lt;h3&gt;
  
  
  Roadmap &amp;amp; Contributing
&lt;/h3&gt;

&lt;p&gt;RAGMill is built with a lightweight footprint to prevent dependency conflicts across your production applications. Moving forward, the roadmap includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Native multi-threaded PDF and unformatted JSON parsing layers.&lt;/li&gt;
&lt;li&gt;[ ] An ultra-lightweight ONNX runtime vector embedding execution module.&lt;/li&gt;
&lt;li&gt;[ ] Out-of-the-box pipeline export adapters for common vector databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As an open-source project, contributions are incredibly welcome! If you want to add support for extra file abstractions or optimize the regex array, check out our GitHub repository, take a look at the good-first-issue tags, and submit a PR.&lt;/p&gt;

&lt;p&gt;How are you optimizing your text ingestion pipelines for RAG systems today? Let's discuss in the comments below!&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Abdullahbinaqeel/RAGMill" rel="noopener noreferrer"&gt;https://github.com/Abdullahbinaqeel/RAGMill&lt;/a&gt;&lt;br&gt;
PyPI: &lt;a href="https://pypi.org/project/ragmill/" rel="noopener noreferrer"&gt;https://pypi.org/project/ragmill/&lt;/a&gt;&lt;br&gt;
Medium: &lt;a href="https://medium.com/@abdulbinaqeel/local-first-rag-pipeline-in-pure-python-1f8fbc79b5de?sharedUserId=abdulbinaqeel" rel="noopener noreferrer"&gt;https://medium.com/@abdulbinaqeel/local-first-rag-pipeline-in-pure-python-1f8fbc79b5de?sharedUserId=abdulbinaqeel&lt;/a&gt; &lt;/p&gt;

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