Tag: Django

  • DivinityAI – Islamic Grounded RAG: A Hallucination-Free Quran & Hadith Search AI

    DivinityAI – Islamic Grounded RAG: A Hallucination-Free Quran & Hadith Search AI

    Key Takeaways:

    • DivinityAI ensures zero hallucination of Quranic verses and Hadith citations.
    • It implements a strict corpus-lock policy, verifying all references against authenticated sources.
    • The system supports multilingual inputs and optimized Right-to-Left (RTL) Arabic typography.
    • Real-world applications include scholarly research, academic study, and high-stakes domain-specific RAG architectures.
    Live Project Access: https://muslim.nevatal.tech

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, fabricating Quranic surah and ayah numbers, attributing narrations to the wrong companions, and merging distinct prophetic sayings. In a domain where textual accuracy is critical, these inaccuracies are unacceptable. DivinityAI addresses this challenge by providing a Retrieval-Augmented Generation (RAG) system that ensures every answer is grounded in authenticated Quran and Hadith sources.

    Core Architecture & Technical Stack Deep-Dive

    System Components & Interface Boundaries

    DivinityAI is built as a modular application with a Django backend serving a React SPA, deploying local embeddings and remote LLM orchestrators. The system integrates ChromaDB for vector storage, BM25 for sparse search, and BGE-M3 embeddings for dense retrieval.

    Ingestion & Arabic NLP Pipeline

    To index classical Arabic scripts accurately, the ingestion pipeline implements a custom preprocessing normalization stage, including NFKD normalization, stripping diacritics, and alef normalization. This ensures accurate retrieval and embedding generation.

    Key Features Breakdown & Practical Benefits

    Strict Corpus-Lock Policy

    DivinityAI refuses to answer queries that cannot be verified from the retrieved sources, ensuring zero hallucination.

    Five-Path Intent Router

    The system classifies incoming queries into Quran verse, Hadith, Fiqh, Calculation, or Off-Domain categories, applying specialized retrieval strategies for each.

    Hybrid BM25 Sparse Matching

    Combining BM25 sparse matching with BGE-M3 dense embeddings, DivinityAI captures both exact keyword matches and semantic concepts.

    Real-World Use Cases & Applications

    DivinityAI is invaluable for scholarly research, academic study of classical Arabic religious texts, and as a reference design pattern for high-stakes domain-specific RAG architectures.

    How It Works: Step-by-Step Workflow

    From intent classification to citation verification and grounded generation, DivinityAI’s workflow ensures every step adheres to strict accuracy standards.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional LLMs
    Hallucination Rate Zero High
    Citation Verification Deterministic Non-existent
    Intent Routing Five-path None

    Frequently Asked Questions (FAQ)

    What makes DivinityAI different from other AI systems?

    DivinityAI implements a strict corpus-lock policy and deterministic citation verification, ensuring zero hallucination and accurate references.

    Can DivinityAI issue fatwas?

    No, DivinityAI displays source materials and scholarly positions without generating new religious rulings.

    Is DivinityAI multilingual?

    Yes, DivinityAI supports Arabic, English, and Malay inputs.

    How fast is DivinityAI?

    End-to-end responses are returned in less than 8 seconds.

    Conclusion & Next Steps

    DivinityAI – Islamic Grounded RAG sets a new standard for accuracy and reliability in Quran and Hadith search. Explore the live project at https://muslim.nevatal.tech.

  • AI English Grammar Diagnostic Platform: Adaptive Learning with OpenRouter & Django

    AI English Grammar Diagnostic Platform: Adaptive Learning with OpenRouter & Django

    Modern language learning demands precise diagnostic tools capable of identifying grammatical weaknesses with surgical precision. The English Practice Diagnostic platform delivers exactly this – combining cutting-edge AI question generation via OpenRouter with robust Django architecture and fault-tolerant local question banks.

    Key Takeaways

    • AI-powered adaptive grammar diagnostics with instant CEFR-aligned scoring
    • Hybrid architecture blending OpenRouter LLMs (GPT-4o-mini/Gemma) with local SQLite fallback
    • Persistent question banks and active sessions surviving container restarts
    • Detailed grammatical explanations and targeted study recommendations
    Live Project Access: https://english.nevatal.id

    The Challenge: Why English Practice Diagnostic Was Built

    Traditional grammar assessments suffer from static question banks that quickly become predictable, while pure AI solutions risk downtime when API services fail. This platform addresses three critical gaps:

    1. Dynamic Question Generation

    OpenRouter-powered AI creates fresh, targeted grammar questions in real-time based on user performance – no two tests are identical.

    2. Fault-Tolerant Architecture

    The system automatically falls back to local SQLite question banks during API outages, ensuring uninterrupted learning sessions.

    3. Persistent Learning Context

    Mounted database volumes preserve question history and active test sessions across container redeployments.

    Core Architecture & Technical Stack Deep-Dive

    The platform’s hybrid architecture delivers reliability through strategic redundancy:

    Backend Foundation

    • Django 5: Robust Python framework handling request routing and business logic
    • SQLite: Persistent storage for question banks with Docker volume mounts
    • Gunicorn: Production-grade WSGI server for Django deployment
    • WhiteNoise: Static file serving optimized for Bootstrap 5 frontend

    AI Integration Layer

    • OpenRouter API: Dynamic question generation via GPT-4o-mini and Gemma models
    • Prompt Safeguards: Validation checks preventing malformed LLM outputs
    • Fallback Mechanism: Seamless transition to local question bank when APIs fail

    Key Features Breakdown & Practical Benefits

    Adaptive Hidden-Topic Diagnostics

    The system employs Item Response Theory (IRT) principles to:

    • Dynamically adjust question difficulty based on user responses
    • Identify latent grammatical weaknesses through response patterns
    • Generate CEFR-aligned proficiency scores with sub-skill breakdowns

    Self-Healing Question Pipeline

    if openrouter_status == 'healthy':
        generate_ai_questions()
    else:
        load_local_questions()
        log_fallback_event()

    Real-World Use Cases & Applications

    • ESL Students: Identify specific grammar gaps before high-stakes exams
    • IELTS Preparation: Targeted practice aligned with test scoring rubrics
    • Classroom Teachers: Generate customized diagnostic sets in seconds
    • Self-Learners: Continuously adaptive practice without repetition

    How It Works: Step-by-Step Workflow

    1. User initiates diagnostic session (adaptive or topic-specific)
    2. System evaluates available AI services status
    3. Questions generated via OpenRouter or loaded from local bank
    4. Responses analyzed using IRT models
    5. Instant scoring with grammatical explanations
    6. Results persisted for longitudinal tracking

    Comparison: English Practice Diagnostic vs Traditional Approaches

    Feature This Platform Static Tests Pure AI Tools
    Question Variety Dynamic generation + local bank Fixed question set API-dependent only
    Uptime Reliability Dual-source fallback Always available Vulnerable to outages
    Personalization Adaptive difficulty One-size-fits-all Variable quality

    Frequently Asked Questions (FAQ)

    How does the diagnostic adapt to my skill level?

    The system employs psychometric modeling to adjust question difficulty based on your response patterns, continuously refining its understanding of your abilities.

    What happens during OpenRouter API outages?

    The platform automatically switches to its curated local question bank, ensuring zero interruption to your learning session.

    Can educators customize the diagnostic content?

    Yes, instructors can specify grammatical focus areas and difficulty parameters that the AI incorporates into generated questions.

    How are results aligned with CEFR standards?

    Each question is tagged with CEFR levels (A1-C2), and your performance across these tags generates your proficiency profile.

    Conclusion & Next Steps

    The English Practice Diagnostic represents a significant evolution in language assessment technology – combining the flexibility of modern AI with the reliability of traditional testing methods. Its hybrid architecture offers a blueprint for building fault-tolerant educational applications in an era of increasingly unstable API dependencies.

    Experience adaptive English diagnostics today: https://english.nevatal.id

  • Nevatal URL Shortener: A High-Performance Django Microservice with Redis Caching

    Nevatal URL Shortener: A High-Performance Django Microservice with Redis Caching

    Key Takeaways:

    • Production-ready URL shortening microservice built with Django 5, PostgreSQL 16, and Redis 7.
    • Ultra-low latency redirects powered by Redis caching.
    • Detailed click analytics, referrer tracking, and dashboard stats.
    • IP-based rate limiting with graceful 429 backoff handling.
    • Production Dockerized deployment with isolated network bridges.
    Live Project Access: https://url.nevatal.tech

    The Challenge: Why Nevatal URL Shortener Was Built

    In today’s digital landscape, URL shortening is a critical component for efficient link management, marketing campaigns, and internal routing. However, many existing solutions fall short in terms of performance, scalability, and analytics. Nevatal URL Shortener was built to address these challenges, offering a robust, high-performance microservice that combines Redis caching, PostgreSQL persistence, and detailed analytics.

    Core Architecture & Technical Stack Deep-Dive

    Django 5: The Backbone of Nevatal

    Django 5 serves as the core framework for Nevatal URL Shortener, providing a robust and scalable foundation. Its built-in ORM and middleware support make it ideal for handling URL shortening logic, database interactions, and request processing.

    PostgreSQL 16: Reliable Persistence

    PostgreSQL 16 ensures reliable data persistence for all shortened URLs and their associated metadata. Its advanced indexing and query optimization features guarantee quick lookups and efficient storage.

    Redis 7: Ultra-Low Latency Caching

    Redis 7 powers the caching layer, enabling ultra-low latency redirects. By storing frequently accessed URLs in memory, Redis minimizes database load and ensures rapid response times.

    Nginx: High-Performance Web Server

    Nginx acts as the web server, handling incoming requests and routing them to the appropriate backend services. Its asynchronous architecture ensures high concurrency and low latency.

    Docker Compose: Streamlined Deployment

    Docker Compose simplifies the deployment process, allowing for easy setup and management of the microservice. Isolated network bridges ensure secure and efficient communication between containers.

    Key Features Breakdown & Practical Benefits

    Custom Slug Generation

    Nevatal generates custom slugs with database-level uniqueness validation, ensuring that each shortened URL is unique and easily identifiable.

    Detailed Click Analytics

    Track clicks, referrers, and user agents with precision. The built-in dashboard provides comprehensive insights into link performance and traffic attribution.

    IP-Based Rate Limiting

    Protect your service from abuse with IP-based rate limiting. Graceful 429 backoff handling ensures that legitimate users are not adversely affected.

    Production Dockerized Deployment

    With Docker Compose, Nevatal is ready for production deployment out of the box. Isolated network bridges enhance security and performance.

    Real-World Use Cases & Applications

    Nevatal URL Shortener is versatile and can be used in various scenarios, including:

    • Branded marketing link management and campaign tracking.
    • Internal microservice URL routing and API endpoint aliasing.
    • Fast link analytics and traffic attribution.

    How It Works: Step-by-Step Workflow

    1. User submits a long URL via the web interface or API.
    2. The system generates a unique custom slug and stores the URL in PostgreSQL.
    3. Redis caches the shortened URL for rapid retrieval.
    4. When a user accesses the shortened URL, Redis serves the redirect instantly.
    5. Click analytics are recorded and displayed in the dashboard.

    Comparison: Nevatal URL Shortener vs Traditional Approaches

    Feature Nevatal URL Shortener Traditional Approaches
    Latency Ultra-low (Redis caching) Higher (Database-dependent)
    Analytics Detailed click analytics Basic or None
    Scalability High (Dockerized deployment) Limited
    Rate Limiting IP-based with graceful backoff Basic or None

    Frequently Asked Questions (FAQ)

    What is Nevatal URL Shortener?

    Nevatal URL Shortener is a production-ready Django microservice for URL shortening, featuring Redis caching, PostgreSQL persistence, and detailed click analytics.

    How does Nevatal ensure low latency?

    Nevatal uses Redis caching to store frequently accessed URLs, enabling ultra-low latency redirects.

    Can I customize the slugs?

    Yes, Nevatal generates custom slugs with database-level uniqueness validation.

    Is Nevatal suitable for production use?

    Absolutely. Nevatal is Dockerized and ready for production deployment with isolated network bridges.

    How do I access the live project?

    You can access the live project at https://url.nevatal.tech.

    Conclusion & Next Steps

    Nevatal URL Shortener is a powerful, production-ready microservice designed for high-performance URL shortening. With its advanced features and robust architecture, it’s an ideal solution for developers and businesses alike. Ready to optimize your link management? Visit https://url.nevatal.tech to get started today.

  • DivinityAI – Islamic Grounded RAG: The Hallucination-Free Quran and Hadith Search System

    DivinityAI – Islamic Grounded RAG: The Hallucination-Free Quran and Hadith Search System

    Key Takeaways:

    • DivinityAI ensures zero hallucination by grounding every answer in authenticated Quran and Hadith texts.
    • Features include intent routing, HyDE expansion, hybrid search, and deterministic citation verification.
    • Built with Django ASGI, React 19, ChromaDB, and advanced AI models like BGE-M3 and Llama 3.3 70B.
    • Real-world applications include scholarly research, academic study, and high-stakes domain-specific RAG architectures.
    Live Project Access: https://muslim.nevatal.tech

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, fabricating Quranic surah and ayah numbers, attributing narrations to the wrong companions, and synthesizing inaccurate Islamic jurisprudence (Fiqh) fatwas. In a domain where textual accuracy is critical, these hallucinations are unreliable and potentially misleading. DivinityAI addresses this challenge by implementing a strict “corpus-lock” policy, ensuring every answer is grounded in authenticated Quran and Hadith texts.

    Core Architecture & Technical Stack Deep-Dive

    DivinityAI is built as a modular application with a Django backend serving a React SPA, deploying local embeddings and remote LLM orchestrators. The tech stack includes:

    • Frontend: React 19 single-page application styled using Tailwind CSS v4, optimized for Right-to-Left Arabic typography.
    • Backend: Django web service with Django REST Framework (DRF) for REST endpoints.
    • Vector Database: ChromaDB server for storing Quran and Hadith embeddings.
    • Sparse Index: BM25 sparse search for exact-token matches.
    • Embedding Model: BGE-M3 embeddings for semantic search.
    • LLM Engine: OpenRouter for text generation and Groq for high-speed validation tasks.

    Key Features Breakdown & Practical Benefits

    Strict Corpus-Lock Policy

    DivinityAI refuses to answer queries that cannot be verified from authenticated Quran and Hadith texts, ensuring zero hallucination.

    Five-Path Intent Router

    Every user query is classified into one of five intents: Quran verse, Hadith, Fiqh, Calculation, or Off-Domain, with specialized retrieval strategies for each.

    Hybrid Search

    Combines BM25 sparse matching with BGE-M3 dense embeddings for comprehensive retrieval.

    Deterministic Citation Verification

    Validates citations through a 4-tier verification chain, ensuring every reference is accurate.

    Pre- and Post-Generation Checks

    Pre-generation evidence sufficiency checks and post-generation fatwa boundary/hallucination detectors ensure the integrity of responses.

    Real-World Use Cases & Applications

    DivinityAI is designed for:

    • Scholarly research and authenticated Quran/Hadith reference discovery.
    • Academic study of classical Arabic religious texts and cross-source comparative analysis.
    • Reference design pattern for high-stakes zero-hallucination domain-specific RAG architectures.

    How It Works: Step-by-Step Workflow

    The query execution pipeline includes:

    1. Intent Classification: Routes the query to the appropriate intent.
    2. Scope Enforcement: Rejects off-domain queries.
    3. Query Rewriting: Expands and decomposes complex queries.
    4. Hybrid Retrieval: Combines BM25 and BGE-M3 searches.
    5. Citation Verification: Validates references through a 4-tier chain.
    6. Grounded Generation: Synthesizes answers strictly from verified sources.
    7. Safety Layer: Detects hallucinations and ensures compliance with fatwa boundaries.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional Approaches
    Hallucination Risk Zero High
    Citation Accuracy 95%+ Variable
    Intent Routing Five-path classification None
    Hybrid Search BM25 + BGE-M3 Single method

    Frequently Asked Questions (FAQ)

    What is DivinityAI?

    DivinityAI is a Retrieval-Augmented Generation system designed to provide hallucination-free Quran and Hadith search results with deterministic citation verification.

    How does DivinityAI ensure accuracy?

    DivinityAI implements a strict corpus-lock policy, hybrid search, and a 4-tier citation verification chain.

    What languages does DivinityAI support?

    DivinityAI supports Arabic, English, and Malay inputs.

    Can DivinityAI issue fatwas?

    No, DivinityAI displays source materials and scholarly positions without generating new religious rulings.

    Is DivinityAI free to use?

    Yes, DivinityAI operates on a 100% free-tier model.

    Conclusion & Next Steps

    DivinityAI – Islamic Grounded RAG sets a new standard for hallucination-free Quran and Hadith search systems. Its strict corpus-lock policy, advanced intent routing, and deterministic citation verification ensure unparalleled accuracy. Explore the live project at https://muslim.nevatal.tech to experience its capabilities firsthand.

  • AI English Grammar Diagnostic Platform: Revolutionizing Language Learning

    AI English Grammar Diagnostic Platform: Revolutionizing Language Learning

    English grammar proficiency is a critical skill for learners worldwide, whether for academic success, career advancement, or personal growth. However, identifying specific grammar weaknesses and addressing them effectively can be challenging without personalized, adaptive tools. Enter the English Practice Diagnostic, an AI-powered English grammar diagnostic and adaptive learning platform designed to revolutionize language learning.

    Key Takeaways:

    • AI-powered adaptive grammar testing with instant feedback.
    • Dynamic question generation via OpenRouter’s GPT-4o-mini/Gemma models.
    • Persistent question bank and fault-tolerant architecture for zero downtime.
    • CEFR-aligned insights, grammatical explanations, and study suggestions.
    • Live project access: https://english.nevatal.id.

    The Challenge: Why English Practice Diagnostic Was Built

    Traditional English grammar assessments often rely on static question banks, which fail to adapt to individual learners’ needs. Additionally, educators face the challenge of creating customized tests that accurately diagnose specific grammar weaknesses. The English Practice Diagnostic was built to address these pain points by leveraging cutting-edge AI technologies to provide adaptive, personalized grammar assessments.

    Core Architecture & Technical Stack Deep-Dive

    Tech Stack Overview

    The platform is built using a robust tech stack:

    • Backend: Django 5 and Python 3.12 for scalable web application development.
    • AI Integration: OpenRouter API (GPT-4o-mini/Gemma) for dynamic question generation.
    • Database: SQLite with data persistence for fault tolerance.
    • Deployment: Docker Compose, Gunicorn, and WhiteNoise for containerized, high-performance hosting.
    • Frontend: Bootstrap 5 for responsive, user-friendly interfaces.

    Fault-Tolerant Design

    The platform ensures zero downtime by automatically falling back to a local question bank if the AI service is unavailable. Persistent SQLite databases and mounted volumes allow active test sessions and question banks to survive container restarts.

    Key Features Breakdown & Practical Benefits

    Adaptive Grammar Diagnostic Testing

    The platform uses hidden-topic diagnostics to identify specific grammar weaknesses, providing instant score evaluations and detailed breakdowns aligned with the Common European Framework of Reference for Languages (CEFR).

    Dynamic AI Question Generation

    OpenRouter’s AI models generate questions dynamically, ensuring a fresh and personalized testing experience. Prompt safety checks maintain question quality and relevance.

    Persistent Question Bank

    A local question bank serves as a fallback, enabling offline testing and zero-downtime operation. This feature ensures uninterrupted learning even in low-connectivity environments.

    Real-World Use Cases & Applications

    The English Practice Diagnostic is ideal for:

    • Individual English learners seeking to identify and improve grammar weaknesses.
    • ESL, TOEFL, and IELTS students preparing for diagnostic proficiency exams.
    • Educators automating grammar assessment session creation.
    • Showcasing fault-tolerant AI architectures combining cloud LLMs with local fallback systems.

    How It Works: Step-by-Step Workflow

    1. Users access the platform at https://english.nevatal.id.
    2. The system initiates an adaptive grammar diagnostic test.
    3. Questions are dynamically generated via OpenRouter or retrieved from the local question bank.
    4. Instant feedback and CEFR-aligned insights are provided upon test completion.
    5. Users receive grammatical explanations and tailored study suggestions.

    Comparison: English Practice Diagnostic vs Traditional Approaches

    Feature English Practice Diagnostic Traditional Approaches
    Adaptive Testing Yes No
    Dynamic Question Generation Yes No
    Fault Tolerance Yes No
    CEFR Alignment Yes Limited

    Frequently Asked Questions (FAQ)

    Q: Is the platform suitable for beginners?
    A: Yes, the platform adapts to all proficiency levels, from beginners to advanced learners.

    Q: Can educators customize tests?
    A: Yes, educators can generate customizable grammar assessment sessions automatically.

    Q: Does the platform work offline?
    A: Yes, the local question bank ensures offline functionality.

    Q: How accurate are the AI-generated questions?
    A: Questions undergo prompt safety checks to ensure quality and relevance.

    Conclusion & Next Steps

    The English Practice Diagnostic platform represents a significant leap forward in English grammar assessment and learning. By combining AI-powered adaptive testing with fault-tolerant design, it offers unparalleled benefits for learners, educators, and exam prep students. Ready to experience the future of English learning? Visit https://english.nevatal.id today!

  • Django URL Shortener with Redis Caching: Build a Production-Ready Microservice

    Django URL Shortener with Redis Caching: Build a Production-Ready Microservice

    Key Takeaways:

    • Production-ready URL shortening microservice with Redis caching for ultra-low latency redirects
    • Detailed click analytics, referrer tracking, and dashboard stats for actionable insights
    • Custom slug generation with database-level uniqueness validation
    • IP-based rate limiting with graceful 429 backoff handling
    • Dockerized deployment with isolated network bridges for secure production environments

    The Challenge: Why Nevatal URL Shortener Was Built

    Traditional URL shorteners often fall short in performance, scalability, and analytics. Many solutions rely on simplistic architectures that can’t handle high traffic or provide meaningful insights. Nevatal URL Shortener was built to address these limitations with a modern, production-ready microservice architecture.

    Core Architecture & Technical Stack Deep-Dive

    The Nevatal URL Shortener leverages a carefully selected tech stack to deliver high performance and reliability:

    Django 5 Application Layer

    The Django framework powers the core URL shortening logic with:

    • Custom middleware for rate limiting and analytics capture
    • Database models optimized for high-write throughput
    • RESTful API endpoints for programmatic access

    PostgreSQL 16 Persistence

    The PostgreSQL database provides:

    • ACID-compliant transaction support
    • Database-level uniqueness constraints for slugs
    • Optimized indexes for fast lookups

    Redis 7 Caching Layer

    Redis delivers sub-millisecond response times for redirects with:

    • LRU caching of frequently accessed URLs
    • In-memory storage for temporary rate limit counters
    • Pub/Sub for real-time analytics updates

    Key Features Breakdown & Practical Benefits

    Custom Slug Generation

    The system generates custom slugs with:

    def generate_slug():
        return ''.join(secrets.choice(string.ascii_letters + string.digits) for _ in range(6))
    

    Database-level validation ensures uniqueness without race conditions.

    Ultra-Low Latency Redirects

    Redis caching enables redirects in under 1ms with:

    • Cache-aside pattern for hot URLs
    • Write-through caching for new entries
    • Automatic cache invalidation on TTL expiration

    Real-World Use Cases & Applications

    Nevatal URL Shortener excels in:

    • Marketing campaign tracking with branded links
    • Internal microservice routing for distributed systems
    • API endpoint aliasing for version management

    How It Works: Step-by-Step Workflow

    1. User submits URL via web interface or API
    2. System generates unique slug and persists to PostgreSQL
    3. New entry is cached in Redis
    4. When accessed, Redis serves cached redirect or falls back to database
    5. Click analytics are captured and aggregated

    Comparison: Nevatal URL Shortener vs Traditional Approaches

    Feature Nevatal Traditional
    Redirect Speed <1ms (Redis) 50-100ms (DB only)
    Analytics Detailed click tracking Basic hit counting
    Scalability 10k+ RPM 1k RPM

    Frequently Asked Questions (FAQ)

    How does Nevatal ensure slug uniqueness?

    Database-level constraints combined with retry logic guarantee unique slugs even under concurrent requests.

    Can I use custom domains with Nevatal?

    Yes, the system supports custom domain configuration through DNS CNAME records.

    How long are shortened URLs cached?

    Default TTL is 24 hours, configurable per environment.

    Conclusion & Next Steps

    Nevatal URL Shortener provides a robust solution for organizations needing high-performance link management with detailed analytics. Visit url.nevatal.tech to experience the service or contact us for deployment guidance.

  • Recommendica – Agentic Research Paper Recommender: Revolutionizing Academic Discovery

    Key Takeaways:

    • Multi-turn Relevance Agent dynamically refines search queries to ensure precise results.
    • Live arXiv API fallback supplements local databases with the latest research.
    • Integrated Paddle donation system supports sustainable development.

    The Challenge: Why Recommendica – Agentic Research Paper Recommender Was Built

    Traditional semantic search engines often return irrelevant papers, leading to inaccurate results and wasted resources. Recommendica addresses this by integrating a multi-turn Relevance Agent and live arXiv API fallback to ensure accurate and up-to-date research recommendations.

    Core Architecture & Technical Stack Deep-Dive

    Recommendica is built on a robust tech stack including Django/FastAPI, React Frontend, ChromaDB, arXiv.org REST API, Paddle Billing Webhooks, OpenRouter, and Docker Compose. This combination ensures high performance, scalability, and reliability.

    Multi-turn Relevance Agent

    The Relevance Agent grades document relevancy and dynamically reformulates search queries, ensuring that only the most pertinent papers are retrieved.

    Live arXiv API Fallback

    When local coverage is insufficient, Recommendica seamlessly queries the live arXiv API, integrating the latest research into its recommendations.

    Key Features Breakdown & Practical Benefits

    Pre-retrieval Query Checker

    This feature prevents wasted API tokens by filtering out generic or invalid queries before processing.

    Parallel Generation Workers

    By partitioning chunks into groups, Recommendica achieves low-latency streaming responses, enhancing user experience.

    Real-World Use Cases & Applications

    Recommendica is invaluable for academic and industry researchers seeking precise literature reviews and citation synthesis without semantic hallucinations.

    How It Works: Step-by-Step Workflow

    From query submission to result generation, Recommendica’s workflow ensures accuracy and efficiency through its multi-turn Relevance Agent and live arXiv fallback.

    Comparison: Recommendica – Agentic Research Paper Recommender vs Traditional Approaches

    Feature Recommendica Traditional Approaches
    Query Refinement Multi-turn Relevance Agent Static Query
    Fallback Mechanism Live arXiv API None

    Frequently Asked Questions (FAQ)

    What is a multi-turn Relevance Agent?

    A multi-turn Relevance Agent dynamically refines search queries to ensure the most relevant papers are retrieved.

    How does the live arXiv API fallback work?

    When local databases lack sufficient coverage, Recommendica queries the live arXiv API to supplement its recommendations.

    Conclusion & Next Steps

    Recommendica – Agentic Research Paper Recommender is setting a new standard in academic research tools. Explore the platform at recommendica.nevatal.tech and experience the future of research paper discovery.

  • Recommendica: AI Research Paper Recommendation Agent with Multi-Turn Query Expansion

    Recommendica: AI Research Paper Recommendation Agent with Multi-Turn Query Expansion

    Key Takeaways:

    • Multi-turn Relevance Agent evaluates and dynamically rewrites queries to maximize result quality
    • Live arXiv API integration ensures coverage of latest research not yet in local databases
    • Parallel generation workers enable low-latency responses for complex queries
    • Pay-what-you-want donation model through Paddle supports sustainable operation
    • Deterministic verification metrics prevent hallucination and ensure answer faithfulness

    The Challenge: Why Recommendica Was Built

    Traditional semantic search systems for academic papers suffer from two critical flaws: they return top-K results regardless of actual relevance, and they’re limited by static local datasets. This leads to:

    • Hallucinated citations when RAG systems reference irrelevant papers
    • Missed discoveries from recent arXiv preprints not yet indexed
    • Wasted API costs processing clearly off-topic queries

    Recommendica solves these through an active Relevance Agent that dynamically refines searches and a live arXiv fallback that supplements local results when coverage is insufficient.

    Core Architecture & Technical Stack

    Service Orchestration

    The system combines Django for business logic with React for the responsive frontend:

    ┌─────────────────┐    HTTP/SSE     ┌─────────────────┐
    │ React Frontend  │ ◄─────────────► │ Django REST API │
    └─────────────────┘                └────────┬────────┘
                                                │
                                ┌───────────────┼────────────────┐
                                ▼               ▼                ▼
                    ┌─────────────────────┐ ┌─────────────┐ ┌─────────────┐
                    │ ChromaDB Vector DB  │ │ Paddle Billing│ │ arXiv API   │
                    └─────────────────────┘ └─────────────┘ └─────────────┘

    Parallel Generation Engine

    To optimize latency and cost:

    • Documents partitioned into groups (default: 5 papers per chunk)
    • Parallel workers (default: 3) process chunks concurrently
    • Results collated and streamed in original query order

    Key Features Breakdown

    Multi-Turn Relevance Agent

    The agent operates through an iterative loop:

    1. Initial vector search retrieves candidate papers
    2. LLM grades each on 0.0-1.0 relevance scale
    3. If insufficient papers meet threshold (default: 0.5 score):
      • Analyzes rejection patterns
      • Dynamically rewrites query
      • Executes secondary search (max 2 iterations)

    Live arXiv Fallback System

    When local results are inadequate:

    • Circuit breaker checks API status
    • Rate limiter enforces 3s minimum request interval
    • Results tagged with meta.source="arxiv_api"
    • Failure tracking triggers 5-minute cooldown after 3 consecutive errors

    Real-World Use Cases

    • Literature Review Acceleration: PhD candidates identifying foundational papers with precise relevance filtering
    • Citation Synthesis: Automated generation of survey papers with verified source adherence
    • Research Discovery: Industry labs discovering cutting-edge preprints through the arXiv fallback

    How It Works: Step-by-Step Workflow

    1. Query Validation: Rejects empty/chitchat inputs while failing open on system errors
    2. Initial Retrieval: Hybrid search combining dense vectors and BM25
    3. Relevance Grading: LLM evaluates each candidate against original query intent
    4. Dynamic Expansion: Rewrites queries when relevant papers < AGENT_MIN_RELEVANT_DOCS (default: 3)
    5. Fallback Activation: Live arXiv query when local results remain insufficient
    6. Verification: Computes faithfulness_score before final response

    Comparison: Recommendica vs Traditional Approaches

    Feature Traditional Search Recommendica
    Result Relevance Static top-K results Dynamically graded & filtered
    Coverage Limited to local database Live arXiv fallback integration
    Query Processing Single-pass retrieval Multi-turn agentic refinement
    Verification None Faithfulness scoring & source audits

    Frequently Asked Questions (FAQ)

    How does the Relevance Agent prevent hallucination?

    The agent performs three-stage verification: 1) Pre-retrieval query validation, 2) Document-level relevance grading (0.0-1.0), and 3) Post-generation faithfulness scoring against source texts.

    What happens when the arXiv API is unavailable?

    The circuit breaker opens after 3 failures, skipping live queries for 300 seconds. The system continues with locally available papers while showing coverage warnings.

    How are Paddle donations processed securely?

    All webhooks are verified via Paddle-Signature headers, with idempotent database updates preventing duplicate or out-of-order transaction processing.

    Conclusion & Next Steps

    Recommendica represents a paradigm shift in academic search by combining agentic refinement with live data integration. The system is currently available at recommendica.nevatal.tech, with the pay-what-you-want model ensuring sustainable access for researchers worldwide.

    For developers interested in the technical implementation, the architecture demonstrates several best practices including:

    • Graceful degradation through circuit breakers
    • Parallel processing of semantic chunks
    • Deterministic verification metrics
  • DivinityAI – Islamic Grounded RAG: A Hallucination-Free Quran & Hadith Search System

    Key Takeaways

    • Strict corpus-lock ensures answers are only sourced from authenticated Quran and Hadith collections
    • Five-path intent routing with confidence gating prevents off-topic responses
    • Hybrid search combining BM25 sparse and BGE-M3 dense embeddings for precise results
    • Deterministic citation verification with 4-tier validation chain
    • Pre-generation evidence checks and post-generation hallucination detectors

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) frequently hallucinate religious texts, fabricating Quranic surah and ayah numbers, misattributing Hadith narrations, and synthesizing inaccurate Fiqh positions. In a domain where textual accuracy is paramount, these hallucinations pose serious risks to users seeking authentic Islamic knowledge.

    Core Architecture & Technical Stack Deep-Dive

    System Components

    The system is built as a modular application with:

    • Frontend: React 19 SPA with Tailwind CSS v4 and specialized RTL Arabic typography
    • Backend: Django ASGI with Django REST Framework
    • Vector Database: ChromaDB with separate collections for Quran and Hadith
    • Embeddings: BGE-M3 for dense vector search
    • Sparse Search: BM25 on normalized Arabic text
    • LLM Orchestration: OpenRouter (Gemini 2.5 Flash) and Groq (Llama 3.3 70B)

    Arabic NLP Pipeline

    The system implements a rigorous preprocessing normalization stage:

    • NFKD Unicode normalization
    • Diacritic stripping (tashkeel removal)
    • Alef form normalization
    • Tatweel (kashida) removal

    Key Features Breakdown & Practical Benefits

    Strict Corpus-Lock Policy

    The system refuses to answer any query that cannot be verified from its locked database of authenticated sources, ensuring zero hallucination of religious texts.

    Five-Path Intent Router

    Automatically classifies queries into one of five categories with confidence gating:

    • Quran verse search
    • Hadith research
    • Fiqh analysis
    • Islamic calculations
    • Off-domain queries

    Deterministic Citation Verification

    Implements a 4-tier validation chain:

    1. Exact string matching
    2. Normalized text comparison
    3. Levenshtein distance fuzzy matching
    4. Semantic LLM fallback verification

    Real-World Use Cases & Applications

    • Scholarly research with guaranteed authentic references
    • Comparative analysis across canonical Hadith collections
    • Reference architecture for high-stakes domain-specific RAG systems
    • Academic study of classical Arabic religious texts

    How It Works: Step-by-Step Workflow

    1. User query enters the intent classification system
    2. Scope guard checks for domain appropriateness
    3. Query undergoes HyDE expansion and sub-query decomposition
    4. Hybrid retrieval with BM25 and BGE-M3 embeddings
    5. Reciprocal Rank Fusion blends results
    6. Deterministic citation verification
    7. Evidence sufficiency check
    8. Grounded generation with safety layers

    Comparison: DivinityAI vs Traditional Approaches

    Feature DivinityAI Traditional LLMs
    Hallucination Rate 0% (corpus-locked) High (5-20% for religious texts)
    Citation Accuracy >95% verified Unverified
    Domain Control Strict Islamic corpus only General knowledge
    Technical Approach RAG with verification layers Pure generative

    Frequently Asked Questions (FAQ)

    Does DivinityAI issue fatwas?

    No. The system displays authenticated source materials and existing scholarly positions without generating new religious rulings. Users are always advised to consult qualified scholars for definitive rulings.

    What languages does it support?

    The system fully supports Arabic (with optimized RTL rendering), English, and Malay inputs and outputs.

    How does it prevent hallucinations?

    Through multiple safeguards: strict corpus-locking, pre-generation evidence checks, post-generation hallucination detectors, and deterministic citation verification.

    Conclusion & Next Steps

    DivinityAI represents a significant advancement in domain-specific RAG systems, particularly for high-stakes applications where accuracy is non-negotiable. Its architectural patterns serve as a valuable reference for implementing similar systems in other specialized domains.

    Experience DivinityAI today at https://muslim.nevatal.tech

  • DivinityAI – Islamic Grounded RAG: Hallucination-Free Quran & Hadith Search

    DivinityAI – Islamic Grounded RAG: Hallucination-Free Quran & Hadith Search

    Key Takeaways:

    • Zero hallucination guarantee for Quran and Hadith references
    • Strict corpus-lock policy enforcing answers grounded in authenticated sources
    • Hybrid search combining BM25 sparse matching with BGE-M3 dense embeddings
    • Deterministic 4-tier citation verification ensuring textual accuracy
    • Specialized intent routing for Quran verses, Hadith, Fiqh, and calculations

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, fabricating Quranic surah and ayah numbers or misattributing Hadith narrations. This poses significant risks for scholars, students, and anyone seeking accurate Islamic references. DivinityAI addresses this critical gap with a Retrieval-Augmented Generation (RAG) system built around a locked, authenticated corpus of Al-Quran and canonical Hadith compilations.

    Core Architecture & Technical Stack Deep-Dive

    DivinityAI’s architecture combines modern AI techniques with specialized Islamic text processing:

    Frontend & Backend Infrastructure

    • Frontend: React 19 SPA with Tailwind CSS v4, optimized for Right-to-Left (RTL) Arabic typography and Uthmani script rendering
    • Backend: Django ASGI with Django REST Framework (DRF) for API endpoints

    Retrieval & Search Components

    • Vector Database: ChromaDB for storing Quran and Hadith embeddings
    • Embeddings: BGE-M3 for dense semantic search
    • Sparse Search: BM25 for exact token matching on normalized Arabic text
    • Rank Fusion: Reciprocal Rank Fusion (RRF) to combine sparse and dense results

    LLM Orchestration

    • Generation: OpenRouter (Gemini 2.5 Flash) for response synthesis
    • Validation: Groq (Llama 3.3 70B) for high-speed verification tasks

    Key Features Breakdown & Practical Benefits

    Strict Corpus-Lock Policy

    DivinityAI implements an uncompromising policy: if a fact or claim cannot be verified from retrieved sources, the system refuses to answer. This ensures zero hallucination of religious texts.

    Five-Path Intent Router

    Queries are intelligently classified into:

    • Quran verse search
    • Hadith research
    • Fiqh (jurisprudence) analysis
    • Islamic calculations (Zakat, inheritance)
    • Off-domain queries (automatically rejected)

    Deterministic Citation Verification

    A 4-tier validation chain ensures reference accuracy:

    1. Exact string matching against canonical sources
    2. Normalized matching (stripped diacritics)
    3. Fuzzy Levenshtein distance for near-identical texts
    4. Semantic LLM fallback for paraphrased content

    Real-World Use Cases & Applications

    • Scholarly Research: Authenticated Quran/Hadith reference discovery without hallucination risks
    • Academic Study: Comparative analysis of classical Arabic religious texts
    • Technical Reference: Design pattern for high-stakes zero-hallucination RAG architectures

    How It Works: Step-by-Step Workflow

    1. User submits query through React interface
    2. Intent classification via Gemini 2.5 Flash
    3. Scope enforcement (rejects off-domain queries)
    4. Query rewriting using HyDE and sub-query decomposition
    5. Hybrid retrieval (BM25 + BGE-M3 embeddings)
    6. Reciprocal Rank Fusion to combine results
    7. 4-tier citation verification
    8. Evidence sufficiency check
    9. Grounded generation with safety layers
    10. Final output with verified citations

    Comparison: DivinityAI vs Traditional Approaches

    Feature DivinityAI Traditional LLMs
    Hallucination Prevention Strict corpus-lock with verification High risk of fabrication
    Citation Accuracy 95%+ verified Unverified, often incorrect
    Query Understanding Specialized intent routing Generic interpretation
    Arabic Text Handling Advanced normalization pipeline Basic tokenization

    Frequently Asked Questions (FAQ)

    How does DivinityAI prevent hallucinations?

    Through a strict corpus-lock policy that refuses answers not grounded in authenticated sources, combined with pre-generation evidence checks and post-generation verification layers.

    What Islamic texts are included in the corpus?

    The King Fahd Uthmani Quran and the six main Hadith books (Sahih Bukhari, Sahih Muslim, etc.).

    Can DivinityAI issue fatwas?

    No, it displays source materials and scholarly positions without generating new religious rulings. For definitive rulings, consultation with qualified scholars is recommended.

    What languages are supported?

    Full support for Arabic (including RTL formatting) and English queries.

    Conclusion & Next Steps

    DivinityAI represents a significant advancement in reliable Islamic text retrieval, combining modern AI techniques with rigorous verification processes. For scholars, students, and developers alike, it offers a trustworthy solution for Quran and Hadith research free from hallucination risks.

    Explore the live system at https://muslim.nevatal.tech to experience corpus-locked Islamic RAG in action.