RAG System, Deterministic Hardware Ground Truth & Gemini AI Optimization Engine
# RAG System, Deterministic Hardware Ground Truth & Gemini AI Optimization Engine
## 1. Overview & Architecture Purpose
This document specifies the technical architecture, zero-hallucination guardrails, and knowledge ingestion pipelines governing the Pixahunt Gadget SaaS catalog. Prior to this implementation, generic generative AI models introduced significant hallucinations in consumer hardware specifications—specifically miscategorizing CPU form factors, confusing launch dates with bare calendar years, misidentifying motherboard socket compatibilities, and quoting misleading launch MSRP figures converted at modern currency rates rather than reflecting authentic market street values in Bangladesh.
To solve this permanently, Pixahunt deploys a 4-Layer Ground Truth Deterministic Prompting System paired with live Retrieval-Augmented Generation (RAG) and the high-resilience `GeminiContentService` engine.
---
## 2. The 4 Deterministic Hardware Ground Truth Pillars
### Pillar 1: Architectural & Socket Ground Truth Mappings
The system enforces strict architectural constraints based on official manufacturer specifications (Intel ARK & AMD Technical Database):
* **Intel 1st Gen (Nehalem / Clarkdale):** Socket LGA 1156, DDR3 (e.g., Core i3-530, i3-540, i3-550, i5-750, i7-870).
* **Intel 2nd & 3rd Gen (Sandy Bridge / Ivy Bridge):** Socket LGA 1155, DDR3.
* **Intel 4th Gen (Haswell / Devil's Canyon):** Socket LGA 1150, DDR3.
* **Intel 6th & 7th Gen (Skylake / Kaby Lake):** Socket LGA 1151 (100/200 Series), DDR4.
* **Intel 8th & 9th Gen (Coffee Lake / Refresh):** Socket LGA 1151 (300 Series), DDR4.
* **Intel 10th & 11th Gen (Comet Lake / Rocket Lake):** Socket LGA 1200, DDR4.
* **Intel 12th, 13th & 14th Gen (Alder / Raptor Lake / Refresh):** Socket LGA 1700, DDR4 / DDR5.
* **Intel Core Ultra Series 2 (Arrow Lake):** Socket LGA 1851, DDR5.
* **AMD Ryzen 1000 through 5000 Series:** Socket AM4, DDR4.
* **AMD Ryzen 7000 & 9000 Series:** Socket AM5, DDR5.
* **Integrated GPU Presence Rules:** Intel F-series desktop processors (e.g., Core i5-12400F, i3-10100F) have NO integrated graphics (`None / Dedicated GPU Required`). AMD desktop Ryzen 1000 through 5000 processors without the `G` suffix have NO integrated graphics.
### Pillar 2: Strict "Processor Type." Form-Factor Standard
Generative AI frequently placed marketing tiers (e.g. "Core i3", "Ryzen 5") into the form-factor classification. The standard dictates:
* **"Processor Type."** MUST designate the physical platform form-factor:
* `Desktop Processor` (for socketed desktop platforms: LGA 1156, LGA 1155, LGA 1150, LGA 1151, LGA 1200, LGA 1700, LGA 1851, AM4, AM5).
* `Laptop Processor` (for soldered mobile BGA platforms: Core i7-13700H, Ryzen 7 7840HS).
* `Server Processor` (for enterprise multi-socket architectures: Intel Xeon, AMD EPYC).
* `Mobile Processor` (for smartphone / tablet SoCs: Apple A-series, Snapdragon, Dimensity).
* Marketing family names belong strictly in the `Series` specification attribute.
### Pillar 3: Commercial Launch Date Precision
* Generative AI is prohibited from outputting bare 4-digit years (e.g. "2010") or generic calendar quarters (e.g. "Q1 2010").
* Launch dates MUST follow the exact format: `Month Day, Year` (e.g., `January 7, 2010`, `July 7, 2019`, `September 27, 2022`).
### Pillar 4: Calibrated Bangladesh Street & Used Market Pricing
* For discontinued or legacy hardware (Intel 1st through 11th Gen, AMD Ryzen 1000 through 3000 series): the pricing engine quotes realistic Dhaka used/refurbished street prices (e.g., Core i3 1st Gen: ৳1,000–৳1,500; Core i5 2nd–4th Gen: ৳2,200–৳3,500) rather than obsolete launch MSRP converted at modern USD exchange rates.
* For modern active retail hardware: prices reflect live retail pricing from authentic Bangladeshi computer stores (StarTech, Ryans Computers, TechLand).
---
## 3. Retrieval-Augmented Generation (RAG) Web Scraping Pipeline
When an admin inputs reference URLs for product curation or automated blog generation:
1. **Robust Web Scraper:** Utilizes `Http::withoutVerifying()` with complete desktop browser `User-Agent` headers and SSL verification bypass to avoid 403 Forbidden or cURL SSL errors.
2. **Semantic Content Stripping:** Strips `