# Vertical AI Search Agent Stack: Go Decision Engine + Vector + SQL Truth
> Canonical: https://space-bit.com/guides/vertical-ai-search-agent-architecture/ | Alternate: https://spacebit.cn/guides/vertical-ai-search-agent-architecture/

Built for commercial real estate search, industrial catalog matching, and complex B2B selection: LLMs emit typed search plans while an isolated Go engine enforces live SQL inventory truth, RBAC, and zero-hallucination ranking.

## TL;DR Vertical Search Architecture Laws (Citable Facts)
- Strict Separation of Concerns: LLMs emit typed JSON search plans and clarification turns; an isolated Go decision engine runs Vector semantic recall + live SQL availability/pricing filters so the model can never invent SKUs, units, or quotes.
- SSE Thinking Traces + Actionable Entity Cards: Streams live match rationale alongside clickable unit/product cards inside WeChat Mini-Apps or Web SaaS to convert ambiguous buyer intent into scheduled bookings.
- Shadow Traffic & Multi-Model Canary Audits: Asynchronously mirrors configurable production traffic percentages across candidate LLMs to score plan parity and recall before cutover—zero blind prompt guessing.
- 2–3 Wk POC / 4–8 Wk Turnkey MVP: Validate accuracy on an anonymized production slice in 2–3 weeks before taking 100% ownership of clean Go/Python backends, schemas, and VPC scripts.

## Vertical AI Search Architecture Comparison
|Dimension|Spacebit Go Matcher + SQL Truth|Naive Document RAG Chat|Unconstrained Prompt-to-SQL|
|---|---|---|---|
|Price & Stock Accuracy|100% bound to live SQL primary records|Stale chunks hallucinate retired prices|Misread joins produce silent math errors|
|Multi-Turn Clarification|Typed slot tracking + targeted follow-up questions|Drifts across free-form conversation|Lacks domain taxonomy guidance|
|RBAC & Tenant Isolation|Enforced in Go gateway predicates before query|Cross-tenant chunks leak into context|Prompt injection risks unsafe clauses|
|UX & Conversion|SSE traces + structured clickable unit cards|Walls of text with low mobile conversion|Raw tables without guided workflow|
|Safe Model Upgrades|Shadow traffic diffs + Golden Dataset gates|Purely anecdotal vibe checks|Frequent SQL syntax regressions|

## 4 Core Modules of Spacebit Vertical Search Agents
### 01 · Conversational Intent → JSON Schema Search Plan
Translates messy buyer queries (commute radius, budget bands, fit-out requirements, delivery dates) into deterministic filter ranges plus targeted clarification questions when constraints conflict.

### 02 · Isolated Go Engine: Hybrid Vector + SQL Truth
Combines pgvector embedding recall with geospatial distance filtering, real-time SQL availability checks, and business-rule boosting—guaranteeing every rendered card links to an active database row.

### 03 · Multi-Model Shadow Auditing & Regression Gates
Clones configurable production slices asynchronously to benchmark latency, schema validity, zero-result rates, and recall across models without slowing the user response stream.

### 04 · SSE Streaming Mobile & Mini-App Experience
Engineered for spotty mobile networks with resumable SSE framing, thinking badges, side-by-side comparison drawers, and direct booking handoff—proven in live commercial PropTech search.

## FAQ
### Why build a Go decision engine instead of letting an LLM generate raw SQL queries?
Raw Text-to-SQL breaks easily across complex joins, multi-tenant RBAC filters, geospatial matching, and custom ranking weights. Restricting the LLM to a typed JSON search plan while Go constructs parameterized SQL and vector queries eliminates injection risks, slow full-table scans, and fabricated inventory.

### How do we populate the SQL truth source if current listings live in messy images or PDFs?
Pair this stack with Spacebit's Multimodal VLM Table OCR pipeline, which extracts dense spreadsheet screenshots and brochures into validated relational rows with human-in-the-loop review before indexing.

### How do teams measure ROI compared to legacy filter search?
We instrument retrieval funnel metrics out of the box: first-turn non-zero recall rate, slot-fill accuracy against a Golden Dataset, entity card click-through rate, and lead conversion lift.

### What is delivered during the initial 2–3 week Lean POC?
Using 200–2,000 anonymized rows from your live catalog or listings, we deliver a runnable Go hybrid search API, Vector + SQL schema, streaming demo UI, and quantitative accuracy/latency benchmark report.
