Skip to main content
Alvin QuachFull Stack Developer
HomeProjectsExperienceBlog
HomeProjectsExperienceBlog
alvinquach

Full Stack Developer building systems that respect complexity.

Open to opportunities

AQ

Projects

  • All Projects
  • Hoparc Physical Therapy
  • OpportunIQ
  • Hoop Almanac
  • SculptQL

Knowledge

  • Blog
  • Experience
  • Interview Prep

Connect

  • Contact
  • LinkedIn
  • GitHub
  • X

Resources

  • Resume
© 2026All rights reserved.
Back to Blog
March 12, 2026 1 min read

Anti-Hallucination Architecture: Grounding AI in Real Data

Deep Dive
Featured
Depth: ●●●○○
Share:

A AI chat route with 7 custom tools that forces GPT-4o to use real API data instead of hallucinating prices and ratings.

Three-Layer Anti-Hallucination

1. Structured Input: Validated DiagnosisRequest schema ensures structured context. 2. Tool Grounding: "CRITICAL: You must use tools to provide REAL data. Never invent prices." 7 tools return real data from APIs. 3. Response Format: GROUNDING_RULES require citing tool results and flagging unavailable data.

The 7 Tools

getCostEstimate (DB lookup), searchContractors (Yelp/Foursquare), searchProducts (web crawler), searchReddit (user experiences), checkRecalls (CPSC/NHTSA), searchUtilityRebates (energy rebates), draftContractorEmail (RFQ generation). Each has bounded costs and returns verifiable data.

Related Projects

OpportunIQ

Share

Share:

Explore more

ProjectsExperienceRequest a call

Importance

★★★★★