I built a RAG engine to search Singaporean laws
Details
- External ID
- 46921180
- Source
- HN
- Company
- —
- Product
- I built a RAG engine to search Singaporean laws
- Website domain
- github.com
- Launched
- Feb. 7, 2026
- Cohort
- —
- Upvotes
- 5
- Upvotes percentile
- 0.10512129380053908
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:26 p.m.
- Updated at
- Sept. 7, 2026, 9:26 p.m.
Description
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 OverhaulThe 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: FAISSBackend: Python + Custom Triple-Model FailoverLogic: Multi-Query + Re-Ranking (New in V2)Try it outI am still learning. I’d love to hear your thoughts on the new logic.Live Demo: https://adityaprasad-sudo.github.io/Explore-Singapore/GitHub Repo: https://github.com/adityaprasad-sudo/Explore-SingaporeFeedback, especially on the failover speed, is welcome!
Enrichment
- Theme
- browser automation and scraping for AI
- Vertical
- Legal
- Function
- Search & retrieval
- Audience
- B2B
- AI stance
- AI feature
- Project type
- Hobby / open-source project
- Normalized one-liner
- search engine for singaporean laws
- Manually corrected
- False
Could you build this?
Yes The system is a conventional RAG pipeline scraping public legal texts, embedding them into a vector database, and querying an LLM with fallback strategies.
Discussion
4 comments analyzed.
Competitors
Other products that read as similar to this one — 26 launches clear the similarity bar, closest 8 shown.
Attention rank: #25 of 27 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 101 days after the earliest competitor.
- The biggest achievement of my life so far · hn · 2026-02-08 · 9 upvotes · similarity 0.67
- AI·rete·RAG · hn · 2026-09-22 · 44 upvotes · similarity 0.45
- RAG in 3 Lines of Python · hn · 2025-12-04 · 41 upvotes · similarity 0.40
- Askfeather.ai · hn · 2026-02-03 · 7 upvotes · similarity 0.40
- OpenFable · hn · 2026-04-08 · 5 upvotes · similarity 0.38
- Spent 2.5 years building better job search (now using it to find a job) · hn · 2026-01-16 · 8 upvotes · similarity 0.37
- Flint · hn · 2026-04-16 · 6 upvotes · similarity 0.37
- Solving the ~95% legislative coverage gap using LLM's · hn · 2025-12-16 · 41 upvotes · similarity 0.37
Other launches for this product
- No other launches for this product.