Skip to main content
رجوع
React NativeExpoSupabasepgvectorGemini AITauri v2

Aion

Aion is an AI-powered Bible companion that lets users ask questions about scripture in plain language. Responses are grounded in actual Bible data retrieved via a Hybrid RAG pipeline combining keyword matching and semantic vector search (pgvector), then streamed in real time via SSE from Gemini. The app runs on mobile (React Native + Expo) and desktop (Tauri v2).

01. المشكلة

Bible study tools are either keyword-only search engines that miss semantic meaning, or AI chatbots that hallucinate verses. Users need conversational AI that is genuinely grounded in scripture with verifiable citations.

02. نظرة عامة على الحل

  • Built a Hybrid RAG pipeline combining regex-based keyword extraction with OpenAI embedding (1536-dim) + pgvector semantic search
  • Implemented real-time SSE streaming from Gemini via Supabase Edge Functions
  • Designed rich inline verse cards with full book/chapter/verse attribution for verifiability
  • Added cross-platform support: React Native for mobile + Tauri v2 for native desktop

البناء

مكدس التقنيات

React Native 0.81Expo 54TypeScriptSupabase PostgreSQLpgvectorOpenAI EmbeddingsGemini 3.1 FlashTauri v2TanStack Query v5NativeWind
  • Hybrid RAG pipeline: regex keyword extraction + OpenAI embedding (1536-dim) + pgvector semantic search
  • Real-time SSE streaming from Gemini via Supabase Edge Functions
  • Rich inline verse cards with book/chapter/verse attribution
  • Cross-platform: React Native (iOS/Android) + Tauri v2 (macOS/Windows/Linux)

الأمان

  • All API keys (OpenAI, Gemini, service_role) stored server-side only in Edge Function secrets
  • IP-based rate limiting: 5/min burst, 30/3hrs per IP, 200/day global cap
  • Row-Level Security (RLS) on all Supabase tables
  • 500-character message length cap to prevent token-stuffing
  • Exact-match response cache (zero LLM cost on repeated queries)
  • Fail-closed: rate limit errors default to deny

03. الإثبات والتحقق

الادعاءات المُتحقق منها

  • >Hybrid RAG retrieval ensures answers are grounded in actual scripture, not hallucinated
  • >IP-based rate limiting (5/min burst, 30/3hrs, 200/day) with fail-closed defaults
  • >Exact-match response cache eliminates redundant LLM costs
  • >Anonymous auth with zero sign-up friction — Supabase RLS enforced on all tables

الأوراق البحثية

1 ورقة

PreprintPilot benchmark preprint

Aion-BibleQA: Evaluating Retrieval and Citation Faithfulness in Verse-Grounded Bible RAG Systems

8-page paper introducing a 40-question Bible RAG benchmark for citation faithfulness and false-premise robustness, with v3 retrieval reaching R@5 = 0.941, mean citation_support = 0.978, zero unsupported citations, and 6/6 false-premise refusals.

Zenodo2026DOI 10.5281/zenodo.20522874
تحميل الورقة