[Announce] OxiRAG: A Logic-Verified, Speculative RAG Engine in Pure Rust (WASM-ready)

āš“ Rust    šŸ“… 2026-01-29    šŸ‘¤ surdeus    šŸ‘ļø 1      

surdeus

Hi everyone,

I'm excited to share a new library I've been working on as part of the COOLJAPAN ecosystem: OxiRAG.

image

OxiRAG is a next-generation RAG (Retrieval-Augmented Generation) engine written in Pure Rust. Unlike traditional RAG approaches that simply retrieve and feed text to an LLM, OxiRAG introduces a "Speculative Verification" architecture to ensure both speed and logical consistency.

Repository: https://github.com/cool-japan/oxirag
CratesIO: https://crates.io/crates/oxirag

:rocket: Key Features

  • Logic Verification (The Judge): This is the core differentiator. It extracts claims from the generated drafts and verifies them mathematically using OxiZ (our custom SMT Solver). It catches logical inconsistencies (e.g., date conflicts, numerical mismatches) before they reach the user.
  • Speculative Architecture: It treats cached answers as "Drafts" rather than absolute truths, injecting them into a lightweight SLM for context checking.
  • 4-Layer Pipeline:
    1. Echo: Semantic Search (powered by OxiBLAS & NumRS2)
    2. Speculator: Draft Verification
    3. Judge: SMT-based Logic Verification
    4. Graph: Knowledge Graph traversal
  • WASM-Native: Designed to run on the Edge (Cloudflare Workers) or directly in the browser.
  • Patent-Safe Design: We deliberately avoid "Hidden States Caching" methods, focusing instead on text/vector-based speculative decoding.

:crab: Why Rust?

We needed something that could handle complex vector math (OxiBLAS) and formal logic verification (OxiZ) with zero overhead, while still being portable to WASM. Rust was the only choice.

Simple Usage

use oxirag::prelude::*;

#[tokio::main]
async fn main() -> Result<(), OxiRagError> {
    // Build the pipeline with Semantic Search + SMT Verification
    let pipeline = PipelineBuilder::new()
        .with_echo(EchoLayer::default())
        .with_judge(JudgeImpl::new(MockSmtVerifier::default())) 
        .build()?;

    let result = pipeline.process(Query::new("What is the capital of France?")).await?;
    println!("Verified Answer: {}", result.final_answer);
    
    Ok(())
}

We are just getting started (v0.1.0). If you are interested in formal verification applied to GenAI, or building Edge-native RAG applications, I’d love to hear your feedback!

Thanks!


P.S. We also highly recommend checking out OxiFY, another newly released addition to our ecosystem.

1 post - 1 participant

Read full topic

šŸ·ļø Rust_feed