| Titre : | An NLP-Powered Diagnostic Platform for Algerian Vehicle Owners |
| Auteurs : | Abderrahmane, Auteur ; Salah eddine, Auteur ; Mohamed Chaouki Babahenini, Directeur de thèse |
| Editeur : | Biskra [Algérie] : Faculté des Sciences Exactes et des Sciences de la Nature et de la Vie, Université Mohamed Khider, 2026 |
| Format : | 1 vol. (281 p.) / couv. ill. en coul / 30 |
| Langues: | Français |
| Langues originales: | Anglais |
| Résumé : |
Vehicle diagnostics in Algeria remain inaccessible to over 6.3 million registered cars due to costly specialized tools and scarce technical expertise among informal mechanics.This work introduces Fixar, a fully local AI diagnostic assistant running on consumer hardware, combining a quantized Qwen3-8B LLM with hybrid FAISS-BM25 retrieval,Bayesian re-ranking, and multimodal input support via Florence-2-base and Whispersmall. A ten-stage pipeline with a multi-level confidence gate delivers OBD-II fault interpretations or escalates uncertain cases to a human mechanic. Validated on 121OBD-II codes over five runs, Fixar achieved a mean score of 8.7/10 across eight quality dimensions, including hallucination rate (9.2/10) and safety awareness (9.5/10). These results confirm that evidence-based local inference can effectively bridge the diagnostic gap for independent mechanics and vehicle owners in Alge |
| Sommaire : |
Abstract 10 General Introduction 11 1 Vehicle Diagnostics in Algeria: Problem Space and Motivation 13 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.2 The Evolution of Vehicle Diagnostics Globally . . . . . . . . . . . . . . 13 1.2.1 A Century of Automotive Electronics (1885–1980s) . . . . . . . 13 1.2.2 Standardised On-Board Diagnostics: OBD-I and OBD-II Protocols 14 1.2.3 Reactive vs. Preventive vs. Predictive Maintenance . . . . . . . 15 1.2.4 Reasons why knowledge of diagnosis is difficult to get . . . . . . 15 1.3 The Algerian Automotive Ecosystem . . . . . . . . . . . . . . . . . . . 16 1.3.1 Vehicle Types and Growth Trends . . . . . . . . . . . . . . . . . 16 1.3.2 The Informal Repair Network: Independent Garages and Street Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.3.3 Socio-Economic Barriers: Costs, Spare-Part Scarcity, and Skill Gaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.3.4 Why Algeria is a High-Impact Target for AI-Assisted Diagnostics 19 1.4 Problem Statement, Motivations, and Project Objectives . . . . . . . . 20 1.4.1 Three Core Diagnostic Failures . . . . . . . . . . . . . . . . . . 20 1.4.2 Motivations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.4.3 Project Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2 AI Technologies in LLMs: Theoretical Foundations 23 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.2 Language Intelligence: LLMs and Multi-modal Input . . . . . . . . . . 23 2.2.1 Matter of using LLM in vehicle diagnosis . . . . . . . . . . . . . 23 2.2.2 Inside the Transformer: Attention, Tokens, and Context Windows 24 2.2.3 Post-Training of Qwen3-8B: From Pre-trained Weights to a Reasoning Assistant . . . . . . . . . . . . . . . . . . . . 2.2.4 Knowledge Distillation in Qwen3 (Teacher Model, Student Model, Advantages) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.2.5 Chain-of-Thought and Multi-Step Diagnostic Reasoning . . . . 26 2.2.6 Multi-modal Input: How to parse text, image, and audio to the LLM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.3 Knowledge Retrieval: PDF Extraction, RAG, Embeddings, and Vector Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.3.1 PDF Intelligence: Extracting Repair Manuals . . . . . . . . . . 27 2.3.2 Retrieval-Augmented Generation (RAG) . . . . . . . . . . . . . 28 2.3.3 Hallucination Mitigation . . . . . . . . . . . . . . . . . . . . . . 29 2.3.4 Text Embeddings for Automotive Knowledge . . . . . . . . . . . 29 2.3.5 Semantic and keyword Search on database . . . . . . . . . . . . 31 2.4 Reasoning Under Uncertainty: Bayesian Inference . . . . . . . . . . . . 32 2.4.1 Bayesian implementation . . . . . . . . . . . . . . . . . . . . . . 32 2.4.2 Bayesian Inference Pipeline In Fixar . . . . . . . . . . . . . . . 33 2.4.3 Evidence Aggregation and Confidence Assessment . . . . . . . . 33 2.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3 System Design: Pipeline Architecture and Implementation 35 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.2 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.2.1 Design Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.2.2 High-Level Architecture, Component Map, and End-to-End Flow 36 3.2.3 Runtime Interaction Sequence . . . . . . . . . . . . . . . . . . . 40 3.2.4 System Class Architecture . . . . . . . . . . . . . . . . . . . . . 41 3.3 Data Foundation: Sourcing, Collection, and Indexing Automotive Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.3.1 Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.3.2 Challenges Unique to Automotive PDF Documents . . . . . . . 43 3.3.3 From Raw Data to a Searchable Index . . . . . . . . . . . . . . 43 3.4 Input Understanding: Personality Bootstrap to Symptom Extraction . 45 3.4.1 Stage 0: Personality Bootstrap: Self-Generated System Rules . . 45 3.4.2 Stages 1 & 2 : Input Conversion and Intent Classification . . . . 46 3.4.3 Stage 3 — Input Sufficiency Gate . . . . . . . . . . . . . . . . . 49 3.4.4 Intent-Based Dual-Path Routing After Stage 3 . . . . . . . . . . 50 3.4.5 Stage 4: Conservative Symptom Extraction and Re-ranking . . 51 3.5 Evidence Retrieval and Draft Diagnosis Generation . . . . . . . . . . . 52 3.5.1 Stage 5 : Hybrid RAG Retrieval from Automotive Manuals . . . 52 3.5.2 Stage 6: Draft Diagnosis Generation with Qwen3-8B . . . . . . 53 3.5.3 Stage 7 : Post-Draft Confidence Assessment . . . . . . . . . . . 54 3.6 Bayesian Re-ranking, Confidence Gate, and Structured Output . . . . . 55 3.6.1 Stage 8 : Bayesian Cause Re-ranking and Four-Tier Confidence Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.6.2 Stage 9: Intent-Specific Structured Output . . . . . . . . . . . . 58 3.7 Key Architectural Decisions . . . . . . . . . . . . . . . . . . . . . . . . 59 3.7.1 Selection of Qwen3-8B as the Primary Reasoning Model . . . . 59 3.7.2 Comparison Between Qwen3-8B and Gemma-2B . . . . . . . . . 59 3.7.3 Placement of the Input Sufficiency Gate Prior to Symptom Extraction . . . . . . . . . . . . . . . . . . . 60 3.7.4 Re-entry Point of the Bayesian Confidence Gate at Stage 5 Rather Than Stage 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.7.5 Per-Tier Iteration Caps as a Design Principle . . . . . . . . . . 61 3.7.6 Revision of the Retrieval Confidence Threshold from 0.35 to 0.50 61 3.7.7 Transition from a Stateful Context Loop to a Personality-Driven Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.7.8 Simplified End-to-End Computational Complexity . . . . . . . . 62 3.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4 Experimental Evaluation and Results 65 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.2 Platform Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.3 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 4.3.1 Evaluation Methodology and Ground Truth Construction . . . . 73 4.3.2 DTC Test Set and Query Types . . . . . . . . . . . . . . . . . . 74 4.3.3 Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.3.4 Baselines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.4 Model Selection and Architecture Decisions . . . . . . . . . . . . . . . . 76 4.4.1 LLM Comparative Evaluation: Gemma 2B-IT versus Qwen3-8B with Chain-of-Thought . . . . . . . . . . . . . . . . . . . . . . . 76 4.4.2 Retrieval Architecture: Decoupled Embedding and Hybrid Search 80 4.4.3 Multimodal Input Processing: Specialised Small Models versus the Generalist . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.5 Knowledge Base Construction and Data Processing . . . . . . . . . . . 83 4.5.1 PDF Extraction Pipeline: Docling versus Alternative Tools . . . 83 4.5.2 Corpus Overview and Source Distribution . . . . . . . . . . . . 84 4.5.3 Chunk Structure and Intermediate Storage Format . . . . . . . 85 4.5.4 Embedding Index Quality and Build Summary . . . . . . . . . . 86 4.6 End-to-End Pipeline Results and Validation . . . . . . . . . . . . . . . 86 4.6.1 Diagnostic Quality and Component Gains . . . . . . . . . . . . 86 4.6.2 Bayesian Confidence Gate: Tier Distribution and Score Correlation 87 4.6.3 Reasoning, Validation, and Safety . . . . . . . . . . . . . . . . . 88 4.6.4 Failure Cases and Current Limitations . . . . . . . . . . . . . . 90 4.7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.7.1 A Multi-Model Architecture Outperforms a Single Large Model 90 4.7.2 Score Stability Across Evaluation Sessions . . . . . . . . . . . . 91 4.7.3 Strengths of the Proposed System . . . . . . . . . . . . . . . . . 91 4.7.4 Accuracy vs. Latency Trade-Offs . . . . . . . . . . . . . . . . . 91 4.7.5 Comparison with Traditional OBD Scan Tools . . . . . . . . . . 91 4.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 General Conclusion 93 |
| Type de document : | Mémoire master |




