Terravive
Site intelligence that reads CAD and GIS files, with retrieval quality gated in CI.
Overview
Terravive is a multi-tenant AI site-intelligence SaaS for architects. It brings everything known about a site into one place and answers questions about it, backed by the team's drawings, surveys and photos.
The problem
Architects needed one platform to ingest and query everything known about a site: PDFs, CAD, GIS, LiDAR, photos and audio. The answers had to be trustworthy enough to act on.
It also had to be a real multi-tenant product, with strict tenant isolation, billing and a fully type-safe contract between the API and the admin app.
My role
- Architected the multimodal RAG pipeline: BullMQ workers (OCR, Whisper, Claude vision) ingest site data into pgvector.
- Designed the LangGraph agent graph (planner, tool registry, input and output guardrails) on a multi-provider LLM layer.
- Gated retrieval quality in CI with golden-set evals, plus nightly LLM-as-judge scoring and OpenTelemetry tracing.
- Built the platform foundation: a type-safe Turborepo monorepo (NestJS 11 and Next.js 16) where one Drizzle schema drives the OpenAPI contract and typed TanStack Query hooks.
Approach
- Hybrid retrieval: dense vectors and Postgres full-text search fused with RRF, then reranked with Cohere. Two indexes and a rerank call per query, but exact terms like drawing numbers and codes are found as well as meaning.
- A LangGraph agent that plans, calls tools and checks its input and output against guardrails.
- One LLM gateway over Claude, OpenAI and Groq, with failover, a circuit breaker, semantic caching and per-tenant budgets. More moving parts than one provider, but an outage or a runaway tenant can't take the product down.
- A golden question set runs against a real pgvector database on every push. CI is slower, but retrieval regressions are caught before users see them. The paid LLM-judge tier stays off the blocking path because its verdicts drift with the judge model.
- JWT and OAuth, RBAC, tenant isolation, audit logging, Stripe billing and PostHog feature flags on the same platform.
Architecture
A golden question set runs against a real pgvector database on every push. If recall or MRR drops, the build fails.
Results
Retrieval quality is measured, not guessed: recall@3 of 1.0 and MRR of 0.90 on real site data, checked in CI on every push. Terravive is in beta.