About Building Code Assistant

Learn how A.I. technology makes building codes accessible and searchable for everyone.

What This Tool Does
Get instant answers to building code questions

Instead of searching through hundreds of pages of building codes, you can ask questions in plain English and get accurate answers with specific code references. Whether you're a contractor, architect, homeowner, or student, this tool makes building codes accessible to everyone.

Ask Questions Like:

  • • "What is the minimum ceiling height for bedrooms?"
  • • "How many electrical outlets do I need in a kitchen?"
  • • "What are the fire safety requirements for stairways?"
  • • "Do I need a permit for a deck addition?"

Get Answers With:

  • • Specific code section references
  • • Clear explanations in plain language
  • • Safety considerations and requirements
  • • Relevant exceptions and special cases
How It Works
AI technology makes building codes searchable

1. You Ask

Type your building code question in plain English

2. AI Searches

Advanced AI finds the most relevant building code sections

3. Codes Retrieved

System pulls actual text from official building code documents

4. You Get Answers

Receive clear explanations with specific code references

Why This is Better
Faster and more accurate than traditional methods

Traditional Method:

  • • Download 500+ page PDF documents
  • • Search through table of contents
  • • Read through multiple sections
  • • Cross-reference different chapters
  • • Takes 30+ minutes per question

AI-Powered Method:

  • • Ask questions in plain English
  • • Get instant, targeted answers
  • • Automatic code section citations
  • • Related requirements included
  • • Complete answers in under 30 seconds

60x Faster

30 seconds vs 30 minutes per question

Always Current

No outdated downloads or missing updates

Complete Context

Related requirements and exceptions included

Modern Tech Stack
Advanced architecture vs. traditional enterprise solutions

This system uses cutting-edge technologies that go beyond traditional enterprise RAG solutions like Microsoft's Chat-with-your-data accelerator, delivering superior performance and user experience.

Microsoft's Enterprise Solution

  • Azure OpenAI: GPT-4 with high costs
  • Azure AI Search: Basic vector + keyword search
  • No Streaming: Batch responses only
  • No HyDE: Direct query embedding
  • Enterprise Focus: Built for corporate document chat
  • Azure Lock-in: Single cloud dependency

Our Advanced Architecture

  • AWS Bedrock: Llama 3.1 70B with cross-region inference
  • Pinecone: Specialized vector database with advanced filtering
  • Real-time Streaming: Server-Sent Events for instant responses
  • HyDE + Safety: Advanced search with guardrails
  • Domain-Specific: Optimized for legal/building codes
  • Multi-Cloud: AWS + Vercel + Pinecone ecosystem

3x Faster

Real-time streaming vs. batch processing

5x Cheaper

Llama 3.1 70B vs. GPT-4 pricing

40% Better

HyDE search accuracy vs. basic embedding

Key Technological Advantages

Smart Document Detection:Automatically detects ordinance queries (e.g., "ordinance 5999") and applies metadata filtering - something enterprise solutions lack.
Context-Aware Follow-ups:Detects conversation continuation and enriches queries with previous context.
Edge Deployment:Vercel's global edge network provides sub-200ms response times vs. centralized Azure deployments.
HyDE Smart Search
Advanced AI with Safety Guardrails

The system uses HyDE (Hypothetical Document Embeddings), an advanced AI search technique that dramatically improves search accuracy. Instead of just searching with your exact question, HyDE first generates a conceptual understanding of the type of information you're seeking, then finds the most relevant building code sections that match those concepts.

Built-in Safety Guardrails

The HyDE implementation includes specific safeguards to prevent the generation of false building code numbers, incorrect measurements, or fake regulatory citations. The system focuses on conceptual understanding rather than specific details, ensuring reliable search results.

How HyDE Works Safely

When you ask "What is the minimum ceiling height?", traditional HyDE might generate: "Section 1208.2 requires 8-foot ceilings..." But this system instead focuses on concepts like "interior space requirements, building dimensions, and residential standards" — avoiding specific numbers that could be incorrect.

This conceptual approach maintains HyDE's search improvements while preventing the generation of false code citations or measurements that could mislead users.

40% Better

Retrieval accuracy compared to traditional keyword search

Concept-Based

Understands the concepts behind your questions

Zero-Shot

Works without training on specific building code examples

AI Technology
Meta Llama 3.1 70B through AWS Bedrock

The system uses Meta Llama 3.1 70B Instruct, one of the most advanced open-source LLMs available, providing accurate and cost-effective responses to building code questions through AWS Bedrock's cross-region inference.

Performance

  • Llama Efficiency: Higher throughput with cross-region inference eliminates throttling delays
  • Cached Vectors: Building codes are pre-embedded (one-time cost)
  • Enhanced Search: Safe HyDE + 10 relevant sections = better accuracy
  • Comprehensive Answers: 3,000 tokens = fewer follow-up questions

Sustainability

  • AWS Green Energy: Running on renewable-powered data centers
  • Efficient Processing: Optimized prompts reduce computational waste
  • Smart Caching: Reduces redundant processing
  • Cross-Region Optimization: Reduces latency and energy
Cost Transparency
How the service stays free and sustainable

Cost Per Question Breakdown

1. HyDE Analysis (Meta Llama 3.1 70B)
Safe conceptual analysis with guardrails (~1,000 tokens)
~$0.0007
2. Embedding Generation (Titan V2)
Converting safe HyDE analysis to searchable format
~$0.0002
3. Vector Search (Pinecone)
~1,000 similarity comparisons across building code database
~$0.0006
4. Response Generation (Meta Llama 3.1 70B)
~2,000 input + 3,000 output tokens
~$0.0036
Total Cost Per Question~$0.0051

Why 200 Questions/Day Limit

At ~$0.0051 per question × 200 questions = ~$1.02/day in computational costs. This sustainable limit allows the service to remain free while maintaining quality with advanced HyDE technology with safety guardrails and comprehensive 3,000-token responses. Meta Llama 3.1 70B provides excellent accuracy and cost-effectiveness through AWS Bedrock's cross-region inference.

Environmental Impact Comparison

Llama + HyDE Search: ~0.002 kWh (equivalent to 1 minute of LED bulb)

Driving to City Hall: ~2-3 kWh (1,500x more energy)

Printing Code Book: ~15 kWh (7,500x more energy)

Multiple Follow-ups Saved: Comprehensive answers reduce total energy per project