Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungMCP Tool Poisoning: A Name Allowlist Is Not Enough(22.09.2026 um 18:56 Uhr)
Sichere ProgrammierungGiggleGigs: A Job Board That Actually Uses AI Where It Helps(22.09.2026 um 18:57 Uhr)
Sichere ProgrammierungThe Bootstrapped SaaS Flywheel: How to Hit $10k MRR Without VC Capital(22.09.2026 um 19:05 Uhr)
Sichere ProgrammierungThe container was running software nobody built(22.09.2026 um 19:08 Uhr)
Sichere ProgrammierungYour Terminal Tasks, Everywhere: Introducing Tasku Cloud(22.09.2026 um 19:08 Uhr)
Sichere ProgrammierungMCP Tool Poisoning: A Name Allowlist Is Not Enough(22.09.2026 um 18:56 Uhr)
Sichere ProgrammierungGiggleGigs: A Job Board That Actually Uses AI Where It Helps(22.09.2026 um 18:57 Uhr)
Sichere ProgrammierungThe Bootstrapped SaaS Flywheel: How to Hit $10k MRR Without VC Capital(22.09.2026 um 19:05 Uhr)
Sichere ProgrammierungThe container was running software nobody built(22.09.2026 um 19:08 Uhr)
Sichere ProgrammierungYour Terminal Tasks, Everywhere: Introducing Tasku Cloud(22.09.2026 um 19:08 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How I built an RAG engine for Singapore Laws

I built a "Triple Failover" RAG for Singapore Laws, then rewrote the logic based on your feedback. Hi everyone! I’m a student developer. Recently, I created Explore Singapore, a RAG-based search engine that scrapes about 20,000 pages of S…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I built a "Triple Failover" RAG for Singapore Laws, then rewrote the logic based on your feedback.



Hi everyone!



I’m a student developer. Recently, I created Explore Singapore, a RAG-based search engine that scrapes about 20,000 pages of Singaporean government acts and laws.



I recently posted the MVP and received some tough but essential feedback about hallucinations and query depth. I took that feedback, focused on improvements, and just released Version 2.



Here is how I upgraded the system from a basic RAG to a production-grade one.






The Design & UI



I aimed to avoid a dull government website.



Design: Heavily inspired by Apple’s minimalist style.



Tech: Custom frontend interacting with a Python backend.



The V2 Engineering Overhaul



The community challenged me on three main points. Here’s how I addressed them:






1. The "Personality" Fix



Issue: I use a "Triple Failover" system with three models as backup. When the main model failed, the backups sounded entirely different.



The Solution: I added Dynamic System Instructions. Now, if the backend switches to Model B, it uses a specific prompt designed for Model B’s features, making it mimic the structure and tone of the primary model. The user never notices the change.






2. The "Deep Search" Fix



Issue: A simple semantic search for "Starting a business" misses related laws like "Tax" or "Labor" acts.



The Solution: I implemented Multi-Query Retrieval (MQR). An LLM now intercepts your query. It breaks it down into sub-intents (e.g., “Business Registration,” “Corporate Tax,” “Employment Rules”). It searches for all of them at the same time and combines the results.



Result: Much richer, context-aware answers.






3. The "Hallucination" Fix



Issue: Garbage In, Garbage Out. If FAISS retrieves a bad document, the LLM produces inaccurate information.



The Solution: I added a Cross-Encoder Re-Ranking layer.



Step 1: FAISS grabs the top 10 results.



Step 2: A specialized Cross-Encoder model evaluates them for relevance.



Step 3: Irrelevant parts are removed before they reach the Chat LLM.






The Tech Stack



Embeddings: BGE-M3 (Running locally)



Vector DB: FAISS



Backend: Python + Custom Triple-Model Failover(runs on Hugging Face)



Logic: Multi-Query + Re-Ranking (New in V2)



Try it out



I am still learning. I’d love to hear your thoughts on the new logic.



Live Demo: Explore Singapore



GitHub Repo: adityaprasad-sudo/Explore-Singapore



Feedback is the backbone of improving a platform, especially on the failover speed, is welcome!👇

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How I built an RAG engine for Singapore Laws

Thematisch verwandte Begriffe: built, engine, Singapore, Laws · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-75517 | Novu provides an API for sending notifications through multiple channels…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick